@ninebone/table 0.0.560 β†’ 0.0.562

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- var Fe = Object.defineProperty;
2
- var Ve = (R) => {
1
+ var Ve = Object.defineProperty;
2
+ var Ye = (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) => ({
5
+ var Ke = (R, i, e) => i in R ? Ve(R, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : R[i] = e;
6
+ var h = (R, i) => Ve(R, "name", { value: i, configurable: !0 });
7
+ var E = (R, i, e) => Ke(R, typeof i != "symbol" ? i + "" : i, e), Ue = (R, i, e) => i.has(R) || Ye("Cannot " + e);
8
+ var t = (R, i, e) => (Ue(R, i, "read from private field"), e ? e.call(R) : i.get(R)), d = (R, i, e) => i.has(R) ? Ye("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(R) : i.set(R, e), p = (R, i, e, s) => (Ue(R, i, "write to private field"), s ? s.call(R, e) : i.set(R, e), e);
9
+ var Xe = (R, i, e, s) => ({
10
10
  set _(r) {
11
11
  p(R, i, r, e);
12
12
  },
@@ -14,37 +14,37 @@ var Ue = (R, i, e, s) => ({
14
14
  return t(R, i, s);
15
15
  }
16
16
  });
17
- import { trace as Ke } from "@ninebone/util";
18
- const He = class He extends Ke.constructor {
17
+ import { trace as Ze } from "@ninebone/util";
18
+ const Me = class Me extends Ze.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(He, "Trace");
24
- let oe = He;
25
- const N = new oe();
26
- var P, j, w, X, K, Z, It, G, _t;
27
- const Me = class Me extends HTMLElement {
23
+ h(Me, "Trace");
24
+ let ae = Me;
25
+ const N = new ae();
26
+ var z, j, w, X, K, Z, _t, G, Nt;
27
+ const $e = class $e 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
- d(this, It, /* @__PURE__ */ h(() => {
37
- if (!t(this, P)) return;
38
- const e = t(this, P).querySelector(".ng-container-body .ng-part-body");
36
+ d(this, _t, /* @__PURE__ */ h(() => {
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 r = 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 {
@@ -73,7 +73,7 @@ const Me = class Me extends HTMLElement {
73
73
  const l = s.clientWidth, u = r.scrollWidth - l;
74
74
  return c > 0 && u > 0 && (s.scrollLeft = o / c * u), o > 0 && o < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, _t, /* @__PURE__ */ h(() => {
76
+ d(this, Nt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, X)), clearInterval(t(this, K));
79
79
  const n = parseInt(t(this, w).thumb.style.left || 0, 10);
@@ -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;
@@ -190,7 +190,7 @@ const Me = class Me extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, j) || this.refresh();
193
- }), t(this, _t).call(this), t(this, It).call(this), this.refresh();
193
+ }), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
@@ -198,19 +198,19 @@ 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");
202
- let ae = Me;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
204
- var F, at, J, q, xt, vt, Nt;
205
- const $e = class $e extends HTMLElement {
201
+ z = new WeakMap(), j = new WeakMap(), w = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), h($e, "NineTableHScrollBar");
202
+ let le = $e;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", le);
204
+ var F, at, J, q, vt, wt, Wt;
205
+ const Ie = class Ie extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
208
  d(this, F);
209
209
  d(this, at);
210
210
  d(this, J, !1);
211
211
  d(this, q);
212
- d(this, xt, 0);
213
212
  d(this, vt, 0);
213
+ d(this, wt, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (!t(this, F) || !t(this, q)) return;
216
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;
@@ -229,7 +229,7 @@ const $e = class $e extends HTMLElement {
229
229
  const v = f - u;
230
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;
231
231
  }, "refresh"));
232
- d(this, Nt, /* @__PURE__ */ h(() => {
232
+ d(this, Wt, /* @__PURE__ */ h(() => {
233
233
  N.log("nine-table-vscrollbar.#init");
234
234
  const e = t(this, q).container, s = /* @__PURE__ */ h(() => {
235
235
  const n = (t(this, F).data.get() || []).length, a = t(this, at).getRowHeight();
@@ -239,13 +239,13 @@ const $e = class $e extends HTMLElement {
239
239
  t(this, J) || this.refresh();
240
240
  }), t(this, q).thumb.addEventListener("mousedown", (r) => {
241
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);
242
+ r.stopPropagation(), r.preventDefault(), p(this, J, !0), p(this, vt, r.clientY), p(this, wt, e.scrollTop);
243
243
  const n = /* @__PURE__ */ h((o) => {
244
244
  if (!t(this, J)) return;
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);
245
+ const c = t(this, q).track.getBoundingClientRect(), l = t(this, q).thumb.clientHeight, u = c.height - l, g = o.clientY - t(this, vt), b = e.clientHeight, x = s(), v = Math.max(x - b, 1);
246
246
  if (u > 0 && v > 0) {
247
247
  const A = g / u * v;
248
- let m = t(this, vt) + A;
248
+ let m = t(this, wt) + A;
249
249
  const W = Math.max(0, x - b);
250
250
  m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
251
251
  }
@@ -346,39 +346,41 @@ const $e = class $e extends HTMLElement {
346
346
  thumb: this.querySelector(".ng-scroll-thumb"),
347
347
  top: this.querySelector(".ng-scroll-top"),
348
348
  bottom: this.querySelector(".ng-scroll-bottom")
349
- }), t(this, Nt).call(this), this.refresh();
349
+ }), t(this, Wt).call(this), this.refresh();
350
350
  }, "initWhenReady");
351
351
  e();
352
352
  }
353
353
  };
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
- let le = $e;
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;
358
- const Ie = class Ie {
354
+ F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), q = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), Wt = new WeakMap(), h(Ie, "NineTableVScrollBar");
355
+ let ce = Ie;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ce);
357
+ var D, S, Q, P, H, V, tt, St, Ee, Ae, lt, Ot, Bt, zt, Et, At, Pt, Dt, Rt, Re, ct, qt, jt;
358
+ const _e = class _e {
359
359
  constructor(i) {
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);
367
- d(this, wt, 40);
368
- d(this, Se, !1);
367
+ d(this, St, 40);
369
368
  d(this, Ee, !1);
370
- d(this, Wt, 3);
369
+ d(this, Ae, !1);
370
+ d(this, lt, !1);
371
+ // 🎯 고속 슀크둀 μŠ€λ‘œν‹€λ§μš© ν”Œλž˜κ·Έ
372
+ d(this, Ot, 3);
371
373
  E(this, "refresh", /* @__PURE__ */ h(() => {
372
374
  var e;
373
375
  N.log("rowManager.refresh");
374
376
  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());
377
+ i && (t(this, Et).call(this), t(this, ct).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
378
  }, "refresh"));
377
379
  E(this, "initialize", /* @__PURE__ */ h(() => {
378
380
  N.log("rowManager.initialize"), p(this, Q, {
379
381
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
382
  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) => {
383
+ }), p(this, H, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
382
384
  const o = t(this, S).querySelector(a);
383
385
  if (!o) return;
384
386
  const c = o.querySelector(".ng-part-body table");
@@ -386,34 +388,46 @@ const Ie = class Ie {
386
388
  const l = c.querySelector("tbody.bindable-tbody");
387
389
  if (!l) return;
388
390
  const u = Array.from(l.querySelectorAll("tr")).map((g) => g.cloneNode(!0));
389
- t(this, z).set(a, u);
391
+ t(this, P).set(a, u);
390
392
  });
391
393
  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
- }));
394
+ if (i) {
395
+ t(this, zt).call(this, i), t(this, Rt).call(this), t(this, Et).call(this), t(this, ct).call(this, i.scrollTop);
396
+ let a = !1;
397
+ const o = /* @__PURE__ */ h((c) => {
398
+ if (a) return;
399
+ a = !0;
400
+ const l = c.scrollTop, f = c.scrollLeft;
401
+ i && i.scrollTop !== l && (i.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), n && n.scrollLeft !== f && (n.scrollLeft = f), t(this, ct).call(this, l), a = !1;
402
+ }, "handleContainerScroll");
403
+ [i, e, s].forEach((c) => {
404
+ c && c.addEventListener("scroll", () => {
405
+ t(this, lt) || (p(this, lt, !0), requestAnimationFrame(() => {
406
+ o(c), p(this, lt, !1);
407
+ }));
408
+ });
409
+ });
410
+ }
397
411
  }, "initialize"));
398
- d(this, Ot, /* @__PURE__ */ h((i, e) => {
412
+ d(this, Bt, /* @__PURE__ */ h((i, e) => {
399
413
  N.log("rowManager.#renderRows");
400
- const s = t(this, z).get(e);
414
+ const s = t(this, P).get(e);
401
415
  if (!s || s.length === 0) return;
402
416
  const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
403
417
  if (!r) return;
404
418
  r.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
405
419
  const n = r.querySelector("tr.nodata"), a = document.createDocumentFragment();
406
- for (let o = 0; o < t(this, wt); o++)
420
+ for (let o = 0; o < t(this, St); o++)
407
421
  s.forEach((c) => {
408
422
  a.appendChild(c.cloneNode(!0));
409
423
  });
410
424
  n ? n.before(a) : r.appendChild(a), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
411
425
  }, "#renderRows"));
412
- d(this, Bt, /* @__PURE__ */ h((i) => {
426
+ d(this, zt, /* @__PURE__ */ h((i) => {
413
427
  if (N.log("rowManager.#measureAndCacheHeight"), t(this, H) !== null && t(this, H) > 0)
414
428
  return t(this, H);
415
429
  N.log("#measureAndCacheHeight");
416
- const e = t(this, z).get(".ng-container-body");
430
+ const e = t(this, P).get(".ng-container-body");
417
431
  if (!e || e.length === 0) return 24;
418
432
  const s = i.querySelector("tbody.bindable-tbody");
419
433
  if (!s) return 24;
@@ -428,9 +442,9 @@ const Ie = class Ie {
428
442
  const u = s.querySelectorAll("tr:not(.nodata)");
429
443
  return u.forEach((g) => {
430
444
  f += g.offsetHeight || g.getBoundingClientRect().height;
431
- }), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, p(this, H, f > 0 ? f : 24), t(this, Et).call(this), t(this, H);
445
+ }), u.forEach((g) => g.remove()), a.style.display = o, a.style.visibility = c, a.style.position = l, p(this, H, f > 0 ? f : 24), t(this, At).call(this), t(this, H);
432
446
  }, "#measureAndCacheHeight"));
433
- d(this, St, /* @__PURE__ */ h(() => {
447
+ d(this, Et, /* @__PURE__ */ h(() => {
434
448
  N.log("rowManager.#updateVirtualScrollHeight");
435
449
  const e = (t(this, D).data.get() || []).length, s = t(this, H), r = e * s;
436
450
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
@@ -440,10 +454,10 @@ const Ie = class Ie {
440
454
  o && (o.style.height = `${r}px`);
441
455
  });
442
456
  }, "#updateVirtualScrollHeight"));
443
- d(this, Et, /* @__PURE__ */ h(() => {
457
+ d(this, At, /* @__PURE__ */ h(() => {
444
458
  if (t(this, tt) > 0 && t(this, H) > 0) {
445
459
  const i = Math.ceil(t(this, tt) / t(this, H));
446
- p(this, wt, i + t(this, Wt));
460
+ p(this, St, i + t(this, Ot));
447
461
  }
448
462
  }, "#updateRowCount"));
449
463
  d(this, Pt, /* @__PURE__ */ h(() => {
@@ -473,7 +487,7 @@ const Ie = class Ie {
473
487
  }
474
488
  }
475
489
  }, "#syncRowHeights"));
476
- d(this, zt, /* @__PURE__ */ h(() => {
490
+ d(this, Dt, /* @__PURE__ */ h(() => {
477
491
  !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((i) => {
478
492
  for (const e of i) {
479
493
  const s = e.target;
@@ -484,25 +498,25 @@ const Ie = class Ie {
484
498
  const a = s.querySelector(".ng-part-header"), o = s.querySelector(".ng-part-footer");
485
499
  a && (n += a.offsetHeight), o && (n += o.offsetHeight);
486
500
  const c = Math.max(r - n, 100);
487
- t(this, tt) !== c && (p(this, tt, c), t(this, Et).call(this), t(this, H) !== null && (t(this, At).call(this), this.refresh()));
501
+ t(this, tt) !== c && (p(this, tt, c), t(this, At).call(this), t(this, H) !== null && (t(this, Rt).call(this), this.refresh()));
488
502
  }
489
503
  }
490
504
  })), t(this, V).observe(t(this, S)));
491
505
  }, "#initResizeObserver"));
492
- d(this, At, /* @__PURE__ */ h(() => {
506
+ d(this, Rt, /* @__PURE__ */ h(() => {
493
507
  N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
494
508
  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);
509
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Bt).call(this, e, i);
510
+ }), t(this, jt).call(this), t(this, Pt).call(this);
497
511
  }, "#renderAllContainers"));
498
- d(this, Ae, /* @__PURE__ */ h((i) => {
512
+ d(this, Re, /* @__PURE__ */ h((i) => {
499
513
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
500
514
  var l;
501
515
  const s = t(this, S).querySelector(e);
502
516
  if (!s) return;
503
517
  const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
504
518
  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;
519
+ const n = Array.from(r.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
520
  n.forEach((f, u) => {
507
521
  const g = i + Math.floor(u / a);
508
522
  if (g >= c) {
@@ -510,15 +524,15 @@ const Ie = class Ie {
510
524
  return;
511
525
  }
512
526
  const b = t(this, D).data.get(g);
513
- f.style.display = "", t(this, Rt).call(this, f, b, g);
527
+ f.style.display = "", t(this, qt).call(this, f, b, g);
514
528
  });
515
529
  });
516
530
  }, "#adjustBufferRows"));
517
- d(this, lt, /* @__PURE__ */ h((i) => {
531
+ d(this, ct, /* @__PURE__ */ h((i) => {
518
532
  var l, f;
519
533
  const e = t(this, H);
520
534
  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;
535
+ const s = t(this, D).data.length, r = Math.max(0, Math.floor(i / e)), n = r * 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
536
  (f = t(this, Q)) == null || f.scrollTables.forEach((u) => {
523
537
  u.style.transform = `translate3d(0, ${n}px, 0)`;
524
538
  }), c !== r && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
@@ -533,7 +547,7 @@ const Ie = class Ie {
533
547
  return;
534
548
  }
535
549
  const W = t(this, D).data.get(m);
536
- v.style.display = "", t(this, Rt).call(this, v, W, m);
550
+ v.style.display = "", t(this, qt).call(this, v, W, m);
537
551
  });
538
552
  });
539
553
  }, "#handleScroll"));
@@ -551,14 +565,14 @@ const Ie = class Ie {
551
565
  cell.dataset.row = dataIndex;
552
566
  });
553
567
  }; */
554
- d(this, Rt, /* @__PURE__ */ h((i, e, s) => {
568
+ d(this, qt, /* @__PURE__ */ h((i, e, s) => {
555
569
  i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
556
570
  r.dataset.row = s;
557
571
  const a = Array.from(r.children).find((o) => o.tagName.toLowerCase().startsWith("cell-") || typeof o.refresh == "function");
558
572
  a && typeof a.refresh == "function" && a.refresh();
559
573
  });
560
574
  }, "#bindRowData"));
561
- d(this, Dt, /* @__PURE__ */ h(() => {
575
+ d(this, jt, /* @__PURE__ */ h(() => {
562
576
  var c, l, f;
563
577
  N.log("rowManager.#syncHeaderHeights");
564
578
  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");
@@ -576,24 +590,24 @@ const Ie = class Ie {
576
590
  E(this, "destroy", /* @__PURE__ */ h(() => {
577
591
  t(this, V) && (t(this, V).disconnect(), p(this, V, null));
578
592
  }, "destroy"));
579
- p(this, D, i.getRootNode().host), p(this, S, i), t(this, zt).call(this);
593
+ p(this, D, i.getRootNode().host), p(this, S, i), t(this, Dt).call(this);
580
594
  }
581
595
  getRowHeight() {
582
596
  return t(this, H);
583
597
  }
584
598
  templateLength(i = ".ng-container-body") {
585
599
  var e;
586
- return ((e = t(this, z).get(i)) == null ? void 0 : e.length) || 1;
600
+ return ((e = t(this, P).get(i)) == null ? void 0 : e.length) || 1;
587
601
  }
588
602
  };
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");
590
- let ce = Ie;
591
- const jt = class jt {
603
+ D = new WeakMap(), S = new WeakMap(), Q = new WeakMap(), P = new WeakMap(), H = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), St = new WeakMap(), Ee = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Ot = new WeakMap(), Bt = new WeakMap(), zt = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Pt = new WeakMap(), Dt = new WeakMap(), Rt = new WeakMap(), Re = new WeakMap(), ct = new WeakMap(), qt = new WeakMap(), jt = new WeakMap(), h(_e, "RowManager");
604
+ let he = _e;
605
+ const Ft = class Ft {
592
606
  /**
593
607
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
594
608
  */
595
609
  static compileAll(i) {
596
- return Array.isArray(i) ? i.map((e) => jt.compile(e)) : [];
610
+ return Array.isArray(i) ? i.map((e) => Ft.compile(e)) : [];
597
611
  }
598
612
  /**
599
613
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
@@ -642,8 +656,8 @@ const jt = class jt {
642
656
  }
643
657
  const W = m.rowSpan || 1, C = m.colSpan || 1;
644
658
  for (let B = 0; B < W; B++)
645
- for (let pt = 0; pt < C; pt++)
646
- v + B < u && A + pt < g && (b[v + B][A + pt] = B === 0 && pt === 0 ? "1" : "0");
659
+ for (let yt = 0; yt < C; yt++)
660
+ v + B < u && A + yt < g && (b[v + B][A + yt] = B === 0 && yt === 0 ? "1" : "0");
647
661
  });
648
662
  }), l.forEach((x) => {
649
663
  const v = x.sectionRowIndex;
@@ -665,19 +679,19 @@ const jt = class jt {
665
679
  }
666
680
  // 🎯 [μΆ”κ°€] td/th에 μ„ μ–Έλœ cell-type 속성을 읽어 μ»€μŠ€ν…€ νƒœκ·Έλ‘œ μžλ™ 감싸기
667
681
  };
668
- h(jt, "TableCompiler");
669
- let he = jt;
670
- var Ft, et, st, Vt, Yt, ct, Ut, Xt;
671
- const yt = class yt extends HTMLElement {
682
+ h(Ft, "TableCompiler");
683
+ let de = Ft;
684
+ var Vt, et, st, Yt, Ut, ht, Xt, Kt;
685
+ const mt = class mt extends HTMLElement {
672
686
  constructor() {
673
687
  super();
674
- d(this, Ft);
688
+ d(this, Vt);
675
689
  d(this, et, null);
676
690
  d(this, st);
677
691
  E(this, "invalidate", /* @__PURE__ */ h(() => {
678
692
  t(this, st).refresh();
679
693
  }, "invalidate"));
680
- d(this, Vt, /* @__PURE__ */ h(() => {
694
+ d(this, Yt, /* @__PURE__ */ h(() => {
681
695
  [
682
696
  { selector: ".ng-container-body", type: null },
683
697
  { selector: ".ng-container-left", type: "left" },
@@ -687,18 +701,18 @@ const yt = class yt extends HTMLElement {
687
701
  if (!n) return;
688
702
  n.innerHTML = "";
689
703
  const a = document.createElement("div");
690
- a.className = "ng-part-header", a.appendChild(t(this, ct).call(this, t(this, et), r, "header"));
704
+ a.className = "ng-part-header", a.appendChild(t(this, ht).call(this, t(this, et), r, "header"));
691
705
  const o = document.createElement("div");
692
706
  o.className = "ng-part-body";
693
707
  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"));
708
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ht).call(this, t(this, et), r, "body"));
695
709
  const l = document.createElement("div");
696
710
  l.className = "ng-virtual-spacer", l.style.width = "100%", l.style.pointerEvents = "none", c.appendChild(l), o.appendChild(c);
697
711
  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);
712
+ f.className = "ng-part-footer", f.appendChild(t(this, ht).call(this, t(this, et), r, "footer")), n.appendChild(a), n.appendChild(o), n.appendChild(f);
699
713
  });
700
714
  }, "#renderSplitContainers"));
701
- d(this, Yt, /* @__PURE__ */ h(() => {
715
+ d(this, Ut, /* @__PURE__ */ h(() => {
702
716
  ["left", "right", "body"].forEach((e) => {
703
717
  const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
704
718
  if (!s || !r || r.length === 0) return;
@@ -710,12 +724,12 @@ const yt = class yt extends HTMLElement {
710
724
  });
711
725
  }, "#updateContainerWidths"));
712
726
  E(this, "generate", /* @__PURE__ */ h((e) => {
713
- e && (p(this, et, he.compile(e)), t(this, Vt).call(this), t(this, Yt).call(this), t(this, st).initialize(), setTimeout(() => {
727
+ e && (p(this, et, de.compile(e)), t(this, Yt).call(this), t(this, Ut).call(this), t(this, st).initialize(), setTimeout(() => {
714
728
  var s;
715
729
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
716
730
  }, 0));
717
731
  }, "generate"));
718
- d(this, ct, /* @__PURE__ */ h((e, s, r) => {
732
+ d(this, ht, /* @__PURE__ */ h((e, s, r) => {
719
733
  const n = e.cloneNode(!0), a = n.querySelector("thead"), o = n.querySelector("tbody"), c = n.querySelector("tfoot");
720
734
  if (r === "header") {
721
735
  if (o && o.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -740,11 +754,11 @@ const yt = class yt extends HTMLElement {
740
754
  const s = this.querySelector(".ng-container-body .ng-part-body");
741
755
  s && (s.scrollTop = e);
742
756
  }, "scrollToY"));
743
- d(this, Ut, /* @__PURE__ */ h(() => {
744
- t(this, Xt).call(this);
745
- }, "#init"));
746
757
  d(this, Xt, /* @__PURE__ */ h(() => {
747
- const e = yt.SCROLLBAR_SIZE;
758
+ t(this, Kt).call(this);
759
+ }, "#init"));
760
+ d(this, Kt, /* @__PURE__ */ h(() => {
761
+ const e = mt.SCROLLBAR_SIZE;
748
762
  this.innerHTML = `
749
763
  <style>
750
764
  nine-table-sheet {
@@ -898,31 +912,31 @@ const yt = class yt extends HTMLElement {
898
912
  </div>
899
913
  `;
900
914
  }, "#render"));
901
- p(this, st, new ce(this)), p(this, Ft, this.getRootNode().host);
915
+ p(this, st, new he(this)), p(this, Vt, this.getRootNode().host);
902
916
  }
903
917
  connectedCallback() {
904
- t(this, Ut).call(this);
918
+ t(this, Xt).call(this);
905
919
  }
906
920
  disconnectedCallback() {
907
921
  this.innerHTML = "", N.log("NineTableSheet destroyed.");
908
922
  }
909
923
  };
910
- Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), h(yt, "NineTableSheet"), E(yt, "SCROLLBAR_SIZE", 16);
911
- let $t = yt;
912
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", $t);
913
- var Kt, qt;
914
- const _e = class _e extends HTMLElement {
924
+ Vt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), Ut = new WeakMap(), ht = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), h(mt, "NineTableSheet"), E(mt, "SCROLLBAR_SIZE", 16);
925
+ let It = mt;
926
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
927
+ var Zt, Tt;
928
+ const Ne = class Ne extends HTMLElement {
915
929
  constructor() {
916
930
  super();
917
- d(this, Kt, /* @__PURE__ */ h(() => {
931
+ d(this, Zt, /* @__PURE__ */ h(() => {
918
932
  var e;
919
933
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
920
934
  var a;
921
935
  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);
923
- }), t(this, qt).call(this, 0, !1);
936
+ t(this, Tt).call(this, n, r);
937
+ }), t(this, Tt).call(this, 0, !1);
924
938
  }, "#init"));
925
- d(this, qt, /* @__PURE__ */ h((e, s = !1) => {
939
+ d(this, Tt, /* @__PURE__ */ h((e, s = !1) => {
926
940
  const r = /* @__PURE__ */ h(() => {
927
941
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
928
942
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
@@ -955,30 +969,30 @@ const _e = class _e extends HTMLElement {
955
969
  }, "#switchSheet"));
956
970
  }
957
971
  connectedCallback() {
958
- t(this, Kt).call(this);
972
+ t(this, Zt).call(this);
959
973
  }
960
974
  };
961
- Kt = new WeakMap(), qt = new WeakMap(), h(_e, "NineTableSheets");
962
- let de = _e;
963
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
964
- var M, Zt, Tt, Gt;
965
- const Ne = class Ne {
975
+ Zt = new WeakMap(), Tt = new WeakMap(), h(Ne, "NineTableSheets");
976
+ let fe = Ne;
977
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", fe);
978
+ var M, Gt, kt, Jt;
979
+ const We = class We {
966
980
  constructor(i) {
967
981
  d(this, M);
968
- d(this, Zt, /* @__PURE__ */ h(() => {
969
- t(this, Gt).call(this), new ResizeObserver((i) => {
982
+ d(this, Gt, /* @__PURE__ */ h(() => {
983
+ t(this, Jt).call(this), new ResizeObserver((i) => {
970
984
  for (let e of i)
971
- t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
985
+ t(this, M).getAttribute("auto-height") === "true" && t(this, kt).call(this);
972
986
  }).observe(t(this, M));
973
987
  }, "#init"));
974
- d(this, Tt, /* @__PURE__ */ h(() => {
988
+ d(this, kt, /* @__PURE__ */ h(() => {
975
989
  var c, l;
976
990
  const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
977
991
  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;
992
+ 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 = It.SCROLLBAR_SIZE, o = e * s + r + n + a;
979
993
  t(this, M).style.height = `${o}px`;
980
994
  }, "#applyAutoHeight"));
981
- d(this, Gt, /* @__PURE__ */ h(() => {
995
+ d(this, Jt, /* @__PURE__ */ h(() => {
982
996
  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
997
  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>` : "";
984
998
  return u + g;
@@ -1077,50 +1091,50 @@ const Ne = class Ne {
1077
1091
  const o = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1078
1092
  o == null || o.forEach((c, l) => {
1079
1093
  e[l] && setTimeout(() => {
1080
- c.generate(e[l]), s && t(this, Tt).call(this);
1094
+ c.generate(e[l]), s && t(this, kt).call(this);
1081
1095
  });
1082
1096
  });
1083
1097
  }, "#render"));
1084
- p(this, M, i), t(this, Zt).call(this);
1098
+ p(this, M, i), t(this, Gt).call(this);
1085
1099
  }
1086
1100
  };
1087
- M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1088
- let fe = Ne;
1089
- var kt, ht;
1090
- const We = class We {
1101
+ M = new WeakMap(), Gt = new WeakMap(), kt = new WeakMap(), Jt = new WeakMap(), h(We, "LayoutManager");
1102
+ let ue = We;
1103
+ var Ct, dt;
1104
+ const Oe = class Oe {
1091
1105
  constructor(i) {
1092
- d(this, kt);
1093
- d(this, ht, -1);
1094
- E(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
1095
- p(this, kt, i);
1106
+ d(this, Ct);
1107
+ d(this, dt, -1);
1108
+ E(this, "count", /* @__PURE__ */ h(() => t(this, Ct).rawRecords.length, "count"));
1109
+ p(this, Ct, i);
1096
1110
  }
1097
1111
  get at() {
1098
- return t(this, ht);
1112
+ return t(this, dt);
1099
1113
  }
1100
1114
  set at(i) {
1101
- p(this, ht, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, ht)}"]`) && setTimeout(() => {
1115
+ p(this, dt, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, dt)}"]`) && setTimeout(() => {
1102
1116
  });
1103
1117
  }
1104
1118
  };
1105
- kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1106
- let ue = We;
1107
- var I, T, _, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1119
+ Ct = new WeakMap(), dt = new WeakMap(), h(Oe, "ngRow");
1120
+ let ge = Oe;
1121
+ var I, T, _, ft, Qt, Y, te, it, Lt, ee, se, ut;
1108
1122
  const O = class O {
1109
1123
  constructor(i, e) {
1110
1124
  d(this, I);
1111
1125
  d(this, T);
1112
1126
  d(this, _, []);
1113
- d(this, dt, []);
1114
- d(this, Jt, 0);
1127
+ d(this, ft, []);
1128
+ d(this, Qt, 0);
1115
1129
  d(this, Y, []);
1116
- d(this, Qt, /* @__PURE__ */ h(() => {
1130
+ d(this, te, /* @__PURE__ */ h(() => {
1117
1131
  p(this, Y, []);
1118
1132
  const i = t(this, I).template || [];
1119
1133
  Array.from(i).forEach((e) => {
1120
1134
  var s;
1121
1135
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1122
1136
  }), (t(this, T).rawRecords || []).forEach((e) => {
1123
- e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1137
+ e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
1124
1138
  });
1125
1139
  }, "#initialize"));
1126
1140
  d(this, it, /* @__PURE__ */ h(() => {
@@ -1132,19 +1146,19 @@ const O = class O {
1132
1146
  var n;
1133
1147
  const s = this.getValidData();
1134
1148
  if (!s || s.length <= 0) return;
1135
- if (i == null) return t(this, ft).call(this, s);
1149
+ if (i == null) return t(this, ut).call(this, s);
1136
1150
  if (i < 0 || i >= s.length) return null;
1137
1151
  const r = typeof ((n = t(this, I).fields) == null ? void 0 : n.get) == "function" ? t(this, I).fields.get() : [];
1138
1152
  if (e != null) {
1139
1153
  const a = r.indexOf(e);
1140
1154
  return a >= 0 ? s[i].v[a] : null;
1141
1155
  }
1142
- return t(this, ft).call(this, s[i]);
1156
+ return t(this, ut).call(this, s[i]);
1143
1157
  }, "get"));
1144
1158
  E(this, "set", /* @__PURE__ */ h((i) => {
1145
1159
  this.clear(), this.add(i, !1), t(this, it).call(this);
1146
1160
  }, "set"));
1147
- d(this, Ct, /* @__PURE__ */ h(() => ({
1161
+ d(this, Lt, /* @__PURE__ */ h(() => ({
1148
1162
  rowState: O.ROW_STATE.EMPTY,
1149
1163
  deleted: !1,
1150
1164
  filtered: !1,
@@ -1154,13 +1168,13 @@ const O = class O {
1154
1168
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1155
1169
  }), "#getDefaultMeta"));
1156
1170
  E(this, "reset", /* @__PURE__ */ h(() => {
1157
- p(this, _, []), p(this, dt, []), t(this, it).call(this);
1171
+ p(this, _, []), p(this, ft, []), t(this, it).call(this);
1158
1172
  }, "reset"));
1159
1173
  E(this, "clear", /* @__PURE__ */ h(() => {
1160
1174
  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();
1175
+ t(this, T).rawRecords = [], p(this, _, []), p(this, ft, []), (i = t(this, T).viewRecords) != null && i.reset && t(this, T).viewRecords.reset();
1162
1176
  }, "clear"));
1163
- d(this, te, /* @__PURE__ */ h((i) => {
1177
+ d(this, ee, /* @__PURE__ */ h((i) => {
1164
1178
  var r;
1165
1179
  Array.isArray(i) || (i = [i]);
1166
1180
  const e = typeof ((r = t(this, I).fields) == null ? void 0 : r.get) == "function" ? t(this, I).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -1171,13 +1185,13 @@ const O = class O {
1171
1185
  }), s.push(a);
1172
1186
  }), s;
1173
1187
  }, "#json2Array"));
1174
- d(this, ee, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1175
- 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;
1188
+ d(this, se, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1189
+ e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = O.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1176
1190
  }), i), "#defaultInsert"));
1177
1191
  E(this, "add", /* @__PURE__ */ h((i, e = !0) => {
1178
1192
  i === void 0 && (i = {});
1179
- const s = t(this, te).call(this, i);
1180
- t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1193
+ const s = t(this, ee).call(this, i);
1194
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, se).call(this, s)), this.resetRecords();
1181
1195
  const r = this.count() - 1;
1182
1196
  return e || s.forEach((n, a) => {
1183
1197
  const o = t(this, T).rawRecords[r - a];
@@ -1206,14 +1220,14 @@ const O = class O {
1206
1220
  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
1221
  }, "setValue"));
1208
1222
  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) => {
1223
+ p(this, ft, 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
1224
  i.__ng.rowidx = e;
1211
1225
  }), t(this, _).forEach((i, e) => {
1212
1226
  i.__ng.i = e;
1213
1227
  });
1214
1228
  }, "resetRecords"));
1215
1229
  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) => {
1230
+ d(this, ut, /* @__PURE__ */ h((i) => {
1217
1231
  var a;
1218
1232
  if (!i) return i;
1219
1233
  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) => {
@@ -1225,16 +1239,16 @@ const O = class O {
1225
1239
  return e ? n[0] : n;
1226
1240
  }, "#conv"));
1227
1241
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1228
- p(this, I, i), p(this, T, e), t(this, Qt).call(this);
1242
+ p(this, I, i), p(this, T, e), t(this, te).call(this);
1229
1243
  }
1230
1244
  get source() {
1231
- return t(this, ft).call(this, t(this, T).rawRecords);
1245
+ return t(this, ut).call(this, t(this, T).rawRecords);
1232
1246
  }
1233
1247
  set source(i) {
1234
1248
  this.clear(), this.add(i, !1);
1235
1249
  }
1236
1250
  get nextId() {
1237
- return ++Ue(this, Jt)._;
1251
+ return ++Xe(this, Qt)._;
1238
1252
  }
1239
1253
  get count() {
1240
1254
  return t(this, _).length;
@@ -1246,7 +1260,7 @@ const O = class O {
1246
1260
  return this.length;
1247
1261
  }
1248
1262
  };
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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1263
+ I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), ft = new WeakMap(), Qt = new WeakMap(), Y = new WeakMap(), te = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ut = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1250
1264
  E(O, "ROW_STATE", {
1251
1265
  EMPTY: "EMPTY",
1252
1266
  NORMAL: "NORMAL",
@@ -1254,12 +1268,12 @@ E(O, "ROW_STATE", {
1254
1268
  UPDATE: "UPDATE",
1255
1269
  DELETE: "DELETE"
1256
1270
  });
1257
- let ge = O;
1271
+ let be = O;
1258
1272
  var rt;
1259
- const Oe = class Oe {
1273
+ const Be = class Be {
1260
1274
  constructor(i) {
1261
1275
  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 = () => {
1276
+ p(this, rt, i), this.row = new ge(this), this.data = new be(t(this, rt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1263
1277
  var e;
1264
1278
  (e = t(this, rt).view) != null && e.redraw && t(this, rt).view.redraw();
1265
1279
  }, this.setDataSource = (e) => {
@@ -1276,28 +1290,28 @@ const Oe = class Oe {
1276
1290
  }, this.setDataSource([]);
1277
1291
  }
1278
1292
  };
1279
- rt = new WeakMap(), h(Oe, "ngDataManager");
1280
- let be = Oe;
1281
- var ut, L, Lt, se;
1282
- const Be = class Be {
1293
+ rt = new WeakMap(), h(Be, "ngDataManager");
1294
+ let pe = Be;
1295
+ var gt, L, Ht, ie;
1296
+ const ze = class ze {
1283
1297
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1284
1298
  constructor(i) {
1285
- d(this, ut);
1299
+ d(this, gt);
1286
1300
  d(this, L, []);
1287
1301
  E(this, "add", /* @__PURE__ */ h((i, e = "string") => {
1288
1302
  i.forEach((s) => {
1289
1303
  t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
1290
- }), t(this, Lt).call(this);
1304
+ }), t(this, Ht).call(this);
1291
1305
  }, "add"));
1292
- d(this, Lt, /* @__PURE__ */ h(() => {
1306
+ d(this, Ht, /* @__PURE__ */ h(() => {
1293
1307
  const i = /* @__PURE__ */ new Map();
1294
1308
  t(this, L).forEach((e) => {
1295
1309
  i.set(e.name, e.type);
1296
1310
  }), 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);
1297
1311
  }, "#adjust"));
1298
- d(this, se, /* @__PURE__ */ h(() => {
1299
- p(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1300
- const i = Array.from(t(this, ut).querySelectorAll("table"));
1312
+ d(this, ie, /* @__PURE__ */ h(() => {
1313
+ p(this, L, []), N.log(t(this, gt).querySelectorAll("table"));
1314
+ const i = Array.from(t(this, gt).querySelectorAll("table"));
1301
1315
  if (!(!i || i.length === 0)) {
1302
1316
  for (const e of i)
1303
1317
  N.log(e), $("[data-bind]", e).each((s, r) => {
@@ -1324,10 +1338,10 @@ const Be = class Be {
1324
1338
  });
1325
1339
  });
1326
1340
  });
1327
- t(this, Lt).call(this);
1341
+ t(this, Ht).call(this);
1328
1342
  }
1329
1343
  }, "#init"));
1330
- p(this, ut, i), t(this, se).call(this);
1344
+ p(this, gt, i), t(this, ie).call(this);
1331
1345
  }
1332
1346
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1333
1347
  get() {
@@ -1349,22 +1363,22 @@ const Be = class Be {
1349
1363
  return t(this, L).some((e) => e.name === i);
1350
1364
  }
1351
1365
  };
1352
- ut = new WeakMap(), L = new WeakMap(), Lt = new WeakMap(), se = new WeakMap(), h(Be, "ngFields");
1353
- let pe = Be;
1354
- var nt, ie, re;
1366
+ gt = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), ie = new WeakMap(), h(ze, "ngFields");
1367
+ let ye = ze;
1368
+ var nt, re, ne;
1355
1369
  const Pe = class Pe extends HTMLElement {
1356
1370
  constructor() {
1357
1371
  super();
1358
1372
  //#created = false;
1359
1373
  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 } }));
1374
+ d(this, re);
1375
+ d(this, ne, /* @__PURE__ */ h(() => {
1376
+ this.fields = new ye(this), p(this, re, new ue(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1363
1377
  }, "#init"));
1364
- this.attachShadow({ mode: "open" }), p(this, nt, new be(this));
1378
+ this.attachShadow({ mode: "open" }), p(this, nt, new pe(this));
1365
1379
  }
1366
1380
  connectedCallback() {
1367
- t(this, re).call(this);
1381
+ t(this, ne).call(this);
1368
1382
  }
1369
1383
  disconnectedCallback() {
1370
1384
  N.log("NineTable disconnected.");
@@ -1382,10 +1396,10 @@ const Pe = class Pe extends HTMLElement {
1382
1396
  return t(this, nt);
1383
1397
  }
1384
1398
  };
1385
- nt = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), h(Pe, "NineTable");
1386
- let ye = Pe;
1387
- customElements.get("nine-table") || customElements.define("nine-table", ye);
1388
- const mt = class mt extends HTMLElement {
1399
+ nt = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), h(Pe, "NineTable");
1400
+ let me = Pe;
1401
+ customElements.get("nine-table") || customElements.define("nine-table", me);
1402
+ const xt = class xt extends HTMLElement {
1389
1403
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1390
1404
  constructor() {
1391
1405
  super();
@@ -1396,19 +1410,19 @@ const mt = class mt extends HTMLElement {
1396
1410
  connectedCallback() {
1397
1411
  }
1398
1412
  };
1399
- h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1400
- let me = mt;
1401
- var k, Ht, y, Re, qe, Te, ke, Ce;
1402
- const ze = class ze extends me {
1413
+ h(xt, "BasicCellElement"), E(xt, "_styleCache", /* @__PURE__ */ new Map()), E(xt, "_customStyleCache", /* @__PURE__ */ new Map());
1414
+ let xe = xt;
1415
+ var k, Mt, y, qe, Te, ke, Ce, Le;
1416
+ const De = class De extends xe {
1403
1417
  constructor() {
1404
1418
  super();
1405
1419
  d(this, k);
1406
- d(this, Ht);
1420
+ d(this, Mt);
1407
1421
  d(this, y);
1408
- d(this, Re);
1409
1422
  d(this, qe);
1410
1423
  d(this, Te);
1411
1424
  d(this, ke);
1425
+ d(this, Ce);
1412
1426
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1413
1427
  if (t(this, y))
1414
1428
  if (t(this, y).closest("tbody")) {
@@ -1429,7 +1443,7 @@ const ze = class ze extends me {
1429
1443
  } catch {
1430
1444
  }
1431
1445
  }, "getDisplayText"));
1432
- d(this, Ce, /* @__PURE__ */ h(() => {
1446
+ d(this, Le, /* @__PURE__ */ h(() => {
1433
1447
  if (!(!t(this, k) || !t(this, k).template || !t(this, y).closest("tbody.bindable"))) {
1434
1448
  var e = ninegrid.j.querySelectorAll(t(this, y)).attr("suppress");
1435
1449
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
@@ -1472,7 +1486,7 @@ const ze = class ze extends me {
1472
1486
  }, "getExprValue"));
1473
1487
  }
1474
1488
  connectedCallback() {
1475
- super.connectedCallback(), p(this, k, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, Ht, t(this, y).closest("tr"));
1489
+ super.connectedCallback(), p(this, k, this.getRootNode().host), p(this, y, this.closest("th,td")), p(this, Mt, t(this, y).closest("tr"));
1476
1490
  }
1477
1491
  get value() {
1478
1492
  var e = !t(this, k) || !t(this, k).dataManager || !t(this, y) || !t(this, y).dataset || !t(this, y).dataset.row || !t(this, y).dataset.bind ? "" : t(this, y).closest("tr").data[t(this, y).dataset.bind];
@@ -1491,12 +1505,12 @@ const ze = class ze extends me {
1491
1505
  }
1492
1506
  refresh() {
1493
1507
  const e = t(this, y).dataset.bind;
1494
- return parseInt(t(this, y).dataset.row), t(this, Ht).data[e];
1508
+ return parseInt(t(this, y).dataset.row), t(this, Mt).data[e];
1495
1509
  }
1496
1510
  };
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;
1499
- const De = class De extends xe {
1511
+ k = new WeakMap(), Mt = new WeakMap(), y = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), Le = new WeakMap(), h(De, "CellElement");
1512
+ let ve = De;
1513
+ const je = class je extends ve {
1500
1514
  constructor() {
1501
1515
  super();
1502
1516
  }
@@ -1507,21 +1521,21 @@ const De = class De extends xe {
1507
1521
  return super.refresh();
1508
1522
  }
1509
1523
  };
1510
- h(De, "EditableCellElement");
1511
- let ve = De;
1512
- var Mt, ot, gt, bt, ne, U, Le;
1513
- const je = class je extends ve {
1524
+ h(je, "EditableCellElement");
1525
+ let we = je;
1526
+ var $t, ot, bt, pt, oe, U, He;
1527
+ const Fe = class Fe extends we {
1514
1528
  constructor() {
1515
1529
  super();
1516
- d(this, Mt);
1530
+ d(this, $t);
1517
1531
  d(this, ot);
1518
- d(this, gt);
1519
1532
  d(this, bt);
1520
- d(this, ne);
1533
+ d(this, pt);
1534
+ d(this, oe);
1521
1535
  d(this, U);
1522
1536
  E(this, "refresh", /* @__PURE__ */ h(() => {
1523
1537
  const e = super.refresh();
1524
- t(this, Mt).value = e;
1538
+ t(this, $t).value = e;
1525
1539
  }, "refresh"));
1526
1540
  /**
1527
1541
  dataRefresh = (v) => {
@@ -1553,11 +1567,11 @@ const je = class je extends ve {
1553
1567
  if (!v) this.reset();
1554
1568
  };
1555
1569
  */
1556
- d(this, Le, /* @__PURE__ */ h((e) => {
1570
+ d(this, He, /* @__PURE__ */ h((e) => {
1557
1571
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1558
1572
  if (t(this, ot) == "number") {
1559
1573
  let n = [];
1560
- 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) {
1574
+ if (t(this, U) && Number(t(this, U)) > 0 && n.push("."), t(this, pt) && Number(t(this, pt)) >= 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
1575
  var s = e.target.value, r = s.indexOf(".");
1562
1576
  if (r >= 0) {
1563
1577
  var s = s.substr(r + 1, s.length);
@@ -1565,10 +1579,10 @@ const je = class je extends ve {
1565
1579
  }
1566
1580
  }
1567
1581
  }
1568
- t(this, gt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, gt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1582
+ t(this, bt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, bt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1569
1583
  }
1570
1584
  }, "#onKeyDown"));
1571
- if (this.applyBaseStyle(), p(this, ot, this.getAttribute("type") || "text"), p(this, gt, this.getAttribute("maxbyte")), p(this, bt, this.getAttribute("min")), p(this, ne, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
1585
+ if (this.applyBaseStyle(), p(this, ot, this.getAttribute("type") || "text"), p(this, bt, this.getAttribute("maxbyte")), p(this, pt, this.getAttribute("min")), p(this, oe, this.getAttribute("max")), p(this, U, this.getAttribute("scale")), !["text", "number"].includes(t(this, ot))) throw `invalid type : ${t(this, ot)}`;
1572
1586
  }
1573
1587
  connectedCallback() {
1574
1588
  for (var e = [], s = 0; s < this.attributes.length; s++)
@@ -1578,11 +1592,11 @@ const je = class je extends ve {
1578
1592
  ${e.join(" ")}
1579
1593
  ondragstart="return false;"
1580
1594
  >
1581
- `, super.connectedCallback(), p(this, Mt, this.querySelector("input"));
1595
+ `, super.connectedCallback(), p(this, $t, this.querySelector("input"));
1582
1596
  }
1583
1597
  };
1584
- Mt = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), h(je, "CellInputText");
1585
- let we = je;
1598
+ $t = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), pt = new WeakMap(), oe = new WeakMap(), U = new WeakMap(), He = new WeakMap(), h(Fe, "CellInputText");
1599
+ let Se = Fe;
1586
1600
  customElements.get("cell-input-text");
1587
- customElements.get("cell-input") || customElements.define("cell-input", we);
1601
+ customElements.get("cell-input") || customElements.define("cell-input", Se);
1588
1602
  //# sourceMappingURL=nine-table.js.map