@ninebone/table 0.0.760 β†’ 0.0.762

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
  /**
@@ -917,9 +917,11 @@ const Et = class Et extends HTMLElement {
917
917
  r[0].querySelectorAll("col").forEach((i) => {
918
918
  const a = parseInt(i.getAttribute("width"), 10);
919
919
  isNaN(a) || (o += a);
920
- }), n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`, r.forEach((i) => {
921
- i.style.width = `${o}px`;
922
- });
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
+ }));
923
925
  });
924
926
  }, "#updateContainerWidths"));
925
927
  d(this, yt, /* @__PURE__ */ h((e, n, r) => {
@@ -1221,17 +1223,17 @@ const ts = class ts extends HTMLElement {
1221
1223
  ce = new WeakMap(), Ot = new WeakMap(), h(ts, "NineTableSheets");
1222
1224
  let Ce = ts;
1223
1225
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ce);
1224
- var N, he, zt, de;
1226
+ var N, he, Wt, de;
1225
1227
  const es = class es {
1226
1228
  constructor(s) {
1227
1229
  d(this, N);
1228
1230
  d(this, he, /* @__PURE__ */ h(() => {
1229
1231
  t(this, de).call(this), new ResizeObserver((s) => {
1230
1232
  for (let e of s)
1231
- 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);
1232
1234
  }).observe(t(this, N));
1233
1235
  }, "#init"));
1234
- d(this, zt, /* @__PURE__ */ h(() => {
1236
+ d(this, Wt, /* @__PURE__ */ h(() => {
1235
1237
  var c, l;
1236
1238
  const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1237
1239
  if (s.length === 0) return;
@@ -1367,22 +1369,22 @@ const es = class es {
1367
1369
  const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1368
1370
  a == null || a.forEach((c, l) => {
1369
1371
  e[l] && setTimeout(() => {
1370
- c.generate(e[l]), n && t(this, zt).call(this);
1372
+ c.generate(e[l]), n && t(this, Wt).call(this);
1371
1373
  });
1372
1374
  });
1373
1375
  }, "#render"));
1374
1376
  p(this, N, s), t(this, he).call(this);
1375
1377
  }
1376
1378
  };
1377
- 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");
1378
1380
  let ke = es;
1379
- var Wt, mt;
1381
+ var zt, mt;
1380
1382
  const ss = class ss {
1381
1383
  constructor(s) {
1382
- d(this, Wt);
1384
+ d(this, zt);
1383
1385
  d(this, mt, -1);
1384
- q(this, "count", /* @__PURE__ */ h(() => t(this, Wt).rawRecords.length, "count"));
1385
- p(this, Wt, s);
1386
+ q(this, "count", /* @__PURE__ */ h(() => t(this, zt).rawRecords.length, "count"));
1387
+ p(this, zt, s);
1386
1388
  }
1387
1389
  get at() {
1388
1390
  return t(this, mt);
@@ -1392,14 +1394,14 @@ const ss = class ss {
1392
1394
  });
1393
1395
  }
1394
1396
  };
1395
- Wt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1397
+ zt = new WeakMap(), mt = new WeakMap(), h(ss, "ngRow");
1396
1398
  let Le = ss;
1397
- var O, L, z, xt, fe, Z, ue, dt, Bt, ge, be, wt;
1398
- const W = class W {
1399
+ var O, L, W, xt, fe, Z, ue, dt, Bt, ge, be, wt;
1400
+ const z = class z {
1399
1401
  constructor(s, e) {
1400
1402
  d(this, O);
1401
1403
  d(this, L);
1402
- d(this, z, []);
1404
+ d(this, W, []);
1403
1405
  d(this, xt, []);
1404
1406
  d(this, fe, 0);
1405
1407
  d(this, Z, []);
@@ -1436,20 +1438,20 @@ const W = class W {
1436
1438
  this.clear(), this.add(s, !1), t(this, dt).call(this);
1437
1439
  }, "set"));
1438
1440
  d(this, Bt, /* @__PURE__ */ h(() => ({
1439
- rowState: W.ROW_STATE.EMPTY,
1441
+ rowState: z.ROW_STATE.EMPTY,
1440
1442
  deleted: !1,
1441
1443
  filtered: !1,
1442
1444
  height: t(this, Z).slice(),
1443
1445
  o: {},
1444
1446
  c: {},
1445
- _: [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, {}, {}]
1446
1448
  }), "#getDefaultMeta"));
1447
1449
  q(this, "reset", /* @__PURE__ */ h(() => {
1448
- p(this, z, []), p(this, xt, []), t(this, dt).call(this);
1450
+ p(this, W, []), p(this, xt, []), t(this, dt).call(this);
1449
1451
  }, "reset"));
1450
1452
  q(this, "clear", /* @__PURE__ */ h(() => {
1451
1453
  var s;
1452
- 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();
1453
1455
  }, "clear"));
1454
1456
  d(this, ge, /* @__PURE__ */ h((s) => {
1455
1457
  var r;
@@ -1463,7 +1465,7 @@ const W = class W {
1463
1465
  }), n;
1464
1466
  }, "#json2Array"));
1465
1467
  d(this, be, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1466
- 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;
1467
1469
  }), s), "#defaultInsert"));
