@ninebone/table 0.0.560 β†’ 0.0.561

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.
@@ -2,16 +2,16 @@ var Fe = Object.defineProperty;
2
2
  var Ve = (R) => {
3
3
  throw TypeError(R);
4
4
  };
5
- var Xe = (R, i, e) => i in R ? Fe(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
- var h = (R, i) => Fe(R, "name", { value: i, configurable: !0 });
7
- var E = (R, i, e) => Xe(R, typeof i != "symbol" ? i + "" : i, e), Ye = (R, i, e) => i.has(R) || Ve("Cannot " + e);
8
- var t = (R, i, e) => (Ye(R, i, "read from private field"), e ? e.call(R) : i.get(R)), d = (R, i, e) => i.has(R) ? Ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), p = (R, i, e, s) => (Ye(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
- var Ue = (R, i, e, s) => ({
10
- set _(r) {
11
- p(R, i, r, e);
5
+ var Xe = (R, r, e) => r in R ? Fe(R, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[r] = e;
6
+ var h = (R, r) => Fe(R, "name", { value: r, configurable: !0 });
7
+ var E = (R, r, e) => Xe(R, typeof r != "symbol" ? r + "" : r, e), Ye = (R, r, e) => r.has(R) || Ve("Cannot " + e);
8
+ var t = (R, r, e) => (Ye(R, r, "read from private field"), e ? e.call(R) : r.get(R)), d = (R, r, e) => r.has(R) ? Ve("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(R) : r.set(R, e), p = (R, r, e, s) => (Ye(R, r, "write to private field"), s ? s.call(R, e) : r.set(R, e), e);
9
+ var Ue = (R, r, e, s) => ({
10
+ set _(i) {
11
+ p(R, r, i, e);
12
12
  },
13
13
  get _() {
14
- return t(R, i, s);
14
+ return t(R, r, s);
15
15
  }
16
16
  });
17
17
  import { trace as Ke } from "@ninebone/util";
@@ -23,35 +23,35 @@ const He = class He extends Ke.constructor {
23
23
  h(He, "Trace");
24
24
  let oe = He;
25
25
  const N = new oe();
26
- var P, j, w, X, K, Z, It, G, _t;
26
+ var z, j, w, X, K, Z, It, G, _t;
27
27
  const Me = class Me extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, P);
30
+ d(this, z);
31
31
  d(this, j, !1);
32
32
  d(this, w);
33
33
  d(this, X);
34
34
  d(this, K);
35
35
  d(this, Z);
36
36
  d(this, It, /* @__PURE__ */ h(() => {
37
- if (!t(this, P)) return;
38
- const e = t(this, P).querySelector(".ng-container-body .ng-part-body");
37
+ if (!t(this, z)) return;
38
+ const e = t(this, z).querySelector(".ng-container-body .ng-part-body");
39
39
  e && (p(this, Z, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), t(this, Z).observe(e));
42
42
  }, "#observeResize"));
43
43
  E(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, P) || !t(this, w) || t(this, j)) return;
44
+ if (!t(this, z) || !t(this, w) || t(this, j)) return;
45
45
  const e = t(this, w).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const r = t(this, w).track, n = t(this, w).thumb, a = t(this, P).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
47
+ const i = t(this, w).track, n = t(this, w).thumb, a = t(this, z).querySelector(".ng-container-bottom"), o = e.clientWidth, c = s.scrollWidth;
48
48
  if (o !== 0 && c > o)
49
49
  a && (a.style.display = "flex");
50
50
  else {
51
51
  a && (a.style.display = "none");
52
52
  return;
53
53
  }
54
- const l = r.clientWidth;
54
+ const l = i.clientWidth;
55
55
  if (l <= 0) return;
56
56
  const f = Math.max(Math.min(l * (o / c), l), 20);
57
57
  n.style.width = `${f}px`;
@@ -63,43 +63,43 @@ const Me = class Me extends HTMLElement {
63
63
  }, "refresh"));
64
64
  d(this, G, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, w)) return !1;
66
- const s = t(this, w).container, r = s.querySelector("table");
67
- if (!r) return !1;
66
+ const s = t(this, w).container, i = s.querySelector("table");
67
+ if (!i) return !1;
68
68
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
69
69
  let o = e;
70
70
  o < 0 && (o = 0);
71
71
  const c = n.width - a;
72
72
  o > c && (o = c), o = parseInt(o, 10), t(this, w).thumb.style.left = `${o}px`, t(this, w).left.disabled = o === 0, t(this, w).right.disabled = o >= c - 1;
73
- const l = s.clientWidth, u = r.scrollWidth - l;
73
+ const l = s.clientWidth, u = i.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, _t, /* @__PURE__ */ h(() => {
77
- const e = /* @__PURE__ */ h((r) => {
77
+ const e = /* @__PURE__ */ h((i) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
80
- t(this, G).call(this, n + r), p(this, X, setInterval(() => {
80
+ t(this, G).call(this, n + i), p(this, X, setInterval(() => {
81
81
  clearInterval(t(this, X)), p(this, K, setInterval(() => {
82
82
  const a = parseInt(t(this, w).thumb.style.left || 0, 10);
83
- t(this, G).call(this, a + r) || clearInterval(t(this, K));
83
+ t(this, G).call(this, a + i) || clearInterval(t(this, K));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, X)), clearInterval(t(this, K));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, w).left.addEventListener(r, s), t(this, w).right.addEventListener(r, s), t(this, w).track.addEventListener(r, s);
91
- }), t(this, w).left.addEventListener("mousedown", (r) => {
92
- r.button === 0 && e(-20);
93
- }), t(this, w).right.addEventListener("mousedown", (r) => {
94
- r.button === 0 && e(20);
95
- }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (r) => {
96
- if (r.button !== 0) return;
97
- r.preventDefault();
89
+ ["mouseup", "mouseleave", "touchend"].forEach((i) => {
90
+ t(this, w).left.addEventListener(i, s), t(this, w).right.addEventListener(i, s), t(this, w).track.addEventListener(i, s);
91
+ }), t(this, w).left.addEventListener("mousedown", (i) => {
92
+ i.button === 0 && e(-20);
93
+ }), t(this, w).right.addEventListener("mousedown", (i) => {
94
+ i.button === 0 && e(20);
95
+ }), t(this, w).left.addEventListener("touchstart", () => e(-20)), t(this, w).right.addEventListener("touchstart", () => e(20)), t(this, w).track.addEventListener("mousedown", (i) => {
96
+ if (i.button !== 0) return;
97
+ i.preventDefault();
98
98
  const n = t(this, w).track.getBoundingClientRect(), a = t(this, w).thumb.clientWidth;
99
- t(this, G).call(this, r.clientX - n.left - a / 2);
100
- }), t(this, w).thumb.addEventListener("mousedown", (r) => {
101
- if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, j, !0), this.shiftX = r.clientX - t(this, w).thumb.getBoundingClientRect().left;
99
+ t(this, G).call(this, i.clientX - n.left - a / 2);
100
+ }), t(this, w).thumb.addEventListener("mousedown", (i) => {
101
+ if (i.button !== 0) return;
102
+ i.stopPropagation(), i.preventDefault(), p(this, j, !0), this.shiftX = i.clientX - t(this, w).thumb.getBoundingClientRect().left;
103
103
  const n = /* @__PURE__ */ h((o) => {
104
104
  if (!t(this, j)) return;
105
105
  const c = t(this, w).track.getBoundingClientRect();
@@ -112,7 +112,7 @@ const Me = class Me extends HTMLElement {
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (p(this, P, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, P)) return;
115
+ if (p(this, z, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, z)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,7 +177,7 @@ const Me = class Me extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const s = t(this, P).querySelector(".ng-container-body .ng-part-body");
180
+ const s = t(this, z).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
@@ -198,7 +198,7 @@ const Me = class Me extends HTMLElement {
198
198
  t(this, Z) && t(this, Z).disconnect();
199
199
  }
200
200
  };
201
- P = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(Me, "NineTableHScrollBar");
201
+ z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), It = new WeakMap(), G = new WeakMap(), _t = new WeakMap(), h(Me, "NineTableHScrollBar");
202
202
  let ae = Me;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
204
  var F, at, J, q, xt, vt, Nt;
@@ -213,21 +213,21 @@ const $e = class $e extends HTMLElement {
213
213
  d(this, vt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, F) || !t(this, q)) return;
216
- const e = t(this, q).container, s = t(this, q).track, r = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = o * c;
216
+ const e = t(this, q).container, s = t(this, q).track, i = t(this, q).thumb, n = e.clientHeight, o = (t(this, F).data.get() || []).length, c = t(this, at).getRowHeight(), l = o * c;
217
217
  if (l <= n) {
218
- r.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
218
+ i.style.display = "none", t(this, q).top.disabled = !0, t(this, q).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
- r.style.display = "block";
221
+ i.style.display = "block";
222
222
  const f = s.clientHeight;
223
223
  if (f <= 0) return;
224
224
  const u = Math.max(Math.min(f * (n / l), f), 20);
225
- r.style.height = `${u}px`;
225
+ i.style.height = `${u}px`;
226
226
  const g = e.scrollTop, b = Math.max(l - n, 1);
227
227
  let x = 0;
228
228
  b > 0 && (x = g / b * (f - u));
229
229
  const v = f - u;
230
- x < 0 && (x = 0), x > v && (x = v), r.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
230
+ x < 0 && (x = 0), x > v && (x = v), i.style.top = `${x}px`, t(this, q).top.disabled = g <= 0, t(this, q).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
232
  d(this, Nt, /* @__PURE__ */ h(() => {
233
233
  N.log("nine-table-vscrollbar.#init");
@@ -237,9 +237,9 @@ const $e = class $e extends HTMLElement {
237
237
  }, "getContentHeight");
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, J) || this.refresh();
240
- }), t(this, q).thumb.addEventListener("mousedown", (r) => {
241
- if (r.button !== 0) return;
242
- r.stopPropagation(), r.preventDefault(), p(this, J, !0), p(this, xt, r.clientY), p(this, vt, e.scrollTop);
240
+ }), t(this, q).thumb.addEventListener("mousedown", (i) => {
241
+ if (i.button !== 0) return;
242
+ i.stopPropagation(), i.preventDefault(), p(this, J, !0), p(this, xt, i.clientY), p(this, vt, e.scrollTop);
243
243
  const n = /* @__PURE__ */ h((o) => {
244
244
  if (!t(this, J)) return;
245
245
  const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, xt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
@@ -254,9 +254,9 @@ const $e = class $e extends HTMLElement {
254
254
  p(this, J, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", a), this.refresh();
255
255
  }, "onMouseUp");
256
256
  document.addEventListener("mousemove", n), document.addEventListener("mouseup", a);
257
- }), t(this, q).track.addEventListener("mousedown", (r) => {
258
- if (r.button !== 0 || r.target === t(this, q).thumb) return;
259
- const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = r.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
257
+ }), t(this, q).track.addEventListener("mousedown", (i) => {
258
+ if (i.button !== 0 || i.target === t(this, q).thumb) return;
259
+ const n = t(this, q).track.getBoundingClientRect(), a = t(this, q).thumb.clientHeight, o = i.clientY - n.top - a / 2, l = n.height - a, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
260
260
  if (l > 0 && g > 0) {
261
261
  const b = Math.max(0, Math.min(1, o / l));
262
262
  e.scrollTop = b * g;
@@ -354,13 +354,13 @@ const $e = class $e extends HTMLElement {
354
354
  F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableVScrollBar");
355
355
  let le = $e;
356
356
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
357
- var D, S, Q, z, H, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, Pt, zt, At, Ae, lt, Rt, Dt;
357
+ var D, S, Q, P, H, V, tt, wt, Se, Ee, Wt, Ot, Bt, St, Et, zt, Pt, At, Ae, lt, Rt, Dt;
358
358
  const Ie = class Ie {
359
- constructor(i) {
359
+ constructor(r) {
360
360
  d(this, D);
361
361
  d(this, S);
362
362
  d(this, Q);
363
- d(this, z, /* @__PURE__ */ new Map());
363
+ d(this, P, /* @__PURE__ */ new Map());
364
364
  d(this, H, null);
365
365
  d(this, V, null);
366
366
  d(this, tt, 0);
@@ -371,14 +371,14 @@ const Ie = class Ie {
371
371
  E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  N.log("rowManager.refresh");
374
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
- i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const r = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
+ r && (t(this, St).call(this), t(this, lt).call(this, r.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  E(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  N.log("rowManager.initialize"), p(this, Q, {
379
379
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, H, null), t(this, z).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
381
+ }), p(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
382
382
  const o = t(this, S).querySelector(a);
383
383
  if (!o) return;
384
384
  const c = o.querySelector(".ng-part-body table");
@@ -386,42 +386,52 @@ const Ie = class Ie {
386
386
  const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
388
  const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
389
- t(this, z).set(a, u);
389
+ t(this, P).set(a, u);
390
390
  });
391
- const i = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- i && (t(this, Bt).call(this, i), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, i.scrollTop), i.addEventListener("scroll", (a) => {
393
- a.stopPropagation();
394
- const o = i.scrollTop, c = i.scrollLeft;
395
- e && (e.scrollTop = o), s && (s.scrollTop = o), r && (r.scrollLeft = c), n && (n.scrollLeft = c), t(this, lt).call(this, o);
396
- }));
391
+ const r = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), i = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ if (r) {
393
+ t(this, Bt).call(this, r), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, r.scrollTop);
394
+ let a = !1;
395
+ const o = /* @__PURE__ */ h((c) => {
396
+ if (a) return;
397
+ a = !0;
398
+ const l = c.scrollTop, f = c.scrollLeft;
399
+ r && r.scrollTop !== l && (r.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), i && i.scrollLeft !== f && (i.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, lt).call(this, l), a = !1;
400
+ }, "handleContainerScroll");
401
+ [r, e, s].forEach((c) => {
402
+ c && c.addEventListener("scroll", () => {
403
+ o(c);
404
+ });
405
+ });
406
+ }
397
407
  }, "initialize"));
398
- d(this, Ot, /* @__PURE__ */ h((i, e) => {
408
+ d(this, Ot, /* @__PURE__ */ h((r, e) => {
399
409
  N.log("rowManager.#renderRows");
400
- const s = t(this, z).get(e);
410
+ const s = t(this, P).get(e);
401
411
  if (!s || s.length === 0) return;
402
- const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
403
- if (!r) return;
404
- r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
405
- const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
412
+ const i = r.querySelector(".ng-part-body tbody.bindable-tbody");
413
+ if (!i) return;
414
+ i.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
415
+ const n = i.querySelector("tr.nodata"), a = document.createDocumentFragment();
406
416
  for (let o = 0; o < t(this, wt); o++)
407
417
  s.forEach((c) => {
408
418
  a.appendChild(c.cloneNode(!0));
409
419
  });
410
- n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
420
+ n ? n.before(a) : i.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = i.querySelector("tr:not(.nodata)"));
411
421
  }, "#renderRows"));
412
- d(this, Bt, /* @__PURE__ */ h((i) => {
422
+ d(this, Bt, /* @__PURE__ */ h((r) => {
413
423
  if (N.log("rowManager.#measureAndCacheHeight"), t(this, H) !== null && t(this, H) > 0)
414
424
  return t(this, H);
415
425
  N.log("#measureAndCacheHeight");
416
- const e = t(this, z).get(".ng-container-body");
426
+ const e = t(this, P).get(".ng-container-body");
417
427
  if (!e || e.length === 0) return 24;
418
- const s = i.querySelector("tbody.bindable-tbody");
428
+ const s = r.querySelector("tbody.bindable-tbody");
419
429
  if (!s) return 24;
420
430
  s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
421
- const r = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
431
+ const i = s.querySelector("tr.nodata"), n = document.createDocumentFragment();
422
432
  e.forEach((g) => {
423
433
  n.appendChild(g.cloneNode(!0));
424
- }), r ? r.before(n) : s.appendChild(n);
434
+ }), i ? i.before(n) : s.appendChild(n);
425
435
  const a = t(this, S), o = a.style.display, c = a.style.visibility, l = a.style.position;
426
436
  (o === "none" || window.getComputedStyle(a).display === "none") && (a.style.display = "block", a.style.visibility = "hidden", a.style.position = "absolute");
427
437
  let f = 0;
@@ -432,25 +442,25 @@ const Ie = class Ie {
432
442
  }, "#measureAndCacheHeight"));
433
443
  d(this, St, /* @__PURE__ */ h(() => {
434
444
  N.log("rowManager.#updateVirtualScrollHeight");
435
- const e = (t(this, D).data.get() || []).length, s = t(this, H), r = e * s;
445
+ const e = (t(this, D).data.get() || []).length, s = t(this, H), i = e * s;
436
446
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
437
447
  const a = t(this, S).querySelector(n);
438
448
  if (!a) return;
439
449
  const o = a.querySelector(".ng-part-body .ng-virtual-spacer");
440
- o && (o.style.height = `${r}px`);
450
+ o && (o.style.height = `${i}px`);
441
451
  });
442
452
  }, "#updateVirtualScrollHeight"));
443
453
  d(this, Et, /* @__PURE__ */ h(() => {
444
454
  if (t(this, tt) > 0 && t(this, H) > 0) {
445
- const i = Math.ceil(t(this, tt) / t(this, H));
446
- p(this, wt, i + t(this, Wt));
455
+ const r = Math.ceil(t(this, tt) / t(this, H));
456
+ p(this, wt, r + t(this, Wt));
447
457
  }
448
458
  }, "#updateRowCount"));
449
- d(this, Pt, /* @__PURE__ */ h(() => {
459
+ d(this, zt, /* @__PURE__ */ h(() => {
450
460
  var o, c, l, f, u, g;
451
- const i = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
461
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
452
462
  if (e) {
453
- const b = i ? Array.from(i.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
463
+ const b = r ? Array.from(r.querySelectorAll("tbody tr")) : [], x = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(b.length, x.length, v.length);
454
464
  for (let m = 0; m < A; m++) {
455
465
  const W = [
456
466
  ((o = b[m]) == null ? void 0 : o.getBoundingClientRect().height) || 0,
@@ -460,9 +470,9 @@ const Ie = class Ie {
460
470
  C > 0 && (b[m] && (b[m].style.height = `${C}px`), x[m] && (x[m].style.height = `${C}px`), v[m] && (v[m].style.height = `${C}px`));
461
471
  }
462
472
  }
463
- const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
473
+ const i = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), a = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
464
474
  if (n) {
465
- const b = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
475
+ const b = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], x = Array.from(n.querySelectorAll("tfoot tr")), v = a ? Array.from(a.querySelectorAll("tfoot tr")) : [], A = Math.max(b.length, x.length, v.length);
466
476
  for (let m = 0; m < A; m++) {
467
477
  const W = [
468
478
  ((f = b[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
@@ -473,38 +483,38 @@ const Ie = class Ie {
473
483
  }
474
484
  }
475
485
  }, "#syncRowHeights"));
476
- d(this, zt, /* @__PURE__ */ h(() => {
477
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((i) => {
478
- for (const e of i) {
486
+ d(this, Pt, /* @__PURE__ */ h(() => {
487
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((r) => {
488
+ for (const e of r) {
479
489
  const s = e.target;
480
490
  if (!s.classList.contains("active")) continue;
481
- const r = e.contentRect.height;
482
- if (r > 0) {
491
+ const i = e.contentRect.height;
492
+ if (i > 0) {
483
493
  let n = 0;
484
494
  const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
485
495
  a && (n += a.offsetHeight), o && (n += o.offsetHeight);
486
- const c = Math.max(r - n, 100);
496
+ const c = Math.max(i - n, 100);
487
497
  t(this, tt) !== c && (p(this, tt, c), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
488
498
  }
489
499
  }
490
500
  })), t(this, V).observe(t(this, S)));
491
501
  }, "#initResizeObserver"));
492
502
  d(this, At, /* @__PURE__ */ h(() => {
493
- N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
494
- const e = t(this, S).querySelector(i);
495
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
496
- }), t(this, Dt).call(this), t(this, Pt).call(this);
503
+ N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
504
+ const e = t(this, S).querySelector(r);
505
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, r);
506
+ }), t(this, Dt).call(this), t(this, zt).call(this);
497
507
  }, "#renderAllContainers"));
498
- d(this, Ae, /* @__PURE__ */ h((i) => {
508
+ d(this, Ae, /* @__PURE__ */ h((r) => {
499
509
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
500
510
  var l;
501
511
  const s = t(this, S).querySelector(e);
502
512
  if (!s) return;
503
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
504
- if (!r) return;
505
- const n = Array.from(r.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, z).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
513
+ const i = s.querySelector(".ng-part-body tbody.bindable-tbody");
514
+ if (!i) return;
515
+ const n = Array.from(i.querySelectorAll("tr:not(.nodata)")), a = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, D).data.get() || []).length;
506
516
  n.forEach((f, u) => {
507
- const g = i + Math.floor(u / a);
517
+ const g = r + Math.floor(u / a);
508
518
  if (g >= c) {
509
519
  f.style.display = "none";
510
520
  return;
@@ -514,20 +524,20 @@ const Ie = class Ie {
514
524
  });
515
525
  });
516
526
  }, "#adjustBufferRows"));
517
- d(this, lt, /* @__PURE__ */ h((i) => {
527
+ d(this, lt, /* @__PURE__ */ h((r) => {
518
528
  var l, f;
519
529
  const e = t(this, H);
520
530
  if (!e || e <= 0) return;
521
- const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = r * e, a = ((l = t(this, z).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, c = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
531
+ const s = t(this, D).data.length, i = Math.max(0, Math.floor(r / e)), n = i * e, a = ((l = t(this, P).get(".ng-container-body")) == null ? void 0 : l.length) || 1, o = t(this, Q).firstTr, c = o && o.dataset.row !== void 0 ? parseInt(o.dataset.row, 10) : -1;
522
532
  (f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
523
533
  u.style.transform = `translate3d(0, ${n}px, 0)`;
524
- }), c !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
534
+ }), c !== i && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
525
535
  const g = t(this, S).querySelector(u);
526
536
  if (!g) return;
527
537
  const b = g.querySelector(".ng-part-body tbody.bindable-tbody");
528
538
  if (!b) return;
529
539
  Array.from(b.querySelectorAll("tr:not(.nodata)")).forEach((v, A) => {
530
- const m = r + Math.floor(A / a);
540
+ const m = i + Math.floor(A / a);
531
541
  if (m >= s) {
532
542
  v.style.display = "none";
533
543
  return;
@@ -551,55 +561,55 @@ const Ie = class Ie {
551
561
  cell.dataset.row = dataIndex;
552
562
  });
553
563
  }; */
554
- d(this, Rt, /* @__PURE__ */ h((i, e, s) => {
555
- i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
556
- r.dataset.row = s;
557
- const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
564
+ d(this, Rt, /* @__PURE__ */ h((r, e, s) => {
565
+ r.dataset.row = s, r.data = e, Array.from(r.cells).forEach((i, n) => {
566
+ i.dataset.row = s;
567
+ const a = Array.from(i.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
558
568
  a && typeof a.refresh == "function" && a.refresh();
559
569
  });
560
570
  }, "#bindRowData"));
561
571
  d(this, Dt, /* @__PURE__ */ h(() => {
562
572
  var c, l, f;
563
573
  N.log("rowManager.#syncHeaderHeights");
564
- const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
574
+ const r = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
565
575
  if (!e) return;
566
- const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(r.length, n.length, a.length);
576
+ const i = r ? Array.from(r.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), a = s ? Array.from(s.querySelectorAll("tr")) : [], o = Math.max(i.length, n.length, a.length);
567
577
  for (let u = 0; u < o; u++) {
568
578
  const g = [
569
- ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
579
+ ((c = i[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
570
580
  ((l = n[u]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
571
581
  ((f = a[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
572
582
  ], b = Math.max(...g);
573
- b > 0 && (r[u] && (r[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
583
+ b > 0 && (i[u] && (i[u].style.height = `${b}px`), n[u] && (n[u].style.height = `${b}px`), a[u] && (a[u].style.height = `${b}px`));
574
584
  }
575
585
  }, "#syncHeaderHeights"));
576
586
  E(this, "destroy", /* @__PURE__ */ h(() => {
577
587
  t(this, V) && (t(this, V).disconnect(), p(this, V, null));
578
588
  }, "destroy"));
579
- p(this, D, i.getRootNode().host), p(this, S, i), t(this, zt).call(this);
589
+ p(this, D, r.getRootNode().host), p(this, S, r), t(this, Pt).call(this);
580
590
  }
581
591
  getRowHeight() {
582
592
  return t(this, H);
583
593
  }
584
- templateLength(i = ".ng-container-body") {
594
+ templateLength(r = ".ng-container-body") {
585
595
  var e;
586
- return ((e = t(this, z).get(i)) == null ? void 0 : e.length) || 1;
596
+ return ((e = t(this, P).get(r)) == null ? void 0 : e.length) || 1;
587
597
  }
588
598
  };
589
- D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), z = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Pt = new WeakMap(), zt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), h(Ie, "RowManager");
599
+ D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), At = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Dt = new WeakMap(), h(Ie, "RowManager");
590
600
  let ce = Ie;
591
601
  const jt = class jt {
592
602
  /**
593
603
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
594
604
  */
595
- static compileAll(i) {
596
- return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
605
+ static compileAll(r) {
606
+ return Array.isArray(r) ? r.map((e) => jt.compile(e)) : [];
597
607
  }
598
608
  /**
599
609
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
600
610
  */
601
- static compile(i) {
602
- if (!i) return null;
611
+ static compile(r) {
612
+ if (!r) return null;
603
613
  const e = /* @__PURE__ */ h((o) => {
604
614
  o.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
605
615
  const f = l.getAttribute("cell-type") || "renderer";
@@ -623,7 +633,7 @@ const jt = class jt {
623
633
  l ? l.after(c) : o.prepend(c);
624
634
  }
625
635
  o.classList.add("nine-table-element"), o.style.display = "table";
626
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((o, c) => {
636
+ }, "ensureTableStructure"), i = /* @__PURE__ */ h((o, c) => {
627
637
  const l = Array.from(o.querySelectorAll(c + " tr")), f = Array.from(o.querySelectorAll(c + " th," + c + " td")), u = l.length;
628
638
  if (u === 0 || f.length === 0) return;
629
639
  let g = 0;
@@ -655,8 +665,8 @@ const jt = class jt {
655
665
  }
656
666
  });
657
667
  });
658
- }, "resetColIndex"), n = i.cloneNode(!0);
659
- return s(n), e(n), r(n, "thead"), r(n, "tbody"), r(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
668
+ }, "resetColIndex"), n = r.cloneNode(!0);
669
+ return s(n), e(n), i(n, "thead"), i(n, "tbody"), i(n, "tfoot"), Array.from(n.querySelectorAll("colgroup col")).forEach((o, c) => {
660
670
  const l = o.getAttribute("fixed");
661
671
  l && n.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
662
672
  f.setAttribute("fixed", l);
@@ -682,28 +692,28 @@ const yt = class yt extends HTMLElement {
682
692
  { selector: ".ng-container-body", type: null },
683
693
  { selector: ".ng-container-left", type: "left" },
684
694
  { selector: ".ng-container-right", type: "right" }
685
- ].forEach(({ selector: s, type: r }) => {
695
+ ].forEach(({ selector: s, type: i }) => {
686
696
  const n = this.querySelector(s);
687
697
  if (!n) return;
688
698
  n.innerHTML = "";
689
699
  const a = document.createElement("div");
690
- a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
700
+ a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), i, "header"));
691
701
  const o = document.createElement("div");
692
702
  o.className = "ng-part-body";
693
703
  const c = document.createElement("div");
694
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, et), r, "body"));
704
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ct).call(this, t(this, et), i, "body"));
695
705
  const l = document.createElement("div");
696
706
  l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
697
707
  const f = document.createElement("div");
698
- f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), r, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
708
+ f.className = "ng-part-footer", f.appendChild(t(this, ct).call(this, t(this, et), i, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
699
709
  });
700
710
  }, "#renderSplitContainers"));
701
711
  d(this, Yt, /* @__PURE__ */ h(() => {
702
712
  ["left", "right", "body"].forEach((e) => {
703
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
704
- if (!s || !r || r.length === 0) return;
713
+ const s = this.querySelector(`.ng-container-${e}`), i = s == null ? void 0 : s.querySelectorAll("table");
714
+ if (!s || !i || i.length === 0) return;
705
715
  let n = 0;
706
- r[0].querySelectorAll("col").forEach((a) => {
716
+ i[0].querySelectorAll("col").forEach((a) => {
707
717
  const o = parseInt(a.getAttribute("width"), 10);
708
718
  isNaN(n) || (n += o);
709
719
  }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${n}px`, s.style.width = `${n}px`);
@@ -715,14 +725,14 @@ const yt = class yt extends HTMLElement {
715
725
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
716
726
  }, 0));
717
727
  }, "generate"));
718
- d(this, ct, /* @__PURE__ */ h((e, s, r) => {
728
+ d(this, ct, /* @__PURE__ */ h((e, s, i) => {
719
729
  const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
720
- if (r === "header") {
730
+ if (i === "header") {
721
731
  if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
722
732
  const f = document.createElement("tbody");
723
733
  f.className = "fixed-tbody", n.appendChild(f);
724
734
  }
725
- } else r === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : r === "footer" && (a && a.remove(), o && o.remove());
735
+ } else i === "body" ? (a && a.remove(), c && c.remove(), o && (o.className = "bindable-tbody")) : i === "footer" && (a && a.remove(), o && o.remove());
726
736
  return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
727
737
  l.getAttribute("fixed") !== "left" && l.remove();
728
738
  }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
@@ -918,12 +928,12 @@ const _e = class _e extends HTMLElement {
918
928
  var e;
919
929
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
920
930
  var a;
921
- const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
922
- t(this, qt).call(this, n, r);
931
+ const i = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((a = s.target.closest(".nine-tab-item")) == null ? void 0 : a.dataset.index, 10);
932
+ t(this, qt).call(this, n, i);
923
933
  }), t(this, qt).call(this, 0, !1);
924
934
  }, "#init"));
925
935
  d(this, qt, /* @__PURE__ */ h((e, s = !1) => {
926
- const r = /* @__PURE__ */ h(() => {
936
+ const i = /* @__PURE__ */ h(() => {
927
937
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
928
938
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
929
939
  const g = f.filter((b) => b.classList.contains("active"));
@@ -951,7 +961,7 @@ const _e = class _e extends HTMLElement {
951
961
  const l = a.querySelectorAll("nine-table-sheet.active");
952
962
  l == null || l.forEach((f) => {
953
963
  f.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
954
- }), r();
964
+ }), i();
955
965
  }, "#switchSheet"));
956
966
  }
957
967
  connectedCallback() {
@@ -963,24 +973,24 @@ let de = _e;
963
973
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
964
974
  var M, Zt, Tt, Gt;
965
975
  const Ne = class Ne {
966
- constructor(i) {
976
+ constructor(r) {
967
977
  d(this, M);
968
978
  d(this, Zt, /* @__PURE__ */ h(() => {
969
- t(this, Gt).call(this), new ResizeObserver((i) => {
970
- for (let e of i)
979
+ t(this, Gt).call(this), new ResizeObserver((r) => {
980
+ for (let e of r)
971
981
  t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
972
982
  }).observe(t(this, M));
973
983
  }, "#init"));
974
984
  d(this, Tt, /* @__PURE__ */ h(() => {
975
985
  var c, l;
976
- const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
977
- if (i.length === 0) return;
978
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + r + n + a;
986
+ const r = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
987
+ if (r.length === 0) return;
988
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...r.map((f) => f.getRowHeight())), i = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, a = $t.SCROLLBAR_SIZE, o = e * s + i + n + a;
979
989
  t(this, M).style.height = `${o}px`;
980
990
  }, "#applyAutoHeight"));
981
991
  d(this, Gt, /* @__PURE__ */ h(() => {
982
- const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, n = e.map((c, l) => {
983
- const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
992
+ const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", i = e.length, n = e.map((c, l) => {
993
+ const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < i - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
984
994
  return u + g;
985
995
  }).join(""), a = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
986
996
  t(this, M).shadowRoot.innerHTML = `
@@ -1081,32 +1091,32 @@ const Ne = class Ne {
1081
1091
  });
1082
1092
  });
1083
1093
  }, "#render"));
1084
- p(this, M, i), t(this, Zt).call(this);
1094
+ p(this, M, r), t(this, Zt).call(this);
1085
1095
  }
1086
1096
  };
1087
1097
  M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1088
1098
  let fe = Ne;
1089
1099
  var kt, ht;
1090
1100
  const We = class We {
1091
- constructor(i) {
1101
+ constructor(r) {
1092
1102
  d(this, kt);
1093
1103
  d(this, ht, -1);
1094
1104
  E(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
1095
- p(this, kt, i);
1105
+ p(this, kt, r);
1096
1106
  }
1097
1107
  get at() {
1098
1108
  return t(this, ht);
1099
1109
  }
1100
- set at(i) {
1101
- p(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1110
+ set at(r) {
1111
+ p(this, ht, parseInt(r, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1102
1112
  });
1103
1113
  }
1104
1114
  };
1105
1115
  kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1106
1116
  let ue = We;
1107
- var I, T, _, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1117
+ var I, T, _, dt, Jt, Y, Qt, rt, Ct, te, ee, ft;
1108
1118
  const O = class O {
1109
- constructor(i, e) {
1119
+ constructor(r, e) {
1110
1120
  d(this, I);
1111
1121
  d(this, T);
1112
1122
  d(this, _, []);
@@ -1115,34 +1125,34 @@ const O = class O {
1115
1125
  d(this, Y, []);
1116
1126
  d(this, Qt, /* @__PURE__ */ h(() => {
1117
1127
  p(this, Y, []);
1118
- const i = t(this, I).template || [];
1119
- Array.from(i).forEach((e) => {
1128
+ const r = t(this, I).template || [];
1129
+ Array.from(r).forEach((e) => {
1120
1130
  var s;
1121
1131
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1122
1132
  }), (t(this, T).rawRecords || []).forEach((e) => {
1123
1133
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1124
1134
  });
1125
1135
  }, "#initialize"));
1126
- d(this, it, /* @__PURE__ */ h(() => {
1127
- t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1128
- i.invalidate();
1136
+ d(this, rt, /* @__PURE__ */ h(() => {
1137
+ t(this, I).shadowRoot.querySelectorAll("nine-table-sheet").forEach((r) => {
1138
+ r.invalidate();
1129
1139
  });
1130
1140
  }, "#invalidate"));
1131
- E(this, "get", /* @__PURE__ */ h((i, e) => {
1141
+ E(this, "get", /* @__PURE__ */ h((r, e) => {
1132
1142
  var n;
1133
1143
  const s = this.getValidData();
1134
1144
  if (!s || s.length <= 0) return;
1135
- if (i == null) return t(this, ft).call(this, s);
1136
- if (i < 0 || i >= s.length) return null;
1137
- const r = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1145
+ if (r == null) return t(this, ft).call(this, s);
1146
+ if (r < 0 || r >= s.length) return null;
1147
+ const i = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1138
1148
  if (e != null) {
1139
- const a = r.indexOf(e);
1140
- return a >= 0 ? s[i].v[a] : null;
1149
+ const a = i.indexOf(e);
1150
+ return a >= 0 ? s[r].v[a] : null;
1141
1151
  }
1142
- return t(this, ft).call(this, s[i]);
1152
+ return t(this, ft).call(this, s[r]);
1143
1153
  }, "get"));
1144
- E(this, "set", /* @__PURE__ */ h((i) => {
1145
- this.clear(), this.add(i, !1), t(this, it).call(this);
1154
+ E(this, "set", /* @__PURE__ */ h((r) => {
1155
+ this.clear(), this.add(r, !1), t(this, rt).call(this);
1146
1156
  }, "set"));
1147
1157
  d(this, Ct, /* @__PURE__ */ h(() => ({
1148
1158
  rowState: O.ROW_STATE.EMPTY,
@@ -1154,84 +1164,84 @@ const O = class O {
1154
1164
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1155
1165
  }), "#getDefaultMeta"));
1156
1166
  E(this, "reset", /* @__PURE__ */ h(() => {
1157
- p(this, _, []), p(this, dt, []), t(this, it).call(this);
1167
+ p(this, _, []), p(this, dt, []), t(this, rt).call(this);
1158
1168
  }, "reset"));
1159
1169
  E(this, "clear", /* @__PURE__ */ h(() => {
1160
- var i;
1161
- t(this, T).rawRecords = [], p(this, _, []), p(this, dt, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1162
- }, "clear"));
1163
- d(this, te, /* @__PURE__ */ h((i) => {
1164
1170
  var r;
1165
- Array.isArray(i) || (i = [i]);
1166
- const e = typeof ((r = t(this, I).fields) == null ? void 0 : r.get) == "function" ? t(this, I).fields.get() : Object.keys(i[0] || {}), s = [];
1167
- return i.forEach((n) => {
1171
+ t(this, T).rawRecords = [], p(this, _, []), p(this, dt, []), (r = t(this, T).viewRecords) != null && r.reset && t(this, T).viewRecords.reset();
1172
+ }, "clear"));
1173
+ d(this, te, /* @__PURE__ */ h((r) => {
1174
+ var i;
1175
+ Array.isArray(r) || (r = [r]);
1176
+ const e = typeof ((i = t(this, I).fields) == null ? void 0 : i.get) == "function" ? t(this, I).fields.get() : Object.keys(r[0] || {}), s = [];
1177
+ return r.forEach((n) => {
1168
1178
  const a = { v: [] };
1169
1179
  e.forEach((o) => {
1170
1180
  a.v.push(n[o] !== void 0 && n[o] !== null ? n[o] : "");
1171
1181
  }), s.push(a);
1172
1182
  }), s;
1173
1183
  }, "#json2Array"));
1174
- d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1184
+ d(this, ee, /* @__PURE__ */ h((r) => (Array.isArray(r) || (r = [r]), r.forEach((e) => {
1175
1185
  e.__ng = t(this, Ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1176
- }), i), "#defaultInsert"));
1177
- E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1178
- i === void 0 && (i = {});
1179
- const s = t(this, te).call(this, i);
1186
+ }), r), "#defaultInsert"));
1187
+ E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1188
+ r === void 0 && (r = {});
1189
+ const s = t(this, te).call(this, r);
1180
1190
  t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1181
- const r = this.count() - 1;
1191
+ const i = this.count() - 1;
1182
1192
  return e || s.forEach((n, a) => {
1183
- const o = t(this, T).rawRecords[r - a];
1193
+ const o = t(this, T).rawRecords[i - a];
1184
1194
  o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1185
- }), t(this, it).call(this), r;
1195
+ }), t(this, rt).call(this), i;
1186
1196
  }, "add"));
1187
- E(this, "delete", /* @__PURE__ */ h((i) => {
1197
+ E(this, "delete", /* @__PURE__ */ h((r) => {
1188
1198
  let e = [];
1189
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1199
+ Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1190
1200
  if (t(this, _)[s]) {
1191
- const r = t(this, _)[s].__ng.rowid;
1192
- t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, T).rawRecords.forEach((n) => {
1193
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1201
+ const i = t(this, _)[s].__ng.rowid;
1202
+ t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, T).rawRecords.forEach((n) => {
1203
+ n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1194
1204
  });
1195
1205
  }
1196
- }), this.resetRecords(), t(this, it).call(this);
1206
+ }), this.resetRecords(), t(this, rt).call(this);
1197
1207
  }, "delete"));
1198
- E(this, "setValue", /* @__PURE__ */ h((i, e, s) => {
1208
+ E(this, "setValue", /* @__PURE__ */ h((r, e, s) => {
1199
1209
  var c;
1200
- i = parseInt(i, 10);
1210
+ r = parseInt(r, 10);
1201
1211
  const n = (typeof ((c = t(this, I).fields) == null ? void 0 : c.get) == "function" ? t(this, I).fields.get() : []).indexOf(e);
1202
1212
  if (n < 0) return;
1203
- const a = this.getValidData()[i];
1213
+ const a = this.getValidData()[r];
1204
1214
  if (!a) return;
1205
1215
  const o = a.v[n];
1206
1216
  o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
1207
1217
  }, "setValue"));
1208
1218
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1209
- p(this, dt, t(this, T).rawRecords.filter((i) => !i.__ng.deleted)), p(this, _, t(this, T).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, T).rawRecords.forEach((i, e) => {
1210
- i.__ng.rowidx = e;
1211
- }), t(this, _).forEach((i, e) => {
1212
- i.__ng.i = e;
1219
+ p(this, dt, t(this, T).rawRecords.filter((r) => !r.__ng.deleted)), p(this, _, t(this, T).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, T).rawRecords.forEach((r, e) => {
1220
+ r.__ng.rowidx = e;
1221
+ }), t(this, _).forEach((r, e) => {
1222
+ r.__ng.i = e;
1213
1223
  });
1214
1224
  }, "resetRecords"));
1215
1225
  E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1216
- d(this, ft, /* @__PURE__ */ h((i) => {
1226
+ d(this, ft, /* @__PURE__ */ h((r) => {
1217
1227
  var a;
1218
- if (!i) return i;
1219
- const e = !Array.isArray(i), s = e ? [i] : i, r = typeof ((a = t(this, I).fields) == null ? void 0 : a.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1228
+ if (!r) return r;
1229
+ const e = !Array.isArray(r), s = e ? [r] : r, i = typeof ((a = t(this, I).fields) == null ? void 0 : a.get) == "function" ? t(this, I).fields.get() : [], n = s.filter((o) => !o.__ng.deleted).map((o) => {
1220
1230
  const c = {};
1221
- return r.forEach((l, f) => {
1231
+ return i.forEach((l, f) => {
1222
1232
  c[l] = o.v ? o.v[f] : o[l];
1223
1233
  }), c.__ng = o.__ng, c;
1224
1234
  });
1225
1235
  return e ? n[0] : n;
1226
1236
  }, "#conv"));
1227
1237
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1228
- p(this, I, i), p(this, T, e), t(this, Qt).call(this);
1238
+ p(this, I, r), p(this, T, e), t(this, Qt).call(this);
1229
1239
  }
1230
1240
  get source() {
1231
1241
  return t(this, ft).call(this, t(this, T).rawRecords);
1232
1242
  }
1233
- set source(i) {
1234
- this.clear(), this.add(i, !1);
1243
+ set source(r) {
1244
+ this.clear(), this.add(r, !1);
1235
1245
  }
1236
1246
  get nextId() {
1237
1247
  return ++Ue(this, Jt)._;
@@ -1246,7 +1256,7 @@ const O = class O {
1246
1256
  return this.length;
1247
1257
  }
1248
1258
  };
1249
- I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1259
+ I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1250
1260
  E(O, "ROW_STATE", {
1251
1261
  EMPTY: "EMPTY",
1252
1262
  NORMAL: "NORMAL",
@@ -1255,56 +1265,56 @@ E(O, "ROW_STATE", {
1255
1265
  DELETE: "DELETE"
1256
1266
  });
1257
1267
  let ge = O;
1258
- var rt;
1268
+ var it;
1259
1269
  const Oe = class Oe {
1260
- constructor(i) {
1261
- d(this, rt);
1262
- p(this, rt, i), this.row = new ue(this), this.data = new ge(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1270
+ constructor(r) {
1271
+ d(this, it);
1272
+ p(this, it, r), this.row = new ue(this), this.data = new ge(t(this, it), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1263
1273
  var e;
1264
- (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1274
+ (e = t(this, it).view) != null && e.redraw && t(this, it).view.redraw();
1265
1275
  }, this.setDataSource = (e) => {
1266
1276
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1267
1277
  }, this.getRowState = (e) => {
1268
- var r, n;
1278
+ var i, n;
1269
1279
  const s = parseInt(e, 10);
1270
1280
  if (!(s >= this.data.count()))
1271
- return (n = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : n.rowState;
1281
+ return (n = (i = this.data.getValidData()[s]) == null ? void 0 : i.__ng) == null ? void 0 : n.rowState;
1272
1282
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1273
1283
  this.row.at = e;
1274
- }, 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, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
1275
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1284
+ }, 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, s) => this.data.get(e, s), this.setColumn = (e, s, i) => {
1285
+ e = parseInt(e, 10), this.data.setValue(e, s, i);
1276
1286
  }, this.setDataSource([]);
1277
1287
  }
1278
1288
  };
1279
- rt = new WeakMap(), h(Oe, "ngDataManager");
1289
+ it = new WeakMap(), h(Oe, "ngDataManager");
1280
1290
  let be = Oe;
1281
1291
  var ut, L, Lt, se;
1282
1292
  const Be = class Be {
1283
1293
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1284
- constructor(i) {
1294
+ constructor(r) {
1285
1295
  d(this, ut);
1286
1296
  d(this, L, []);
1287
- E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1288
- i.forEach((s) => {
1289
- t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1297
+ E(this, "add", /* @__PURE__ */ h((r, e = "string") => {
1298
+ r.forEach((s) => {
1299
+ t(this, L).some((i) => i.name === s) || t(this, L).push({ name: s, type: e });
1290
1300
  }), t(this, Lt).call(this);
1291
1301
  }, "add"));
1292
1302
  d(this, Lt, /* @__PURE__ */ h(() => {
1293
- const i = /* @__PURE__ */ new Map();
1303
+ const r = /* @__PURE__ */ new Map();
1294
1304
  t(this, L).forEach((e) => {
1295
- i.set(e.name, e.type);
1296
- }), p(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), p(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1305
+ r.set(e.name, e.type);
1306
+ }), p(this, L, Array.from(r, ([e, s]) => ({ name: e, type: s }))), p(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1297
1307
  }, "#adjust"));
1298
1308
  d(this, se, /* @__PURE__ */ h(() => {
1299
1309
  p(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1300
- const i = Array.from(t(this, ut).querySelectorAll("table"));
1301
- if (!(!i || i.length === 0)) {
1302
- for (const e of i)
1303
- N.log(e), $("[data-bind]", e).each((s, r) => {
1304
- const n = r.dataset.bind, a = r.getAttribute("data-type") || "string";
1310
+ const r = Array.from(t(this, ut).querySelectorAll("table"));
1311
+ if (!(!r || r.length === 0)) {
1312
+ for (const e of r)
1313
+ N.log(e), $("[data-bind]", e).each((s, i) => {
1314
+ const n = i.dataset.bind, a = i.getAttribute("data-type") || "string";
1305
1315
  n && t(this, L).push({ name: n, type: a });
1306
1316
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1307
- $(`[${s}]`, e).each((r, n) => {
1317
+ $(`[${s}]`, e).each((i, n) => {
1308
1318
  var a = n.getAttribute(s);
1309
1319
  if (a.indexOf("data.") < 0) {
1310
1320
  const o = a.search(/[(]/g);
@@ -1327,44 +1337,44 @@ const Be = class Be {
1327
1337
  t(this, Lt).call(this);
1328
1338
  }
1329
1339
  }, "#init"));
1330
- p(this, ut, i), t(this, se).call(this);
1340
+ p(this, ut, r), t(this, se).call(this);
1331
1341
  }
1332
1342
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1333
1343
  get() {
1334
- return t(this, L).map((i) => i.name);
1344
+ return t(this, L).map((r) => r.name);
1335
1345
  }
1336
1346
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1337
1347
  getFields() {
1338
1348
  return t(this, L);
1339
1349
  }
1340
1350
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1341
- getType(i) {
1342
- const e = t(this, L).find((s) => s.name === i);
1351
+ getType(r) {
1352
+ const e = t(this, L).find((s) => s.name === r);
1343
1353
  return e ? e.type : "string";
1344
1354
  }
1345
- indexOf(i) {
1346
- return t(this, L).findIndex((e) => e.name === i);
1355
+ indexOf(r) {
1356
+ return t(this, L).findIndex((e) => e.name === r);
1347
1357
  }
1348
- includes(i) {
1349
- return t(this, L).some((e) => e.name === i);
1358
+ includes(r) {
1359
+ return t(this, L).some((e) => e.name === r);
1350
1360
  }
1351
1361
  };
1352
1362
  ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1353
1363
  let pe = Be;
1354
- var nt, ie, re;
1355
- const Pe = class Pe extends HTMLElement {
1364
+ var nt, re, ie;
1365
+ const ze = class ze extends HTMLElement {
1356
1366
  constructor() {
1357
1367
  super();
1358
1368
  //#created = false;
1359
1369
  d(this, nt);
1360
- d(this, ie);
1361
- d(this, re, /* @__PURE__ */ h(() => {
1362
- this.fields = new pe(this), p(this, ie, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1370
+ d(this, re);
1371
+ d(this, ie, /* @__PURE__ */ h(() => {
1372
+ this.fields = new pe(this), p(this, re, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1363
1373
  }, "#init"));
1364
1374
  this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
1365
1375
  }
1366
1376
  connectedCallback() {
1367
- t(this, re).call(this);
1377
+ t(this, ie).call(this);
1368
1378
  }
1369
1379
  disconnectedCallback() {
1370
1380
  N.log("NineTable disconnected.");
@@ -1382,8 +1392,8 @@ const Pe = class Pe extends HTMLElement {
1382
1392
  return t(this, nt);
1383
1393
  }
1384
1394
  };
1385
- nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Pe, "NineTable");
1386
- let ye = Pe;
1395
+ nt = new WeakMap(), re = new WeakMap(), ie = new WeakMap(), h(ze, "NineTable");
1396
+ let ye = ze;
1387
1397
  customElements.get("nine-table") || customElements.define("nine-table", ye);
1388
1398
  const mt = class mt extends HTMLElement {
1389
1399
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
@@ -1399,7 +1409,7 @@ const mt = class mt extends HTMLElement {
1399
1409
  h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1400
1410
  let me = mt;
1401
1411
  var k, Ht, y, Re, qe, Te, ke, Ce;
1402
- const ze = class ze extends me {
1412
+ const Pe = class Pe extends me {
1403
1413
  constructor() {
1404
1414
  super();
1405
1415
  d(this, k);
@@ -1412,13 +1422,13 @@ const ze = class ze extends me {
1412
1422
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1413
1423
  if (t(this, y))
1414
1424
  if (t(this, y).closest("tbody")) {
1415
- const s = t(this, y).closest("tr").data, r = parseInt(t(this, y).dataset.row);
1425
+ const s = t(this, y).closest("tr").data, i = parseInt(t(this, y).dataset.row);
1416
1426
  if (!s) return "";
1417
1427
  if (ninegrid.isNull(t(this, y).dataset.expr)) {
1418
1428
  if (!ninegrid.isNull(t(this, y).dataset.bind))
1419
1429
  return s[t(this, y).dataset.bind] || ninegrid.nvl(e, "");
1420
1430
  } else try {
1421
- return this.getExprValue(t(this, y).dataset.expr, s, r, t(this, y));
1431
+ return this.getExprValue(t(this, y).dataset.expr, s, i, t(this, y));
1422
1432
  } catch {
1423
1433
  console.error(t(this, y).dataset.expr, s, t(this, y).dataset.row);
1424
1434
  }
@@ -1433,14 +1443,14 @@ const ze = class ze extends me {
1433
1443
  if (!(!t(this, k) || !t(this, k).template || !t(this, y).closest("tbody.bindable"))) {
1434
1444
  var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1435
1445
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1436
- var s = t(this, y).closest("tr"), r = [];
1446
+ var s = t(this, y).closest("tr"), i = [];
1437
1447
  $("th,td", s).each((m, W) => {
1438
1448
  var C = ninegrid.j.querySelectorAll(W).attr("suppress");
1439
- C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && r.push(C));
1440
- }), r.sort();
1449
+ C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && i.push(C));
1450
+ }), i.sort();
1441
1451
  var n = !1;
1442
1452
  if (parseInt(s.sectionRowIndex / t(this, k).template.length) > 0)
1443
- for (var a of r) {
1453
+ for (var a of i) {
1444
1454
  if (a > e) break;
1445
1455
  var o = parseInt(t(this, y).dataset.row), c = o - 1, l = t(this, y).closest("tr").data, f = t(this, k).data.get(c);
1446
1456
  t(this, y).dataset.matrixRow;
@@ -1458,12 +1468,12 @@ const ze = class ze extends me {
1458
1468
  }
1459
1469
  }
1460
1470
  }, "#resetSuppress"));
1461
- E(this, "getExprValue", /* @__PURE__ */ h((e, s, r, n) => {
1471
+ E(this, "getExprValue", /* @__PURE__ */ h((e, s, i, n) => {
1462
1472
  if (typeof e < "u")
1463
1473
  try {
1464
- r = parseInt(r);
1474
+ i = parseInt(i);
1465
1475
  const a = e.replace("()", "");
1466
- return t(this, k)[a] ? t(this, k)[a].call(this, s, r, t(this, y)) : t(this, k).exprFunction(e).call(this, s, r, t(this, k).data);
1476
+ return t(this, k)[a] ? t(this, k)[a].call(this, s, i, t(this, y)) : t(this, k).exprFunction(e).call(this, s, i, t(this, k).data);
1467
1477
  } catch {
1468
1478
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1469
1479
  }
@@ -1480,8 +1490,8 @@ const ze = class ze extends me {
1480
1490
  }
1481
1491
  set value(e) {
1482
1492
  var s = parseInt(t(this, y).dataset.row);
1483
- const r = this.getAttribute("update-row-state") != "false";
1484
- s < 0 ? t(this, k).data.setValueNF(parseInt(t(this, y).dataset.index), t(this, y).dataset.bind, e, r) : t(this, k).data.setValue(s, t(this, y).dataset.bind, e, r);
1493
+ const i = this.getAttribute("update-row-state") != "false";
1494
+ s < 0 ? t(this, k).data.setValueNF(parseInt(t(this, y).dataset.index), t(this, y).dataset.bind, e, i) : t(this, k).data.setValue(s, t(this, y).dataset.bind, e, i);
1485
1495
  }
1486
1496
  get row() {
1487
1497
  return parseInt(t(this, y).dataset.row);
@@ -1494,8 +1504,8 @@ const ze = class ze extends me {
1494
1504
  return parseInt(t(this, y).dataset.row), t(this, Ht).data[e];
1495
1505
  }
1496
1506
  };
1497
- k = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(ze, "CellElement");
1498
- let xe = ze;
1507
+ k = new WeakMap(), Ht = new WeakMap(), y = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
1508
+ let xe = Pe;
1499
1509
  const De = class De extends xe {
1500
1510
  constructor() {
1501
1511
  super();
@@ -1558,9 +1568,9 @@ const je = class je extends ve {
1558
1568
  if (t(this, ot) == "number") {
1559
1569
  let n = [];
1560
1570
  if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, bt) && Number(t(this, bt)) >= 0 && n.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !n.includes(e.key) && e.preventDefault(), t(this, U) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1561
- var s = e.target.value, r = s.indexOf(".");
1562
- if (r >= 0) {
1563
- var s = s.substr(r + 1, s.length);
1571
+ var s = e.target.value, i = s.indexOf(".");
1572
+ if (i >= 0) {
1573
+ var s = s.substr(i + 1, s.length);
1564
1574
  s.length >= Number(t(this, U)) && e.preventDefault();
1565
1575
  }
1566
1576
  }