@ninebone/table 0.0.118 β†’ 0.0.119

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,12 +1,12 @@
1
- var ke = Object.defineProperty;
2
- var Ae = (w) => {
1
+ var Ae = Object.defineProperty;
2
+ var Ce = (w) => {
3
3
  throw TypeError(w);
4
4
  };
5
- var Ce = (w, s, t) => s in w ? ke(w, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[s] = t;
6
- var a = (w, s) => ke(w, "name", { value: s, configurable: !0 });
7
- var v = (w, s, t) => Ce(w, typeof s != "symbol" ? s + "" : s, t), Le = (w, s, t) => s.has(w) || Ae("Cannot " + t);
8
- var e = (w, s, t) => (Le(w, s, "read from private field"), t ? t.call(w) : s.get(w)), f = (w, s, t) => s.has(w) ? Ae("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(w) : s.set(w, t), y = (w, s, t, i) => (Le(w, s, "write to private field"), i ? i.call(w, t) : s.set(w, t), t);
9
- var _e = (w, s, t, i) => ({
5
+ var _e = (w, s, t) => s in w ? Ae(w, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[s] = t;
6
+ var c = (w, s) => Ae(w, "name", { value: s, configurable: !0 });
7
+ var v = (w, s, t) => _e(w, typeof s != "symbol" ? s + "" : s, t), ke = (w, s, t) => s.has(w) || Ce("Cannot " + t);
8
+ var e = (w, s, t) => (ke(w, s, "read from private field"), t ? t.call(w) : s.get(w)), f = (w, s, t) => s.has(w) ? Ce("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(w) : s.set(w, t), y = (w, s, t, i) => (ke(w, s, "write to private field"), i ? i.call(w, t) : s.set(w, t), t);
9
+ var Le = (w, s, t, i) => ({
10
10
  set _(n) {
11
11
  y(w, s, n, t);
12
12
  },
@@ -20,78 +20,78 @@ const me = class me extends Ie.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(me, "Trace");
23
+ c(me, "Trace");
24
24
  let ce = me;
25
25
  const Y = new ce();
26
- var C, H, p, W, O, z, j, B, G;
26
+ var I, W, p, O, z, B, j, D, G;
27
27
  const ve = class ve extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- f(this, C);
31
- f(this, H, !1);
30
+ f(this, I);
31
+ f(this, W, !1);
32
32
  f(this, p);
33
- f(this, W);
34
33
  f(this, O);
35
34
  f(this, z);
36
- f(this, j, /* @__PURE__ */ a(() => {
37
- if (!e(this, C)) return;
38
- const t = e(this, C).querySelector(".ng-container-body");
39
- t && (y(this, z, new ResizeObserver(() => {
35
+ f(this, B);
36
+ f(this, j, /* @__PURE__ */ c(() => {
37
+ if (!e(this, I)) return;
38
+ const t = e(this, I).querySelector(".ng-container-body");
39
+ t && (y(this, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), e(this, z).observe(t));
41
+ })), e(this, B).observe(t));
42
42
  }, "#observeResize"));
43
- v(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!e(this, C) || !e(this, p) || e(this, H)) return;
43
+ v(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!e(this, I) || !e(this, p) || e(this, W)) return;
45
45
  const t = e(this, p).container, i = t.querySelector("table");
46
46
  if (!i) return;
47
- const n = e(this, p).track, o = e(this, p).thumb, r = e(this, C).querySelector(".ng-container-bottom"), c = t.clientWidth, u = i.scrollWidth;
48
- if (c !== 0 && u > c)
47
+ const n = e(this, p).track, o = e(this, p).thumb, r = e(this, I).querySelector(".ng-container-bottom"), l = t.clientWidth, d = i.scrollWidth;
48
+ if (l !== 0 && d > 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 * (c / u), l), 20);
54
+ const a = n.clientWidth;
55
+ if (a <= 0) return;
56
+ const g = Math.max(Math.min(a * (l / d), a), 20);
57
57
  o.style.width = `${g}px`;
58
58
  let h = 0;
59
- const b = i.style.transform;
60
- if (b && b.includes("translateX")) {
61
- const x = b.match(/translateX\(([-\d.]+)px\)/);
62
- x && x[1] && (h = parseFloat(x[1]));
59
+ const u = i.style.transform;
60
+ if (u && u.includes("translateX")) {
61
+ const R = u.match(/translateX\(([-\d.]+)px\)/);
62
+ R && R[1] && (h = parseFloat(R[1]));
63
63
  } else
64
64
  h = parseInt(i.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, p).left.disabled = d === 0, e(this, p).right.disabled = d >= S - 1;
65
+ let b = parseInt(Math.abs(h) * a / d, 10);
66
+ b < 0 && (b = 0);
67
+ const x = a - g;
68
+ b > x && (b = x), o.style.left = `${b}px`, e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= x - 1;
69
69
  }, "refresh"));
70
- f(this, B, /* @__PURE__ */ a((t) => {
70
+ f(this, D, /* @__PURE__ */ c((t) => {
71
71
  if (!e(this, p)) return !1;
72
72
  const i = e(this, p).container, n = i.querySelector("table");
73
73
  if (!n) return !1;
74
74
  const o = e(this, p).track.getBoundingClientRect(), r = e(this, p).thumb.clientWidth;
75
- let c = t;
76
- c < 0 && (c = 0);
77
- const u = o.width - r;
78
- 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;
79
- const l = i.clientWidth, g = n.scrollWidth;
80
- let h = u > 0 ? -c * (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)`, c > 0 && c < u - 1;
75
+ let l = t;
76
+ l < 0 && (l = 0);
77
+ const d = o.width - r;
78
+ l > d && (l = d), l = parseInt(l, 10), e(this, p).thumb.style.left = `${l}px`, e(this, p).left.disabled = l === 0, e(this, p).right.disabled = l >= d - 1;
79
+ const a = i.clientWidth, g = n.scrollWidth;
80
+ let h = d > 0 ? -l * (g - a) / d : 0;
81
+ return -h > g - a && (h = -(g - a)), -h + 5 > g - a && (h = -(g - a)), a >= g && (h = 0), n.style.transform = `translateX(${h}px)`, l > 0 && l < d - 1;
82
82
  }, "#thumbMoveTo"));
83
- f(this, G, /* @__PURE__ */ a(() => {
84
- const t = /* @__PURE__ */ a((n) => {
85
- clearInterval(e(this, W)), clearInterval(e(this, O));
83
+ f(this, G, /* @__PURE__ */ c(() => {
84
+ const t = /* @__PURE__ */ c((n) => {
85
+ clearInterval(e(this, O)), clearInterval(e(this, z));
86
86
  const o = parseInt(e(this, p).thumb.style.left || 0, 10);
87
- e(this, B).call(this, o + n), y(this, W, setInterval(() => {
88
- clearInterval(e(this, W)), y(this, O, setInterval(() => {
87
+ e(this, D).call(this, o + n), y(this, O, setInterval(() => {
88
+ clearInterval(e(this, O)), y(this, z, setInterval(() => {
89
89
  const r = parseInt(e(this, p).thumb.style.left || 0, 10);
90
- e(this, B).call(this, r + n) || clearInterval(e(this, O));
90
+ e(this, D).call(this, r + n) || clearInterval(e(this, z));
91
91
  }, 50));
92
92
  }, 500));
93
- }, "delayScroll"), i = /* @__PURE__ */ a(() => {
94
- clearInterval(e(this, W)), clearInterval(e(this, O));
93
+ }, "delayScroll"), i = /* @__PURE__ */ c(() => {
94
+ clearInterval(e(this, O)), clearInterval(e(this, z));
95
95
  }, "clearTimer");
96
96
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
97
97
  e(this, p).left.addEventListener(n, i), e(this, p).right.addEventListener(n, i), e(this, p).track.addEventListener(n, i);
@@ -103,23 +103,23 @@ const ve = class ve extends HTMLElement {
103
103
  if (n.button !== 0) return;
104
104
  n.preventDefault();
105
105
  const o = e(this, p).track.getBoundingClientRect(), r = e(this, p).thumb.clientWidth;
106
- e(this, B).call(this, n.clientX - o.left - r / 2);
106
+ e(this, D).call(this, n.clientX - o.left - r / 2);
107
107
  }), e(this, p).thumb.addEventListener("mousedown", (n) => {
108
108
  if (n.button !== 0) return;
109
- n.stopPropagation(), n.preventDefault(), y(this, H, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
110
- const o = /* @__PURE__ */ a((c) => {
111
- if (!e(this, H)) return;
112
- const u = e(this, p).track.getBoundingClientRect();
113
- e(this, B).call(this, c.clientX - u.left - this.shiftX);
114
- }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
115
- y(this, H, !1), i(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
109
+ n.stopPropagation(), n.preventDefault(), y(this, W, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
110
+ const o = /* @__PURE__ */ c((l) => {
111
+ if (!e(this, W)) return;
112
+ const d = e(this, p).track.getBoundingClientRect();
113
+ e(this, D).call(this, l.clientX - d.left - this.shiftX);
114
+ }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
115
+ y(this, W, !1), i(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
116
116
  }, "onMouseUp");
117
117
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
118
118
  });
119
119
  }, "#init"));
120
120
  }
121
121
  connectedCallback() {
122
- if (y(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, C)) return;
122
+ if (y(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, I)) return;
123
123
  this.innerHTML = `
124
124
  <style>
125
125
  nine-table-hscrollbar {
@@ -183,8 +183,8 @@ const ve = class ve 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__ */ a(() => {
187
- const i = e(this, C).querySelector(".ng-container-body");
186
+ const t = /* @__PURE__ */ c(() => {
187
+ const i = e(this, I).querySelector(".ng-container-body");
188
188
  if (!i) {
189
189
  setTimeout(t, 10);
190
190
  return;
@@ -200,146 +200,160 @@ const ve = class ve extends HTMLElement {
200
200
  t();
201
201
  }
202
202
  disconnectedCallback() {
203
- e(this, z) && e(this, z).disconnect();
203
+ e(this, B) && e(this, B).disconnect();
204
204
  }
205
205
  };
206
- C = new WeakMap(), H = new WeakMap(), p = new WeakMap(), W = new WeakMap(), O = new WeakMap(), z = new WeakMap(), j = new WeakMap(), B = new WeakMap(), G = new WeakMap(), a(ve, "NineTableHScrollBar");
206
+ I = new WeakMap(), W = new WeakMap(), p = new WeakMap(), O = new WeakMap(), z = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakMap(), G = new WeakMap(), c(ve, "NineTableHScrollBar");
207
207
  let he = ve;
208
208
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", he);
209
- var J, I, A;
209
+ var J, M, C;
210
210
  const xe = class xe {
211
211
  constructor(s) {
212
212
  f(this, J);
213
- f(this, I, []);
214
- f(this, A, null);
215
- v(this, "initTemplate", /* @__PURE__ */ a((s) => {
213
+ f(this, M, []);
214
+ f(this, C, null);
215
+ v(this, "initTemplate", /* @__PURE__ */ c((s) => {
216
216
  const t = s.querySelector("tbody.bindable") || s.querySelector("tbody");
217
217
  if (!t) return;
218
218
  const i = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
219
- y(this, I, i.map((n) => n.cloneNode(!0))), y(this, A, null), console.log(`[RowManager] Template initialized with ${e(this, I).length} row(s).`);
219
+ y(this, M, i.map((n) => n.cloneNode(!0))), y(this, C, null), console.log(`[RowManager] Template initialized with ${e(this, M).length} row(s).`);
220
220
  }, "initTemplate"));
221
- /**
222
- * 🎯 μ‹€μ œ ν…Œμ΄λΈ”μ— ν…œν”Œλ¦Ώμ„ 1회 κ·Έλ¦° ν›„ 높이λ₯Ό μΈ‘μ •ν•˜κ³  μΊμ‹±ν•©λ‹ˆλ‹€.
223
- */
224
- v(this, "measureAndCacheHeight", /* @__PURE__ */ a((s) => {
225
- if (e(this, A) !== null)
226
- return e(this, A);
227
- if (e(this, I).length === 0)
221
+ v(this, "measureAndCacheHeight", /* @__PURE__ */ c((s) => {
222
+ if (e(this, C) !== null)
223
+ return e(this, C);
224
+ if (e(this, M).length === 0)
228
225
  throw new Error("[RowManager] Template TRs are empty.");
229
226
  const t = s.querySelector("tbody.bindable") || s.querySelector("tbody");
230
227
  if (!t) return 24;
231
- t.querySelectorAll("tr:not(.nodata)").forEach((c) => c.remove());
228
+ t.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
232
229
  const i = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
233
- e(this, I).forEach((c) => {
234
- n.appendChild(c.cloneNode(!0));
230
+ e(this, M).forEach((l) => {
231
+ n.appendChild(l.cloneNode(!0));
235
232
  }), i ? i.before(n) : t.appendChild(n);
236
233
  let o = 0;
237
- return t.querySelectorAll("tr:not(.nodata)").forEach((c, u) => {
238
- const l = c.offsetHeight;
239
- if (l === 0)
240
- throw new Error(`[RowManager] Rendered TR[${u}] height is 0. Check CSS styles.`);
241
- o += l, Y.log(`[RowManager] Measured TR[${u}] height: ${l}px`);
242
- }), y(this, A, o), console.log(`[RowManager] Template Height Cached Successfully: ${e(this, A)}px`), e(this, A);
234
+ return t.querySelectorAll("tr:not(.nodata)").forEach((l, d) => {
235
+ const a = l.offsetHeight;
236
+ if (a === 0)
237
+ throw new Error(`[RowManager] Rendered TR[${d}] height is 0. Check CSS styles.`);
238
+ o += a, Y.log(`[RowManager] Measured TR[${d}] height: ${a}px`);
239
+ }), y(this, C, o), console.log(`[RowManager] Template Height Cached Successfully: ${e(this, C)}px`), e(this, C);
243
240
  }, "measureAndCacheHeight"));
244
- /**
245
- * 🎯 μ»¨ν…Œμ΄λ„ˆ 높이 λŒ€λΉ„ ν•„μš”ν•œ 총 ν–‰ 갯수 μ‚°μ • (높이 μΈ‘μ • μ™„λ£Œ 전이면 κΈ°λ³Έ 1μ„ΈνŠΈ 높이 μ‚¬μš©)
246
- */
247
- v(this, "calculateRequiredRowCount", /* @__PURE__ */ a((s) => {
248
- const t = s.clientHeight || s.getBoundingClientRect().height || 400, i = e(this, A) !== null ? e(this, A) : this.measureAndCacheHeight(s), r = Math.ceil(t / i) + 20;
241
+ v(this, "calculateRequiredRowCount", /* @__PURE__ */ c((s) => {
242
+ const t = s.clientHeight || s.getBoundingClientRect().height || 400, i = e(this, C) !== null ? e(this, C) : this.measureAndCacheHeight(s), r = Math.ceil(t / i) + 20;
249
243
  return console.log(`[RowManager] Container Height: ${t}px | Template Height: ${i}px | Target Rows: ${r}`), r;
250
244
  }, "calculateRequiredRowCount"));
245
+ /**
246
+ * 🎯 μ‚°μ •λœ ν–‰ 개수만큼 μ‹€μ œ TR λΌˆλŒ€λ₯Ό 반볡 μƒμ„±ν•˜μ—¬ μ»¨ν…Œμ΄λ„ˆμ— μ±„μ›λ‹ˆλ‹€.
247
+ */
248
+ v(this, "renderRows", /* @__PURE__ */ c((s, t = null) => {
249
+ if (e(this, M).length === 0) return;
250
+ const i = s.querySelector("tbody.bindable") || s.querySelector("tbody");
251
+ if (!i) return;
252
+ i.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
253
+ const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment(), r = t !== null ? t : this.calculateRequiredRowCount(s);
254
+ console.log(`[RowManager] Rendering ${r} row sets into container...`);
255
+ for (let l = 0; l < r; l++)
256
+ e(this, M).forEach((d) => {
257
+ o.appendChild(d.cloneNode(!0));
258
+ });
259
+ n ? n.before(o) : i.appendChild(o), console.log(`[RowManager] Successfully rendered. Total DOM tr count: ${i.querySelectorAll("tr:not(.nodata)").length}`);
260
+ }, "renderRows"));
251
261
  y(this, J, s);
252
262
  }
253
263
  get templateLength() {
254
- return e(this, I).length || 1;
264
+ return e(this, M).length || 1;
255
265
  }
256
266
  };
257
- J = new WeakMap(), I = new WeakMap(), A = new WeakMap(), a(xe, "RowManager");
267
+ J = new WeakMap(), M = new WeakMap(), C = new WeakMap(), c(xe, "RowManager");
258
268
  let de = xe;
259
- var L, P, Q;
260
- const F = class F extends HTMLElement {
269
+ var k, L, Q;
270
+ const V = class V extends HTMLElement {
261
271
  constructor() {
262
272
  super();
263
- f(this, L, null);
264
- f(this, P);
265
- v(this, "init", /* @__PURE__ */ a((t) => {
273
+ f(this, k, null);
274
+ f(this, L);
275
+ v(this, "init", /* @__PURE__ */ c((t) => {
266
276
  if (!t) return;
267
- const i = /* @__PURE__ */ a((l) => {
268
- const g = /* @__PURE__ */ a((b) => {
269
- if (b.querySelector("colgroup")) return;
270
- 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);
271
- for (let R = 0; R < S; R++) {
277
+ const i = /* @__PURE__ */ c((a) => {
278
+ const g = /* @__PURE__ */ c((u) => {
279
+ if (u.querySelector("colgroup")) return;
280
+ const b = u.querySelector("tbody tr") || u.querySelector("tr"), x = b ? b.querySelectorAll("th, td").length : 1, R = document.createElement("colgroup"), A = Math.max(Math.floor((u.clientWidth || 600) / x), 100);
281
+ for (let E = 0; E < x; E++) {
272
282
  const ae = document.createElement("col");
273
- ae.setAttribute("width", k), x.appendChild(ae);
283
+ ae.setAttribute("width", A), R.appendChild(ae);
274
284
  }
275
- b.prepend(x);
276
- }, "ensureColgroup"), h = /* @__PURE__ */ a((b) => {
277
- if (b.querySelector("thead")) return;
278
- const d = document.createElement("thead"), S = b.querySelector("colgroup");
279
- S ? S.after(d) : b.prepend(d);
285
+ u.prepend(R);
286
+ }, "ensureColgroup"), h = /* @__PURE__ */ c((u) => {
287
+ if (u.querySelector("thead")) return;
288
+ const b = document.createElement("thead"), x = u.querySelector("colgroup");
289
+ x ? x.after(b) : u.prepend(b);
280
290
  }, "ensureThead");
281
- return g(l), h(l), l.classList.add("nine-table-element"), l;
291
+ return g(a), h(a), a.classList.add("nine-table-element"), a;
282
292
  }, "initializeTable"), n = t.cloneNode(!0);
283
- y(this, L, i(n)), e(this, L).style.display = "table", e(this, P).initTemplate(e(this, L));
284
- const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), c = this.querySelector(".ng-container-right"), u = /* @__PURE__ */ a((l, g, h = !1) => {
285
- const b = l.cloneNode(!0), d = Array.from(b.querySelectorAll("colgroup col")), S = [];
286
- return d.forEach((x, k) => {
287
- const R = x.getAttribute("fixed");
288
- (h ? !R || R === "" : R === g) || S.push(k);
289
- }), S.reverse().forEach((x) => {
290
- d[x] && d[x].remove(), b.querySelectorAll("tr").forEach((k) => {
291
- const R = k.querySelectorAll("th, td");
292
- R[x] && R[x].remove();
293
+ y(this, k, i(n)), e(this, k).style.display = "table", e(this, L).initTemplate(e(this, k));
294
+ const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"), d = /* @__PURE__ */ c((a, g, h = !1) => {
295
+ const u = a.cloneNode(!0), b = Array.from(u.querySelectorAll("colgroup col")), x = [];
296
+ return b.forEach((R, A) => {
297
+ const E = R.getAttribute("fixed");
298
+ (h ? !E || E === "" : E === g) || x.push(A);
299
+ }), x.reverse().forEach((R) => {
300
+ b[R] && b[R].remove(), u.querySelectorAll("tr").forEach((A) => {
301
+ const E = A.querySelectorAll("th, td");
302
+ E[R] && E[R].remove();
293
303
  });
294
- }), b;
304
+ }), u;
295
305
  }, "filterTableByFixed");
296
306
  if (r) {
297
- const l = u(e(this, L), null, !0);
298
- r.innerHTML = "", r.appendChild(l), e(this, P).measureAndCacheHeight(r);
307
+ const a = d(e(this, k), null, !0);
308
+ r.innerHTML = "", r.appendChild(a), e(this, L).measureAndCacheHeight(r), e(this, L).renderRows(r);
299
309
  }
300
310
  if (o) {
301
- const l = u(e(this, L), "left", !1);
311
+ const a = d(e(this, k), "left", !1);
302
312
  let g = 0;
303
- l.querySelectorAll("col").forEach((b) => {
304
- const d = parseInt(b.getAttribute("width"), 10);
305
- isNaN(d) || (g += d);
306
- }), o.innerHTML = "", o.appendChild(l);
307
- const h = g > 0 ? g : 0;
308
- o.style.flex = `0 0 ${h}px`, o.style.width = `${h}px`;
313
+ a.querySelectorAll("col").forEach((b) => {
314
+ const x = parseInt(b.getAttribute("width"), 10);
315
+ isNaN(x) || (g += x);
316
+ }), o.innerHTML = "", o.appendChild(a);
317
+ const h = e(this, L).calculateRequiredRowCount(o);
318
+ e(this, L).renderRows(o, h);
319
+ const u = g > 0 ? g : 0;
320
+ o.style.flex = `0 0 ${u}px`, o.style.width = `${u}px`;
309
321
  }
310
- if (c) {
311
- const l = u(e(this, L), "right", !1);
322
+ if (l) {
323
+ const a = d(e(this, k), "right", !1);
312
324
  let g = 0;
313
- l.querySelectorAll("col").forEach((b) => {
314
- const d = parseInt(b.getAttribute("width"), 10);
315
- isNaN(d) || (g += d);
316
- }), c.innerHTML = "", c.appendChild(l);
317
- const h = g > 0 ? g : 0;
318
- c.style.flex = `0 0 ${h}px`, c.style.width = `${h}px`;
325
+ a.querySelectorAll("col").forEach((b) => {
326
+ const x = parseInt(b.getAttribute("width"), 10);
327
+ isNaN(x) || (g += x);
328
+ }), l.innerHTML = "", l.appendChild(a);
329
+ const h = e(this, L).calculateRequiredRowCount(l);
330
+ e(this, L).renderRows(l, h);
331
+ const u = g > 0 ? g : 0;
332
+ l.style.flex = `0 0 ${u}px`, l.style.width = `${u}px`;
319
333
  }
320
334
  if (r) {
321
- const l = this.getRowCount();
322
- r.style.overflowY = l > 10 ? "auto" : "hidden", r.addEventListener("scroll", () => {
335
+ const a = this.getRowCount();
336
+ r.style.overflowY = a > 10 ? "auto" : "hidden", r.addEventListener("scroll", () => {
323
337
  const g = this.querySelector("nine-table-hscrollbar");
324
338
  g && typeof g.refresh == "function" && g.refresh();
325
339
  });
326
340
  }
327
341
  setTimeout(() => {
328
- const l = this.querySelector("nine-table-hscrollbar");
329
- l && typeof l.refresh == "function" && l.refresh();
342
+ const a = this.querySelector("nine-table-hscrollbar");
343
+ a && typeof a.refresh == "function" && a.refresh();
330
344
  }, 0), Y.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
331
345
  }, "init"));
332
- v(this, "getRowCount", /* @__PURE__ */ a(() => e(this, L) ? e(this, L).querySelectorAll("tbody tr").length : 0, "getRowCount"));
333
- v(this, "scrollToX", /* @__PURE__ */ a((t) => {
346
+ v(this, "getRowCount", /* @__PURE__ */ c(() => e(this, k) ? e(this, k).querySelectorAll("tbody tr").length : 0, "getRowCount"));
347
+ v(this, "scrollToX", /* @__PURE__ */ c((t) => {
334
348
  const i = this.querySelector(".ng-container-body");
335
349
  i && (i.scrollLeft = t);
336
350
  }, "scrollToX"));
337
- v(this, "scrollToY", /* @__PURE__ */ a((t) => {
351
+ v(this, "scrollToY", /* @__PURE__ */ c((t) => {
338
352
  const i = this.querySelector(".ng-container-body");
339
353
  i && (i.scrollTop = t);
340
354
  }, "scrollToY"));
341
- f(this, Q, /* @__PURE__ */ a(() => {
342
- const t = F.SCROLLBAR_SIZE;
355
+ f(this, Q, /* @__PURE__ */ c(() => {
356
+ const t = V.SCROLLBAR_SIZE;
343
357
  this.innerHTML = `
344
358
  <style>
345
359
  nine-table-sheet {
@@ -455,7 +469,7 @@ const F = class F extends HTMLElement {
455
469
  </div>
456
470
  `;
457
471
  }, "#render"));
458
- y(this, P, new de(this));
472
+ y(this, L, new de(this));
459
473
  }
460
474
  connectedCallback() {
461
475
  e(this, Q).call(this);
@@ -464,14 +478,14 @@ const F = class F extends HTMLElement {
464
478
  this.innerHTML = "", Y.log("NineTableSheet destroyed.");
465
479
  }
466
480
  };
467
- L = new WeakMap(), P = new WeakMap(), Q = new WeakMap(), a(F, "NineTableSheet"), v(F, "SCROLLBAR_SIZE", 16);
468
- let fe = F;
481
+ k = new WeakMap(), L = new WeakMap(), Q = new WeakMap(), c(V, "NineTableSheet"), v(V, "SCROLLBAR_SIZE", 16);
482
+ let fe = V;
469
483
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", fe);
470
484
  var ee;
471
- const Se = class Se extends HTMLElement {
485
+ const Re = class Re extends HTMLElement {
472
486
  constructor() {
473
487
  super();
474
- f(this, ee, /* @__PURE__ */ a(() => {
488
+ f(this, ee, /* @__PURE__ */ c(() => {
475
489
  const t = this.querySelector(".nine-tab-bar");
476
490
  t && (t.addEventListener("click", (i) => {
477
491
  const n = i.target.closest(".nine-tab-item");
@@ -480,39 +494,39 @@ const Se = class Se extends HTMLElement {
480
494
  this.switchSheet(r, o);
481
495
  }), this.switchSheet(0, !1));
482
496
  }, "#init"));
483
- v(this, "switchSheet", /* @__PURE__ */ a((t, i = !1) => {
484
- const n = /* @__PURE__ */ a(() => {
497
+ v(this, "switchSheet", /* @__PURE__ */ c((t, i = !1) => {
498
+ const n = /* @__PURE__ */ c(() => {
485
499
  const h = this.querySelector("nine-table-sheets-body");
486
- h.querySelectorAll("nine-splitter").forEach((d) => {
487
- 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}"]`);
488
- x && k && x.classList.contains("active") && k.classList.contains("active") ? d.classList.add("active") : d.classList.remove("active");
500
+ h.querySelectorAll("nine-splitter").forEach((b) => {
501
+ const x = parseInt(b.dataset.splitIndex, 10), R = h.querySelector(`nine-table-sheet[data-index="${x - 1}"]`), A = h.querySelector(`nine-table-sheet[data-index="${x}"]`);
502
+ R && A && R.classList.contains("active") && A.classList.contains("active") ? b.classList.add("active") : b.classList.remove("active");
489
503
  });
490
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), c = o.querySelectorAll(".nine-tab-item"), u = r.querySelectorAll("nine-table-sheet");
491
- if (!c[t]) return;
504
+ }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), d = r.querySelectorAll("nine-table-sheet");
505
+ if (!l[t]) return;
492
506
  if (!i)
493
- c.forEach((h, b) => {
494
- h.classList.toggle("active", b === t);
495
- const d = r.querySelector(`nine-table-sheet[data-index="${b}"]`);
496
- d && (d.style.flex = "");
497
- }), u.forEach((h, b) => {
498
- h.classList.toggle("active", b === t);
507
+ l.forEach((h, u) => {
508
+ h.classList.toggle("active", u === t);
509
+ const b = r.querySelector(`nine-table-sheet[data-index="${u}"]`);
510
+ b && (b.style.flex = "");
511
+ }), d.forEach((h, u) => {
512
+ h.classList.toggle("active", u === t);
499
513
  });
500
514
  else {
501
- const h = c[t], b = o.querySelectorAll(".nine-tab-item.active");
502
- if (h.classList.contains("active") && b.length <= 1)
515
+ const h = l[t], u = o.querySelectorAll(".nine-tab-item.active");
516
+ if (h.classList.contains("active") && u.length <= 1)
503
517
  return;
504
518
  h.classList.toggle("active");
505
- const d = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
506
- d && (d.classList.toggle("active"), d.classList.contains("active") || (d.style.flex = ""));
519
+ const b = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
520
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
507
521
  }
508
- const l = Array.from(r.querySelectorAll("nine-table-sheet.active"));
509
- if (l.length > 1) {
510
- const h = 1 / l.length;
511
- l.forEach((b) => {
512
- (!b.style.flex || b.style.flex === "1 1 100%") && (b.style.flex = `${h} ${h} 0px`);
522
+ const a = Array.from(r.querySelectorAll("nine-table-sheet.active"));
523
+ if (a.length > 1) {
524
+ const h = 1 / a.length;
525
+ a.forEach((u) => {
526
+ (!u.style.flex || u.style.flex === "1 1 100%") && (u.style.flex = `${h} ${h} 0px`);
513
527
  });
514
528
  } else
515
- l.forEach((h) => {
529
+ a.forEach((h) => {
516
530
  h.style.flex = "1 1 100%";
517
531
  });
518
532
  n();
@@ -527,32 +541,32 @@ const Se = class Se extends HTMLElement {
527
541
  e(this, ee).call(this);
528
542
  }
529
543
  };
530
- ee = new WeakMap(), a(Se, "NineTableSheets");
531
- let ue = Se;
544
+ ee = new WeakMap(), c(Re, "NineTableSheets");
545
+ let ue = Re;
532
546
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ue);
533
547
  var _, U, te, Z, se;
534
- const Ee = class Ee {
548
+ const Se = class Se {
535
549
  constructor(s) {
536
550
  f(this, _);
537
551
  f(this, U, null);
538
- f(this, te, /* @__PURE__ */ a(() => {
552
+ f(this, te, /* @__PURE__ */ c(() => {
539
553
  const s = e(this, _).host;
540
554
  s && (y(this, U, new ResizeObserver((t) => {
541
555
  for (let i of t)
542
556
  s.getAttribute("auto-height") === "true" && e(this, Z).call(this, s);
543
557
  })), e(this, U).observe(s));
544
558
  }, "#observeResize"));
545
- f(this, Z, /* @__PURE__ */ a((s) => {
546
- var k, R;
547
- const t = (k = s.shadowRoot) == null ? void 0 : k.querySelector("nine-table-sheet.active");
559
+ f(this, Z, /* @__PURE__ */ c((s) => {
560
+ var A, E;
561
+ const t = (A = s.shadowRoot) == null ? void 0 : A.querySelector("nine-table-sheet.active");
548
562
  if (!t) return;
549
- const i = ((R = t.getRowCount) == null ? void 0 : R.call(t)) || 0, n = parseInt(s.getAttribute("max-display-row"), 10) || 10, o = Math.min(i, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), c = r ? r.getBoundingClientRect().height : 32, u = e(this, _).querySelector("nine-table-header"), l = e(this, _).querySelector("nine-table-sheets-footer"), g = u ? u.getBoundingClientRect().height : 40, h = l ? l.getBoundingClientRect().height : 32, d = g + h + 16, S = o * c + d;
550
- s.style.height = `${S}px`, s.style.maxHeight = `${n * c + d}px`;
551
- const x = e(this, _).querySelector("nine-table-sheets-body");
552
- x && (x.style.overflowY = i > n ? "auto" : "hidden");
563
+ const i = ((E = t.getRowCount) == null ? void 0 : E.call(t)) || 0, n = parseInt(s.getAttribute("max-display-row"), 10) || 10, o = Math.min(i, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), l = r ? r.getBoundingClientRect().height : 32, d = e(this, _).querySelector("nine-table-header"), a = e(this, _).querySelector("nine-table-sheets-footer"), g = d ? d.getBoundingClientRect().height : 40, h = a ? a.getBoundingClientRect().height : 32, b = g + h + 16, x = o * l + b;
564
+ s.style.height = `${x}px`, s.style.maxHeight = `${n * l + b}px`;
565
+ const R = e(this, _).querySelector("nine-table-sheets-body");
566
+ R && (R.style.overflowY = i > n ? "auto" : "hidden");
553
567
  }, "#applyAutoHeight"));
554
- f(this, se, /* @__PURE__ */ a(() => {
555
- const s = e(this, _).host, i = Array.from(s.children).filter((u) => u.tagName === "TABLE"), n = s.getAttribute("auto-height") === "true", o = i.map((u, l) => `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`).join(""), r = i.map((u, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
568
+ f(this, se, /* @__PURE__ */ c(() => {
569
+ const s = e(this, _).host, i = Array.from(s.children).filter((d) => d.tagName === "TABLE"), n = s.getAttribute("auto-height") === "true", o = i.map((d, a) => `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`).join(""), r = i.map((d, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
556
570
  e(this, _).innerHTML = `
557
571
  <style>
558
572
  :host {
@@ -651,24 +665,24 @@ const Ee = class Ee {
651
665
  </nine-table-body>
652
666
  <nine-table-footer></nine-table-footer>
653
667
  `;
654
- const c = e(this, _).querySelectorAll("nine-table-sheet");
655
- c == null || c.forEach((u, l) => {
656
- i[l] && setTimeout(() => {
657
- u.init(i[l]), n && e(this, Z).call(this, s);
668
+ const l = e(this, _).querySelectorAll("nine-table-sheet");
669
+ l == null || l.forEach((d, a) => {
670
+ i[a] && setTimeout(() => {
671
+ d.init(i[a]), n && e(this, Z).call(this, s);
658
672
  });
659
673
  });
660
674
  }, "#render"));
661
675
  y(this, _, s), e(this, se).call(this), e(this, te).call(this);
662
676
  }
663
677
  };
664
- _ = new WeakMap(), U = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), se = new WeakMap(), a(Ee, "LayoutManager");
665
- let be = Ee;
678
+ _ = new WeakMap(), U = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), se = new WeakMap(), c(Se, "LayoutManager");
679
+ let be = Se;
666
680
  var $, N;
667
- const Re = class Re {
681
+ const Ee = class Ee {
668
682
  constructor(s) {
669
683
  f(this, $);
670
684
  f(this, N, -1);
671
- v(this, "count", /* @__PURE__ */ a(() => e(this, $).rawRecords.length, "count"));
685
+ v(this, "count", /* @__PURE__ */ c(() => e(this, $).rawRecords.length, "count"));
672
686
  y(this, $, s);
673
687
  }
674
688
  get at() {
@@ -684,72 +698,72 @@ const Re = class Re {
684
698
  });
685
699
  }
686
700
  };
687
- $ = new WeakMap(), N = new WeakMap(), a(Re, "ngRow");
688
- let ge = Re;
689
- var E, m, q, X, ie, M, ne, K, re, oe, V;
701
+ $ = new WeakMap(), N = new WeakMap(), c(Ee, "ngRow");
702
+ let ge = Ee;
703
+ var S, m, q, X, ie, H, ne, K, re, oe, F;
690
704
  const T = class T {
691
705
  constructor(s, t) {
692
- f(this, E);
706
+ f(this, S);
693
707
  f(this, m);
694
708
  f(this, q, []);
695
709
  f(this, X, []);
696
710
  f(this, ie, 0);
697
- f(this, M, []);
698
- f(this, ne, /* @__PURE__ */ a(() => {
699
- y(this, M, []);
700
- const s = e(this, E).template || [];
711
+ f(this, H, []);
712
+ f(this, ne, /* @__PURE__ */ c(() => {
713
+ y(this, H, []);
714
+ const s = e(this, S).template || [];
701
715
  Array.from(s).forEach((t) => {
702
716
  var i;
703
- e(this, M).push(((i = t.getBoundingClientRect) == null ? void 0 : i.call(t).height) || 24);
717
+ e(this, H).push(((i = t.getBoundingClientRect) == null ? void 0 : i.call(t).height) || 24);
704
718
  }), (e(this, m).rawRecords || []).forEach((t) => {
705
- t.__ng || (t.__ng = e(this, K).call(this)), t.__ng.height = e(this, M).slice();
719
+ t.__ng || (t.__ng = e(this, K).call(this)), t.__ng.height = e(this, H).slice();
706
720
  });
707
721
  }, "#initialize"));
708
- v(this, "set", /* @__PURE__ */ a((s) => {
722
+ v(this, "set", /* @__PURE__ */ c((s) => {
709
723
  this.clear(), this.add(s, !1);
710
724
  }, "set"));
711
- f(this, K, /* @__PURE__ */ a(() => ({
725
+ f(this, K, /* @__PURE__ */ c(() => ({
712
726
  rowState: T.ROW_STATE.EMPTY,
713
727
  deleted: !1,
714
728
  filtered: !1,
715
- height: e(this, M).slice(),
729
+ height: e(this, H).slice(),
716
730
  o: {},
717
731
  c: {},
718
- _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, M).slice(), -1, {}, {}]
732
+ _: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, H).slice(), -1, {}, {}]
719
733
  }), "#getDefaultMeta"));
720
- v(this, "reset", /* @__PURE__ */ a(() => {
734
+ v(this, "reset", /* @__PURE__ */ c(() => {
721
735
  y(this, q, []), y(this, X, []);
722
736
  }, "reset"));
723
- v(this, "clear", /* @__PURE__ */ a(() => {
737
+ v(this, "clear", /* @__PURE__ */ c(() => {
724
738
  var s;
725
739
  e(this, m).rawRecords = [], y(this, q, []), y(this, X, []), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
726
740
  }, "clear"));
727
- f(this, re, /* @__PURE__ */ a((s) => {
741
+ f(this, re, /* @__PURE__ */ c((s) => {
728
742
  var n;
729
743
  Array.isArray(s) || (s = [s]);
730
- const t = typeof ((n = e(this, E).fields) == null ? void 0 : n.get) == "function" ? e(this, E).fields.get() : Object.keys(s[0] || {}), i = [];
744
+ const t = typeof ((n = e(this, S).fields) == null ? void 0 : n.get) == "function" ? e(this, S).fields.get() : Object.keys(s[0] || {}), i = [];
731
745
  return s.forEach((o) => {
732
746
  const r = { v: [] };
733
- t.forEach((c) => {
734
- r.v.push(o[c] !== void 0 && o[c] !== null ? o[c] : "");
747
+ t.forEach((l) => {
748
+ r.v.push(o[l] !== void 0 && o[l] !== null ? o[l] : "");
735
749
  }), i.push(r);
736
750
  }), i;
737
751
  }, "#json2Array"));
738
- f(this, oe, /* @__PURE__ */ a((s) => (Array.isArray(s) || (s = [s]), s.forEach((t) => {
752
+ f(this, oe, /* @__PURE__ */ c((s) => (Array.isArray(s) || (s = [s]), s.forEach((t) => {
739
753
  t.__ng = e(this, K).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
740
754
  }), s), "#defaultInsert"));
741
- v(this, "add", /* @__PURE__ */ a((s, t = !0) => {
755
+ v(this, "add", /* @__PURE__ */ c((s, t = !0) => {
742
756
  var o;
743
757
  s === void 0 && (s = {});
744
758
  const i = e(this, re).call(this, s);
745
759
  e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, oe).call(this, i)), this.resetRecords();
746
760
  const n = this.count() - 1;
747
- return t || i.forEach((r, c) => {
748
- const u = e(this, m).rawRecords[n - c];
749
- u && (u.__ng.rowState = T.ROW_STATE.EMPTY);
761
+ return t || i.forEach((r, l) => {
762
+ const d = e(this, m).rawRecords[n - l];
763
+ d && (d.__ng.rowState = T.ROW_STATE.EMPTY);
750
764
  }), (o = e(this, m).viewRecords) != null && o.reset && e(this, m).viewRecords.reset(), n;
751
765
  }, "add"));
752
- v(this, "delete", /* @__PURE__ */ a((s) => {
766
+ v(this, "delete", /* @__PURE__ */ c((s) => {
753
767
  var i;
754
768
  let t = [];
755
769
  Array.isArray(s) ? t = s : typeof s > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(s, 10)], t.sort((n, o) => o - n).forEach((n) => {
@@ -761,62 +775,62 @@ const T = class T {
761
775
  }
762
776
  }), this.resetRecords(), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
763
777
  }, "delete"));
764
- v(this, "setValue", /* @__PURE__ */ a((s, t, i) => {
765
- var u;
778
+ v(this, "setValue", /* @__PURE__ */ c((s, t, i) => {
779
+ var d;
766
780
  s = parseInt(s, 10);
767
- const o = (typeof ((u = e(this, E).fields) == null ? void 0 : u.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
781
+ const o = (typeof ((d = e(this, S).fields) == null ? void 0 : d.get) == "function" ? e(this, S).fields.get() : []).indexOf(t);
768
782
  if (o < 0) return;
769
783
  const r = this.getValidData()[s];
770
784
  if (!r) return;
771
- const c = r.v[o];
772
- c !== i && r.__ng.rowState !== T.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(t) || (r.__ng.o[t] = c), r.__ng.rowState = T.ROW_STATE.UPDATE), r.v[o] = i, e(this, m).owner.refreshData && e(this, m).owner.refreshData(s);
785
+ const l = r.v[o];
786
+ l !== i && 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] = i, e(this, m).owner.refreshData && e(this, m).owner.refreshData(s);
773
787
  }, "setValue"));
774
- v(this, "resetRecords", /* @__PURE__ */ a(() => {
788
+ v(this, "resetRecords", /* @__PURE__ */ c(() => {
775
789
  y(this, X, e(this, m).rawRecords.filter((s) => !s.__ng.deleted)), y(this, q, e(this, m).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), e(this, m).rawRecords.forEach((s, t) => {
776
790
  s.__ng.rowidx = t;
777
791
  }), e(this, q).forEach((s, t) => {
778
792
  s.__ng.i = t;
779
793
  });
780
794
  }, "resetRecords"));
781
- v(this, "getValidData", /* @__PURE__ */ a(() => (e(this, q).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
782
- f(this, V, /* @__PURE__ */ a((s) => {
795
+ v(this, "getValidData", /* @__PURE__ */ c(() => (e(this, q).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
796
+ f(this, F, /* @__PURE__ */ c((s) => {
783
797
  var i;
784
798
  if (!s) return s;
785
- const t = typeof ((i = e(this, E).fields) == null ? void 0 : i.get) == "function" ? e(this, E).fields.get() : [];
799
+ const t = typeof ((i = e(this, S).fields) == null ? void 0 : i.get) == "function" ? e(this, S).fields.get() : [];
786
800
  return Array.isArray(s) ? s.filter((n) => !n.__ng.deleted).map((n) => {
787
801
  const o = {};
788
- return t.forEach((r, c) => {
789
- o[r] = n.v ? n.v[c] : n[r];
802
+ return t.forEach((r, l) => {
803
+ o[r] = n.v ? n.v[l] : n[r];
790
804
  }), o.__ng = n.__ng, o;
791
805
  }) : s;
792
806
  }, "#conv2"));
793
- v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
794
- v(this, "get", /* @__PURE__ */ a((s, t) => {
807
+ v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
808
+ v(this, "get", /* @__PURE__ */ c((s, t) => {
795
809
  var o;
796
810
  const i = this.getValidData();
797
811
  if (!i || i.length <= 0) return;
798
- if (s == null) return e(this, V).call(this, i);
812
+ if (s == null) return e(this, F).call(this, i);
799
813
  if (s < 0 || s >= i.length) return null;
800
- const n = typeof ((o = e(this, E).fields) == null ? void 0 : o.get) == "function" ? e(this, E).fields.get() : [];
814
+ const n = typeof ((o = e(this, S).fields) == null ? void 0 : o.get) == "function" ? e(this, S).fields.get() : [];
801
815
  if (t != null) {
802
816
  const r = n.indexOf(t);
803
817
  return r >= 0 ? i[s].v[r] : null;
804
818
  }
805
- return e(this, V).call(this, i[s]);
819
+ return e(this, F).call(this, i[s]);
806
820
  }, "get"));
807
- y(this, E, s), y(this, m, t), e(this, ne).call(this);
821
+ y(this, S, s), y(this, m, t), e(this, ne).call(this);
808
822
  }
809
823
  get source() {
810
- return e(this, V).call(this, e(this, m).rawRecords);
824
+ return e(this, F).call(this, e(this, m).rawRecords);
811
825
  }
812
826
  set source(s) {
813
827
  this.clear(), this.add(s, !1);
814
828
  }
815
829
  get nextId() {
816
- return ++_e(this, ie)._;
830
+ return ++Le(this, ie)._;
817
831
  }
818
832
  };
819
- E = new WeakMap(), m = new WeakMap(), q = new WeakMap(), X = new WeakMap(), ie = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), K = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), V = new WeakMap(), a(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
833
+ S = new WeakMap(), m = new WeakMap(), q = new WeakMap(), X = new WeakMap(), ie = new WeakMap(), H = new WeakMap(), ne = new WeakMap(), K = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), F = new WeakMap(), c(T, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
820
834
  v(T, "ROW_STATE", {
821
835
  EMPTY: "EMPTY",
822
836
  NORMAL: "NORMAL",
@@ -844,16 +858,16 @@ const Te = class Te {
844
858
  }, this.setDataSource([]);
845
859
  }
846
860
  };
847
- a(Te, "ngDataManager");
861
+ c(Te, "ngDataManager");
848
862
  let ye = Te;
849
- var D, le;
863
+ var P, le;
850
864
  const qe = class qe extends HTMLElement {
851
865
  constructor() {
852
866
  super();
853
867
  //#created = false;
854
- f(this, D);
868
+ f(this, P);
855
869
  f(this, le);
856
- this.attachShadow({ mode: "open" }), y(this, D, new ye(this));
870
+ this.attachShadow({ mode: "open" }), y(this, P, new ye(this));
857
871
  }
858
872
  connectedCallback() {
859
873
  y(this, le, new be(this.shadowRoot)), Y.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
@@ -863,18 +877,18 @@ const qe = class qe extends HTMLElement {
863
877
  }
864
878
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
865
879
  get data() {
866
- return e(this, D).data;
880
+ return e(this, P).data;
867
881
  }
868
882
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
869
883
  get row() {
870
- return e(this, D).row;
884
+ return e(this, P).row;
871
885
  }
872
886
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
873
887
  get dataManager() {
874
- return e(this, D);
888
+ return e(this, P);
875
889
  }
876
890
  };
877
- D = new WeakMap(), le = new WeakMap(), a(qe, "NineTable");
891
+ P = new WeakMap(), le = new WeakMap(), c(qe, "NineTable");
878
892
  let we = qe;
879
893
  customElements.get("nine-table") || customElements.define("nine-table", we);
880
894
  //# sourceMappingURL=nine-table.js.map