@ninebone/table 0.0.737 β 0.0.739
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 +58 -58
- 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
|
@@ -22,7 +22,7 @@ const Xe = class Xe extends ms.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
h(Xe, "Trace");
|
|
24
24
|
let we = Xe;
|
|
25
|
-
const
|
|
25
|
+
const S = new we();
|
|
26
26
|
var B, K, A, tt, et, st, Vt, nt, Ut;
|
|
27
27
|
const Ke = class Ke extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
@@ -212,7 +212,7 @@ const Ge = class Ge extends HTMLElement {
|
|
|
212
212
|
d(this, Tt, 0);
|
|
213
213
|
d(this, Ct, 0);
|
|
214
214
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
-
if (
|
|
215
|
+
if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, C)) return;
|
|
216
216
|
const e = t(this, C).container, n = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
|
|
217
217
|
if (c <= o || i === 0) {
|
|
218
218
|
this.style.display = "none";
|
|
@@ -224,14 +224,14 @@ const Ge = class Ge extends HTMLElement {
|
|
|
224
224
|
const f = Math.max(Math.min(l * (o / c), l), 20);
|
|
225
225
|
r.style.height = `${f}px`;
|
|
226
226
|
const u = e.scrollTop, b = Math.max(c - o, 1);
|
|
227
|
-
|
|
227
|
+
S.log(e, u, b);
|
|
228
228
|
let g = 0;
|
|
229
229
|
b > 0 && (g = u / b * (l - f));
|
|
230
230
|
const y = l - f;
|
|
231
231
|
g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
|
|
232
232
|
}, "refresh"));
|
|
233
233
|
d(this, Xt, /* @__PURE__ */ h(() => {
|
|
234
|
-
|
|
234
|
+
S.log("nine-table-vscrollbar.#init");
|
|
235
235
|
const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
|
|
236
236
|
const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
|
|
237
237
|
return o * i;
|
|
@@ -353,11 +353,11 @@ const Ge = class Ge extends HTMLElement {
|
|
|
353
353
|
rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = 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,
|
|
356
|
+
var j, R, it, P, D, G, at, kt, ze, We, Kt, Gt, Lt, It, Ht, Zt, Jt, Mt, Be, pt, $t, Qt;
|
|
357
357
|
const Ze = class Ze {
|
|
358
358
|
constructor(s) {
|
|
359
359
|
d(this, j);
|
|
360
|
-
d(this,
|
|
360
|
+
d(this, R);
|
|
361
361
|
d(this, it);
|
|
362
362
|
d(this, P, /* @__PURE__ */ new Map());
|
|
363
363
|
d(this, D, null);
|
|
@@ -370,16 +370,16 @@ const Ze = class Ze {
|
|
|
370
370
|
d(this, Kt, 3);
|
|
371
371
|
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
372
372
|
var e;
|
|
373
|
-
|
|
374
|
-
const s = t(this,
|
|
375
|
-
s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this,
|
|
373
|
+
S.log("rowManager.refresh");
|
|
374
|
+
const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
|
|
375
|
+
s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, R).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
376
376
|
}, "refresh"));
|
|
377
377
|
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
378
|
-
|
|
379
|
-
scrollTables: t(this,
|
|
380
|
-
firstTr: t(this,
|
|
378
|
+
S.log("rowManager.initialize"), p(this, it, {
|
|
379
|
+
scrollTables: t(this, R).querySelectorAll(".ng-part-body table"),
|
|
380
|
+
firstTr: t(this, R).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
381
381
|
}), p(this, D, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
382
|
-
const a = t(this,
|
|
382
|
+
const a = t(this, R).querySelector(i);
|
|
383
383
|
if (!a) return;
|
|
384
384
|
const c = a.querySelector(".ng-part-body table");
|
|
385
385
|
if (!c) return;
|
|
@@ -388,7 +388,7 @@ const Ze = class Ze {
|
|
|
388
388
|
const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
|
|
389
389
|
t(this, P).set(i, u);
|
|
390
390
|
});
|
|
391
|
-
const s = t(this,
|
|
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
393
|
t(this, Lt).call(this), t(this, Mt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop);
|
|
394
394
|
let i = !1;
|
|
@@ -397,17 +397,17 @@ const Ze = class Ze {
|
|
|
397
397
|
if (i) return;
|
|
398
398
|
i = !0;
|
|
399
399
|
const l = c.scrollTop, f = c.scrollLeft;
|
|
400
|
-
s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, pt).call(this, l), (u = t(this,
|
|
400
|
+
s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, pt).call(this, l), (u = t(this, R).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
|
|
401
401
|
}, "handleContainerScroll");
|
|
402
402
|
[s, e, n].forEach((c) => {
|
|
403
|
-
c == null || c.addEventListener("scroll", () => {
|
|
404
|
-
|
|
403
|
+
c == null || c.addEventListener("scroll", (l) => {
|
|
404
|
+
S.log(l), S.log("rowManager.scroll event"), a(c);
|
|
405
405
|
});
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
409
|
d(this, Gt, /* @__PURE__ */ h((s, e) => {
|
|
410
|
-
|
|
410
|
+
S.log("rowManager.#renderRows");
|
|
411
411
|
const n = t(this, P).get(e);
|
|
412
412
|
if (!n || n.length === 0) return;
|
|
413
413
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
@@ -423,18 +423,18 @@ const Ze = class Ze {
|
|
|
423
423
|
d(this, Lt, /* @__PURE__ */ h(() => {
|
|
424
424
|
if (t(this, D) !== null && t(this, D) > 0)
|
|
425
425
|
return t(this, D);
|
|
426
|
-
const s = t(this,
|
|
427
|
-
|
|
426
|
+
const s = t(this, R).querySelector(".ng-container-body .ng-part-body");
|
|
427
|
+
S.log("rowManager.#measureAndCacheHeight");
|
|
428
428
|
const e = t(this, P).get(".ng-container-body");
|
|
429
429
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
430
430
|
const n = s.querySelector("tbody.bindable-tbody");
|
|
431
|
-
if (
|
|
431
|
+
if (S.log(n), !n) throw new Error("invalid dom");
|
|
432
432
|
n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
|
|
433
433
|
const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
434
434
|
e.forEach((b) => {
|
|
435
435
|
o.appendChild(b.cloneNode(!0));
|
|
436
436
|
}), r ? r.before(o) : n.appendChild(o);
|
|
437
|
-
const i = t(this,
|
|
437
|
+
const i = t(this, R), a = i.style.display, c = i.style.visibility, l = i.style.position;
|
|
438
438
|
(a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
|
|
439
439
|
let f = 0;
|
|
440
440
|
const u = n.querySelectorAll("tr");
|
|
@@ -448,10 +448,10 @@ const Ze = class Ze {
|
|
|
448
448
|
}), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, D, f), t(this, Ht).call(this), t(this, D));
|
|
449
449
|
}, "#measureAndCacheHeight"));
|
|
450
450
|
d(this, It, /* @__PURE__ */ h(() => {
|
|
451
|
-
|
|
451
|
+
S.log("rowManager.#updateVirtualScrollHeight");
|
|
452
452
|
const e = (t(this, j).data.get() || []).length, n = t(this, D), r = e * n;
|
|
453
|
-
|
|
454
|
-
const i = t(this,
|
|
453
|
+
S.log("π [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
454
|
+
const i = t(this, R).querySelector(o);
|
|
455
455
|
if (!i) return;
|
|
456
456
|
const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
|
|
457
457
|
a && (a.style.height = `${r}px`);
|
|
@@ -465,7 +465,7 @@ const Ze = class Ze {
|
|
|
465
465
|
}, "#updateRowCount"));
|
|
466
466
|
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
467
467
|
var a, c, l, f, u, b;
|
|
468
|
-
const s = t(this,
|
|
468
|
+
const s = t(this, R).querySelector(".ng-container-left .ng-part-body table"), e = t(this, R).querySelector(".ng-container-body .ng-part-body table"), n = t(this, R).querySelector(".ng-container-right .ng-part-body table");
|
|
469
469
|
if (e) {
|
|
470
470
|
const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
|
|
471
471
|
for (let m = 0; m < w; m++) {
|
|
@@ -477,7 +477,7 @@ const Ze = class Ze {
|
|
|
477
477
|
T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const r = t(this,
|
|
480
|
+
const r = t(this, R).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, R).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, R).querySelector(".ng-container-right .ng-part-footer table");
|
|
481
481
|
if (o) {
|
|
482
482
|
const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
|
|
483
483
|
for (let m = 0; m < w; m++) {
|
|
@@ -491,7 +491,7 @@ const Ze = class Ze {
|
|
|
491
491
|
}
|
|
492
492
|
}, "#syncRowHeights"));
|
|
493
493
|
d(this, Jt, /* @__PURE__ */ h(() => {
|
|
494
|
-
!t(this,
|
|
494
|
+
!t(this, R) || !(t(this, R) instanceof HTMLElement) || (p(this, G, new ResizeObserver((s) => {
|
|
495
495
|
for (const e of s) {
|
|
496
496
|
const n = e.target;
|
|
497
497
|
if (!n.classList.contains("active")) continue;
|
|
@@ -504,18 +504,18 @@ const Ze = class Ze {
|
|
|
504
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()));
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
})), t(this, G).observe(t(this,
|
|
507
|
+
})), t(this, G).observe(t(this, R)));
|
|
508
508
|
}, "#initResizeObserver"));
|
|
509
509
|
d(this, Mt, /* @__PURE__ */ h(() => {
|
|
510
|
-
|
|
511
|
-
const e = t(this,
|
|
510
|
+
S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
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);
|
|
513
513
|
}), t(this, Qt).call(this), t(this, Zt).call(this);
|
|
514
514
|
}, "#renderAllContainers"));
|
|
515
515
|
d(this, Be, /* @__PURE__ */ h((s) => {
|
|
516
516
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
517
517
|
var l;
|
|
518
|
-
const n = t(this,
|
|
518
|
+
const n = t(this, R).querySelector(e);
|
|
519
519
|
if (!n) return;
|
|
520
520
|
const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
521
521
|
if (!r) return;
|
|
@@ -537,16 +537,16 @@ const Ze = class Ze {
|
|
|
537
537
|
if (!e || e <= 0) return;
|
|
538
538
|
const n = t(this, j).data.length;
|
|
539
539
|
if (n === 0) return;
|
|
540
|
-
const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this,
|
|
541
|
-
|
|
540
|
+
const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, R).querySelector(".ng-container-body .ng-part-body");
|
|
541
|
+
S.log("bodyContainer.clientHeight", o.clientHeight);
|
|
542
542
|
const i = Math.max(0, n - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(s / e)));
|
|
543
543
|
let c = Math.floor(a * e);
|
|
544
|
-
|
|
544
|
+
S.log(`π [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && S.log(`π [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
|
|
545
545
|
const l = t(this, it).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
546
546
|
(b = t(this, it)) == null || b.scrollTables.forEach((g) => {
|
|
547
547
|
g.style.transform = `translate3d(0, ${c}px, 0)`;
|
|
548
|
-
}), f !== a && (
|
|
549
|
-
const y = t(this,
|
|
548
|
+
}), f !== a && (S.log(`π [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
549
|
+
const y = t(this, R).querySelector(g);
|
|
550
550
|
if (!y) return;
|
|
551
551
|
const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
552
552
|
if (!v) return;
|
|
@@ -584,8 +584,8 @@ const Ze = class Ze {
|
|
|
584
584
|
}, "#bindRowData"));
|
|
585
585
|
d(this, Qt, /* @__PURE__ */ h(() => {
|
|
586
586
|
var c, l, f;
|
|
587
|
-
|
|
588
|
-
const s = t(this,
|
|
587
|
+
S.log("rowManager.#syncHeaderHeights");
|
|
588
|
+
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");
|
|
589
589
|
if (!e) return;
|
|
590
590
|
const r = s ? Array.from(s.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
|
|
591
591
|
for (let u = 0; u < a; u++) {
|
|
@@ -600,7 +600,7 @@ const Ze = class Ze {
|
|
|
600
600
|
E(this, "destroy", /* @__PURE__ */ h(() => {
|
|
601
601
|
t(this, G) && (t(this, G).disconnect(), p(this, G, null));
|
|
602
602
|
}, "destroy"));
|
|
603
|
-
p(this, j, s.getRootNode().host), p(this,
|
|
603
|
+
p(this, j, s.getRootNode().host), p(this, R, s), t(this, Jt).call(this);
|
|
604
604
|
}
|
|
605
605
|
getRowHeight() {
|
|
606
606
|
return t(this, D);
|
|
@@ -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(),
|
|
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");
|
|
614
614
|
let Ae = Ze;
|
|
615
615
|
const te = class te {
|
|
616
616
|
/**
|
|
@@ -699,7 +699,7 @@ const Je = class Je {
|
|
|
699
699
|
d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
|
|
700
700
|
E(this, "render", /* @__PURE__ */ h(() => {
|
|
701
701
|
const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, Y);
|
|
702
|
-
|
|
702
|
+
S.log("π¨ [CellSelection.render] Rendering range ->", t(this, Y));
|
|
703
703
|
const o = t(this, _).querySelectorAll(
|
|
704
704
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
705
705
|
);
|
|
@@ -708,7 +708,7 @@ const Je = class Je {
|
|
|
708
708
|
c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
|
|
709
709
|
});
|
|
710
710
|
}), s < 0 || e < 0) {
|
|
711
|
-
|
|
711
|
+
S.log("β οΈ [CellSelection.render] Range is invalid (< 0), skipping render.");
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
714
|
let i = 0;
|
|
@@ -723,7 +723,7 @@ const Je = class Je {
|
|
|
723
723
|
y >= s && l <= n && v >= e && u <= r && (i++, f.classList.add("selected"), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
|
|
724
724
|
});
|
|
725
725
|
});
|
|
726
|
-
}),
|
|
726
|
+
}), S.log(`β¨ [CellSelection.render] Total rendered cells marked: ${i}`);
|
|
727
727
|
}, "render"));
|
|
728
728
|
p(this, _, s), Q(this, U, bs).call(this), t(this, _).querySelectorAll(
|
|
729
729
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
@@ -731,10 +731,10 @@ const Je = class Je {
|
|
|
731
731
|
n.addEventListener("scroll", () => {
|
|
732
732
|
t(this, Y).startRow >= 0 && t(this, Y).startCol >= 0 && this.render();
|
|
733
733
|
});
|
|
734
|
-
}),
|
|
734
|
+
}), S.log("π― [CellSelection] Initialized");
|
|
735
735
|
}
|
|
736
736
|
setRange(s, e, n, r) {
|
|
737
|
-
|
|
737
|
+
S.log(`π [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
|
|
738
738
|
let o = Math.min(s, n), i = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
|
|
739
739
|
const l = t(this, _).querySelectorAll(
|
|
740
740
|
".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
|
|
@@ -756,7 +756,7 @@ const Je = class Je {
|
|
|
756
756
|
});
|
|
757
757
|
});
|
|
758
758
|
});
|
|
759
|
-
p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }),
|
|
759
|
+
p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }), S.log("π¦ [CellSelection.setRange] Final Range ->", t(this, Y)), this.render();
|
|
760
760
|
}
|
|
761
761
|
};
|
|
762
762
|
_ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(function(s) {
|
|
@@ -768,7 +768,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
|
|
|
768
768
|
}, "#getMatrixRow"), bs = /* @__PURE__ */ h(function() {
|
|
769
769
|
const s = t(this, _).querySelector(".ng-container-top");
|
|
770
770
|
if (!s) {
|
|
771
|
-
|
|
771
|
+
S.log("β [CellSelection] .ng-container-top not found!");
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
774
|
s.addEventListener("mousedown", (e) => {
|
|
@@ -781,7 +781,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
|
|
|
781
781
|
t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "";
|
|
782
782
|
return;
|
|
783
783
|
}
|
|
784
|
-
|
|
784
|
+
S.log(`π±οΈ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
|
|
785
785
|
const a = /* @__PURE__ */ h((l) => {
|
|
786
786
|
const f = document.elementFromPoint(l.clientX, l.clientY);
|
|
787
787
|
let u = f == null ? void 0 : f.closest("td, th");
|
|
@@ -799,7 +799,7 @@ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(
|
|
|
799
799
|
const b = u.closest("tr"), { matrixRow: g } = Q(this, U, At).call(this, b), y = parseInt(u.dataset.col, 10);
|
|
800
800
|
g < 0 || this.setRange(o, i, g, y);
|
|
801
801
|
}, "onMouseMove"), c = /* @__PURE__ */ h(() => {
|
|
802
|
-
|
|
802
|
+
S.log("π±οΈ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
|
|
803
803
|
}, "onMouseUp");
|
|
804
804
|
document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
|
|
805
805
|
});
|
|
@@ -815,7 +815,7 @@ const Qe = class Qe {
|
|
|
815
815
|
d(this, ee, -1);
|
|
816
816
|
d(this, se, -1);
|
|
817
817
|
d(this, _t, !1);
|
|
818
|
-
p(this, V, s), Q(this, ne, ps).call(this),
|
|
818
|
+
p(this, V, s), Q(this, ne, ps).call(this), S.log("π― [CellNavigation] Initialized");
|
|
819
819
|
}
|
|
820
820
|
get currentCell() {
|
|
821
821
|
return t(this, lt);
|
|
@@ -886,10 +886,10 @@ const Et = class Et extends HTMLElement {
|
|
|
886
886
|
d(this, Nt);
|
|
887
887
|
d(this, Dt);
|
|
888
888
|
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
889
|
-
|
|
889
|
+
S.log("sheet.invalidate()"), t(this, ht).refresh();
|
|
890
890
|
}, "invalidate"));
|
|
891
891
|
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
892
|
-
if (
|
|
892
|
+
if (S.log("sheet.generate()"), !e) return;
|
|
893
893
|
p(this, ct, Ee.compile(e)), t(this, oe).call(this), t(this, ie).call(this);
|
|
894
894
|
const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
|
|
895
895
|
n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
|
|
@@ -1160,7 +1160,7 @@ const Et = class Et extends HTMLElement {
|
|
|
1160
1160
|
return t(this, Dt);
|
|
1161
1161
|
}
|
|
1162
1162
|
disconnectedCallback() {
|
|
1163
|
-
this.innerHTML = "",
|
|
1163
|
+
this.innerHTML = "", S.log("NineTableSheet destroyed.");
|
|
1164
1164
|
}
|
|
1165
1165
|
};
|
|
1166
1166
|
re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Nt = new WeakMap(), Dt = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), yt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
|
|
@@ -1583,11 +1583,11 @@ const rs = class rs {
|
|
|
1583
1583
|
}), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
|
|
1584
1584
|
}, "#adjust"));
|
|
1585
1585
|
d(this, pe, /* @__PURE__ */ h(() => {
|
|
1586
|
-
p(this, M, []),
|
|
1586
|
+
p(this, M, []), S.log(t(this, wt).querySelectorAll("table"));
|
|
1587
1587
|
const s = Array.from(t(this, wt).querySelectorAll("table"));
|
|
1588
1588
|
if (!(!s || s.length === 0)) {
|
|
1589
1589
|
for (const e of s)
|
|
1590
|
-
|
|
1590
|
+
S.log(e), $("[data-bind]", e).each((n, r) => {
|
|
1591
1591
|
const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
|
|
1592
1592
|
o && t(this, M).push({ name: o, type: i });
|
|
1593
1593
|
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
|
|
@@ -1646,7 +1646,7 @@ const os = class os extends HTMLElement {
|
|
|
1646
1646
|
d(this, ut);
|
|
1647
1647
|
d(this, ye);
|
|
1648
1648
|
d(this, me, /* @__PURE__ */ h(() => {
|
|
1649
|
-
this.fields = new Me(this), p(this, ye, new ke(this)),
|
|
1649
|
+
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 } }));
|
|
1650
1650
|
}, "#init"));
|
|
1651
1651
|
this.attachShadow({ mode: "open" }), p(this, ut, new He(this));
|
|
1652
1652
|
}
|
|
@@ -1654,7 +1654,7 @@ const os = class os extends HTMLElement {
|
|
|
1654
1654
|
t(this, me).call(this);
|
|
1655
1655
|
}
|
|
1656
1656
|
disconnectedCallback() {
|
|
1657
|
-
|
|
1657
|
+
S.log("NineTable disconnected.");
|
|
1658
1658
|
}
|
|
1659
1659
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1660
1660
|
get data() {
|