@ninebone/table 0.0.546 β†’ 0.0.547

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.
@@ -389,19 +389,11 @@ const Ie = class Ie {
389
389
  t(this, P).set(a, u);
390
390
  });
391
391
  const r = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), i = t(this, S).querySelector(".ng-container-body .ng-part-header"), n = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- if (r) {
393
- t(this, Bt).call(this, r), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, r.scrollTop);
394
- let a = !1;
395
- const o = /* @__PURE__ */ h((c, l, f) => {
396
- var u;
397
- a || (a = !0, r && r.scrollTop !== c && (r.scrollTop = c), e && e.scrollTop !== c && (e.scrollTop = c), s && s.scrollTop !== c && (s.scrollTop = c), i && i.scrollLeft !== l && (i.scrollLeft = l), n && n.scrollLeft !== l && (n.scrollLeft = l), t(this, lt).call(this, c), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), a = !1);
398
- }, "syncScroll");
399
- [r, e, s].forEach((c) => {
400
- c && c.addEventListener("scroll", () => {
401
- o(c.scrollTop, c.scrollLeft);
402
- });
403
- });
404
- }
392
+ r && (t(this, Bt).call(this, r), t(this, At).call(this), t(this, St).call(this), t(this, lt).call(this, r.scrollTop), r.addEventListener("scroll", () => {
393
+ var c;
394
+ const a = r.scrollTop, o = r.scrollLeft;
395
+ e && (e.scrollTop = a), s && (s.scrollTop = a), i && (i.scrollLeft = o), n && (n.scrollLeft = o), t(this, lt).call(this, a), (c = t(this, S).querySelector("nine-table-vscrollbar")) == null || c.refresh();
396
+ }));
405
397
  }, "initialize"));
