@ninebone/table 0.0.615 β†’ 0.0.617

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.
@@ -22,7 +22,7 @@ const He = class He extends Ke.constructor {
22
22
  };
23
23
  c(He, "Trace");
24
24
  let oe = He;
25
- const W = new oe();
25
+ const N = new oe();
26
26
  var B, j, w, X, K, Z, It, G, _t;
27
27
  const Me = class Me extends HTMLElement {
28
28
  constructor() {
@@ -230,7 +230,7 @@ const $e = class $e extends HTMLElement {
230
230
  m < 0 && (m = 0), m > x && (m = x), r.style.top = `${m}px`, t(this, T).top.disabled = g <= 0, t(this, T).bottom.disabled = g >= b - 1;
231
231
  }, "refresh"));
232
232
  d(this, Nt, /* @__PURE__ */ c(() => {
233
- W.log("nine-table-vscrollbar.#init");
233
+ N.log("nine-table-vscrollbar.#init");
234
234
  const e = t(this, T).container, s = /* @__PURE__ */ c(() => {
235
235
  const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
236
236
  return n * o;
@@ -371,12 +371,12 @@ const Ie = class Ie {
371
371
  d(this, Wt, 3);
372
372
  E(this, "refresh", /* @__PURE__ */ c(() => {
373
373
  var e;
374
- W.log("rowManager.refresh");
374
+ N.log("rowManager.refresh");
375
375
  const i = t(this, S).querySelector(".ng-container-body .ng-part-body");
376
376
  i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
377
377
  }, "refresh"));
378
378
  E(this, "initialize", /* @__PURE__ */ c(() => {
379
- W.log("rowManager.initialize"), y(this, Q, {
379
+ N.log("rowManager.initialize"), y(this, Q, {
380
380
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
381
381
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
382
382
  }), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
@@ -407,7 +407,7 @@ const Ie = class Ie {
407
407
  }
408
408
  }, "initialize"));
409
409
  d(this, Ot, /* @__PURE__ */ c((i, e) => {
410
- W.log("rowManager.#renderRows");
410
+ N.log("rowManager.#renderRows");
411
411
  const s = t(this, D).get(e);
412
412
  if (!s || s.length === 0) return;
413
413
  const r = i.querySelector(".ng-part-body tbody.bindable-tbody");
@@ -421,9 +421,9 @@ const Ie = class Ie {
421
421
  n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, zt, /* @__PURE__ */ c((i) => {
424
- if (W.log("rowManager.#measureAndCacheHeight"), t(this, I) !== null && t(this, I) > 0)
424
+ if (N.log("rowManager.#measureAndCacheHeight"), t(this, I) !== null && t(this, I) > 0)
425
425
  return t(this, I);
426
- W.log("#measureAndCacheHeight");
426
+ N.log("#measureAndCacheHeight");
427
427
  const e = t(this, D).get(".ng-container-body");
428
428
  if (!e || e.length === 0) return 24;
429
429
  const s = i.querySelector("tbody.bindable-tbody");
@@ -442,9 +442,9 @@ const Ie = class Ie {
442
442
  }), u.forEach((g) => g.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, y(this, I, f > 0 ? f : 24), t(this, At).call(this), t(this, I);
443
443
  }, "#measureAndCacheHeight"));
444
444
  d(this, St, /* @__PURE__ */ c(() => {
445
- W.log("rowManager.#updateVirtualScrollHeight");
445
+ N.log("rowManager.#updateVirtualScrollHeight");
446
446
  const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
447
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
447
+ N.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
448
448
  const o = t(this, S).querySelector(n);
449
449
  if (!o) return;
450
450
  const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
@@ -501,7 +501,7 @@ const Ie = class Ie {
501
501
  })), t(this, V).observe(t(this, S)));
502
502
  }, "#initResizeObserver"));
503
503
  d(this, Et, /* @__PURE__ */ c(() => {
504
- W.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
504
+ N.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
505
505
  const e = t(this, S).querySelector(i);
506
506
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Ot).call(this, e, i);
507
507
  }), t(this, Pt).call(this), t(this, Bt).call(this);
@@ -517,7 +517,7 @@ const Ie = class Ie {
517
517
  n.forEach((f, u) => {
518
518
  const g = i + Math.floor(u / o);
519
519
  if (g >= h) {
520
- f.style.display = "none";
520
+ f.style.visibility = "hidden";
521
521
  return;
522
522
  }
523
523
  const b = t(this, P).data.get(g);
@@ -573,7 +573,7 @@ const Ie = class Ie {
573
573
  }, "#bindRowData"));
574
574
  d(this, Pt, /* @__PURE__ */ c(() => {
575
575
  var h, l, f;
576
- W.log("rowManager.#syncHeaderHeights");
576
+ N.log("rowManager.#syncHeaderHeights");
577
577
  const i = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
578
578
  if (!e) return;
579
579
  const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
@@ -943,7 +943,7 @@ const pt = class pt extends HTMLElement {
943
943
  t(this, Ut).call(this);
944
944
  }
945
945
  disconnectedCallback() {
946
- this.innerHTML = "", W.log("NineTableSheet destroyed.");
946
+ this.innerHTML = "", N.log("NineTableSheet destroyed.");
947
947
  }
948
948
  };
949
949
  Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
@@ -1173,12 +1173,12 @@ const We = class We {
1173
1173
  };
1174
1174
  kt = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
1175
1175
  let ue = We;
1176
- var _, k, N, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1176
+ var _, k, W, dt, Jt, Y, Qt, it, Ct, te, ee, ft;
1177
1177
  const O = class O {
1178
1178
  constructor(i, e) {
1179
1179
  d(this, _);
1180
1180
  d(this, k);
1181
- d(this, N, []);
1181
+ d(this, W, []);
1182
1182
  d(this, dt, []);
1183
1183
  d(this, Jt, 0);
1184
1184
  d(this, Y, []);
@@ -1224,11 +1224,11 @@ const O = class O {
1224
1224
  _: [0, 0, 0, 0, O.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Y).slice(), -1, {}, {}]
1225
1225
  }), "#getDefaultMeta"));
1226
1226
  E(this, "reset", /* @__PURE__ */ c(() => {
1227
- y(this, N, []), y(this, dt, []), t(this, it).call(this);
1227
+ y(this, W, []), y(this, dt, []), t(this, it).call(this);
1228
1228
  }, "reset"));
1229
1229
  E(this, "clear", /* @__PURE__ */ c(() => {
1230
1230
  var i;
1231
- t(this, k).rawRecords = [], y(this, N, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1231
+ t(this, k).rawRecords = [], y(this, W, []), y(this, dt, []), (i = t(this, k).viewRecords) != null && i.reset && t(this, k).viewRecords.reset();
1232
1232
  }, "clear"));
1233
1233
  d(this, te, /* @__PURE__ */ c((i) => {
1234
1234
  var r;
@@ -1257,9 +1257,9 @@ const O = class O {
1257
1257
  E(this, "delete", /* @__PURE__ */ c((i) => {
1258
1258
  let e = [];
1259
1259
  Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(i, 10)], e.sort((s, r) => r - s).forEach((s) => {
1260
- if (t(this, N)[s]) {
1261
- const r = t(this, N)[s].__ng.rowid;
1262
- t(this, N)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, k).rawRecords.forEach((n) => {
1260
+ if (t(this, W)[s]) {
1261
+ const r = t(this, W)[s].__ng.rowid;
1262
+ t(this, W)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== r) : t(this, k).rawRecords.forEach((n) => {
1263
1263
  n.__ng.rowid === r && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1264
1264
  });
1265
1265
  }
@@ -1276,13 +1276,13 @@ const O = class O {
1276
1276
  a !== s && o.__ng.rowState !== O.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = O.ROW_STATE.UPDATE), o.v[n] = s;
1277
1277
  }, "setValue"));
1278
1278
  E(this, "resetRecords", /* @__PURE__ */ c(() => {
1279
- y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, N, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1279
+ y(this, dt, t(this, k).rawRecords.filter((i) => !i.__ng.deleted)), y(this, W, t(this, k).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, k).rawRecords.forEach((i, e) => {
1280
1280
  i.__ng.rowidx = e;
1281
- }), t(this, N).forEach((i, e) => {
1281
+ }), t(this, W).forEach((i, e) => {
1282
1282
  i.__ng.i = e;
1283
1283
  });
1284
1284
  }, "resetRecords"));
1285
- E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, N).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, N)), "getValidData"));
1285
+ E(this, "getValidData", /* @__PURE__ */ c(() => (t(this, W).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1286
1286
  d(this, ft, /* @__PURE__ */ c((i) => {
1287
1287
  var o;
1288
1288
  if (!i) return i;
@@ -1307,16 +1307,16 @@ const O = class O {
1307
1307
  return ++Ue(this, Jt)._;
1308
1308
  }
1309
1309
  get count() {
1310
- return t(this, N).length;
1310
+ return t(this, W).length;
1311
1311
  }
1312
1312
  get length() {
1313
- return t(this, N).length;
1313
+ return t(this, W).length;
1314
1314
  }
1315
1315
  getRowCount() {
1316
1316
  return this.length;
1317
1317
  }
1318
1318
  };
1319
- _ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1319
+ _ = new WeakMap(), k = new WeakMap(), W = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1320
1320
  E(O, "ROW_STATE", {
1321
1321
  EMPTY: "EMPTY",
1322
1322
  NORMAL: "NORMAL",
@@ -1366,11 +1366,11 @@ const ze = class ze {
1366
1366
  }), y(this, L, Array.from(i, ([e, s]) => ({ name: e, type: s }))), y(this, L, t(this, L).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, L).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1367
1367
  }, "#adjust"));
1368
1368
  d(this, se, /* @__PURE__ */ c(() => {
1369
- y(this, L, []), W.log(t(this, ut).querySelectorAll("table"));
1369
+ y(this, L, []), N.log(t(this, ut).querySelectorAll("table"));
1370
1370
  const i = Array.from(t(this, ut).querySelectorAll("table"));
1371
1371
  if (!(!i || i.length === 0)) {
1372
1372
  for (const e of i)
1373
- W.log(e), $("[data-bind]", e).each((s, r) => {
1373
+ N.log(e), $("[data-bind]", e).each((s, r) => {
1374
1374
  const n = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1375
1375
  n && t(this, L).push({ name: n, type: o });
1376
1376
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
@@ -1429,7 +1429,7 @@ const Be = class Be extends HTMLElement {
1429
1429
  d(this, nt);
1430
1430
  d(this, ie);
1431
1431
  d(this, re, /* @__PURE__ */ c(() => {
1432
- this.fields = new ye(this), y(this, ie, new fe(this)), W.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1432
+ this.fields = new ye(this), y(this, ie, new fe(this)), N.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1433
1433
  }, "#init"));
1434
1434
  this.attachShadow({ mode: "open" }), y(this, nt, new be(this));
1435
1435
  }
@@ -1437,7 +1437,7 @@ const Be = class Be extends HTMLElement {
1437
1437
  t(this, re).call(this);
1438
1438
  }
1439
1439
  disconnectedCallback() {
1440
- W.log("NineTable disconnected.");
1440
+ N.log("NineTable disconnected.");
1441
1441
  }
1442
1442
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1443
1443
  get data() {