@ninebone/table 0.0.777 β†’ 0.0.779

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.
@@ -53,13 +53,13 @@ const es = class es extends HTMLElement {
53
53
  }
54
54
  const l = r.clientWidth;
55
55
  if (l <= 0) return;
56
- const g = Math.max(Math.min(l * (a / c), l), 20);
57
- i.style.width = `${g}px`;
56
+ const u = Math.max(Math.min(l * (a / c), l), 20);
57
+ i.style.width = `${u}px`;
58
58
  const f = e.scrollLeft, b = c - a;
59
- let u = 0;
60
- b > 0 && (u = parseInt(f / b * (l - g), 10)), u < 0 && (u = 0);
61
- const p = l - g;
62
- u > p && (u = p), i.style.left = `${u}px`, t(this, E).left.disabled = u === 0, t(this, E).right.disabled = u >= p - 1;
59
+ let g = 0;
60
+ b > 0 && (g = parseInt(f / b * (l - u), 10)), g < 0 && (g = 0);
61
+ const p = l - u;
62
+ g > p && (g = p), i.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= p - 1;
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
@@ -221,14 +221,14 @@ const ss = class ss extends HTMLElement {
221
221
  this.style.display = "flex";
222
222
  const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
- const g = Math.max(Math.min(l * (i / c), l), 20);
225
- r.style.height = `${g}px`;
224
+ const u = Math.max(Math.min(l * (i / c), l), 20);
225
+ r.style.height = `${u}px`;
226
226
  const f = e.scrollTop, b = Math.max(c - i, 1);
227
227
  S.log(e, f, b);
228
- let u = 0;
229
- b > 0 && (u = f / b * (l - g));
230
- const p = l - g;
231
- u < 0 && (u = 0), u > p && (u = p), r.style.top = `${u}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
228
+ let g = 0;
229
+ b > 0 && (g = f / b * (l - u));
230
+ const p = l - u;
231
+ g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
@@ -241,11 +241,11 @@ const ss = class ss extends HTMLElement {
241
241
  r.stopPropagation(), r.preventDefault(), y(this, yt, !0), y(this, kt, r.clientY), y(this, It, e.scrollTop);
242
242
  const i = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, yt)) return;
244
- const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), u = e.clientHeight, p = s(), x = Math.max(p - u, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
245
245
  if (f > 0 && x > 0) {
246
246
  const w = b / f * x;
247
247
  let m = t(this, It) + w;
248
- const T = Math.max(0, p - u);
248
+ const T = Math.max(0, p - g);
249
249
  m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
@@ -255,10 +255,10 @@ const ss = class ss extends HTMLElement {
255
255
  document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, g = e.clientHeight, f = s(), b = Math.max(f - g, 1);
258
+ const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, u = e.clientHeight, f = s(), b = Math.max(f - u, 1);
259
259
  if (l > 0 && b > 0) {
260
- const u = Math.max(0, Math.min(1, a / l));
261
- e.scrollTop = u * b;
260
+ const g = Math.max(0, Math.min(1, a / l));
261
+ e.scrollTop = g * b;
262
262
  }
263
263
  this.refresh();
264
264
  }), t(this, k).top.addEventListener("click", () => {
@@ -353,11 +353,11 @@ const ss = class ss extends HTMLElement {
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), h(ss, "NineTableVScrollBar");
354
354
  let Te = ss;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
356
- var U, A, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
356
+ var U, R, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, $t, Ht, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
358
  constructor(n) {
359
359
  d(this, U);
360
- d(this, A);
360
+ d(this, R);
361
361
  d(this, it);
362
362
  d(this, Y, /* @__PURE__ */ new Map());
363
363
  d(this, O, null);
@@ -371,37 +371,39 @@ const ns = class ns {
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, A).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, Mt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  S.log("rowManager.initialize"), y(this, it, {
379
- scrollTables: t(this, A).querySelectorAll(".ng-part-body table"),
380
- firstTr: t(this, A).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const a = t(this, A).querySelector(o);
379
+ scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
380
+ firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
+ }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
382
+ const i = t(this, R).querySelector(r);
383
+ if (!i) return;
384
+ const o = i.querySelector(".ng-part-body table");
385
+ if (!o) return;
386
+ const a = o.querySelector("tbody.bindable-tbody");
383
387
  if (!a) return;
384
- const c = a.querySelector(".ng-part-body table");
385
- if (!c) return;
386
- const l = c.querySelector("tbody.bindable-tbody");
387
- if (!l) return;
388
- const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
- t(this, Y).set(o, f);
388
+ const l = Array.from(a.querySelectorAll("tr")).map((u) => u.cloneNode(!0));
389
+ t(this, Y).set(r, l);
390
390
  });
391
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), s = t(this, A).querySelector(".ng-container-right .ng-part-body"), r = t(this, A).querySelector(".ng-container-body .ng-part-header"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer");
392
- if (n) {
393
- t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
394
- let o = !1;
395
- const a = /* @__PURE__ */ h((c) => {
391
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), s = t(this, R).querySelector(".ng-container-right .ng-part-body");
392
+ if (t(this, R).querySelector(".ng-container-body .ng-part-header"), t(this, R).querySelector(".ng-container-body .ng-part-footer"), n) {
393
+ t(this, Mt).call(this), t(this, Nt).call(this), t(this, $t).call(this), t(this, mt).call(this, n.scrollTop);
394
+ let r = !1;
395
+ const i = /* @__PURE__ */ h((o) => {
396
396
  var f;
397
- if (o) return;
398
- o = !0;
399
- const l = c.scrollTop, g = c.scrollLeft;
400
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== g && (r.scrollLeft = g), i && i.scrollLeft !== g && (i.scrollLeft = g), t(this, mt).call(this, l), (f = t(this, A).querySelector("nine-table-vscrollbar")) == null || f.refresh(), o = !1;
397
+ if (r) return;
398
+ r = !0;
399
+ const a = o.scrollTop, c = o.scrollLeft;
400
+ S.log(`πŸ–±οΈ [Scroll Event] source: ${o.className}, scrollTop: ${a}, scrollLeft: ${c}`);
401
+ const l = t(this, R).querySelector(".ng-container-body .ng-part-header"), u = t(this, R).querySelector(".ng-container-left .ng-part-header");
402
+ t(this, R).querySelector(".ng-container-right .ng-part-header"), S.log(`헀더 μƒνƒœ 확인 -> bodyHeader.scrollLeft: ${l == null ? void 0 : l.scrollLeft}, leftHeader: ${u == null ? void 0 : u.scrollLeft}`), n && n.scrollTop !== a && (n.scrollTop = a), e && e.scrollTop !== a && (e.scrollTop = a), s && s.scrollTop !== a && (s.scrollTop = a), t(this, mt).call(this, a), (f = t(this, R).querySelector("nine-table-vscrollbar")) == null || f.refresh(), r = !1;
401
403
  }, "handleContainerScroll");
402
- [n, e, s].forEach((c) => {
403
- c == null || c.addEventListener("scroll", (l) => {
404
- S.log(l), S.log("rowManager.scroll event"), a(c);
404
+ [n, e, s].forEach((o) => {
405
+ o == null || o.addEventListener("scroll", (a) => {
406
+ S.log(a), S.log("rowManager.scroll event"), i(o);
405
407
  });
406
408
  });
407
409
  }
@@ -423,7 +425,7 @@ const ns = class ns {
423
425
  d(this, Mt, /* @__PURE__ */ h(() => {
424
426
  if (t(this, O) !== null && t(this, O) > 0)
425
427
  return t(this, O);
426
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
428
+ const n = t(this, R).querySelector(".ng-container-body .ng-part-body");
427
429
  S.log("rowManager.#measureAndCacheHeight");
428
430
  const e = t(this, Y).get(".ng-container-body");
429
431
  if (!e || e.length === 0) throw new Error("invalid dom");
@@ -434,64 +436,64 @@ const ns = class ns {
434
436
  e.forEach((b) => {
435
437
  i.appendChild(b.cloneNode(!0));
436
438
  }), r ? r.before(i) : s.appendChild(i);
437
- const o = t(this, A), a = o.style.display, c = o.style.visibility, l = o.style.position;
439
+ const o = t(this, R), a = o.style.display, c = o.style.visibility, l = o.style.position;
438
440
  (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
439
- let g = 0;
441
+ let u = 0;
440
442
  const f = s.querySelectorAll("tr");
441
443
  return f.forEach((b) => {
442
- let u = b.offsetHeight || b.getBoundingClientRect().height;
443
- if (u === 0) {
444
+ let g = b.offsetHeight || b.getBoundingClientRect().height;
445
+ if (g === 0) {
444
446
  const p = window.getComputedStyle(b);
445
- u = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
447
+ g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
446
448
  }
447
- g += u;
448
- }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, g <= 0 ? -1 : (y(this, O, g), t(this, $t).call(this), t(this, O));
449
+ u += g;
450
+ }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, Ht).call(this), t(this, O));
449
451
  }, "#measureAndCacheHeight"));
450
- d(this, Ht, /* @__PURE__ */ h(() => {
452
+ d(this, $t, /* @__PURE__ */ h(() => {
451
453
  S.log("rowManager.#updateVirtualScrollHeight");
452
454
  const e = (t(this, U).data.get() || []).length, s = t(this, O), r = e * s;
453
455
  S.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
454
- const o = t(this, A).querySelector(i);
456
+ const o = t(this, R).querySelector(i);
455
457
  if (!o) return;
456
458
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
457
459
  a && (a.style.height = `${r}px`);
458
460
  });
459
461
  }, "#updateVirtualScrollHeight"));
460
- d(this, $t, /* @__PURE__ */ h(() => {
462
+ d(this, Ht, /* @__PURE__ */ h(() => {
461
463
  if (t(this, at) > 0 && t(this, O) > 0) {
462
464
  const n = Math.ceil(t(this, at) / t(this, O));
463
465
  y(this, Lt, n + t(this, ee));
464
466
  }
465
467
  }, "#updateRowCount"));
466
468
  d(this, ne, /* @__PURE__ */ h(() => {
467
- var a, c, l, g, f, b;
468
- const n = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), s = t(this, A).querySelector(".ng-container-right .ng-part-body table");
469
+ var a, c, l, u, f, b;
470
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), s = t(this, R).querySelector(".ng-container-right .ng-part-body table");
469
471
  if (e) {
470
- const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(u.length, p.length, x.length);
472
+ const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
471
473
  for (let m = 0; m < w; m++) {
472
474
  const T = [
473
- ((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
475
+ ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
476
  ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
477
  ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], R = Math.max(...T);
477
- R > 0 && (u[m] && (u[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
478
+ ], A = Math.max(...T);
479
+ A > 0 && (g[m] && (g[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
478
480
  }
479
481
  }
480
- const r = t(this, A).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, A).querySelector(".ng-container-right .ng-part-footer table");
482
+ const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
481
483
  if (i) {
482
- const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(u.length, p.length, x.length);
484
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
483
485
  for (let m = 0; m < w; m++) {
484
486
  const T = [
485
- ((g = u[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
487
+ ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
486
488
  ((f = p[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
487
489
  ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], R = Math.max(...T);
489
- R > 0 && (u[m] && (u[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
490
+ ], A = Math.max(...T);
491
+ A > 0 && (g[m] && (g[m].style.height = `${A}px`), p[m] && (p[m].style.height = `${A}px`), x[m] && (x[m].style.height = `${A}px`));
490
492
  }
491
493
  }
492
494
  }, "#syncRowHeights"));
493
495
  d(this, re, /* @__PURE__ */ h(() => {
494
- !t(this, A) || !(t(this, A) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
496
+ !t(this, R) || !(t(this, R) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
495
497
  for (const e of n) {
496
498
  const s = e.target;
497
499
  if (!s.classList.contains("active")) continue;
@@ -501,33 +503,33 @@ const ns = class ns {
501
503
  const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
504
  o && (i += o.offsetHeight), a && (i += a.offsetHeight);
503
505
  const c = Math.max(r - i, 100);
504
- t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
506
+ t(this, at) !== c && (y(this, at, c), t(this, Ht).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
505
507
  }
506
508
  }
507
- })), t(this, Z).observe(t(this, A)));
509
+ })), t(this, Z).observe(t(this, R)));
508
510
  }, "#initResizeObserver"));
509
511
  d(this, Nt, /* @__PURE__ */ h(() => {
510
512
  S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
- const e = t(this, A).querySelector(n);
513
+ const e = t(this, R).querySelector(n);
512
514
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, n);
513
515
  }), t(this, oe).call(this), t(this, ne).call(this);
514
516
  }, "#renderAllContainers"));
515
517
  d(this, Ue, /* @__PURE__ */ h((n) => {
516
518
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
519
  var l;
518
- const s = t(this, A).querySelector(e);
520
+ const s = t(this, R).querySelector(e);
519
521
  if (!s) return;
520
522
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
523
  if (!r) return;
522
524
  const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
523
- i.forEach((g, f) => {
525
+ i.forEach((u, f) => {
524
526
  const b = n + Math.floor(f / o);
525
527
  if (b >= c) {
526
- g.style.visibility = "hidden";
528
+ u.style.visibility = "hidden";
527
529
  return;
528
530
  }
529
- const u = t(this, U).data.get(b);
530
- g.style.display = "", t(this, _t).call(this, g, u, b);
531
+ const g = t(this, U).data.get(b);
532
+ u.style.display = "", t(this, _t).call(this, u, g, b);
531
533
  });
532
534
  });
533
535
  }, "#adjustBufferRows"));
@@ -537,27 +539,27 @@ const ns = class ns {
537
539
  if (!e || e <= 0) return;
538
540
  const s = t(this, U).data.length;
539
541
  if (s === 0) return;
540
- const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, A).querySelector(".ng-container-body .ng-part-body");
542
+ const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, R).querySelector(".ng-container-body .ng-part-body");
541
543
  S.log("bodyContainer.clientHeight", i.clientHeight);
542
544
  const o = Math.max(0, s - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(n / e)));
543
545
  let c = Math.floor(a * e);
544
546
  S.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, it).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, it)) == null || b.scrollTables.forEach((u) => {
547
- u.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), g !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${g}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
549
- const p = t(this, A).querySelector(u);
547
+ const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
548
+ (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
549
+ g.style.transform = `translate3d(0, ${c}px, 0)`;
550
+ }), u !== a && (S.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
551
+ const p = t(this, R).querySelector(g);
550
552
  if (!p) return;
551
553
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
552
554
  if (!x) return;
553
555
  Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, T) => {
554
- const R = a + Math.floor(T / r);
555
- if (R >= s) {
556
+ const A = a + Math.floor(T / r);
557
+ if (A >= s) {
556
558
  m.style.display = "none";
557
559
  return;
558
560
  }
559
- const M = t(this, U).data.get(R);
560
- m.style.display = "", t(this, _t).call(this, m, M, R);
561
+ const M = t(this, U).data.get(A);
562
+ m.style.display = "", t(this, _t).call(this, m, M, A);
561
563
  });
562
564
  }));
563
565
  }, "#handleScroll"));
@@ -583,24 +585,24 @@ const ns = class ns {
583
585
  });
584
586
  }, "#bindRowData"));
585
587
  d(this, oe, /* @__PURE__ */ h(() => {
586
- var c, l, g;
588
+ var c, l, u;
587
589
  S.log("rowManager.#syncHeaderHeights");
588
- const n = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), s = t(this, A).querySelector(".ng-container-right .ng-part-header table");
590
+ const n = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), s = t(this, R).querySelector(".ng-container-right .ng-part-header table");
589
591
  if (!e) return;
590
592
  const r = n ? Array.from(n.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
591
593
  for (let f = 0; f < a; f++) {
592
594
  const b = [
593
595
  ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
594
596
  ((l = i[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((g = o[f]) == null ? void 0 : g.getBoundingClientRect().height) || 0
596
- ], u = Math.max(...b);
597
- u > 0 && (r[f] && (r[f].style.height = `${u}px`), i[f] && (i[f].style.height = `${u}px`), o[f] && (o[f].style.height = `${u}px`));
597
+ ((u = o[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
598
+ ], g = Math.max(...b);
599
+ g > 0 && (r[f] && (r[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`));
598
600
  }
