@ninebone/table 0.0.256 β†’ 0.0.257

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.
@@ -3,9 +3,9 @@ var Oe = (m) => {
3
3
  throw TypeError(m);
4
4
  };
5
5
  var Ne = (m, i, t) => i in m ? ze(m, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[i] = t;
6
- var h = (m, i) => ze(m, "name", { value: i, configurable: !0 });
7
- var v = (m, i, t) => Ne(m, typeof i != "symbol" ? i + "" : i, t), Be = (m, i, t) => i.has(m) || Oe("Cannot " + t);
8
- var e = (m, i, t) => (Be(m, i, "read from private field"), t ? t.call(m) : i.get(m)), b = (m, i, t) => i.has(m) ? Oe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, t), y = (m, i, t, s) => (Be(m, i, "write to private field"), s ? s.call(m, t) : i.set(m, t), t);
6
+ var c = (m, i) => ze(m, "name", { value: i, configurable: !0 });
7
+ var x = (m, i, t) => Ne(m, typeof i != "symbol" ? i + "" : i, t), Be = (m, i, t) => i.has(m) || Oe("Cannot " + t);
8
+ var e = (m, i, t) => (Be(m, i, "read from private field"), t ? t.call(m) : i.get(m)), u = (m, i, t) => i.has(m) ? Oe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, t), y = (m, i, t, s) => (Be(m, i, "write to private field"), s ? s.call(m, t) : i.set(m, t), t);
9
9
  var De = (m, i, t, s) => ({
10
10
  set _(n) {
11
11
  y(m, i, n, t);
@@ -20,32 +20,32 @@ const qe = class qe extends Pe.constructor {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(qe, "Trace");
23
+ c(qe, "Trace");
24
24
  let me = qe;
25
25
  const Y = new me();
26
26
  var C, O, p, B, D, N, ie, P, se;
27
27
  const ke = class ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- b(this, C);
31
- b(this, O, !1);
32
- b(this, p);
33
- b(this, B);
34
- b(this, D);
35
- b(this, N);
36
- b(this, ie, /* @__PURE__ */ h(() => {
30
+ u(this, C);
31
+ u(this, O, !1);
32
+ u(this, p);
33
+ u(this, B);
34
+ u(this, D);
35
+ u(this, N);
36
+ u(this, ie, /* @__PURE__ */ c(() => {
37
37
  if (!e(this, C)) return;
38
38
  const t = e(this, C).querySelector(".ng-container-body");
39
39
  t && (y(this, N, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, N).observe(t));
42
42
  }, "#observeResize"));
43
- v(this, "refresh", /* @__PURE__ */ h(() => {
43
+ x(this, "refresh", /* @__PURE__ */ c(() => {
44
44
  if (!e(this, C) || !e(this, p) || e(this, O)) return;
45
45
  const t = e(this, p).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), c = t.clientWidth, d = s.scrollWidth;
48
- if (c !== 0 && d > c)
47
+ const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), a = t.clientWidth, d = s.scrollWidth;
48
+ if (a !== 0 && d > a)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
@@ -53,29 +53,29 @@ const ke = class ke extends HTMLElement {
53
53
  }
54
54
  const l = n.clientWidth;
55
55
  if (l <= 0) return;
56
- const a = Math.max(Math.min(l * (c / d), l), 20);
57
- r.style.width = `${a}px`;
58
- const f = t.scrollLeft, u = d - c;
59
- let g = 0;
60
- u > 0 && (g = parseInt(f / u * (l - a), 10)), g < 0 && (g = 0);
61
- const S = l - a;
62
- g > S && (g = S), r.style.left = `${g}px`, Y.log(g), e(this, p).left.disabled = g === 0, e(this, p).right.disabled = g >= S - 1;
56
+ const h = Math.max(Math.min(l * (a / d), l), 20);
57
+ r.style.width = `${h}px`;
58
+ const f = t.scrollLeft, g = d - a;
59
+ let b = 0;
60
+ g > 0 && (b = parseInt(f / g * (l - h), 10)), b < 0 && (b = 0);
61
+ const S = l - h;
62
+ b > S && (b = S), r.style.left = `${b}px`, Y.log(b), e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= S - 1;
63
63
  }, "refresh"));
64
- b(this, P, /* @__PURE__ */ h((t) => {
64
+ u(this, P, /* @__PURE__ */ c((t) => {
65
65
  if (!e(this, p)) return !1;
66
66
  const s = e(this, p).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
68
  const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
69
- let c = t;
70
- c < 0 && (c = 0);
69
+ let a = t;
70
+ a < 0 && (a = 0);
71
71
  const d = r.width - o;
72
- c > d && (c = d), 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 >= d - 1;
73
- const l = s.clientWidth, a = n.scrollWidth;
74
- let f = d > 0 ? -c * (a - l) / d : 0;
75
- return -f > a - l && (f = -(a - l)), -f + 5 > a - l && (f = -(a - l)), l >= a && (f = 0), n.style.transform = `translateX(${f}px)`, c > 0 && c < d - 1;
72
+ a > d && (a = d), a = parseInt(a, 10), e(this, p).thumb.style.left = `${a}px`, e(this, p).left.disabled = a === 0, e(this, p).right.disabled = a >= d - 1;
73
+ const l = s.clientWidth, h = n.scrollWidth;
74
+ let f = d > 0 ? -a * (h - l) / d : 0;
75
+ return -f > h - l && (f = -(h - l)), -f + 5 > h - l && (f = -(h - l)), l >= h && (f = 0), n.style.transform = `translateX(${f}px)`, a > 0 && a < d - 1;
76
76
  }, "#thumbMoveTo"));
77
- b(this, se, /* @__PURE__ */ h(() => {
78
- const t = /* @__PURE__ */ h((n) => {
77
+ u(this, se, /* @__PURE__ */ c(() => {
78
+ const t = /* @__PURE__ */ c((n) => {
79
79
  clearInterval(e(this, B)), clearInterval(e(this, D));
80
80
  const r = parseInt(e(this, p).thumb.style.left || 0, 10);
81
81
  e(this, P).call(this, r + n), y(this, B, setInterval(() => {
@@ -84,7 +84,7 @@ const ke = class ke extends HTMLElement {
84
84
  e(this, P).call(this, o + n) || clearInterval(e(this, D));
85
85
  }, 50));
86
86
  }, 500));
87
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
+ }, "delayScroll"), s = /* @__PURE__ */ c(() => {
88
88
  clearInterval(e(this, B)), clearInterval(e(this, D));
89
89
  }, "clearTimer");
90
90
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
@@ -101,11 +101,11 @@ const ke = class ke extends HTMLElement {
101
101
  }), e(this, p).thumb.addEventListener("mousedown", (n) => {
102
102
  if (n.button !== 0) return;
103
103
  n.stopPropagation(), n.preventDefault(), y(this, O, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
104
- const r = /* @__PURE__ */ h((c) => {
104
+ const r = /* @__PURE__ */ c((a) => {
105
105
  if (!e(this, O)) return;
106
106
  const d = e(this, p).track.getBoundingClientRect();
107
- e(this, P).call(this, c.clientX - d.left - this.shiftX);
108
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
107
+ e(this, P).call(this, a.clientX - d.left - this.shiftX);
108
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
109
109
  y(this, O, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
110
110
  }, "onMouseUp");
111
111
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
@@ -177,7 +177,7 @@ const ke = class ke extends HTMLElement {
177
177
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
- const t = /* @__PURE__ */ h(() => {
180
+ const t = /* @__PURE__ */ c(() => {
181
181
  const s = e(this, C).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
@@ -197,26 +197,26 @@ const ke = class ke extends HTMLElement {
197
197
  e(this, N) && e(this, N).disconnect();
198
198
  }
199
199
  };
200
- C = new WeakMap(), O = new WeakMap(), p = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ie = new WeakMap(), P = new WeakMap(), se = new WeakMap(), h(ke, "NineTableHScrollBar");
200
+ C = new WeakMap(), O = new WeakMap(), p = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ie = new WeakMap(), P = new WeakMap(), se = new WeakMap(), c(ke, "NineTableHScrollBar");
201
201
  let we = ke;
202
202
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", we);
203
- var M, _, R, $, I, H, ne, re, oe, le;
203
+ var M, _, R, $, H, I, ne, re, oe, le;
204
204
  const Le = class Le {
205
205
  constructor(i) {
206
- b(this, M);
207
- b(this, _, []);
208
- b(this, R, null);
209
- b(this, $, null);
210
- b(this, I, 0);
211
- b(this, H, 0);
212
- v(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, R), "getRowHeight"));
213
- b(this, ne, /* @__PURE__ */ h(() => {
206
+ u(this, M);
207
+ u(this, _, []);
208
+ u(this, R, null);
209
+ u(this, $, null);
210
+ u(this, H, 0);
211
+ u(this, I, 0);
212
+ x(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, R), "getRowHeight"));
213
+ u(this, ne, /* @__PURE__ */ c(() => {
214
214
  e(this, re).call(this);
215
215
  }, "#init"));
216
216
  /**
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
- b(this, re, /* @__PURE__ */ h(() => {
219
+ u(this, re, /* @__PURE__ */ c(() => {
220
220
  !e(this, M) || !(e(this, M) instanceof HTMLElement) || (y(this, $, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
@@ -226,14 +226,14 @@ const Le = class Le {
226
226
  if (n > 0) {
227
227
  const r = s.clientHeight || s.getBoundingClientRect().height || n;
228
228
  let o = 0;
229
- const c = s.querySelector(".ng-container-body") || s, d = c.querySelector("thead"), l = c.querySelector("tfoot");
229
+ const a = s.querySelector(".ng-container-body") || s, d = a.querySelector("thead"), l = a.querySelector("tfoot");
230
230
  d && (o += d.offsetHeight || d.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
- const a = Math.max(r - o, 100);
232
- if (e(this, I) !== a && (y(this, I, a), e(this, R) !== null)) {
233
- const f = Math.ceil(e(this, I) / e(this, R));
234
- y(this, H, f + 20), Y.log(`[RowManager] Resized. Height: ${e(this, I)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
235
- const g = s.querySelector(u);
236
- g && g.querySelector("tbody") && e(this, le).call(this, g);
231
+ const h = Math.max(r - o, 100);
232
+ if (e(this, H) !== h && (y(this, H, h), e(this, R) !== null)) {
233
+ const f = Math.ceil(e(this, H) / e(this, R));
234
+ y(this, I, f + 20), Y.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, I)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
235
+ const b = s.querySelector(g);
236
+ b && b.querySelector("tbody") && e(this, le).call(this, b);
237
237
  });
238
238
  }
239
239
  }
@@ -241,12 +241,12 @@ const Le = class Le {
241
241
  })), e(this, $).observe(e(this, M)));
242
242
  }, "#initResizeObserver"));
243
243
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
- v(this, "initialize", /* @__PURE__ */ h((i) => {
244
+ x(this, "initialize", /* @__PURE__ */ c((i) => {
245
245
  Y.log(i);
246
246
  const t = e(this, M).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
247
247
  y(this, _, n.map((r) => r.cloneNode(!0))), y(this, R, null), e(this, oe).call(this, t);
248
248
  }, "initialize"));
249
- b(this, oe, /* @__PURE__ */ h((i) => {
249
+ u(this, oe, /* @__PURE__ */ c((i) => {
250
250
  if (e(this, R) !== null && e(this, R) > 0)
251
251
  return e(this, R);
252
252
  if (e(this, _).length === 0)
@@ -258,18 +258,18 @@ const Le = class Le {
258
258
  e(this, _).forEach((f) => {
259
259
  n.appendChild(f.cloneNode(!0));
260
260
  }), s ? s.before(n) : t.appendChild(n);
261
- const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", c = r ? r.style.visibility : "", d = r ? r.style.position : "";
261
+ const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", a = r ? r.style.visibility : "", d = r ? r.style.position : "";
262
262
  r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
263
263
  let l = 0;
264
- const a = t.querySelectorAll("tr:not(.nodata)");
265
- if (a.forEach((f, u) => {
264
+ const h = t.querySelectorAll("tr:not(.nodata)");
265
+ if (h.forEach((f, g) => {
266
266
  l += f.offsetHeight || f.getBoundingClientRect().height;
267
- }), a.forEach((f) => f.remove()), r && (r.style.display = o, r.style.visibility = c, r.style.position = d), y(this, R, l), e(this, I) > 0) {
268
- const f = Math.ceil(e(this, I) / e(this, R));
269
- y(this, H, f + 20);
267
+ }), h.forEach((f) => f.remove()), r && (r.style.display = o, r.style.visibility = a, r.style.position = d), y(this, R, l), e(this, H) > 0) {
268
+ const f = Math.ceil(e(this, H) / e(this, R));
269
+ y(this, I, f + 20);
270
270
  } else
271
- y(this, H, 40);
272
- return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, H)}`), e(this, R);
271
+ y(this, I, 40);
272
+ return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, I)}`), e(this, R);
273
273
  }, "#measureAndCacheHeight"));
274
274
  /**
275
275
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -287,19 +287,19 @@ const Le = class Le {
287
287
  /**
288
288
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
289
289
  */
290
- b(this, le, /* @__PURE__ */ h((i) => {
290
+ u(this, le, /* @__PURE__ */ c((i) => {
291
291
  if (e(this, _).length === 0) return;
292
292
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
293
293
  if (!t) return;
294
294
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
295
- const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, H);
295
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, I);
296
296
  for (let o = 0; o < r; o++)
297
- e(this, _).forEach((c) => {
298
- n.appendChild(c.cloneNode(!0));
297
+ e(this, _).forEach((a) => {
298
+ n.appendChild(a.cloneNode(!0));
299
299
  });
300
300
  s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
301
301
  }, "#renderRows"));
302
- v(this, "destroy", /* @__PURE__ */ h(() => {
302
+ x(this, "destroy", /* @__PURE__ */ c(() => {
303
303
  e(this, $) && (e(this, $).disconnect(), y(this, $, null));
304
304
  }, "destroy"));
305
305
  y(this, M, i), e(this, ne).call(this);
@@ -308,121 +308,113 @@ const Le = class Le {
308
308
  return e(this, _).length || 1;
309
309
  }
310
310
  };
311
- M = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), H = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), h(Le, "RowManager");
311
+ M = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), I = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), c(Le, "RowManager");
312
312
  let xe = Le;
313
313
  var A, F, G, U, ae, ce;
314
314
  const j = class j extends HTMLElement {
315
315
  constructor() {
316
316
  super();
317
- b(this, A, null);
318
- b(this, F);
317
+ u(this, A, null);
318
+ u(this, F);
319
319
  /**
320
320
  * 🎯 2차원 μ…€ 격자 인덱슀λ₯Ό κ³„μ‚°ν•˜μ—¬ 병합(`rowSpan`/`colSpan`) μ…€μ˜ μ ˆλŒ€ 컬럼 μœ„μΉ˜λ₯Ό λΆ€μ—¬
321
321
  */
322
- b(this, G, /* @__PURE__ */ h((t, s) => {
322
+ u(this, G, /* @__PURE__ */ c((t, s) => {
323
323
  const n = Array.from(t.querySelectorAll(s + " tr")), r = Array.from(t.querySelectorAll(s + " th," + s + " td")), o = n.length;
324
324
  if (o === 0 || r.length === 0) return;
325
- let c = 0;
325
+ let a = 0;
326
326
  r.forEach((l) => {
327
- c += l.colSpan || 1;
327
+ a += l.colSpan || 1;
328
328
  });
329
- const d = Array.from(Array(o), () => Array(c).fill(null));
329
+ const d = Array.from(Array(o), () => Array(a).fill(null));
330
330
  n.forEach((l) => {
331
- const a = l.sectionRowIndex;
331
+ const h = l.sectionRowIndex;
332
332
  let f = 0;
333
- Array.from(l.querySelectorAll("th,td")).forEach((u) => {
334
- for (let x = 0; x < d[a].length; x++)
335
- if (d[a][x] === null) {
336
- f = x;
333
+ Array.from(l.querySelectorAll("th,td")).forEach((g) => {
334
+ for (let v = 0; v < d[h].length; v++)
335
+ if (d[h][v] === null) {
336
+ f = v;
337
337
  break;
338
338
  }
339
- const g = u.rowSpan || 1, S = u.colSpan || 1;
340
- for (let x = 0; x < g; x++)
339
+ const b = g.rowSpan || 1, S = g.colSpan || 1;
340
+ for (let v = 0; v < b; v++)
341
341
  for (let L = 0; L < S; L++)
342
- a + x < o && f + L < c && (d[a + x][f + L] = x === 0 && L === 0 ? "1" : "0");
342
+ h + v < o && f + L < a && (d[h + v][f + L] = v === 0 && L === 0 ? "1" : "0");
343
343
  });
344
344
  }), n.forEach((l) => {
345
- const a = l.sectionRowIndex;
345
+ const h = l.sectionRowIndex;
346
346
  Array.from(l.querySelectorAll("th,td")).forEach((f) => {
347
- for (let u = 0; u < d[a].length; u++)
348
- if (d[a][u] === "1") {
349
- f.dataset.col = u, d[a][u] = "0";
347
+ for (let g = 0; g < d[h].length; g++)
348
+ if (d[h][g] === "1") {
349
+ f.dataset.col = g, d[h][g] = "0";
350
350
  break;
351
351
  }
352
352
  });
353
353
  });
354
354
  }, "#resetColIndex"));
355
355
  /**
356
- * 🎯 원본 ν…Œμ΄λΈ”μ„ λΆ„μ„ν•˜μ—¬ κ³ μ • 컬럼 μ˜μ—­λ³„(left, body, right)둜 μ™„λ²½ν•˜κ²Œ μͺΌκ°œμ§„ ν…Œμ΄λΈ” 생성
356
+ * 🎯 순수 바닐라 μžλ°”μŠ€ν¬λ¦½νŠΈ(Vanilla JS) 기반의 κΉ”λ”ν•œ #createSplitTable
357
357
  */
358
- b(this, U, /* @__PURE__ */ h((t, s) => {
359
- const n = t.cloneNode(!0), r = n.querySelector("colgroup");
360
- if (!r) return n;
361
- const o = Array.from(r.querySelectorAll("col")), c = [];
362
- return o.forEach((d, l) => {
363
- const a = d.getAttribute("fixed");
364
- let f = !1;
365
- s === "left" ? f = a === "left" : s === "right" ? f = a === "right" : f = a !== "left" && a !== "right", f || c.push(l);
366
- }), c.reverse().forEach((d) => {
367
- o[d] && o[d].remove(), n.querySelectorAll("tr").forEach((l) => {
368
- let a = 0;
369
- Array.from(l.querySelectorAll("th, td")).forEach((u) => {
370
- const g = u.colSpan || 1, S = a, x = a + g - 1;
371
- d >= S && d <= x && (g === 1 ? u.remove() : u.colSpan = g - 1), a += g;
372
- });
373
- });
358
+ u(this, U, /* @__PURE__ */ c((t, s) => {
359
+ const n = t.cloneNode(!0);
360
+ return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
361
+ r.getAttribute("fixed") !== "left" && r.remove();
362
+ }) : s === "right" ? n.querySelectorAll("col, th, td").forEach((r) => {
363
+ r.getAttribute("fixed") !== "right" && r.remove();
364
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
365
+ r.remove();
374
366
  }), n;
375
367
  }, "#createSplitTable"));
376
- v(this, "generate", /* @__PURE__ */ h((t) => {
368
+ x(this, "generate", /* @__PURE__ */ c((t) => {
377
369
  if (!t) return;
378
- const s = /* @__PURE__ */ h((l) => {
379
- const a = /* @__PURE__ */ h((u) => {
380
- if (u.querySelector("colgroup")) return;
381
- const g = u.querySelector("tbody tr") || u.querySelector("tr"), S = g ? g.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), L = Math.max(Math.floor(u.clientWidth / S), 100);
370
+ const s = /* @__PURE__ */ c((l) => {
371
+ const h = /* @__PURE__ */ c((g) => {
372
+ if (g.querySelector("colgroup")) return;
373
+ const b = g.querySelector("tbody tr") || g.querySelector("tr"), S = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), L = Math.max(Math.floor(g.clientWidth / S), 100);
382
374
  for (let $e = 0; $e < S; $e++) {
383
375
  const We = document.createElement("col");
384
- We.setAttribute("width", L), x.appendChild(We);
376
+ We.setAttribute("width", L), v.appendChild(We);
385
377
  }
386
- u.prepend(x);
387
- }, "ensureColgroup"), f = /* @__PURE__ */ h((u) => {
388
- if (u.querySelector("thead")) return;
389
- const g = document.createElement("thead"), S = u.querySelector("colgroup");
390
- S ? S.after(g) : u.prepend(g);
378
+ g.prepend(v);
379
+ }, "ensureColgroup"), f = /* @__PURE__ */ c((g) => {
380
+ if (g.querySelector("thead")) return;
381
+ const b = document.createElement("thead"), S = g.querySelector("colgroup");
382
+ S ? S.after(b) : g.prepend(b);
391
383
  }, "ensureThead");
392
- return a(l), f(l), l.classList.add("nine-table-element"), l;
384
+ return h(l), f(l), l.classList.add("nine-table-element"), l;
393
385
  }, "initializeTable"), n = t.cloneNode(!0);
394
- y(this, A, s(n)), e(this, A).style.display = "table", e(this, G).call(this, e(this, A), "thead"), e(this, G).call(this, e(this, A), "tbody"), Array.from(e(this, A).querySelectorAll("colgroup col")).forEach((l, a) => {
386
+ y(this, A, s(n)), e(this, A).style.display = "table", e(this, G).call(this, e(this, A), "thead"), e(this, G).call(this, e(this, A), "tbody"), Array.from(e(this, A).querySelectorAll("colgroup col")).forEach((l, h) => {
395
387
  const f = l.getAttribute("fixed");
396
- f && e(this, A).querySelectorAll(`[data-col="${a}"]`).forEach((u) => {
397
- u.setAttribute("fixed", f);
388
+ f && e(this, A).querySelectorAll(`[data-col="${h}"]`).forEach((g) => {
389
+ g.setAttribute("fixed", f);
398
390
  });
399
391
  }), Y.log(e(this, A));
400
- const o = this.querySelector(".ng-container-left"), c = this.querySelector(".ng-container-body"), d = this.querySelector(".ng-container-right");
401
- if (c) {
392
+ const o = this.querySelector(".ng-container-left"), a = this.querySelector(".ng-container-body"), d = this.querySelector(".ng-container-right");
393
+ if (a) {
402
394
  const l = e(this, U).call(this, e(this, A), null);
403
- c.innerHTML = "", c.appendChild(l), e(this, F).initialize(e(this, A));
395
+ a.innerHTML = "", a.appendChild(l), e(this, F).initialize(e(this, A));
404
396
  }
405
397
  if (o) {
406
398
  const l = e(this, U).call(this, e(this, A), "left");
407
- let a = 0;
408
- l.querySelectorAll("col").forEach((u) => {
409
- const g = parseInt(u.getAttribute("width"), 10);
410
- isNaN(g) || (a += g);
399
+ let h = 0;
400
+ l.querySelectorAll("col").forEach((g) => {
401
+ const b = parseInt(g.getAttribute("width"), 10);
402
+ isNaN(b) || (h += b);
411
403
  }), o.innerHTML = "", o.appendChild(l);
412
- const f = a > 0 ? a : 0;
404
+ const f = h > 0 ? h : 0;
413
405
  o.style.flex = `0 0 ${f}px`, o.style.width = `${f}px`;
414
406
  }
415
407
  if (d) {
416
408
  const l = e(this, U).call(this, e(this, A), "right");
417
- let a = 0;
418
- l.querySelectorAll("col").forEach((u) => {
419
- const g = parseInt(u.getAttribute("width"), 10);
420
- isNaN(g) || (a += g);
409
+ let h = 0;
410
+ l.querySelectorAll("col").forEach((g) => {
411
+ const b = parseInt(g.getAttribute("width"), 10);
412
+ isNaN(b) || (h += b);
421
413
  }), d.innerHTML = "", d.appendChild(l);
422
- const f = a > 0 ? a : 0;
414
+ const f = h > 0 ? h : 0;
423
415
  d.style.flex = `0 0 ${f}px`, d.style.width = `${f}px`;
424
416
  }
425
- c && c.addEventListener("scroll", () => {
417
+ a && a.addEventListener("scroll", () => {
426
418
  var l;
427
419
  (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
428
420
  }), setTimeout(() => {
@@ -430,28 +422,28 @@ const j = class j extends HTMLElement {
430
422
  (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
431
423
  }, 0);
432
424
  }, "generate"));
433
- v(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, F).getRowHeight(), "getRowHeight"));
434
- v(this, "scrollToX", /* @__PURE__ */ h((t) => {
425
+ x(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, F).getRowHeight(), "getRowHeight"));
426
+ x(this, "scrollToX", /* @__PURE__ */ c((t) => {
435
427
  const s = this.querySelector(".ng-container-body");
436
428
  s && (s.scrollLeft = t);
437
429
  }, "scrollToX"));
438
- v(this, "scrollToY", /* @__PURE__ */ h((t) => {
430
+ x(this, "scrollToY", /* @__PURE__ */ c((t) => {
439
431
  const s = this.querySelector(".ng-container-body");
440
432
  s && (s.scrollTop = t);
441
433
  }, "scrollToY"));
442
- b(this, ae, /* @__PURE__ */ h(() => {
443
- const t = /* @__PURE__ */ h(() => {
444
- var a, f, u;
434
+ u(this, ae, /* @__PURE__ */ c(() => {
435
+ const t = /* @__PURE__ */ c(() => {
436
+ var h, f, g;
445
437
  const s = this.querySelector(".ng-container-left table"), n = this.querySelector(".ng-container-body table"), r = this.querySelector(".ng-container-right table");
446
438
  if (!n) return;
447
- const o = s ? Array.from(s.querySelectorAll("tr")) : [], c = Array.from(n.querySelectorAll("tr")), d = r ? Array.from(r.querySelectorAll("tr")) : [], l = Math.max(o.length, c.length, d.length);
448
- for (let g = 0; g < l; g++) {
439
+ const o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Array.from(n.querySelectorAll("tr")), d = r ? Array.from(r.querySelectorAll("tr")) : [], l = Math.max(o.length, a.length, d.length);
440
+ for (let b = 0; b < l; b++) {
449
441
  const S = [
450
- ((a = o[g]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
451
- ((f = c[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
452
- ((u = d[g]) == null ? void 0 : u.getBoundingClientRect().height) || 0
453
- ], x = Math.max(...S);
454
- x > 0 && (o[g] && (o[g].style.height = `${x}px`), c[g] && (c[g].style.height = `${x}px`), d[g] && (d[g].style.height = `${x}px`));
442
+ ((h = o[b]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
443
+ ((f = a[b]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
444
+ ((g = d[b]) == null ? void 0 : g.getBoundingClientRect().height) || 0
445
+ ], v = Math.max(...S);
446
+ v > 0 && (o[b] && (o[b].style.height = `${v}px`), a[b] && (a[b].style.height = `${v}px`), d[b] && (d[b].style.height = `${v}px`));
455
447
  }
456
448
  }, "syncRowHeights");
457
449
  e(this, ce).call(this), requestAnimationFrame(() => {
@@ -461,7 +453,7 @@ const j = class j extends HTMLElement {
461
453
  n.attributeName === "class" && this.classList.contains("active") && t();
462
454
  }).observe(this, { attributes: !0 });
463
455
  }, "#init"));
464
- b(this, ce, /* @__PURE__ */ h(() => {
456
+ u(this, ce, /* @__PURE__ */ c(() => {
465
457
  const t = j.SCROLLBAR_SIZE;
466
458
  this.innerHTML = `
467
459
  <style>
@@ -594,14 +586,14 @@ const j = class j extends HTMLElement {
594
586
  this.innerHTML = "", Y.log("NineTableSheet destroyed.");
595
587
  }
596
588
  };
597
- A = new WeakMap(), F = new WeakMap(), G = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), h(j, "NineTableSheet"), v(j, "SCROLLBAR_SIZE", 16);
589
+ A = new WeakMap(), F = new WeakMap(), G = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), c(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
598
590
  let te = j;
599
591
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", te);
600
592
  var he, J;
601
593
  const Ce = class Ce extends HTMLElement {
602
594
  constructor() {
603
595
  super();
604
- b(this, he, /* @__PURE__ */ h(() => {
596
+ u(this, he, /* @__PURE__ */ c(() => {
605
597
  var t;
606
598
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
607
599
  var o;
@@ -609,35 +601,35 @@ const Ce = class Ce extends HTMLElement {
609
601
  e(this, J).call(this, r, n);
610
602
  }), e(this, J).call(this, 0, !1);
611
603
  }, "#init"));
612
- b(this, J, /* @__PURE__ */ h((t, s = !1) => {
613
- const n = /* @__PURE__ */ h(() => {
614
- const a = Array.from(this.querySelectorAll("nine-table-sheet"));
615
- Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
616
- const u = a.filter((g) => g.classList.contains("active"));
617
- u.length < 2 || u.forEach((g) => {
618
- const S = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${S}"]`), L = a[S + 1];
619
- x && L && L.classList.contains("active") && x.style.setProperty("display", "flex");
604
+ u(this, J, /* @__PURE__ */ c((t, s = !1) => {
605
+ const n = /* @__PURE__ */ c(() => {
606
+ const h = Array.from(this.querySelectorAll("nine-table-sheet"));
607
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
608
+ const g = h.filter((b) => b.classList.contains("active"));
609
+ g.length < 2 || g.forEach((b) => {
610
+ const S = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${S}"]`), L = h[S + 1];
611
+ v && L && L.classList.contains("active") && v.style.setProperty("display", "flex");
620
612
  });
621
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
622
- if (!c[t]) return;
613
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
614
+ if (!a[t]) return;
623
615
  if (!s)
624
- c.forEach((a, f) => {
625
- a.classList.toggle("active", f === t);
626
- }), d.forEach((a, f) => {
627
- const u = f === t;
628
- a.classList.toggle("active", u), a.style.flex = u ? "1 1 100%" : "";
616
+ a.forEach((h, f) => {
617
+ h.classList.toggle("active", f === t);
618
+ }), d.forEach((h, f) => {
619
+ const g = f === t;
620
+ h.classList.toggle("active", g), h.style.flex = g ? "1 1 100%" : "";
629
621
  });
630
622
  else {
631
- const a = c[t], f = r.querySelectorAll(".nine-tab-item.active");
632
- if (a.classList.contains("active") && f.length <= 1)
623
+ const h = a[t], f = r.querySelectorAll(".nine-tab-item.active");
624
+ if (h.classList.contains("active") && f.length <= 1)
633
625
  return;
634
- a.classList.toggle("active");
635
- const u = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
636
- u && (u.classList.toggle("active"), u.classList.contains("active") || (u.style.flex = ""));
626
+ h.classList.toggle("active");
627
+ const g = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
628
+ g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
637
629
  }
638
630
  const l = o.querySelectorAll("nine-table-sheet.active");
639
- l == null || l.forEach((a) => {
640
- a.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
631
+ l == null || l.forEach((h) => {
632
+ h.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
641
633
  }), n();
642
634
  }, "#switchSheet"));
643
635
  }
@@ -645,30 +637,30 @@ const Ce = class Ce extends HTMLElement {
645
637
  e(this, he).call(this);
646
638
  }
647
639
  };
648
- he = new WeakMap(), J = new WeakMap(), h(Ce, "NineTableSheets");
640
+ he = new WeakMap(), J = new WeakMap(), c(Ce, "NineTableSheets");
649
641
  let ve = Ce;
650
642
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ve);
651
643
  var E, de, Q, fe;
652
644
  const _e = class _e {
653
645
  constructor(i) {
654
- b(this, E);
655
- b(this, de, /* @__PURE__ */ h(() => {
646
+ u(this, E);
647
+ u(this, de, /* @__PURE__ */ c(() => {
656
648
  e(this, fe).call(this), new ResizeObserver((i) => {
657
649
  for (let t of i)
658
650
  e(this, E).getAttribute("auto-height") === "true" && e(this, Q).call(this);
659
651
  }).observe(e(this, E));
660
652
  }, "#init"));
661
- b(this, Q, /* @__PURE__ */ h(() => {
653
+ u(this, Q, /* @__PURE__ */ c(() => {
662
654
  var d, l;
663
655
  const i = Array.from(e(this, E).shadowRoot.querySelectorAll("nine-table-sheet.active"));
664
656
  if (i.length === 0) return;
665
- const t = parseInt(e(this, E).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), n = (d = e(this, E).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, E).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = te.SCROLLBAR_SIZE, c = t * s + n + r + o;
666
- e(this, E).style.height = `${c}px`;
657
+ const t = parseInt(e(this, E).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (d = e(this, E).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, E).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = te.SCROLLBAR_SIZE, a = t * s + n + r + o;
658
+ e(this, E).style.height = `${a}px`;
667
659
  }, "#applyAutoHeight"));
668
- b(this, fe, /* @__PURE__ */ h(() => {
660
+ u(this, fe, /* @__PURE__ */ c(() => {
669
661
  const t = Array.from(e(this, E).children).filter((d) => d.tagName === "TABLE"), s = e(this, E).getAttribute("auto-height") === "true", n = t.length, r = t.map((d, l) => {
670
- const f = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, u = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
671
- return f + u;
662
+ const f = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
663
+ return f + g;
672
664
  }).join(""), o = t.map((d, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
673
665
  e(this, E).shadowRoot.innerHTML = `
674
666
  <style>
@@ -769,8 +761,8 @@ const _e = class _e {
769
761
  </nine-table-body>
770
762
  <nine-table-footer></nine-table-footer>
771
763
  `;
772
- const c = e(this, E).shadowRoot.querySelectorAll("nine-table-sheet");
773
- c == null || c.forEach((d, l) => {
764
+ const a = e(this, E).shadowRoot.querySelectorAll("nine-table-sheet");
765
+ a == null || a.forEach((d, l) => {
774
766
  t[l] && setTimeout(() => {
775
767
  d.generate(t[l]), s && e(this, Q).call(this);
776
768
  });
@@ -779,14 +771,14 @@ const _e = class _e {
779
771
  y(this, E, i), e(this, de).call(this);
780
772
  }
781
773
  };
782
- E = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), h(_e, "LayoutManager");
774
+ E = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), c(_e, "LayoutManager");
783
775
  let Se = _e;
784
776
  var W, V;
785
- const Ie = class Ie {
777
+ const He = class He {
786
778
  constructor(i) {
787
- b(this, W);
788
- b(this, V, -1);
789
- v(this, "count", /* @__PURE__ */ h(() => e(this, W).rawRecords.length, "count"));
779
+ u(this, W);
780
+ u(this, V, -1);
781
+ x(this, "count", /* @__PURE__ */ c(() => e(this, W).rawRecords.length, "count"));
790
782
  y(this, W, i);
791
783
  }
792
784
  get at() {
@@ -802,18 +794,18 @@ const Ie = class Ie {
802
794
  });
803
795
  }
804
796
  };
805
- W = new WeakMap(), V = new WeakMap(), h(Ie, "ngRow");
806
- let Ee = Ie;
797
+ W = new WeakMap(), V = new WeakMap(), c(He, "ngRow");
798
+ let Ee = He;
807
799
  var T, w, q, K, ue, z, ge, ee, be, ye, Z;
808
800
  const k = class k {
809
801
  constructor(i, t) {
810
- b(this, T);
811
- b(this, w);
812
- b(this, q, []);
813
- b(this, K, []);
814
- b(this, ue, 0);
815
- b(this, z, []);
816
- b(this, ge, /* @__PURE__ */ h(() => {
802
+ u(this, T);
803
+ u(this, w);
804
+ u(this, q, []);
805
+ u(this, K, []);
806
+ u(this, ue, 0);
807
+ u(this, z, []);
808
+ u(this, ge, /* @__PURE__ */ c(() => {
817
809
  y(this, z, []);
818
810
  const i = e(this, T).template || [];
819
811
  Array.from(i).forEach((t) => {
@@ -823,10 +815,10 @@ const k = class k {
823
815
  t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, z).slice();
824
816
  });
825
817
  }, "#initialize"));
826
- v(this, "set", /* @__PURE__ */ h((i) => {
818
+ x(this, "set", /* @__PURE__ */ c((i) => {
827
819
  this.clear(), this.add(i, !1);
828
820
  }, "set"));
829
- b(this, ee, /* @__PURE__ */ h(() => ({
821
+ u(this, ee, /* @__PURE__ */ c(() => ({
830
822
  rowState: k.ROW_STATE.EMPTY,
831
823
  deleted: !1,
832
824
  filtered: !1,
@@ -835,39 +827,39 @@ const k = class k {
835
827
  c: {},
836
828
  _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, z).slice(), -1, {}, {}]
837
829
  }), "#getDefaultMeta"));
838
- v(this, "reset", /* @__PURE__ */ h(() => {
830
+ x(this, "reset", /* @__PURE__ */ c(() => {
839
831
  y(this, q, []), y(this, K, []);
840
832
  }, "reset"));
841
- v(this, "clear", /* @__PURE__ */ h(() => {
833
+ x(this, "clear", /* @__PURE__ */ c(() => {
842
834
  var i;
843
835
  e(this, w).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, w).viewRecords) != null && i.reset && e(this, w).viewRecords.reset();
844
836
  }, "clear"));
845
- b(this, be, /* @__PURE__ */ h((i) => {
837
+ u(this, be, /* @__PURE__ */ c((i) => {
846
838
  var n;
847
839
  Array.isArray(i) || (i = [i]);
848
840
  const t = typeof ((n = e(this, T).fields) == null ? void 0 : n.get) == "function" ? e(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
849
841
  return i.forEach((r) => {
850
842
  const o = { v: [] };
851
- t.forEach((c) => {
852
- o.v.push(r[c] !== void 0 && r[c] !== null ? r[c] : "");
843
+ t.forEach((a) => {
844
+ o.v.push(r[a] !== void 0 && r[a] !== null ? r[a] : "");
853
845
  }), s.push(o);
854
846
  }), s;
855
847
  }, "#json2Array"));
856
- b(this, ye, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
848
+ u(this, ye, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
857
849
  t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
858
850
  }), i), "#defaultInsert"));
859
- v(this, "add", /* @__PURE__ */ h((i, t = !0) => {
851
+ x(this, "add", /* @__PURE__ */ c((i, t = !0) => {
860
852
  var r;
861
853
  i === void 0 && (i = {});
862
854
  const s = e(this, be).call(this, i);
863
855
  e(this, w).rawRecords = e(this, w).rawRecords.concat(e(this, ye).call(this, s)), this.resetRecords();
864
856
  const n = this.count() - 1;
865
- return t || s.forEach((o, c) => {
866
- const d = e(this, w).rawRecords[n - c];
857
+ return t || s.forEach((o, a) => {
858
+ const d = e(this, w).rawRecords[n - a];
867
859
  d && (d.__ng.rowState = k.ROW_STATE.EMPTY);
868
860
  }), (r = e(this, w).viewRecords) != null && r.reset && e(this, w).viewRecords.reset(), n;
869
861
  }, "add"));
870
- v(this, "delete", /* @__PURE__ */ h((i) => {
862
+ x(this, "delete", /* @__PURE__ */ c((i) => {
871
863
  var s;
872
864
  let t = [];
873
865
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, w).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
@@ -879,37 +871,37 @@ const k = class k {
879
871
  }
880
872
  }), this.resetRecords(), (s = e(this, w).viewRecords) != null && s.reset && e(this, w).viewRecords.reset();
881
873
  }, "delete"));
882
- v(this, "setValue", /* @__PURE__ */ h((i, t, s) => {
874
+ x(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
883
875
  var d;
884
876
  i = parseInt(i, 10);
885
877
  const r = (typeof ((d = e(this, T).fields) == null ? void 0 : d.get) == "function" ? e(this, T).fields.get() : []).indexOf(t);
886
878
  if (r < 0) return;
887
879
  const o = this.getValidData()[i];
888
880
  if (!o) return;
889
- const c = o.v[r];
890
- c !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[r] = s, e(this, w).owner.refreshData && e(this, w).owner.refreshData(i);
881
+ const a = o.v[r];
882
+ a !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = a), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[r] = s, e(this, w).owner.refreshData && e(this, w).owner.refreshData(i);
891
883
  }, "setValue"));
892
- v(this, "resetRecords", /* @__PURE__ */ h(() => {
884
+ x(this, "resetRecords", /* @__PURE__ */ c(() => {
893
885
  y(this, K, e(this, w).rawRecords.filter((i) => !i.__ng.deleted)), y(this, q, e(this, w).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, w).rawRecords.forEach((i, t) => {
894
886
  i.__ng.rowidx = t;
895
887
  }), e(this, q).forEach((i, t) => {
896
888
  i.__ng.i = t;
897
889
  });
898
890
  }, "resetRecords"));
899
- v(this, "getValidData", /* @__PURE__ */ h(() => (e(this, q).length === 0 && e(this, w).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
900
- b(this, Z, /* @__PURE__ */ h((i) => {
891
+ x(this, "getValidData", /* @__PURE__ */ c(() => (e(this, q).length === 0 && e(this, w).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
892
+ u(this, Z, /* @__PURE__ */ c((i) => {
901
893
  var s;
902
894
  if (!i) return i;
903
895
  const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
904
896
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
905
897
  const r = {};
906
- return t.forEach((o, c) => {
907
- r[o] = n.v ? n.v[c] : n[o];
898
+ return t.forEach((o, a) => {
899
+ r[o] = n.v ? n.v[a] : n[o];
908
900
  }), r.__ng = n.__ng, r;
909
901
  }) : i;
910
902
  }, "#conv2"));
911
- v(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
912
- v(this, "get", /* @__PURE__ */ h((i, t) => {
903
+ x(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
904
+ x(this, "get", /* @__PURE__ */ c((i, t) => {
913
905
  var r;
914
906
  const s = this.getValidData();
915
907
  if (!s || s.length <= 0) return;
@@ -940,8 +932,8 @@ const k = class k {
940
932
  return this.length;
941
933
  }
942
934
  };
943
- T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), z = new WeakMap(), ge = new WeakMap(), ee = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), h(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
944
- v(k, "ROW_STATE", {
935
+ T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), z = new WeakMap(), ge = new WeakMap(), ee = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), c(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
936
+ x(k, "ROW_STATE", {
945
937
  EMPTY: "EMPTY",
946
938
  NORMAL: "NORMAL",
947
939
  INSERT: "INSERT",
@@ -949,7 +941,7 @@ v(k, "ROW_STATE", {
949
941
  DELETE: "DELETE"
950
942
  });
951
943
  let Re = k;
952
- const He = class He {
944
+ const Ie = class Ie {
953
945
  constructor(i) {
954
946
  this.owner = i, this.row = new Ee(this), this.data = new Re(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
955
947
  var t;
@@ -968,15 +960,15 @@ const He = class He {
968
960
  }, this.setDataSource([]);
969
961
  }
970
962
  };
971
- h(He, "ngDataManager");
972
- let Ae = He;
963
+ c(Ie, "ngDataManager");
964
+ let Ae = Ie;
973
965
  var X, pe;
974
966
  const Me = class Me extends HTMLElement {
975
967
  constructor() {
976
968
  super();
977
969
  //#created = false;
978
- b(this, X);
979
- b(this, pe);
970
+ u(this, X);
971
+ u(this, pe);
980
972
  this.attachShadow({ mode: "open" }), y(this, X, new Ae(this));
981
973
  }
982
974
  connectedCallback() {
@@ -998,7 +990,7 @@ const Me = class Me extends HTMLElement {
998
990
  return e(this, X);
999
991
  }
1000
992
  };
1001
- X = new WeakMap(), pe = new WeakMap(), h(Me, "NineTable");
993
+ X = new WeakMap(), pe = new WeakMap(), c(Me, "NineTable");
1002
994
  let Te = Me;
1003
995
  customElements.get("nine-table") || customElements.define("nine-table", Te);
1004
996
  //# sourceMappingURL=nine-table.js.map