406
398
  d(this, Ot, /* @__PURE__ */ h((r, e) => {
407
399
  N.log("rowManager.#renderRows");
@@ -963,17 +955,17 @@ const _e = class _e extends HTMLElement {
963
955
  Kt = new WeakMap(), qt = new WeakMap(), h(_e, "NineTableSheets");
964
956
  let de = _e;
965
957
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
966
- var M, Zt, kt, Gt;
958
+ var M, Zt, Tt, Gt;
967
959
  const Ne = class Ne {
968
960
  constructor(r) {
969
961
  d(this, M);
970
962
  d(this, Zt, /* @__PURE__ */ h(() => {
971
963
  t(this, Gt).call(this), new ResizeObserver((r) => {
972
964
  for (let e of r)
973
- t(this, M).getAttribute("auto-height") === "true" && t(this, kt).call(this);
965
+ t(this, M).getAttribute("auto-height") === "true" && t(this, Tt).call(this);
974
966
  }).observe(t(this, M));
975
967
  }, "#init"));
976
- d(this, kt, /* @__PURE__ */ h(() => {
968
+ d(this, Tt, /* @__PURE__ */ h(() => {
977
969
  var c, l;
978
970
  const r = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
979
971
  if (r.length === 0) return;
@@ -1079,22 +1071,22 @@ const Ne = class Ne {
1079
1071
  const o = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1080
1072
  o == null || o.forEach((c, l) => {
1081
1073
  e[l] && setTimeout(() => {
1082
- c.generate(e[l]), s && t(this, kt).call(this);
1074
+ c.generate(e[l]), s && t(this, Tt).call(this);
1083
1075
  });
1084
1076
  });
1085
1077
  }, "#render"));
1086
1078
  y(this, M, r), t(this, Zt).call(this);
1087
1079
  }
1088
1080
  };
1089
- M = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1081
+ M = new WeakMap(), Zt = new WeakMap(), Tt = new WeakMap(), Gt = new WeakMap(), h(Ne, "LayoutManager");
1090
1082
  let fe = Ne;
1091
- var Tt, ht;
1083
+ var kt, ht;
1092
1084
  const We = class We {
1093
1085
  constructor(r) {
1094
- d(this, Tt);
1086
+ d(this, kt);
1095
1087
  d(this, ht, -1);
1096
- E(this, "count", /* @__PURE__ */ h(() => t(this, Tt).rawRecords.length, "count"));
1097
- y(this, Tt, r);
1088
+ E(this, "count", /* @__PURE__ */ h(() => t(this, kt).rawRecords.length, "count"));
1089
+ y(this, kt, r);
1098
1090
  }
1099
1091
  get at() {
1100
1092
  return t(this, ht);
@@ -1104,13 +1096,13 @@ const We = class We {
1104
1096
  });
1105
1097
  }
1106
1098
  };
1107
- Tt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1099
+ kt = new WeakMap(), ht = new WeakMap(), h(We, "ngRow");
1108
1100
  let ue = We;
1109
- var I, k, _, dt, Jt, Y, Qt, rt, Ct, te, ee, ft;
1101
+ var I, T, _, dt, Jt, Y, Qt, rt, Ct, te, ee, ft;
1110
1102
  const O = class O {
1111
1103
  constructor(r, e) {
1112
1104
  d(this, I);
1113
- d(this, k);
1105
+ d(this, T);
1114
1106
  d(this, _, []);
1115
1107
  d(this, dt, []);
1116
1108
  d(this, Jt, 0);
@@ -1121,7 +1113,7 @@ const O = class O {
1121
1113
  Array.from(r).forEach((e) => {
1122
1114
  var s;
1123
1115
  t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1124
- }), (t(this, k).rawRecords || []).forEach((e) => {
1116
+ }), (t(this, T).rawRecords || []).forEach((e) => {
1125
1117
  e.__ng || (e.__ng = t(this, Ct).call(this)), e.__ng.height = t(this, Y).slice();
1126
1118
  });
1127
1119
  }, "#initialize"));
@@ -1160,7 +1152,7 @@ const O = class O {
1160
1152
  }, "reset"));
1161
1153
  E(this, "clear", /* @__PURE__ */ h(() => {
1162
1154
  var r;
1163
- t(this, k).rawRecords = [], y(this, _, []), y(this, dt, []), (r = t(this, k).viewRecords) != null && r.reset && t(this, k).viewRecords.reset();
1155
+ t(this, T).rawRecords = [], y(this, _, []), y(this, dt, []), (r = t(this, T).viewRecords) != null && r.reset && t(this, T).viewRecords.reset();
1164
1156
  }, "clear"));
1165
1157
  d(this, te, /* @__PURE__ */ h((r) => {
1166
1158
  var i;
@@ -1179,19 +1171,19 @@ const O = class O {
1179
1171
  E(this, "add", /* @__PURE__ */ h((r, e = !0) => {
1180
1172
  r === void 0 && (r = {});
1181
1173
  const s = t(this, te).call(this, r);
1182
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1174
+ t(this, T).rawRecords = t(this, T).rawRecords.concat(t(this, ee).call(this, s)), this.resetRecords();
1183
1175
  const i = this.count() - 1;
1184
1176
  return e || s.forEach((n, a) => {
1185
- const o = t(this, k).rawRecords[i - a];
1177
+ const o = t(this, T).rawRecords[i - a];
1186
1178
  o && (o.__ng.rowState = O.ROW_STATE.EMPTY);
1187
1179
  }), t(this, rt).call(this), i;
1188
1180
  }, "add"));
1189
1181
  E(this, "delete", /* @__PURE__ */ h((r) => {
1190
1182
  let e = [];
1191
- Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1183
+ Array.isArray(r) ? e = r : typeof r > "u" ? e = [t(this, T).host.row.at] : e = [parseInt(r, 10)], e.sort((s, i) => i - s).forEach((s) => {
1192
1184
  if (t(this, _)[s]) {
1193
1185
  const i = t(this, _)[s].__ng.rowid;
1194
- t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, k).rawRecords.forEach((n) => {
1186
+ t(this, _)[s].__ng.rowState === O.ROW_STATE.INSERT ? t(this, T).rawRecords = t(this, T).rawRecords.filter((n) => n.__ng.rowid !== i) : t(this, T).rawRecords.forEach((n) => {
1195
1187
  n.__ng.rowid === i && (n.__ng.deleted = !0, n.__ng.rowState = O.ROW_STATE.DELETE);
1196
1188
  });
1197
1189
  }
@@ -1208,13 +1200,13 @@ const O = class O {
1208
1200
  o !== s && a.__ng.rowState !== O.ROW_STATE.INSERT && (a.__ng.o.hasOwnProperty(e) || (a.__ng.o[e] = o), a.__ng.rowState = O.ROW_STATE.UPDATE), a.v[n] = s;
1209
1201
  }, "setValue"));
1210
1202
  E(this, "resetRecords", /* @__PURE__ */ h(() => {
1211
- y(this, dt, t(this, k).rawRecords.filter((r) => !r.__ng.deleted)), y(this, _, t(this, k).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, k).rawRecords.forEach((r, e) => {
1203
+ y(this, dt, t(this, T).rawRecords.filter((r) => !r.__ng.deleted)), y(this, _, t(this, T).rawRecords.filter((r) => !r.__ng.deleted && !r.__ng.filtered)), t(this, T).rawRecords.forEach((r, e) => {
1212
1204
  r.__ng.rowidx = e;
1213
1205
  }), t(this, _).forEach((r, e) => {
1214
1206
  r.__ng.i = e;
1215
1207
  });
1216
1208
  }, "resetRecords"));
1217
- E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, _).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1209
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, _).length === 0 && t(this, T).rawRecords.length > 0 && this.resetRecords(), t(this, _)), "getValidData"));
1218
1210
  d(this, ft, /* @__PURE__ */ h((r) => {
1219
1211
  var a;
1220
1212
  if (!r) return r;
@@ -1227,10 +1219,10 @@ const O = class O {
1227
1219
  return e ? n[0] : n;
1228
1220
  }, "#conv"));
1229
1221
  E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1230
- y(this, I, r), y(this, k, e), t(this, Qt).call(this);
1222
+ y(this, I, r), y(this, T, e), t(this, Qt).call(this);
1231
1223
  }
1232
1224
  get source() {
1233
- return t(this, ft).call(this, t(this, k).rawRecords);
1225
+ return t(this, ft).call(this, t(this, T).rawRecords);
1234
1226
  }
1235
1227
  set source(r) {
1236
1228
  this.clear(), this.add(r, !1);
@@ -1248,7 +1240,7 @@ const O = class O {
1248
1240
  return this.length;
1249
1241
  }
1250
1242
  };
1251
- I = new WeakMap(), k = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1243
+ I = new WeakMap(), T = new WeakMap(), _ = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), rt = new WeakMap(), Ct = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), h(O, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1252
1244
  E(O, "ROW_STATE", {
1253
1245
  EMPTY: "EMPTY",
1254
1246
  NORMAL: "NORMAL",
@@ -1400,17 +1392,17 @@ const mt = class mt extends HTMLElement {
1400
1392
  };
1401
1393
  h(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
1402
1394
  let me = mt;
1403
- var T, Ht, p, Re, qe, ke, Te, Ce;
1395
+ var k, Ht, p, Re, qe, Te, ke, Ce;
1404
1396
  const Pe = class Pe extends me {
1405
1397
  constructor() {
1406
1398
  super();
1407
- d(this, T);
1399
+ d(this, k);
1408
1400
  d(this, Ht);
1409
1401
  d(this, p);
1410
1402
  d(this, Re);
1411
1403
  d(this, qe);
1412
- d(this, ke);
1413
1404
  d(this, Te);
1405
+ d(this, ke);
1414
1406
  E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1415
1407
  if (t(this, p))
1416
1408
  if (t(this, p).closest("tbody")) {
@@ -1427,12 +1419,12 @@ const Pe = class Pe extends me {
1427
1419
  return ninegrid.nvl(e, "");
1428
1420
  } else
1429
1421
  try {
1430
- return t(this, T).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, T).data);
1422
+ return t(this, k).exprFunction(t(this, p).dataset.expr).call(this, null, -1, t(this, k).data);
1431
1423
  } catch {
1432
1424
  }
1433
1425
  }, "getDisplayText"));
1434
1426
  d(this, Ce, /* @__PURE__ */ h(() => {
1435
- if (!(!t(this, T) || !t(this, T).template || !t(this, p).closest("tbody.bindable"))) {
1427
+ if (!(!t(this, k) || !t(this, k).template || !t(this, p).closest("tbody.bindable"))) {
1436
1428
  var e = ninegrid.j.querySelectorAll(t(this, p)).attr("suppress");
1437
1429
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1438
1430
  var s = t(this, p).closest("tr"), i = [];
@@ -1441,12 +1433,12 @@ const Pe = class Pe extends me {
1441
1433
  C && W.dataset.row && (C = parseInt(C), !isNaN(C) && C <= e && i.push(C));
1442
1434
  }), i.sort();
1443
1435
  var n = !1;
1444
- if (parseInt(s.sectionRowIndex / t(this, T).template.length) > 0)
1436
+ if (parseInt(s.sectionRowIndex / t(this, k).template.length) > 0)
1445
1437
  for (var a of i) {
1446
1438
  if (a > e) break;
1447
- var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, T).data.get(c);
1439
+ var o = parseInt(t(this, p).dataset.row), c = o - 1, l = t(this, p).closest("tr").data, f = t(this, k).data.get(c);
1448
1440
  t(this, p).dataset.matrixRow;
1449
- var u = t(this, T).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1441
+ var u = t(this, k).body.querySelector(`tbody.bindable [suppress="${a}"][data-matrix-row="${t(this, p).dataset.matrixRow}"]`), g = u.dataset.expr ? this.getExprValue(u.dataset.expr, l, o) : l[u.dataset.bind], b = u.dataset.expr ? this.getExprValue(u.dataset.expr, f, c) : f[u.dataset.bind];
1450
1442
  if (g != b) {
1451
1443
  n = !0;
1452
1444
  break;
@@ -1455,7 +1447,7 @@ const Pe = class Pe extends me {
1455
1447
  else
1456
1448
  n = !0;
1457
1449
  n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, p)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, p)).hasClass("hidden") || (n ? ninegrid.j.querySelectorAll(t(this, p)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, p)).addClass("hidden"));
1458
- var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, T).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1450
+ var x = parseInt(t(this, p).dataset.matrixRow), v = x - 1, A = t(this, k).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${v}"]`);
1459
1451
  $(A).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").addClass("last-suppress") : !$(A).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, p)).hasClass("suppress") ? ninegrid.j.querySelectorAll(A).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(A).removeClass("last-none-suppress").removeClass("last-suppress");
1460
1452
  }
1461
1453
  }
@@ -1465,7 +1457,7 @@ const Pe = class Pe extends me {
1465
1457
  try {
1466
1458
  i = parseInt(i);
1467
1459
  const a = e.replace("()", "");
1468
- return t(this, T)[a] ? t(this, T)[a].call(this, s, i, t(this, p)) : t(this, T).exprFunction(e).call(this, s, i, t(this, T).data);
1460
+ return t(this, k)[a] ? t(this, k)[a].call(this, s, i, t(this, p)) : t(this, k).exprFunction(e).call(this, s, i, t(this, k).data);
1469
1461
  } catch {
1470
1462
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1471
1463
  }
@@ -1474,16 +1466,16 @@ const Pe = class Pe extends me {
1474
1466
  }, "getExprValue"));
1475
1467
  }
1476
1468
  connectedCallback() {
1477
- super.connectedCallback(), y(this, T, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1469
+ super.connectedCallback(), y(this, k, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Ht, t(this, p).closest("tr"));
1478
1470
  }
1479
1471
  get value() {
1480
- var e = !t(this, T) || !t(this, T).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1472
+ var e = !t(this, k) || !t(this, k).dataManager || !t(this, p) || !t(this, p).dataset || !t(this, p).dataset.row || !t(this, p).dataset.bind ? "" : t(this, p).closest("tr").data[t(this, p).dataset.bind];
1481
1473
  return e ?? "";
1482
1474
  }
1483
1475
  set value(e) {
1484
1476
  var s = parseInt(t(this, p).dataset.row);
1485
1477
  const i = this.getAttribute("update-row-state") != "false";
1486
- s < 0 ? t(this, T).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, T).data.setValue(s, t(this, p).dataset.bind, e, i);
1478
+ s < 0 ? t(this, k).data.setValueNF(parseInt(t(this, p).dataset.index), t(this, p).dataset.bind, e, i) : t(this, k).data.setValue(s, t(this, p).dataset.bind, e, i);
1487
1479
  }
1488
1480
  get row() {
1489
1481
  return parseInt(t(this, p).dataset.row);
@@ -1496,7 +1488,7 @@ const Pe = class Pe extends me {
1496
1488
  return parseInt(t(this, p).dataset.row), t(this, Ht).data[e];
1497
1489
  }
1498
1490
  };
1499
- T = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), ke = new WeakMap(), Te = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
1491
+ k = new WeakMap(), Ht = new WeakMap(), p = new WeakMap(), Re = new WeakMap(), qe = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), h(Pe, "CellElement");
1500
1492
  let xe = Pe;
1501
1493
  const De = class De extends xe {
1502
1494
  constructor() {