@ninebone/table 0.0.267 β†’ 0.0.268

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.
@@ -15,36 +15,36 @@ var Ke = (w, i, t, s) => ({
15
15
  }
16
16
  });
17
17
  import { trace as Fe } from "@ninebone/util";
18
- const Ne = class Ne extends Fe.constructor {
18
+ const We = class We extends Fe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(Ne, "Trace");
24
- let qe = Ne;
25
- const _ = new qe();
26
- var L, B, m, D, P, V, ce, X, he;
27
- const We = class We extends HTMLElement {
23
+ h(We, "Trace");
24
+ let qe = We;
25
+ const M = new qe();
26
+ var I, B, m, D, P, V, ce, X, he;
27
+ const ze = class ze extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- g(this, L);
30
+ g(this, I);
31
31
  g(this, B, !1);
32
32
  g(this, m);
33
33
  g(this, D);
34
34
  g(this, P);
35
35
  g(this, V);
36
36
  g(this, ce, /* @__PURE__ */ h(() => {
37
- if (!e(this, L)) return;
38
- const t = e(this, L).querySelector(".ng-container-body");
37
+ if (!e(this, I)) return;
38
+ const t = e(this, I).querySelector(".ng-container-body");
39
39
  t && (y(this, V, new ResizeObserver(() => {
40
40
  this.refresh();
41
41
  })), e(this, V).observe(t));
42
42
  }, "#observeResize"));
43
43
  S(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!e(this, L) || !e(this, m) || e(this, B)) return;
44
+ if (!e(this, I) || !e(this, m) || e(this, B)) return;
45
45
  const t = e(this, m).container, s = t.querySelector("table");
46
46
  if (!s) return;
47
- const r = e(this, m).track, n = e(this, m).thumb, o = e(this, L).querySelector(".ng-container-bottom"), c = t.clientWidth, u = s.scrollWidth;
47
+ const r = e(this, m).track, n = e(this, m).thumb, o = e(this, I).querySelector(".ng-container-bottom"), c = t.clientWidth, u = s.scrollWidth;
48
48
  if (c !== 0 && u > c)
49
49
  o && (o.style.display = "flex");
50
50
  else {
@@ -59,7 +59,7 @@ const We = class We extends HTMLElement {
59
59
  let b = 0;
60
60
  f > 0 && (b = parseInt(d / f * (l - a), 10)), b < 0 && (b = 0);
61
61
  const p = l - a;
62
- b > p && (b = p), n.style.left = `${b}px`, _.log(b), e(this, m).left.disabled = b === 0, e(this, m).right.disabled = b >= p - 1;
62
+ b > p && (b = p), n.style.left = `${b}px`, M.log(b), e(this, m).left.disabled = b === 0, e(this, m).right.disabled = b >= p - 1;
63
63
  }, "refresh"));
64
64
  g(this, X, /* @__PURE__ */ h((t) => {
65
65
  if (!e(this, m)) return !1;
@@ -113,7 +113,7 @@ const We = class We extends HTMLElement {
113
113
  }, "#init"));
114
114
  }
115
115
  connectedCallback() {
116
- if (y(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, L)) return;
116
+ if (y(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, I)) return;
117
117
  this.innerHTML = `
118
118
  <style>
119
119
  nine-table-hscrollbar {
@@ -178,7 +178,7 @@ const We = class We extends HTMLElement {
178
178
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
179
179
  `;
180
180
  const t = /* @__PURE__ */ h(() => {
181
- const s = e(this, L).querySelector(".ng-container-body");
181
+ const s = e(this, I).querySelector(".ng-container-body");
182
182
  if (!s) {
183
183
  setTimeout(t, 10);
184
184
  return;
@@ -197,19 +197,19 @@ const We = class We extends HTMLElement {
197
197
  e(this, V) && e(this, V).disconnect();
198
198
  }
199
199
  };
200
- L = new WeakMap(), B = new WeakMap(), m = new WeakMap(), D = new WeakMap(), P = new WeakMap(), V = new WeakMap(), ce = new WeakMap(), X = new WeakMap(), he = new WeakMap(), h(We, "NineTableHScrollBar");
201
- let Te = We;
200
+ I = new WeakMap(), B = new WeakMap(), m = new WeakMap(), D = new WeakMap(), P = new WeakMap(), V = new WeakMap(), ce = new WeakMap(), X = new WeakMap(), he = new WeakMap(), h(ze, "NineTableHScrollBar");
201
+ let Te = ze;
202
202
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
203
- var $, I, R, N, M, H, de, fe, ue, ge;
204
- const ze = class ze {
203
+ var W, H, q, z, _, $, de, fe, ue, ge;
204
+ const Oe = class Oe {
205
205
  constructor(i) {
206
- g(this, $);
207
- g(this, I, []);
208
- g(this, R, null);
209
- g(this, N, null);
210
- g(this, M, 0);
211
- g(this, H, 0);
212
- S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, R), "getRowHeight"));
206
+ g(this, W);
207
+ g(this, H, []);
208
+ g(this, q, null);
209
+ g(this, z, null);
210
+ g(this, _, 0);
211
+ g(this, $, 0);
212
+ S(this, "getRowHeight", /* @__PURE__ */ h(() => e(this, q), "getRowHeight"));
213
213
  g(this, de, /* @__PURE__ */ h(() => {
214
214
  e(this, fe).call(this);
215
215
  }, "#init"));
@@ -217,7 +217,7 @@ const ze = class ze {
217
217
  * 🎯 뷰포트 크기 λ³€ν™” μ‹œμ μ— 높이 계산 및 ν•„μš”ν•œ ν–‰ 개수 산정·캐싱을 μ™„κ²°
218
218
  */
219
219
  g(this, fe, /* @__PURE__ */ h(() => {
220
- !e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, N, new ResizeObserver((i) => {
220
+ !e(this, W) || !(e(this, W) instanceof HTMLElement) || (y(this, z, new ResizeObserver((i) => {
221
221
  for (const t of i) {
222
222
  const s = t.target;
223
223
  if (!s.classList.contains("active"))
@@ -229,33 +229,33 @@ const ze = class ze {
229
229
  const c = s.querySelector(".ng-container-body") || s, u = c.querySelector("thead"), l = c.querySelector("tfoot");
230
230
  u && (o += u.offsetHeight || u.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
231
231
  const a = Math.max(n - o, 100);
232
- if (e(this, M) !== a && (y(this, M, a), e(this, R) !== null)) {
233
- const d = Math.ceil(e(this, M) / e(this, R));
234
- y(this, H, d + 20), _.log(`[RowManager] Resized. Height: ${e(this, M)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
232
+ if (e(this, _) !== a && (y(this, _, a), e(this, q) !== null)) {
233
+ const d = Math.ceil(e(this, _) / e(this, q));
234
+ y(this, $, d + 20), M.log(`[RowManager] Resized. Height: ${e(this, _)}px | Target Rows: ${e(this, $)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((f) => {
235
235
  const b = s.querySelector(f);
236
236
  b && b.querySelector("tbody") && e(this, ge).call(this, b);
237
237
  });
238
238
  }
239
239
  }
240
240
  }
241
- })), e(this, N).observe(e(this, $)));
241
+ })), e(this, z).observe(e(this, W)));
242
242
  }, "#initResizeObserver"));
243
243
  // 🎯 ν…œν”Œλ¦Ώ μΆ”μΆœ, 높이 μΈ‘μ •, 초기 λ Œλ”λ§μ„ μˆœμ„œμ— 맞게 λ‚΄λΆ€μ—μ„œ 일괄 처리
244
244
  S(this, "initialize", /* @__PURE__ */ h((i) => {
245
- _.log(i);
246
- const t = e(this, $).querySelector(".ng-container-body"), s = i.querySelector("tbody"), r = Array.from(s.querySelectorAll("tr"));
247
- y(this, I, r.map((n) => n.cloneNode(!0))), y(this, R, null), e(this, ue).call(this, t);
245
+ M.log(i);
246
+ const t = e(this, W).querySelector(".ng-container-body"), s = i.querySelector("tbody"), r = Array.from(s.querySelectorAll("tr"));
247
+ y(this, H, r.map((n) => n.cloneNode(!0))), y(this, q, null), e(this, ue).call(this, t);
248
248
  }, "initialize"));
249
249
  g(this, ue, /* @__PURE__ */ h((i) => {
250
- if (e(this, R) !== null && e(this, R) > 0)
251
- return e(this, R);
252
- if (e(this, I).length === 0)
250
+ if (e(this, q) !== null && e(this, q) > 0)
251
+ return e(this, q);
252
+ if (e(this, H).length === 0)
253
253
  throw new Error("[RowManager] Template TRs are empty.");
254
254
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
255
255
  if (!t) return 24;
256
256
  t.querySelectorAll("tr:not(.nodata)").forEach((d) => d.remove());
257
257
  const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment();
258
- e(this, I).forEach((d) => {
258
+ e(this, H).forEach((d) => {
259
259
  r.appendChild(d.cloneNode(!0));
260
260
  }), s ? s.before(r) : t.appendChild(r);
261
261
  const n = i.closest("nine-table-sheet"), o = n ? n.style.display : "", c = n ? n.style.visibility : "", u = n ? n.style.position : "";
@@ -264,12 +264,12 @@ const ze = class ze {
264
264
  const a = t.querySelectorAll("tr:not(.nodata)");
265
265
  if (a.forEach((d, f) => {
266
266
  l += d.offsetHeight || d.getBoundingClientRect().height;
267
- }), a.forEach((d) => d.remove()), n && (n.style.display = o, n.style.visibility = c, n.style.position = u), y(this, R, l), e(this, M) > 0) {
268
- const d = Math.ceil(e(this, M) / e(this, R));
269
- y(this, H, d + 20);
267
+ }), a.forEach((d) => d.remove()), n && (n.style.display = o, n.style.visibility = c, n.style.position = u), y(this, q, l), e(this, _) > 0) {
268
+ const d = Math.ceil(e(this, _) / e(this, q));
269
+ y(this, $, d + 20);
270
270
  } else
271
- y(this, H, 40);
272
- return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, H)}`), e(this, R);
271
+ y(this, $, 40);
272
+ return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this, $)}`), e(this, q);
273
273
  }, "#measureAndCacheHeight"));
274
274
  /**
275
275
  * 🎯 μΊμ‹œλœ ν–‰ 개수 λ°˜ν™˜ (없을 λ•Œλ§Œ μ΅œμ†Œν•œμ˜ λ°©μ–΄ μ—°μ‚°)
@@ -288,33 +288,33 @@ const ze = class ze {
288
288
  * 🎯 μΊμ‹œλœ ν–‰ 개수λ₯Ό κ³§λ°”λ‘œ κ°€μ Έμ™€μ„œ TR λΌˆλŒ€ μ£Όμž… (쀑볡 계산 제거)
289
289
  */
290
290
  g(this, ge, /* @__PURE__ */ h((i) => {
291
- if (e(this, I).length === 0) return;
291
+ if (e(this, H).length === 0) return;
292
292
  const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
293
293
  if (!t) return;
294
294
  t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
295
- const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment(), n = e(this, H);
295
+ const s = t.querySelector("tr.nodata"), r = document.createDocumentFragment(), n = e(this, $);
296
296
  for (let o = 0; o < n; o++)
297
- e(this, I).forEach((c) => {
297
+ e(this, H).forEach((c) => {
298
298
  r.appendChild(c.cloneNode(!0));
299
299
  });
300
300
  s ? s.before(r) : t.appendChild(r), console.log(`[RowManager] Rendered ${n} sets into DOM.`);
301
301
  }, "#renderRows"));
302
302
  S(this, "destroy", /* @__PURE__ */ h(() => {
303
- e(this, N) && (e(this, N).disconnect(), y(this, N, null));
303
+ e(this, z) && (e(this, z).disconnect(), y(this, z, null));
304
304
  }, "destroy"));
305
- y(this, $, i), e(this, de).call(this);
305
+ y(this, W, i), e(this, de).call(this);
306
306
  }
307
307
  get templateLength() {
308
- return e(this, I).length || 1;
308
+ return e(this, H).length || 1;
309
309
  }
310
310
  };
311
- $ = new WeakMap(), I = new WeakMap(), R = new WeakMap(), N = new WeakMap(), M = new WeakMap(), H = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(ze, "RowManager");
312
- let Ce = ze;
313
- var E, K, te, Z, ie, be, ye;
311
+ W = new WeakMap(), H = new WeakMap(), q = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), $ = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(Oe, "RowManager");
312
+ let ke = Oe;
313
+ var A, K, te, Z, ie, be, ye;
314
314
  const ee = class ee extends HTMLElement {
315
315
  constructor() {
316
316
  super();
317
- g(this, E, null);
317
+ g(this, A, null);
318
318
  g(this, K);
319
319
  /**
320
320
  * 🎯 2차원 μ…€ 격자 인덱슀λ₯Ό κ³„μ‚°ν•˜μ—¬ 병합(`rowSpan`/`colSpan`) μ…€μ˜ μ ˆλŒ€ 컬럼 μœ„μΉ˜λ₯Ό λΆ€μ—¬
@@ -338,8 +338,8 @@ const ee = class ee extends HTMLElement {
338
338
  }
339
339
  const b = f.rowSpan || 1, p = f.colSpan || 1;
340
340
  for (let v = 0; v < b; v++)
341
- for (let C = 0; C < p; C++)
342
- a + v < o && d + C < c && (u[a + v][d + C] = v === 0 && C === 0 ? "1" : "0");
341
+ for (let L = 0; L < p; L++)
342
+ a + v < o && d + L < c && (u[a + v][d + L] = v === 0 && L === 0 ? "1" : "0");
343
343
  });
344
344
  }), r.forEach((l) => {
345
345
  const a = l.sectionRowIndex;
@@ -370,10 +370,10 @@ const ee = class ee extends HTMLElement {
370
370
  const s = /* @__PURE__ */ h((l) => {
371
371
  const a = /* @__PURE__ */ h((f) => {
372
372
  if (f.querySelector("colgroup")) return;
373
- const b = f.querySelector("tbody tr") || f.querySelector("tr"), p = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), C = Math.max(Math.floor(f.clientWidth / p), 100);
373
+ const b = f.querySelector("tbody tr") || f.querySelector("tr"), p = b ? b.querySelectorAll("th, td").length : 1, v = document.createElement("colgroup"), L = Math.max(Math.floor(f.clientWidth / p), 100);
374
374
  for (let le = 0; le < p; le++) {
375
375
  const Q = document.createElement("col");
376
- Q.setAttribute("width", C), v.appendChild(Q);
376
+ Q.setAttribute("width", L), v.appendChild(Q);
377
377
  }
378
378
  f.prepend(v);
379
379
  }, "ensureColgroup"), d = /* @__PURE__ */ h((f) => {
@@ -383,19 +383,19 @@ const ee = class ee extends HTMLElement {
383
383
  }, "ensureThead");
384
384
  return a(l), d(l), l.classList.add("nine-table-element"), l;
385
385
  }, "initializeTable"), r = t.cloneNode(!0);
386
- y(this, E, s(r)), e(this, E).style.display = "table", e(this, te).call(this, e(this, E), "thead"), e(this, te).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, a) => {
386
+ y(this, A, s(r)), e(this, A).style.display = "table", e(this, te).call(this, e(this, A), "thead"), e(this, te).call(this, e(this, A), "tbody"), Array.from(e(this, A).querySelectorAll("colgroup col")).forEach((l, a) => {
387
387
  const d = l.getAttribute("fixed");
388
- d && e(this, E).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
388
+ d && e(this, A).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
389
389
  f.setAttribute("fixed", d);
390
390
  });
391
- }), _.log(e(this, E));
391
+ }), M.log(e(this, A));
392
392
  const o = this.querySelector(".ng-container-left"), c = this.querySelector(".ng-container-body"), u = this.querySelector(".ng-container-right");
393
393
  if (c) {
394
- const l = e(this, Z).call(this, e(this, E), null);
395
- c.innerHTML = "", c.appendChild(l), _.log(e(this, E)), _.log(l), e(this, K).initialize(e(this, E));
394
+ const l = e(this, Z).call(this, e(this, A), null);
395
+ c.innerHTML = "", c.appendChild(l), M.log(e(this, A)), M.log(l), e(this, K).initialize(e(this, A));
396
396
  }
397
397
  if (o) {
398
- const l = e(this, Z).call(this, e(this, E), "left");
398
+ const l = e(this, Z).call(this, e(this, A), "left");
399
399
  let a = 0;
400
400
  l.querySelectorAll("col").forEach((f) => {
401
401
  const b = parseInt(f.getAttribute("width"), 10);
@@ -405,7 +405,7 @@ const ee = class ee extends HTMLElement {
405
405
  o.style.flex = `0 0 ${d}px`, o.style.width = `${d}px`;
406
406
  }
407
407
  if (u) {
408
- const l = e(this, Z).call(this, e(this, E), "right");
408
+ const l = e(this, Z).call(this, e(this, A), "right");
409
409
  let a = 0;
410
410
  l.querySelectorAll("col").forEach((f) => {
411
411
  const b = parseInt(f.getAttribute("width"), 10);
@@ -575,20 +575,20 @@ const ee = class ee extends HTMLElement {
575
575
  </div>
576
576
  `;
577
577
  }, "#render"));
578
- y(this, K, new Ce(this));
578
+ y(this, K, new ke(this));
579
579
  }
580
580
  connectedCallback() {
581
581
  e(this, be).call(this);
582
582
  }
583
583
  disconnectedCallback() {
584
- this.innerHTML = "", _.log("NineTableSheet destroyed.");
584
+ this.innerHTML = "", M.log("NineTableSheet destroyed.");
585
585
  }
586
586
  };
587
- E = new WeakMap(), K = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), ie = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), h(ee, "NineTableSheet"), S(ee, "SCROLLBAR_SIZE", 16);
587
+ A = new WeakMap(), K = new WeakMap(), te = new WeakMap(), Z = new WeakMap(), ie = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), h(ee, "NineTableSheet"), S(ee, "SCROLLBAR_SIZE", 16);
588
588
  let ae = ee;
589
589
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ae);
590
590
  var pe, se;
591
- const Oe = class Oe extends HTMLElement {
591
+ const Ne = class Ne extends HTMLElement {
592
592
  constructor() {
593
593
  super();
594
594
  g(this, pe, /* @__PURE__ */ h(() => {
@@ -605,8 +605,8 @@ const Oe = class Oe extends HTMLElement {
605
605
  Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
606
606
  const f = a.filter((b) => b.classList.contains("active"));
607
607
  f.length < 2 || f.forEach((b) => {
608
- const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), C = a[p + 1];
609
- v && C && C.classList.contains("active") && v.style.setProperty("display", "flex");
608
+ const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), L = a[p + 1];
609
+ v && L && L.classList.contains("active") && v.style.setProperty("display", "flex");
610
610
  });
611
611
  }, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), c = n.querySelectorAll(".nine-tab-item"), u = o.querySelectorAll("nine-table-sheet");
612
612
  if (!c[t]) return;
@@ -635,16 +635,16 @@ const Oe = class Oe extends HTMLElement {
635
635
  e(this, pe).call(this);
636
636
  }
637
637
  };
638
- pe = new WeakMap(), se = new WeakMap(), h(Oe, "NineTableSheets");
639
- let ke = Oe;
640
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ke);
638
+ pe = new WeakMap(), se = new WeakMap(), h(Ne, "NineTableSheets");
639
+ let Le = Ne;
640
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Le);
641
641
  var me, re, j, F;
642
- const O = class O {
642
+ const E = class E {
643
643
  /**
644
644
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 컴파일된 ν…Œμ΄λΈ” μ„ΈνŠΈ λ°°μ—΄λ‘œ λ°˜ν™˜ν•©λ‹ˆλ‹€.
645
645
  */
646
646
  static compileAll(i) {
647
- return Array.isArray(i) ? i.map((t) => NineTableCompiler.compile(t)) : [];
647
+ return Array.isArray(i) ? i.map((t) => E.compile(t)) : [];
648
648
  }
649
649
  /**
650
650
  * 🎯 단일 원본 ν…Œμ΄λΈ” 컴파일 처리
@@ -653,31 +653,31 @@ const O = class O {
653
653
  var c, u, l, a, d, f, b, p, v;
654
654
  if (!i) return null;
655
655
  const t = i.cloneNode(!0);
656
- e(c = NineTableCompiler, me).call(c, t), e(u = NineTableCompiler, re).call(u, t, "thead"), e(l = NineTableCompiler, re).call(l, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((C, le) => {
657
- const Q = C.getAttribute("fixed");
656
+ e(c = E, me).call(c, t), e(u = E, re).call(u, t, "thead"), e(l = E, re).call(l, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((L, le) => {
657
+ const Q = L.getAttribute("fixed");
658
658
  Q && t.querySelectorAll(`[data-col="${le}"]`).forEach((Ze) => {
659
659
  Ze.setAttribute("fixed", Q);
660
660
  });
661
661
  });
662
- const r = e(a = NineTableCompiler, j).call(a, t, "left"), n = e(d = NineTableCompiler, j).call(d, t, null), o = e(f = NineTableCompiler, j).call(f, t, "right");
662
+ const r = e(a = E, j).call(a, t, "left"), n = e(d = E, j).call(d, t, null), o = e(f = E, j).call(f, t, "right");
663
663
  return {
664
664
  masterTable: t,
665
665
  left: {
666
666
  table: r,
667
- width: e(b = NineTableCompiler, F).call(b, r)
667
+ width: e(b = E, F).call(b, r)
668
668
  },
669
669
  body: {
670
670
  table: n,
671
- width: e(p = NineTableCompiler, F).call(p, n)
671
+ width: e(p = E, F).call(p, n)
672
672
  },
673
673
  right: {
674
674
  table: o,
675
- width: e(v = NineTableCompiler, F).call(v, o)
675
+ width: e(v = E, F).call(v, o)
676
676
  }
677
677
  };
678
678
  }
679
679
  };
680
- me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(O, "TableCompiler"), g(O, me, /* @__PURE__ */ h((i) => {
680
+ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(E, "TableCompiler"), g(E, me, /* @__PURE__ */ h((i) => {
681
681
  if (!i.querySelector("colgroup")) {
682
682
  const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, r = document.createElement("colgroup"), n = Math.max(Math.floor(i.clientWidth / s), 100);
683
683
  for (let o = 0; o < s; o++) {
@@ -691,7 +691,7 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
691
691
  s ? s.after(t) : i.prepend(t);
692
692
  }
693
693
  i.classList.add("nine-table-element"), i.style.display = "table";
694
- }, "#ensureTableStructure")), g(O, re, /* @__PURE__ */ h((i, t) => {
694
+ }, "#ensureTableStructure")), g(E, re, /* @__PURE__ */ h((i, t) => {
695
695
  const s = Array.from(i.querySelectorAll(t + " tr")), r = Array.from(i.querySelectorAll(t + " th," + t + " td")), n = s.length;
696
696
  if (n === 0 || r.length === 0) return;
697
697
  let o = 0;
@@ -723,7 +723,7 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
723
723
  }
724
724
  });
725
725
  });
726
- }, "#resetColIndex")), g(O, j, /* @__PURE__ */ h((i, t) => {
726
+ }, "#resetColIndex")), g(E, j, /* @__PURE__ */ h((i, t) => {
727
727
  const s = i.cloneNode(!0);
728
728
  return t === "left" ? s.querySelectorAll("col, th, td").forEach((r) => {
729
729
  r.getAttribute("fixed") !== "left" && r.remove();
@@ -732,37 +732,37 @@ me = new WeakMap(), re = new WeakMap(), j = new WeakMap(), F = new WeakMap(), h(
732
732
  }) : s.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
733
733
  r.remove();
734
734
  }), s;
735
- }, "#createSplitTable")), g(O, F, /* @__PURE__ */ h((i) => {
735
+ }, "#createSplitTable")), g(E, F, /* @__PURE__ */ h((i) => {
736
736
  let t = 0;
737
737
  return i.querySelectorAll("col").forEach((s) => {
738
738
  const r = parseInt(s.getAttribute("width"), 10);
739
739
  isNaN(r) || (t += r);
740
740
  }), t;
741
741
  }, "#calculateTableWidth"));
742
- let Le = O;
743
- var A, we, ne, xe;
742
+ let Ce = E;
743
+ var R, we, ne, xe;
744
744
  const Be = class Be {
745
745
  constructor(i) {
746
- g(this, A);
746
+ g(this, R);
747
747
  g(this, we, /* @__PURE__ */ h(() => {
748
748
  e(this, xe).call(this), new ResizeObserver((i) => {
749
749
  for (let t of i)
750
- e(this, A).getAttribute("auto-height") === "true" && e(this, ne).call(this);
751
- }).observe(e(this, A));
750
+ e(this, R).getAttribute("auto-height") === "true" && e(this, ne).call(this);
751
+ }).observe(e(this, R));
752
752
  }, "#init"));
753
753
  g(this, ne, /* @__PURE__ */ h(() => {
754
754
  var u, l;
755
- const i = Array.from(e(this, A).shadowRoot.querySelectorAll("nine-table-sheet.active"));
755
+ const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
756
756
  if (i.length === 0) return;
757
- const t = parseInt(e(this, A).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), r = (u = e(this, A).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : u.getBoundingClientRect().height, n = (l = e(this, A).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ae.SCROLLBAR_SIZE, c = t * s + r + n + o;
758
- e(this, A).style.height = `${c}px`;
757
+ const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), r = (u = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : u.getBoundingClientRect().height, n = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ae.SCROLLBAR_SIZE, c = t * s + r + n + o;
758
+ e(this, R).style.height = `${c}px`;
759
759
  }, "#applyAutoHeight"));
760
760
  g(this, xe, /* @__PURE__ */ h(() => {
761
- const t = Array.from(e(this, A).children).filter((l) => l.tagName === "TABLE"), s = e(this, A).getAttribute("auto-height") === "true", r = t.length, n = t.map((l, a) => {
761
+ const t = Array.from(e(this, R).children).filter((l) => l.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", r = t.length, n = t.map((l, a) => {
762
762
  const f = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, b = a < r - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
763
763
  return f + b;
764
764
  }).join(""), o = t.map((l, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
765
- e(this, A).shadowRoot.innerHTML = `
765
+ e(this, R).shadowRoot.innerHTML = `
766
766
  <style>
767
767
  :host {
768
768
  display: flex;
@@ -861,25 +861,25 @@ const Be = class Be {
861
861
  </nine-table-body>
862
862
  <nine-table-footer></nine-table-footer>
863
863
  `;
864
- const c = e(this, A).shadowRoot.querySelectorAll("nine-table-sheet"), u = Le.compileAll(t);
865
- _.log(u), c == null || c.forEach((l, a) => {
864
+ const c = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet"), u = Ce.compileAll(t);
865
+ M.log(u), c == null || c.forEach((l, a) => {
866
866
  t[a] && setTimeout(() => {
867
867
  l.generate(t[a]), s && e(this, ne).call(this);
868
868
  });
869
869
  });
870
870
  }, "#render"));
871
- y(this, A, i), e(this, we).call(this);
871
+ y(this, R, i), e(this, we).call(this);
872
872
  }
873
873
  };
874
- A = new WeakMap(), we = new WeakMap(), ne = new WeakMap(), xe = new WeakMap(), h(Be, "LayoutManager");
875
- let _e = Be;
876
- var W, Y;
874
+ R = new WeakMap(), we = new WeakMap(), ne = new WeakMap(), xe = new WeakMap(), h(Be, "LayoutManager");
875
+ let Ie = Be;
876
+ var O, Y;
877
877
  const De = class De {
878
878
  constructor(i) {
879
- g(this, W);
879
+ g(this, O);
880
880
  g(this, Y, -1);
881
- S(this, "count", /* @__PURE__ */ h(() => e(this, W).rawRecords.length, "count"));
882
- y(this, W, i);
881
+ S(this, "count", /* @__PURE__ */ h(() => e(this, O).rawRecords.length, "count"));
882
+ y(this, O, i);
883
883
  }
884
884
  get at() {
885
885
  return e(this, Y);
@@ -887,57 +887,57 @@ const De = class De {
887
887
  set at(i) {
888
888
  var s, r;
889
889
  y(this, Y, parseInt(i, 10));
890
- const t = ((r = (s = e(this, W).owner).querySelector) == null ? void 0 : r.call(s, ".ng-container-body")) || e(this, W).owner.body;
890
+ const t = ((r = (s = e(this, O).owner).querySelector) == null ? void 0 : r.call(s, ".ng-container-body")) || e(this, O).owner.body;
891
891
  t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, Y)}"]`) && setTimeout(() => {
892
892
  var n, o;
893
- (o = (n = e(this, W).owner).scrollTo_V1) == null || o.call(n, e(this, Y));
893
+ (o = (n = e(this, O).owner).scrollTo_V1) == null || o.call(n, e(this, Y));
894
894
  });
895
895
  }
896
896
  };
897
- W = new WeakMap(), Y = new WeakMap(), h(De, "ngRow");
898
- let Ie = De;
899
- var q, x, T, G, ve, z, Se, oe, Ee, Ae, J;
900
- const k = class k {
897
+ O = new WeakMap(), Y = new WeakMap(), h(De, "ngRow");
898
+ let Me = De;
899
+ var T, x, k, G, ve, N, Se, oe, Ee, Ae, J;
900
+ const C = class C {
901
901
  constructor(i, t) {
902
- g(this, q);
902
+ g(this, T);
903
903
  g(this, x);
904
- g(this, T, []);
904
+ g(this, k, []);
905
905
  g(this, G, []);
906
906
  g(this, ve, 0);
907
- g(this, z, []);
907
+ g(this, N, []);
908
908
  g(this, Se, /* @__PURE__ */ h(() => {
909
- y(this, z, []);
910
- const i = e(this, q).template || [];
909
+ y(this, N, []);
910
+ const i = e(this, T).template || [];
911
911
  Array.from(i).forEach((t) => {
912
912
  var s;
913
- e(this, z).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
913
+ e(this, N).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
914
914
  }), (e(this, x).rawRecords || []).forEach((t) => {
915
- t.__ng || (t.__ng = e(this, oe).call(this)), t.__ng.height = e(this, z).slice();
915
+ t.__ng || (t.__ng = e(this, oe).call(this)), t.__ng.height = e(this, N).slice();
916
916
  });
917
917
  }, "#initialize"));
918
918
  S(this, "set", /* @__PURE__ */ h((i) => {
919
919
  this.clear(), this.add(i, !1);
920
920
  }, "set"));
921
921
  g(this, oe, /* @__PURE__ */ h(() => ({
922
- rowState: k.ROW_STATE.EMPTY,
922
+ rowState: C.ROW_STATE.EMPTY,
923
923
  deleted: !1,
924
924
  filtered: !1,
925
- height: e(this, z).slice(),
925
+ height: e(this, N).slice(),
926
926
  o: {},
927
927
  c: {},
928
- _: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, z).slice(), -1, {}, {}]
928
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, N).slice(), -1, {}, {}]
929
929
  }), "#getDefaultMeta"));
930
930
  S(this, "reset", /* @__PURE__ */ h(() => {
931
- y(this, T, []), y(this, G, []);
931
+ y(this, k, []), y(this, G, []);
932
932
  }, "reset"));
933
933
  S(this, "clear", /* @__PURE__ */ h(() => {
934
934
  var i;
935
- e(this, x).rawRecords = [], y(this, T, []), y(this, G, []), (i = e(this, x).viewRecords) != null && i.reset && e(this, x).viewRecords.reset();
935
+ e(this, x).rawRecords = [], y(this, k, []), y(this, G, []), (i = e(this, x).viewRecords) != null && i.reset && e(this, x).viewRecords.reset();
936
936
  }, "clear"));
937
937
  g(this, Ee, /* @__PURE__ */ h((i) => {
938
938
  var r;
939
939
  Array.isArray(i) || (i = [i]);
940
- const t = typeof ((r = e(this, q).fields) == null ? void 0 : r.get) == "function" ? e(this, q).fields.get() : Object.keys(i[0] || {}), s = [];
940
+ const t = typeof ((r = e(this, T).fields) == null ? void 0 : r.get) == "function" ? e(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
941
941
  return i.forEach((n) => {
942
942
  const o = { v: [] };
943
943
  t.forEach((c) => {
@@ -946,7 +946,7 @@ const k = class k {
946
946
  }), s;
947
947
  }, "#json2Array"));
948
948
  g(this, Ae, /* @__PURE__ */ h((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
949
- t.__ng = e(this, oe).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
949
+ t.__ng = e(this, oe).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = C.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
950
950
  }), i), "#defaultInsert"));
951
951
  S(this, "add", /* @__PURE__ */ h((i, t = !0) => {
952
952
  var n;
@@ -956,17 +956,17 @@ const k = class k {
956
956
  const r = this.count() - 1;
957
957
  return t || s.forEach((o, c) => {
958
958
  const u = e(this, x).rawRecords[r - c];
959
- u && (u.__ng.rowState = k.ROW_STATE.EMPTY);
959
+ u && (u.__ng.rowState = C.ROW_STATE.EMPTY);
960
960
  }), (n = e(this, x).viewRecords) != null && n.reset && e(this, x).viewRecords.reset(), r;
961
961
  }, "add"));
962
962
  S(this, "delete", /* @__PURE__ */ h((i) => {
963
963
  var s;
964
964
  let t = [];
965
965
  Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, x).owner.row.at] : t = [parseInt(i, 10)], t.sort((r, n) => n - r).forEach((r) => {
966
- if (e(this, T)[r]) {
967
- const n = e(this, T)[r].__ng.rowid;
968
- e(this, T)[r].__ng.rowState === k.ROW_STATE.INSERT ? e(this, x).rawRecords = e(this, x).rawRecords.filter((o) => o.__ng.rowid !== n) : e(this, x).rawRecords.forEach((o) => {
969
- o.__ng.rowid === n && (o.__ng.deleted = !0, o.__ng.rowState = k.ROW_STATE.DELETE);
966
+ if (e(this, k)[r]) {
967
+ const n = e(this, k)[r].__ng.rowid;
968
+ e(this, k)[r].__ng.rowState === C.ROW_STATE.INSERT ? e(this, x).rawRecords = e(this, x).rawRecords.filter((o) => o.__ng.rowid !== n) : e(this, x).rawRecords.forEach((o) => {
969
+ o.__ng.rowid === n && (o.__ng.deleted = !0, o.__ng.rowState = C.ROW_STATE.DELETE);
970
970
  });
971
971
  }
972
972
  }), this.resetRecords(), (s = e(this, x).viewRecords) != null && s.reset && e(this, x).viewRecords.reset();
@@ -974,25 +974,25 @@ const k = class k {
974
974
  S(this, "setValue", /* @__PURE__ */ h((i, t, s) => {
975
975
  var u;
976
976
  i = parseInt(i, 10);
977
- const n = (typeof ((u = e(this, q).fields) == null ? void 0 : u.get) == "function" ? e(this, q).fields.get() : []).indexOf(t);
977
+ const n = (typeof ((u = e(this, T).fields) == null ? void 0 : u.get) == "function" ? e(this, T).fields.get() : []).indexOf(t);
978
978
  if (n < 0) return;
979
979
  const o = this.getValidData()[i];
980
980
  if (!o) return;
981
981
  const c = o.v[n];
982
- 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[n] = s, e(this, x).owner.refreshData && e(this, x).owner.refreshData(i);
982
+ c !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = c), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[n] = s, e(this, x).owner.refreshData && e(this, x).owner.refreshData(i);
983
983
  }, "setValue"));
984
984
  S(this, "resetRecords", /* @__PURE__ */ h(() => {
985
- y(this, G, e(this, x).rawRecords.filter((i) => !i.__ng.deleted)), y(this, T, e(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, x).rawRecords.forEach((i, t) => {
985
+ y(this, G, e(this, x).rawRecords.filter((i) => !i.__ng.deleted)), y(this, k, e(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, x).rawRecords.forEach((i, t) => {
986
986
  i.__ng.rowidx = t;
987
- }), e(this, T).forEach((i, t) => {
987
+ }), e(this, k).forEach((i, t) => {
988
988
  i.__ng.i = t;
989
989
  });
990
990
  }, "resetRecords"));
991
- S(this, "getValidData", /* @__PURE__ */ h(() => (e(this, T).length === 0 && e(this, x).rawRecords.length > 0 && this.resetRecords(), e(this, T)), "getValidData"));
991
+ S(this, "getValidData", /* @__PURE__ */ h(() => (e(this, k).length === 0 && e(this, x).rawRecords.length > 0 && this.resetRecords(), e(this, k)), "getValidData"));
992
992
  g(this, J, /* @__PURE__ */ h((i) => {
993
993
  var s;
994
994
  if (!i) return i;
995
- const t = typeof ((s = e(this, q).fields) == null ? void 0 : s.get) == "function" ? e(this, q).fields.get() : [];
995
+ const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
996
996
  return Array.isArray(i) ? i.filter((r) => !r.__ng.deleted).map((r) => {
997
997
  const n = {};
998
998
  return t.forEach((o, c) => {
@@ -1007,14 +1007,14 @@ const k = class k {
1007
1007
  if (!s || s.length <= 0) return;
1008
1008
  if (i == null) return e(this, J).call(this, s);
1009
1009
  if (i < 0 || i >= s.length) return null;
1010
- const r = typeof ((n = e(this, q).fields) == null ? void 0 : n.get) == "function" ? e(this, q).fields.get() : [];
1010
+ const r = typeof ((n = e(this, T).fields) == null ? void 0 : n.get) == "function" ? e(this, T).fields.get() : [];
1011
1011
  if (t != null) {
1012
1012
  const o = r.indexOf(t);
1013
1013
  return o >= 0 ? s[i].v[o] : null;
1014
1014
  }
1015
1015
  return e(this, J).call(this, s[i]);
1016
1016
  }, "get"));
1017
- y(this, q, i), y(this, x, t), e(this, Se).call(this);
1017
+ y(this, T, i), y(this, x, t), e(this, Se).call(this);
1018
1018
  }
1019
1019
  get source() {
1020
1020
  return e(this, J).call(this, e(this, x).rawRecords);
@@ -1026,24 +1026,24 @@ const k = class k {
1026
1026
  return ++Ke(this, ve)._;
1027
1027
  }
1028
1028
  get length() {
1029
- return e(this, T).length;
1029
+ return e(this, k).length;
1030
1030
  }
1031
1031
  getRowCount() {
1032
1032
  return this.length;
1033
1033
  }
1034
1034
  };
1035
- q = new WeakMap(), x = new WeakMap(), T = new WeakMap(), G = new WeakMap(), ve = new WeakMap(), z = new WeakMap(), Se = new WeakMap(), oe = new WeakMap(), Ee = new WeakMap(), Ae = new WeakMap(), J = new WeakMap(), h(k, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1036
- S(k, "ROW_STATE", {
1035
+ T = new WeakMap(), x = new WeakMap(), k = new WeakMap(), G = new WeakMap(), ve = new WeakMap(), N = new WeakMap(), Se = new WeakMap(), oe = new WeakMap(), Ee = new WeakMap(), Ae = new WeakMap(), J = new WeakMap(), h(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1036
+ S(C, "ROW_STATE", {
1037
1037
  EMPTY: "EMPTY",
1038
1038
  NORMAL: "NORMAL",
1039
1039
  INSERT: "INSERT",
1040
1040
  UPDATE: "UPDATE",
1041
1041
  DELETE: "DELETE"
1042
1042
  });
1043
- let Me = k;
1043
+ let He = C;
1044
1044
  const Pe = class Pe {
1045
1045
  constructor(i) {
1046
- this.owner = i, this.row = new Ie(this), this.data = new Me(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1046
+ this.owner = i, this.row = new Me(this), this.data = new He(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1047
1047
  var t;
1048
1048
  (t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
1049
1049
  }, this.setDataSource = (t) => {
@@ -1061,7 +1061,7 @@ const Pe = class Pe {
1061
1061
  }
1062
1062
  };
1063
1063
  h(Pe, "ngDataManager");
1064
- let He = Pe;
1064
+ let _e = Pe;
1065
1065
  var U, Re;
1066
1066
  const Ve = class Ve extends HTMLElement {
1067
1067
  constructor() {
@@ -1069,13 +1069,13 @@ const Ve = class Ve extends HTMLElement {
1069
1069
  //#created = false;
1070
1070
  g(this, U);
1071
1071
  g(this, Re);
1072
- this.attachShadow({ mode: "open" }), y(this, U, new He(this));
1072
+ this.attachShadow({ mode: "open" }), y(this, U, new _e(this));
1073
1073
  }
1074
1074
  connectedCallback() {
1075
- y(this, Re, new _e(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1075
+ y(this, Re, new Ie(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1076
1076
  }
1077
1077
  disconnectedCallback() {
1078
- _.log("NineTable disconnected.");
1078
+ M.log("NineTable disconnected.");
1079
1079
  }
1080
1080
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1081
1081
  get data() {