@ninebone/table 0.0.329 β†’ 0.0.331

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,113 +1,113 @@
1
- var se = Object.defineProperty;
2
- var ne = (x) => {
1
+ var ne = Object.defineProperty;
2
+ var oe = (x) => {
3
3
  throw TypeError(x);
4
4
  };
5
- var le = (x, i, e) => i in x ? se(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
- var c = (x, i) => se(x, "name", { value: i, configurable: !0 });
7
- var w = (x, i, e) => le(x, typeof i != "symbol" ? i + "" : i, e), oe = (x, i, e) => i.has(x) || ne("Cannot " + e);
8
- var t = (x, i, e) => (oe(x, i, "read from private field"), e ? e.call(x) : i.get(x)), h = (x, i, e) => i.has(x) ? ne("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (oe(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
- var re = (x, i, e, s) => ({
10
- set _(o) {
11
- g(x, i, o, e);
5
+ var ae = (x, i, e) => i in x ? ne(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
+ var a = (x, i) => ne(x, "name", { value: i, configurable: !0 });
7
+ var v = (x, i, e) => ae(x, typeof i != "symbol" ? i + "" : i, e), re = (x, i, e) => i.has(x) || oe("Cannot " + e);
8
+ var t = (x, i, e) => (re(x, i, "read from private field"), e ? e.call(x) : i.get(x)), c = (x, i, e) => i.has(x) ? oe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (re(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
+ var le = (x, i, e, s) => ({
10
+ set _(n) {
11
+ g(x, i, n, e);
12
12
  },
13
13
  get _() {
14
14
  return t(x, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as ce } from "@ninebone/util";
18
- const Ft = class Ft extends ce.constructor {
18
+ const Kt = class Kt extends ce.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- c(Ft, "Trace");
24
- let Wt = Ft;
25
- const z = new Wt();
26
- var C, M, y, D, N, B, ut, P, bt;
27
- const Kt = class Kt extends HTMLElement {
23
+ a(Kt, "Trace");
24
+ let zt = Kt;
25
+ const K = new zt();
26
+ var C, M, y, O, D, N, bt, B, gt;
27
+ const jt = class jt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- h(this, C);
31
- h(this, M, !1);
32
- h(this, y);
33
- h(this, D);
34
- h(this, N);
35
- h(this, B);
36
- h(this, ut, /* @__PURE__ */ c(() => {
30
+ c(this, C);
31
+ c(this, M, !1);
32
+ c(this, y);
33
+ c(this, O);
34
+ c(this, D);
35
+ c(this, N);
36
+ c(this, bt, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, C)) return;
38
38
  const e = t(this, C).querySelector(".ng-container-body");
39
- e && (g(this, B, new ResizeObserver(() => {
39
+ e && (g(this, N, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, B).observe(e));
41
+ })), t(this, N).observe(e));
42
42
  }, "#observeResize"));
43
- w(this, "refresh", /* @__PURE__ */ c(() => {
43
+ v(this, "refresh", /* @__PURE__ */ a(() => {
44
44
  if (!t(this, C) || !t(this, y) || t(this, M)) return;
45
45
  const e = t(this, y).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const o = t(this, y).track, r = t(this, y).thumb, n = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
48
- if (l !== 0 && a > l)
49
- n && (n.style.display = "flex");
47
+ const n = t(this, y).track, r = t(this, y).thumb, o = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
+ if (l !== 0 && h > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- n && (n.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const d = o.clientWidth;
54
+ const d = n.clientWidth;
55
55
  if (d <= 0) return;
56
- const f = Math.max(Math.min(d * (l / a), d), 20);
56
+ const f = Math.max(Math.min(d * (l / h), d), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, b = a - l;
58
+ const u = e.scrollLeft, b = h - l;
59
59
  let p = 0;
60
60
  b > 0 && (p = parseInt(u / b * (d - f), 10)), p < 0 && (p = 0);
61
- const E = d - f;
62
- p > E && (p = E), r.style.left = `${p}px`, z.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
61
+ const S = d - f;
62
+ p > S && (p = S), r.style.left = `${p}px`, K.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= S - 1;
63
63
  }, "refresh"));
64
- h(this, P, /* @__PURE__ */ c((e) => {
64
+ c(this, B, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, y)) return !1;
66
- const s = t(this, y).container, o = s.querySelector("table");
67
- if (!o) return !1;
68
- const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
66
+ const s = t(this, y).container, n = s.querySelector("table");
67
+ if (!n) return !1;
68
+ const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const a = r.width - n;
72
- l > a && (l = a), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= a - 1;
73
- const d = s.clientWidth, u = o.scrollWidth - d;
74
- return a > 0 && u > 0 && (s.scrollLeft = l / a * u), l > 0 && l < a - 1;
71
+ const h = r.width - o;
72
+ l > h && (l = h), l = parseInt(l, 10), t(this, y).thumb.style.left = `${l}px`, t(this, y).left.disabled = l === 0, t(this, y).right.disabled = l >= h - 1;
73
+ const d = s.clientWidth, u = n.scrollWidth - d;
74
+ return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, bt, /* @__PURE__ */ c(() => {
77
- const e = /* @__PURE__ */ c((o) => {
78
- clearInterval(t(this, D)), clearInterval(t(this, N));
76
+ c(this, gt, /* @__PURE__ */ a(() => {
77
+ const e = /* @__PURE__ */ a((n) => {
78
+ clearInterval(t(this, O)), clearInterval(t(this, D));
79
79
  const r = parseInt(t(this, y).thumb.style.left || 0, 10);
80
- t(this, P).call(this, r + o), g(this, D, setInterval(() => {
81
- clearInterval(t(this, D)), g(this, N, setInterval(() => {
82
- const n = parseInt(t(this, y).thumb.style.left || 0, 10);
83
- t(this, P).call(this, n + o) || clearInterval(t(this, N));
80
+ t(this, B).call(this, r + n), g(this, O, setInterval(() => {
81
+ clearInterval(t(this, O)), g(this, D, setInterval(() => {
82
+ const o = parseInt(t(this, y).thumb.style.left || 0, 10);
83
+ t(this, B).call(this, o + n) || clearInterval(t(this, D));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
- clearInterval(t(this, D)), clearInterval(t(this, N));
86
+ }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
+ clearInterval(t(this, O)), clearInterval(t(this, D));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, y).left.addEventListener(o, s), t(this, y).right.addEventListener(o, s), t(this, y).track.addEventListener(o, s);
91
- }), t(this, y).left.addEventListener("mousedown", (o) => {
92
- o.button === 0 && e(-20);
93
- }), t(this, y).right.addEventListener("mousedown", (o) => {
94
- o.button === 0 && e(20);
95
- }), t(this, y).left.addEventListener("touchstart", () => e(-20)), t(this, y).right.addEventListener("touchstart", () => e(20)), t(this, y).track.addEventListener("mousedown", (o) => {
96
- if (o.button !== 0) return;
97
- o.preventDefault();
98
- const r = t(this, y).track.getBoundingClientRect(), n = t(this, y).thumb.clientWidth;
99
- t(this, P).call(this, o.clientX - r.left - n / 2);
100
- }), t(this, y).thumb.addEventListener("mousedown", (o) => {
101
- if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), g(this, M, !0), this.shiftX = o.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
- const r = /* @__PURE__ */ c((l) => {
89
+ ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
+ t(this, y).left.addEventListener(n, s), t(this, y).right.addEventListener(n, s), t(this, y).track.addEventListener(n, s);
91
+ }), t(this, y).left.addEventListener("mousedown", (n) => {
92
+ n.button === 0 && e(-20);
93
+ }), t(this, y).right.addEventListener("mousedown", (n) => {
94
+ n.button === 0 && e(20);
95
+ }), t(this, y).left.addEventListener("touchstart", () => e(-20)), t(this, y).right.addEventListener("touchstart", () => e(20)), t(this, y).track.addEventListener("mousedown", (n) => {
96
+ if (n.button !== 0) return;
97
+ n.preventDefault();
98
+ const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
99
+ t(this, B).call(this, n.clientX - r.left - o / 2);
100
+ }), t(this, y).thumb.addEventListener("mousedown", (n) => {
101
+ if (n.button !== 0) return;
102
+ n.stopPropagation(), n.preventDefault(), g(this, M, !0), this.shiftX = n.clientX - t(this, y).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ a((l) => {
104
104
  if (!t(this, M)) return;
105
- const a = t(this, y).track.getBoundingClientRect();
106
- t(this, P).call(this, l.clientX - a.left - this.shiftX);
107
- }, "onMouseMove"), n = /* @__PURE__ */ c(() => {
108
- g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
105
+ const h = t(this, y).track.getBoundingClientRect();
106
+ t(this, B).call(this, l.clientX - h.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
108
+ g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -176,7 +176,7 @@ const Kt = class Kt extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ c(() => {
179
+ const e = /* @__PURE__ */ a(() => {
180
180
  const s = t(this, C).querySelector(".ng-container-body");
181
181
  if (!s) {
182
182
  setTimeout(e, 10);
@@ -190,87 +190,87 @@ const Kt = class Kt extends HTMLElement {
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
192
  t(this, M) || this.refresh();
193
- }), t(this, bt).call(this), t(this, ut).call(this), this.refresh();
193
+ }), t(this, gt).call(this), t(this, bt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, B) && t(this, B).disconnect();
198
+ t(this, N) && t(this, N).disconnect();
199
199
  }
200
200
  };
201
- C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), D = new WeakMap(), N = new WeakMap(), B = new WeakMap(), ut = new WeakMap(), P = new WeakMap(), bt = new WeakMap(), c(Kt, "NineTableHScrollBar");
202
- let zt = Kt;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", zt);
204
- var Y, I, S, it, st, gt;
205
- const jt = class jt extends HTMLElement {
201
+ C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), O = new WeakMap(), D = new WeakMap(), N = new WeakMap(), bt = new WeakMap(), B = new WeakMap(), gt = new WeakMap(), a(jt, "NineTableHScrollBar");
202
+ let Ot = jt;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ot);
204
+ var P, I, w, st, nt, yt;
205
+ const Zt = class Zt extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- h(this, Y);
209
- h(this, I, !1);
210
- h(this, S);
211
- h(this, it, 0);
212
- h(this, st, 0);
208
+ c(this, P);
209
+ c(this, I, !1);
210
+ c(this, w);
211
+ c(this, st, 0);
212
+ c(this, nt, 0);
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- w(this, "refresh", /* @__PURE__ */ c(() => {
217
- if (!t(this, Y) || !t(this, S) || t(this, I)) return;
218
- const e = t(this, S).container, s = e.querySelector("table");
216
+ v(this, "refresh", /* @__PURE__ */ a(() => {
217
+ if (!t(this, P) || !t(this, w) || t(this, I)) return;
218
+ const e = t(this, w).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const o = t(this, S).track, r = t(this, S).thumb, n = e.clientHeight, l = s.scrollHeight;
221
- if (l <= n) {
222
- r.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
220
+ const n = t(this, w).track, r = t(this, w).thumb, o = e.clientHeight, l = s.scrollHeight;
221
+ if (l <= o) {
222
+ r.style.display = "none", t(this, w).top.disabled = !0, t(this, w).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
225
  r.style.display = "block";
226
- const a = o.clientHeight;
227
- if (a <= 0) return;
228
- const d = Math.max(Math.min(a * (n / l), a), 20);
226
+ const h = n.clientHeight;
227
+ if (h <= 0) return;
228
+ const d = Math.max(Math.min(h * (o / l), h), 20);
229
229
  r.style.height = `${d}px`;
230
- const f = e.scrollTop, u = l - n;
230
+ const f = e.scrollTop, u = l - o;
231
231
  let b = 0;
232
- u > 0 && (b = f / u * (a - d));
233
- const p = a - d;
234
- b < 0 && (b = 0), b > p && (b = p), r.style.top = `${b}px`, t(this, S).top.disabled = f <= 0, t(this, S).bottom.disabled = f >= u - 1;
232
+ u > 0 && (b = f / u * (h - d));
233
+ const p = h - d;
234
+ b < 0 && (b = 0), b > p && (b = p), r.style.top = `${b}px`, t(this, w).top.disabled = f <= 0, t(this, w).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
- h(this, gt, /* @__PURE__ */ c(() => {
237
- const e = t(this, S).container;
236
+ c(this, yt, /* @__PURE__ */ a(() => {
237
+ const e = t(this, w).container;
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, I) || this.refresh();
240
- }), t(this, S).thumb.addEventListener("mousedown", (s) => {
240
+ }), t(this, w).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, it, s.clientY), g(this, st, e.scrollTop);
243
- const o = /* @__PURE__ */ c((n) => {
242
+ s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, st, s.clientY), g(this, nt, e.scrollTop);
243
+ const n = /* @__PURE__ */ a((o) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = n.clientY - t(this, it), b = e.clientHeight, p = e.querySelector("table");
246
- z.log(p), z.log(p.scrollHeight);
245
+ const l = t(this, w).track.getBoundingClientRect(), h = t(this, w).thumb.clientHeight, f = l.height - h, u = o.clientY - t(this, st), b = e.clientHeight, p = e.querySelector("table");
246
+ K.log(p), K.log(p.scrollHeight);
247
247
  const q = p.scrollHeight - b;
248
248
  if (f > 0 && q > 0) {
249
- const O = u / f * q;
250
- e.scrollTop = t(this, st) + O;
249
+ const z = u / f * q;
250
+ e.scrollTop = t(this, nt) + z;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
254
- g(this, I, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
253
+ }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
254
+ g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
257
- }), t(this, S).track.addEventListener("mousedown", (s) => {
258
- if (s.button !== 0 || s.target === t(this, S).thumb) return;
259
- const o = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, n = s.clientY - o.top - r / 2, a = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
- if (a > 0 && u > 0) {
261
- const b = Math.max(0, Math.min(1, n / a));
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
257
+ }), t(this, w).track.addEventListener("mousedown", (s) => {
258
+ if (s.button !== 0 || s.target === t(this, w).thumb) return;
259
+ const n = t(this, w).track.getBoundingClientRect(), r = t(this, w).thumb.clientHeight, o = s.clientY - n.top - r / 2, h = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
+ if (h > 0 && u > 0) {
261
+ const b = Math.max(0, Math.min(1, o / h));
262
262
  e.scrollTop = b * u;
263
263
  }
264
264
  this.refresh();
265
- }), t(this, S).top.addEventListener("click", () => {
265
+ }), t(this, w).top.addEventListener("click", () => {
266
266
  e.scrollTop -= 40;
267
- }), t(this, S).bottom.addEventListener("click", () => {
267
+ }), t(this, w).bottom.addEventListener("click", () => {
268
268
  e.scrollTop += 40;
269
269
  });
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- if (g(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
273
+ if (g(this, P, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, P)) return;
274
274
  this.innerHTML = `
275
275
  <style>
276
276
  nine-table-vscrollbar {
@@ -334,27 +334,27 @@ const jt = class jt extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ c(() => {
338
- const s = t(this, Y).querySelector(".ng-container-body");
337
+ const e = /* @__PURE__ */ a(() => {
338
+ const s = t(this, P).querySelector(".ng-container-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
341
341
  return;
342
342
  }
343
- g(this, S, {
343
+ g(this, w, {
344
344
  container: s,
345
345
  track: this.querySelector(".ng-scroll-track"),
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, gt).call(this), this.refresh();
349
+ }), t(this, yt).call(this), this.refresh();
350
350
  }, "initWhenReady");
351
351
  e();
352
352
  }
353
353
  };
354
- Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), gt = new WeakMap(), c(jt, "NineTableVScrollBar");
355
- let Ot = jt;
356
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ot);
357
- var yt, F;
354
+ P = new WeakMap(), I = new WeakMap(), w = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), yt = new WeakMap(), a(Zt, "NineTableVScrollBar");
355
+ let Dt = Zt;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Dt);
357
+ var pt, j;
358
358
  const H = class H {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
@@ -366,56 +366,56 @@ const H = class H {
366
366
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
367
367
  */
368
368
  static compile(i) {
369
- var o, r, n, l;
369
+ var n, r, o, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(o = H, yt).call(o, e), t(r = H, F).call(r, e, "thead"), t(n = H, F).call(n, e, "tbody"), t(l = H, F).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
373
- const f = a.getAttribute("fixed");
372
+ return t(n = H, pt).call(n, e), t(r = H, j).call(r, e, "thead"), t(o = H, j).call(o, e, "tbody"), t(l = H, j).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
373
+ const f = h.getAttribute("fixed");
374
374
  f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
375
  u.setAttribute("fixed", f);
376
376
  });
377
377
  }), e;
378
378
  }
379
379
  };
380
- yt = new WeakMap(), F = new WeakMap(), c(H, "TableCompiler"), h(H, yt, /* @__PURE__ */ c((i) => {
380
+ pt = new WeakMap(), j = new WeakMap(), a(H, "TableCompiler"), c(H, pt, /* @__PURE__ */ a((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
- for (let n = 0; n < s; n++) {
382
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
+ for (let o = 0; o < s; o++) {
384
384
  const l = document.createElement("col");
385
- l.setAttribute("width", r), o.appendChild(l);
385
+ l.setAttribute("width", r), n.appendChild(l);
386
386
  }
387
- i.prepend(o);
387
+ i.prepend(n);
388
388
  }
389
389
  if (!i.querySelector("thead")) {
390
390
  const e = document.createElement("thead"), s = i.querySelector("colgroup");
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), h(H, F, /* @__PURE__ */ c((i, e) => {
395
- const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
- if (r === 0 || o.length === 0) return;
397
- let n = 0;
398
- o.forEach((a) => {
399
- n += a.colSpan || 1;
394
+ }, "#ensureTableStructure")), c(H, j, /* @__PURE__ */ a((i, e) => {
395
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
+ if (r === 0 || n.length === 0) return;
397
+ let o = 0;
398
+ n.forEach((h) => {
399
+ o += h.colSpan || 1;
400
400
  });
401
- const l = Array.from(Array(r), () => Array(n).fill(null));
402
- s.forEach((a) => {
403
- const d = a.sectionRowIndex;
401
+ const l = Array.from(Array(r), () => Array(o).fill(null));
402
+ s.forEach((h) => {
403
+ const d = h.sectionRowIndex;
404
404
  let f = 0;
405
- Array.from(a.querySelectorAll("th,td")).forEach((u) => {
406
- for (let E = 0; E < l[d].length; E++)
407
- if (l[d][E] === null) {
408
- f = E;
405
+ Array.from(h.querySelectorAll("th,td")).forEach((u) => {
406
+ for (let S = 0; S < l[d].length; S++)
407
+ if (l[d][S] === null) {
408
+ f = S;
409
409
  break;
410
410
  }
411
411
  const b = u.rowSpan || 1, p = u.colSpan || 1;
412
- for (let E = 0; E < b; E++)
412
+ for (let S = 0; S < b; S++)
413
413
  for (let q = 0; q < p; q++)
414
- d + E < r && f + q < n && (l[d + E][f + q] = E === 0 && q === 0 ? "1" : "0");
414
+ d + S < r && f + q < o && (l[d + S][f + q] = S === 0 && q === 0 ? "1" : "0");
415
415
  });
416
- }), s.forEach((a) => {
417
- const d = a.sectionRowIndex;
418
- Array.from(a.querySelectorAll("th,td")).forEach((f) => {
416
+ }), s.forEach((h) => {
417
+ const d = h.sectionRowIndex;
418
+ Array.from(h.querySelectorAll("th,td")).forEach((f) => {
419
419
  for (let u = 0; u < l[d].length; u++)
420
420
  if (l[d][u] === "1") {
421
421
  f.dataset.col = u, l[d][u] = "0";
@@ -424,61 +424,61 @@ yt = new WeakMap(), F = new WeakMap(), c(H, "TableCompiler"), h(H, yt, /* @__PUR
424
424
  });
425
425
  });
426
426
  }, "#resetColIndex"));
427
- let Dt = H;
428
- var nt, m, _, R, $, V, K, pt, mt, ot, rt, xt, vt, lt, j, wt;
429
- const Zt = class Zt {
427
+ let Nt = H;
428
+ var ot, m, _, R, $, Y, Z, mt, xt, rt, lt, vt, wt, at, G, St;
429
+ const Gt = class Gt {
430
430
  constructor(i) {
431
- h(this, nt);
432
- h(this, m);
433
- h(this, _, /* @__PURE__ */ new Map());
434
- h(this, R, null);
435
- h(this, $, null);
436
- h(this, V, 0);
437
- h(this, K, 40);
438
- w(this, "refresh", /* @__PURE__ */ c(() => {
431
+ c(this, ot);
432
+ c(this, m);
433
+ c(this, _, /* @__PURE__ */ new Map());
434
+ c(this, R, null);
435
+ c(this, $, null);
436
+ c(this, Y, 0);
437
+ c(this, Z, 40);
438
+ v(this, "refresh", /* @__PURE__ */ a(() => {
439
439
  var e;
440
440
  const i = t(this, m).querySelector(".ng-container-body");
441
- i && (t(this, ot).call(this), t(this, j).call(this, i.scrollTop), (e = t(this, m).querySelector("nine-table-vscrollbar")) == null || e.refresh());
441
+ i && (t(this, rt).call(this), t(this, G).call(this, i.scrollTop), (e = t(this, m).querySelector("nine-table-vscrollbar")) == null || e.refresh());
442
442
  }, "refresh"));
443
- w(this, "initialize", /* @__PURE__ */ c(() => {
444
- g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
445
- const r = t(this, m).querySelector(o);
443
+ v(this, "initialize", /* @__PURE__ */ a(() => {
444
+ g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
445
+ const r = t(this, m).querySelector(n);
446
446
  if (!r) return;
447
- const n = r.querySelector("table");
448
- if (!n) return;
449
- const l = n.querySelector("tbody.bindable-tbody");
447
+ const o = r.querySelector("table");
448
+ if (!o) return;
449
+ const l = o.querySelector("tbody.bindable-tbody");
450
450
  if (!l) return;
451
451
  const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
452
- t(this, _).set(o, d);
452
+ t(this, _).set(n, d);
453
453
  });
454
454
  const i = t(this, m).querySelector(".ng-container-body"), e = t(this, m).querySelector(".ng-container-left"), s = t(this, m).querySelector(".ng-container-right");
455
455
  if (i) {
456
- t(this, mt).call(this, i), t(this, lt).call(this), t(this, ot).call(this), t(this, j).call(this, i.scrollTop);
457
- let o = i.scrollTop;
458
- const r = /* @__PURE__ */ c((n) => {
456
+ t(this, xt).call(this, i), t(this, at).call(this), t(this, rt).call(this), t(this, G).call(this, i.scrollTop);
457
+ let n = i.scrollTop;
458
+ const r = /* @__PURE__ */ a((o) => {
459
459
  var l;
460
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, j).call(this, n), (l = t(this, m).querySelector("nine-table-vscrollbar")) == null || l.refresh();
460
+ e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, G).call(this, o), (l = t(this, m).querySelector("nine-table-vscrollbar")) == null || l.refresh();
461
461
  }, "syncScroll");
462
462
  i.addEventListener("scroll", () => {
463
- const n = i.scrollTop;
464
- o !== n && (o = n, r(n));
463
+ const o = i.scrollTop;
464
+ n !== o && (n = o, r(o));
465
465
  });
466
466
  }
467
467
  }, "initialize"));
468
- h(this, pt, /* @__PURE__ */ c((i, e) => {
468
+ c(this, mt, /* @__PURE__ */ a((i, e) => {
469
469
  const s = t(this, _).get(e);
470
470
  if (!s || s.length === 0) return;
471
- const o = i.querySelector("tbody.bindable-tbody");
472
- if (!o) return;
473
- o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
- const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
475
- for (let l = 0; l < t(this, K); l++)
476
- s.forEach((a) => {
477
- n.appendChild(a.cloneNode(!0));
471
+ const n = i.querySelector("tbody.bindable-tbody");
472
+ if (!n) return;
473
+ n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
474
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
475
+ for (let l = 0; l < t(this, Z); l++)
476
+ s.forEach((h) => {
477
+ o.appendChild(h.cloneNode(!0));
478
478
  });
479
- r ? r.before(n) : o.appendChild(n);
479
+ r ? r.before(o) : n.appendChild(o);
480
480
  }, "#renderRows"));
481
- h(this, mt, /* @__PURE__ */ c((i) => {
481
+ c(this, xt, /* @__PURE__ */ a((i) => {
482
482
  if (t(this, R) !== null && t(this, R) > 0)
483
483
  return t(this, R);
484
484
  const e = t(this, _).get(".ng-container-body");
@@ -486,98 +486,98 @@ const Zt = class Zt {
486
486
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
487
487
  if (!s) return 24;
488
488
  s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
489
- const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
489
+ const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
490
490
  e.forEach((b) => {
491
491
  r.appendChild(b.cloneNode(!0));
492
- }), o ? o.before(r) : s.appendChild(r);
493
- const n = t(this, m), l = n.style.display, a = n.style.visibility, d = n.style.position;
494
- (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
492
+ }), n ? n.before(r) : s.appendChild(r);
493
+ const o = t(this, m), l = o.style.display, h = o.style.visibility, d = o.style.position;
494
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
495
495
  let f = 0;
496
496
  const u = s.querySelectorAll("tr:not(.nodata)");
497
497
  return u.forEach((b) => {
498
498
  f += b.offsetHeight || b.getBoundingClientRect().height;
499
- }), u.forEach((b) => b.remove()), n.style.display = l, n.style.visibility = a, n.style.position = d, g(this, R, f > 0 ? f : 24), t(this, rt).call(this), t(this, R);
499
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = h, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, lt).call(this), t(this, R);
500
500
  }, "#measureAndCacheHeight"));
501
- h(this, ot, /* @__PURE__ */ c(() => {
501
+ c(this, rt, /* @__PURE__ */ a(() => {
502
502
  if (!t(this, m).querySelector(".ng-container-body")) return;
503
- const e = t(this, nt).data.get() || [];
504
- z.log(e);
505
- const s = e.length > 0 ? e.length : 100, o = t(this, R), r = s * o;
506
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
507
- const l = t(this, m).querySelector(n), a = l == null ? void 0 : l.querySelector("table");
508
- a && (a.style.height = `${r}px`);
503
+ const e = t(this, ot).data.get() || [];
504
+ K.log(e);
505
+ const s = e.length > 0 ? e.length : 100, n = t(this, R), r = s * n;
506
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
507
+ const l = t(this, m).querySelector(o), h = l == null ? void 0 : l.querySelector("table");
508
+ h && (h.style.height = `${r}px`);
509
509
  });
510
510
  }, "#updateVirtualScrollHeight"));
511
- h(this, rt, /* @__PURE__ */ c(() => {
512
- if (t(this, V) > 0 && t(this, R) > 0) {
513
- const i = Math.ceil(t(this, V) / t(this, R));
514
- g(this, K, i + 20);
511
+ c(this, lt, /* @__PURE__ */ a(() => {
512
+ if (t(this, Y) > 0 && t(this, R) > 0) {
513
+ const i = Math.ceil(t(this, Y) / t(this, R));
514
+ g(this, Z, i + 20);
515
515
  } else
516
- g(this, K, 40);
516
+ g(this, Z, 40);
517
517
  }, "#updateRowCount"));
518
- h(this, xt, /* @__PURE__ */ c(() => {
519
- var a, d, f;
518
+ c(this, vt, /* @__PURE__ */ a(() => {
519
+ var h, d, f;
520
520
  const i = t(this, m).querySelector(".ng-container-left table"), e = t(this, m).querySelector(".ng-container-body table"), s = t(this, m).querySelector(".ng-container-right table");
521
521
  if (!e) return;
522
- const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
522
+ const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
523
523
  for (let u = 0; u < l; u++) {
524
524
  const b = [
525
- ((a = o[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
525
+ ((h = n[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
526
526
  ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
527
- ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
527
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
528
528
  ], p = Math.max(...b);
529
- p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
529
+ p > 0 && (n[u] && (n[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), o[u] && (o[u].style.height = `${p}px`));
530
530
  }
531
531
  }, "#syncRowHeights"));
532
- h(this, vt, /* @__PURE__ */ c(() => {
532
+ c(this, wt, /* @__PURE__ */ a(() => {
533
533
  !t(this, m) || !(t(this, m) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
534
534
  for (const e of i) {
535
535
  const s = e.target;
536
536
  if (!s.classList.contains("active")) continue;
537
- const o = e.contentRect.height;
538
- if (o > 0) {
537
+ const n = e.contentRect.height;
538
+ if (n > 0) {
539
539
  let r = 0;
540
- const n = s.querySelector("thead");
541
- n && (r += n.offsetHeight || n.getBoundingClientRect().height);
542
- const l = Math.max(o - r, 100);
543
- t(this, V) !== l && (g(this, V, l), t(this, rt).call(this), t(this, R) !== null && t(this, lt).call(this));
540
+ const o = s.querySelector("thead");
541
+ o && (r += o.offsetHeight || o.getBoundingClientRect().height);
542
+ const l = Math.max(n - r, 100);
543
+ t(this, Y) !== l && (g(this, Y, l), t(this, lt).call(this), t(this, R) !== null && t(this, at).call(this));
544
544
  }
545
545
  }
546
546
  })), t(this, $).observe(t(this, m)));
547
547
  }, "#initResizeObserver"));
548
- h(this, lt, /* @__PURE__ */ c(() => {
548
+ c(this, at, /* @__PURE__ */ a(() => {
549
549
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
550
550
  const e = t(this, m).querySelector(i);
551
- e && e.querySelector("tbody.bindable-tbody") && t(this, pt).call(this, e, i);
552
- }), t(this, xt).call(this);
551
+ e && e.querySelector("tbody.bindable-tbody") && t(this, mt).call(this, e, i);
552
+ }), t(this, vt).call(this);
553
553
  }, "#renderAllContainers"));
554
- h(this, j, /* @__PURE__ */ c((i) => {
554
+ c(this, G, /* @__PURE__ */ a((i) => {
555
555
  var r;
556
556
  const e = t(this, R);
557
557
  if (!e || e <= 0) return;
558
- const s = Math.max(0, Math.floor(i / e)), o = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
559
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
560
- const l = t(this, m).querySelector(n);
558
+ const s = Math.max(0, Math.floor(i / e)), n = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
559
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
560
+ const l = t(this, m).querySelector(o);
561
561
  if (!l) return;
562
- const a = l.querySelector("tbody.bindable-tbody");
563
- if (!a) return;
564
- Array.from(a.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
565
- var E, q, O, ie;
566
- const b = s + Math.floor(u / o), p = (typeof t(this, m).getData == "function" ? t(this, m).getData(b) : null) ?? (typeof ((E = t(this, m).data) == null ? void 0 : E.get) == "function" ? t(this, m).data.get(b) : null) ?? ((O = (q = t(this, m).dataManager) == null ? void 0 : q.rawRecords) == null ? void 0 : O[b]) ?? ((ie = t(this, m).data) == null ? void 0 : ie[b]) ?? { _index: b };
567
- f.style.display = "", t(this, wt).call(this, f, p, b);
562
+ const h = l.querySelector("tbody.bindable-tbody");
563
+ if (!h) return;
564
+ Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
565
+ var S, q, z, se;
566
+ const b = s + Math.floor(u / n), p = (typeof t(this, m).getData == "function" ? t(this, m).getData(b) : null) ?? (typeof ((S = t(this, m).data) == null ? void 0 : S.get) == "function" ? t(this, m).data.get(b) : null) ?? ((z = (q = t(this, m).dataManager) == null ? void 0 : q.rawRecords) == null ? void 0 : z[b]) ?? ((se = t(this, m).data) == null ? void 0 : se[b]) ?? { _index: b };
567
+ f.style.display = "", t(this, St).call(this, f, p, b);
568
568
  });
569
569
  });
570
570
  }, "#handleScroll"));
571
- h(this, wt, /* @__PURE__ */ c((i, e, s) => {
572
- i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
573
- const n = o.dataset.bind;
574
- n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, o.dataset.row = s;
571
+ c(this, St, /* @__PURE__ */ a((i, e, s) => {
572
+ i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
573
+ const o = n.dataset.bind;
574
+ o && e && e[o] !== void 0 ? n.textContent = e[o] : n.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, n.dataset.row = s;
575
575
  });
576
576
  }, "#bindRowData"));
577
- w(this, "destroy", /* @__PURE__ */ c(() => {
577
+ v(this, "destroy", /* @__PURE__ */ a(() => {
578
578
  t(this, $) && (t(this, $).disconnect(), g(this, $, null));
579
579
  }, "destroy"));
580
- g(this, nt, i.getRootNode().host), g(this, m, i), t(this, vt).call(this);
580
+ g(this, ot, i.getRootNode().host), g(this, m, i), t(this, wt).call(this);
581
581
  }
582
582
  getRowHeight() {
583
583
  return t(this, R);
@@ -587,46 +587,53 @@ const Zt = class Zt {
587
587
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
588
588
  }
589
589
  };
590
- nt = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), K = new WeakMap(), pt = new WeakMap(), mt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), lt = new WeakMap(), j = new WeakMap(), wt = new WeakMap(), c(Zt, "RowManager");
591
- let Nt = Zt;
592
- var St, Z, G, Et, Rt, kt, qt, Tt;
593
- const et = class et extends HTMLElement {
590
+ ot = new WeakMap(), m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), rt = new WeakMap(), lt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), at = new WeakMap(), G = new WeakMap(), St = new WeakMap(), a(Gt, "RowManager");
591
+ let Bt = Gt;
592
+ var Et, J, V, Rt, kt, qt, At, Tt;
593
+ const it = class it extends HTMLElement {
594
594
  constructor() {
595
595
  super();
596
- h(this, St);
597
- h(this, Z, null);
598
- h(this, G);
599
- h(this, Et, /* @__PURE__ */ c(() => {
596
+ c(this, Et);
597
+ c(this, J, null);
598
+ c(this, V);
599
+ /**
600
+ * data.set, add, delete
601
+ * filter, sorting : κ³ λ €λŒ€μƒ
602
+ */
603
+ v(this, "invalidate", /* @__PURE__ */ a(() => {
604
+ t(this, V).refresh();
605
+ }, "invalidate"));
606
+ c(this, Rt, /* @__PURE__ */ a(() => {
600
607
  [
601
608
  { selector: ".ng-container-body", type: null },
602
609
  { selector: ".ng-container-left", type: "left" },
603
610
  { selector: ".ng-container-right", type: "right" }
604
- ].forEach(({ selector: s, type: o }) => {
611
+ ].forEach(({ selector: s, type: n }) => {
605
612
  const r = this.querySelector(s);
606
613
  if (!r) return;
607
- const n = t(this, kt).call(this, t(this, Z), o);
608
- r.innerHTML = "", r.appendChild(n);
614
+ const o = t(this, qt).call(this, t(this, J), n);
615
+ r.innerHTML = "", r.appendChild(o);
609
616
  });
610
617
  }, "#renderSplitContainers"));
611
- h(this, Rt, /* @__PURE__ */ c(() => {
618
+ c(this, kt, /* @__PURE__ */ a(() => {
612
619
  ["left", "right"].forEach((e) => {
613
- const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
614
- if (!s || !o) return;
620
+ const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
621
+ if (!s || !n) return;
615
622
  let r = 0;
616
- o.querySelectorAll("col").forEach((n) => {
617
- const l = parseInt(n.getAttribute("width"), 10);
623
+ n.querySelectorAll("col").forEach((o) => {
624
+ const l = parseInt(o.getAttribute("width"), 10);
618
625
  isNaN(r) || (r += l);
619
626
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
620
627
  });
621
628
  }, "#updateContainerWidths"));
622
- w(this, "generate", /* @__PURE__ */ c((e) => {
623
- e && (g(this, Z, Dt.compile(e)), t(this, Z).style.display = "table", t(this, Et).call(this), t(this, Rt).call(this), requestAnimationFrame(() => {
624
- var o;
625
- const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
629
+ v(this, "generate", /* @__PURE__ */ a((e) => {
630
+ e && (g(this, J, Nt.compile(e)), t(this, J).style.display = "table", t(this, Rt).call(this), t(this, kt).call(this), requestAnimationFrame(() => {
631
+ var n;
632
+ const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
626
633
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
627
634
  r.style.top = `${s}px`;
628
635
  });
629
- }), t(this, G).initialize(), setTimeout(() => {
636
+ }), t(this, V).initialize(), setTimeout(() => {
630
637
  var s;
631
638
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
632
639
  }, 0));
@@ -634,34 +641,34 @@ const et = class et extends HTMLElement {
634
641
  /**
635
642
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
636
643
  */
637
- h(this, kt, /* @__PURE__ */ c((e, s) => {
638
- const o = e.cloneNode(!0), r = o.querySelector("tbody");
644
+ c(this, qt, /* @__PURE__ */ a((e, s) => {
645
+ const n = e.cloneNode(!0), r = n.querySelector("tbody");
639
646
  if (r) {
640
- const n = document.createElement("tbody");
641
- n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
647
+ const o = document.createElement("tbody");
648
+ o.className = "fixed-tbody", r.className = "bindable-tbody", r.before(o);
642
649
  }
643
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
644
- n.getAttribute("fixed") !== "left" && n.remove();
645
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
646
- n.getAttribute("fixed") !== "right" && n.remove();
647
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
648
- n.remove();
649
- }), o;
650
+ return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
651
+ o.getAttribute("fixed") !== "left" && o.remove();
652
+ }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
653
+ o.getAttribute("fixed") !== "right" && o.remove();
654
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
655
+ o.remove();
656
+ }), n;
650
657
  }, "#createSplitTable"));
651
- w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, G).getRowHeight(), "getRowHeight"));
652
- w(this, "scrollToX", /* @__PURE__ */ c((e) => {
658
+ v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, V).getRowHeight(), "getRowHeight"));
659
+ v(this, "scrollToX", /* @__PURE__ */ a((e) => {
653
660
  const s = this.querySelector(".ng-container-body");
654
661
  s && (s.scrollLeft = e);
655
662
  }, "scrollToX"));
656
- w(this, "scrollToY", /* @__PURE__ */ c((e) => {
663
+ v(this, "scrollToY", /* @__PURE__ */ a((e) => {
657
664
  const s = this.querySelector(".ng-container-body");
658
665
  s && (s.scrollTop = e);
659
666
  }, "scrollToY"));
660
- h(this, qt, /* @__PURE__ */ c(() => {
667
+ c(this, At, /* @__PURE__ */ a(() => {
661
668
  t(this, Tt).call(this);
662
669
  }, "#init"));
663
- h(this, Tt, /* @__PURE__ */ c(() => {
664
- const e = et.SCROLLBAR_SIZE;
670
+ c(this, Tt, /* @__PURE__ */ a(() => {
671
+ const e = it.SCROLLBAR_SIZE;
665
672
  this.innerHTML = `
666
673
  <style>
667
674
  nine-table-sheet {
@@ -807,45 +814,45 @@ const et = class et extends HTMLElement {
807
814
  </div>
808
815
  `;
809
816
  }, "#render"));
810
- g(this, G, new Nt(this)), g(this, St, this.getRootNode().host);
817
+ g(this, V, new Bt(this)), g(this, Et, this.getRootNode().host);
811
818
  }
812
819
  connectedCallback() {
813
- t(this, qt).call(this);
820
+ t(this, At).call(this);
814
821
  }
815
822
  disconnectedCallback() {
816
- this.innerHTML = "", z.log("NineTableSheet destroyed.");
823
+ this.innerHTML = "", K.log("NineTableSheet destroyed.");
817
824
  }
818
825
  };
819
- St = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
820
- let ft = et;
821
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ft);
822
- var At, ct;
823
- const Gt = class Gt extends HTMLElement {
826
+ Et = new WeakMap(), J = new WeakMap(), V = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), a(it, "NineTableSheet"), v(it, "SCROLLBAR_SIZE", 16);
827
+ let ut = it;
828
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ut);
829
+ var Lt, ct;
830
+ const Jt = class Jt extends HTMLElement {
824
831
  constructor() {
825
832
  super();
826
- h(this, At, /* @__PURE__ */ c(() => {
833
+ c(this, Lt, /* @__PURE__ */ a(() => {
827
834
  var e;
828
835
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
829
- var n;
830
- const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
831
- t(this, ct).call(this, r, o);
836
+ var o;
837
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
838
+ t(this, ct).call(this, r, n);
832
839
  }), t(this, ct).call(this, 0, !1);
833
840
  }, "#init"));
834
- h(this, ct, /* @__PURE__ */ c((e, s = !1) => {
835
- const o = /* @__PURE__ */ c(() => {
841
+ c(this, ct, /* @__PURE__ */ a((e, s = !1) => {
842
+ const n = /* @__PURE__ */ a(() => {
836
843
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
837
844
  Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
838
845
  const b = f.filter((p) => p.classList.contains("active"));
839
846
  b.length < 2 || b.forEach((p) => {
840
- const E = parseInt(p.getAttribute("data-index"), 10), q = this.querySelector(`nine-splitter[data-split-index="${E}"]`), O = f[E + 1];
841
- q && O && O.classList.contains("active") && q.style.setProperty("display", "flex");
847
+ const S = parseInt(p.getAttribute("data-index"), 10), q = this.querySelector(`nine-splitter[data-split-index="${S}"]`), z = f[S + 1];
848
+ q && z && z.classList.contains("active") && q.style.setProperty("display", "flex");
842
849
  });
843
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = n.querySelectorAll("nine-table-sheet");
850
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
844
851
  if (!l[e]) return;
845
852
  if (!s)
846
853
  l.forEach((f, u) => {
847
854
  f.classList.toggle("active", u === e);
848
- }), a.forEach((f, u) => {
855
+ }), h.forEach((f, u) => {
849
856
  const b = u === e;
850
857
  f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
851
858
  });
@@ -854,44 +861,44 @@ const Gt = class Gt extends HTMLElement {
854
861
  if (f.classList.contains("active") && u.length <= 1)
855
862
  return;
856
863
  f.classList.toggle("active");
857
- const b = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
864
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
858
865
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
859
866
  }
860
- const d = n.querySelectorAll("nine-table-sheet.active");
867
+ const d = o.querySelectorAll("nine-table-sheet.active");
861
868
  d == null || d.forEach((f) => {
862
869
  f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
863
- }), o();
870
+ }), n();
864
871
  }, "#switchSheet"));
865
872
  }
866
873
  connectedCallback() {
867
- t(this, At).call(this);
874
+ t(this, Lt).call(this);
868
875
  }
869
876
  };
870
- At = new WeakMap(), ct = new WeakMap(), c(Gt, "NineTableSheets");
871
- let Bt = Gt;
872
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Bt);
873
- var k, Lt, at, Ht;
874
- const Jt = class Jt {
877
+ Lt = new WeakMap(), ct = new WeakMap(), a(Jt, "NineTableSheets");
878
+ let Pt = Jt;
879
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Pt);
880
+ var k, Ht, ht, Ct;
881
+ const Qt = class Qt {
875
882
  constructor(i) {
876
- h(this, k);
877
- h(this, Lt, /* @__PURE__ */ c(() => {
878
- t(this, Ht).call(this), new ResizeObserver((i) => {
883
+ c(this, k);
884
+ c(this, Ht, /* @__PURE__ */ a(() => {
885
+ t(this, Ct).call(this), new ResizeObserver((i) => {
879
886
  for (let e of i)
880
- t(this, k).getAttribute("auto-height") === "true" && t(this, at).call(this);
887
+ t(this, k).getAttribute("auto-height") === "true" && t(this, ht).call(this);
881
888
  }).observe(t(this, k));
882
889
  }, "#init"));
883
- h(this, at, /* @__PURE__ */ c(() => {
884
- var a, d;
890
+ c(this, ht, /* @__PURE__ */ a(() => {
891
+ var h, d;
885
892
  const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
886
893
  if (i.length === 0) return;
887
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (a = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = ft.SCROLLBAR_SIZE, l = e * s + o + r + n;
894
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (h = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ut.SCROLLBAR_SIZE, l = e * s + n + r + o;
888
895
  t(this, k).style.height = `${l}px`;
889
896
  }, "#applyAutoHeight"));
890
- h(this, Ht, /* @__PURE__ */ c(() => {
891
- const e = Array.from(t(this, k).children).filter((a) => a.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", o = e.length, r = e.map((a, d) => {
892
- const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < o - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
897
+ c(this, Ct, /* @__PURE__ */ a(() => {
898
+ const e = Array.from(t(this, k).children).filter((h) => h.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((h, d) => {
899
+ const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
893
900
  return u + b;
894
- }).join(""), n = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
901
+ }).join(""), o = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
895
902
  t(this, k).shadowRoot.innerHTML = `
896
903
  <style>
897
904
  :host {
@@ -983,7 +990,7 @@ const Jt = class Jt {
983
990
  <nine-table-sheets>
984
991
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
985
992
  <nine-table-sheets-footer>
986
- <div class="nine-tab-bar">${n}</div>
993
+ <div class="nine-tab-bar">${o}</div>
987
994
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
988
995
  </nine-table-sheets-footer>
989
996
  </nine-table-sheets>
@@ -992,58 +999,63 @@ const Jt = class Jt {
992
999
  <nine-table-footer></nine-table-footer>
993
1000
  `;
994
1001
  const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
995
- l == null || l.forEach((a, d) => {
1002
+ l == null || l.forEach((h, d) => {
996
1003
  e[d] && setTimeout(() => {
997
- a.generate(e[d]), s && t(this, at).call(this);
1004
+ h.generate(e[d]), s && t(this, ht).call(this);
998
1005
  });
999
1006
  });
1000
1007
  }, "#render"));
1001
- g(this, k, i), t(this, Lt).call(this);
1008
+ g(this, k, i), t(this, Ht).call(this);
1002
1009
  }
1003
1010
  };
1004
- k = new WeakMap(), Lt = new WeakMap(), at = new WeakMap(), Ht = new WeakMap(), c(Jt, "LayoutManager");
1005
- let Pt = Jt;
1006
- var ht, J;
1007
- const Qt = class Qt {
1011
+ k = new WeakMap(), Ht = new WeakMap(), ht = new WeakMap(), Ct = new WeakMap(), a(Qt, "LayoutManager");
1012
+ let Yt = Qt;
1013
+ var dt, Q;
1014
+ const te = class te {
1008
1015
  constructor(i) {
1009
- h(this, ht);
1010
- h(this, J, -1);
1011
- w(this, "count", /* @__PURE__ */ c(() => t(this, ht).rawRecords.length, "count"));
1012
- g(this, ht, i);
1016
+ c(this, dt);
1017
+ c(this, Q, -1);
1018
+ v(this, "count", /* @__PURE__ */ a(() => t(this, dt).rawRecords.length, "count"));
1019
+ g(this, dt, i);
1013
1020
  }
1014
1021
  get at() {
1015
- return t(this, J);
1022
+ return t(this, Q);
1016
1023
  }
1017
1024
  set at(i) {
1018
- g(this, J, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, J)}"]`) && setTimeout(() => {
1025
+ g(this, Q, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, Q)}"]`) && setTimeout(() => {
1019
1026
  });
1020
1027
  }
1021
1028
  };
1022
- ht = new WeakMap(), J = new WeakMap(), c(Qt, "ngRow");
1023
- let Yt = Qt;
1024
- var T, v, A, Q, Ct, W, _t, dt, Mt, It, tt;
1029
+ dt = new WeakMap(), Q = new WeakMap(), a(te, "ngRow");
1030
+ let Vt = te;
1031
+ var A, E, T, tt, _t, W, Mt, X, ft, It, $t, et;
1025
1032
  const L = class L {
1026
1033
  constructor(i, e) {
1027
- h(this, T);
1028
- h(this, v);
1029
- h(this, A, []);
1030
- h(this, Q, []);
1031
- h(this, Ct, 0);
1032
- h(this, W, []);
1033
- h(this, _t, /* @__PURE__ */ c(() => {
1034
+ c(this, A);
1035
+ c(this, E);
1036
+ c(this, T, []);
1037
+ c(this, tt, []);
1038
+ c(this, _t, 0);
1039
+ c(this, W, []);
1040
+ c(this, Mt, /* @__PURE__ */ a(() => {
1034
1041
  g(this, W, []);
1035
- const i = t(this, T).template || [];
1042
+ const i = t(this, A).template || [];
1036
1043
  Array.from(i).forEach((e) => {
1037
1044
  var s;
1038
1045
  t(this, W).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1039
- }), (t(this, v).rawRecords || []).forEach((e) => {
1040
- e.__ng || (e.__ng = t(this, dt).call(this)), e.__ng.height = t(this, W).slice();
1046
+ }), (t(this, E).rawRecords || []).forEach((e) => {
1047
+ e.__ng || (e.__ng = t(this, ft).call(this)), e.__ng.height = t(this, W).slice();
1041
1048
  });
1042
1049
  }, "#initialize"));
1043
- w(this, "set", /* @__PURE__ */ c((i) => {
1044
- this.clear(), this.add(i, !1), z.log();
1050
+ c(this, X, /* @__PURE__ */ a(() => {
1051
+ t(this, A).shadowRoot.querySelectorAll("nine-sheet").forEach((i) => {
1052
+ i.invalidate();
1053
+ });
1054
+ }, "#invalidate"));
1055
+ v(this, "set", /* @__PURE__ */ a((i) => {
1056
+ this.clear(), this.add(i, !1), t(this, X).call(this);
1045
1057
  }, "set"));
1046
- h(this, dt, /* @__PURE__ */ c(() => ({
1058
+ c(this, ft, /* @__PURE__ */ a(() => ({
1047
1059
  rowState: L.ROW_STATE.EMPTY,
1048
1060
  deleted: !1,
1049
1061
  filtered: !1,
@@ -1052,172 +1064,170 @@ const L = class L {
1052
1064
  c: {},
1053
1065
  _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, W).slice(), -1, {}, {}]
1054
1066
  }), "#getDefaultMeta"));
1055
- w(this, "reset", /* @__PURE__ */ c(() => {
1056
- g(this, A, []), g(this, Q, []);
1067
+ v(this, "reset", /* @__PURE__ */ a(() => {
1068
+ g(this, T, []), g(this, tt, []), t(this, X).call(this);
1057
1069
  }, "reset"));
1058
- w(this, "clear", /* @__PURE__ */ c(() => {
1070
+ v(this, "clear", /* @__PURE__ */ a(() => {
1059
1071
  var i;
1060
- t(this, v).rawRecords = [], g(this, A, []), g(this, Q, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1072
+ t(this, E).rawRecords = [], g(this, T, []), g(this, tt, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1061
1073
  }, "clear"));
1062
- h(this, Mt, /* @__PURE__ */ c((i) => {
1063
- var o;
1074
+ c(this, It, /* @__PURE__ */ a((i) => {
1075
+ var n;
1064
1076
  Array.isArray(i) || (i = [i]);
1065
- const e = typeof ((o = t(this, T).fields) == null ? void 0 : o.get) == "function" ? t(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
1077
+ const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
1066
1078
  return i.forEach((r) => {
1067
- const n = { v: [] };
1079
+ const o = { v: [] };
1068
1080
  e.forEach((l) => {
1069
- n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1070
- }), s.push(n);
1081
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1082
+ }), s.push(o);
1071
1083
  }), s;
1072
1084
  }, "#json2Array"));
1073
- h(this, It, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1074
- e.__ng = t(this, dt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1085
+ c(this, $t, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1086
+ e.__ng = t(this, ft).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1075
1087
  }), i), "#defaultInsert"));
1076
- w(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1077
- var r;
1088
+ v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1078
1089
  i === void 0 && (i = {});
1079
- const s = t(this, Mt).call(this, i);
1080
- t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, It).call(this, s)), this.resetRecords();
1081
- const o = this.count() - 1;
1082
- return e || s.forEach((n, l) => {
1083
- const a = t(this, v).rawRecords[o - l];
1084
- a && (a.__ng.rowState = L.ROW_STATE.EMPTY);
1085
- }), (r = t(this, v).viewRecords) != null && r.reset && t(this, v).viewRecords.reset(), o;
1090
+ const s = t(this, It).call(this, i);
1091
+ t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, $t).call(this, s)), this.resetRecords();
1092
+ const n = this.count() - 1;
1093
+ return e || s.forEach((r, o) => {
1094
+ const l = t(this, E).rawRecords[n - o];
1095
+ l && (l.__ng.rowState = L.ROW_STATE.EMPTY);
1096
+ }), t(this, X).call(this), n;
1086
1097
  }, "add"));
1087
- w(this, "delete", /* @__PURE__ */ c((i) => {
1088
- var s;
1098
+ v(this, "delete", /* @__PURE__ */ a((i) => {
1089
1099
  let e = [];
1090
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).host.row.at] : e = [parseInt(i, 10)], e.sort((o, r) => r - o).forEach((o) => {
1091
- if (t(this, A)[o]) {
1092
- const r = t(this, A)[o].__ng.rowid;
1093
- t(this, A)[o].__ng.rowState === L.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, v).rawRecords.forEach((n) => {
1094
- n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = L.ROW_STATE.DELETE);
1100
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, n) => n - s).forEach((s) => {
1101
+ if (t(this, T)[s]) {
1102
+ const n = t(this, T)[s].__ng.rowid;
1103
+ t(this, T)[s].__ng.rowState === L.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== n) : t(this, E).rawRecords.forEach((r) => {
1104
+ r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = L.ROW_STATE.DELETE);
1095
1105
  });
1096
1106
  }
1097
- }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1107
+ }), this.resetRecords(), t(this, X).call(this);
1098
1108
  }, "delete"));
1099
- w(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1100
- var a;
1109
+ v(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1110
+ var h;
1101
1111
  i = parseInt(i, 10);
1102
- const r = (typeof ((a = t(this, T).fields) == null ? void 0 : a.get) == "function" ? t(this, T).fields.get() : []).indexOf(e);
1112
+ const r = (typeof ((h = t(this, A).fields) == null ? void 0 : h.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1103
1113
  if (r < 0) return;
1104
- const n = this.getValidData()[i];
1105
- if (!n) return;
1106
- const l = n.v[r];
1107
- l !== s && n.__ng.rowState !== L.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = L.ROW_STATE.UPDATE), n.v[r] = s;
1114
+ const o = this.getValidData()[i];
1115
+ if (!o) return;
1116
+ const l = o.v[r];
1117
+ l !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s;
1108
1118
  }, "setValue"));
1109
- w(this, "resetRecords", /* @__PURE__ */ c(() => {
1110
- g(this, Q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1119
+ v(this, "resetRecords", /* @__PURE__ */ a(() => {
1120
+ g(this, tt, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, T, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1111
1121
  i.__ng.rowidx = e;
1112
- }), t(this, A).forEach((i, e) => {
1122
+ }), t(this, T).forEach((i, e) => {
1113
1123
  i.__ng.i = e;
1114
1124
  });
1115
1125
  }, "resetRecords"));
1116
- w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, A).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, A)), "getValidData"));
1117
- h(this, tt, /* @__PURE__ */ c((i) => {
1126
+ v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, T).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, T)), "getValidData"));
1127
+ c(this, et, /* @__PURE__ */ a((i) => {
1118
1128
  var s;
1119
1129
  if (!i) return i;
1120
- const e = typeof ((s = t(this, T).fields) == null ? void 0 : s.get) == "function" ? t(this, T).fields.get() : [];
1121
- return Array.isArray(i) ? i.filter((o) => !o.__ng.deleted).map((o) => {
1130
+ const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
1131
+ return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1122
1132
  const r = {};
1123
- return e.forEach((n, l) => {
1124
- r[n] = o.v ? o.v[l] : o[n];
1125
- }), r.__ng = o.__ng, r;
1133
+ return e.forEach((o, l) => {
1134
+ r[o] = n.v ? n.v[l] : n[o];
1135
+ }), r.__ng = n.__ng, r;
1126
1136
  }) : i;
1127
1137
  }, "#conv2"));
1128
- w(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1129
- w(this, "get", /* @__PURE__ */ c((i, e) => {
1138
+ v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1139
+ v(this, "get", /* @__PURE__ */ a((i, e) => {
1130
1140
  var r;
1131
1141
  const s = this.getValidData();
1132
1142
  if (!s || s.length <= 0) return;
1133
- if (i == null) return t(this, tt).call(this, s);
1143
+ if (i == null) return t(this, et).call(this, s);
1134
1144
  if (i < 0 || i >= s.length) return null;
1135
- const o = typeof ((r = t(this, T).fields) == null ? void 0 : r.get) == "function" ? t(this, T).fields.get() : [];
1145
+ const n = typeof ((r = t(this, A).fields) == null ? void 0 : r.get) == "function" ? t(this, A).fields.get() : [];
1136
1146
  if (e != null) {
1137
- const n = o.indexOf(e);
1138
- return n >= 0 ? s[i].v[n] : null;
1147
+ const o = n.indexOf(e);
1148
+ return o >= 0 ? s[i].v[o] : null;
1139
1149
  }
1140
- return t(this, tt).call(this, s[i]);
1150
+ return t(this, et).call(this, s[i]);
1141
1151
  }, "get"));
1142
- g(this, T, i), g(this, v, e), t(this, _t).call(this);
1152
+ g(this, A, i), g(this, E, e), t(this, Mt).call(this);
1143
1153
  }
1144
1154
  get source() {
1145
- return t(this, tt).call(this, t(this, v).rawRecords);
1155
+ return t(this, et).call(this, t(this, E).rawRecords);
1146
1156
  }
1147
1157
  set source(i) {
1148
1158
  this.clear(), this.add(i, !1);
1149
1159
  }
1150
1160
  get nextId() {
1151
- return ++re(this, Ct)._;
1161
+ return ++le(this, _t)._;
1152
1162
  }
1153
1163
  get length() {
1154
- return t(this, A).length;
1164
+ return t(this, T).length;
1155
1165
  }
1156
1166
  getRowCount() {
1157
1167
  return this.length;
1158
1168
  }
1159
1169
  };
1160
- T = new WeakMap(), v = new WeakMap(), A = new WeakMap(), Q = new WeakMap(), Ct = new WeakMap(), W = new WeakMap(), _t = new WeakMap(), dt = new WeakMap(), Mt = new WeakMap(), It = new WeakMap(), tt = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1161
- w(L, "ROW_STATE", {
1170
+ A = new WeakMap(), E = new WeakMap(), T = new WeakMap(), tt = new WeakMap(), _t = new WeakMap(), W = new WeakMap(), Mt = new WeakMap(), X = new WeakMap(), ft = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), et = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1171
+ v(L, "ROW_STATE", {
1162
1172
  EMPTY: "EMPTY",
1163
1173
  NORMAL: "NORMAL",
1164
1174
  INSERT: "INSERT",
1165
1175
  UPDATE: "UPDATE",
1166
1176
  DELETE: "DELETE"
1167
1177
  });
1168
- let Vt = L;
1169
- var X;
1170
- const te = class te {
1178
+ let Xt = L;
1179
+ var U;
1180
+ const ee = class ee {
1171
1181
  constructor(i) {
1172
- h(this, X);
1173
- g(this, X, i), this.row = new Yt(this), this.data = new Vt(t(this, X), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1182
+ c(this, U);
1183
+ g(this, U, i), this.row = new Vt(this), this.data = new Xt(t(this, U), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1174
1184
  var e;
1175
- (e = t(this, X).view) != null && e.redraw && t(this, X).view.redraw();
1185
+ (e = t(this, U).view) != null && e.redraw && t(this, U).view.redraw();
1176
1186
  }, this.setDataSource = (e) => {
1177
1187
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1178
1188
  }, this.getRowState = (e) => {
1179
- var o, r;
1189
+ var n, r;
1180
1190
  const s = parseInt(e, 10);
1181
1191
  if (!(s >= this.data.count()))
1182
- return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1192
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1183
1193
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1184
1194
  this.row.at = e;
1185
- }, 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, o) => {
1186
- e = parseInt(e, 10), this.data.setValue(e, s, o);
1195
+ }, 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, n) => {
1196
+ e = parseInt(e, 10), this.data.setValue(e, s, n);
1187
1197
  }, this.setDataSource([]);
1188
1198
  }
1189
1199
  };
1190
- X = new WeakMap(), c(te, "ngDataManager");
1191
- let Xt = te;
1192
- var U, $t;
1193
- const ee = class ee extends HTMLElement {
1200
+ U = new WeakMap(), a(ee, "ngDataManager");
1201
+ let Ut = ee;
1202
+ var F, Wt;
1203
+ const ie = class ie extends HTMLElement {
1194
1204
  constructor() {
1195
1205
  super();
1196
1206
  //#created = false;
1197
- h(this, U);
1198
- h(this, $t);
1199
- this.attachShadow({ mode: "open" }), g(this, U, new Xt(this));
1207
+ c(this, F);
1208
+ c(this, Wt);
1209
+ this.attachShadow({ mode: "open" }), g(this, F, new Ut(this));
1200
1210
  }
1201
1211
  connectedCallback() {
1202
- g(this, $t, new Pt(this)), z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1212
+ g(this, Wt, new Yt(this)), K.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1203
1213
  }
1204
1214
  disconnectedCallback() {
1205
- z.log("NineTable disconnected.");
1215
+ K.log("NineTable disconnected.");
1206
1216
  }
1207
1217
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1208
1218
  get data() {
1209
- return t(this, U).data;
1219
+ return t(this, F).data;
1210
1220
  }
1211
1221
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1212
1222
  get row() {
1213
- return t(this, U).row;
1223
+ return t(this, F).row;
1214
1224
  }
1215
1225
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1216
1226
  get dataManager() {
1217
- return t(this, U);
1227
+ return t(this, F);
1218
1228
  }
1219
1229
  };
1220
- U = new WeakMap(), $t = new WeakMap(), c(ee, "NineTable");
1221
- let Ut = ee;
1222
- customElements.get("nine-table") || customElements.define("nine-table", Ut);
1230
+ F = new WeakMap(), Wt = new WeakMap(), a(ie, "NineTable");
1231
+ let Ft = ie;
1232
+ customElements.get("nine-table") || customElements.define("nine-table", Ft);
1223
1233
  //# sourceMappingURL=nine-table.js.map