1468
1470
  q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1469
1471
  s === void 0 && (s = {});
@@ -1472,16 +1474,16 @@ const W = class W {
1472
1474
  const r = this.count() - 1;
1473
1475
  return e || n.forEach((o, i) => {
1474
1476
  const a = t(this, L).rawRecords[r - i];
1475
- a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1477
+ a && (a.__ng.rowState = z.ROW_STATE.EMPTY);
1476
1478
  }), t(this, dt).call(this), r;
1477
1479
  }, "add"));
1478
1480
  q(this, "delete", /* @__PURE__ */ h((s) => {
1479
1481
  let e = [];
1480
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) => {
1481
- if (t(this, z)[n]) {
1482
- const r = t(this, z)[n].__ng.rowid;
1483
- 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) => {
1484
- 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);
1485
1487
  });
1486
1488
  }
1487
1489
  }), this.resetRecords(), t(this, dt).call(this);
@@ -1494,16 +1496,16 @@ const W = class W {
1494
1496
  const i = this.getValidData()[s];
1495
1497
  if (!i) return;
1496
1498
  const a = i.v[o];
1497
- 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;
1498
1500
  }, "setValue"));
1499
1501
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1500
- 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) => {
1501
1503
  s.__ng.rowidx = e;
1502
- }), t(this, z).forEach((s, e) => {
1504
+ }), t(this, W).forEach((s, e) => {
1503
1505
  s.__ng.i = e;
1504
1506
  });
1505
1507
  }, "resetRecords"));
1506
- 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"));
1507
1509
  d(this, wt, /* @__PURE__ */ h((s) => {
1508
1510
  var i;
1509
1511
  if (!s) return s;
@@ -1528,24 +1530,24 @@ const W = class W {
1528
1530
  return ++gs(this, fe)._;
1529
1531
  }
1530
1532
  get count() {
1531
- return t(this, z).length;
1533
+ return t(this, W).length;
1532
1534
  }
1533
1535
  get length() {
1534
- return t(this, z).length;
1536
+ return t(this, W).length;
1535
1537
  }
1536
1538
  getRowCount() {
1537
1539
  return this.length;
1538
1540
  }
1539
1541
  };
1540
- 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"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1541
- 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", {
1542
1544
  EMPTY: "EMPTY",
1543
1545
  NORMAL: "NORMAL",
1544
1546
  INSERT: "INSERT",
1545
1547
  UPDATE: "UPDATE",
1546
1548
  DELETE: "DELETE"
1547
1549
  });
1548
- let Ie = W;
1550
+ let Ie = z;
1549
1551
  var ft;
1550
1552
  const ns = class ns {
1551
1553
  constructor(s) {
@@ -1641,7 +1643,7 @@ const rs = class rs {
1641
1643
  }
1642
1644
  };
1643
1645
  vt = new WeakMap(), M = new WeakMap(), Pt = new WeakMap(), pe = new WeakMap(), h(rs, "ngFields");
1644
- let Me = rs;
1646
+ let $e = rs;
1645
1647
  var ut, ye, me;
1646
1648
  const os = class os extends HTMLElement {
1647
1649
  constructor() {
@@ -1650,7 +1652,7 @@ const os = class os extends HTMLElement {
1650
1652
  d(this, ut);
1651
1653
  d(this, ye);
1652
1654
  d(this, me, /* @__PURE__ */ h(() => {
1653
- 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 } }));
1654
1656
  }, "#init"));
1655
1657
  this.attachShadow({ mode: "open" }), p(this, ut, new He(this));
1656
1658
  }
@@ -1674,8 +1676,8 @@ const os = class os extends HTMLElement {
1674
1676
  }
1675
1677
  };
1676
1678
  ut = new WeakMap(), ye = new WeakMap(), me = new WeakMap(), h(os, "NineTable");
1677
- let $e = os;
1678
- customElements.get("nine-table") || customElements.define("nine-table", $e);
1679
+ let Me = os;
1680
+ customElements.get("nine-table") || customElements.define("nine-table", Me);
1679
1681
  const qt = class qt extends HTMLElement {
1680
1682
  // πŸ‘ˆ μ»€μŠ€ν…€ μŠ€νƒ€μΌμš© μΊμ‹œ μΆ”κ°€
1681
1683
  constructor() {