@ninebone/table 0.0.333 β 0.0.335
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 +130 -130
- 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
|
@@ -5,10 +5,10 @@ var ne = (m) => {
|
|
|
5
5
|
var le = (m, i, e) => i in m ? se(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
|
|
6
6
|
var c = (m, i) => se(m, "name", { value: i, configurable: !0 });
|
|
7
7
|
var x = (m, i, e) => le(m, typeof i != "symbol" ? i + "" : i, e), oe = (m, i, e) => i.has(m) || ne("Cannot " + e);
|
|
8
|
-
var t = (m, i, e) => (oe(m, i, "read from private field"), e ? e.call(m) : i.get(m)), a = (m, i, e) => i.has(m) ? ne("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e),
|
|
8
|
+
var t = (m, i, e) => (oe(m, i, "read from private field"), e ? e.call(m) : i.get(m)), a = (m, i, e) => i.has(m) ? ne("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), g = (m, i, e, s) => (oe(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
|
|
9
9
|
var re = (m, i, e, s) => ({
|
|
10
10
|
set _(n) {
|
|
11
|
-
|
|
11
|
+
g(m, i, n, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
14
|
return t(m, i, s);
|
|
@@ -22,23 +22,23 @@ const Kt = class Kt extends ce.constructor {
|
|
|
22
22
|
};
|
|
23
23
|
c(Kt, "Trace");
|
|
24
24
|
let zt = Kt;
|
|
25
|
-
const
|
|
26
|
-
var C, M, y,
|
|
25
|
+
const z = new zt();
|
|
26
|
+
var C, M, y, O, D, N, bt, B, gt;
|
|
27
27
|
const jt = class jt extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
a(this, C);
|
|
31
31
|
a(this, M, !1);
|
|
32
32
|
a(this, y);
|
|
33
|
-
a(this, z);
|
|
34
33
|
a(this, O);
|
|
35
34
|
a(this, D);
|
|
35
|
+
a(this, N);
|
|
36
36
|
a(this, bt, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!t(this, C)) return;
|
|
38
38
|
const e = t(this, C).querySelector(".ng-container-body");
|
|
39
|
-
e && (
|
|
39
|
+
e && (g(this, N, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, N).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
x(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
44
|
if (!t(this, C) || !t(this, y) || t(this, M)) return;
|
|
@@ -55,13 +55,13 @@ const jt = class jt extends HTMLElement {
|
|
|
55
55
|
if (d <= 0) return;
|
|
56
56
|
const f = Math.max(Math.min(d * (l / h), d), 20);
|
|
57
57
|
r.style.width = `${f}px`;
|
|
58
|
-
const u = e.scrollLeft,
|
|
58
|
+
const u = e.scrollLeft, b = h - l;
|
|
59
59
|
let p = 0;
|
|
60
|
-
|
|
60
|
+
b > 0 && (p = parseInt(u / b * (d - f), 10)), p < 0 && (p = 0);
|
|
61
61
|
const E = d - f;
|
|
62
|
-
p > E && (p = E), r.style.left = `${p}px`,
|
|
62
|
+
p > E && (p = E), r.style.left = `${p}px`, z.log(p), t(this, y).left.disabled = p === 0, t(this, y).right.disabled = p >= E - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
a(this,
|
|
64
|
+
a(this, B, /* @__PURE__ */ c((e) => {
|
|
65
65
|
if (!t(this, y)) return !1;
|
|
66
66
|
const s = t(this, y).container, n = s.querySelector("table");
|
|
67
67
|
if (!n) return !1;
|
|
@@ -75,16 +75,16 @@ const jt = class jt extends HTMLElement {
|
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
76
|
a(this, gt, /* @__PURE__ */ c(() => {
|
|
77
77
|
const e = /* @__PURE__ */ c((n) => {
|
|
78
|
-
clearInterval(t(this,
|
|
78
|
+
clearInterval(t(this, O)), clearInterval(t(this, D));
|
|
79
79
|
const r = parseInt(t(this, y).thumb.style.left || 0, 10);
|
|
80
|
-
t(this,
|
|
81
|
-
clearInterval(t(this,
|
|
80
|
+
t(this, B).call(this, r + n), g(this, O, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, O)), g(this, D, setInterval(() => {
|
|
82
82
|
const o = parseInt(t(this, y).thumb.style.left || 0, 10);
|
|
83
|
-
t(this,
|
|
83
|
+
t(this, B).call(this, o + n) || clearInterval(t(this, D));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
86
|
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
87
|
-
clearInterval(t(this,
|
|
87
|
+
clearInterval(t(this, O)), clearInterval(t(this, D));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
90
90
|
t(this, y).left.addEventListener(n, s), t(this, y).right.addEventListener(n, s), t(this, y).track.addEventListener(n, s);
|
|
@@ -96,23 +96,23 @@ const jt = class jt extends HTMLElement {
|
|
|
96
96
|
if (n.button !== 0) return;
|
|
97
97
|
n.preventDefault();
|
|
98
98
|
const r = t(this, y).track.getBoundingClientRect(), o = t(this, y).thumb.clientWidth;
|
|
99
|
-
t(this,
|
|
99
|
+
t(this, B).call(this, n.clientX - r.left - o / 2);
|
|
100
100
|
}), t(this, y).thumb.addEventListener("mousedown", (n) => {
|
|
101
101
|
if (n.button !== 0) return;
|
|
102
|
-
n.stopPropagation(), n.preventDefault(),
|
|
102
|
+
n.stopPropagation(), n.preventDefault(), g(this, M, !0), this.shiftX = n.clientX - t(this, y).thumb.getBoundingClientRect().left;
|
|
103
103
|
const r = /* @__PURE__ */ c((l) => {
|
|
104
104
|
if (!t(this, M)) return;
|
|
105
105
|
const h = t(this, y).track.getBoundingClientRect();
|
|
106
|
-
t(this,
|
|
106
|
+
t(this, B).call(this, l.clientX - h.left - this.shiftX);
|
|
107
107
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
108
|
-
|
|
108
|
+
g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
110
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
111
111
|
});
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
114
114
|
connectedCallback() {
|
|
115
|
-
if (
|
|
115
|
+
if (g(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, C)) return;
|
|
116
116
|
this.innerHTML = `
|
|
117
117
|
<style>
|
|
118
118
|
nine-table-hscrollbar {
|
|
@@ -182,7 +182,7 @@ const jt = class jt extends HTMLElement {
|
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
g(this, y, {
|
|
186
186
|
container: s,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -195,17 +195,17 @@ const jt = class jt extends HTMLElement {
|
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
|
-
t(this,
|
|
198
|
+
t(this, N) && t(this, N).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
C = new WeakMap(), M = new WeakMap(), y = new WeakMap(),
|
|
201
|
+
C = new WeakMap(), M = new WeakMap(), y = new WeakMap(), O = new WeakMap(), D = new WeakMap(), N = new WeakMap(), bt = new WeakMap(), B = new WeakMap(), gt = new WeakMap(), c(jt, "NineTableHScrollBar");
|
|
202
202
|
let Ot = jt;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ot);
|
|
204
|
-
var
|
|
204
|
+
var P, I, v, st, nt, yt;
|
|
205
205
|
const Zt = class Zt extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
|
-
a(this,
|
|
208
|
+
a(this, P);
|
|
209
209
|
a(this, I, !1);
|
|
210
210
|
a(this, v);
|
|
211
211
|
a(this, st, 0);
|
|
@@ -214,7 +214,7 @@ const Zt = class Zt extends HTMLElement {
|
|
|
214
214
|
* π― μ€ν¬λ‘€λ° μμΉ λ° μΈλΈ ν¬κΈ° κ°±μ
|
|
215
215
|
*/
|
|
216
216
|
x(this, "refresh", /* @__PURE__ */ c(() => {
|
|
217
|
-
if (!t(this,
|
|
217
|
+
if (!t(this, P) || !t(this, v) || t(this, I)) return;
|
|
218
218
|
const e = t(this, v).container, s = e.querySelector("table");
|
|
219
219
|
if (!s) return;
|
|
220
220
|
const n = t(this, v).track, r = t(this, v).thumb, o = e.clientHeight, l = s.scrollHeight;
|
|
@@ -228,10 +228,10 @@ const Zt = class Zt extends HTMLElement {
|
|
|
228
228
|
const d = Math.max(Math.min(h * (o / l), h), 20);
|
|
229
229
|
r.style.height = `${d}px`;
|
|
230
230
|
const f = e.scrollTop, u = l - o;
|
|
231
|
-
let
|
|
232
|
-
u > 0 && (
|
|
231
|
+
let b = 0;
|
|
232
|
+
u > 0 && (b = f / u * (h - d));
|
|
233
233
|
const p = h - d;
|
|
234
|
-
|
|
234
|
+
b < 0 && (b = 0), b > p && (b = p), r.style.top = `${b}px`, t(this, v).top.disabled = f <= 0, t(this, v).bottom.disabled = f >= u - 1;
|
|
235
235
|
}, "refresh"));
|
|
236
236
|
a(this, yt, /* @__PURE__ */ c(() => {
|
|
237
237
|
const e = t(this, v).container;
|
|
@@ -239,27 +239,27 @@ const Zt = class Zt extends HTMLElement {
|
|
|
239
239
|
t(this, I) || this.refresh();
|
|
240
240
|
}), t(this, v).thumb.addEventListener("mousedown", (s) => {
|
|
241
241
|
if (s.button !== 0) return;
|
|
242
|
-
s.stopPropagation(), s.preventDefault(),
|
|
242
|
+
s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, st, s.clientY), g(this, nt, e.scrollTop);
|
|
243
243
|
const n = /* @__PURE__ */ c((o) => {
|
|
244
244
|
if (!t(this, I)) return;
|
|
245
|
-
const l = t(this, v).track.getBoundingClientRect(), h = t(this, v).thumb.clientHeight, f = l.height - h, u = o.clientY - t(this, st),
|
|
246
|
-
|
|
247
|
-
const L = p.scrollHeight -
|
|
245
|
+
const l = t(this, v).track.getBoundingClientRect(), h = t(this, v).thumb.clientHeight, f = l.height - h, u = o.clientY - t(this, st), b = e.clientHeight, p = e.querySelector("table");
|
|
246
|
+
z.log(p), z.log(p.scrollHeight);
|
|
247
|
+
const L = p.scrollHeight - b;
|
|
248
248
|
if (f > 0 && L > 0) {
|
|
249
249
|
const ft = u / f * L;
|
|
250
250
|
e.scrollTop = t(this, nt) + ft;
|
|
251
251
|
}
|
|
252
252
|
this.refresh();
|
|
253
253
|
}, "onMouseMove"), r = /* @__PURE__ */ c(() => {
|
|
254
|
-
|
|
254
|
+
g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
|
|
255
255
|
}, "onMouseUp");
|
|
256
256
|
document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
|
|
257
257
|
}), t(this, v).track.addEventListener("mousedown", (s) => {
|
|
258
258
|
if (s.button !== 0 || s.target === t(this, v).thumb) return;
|
|
259
259
|
const n = t(this, v).track.getBoundingClientRect(), r = t(this, v).thumb.clientHeight, o = s.clientY - n.top - r / 2, h = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
|
|
260
260
|
if (h > 0 && u > 0) {
|
|
261
|
-
const
|
|
262
|
-
e.scrollTop =
|
|
261
|
+
const b = Math.max(0, Math.min(1, o / h));
|
|
262
|
+
e.scrollTop = b * u;
|
|
263
263
|
}
|
|
264
264
|
this.refresh();
|
|
265
265
|
}), t(this, v).top.addEventListener("click", () => {
|
|
@@ -270,7 +270,7 @@ const Zt = class Zt extends HTMLElement {
|
|
|
270
270
|
}, "#init"));
|
|
271
271
|
}
|
|
272
272
|
connectedCallback() {
|
|
273
|
-
if (
|
|
273
|
+
if (g(this, P, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, P)) return;
|
|
274
274
|
this.innerHTML = `
|
|
275
275
|
<style>
|
|
276
276
|
nine-table-vscrollbar {
|
|
@@ -335,12 +335,12 @@ const Zt = class Zt extends HTMLElement {
|
|
|
335
335
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
336
336
|
`;
|
|
337
337
|
const e = /* @__PURE__ */ c(() => {
|
|
338
|
-
const s = t(this,
|
|
338
|
+
const s = t(this, P).querySelector(".ng-container-body");
|
|
339
339
|
if (!s) {
|
|
340
340
|
setTimeout(e, 10);
|
|
341
341
|
return;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
g(this, v, {
|
|
344
344
|
container: s,
|
|
345
345
|
track: this.querySelector(".ng-scroll-track"),
|
|
346
346
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -351,10 +351,10 @@ const Zt = class Zt extends HTMLElement {
|
|
|
351
351
|
e();
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
|
|
354
|
+
P = new WeakMap(), I = new WeakMap(), v = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), yt = new WeakMap(), c(Zt, "NineTableVScrollBar");
|
|
355
355
|
let Dt = Zt;
|
|
356
356
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Dt);
|
|
357
|
-
var pt,
|
|
357
|
+
var pt, j;
|
|
358
358
|
const H = class H {
|
|
359
359
|
/**
|
|
360
360
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
@@ -369,7 +369,7 @@ const H = class H {
|
|
|
369
369
|
var n, r, o, l;
|
|
370
370
|
if (!i) return null;
|
|
371
371
|
const e = i.cloneNode(!0);
|
|
372
|
-
return t(n = H, pt).call(n, e), t(r = H,
|
|
372
|
+
return t(n = H, pt).call(n, e), t(r = H, j).call(r, e, "thead"), t(o = H, j).call(o, e, "tbody"), t(l = H, j).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
|
|
373
373
|
const f = h.getAttribute("fixed");
|
|
374
374
|
f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
|
|
375
375
|
u.setAttribute("fixed", f);
|
|
@@ -377,7 +377,7 @@ const H = class H {
|
|
|
377
377
|
}), e;
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
|
-
pt = new WeakMap(),
|
|
380
|
+
pt = new WeakMap(), j = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PURE__ */ c((i) => {
|
|
381
381
|
if (!i.querySelector("colgroup")) {
|
|
382
382
|
const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
|
|
383
383
|
for (let o = 0; o < s; o++) {
|
|
@@ -391,7 +391,7 @@ pt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PUR
|
|
|
391
391
|
s ? s.after(e) : i.prepend(e);
|
|
392
392
|
}
|
|
393
393
|
i.classList.add("nine-table-element"), i.style.display = "table";
|
|
394
|
-
}, "#ensureTableStructure")), a(H,
|
|
394
|
+
}, "#ensureTableStructure")), a(H, j, /* @__PURE__ */ c((i, e) => {
|
|
395
395
|
const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
|
|
396
396
|
if (r === 0 || n.length === 0) return;
|
|
397
397
|
let o = 0;
|
|
@@ -408,8 +408,8 @@ pt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PUR
|
|
|
408
408
|
f = E;
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
|
-
const
|
|
412
|
-
for (let E = 0; E <
|
|
411
|
+
const b = u.rowSpan || 1, p = u.colSpan || 1;
|
|
412
|
+
for (let E = 0; E < b; E++)
|
|
413
413
|
for (let L = 0; L < p; L++)
|
|
414
414
|
d + E < r && f + L < o && (l[d + E][f + L] = E === 0 && L === 0 ? "1" : "0");
|
|
415
415
|
});
|
|
@@ -425,15 +425,15 @@ pt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), a(H, pt, /* @__PUR
|
|
|
425
425
|
});
|
|
426
426
|
}, "#resetColIndex"));
|
|
427
427
|
let Nt = H;
|
|
428
|
-
var
|
|
428
|
+
var Y, w, _, R, $, V, Z, mt, xt, ot, rt, vt, wt, lt, G, St;
|
|
429
429
|
const Gt = class Gt {
|
|
430
430
|
constructor(i) {
|
|
431
|
-
a(this,
|
|
431
|
+
a(this, Y);
|
|
432
432
|
a(this, w);
|
|
433
433
|
a(this, _, /* @__PURE__ */ new Map());
|
|
434
434
|
a(this, R, null);
|
|
435
435
|
a(this, $, null);
|
|
436
|
-
a(this,
|
|
436
|
+
a(this, V, 0);
|
|
437
437
|
a(this, Z, 40);
|
|
438
438
|
x(this, "refresh", /* @__PURE__ */ c(() => {
|
|
439
439
|
var e;
|
|
@@ -441,7 +441,7 @@ const Gt = class Gt {
|
|
|
441
441
|
i && (t(this, ot).call(this), t(this, G).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
442
442
|
}, "refresh"));
|
|
443
443
|
x(this, "initialize", /* @__PURE__ */ c(() => {
|
|
444
|
-
|
|
444
|
+
g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
445
445
|
const r = t(this, w).querySelector(n);
|
|
446
446
|
if (!r) return;
|
|
447
447
|
const o = r.querySelector("table");
|
|
@@ -485,33 +485,33 @@ const Gt = class Gt {
|
|
|
485
485
|
if (!e || e.length === 0) return 24;
|
|
486
486
|
const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
|
|
487
487
|
if (!s) return 24;
|
|
488
|
-
s.querySelectorAll("tr:not(.nodata)").forEach((
|
|
488
|
+
s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
|
|
489
489
|
const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
|
|
490
|
-
e.forEach((
|
|
491
|
-
r.appendChild(
|
|
490
|
+
e.forEach((b) => {
|
|
491
|
+
r.appendChild(b.cloneNode(!0));
|
|
492
492
|
}), n ? n.before(r) : s.appendChild(r);
|
|
493
493
|
const o = t(this, w), l = o.style.display, h = o.style.visibility, d = o.style.position;
|
|
494
494
|
(l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
495
495
|
let f = 0;
|
|
496
496
|
const u = s.querySelectorAll("tr:not(.nodata)");
|
|
497
|
-
return u.forEach((
|
|
498
|
-
f +=
|
|
499
|
-
}), u.forEach((
|
|
497
|
+
return u.forEach((b) => {
|
|
498
|
+
f += b.offsetHeight || b.getBoundingClientRect().height;
|
|
499
|
+
}), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = h, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, rt).call(this), t(this, R);
|
|
500
500
|
}, "#measureAndCacheHeight"));
|
|
501
501
|
a(this, ot, /* @__PURE__ */ c(() => {
|
|
502
502
|
if (!t(this, w).querySelector(".ng-container-body")) return;
|
|
503
|
-
const e = t(this,
|
|
503
|
+
const e = t(this, Y).data.get() || [], s = e.length > 0 ? e.length : 100, n = t(this, R), r = s * n;
|
|
504
504
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
|
|
505
505
|
const l = t(this, w).querySelector(o), h = l == null ? void 0 : l.querySelector("table");
|
|
506
506
|
h && (h.style.height = `${r}px`);
|
|
507
507
|
});
|
|
508
508
|
}, "#updateVirtualScrollHeight"));
|
|
509
509
|
a(this, rt, /* @__PURE__ */ c(() => {
|
|
510
|
-
if (t(this,
|
|
511
|
-
const i = Math.ceil(t(this,
|
|
512
|
-
|
|
510
|
+
if (t(this, V) > 0 && t(this, R) > 0) {
|
|
511
|
+
const i = Math.ceil(t(this, V) / t(this, R));
|
|
512
|
+
g(this, Z, i + 20);
|
|
513
513
|
} else
|
|
514
|
-
|
|
514
|
+
g(this, Z, 40);
|
|
515
515
|
}, "#updateRowCount"));
|
|
516
516
|
a(this, vt, /* @__PURE__ */ c(() => {
|
|
517
517
|
var h, d, f;
|
|
@@ -519,16 +519,16 @@ const Gt = class Gt {
|
|
|
519
519
|
if (!e) return;
|
|
520
520
|
const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
|
|
521
521
|
for (let u = 0; u < l; u++) {
|
|
522
|
-
const
|
|
522
|
+
const b = [
|
|
523
523
|
((h = n[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
524
524
|
((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
|
|
525
525
|
((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
526
|
-
], p = Math.max(...
|
|
526
|
+
], p = Math.max(...b);
|
|
527
527
|
p > 0 && (n[u] && (n[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), o[u] && (o[u].style.height = `${p}px`));
|
|
528
528
|
}
|
|
529
529
|
}, "#syncRowHeights"));
|
|
530
530
|
a(this, wt, /* @__PURE__ */ c(() => {
|
|
531
|
-
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (
|
|
531
|
+
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
|
|
532
532
|
for (const e of i) {
|
|
533
533
|
const s = e.target;
|
|
534
534
|
if (!s.classList.contains("active")) continue;
|
|
@@ -538,7 +538,7 @@ const Gt = class Gt {
|
|
|
538
538
|
const o = s.querySelector("thead");
|
|
539
539
|
o && (r += o.offsetHeight || o.getBoundingClientRect().height);
|
|
540
540
|
const l = Math.max(n - r, 100);
|
|
541
|
-
t(this,
|
|
541
|
+
t(this, V) !== l && (g(this, V, l), t(this, rt).call(this), t(this, R) !== null && t(this, lt).call(this));
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
})), t(this, $).observe(t(this, w)));
|
|
@@ -560,21 +560,21 @@ const Gt = class Gt {
|
|
|
560
560
|
const h = l.querySelector("tbody.bindable-tbody");
|
|
561
561
|
if (!h) return;
|
|
562
562
|
Array.from(h.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
|
|
563
|
-
const
|
|
564
|
-
f.style.display = "", t(this, St).call(this, f, p,
|
|
563
|
+
const b = s + Math.floor(u / n), p = t(this, Y).data.get(b);
|
|
564
|
+
z.log(t(this, Y).data.get(0)), f.style.display = "", t(this, St).call(this, f, p, b);
|
|
565
565
|
});
|
|
566
566
|
});
|
|
567
567
|
}, "#handleScroll"));
|
|
568
568
|
a(this, St, /* @__PURE__ */ c((i, e, s) => {
|
|
569
|
-
i.dataset.row = s,
|
|
569
|
+
i.dataset.row = s, z.log(i, e, s), Array.from(i.cells).forEach((n, r) => {
|
|
570
570
|
const o = n.dataset.bind;
|
|
571
571
|
o && e && e[o] !== void 0 ? n.textContent = e[o] : n.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν ${s + 1}`, n.dataset.row = s;
|
|
572
572
|
});
|
|
573
573
|
}, "#bindRowData"));
|
|
574
574
|
x(this, "destroy", /* @__PURE__ */ c(() => {
|
|
575
|
-
t(this, $) && (t(this, $).disconnect(),
|
|
575
|
+
t(this, $) && (t(this, $).disconnect(), g(this, $, null));
|
|
576
576
|
}, "destroy"));
|
|
577
|
-
|
|
577
|
+
g(this, Y, i.getRootNode().host), g(this, w, i), t(this, wt).call(this);
|
|
578
578
|
}
|
|
579
579
|
getRowHeight() {
|
|
580
580
|
return t(this, R);
|
|
@@ -584,21 +584,21 @@ const Gt = class Gt {
|
|
|
584
584
|
return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
|
-
|
|
587
|
+
Y = new WeakMap(), w = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), Z = new WeakMap(), mt = new WeakMap(), xt = new WeakMap(), ot = new WeakMap(), rt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), lt = new WeakMap(), G = new WeakMap(), St = new WeakMap(), c(Gt, "RowManager");
|
|
588
588
|
let Bt = Gt;
|
|
589
|
-
var Et, J,
|
|
589
|
+
var Et, J, X, Rt, kt, qt, At, Tt;
|
|
590
590
|
const it = class it extends HTMLElement {
|
|
591
591
|
constructor() {
|
|
592
592
|
super();
|
|
593
593
|
a(this, Et);
|
|
594
594
|
a(this, J, null);
|
|
595
|
-
a(this,
|
|
595
|
+
a(this, X);
|
|
596
596
|
/**
|
|
597
597
|
* data.set, add, delete
|
|
598
598
|
* filter, sorting : κ³ λ €λμ
|
|
599
599
|
*/
|
|
600
600
|
x(this, "invalidate", /* @__PURE__ */ c(() => {
|
|
601
|
-
t(this,
|
|
601
|
+
t(this, X).refresh();
|
|
602
602
|
}, "invalidate"));
|
|
603
603
|
a(this, Rt, /* @__PURE__ */ c(() => {
|
|
604
604
|
[
|
|
@@ -624,13 +624,13 @@ const it = class it extends HTMLElement {
|
|
|
624
624
|
});
|
|
625
625
|
}, "#updateContainerWidths"));
|
|
626
626
|
x(this, "generate", /* @__PURE__ */ c((e) => {
|
|
627
|
-
e && (
|
|
627
|
+
e && (g(this, J, Nt.compile(e)), t(this, J).style.display = "table", t(this, Rt).call(this), t(this, kt).call(this), requestAnimationFrame(() => {
|
|
628
628
|
var n;
|
|
629
629
|
const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
|
|
630
630
|
this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
|
|
631
631
|
r.style.top = `${s}px`;
|
|
632
632
|
});
|
|
633
|
-
}), t(this,
|
|
633
|
+
}), t(this, X).initialize(), setTimeout(() => {
|
|
634
634
|
var s;
|
|
635
635
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
636
636
|
}, 0));
|
|
@@ -652,7 +652,7 @@ const it = class it extends HTMLElement {
|
|
|
652
652
|
o.remove();
|
|
653
653
|
}), n;
|
|
654
654
|
}, "#createSplitTable"));
|
|
655
|
-
x(this, "getRowHeight", /* @__PURE__ */ c(() => t(this,
|
|
655
|
+
x(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, X).getRowHeight(), "getRowHeight"));
|
|
656
656
|
x(this, "scrollToX", /* @__PURE__ */ c((e) => {
|
|
657
657
|
const s = this.querySelector(".ng-container-body");
|
|
658
658
|
s && (s.scrollLeft = e);
|
|
@@ -811,16 +811,16 @@ const it = class it extends HTMLElement {
|
|
|
811
811
|
</div>
|
|
812
812
|
`;
|
|
813
813
|
}, "#render"));
|
|
814
|
-
|
|
814
|
+
g(this, X, new Bt(this)), g(this, Et, this.getRootNode().host);
|
|
815
815
|
}
|
|
816
816
|
connectedCallback() {
|
|
817
817
|
t(this, At).call(this);
|
|
818
818
|
}
|
|
819
819
|
disconnectedCallback() {
|
|
820
|
-
this.innerHTML = "",
|
|
820
|
+
this.innerHTML = "", z.log("NineTableSheet destroyed.");
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
|
-
Et = new WeakMap(), J = new WeakMap(),
|
|
823
|
+
Et = new WeakMap(), J = new WeakMap(), X = new WeakMap(), Rt = new WeakMap(), kt = new WeakMap(), qt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), c(it, "NineTableSheet"), x(it, "SCROLLBAR_SIZE", 16);
|
|
824
824
|
let ut = it;
|
|
825
825
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ut);
|
|
826
826
|
var Lt, ct;
|
|
@@ -839,8 +839,8 @@ const Jt = class Jt extends HTMLElement {
|
|
|
839
839
|
const n = /* @__PURE__ */ c(() => {
|
|
840
840
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
841
841
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
|
|
842
|
-
const
|
|
843
|
-
|
|
842
|
+
const b = f.filter((p) => p.classList.contains("active"));
|
|
843
|
+
b.length < 2 || b.forEach((p) => {
|
|
844
844
|
const E = parseInt(p.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${E}"]`), ft = f[E + 1];
|
|
845
845
|
L && ft && ft.classList.contains("active") && L.style.setProperty("display", "flex");
|
|
846
846
|
});
|
|
@@ -850,16 +850,16 @@ const Jt = class Jt extends HTMLElement {
|
|
|
850
850
|
l.forEach((f, u) => {
|
|
851
851
|
f.classList.toggle("active", u === e);
|
|
852
852
|
}), h.forEach((f, u) => {
|
|
853
|
-
const
|
|
854
|
-
f.classList.toggle("active",
|
|
853
|
+
const b = u === e;
|
|
854
|
+
f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
|
|
855
855
|
});
|
|
856
856
|
else {
|
|
857
857
|
const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
|
|
858
858
|
if (f.classList.contains("active") && u.length <= 1)
|
|
859
859
|
return;
|
|
860
860
|
f.classList.toggle("active");
|
|
861
|
-
const
|
|
862
|
-
|
|
861
|
+
const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
|
|
862
|
+
b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
|
|
863
863
|
}
|
|
864
864
|
const d = o.querySelectorAll("nine-table-sheet.active");
|
|
865
865
|
d == null || d.forEach((f) => {
|
|
@@ -893,8 +893,8 @@ const Qt = class Qt {
|
|
|
893
893
|
}, "#applyAutoHeight"));
|
|
894
894
|
a(this, Ct, /* @__PURE__ */ c(() => {
|
|
895
895
|
const e = Array.from(t(this, k).children).filter((h) => h.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((h, d) => {
|
|
896
|
-
const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`,
|
|
897
|
-
return u +
|
|
896
|
+
const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
|
|
897
|
+
return u + b;
|
|
898
898
|
}).join(""), o = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
|
|
899
899
|
t(this, k).shadowRoot.innerHTML = `
|
|
900
900
|
<style>
|
|
@@ -1002,7 +1002,7 @@ const Qt = class Qt {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
});
|
|
1004
1004
|
}, "#render"));
|
|
1005
|
-
|
|
1005
|
+
g(this, k, i), t(this, Ht).call(this);
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
1008
|
k = new WeakMap(), Ht = new WeakMap(), at = new WeakMap(), Ct = new WeakMap(), c(Qt, "LayoutManager");
|
|
@@ -1013,19 +1013,19 @@ const te = class te {
|
|
|
1013
1013
|
a(this, ht);
|
|
1014
1014
|
a(this, Q, -1);
|
|
1015
1015
|
x(this, "count", /* @__PURE__ */ c(() => t(this, ht).rawRecords.length, "count"));
|
|
1016
|
-
|
|
1016
|
+
g(this, ht, i);
|
|
1017
1017
|
}
|
|
1018
1018
|
get at() {
|
|
1019
1019
|
return t(this, Q);
|
|
1020
1020
|
}
|
|
1021
1021
|
set at(i) {
|
|
1022
|
-
|
|
1022
|
+
g(this, Q, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, Q)}"]`) && setTimeout(() => {
|
|
1023
1023
|
});
|
|
1024
1024
|
}
|
|
1025
1025
|
};
|
|
1026
1026
|
ht = new WeakMap(), Q = new WeakMap(), c(te, "ngRow");
|
|
1027
1027
|
let Vt = te;
|
|
1028
|
-
var q, S, A, tt, _t, W, Mt,
|
|
1028
|
+
var q, S, A, tt, _t, W, Mt, U, dt, It, $t, et;
|
|
1029
1029
|
const T = class T {
|
|
1030
1030
|
constructor(i, e) {
|
|
1031
1031
|
a(this, q);
|
|
@@ -1035,7 +1035,7 @@ const T = class T {
|
|
|
1035
1035
|
a(this, _t, 0);
|
|
1036
1036
|
a(this, W, []);
|
|
1037
1037
|
a(this, Mt, /* @__PURE__ */ c(() => {
|
|
1038
|
-
|
|
1038
|
+
g(this, W, []);
|
|
1039
1039
|
const i = t(this, q).template || [];
|
|
1040
1040
|
Array.from(i).forEach((e) => {
|
|
1041
1041
|
var s;
|
|
@@ -1044,13 +1044,26 @@ const T = class T {
|
|
|
1044
1044
|
e.__ng || (e.__ng = t(this, dt).call(this)), e.__ng.height = t(this, W).slice();
|
|
1045
1045
|
});
|
|
1046
1046
|
}, "#initialize"));
|
|
1047
|
-
a(this,
|
|
1047
|
+
a(this, U, /* @__PURE__ */ c(() => {
|
|
1048
1048
|
t(this, q).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
|
|
1049
1049
|
i.invalidate();
|
|
1050
1050
|
});
|
|
1051
1051
|
}, "#invalidate"));
|
|
1052
|
+
x(this, "get", /* @__PURE__ */ c((i, e) => {
|
|
1053
|
+
var r;
|
|
1054
|
+
const s = this.getValidData();
|
|
1055
|
+
if (!s || s.length <= 0) return;
|
|
1056
|
+
if (i == null) return t(this, et).call(this, s);
|
|
1057
|
+
if (i < 0 || i >= s.length) return null;
|
|
1058
|
+
const n = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
|
|
1059
|
+
if (e != null) {
|
|
1060
|
+
const o = n.indexOf(e);
|
|
1061
|
+
return o >= 0 ? s[i].v[o] : null;
|
|
1062
|
+
}
|
|
1063
|
+
return t(this, et).call(this, s[i]);
|
|
1064
|
+
}, "get"));
|
|
1052
1065
|
x(this, "set", /* @__PURE__ */ c((i) => {
|
|
1053
|
-
this.clear(), this.add(i, !1), t(this,
|
|
1066
|
+
this.clear(), this.add(i, !1), t(this, U).call(this);
|
|
1054
1067
|
}, "set"));
|
|
1055
1068
|
a(this, dt, /* @__PURE__ */ c(() => ({
|
|
1056
1069
|
rowState: T.ROW_STATE.EMPTY,
|
|
@@ -1062,11 +1075,11 @@ const T = class T {
|
|
|
1062
1075
|
_: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, W).slice(), -1, {}, {}]
|
|
1063
1076
|
}), "#getDefaultMeta"));
|
|
1064
1077
|
x(this, "reset", /* @__PURE__ */ c(() => {
|
|
1065
|
-
|
|
1078
|
+
g(this, A, []), g(this, tt, []), t(this, U).call(this);
|
|
1066
1079
|
}, "reset"));
|
|
1067
1080
|
x(this, "clear", /* @__PURE__ */ c(() => {
|
|
1068
1081
|
var i;
|
|
1069
|
-
t(this, S).rawRecords = [],
|
|
1082
|
+
t(this, S).rawRecords = [], g(this, A, []), g(this, tt, []), (i = t(this, S).viewRecords) != null && i.reset && t(this, S).viewRecords.reset();
|
|
1070
1083
|
}, "clear"));
|
|
1071
1084
|
a(this, It, /* @__PURE__ */ c((i) => {
|
|
1072
1085
|
var n;
|
|
@@ -1090,7 +1103,7 @@ const T = class T {
|
|
|
1090
1103
|
return e || s.forEach((r, o) => {
|
|
1091
1104
|
const l = t(this, S).rawRecords[n - o];
|
|
1092
1105
|
l && (l.__ng.rowState = T.ROW_STATE.EMPTY);
|
|
1093
|
-
}), t(this,
|
|
1106
|
+
}), t(this, U).call(this), n;
|
|
1094
1107
|
}, "add"));
|
|
1095
1108
|
x(this, "delete", /* @__PURE__ */ c((i) => {
|
|
1096
1109
|
let e = [];
|
|
@@ -1101,7 +1114,7 @@ const T = class T {
|
|
|
1101
1114
|
r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = T.ROW_STATE.DELETE);
|
|
1102
1115
|
});
|
|
1103
1116
|
}
|
|
1104
|
-
}), this.resetRecords(), t(this,
|
|
1117
|
+
}), this.resetRecords(), t(this, U).call(this);
|
|
1105
1118
|
}, "delete"));
|
|
1106
1119
|
x(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
|
|
1107
1120
|
var h;
|
|
@@ -1114,7 +1127,7 @@ const T = class T {
|
|
|
1114
1127
|
l !== s && o.__ng.rowState !== T.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = T.ROW_STATE.UPDATE), o.v[r] = s;
|
|
1115
1128
|
}, "setValue"));
|
|
1116
1129
|
x(this, "resetRecords", /* @__PURE__ */ c(() => {
|
|
1117
|
-
|
|
1130
|
+
g(this, tt, t(this, S).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, t(this, S).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, S).rawRecords.forEach((i, e) => {
|
|
1118
1131
|
i.__ng.rowidx = e;
|
|
1119
1132
|
}), t(this, A).forEach((i, e) => {
|
|
1120
1133
|
i.__ng.i = e;
|
|
@@ -1133,20 +1146,7 @@ const T = class T {
|
|
|
1133
1146
|
}) : i;
|
|
1134
1147
|
}, "#conv2"));
|
|
1135
1148
|
x(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
|
|
1136
|
-
|
|
1137
|
-
var r;
|
|
1138
|
-
const s = this.getValidData();
|
|
1139
|
-
if (!s || s.length <= 0) return;
|
|
1140
|
-
if (i == null) return t(this, et).call(this, s);
|
|
1141
|
-
if (i < 0 || i >= s.length) return null;
|
|
1142
|
-
const n = typeof ((r = t(this, q).fields) == null ? void 0 : r.get) == "function" ? t(this, q).fields.get() : [];
|
|
1143
|
-
if (e != null) {
|
|
1144
|
-
const o = n.indexOf(e);
|
|
1145
|
-
return o >= 0 ? s[i].v[o] : null;
|
|
1146
|
-
}
|
|
1147
|
-
return t(this, et).call(this, s[i]);
|
|
1148
|
-
}, "get"));
|
|
1149
|
-
b(this, q, i), b(this, S, e), t(this, Mt).call(this);
|
|
1149
|
+
g(this, q, i), g(this, S, e), t(this, Mt).call(this);
|
|
1150
1150
|
}
|
|
1151
1151
|
get source() {
|
|
1152
1152
|
return t(this, et).call(this, t(this, S).rawRecords);
|
|
@@ -1164,7 +1164,7 @@ const T = class T {
|
|
|
1164
1164
|
return this.length;
|
|
1165
1165
|
}
|
|
1166
1166
|
};
|
|
1167
|
-
q = new WeakMap(), S = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), _t = new WeakMap(), W = new WeakMap(), Mt = new WeakMap(),
|
|
1167
|
+
q = new WeakMap(), S = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), _t = new WeakMap(), W = new WeakMap(), Mt = new WeakMap(), U = new WeakMap(), dt = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), et = new WeakMap(), c(T, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1168
1168
|
x(T, "ROW_STATE", {
|
|
1169
1169
|
EMPTY: "EMPTY",
|
|
1170
1170
|
NORMAL: "NORMAL",
|
|
@@ -1173,13 +1173,13 @@ x(T, "ROW_STATE", {
|
|
|
1173
1173
|
DELETE: "DELETE"
|
|
1174
1174
|
});
|
|
1175
1175
|
let Xt = T;
|
|
1176
|
-
var
|
|
1176
|
+
var F;
|
|
1177
1177
|
const ee = class ee {
|
|
1178
1178
|
constructor(i) {
|
|
1179
|
-
a(this,
|
|
1180
|
-
|
|
1179
|
+
a(this, F);
|
|
1180
|
+
g(this, F, i), this.row = new Vt(this), this.data = new Xt(t(this, F), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1181
1181
|
var e;
|
|
1182
|
-
(e = t(this,
|
|
1182
|
+
(e = t(this, F).view) != null && e.redraw && t(this, F).view.redraw();
|
|
1183
1183
|
}, this.setDataSource = (e) => {
|
|
1184
1184
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1185
1185
|
}, this.getRowState = (e) => {
|
|
@@ -1194,37 +1194,37 @@ const ee = class ee {
|
|
|
1194
1194
|
}, this.setDataSource([]);
|
|
1195
1195
|
}
|
|
1196
1196
|
};
|
|
1197
|
-
|
|
1197
|
+
F = new WeakMap(), c(ee, "ngDataManager");
|
|
1198
1198
|
let Ut = ee;
|
|
1199
|
-
var
|
|
1199
|
+
var K, Wt;
|
|
1200
1200
|
const ie = class ie extends HTMLElement {
|
|
1201
1201
|
constructor() {
|
|
1202
1202
|
super();
|
|
1203
1203
|
//#created = false;
|
|
1204
|
-
a(this,
|
|
1204
|
+
a(this, K);
|
|
1205
1205
|
a(this, Wt);
|
|
1206
|
-
this.attachShadow({ mode: "open" }),
|
|
1206
|
+
this.attachShadow({ mode: "open" }), g(this, K, new Ut(this));
|
|
1207
1207
|
}
|
|
1208
1208
|
connectedCallback() {
|
|
1209
|
-
|
|
1209
|
+
g(this, Wt, new Yt(this)), z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1210
1210
|
}
|
|
1211
1211
|
disconnectedCallback() {
|
|
1212
|
-
|
|
1212
|
+
z.log("NineTable disconnected.");
|
|
1213
1213
|
}
|
|
1214
1214
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1215
1215
|
get data() {
|
|
1216
|
-
return t(this,
|
|
1216
|
+
return t(this, K).data;
|
|
1217
1217
|
}
|
|
1218
1218
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1219
1219
|
get row() {
|
|
1220
|
-
return t(this,
|
|
1220
|
+
return t(this, K).row;
|
|
1221
1221
|
}
|
|
1222
1222
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1223
1223
|
get dataManager() {
|
|
1224
|
-
return t(this,
|
|
1224
|
+
return t(this, K);
|
|
1225
1225
|
}
|
|
1226
1226
|
};
|
|
1227
|
-
|
|
1227
|
+
K = new WeakMap(), Wt = new WeakMap(), c(ie, "NineTable");
|
|
1228
1228
|
let Ft = ie;
|
|
1229
1229
|
customElements.get("nine-table") || customElements.define("nine-table", Ft);
|
|
1230
1230
|
//# sourceMappingURL=nine-table.js.map
|