@ninebone/table 0.0.224 β†’ 0.0.228

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,51 +1,51 @@
1
- var Me = Object.defineProperty;
2
- var Ie = (w) => {
1
+ var $e = Object.defineProperty;
2
+ var We = (w) => {
3
3
  throw TypeError(w);
4
4
  };
5
- var Oe = (w, i, t) => i in w ? Me(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
- var a = (w, i) => Me(w, "name", { value: i, configurable: !0 });
7
- var x = (w, i, t) => Oe(w, typeof i != "symbol" ? i + "" : i, t), $e = (w, i, t) => i.has(w) || Ie("Cannot " + t);
8
- var e = (w, i, t) => ($e(w, i, "read from private field"), t ? t.call(w) : i.get(w)), f = (w, i, t) => i.has(w) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), p = (w, i, t, s) => ($e(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
- var We = (w, i, t, s) => ({
5
+ var Be = (w, i, t) => i in w ? $e(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
6
+ var a = (w, i) => $e(w, "name", { value: i, configurable: !0 });
7
+ var x = (w, i, t) => Be(w, typeof i != "symbol" ? i + "" : i, t), ze = (w, i, t) => i.has(w) || We("Cannot " + t);
8
+ var e = (w, i, t) => (ze(w, i, "read from private field"), t ? t.call(w) : i.get(w)), d = (w, i, t) => i.has(w) ? We("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), y = (w, i, t, s) => (ze(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
9
+ var Oe = (w, i, t, s) => ({
10
10
  set _(n) {
11
- p(w, i, n, t);
11
+ y(w, i, n, t);
12
12
  },
13
13
  get _() {
14
14
  return e(w, i, s);
15
15
  }
16
16
  });
17
- import { trace as ze } from "@ninebone/util";
18
- const Te = class Te extends ze.constructor {
17
+ import { trace as De } from "@ninebone/util";
18
+ const qe = class qe extends De.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(Te, "Trace");
24
- let pe = Te;
25
- const G = new pe();
26
- var L, z, y, B, D, N, ie, P, se;
27
- const Ae = class Ae extends HTMLElement {
23
+ a(qe, "Trace");
24
+ let me = qe;
25
+ const j = new me();
26
+ var C, B, p, D, N, P, se, V, ne;
27
+ const ke = class ke extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- f(this, L);
31
- f(this, z, !1);
32
- f(this, y);
33
- f(this, B);
34
- f(this, D);
35
- f(this, N);
36
- f(this, ie, /* @__PURE__ */ a(() => {
37
- if (!e(this, L)) return;
38
- const t = e(this, L).querySelector(".ng-container-body");
39
- t && (p(this, N, new ResizeObserver(() => {
30
+ d(this, C);
31
+ d(this, B, !1);
32
+ d(this, p);
33
+ d(this, D);
34
+ d(this, N);
35
+ d(this, P);
36
+ d(this, se, /* @__PURE__ */ a(() => {
37
+ if (!e(this, C)) return;
38
+ const t = e(this, C).querySelector(".ng-container-body");
39
+ t && (y(this, P, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), e(this, N).observe(t));
41
+ })), e(this, P).observe(t));
42
42
  }, "#observeResize"));
43
43
  x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!e(this, L) || !e(this, y) || e(this, z)) return;
45
- const t = e(this, y).container, s = t.querySelector("table");
44
+ if (!e(this, C) || !e(this, p) || e(this, B)) return;
45
+ const t = e(this, p).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const n = e(this, y).track, r = e(this, y).thumb, o = e(this, L).querySelector(".ng-container-bottom"), c = t.clientWidth, d = s.scrollWidth;
48
- if (c !== 0 && d > c)
47
+ const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), c = t.clientWidth, f = s.scrollWidth;
48
+ if (c !== 0 && f > c)
49
49
  o && (o.style.display = "flex");
50
50
  else {
51
51
  o && (o.style.display = "none");
@@ -53,67 +53,67 @@ const Ae = class Ae extends HTMLElement {
53
53
  }
54
54
  const l = n.clientWidth;
55
55
  if (l <= 0) return;
56
- const h = Math.max(Math.min(l * (c / d), l), 20);
56
+ const h = Math.max(Math.min(l * (c / f), l), 20);
57
57
  r.style.width = `${h}px`;
58
- const u = t.scrollLeft, b = d - c;
58
+ const u = t.scrollLeft, b = f - c;
59
59
  let g = 0;
60
60
  b > 0 && (g = parseInt(u / b * (l - h), 10)), g < 0 && (g = 0);
61
61
  const m = l - h;
62
- g > m && (g = m), r.style.left = `${g}px`, G.log(g), e(this, y).left.disabled = g === 0, e(this, y).right.disabled = g >= m - 1;
62
+ g > m && (g = m), r.style.left = `${g}px`, j.log(g), e(this, p).left.disabled = g === 0, e(this, p).right.disabled = g >= m - 1;
63
63
  }, "refresh"));
64
- f(this, P, /* @__PURE__ */ a((t) => {
65
- if (!e(this, y)) return !1;
66
- const s = e(this, y).container, n = s.querySelector("table");
64
+ d(this, V, /* @__PURE__ */ a((t) => {
65
+ if (!e(this, p)) return !1;
66
+ const s = e(this, p).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
- const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
68
+ const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
69
69
  let c = t;
70
70
  c < 0 && (c = 0);
71
- const d = r.width - o;
72
- c > d && (c = d), c = parseInt(c, 10), e(this, y).thumb.style.left = `${c}px`, e(this, y).left.disabled = c === 0, e(this, y).right.disabled = c >= d - 1;
71
+ const f = r.width - o;
72
+ c > f && (c = f), c = parseInt(c, 10), e(this, p).thumb.style.left = `${c}px`, e(this, p).left.disabled = c === 0, e(this, p).right.disabled = c >= f - 1;
73
73
  const l = s.clientWidth, h = n.scrollWidth;
74
- let u = d > 0 ? -c * (h - l) / d : 0;
75
- return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, c > 0 && c < d - 1;
74
+ let u = f > 0 ? -c * (h - l) / f : 0;
75
+ return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, c > 0 && c < f - 1;
76
76
  }, "#thumbMoveTo"));
77
- f(this, se, /* @__PURE__ */ a(() => {
77
+ d(this, ne, /* @__PURE__ */ a(() => {
78
78
  const t = /* @__PURE__ */ a((n) => {
79
- clearInterval(e(this, B)), clearInterval(e(this, D));
80
- const r = parseInt(e(this, y).thumb.style.left || 0, 10);
81
- e(this, P).call(this, r + n), p(this, B, setInterval(() => {
82
- clearInterval(e(this, B)), p(this, D, setInterval(() => {
83
- const o = parseInt(e(this, y).thumb.style.left || 0, 10);
84
- e(this, P).call(this, o + n) || clearInterval(e(this, D));
79
+ clearInterval(e(this, D)), clearInterval(e(this, N));
80
+ const r = parseInt(e(this, p).thumb.style.left || 0, 10);
81
+ e(this, V).call(this, r + n), y(this, D, setInterval(() => {
82
+ clearInterval(e(this, D)), y(this, N, setInterval(() => {
83
+ const o = parseInt(e(this, p).thumb.style.left || 0, 10);
84
+ e(this, V).call(this, o + n) || clearInterval(e(this, N));
85
85
  }, 50));
86
86
  }, 500));
87
87
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
88
- clearInterval(e(this, B)), clearInterval(e(this, D));
88
+ clearInterval(e(this, D)), clearInterval(e(this, N));
89
89
  }, "clearTimer");
90
90
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
91
- e(this, y).left.addEventListener(n, s), e(this, y).right.addEventListener(n, s), e(this, y).track.addEventListener(n, s);
92
- }), e(this, y).left.addEventListener("mousedown", (n) => {
91
+ e(this, p).left.addEventListener(n, s), e(this, p).right.addEventListener(n, s), e(this, p).track.addEventListener(n, s);
92
+ }), e(this, p).left.addEventListener("mousedown", (n) => {
93
93
  n.button === 0 && t(-20);
94
- }), e(this, y).right.addEventListener("mousedown", (n) => {
94
+ }), e(this, p).right.addEventListener("mousedown", (n) => {
95
95
  n.button === 0 && t(20);
96
- }), e(this, y).left.addEventListener("touchstart", () => t(-20)), e(this, y).right.addEventListener("touchstart", () => t(20)), e(this, y).track.addEventListener("mousedown", (n) => {
96
+ }), e(this, p).left.addEventListener("touchstart", () => t(-20)), e(this, p).right.addEventListener("touchstart", () => t(20)), e(this, p).track.addEventListener("mousedown", (n) => {
97
97
  if (n.button !== 0) return;
98
98
  n.preventDefault();
99
- const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
100
- e(this, P).call(this, n.clientX - r.left - o / 2);
101
- }), e(this, y).thumb.addEventListener("mousedown", (n) => {
99
+ const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
100
+ e(this, V).call(this, n.clientX - r.left - o / 2);
101
+ }), e(this, p).thumb.addEventListener("mousedown", (n) => {
102
102
  if (n.button !== 0) return;
103
- n.stopPropagation(), n.preventDefault(), p(this, z, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
103
+ n.stopPropagation(), n.preventDefault(), y(this, B, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
104
104
  const r = /* @__PURE__ */ a((c) => {
105
- if (!e(this, z)) return;
106
- const d = e(this, y).track.getBoundingClientRect();
107
- e(this, P).call(this, c.clientX - d.left - this.shiftX);
105
+ if (!e(this, B)) return;
106
+ const f = e(this, p).track.getBoundingClientRect();
107
+ e(this, V).call(this, c.clientX - f.left - this.shiftX);
108
108
  }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
109
- p(this, z, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
+ y(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
110
110
  }, "onMouseUp");
111
111
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
112
112
  });
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (p(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, L)) return;
116
+ if (y(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, C)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -178,46 +178,46 @@ const Ae = class Ae extends HTMLElement {
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
180
  const t = /* @__PURE__ */ a(() => {
181
- const s = e(this, L).querySelector(".ng-container-body");
181
+ const s = e(this, C).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
184
184
  return;
185
185
  }
186
- p(this, y, {
186
+ y(this, p, {
187
187
  container: s,
188
188
  track: this.querySelector(".ng-scroll-track"),
189
189
  thumb: this.querySelector(".ng-scroll-thumb"),
190
190
  left: this.querySelector(".ng-scroll-left"),
191
191
  right: this.querySelector(".ng-scroll-right")
192
- }), e(this, se).call(this), e(this, ie).call(this), this.refresh();
192
+ }), e(this, ne).call(this), e(this, se).call(this), this.refresh();
193
193
  }, "initWhenReady");
194
194
  t();
195
195
  }
196
196
  disconnectedCallback() {
197
- e(this, N) && e(this, N).disconnect();
197
+ e(this, P) && e(this, P).disconnect();
198
198
  }
199
199
  };
200
- L = new WeakMap(), z = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), ie = new WeakMap(), P = new WeakMap(), se = new WeakMap(), a(Ae, "NineTableHScrollBar");
201
- let ye = Ae;
202
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ye);
203
- var V, C, E, $, H, M, ne, re;
204
- const qe = class qe {
200
+ C = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), a(ke, "NineTableHScrollBar");
201
+ let we = ke;
202
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", we);
203
+ var $, L, S, W, M, H, re, oe, le, J;
204
+ const Le = class Le {
205
205
  constructor(i) {
206
- f(this, V);
207
- f(this, C, []);
208
- f(this, E, null);
209
- f(this, $, null);
210
- f(this, H, 0);
211
- f(this, M, 0);
212
- x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, E), "getRowHeight"));
213
- f(this, ne, /* @__PURE__ */ a(() => {
214
- e(this, re).call(this);
206
+ d(this, $);
207
+ d(this, L, []);
208
+ d(this, S, null);
209
+ d(this, W, null);
210
+ d(this, M, 0);
211
+ d(this, H, 0);
212
+ x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, S), "getRowHeight"));
213
+ d(this, re, /* @__PURE__ */ a(() => {
214
+ e(this, oe).call(this);
215
215
  }, "#init"));
216
216
  /**
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
- f(this, re, /* @__PURE__ */ a(() => {
220
- !e(this, V) || !(e(this, V) instanceof HTMLElement) || (p(this, $, new ResizeObserver((i) => {
219
+ d(this, oe, /* @__PURE__ */ a(() => {
220
+ !e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, W, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
223
223
  if (!s.classList.contains("active"))
@@ -226,51 +226,61 @@ const qe = class qe {
226
226
  if (n > 0) {
227
227
  const r = s.clientHeight || s.getBoundingClientRect().height || n;
228
228
  let o = 0;
229
- const c = s.querySelector(".ng-container-body") || s, d = c.querySelector("thead"), l = c.querySelector("tfoot");
230
- d && (o += d.offsetHeight || d.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
229
+ const c = s.querySelector(".ng-container-body") || s, f = c.querySelector("thead"), l = c.querySelector("tfoot");
230
+ f && (o += f.offsetHeight || f.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
231
  const h = Math.max(r - o, 100);
232
- if (e(this, H) !== h && (p(this, H, h), e(this, E) !== null)) {
233
- const u = Math.ceil(e(this, H) / e(this, E));
234
- p(this, M, u + 20), G.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, M)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
232
+ if (e(this, M) !== h && (y(this, M, h), e(this, S) !== null)) {
233
+ const u = Math.ceil(e(this, M) / e(this, S));
234
+ y(this, H, u + 20), j.log(`[RowManager] Resized. Height: ${e(this, M)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
235
235
  const g = s.querySelector(b);
236
- g && g.querySelector("tbody") && this.renderRows(g);
236
+ g && g.querySelector("tbody") && e(this, J).call(this, g);
237
237
  });
238
238
  }
239
239
  }
240
240
  }
241
- })), e(this, $).observe(e(this, V)));
241
+ })), e(this, W).observe(e(this, $)));
242
242
  }, "#initResizeObserver"));
243
243
  x(this, "initTemplate", /* @__PURE__ */ a((i) => {
244
244
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
245
245
  if (!t) return;
246
246
  const s = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
247
- p(this, C, s.map((n) => n.cloneNode(!0))), p(this, E, null), console.log(`[RowManager] Template initialized with ${e(this, C).length} row(s).`);
247
+ y(this, L, s.map((n) => n.cloneNode(!0))), y(this, S, null), console.log(`[RowManager] Template initialized with ${e(this, L).length} row(s).`);
248
248
  }, "initTemplate"));
249
- x(this, "measureAndCacheHeight", /* @__PURE__ */ a((i) => {
250
- if (e(this, E) !== null && e(this, E) > 0)
251
- return e(this, E);
252
- if (e(this, C).length === 0)
249
+ // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
250
+ x(this, "initialize", /* @__PURE__ */ a((i) => {
251
+ j.log(i);
252
+ const t = e(this, $).querySelector(".ng-container-body");
253
+ if (!t) return;
254
+ const s = i.querySelector("tbody");
255
+ if (!s) return;
256
+ const n = Array.from(s.querySelectorAll("tr"));
257
+ y(this, L, n.map((r) => r.cloneNode(!0))), y(this, S, null), e(this, le).call(this, t), e(this, J).call(this, t);
258
+ }, "initialize"));
259
+ d(this, le, /* @__PURE__ */ a((i) => {
260
+ if (e(this, S) !== null && e(this, S) > 0)
261
+ return e(this, S);
262
+ if (e(this, L).length === 0)
253
263
  throw new Error("[RowManager] Template TRs are empty.");
254
264
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
255
265
  if (!t) return 24;
256
266
  t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
257
267
  const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
258
- e(this, C).forEach((u) => {
268
+ e(this, L).forEach((u) => {
259
269
  n.appendChild(u.cloneNode(!0));
260
270
  }), s ? s.before(n) : t.appendChild(n);
261
- const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", c = r ? r.style.visibility : "", d = r ? r.style.position : "";
271
+ const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", c = r ? r.style.visibility : "", f = r ? r.style.position : "";
262
272
  r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
263
273
  let l = 0;
264
274
  if (t.querySelectorAll("tr:not(.nodata)").forEach((u, b) => {
265
275
  const g = u.offsetHeight || u.getBoundingClientRect().height;
266
276
  g === 0 ? l += 40 : l += g;
267
- }), r && (r.style.display = o, r.style.visibility = c, r.style.position = d), p(this, E, l), e(this, H) > 0) {
268
- const u = Math.ceil(e(this, H) / e(this, E));
269
- p(this, M, u + 20);
277
+ }), r && (r.style.display = o, r.style.visibility = c, r.style.position = f), y(this, S, l), e(this, M) > 0) {
278
+ const u = Math.ceil(e(this, M) / e(this, S));
279
+ y(this, H, u + 20);
270
280
  } else
271
- p(this, M, 40);
272
- return console.log(`[RowManager] Template Height Cached: ${e(this, E)}px | RowCount: ${e(this, M)}`), e(this, E);
273
- }, "measureAndCacheHeight"));
281
+ y(this, H, 40);
282
+ return console.log(`[RowManager] Template Height Cached: ${e(this, S)}px | RowCount: ${e(this, H)}`), e(this, S);
283
+ }, "#measureAndCacheHeight"));
274
284
  /**
275
285
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
276
286
  */
@@ -287,46 +297,46 @@ const qe = class qe {
287
297
  /**
288
298
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
289
299
  */
290
- x(this, "renderRows", /* @__PURE__ */ a((i) => {
291
- if (e(this, C).length === 0) return;
300
+ d(this, J, /* @__PURE__ */ a((i) => {
301
+ if (e(this, L).length === 0) return;
292
302
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
293
303
  if (!t) return;
294
304
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
295
- const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, M);
305
+ const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, H);
296
306
  for (let o = 0; o < r; o++)
297
- e(this, C).forEach((c) => {
307
+ e(this, L).forEach((c) => {
298
308
  n.appendChild(c.cloneNode(!0));
299
309
  });
300
310
  s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
301
- }, "renderRows"));
311
+ }, "#renderRows"));
302
312
  x(this, "destroy", /* @__PURE__ */ a(() => {
303
- e(this, $) && (e(this, $).disconnect(), p(this, $, null));
313
+ e(this, W) && (e(this, W).disconnect(), y(this, W, null));
304
314
  }, "destroy"));
305
- p(this, V, i), e(this, ne).call(this);
315
+ y(this, $, i), e(this, re).call(this);
306
316
  }
307
317
  get templateLength() {
308
- return e(this, C).length || 1;
318
+ return e(this, L).length || 1;
309
319
  }
310
320
  };
311
- V = new WeakMap(), C = new WeakMap(), E = new WeakMap(), $ = new WeakMap(), H = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), a(qe, "RowManager");
312
- let me = qe;
313
- var I, X, oe, le;
314
- const j = class j extends HTMLElement {
321
+ $ = new WeakMap(), L = new WeakMap(), S = new WeakMap(), W = new WeakMap(), M = new WeakMap(), H = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), J = new WeakMap(), a(Le, "RowManager");
322
+ let ve = Le;
323
+ var I, U, ae, ce;
324
+ const G = class G extends HTMLElement {
315
325
  constructor() {
316
326
  super();
317
- f(this, I, null);
318
- f(this, X);
327
+ d(this, I, null);
328
+ d(this, U);
319
329
  x(this, "generate", /* @__PURE__ */ a((t) => {
320
330
  if (!t) return;
321
331
  const s = /* @__PURE__ */ a((l) => {
322
332
  const h = /* @__PURE__ */ a((b) => {
323
333
  if (b.querySelector("colgroup")) return;
324
- const g = b.querySelector("tbody tr") || b.querySelector("tr"), m = g ? g.querySelectorAll("th, td").length : 1, S = document.createElement("colgroup"), T = Math.max(Math.floor(b.clientWidth / m), 100);
334
+ const g = b.querySelector("tbody tr") || b.querySelector("tr"), m = g ? g.querySelectorAll("th, td").length : 1, E = document.createElement("colgroup"), T = Math.max(Math.floor(b.clientWidth / m), 100);
325
335
  for (let _ = 0; _ < m; _++) {
326
- const U = document.createElement("col");
327
- U.setAttribute("width", T), S.appendChild(U);
336
+ const Y = document.createElement("col");
337
+ Y.setAttribute("width", T), E.appendChild(Y);
328
338
  }
329
- b.prepend(S);
339
+ b.prepend(E);
330
340
  }, "ensureColgroup"), u = /* @__PURE__ */ a((b) => {
331
341
  if (b.querySelector("thead")) return;
332
342
  const g = document.createElement("thead"), m = b.querySelector("colgroup");
@@ -334,26 +344,26 @@ const j = class j extends HTMLElement {
334
344
  }, "ensureThead");
335
345
  return h(l), u(l), l.classList.add("nine-table-element"), l;
336
346
  }, "initializeTable"), n = t.cloneNode(!0);
337
- p(this, I, s(n)), e(this, I).style.display = "table", e(this, X).initTemplate(e(this, I));
338
- const r = this.querySelector(".ng-container-left"), o = this.querySelector(".ng-container-body"), c = this.querySelector(".ng-container-right"), d = /* @__PURE__ */ a((l, h, u = !1) => {
347
+ y(this, I, s(n)), e(this, I).style.display = "table";
348
+ const r = this.querySelector(".ng-container-left"), o = this.querySelector(".ng-container-body"), c = this.querySelector(".ng-container-right"), f = /* @__PURE__ */ a((l, h, u = !1) => {
339
349
  const b = l.cloneNode(!0), g = Array.from(b.querySelectorAll("colgroup col")), m = [];
340
- return g.forEach((S, T) => {
341
- const _ = S.getAttribute("fixed");
342
- let U = !1;
343
- u ? U = _ !== "left" && _ !== "right" : U = _ === h, U || m.push(T);
344
- }), m.reverse().forEach((S) => {
345
- g[S] && g[S].remove(), b.querySelectorAll("tr").forEach((T) => {
350
+ return g.forEach((E, T) => {
351
+ const _ = E.getAttribute("fixed");
352
+ let Y = !1;
353
+ u ? Y = _ !== "left" && _ !== "right" : Y = _ === h, Y || m.push(T);
354
+ }), m.reverse().forEach((E) => {
355
+ g[E] && g[E].remove(), b.querySelectorAll("tr").forEach((T) => {
346
356
  const _ = T.querySelectorAll("th, td");
347
- _[S] && _[S].remove();
357
+ _[E] && _[E].remove();
348
358
  });
349
359
  }), b;
350
360
  }, "filterTableByFixed");
351
361
  if (o) {
352
- const l = d(e(this, I), null, !0);
353
- o.innerHTML = "", o.appendChild(l), e(this, X).measureAndCacheHeight(o);
362
+ const l = f(e(this, I), null, !0);
363
+ o.innerHTML = "", o.appendChild(l), e(this, U).initialize(e(this, I));
354
364
  }
355
365
  if (r) {
356
- const l = d(e(this, I), "left", !1);
366
+ const l = f(e(this, I), "left", !1);
357
367
  let h = 0;
358
368
  l.querySelectorAll("col").forEach((b) => {
359
369
  const g = parseInt(b.getAttribute("width"), 10);
@@ -363,7 +373,7 @@ const j = class j extends HTMLElement {
363
373
  r.style.flex = `0 0 ${u}px`, r.style.width = `${u}px`;
364
374
  }
365
375
  if (c) {
366
- const l = d(e(this, I), "right", !1);
376
+ const l = f(e(this, I), "right", !1);
367
377
  let h = 0;
368
378
  l.querySelectorAll("col").forEach((b) => {
369
379
  const g = parseInt(b.getAttribute("width"), 10);
@@ -380,7 +390,7 @@ const j = class j extends HTMLElement {
380
390
  (l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
381
391
  }, 0);
382
392
  }, "generate"));
383
- x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, X).getRowHeight(), "getRowHeight"));
393
+ x(this, "getRowHeight", /* @__PURE__ */ a(() => e(this, U).getRowHeight(), "getRowHeight"));
384
394
  /**
385
395
  getRowCount = () => {
386
396
  if (!this.#tableElement) return 0;
@@ -394,21 +404,21 @@ const j = class j extends HTMLElement {
394
404
  const s = this.querySelector(".ng-container-body");
395
405
  s && (s.scrollTop = t);
396
406
  }, "scrollToY"));
397
- f(this, oe, /* @__PURE__ */ a(() => {
398
- e(this, le).call(this), new MutationObserver((t) => {
407
+ d(this, ae, /* @__PURE__ */ a(() => {
408
+ e(this, ce).call(this), new MutationObserver((t) => {
399
409
  const s = /* @__PURE__ */ a(() => {
400
410
  requestAnimationFrame(() => {
401
411
  var u, b, g;
402
412
  const n = this.querySelector(".ng-container-left table"), r = this.querySelector(".ng-container-body table"), o = this.querySelector(".ng-container-right table");
403
413
  if (!r) return;
404
- const c = n ? Array.from(n.querySelectorAll("tr")) : [], d = Array.from(r.querySelectorAll("tr")), l = o ? Array.from(o.querySelectorAll("tr")) : [], h = Math.max(c.length, d.length, l.length);
414
+ const c = n ? Array.from(n.querySelectorAll("tr")) : [], f = Array.from(r.querySelectorAll("tr")), l = o ? Array.from(o.querySelectorAll("tr")) : [], h = Math.max(c.length, f.length, l.length);
405
415
  for (let m = 0; m < h; m++) {
406
- const S = [
416
+ const E = [
407
417
  ((u = c[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
408
- ((b = d[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0,
418
+ ((b = f[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0,
409
419
  ((g = l[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0
410
- ], T = Math.max(...S);
411
- T > 0 && (c[m] && (c[m].style.height = `${T}px`), d[m] && (d[m].style.height = `${T}px`), l[m] && (l[m].style.height = `${T}px`));
420
+ ], T = Math.max(...E);
421
+ T > 0 && (c[m] && (c[m].style.height = `${T}px`), f[m] && (f[m].style.height = `${T}px`), l[m] && (l[m].style.height = `${T}px`));
412
422
  }
413
423
  });
414
424
  }, "syncRowHeights");
@@ -416,8 +426,8 @@ const j = class j extends HTMLElement {
416
426
  n.attributeName === "class" && this.classList.contains("active") && s();
417
427
  }).observe(this, { attributes: !0 });
418
428
  }, "#init"));
419
- f(this, le, /* @__PURE__ */ a(() => {
420
- const t = j.SCROLLBAR_SIZE;
429
+ d(this, ce, /* @__PURE__ */ a(() => {
430
+ const t = G.SCROLLBAR_SIZE;
421
431
  this.innerHTML = `
422
432
  <style>
423
433
  nine-table-sheet {
@@ -542,45 +552,45 @@ const j = class j extends HTMLElement {
542
552
  </div>
543
553
  `;
544
554
  }, "#render"));
545
- p(this, X, new me(this));
555
+ y(this, U, new ve(this));
546
556
  }
547
557
  connectedCallback() {
548
- e(this, oe).call(this);
558
+ e(this, ae).call(this);
549
559
  }
550
560
  disconnectedCallback() {
551
- this.innerHTML = "", G.log("NineTableSheet destroyed.");
561
+ this.innerHTML = "", j.log("NineTableSheet destroyed.");
552
562
  }
553
563
  };
554
- I = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), a(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
555
- let te = j;
556
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", te);
557
- var ae, J;
558
- const ke = class ke extends HTMLElement {
564
+ I = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), a(G, "NineTableSheet"), x(G, "SCROLLBAR_SIZE", 16);
565
+ let ie = G;
566
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
567
+ var he, Q;
568
+ const Ce = class Ce extends HTMLElement {
559
569
  constructor() {
560
570
  super();
561
- f(this, ae, /* @__PURE__ */ a(() => {
571
+ d(this, he, /* @__PURE__ */ a(() => {
562
572
  var t;
563
573
  (t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
564
574
  var o;
565
575
  const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
566
- e(this, J).call(this, r, n);
567
- }), e(this, J).call(this, 0, !1);
576
+ e(this, Q).call(this, r, n);
577
+ }), e(this, Q).call(this, 0, !1);
568
578
  }, "#init"));
569
- f(this, J, /* @__PURE__ */ a((t, s = !1) => {
579
+ d(this, Q, /* @__PURE__ */ a((t, s = !1) => {
570
580
  const n = /* @__PURE__ */ a(() => {
571
581
  const h = Array.from(this.querySelectorAll("nine-table-sheet"));
572
582
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
573
583
  const b = h.filter((g) => g.classList.contains("active"));
574
584
  b.length < 2 || b.forEach((g) => {
575
- const m = parseInt(g.getAttribute("data-index"), 10), S = this.querySelector(`nine-splitter[data-split-index="${m}"]`), T = h[m + 1];
576
- S && T && T.classList.contains("active") && S.style.setProperty("display", "flex");
585
+ const m = parseInt(g.getAttribute("data-index"), 10), E = this.querySelector(`nine-splitter[data-split-index="${m}"]`), T = h[m + 1];
586
+ E && T && T.classList.contains("active") && E.style.setProperty("display", "flex");
577
587
  });
578
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
588
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = r.querySelectorAll(".nine-tab-item"), f = o.querySelectorAll("nine-table-sheet");
579
589
  if (!c[t]) return;
580
590
  if (!s)
581
591
  c.forEach((h, u) => {
582
592
  h.classList.toggle("active", u === t);
583
- }), d.forEach((h, u) => {
593
+ }), f.forEach((h, u) => {
584
594
  const b = u === t;
585
595
  h.classList.toggle("active", b), h.style.flex = b ? "1 1 100%" : "";
586
596
  });
@@ -599,34 +609,34 @@ const ke = class ke extends HTMLElement {
599
609
  }, "#switchSheet"));
600
610
  }
601
611
  connectedCallback() {
602
- e(this, ae).call(this);
612
+ e(this, he).call(this);
603
613
  }
604
614
  };
605
- ae = new WeakMap(), J = new WeakMap(), a(ke, "NineTableSheets");
606
- let we = ke;
607
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", we);
608
- var R, ce, Q, he;
609
- const Le = class Le {
615
+ he = new WeakMap(), Q = new WeakMap(), a(Ce, "NineTableSheets");
616
+ let xe = Ce;
617
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
618
+ var R, de, ee, fe;
619
+ const _e = class _e {
610
620
  constructor(i) {
611
- f(this, R);
612
- f(this, ce, /* @__PURE__ */ a(() => {
613
- e(this, he).call(this), new ResizeObserver((i) => {
621
+ d(this, R);
622
+ d(this, de, /* @__PURE__ */ a(() => {
623
+ e(this, fe).call(this), new ResizeObserver((i) => {
614
624
  for (let t of i)
615
- e(this, R).getAttribute("auto-height") === "true" && e(this, Q).call(this);
625
+ e(this, R).getAttribute("auto-height") === "true" && e(this, ee).call(this);
616
626
  }).observe(e(this, R));
617
627
  }, "#init"));
618
- f(this, Q, /* @__PURE__ */ a(() => {
619
- var d, l;
628
+ d(this, ee, /* @__PURE__ */ a(() => {
629
+ var f, l;
620
630
  const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
621
631
  if (i.length === 0) return;
622
- const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (d = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = te.SCROLLBAR_SIZE, c = t * s + n + r + o;
632
+ const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (f = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : f.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, c = t * s + n + r + o;
623
633
  e(this, R).style.height = `${c}px`;
624
634
  }, "#applyAutoHeight"));
625
- f(this, he, /* @__PURE__ */ a(() => {
626
- const t = Array.from(e(this, R).children).filter((d) => d.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", n = t.length, r = t.map((d, l) => {
635
+ d(this, fe, /* @__PURE__ */ a(() => {
636
+ const t = Array.from(e(this, R).children).filter((f) => f.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", n = t.length, r = t.map((f, l) => {
627
637
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
628
638
  return u + b;
629
- }).join(""), o = t.map((d, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
639
+ }).join(""), o = t.map((f, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
630
640
  e(this, R).shadowRoot.innerHTML = `
631
641
  <style>
632
642
  :host {
@@ -727,63 +737,63 @@ const Le = class Le {
727
737
  <nine-table-footer></nine-table-footer>
728
738
  `;
729
739
  const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
730
- c == null || c.forEach((d, l) => {
740
+ c == null || c.forEach((f, l) => {
731
741
  t[l] && setTimeout(() => {
732
- d.generate(t[l]), s && e(this, Q).call(this);
742
+ f.generate(t[l]), s && e(this, ee).call(this);
733
743
  });
734
744
  });
735
745
  }, "#render"));
736
- p(this, R, i), e(this, ce).call(this);
746
+ y(this, R, i), e(this, de).call(this);
737
747
  }
738
748
  };
739
- R = new WeakMap(), ce = new WeakMap(), Q = new WeakMap(), he = new WeakMap(), a(Le, "LayoutManager");
740
- let ve = Le;
741
- var W, F;
742
- const Ce = class Ce {
749
+ R = new WeakMap(), de = new WeakMap(), ee = new WeakMap(), fe = new WeakMap(), a(_e, "LayoutManager");
750
+ let Se = _e;
751
+ var z, X;
752
+ const Me = class Me {
743
753
  constructor(i) {
744
- f(this, W);
745
- f(this, F, -1);
746
- x(this, "count", /* @__PURE__ */ a(() => e(this, W).rawRecords.length, "count"));
747
- p(this, W, i);
754
+ d(this, z);
755
+ d(this, X, -1);
756
+ x(this, "count", /* @__PURE__ */ a(() => e(this, z).rawRecords.length, "count"));
757
+ y(this, z, i);
748
758
  }
749
759
  get at() {
750
- return e(this, F);
760
+ return e(this, X);
751
761
  }
752
762
  set at(i) {
753
763
  var s, n;
754
- p(this, F, parseInt(i, 10));
755
- const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
756
- t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, F)}"]`) && setTimeout(() => {
764
+ y(this, X, parseInt(i, 10));
765
+ const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
766
+ t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, X)}"]`) && setTimeout(() => {
757
767
  var r, o;
758
- (o = (r = e(this, W).owner).scrollTo_V1) == null || o.call(r, e(this, F));
768
+ (o = (r = e(this, z).owner).scrollTo_V1) == null || o.call(r, e(this, X));
759
769
  });
760
770
  }
761
771
  };
762
- W = new WeakMap(), F = new WeakMap(), a(Ce, "ngRow");
763
- let xe = Ce;
764
- var A, v, q, K, de, O, fe, ee, ue, ge, Z;
772
+ z = new WeakMap(), X = new WeakMap(), a(Me, "ngRow");
773
+ let Re = Me;
774
+ var A, v, q, K, ue, O, ge, te, be, ye, Z;
765
775
  const k = class k {
766
776
  constructor(i, t) {
767
- f(this, A);
768
- f(this, v);
769
- f(this, q, []);
770
- f(this, K, []);
771
- f(this, de, 0);
772
- f(this, O, []);
773
- f(this, fe, /* @__PURE__ */ a(() => {
774
- p(this, O, []);
777
+ d(this, A);
778
+ d(this, v);
779
+ d(this, q, []);
780
+ d(this, K, []);
781
+ d(this, ue, 0);
782
+ d(this, O, []);
783
+ d(this, ge, /* @__PURE__ */ a(() => {
784
+ y(this, O, []);
775
785
  const i = e(this, A).template || [];
776
786
  Array.from(i).forEach((t) => {
777
787
  var s;
778
788
  e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
779
789
  }), (e(this, v).rawRecords || []).forEach((t) => {
780
- t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, O).slice();
790
+ t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
781
791
  });
782
792
  }, "#initialize"));
783
793
  x(this, "set", /* @__PURE__ */ a((i) => {
784
794
  this.clear(), this.add(i, !1);
785
795
  }, "set"));
786
- f(this, ee, /* @__PURE__ */ a(() => ({
796
+ d(this, te, /* @__PURE__ */ a(() => ({
787
797
  rowState: k.ROW_STATE.EMPTY,
788
798
  deleted: !1,
789
799
  filtered: !1,
@@ -793,13 +803,13 @@ const k = class k {
793
803
  _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
794
804
  }), "#getDefaultMeta"));
795
805
  x(this, "reset", /* @__PURE__ */ a(() => {
796
- p(this, q, []), p(this, K, []);
806
+ y(this, q, []), y(this, K, []);
797
807
  }, "reset"));
798
808
  x(this, "clear", /* @__PURE__ */ a(() => {
799
809
  var i;
800
- e(this, v).rawRecords = [], p(this, q, []), p(this, K, []), (i = e(this, v).viewRecords) != null && i.reset && e(this, v).viewRecords.reset();
810
+ e(this, v).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, v).viewRecords) != null && i.reset && e(this, v).viewRecords.reset();
801
811
  }, "clear"));
802
- f(this, ue, /* @__PURE__ */ a((i) => {
812
+ d(this, be, /* @__PURE__ */ a((i) => {
803
813
  var n;
804
814
  Array.isArray(i) || (i = [i]);
805
815
  const t = typeof ((n = e(this, A).fields) == null ? void 0 : n.get) == "function" ? e(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
@@ -810,18 +820,18 @@ const k = class k {
810
820
  }), s.push(o);
811
821
  }), s;
812
822
  }, "#json2Array"));
813
- f(this, ge, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
814
- t.__ng = e(this, ee).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
823
+ d(this, ye, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
824
+ t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
815
825
  }), i), "#defaultInsert"));
816
826
  x(this, "add", /* @__PURE__ */ a((i, t = !0) => {
817
827
  var r;
818
828
  i === void 0 && (i = {});
819
- const s = e(this, ue).call(this, i);
820
- e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this, ge).call(this, s)), this.resetRecords();
829
+ const s = e(this, be).call(this, i);
830
+ e(this, v).rawRecords = e(this, v).rawRecords.concat(e(this, ye).call(this, s)), this.resetRecords();
821
831
  const n = this.count() - 1;
822
832
  return t || s.forEach((o, c) => {
823
- const d = e(this, v).rawRecords[n - c];
824
- d && (d.__ng.rowState = k.ROW_STATE.EMPTY);
833
+ const f = e(this, v).rawRecords[n - c];
834
+ f && (f.__ng.rowState = k.ROW_STATE.EMPTY);
825
835
  }), (r = e(this, v).viewRecords) != null && r.reset && e(this, v).viewRecords.reset(), n;
826
836
  }, "add"));
827
837
  x(this, "delete", /* @__PURE__ */ a((i) => {
@@ -837,9 +847,9 @@ const k = class k {
837
847
  }), this.resetRecords(), (s = e(this, v).viewRecords) != null && s.reset && e(this, v).viewRecords.reset();
838
848
  }, "delete"));
839
849
  x(this, "setValue", /* @__PURE__ */ a((i, t, s) => {
840
- var d;
850
+ var f;
841
851
  i = parseInt(i, 10);
842
- const r = (typeof ((d = e(this, A).fields) == null ? void 0 : d.get) == "function" ? e(this, A).fields.get() : []).indexOf(t);
852
+ const r = (typeof ((f = e(this, A).fields) == null ? void 0 : f.get) == "function" ? e(this, A).fields.get() : []).indexOf(t);
843
853
  if (r < 0) return;
844
854
  const o = this.getValidData()[i];
845
855
  if (!o) return;
@@ -847,14 +857,14 @@ const k = class k {
847
857
  c !== s && o.__ng.rowState !== k.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = k.ROW_STATE.UPDATE), o.v[r] = s, e(this, v).owner.refreshData && e(this, v).owner.refreshData(i);
848
858
  }, "setValue"));
849
859
  x(this, "resetRecords", /* @__PURE__ */ a(() => {
850
- p(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), p(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
860
+ y(this, K, e(this, v).rawRecords.filter((i) => !i.__ng.deleted)), y(this, q, e(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, v).rawRecords.forEach((i, t) => {
851
861
  i.__ng.rowidx = t;
852
862
  }), e(this, q).forEach((i, t) => {
853
863
  i.__ng.i = t;
854
864
  });
855
865
  }, "resetRecords"));
856
866
  x(this, "getValidData", /* @__PURE__ */ a(() => (e(this, q).length === 0 && e(this, v).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
857
- f(this, Z, /* @__PURE__ */ a((i) => {
867
+ d(this, Z, /* @__PURE__ */ a((i) => {
858
868
  var s;
859
869
  if (!i) return i;
860
870
  const t = typeof ((s = e(this, A).fields) == null ? void 0 : s.get) == "function" ? e(this, A).fields.get() : [];
@@ -879,7 +889,7 @@ const k = class k {
879
889
  }
880
890
  return e(this, Z).call(this, s[i]);
881
891
  }, "get"));
882
- p(this, A, i), p(this, v, t), e(this, fe).call(this);
892
+ y(this, A, i), y(this, v, t), e(this, ge).call(this);
883
893
  }
884
894
  get source() {
885
895
  return e(this, Z).call(this, e(this, v).rawRecords);
@@ -888,7 +898,7 @@ const k = class k {
888
898
  this.clear(), this.add(i, !1);
889
899
  }
890
900
  get nextId() {
891
- return ++We(this, de)._;
901
+ return ++Oe(this, ue)._;
892
902
  }
893
903
  get length() {
894
904
  return e(this, q).length;
@@ -897,7 +907,7 @@ const k = class k {
897
907
  return this.length;
898
908
  }
899
909
  };
900
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), de = new WeakMap(), O = new WeakMap(), fe = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
910
+ A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), ge = new WeakMap(), te = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), a(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
901
911
  x(k, "ROW_STATE", {
902
912
  EMPTY: "EMPTY",
903
913
  NORMAL: "NORMAL",
@@ -905,10 +915,10 @@ x(k, "ROW_STATE", {
905
915
  UPDATE: "UPDATE",
906
916
  DELETE: "DELETE"
907
917
  });
908
- let Re = k;
909
- const _e = class _e {
918
+ let Ee = k;
919
+ const He = class He {
910
920
  constructor(i) {
911
- this.owner = i, this.row = new xe(this), this.data = new Re(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
921
+ this.owner = i, this.row = new Re(this), this.data = new Ee(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
912
922
  var t;
913
923
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
914
924
  }, this.setDataSource = (t) => {
@@ -925,37 +935,37 @@ const _e = class _e {
925
935
  }, this.setDataSource([]);
926
936
  }
927
937
  };
928
- a(_e, "ngDataManager");
929
- let Se = _e;
930
- var Y, be;
931
- const He = class He extends HTMLElement {
938
+ a(He, "ngDataManager");
939
+ let Te = He;
940
+ var F, pe;
941
+ const Ie = class Ie extends HTMLElement {
932
942
  constructor() {
933
943
  super();
934
944
  //#created = false;
935
- f(this, Y);
936
- f(this, be);
937
- this.attachShadow({ mode: "open" }), p(this, Y, new Se(this));
945
+ d(this, F);
946
+ d(this, pe);
947
+ this.attachShadow({ mode: "open" }), y(this, F, new Te(this));
938
948
  }
939
949
  connectedCallback() {
940
- p(this, be, new ve(this)), G.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
950
+ y(this, pe, new Se(this)), j.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
941
951
  }
942
952
  disconnectedCallback() {
943
- G.log("NineTable disconnected.");
953
+ j.log("NineTable disconnected.");
944
954
  }
945
955
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
946
956
  get data() {
947
- return e(this, Y).data;
957
+ return e(this, F).data;
948
958
  }
949
959
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
950
960
  get row() {
951
- return e(this, Y).row;
961
+ return e(this, F).row;
952
962
  }
953
963
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
954
964
  get dataManager() {
955
- return e(this, Y);
965
+ return e(this, F);
956
966
  }
957
967
  };
958
- Y = new WeakMap(), be = new WeakMap(), a(He, "NineTable");
959
- let Ee = He;
960
- customElements.get("nine-table") || customElements.define("nine-table", Ee);
968
+ F = new WeakMap(), pe = new WeakMap(), a(Ie, "NineTable");
969
+ let Ae = Ie;
970
+ customElements.get("nine-table") || customElements.define("nine-table", Ae);
961
971
  //# sourceMappingURL=nine-table.js.map