@ninebone/table 0.0.115 β†’ 0.0.117

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