@ninebone/table 0.0.761 β†’ 0.0.763

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.
@@ -353,7 +353,7 @@ const Ge = class Ge extends HTMLElement {
353
353
  rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), k = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Xt = new WeakMap(), h(Ge, "NineTableVScrollBar");
354
354
  let Re = Ge;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Re);
356
- var j, R, it, P, D, G, at, kt, ze, We, Kt, Gt, Lt, It, Ht, Zt, Jt, Mt, Be, pt, $t, Qt;
356
+ var j, R, it, P, D, G, at, kt, We, ze, Kt, Gt, Lt, It, Ht, Zt, Jt, $t, Be, pt, Mt, Qt;
357
357
  const Ze = class Ze {
358
358
  constructor(s) {
359
359
  d(this, j);
@@ -364,8 +364,8 @@ const Ze = class Ze {
364
364
  d(this, G, null);
365
365
  d(this, at, 0);
366
366
  d(this, kt, 40);
367
- d(this, ze, !1);
368
367
  d(this, We, !1);
368
+ d(this, ze, !1);
369
369
  //#ticking = false; // 🎯 고속 슀크둀 μŠ€λ‘œν‹€λ§μš© ν”Œλž˜κ·Έ
370
370
  d(this, Kt, 3);
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
@@ -390,7 +390,7 @@ const Ze = class Ze {
390
390
  });
391
391
  const s = t(this, R).querySelector(".ng-container-body .ng-part-body"), e = t(this, R).querySelector(".ng-container-left .ng-part-body"), n = t(this, R).querySelector(".ng-container-right .ng-part-body"), r = t(this, R).querySelector(".ng-container-body .ng-part-header"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer");
392
392
  if (s) {
393
- t(this, Lt).call(this), t(this, Mt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop);
393
+ t(this, Lt).call(this), t(this, $t).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop);
394
394
  let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var u;
@@ -501,12 +501,12 @@ const Ze = class Ze {
501
501
  const i = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
502
502
  i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
503
  const c = Math.max(r - o, 100);
504
- t(this, at) !== c && (p(this, at, c), t(this, Ht).call(this), t(this, D) !== null && (t(this, Mt).call(this), this.refresh()));
504
+ t(this, at) !== c && (p(this, at, c), t(this, Ht).call(this), t(this, D) !== null && (t(this, $t).call(this), this.refresh()));
505
505
  }
506
506
  }
507
507
  })), t(this, G).observe(t(this, R)));
508
508
  }, "#initResizeObserver"));
