@ninebone/table 0.0.257 β 0.0.259
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 +93 -93
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +4 -4
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -22,26 +22,26 @@ const qe = class qe extends Pe.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
c(qe, "Trace");
|
|
24
24
|
let me = qe;
|
|
25
|
-
const
|
|
26
|
-
var C,
|
|
25
|
+
const M = new me();
|
|
26
|
+
var C, B, p, D, N, P, ie, V, se;
|
|
27
27
|
const ke = class ke extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
u(this, C);
|
|
31
|
-
u(this,
|
|
31
|
+
u(this, B, !1);
|
|
32
32
|
u(this, p);
|
|
33
|
-
u(this, B);
|
|
34
33
|
u(this, D);
|
|
35
34
|
u(this, N);
|
|
35
|
+
u(this, P);
|
|
36
36
|
u(this, ie, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!e(this, C)) return;
|
|
38
38
|
const t = e(this, C).querySelector(".ng-container-body");
|
|
39
|
-
t && (y(this,
|
|
39
|
+
t && (y(this, P, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), e(this,
|
|
41
|
+
})), e(this, P).observe(t));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
x(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
-
if (!e(this, C) || !e(this, p) || e(this,
|
|
44
|
+
if (!e(this, C) || !e(this, p) || e(this, B)) return;
|
|
45
45
|
const t = e(this, p).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
47
|
const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), a = t.clientWidth, d = s.scrollWidth;
|
|
@@ -59,9 +59,9 @@ const ke = class ke extends HTMLElement {
|
|
|
59
59
|
let b = 0;
|
|
60
60
|
g > 0 && (b = parseInt(f / g * (l - h), 10)), b < 0 && (b = 0);
|
|
61
61
|
const S = l - h;
|
|
62
|
-
b > S && (b = S), r.style.left = `${b}px`,
|
|
62
|
+
b > S && (b = S), r.style.left = `${b}px`, M.log(b), e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= S - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
u(this,
|
|
64
|
+
u(this, V, /* @__PURE__ */ c((t) => {
|
|
65
65
|
if (!e(this, p)) return !1;
|
|
66
66
|
const s = e(this, p).container, n = s.querySelector("table");
|
|
67
67
|
if (!n) return !1;
|
|
@@ -76,16 +76,16 @@ const ke = class ke extends HTMLElement {
|
|
|
76
76
|
}, "#thumbMoveTo"));
|
|
77
77
|
u(this, se, /* @__PURE__ */ c(() => {
|
|
78
78
|
const t = /* @__PURE__ */ c((n) => {
|
|
79
|
-
clearInterval(e(this,
|
|
79
|
+
clearInterval(e(this, D)), clearInterval(e(this, N));
|
|
80
80
|
const r = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
81
|
-
e(this,
|
|
82
|
-
clearInterval(e(this,
|
|
81
|
+
e(this, V).call(this, r + n), y(this, D, setInterval(() => {
|
|
82
|
+
clearInterval(e(this, D)), y(this, N, setInterval(() => {
|
|
83
83
|
const o = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
84
|
-
e(this,
|
|
84
|
+
e(this, V).call(this, o + n) || clearInterval(e(this, N));
|
|
85
85
|
}, 50));
|
|
86
86
|
}, 500));
|
|
87
87
|
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
88
|
-
clearInterval(e(this,
|
|
88
|
+
clearInterval(e(this, D)), clearInterval(e(this, N));
|
|
89
89
|
}, "clearTimer");
|
|
90
90
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
91
91
|
e(this, p).left.addEventListener(n, s), e(this, p).right.addEventListener(n, s), e(this, p).track.addEventListener(n, s);
|
|
@@ -97,16 +97,16 @@ const ke = class ke extends HTMLElement {
|
|
|
97
97
|
if (n.button !== 0) return;
|
|
98
98
|
n.preventDefault();
|
|
99
99
|
const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
|
|
100
|
-
e(this,
|
|
100
|
+
e(this, V).call(this, n.clientX - r.left - o / 2);
|
|
101
101
|
}), e(this, p).thumb.addEventListener("mousedown", (n) => {
|
|
102
102
|
if (n.button !== 0) return;
|
|
103
|
-
n.stopPropagation(), n.preventDefault(), y(this,
|
|
103
|
+
n.stopPropagation(), n.preventDefault(), y(this, B, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
|
|
104
104
|
const r = /* @__PURE__ */ c((a) => {
|
|
105
|
-
if (!e(this,
|
|
105
|
+
if (!e(this, B)) return;
|
|
106
106
|
const d = e(this, p).track.getBoundingClientRect();
|
|
107
|
-
e(this,
|
|
107
|
+
e(this, V).call(this, a.clientX - d.left - this.shiftX);
|
|
108
108
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
109
|
-
y(this,
|
|
109
|
+
y(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
110
110
|
}, "onMouseUp");
|
|
111
111
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
112
112
|
});
|
|
@@ -194,22 +194,22 @@ const ke = class ke extends HTMLElement {
|
|
|
194
194
|
t();
|
|
195
195
|
}
|
|
196
196
|
disconnectedCallback() {
|
|
197
|
-
e(this,
|
|
197
|
+
e(this, P) && e(this, P).disconnect();
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
C = new WeakMap(),
|
|
200
|
+
C = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), ie = new WeakMap(), V = new WeakMap(), se = new WeakMap(), c(ke, "NineTableHScrollBar");
|
|
201
201
|
let we = ke;
|
|
202
202
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", we);
|
|
203
|
-
var
|
|
203
|
+
var $, _, A, W, H, I, ne, re, oe, le;
|
|
204
204
|
const Le = class Le {
|
|
205
205
|
constructor(i) {
|
|
206
|
-
u(this,
|
|
206
|
+
u(this, $);
|
|
207
207
|
u(this, _, []);
|
|
208
|
-
u(this,
|
|
209
|
-
u(this,
|
|
208
|
+
u(this, A, null);
|
|
209
|
+
u(this, W, null);
|
|
210
210
|
u(this, H, 0);
|
|
211
211
|
u(this, I, 0);
|
|
212
|
-
x(this, "getRowHeight", /* @__PURE__ */ c(() => e(this,
|
|
212
|
+
x(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, A), "getRowHeight"));
|
|
213
213
|
u(this, ne, /* @__PURE__ */ c(() => {
|
|
214
214
|
e(this, re).call(this);
|
|
215
215
|
}, "#init"));
|
|
@@ -217,7 +217,7 @@ const Le = class Le {
|
|
|
217
217
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
218
218
|
*/
|
|
219
219
|
u(this, re, /* @__PURE__ */ c(() => {
|
|
220
|
-
!e(this,
|
|
220
|
+
!e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, W, new ResizeObserver((i) => {
|
|
221
221
|
for (const t of i) {
|
|
222
222
|
const s = t.target;
|
|
223
223
|
if (!s.classList.contains("active"))
|
|
@@ -229,26 +229,26 @@ const Le = class Le {
|
|
|
229
229
|
const a = s.querySelector(".ng-container-body") || s, d = a.querySelector("thead"), l = a.querySelector("tfoot");
|
|
230
230
|
d && (o += d.offsetHeight || d.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
|
|
231
231
|
const h = Math.max(r - o, 100);
|
|
232
|
-
if (e(this, H) !== h && (y(this, H, h), e(this,
|
|
233
|
-
const f = Math.ceil(e(this, H) / e(this,
|
|
234
|
-
y(this, I, f + 20),
|
|
232
|
+
if (e(this, H) !== h && (y(this, H, h), e(this, A) !== null)) {
|
|
233
|
+
const f = Math.ceil(e(this, H) / e(this, A));
|
|
234
|
+
y(this, I, f + 20), M.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, I)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
235
235
|
const b = s.querySelector(g);
|
|
236
236
|
b && b.querySelector("tbody") && e(this, le).call(this, b);
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
})), e(this,
|
|
241
|
+
})), e(this, W).observe(e(this, $)));
|
|
242
242
|
}, "#initResizeObserver"));
|
|
243
243
|
// π― ν
νλ¦Ώ μΆμΆ, λμ΄ μΈ‘μ , μ΄κΈ° λ λλ§μ μμμ λ§κ² λ΄λΆμμ μΌκ΄ μ²λ¦¬
|
|
244
244
|
x(this, "initialize", /* @__PURE__ */ c((i) => {
|
|
245
|
-
|
|
246
|
-
const t = e(this,
|
|
247
|
-
y(this, _, n.map((r) => r.cloneNode(!0))), y(this,
|
|
245
|
+
M.log(i);
|
|
246
|
+
const t = e(this, $).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
|
|
247
|
+
y(this, _, n.map((r) => r.cloneNode(!0))), y(this, A, null), e(this, oe).call(this, t);
|
|
248
248
|
}, "initialize"));
|
|
249
249
|
u(this, oe, /* @__PURE__ */ c((i) => {
|
|
250
|
-
if (e(this,
|
|
251
|
-
return e(this,
|
|
250
|
+
if (e(this, A) !== null && e(this, A) > 0)
|
|
251
|
+
return e(this, A);
|
|
252
252
|
if (e(this, _).length === 0)
|
|
253
253
|
throw new Error("[RowManager] Template TRs are empty.");
|
|
254
254
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
@@ -264,12 +264,12 @@ const Le = class Le {
|
|
|
264
264
|
const h = t.querySelectorAll("tr:not(.nodata)");
|
|
265
265
|
if (h.forEach((f, g) => {
|
|
266
266
|
l += f.offsetHeight || f.getBoundingClientRect().height;
|
|
267
|
-
}), h.forEach((f) => f.remove()), r && (r.style.display = o, r.style.visibility = a, r.style.position = d), y(this,
|
|
268
|
-
const f = Math.ceil(e(this, H) / e(this,
|
|
267
|
+
}), h.forEach((f) => f.remove()), r && (r.style.display = o, r.style.visibility = a, r.style.position = d), y(this, A, l), e(this, H) > 0) {
|
|
268
|
+
const f = Math.ceil(e(this, H) / e(this, A));
|
|
269
269
|
y(this, I, f + 20);
|
|
270
270
|
} else
|
|
271
271
|
y(this, I, 40);
|
|
272
|
-
return console.log(`[RowManager] Template Height Cached: ${e(this,
|
|
272
|
+
return console.log(`[RowManager] Template Height Cached: ${e(this, A)}px | RowCount: ${e(this, I)}`), e(this, A);
|
|
273
273
|
}, "#measureAndCacheHeight"));
|
|
274
274
|
/**
|
|
275
275
|
* π― μΊμλ ν κ°μ λ°ν (μμ λλ§ μ΅μνμ λ°©μ΄ μ°μ°)
|
|
@@ -300,21 +300,21 @@ const Le = class Le {
|
|
|
300
300
|
s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
|
|
301
301
|
}, "#renderRows"));
|
|
302
302
|
x(this, "destroy", /* @__PURE__ */ c(() => {
|
|
303
|
-
e(this,
|
|
303
|
+
e(this, W) && (e(this, W).disconnect(), y(this, W, null));
|
|
304
304
|
}, "destroy"));
|
|
305
|
-
y(this,
|
|
305
|
+
y(this, $, i), e(this, ne).call(this);
|
|
306
306
|
}
|
|
307
307
|
get templateLength() {
|
|
308
308
|
return e(this, _).length || 1;
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
-
|
|
311
|
+
$ = new WeakMap(), _ = new WeakMap(), A = new WeakMap(), W = new WeakMap(), H = new WeakMap(), I = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), c(Le, "RowManager");
|
|
312
312
|
let xe = Le;
|
|
313
|
-
var
|
|
313
|
+
var E, F, G, U, ae, ce;
|
|
314
314
|
const j = class j extends HTMLElement {
|
|
315
315
|
constructor() {
|
|
316
316
|
super();
|
|
317
|
-
u(this,
|
|
317
|
+
u(this, E, null);
|
|
318
318
|
u(this, F);
|
|
319
319
|
/**
|
|
320
320
|
* π― 2μ°¨μ μ
격μ μΈλ±μ€λ₯Ό κ³μ°νμ¬ λ³ν©(`rowSpan`/`colSpan`) μ
μ μ λ μ»¬λΌ μμΉλ₯Ό λΆμ¬
|
|
@@ -383,19 +383,19 @@ const j = class j extends HTMLElement {
|
|
|
383
383
|
}, "ensureThead");
|
|
384
384
|
return h(l), f(l), l.classList.add("nine-table-element"), l;
|
|
385
385
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
386
|
-
y(this,
|
|
386
|
+
y(this, E, s(n)), e(this, E).style.display = "table", e(this, G).call(this, e(this, E), "thead"), e(this, G).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, h) => {
|
|
387
387
|
const f = l.getAttribute("fixed");
|
|
388
|
-
f && e(this,
|
|
388
|
+
f && e(this, E).querySelectorAll(`[data-col="${h}"]`).forEach((g) => {
|
|
389
389
|
g.setAttribute("fixed", f);
|
|
390
390
|
});
|
|
391
|
-
}),
|
|
391
|
+
}), M.log(e(this, E));
|
|
392
392
|
const o = this.querySelector(".ng-container-left"), a = this.querySelector(".ng-container-body"), d = this.querySelector(".ng-container-right");
|
|
393
393
|
if (a) {
|
|
394
|
-
const l = e(this, U).call(this, e(this,
|
|
395
|
-
a.innerHTML = "", a.appendChild(l), e(this, F).initialize(e(this,
|
|
394
|
+
const l = e(this, U).call(this, e(this, E), null);
|
|
395
|
+
a.innerHTML = "", a.appendChild(l), M.log(e(this, E)), M.log(l), e(this, F).initialize(e(this, E));
|
|
396
396
|
}
|
|
397
397
|
if (o) {
|
|
398
|
-
const l = e(this, U).call(this, e(this,
|
|
398
|
+
const l = e(this, U).call(this, e(this, E), "left");
|
|
399
399
|
let h = 0;
|
|
400
400
|
l.querySelectorAll("col").forEach((g) => {
|
|
401
401
|
const b = parseInt(g.getAttribute("width"), 10);
|
|
@@ -405,7 +405,7 @@ const j = class j extends HTMLElement {
|
|
|
405
405
|
o.style.flex = `0 0 ${f}px`, o.style.width = `${f}px`;
|
|
406
406
|
}
|
|
407
407
|
if (d) {
|
|
408
|
-
const l = e(this, U).call(this, e(this,
|
|
408
|
+
const l = e(this, U).call(this, e(this, E), "right");
|
|
409
409
|
let h = 0;
|
|
410
410
|
l.querySelectorAll("col").forEach((g) => {
|
|
411
411
|
const b = parseInt(g.getAttribute("width"), 10);
|
|
@@ -583,10 +583,10 @@ const j = class j extends HTMLElement {
|
|
|
583
583
|
e(this, ae).call(this);
|
|
584
584
|
}
|
|
585
585
|
disconnectedCallback() {
|
|
586
|
-
this.innerHTML = "",
|
|
586
|
+
this.innerHTML = "", M.log("NineTableSheet destroyed.");
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
|
-
|
|
589
|
+
E = new WeakMap(), F = new WeakMap(), G = new WeakMap(), U = new WeakMap(), ae = new WeakMap(), ce = new WeakMap(), c(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
|
|
590
590
|
let te = j;
|
|
591
591
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", te);
|
|
592
592
|
var he, J;
|
|
@@ -640,29 +640,29 @@ const Ce = class Ce extends HTMLElement {
|
|
|
640
640
|
he = new WeakMap(), J = new WeakMap(), c(Ce, "NineTableSheets");
|
|
641
641
|
let ve = Ce;
|
|
642
642
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ve);
|
|
643
|
-
var
|
|
643
|
+
var R, de, Q, fe;
|
|
644
644
|
const _e = class _e {
|
|
645
645
|
constructor(i) {
|
|
646
|
-
u(this,
|
|
646
|
+
u(this, R);
|
|
647
647
|
u(this, de, /* @__PURE__ */ c(() => {
|
|
648
648
|
e(this, fe).call(this), new ResizeObserver((i) => {
|
|
649
649
|
for (let t of i)
|
|
650
|
-
e(this,
|
|
651
|
-
}).observe(e(this,
|
|
650
|
+
e(this, R).getAttribute("auto-height") === "true" && e(this, Q).call(this);
|
|
651
|
+
}).observe(e(this, R));
|
|
652
652
|
}, "#init"));
|
|
653
653
|
u(this, Q, /* @__PURE__ */ c(() => {
|
|
654
654
|
var d, l;
|
|
655
|
-
const i = Array.from(e(this,
|
|
655
|
+
const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
656
656
|
if (i.length === 0) return;
|
|
657
|
-
const t = parseInt(e(this,
|
|
658
|
-
e(this,
|
|
657
|
+
const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (d = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = te.SCROLLBAR_SIZE, a = t * s + n + r + o;
|
|
658
|
+
e(this, R).style.height = `${a}px`;
|
|
659
659
|
}, "#applyAutoHeight"));
|
|
660
660
|
u(this, fe, /* @__PURE__ */ c(() => {
|
|
661
|
-
const t = Array.from(e(this,
|
|
661
|
+
const t = Array.from(e(this, R).children).filter((d) => d.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", n = t.length, r = t.map((d, l) => {
|
|
662
662
|
const f = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, g = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
663
663
|
return f + g;
|
|
664
664
|
}).join(""), o = t.map((d, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
665
|
-
e(this,
|
|
665
|
+
e(this, R).shadowRoot.innerHTML = `
|
|
666
666
|
<style>
|
|
667
667
|
:host {
|
|
668
668
|
display: flex;
|
|
@@ -761,42 +761,42 @@ const _e = class _e {
|
|
|
761
761
|
</nine-table-body>
|
|
762
762
|
<nine-table-footer></nine-table-footer>
|
|
763
763
|
`;
|
|
764
|
-
const a = e(this,
|
|
764
|
+
const a = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
765
765
|
a == null || a.forEach((d, l) => {
|
|
766
766
|
t[l] && setTimeout(() => {
|
|
767
767
|
d.generate(t[l]), s && e(this, Q).call(this);
|
|
768
768
|
});
|
|
769
769
|
});
|
|
770
770
|
}, "#render"));
|
|
771
|
-
y(this,
|
|
771
|
+
y(this, R, i), e(this, de).call(this);
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
|
-
|
|
774
|
+
R = new WeakMap(), de = new WeakMap(), Q = new WeakMap(), fe = new WeakMap(), c(_e, "LayoutManager");
|
|
775
775
|
let Se = _e;
|
|
776
|
-
var
|
|
776
|
+
var z, X;
|
|
777
777
|
const He = class He {
|
|
778
778
|
constructor(i) {
|
|
779
|
-
u(this,
|
|
780
|
-
u(this,
|
|
781
|
-
x(this, "count", /* @__PURE__ */ c(() => e(this,
|
|
782
|
-
y(this,
|
|
779
|
+
u(this, z);
|
|
780
|
+
u(this, X, -1);
|
|
781
|
+
x(this, "count", /* @__PURE__ */ c(() => e(this, z).rawRecords.length, "count"));
|
|
782
|
+
y(this, z, i);
|
|
783
783
|
}
|
|
784
784
|
get at() {
|
|
785
|
-
return e(this,
|
|
785
|
+
return e(this, X);
|
|
786
786
|
}
|
|
787
787
|
set at(i) {
|
|
788
788
|
var s, n;
|
|
789
|
-
y(this,
|
|
790
|
-
const t = ((n = (s = e(this,
|
|
791
|
-
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this,
|
|
789
|
+
y(this, X, parseInt(i, 10));
|
|
790
|
+
const t = ((n = (s = e(this, z).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, z).owner.body;
|
|
791
|
+
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, X)}"]`) && setTimeout(() => {
|
|
792
792
|
var r, o;
|
|
793
|
-
(o = (r = e(this,
|
|
793
|
+
(o = (r = e(this, z).owner).scrollTo_V1) == null || o.call(r, e(this, X));
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
|
-
|
|
797
|
+
z = new WeakMap(), X = new WeakMap(), c(He, "ngRow");
|
|
798
798
|
let Ee = He;
|
|
799
|
-
var T, w, q, K, ue,
|
|
799
|
+
var T, w, q, K, ue, O, ge, ee, be, ye, Z;
|
|
800
800
|
const k = class k {
|
|
801
801
|
constructor(i, t) {
|
|
802
802
|
u(this, T);
|
|
@@ -804,15 +804,15 @@ const k = class k {
|
|
|
804
804
|
u(this, q, []);
|
|
805
805
|
u(this, K, []);
|
|
806
806
|
u(this, ue, 0);
|
|
807
|
-
u(this,
|
|
807
|
+
u(this, O, []);
|
|
808
808
|
u(this, ge, /* @__PURE__ */ c(() => {
|
|
809
|
-
y(this,
|
|
809
|
+
y(this, O, []);
|
|
810
810
|
const i = e(this, T).template || [];
|
|
811
811
|
Array.from(i).forEach((t) => {
|
|
812
812
|
var s;
|
|
813
|
-
e(this,
|
|
813
|
+
e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
814
814
|
}), (e(this, w).rawRecords || []).forEach((t) => {
|
|
815
|
-
t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this,
|
|
815
|
+
t.__ng || (t.__ng = e(this, ee).call(this)), t.__ng.height = e(this, O).slice();
|
|
816
816
|
});
|
|
817
817
|
}, "#initialize"));
|
|
818
818
|
x(this, "set", /* @__PURE__ */ c((i) => {
|
|
@@ -822,10 +822,10 @@ const k = class k {
|
|
|
822
822
|
rowState: k.ROW_STATE.EMPTY,
|
|
823
823
|
deleted: !1,
|
|
824
824
|
filtered: !1,
|
|
825
|
-
height: e(this,
|
|
825
|
+
height: e(this, O).slice(),
|
|
826
826
|
o: {},
|
|
827
827
|
c: {},
|
|
828
|
-
_: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this,
|
|
828
|
+
_: [0, 0, 0, 0, k.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
|
|
829
829
|
}), "#getDefaultMeta"));
|
|
830
830
|
x(this, "reset", /* @__PURE__ */ c(() => {
|
|
831
831
|
y(this, q, []), y(this, K, []);
|
|
@@ -932,7 +932,7 @@ const k = class k {
|
|
|
932
932
|
return this.length;
|
|
933
933
|
}
|
|
934
934
|
};
|
|
935
|
-
T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(),
|
|
935
|
+
T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ue = new WeakMap(), O = new WeakMap(), ge = new WeakMap(), ee = new WeakMap(), be = new WeakMap(), ye = new WeakMap(), Z = new WeakMap(), c(k, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
936
936
|
x(k, "ROW_STATE", {
|
|
937
937
|
EMPTY: "EMPTY",
|
|
938
938
|
NORMAL: "NORMAL",
|
|
@@ -962,35 +962,35 @@ const Ie = class Ie {
|
|
|
962
962
|
};
|
|
963
963
|
c(Ie, "ngDataManager");
|
|
964
964
|
let Ae = Ie;
|
|
965
|
-
var
|
|
965
|
+
var Y, pe;
|
|
966
966
|
const Me = class Me extends HTMLElement {
|
|
967
967
|
constructor() {
|
|
968
968
|
super();
|
|
969
969
|
//#created = false;
|
|
970
|
-
u(this,
|
|
970
|
+
u(this, Y);
|
|
971
971
|
u(this, pe);
|
|
972
|
-
this.attachShadow({ mode: "open" }), y(this,
|
|
972
|
+
this.attachShadow({ mode: "open" }), y(this, Y, new Ae(this));
|
|
973
973
|
}
|
|
974
974
|
connectedCallback() {
|
|
975
|
-
y(this, pe, new Se(this)),
|
|
975
|
+
y(this, pe, new Se(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
976
976
|
}
|
|
977
977
|
disconnectedCallback() {
|
|
978
|
-
|
|
978
|
+
M.log("NineTable disconnected.");
|
|
979
979
|
}
|
|
980
980
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
981
981
|
get data() {
|
|
982
|
-
return e(this,
|
|
982
|
+
return e(this, Y).data;
|
|
983
983
|
}
|
|
984
984
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
985
985
|
get row() {
|
|
986
|
-
return e(this,
|
|
986
|
+
return e(this, Y).row;
|
|
987
987
|
}
|
|
988
988
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
989
989
|
get dataManager() {
|
|
990
|
-
return e(this,
|
|
990
|
+
return e(this, Y);
|
|
991
991
|
}
|
|
992
992
|
};
|
|
993
|
-
|
|
993
|
+
Y = new WeakMap(), pe = new WeakMap(), c(Me, "NineTable");
|
|
994
994
|
let Te = Me;
|
|
995
995
|
customElements.get("nine-table") || customElements.define("nine-table", Te);
|
|
996
996
|
//# sourceMappingURL=nine-table.js.map
|