@ninebone/table 0.0.442 → 0.0.444

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.
@@ -7,8 +7,8 @@ var h = (S, n) => xe(S, "name", { value: n, configurable: !0 });
7
7
  var E = (S, n, e) => Ee(S, typeof n != "symbol" ? n + "" : n, e), we = (S, n, e) => n.has(S) || ve("Cannot " + e);
8
8
  var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), u = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
9
9
  var Se = (S, n, e, i) => ({
10
- set _(s) {
11
- u(S, n, s, e);
10
+ set _(o) {
11
+ u(S, n, o, e);
12
12
  },
13
13
  get _() {
14
14
  return t(S, n, i);
@@ -44,14 +44,14 @@ const he = class he extends HTMLElement {
44
44
  if (!t(this, I) || !t(this, m) || t(this, B)) return;
45
45
  const e = t(this, m).container, i = e.querySelector("table");
46
46
  if (!i) return;
47
- const s = t(this, m).track, r = t(this, m).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
47
+ const o = t(this, m).track, r = t(this, m).thumb, s = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
48
48
  if (l !== 0 && c > l)
49
- o && (o.style.display = "flex");
49
+ s && (s.style.display = "flex");
50
50
  else {
51
- o && (o.style.display = "none");
51
+ s && (s.style.display = "none");
52
52
  return;
53
53
  }
54
- const a = s.clientWidth;
54
+ const a = o.clientWidth;
55
55
  if (a <= 0) return;
56
56
  const f = Math.max(Math.min(a * (l / c), a), 20);
57
57
  r.style.width = `${f}px`;
@@ -63,51 +63,51 @@ const he = class he extends HTMLElement {
63
63
  }, "refresh"));
64
64
  d(this, X, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, m)) return !1;
66
- const i = t(this, m).container, s = i.querySelector("table");
67
- if (!s) return !1;
68
- const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
66
+ const i = t(this, m).container, o = i.querySelector("table");
67
+ if (!o) return !1;
68
+ const r = t(this, m).track.getBoundingClientRect(), s = t(this, m).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const c = r.width - o;
71
+ const c = r.width - s;
72
72
  l > c && (l = c), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= c - 1;
73
- const a = i.clientWidth, g = s.scrollWidth - a;
73
+ const a = i.clientWidth, g = o.scrollWidth - a;
74
74
  return c > 0 && g > 0 && (i.scrollLeft = l / c * g), l > 0 && l < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, qt, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((s) => {
77
+ const e = /* @__PURE__ */ h((o) => {
78
78
  clearInterval(t(this, Y)), clearInterval(t(this, F));
79
79
  const r = parseInt(t(this, m).thumb.style.left || 0, 10);
80
- t(this, X).call(this, r + s), u(this, Y, setInterval(() => {
80
+ t(this, X).call(this, r + o), u(this, Y, setInterval(() => {
81
81
  clearInterval(t(this, Y)), u(this, F, setInterval(() => {
82
- const o = parseInt(t(this, m).thumb.style.left || 0, 10);
83
- t(this, X).call(this, o + s) || clearInterval(t(this, F));
82
+ const s = parseInt(t(this, m).thumb.style.left || 0, 10);
83
+ t(this, X).call(this, s + o) || clearInterval(t(this, F));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), i = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, Y)), clearInterval(t(this, F));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((s) => {
90
- t(this, m).left.addEventListener(s, i), t(this, m).right.addEventListener(s, i), t(this, m).track.addEventListener(s, i);
91
- }), t(this, m).left.addEventListener("mousedown", (s) => {
92
- s.button === 0 && e(-20);
93
- }), t(this, m).right.addEventListener("mousedown", (s) => {
94
- s.button === 0 && e(20);
95
- }), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (s) => {
96
- if (s.button !== 0) return;
97
- s.preventDefault();
98
- const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
99
- t(this, X).call(this, s.clientX - r.left - o / 2);
100
- }), t(this, m).thumb.addEventListener("mousedown", (s) => {
101
- if (s.button !== 0) return;
102
- s.stopPropagation(), s.preventDefault(), u(this, B, !0), this.shiftX = s.clientX - t(this, m).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
+ t(this, m).left.addEventListener(o, i), t(this, m).right.addEventListener(o, i), t(this, m).track.addEventListener(o, i);
91
+ }), t(this, m).left.addEventListener("mousedown", (o) => {
92
+ o.button === 0 && e(-20);
93
+ }), t(this, m).right.addEventListener("mousedown", (o) => {
94
+ o.button === 0 && e(20);
95
+ }), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (o) => {
96
+ if (o.button !== 0) return;
97
+ o.preventDefault();
98
+ const r = t(this, m).track.getBoundingClientRect(), s = t(this, m).thumb.clientWidth;
99
+ t(this, X).call(this, o.clientX - r.left - s / 2);
100
+ }), t(this, m).thumb.addEventListener("mousedown", (o) => {
101
+ if (o.button !== 0) return;
102
+ o.stopPropagation(), o.preventDefault(), u(this, B, !0), this.shiftX = o.clientX - t(this, m).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ h((l) => {
104
104
  if (!t(this, B)) return;
105
105
  const c = t(this, m).track.getBoundingClientRect();
106
106
  t(this, X).call(this, l.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
- u(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
107
+ }, "onMouseMove"), s = /* @__PURE__ */ h(() => {
108
+ u(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", s);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -213,32 +213,32 @@ const de = class de extends HTMLElement {
213
213
  d(this, gt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, N) || !t(this, R)) return;
216
- const e = t(this, R).container, i = t(this, R).track, s = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
216
+ const e = t(this, R).container, i = t(this, R).track, o = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
217
217
  if (a <= r) {
218
- s.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
218
+ o.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
- s.style.display = "block";
221
+ o.style.display = "block";
222
222
  const f = i.clientHeight;
223
223
  if (f <= 0) return;
224
224
  const g = Math.max(Math.min(f * (r / a), f), 20);
225
- s.style.height = `${g}px`;
225
+ o.style.height = `${g}px`;
226
226
  const y = e.scrollTop, b = Math.max(a - r, 1);
227
227
  let p = 0;
228
228
  b > 0 && (p = y / b * (f - g));
229
229
  const v = f - g;
230
- p < 0 && (p = 0), p > v && (p = v), s.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
230
+ p < 0 && (p = 0), p > v && (p = v), o.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
231
231
  }, "refresh"));
232
232
  d(this, Tt, /* @__PURE__ */ h(() => {
233
233
  const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
234
- const r = (t(this, N).data.get() || []).length, o = t(this, et).getRowHeight();
235
- return r * o;
234
+ const r = (t(this, N).data.get() || []).length, s = t(this, et).getRowHeight();
235
+ return r * s;
236
236
  }, "getContentHeight");
237
237
  e.addEventListener("scroll", () => {
238
238
  t(this, U) || this.refresh();
239
- }), t(this, R).thumb.addEventListener("mousedown", (s) => {
240
- if (s.button !== 0) return;
241
- s.stopPropagation(), s.preventDefault(), u(this, U, !0), u(this, ft, s.clientY), u(this, gt, e.scrollTop);
239
+ }), t(this, R).thumb.addEventListener("mousedown", (o) => {
240
+ if (o.button !== 0) return;
241
+ o.stopPropagation(), o.preventDefault(), u(this, U, !0), u(this, ft, o.clientY), u(this, gt, e.scrollTop);
242
242
  const r = /* @__PURE__ */ h((l) => {
243
243
  if (!t(this, U)) return;
244
244
  const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p = i(), v = Math.max(p - b, 1);
@@ -249,13 +249,13 @@ const de = class de extends HTMLElement {
249
249
  x < 0 && (x = 0), x > tt && (x = tt), e.scrollTop = x;
250
250
  }
251
251
  this.refresh();
252
- }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
- u(this, U, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
252
+ }, "onMouseMove"), s = /* @__PURE__ */ h(() => {
253
+ u(this, U, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
256
- }), t(this, R).track.addEventListener("mousedown", (s) => {
257
- if (s.button !== 0 || s.target === t(this, R).thumb) return;
258
- const r = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
255
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", s);
256
+ }), t(this, R).track.addEventListener("mousedown", (o) => {
257
+ if (o.button !== 0 || o.target === t(this, R).thumb) return;
258
+ const r = t(this, R).track.getBoundingClientRect(), s = t(this, R).thumb.clientHeight, l = o.clientY - r.top - s / 2, a = r.height - s, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
259
259
  if (a > 0 && y > 0) {
260
260
  const b = Math.max(0, Math.min(1, l / a));
261
261
  e.scrollTop = b * y;
@@ -371,27 +371,27 @@ const fe = class fe {
371
371
  n && (t(this, bt).call(this), t(this, it).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
372
372
  }, "refresh"));
373
373
  E(this, "initialize", /* @__PURE__ */ h(() => {
374
- u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
375
- const r = t(this, w).querySelector(s);
374
+ u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
375
+ const r = t(this, w).querySelector(o);
376
376
  if (!r) return;
377
- const o = r.querySelector(".ng-part-body table");
378
- if (!o) return;
379
- const l = o.querySelector("tbody.bindable-tbody");
377
+ const s = r.querySelector(".ng-part-body table");
378
+ if (!s) return;
379
+ const l = s.querySelector("tbody.bindable-tbody");
380
380
  if (!l) return;
381
381
  const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
382
- t(this, W).set(s, a);
382
+ t(this, W).set(o, a);
383
383
  });
384
384
  const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), i = t(this, w).querySelector(".ng-container-right .ng-part-body");
385
385
  if (n) {
386
386
  t(this, Ct).call(this, n), t(this, pt).call(this), t(this, bt).call(this), t(this, it).call(this, n.scrollTop);
387
- let s = !1;
388
- const r = /* @__PURE__ */ h((o, l) => {
387
+ let o = !1;
388
+ const r = /* @__PURE__ */ h((s, l) => {
389
389
  var c;
390
- s || (s = !0, n && n.scrollTop !== o && (n.scrollTop = o), e && e.scrollTop !== o && (e.scrollTop = o), i && i.scrollTop !== o && (i.scrollTop = o), t(this, it).call(this, o), (c = t(this, w).querySelector("nine-table-vscrollbar")) == null || c.refresh(), s = !1);
390
+ o || (o = !0, n && n.scrollTop !== s && (n.scrollTop = s), e && e.scrollTop !== s && (e.scrollTop = s), i && i.scrollTop !== s && (i.scrollTop = s), t(this, it).call(this, s), (c = t(this, w).querySelector("nine-table-vscrollbar")) == null || c.refresh(), o = !1);
391
391
  }, "syncScroll");
392
- [n, e, i].forEach((o) => {
393
- o && o.addEventListener("scroll", () => {
394
- r(o.scrollTop);
392
+ [n, e, i].forEach((s) => {
393
+ s && s.addEventListener("scroll", () => {
394
+ r(s.scrollTop);
395
395
  });
396
396
  });
397
397
  }
@@ -399,15 +399,15 @@ const fe = class fe {
399
399
  d(this, Lt, /* @__PURE__ */ h((n, e) => {
400
400
  const i = t(this, W).get(e);
401
401
  if (!i || i.length === 0) return;
402
- const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
403
- if (!s) return;
404
- s.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
405
- const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
402
+ const o = n.querySelector(".ng-part-body tbody.bindable-tbody");
403
+ if (!o) return;
404
+ o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
405
+ const r = o.querySelector("tr.nodata"), s = document.createDocumentFragment();
406
406
  for (let l = 0; l < t(this, ut); l++)
407
407
  i.forEach((c) => {
408
- o.appendChild(c.cloneNode(!0));
408
+ s.appendChild(c.cloneNode(!0));
409
409
  });
410
- r ? r.before(o) : s.appendChild(o);
410
+ r ? r.before(s) : o.appendChild(s);
411
411
  }, "#renderRows"));
412
412
  d(this, Ct, /* @__PURE__ */ h((n) => {
413
413
  if (t(this, T) !== null && t(this, T) > 0)
@@ -417,25 +417,25 @@ const fe = class fe {
417
417
  const i = n.querySelector("tbody.bindable-tbody");
418
418
  if (!i) return 24;
419
419
  i.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
420
- const s = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
420
+ const o = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
421
421
  e.forEach((y) => {
422
422
  r.appendChild(y.cloneNode(!0));
423
- }), s ? s.before(r) : i.appendChild(r);
424
- const o = t(this, w), l = o.style.display, c = o.style.visibility, a = o.style.position;
425
- (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
423
+ }), o ? o.before(r) : i.appendChild(r);
424
+ const s = t(this, w), l = s.style.display, c = s.style.visibility, a = s.style.position;
425
+ (l === "none" || window.getComputedStyle(s).display === "none") && (s.style.display = "block", s.style.visibility = "hidden", s.style.position = "absolute");
426
426
  let f = 0;
427
427
  const g = i.querySelectorAll("tr:not(.nodata)");
428
428
  return g.forEach((y) => {
429
429
  f += y.offsetHeight || y.getBoundingClientRect().height;
430
- }), g.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = c, o.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
430
+ }), g.forEach((y) => y.remove()), s.style.display = l, s.style.visibility = c, s.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
431
431
  }, "#measureAndCacheHeight"));
432
432
  d(this, bt, /* @__PURE__ */ h(() => {
433
- const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, s = e * i;
433
+ const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, o = e * i;
434
434
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
435
- const o = t(this, w).querySelector(r);
436
- if (!o) return;
437
- const l = o.querySelector(".ng-part-body .ng-virtual-spacer");
438
- l && (l.style.height = `${s}px`);
435
+ const s = t(this, w).querySelector(r);
436
+ if (!s) return;
437
+ const l = s.querySelector(".ng-part-body .ng-virtual-spacer");
438
+ l && (l.style.height = `${o}px`);
439
439
  });
440
440
  }, "#updateVirtualScrollHeight"));
441
441
  d(this, yt, /* @__PURE__ */ h(() => {
@@ -458,9 +458,9 @@ const fe = class fe {
458
458
  O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
459
459
  }
460
460
  }
461
- const s = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
461
+ const o = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), s = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
462
462
  if (r) {
463
- const b = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], M = Math.max(b.length, p.length, v.length);
463
+ const b = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), v = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], M = Math.max(b.length, p.length, v.length);
464
464
  for (let x = 0; x < M; x++) {
465
465
  const tt = [
466
466
  ((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
@@ -476,12 +476,12 @@ const fe = class fe {
476
476
  for (const e of n) {
477
477
  const i = e.target;
478
478
  if (!i.classList.contains("active")) continue;
479
- const s = e.contentRect.height;
480
- if (s > 0) {
479
+ const o = e.contentRect.height;
480
+ if (o > 0) {
481
481
  let r = 0;
482
- const o = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
483
- o && (r += o.offsetHeight), l && (r += l.offsetHeight);
484
- const c = Math.max(s - r, 100);
482
+ const s = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
483
+ s && (r += s.offsetHeight), l && (r += l.offsetHeight);
484
+ const c = Math.max(o - r, 100);
485
485
  t(this, j) !== c && (u(this, j, c), t(this, yt).call(this), t(this, T) !== null && t(this, pt).call(this));
486
486
  }
487
487
  }
@@ -498,11 +498,11 @@ const fe = class fe {
498
498
  var a;
499
499
  const i = t(this, w).querySelector(e);
500
500
  if (!i) return;
501
- const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
502
- if (!s) return;
503
- const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
501
+ const o = i.querySelector(".ng-part-body tbody.bindable-tbody");
502
+ if (!o) return;
503
+ const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), s = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
504
504
  r.forEach((f, g) => {
505
- const y = n + Math.floor(g / o);
505
+ const y = n + Math.floor(g / s);
506
506
  if (y >= c) {
507
507
  f.style.display = "none";
508
508
  return;
@@ -516,15 +516,15 @@ const fe = class fe {
516
516
  var c;
517
517
  const e = t(this, T);
518
518
  if (!e || e <= 0) return;
519
- const s = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), o = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
519
+ const o = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), s = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
520
520
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
521
521
  const f = t(this, w).querySelector(a);
522
522
  if (!f) return;
523
523
  const g = f.querySelector(".ng-part-body tbody.bindable-tbody");
524
524
  if (!g) return;
525
- g.style.transform = `translateY(${o}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((b, p) => {
525
+ g.style.transform = `translateY(${s}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((b, p) => {
526
526
  const v = r + Math.floor(p / l);
527
- if (v >= s) {
527
+ if (v >= o) {
528
528
  b.style.display = "none";
529
529
  return;
530
530
  }
@@ -536,23 +536,23 @@ const fe = class fe {
536
536
  }, 0));
537
537
  }, "#handleScroll"));
538
538
  d(this, mt, /* @__PURE__ */ h((n, e, i) => {
539
- n.dataset.row = i, Array.from(n.cells).forEach((s, r) => {
540
- const o = s.dataset.bind;
541
- o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `행 ${i + 1}`, s.dataset.row = i;
539
+ n.dataset.row = i, Array.from(n.cells).forEach((o, r) => {
540
+ const s = o.dataset.bind;
541
+ s && e && e[s] !== void 0 ? o.textContent = e[s] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `행 ${i + 1}`, o.dataset.row = i;
542
542
  });
543
543
  }, "#bindRowData"));
544
544
  d(this, $t, /* @__PURE__ */ h(() => {
545
545
  var c, a, f;
546
546
  const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), i = t(this, w).querySelector(".ng-container-right .ng-part-header table");
547
547
  if (!e) return;
548
- const s = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
548
+ const o = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), s = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, s.length);
549
549
  for (let g = 0; g < l; g++) {
550
550
  const y = [
551
- ((c = s[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
551
+ ((c = o[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
552
552
  ((a = r[g]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
553
- ((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
553
+ ((f = s[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
554
554
  ], b = Math.max(...y);
555
- b > 0 && (s[g] && (s[g].style.height = `${b}px`), r[g] && (r[g].style.height = `${b}px`), o[g] && (o[g].style.height = `${b}px`));
555
+ b > 0 && (o[g] && (o[g].style.height = `${b}px`), r[g] && (r[g].style.height = `${b}px`), s[g] && (s[g].style.height = `${b}px`));
556
556
  }
557
557
  }, "#syncHeaderHeights"));
558
558
  E(this, "destroy", /* @__PURE__ */ h(() => {
@@ -570,7 +570,7 @@ const fe = class fe {
570
570
  };
571
571
  z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
572
572
  let te = fe;
573
- var It, st;
573
+ var It, ot;
574
574
  const _ = class _ {
575
575
  /**
576
576
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
@@ -582,10 +582,10 @@ const _ = class _ {
582
582
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
583
583
  */
584
584
  static compile(n) {
585
- var s, r, o, l;
585
+ var o, r, s, l;
586
586
  if (!n) return null;
587
587
  const e = n.cloneNode(!0);
588
- return t(s = _, It).call(s, e), t(r = _, st).call(r, e, "thead"), t(o = _, st).call(o, e, "tbody"), t(l = _, st).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
588
+ return t(o = _, It).call(o, e), t(r = _, ot).call(r, e, "thead"), t(s = _, ot).call(s, e, "tbody"), t(l = _, ot).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
589
589
  const f = c.getAttribute("fixed");
590
590
  f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((g) => {
591
591
  g.setAttribute("fixed", f);
@@ -593,28 +593,28 @@ const _ = class _ {
593
593
  }), e;
594
594
  }
595
595
  };
596
- It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
596
+ It = new WeakMap(), ot = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
597
597
  if (!n.querySelector("colgroup")) {
598
- const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
599
- for (let o = 0; o < i; o++) {
598
+ const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
599
+ for (let s = 0; s < i; s++) {
600
600
  const l = document.createElement("col");
601
- l.setAttribute("width", r), s.appendChild(l);
601
+ l.setAttribute("width", r), o.appendChild(l);
602
602
  }
603
- n.prepend(s);
603
+ n.prepend(o);
604
604
  }
605
605
  if (!n.querySelector("thead")) {
606
606
  const e = document.createElement("thead"), i = n.querySelector("colgroup");
607
607
  i ? i.after(e) : n.prepend(e);
608
608
  }
609
609
  n.classList.add("nine-table-element"), n.style.display = "table";
610
- }, "#ensureTableStructure")), d(_, st, /* @__PURE__ */ h((n, e) => {
611
- const i = Array.from(n.querySelectorAll(e + " tr")), s = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
612
- if (r === 0 || s.length === 0) return;
613
- let o = 0;
614
- s.forEach((c) => {
615
- o += c.colSpan || 1;
610
+ }, "#ensureTableStructure")), d(_, ot, /* @__PURE__ */ h((n, e) => {
611
+ const i = Array.from(n.querySelectorAll(e + " tr")), o = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
612
+ if (r === 0 || o.length === 0) return;
613
+ let s = 0;
614
+ o.forEach((c) => {
615
+ s += c.colSpan || 1;
616
616
  });
617
- const l = Array.from(Array(r), () => Array(o).fill(null));
617
+ const l = Array.from(Array(r), () => Array(s).fill(null));
618
618
  i.forEach((c) => {
619
619
  const a = c.sectionRowIndex;
620
620
  let f = 0;
@@ -627,7 +627,7 @@ It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PU
627
627
  const y = g.rowSpan || 1, b = g.colSpan || 1;
628
628
  for (let p = 0; p < y; p++)
629
629
  for (let v = 0; v < b; v++)
630
- a + p < r && f + v < o && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
630
+ a + p < r && f + v < s && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
631
631
  });
632
632
  }), i.forEach((c) => {
633
633
  const a = c.sectionRowIndex;
@@ -641,7 +641,7 @@ It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PU
641
641
  });
642
642
  }, "#resetColIndex"));
643
643
  let ee = _;
644
- var Wt, K, Z, Ot, zt, ot, Bt, Nt;
644
+ var Wt, K, Z, Ot, zt, st, Bt, Nt;
645
645
  const ht = class ht extends HTMLElement {
646
646
  constructor() {
647
647
  super();
@@ -657,29 +657,29 @@ const ht = class ht extends HTMLElement {
657
657
  { selector: ".ng-container-body", type: null },
658
658
  { selector: ".ng-container-left", type: "left" },
659
659
  { selector: ".ng-container-right", type: "right" }
660
- ].forEach(({ selector: i, type: s }) => {
660
+ ].forEach(({ selector: i, type: o }) => {
661
661
  const r = this.querySelector(i);
662
662
  if (!r) return;
663
663
  r.innerHTML = "";
664
- const o = document.createElement("div");
665
- o.className = "ng-part-header", o.appendChild(t(this, ot).call(this, t(this, K), s, "header"));
664
+ const s = document.createElement("div");
665
+ s.className = "ng-part-header", s.appendChild(t(this, st).call(this, t(this, K), o, "header"));
666
666
  const l = document.createElement("div");
667
667
  l.className = "ng-part-body";
668
668
  const c = document.createElement("div");
669
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ot).call(this, t(this, K), s, "body"));
669
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, st).call(this, t(this, K), o, "body"));
670
670
  const a = document.createElement("div");
671
671
  a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", c.appendChild(a), l.appendChild(c);
672
672
  const f = document.createElement("div");
673
- f.className = "ng-part-footer", f.appendChild(t(this, ot).call(this, t(this, K), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
673
+ f.className = "ng-part-footer", f.appendChild(t(this, st).call(this, t(this, K), o, "footer")), r.appendChild(s), r.appendChild(l), r.appendChild(f);
674
674
  });
675
675
  }, "#renderSplitContainers"));
676
676
  d(this, zt, /* @__PURE__ */ h(() => {
677
677
  ["left", "right", "body"].forEach((e) => {
678
- const i = this.querySelector(`.ng-container-${e}`), s = i == null ? void 0 : i.querySelectorAll("table");
679
- if (!i || !s || s.length === 0) return;
678
+ const i = this.querySelector(`.ng-container-${e}`), o = i == null ? void 0 : i.querySelectorAll("table");
679
+ if (!i || !o || o.length === 0) return;
680
680
  let r = 0;
681
- s[0].querySelectorAll("col").forEach((o) => {
682
- const l = parseInt(o.getAttribute("width"), 10);
681
+ o[0].querySelectorAll("col").forEach((s) => {
682
+ const l = parseInt(s.getAttribute("width"), 10);
683
683
  isNaN(r) || (r += l);
684
684
  }), e === "body" ? i.style.flex = "1" : (i.style.flex = `0 0 ${r}px`, i.style.width = `${r}px`);
685
685
  });
@@ -690,14 +690,14 @@ const ht = class ht extends HTMLElement {
690
690
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
691
691
  }, 0));
692
692
  }, "generate"));
693
- d(this, ot, /* @__PURE__ */ h((e, i, s) => {
694
- const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
695
- if (s === "header") {
693
+ d(this, st, /* @__PURE__ */ h((e, i, o) => {
694
+ const r = e.cloneNode(!0), s = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
695
+ if (o === "header") {
696
696
  if (l && l.remove(), c && c.remove(), e.querySelector("tbody")) {
697
697
  const f = document.createElement("tbody");
698
698
  f.className = "fixed-tbody", r.appendChild(f);
699
699
  }
700
- } else s === "body" ? (o && o.remove(), c && c.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
700
+ } else o === "body" ? (s && s.remove(), c && c.remove(), l && (l.className = "bindable-tbody")) : o === "footer" && (s && s.remove(), l && l.remove());
701
701
  return i === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
702
702
  a.getAttribute("fixed") !== "left" && a.remove();
703
703
  }) : i === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
@@ -787,6 +787,7 @@ const ht = class ht extends HTMLElement {
787
787
  overflow-x: auto;
788
788
  position: relative;
789
789
  scrollbar-width: none;
790
+ overscroll-behavior: none; /* 🎯 양끝에 닿았을 때 덜컥거리며 밀리는 바운스 현상 차단 */
790
791
  &::-webkit-scrollbar { display: none; height: 0px; }
791
792
  }
792
793
 
@@ -869,7 +870,7 @@ const ht = class ht extends HTMLElement {
869
870
  this.innerHTML = "", dt.log("NineTableSheet destroyed.");
870
871
  }
871
872
  };
872
- Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), ot = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
873
+ Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), st = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
873
874
  let Rt = ht;
874
875
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Rt);
875
876
  var Pt, xt;
@@ -879,13 +880,13 @@ const ge = class ge extends HTMLElement {
879
880
  d(this, Pt, /* @__PURE__ */ h(() => {
880
881
  var e;
881
882
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
882
- var o;
883
- const s = i.ctrlKey || i.metaKey || i.shiftKey, r = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
884
- t(this, xt).call(this, r, s);
883
+ var s;
884
+ const o = i.ctrlKey || i.metaKey || i.shiftKey, r = parseInt((s = i.target.closest(".nine-tab-item")) == null ? void 0 : s.dataset.index, 10);
885
+ t(this, xt).call(this, r, o);
885
886
  }), t(this, xt).call(this, 0, !1);
886
887
  }, "#init"));
887
888
  d(this, xt, /* @__PURE__ */ h((e, i = !1) => {
888
- const s = /* @__PURE__ */ h(() => {
889
+ const o = /* @__PURE__ */ h(() => {
889
890
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
890
891
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
891
892
  const y = f.filter((b) => b.classList.contains("active"));
@@ -893,7 +894,7 @@ const ge = class ge extends HTMLElement {
893
894
  const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), M = f[p + 1];
894
895
  v && M && M.classList.contains("active") && v.style.setProperty("display", "flex");
895
896
  });
896
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
897
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), s = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = s.querySelectorAll("nine-table-sheet");
897
898
  if (!l[e]) return;
898
899
  if (!i)
899
900
  l.forEach((f, g) => {
@@ -907,13 +908,13 @@ const ge = class ge extends HTMLElement {
907
908
  if (f.classList.contains("active") && g.length <= 1)
908
909
  return;
909
910
  f.classList.toggle("active");
910
- const y = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
911
+ const y = s.querySelector(`nine-table-sheet[data-index="${e}"]`);
911
912
  y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
912
913
  }
913
- const a = o.querySelectorAll("nine-table-sheet.active");
914
+ const a = s.querySelectorAll("nine-table-sheet.active");
914
915
  a == null || a.forEach((f) => {
915
916
  f.style.flex = a.length > 1 ? "1 1 0%" : "1 1 100%";
916
- }), s();
917
+ }), o();
917
918
  }, "#switchSheet"));
918
919
  }
919
920
  connectedCallback() {
@@ -937,14 +938,14 @@ const ue = class ue {
937
938
  var c, a;
938
939
  const n = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
939
940
  if (n.length === 0) return;
940
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), s = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = Rt.SCROLLBAR_SIZE, l = e * i + s + r + o;
941
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), o = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, s = Rt.SCROLLBAR_SIZE, l = e * i + o + r + s;
941
942
  t(this, k).style.height = `${l}px`;
942
943
  }, "#applyAutoHeight"));
943
944
  d(this, Yt, /* @__PURE__ */ h(() => {
944
- const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", s = e.length, r = e.map((c, a) => {
945
- const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
945
+ const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, a) => {
946
+ const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < o - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
946
947
  return g + y;
947
- }).join(""), o = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
948
+ }).join(""), s = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
948
949
  t(this, k).shadowRoot.innerHTML = `
949
950
  <style>
950
951
  :host {
@@ -1028,7 +1029,7 @@ const ue = class ue {
1028
1029
  <nine-table-sheets>
1029
1030
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1030
1031
  <nine-table-sheets-footer>
1031
- <div class="nine-tab-bar">${o}</div>
1032
+ <div class="nine-tab-bar">${s}</div>
1032
1033
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1033
1034
  </nine-table-sheets-footer>
1034
1035
  </nine-table-sheets>
@@ -1065,7 +1066,7 @@ const be = class be {
1065
1066
  }
1066
1067
  };
1067
1068
  wt = new WeakMap(), rt = new WeakMap(), h(be, "ngRow");
1068
- let se = be;
1069
+ let oe = be;
1069
1070
  var L, A, C, lt, Ft, D, Vt, G, St, Xt, Ut, at;
1070
1071
  const H = class H {
1071
1072
  constructor(n, e) {
@@ -1096,10 +1097,10 @@ const H = class H {
1096
1097
  if (!i || i.length <= 0) return;
1097
1098
  if (n == null) return t(this, at).call(this, i);
1098
1099
  if (n < 0 || n >= i.length) return null;
1099
- const s = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1100
+ const o = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1100
1101
  if (e != null) {
1101
- const o = s.indexOf(e);
1102
- return o >= 0 ? i[n].v[o] : null;
1102
+ const s = o.indexOf(e);
1103
+ return s >= 0 ? i[n].v[s] : null;
1103
1104
  }
1104
1105
  return t(this, at).call(this, i[n]);
1105
1106
  }, "get"));
@@ -1123,14 +1124,14 @@ const H = class H {
1123
1124
  t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (n = t(this, A).viewRecords) != null && n.reset && t(this, A).viewRecords.reset();
1124
1125
  }, "clear"));
1125
1126
  d(this, Xt, /* @__PURE__ */ h((n) => {
1126
- var s;
1127
+ var o;
1127
1128
  Array.isArray(n) || (n = [n]);
1128
- const e = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
1129
+ const e = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
1129
1130
  return n.forEach((r) => {
1130
- const o = { v: [] };
1131
+ const s = { v: [] };
1131
1132
  e.forEach((l) => {
1132
- o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1133
- }), i.push(o);
1133
+ s.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1134
+ }), i.push(s);
1134
1135
  }), i;
1135
1136
  }, "#json2Array"));
1136
1137
  d(this, Ut, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
@@ -1140,19 +1141,19 @@ const H = class H {
1140
1141
  n === void 0 && (n = {});
1141
1142
  const i = t(this, Xt).call(this, n);
1142
1143
  t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
1143
- const s = this.count() - 1;
1144
- return e || i.forEach((r, o) => {
1145
- const l = t(this, A).rawRecords[s - o];
1144
+ const o = this.count() - 1;
1145
+ return e || i.forEach((r, s) => {
1146
+ const l = t(this, A).rawRecords[o - s];
1146
1147
  l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
1147
- }), t(this, G).call(this), s;
1148
+ }), t(this, G).call(this), o;
1148
1149
  }, "add"));
1149
1150
  E(this, "delete", /* @__PURE__ */ h((n) => {
1150
1151
  let e = [];
1151
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, s) => s - i).forEach((i) => {
1152
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, o) => o - i).forEach((i) => {
1152
1153
  if (t(this, C)[i]) {
1153
- const s = t(this, C)[i].__ng.rowid;
1154
- t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, A).rawRecords.forEach((r) => {
1155
- r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
1154
+ const o = t(this, C)[i].__ng.rowid;
1155
+ t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, A).rawRecords.forEach((r) => {
1156
+ r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
1156
1157
  });
1157
1158
  }
1158
1159
  }), this.resetRecords(), t(this, G).call(this);
@@ -1162,10 +1163,10 @@ const H = class H {
1162
1163
  n = parseInt(n, 10);
1163
1164
  const r = (typeof ((c = t(this, L).fields) == null ? void 0 : c.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
1164
1165
  if (r < 0) return;
1165
- const o = this.getValidData()[n];
1166
- if (!o) return;
1167
- const l = o.v[r];
1168
- l !== i && o.__ng.rowState !== H.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = H.ROW_STATE.UPDATE), o.v[r] = i;
1166
+ const s = this.getValidData()[n];
1167
+ if (!s) return;
1168
+ const l = s.v[r];
1169
+ l !== i && s.__ng.rowState !== H.ROW_STATE.INSERT && (s.__ng.o.hasOwnProperty(e) || (s.__ng.o[e] = l), s.__ng.rowState = H.ROW_STATE.UPDATE), s.v[r] = i;
1169
1170
  }, "setValue"));
1170
1171
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1171
1172
  u(this, lt, t(this, A).rawRecords.filter((n) => !n.__ng.deleted)), u(this, C, t(this, A).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, A).rawRecords.forEach((n, e) => {
@@ -1176,11 +1177,11 @@ const H = class H {
1176
1177
  }, "resetRecords"));
1177
1178
  E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, C).length === 0 && t(this, A).rawRecords.length > 0 && this.resetRecords(), t(this, C)), "getValidData"));
1178
1179
  d(this, at, /* @__PURE__ */ h((n) => {
1179
- var o;
1180
+ var s;
1180
1181
  if (!n) return n;
1181
- const e = !Array.isArray(n), i = e ? [n] : n, s = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
1182
+ const e = !Array.isArray(n), i = e ? [n] : n, o = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
1182
1183
  const c = {};
1183
- return s.forEach((a, f) => {
1184
+ return o.forEach((a, f) => {
1184
1185
  c[a] = l.v ? l.v[f] : l[a];
1185
1186
  }), c.__ng = l.__ng, c;
1186
1187
  });
@@ -1213,25 +1214,25 @@ E(H, "ROW_STATE", {
1213
1214
  UPDATE: "UPDATE",
1214
1215
  DELETE: "DELETE"
1215
1216
  });
1216
- let oe = H;
1217
+ let se = H;
1217
1218
  var J;
1218
1219
  const ye = class ye {
1219
1220
  constructor(n) {
1220
1221
  d(this, J);
1221
- u(this, J, n), this.row = new se(this), this.data = new oe(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1222
+ u(this, J, n), this.row = new oe(this), this.data = new se(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1222
1223
  var e;
1223
1224
  (e = t(this, J).view) != null && e.redraw && t(this, J).view.redraw();
1224
1225
  }, this.setDataSource = (e) => {
1225
1226
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1226
1227
  }, this.getRowState = (e) => {
1227
- var s, r;
1228
+ var o, r;
1228
1229
  const i = parseInt(e, 10);
1229
1230
  if (!(i >= this.data.count()))
1230
- return (r = (s = this.data.getValidData()[i]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
1231
+ return (r = (o = this.data.getValidData()[i]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1231
1232
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1232
1233
  this.row.at = e;
1233
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, i) => this.data.get(e, i), this.setColumn = (e, i, s) => {
1234
- e = parseInt(e, 10), this.data.setValue(e, i, s);
1234
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, i) => this.data.get(e, i), this.setColumn = (e, i, o) => {
1235
+ e = parseInt(e, 10), this.data.setValue(e, i, o);
1235
1236
  }, this.setDataSource([]);
1236
1237
  }
1237
1238
  };
@@ -1245,7 +1246,7 @@ const pe = class pe {
1245
1246
  d(this, q, []);
1246
1247
  E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1247
1248
  n.forEach((i) => {
1248
- t(this, q).some((s) => s.name === i) || t(this, q).push({ name: i, type: e });
1249
+ t(this, q).some((o) => o.name === i) || t(this, q).push({ name: i, type: e });
1249
1250
  }), t(this, Et).call(this);
1250
1251
  }, "add"));
1251
1252
  d(this, Et, /* @__PURE__ */ h(() => {
@@ -1259,26 +1260,26 @@ const pe = class pe {
1259
1260
  const n = Array.from(t(this, ct).querySelectorAll("table"));
1260
1261
  if (!(!n || n.length === 0)) {
1261
1262
  for (const e of n)
1262
- dt.log(e), $("[data-bind]", e).each((i, s) => {
1263
- const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
1264
- r && t(this, q).push({ name: r, type: o });
1263
+ dt.log(e), $("[data-bind]", e).each((i, o) => {
1264
+ const r = o.dataset.bind, s = o.getAttribute("data-type") || "string";
1265
+ r && t(this, q).push({ name: r, type: s });
1265
1266
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
1266
- $(`[${i}]`, e).each((s, r) => {
1267
- var o = r.getAttribute(i);
1268
- if (o.indexOf("data.") < 0) {
1269
- const l = o.search(/[(]/g);
1267
+ $(`[${i}]`, e).each((o, r) => {
1268
+ var s = r.getAttribute(i);
1269
+ if (s.indexOf("data.") < 0) {
1270
+ const l = s.search(/[(]/g);
1270
1271
  if (l > 0)
1271
1272
  try {
1272
- o = String(window[o.substring(0, l).trim()]);
1273
+ s = String(window[s.substring(0, l).trim()]);
1273
1274
  } catch {
1274
- o = "";
1275
+ s = "";
1275
1276
  }
1276
1277
  }
1277
- o.split("data.").forEach((l) => {
1278
+ s.split("data.").forEach((l) => {
1278
1279
  if (l.trim() != "") {
1279
1280
  const c = l.search(/[^_A-Za-z0-9]/g);
1280
1281
  let a = "";
1281
- c >= 0 ? a = l.substring(0, c) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, q).push({ name: a, type: "string" });
1282
+ c >= 0 ? a = l.substring(0, c) : s.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, q).push({ name: a, type: "string" });
1282
1283
  }
1283
1284
  });
1284
1285
  });