509
- d(this, Mt, /* @__PURE__ */ h(() => {
509
+ d(this, $t, /* @__PURE__ */ h(() => {
510
510
  S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
511
  const e = t(this, R).querySelector(s);
512
512
  e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Gt).call(this, e, s);
@@ -527,7 +527,7 @@ const Ze = class Ze {
527
527
  return;
528
528
  }
529
529
  const g = t(this, j).data.get(b);
530
- f.style.display = "", t(this, $t).call(this, f, g, b);
530
+ f.style.display = "", t(this, Mt).call(this, f, g, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
@@ -557,7 +557,7 @@ const Ze = class Ze {
557
557
  return;
558
558
  }
559
559
  const H = t(this, j).data.get(A);
560
- m.style.display = "", t(this, $t).call(this, m, H, A);
560
+ m.style.display = "", t(this, Mt).call(this, m, H, A);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -575,7 +575,7 @@ const Ze = class Ze {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, $t, /* @__PURE__ */ h((s, e, n) => {
578
+ d(this, Mt, /* @__PURE__ */ h((s, e, n) => {
579
579
  s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, o) => {
580
580
  r.dataset.row = n;
581
581
  const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
@@ -610,7 +610,7 @@ const Ze = class Ze {
610
610
  return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- j = new WeakMap(), R = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), Mt = new WeakMap(), Be = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Qt = new WeakMap(), h(Ze, "RowManager");
613
+ j = new WeakMap(), R = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), We = new WeakMap(), ze = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), $t = new WeakMap(), Be = new WeakMap(), pt = new WeakMap(), Mt = new WeakMap(), Qt = new WeakMap(), h(Ze, "RowManager");
614
614
  let Ae = Ze;
615
615
  const te = class te {
616
616
  /**
@@ -916,8 +916,12 @@ const Et = class Et extends HTMLElement {
916
916
  let o = 0;
917
917
  r[0].querySelectorAll("col").forEach((i) => {
918
918
  const a = parseInt(i.getAttribute("width"), 10);
919
- isNaN(o) || (o += a);
920
- }), S.log(n), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`);
919
+ isNaN(a) || (o += a);
920
+ }), e === "body" ? (n.style.flex = "1", r.forEach((i) => {
921
+ i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
922
+ })) : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`, r.forEach((i) => {
923
+ i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
924
+ }));
921
925
  });
922
926
  }, "#updateContainerWidths"));
923
927
  d(this, yt, /* @__PURE__ */ h((e, n, r) => {
@@ -1219,17 +1223,17 @@ const ts = class ts extends HTMLElement {
1219
1223
  ce = new WeakMap(), Ot = new WeakMap(), h(ts, "NineTableSheets");
1220
1224
  let Ce = ts;
1221
1225
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ce);
1222
- var N, he, zt, de;
1226
+ var N, he, Wt, de;
1223
1227
  const es = class es {
1224
1228
  constructor(s) {
1225
1229
  d(this, N);
1226
1230
  d(this, he, /* @__PURE__ */ h(() => {
1227
1231
  t(this, de).call(this), new ResizeObserver((s) => {
1228
1232
  for (let e of s)
1229
- t(this, N).getAttribute("auto-height") === "true" && t(this, zt).call(this);
1233
+ t(this, N).getAttribute("auto-height") === "true" && t(this, Wt).call(this);
1230
1234
  }).observe(t(this, N));
1231
1235
  }, "#init"));
1232
- d(this, zt, /* @__PURE__ */ h(() => {
1236
+ d(this, Wt, /* @__PURE__ */ h(() => {
1233
1237
  var c, l;
1234
1238
  const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1235
1239
  if (s.length === 0) return;
@@ -1365,22 +1369,22 @@ const es = class es {
1365
1369
  const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1366
1370
  a == null || a.forEach((c, l) => {
1367
1371
  e[l] && setTimeout(() => {
1368
- c.generate(e[l]), n && t(this, zt).call(this);
1372
+ c.generate(e[l]), n && t(this, Wt).call(this);
1369
1373
  });
1370
1374
  });
1371
1375
  }, "#render"));
1372
1376
  p(this, N, s), t(this, he).call(this);
1373
1377
  }
1374
1378
  };
1375
- N = new WeakMap(), he = new WeakMap(), zt = new WeakMap(), de = new WeakMap(), h(es, "LayoutManager");
1379
+ N = new WeakMap(), he = new WeakMap(), Wt = new WeakMap(), de = new WeakMap(), h(es, "LayoutManager");
1376
1380
  let ke = es;
1377
- var Wt, mt;
1381
+ var zt, mt;
1378
1382
  const ss = class ss {
1379
1383
  constructor(s) {
1380
- d(this, Wt);
1384
+ d(this, zt);
1381
1385
  d(this, mt, -1);
1382
- q(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1383
- p(this, Wt, s);
1386
+ q(this, "count", /* @__PURE__ */ h(() => t(this, zt).rawRecords.length, "count"));
1387
+ p(this, zt, s);
1384
1388
  }
1385
1389
  get at() {
1386
1390
  return t(this, mt);
@@ -1390,14 +1394,14 @@ const ss = class ss {
1390
1394
  });
1391
1395
  }
1392
1396
  };
1393
- Wt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1397
+ zt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1394
1398
  let Le = ss;
1395
- var O, L, z, xt, fe, Z, ue, dt, Bt, ge, be, wt;
1396
- const W = class W {
1399
+ var O, L, W, xt, fe, Z, ue, dt, Bt, ge, be, wt;
1400
+ const z = class z {
1397
1401
  constructor(s, e) {
1398
1402
  d(this, O);
1399
1403
  d(this, L);
1400
- d(this, z, []);
1404
+ d(this, W, []);
1401
1405
  d(this, xt, []);
1402
1406
  d(this, fe, 0);
1403
1407
  d(this, Z, []);
@@ -1434,20 +1438,20 @@ const W = class W {
1434
1438
  this.clear(), this.add(s, !1), t(this, dt).call(this);
1435
1439
  }, "set"));
1436
1440
  d(this, Bt, /* @__PURE__ */ h(() => ({
1437
- rowState: W.ROW_STATE.EMPTY,
1441
+ rowState: z.ROW_STATE.EMPTY,
1438
1442
  deleted: !1,
1439
1443
  filtered: !1,
1440
1444
  height: t(this, Z).slice(),
1441
1445
  o: {},
1442
1446
  c: {},
1443
- _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1447
+ _: [0, 0, 0, 0, z.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1444
1448
  }), "#getDefaultMeta"));
1445
1449
  q(this, "reset", /* @__PURE__ */ h(() => {
1446
- p(this, z, []), p(this, xt, []), t(this, dt).call(this);
1450
+ p(this, W, []), p(this, xt, []), t(this, dt).call(this);
1447
1451
  }, "reset"));
1448
1452
  q(this, "clear", /* @__PURE__ */ h(() => {
1449
1453
  var s;
1450
- t(this, L).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, L).viewRecords) != null && s.reset && t(this, L).viewRecords.reset();
1454
+ t(this, L).rawRecords = [], p(this, W, []), p(this, xt, []), (s = t(this, L).viewRecords) != null && s.reset && t(this, L).viewRecords.reset();
1451
1455
  }, "clear"));
1452
1456
  d(this, ge, /* @__PURE__ */ h((s) => {
1453
1457
  var r;
@@ -1461,7 +1465,7 @@ const W = class W {
1461
1465
  }), n;
1462
1466
  }, "#json2Array"));
1463
1467
  d(this, be, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1464
- e.__ng = t(this, Bt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1468
+ e.__ng = t(this, Bt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1465
1469
  }), s), "#defaultInsert"));
1466
1470
  q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1467
1471
  s === void 0 && (s = {});
@@ -1470,16 +1474,16 @@ const W = class W {
1470
1474
  const r = this.count() - 1;
1471
1475
  return e || n.forEach((o, i) => {
1472
1476
  const a = t(this, L).rawRecords[r - i];
1473
- a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1477
+ a && (a.__ng.rowState = z.ROW_STATE.EMPTY);
1474
1478
  }), t(this, dt).call(this), r;
1475
1479
  }, "add"));
1476
1480
  q(this, "delete", /* @__PURE__ */ h((s) => {
1477
1481
  let e = [];
1478
1482
  Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, L).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1479
- if (t(this, z)[n]) {
1480
- const r = t(this, z)[n].__ng.rowid;
1481
- t(this, z)[n].__ng.rowState === W.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, L).rawRecords.forEach((o) => {
1482
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
1483
+ if (t(this, W)[n]) {
1484
+ const r = t(this, W)[n].__ng.rowid;
1485
+ t(this, W)[n].__ng.rowState === z.ROW_STATE.INSERT ? t(this, L).rawRecords = t(this, L).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, L).rawRecords.forEach((o) => {
1486
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = z.ROW_STATE.DELETE);
1483
1487
  });
1484
1488
  }
1485
1489
  }), this.resetRecords(), t(this, dt).call(this);
@@ -1492,16 +1496,16 @@ const W = class W {
1492
1496
  const i = this.getValidData()[s];
1493
1497
  if (!i) return;
1494
1498
  const a = i.v[o];
1495
- a !== n && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[o] = n;
1499
+ a !== n && i.__ng.rowState !== z.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = z.ROW_STATE.UPDATE), i.v[o] = n;
1496
1500
  }, "setValue"));
1497
1501
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1498
- p(this, xt, t(this, L).rawRecords.filter((s) => !s.__ng.deleted)), p(this, z, t(this, L).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, L).rawRecords.forEach((s, e) => {
1502
+ p(this, xt, t(this, L).rawRecords.filter((s) => !s.__ng.deleted)), p(this, W, t(this, L).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, L).rawRecords.forEach((s, e) => {
1499
1503
  s.__ng.rowidx = e;
1500
- }), t(this, z).forEach((s, e) => {
1504
+ }), t(this, W).forEach((s, e) => {
1501
1505
  s.__ng.i = e;
1502
1506
  });
1503
1507
  }, "resetRecords"));
1504
- q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1508
+ q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, L).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1505
1509
  d(this, wt, /* @__PURE__ */ h((s) => {
1506
1510
  var i;
1507
1511
  if (!s) return s;
@@ -1526,24 +1530,24 @@ const W = class W {
1526
1530
  return ++gs(this, fe)._;
1527
1531
  }
1528
1532
  get count() {
1529
- return t(this, z).length;
1533
+ return t(this, W).length;
1530
1534
  }
1531
1535
  get length() {
1532
- return t(this, z).length;
1536
+ return t(this, W).length;
1533
1537
  }
1534
1538
  getRowCount() {
1535
1539
  return this.length;
1536
1540
  }
1537
1541
  };
1538
- O = new WeakMap(), L = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), Z = new WeakMap(), ue = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1539
- q(W, "ROW_STATE", {
1542
+ O = new WeakMap(), L = new WeakMap(), W = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), Z = new WeakMap(), ue = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), ge = new WeakMap(), be = new WeakMap(), wt = new WeakMap(), h(z, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1543
+ q(z, "ROW_STATE", {
1540
1544
  EMPTY: "EMPTY",
1541
1545
  NORMAL: "NORMAL",
1542
1546
  INSERT: "INSERT",
1543
1547
  UPDATE: "UPDATE",
1544
1548
  DELETE: "DELETE"
1545
1549
  });
1546
- let Ie = W;
1550
+ let Ie = z;
1547
1551
  var ft;
1548
1552
  const ns = class ns {
1549
1553
  constructor(s) {
@@ -1639,7 +1643,7 @@ const rs = class rs {
1639
1643
  }
1640
1644
  };
1641
1645
  vt = new WeakMap(), M = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), h(rs, "ngFields");
1642
- let Me = rs;
1646
+ let $e = rs;
1643
1647
  var ut, ye, me;
1644
1648
  const os = class os extends HTMLElement {
1645
1649
  constructor() {
@@ -1648,7 +1652,7 @@ const os = class os extends HTMLElement {
1648
1652
  d(this, ut);
1649
1653
  d(this, ye);
1650
1654
  d(this, me, /* @__PURE__ */ h(() => {
1651
- this.fields = new Me(this), p(this, ye, new ke(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1655
+ this.fields = new $e(this), p(this, ye, new ke(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1652
1656
  }, "#init"));
1653
1657
  this.attachShadow({ mode: "open" }), p(this, ut, new He(this));
1654
1658
  }
@@ -1672,8 +1676,8 @@ const os = class os extends HTMLElement {
1672
1676
  }
1673
1677
  };
1674
1678
  ut = new WeakMap(), ye = new WeakMap(), me = new WeakMap(), h(os, "NineTable");
1675
- let $e = os;
1676
- customElements.get("nine-table") || customElements.define("nine-table", $e);
1679
+ let Me = os;
1680
+ customElements.get("nine-table") || customElements.define("nine-table", Me);
1677
1681
  const qt = class qt extends HTMLElement {
1678
1682
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1679
1683
  constructor() {