@ninebone/table 0.0.444 β†’ 0.0.446

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.
@@ -5,10 +5,10 @@ var ve = (S) => {
5
5
  var Ee = (S, n, e) => n in S ? xe(S, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[n] = e;
6
6
  var h = (S, n) => xe(S, "name", { value: n, configurable: !0 });
7
7
  var E = (S, n, e) => Ee(S, typeof n != "symbol" ? n + "" : n, e), we = (S, n, e) => n.has(S) || ve("Cannot " + e);
8
- var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), u = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
8
+ var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), y = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
9
9
  var Se = (S, n, e, i) => ({
10
10
  set _(o) {
11
- u(S, n, o, e);
11
+ y(S, n, o, e);
12
12
  },
13
13
  get _() {
14
14
  return t(S, n, i);
@@ -23,28 +23,28 @@ const ce = class ce extends Re.constructor {
23
23
  h(ce, "Trace");
24
24
  let Gt = ce;
25
25
  const dt = new Gt();
26
- var I, B, m, Y, F, V, At, X, qt;
26
+ var W, B, v, F, V, X, At, U, qt;
27
27
  const he = class he extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, I);
30
+ d(this, W);
31
31
  d(this, B, !1);
32
- d(this, m);
33
- d(this, Y);
32
+ d(this, v);
34
33
  d(this, F);
35
34
  d(this, V);
35
+ d(this, X);
36
36
  d(this, At, /* @__PURE__ */ h(() => {
37
- if (!t(this, I)) return;
38
- const e = t(this, I).querySelector(".ng-container-body .ng-part-body");
39
- e && (u(this, V, new ResizeObserver(() => {
37
+ if (!t(this, W)) return;
38
+ const e = t(this, W).querySelector(".ng-container-body .ng-part-body");
39
+ e && (y(this, X, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, V).observe(e));
41
+ })), t(this, X).observe(e));
42
42
  }, "#observeResize"));
43
43
  E(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, I) || !t(this, m) || t(this, B)) return;
45
- const e = t(this, m).container, i = e.querySelector("table");
44
+ if (!t(this, W) || !t(this, v) || t(this, B)) return;
45
+ const e = t(this, v).container, i = e.querySelector("table");
46
46
  if (!i) return;
47
- const o = t(this, m).track, r = t(this, m).thumb, s = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
47
+ const o = t(this, v).track, r = t(this, v).thumb, s = t(this, W).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
48
48
  if (l !== 0 && c > l)
49
49
  s && (s.style.display = "flex");
50
50
  else {
@@ -55,64 +55,64 @@ const he = class he extends HTMLElement {
55
55
  if (a <= 0) return;
56
56
  const f = Math.max(Math.min(a * (l / c), a), 20);
57
57
  r.style.width = `${f}px`;
58
- const g = e.scrollLeft, y = c - l;
59
- let b = 0;
60
- y > 0 && (b = parseInt(g / y * (a - f), 10)), b < 0 && (b = 0);
58
+ const g = e.scrollLeft, b = c - l;
59
+ let u = 0;
60
+ b > 0 && (u = parseInt(g / b * (a - f), 10)), u < 0 && (u = 0);
61
61
  const p = a - f;
62
- b > p && (b = p), r.style.left = `${b}px`, t(this, m).left.disabled = b === 0, t(this, m).right.disabled = b >= p - 1;
62
+ u > p && (u = p), r.style.left = `${u}px`, t(this, v).left.disabled = u === 0, t(this, v).right.disabled = u >= p - 1;
63
63
  }, "refresh"));
64
- d(this, X, /* @__PURE__ */ h((e) => {
65
- if (!t(this, m)) return !1;
66
- const i = t(this, m).container, o = i.querySelector("table");
64
+ d(this, U, /* @__PURE__ */ h((e) => {
65
+ if (!t(this, v)) return !1;
66
+ const i = t(this, v).container, o = i.querySelector("table");
67
67
  if (!o) return !1;
68
- const r = t(this, m).track.getBoundingClientRect(), s = t(this, m).thumb.clientWidth;
68
+ const r = t(this, v).track.getBoundingClientRect(), s = t(this, v).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
71
  const c = r.width - s;
72
- l > c && (l = c), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= c - 1;
72
+ l > c && (l = c), l = parseInt(l, 10), t(this, v).thumb.style.left = `${l}px`, t(this, v).left.disabled = l === 0, t(this, v).right.disabled = l >= c - 1;
73
73
  const a = i.clientWidth, g = o.scrollWidth - a;
74
74
  return c > 0 && g > 0 && (i.scrollLeft = l / c * g), l > 0 && l < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, qt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((o) => {
78
- clearInterval(t(this, Y)), clearInterval(t(this, F));
79
- const r = parseInt(t(this, m).thumb.style.left || 0, 10);
80
- t(this, X).call(this, r + o), u(this, Y, setInterval(() => {
81
- clearInterval(t(this, Y)), u(this, F, setInterval(() => {
82
- const s = parseInt(t(this, m).thumb.style.left || 0, 10);
83
- t(this, X).call(this, s + o) || clearInterval(t(this, F));
78
+ clearInterval(t(this, F)), clearInterval(t(this, V));
79
+ const r = parseInt(t(this, v).thumb.style.left || 0, 10);
80
+ t(this, U).call(this, r + o), y(this, F, setInterval(() => {
81
+ clearInterval(t(this, F)), y(this, V, setInterval(() => {
82
+ const s = parseInt(t(this, v).thumb.style.left || 0, 10);
83
+ t(this, U).call(this, s + o) || clearInterval(t(this, V));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), i = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, Y)), clearInterval(t(this, F));
87
+ clearInterval(t(this, F)), clearInterval(t(this, V));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, m).left.addEventListener(o, i), t(this, m).right.addEventListener(o, i), t(this, m).track.addEventListener(o, i);
91
- }), t(this, m).left.addEventListener("mousedown", (o) => {
90
+ t(this, v).left.addEventListener(o, i), t(this, v).right.addEventListener(o, i), t(this, v).track.addEventListener(o, i);
91
+ }), t(this, v).left.addEventListener("mousedown", (o) => {
92
92
  o.button === 0 && e(-20);
93
- }), t(this, m).right.addEventListener("mousedown", (o) => {
93
+ }), t(this, v).right.addEventListener("mousedown", (o) => {
94
94
  o.button === 0 && e(20);
95
- }), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (o) => {
95
+ }), t(this, v).left.addEventListener("touchstart", () => e(-20)), t(this, v).right.addEventListener("touchstart", () => e(20)), t(this, v).track.addEventListener("mousedown", (o) => {
96
96
  if (o.button !== 0) return;
97
97
  o.preventDefault();
98
- const r = t(this, m).track.getBoundingClientRect(), s = t(this, m).thumb.clientWidth;
99
- t(this, X).call(this, o.clientX - r.left - s / 2);
100
- }), t(this, m).thumb.addEventListener("mousedown", (o) => {
98
+ const r = t(this, v).track.getBoundingClientRect(), s = t(this, v).thumb.clientWidth;
99
+ t(this, U).call(this, o.clientX - r.left - s / 2);
100
+ }), t(this, v).thumb.addEventListener("mousedown", (o) => {
101
101
  if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), u(this, B, !0), this.shiftX = o.clientX - t(this, m).thumb.getBoundingClientRect().left;
102
+ o.stopPropagation(), o.preventDefault(), y(this, B, !0), this.shiftX = o.clientX - t(this, v).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ h((l) => {
104
104
  if (!t(this, B)) return;
105
- const c = t(this, m).track.getBoundingClientRect();
106
- t(this, X).call(this, l.clientX - c.left - this.shiftX);
105
+ const c = t(this, v).track.getBoundingClientRect();
106
+ t(this, U).call(this, l.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), s = /* @__PURE__ */ h(() => {
108
- u(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
108
+ y(this, B, !1), i(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", s);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (u(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, I)) return;
115
+ if (y(this, W, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, W)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,12 +177,12 @@ const he = class he extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const i = t(this, I).querySelector(".ng-container-body .ng-part-body");
180
+ const i = t(this, W).querySelector(".ng-container-body .ng-part-body");
181
181
  if (!i) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- u(this, m, {
185
+ y(this, v, {
186
186
  container: i,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -195,27 +195,27 @@ const he = class he extends HTMLElement {
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, V) && t(this, V).disconnect();
198
+ t(this, X) && t(this, X).disconnect();
199
199
  }
200
200
  };
201
- I = new WeakMap(), B = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), F = new WeakMap(), V = new WeakMap(), At = new WeakMap(), X = new WeakMap(), qt = new WeakMap(), h(he, "NineTableHScrollBar");
201
+ W = new WeakMap(), B = new WeakMap(), v = new WeakMap(), F = new WeakMap(), V = new WeakMap(), X = new WeakMap(), At = new WeakMap(), U = new WeakMap(), qt = new WeakMap(), h(he, "NineTableHScrollBar");
202
202
  let Jt = he;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Jt);
204
- var N, et, U, R, ft, gt, Tt;
204
+ var P, et, j, A, ft, ut, Tt;
205
205
  const de = class de extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, N);
208
+ d(this, P);
209
209
  d(this, et);
210
- d(this, U, !1);
211
- d(this, R);
210
+ d(this, j, !1);
211
+ d(this, A);
212
212
  d(this, ft, 0);
213
- d(this, gt, 0);
213
+ d(this, ut, 0);
214
214
  E(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (!t(this, N) || !t(this, R)) return;
216
- const e = t(this, R).container, i = t(this, R).track, o = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
215
+ if (!t(this, P) || !t(this, A)) return;
216
+ const e = t(this, A).container, i = t(this, A).track, o = t(this, A).thumb, r = e.clientHeight, l = (t(this, P).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
217
217
  if (a <= r) {
218
- o.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
218
+ o.style.display = "none", t(this, A).top.disabled = !0, t(this, A).bottom.disabled = !0;
219
219
  return;
220
220
  } else
221
221
  o.style.display = "block";
@@ -223,53 +223,53 @@ const de = class de extends HTMLElement {
223
223
  if (f <= 0) return;
224
224
  const g = Math.max(Math.min(f * (r / a), f), 20);
225
225
  o.style.height = `${g}px`;
226
- const y = e.scrollTop, b = Math.max(a - r, 1);
226
+ const b = e.scrollTop, u = Math.max(a - r, 1);
227
227
  let p = 0;
228
- b > 0 && (p = y / b * (f - g));
229
- const v = f - g;
230
- p < 0 && (p = 0), p > v && (p = v), o.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
228
+ u > 0 && (p = b / u * (f - g));
229
+ const x = f - g;
230
+ p < 0 && (p = 0), p > x && (p = x), o.style.top = `${p}px`, t(this, A).top.disabled = b <= 0, t(this, A).bottom.disabled = b >= u - 1;
231
231
  }, "refresh"));
232
232
  d(this, Tt, /* @__PURE__ */ h(() => {
233
- const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
234
- const r = (t(this, N).data.get() || []).length, s = t(this, et).getRowHeight();
233
+ const e = t(this, A).container, i = /* @__PURE__ */ h(() => {
234
+ const r = (t(this, P).data.get() || []).length, s = t(this, et).getRowHeight();
235
235
  return r * s;
236
236
  }, "getContentHeight");
237
237
  e.addEventListener("scroll", () => {
238
- t(this, U) || this.refresh();
239
- }), t(this, R).thumb.addEventListener("mousedown", (o) => {
238
+ t(this, j) || this.refresh();
239
+ }), t(this, A).thumb.addEventListener("mousedown", (o) => {
240
240
  if (o.button !== 0) return;
241
- o.stopPropagation(), o.preventDefault(), u(this, U, !0), u(this, ft, o.clientY), u(this, gt, e.scrollTop);
241
+ o.stopPropagation(), o.preventDefault(), y(this, j, !0), y(this, ft, o.clientY), y(this, ut, e.scrollTop);
242
242
  const r = /* @__PURE__ */ h((l) => {
243
- if (!t(this, U)) return;
244
- const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p = i(), v = Math.max(p - b, 1);
245
- if (g > 0 && v > 0) {
246
- const M = y / g * v;
247
- let x = t(this, gt) + M;
248
- const tt = Math.max(0, p - b);
249
- x < 0 && (x = 0), x > tt && (x = tt), e.scrollTop = x;
243
+ if (!t(this, j)) return;
244
+ const c = t(this, A).track.getBoundingClientRect(), a = t(this, A).thumb.clientHeight, g = c.height - a, b = l.clientY - t(this, ft), u = e.clientHeight, p = i(), x = Math.max(p - u, 1);
245
+ if (g > 0 && x > 0) {
246
+ const R = b / g * x;
247
+ let m = t(this, ut) + R;
248
+ const z = Math.max(0, p - u);
249
+ m < 0 && (m = 0), m > z && (m = z), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), s = /* @__PURE__ */ h(() => {
253
- u(this, U, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
253
+ y(this, j, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", s), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", s);
256
- }), t(this, R).track.addEventListener("mousedown", (o) => {
257
- if (o.button !== 0 || o.target === t(this, R).thumb) return;
258
- const r = t(this, R).track.getBoundingClientRect(), s = t(this, R).thumb.clientHeight, l = o.clientY - r.top - s / 2, a = r.height - s, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
259
- if (a > 0 && y > 0) {
260
- const b = Math.max(0, Math.min(1, l / a));
261
- e.scrollTop = b * y;
256
+ }), t(this, A).track.addEventListener("mousedown", (o) => {
257
+ if (o.button !== 0 || o.target === t(this, A).thumb) return;
258
+ const r = t(this, A).track.getBoundingClientRect(), s = t(this, A).thumb.clientHeight, l = o.clientY - r.top - s / 2, a = r.height - s, f = e.clientHeight, g = i(), b = Math.max(g - f, 1);
259
+ if (a > 0 && b > 0) {
260
+ const u = Math.max(0, Math.min(1, l / a));
261
+ e.scrollTop = u * b;
262
262
  }
263
263
  this.refresh();
264
- }), t(this, R).top.addEventListener("click", () => {
264
+ }), t(this, A).top.addEventListener("click", () => {
265
265
  e.scrollTop -= 40;
266
- }), t(this, R).bottom.addEventListener("click", () => {
266
+ }), t(this, A).bottom.addEventListener("click", () => {
267
267
  e.scrollTop += 40;
268
268
  });
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- u(this, N, this.getRootNode().host), u(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ y(this, P, this.getRootNode().host), y(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,12 +334,12 @@ const de = class de extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const i = t(this, N).shadowRoot.querySelector(".ng-container-body .ng-part-body");
337
+ const i = t(this, P).shadowRoot.querySelector(".ng-container-body .ng-part-body");
338
338
  if (!i) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
- u(this, R, {
342
+ y(this, A, {
343
343
  container: i,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -350,19 +350,19 @@ const de = class de extends HTMLElement {
350
350
  e();
351
351
  }
352
352
  };
353
- N = new WeakMap(), et = new WeakMap(), U = new WeakMap(), R = new WeakMap(), ft = new WeakMap(), gt = new WeakMap(), Tt = new WeakMap(), h(de, "NineTableVScrollBar");
353
+ P = new WeakMap(), et = new WeakMap(), j = new WeakMap(), A = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), Tt = new WeakMap(), h(de, "NineTableVScrollBar");
354
354
  let Qt = de;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Qt);
356
- var z, w, W, T, P, j, ut, nt, kt, Lt, Ct, bt, yt, Ht, Mt, pt, _t, it, mt, $t;
356
+ var N, w, O, k, D, K, gt, nt, kt, Lt, Ct, bt, yt, Ht, Mt, pt, _t, it, mt, $t;
357
357
  const fe = class fe {
358
358
  constructor(n) {
359
- d(this, z);
359
+ d(this, N);
360
360
  d(this, w);
361
- d(this, W, /* @__PURE__ */ new Map());
362
- d(this, T, null);
363
- d(this, P, null);
364
- d(this, j, 0);
365
- d(this, ut, 40);
361
+ d(this, O, /* @__PURE__ */ new Map());
362
+ d(this, k, null);
363
+ d(this, D, null);
364
+ d(this, K, 0);
365
+ d(this, gt, 40);
366
366
  d(this, nt, !1);
367
367
  d(this, kt, 3);
368
368
  E(this, "refresh", /* @__PURE__ */ h(() => {
@@ -371,7 +371,7 @@ const fe = class fe {
371
371
  n && (t(this, bt).call(this), t(this, it).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
372
372
  }, "refresh"));
373
373
  E(this, "initialize", /* @__PURE__ */ h(() => {
374
- u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
374
+ y(this, k, null), t(this, O).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
375
375
  const r = t(this, w).querySelector(o);
376
376
  if (!r) return;
377
377
  const s = r.querySelector(".ng-part-body table");
@@ -379,7 +379,7 @@ const fe = class fe {
379
379
  const l = s.querySelector("tbody.bindable-tbody");
380
380
  if (!l) return;
381
381
  const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
382
- t(this, W).set(o, a);
382
+ t(this, O).set(o, a);
383
383
  });
384
384
  const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), i = t(this, w).querySelector(".ng-container-right .ng-part-body");
385
385
  if (n) {
@@ -397,40 +397,40 @@ const fe = class fe {
397
397
  }
398
398
  }, "initialize"));
399
399
  d(this, Lt, /* @__PURE__ */ h((n, e) => {
400
- const i = t(this, W).get(e);
400
+ const i = t(this, O).get(e);
401
401
  if (!i || i.length === 0) return;
402
402
  const o = n.querySelector(".ng-part-body tbody.bindable-tbody");
403
403
  if (!o) return;
404
404
  o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
405
405
  const r = o.querySelector("tr.nodata"), s = document.createDocumentFragment();
406
- for (let l = 0; l < t(this, ut); l++)
406
+ for (let l = 0; l < t(this, gt); l++)
407
407
  i.forEach((c) => {
408
408
  s.appendChild(c.cloneNode(!0));
409
409
  });
410
410
  r ? r.before(s) : o.appendChild(s);
411
411
  }, "#renderRows"));
412
412
  d(this, Ct, /* @__PURE__ */ h((n) => {
413
- if (t(this, T) !== null && t(this, T) > 0)
414
- return t(this, T);
415
- const e = t(this, W).get(".ng-container-body");
413
+ if (t(this, k) !== null && t(this, k) > 0)
414
+ return t(this, k);
415
+ const e = t(this, O).get(".ng-container-body");
416
416
  if (!e || e.length === 0) return 24;
417
417
  const i = n.querySelector("tbody.bindable-tbody");
418
418
  if (!i) return 24;
419
- i.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
419
+ i.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
420
420
  const o = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
421
- e.forEach((y) => {
422
- r.appendChild(y.cloneNode(!0));
421
+ e.forEach((b) => {
422
+ r.appendChild(b.cloneNode(!0));
423
423
  }), o ? o.before(r) : i.appendChild(r);
424
424
  const s = t(this, w), l = s.style.display, c = s.style.visibility, a = s.style.position;
425
425
  (l === "none" || window.getComputedStyle(s).display === "none") && (s.style.display = "block", s.style.visibility = "hidden", s.style.position = "absolute");
426
426
  let f = 0;
427
427
  const g = i.querySelectorAll("tr:not(.nodata)");
428
- return g.forEach((y) => {
429
- f += y.offsetHeight || y.getBoundingClientRect().height;
430
- }), g.forEach((y) => y.remove()), s.style.display = l, s.style.visibility = c, s.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
428
+ return g.forEach((b) => {
429
+ f += b.offsetHeight || b.getBoundingClientRect().height;
430
+ }), g.forEach((b) => b.remove()), s.style.display = l, s.style.visibility = c, s.style.position = a, y(this, k, f > 0 ? f : 24), t(this, yt).call(this), t(this, k);
431
431
  }, "#measureAndCacheHeight"));
432
432
  d(this, bt, /* @__PURE__ */ h(() => {
433
- const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, o = e * i;
433
+ const e = (t(this, N).data.get() || []).length, i = t(this, k) || 24, o = e * i;
434
434
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
435
435
  const s = t(this, w).querySelector(r);
436
436
  if (!s) return;
@@ -439,40 +439,40 @@ const fe = class fe {
439
439
  });
440
440
  }, "#updateVirtualScrollHeight"));
441
441
  d(this, yt, /* @__PURE__ */ h(() => {
442
- if (t(this, j) > 0 && t(this, T) > 0) {
443
- const n = Math.ceil(t(this, j) / t(this, T));
444
- u(this, ut, n + t(this, kt));
442
+ if (t(this, K) > 0 && t(this, k) > 0) {
443
+ const n = Math.ceil(t(this, K) / t(this, k));
444
+ y(this, gt, n + t(this, kt));
445
445
  }
446
446
  }, "#updateRowCount"));
447
447
  d(this, Ht, /* @__PURE__ */ h(() => {
448
- var l, c, a, f, g, y;
448
+ var l, c, a, f, g, b;
449
449
  const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), i = t(this, w).querySelector(".ng-container-right .ng-part-body table");
450
450
  if (e) {
451
- const b = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), v = i ? Array.from(i.querySelectorAll("tbody tr")) : [], M = Math.max(b.length, p.length, v.length);
452
- for (let x = 0; x < M; x++) {
453
- const tt = [
454
- ((l = b[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
455
- ((c = p[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
456
- ((a = v[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0
457
- ], O = Math.max(...tt);
458
- O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
451
+ const u = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = i ? Array.from(i.querySelectorAll("tbody tr")) : [], R = Math.max(u.length, p.length, x.length);
452
+ for (let m = 0; m < R; m++) {
453
+ const z = [
454
+ ((l = u[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
455
+ ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
456
+ ((a = x[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0
457
+ ], _ = Math.max(...z);
458
+ _ > 0 && (u[m] && (u[m].style.height = `${_}px`), p[m] && (p[m].style.height = `${_}px`), x[m] && (x[m].style.height = `${_}px`));
459
459
  }
460
460
  }
461
461
  const o = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), s = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
462
462
  if (r) {
463
- const b = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), v = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], M = Math.max(b.length, p.length, v.length);
464
- for (let x = 0; x < M; x++) {
465
- const tt = [
466
- ((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
467
- ((g = p[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
468
- ((y = v[x]) == null ? void 0 : y.getBoundingClientRect().height) || 0
469
- ], O = Math.max(...tt);
470
- O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
463
+ const u = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), x = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], R = Math.max(u.length, p.length, x.length);
464
+ for (let m = 0; m < R; m++) {
465
+ const z = [
466
+ ((f = u[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
467
+ ((g = p[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
468
+ ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
469
+ ], _ = Math.max(...z);
470
+ _ > 0 && (u[m] && (u[m].style.height = `${_}px`), p[m] && (p[m].style.height = `${_}px`), x[m] && (x[m].style.height = `${_}px`));
471
471
  }
472
472
  }
473
473
  }, "#syncRowHeights"));
474
474
  d(this, Mt, /* @__PURE__ */ h(() => {
475
- !t(this, w) || !(t(this, w) instanceof HTMLElement) || (u(this, P, new ResizeObserver((n) => {
475
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (y(this, D, new ResizeObserver((n) => {
476
476
  for (const e of n) {
477
477
  const i = e.target;
478
478
  if (!i.classList.contains("active")) continue;
@@ -482,10 +482,10 @@ const fe = class fe {
482
482
  const s = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
483
483
  s && (r += s.offsetHeight), l && (r += l.offsetHeight);
484
484
  const c = Math.max(o - r, 100);
485
- t(this, j) !== c && (u(this, j, c), t(this, yt).call(this), t(this, T) !== null && t(this, pt).call(this));
485
+ t(this, K) !== c && (y(this, K, c), t(this, yt).call(this), t(this, k) !== null && t(this, pt).call(this));
486
486
  }
487
487
  }
488
- })), t(this, P).observe(t(this, w)));
488
+ })), t(this, D).observe(t(this, w)));
489
489
  }, "#initResizeObserver"));
490
490
  d(this, pt, /* @__PURE__ */ h(() => {
491
491
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
@@ -500,45 +500,60 @@ const fe = class fe {
500
500
  if (!i) return;
501
501
  const o = i.querySelector(".ng-part-body tbody.bindable-tbody");
502
502
  if (!o) return;
503
- const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), s = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
503
+ const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), s = ((a = t(this, O).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, N).data.get() || []).length;
504
504
  r.forEach((f, g) => {
505
- const y = n + Math.floor(g / s);
506
- if (y >= c) {
505
+ const b = n + Math.floor(g / s);
506
+ if (b >= c) {
507
507
  f.style.display = "none";
508
508
  return;
509
509
  }
510
- const b = t(this, z).data.get(y);
511
- f.style.display = "", t(this, mt).call(this, f, b, y);
510
+ const u = t(this, N).data.get(b);
511
+ f.style.display = "", t(this, mt).call(this, f, u, b);
512
512
  });
513
513
  });
514
514
  }, "#adjustBufferRows"));
515
515
  d(this, it, /* @__PURE__ */ h((n) => {
516
516
  var c;
517
- const e = t(this, T);
517
+ const e = t(this, k);
518
518
  if (!e || e <= 0) return;
519
- const o = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), s = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
519
+ const o = (t(this, N).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), s = r * e, l = ((c = t(this, O).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
520
520
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
521
521
  const f = t(this, w).querySelector(a);
522
522
  if (!f) return;
523
523
  const g = f.querySelector(".ng-part-body tbody.bindable-tbody");
524
524
  if (!g) return;
525
- g.style.transform = `translateY(${s}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((b, p) => {
526
- const v = r + Math.floor(p / l);
527
- if (v >= o) {
528
- b.style.display = "none";
525
+ g.style.transform = `translateY(${s}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((u, p) => {
526
+ const x = r + Math.floor(p / l);
527
+ if (x >= o) {
528
+ u.style.display = "none";
529
529
  return;
530
530
  }
531
- const M = t(this, z).data.get(v);
532
- b.style.display = "", t(this, mt).call(this, b, M, v);
531
+ const R = t(this, N).data.get(x);
532
+ u.style.display = "", t(this, mt).call(this, u, R, x);
533
533
  });
534
- }), t(this, nt) || (u(this, nt, !0), setTimeout(() => {
535
- t(this, _t).call(this, r), u(this, nt, !1);
534
+ }), t(this, nt) || (y(this, nt, !0), setTimeout(() => {
535
+ t(this, _t).call(this, r), y(this, nt, !1);
536
536
  }, 0));
537
537
  }, "#handleScroll"));
538
+ /**
539
+ #bindRowData = (tr, record, dataIndex) => {
540
+ tr.dataset.row = dataIndex;
541
+
542
+ Array.from(tr.cells).forEach((cell, cellIndex) => {
543
+ const bindKey = cell.dataset.bind;
544
+ if (bindKey && record && record[bindKey] !== undefined) {
545
+ cell.textContent = record[bindKey];
546
+ } else {
547
+ cell.textContent = record ? (record[Object.keys(record)[cellIndex]] ?? `R${dataIndex}C${cellIndex}`) : `ν–‰ ${dataIndex + 1}`;
548
+ }
549
+ cell.dataset.row = dataIndex;
550
+ });
551
+ }; */
538
552
  d(this, mt, /* @__PURE__ */ h((n, e, i) => {
539
- n.dataset.row = i, Array.from(n.cells).forEach((o, r) => {
540
- const s = o.dataset.bind;
541
- s && e && e[s] !== void 0 ? o.textContent = e[s] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `ν–‰ ${i + 1}`, o.dataset.row = i;
553
+ n.dataset.row = i, n.data = e, Array.from(n.cells).forEach((o, r) => {
554
+ o.dataset.row = i, o.querySelector(':scope > [is^="cell-"], :scope > [class*="cell-"], :scope > cell-');
555
+ const s = Array.from(o.children).find((l) => l.tagName.toLowerCase().startsWith("cell-") || typeof l.reset == "function");
556
+ s && typeof s.reset == "function" && s.reset();
542
557
  });
543
558
  }, "#bindRowData"));
544
559
  d(this, $t, /* @__PURE__ */ h(() => {
@@ -547,110 +562,118 @@ const fe = class fe {
547
562
  if (!e) return;
548
563
  const o = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), s = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, s.length);
549
564
  for (let g = 0; g < l; g++) {
550
- const y = [
565
+ const b = [
551
566
  ((c = o[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
552
567
  ((a = r[g]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
553
568
  ((f = s[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
554
- ], b = Math.max(...y);
555
- b > 0 && (o[g] && (o[g].style.height = `${b}px`), r[g] && (r[g].style.height = `${b}px`), s[g] && (s[g].style.height = `${b}px`));
569
+ ], u = Math.max(...b);
570
+ u > 0 && (o[g] && (o[g].style.height = `${u}px`), r[g] && (r[g].style.height = `${u}px`), s[g] && (s[g].style.height = `${u}px`));
556
571
  }
557
572
  }, "#syncHeaderHeights"));
558
573
  E(this, "destroy", /* @__PURE__ */ h(() => {
559
- t(this, P) && (t(this, P).disconnect(), u(this, P, null));
574
+ t(this, D) && (t(this, D).disconnect(), y(this, D, null));
560
575
  }, "destroy"));
561
- u(this, z, n.getRootNode().host), u(this, w, n), t(this, Mt).call(this);
576
+ y(this, N, n.getRootNode().host), y(this, w, n), t(this, Mt).call(this);
562
577
  }
563
578
  getRowHeight() {
564
- return t(this, T);
579
+ return t(this, k);
565
580
  }
566
581
  templateLength(n = ".ng-container-body") {
567
582
  var e;
568
- return ((e = t(this, W).get(n)) == null ? void 0 : e.length) || 1;
583
+ return ((e = t(this, O).get(n)) == null ? void 0 : e.length) || 1;
569
584
  }
570
585
  };
571
- z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
586
+ N = new WeakMap(), w = new WeakMap(), O = new WeakMap(), k = new WeakMap(), D = new WeakMap(), K = new WeakMap(), gt = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
572
587
  let te = fe;
573
- var It, ot;
574
- const _ = class _ {
588
+ const It = class It {
575
589
  /**
576
590
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
577
591
  */
578
592
  static compileAll(n) {
579
- return Array.isArray(n) ? n.map((e) => _.compile(e)) : [];
593
+ return Array.isArray(n) ? n.map((e) => It.compile(e)) : [];
580
594
  }
581
595
  /**
582
596
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
583
597
  */
584
598
  static compile(n) {
585
- var o, r, s, l;
586
599
  if (!n) return null;
587
- const e = n.cloneNode(!0);
588
- return t(o = _, It).call(o, e), t(r = _, ot).call(r, e, "thead"), t(s = _, ot).call(s, e, "tbody"), t(l = _, ot).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
589
- const f = c.getAttribute("fixed");
590
- f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((g) => {
591
- g.setAttribute("fixed", f);
600
+ const e = /* @__PURE__ */ h((l) => {
601
+ l.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((a) => {
602
+ const f = a.getAttribute("cell-type") || "renderer";
603
+ if (a.children.length > 0 && a.firstElementChild.tagName.includes("-")) return;
604
+ let g = `cell-${f}`;
605
+ const b = a.getAttribute("data-bind"), u = a.getAttribute("data-expr"), p = a.getAttribute("maxbyte"), x = a.getAttribute("type");
606
+ let R = [];
607
+ b && R.push(`data-bind="${b}"`), u && R.push(`data-expr="${u}"`), p && R.push(`maxbyte="${p}"`), x && R.push(`type="${x}"`), a.innerHTML = `<${g} ${R.join(" ")}></${g}>`;
608
+ });
609
+ }, "processCellTypes"), i = /* @__PURE__ */ h((l) => {
610
+ if (!l.querySelector("colgroup")) {
611
+ const c = l.querySelector("tbody tr") || l.querySelector("tr"), a = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), g = Math.max(Math.floor(l.clientWidth / a), 100);
612
+ for (let b = 0; b < a; b++) {
613
+ const u = document.createElement("col");
614
+ u.setAttribute("width", g), f.appendChild(u);
615
+ }
616
+ l.prepend(f);
617
+ }
618
+ if (!l.querySelector("thead")) {
619
+ const c = document.createElement("thead"), a = l.querySelector("colgroup");
620
+ a ? a.after(c) : l.prepend(c);
621
+ }
622
+ l.classList.add("nine-table-element"), l.style.display = "table";
623
+ }, "ensureTableStructure"), o = /* @__PURE__ */ h((l, c) => {
624
+ const a = Array.from(l.querySelectorAll(c + " tr")), f = Array.from(l.querySelectorAll(c + " th," + c + " td")), g = a.length;
625
+ if (g === 0 || f.length === 0) return;
626
+ let b = 0;
627
+ f.forEach((p) => {
628
+ b += p.colSpan || 1;
592
629
  });
593
- }), e;
630
+ const u = Array.from(Array(g), () => Array(b).fill(null));
631
+ a.forEach((p) => {
632
+ const x = p.sectionRowIndex;
633
+ let R = 0;
634
+ Array.from(p.querySelectorAll("th,td")).forEach((m) => {
635
+ for (let I = 0; I < u[x].length; I++)
636
+ if (u[x][I] === null) {
637
+ R = I;
638
+ break;
639
+ }
640
+ const z = m.rowSpan || 1, _ = m.colSpan || 1;
641
+ for (let I = 0; I < z; I++)
642
+ for (let ct = 0; ct < _; ct++)
643
+ x + I < g && R + ct < b && (u[x + I][R + ct] = I === 0 && ct === 0 ? "1" : "0");
644
+ });
645
+ }), a.forEach((p) => {
646
+ const x = p.sectionRowIndex;
647
+ Array.from(p.querySelectorAll("th,td")).forEach((R) => {
648
+ for (let m = 0; m < u[x].length; m++)
649
+ if (u[x][m] === "1") {
650
+ R.dataset.col = m, u[x][m] = "0";
651
+ break;
652
+ }
653
+ });
654
+ });
655
+ }, "resetColIndex"), r = n.cloneNode(!0);
656
+ return i(r), e(r), o(r, "thead"), o(r, "tbody"), o(r, "tfoot"), Array.from(r.querySelectorAll("colgroup col")).forEach((l, c) => {
657
+ const a = l.getAttribute("fixed");
658
+ a && r.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
659
+ f.setAttribute("fixed", a);
660
+ });
661
+ }), r;
594
662
  }
663
+ // 🎯 [μΆ”κ°€] td/th에 μ„ μ–Έλœ cell-type 속성을 읽어 μ»€μŠ€ν…€ νƒœκ·Έλ‘œ μžλ™ 감싸기
595
664
  };
596
- It = new WeakMap(), ot = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
597
- if (!n.querySelector("colgroup")) {
598
- const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
599
- for (let s = 0; s < i; s++) {
600
- const l = document.createElement("col");
601
- l.setAttribute("width", r), o.appendChild(l);
602
- }
603
- n.prepend(o);
604
- }
605
- if (!n.querySelector("thead")) {
606
- const e = document.createElement("thead"), i = n.querySelector("colgroup");
607
- i ? i.after(e) : n.prepend(e);
608
- }
609
- n.classList.add("nine-table-element"), n.style.display = "table";
610
- }, "#ensureTableStructure")), d(_, ot, /* @__PURE__ */ h((n, e) => {
611
- const i = Array.from(n.querySelectorAll(e + " tr")), o = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
612
- if (r === 0 || o.length === 0) return;
613
- let s = 0;
614
- o.forEach((c) => {
615
- s += c.colSpan || 1;
616
- });
617
- const l = Array.from(Array(r), () => Array(s).fill(null));
618
- i.forEach((c) => {
619
- const a = c.sectionRowIndex;
620
- let f = 0;
621
- Array.from(c.querySelectorAll("th,td")).forEach((g) => {
622
- for (let p = 0; p < l[a].length; p++)
623
- if (l[a][p] === null) {
624
- f = p;
625
- break;
626
- }
627
- const y = g.rowSpan || 1, b = g.colSpan || 1;
628
- for (let p = 0; p < y; p++)
629
- for (let v = 0; v < b; v++)
630
- a + p < r && f + v < s && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
631
- });
632
- }), i.forEach((c) => {
633
- const a = c.sectionRowIndex;
634
- Array.from(c.querySelectorAll("th,td")).forEach((f) => {
635
- for (let g = 0; g < l[a].length; g++)
636
- if (l[a][g] === "1") {
637
- f.dataset.col = g, l[a][g] = "0";
638
- break;
639
- }
640
- });
641
- });
642
- }, "#resetColIndex"));
643
- let ee = _;
644
- var Wt, K, Z, Ot, zt, st, Bt, Nt;
665
+ h(It, "TableCompiler");
666
+ let ee = It;
667
+ var Wt, Z, G, Ot, Nt, ot, zt, Bt;
645
668
  const ht = class ht extends HTMLElement {
646
669
  constructor() {
647
670
  super();
648
671
  d(this, Wt);
649
- d(this, K, null);
650
- d(this, Z);
672
+ d(this, Z, null);
673
+ d(this, G);
651
674
  E(this, "invalidate", /* @__PURE__ */ h(() => {
652
675
  var e, i;
653
- t(this, Z).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (i = this.querySelector("nine-table-vscrollbar")) == null || i.refresh();
676
+ t(this, G).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (i = this.querySelector("nine-table-vscrollbar")) == null || i.refresh();
654
677
  }, "invalidate"));
655
678
  d(this, Ot, /* @__PURE__ */ h(() => {
656
679
  [
@@ -662,18 +685,18 @@ const ht = class ht extends HTMLElement {
662
685
  if (!r) return;
663
686
  r.innerHTML = "";
664
687
  const s = document.createElement("div");
665
- s.className = "ng-part-header", s.appendChild(t(this, st).call(this, t(this, K), o, "header"));
688
+ s.className = "ng-part-header", s.appendChild(t(this, ot).call(this, t(this, Z), o, "header"));
666
689
  const l = document.createElement("div");
667
690
  l.className = "ng-part-body";
668
691
  const c = document.createElement("div");
669
- c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, st).call(this, t(this, K), o, "body"));
692
+ c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ot).call(this, t(this, Z), o, "body"));
670
693
  const a = document.createElement("div");
671
694
  a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", c.appendChild(a), l.appendChild(c);
672
695
  const f = document.createElement("div");
673
- f.className = "ng-part-footer", f.appendChild(t(this, st).call(this, t(this, K), o, "footer")), r.appendChild(s), r.appendChild(l), r.appendChild(f);
696
+ f.className = "ng-part-footer", f.appendChild(t(this, ot).call(this, t(this, Z), o, "footer")), r.appendChild(s), r.appendChild(l), r.appendChild(f);
674
697
  });
675
698
  }, "#renderSplitContainers"));
676
- d(this, zt, /* @__PURE__ */ h(() => {
699
+ d(this, Nt, /* @__PURE__ */ h(() => {
677
700
  ["left", "right", "body"].forEach((e) => {
678
701
  const i = this.querySelector(`.ng-container-${e}`), o = i == null ? void 0 : i.querySelectorAll("table");
679
702
  if (!i || !o || o.length === 0) return;
@@ -685,12 +708,12 @@ const ht = class ht extends HTMLElement {
685
708
  });
686
709
  }, "#updateContainerWidths"));
687
710
  E(this, "generate", /* @__PURE__ */ h((e) => {
688
- e && (u(this, K, ee.compile(e)), t(this, Ot).call(this), t(this, zt).call(this), t(this, Z).initialize(), setTimeout(() => {
711
+ e && (y(this, Z, ee.compile(e)), t(this, Ot).call(this), t(this, Nt).call(this), t(this, G).initialize(), setTimeout(() => {
689
712
  var i;
690
713
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
691
714
  }, 0));
692
715
  }, "generate"));
693
- d(this, st, /* @__PURE__ */ h((e, i, o) => {
716
+ d(this, ot, /* @__PURE__ */ h((e, i, o) => {
694
717
  const r = e.cloneNode(!0), s = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
695
718
  if (o === "header") {
696
719
  if (l && l.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -706,7 +729,7 @@ const ht = class ht extends HTMLElement {
706
729
  a.remove();
707
730
  }), r;
708
731
  }, "#createSplitTable"));
709
- E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, Z).getRowHeight(), "getRowHeight"));
732
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, G).getRowHeight(), "getRowHeight"));
710
733
  E(this, "scrollToX", /* @__PURE__ */ h((e) => {
711
734
  const i = this.querySelector(".ng-container-body .ng-part-body");
712
735
  i && (i.scrollLeft = e);
@@ -715,10 +738,10 @@ const ht = class ht extends HTMLElement {
715
738
  const i = this.querySelector(".ng-container-body .ng-part-body");
716
739
  i && (i.scrollTop = e);
717
740
  }, "scrollToY"));
718
- d(this, Bt, /* @__PURE__ */ h(() => {
719
- t(this, Nt).call(this);
741
+ d(this, zt, /* @__PURE__ */ h(() => {
742
+ t(this, Bt).call(this);
720
743
  }, "#init"));
721
- d(this, Nt, /* @__PURE__ */ h(() => {
744
+ d(this, Bt, /* @__PURE__ */ h(() => {
722
745
  const e = ht.SCROLLBAR_SIZE;
723
746
  this.innerHTML = `
724
747
  <style>
@@ -861,20 +884,20 @@ const ht = class ht extends HTMLElement {
861
884
  </div>
862
885
  `;
863
886
  }, "#render"));
864
- u(this, Z, new te(this)), u(this, Wt, this.getRootNode().host);
887
+ y(this, G, new te(this)), y(this, Wt, this.getRootNode().host);
865
888
  }
866
889
  connectedCallback() {
867
- t(this, Bt).call(this);
890
+ t(this, zt).call(this);
868
891
  }
869
892
  disconnectedCallback() {
870
893
  this.innerHTML = "", dt.log("NineTableSheet destroyed.");
871
894
  }
872
895
  };
873
- Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), st = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
896
+ Wt = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Ot = new WeakMap(), Nt = new WeakMap(), ot = new WeakMap(), zt = new WeakMap(), Bt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
874
897
  let Rt = ht;
875
898
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Rt);
876
899
  var Pt, xt;
877
- const ge = class ge extends HTMLElement {
900
+ const ue = class ue extends HTMLElement {
878
901
  constructor() {
879
902
  super();
880
903
  d(this, Pt, /* @__PURE__ */ h(() => {
@@ -888,11 +911,11 @@ const ge = class ge extends HTMLElement {
888
911
  d(this, xt, /* @__PURE__ */ h((e, i = !1) => {
889
912
  const o = /* @__PURE__ */ h(() => {
890
913
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
891
- Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
892
- const y = f.filter((b) => b.classList.contains("active"));
893
- y.length < 2 || y.forEach((b) => {
894
- const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), M = f[p + 1];
895
- v && M && M.classList.contains("active") && v.style.setProperty("display", "flex");
914
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
915
+ const b = f.filter((u) => u.classList.contains("active"));
916
+ b.length < 2 || b.forEach((u) => {
917
+ const p = parseInt(u.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), R = f[p + 1];
918
+ x && R && R.classList.contains("active") && x.style.setProperty("display", "flex");
896
919
  });
897
920
  }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), s = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = s.querySelectorAll("nine-table-sheet");
898
921
  if (!l[e]) return;
@@ -900,16 +923,16 @@ const ge = class ge extends HTMLElement {
900
923
  l.forEach((f, g) => {
901
924
  f.classList.toggle("active", g === e);
902
925
  }), c.forEach((f, g) => {
903
- const y = g === e;
904
- f.classList.toggle("active", y), f.style.flex = y ? "1 1 100%" : "";
926
+ const b = g === e;
927
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
905
928
  });
906
929
  else {
907
930
  const f = l[e], g = r.querySelectorAll(".nine-tab-item.active");
908
931
  if (f.classList.contains("active") && g.length <= 1)
909
932
  return;
910
933
  f.classList.toggle("active");
911
- const y = s.querySelector(`nine-table-sheet[data-index="${e}"]`);
912
- y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
934
+ const b = s.querySelector(`nine-table-sheet[data-index="${e}"]`);
935
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
913
936
  }
914
937
  const a = s.querySelectorAll("nine-table-sheet.active");
915
938
  a == null || a.forEach((f) => {
@@ -921,32 +944,32 @@ const ge = class ge extends HTMLElement {
921
944
  t(this, Pt).call(this);
922
945
  }
923
946
  };
924
- Pt = new WeakMap(), xt = new WeakMap(), h(ge, "NineTableSheets");
925
- let ne = ge;
947
+ Pt = new WeakMap(), xt = new WeakMap(), h(ue, "NineTableSheets");
948
+ let ne = ue;
926
949
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ne);
927
- var k, Dt, vt, Yt;
928
- const ue = class ue {
950
+ var L, Dt, vt, Yt;
951
+ const ge = class ge {
929
952
  constructor(n) {
930
- d(this, k);
953
+ d(this, L);
931
954
  d(this, Dt, /* @__PURE__ */ h(() => {
932
955
  t(this, Yt).call(this), new ResizeObserver((n) => {
933
956
  for (let e of n)
934
- t(this, k).getAttribute("auto-height") === "true" && t(this, vt).call(this);
935
- }).observe(t(this, k));
957
+ t(this, L).getAttribute("auto-height") === "true" && t(this, vt).call(this);
958
+ }).observe(t(this, L));
936
959
  }, "#init"));
937
960
  d(this, vt, /* @__PURE__ */ h(() => {
938
961
  var c, a;
939
- const n = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
962
+ const n = Array.from(t(this, L).shadowRoot.querySelectorAll("nine-table-sheet.active"));
940
963
  if (n.length === 0) return;
941
- const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), o = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, s = Rt.SCROLLBAR_SIZE, l = e * i + o + r + s;
942
- t(this, k).style.height = `${l}px`;
964
+ const e = parseInt(t(this, L).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), o = (c = t(this, L).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, L).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, s = Rt.SCROLLBAR_SIZE, l = e * i + o + r + s;
965
+ t(this, L).style.height = `${l}px`;
943
966
  }, "#applyAutoHeight"));
944
967
  d(this, Yt, /* @__PURE__ */ h(() => {
945
- const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, a) => {
946
- const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < o - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
947
- return g + y;
968
+ const e = Array.from(t(this, L).children).filter((c) => c.tagName === "TABLE"), i = t(this, L).getAttribute("auto-height") === "true", o = e.length, r = e.map((c, a) => {
969
+ const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < o - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
970
+ return g + b;
948
971
  }).join(""), s = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
949
- t(this, k).shadowRoot.innerHTML = `
972
+ t(this, L).shadowRoot.innerHTML = `
950
973
  <style>
951
974
  :host {
952
975
  display: flex;
@@ -1037,57 +1060,57 @@ const ue = class ue {
1037
1060
  </nine-table-body>
1038
1061
  <nine-table-footer></nine-table-footer>
1039
1062
  `;
1040
- const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
1063
+ const l = t(this, L).shadowRoot.querySelectorAll("nine-table-sheet");
1041
1064
  l == null || l.forEach((c, a) => {
1042
1065
  e[a] && setTimeout(() => {
1043
1066
  c.generate(e[a]), i && t(this, vt).call(this);
1044
1067
  });
1045
1068
  });
1046
1069
  }, "#render"));
1047
- u(this, k, n), t(this, Dt).call(this);
1070
+ y(this, L, n), t(this, Dt).call(this);
1048
1071
  }
1049
1072
  };
1050
- k = new WeakMap(), Dt = new WeakMap(), vt = new WeakMap(), Yt = new WeakMap(), h(ue, "LayoutManager");
1051
- let ie = ue;
1052
- var wt, rt;
1073
+ L = new WeakMap(), Dt = new WeakMap(), vt = new WeakMap(), Yt = new WeakMap(), h(ge, "LayoutManager");
1074
+ let ie = ge;
1075
+ var wt, st;
1053
1076
  const be = class be {
1054
1077
  constructor(n) {
1055
1078
  d(this, wt);
1056
- d(this, rt, -1);
1079
+ d(this, st, -1);
1057
1080
  E(this, "count", /* @__PURE__ */ h(() => t(this, wt).rawRecords.length, "count"));
1058
- u(this, wt, n);
1081
+ y(this, wt, n);
1059
1082
  }
1060
1083
  get at() {
1061
- return t(this, rt);
1084
+ return t(this, st);
1062
1085
  }
1063
1086
  set at(n) {
1064
- u(this, rt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, rt)}"]`) && setTimeout(() => {
1087
+ y(this, st, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, st)}"]`) && setTimeout(() => {
1065
1088
  });
1066
1089
  }
1067
1090
  };
1068
- wt = new WeakMap(), rt = new WeakMap(), h(be, "ngRow");
1091
+ wt = new WeakMap(), st = new WeakMap(), h(be, "ngRow");
1069
1092
  let oe = be;
1070
- var L, A, C, lt, Ft, D, Vt, G, St, Xt, Ut, at;
1071
- const H = class H {
1093
+ var C, q, H, rt, Ft, Y, Vt, J, St, Xt, Ut, lt;
1094
+ const M = class M {
1072
1095
  constructor(n, e) {
1073
- d(this, L);
1074
- d(this, A);
1075
- d(this, C, []);
1076
- d(this, lt, []);
1096
+ d(this, C);
1097
+ d(this, q);
1098
+ d(this, H, []);
1099
+ d(this, rt, []);
1077
1100
  d(this, Ft, 0);
1078
- d(this, D, []);
1101
+ d(this, Y, []);
1079
1102
  d(this, Vt, /* @__PURE__ */ h(() => {
1080
- u(this, D, []);
1081
- const n = t(this, L).template || [];
1103
+ y(this, Y, []);
1104
+ const n = t(this, C).template || [];
1082
1105
  Array.from(n).forEach((e) => {
1083
1106
  var i;
1084
- t(this, D).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
1085
- }), (t(this, A).rawRecords || []).forEach((e) => {
1086
- e.__ng || (e.__ng = t(this, St).call(this)), e.__ng.height = t(this, D).slice();
1107
+ t(this, Y).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
1108
+ }), (t(this, q).rawRecords || []).forEach((e) => {
1109
+ e.__ng || (e.__ng = t(this, St).call(this)), e.__ng.height = t(this, Y).slice();
1087
1110
  });
1088
1111
  }, "#initialize"));
1089
- d(this, G, /* @__PURE__ */ h(() => {
1090
- t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((n) => {
1112
+ d(this, J, /* @__PURE__ */ h(() => {
1113
+ t(this, C).shadowRoot.querySelectorAll("nine-table-sheet").forEach((n) => {
1091
1114
  n.invalidate();
1092
1115
  });
1093
1116
  }, "#invalidate"));
@@ -1095,38 +1118,38 @@ const H = class H {
1095
1118
  var r;
1096
1119
  const i = this.getValidData();
1097
1120
  if (!i || i.length <= 0) return;
1098
- if (n == null) return t(this, at).call(this, i);
1121
+ if (n == null) return t(this, lt).call(this, i);
1099
1122
  if (n < 0 || n >= i.length) return null;
1100
- const o = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
1123
+ const o = typeof ((r = t(this, C).fields) == null ? void 0 : r.get) == "function" ? t(this, C).fields.get() : [];
1101
1124
  if (e != null) {
1102
1125
  const s = o.indexOf(e);
1103
1126
  return s >= 0 ? i[n].v[s] : null;
1104
1127
  }
1105
- return t(this, at).call(this, i[n]);
1128
+ return t(this, lt).call(this, i[n]);
1106
1129
  }, "get"));
1107
1130
  E(this, "set", /* @__PURE__ */ h((n) => {
1108
- this.clear(), this.add(n, !1), t(this, G).call(this);
1131
+ this.clear(), this.add(n, !1), t(this, J).call(this);
1109
1132
  }, "set"));
1110
1133
  d(this, St, /* @__PURE__ */ h(() => ({
1111
- rowState: H.ROW_STATE.EMPTY,
1134
+ rowState: M.ROW_STATE.EMPTY,
1112
1135
  deleted: !1,
1113
1136
  filtered: !1,
1114
- height: t(this, D).slice(),
1137
+ height: t(this, Y).slice(),
1115
1138
  o: {},
1116
1139
  c: {},
1117
- _: [0, 0, 0, 0, H.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
1140
+ _: [0, 0, 0, 0, M.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1118
1141
  }), "#getDefaultMeta"));
1119
1142
  E(this, "reset", /* @__PURE__ */ h(() => {
1120
- u(this, C, []), u(this, lt, []), t(this, G).call(this);
1143
+ y(this, H, []), y(this, rt, []), t(this, J).call(this);
1121
1144
  }, "reset"));
1122
1145
  E(this, "clear", /* @__PURE__ */ h(() => {
1123
1146
  var n;
1124
- t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (n = t(this, A).viewRecords) != null && n.reset && t(this, A).viewRecords.reset();
1147
+ t(this, q).rawRecords = [], y(this, H, []), y(this, rt, []), (n = t(this, q).viewRecords) != null && n.reset && t(this, q).viewRecords.reset();
1125
1148
  }, "clear"));
1126
1149
  d(this, Xt, /* @__PURE__ */ h((n) => {
1127
1150
  var o;
1128
1151
  Array.isArray(n) || (n = [n]);
1129
- const e = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
1152
+ const e = typeof ((o = t(this, C).fields) == null ? void 0 : o.get) == "function" ? t(this, C).fields.get() : Object.keys(n[0] || {}), i = [];
1130
1153
  return n.forEach((r) => {
1131
1154
  const s = { v: [] };
1132
1155
  e.forEach((l) => {
@@ -1135,51 +1158,51 @@ const H = class H {
1135
1158
  }), i;
1136
1159
  }, "#json2Array"));
1137
1160
  d(this, Ut, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1138
- e.__ng = t(this, St).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = H.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1161
+ e.__ng = t(this, St).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = M.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1139
1162
  }), n), "#defaultInsert"));
1140
1163
  E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1141
1164
  n === void 0 && (n = {});
1142
1165
  const i = t(this, Xt).call(this, n);
1143
- t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
1166
+ t(this, q).rawRecords = t(this, q).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
1144
1167
  const o = this.count() - 1;
1145
1168
  return e || i.forEach((r, s) => {
1146
- const l = t(this, A).rawRecords[o - s];
1147
- l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
1148
- }), t(this, G).call(this), o;
1169
+ const l = t(this, q).rawRecords[o - s];
1170
+ l && (l.__ng.rowState = M.ROW_STATE.EMPTY);
1171
+ }), t(this, J).call(this), o;
1149
1172
  }, "add"));
1150
1173
  E(this, "delete", /* @__PURE__ */ h((n) => {
1151
1174
  let e = [];
1152
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, o) => o - i).forEach((i) => {
1153
- if (t(this, C)[i]) {
1154
- const o = t(this, C)[i].__ng.rowid;
1155
- t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, A).rawRecords.forEach((r) => {
1156
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
1175
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, q).host.row.at] : e = [parseInt(n, 10)], e.sort((i, o) => o - i).forEach((i) => {
1176
+ if (t(this, H)[i]) {
1177
+ const o = t(this, H)[i].__ng.rowid;
1178
+ t(this, H)[i].__ng.rowState === M.ROW_STATE.INSERT ? t(this, q).rawRecords = t(this, q).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, q).rawRecords.forEach((r) => {
1179
+ r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = M.ROW_STATE.DELETE);
1157
1180
  });
1158
1181
  }
1159
- }), this.resetRecords(), t(this, G).call(this);
1182
+ }), this.resetRecords(), t(this, J).call(this);
1160
1183
  }, "delete"));
1161
1184
  E(this, "setValue", /* @__PURE__ */ h((n, e, i) => {
1162
1185
  var c;
1163
1186
  n = parseInt(n, 10);
1164
- const r = (typeof ((c = t(this, L).fields) == null ? void 0 : c.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
1187
+ const r = (typeof ((c = t(this, C).fields) == null ? void 0 : c.get) == "function" ? t(this, C).fields.get() : []).indexOf(e);
1165
1188
  if (r < 0) return;
1166
1189
  const s = this.getValidData()[n];
1167
1190
  if (!s) return;
1168
1191
  const l = s.v[r];
1169
- l !== i && s.__ng.rowState !== H.ROW_STATE.INSERT && (s.__ng.o.hasOwnProperty(e) || (s.__ng.o[e] = l), s.__ng.rowState = H.ROW_STATE.UPDATE), s.v[r] = i;
1192
+ l !== i && s.__ng.rowState !== M.ROW_STATE.INSERT && (s.__ng.o.hasOwnProperty(e) || (s.__ng.o[e] = l), s.__ng.rowState = M.ROW_STATE.UPDATE), s.v[r] = i;
1170
1193
  }, "setValue"));
1171
1194
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1172
- u(this, lt, t(this, A).rawRecords.filter((n) => !n.__ng.deleted)), u(this, C, t(this, A).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, A).rawRecords.forEach((n, e) => {
1195
+ y(this, rt, t(this, q).rawRecords.filter((n) => !n.__ng.deleted)), y(this, H, t(this, q).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, q).rawRecords.forEach((n, e) => {
1173
1196
  n.__ng.rowidx = e;
1174
- }), t(this, C).forEach((n, e) => {
1197
+ }), t(this, H).forEach((n, e) => {
1175
1198
  n.__ng.i = e;
1176
1199
  });
1177
1200
  }, "resetRecords"));
1178
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, C).length === 0 && t(this, A).rawRecords.length > 0 && this.resetRecords(), t(this, C)), "getValidData"));
1179
- d(this, at, /* @__PURE__ */ h((n) => {
1201
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, H).length === 0 && t(this, q).rawRecords.length > 0 && this.resetRecords(), t(this, H)), "getValidData"));
1202
+ d(this, lt, /* @__PURE__ */ h((n) => {
1180
1203
  var s;
1181
1204
  if (!n) return n;
1182
- const e = !Array.isArray(n), i = e ? [n] : n, o = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
1205
+ const e = !Array.isArray(n), i = e ? [n] : n, o = typeof ((s = t(this, C).fields) == null ? void 0 : s.get) == "function" ? t(this, C).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
1183
1206
  const c = {};
1184
1207
  return o.forEach((a, f) => {
1185
1208
  c[a] = l.v ? l.v[f] : l[a];
@@ -1188,10 +1211,10 @@ const H = class H {
1188
1211
  return e ? r[0] : r;
1189
1212
  }, "#conv"));
1190
1213
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1191
- u(this, L, n), u(this, A, e), t(this, Vt).call(this);
1214
+ y(this, C, n), y(this, q, e), t(this, Vt).call(this);
1192
1215
  }
1193
1216
  get source() {
1194
- return t(this, at).call(this, t(this, A).rawRecords);
1217
+ return t(this, lt).call(this, t(this, q).rawRecords);
1195
1218
  }
1196
1219
  set source(n) {
1197
1220
  this.clear(), this.add(n, !1);
@@ -1200,28 +1223,28 @@ const H = class H {
1200
1223
  return ++Se(this, Ft)._;
1201
1224
  }
1202
1225
  get length() {
1203
- return t(this, C).length;
1226
+ return t(this, H).length;
1204
1227
  }
1205
1228
  getRowCount() {
1206
1229
  return this.length;
1207
1230
  }
1208
1231
  };
1209
- L = new WeakMap(), A = new WeakMap(), C = new WeakMap(), lt = new WeakMap(), Ft = new WeakMap(), D = new WeakMap(), Vt = new WeakMap(), G = new WeakMap(), St = new WeakMap(), Xt = new WeakMap(), Ut = new WeakMap(), at = new WeakMap(), h(H, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1210
- E(H, "ROW_STATE", {
1232
+ C = new WeakMap(), q = new WeakMap(), H = new WeakMap(), rt = new WeakMap(), Ft = new WeakMap(), Y = new WeakMap(), Vt = new WeakMap(), J = new WeakMap(), St = new WeakMap(), Xt = new WeakMap(), Ut = new WeakMap(), lt = new WeakMap(), h(M, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1233
+ E(M, "ROW_STATE", {
1211
1234
  EMPTY: "EMPTY",
1212
1235
  NORMAL: "NORMAL",
1213
1236
  INSERT: "INSERT",
1214
1237
  UPDATE: "UPDATE",
1215
1238
  DELETE: "DELETE"
1216
1239
  });
1217
- let se = H;
1218
- var J;
1240
+ let se = M;
1241
+ var Q;
1219
1242
  const ye = class ye {
1220
1243
  constructor(n) {
1221
- d(this, J);
1222
- u(this, J, n), this.row = new oe(this), this.data = new se(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1244
+ d(this, Q);
1245
+ y(this, Q, n), this.row = new oe(this), this.data = new se(t(this, Q), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1223
1246
  var e;
1224
- (e = t(this, J).view) != null && e.redraw && t(this, J).view.redraw();
1247
+ (e = t(this, Q).view) != null && e.redraw && t(this, Q).view.redraw();
1225
1248
  }, this.setDataSource = (e) => {
1226
1249
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1227
1250
  }, this.getRowState = (e) => {
@@ -1236,33 +1259,33 @@ const ye = class ye {
1236
1259
  }, this.setDataSource([]);
1237
1260
  }
1238
1261
  };
1239
- J = new WeakMap(), h(ye, "ngDataManager");
1262
+ Q = new WeakMap(), h(ye, "ngDataManager");
1240
1263
  let re = ye;
1241
- var ct, q, Et, jt;
1264
+ var at, T, Et, jt;
1242
1265
  const pe = class pe {
1243
1266
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1244
1267
  constructor(n) {
1245
- d(this, ct);
1246
- d(this, q, []);
1268
+ d(this, at);
1269
+ d(this, T, []);
1247
1270
  E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1248
1271
  n.forEach((i) => {
1249
- t(this, q).some((o) => o.name === i) || t(this, q).push({ name: i, type: e });
1272
+ t(this, T).some((o) => o.name === i) || t(this, T).push({ name: i, type: e });
1250
1273
  }), t(this, Et).call(this);
1251
1274
  }, "add"));
1252
1275
  d(this, Et, /* @__PURE__ */ h(() => {
1253
1276
  const n = /* @__PURE__ */ new Map();
1254
- t(this, q).forEach((e) => {
1277
+ t(this, T).forEach((e) => {
1255
1278
  n.set(e.name, e.type);
1256
- }), u(this, q, Array.from(n, ([e, i]) => ({ name: e, type: i }))), u(this, q, t(this, q).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, q).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
1279
+ }), y(this, T, Array.from(n, ([e, i]) => ({ name: e, type: i }))), y(this, T, t(this, T).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, T).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
1257
1280
  }, "#adjust"));
1258
1281
  d(this, jt, /* @__PURE__ */ h(() => {
1259
- u(this, q, []), dt.log(t(this, ct).querySelectorAll("table"));
1260
- const n = Array.from(t(this, ct).querySelectorAll("table"));
1282
+ y(this, T, []), dt.log(t(this, at).querySelectorAll("table"));
1283
+ const n = Array.from(t(this, at).querySelectorAll("table"));
1261
1284
  if (!(!n || n.length === 0)) {
1262
1285
  for (const e of n)
1263
1286
  dt.log(e), $("[data-bind]", e).each((i, o) => {
1264
1287
  const r = o.dataset.bind, s = o.getAttribute("data-type") || "string";
1265
- r && t(this, q).push({ name: r, type: s });
1288
+ r && t(this, T).push({ name: r, type: s });
1266
1289
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
1267
1290
  $(`[${i}]`, e).each((o, r) => {
1268
1291
  var s = r.getAttribute(i);
@@ -1279,7 +1302,7 @@ const pe = class pe {
1279
1302
  if (l.trim() != "") {
1280
1303
  const c = l.search(/[^_A-Za-z0-9]/g);
1281
1304
  let a = "";
1282
- c >= 0 ? a = l.substring(0, c) : s.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, q).push({ name: a, type: "string" });
1305
+ c >= 0 ? a = l.substring(0, c) : s.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, T).push({ name: a, type: "string" });
1283
1306
  }
1284
1307
  });
1285
1308
  });
@@ -1287,41 +1310,41 @@ const pe = class pe {
1287
1310
  t(this, Et).call(this);
1288
1311
  }
1289
1312
  }, "#init"));
1290
- u(this, ct, n), t(this, jt).call(this);
1313
+ y(this, at, n), t(this, jt).call(this);
1291
1314
  }
1292
1315
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1293
1316
  get() {
1294
- return t(this, q).map((n) => n.name);
1317
+ return t(this, T).map((n) => n.name);
1295
1318
  }
1296
1319
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1297
1320
  getFields() {
1298
- return t(this, q);
1321
+ return t(this, T);
1299
1322
  }
1300
1323
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1301
1324
  getType(n) {
1302
- const e = t(this, q).find((i) => i.name === n);
1325
+ const e = t(this, T).find((i) => i.name === n);
1303
1326
  return e ? e.type : "string";
1304
1327
  }
1305
1328
  indexOf(n) {
1306
- return t(this, q).findIndex((e) => e.name === n);
1329
+ return t(this, T).findIndex((e) => e.name === n);
1307
1330
  }
1308
1331
  includes(n) {
1309
- return t(this, q).some((e) => e.name === n);
1332
+ return t(this, T).some((e) => e.name === n);
1310
1333
  }
1311
1334
  };
1312
- ct = new WeakMap(), q = new WeakMap(), Et = new WeakMap(), jt = new WeakMap(), h(pe, "ngFields");
1335
+ at = new WeakMap(), T = new WeakMap(), Et = new WeakMap(), jt = new WeakMap(), h(pe, "ngFields");
1313
1336
  let le = pe;
1314
- var Q, Kt, Zt;
1337
+ var tt, Kt, Zt;
1315
1338
  const me = class me extends HTMLElement {
1316
1339
  constructor() {
1317
1340
  super();
1318
1341
  //#created = false;
1319
- d(this, Q);
1342
+ d(this, tt);
1320
1343
  d(this, Kt);
1321
1344
  d(this, Zt, /* @__PURE__ */ h(() => {
1322
- this.fields = new le(this), u(this, Kt, new ie(this)), dt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1345
+ this.fields = new le(this), y(this, Kt, new ie(this)), dt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1323
1346
  }, "#init"));
1324
- this.attachShadow({ mode: "open" }), u(this, Q, new re(this));
1347
+ this.attachShadow({ mode: "open" }), y(this, tt, new re(this));
1325
1348
  }
1326
1349
  connectedCallback() {
1327
1350
  t(this, Zt).call(this);
@@ -1331,18 +1354,18 @@ const me = class me extends HTMLElement {
1331
1354
  }
1332
1355
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1333
1356
  get data() {
1334
- return t(this, Q).data;
1357
+ return t(this, tt).data;
1335
1358
  }
1336
1359
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1337
1360
  get row() {
1338
- return t(this, Q).row;
1361
+ return t(this, tt).row;
1339
1362
  }
1340
1363
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1341
1364
  get dataManager() {
1342
- return t(this, Q);
1365
+ return t(this, tt);
1343
1366
  }
1344
1367
  };
1345
- Q = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), h(me, "NineTable");
1368
+ tt = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), h(me, "NineTable");
1346
1369
  let ae = me;
1347
1370
  customElements.get("nine-table") || customElements.define("nine-table", ae);
1348
1371
  //# sourceMappingURL=nine-table.js.map