@ninebone/table 0.0.672 β 0.0.674
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 +132 -129
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -23,17 +23,17 @@ const He = class He extends Ke.constructor {
|
|
|
23
23
|
c(He, "Trace");
|
|
24
24
|
let oe = He;
|
|
25
25
|
const H = new oe();
|
|
26
|
-
var B, j,
|
|
26
|
+
var B, j, S, X, K, Z, _t, G, Nt;
|
|
27
27
|
const Me = class Me extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
d(this, B);
|
|
31
31
|
d(this, j, !1);
|
|
32
|
-
d(this,
|
|
32
|
+
d(this, S);
|
|
33
33
|
d(this, X);
|
|
34
34
|
d(this, K);
|
|
35
35
|
d(this, Z);
|
|
36
|
-
d(this,
|
|
36
|
+
d(this, _t, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!t(this, B)) return;
|
|
38
38
|
const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
|
|
39
39
|
e && (y(this, Z, new ResizeObserver(() => {
|
|
@@ -41,10 +41,10 @@ const Me = class Me extends HTMLElement {
|
|
|
41
41
|
})), t(this, Z).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
-
if (!t(this, B) || !t(this,
|
|
45
|
-
const e = t(this,
|
|
44
|
+
if (!t(this, B) || !t(this, S) || t(this, j)) return;
|
|
45
|
+
const e = t(this, S).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const r = t(this,
|
|
47
|
+
const r = t(this, S).track, n = t(this, S).thumb, o = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, h = s.scrollWidth;
|
|
48
48
|
if (a !== 0 && h > a)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
@@ -59,27 +59,27 @@ const Me = class Me extends HTMLElement {
|
|
|
59
59
|
let u = 0;
|
|
60
60
|
b > 0 && (u = parseInt(g / b * (l - f), 10)), u < 0 && (u = 0);
|
|
61
61
|
const v = l - f;
|
|
62
|
-
u > v && (u = v), n.style.left = `${u}px`, t(this,
|
|
62
|
+
u > v && (u = v), n.style.left = `${u}px`, t(this, S).left.disabled = u === 0, t(this, S).right.disabled = u >= v - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
64
|
d(this, G, /* @__PURE__ */ c((e) => {
|
|
65
|
-
if (!t(this,
|
|
66
|
-
const s = t(this,
|
|
65
|
+
if (!t(this, S)) return !1;
|
|
66
|
+
const s = t(this, S).container, r = s.querySelector("table");
|
|
67
67
|
if (!r) return !1;
|
|
68
|
-
const n = t(this,
|
|
68
|
+
const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
|
|
69
69
|
let a = e;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
71
|
const h = n.width - o;
|
|
72
|
-
a > h && (a = h), a = parseInt(a, 10), t(this,
|
|
72
|
+
a > h && (a = h), a = parseInt(a, 10), t(this, S).thumb.style.left = `${a}px`, t(this, S).left.disabled = a === 0, t(this, S).right.disabled = a >= h - 1;
|
|
73
73
|
const l = s.clientWidth, g = r.scrollWidth - l;
|
|
74
74
|
return h > 0 && g > 0 && (s.scrollLeft = a / h * g), a > 0 && a < h - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
76
|
+
d(this, Nt, /* @__PURE__ */ c(() => {
|
|
77
77
|
const e = /* @__PURE__ */ c((r) => {
|
|
78
78
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
79
|
-
const n = parseInt(t(this,
|
|
79
|
+
const n = parseInt(t(this, S).thumb.style.left || 0, 10);
|
|
80
80
|
t(this, G).call(this, n + r), y(this, X, setInterval(() => {
|
|
81
81
|
clearInterval(t(this, X)), y(this, K, setInterval(() => {
|
|
82
|
-
const o = parseInt(t(this,
|
|
82
|
+
const o = parseInt(t(this, S).thumb.style.left || 0, 10);
|
|
83
83
|
t(this, G).call(this, o + r) || clearInterval(t(this, K));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
@@ -87,22 +87,22 @@ const Me = class Me extends HTMLElement {
|
|
|
87
87
|
clearInterval(t(this, X)), clearInterval(t(this, K));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((r) => {
|
|
90
|
-
t(this,
|
|
91
|
-
}), t(this,
|
|
90
|
+
t(this, S).left.addEventListener(r, s), t(this, S).right.addEventListener(r, s), t(this, S).track.addEventListener(r, s);
|
|
91
|
+
}), t(this, S).left.addEventListener("mousedown", (r) => {
|
|
92
92
|
r.button === 0 && e(-20);
|
|
93
|
-
}), t(this,
|
|
93
|
+
}), t(this, S).right.addEventListener("mousedown", (r) => {
|
|
94
94
|
r.button === 0 && e(20);
|
|
95
|
-
}), t(this,
|
|
95
|
+
}), t(this, S).left.addEventListener("touchstart", () => e(-20)), t(this, S).right.addEventListener("touchstart", () => e(20)), t(this, S).track.addEventListener("mousedown", (r) => {
|
|
96
96
|
if (r.button !== 0) return;
|
|
97
97
|
r.preventDefault();
|
|
98
|
-
const n = t(this,
|
|
98
|
+
const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientWidth;
|
|
99
99
|
t(this, G).call(this, r.clientX - n.left - o / 2);
|
|
100
|
-
}), t(this,
|
|
100
|
+
}), t(this, S).thumb.addEventListener("mousedown", (r) => {
|
|
101
101
|
if (r.button !== 0) return;
|
|
102
|
-
r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this,
|
|
102
|
+
r.stopPropagation(), r.preventDefault(), y(this, j, !0), this.shiftX = r.clientX - t(this, S).thumb.getBoundingClientRect().left;
|
|
103
103
|
const n = /* @__PURE__ */ c((a) => {
|
|
104
104
|
if (!t(this, j)) return;
|
|
105
|
-
const h = t(this,
|
|
105
|
+
const h = t(this, S).track.getBoundingClientRect();
|
|
106
106
|
t(this, G).call(this, a.clientX - h.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
108
108
|
y(this, j, !1), s(), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
@@ -182,7 +182,7 @@ const Me = class Me extends HTMLElement {
|
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
y(this,
|
|
185
|
+
y(this, S, {
|
|
186
186
|
container: s,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -190,7 +190,7 @@ const Me = class Me extends HTMLElement {
|
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), s.addEventListener("scroll", () => {
|
|
192
192
|
t(this, j) || this.refresh();
|
|
193
|
-
}), t(this,
|
|
193
|
+
}), t(this, Nt).call(this), t(this, _t).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
@@ -198,10 +198,10 @@ const Me = class Me extends HTMLElement {
|
|
|
198
198
|
t(this, Z) && t(this, Z).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
B = new WeakMap(), j = new WeakMap(),
|
|
201
|
+
B = new WeakMap(), j = new WeakMap(), S = new WeakMap(), X = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), _t = new WeakMap(), G = new WeakMap(), Nt = new WeakMap(), c(Me, "NineTableHScrollBar");
|
|
202
202
|
let ae = Me;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ae);
|
|
204
|
-
var F, at, J, T, vt, xt,
|
|
204
|
+
var F, at, J, T, vt, xt, Wt;
|
|
205
205
|
const $e = class $e extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
@@ -229,7 +229,7 @@ const $e = class $e extends HTMLElement {
|
|
|
229
229
|
const v = l - f;
|
|
230
230
|
u < 0 && (u = 0), u > v && (u = v), r.style.top = `${u}px`, t(this, T).top.disabled = g <= 0, t(this, T).bottom.disabled = g >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
|
-
d(this,
|
|
232
|
+
d(this, Wt, /* @__PURE__ */ c(() => {
|
|
233
233
|
H.log("nine-table-vscrollbar.#init");
|
|
234
234
|
const e = t(this, T).container, s = /* @__PURE__ */ c(() => {
|
|
235
235
|
const n = (t(this, F).data.get() || []).length, o = t(this, at).getRowHeight();
|
|
@@ -242,9 +242,9 @@ const $e = class $e extends HTMLElement {
|
|
|
242
242
|
r.stopPropagation(), r.preventDefault(), y(this, J, !0), y(this, vt, r.clientY), y(this, xt, e.scrollTop);
|
|
243
243
|
const n = /* @__PURE__ */ c((a) => {
|
|
244
244
|
if (!t(this, J)) return;
|
|
245
|
-
const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, g = h.height - l, b = a.clientY - t(this, vt), u = e.clientHeight, v = s(),
|
|
246
|
-
if (g > 0 &&
|
|
247
|
-
const A = b / g *
|
|
245
|
+
const h = t(this, T).track.getBoundingClientRect(), l = t(this, T).thumb.clientHeight, g = h.height - l, b = a.clientY - t(this, vt), u = e.clientHeight, v = s(), w = Math.max(v - u, 1);
|
|
246
|
+
if (g > 0 && w > 0) {
|
|
247
|
+
const A = b / g * w;
|
|
248
248
|
let m = t(this, xt) + A;
|
|
249
249
|
const W = Math.max(0, v - u);
|
|
250
250
|
m < 0 && (m = 0), m > W && (m = W), e.scrollTop = m;
|
|
@@ -346,19 +346,19 @@ const $e = class $e extends HTMLElement {
|
|
|
346
346
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
347
347
|
top: this.querySelector(".ng-scroll-top"),
|
|
348
348
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
349
|
-
}), t(this,
|
|
349
|
+
}), t(this, Wt).call(this), this.refresh();
|
|
350
350
|
}, "initWhenReady");
|
|
351
351
|
e();
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(),
|
|
354
|
+
F = new WeakMap(), at = new WeakMap(), J = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), xt = new WeakMap(), Wt = new WeakMap(), c($e, "NineTableVScrollBar");
|
|
355
355
|
let le = $e;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", le);
|
|
357
|
-
var P,
|
|
357
|
+
var P, x, Q, D, I, V, tt, wt, Se, Ee, Ot, zt, St, Et, At, Bt, Dt, qt, Ae, lt, Rt, Pt;
|
|
358
358
|
const Ie = class Ie {
|
|
359
359
|
constructor(i) {
|
|
360
360
|
d(this, P);
|
|
361
|
-
d(this,
|
|
361
|
+
d(this, x);
|
|
362
362
|
d(this, Q);
|
|
363
363
|
d(this, D, /* @__PURE__ */ new Map());
|
|
364
364
|
d(this, I, null);
|
|
@@ -368,19 +368,19 @@ const Ie = class Ie {
|
|
|
368
368
|
d(this, Se, !1);
|
|
369
369
|
d(this, Ee, !1);
|
|
370
370
|
//#ticking = false; // π― κ³ μ μ€ν¬λ‘€ μ€λ‘νλ§μ© νλκ·Έ
|
|
371
|
-
d(this,
|
|
371
|
+
d(this, Ot, 3);
|
|
372
372
|
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
373
373
|
var e;
|
|
374
374
|
H.log("rowManager.refresh");
|
|
375
|
-
const i = t(this,
|
|
376
|
-
i && (t(this, St).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this,
|
|
375
|
+
const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
376
|
+
i && (t(this, St).call(this), t(this, Et).call(this), t(this, lt).call(this, i.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
377
377
|
}, "refresh"));
|
|
378
378
|
E(this, "initialize", /* @__PURE__ */ c(() => {
|
|
379
379
|
H.log("rowManager.initialize"), y(this, Q, {
|
|
380
|
-
scrollTables: t(this,
|
|
381
|
-
firstTr: t(this,
|
|
380
|
+
scrollTables: t(this, x).querySelectorAll(".ng-part-body table"),
|
|
381
|
+
firstTr: t(this, x).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
|
|
382
382
|
}), y(this, I, null), t(this, D).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
383
|
-
const a = t(this,
|
|
383
|
+
const a = t(this, x).querySelector(o);
|
|
384
384
|
if (!a) return;
|
|
385
385
|
const h = a.querySelector(".ng-part-body table");
|
|
386
386
|
if (!h) return;
|
|
@@ -389,9 +389,9 @@ const Ie = class Ie {
|
|
|
389
389
|
const g = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
|
|
390
390
|
t(this, D).set(o, g);
|
|
391
391
|
});
|
|
392
|
-
const i = t(this,
|
|
392
|
+
const i = t(this, x).querySelector(".ng-container-body .ng-part-body"), e = t(this, x).querySelector(".ng-container-left .ng-part-body"), s = t(this, x).querySelector(".ng-container-right .ng-part-body"), r = t(this, x).querySelector(".ng-container-body .ng-part-header"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer");
|
|
393
393
|
if (i) {
|
|
394
|
-
t(this,
|
|
394
|
+
t(this, St).call(this), t(this, qt).call(this), t(this, Et).call(this), t(this, lt).call(this, i.scrollTop);
|
|
395
395
|
let o = !1;
|
|
396
396
|
const a = /* @__PURE__ */ c((h) => {
|
|
397
397
|
if (o) return;
|
|
@@ -406,7 +406,7 @@ const Ie = class Ie {
|
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
408
|
}, "initialize"));
|
|
409
|
-
d(this,
|
|
409
|
+
d(this, zt, /* @__PURE__ */ c((i, e) => {
|
|
410
410
|
H.log("rowManager.#renderRows");
|
|
411
411
|
const s = t(this, D).get(e);
|
|
412
412
|
if (!s || s.length === 0) return;
|
|
@@ -420,10 +420,11 @@ const Ie = class Ie {
|
|
|
420
420
|
});
|
|
421
421
|
n ? n.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, Q).firstTr = r.querySelector("tr:not(.nodata)"));
|
|
422
422
|
}, "#renderRows"));
|
|
423
|
-
d(this,
|
|
424
|
-
if (
|
|
423
|
+
d(this, St, /* @__PURE__ */ c(() => {
|
|
424
|
+
if (t(this, I) !== null && t(this, I) > 0)
|
|
425
425
|
return t(this, I);
|
|
426
|
-
|
|
426
|
+
const i = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
427
|
+
H.log("rowManager.#measureAndCacheHeight");
|
|
427
428
|
const e = t(this, D).get(".ng-container-body");
|
|
428
429
|
if (!e || e.length === 0) throw new Error("invalid dom");
|
|
429
430
|
const s = i.querySelector("tbody.bindable-tbody");
|
|
@@ -433,7 +434,7 @@ const Ie = class Ie {
|
|
|
433
434
|
e.forEach((b) => {
|
|
434
435
|
n.appendChild(b.cloneNode(!0));
|
|
435
436
|
}), r ? r.before(n) : s.appendChild(n);
|
|
436
|
-
const o = t(this,
|
|
437
|
+
const o = t(this, x), a = o.style.display, h = o.style.visibility, l = o.style.position;
|
|
437
438
|
(a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
438
439
|
let f = 0;
|
|
439
440
|
const g = s.querySelectorAll("tr");
|
|
@@ -445,53 +446,53 @@ const Ie = class Ie {
|
|
|
445
446
|
}
|
|
446
447
|
f += u;
|
|
447
448
|
}), g.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = h, o.style.position = l, f <= 0) throw new Error("#measureAndCacheHeight() invalid dom");
|
|
448
|
-
return y(this, I, f), t(this,
|
|
449
|
+
return y(this, I, f), t(this, At).call(this), t(this, I);
|
|
449
450
|
}, "#measureAndCacheHeight"));
|
|
450
|
-
d(this,
|
|
451
|
+
d(this, Et, /* @__PURE__ */ c(() => {
|
|
451
452
|
H.log("rowManager.#updateVirtualScrollHeight");
|
|
452
453
|
const e = (t(this, P).data.get() || []).length, s = t(this, I), r = e * s;
|
|
453
454
|
H.log("π [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
454
|
-
const o = t(this,
|
|
455
|
+
const o = t(this, x).querySelector(n);
|
|
455
456
|
if (!o) return;
|
|
456
457
|
const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
|
|
457
458
|
a && (a.style.height = `${r}px`);
|
|
458
459
|
});
|
|
459
460
|
}, "#updateVirtualScrollHeight"));
|
|
460
|
-
d(this,
|
|
461
|
+
d(this, At, /* @__PURE__ */ c(() => {
|
|
461
462
|
if (t(this, tt) > 0 && t(this, I) > 0) {
|
|
462
463
|
const i = Math.ceil(t(this, tt) / t(this, I));
|
|
463
|
-
y(this, wt, i + t(this,
|
|
464
|
+
y(this, wt, i + t(this, Ot));
|
|
464
465
|
}
|
|
465
466
|
}, "#updateRowCount"));
|
|
466
467
|
d(this, Bt, /* @__PURE__ */ c(() => {
|
|
467
468
|
var a, h, l, f, g, b;
|
|
468
|
-
const i = t(this,
|
|
469
|
+
const i = t(this, x).querySelector(".ng-container-left .ng-part-body table"), e = t(this, x).querySelector(".ng-container-body .ng-part-body table"), s = t(this, x).querySelector(".ng-container-right .ng-part-body table");
|
|
469
470
|
if (e) {
|
|
470
|
-
const u = i ? Array.from(i.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")),
|
|
471
|
+
const u = i ? Array.from(i.querySelectorAll("tbody tr")) : [], v = Array.from(e.querySelectorAll("tbody tr")), w = s ? Array.from(s.querySelectorAll("tbody tr")) : [], A = Math.max(u.length, v.length, w.length);
|
|
471
472
|
for (let m = 0; m < A; m++) {
|
|
472
473
|
const W = [
|
|
473
474
|
((a = u[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
474
475
|
((h = v[m]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
475
|
-
((l =
|
|
476
|
+
((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
|
|
476
477
|
], R = Math.max(...W);
|
|
477
|
-
R > 0 && (u[m] && (u[m].style.height = `${R}px`), v[m] && (v[m].style.height = `${R}px`),
|
|
478
|
+
R > 0 && (u[m] && (u[m].style.height = `${R}px`), v[m] && (v[m].style.height = `${R}px`), w[m] && (w[m].style.height = `${R}px`));
|
|
478
479
|
}
|
|
479
480
|
}
|
|
480
|
-
const r = t(this,
|
|
481
|
+
const r = t(this, x).querySelector(".ng-container-left .ng-part-footer table"), n = t(this, x).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, x).querySelector(".ng-container-right .ng-part-footer table");
|
|
481
482
|
if (n) {
|
|
482
|
-
const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], v = Array.from(n.querySelectorAll("tfoot tr")),
|
|
483
|
+
const u = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], v = Array.from(n.querySelectorAll("tfoot tr")), w = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], A = Math.max(u.length, v.length, w.length);
|
|
483
484
|
for (let m = 0; m < A; m++) {
|
|
484
485
|
const W = [
|
|
485
486
|
((f = u[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
486
487
|
((g = v[m]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
|
|
487
|
-
((b =
|
|
488
|
+
((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
|
|
488
489
|
], R = Math.max(...W);
|
|
489
|
-
R > 0 && (u[m] && (u[m].style.height = `${R}px`), v[m] && (v[m].style.height = `${R}px`),
|
|
490
|
+
R > 0 && (u[m] && (u[m].style.height = `${R}px`), v[m] && (v[m].style.height = `${R}px`), w[m] && (w[m].style.height = `${R}px`));
|
|
490
491
|
}
|
|
491
492
|
}
|
|
492
493
|
}, "#syncRowHeights"));
|
|
493
494
|
d(this, Dt, /* @__PURE__ */ c(() => {
|
|
494
|
-
!t(this,
|
|
495
|
+
!t(this, x) || !(t(this, x) instanceof HTMLElement) || (y(this, V, new ResizeObserver((i) => {
|
|
495
496
|
for (const e of i) {
|
|
496
497
|
const s = e.target;
|
|
497
498
|
if (!s.classList.contains("active")) continue;
|
|
@@ -501,21 +502,21 @@ const Ie = class Ie {
|
|
|
501
502
|
const o = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
|
|
502
503
|
o && (n += o.offsetHeight), a && (n += a.offsetHeight);
|
|
503
504
|
const h = Math.max(r - n, 100);
|
|
504
|
-
t(this, tt) !== h && (y(this, tt, h), t(this,
|
|
505
|
+
t(this, tt) !== h && (y(this, tt, h), t(this, At).call(this), t(this, I) !== null && (t(this, qt).call(this), this.refresh()));
|
|
505
506
|
}
|
|
506
507
|
}
|
|
507
|
-
})), t(this, V).observe(t(this,
|
|
508
|
+
})), t(this, V).observe(t(this, x)));
|
|
508
509
|
}, "#initResizeObserver"));
|
|
509
|
-
d(this,
|
|
510
|
+
d(this, qt, /* @__PURE__ */ c(() => {
|
|
510
511
|
H.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
511
|
-
const e = t(this,
|
|
512
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
512
|
+
const e = t(this, x).querySelector(i);
|
|
513
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, zt).call(this, e, i);
|
|
513
514
|
}), t(this, Pt).call(this), t(this, Bt).call(this);
|
|
514
515
|
}, "#renderAllContainers"));
|
|
515
516
|
d(this, Ae, /* @__PURE__ */ c((i) => {
|
|
516
517
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
517
518
|
var l;
|
|
518
|
-
const s = t(this,
|
|
519
|
+
const s = t(this, x).querySelector(e);
|
|
519
520
|
if (!s) return;
|
|
520
521
|
const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
521
522
|
if (!r) return;
|
|
@@ -527,7 +528,7 @@ const Ie = class Ie {
|
|
|
527
528
|
return;
|
|
528
529
|
}
|
|
529
530
|
const u = t(this, P).data.get(b);
|
|
530
|
-
f.style.display = "", t(this,
|
|
531
|
+
f.style.display = "", t(this, Rt).call(this, f, u, b);
|
|
531
532
|
});
|
|
532
533
|
});
|
|
533
534
|
}, "#adjustBufferRows"));
|
|
@@ -537,25 +538,27 @@ const Ie = class Ie {
|
|
|
537
538
|
if (!e || e <= 0) return;
|
|
538
539
|
const s = t(this, P).data.length;
|
|
539
540
|
if (s === 0) return;
|
|
540
|
-
const r = ((g = t(this, D).get(".ng-container-body")) == null ? void 0 : g.length) || 1, n = t(this,
|
|
541
|
+
const r = ((g = t(this, D).get(".ng-container-body")) == null ? void 0 : g.length) || 1, n = t(this, x).querySelector(".ng-container-body .ng-part-body");
|
|
542
|
+
H.log("bodyContainer.clientHeight", n.clientHeight);
|
|
543
|
+
const o = Math.max(0, s - Math.floor(n.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(i / e)));
|
|
541
544
|
let h = Math.floor(a * e);
|
|
542
545
|
a === o && H.log(`π [Scroll Inspect] scrollTop: ${i}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${h}`);
|
|
543
546
|
const l = t(this, Q).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
|
|
544
547
|
(b = t(this, Q)) == null || b.scrollTables.forEach((u) => {
|
|
545
548
|
u.style.transform = `translate3d(0, ${h}px, 0)`;
|
|
546
549
|
}), f !== a && [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((u) => {
|
|
547
|
-
const v = t(this,
|
|
550
|
+
const v = t(this, x).querySelector(u);
|
|
548
551
|
if (!v) return;
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
551
|
-
Array.from(
|
|
552
|
+
const w = v.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
553
|
+
if (!w) return;
|
|
554
|
+
Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, W) => {
|
|
552
555
|
const R = a + Math.floor(W / r);
|
|
553
556
|
if (R >= s) {
|
|
554
557
|
m.style.display = "none";
|
|
555
558
|
return;
|
|
556
559
|
}
|
|
557
560
|
const O = t(this, P).data.get(R);
|
|
558
|
-
m.style.display = "", t(this,
|
|
561
|
+
m.style.display = "", t(this, Rt).call(this, m, O, R);
|
|
559
562
|
});
|
|
560
563
|
});
|
|
561
564
|
}, "#handleScroll"));
|
|
@@ -573,7 +576,7 @@ const Ie = class Ie {
|
|
|
573
576
|
cell.dataset.row = dataIndex;
|
|
574
577
|
});
|
|
575
578
|
}; */
|
|
576
|
-
d(this,
|
|
579
|
+
d(this, Rt, /* @__PURE__ */ c((i, e, s) => {
|
|
577
580
|
i.dataset.row = s, i.data = e, Array.from(i.cells).forEach((r, n) => {
|
|
578
581
|
r.dataset.row = s;
|
|
579
582
|
const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
|
|
@@ -583,7 +586,7 @@ const Ie = class Ie {
|
|
|
583
586
|
d(this, Pt, /* @__PURE__ */ c(() => {
|
|
584
587
|
var h, l, f;
|
|
585
588
|
H.log("rowManager.#syncHeaderHeights");
|
|
586
|
-
const i = t(this,
|
|
589
|
+
const i = t(this, x).querySelector(".ng-container-left .ng-part-header table"), e = t(this, x).querySelector(".ng-container-body .ng-part-header table"), s = t(this, x).querySelector(".ng-container-right .ng-part-header table");
|
|
587
590
|
if (!e) return;
|
|
588
591
|
const r = i ? Array.from(i.querySelectorAll("tr")) : [], n = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, n.length, o.length);
|
|
589
592
|
for (let g = 0; g < a; g++) {
|
|
@@ -598,7 +601,7 @@ const Ie = class Ie {
|
|
|
598
601
|
E(this, "destroy", /* @__PURE__ */ c(() => {
|
|
599
602
|
t(this, V) && (t(this, V).disconnect(), y(this, V, null));
|
|
600
603
|
}, "destroy"));
|
|
601
|
-
y(this, P, i.getRootNode().host), y(this,
|
|
604
|
+
y(this, P, i.getRootNode().host), y(this, x, i), t(this, Dt).call(this);
|
|
602
605
|
}
|
|
603
606
|
getRowHeight() {
|
|
604
607
|
return t(this, I);
|
|
@@ -608,7 +611,7 @@ const Ie = class Ie {
|
|
|
608
611
|
return ((e = t(this, D).get(i)) == null ? void 0 : e.length) || 1;
|
|
609
612
|
}
|
|
610
613
|
};
|
|
611
|
-
P = new WeakMap(),
|
|
614
|
+
P = new WeakMap(), x = new WeakMap(), Q = new WeakMap(), D = new WeakMap(), I = new WeakMap(), V = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Ee = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Bt = new WeakMap(), Dt = new WeakMap(), qt = new WeakMap(), Ae = new WeakMap(), lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), c(Ie, "RowManager");
|
|
612
615
|
let ce = Ie;
|
|
613
616
|
const jt = class jt {
|
|
614
617
|
/**
|
|
@@ -627,9 +630,9 @@ const jt = class jt {
|
|
|
627
630
|
const f = l.getAttribute("cell-type") || "renderer";
|
|
628
631
|
if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
|
|
629
632
|
let g = `cell-${f}`;
|
|
630
|
-
const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), v = l.getAttribute("maxbyte"),
|
|
633
|
+
const b = l.getAttribute("data-bind"), u = l.getAttribute("data-expr"), v = l.getAttribute("maxbyte"), w = l.getAttribute("type");
|
|
631
634
|
let A = [];
|
|
632
|
-
b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), v && A.push(`maxbyte="${v}"`),
|
|
635
|
+
b && A.push(`data-bind="${b}"`), u && A.push(`data-expr="${u}"`), v && A.push(`maxbyte="${v}"`), w && A.push(`type="${w}"`), l.innerHTML = `<${g} ${A.join(" ")}></${g}>`;
|
|
633
636
|
});
|
|
634
637
|
}, "processCellTypes"), s = /* @__PURE__ */ c((a) => {
|
|
635
638
|
if (!a.querySelector("colgroup")) {
|
|
@@ -654,25 +657,25 @@ const jt = class jt {
|
|
|
654
657
|
});
|
|
655
658
|
const u = Array.from(Array(g), () => Array(b).fill(null));
|
|
656
659
|
l.forEach((v) => {
|
|
657
|
-
const
|
|
660
|
+
const w = v.sectionRowIndex;
|
|
658
661
|
let A = 0;
|
|
659
662
|
Array.from(v.querySelectorAll("th,td")).forEach((m) => {
|
|
660
|
-
for (let O = 0; O < u[
|
|
661
|
-
if (u[
|
|
663
|
+
for (let O = 0; O < u[w].length; O++)
|
|
664
|
+
if (u[w][O] === null) {
|
|
662
665
|
A = O;
|
|
663
666
|
break;
|
|
664
667
|
}
|
|
665
668
|
const W = m.rowSpan || 1, R = m.colSpan || 1;
|
|
666
669
|
for (let O = 0; O < W; O++)
|
|
667
670
|
for (let yt = 0; yt < R; yt++)
|
|
668
|
-
|
|
671
|
+
w + O < g && A + yt < b && (u[w + O][A + yt] = O === 0 && yt === 0 ? "1" : "0");
|
|
669
672
|
});
|
|
670
673
|
}), l.forEach((v) => {
|
|
671
|
-
const
|
|
674
|
+
const w = v.sectionRowIndex;
|
|
672
675
|
Array.from(v.querySelectorAll("th,td")).forEach((A) => {
|
|
673
|
-
for (let m = 0; m < u[
|
|
674
|
-
if (u[
|
|
675
|
-
A.dataset.col = m, u[
|
|
676
|
+
for (let m = 0; m < u[w].length; m++)
|
|
677
|
+
if (u[w][m] === "1") {
|
|
678
|
+
A.dataset.col = m, u[w][m] = "0";
|
|
676
679
|
break;
|
|
677
680
|
}
|
|
678
681
|
});
|
|
@@ -958,9 +961,9 @@ const pt = class pt extends HTMLElement {
|
|
|
958
961
|
}
|
|
959
962
|
};
|
|
960
963
|
Ft = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Vt = new WeakMap(), Yt = new WeakMap(), ct = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), c(pt, "NineTableSheet"), E(pt, "SCROLLBAR_SIZE", 16);
|
|
961
|
-
let
|
|
962
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
963
|
-
var Kt,
|
|
964
|
+
let It = pt;
|
|
965
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", It);
|
|
966
|
+
var Kt, Tt;
|
|
964
967
|
const _e = class _e extends HTMLElement {
|
|
965
968
|
constructor() {
|
|
966
969
|
super();
|
|
@@ -969,17 +972,17 @@ const _e = class _e extends HTMLElement {
|
|
|
969
972
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
|
|
970
973
|
var o;
|
|
971
974
|
const r = s.ctrlKey || s.metaKey || s.shiftKey, n = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
972
|
-
t(this,
|
|
973
|
-
}), t(this,
|
|
975
|
+
t(this, Tt).call(this, n, r);
|
|
976
|
+
}), t(this, Tt).call(this, 0, !1);
|
|
974
977
|
}, "#init"));
|
|
975
|
-
d(this,
|
|
978
|
+
d(this, Tt, /* @__PURE__ */ c((e, s = !1) => {
|
|
976
979
|
const r = /* @__PURE__ */ c(() => {
|
|
977
980
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
978
981
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((u) => u.style.setProperty("display", "none"));
|
|
979
982
|
const b = f.filter((u) => u.classList.contains("active"));
|
|
980
983
|
b.length < 2 || b.forEach((u) => {
|
|
981
|
-
const v = parseInt(u.getAttribute("data-index"), 10),
|
|
982
|
-
|
|
984
|
+
const v = parseInt(u.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${v}"]`), A = f[v + 1];
|
|
985
|
+
w && A && A.classList.contains("active") && w.style.setProperty("display", "flex");
|
|
983
986
|
});
|
|
984
987
|
}, "updateSplitters"), n = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = n.querySelectorAll(".nine-tab-item"), h = o.querySelectorAll("nine-table-sheet");
|
|
985
988
|
if (!a[e]) return;
|
|
@@ -1008,24 +1011,24 @@ const _e = class _e extends HTMLElement {
|
|
|
1008
1011
|
t(this, Kt).call(this);
|
|
1009
1012
|
}
|
|
1010
1013
|
};
|
|
1011
|
-
Kt = new WeakMap(),
|
|
1014
|
+
Kt = new WeakMap(), Tt = new WeakMap(), c(_e, "NineTableSheets");
|
|
1012
1015
|
let de = _e;
|
|
1013
1016
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", de);
|
|
1014
|
-
var M, Zt,
|
|
1017
|
+
var M, Zt, kt, Gt;
|
|
1015
1018
|
const Ne = class Ne {
|
|
1016
1019
|
constructor(i) {
|
|
1017
1020
|
d(this, M);
|
|
1018
1021
|
d(this, Zt, /* @__PURE__ */ c(() => {
|
|
1019
1022
|
t(this, Gt).call(this), new ResizeObserver((i) => {
|
|
1020
1023
|
for (let e of i)
|
|
1021
|
-
t(this, M).getAttribute("auto-height") === "true" && t(this,
|
|
1024
|
+
t(this, M).getAttribute("auto-height") === "true" && t(this, kt).call(this);
|
|
1022
1025
|
}).observe(t(this, M));
|
|
1023
1026
|
}, "#init"));
|
|
1024
|
-
d(this,
|
|
1027
|
+
d(this, kt, /* @__PURE__ */ c(() => {
|
|
1025
1028
|
var h, l;
|
|
1026
1029
|
const i = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
1027
1030
|
if (i.length === 0) return;
|
|
1028
|
-
const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o =
|
|
1031
|
+
const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), r = (h = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, n = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = It.SCROLLBAR_SIZE, a = e * s + r + n + o;
|
|
1029
1032
|
t(this, M).style.height = `${a}px`;
|
|
1030
1033
|
}, "#applyAutoHeight"));
|
|
1031
1034
|
d(this, Gt, /* @__PURE__ */ c(() => {
|
|
@@ -1157,22 +1160,22 @@ const Ne = class Ne {
|
|
|
1157
1160
|
const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1158
1161
|
a == null || a.forEach((h, l) => {
|
|
1159
1162
|
e[l] && setTimeout(() => {
|
|
1160
|
-
h.generate(e[l]), s && t(this,
|
|
1163
|
+
h.generate(e[l]), s && t(this, kt).call(this);
|
|
1161
1164
|
});
|
|
1162
1165
|
});
|
|
1163
1166
|
}, "#render"));
|
|
1164
1167
|
y(this, M, i), t(this, Zt).call(this);
|
|
1165
1168
|
}
|
|
1166
1169
|
};
|
|
1167
|
-
M = new WeakMap(), Zt = new WeakMap(),
|
|
1170
|
+
M = new WeakMap(), Zt = new WeakMap(), kt = new WeakMap(), Gt = new WeakMap(), c(Ne, "LayoutManager");
|
|
1168
1171
|
let fe = Ne;
|
|
1169
|
-
var
|
|
1172
|
+
var Ct, ht;
|
|
1170
1173
|
const We = class We {
|
|
1171
1174
|
constructor(i) {
|
|
1172
|
-
d(this,
|
|
1175
|
+
d(this, Ct);
|
|
1173
1176
|
d(this, ht, -1);
|
|
1174
|
-
E(this, "count", /* @__PURE__ */ c(() => t(this,
|
|
1175
|
-
y(this,
|
|
1177
|
+
E(this, "count", /* @__PURE__ */ c(() => t(this, Ct).rawRecords.length, "count"));
|
|
1178
|
+
y(this, Ct, i);
|
|
1176
1179
|
}
|
|
1177
1180
|
get at() {
|
|
1178
1181
|
return t(this, ht);
|
|
@@ -1182,9 +1185,9 @@ const We = class We {
|
|
|
1182
1185
|
});
|
|
1183
1186
|
}
|
|
1184
1187
|
};
|
|
1185
|
-
|
|
1188
|
+
Ct = new WeakMap(), ht = new WeakMap(), c(We, "ngRow");
|
|
1186
1189
|
let ue = We;
|
|
1187
|
-
var _, k, N, dt, Jt, Y, Qt, it,
|
|
1190
|
+
var _, k, N, dt, Jt, Y, Qt, it, Lt, te, ee, ft;
|
|
1188
1191
|
const z = class z {
|
|
1189
1192
|
constructor(i, e) {
|
|
1190
1193
|
d(this, _);
|
|
@@ -1200,7 +1203,7 @@ const z = class z {
|
|
|
1200
1203
|
var s;
|
|
1201
1204
|
t(this, Y).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1202
1205
|
}), (t(this, k).rawRecords || []).forEach((e) => {
|
|
1203
|
-
e.__ng || (e.__ng = t(this,
|
|
1206
|
+
e.__ng || (e.__ng = t(this, Lt).call(this)), e.__ng.height = t(this, Y).slice();
|
|
1204
1207
|
});
|
|
1205
1208
|
}, "#initialize"));
|
|
1206
1209
|
d(this, it, /* @__PURE__ */ c(() => {
|
|
@@ -1225,7 +1228,7 @@ const z = class z {
|
|
|
1225
1228
|
E(this, "set", /* @__PURE__ */ c((i) => {
|
|
1226
1229
|
this.clear(), this.add(i, !1), t(this, it).call(this);
|
|
1227
1230
|
}, "set"));
|
|
1228
|
-
d(this,
|
|
1231
|
+
d(this, Lt, /* @__PURE__ */ c(() => ({
|
|
1229
1232
|
rowState: z.ROW_STATE.EMPTY,
|
|
1230
1233
|
deleted: !1,
|
|
1231
1234
|
filtered: !1,
|
|
@@ -1253,7 +1256,7 @@ const z = class z {
|
|
|
1253
1256
|
}), s;
|
|
1254
1257
|
}, "#json2Array"));
|
|
1255
1258
|
d(this, ee, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
|
|
1256
|
-
e.__ng = t(this,
|
|
1259
|
+
e.__ng = t(this, Lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = z.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1257
1260
|
}), i), "#defaultInsert"));
|
|
1258
1261
|
E(this, "add", /* @__PURE__ */ c((i, e = !0) => {
|
|
1259
1262
|
i === void 0 && (i = {});
|
|
@@ -1327,7 +1330,7 @@ const z = class z {
|
|
|
1327
1330
|
return this.length;
|
|
1328
1331
|
}
|
|
1329
1332
|
};
|
|
1330
|
-
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(),
|
|
1333
|
+
_ = new WeakMap(), k = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), Jt = new WeakMap(), Y = new WeakMap(), Qt = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), c(z, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1331
1334
|
E(z, "ROW_STATE", {
|
|
1332
1335
|
EMPTY: "EMPTY",
|
|
1333
1336
|
NORMAL: "NORMAL",
|
|
@@ -1359,7 +1362,7 @@ const Oe = class Oe {
|
|
|
1359
1362
|
};
|
|
1360
1363
|
rt = new WeakMap(), c(Oe, "ngDataManager");
|
|
1361
1364
|
let be = Oe;
|
|
1362
|
-
var ut, L,
|
|
1365
|
+
var ut, L, Ht, se;
|
|
1363
1366
|
const ze = class ze {
|
|
1364
1367
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1365
1368
|
constructor(i) {
|
|
@@ -1368,9 +1371,9 @@ const ze = class ze {
|
|
|
1368
1371
|
E(this, "add", /* @__PURE__ */ c((i, e = "string") => {
|
|
1369
1372
|
i.forEach((s) => {
|
|
1370
1373
|
t(this, L).some((r) => r.name === s) || t(this, L).push({ name: s, type: e });
|
|
1371
|
-
}), t(this,
|
|
1374
|
+
}), t(this, Ht).call(this);
|
|
1372
1375
|
}, "add"));
|
|
1373
|
-
d(this,
|
|
1376
|
+
d(this, Ht, /* @__PURE__ */ c(() => {
|
|
1374
1377
|
const i = /* @__PURE__ */ new Map();
|
|
1375
1378
|
t(this, L).forEach((e) => {
|
|
1376
1379
|
i.set(e.name, e.type);
|
|
@@ -1405,7 +1408,7 @@ const ze = class ze {
|
|
|
1405
1408
|
});
|
|
1406
1409
|
});
|
|
1407
1410
|
});
|
|
1408
|
-
t(this,
|
|
1411
|
+
t(this, Ht).call(this);
|
|
1409
1412
|
}
|
|
1410
1413
|
}, "#init"));
|
|
1411
1414
|
y(this, ut, i), t(this, se).call(this);
|
|
@@ -1430,7 +1433,7 @@ const ze = class ze {
|
|
|
1430
1433
|
return t(this, L).some((e) => e.name === i);
|
|
1431
1434
|
}
|
|
1432
1435
|
};
|
|
1433
|
-
ut = new WeakMap(), L = new WeakMap(),
|
|
1436
|
+
ut = new WeakMap(), L = new WeakMap(), Ht = new WeakMap(), se = new WeakMap(), c(ze, "ngFields");
|
|
1434
1437
|
let ye = ze;
|
|
1435
1438
|
var nt, ie, re;
|
|
1436
1439
|
const Be = class Be extends HTMLElement {
|
|
@@ -1479,12 +1482,12 @@ const mt = class mt extends HTMLElement {
|
|
|
1479
1482
|
};
|
|
1480
1483
|
c(mt, "BasicCellElement"), E(mt, "_styleCache", /* @__PURE__ */ new Map()), E(mt, "_customStyleCache", /* @__PURE__ */ new Map());
|
|
1481
1484
|
let me = mt;
|
|
1482
|
-
var C,
|
|
1485
|
+
var C, Mt, p, qe, Re, Te, ke, Ce;
|
|
1483
1486
|
const De = class De extends me {
|
|
1484
1487
|
constructor() {
|
|
1485
1488
|
super();
|
|
1486
1489
|
d(this, C);
|
|
1487
|
-
d(this,
|
|
1490
|
+
d(this, Mt);
|
|
1488
1491
|
d(this, p);
|
|
1489
1492
|
d(this, qe);
|
|
1490
1493
|
d(this, Re);
|
|
@@ -1534,7 +1537,7 @@ const De = class De extends me {
|
|
|
1534
1537
|
else
|
|
1535
1538
|
n = !0;
|
|
1536
1539
|
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"));
|
|
1537
|
-
var v = parseInt(t(this, p).dataset.matrixRow),
|
|
1540
|
+
var v = parseInt(t(this, p).dataset.matrixRow), w = v - 1, A = t(this, C).body.querySelector(`tbody.bindable [data-col="${t(this, p).dataset.col}"][data-matrix-row="${w}"]`);
|
|
1538
1541
|
$(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");
|
|
1539
1542
|
}
|
|
1540
1543
|
}
|
|
@@ -1553,7 +1556,7 @@ const De = class De extends me {
|
|
|
1553
1556
|
}, "getExprValue"));
|
|
1554
1557
|
}
|
|
1555
1558
|
connectedCallback() {
|
|
1556
|
-
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this,
|
|
1559
|
+
super.connectedCallback(), y(this, C, this.getRootNode().host), y(this, p, this.closest("th,td")), y(this, Mt, t(this, p).closest("tr"));
|
|
1557
1560
|
}
|
|
1558
1561
|
get value() {
|
|
1559
1562
|
var e = !t(this, C) || !t(this, C).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];
|
|
@@ -1572,10 +1575,10 @@ const De = class De extends me {
|
|
|
1572
1575
|
}
|
|
1573
1576
|
refresh() {
|
|
1574
1577
|
const e = t(this, p).dataset.bind;
|
|
1575
|
-
return parseInt(t(this, p).dataset.row), t(this,
|
|
1578
|
+
return parseInt(t(this, p).dataset.row), t(this, Mt).data[e];
|
|
1576
1579
|
}
|
|
1577
1580
|
};
|
|
1578
|
-
C = new WeakMap(),
|
|
1581
|
+
C = new WeakMap(), Mt = new WeakMap(), p = new WeakMap(), qe = new WeakMap(), Re = new WeakMap(), Te = new WeakMap(), ke = new WeakMap(), Ce = new WeakMap(), c(De, "CellElement");
|
|
1579
1582
|
let ve = De;
|
|
1580
1583
|
const Pe = class Pe extends ve {
|
|
1581
1584
|
constructor() {
|
|
@@ -1590,11 +1593,11 @@ const Pe = class Pe extends ve {
|
|
|
1590
1593
|
};
|
|
1591
1594
|
c(Pe, "EditableCellElement");
|
|
1592
1595
|
let xe = Pe;
|
|
1593
|
-
var
|
|
1596
|
+
var $t, ot, gt, bt, ne, U, Le;
|
|
1594
1597
|
const je = class je extends xe {
|
|
1595
1598
|
constructor() {
|
|
1596
1599
|
super();
|
|
1597
|
-
d(this,
|
|
1600
|
+
d(this, $t);
|
|
1598
1601
|
d(this, ot);
|
|
1599
1602
|
d(this, gt);
|
|
1600
1603
|
d(this, bt);
|
|
@@ -1602,7 +1605,7 @@ const je = class je extends xe {
|
|
|
1602
1605
|
d(this, U);
|
|
1603
1606
|
E(this, "refresh", /* @__PURE__ */ c(() => {
|
|
1604
1607
|
const e = super.refresh();
|
|
1605
|
-
t(this,
|
|
1608
|
+
t(this, $t).value = e;
|
|
1606
1609
|
}, "refresh"));
|
|
1607
1610
|
/**
|
|
1608
1611
|
dataRefresh = (v) => {
|
|
@@ -1659,10 +1662,10 @@ const je = class je extends xe {
|
|
|
1659
1662
|
${e.join(" ")}
|
|
1660
1663
|
ondragstart="return false;"
|
|
1661
1664
|
>
|
|
1662
|
-
`, super.connectedCallback(), y(this,
|
|
1665
|
+
`, super.connectedCallback(), y(this, $t, this.querySelector("input"));
|
|
1663
1666
|
}
|
|
1664
1667
|
};
|
|
1665
|
-
|
|
1668
|
+
$t = new WeakMap(), ot = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), ne = new WeakMap(), U = new WeakMap(), Le = new WeakMap(), c(je, "CellInputText");
|
|
1666
1669
|
let we = je;
|
|
1667
1670
|
customElements.get("cell-input-text");
|
|
1668
1671
|
customElements.get("cell-input") || customElements.define("cell-input", we);
|