599
601
  }, "#syncHeaderHeights"));
600
602
  q(this, "destroy", /* @__PURE__ */ h(() => {
601
603
  t(this, Z) && (t(this, Z).disconnect(), y(this, Z, null));
602
604
  }, "destroy"));
603
- y(this, U, n.getRootNode().host), y(this, A, n), t(this, re).call(this);
605
+ y(this, U, n.getRootNode().host), y(this, R, n), t(this, re).call(this);
604
606
  }
605
607
  getRowHeight() {
606
608
  return t(this, O);
@@ -610,7 +612,7 @@ const ns = class ns {
610
612
  return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
611
613
  }
612
614
  };
613
- U = new WeakMap(), A = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
615
+ U = new WeakMap(), R = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), $t = new WeakMap(), Ht = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
614
616
  let ke = ns;
615
617
  const ie = class ie {
616
618
  /**
@@ -626,23 +628,23 @@ const ie = class ie {
626
628
  if (!n) return null;
627
629
  const e = /* @__PURE__ */ h((a) => {
628
630
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
- const g = l.getAttribute("cell-type") || "renderer";
631
+ const u = l.getAttribute("cell-type") || "renderer";
630
632
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
- let f = `cell-${g}`;
632
- const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
633
+ let f = `cell-${u}`;
634
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
633
635
  let w = [];
634
- b && w.push(`data-bind="${b}"`), u && w.push(`data-expr="${u}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
636
+ b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
635
637
  }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
636
638
  l.setAttribute("tabindex", "0");
637
639
  });
638
640
  }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
639
641
  if (!a.querySelector("colgroup")) {
640
- const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, g = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
642
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
641
643
  for (let b = 0; b < l; b++) {
642
- const u = document.createElement("col");
643
- u.setAttribute("width", f), g.appendChild(u);
644
+ const g = document.createElement("col");
645
+ g.setAttribute("width", f), u.appendChild(g);
644
646
  }
645
- a.prepend(g);
647
+ a.prepend(u);
646
648
  }
647
649
  if (!a.querySelector("thead")) {
648
650
  const c = document.createElement("thead"), l = a.querySelector("colgroup");
@@ -650,33 +652,33 @@ const ie = class ie {
650
652
  }
651
653
  a.classList.add("nine-table-element");
652
654
  }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
653
- const l = Array.from(a.querySelectorAll(c + " tr")), g = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
654
- if (f === 0 || g.length === 0) return;
655
+ const l = Array.from(a.querySelectorAll(c + " tr")), u = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
656
+ if (f === 0 || u.length === 0) return;
655
657
  let b = 0;
656
- g.forEach((p) => {
658
+ u.forEach((p) => {
657
659
  b += p.colSpan || 1;
658
660
  });
659
- const u = Array.from(Array(f), () => Array(b).fill(null));
661
+ const g = Array.from(Array(f), () => Array(b).fill(null));
660
662
  l.forEach((p) => {
661
663
  const x = p.sectionRowIndex;
662
664
  let w = 0;
663
665
  Array.from(p.querySelectorAll("th,td")).forEach((m) => {
664
- for (let M = 0; M < u[x].length; M++)
665
- if (u[x][M] === null) {
666
+ for (let M = 0; M < g[x].length; M++)
667
+ if (g[x][M] === null) {
666
668
  w = M;
667
669
  break;
668
670
  }
669
- const T = m.rowSpan || 1, R = m.colSpan || 1;
671
+ const T = m.rowSpan || 1, A = m.colSpan || 1;
670
672
  for (let M = 0; M < T; M++)
671
- for (let B = 0; B < R; B++)
672
- x + M < f && w + B < b && (u[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
673
+ for (let B = 0; B < A; B++)
674
+ x + M < f && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
673
675
  });
674
676
  }), l.forEach((p) => {
675
677
  const x = p.sectionRowIndex;
676
678
  Array.from(p.querySelectorAll("th,td")).forEach((w) => {
677
- for (let m = 0; m < u[x].length; m++)
678
- if (u[x][m] === "1") {
679
- w.dataset.col = m, u[x][m] = "0";
679
+ for (let m = 0; m < g[x].length; m++)
680
+ if (g[x][m] === "1") {
681
+ w.dataset.col = m, g[x][m] = "0";
680
682
  break;
681
683
  }
682
684
  });
@@ -684,8 +686,8 @@ const ie = class ie {
684
686
  }, "resetColIndex"), i = n.cloneNode(!0);
685
687
  return s(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
686
688
  const l = a.getAttribute("fixed");
687
- l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((g) => {
688
- g.setAttribute("fixed", l);
689
+ l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
690
+ u.setAttribute("fixed", l);
689
691
  });
690
692
  }), i;
691
693
  }
@@ -717,11 +719,11 @@ const rs = class rs {
717
719
  i.forEach((a) => {
718
720
  a.querySelectorAll("tbody tr").forEach((c) => {
719
721
  const { matrixRow: l } = V(this, K, qt).call(this, c);
720
- l < 0 || c.querySelectorAll("td, th").forEach((g) => {
721
- const f = parseInt(g.dataset.col, 10);
722
+ l < 0 || c.querySelectorAll("td, th").forEach((u) => {
723
+ const f = parseInt(u.dataset.col, 10);
722
724
  if (isNaN(f)) return;
723
- const b = parseInt(g.rowSpan || 1, 10), u = parseInt(g.colSpan || 1, 10), p = l + b - 1, x = f + u - 1;
724
- p >= n && l <= s && x >= e && f <= r && (o++, g.classList.add("selected"), S.log(g, n, e, s, r), l <= n && g.classList.add("selected-top"), p >= s && g.classList.add("selected-bottom"), f <= e && g.classList.add("selected-left"), x >= r && g.classList.add("selected-right"));
725
+ const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
726
+ p >= n && l <= s && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, n, e, s, r), l <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
725
727
  });
726
728
  });
727
729
  }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
@@ -740,19 +742,19 @@ const rs = class rs {
740
742
  const l = t(this, N).querySelectorAll(
741
743
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
742
744
  );
743
- let g = !0, f = 0;
744
- for (; g && f < 5; )
745
- g = !1, f++, l.forEach((b) => {
746
- b.querySelectorAll("tbody tr").forEach((u) => {
747
- if (u.classList.contains("nodata")) return;
748
- const { matrixRow: p } = V(this, K, qt).call(this, u);
749
- p < 0 || u.querySelectorAll("td, th").forEach((x) => {
745
+ let u = !0, f = 0;
746
+ for (; u && f < 5; )
747
+ u = !1, f++, l.forEach((b) => {
748
+ b.querySelectorAll("tbody tr").forEach((g) => {
749
+ if (g.classList.contains("nodata")) return;
750
+ const { matrixRow: p } = V(this, K, qt).call(this, g);
751
+ p < 0 || g.querySelectorAll("td, th").forEach((x) => {
750
752
  const w = parseInt(x.dataset.col, 10);
751
753
  if (isNaN(w)) return;
752
- const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + T - 1;
753
- if (R >= i && p <= o && M >= a && w <= c) {
754
- const z = Math.min(i, p), Gt = Math.max(o, R), bs = Math.min(a, w), ps = Math.max(c, M);
755
- (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, g = !0);
754
+ const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), A = p + m - 1, M = w + T - 1;
755
+ if (A >= i && p <= o && M >= a && w <= c) {
756
+ const z = Math.min(i, p), Gt = Math.max(o, A), bs = Math.min(a, w), ps = Math.max(c, M);
757
+ (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
756
758
  }
757
759
  });
758
760
  });
@@ -786,28 +788,28 @@ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(
786
788
  let a = i, c = o;
787
789
  const l = /* @__PURE__ */ h((f) => {
788
790
  const b = document.elementFromPoint(f.clientX, f.clientY);
789
- let u = b == null ? void 0 : b.closest("td, th");
790
- if (!u || !t(this, N).contains(u)) {
791
+ let g = b == null ? void 0 : b.closest("td, th");
792
+ if (!g || !t(this, N).contains(g)) {
791
793
  const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
792
794
  for (const T of m) {
793
- const R = T.getBoundingClientRect();
794
- if (f.clientX >= R.left && f.clientX <= R.right && f.clientY >= R.top && f.clientY <= R.bottom) {
795
- u = T;
795
+ const A = T.getBoundingClientRect();
796
+ if (f.clientX >= A.left && f.clientX <= A.right && f.clientY >= A.top && f.clientY <= A.bottom) {
797
+ g = T;
796
798
  break;
797
799
  }
798
800
  }
799
801
  }
800
- if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
801
- const p = u.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(u.dataset.col, 10);
802
+ if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
803
+ const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
802
804
  x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
803
- }, "onMouseMove"), g = /* @__PURE__ */ h(() => {
804
- S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
805
+ }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
806
+ S.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
805
807
  }, "onMouseUp");
806
- document.addEventListener("mousemove", l), document.addEventListener("mouseup", g);
808
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
807
809
  });
808
810
  }, "#initEvents"), h(rs, "CellSelection");
809
811
  let Le = rs;
810
- var F, lt, ae, le, pt, He, Ot, Dt, Bt, ct, Wt, vs;
812
+ var F, lt, ae, le, pt, $e, Ot, Dt, Bt, ct, Wt, vs;
811
813
  const os = class os {
812
814
  constructor(n) {
813
815
  d(this, pt);
@@ -857,21 +859,21 @@ const os = class os {
857
859
  return e.forEach((r) => {
858
860
  const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
859
861
  for (const o of i) {
860
- const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, g = c.indexOf(o), f = a * l + (g >= 0 ? g : 0);
862
+ const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, u = c.indexOf(o), f = a * l + (u >= 0 ? u : 0);
861
863
  if (f === n) {
862
864
  s.push(o);
863
865
  break;
864
866
  }
865
867
  const b = Array.from(o.querySelectorAll("td"));
866
- let u = !1;
868
+ let g = !1;
867
869
  for (const p of b) {
868
870
  const x = parseInt(p.rowSpan || 1, 10);
869
871
  if (x > 1 && n >= f && n < f + x) {
870
- s.push(o), u = !0;
872
+ s.push(o), g = !0;
871
873
  break;
872
874
  }
873
875
  }
874
- if (u) break;
876
+ if (g) break;
875
877
  }
876
878
  }), s;
877
879
  }, "#findTargetTrsByMatrix"));
@@ -883,10 +885,10 @@ const os = class os {
883
885
  for (const a of i) {
884
886
  const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
885
887
  for (const l of c) {
886
- const g = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === g), b = f.length > 0 ? f.length : 1, u = f.indexOf(l), p = g * b + (u >= 0 ? u : 0), x = Array.from(l.querySelectorAll("td"));
888
+ const u = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
887
889
  for (const w of x) {
888
- const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
889
- if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
890
+ const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), A = parseInt(w.rowSpan || 1, 10);
891
+ if (!isNaN(m) && s >= m && s < m + T && o >= p && o < p + A && window.getComputedStyle(w).display !== "none")
890
892
  return w;
891
893
  }
892
894
  }
@@ -906,37 +908,37 @@ const os = class os {
906
908
  y(this, ae, e), y(this, le, s);
907
909
  const r = n.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
908
910
  if (i) {
909
- const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), g = e * c + (l >= 0 ? l : 0);
910
- t(this, F).selection.setRange(g, s, g, s);
911
+ const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
912
+ t(this, F).selection.setRange(u, s, u, s);
911
913
  }
912
914
  }
913
915
  }
914
916
  moveCell(n) {
915
- var m, T, R, M;
917
+ var m, T, A, M;
916
918
  if (!t(this, lt)) return;
917
919
  const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = s == null ? void 0 : s.closest("tbody");
918
920
  if (!o) return;
919
- const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, g = c.indexOf(s), f = r * l + (g >= 0 ? g : 0);
920
- let b = f, u = i;
921
+ const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(s), f = r * l + (u >= 0 ? u : 0);
922
+ let b = f, g = i;
921
923
  switch (n.code) {
922
924
  case "Tab":
923
925
  if (n.preventDefault(), n.shiftKey) {
924
- if (u = t(this, Bt).call(this, f, i), u < 0 && f > 0) {
926
+ if (g = t(this, Bt).call(this, f, i), g < 0 && f > 0) {
925
927
  b = f - 1;
926
928
  const B = t(this, ct).call(this, b), z = t(this, Ot).call(this, B);
927
- u = z ? parseInt(z.dataset.col, 10) : 0;
929
+ g = z ? parseInt(z.dataset.col, 10) : 0;
928
930
  }
929
931
  } else {
930
- u = t(this, Dt).call(this, f, i);
932
+ g = t(this, Dt).call(this, f, i);
931
933
  const B = t(this, ct).call(this, f), z = t(this, Ot).call(this, B), Gt = z ? parseInt(z.dataset.col, 10) + parseInt(z.colSpan || 1, 10) : 0;
932
- u >= Gt && (b = f + 1, u = 0);
934
+ g >= Gt && (b = f + 1, g = 0);
933
935
  }
934
936
  break;
935
937
  case "ArrowRight":
936
- u = t(this, Dt).call(this, f, i);
938
+ g = t(this, Dt).call(this, f, i);
937
939
  break;
938
940
  case "ArrowLeft":
939
- u = t(this, Bt).call(this, f, i);
941
+ g = t(this, Bt).call(this, f, i);
940
942
  break;
941
943
  case "ArrowDown":
942
944
  n.preventDefault(), b = f + (e.rowSpan || 1);
@@ -946,20 +948,20 @@ const os = class os {
946
948
  break;
947
949
  }
948
950
  const p = Math.floor(b / l), x = b % l;
949
- let w = t(this, Wt).call(this, p, x, u, b);
951
+ let w = t(this, Wt).call(this, p, x, g, b);
950
952
  if (w)
951
- this.currentCell = w, V(this, pt, He).call(this, w);
953
+ this.currentCell = w, V(this, pt, $e).call(this, w);
952
954
  else if (p !== r && p >= 0) {
953
955
  const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
954
- (M = (R = t(this, F)).scrollToY) == null || M.call(R, p * B), setTimeout(() => {
955
- const z = t(this, Wt).call(this, p, x, u, b);
956
- z && (this.currentCell = z, V(this, pt, He).call(this, z));
956
+ (M = (A = t(this, F)).scrollToY) == null || M.call(A, p * B), setTimeout(() => {
957
+ const z = t(this, Wt).call(this, p, x, g, b);
958
+ z && (this.currentCell = z, V(this, pt, $e).call(this, z));
957
959
  }, 0);
958
960
  }
959
961
  }
960
962
  };
961
963
  F = new WeakMap(), lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 μ•ŠλŠ” μ˜μ—­μ— μžˆμ„ λ•Œ μ»¨ν…Œμ΄λ„ˆ μŠ€ν¬λ‘€μ„ λ™κΈ°ν™”ν•˜λŠ” ν•¨μˆ˜
962
- He = /* @__PURE__ */ h(function(n) {
964
+ $e = /* @__PURE__ */ h(function(n) {
963
965
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
964
966
  if (!e) return;
965
967
  const s = n.getBoundingClientRect(), r = e.getBoundingClientRect();
@@ -970,7 +972,7 @@ He = /* @__PURE__ */ h(function(n) {
970
972
  });
971
973
  }, "#initEvents"), h(os, "CellNavigation");
972
974
  let Me = os;
973
- var ce, ht, dt, zt, Pt, he, de, xt, fe, ue;
975
+ var ce, ht, dt, zt, Pt, he, de, xt, fe, ge;
974
976
  const Ct = class Ct extends HTMLElement {
975
977
  constructor() {
976
978
  super();
@@ -1020,8 +1022,8 @@ const Ct = class Ct extends HTMLElement {
1020
1022
  const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
1021
1023
  if (r === "header") {
1022
1024
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
1023
- const g = document.createElement("tbody");
1024
- g.className = "fixed-tbody", i.appendChild(g);
1025
+ const u = document.createElement("tbody");
1026
+ u.className = "fixed-tbody", i.appendChild(u);
1025
1027
  }
1026
1028
  } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
1027
1029
  return s === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -1042,9 +1044,9 @@ const Ct = class Ct extends HTMLElement {
1042
1044
  s && (s.scrollTop = e);
1043
1045
  }, "scrollToY"));
1044
1046
  d(this, fe, /* @__PURE__ */ h(() => {
1045
- t(this, ue).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1047
+ t(this, ge).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1046
1048
  }, "#init"));
1047
- d(this, ue, /* @__PURE__ */ h(() => {
1049
+ d(this, ge, /* @__PURE__ */ h(() => {
1048
1050
  const e = Ct.SCROLLBAR_SIZE;
1049
1051
  this.innerHTML = `
1050
1052
  <style>
@@ -1261,14 +1263,14 @@ const Ct = class Ct extends HTMLElement {
1261
1263
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1262
1264
  }
1263
1265
  };
1264
- ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1266
+ ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1265
1267
  let Zt = Ct;
1266
1268
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Zt);
1267
- var ge, Ft;
1269
+ var ue, Ft;
1268
1270
  const is = class is extends HTMLElement {
1269
1271
  constructor() {
1270
1272
  super();
1271
- d(this, ge, /* @__PURE__ */ h(() => {
1273
+ d(this, ue, /* @__PURE__ */ h(() => {
1272
1274
  var e;
1273
1275
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1274
1276
  var o;
@@ -1278,43 +1280,43 @@ const is = class is extends HTMLElement {
1278
1280
  }, "#init"));
1279
1281
  d(this, Ft, /* @__PURE__ */ h((e, s = !1) => {
1280
1282
  const r = /* @__PURE__ */ h(() => {
1281
- const g = Array.from(this.querySelectorAll("nine-table-sheet"));
1282
- Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
1283
- const b = g.filter((u) => u.classList.contains("active"));
1284
- b.length < 2 || b.forEach((u) => {
1285
- const p = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = g[p + 1];
1283
+ const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1284
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1285
+ const b = u.filter((g) => g.classList.contains("active"));
1286
+ b.length < 2 || b.forEach((g) => {
1287
+ const p = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1286
1288
  x && w && w.classList.contains("active") && x.style.setProperty("display", "flex");
1287
1289
  });
1288
1290
  }, "updateSplitters"), i = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = i.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1289
1291
  if (!a[e]) return;
1290
1292
  if (!s)
1291
- a.forEach((g, f) => {
1292
- g.classList.toggle("active", f === e);
1293
- }), c.forEach((g, f) => {
1293
+ a.forEach((u, f) => {
1294
+ u.classList.toggle("active", f === e);
1295
+ }), c.forEach((u, f) => {
1294
1296
  const b = f === e;
1295
- g.classList.toggle("active", b), g.style.flex = b ? "1 1 100%" : "";
1297
+ u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
1296
1298
  });
1297
1299
  else {
1298
- const g = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1299
- if (g.classList.contains("active") && f.length <= 1)
1300
+ const u = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1301
+ if (u.classList.contains("active") && f.length <= 1)
1300
1302
  return;
1301
- g.classList.toggle("active");
1303
+ u.classList.toggle("active");
1302
1304
  const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1303
1305
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1304
1306
  }
1305
1307
  const l = o.querySelectorAll("nine-table-sheet.active");
1306
- l == null || l.forEach((g) => {
1307
- g.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1308
+ l == null || l.forEach((u) => {
1309
+ u.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1308
1310
  }), r();
1309
1311
  }, "#switchSheet"));
1310
1312
  }
1311
1313
  connectedCallback() {
1312
- t(this, ge).call(this);
1314
+ t(this, ue).call(this);
1313
1315
  }
1314
1316
  };
1315
- ge = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1316
- let $e = is;
1317
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1317
+ ue = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1318
+ let He = is;
1319
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", He);
1318
1320
  var _, be, jt, pe;
1319
1321
  const as = class as {
1320
1322
  constructor(n) {
@@ -1329,7 +1331,7 @@ const as = class as {
1329
1331
  var c, l;
1330
1332
  const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1331
1333
  if (n.length === 0) return;
1332
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((g) => g.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1334
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * s + r + i + o;
1333
1335
  t(this, _).style.height = `${a}px`;
1334
1336
  }, "#applyAutoHeight"));
1335
1337
  d(this, pe, /* @__PURE__ */ h(() => {
@@ -1603,8 +1605,8 @@ const P = class P {
1603
1605
  if (!n) return n;
1604
1606
  const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = s.filter((a) => !a.__ng.deleted).map((a) => {
1605
1607
  const c = {};
1606
- return r.forEach((l, g) => {
1607
- c[l] = a.v ? a.v[g] : a[l];
1608
+ return r.forEach((l, u) => {
1609
+ c[l] = a.v ? a.v[u] : a[l];
1608
1610
  }), c.__ng = a.__ng, c;
1609
1611
  });
1610
1612
  return e ? i[0] : i;
@@ -1640,13 +1642,13 @@ q(P, "ROW_STATE", {
1640
1642
  DELETE: "DELETE"
1641
1643
  });
1642
1644
  let Oe = P;
1643
- var ut;
1645
+ var gt;
1644
1646
  const cs = class cs {
1645
1647
  constructor(n) {
1646
- d(this, ut);
1647
- y(this, ut, n), this.row = new _e(this), this.data = new Oe(t(this, ut), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1648
+ d(this, gt);
1649
+ y(this, gt, n), this.row = new _e(this), this.data = new Oe(t(this, gt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1648
1650
  var e;
1649
- (e = t(this, ut).view) != null && e.redraw && t(this, ut).view.redraw();
1651
+ (e = t(this, gt).view) != null && e.redraw && t(this, gt).view.redraw();
1650
1652
  }, this.setDataSource = (e) => {
1651
1653
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1652
1654
  }, this.getRowState = (e) => {
@@ -1661,7 +1663,7 @@ const cs = class cs {
1661
1663
  }, this.setDataSource([]);
1662
1664
  }
1663
1665
  };
1664
- ut = new WeakMap(), h(cs, "ngDataManager");
1666
+ gt = new WeakMap(), h(cs, "ngDataManager");
1665
1667
  let De = cs;
1666
1668
  var Rt, H, Ut, ve;
1667
1669
  const hs = class hs {
@@ -1736,17 +1738,17 @@ const hs = class hs {
1736
1738
  };
1737
1739
  Rt = new WeakMap(), H = new WeakMap(), Ut = new WeakMap(), ve = new WeakMap(), h(hs, "ngFields");
1738
1740
  let Be = hs;
1739
- var gt, Se, Re;
1741
+ var ut, Se, Re;
1740
1742
  const ds = class ds extends HTMLElement {
1741
1743
  constructor() {
1742
1744
  super();
1743
1745
  //#created = false;
1744
- d(this, gt);
1746
+ d(this, ut);
1745
1747
  d(this, Se);
1746
1748
  d(this, Re, /* @__PURE__ */ h(() => {
1747
1749
  this.fields = new Be(this), y(this, Se, new Ne(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1748
1750
  }, "#init"));
1749
- this.attachShadow({ mode: "open" }), y(this, gt, new De(this));
1751
+ this.attachShadow({ mode: "open" }), y(this, ut, new De(this));
1750
1752
  }
1751
1753
  connectedCallback() {
1752
1754
  t(this, Re).call(this);
@@ -1756,18 +1758,18 @@ const ds = class ds extends HTMLElement {
1756
1758
  }
1757
1759
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1758
1760
  get data() {
1759
- return t(this, gt).data;
1761
+ return t(this, ut).data;
1760
1762
  }
1761
1763
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1762
1764
  get row() {
1763
- return t(this, gt).row;
1765
+ return t(this, ut).row;
1764
1766
  }
1765
1767
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1766
1768
  get dataManager() {
1767
- return t(this, gt);
1769
+ return t(this, ut);
1768
1770
  }
1769
1771
  };
1770
- gt = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1772
+ ut = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1771
1773
  let We = ds;
1772
1774
  customElements.get("nine-table") || customElements.define("nine-table", We);
1773
1775
  const Tt = class Tt extends HTMLElement {
@@ -1820,17 +1822,17 @@ const fs = class fs extends ze {
1820
1822
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1821
1823
  var s = t(this, v).closest("tr"), r = [];
1822
1824
  $("th,td", s).each((m, T) => {
1823
- var R = ninegrid.j.querySelectorAll(T).attr("suppress");
1824
- R && T.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1825
+ var A = ninegrid.j.querySelectorAll(T).attr("suppress");
1826
+ A && T.dataset.row && (A = parseInt(A), !isNaN(A) && A <= e && r.push(A));
1825
1827
  }), r.sort();
1826
1828
  var i = !1;
1827
1829
  if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1828
1830
  for (var o of r) {
1829
1831
  if (o > e) break;
1830
- var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, g = t(this, L).data.get(c);
1832
+ var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, u = t(this, L).data.get(c);
1831
1833
  t(this, v).dataset.matrixRow;
1832
- var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], u = f.dataset.expr ? this.getExprValue(f.dataset.expr, g, c) : g[f.dataset.bind];
1833
- if (b != u) {
1834
+ var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, c) : u[f.dataset.bind];
1835
+ if (b != g) {
1834
1836
  i = !0;
1835
1837
  break;
1836
1838
  }
@@ -1881,7 +1883,7 @@ const fs = class fs extends ze {
1881
1883
  };
1882
1884
  L = new WeakMap(), Xt = new WeakMap(), v = new WeakMap(), Xe = new WeakMap(), Ke = new WeakMap(), Ge = new WeakMap(), Ze = new WeakMap(), Je = new WeakMap(), h(fs, "CellElement");
1883
1885
  let Pe = fs;
1884
- const us = class us extends Pe {
1886
+ const gs = class gs extends Pe {
1885
1887
  constructor() {
1886
1888
  super();
1887
1889
  }
@@ -1892,10 +1894,10 @@ const us = class us extends Pe {
1892
1894
  return super.refresh();
1893
1895
  }
1894
1896
  };
1895
- h(us, "EditableCellElement");
1896
- let Fe = us;
1897
+ h(gs, "EditableCellElement");
1898
+ let Fe = gs;
1897
1899
  var Kt, bt, At, Et, Ae, Q, Qe;
1898
- const gs = class gs extends Fe {
1900
+ const us = class us extends Fe {
1899
1901
  constructor() {
1900
1902
  super();
1901
1903
  d(this, Kt);
@@ -1966,8 +1968,8 @@ const gs = class gs extends Fe {
1966
1968
  `, super.connectedCallback(), y(this, Kt, this.querySelector("input"));
1967
1969
  }
1968
1970
  };
1969
- Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(gs, "CellInputText");
1970
- let je = gs;
1971
+ Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(us, "CellInputText");
1972
+ let je = us;
1971
1973
  customElements.get("cell-input-text");
1972
1974
  customElements.get("cell-input") || customElements.define("cell-input", je);
1973
1975
  //# sourceMappingURL=nine-table.js.map