@ninebone/table 0.0.812 β 0.0.814
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.
- package/dist/nine-table.js +57 -57
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +5 -5
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var ms = Object.defineProperty;
|
|
2
|
-
var xs = (
|
|
3
|
-
throw TypeError(
|
|
2
|
+
var xs = (T) => {
|
|
3
|
+
throw TypeError(T);
|
|
4
4
|
};
|
|
5
|
-
var Rs = (
|
|
6
|
-
var h = (
|
|
7
|
-
var E = (
|
|
8
|
-
var t = (
|
|
9
|
-
var ws = (
|
|
5
|
+
var Rs = (T, s, e) => s in T ? ms(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
|
|
6
|
+
var h = (T, s) => ms(T, "name", { value: s, configurable: !0 });
|
|
7
|
+
var E = (T, s, e) => Rs(T, typeof s != "symbol" ? s + "" : s, e), qe = (T, s, e) => s.has(T) || xs("Cannot " + e);
|
|
8
|
+
var t = (T, s, e) => (qe(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? xs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (qe(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), Y = (T, s, e) => (qe(T, s, "access private method"), e);
|
|
9
|
+
var ws = (T, s, e, n) => ({
|
|
10
10
|
set _(r) {
|
|
11
|
-
y(
|
|
11
|
+
y(T, s, r, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(T, s, n);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as As } from "@ninebone/util";
|
|
@@ -22,7 +22,7 @@ const es = class es extends As.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
h(es, "Trace");
|
|
24
24
|
let Te = es;
|
|
25
|
-
const
|
|
25
|
+
const q = new Te();
|
|
26
26
|
var j, K, A, Q, tt, et, Zt, st, Jt;
|
|
27
27
|
const ss = class ss extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
@@ -69,7 +69,7 @@ const ss = class ss extends HTMLElement {
|
|
|
69
69
|
let a = e;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
71
|
const c = i.width - o;
|
|
72
|
-
a > c && (a = c), a = parseInt(a, 10), t(this, A).thumb.style.left = `${a}px`,
|
|
72
|
+
a > c && (a = c), a = parseInt(a, 10), t(this, A).thumb.style.left = `${a}px`, q.log("1111=========="), t(this, A).left.disabled = a === 0, t(this, A).right.disabled = a >= c - 1;
|
|
73
73
|
const l = n.clientWidth, f = r.scrollWidth - l;
|
|
74
74
|
return c > 0 && f > 0 && (n.scrollLeft = a / c * f), a > 0 && a < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
@@ -230,7 +230,7 @@ const ns = class ns extends HTMLElement {
|
|
|
230
230
|
u < 0 && (u = 0), u > p && (u = p), r.style.top = `${u}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
232
|
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
233
|
-
|
|
233
|
+
q.log("nine-table-vscrollbar.#init");
|
|
234
234
|
const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
|
|
235
235
|
const i = (t(this, nt).data.get() || []).length, o = t(this, rt).getRowHeight();
|
|
236
236
|
return i * o;
|
|
@@ -352,13 +352,13 @@ const ns = class ns extends HTMLElement {
|
|
|
352
352
|
nt = new WeakMap(), rt = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Qt = new WeakMap(), h(ns, "NineTableVScrollBar");
|
|
353
353
|
let ke = ns;
|
|
354
354
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", ke);
|
|
355
|
-
var ot, R, it,
|
|
355
|
+
var ot, R, it, V, O, G, at, It, Ye, Ue, te, Xe, ee, se, Mt, Ht, $t, ne, re, Nt, mt, oe, ie;
|
|
356
356
|
const rs = class rs {
|
|
357
357
|
constructor(s) {
|
|
358
358
|
d(this, ot);
|
|
359
359
|
d(this, R);
|
|
360
360
|
d(this, it);
|
|
361
|
-
d(this,
|
|
361
|
+
d(this, V, /* @__PURE__ */ new Map());
|
|
362
362
|
d(this, O, null);
|
|
363
363
|
d(this, G, null);
|
|
364
364
|
d(this, at, 0);
|
|
@@ -371,15 +371,15 @@ const rs = class rs {
|
|
|
371
371
|
d(this, ee, 0);
|
|
372
372
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
373
373
|
var e;
|
|
374
|
-
|
|
374
|
+
q.log("rowManager.refresh");
|
|
375
375
|
const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
|
|
376
376
|
s && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
378
|
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
379
|
-
|
|
379
|
+
q.log("rowManager.initialize"), y(this, it, {
|
|
380
380
|
scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
|
|
381
381
|
firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
382
|
-
}), y(this, O, null), t(this,
|
|
382
|
+
}), y(this, O, null), t(this, V).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
383
383
|
const a = t(this, R).querySelector(o);
|
|
384
384
|
if (!a) return;
|
|
385
385
|
const c = a.querySelector(".ng-part-body table");
|
|
@@ -387,10 +387,10 @@ const rs = class rs {
|
|
|
387
387
|
const l = c.querySelector("tbody.bindable-tbody");
|
|
388
388
|
if (!l) return;
|
|
389
389
|
const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
|
|
390
|
-
t(this,
|
|
390
|
+
t(this, V).set(o, f);
|
|
391
391
|
});
|
|
392
392
|
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"), i = t(this, R).querySelector(".ng-container-body .ng-part-footer");
|
|
393
|
-
if (s) {
|
|
393
|
+
if (q.log("********************"), q.log(t(this, V)), s) {
|
|
394
394
|
t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
396
|
y(this, ee, s.scrollLeft);
|
|
@@ -414,8 +414,8 @@ const rs = class rs {
|
|
|
414
414
|
}
|
|
415
415
|
}, "initialize"));
|
|
416
416
|
d(this, se, /* @__PURE__ */ h((s, e) => {
|
|
417
|
-
|
|
418
|
-
const n = t(this,
|
|
417
|
+
q.log("rowManager.#renderRows");
|
|
418
|
+
const n = t(this, V).get(e);
|
|
419
419
|
if (!n || n.length === 0) return;
|
|
420
420
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
421
421
|
if (!r) return;
|
|
@@ -431,8 +431,8 @@ const rs = class rs {
|
|
|
431
431
|
if (t(this, O) !== null && t(this, O) > 0)
|
|
432
432
|
return t(this, O);
|
|
433
433
|
const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
|
|
434
|
-
|
|
435
|
-
const e = t(this,
|
|
434
|
+
q.log("rowManager.#measureAndCacheHeight");
|
|
435
|
+
const e = t(this, V).get(".ng-container-body");
|
|
436
436
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
437
437
|
const n = s.querySelector("tbody.bindable-tbody");
|
|
438
438
|
if (!n) throw new Error("invalid dom");
|
|
@@ -455,7 +455,7 @@ const rs = class rs {
|
|
|
455
455
|
}), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, g <= 0 ? -1 : (y(this, O, g), t(this, $t).call(this), t(this, O));
|
|
456
456
|
}, "#measureAndCacheHeight"));
|
|
457
457
|
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
458
|
-
|
|
458
|
+
q.log("rowManager.#updateVirtualScrollHeight");
|
|
459
459
|
const e = (t(this, ot).data.get() || []).length, n = t(this, O), r = e * n;
|
|
460
460
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
461
461
|
const o = t(this, R).querySelector(i);
|
|
@@ -514,7 +514,7 @@ const rs = class rs {
|
|
|
514
514
|
})), t(this, G).observe(t(this, R)));
|
|
515
515
|
}, "#initResizeObserver"));
|
|
516
516
|
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
517
|
-
|
|
517
|
+
q.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
518
518
|
const e = t(this, R).querySelector(s);
|
|
519
519
|
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, s);
|
|
520
520
|
}), t(this, ie).call(this), t(this, ne).call(this);
|
|
@@ -525,7 +525,7 @@ const rs = class rs {
|
|
|
525
525
|
if (!e || e <= 0) return;
|
|
526
526
|
const n = t(this, ot).data.length;
|
|
527
527
|
if (n === 0) return;
|
|
528
|
-
const r = ((f = t(this,
|
|
528
|
+
const r = ((f = t(this, V).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, R).querySelector(".ng-container-body .ng-part-body"), o = Math.max(0, n - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(s / e)));
|
|
529
529
|
let c = Math.floor(a * e);
|
|
530
530
|
const l = t(this, it).firstTr, g = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
531
531
|
(b = t(this, it)) == null || b.scrollTables.forEach((u) => {
|
|
@@ -569,7 +569,7 @@ const rs = class rs {
|
|
|
569
569
|
}, "#bindRowData"));
|
|
570
570
|
d(this, ie, /* @__PURE__ */ h(() => {
|
|
571
571
|
var c, l, g;
|
|
572
|
-
|
|
572
|
+
q.log("rowManager.#syncHeaderHeights");
|
|
573
573
|
const s = t(this, R).querySelector(".ng-container-left .ng-part-header table"), e = t(this, R).querySelector(".ng-container-body .ng-part-header table"), n = t(this, R).querySelector(".ng-container-right .ng-part-header table");
|
|
574
574
|
if (!e) return;
|
|
575
575
|
const r = s ? Array.from(s.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
|
|
@@ -592,10 +592,10 @@ const rs = class rs {
|
|
|
592
592
|
}
|
|
593
593
|
templateLength(s = ".ng-container-body") {
|
|
594
594
|
var e;
|
|
595
|
-
return ((e = t(this,
|
|
595
|
+
return ((e = t(this, V).get(s)) == null ? void 0 : e.length) || 1;
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
|
-
ot = new WeakMap(), R = new WeakMap(), it = new WeakMap(),
|
|
598
|
+
ot = new WeakMap(), R = new WeakMap(), it = new WeakMap(), V = new WeakMap(), O = new WeakMap(), G = new WeakMap(), at = new WeakMap(), It = new WeakMap(), Ye = new WeakMap(), Ue = new WeakMap(), te = new WeakMap(), Xe = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), mt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), h(rs, "RowManager");
|
|
599
599
|
let Le = rs;
|
|
600
600
|
const ae = class ae {
|
|
601
601
|
/**
|
|
@@ -686,7 +686,7 @@ const os = class os {
|
|
|
686
686
|
d(this, U, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
|
|
687
687
|
E(this, "render", /* @__PURE__ */ h(() => {
|
|
688
688
|
const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, U);
|
|
689
|
-
|
|
689
|
+
q.log("π¨ [CellSelection.render] Rendering range ->", t(this, U));
|
|
690
690
|
const i = t(this, N).querySelectorAll(
|
|
691
691
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
692
692
|
);
|
|
@@ -695,32 +695,32 @@ const os = class os {
|
|
|
695
695
|
c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
|
|
696
696
|
});
|
|
697
697
|
}), s < 0 || e < 0) {
|
|
698
|
-
|
|
698
|
+
q.log("β οΈ [CellSelection.render] Range is invalid (< 0), skipping render.");
|
|
699
699
|
return;
|
|
700
700
|
}
|
|
701
701
|
let o = 0;
|
|
702
702
|
i.forEach((a) => {
|
|
703
703
|
a.querySelectorAll("tbody tr").forEach((c) => {
|
|
704
|
-
const { matrixRow: l } =
|
|
704
|
+
const { matrixRow: l } = Y(this, X, qt).call(this, c);
|
|
705
705
|
l < 0 || c.querySelectorAll("td, th").forEach((g) => {
|
|
706
706
|
const f = parseInt(g.dataset.col, 10);
|
|
707
707
|
if (isNaN(f)) return;
|
|
708
708
|
const b = parseInt(g.rowSpan || 1, 10), u = parseInt(g.colSpan || 1, 10), p = l + b - 1, x = f + u - 1;
|
|
709
|
-
p >= s && l <= n && x >= e && f <= r && (o++, g.classList.add("selected"),
|
|
709
|
+
p >= s && l <= n && x >= e && f <= r && (o++, g.classList.add("selected"), q.log(g, s, e, n, r), l <= s && g.classList.add("selected-top"), p >= n && g.classList.add("selected-bottom"), f <= e && g.classList.add("selected-left"), x >= r && g.classList.add("selected-right"));
|
|
710
710
|
});
|
|
711
711
|
});
|
|
712
|
-
}),
|
|
712
|
+
}), q.log(`β¨ [CellSelection.render] Total rendered cells marked: ${o}`);
|
|
713
713
|
}, "render"));
|
|
714
|
-
y(this, N, s),
|
|
714
|
+
y(this, N, s), Y(this, X, vs).call(this), t(this, N).querySelectorAll(
|
|
715
715
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
716
716
|
).forEach((n) => {
|
|
717
717
|
n.addEventListener("scroll", () => {
|
|
718
718
|
t(this, U).startRow >= 0 && t(this, U).startCol >= 0 && this.render();
|
|
719
719
|
});
|
|
720
|
-
}),
|
|
720
|
+
}), q.log("π― [CellSelection] Initialized");
|
|
721
721
|
}
|
|
722
722
|
setRange(s, e, n, r) {
|
|
723
|
-
|
|
723
|
+
q.log(`π [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
|
|
724
724
|
let i = Math.min(s, n), o = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
|
|
725
725
|
const l = t(this, N).querySelectorAll(
|
|
726
726
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
@@ -730,7 +730,7 @@ const os = class os {
|
|
|
730
730
|
g = !1, f++, l.forEach((b) => {
|
|
731
731
|
b.querySelectorAll("tbody tr").forEach((u) => {
|
|
732
732
|
if (u.classList.contains("nodata")) return;
|
|
733
|
-
const { matrixRow: p } =
|
|
733
|
+
const { matrixRow: p } = Y(this, X, qt).call(this, u);
|
|
734
734
|
p < 0 || u.querySelectorAll("td, th").forEach((x) => {
|
|
735
735
|
const w = parseInt(x.dataset.col, 10);
|
|
736
736
|
if (isNaN(w)) return;
|
|
@@ -742,7 +742,7 @@ const os = class os {
|
|
|
742
742
|
});
|
|
743
743
|
});
|
|
744
744
|
});
|
|
745
|
-
y(this, U, { startRow: i, startCol: a, endRow: o, endCol: c }),
|
|
745
|
+
y(this, U, { startRow: i, startCol: a, endRow: o, endCol: c }), q.log("π¦ [CellSelection.setRange] Final Range ->", t(this, U)), this.render();
|
|
746
746
|
}
|
|
747
747
|
};
|
|
748
748
|
N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(function(s) {
|
|
@@ -754,7 +754,7 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
|
|
|
754
754
|
}, "#getMatrixRow"), vs = /* @__PURE__ */ h(function() {
|
|
755
755
|
const s = t(this, N).querySelector(".ng-container-top");
|
|
756
756
|
if (!s) {
|
|
757
|
-
|
|
757
|
+
q.log("β [CellSelection] .ng-container-top not found!");
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
760
760
|
s.addEventListener("mousedown", (e) => {
|
|
@@ -762,12 +762,12 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
|
|
|
762
762
|
const n = e.target.closest("td, th");
|
|
763
763
|
if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
|
|
764
764
|
t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
|
|
765
|
-
const r = n.closest("tr"), { matrixRow: i } =
|
|
765
|
+
const r = n.closest("tr"), { matrixRow: i } = Y(this, X, qt).call(this, r), o = parseInt(n.dataset.col, 10);
|
|
766
766
|
if (i < 0) {
|
|
767
767
|
t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
|
-
|
|
770
|
+
q.log(`π±οΈ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = n;
|
|
771
771
|
let a = i, c = o;
|
|
772
772
|
const l = /* @__PURE__ */ h((f) => {
|
|
773
773
|
const b = document.elementFromPoint(f.clientX, f.clientY);
|
|
@@ -783,10 +783,10 @@ N = new WeakMap(), U = new WeakMap(), X = new WeakSet(), qt = /* @__PURE__ */ h(
|
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
|
|
786
|
-
const p = u.closest("tr"), { matrixRow: x } =
|
|
786
|
+
const p = u.closest("tr"), { matrixRow: x } = Y(this, X, qt).call(this, p), w = parseInt(u.dataset.col, 10);
|
|
787
787
|
x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
|
|
788
788
|
}, "onMouseMove"), g = /* @__PURE__ */ h(() => {
|
|
789
|
-
|
|
789
|
+
q.log("π±οΈ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", g);
|
|
790
790
|
}, "onMouseUp");
|
|
791
791
|
document.addEventListener("mousemove", l), document.addEventListener("mouseup", g);
|
|
792
792
|
});
|
|
@@ -878,7 +878,7 @@ const is = class is {
|
|
|
878
878
|
}
|
|
879
879
|
return null;
|
|
880
880
|
}, "#getNearElement"));
|
|
881
|
-
y(this, F, s),
|
|
881
|
+
y(this, F, s), Y(this, pt, Ss).call(this), q.log("π― [CellNavigation] Initialized");
|
|
882
882
|
}
|
|
883
883
|
get currentCell() {
|
|
884
884
|
return t(this, lt);
|
|
@@ -901,7 +901,7 @@ const is = class is {
|
|
|
901
901
|
if (!t(this, lt)) return;
|
|
902
902
|
const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = n == null ? void 0 : n.closest("tbody");
|
|
903
903
|
if (!o) return;
|
|
904
|
-
const c = Array.from(o.querySelectorAll("tr
|
|
904
|
+
const c = Array.from(o.querySelectorAll("tr")).filter((W) => parseInt(W.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, g = c.indexOf(n), f = r * l + (g >= 0 ? g : 0);
|
|
905
905
|
let b = f, u = i;
|
|
906
906
|
switch (s.code) {
|
|
907
907
|
case "Tab":
|
|
@@ -924,7 +924,7 @@ const is = class is {
|
|
|
924
924
|
u = t(this, Dt).call(this, f, i);
|
|
925
925
|
break;
|
|
926
926
|
case "ArrowDown":
|
|
927
|
-
s.preventDefault(), b = f + (e.rowSpan || 1);
|
|
927
|
+
s.preventDefault(), b = f + (e.rowSpan || 1), q.log("matrixRow:", f, "nextMatrixRow", b);
|
|
928
928
|
break;
|
|
929
929
|
case "ArrowUp":
|
|
930
930
|
s.preventDefault(), b = Math.max(0, f - (e.rowSpan || 1));
|
|
@@ -932,13 +932,13 @@ const is = class is {
|
|
|
932
932
|
}
|
|
933
933
|
const p = Math.floor(b / l), x = b % l;
|
|
934
934
|
let w = t(this, Wt).call(this, p, x, u, b);
|
|
935
|
-
if (
|
|
936
|
-
this.currentCell = w,
|
|
935
|
+
if (q.log(w, p, x, u, b), w)
|
|
936
|
+
this.currentCell = w, Y(this, pt, $e).call(this, w);
|
|
937
937
|
else if (p !== r && p >= 0) {
|
|
938
938
|
const W = ((C = (m = t(this, F)).getRowHeight) == null ? void 0 : C.call(m)) || 40;
|
|
939
939
|
(M = (S = t(this, F)).scrollToY) == null || M.call(S, p * W), setTimeout(() => {
|
|
940
940
|
const B = t(this, Wt).call(this, p, x, u, b);
|
|
941
|
-
B && (this.currentCell = B,
|
|
941
|
+
B && (this.currentCell = B, Y(this, pt, $e).call(this, B));
|
|
942
942
|
}, 0);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
@@ -965,10 +965,10 @@ const Tt = class Tt extends HTMLElement {
|
|
|
965
965
|
d(this, zt);
|
|
966
966
|
d(this, Bt);
|
|
967
967
|
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
968
|
-
|
|
968
|
+
q.log("sheet.invalidate()"), t(this, dt).refresh();
|
|
969
969
|
}, "invalidate"));
|
|
970
970
|
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
971
|
-
if (
|
|
971
|
+
if (q.log("sheet.generate()"), !e) return;
|
|
972
972
|
y(this, ht, Ie.compile(e)), t(this, de).call(this), t(this, fe).call(this);
|
|
973
973
|
const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
|
|
974
974
|
n && i && (i.style.top = `${n.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
|
|
@@ -1243,7 +1243,7 @@ const Tt = class Tt extends HTMLElement {
|
|
|
1243
1243
|
return t(this, Bt);
|
|
1244
1244
|
}
|
|
1245
1245
|
disconnectedCallback() {
|
|
1246
|
-
this.innerHTML = "",
|
|
1246
|
+
this.innerHTML = "", q.log("NineTableSheet destroyed.");
|
|
1247
1247
|
}
|
|
1248
1248
|
};
|
|
1249
1249
|
he = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Bt = new WeakMap(), de = new WeakMap(), fe = new WeakMap(), xt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), h(Tt, "NineTableSheet"), E(Tt, "SCROLLBAR_SIZE", 16);
|
|
@@ -1666,11 +1666,11 @@ const ds = class ds {
|
|
|
1666
1666
|
}), y(this, H, Array.from(s, ([e, n]) => ({ name: e, type: n }))), y(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
|
|
1667
1667
|
}, "#adjust"));
|
|
1668
1668
|
d(this, Se, /* @__PURE__ */ h(() => {
|
|
1669
|
-
y(this, H, []),
|
|
1669
|
+
y(this, H, []), q.log(t(this, Rt).querySelectorAll("table"));
|
|
1670
1670
|
const s = Array.from(t(this, Rt).querySelectorAll("table"));
|
|
1671
1671
|
if (!(!s || s.length === 0)) {
|
|
1672
1672
|
for (const e of s)
|
|
1673
|
-
|
|
1673
|
+
q.log(e), $("[data-bind]", e).each((n, r) => {
|
|
1674
1674
|
const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
|
|
1675
1675
|
i && t(this, H).push({ name: i, type: o });
|
|
1676
1676
|
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
|
|
@@ -1729,7 +1729,7 @@ const fs = class fs extends HTMLElement {
|
|
|
1729
1729
|
d(this, gt);
|
|
1730
1730
|
d(this, Re);
|
|
1731
1731
|
d(this, Ae, /* @__PURE__ */ h(() => {
|
|
1732
|
-
this.fields = new ze(this), y(this, Re, new _e(this)),
|
|
1732
|
+
this.fields = new ze(this), y(this, Re, new _e(this)), q.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1733
1733
|
}, "#init"));
|
|
1734
1734
|
this.attachShadow({ mode: "open" }), y(this, gt, new We(this));
|
|
1735
1735
|
}
|
|
@@ -1737,7 +1737,7 @@ const fs = class fs extends HTMLElement {
|
|
|
1737
1737
|
t(this, Ae).call(this);
|
|
1738
1738
|
}
|
|
1739
1739
|
disconnectedCallback() {
|
|
1740
|
-
|
|
1740
|
+
q.log("NineTable disconnected.");
|
|
1741
1741
|
}
|
|
1742
1742
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1743
1743
|
get data() {
|