@ninebone/table 0.0.294 β 0.0.296
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 +286 -278
- 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
|
@@ -15,76 +15,76 @@ var ie = (m, i, e, s) => ({
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as ne } from "@ninebone/util";
|
|
18
|
-
const
|
|
18
|
+
const Vt = class Vt extends ne.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
c(
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
var H,
|
|
27
|
-
const
|
|
23
|
+
c(Vt, "Trace");
|
|
24
|
+
let Mt = Vt;
|
|
25
|
+
const _ = new Mt();
|
|
26
|
+
var H, I, p, D, P, B, at, N, ht;
|
|
27
|
+
const Yt = class Yt extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
h(this, H);
|
|
31
|
-
h(this,
|
|
31
|
+
h(this, I, !1);
|
|
32
32
|
h(this, p);
|
|
33
|
-
h(this, z);
|
|
34
33
|
h(this, D);
|
|
35
34
|
h(this, P);
|
|
36
|
-
h(this,
|
|
35
|
+
h(this, B);
|
|
36
|
+
h(this, at, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!t(this, H)) return;
|
|
38
38
|
const e = t(this, H).querySelector(".ng-container-body");
|
|
39
|
-
e && (b(this,
|
|
39
|
+
e && (b(this, B, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, B).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
S(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
-
if (!t(this, H) || !t(this, p) || t(this,
|
|
44
|
+
if (!t(this, H) || !t(this, p) || t(this, I)) return;
|
|
45
45
|
const e = t(this, p).container, s = e.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const n = t(this, p).track,
|
|
47
|
+
const n = t(this, p).track, o = t(this, p).thumb, r = t(this, H).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
|
|
48
48
|
if (l !== 0 && a > l)
|
|
49
|
-
|
|
49
|
+
r && (r.style.display = "flex");
|
|
50
50
|
else {
|
|
51
|
-
|
|
51
|
+
r && (r.style.display = "none");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
const d = n.clientWidth;
|
|
55
55
|
if (d <= 0) return;
|
|
56
56
|
const u = Math.max(Math.min(d * (l / a), d), 20);
|
|
57
|
-
|
|
57
|
+
o.style.width = `${u}px`;
|
|
58
58
|
const f = e.scrollLeft, g = a - l;
|
|
59
59
|
let y = 0;
|
|
60
60
|
g > 0 && (y = parseInt(f / g * (d - u), 10)), y < 0 && (y = 0);
|
|
61
61
|
const w = d - u;
|
|
62
|
-
y > w && (y = w),
|
|
62
|
+
y > w && (y = w), o.style.left = `${y}px`, _.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= w - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
h(this,
|
|
64
|
+
h(this, N, /* @__PURE__ */ c((e) => {
|
|
65
65
|
if (!t(this, p)) return !1;
|
|
66
66
|
const s = t(this, p).container, n = s.querySelector("table");
|
|
67
67
|
if (!n) return !1;
|
|
68
|
-
const
|
|
68
|
+
const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
|
|
69
69
|
let l = e;
|
|
70
70
|
l < 0 && (l = 0);
|
|
71
|
-
const a =
|
|
71
|
+
const a = o.width - r;
|
|
72
72
|
l > a && (l = a), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= a - 1;
|
|
73
73
|
const d = s.clientWidth, f = n.scrollWidth - d;
|
|
74
74
|
return a > 0 && f > 0 && (s.scrollLeft = l / a * f), l > 0 && l < a - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
h(this,
|
|
76
|
+
h(this, ht, /* @__PURE__ */ c(() => {
|
|
77
77
|
const e = /* @__PURE__ */ c((n) => {
|
|
78
|
-
clearInterval(t(this,
|
|
79
|
-
const
|
|
80
|
-
t(this,
|
|
81
|
-
clearInterval(t(this,
|
|
82
|
-
const
|
|
83
|
-
t(this,
|
|
78
|
+
clearInterval(t(this, D)), clearInterval(t(this, P));
|
|
79
|
+
const o = parseInt(t(this, p).thumb.style.left || 0, 10);
|
|
80
|
+
t(this, N).call(this, o + n), b(this, D, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, D)), b(this, P, setInterval(() => {
|
|
82
|
+
const r = parseInt(t(this, p).thumb.style.left || 0, 10);
|
|
83
|
+
t(this, N).call(this, r + n) || clearInterval(t(this, P));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
86
|
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
87
|
-
clearInterval(t(this,
|
|
87
|
+
clearInterval(t(this, D)), clearInterval(t(this, P));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
90
90
|
t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
|
|
@@ -95,19 +95,19 @@ const Vt = class Vt extends HTMLElement {
|
|
|
95
95
|
}), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (n) => {
|
|
96
96
|
if (n.button !== 0) return;
|
|
97
97
|
n.preventDefault();
|
|
98
|
-
const
|
|
99
|
-
t(this,
|
|
98
|
+
const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
|
|
99
|
+
t(this, N).call(this, n.clientX - o.left - r / 2);
|
|
100
100
|
}), t(this, p).thumb.addEventListener("mousedown", (n) => {
|
|
101
101
|
if (n.button !== 0) return;
|
|
102
|
-
n.stopPropagation(), n.preventDefault(), b(this,
|
|
103
|
-
const
|
|
104
|
-
if (!t(this,
|
|
102
|
+
n.stopPropagation(), n.preventDefault(), b(this, I, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
|
|
103
|
+
const o = /* @__PURE__ */ c((l) => {
|
|
104
|
+
if (!t(this, I)) return;
|
|
105
105
|
const a = t(this, p).track.getBoundingClientRect();
|
|
106
|
-
t(this,
|
|
107
|
-
}, "onMouseMove"),
|
|
108
|
-
b(this,
|
|
106
|
+
t(this, N).call(this, l.clientX - a.left - this.shiftX);
|
|
107
|
+
}, "onMouseMove"), r = /* @__PURE__ */ c(() => {
|
|
108
|
+
b(this, I, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
|
|
109
109
|
}, "onMouseUp");
|
|
110
|
-
document.addEventListener("mousemove",
|
|
110
|
+
document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
|
|
111
111
|
});
|
|
112
112
|
}, "#init"));
|
|
113
113
|
}
|
|
@@ -189,24 +189,24 @@ const Vt = class Vt extends HTMLElement {
|
|
|
189
189
|
left: this.querySelector(".ng-scroll-left"),
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
191
|
}), s.addEventListener("scroll", () => {
|
|
192
|
-
t(this,
|
|
193
|
-
}), t(this,
|
|
192
|
+
t(this, I) || this.refresh();
|
|
193
|
+
}), t(this, ht).call(this), t(this, at).call(this), this.refresh();
|
|
194
194
|
}, "initWhenReady");
|
|
195
195
|
e();
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
|
-
t(this,
|
|
198
|
+
t(this, B) && t(this, B).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
H = new WeakMap(),
|
|
202
|
-
let
|
|
203
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
204
|
-
var
|
|
201
|
+
H = new WeakMap(), I = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), at = new WeakMap(), N = new WeakMap(), ht = new WeakMap(), c(Yt, "NineTableHScrollBar");
|
|
202
|
+
let _t = Yt;
|
|
203
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", _t);
|
|
204
|
+
var V, $, E, Q, tt, dt;
|
|
205
205
|
const Xt = class Xt extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
|
-
h(this,
|
|
209
|
-
h(this,
|
|
208
|
+
h(this, V);
|
|
209
|
+
h(this, $, !1);
|
|
210
210
|
h(this, E);
|
|
211
211
|
h(this, Q, 0);
|
|
212
212
|
h(this, tt, 0);
|
|
@@ -214,49 +214,49 @@ const Xt = class Xt extends HTMLElement {
|
|
|
214
214
|
* π― μ€ν¬λ‘€λ° μμΉ λ° μΈλΈ ν¬κΈ° κ°±μ
|
|
215
215
|
*/
|
|
216
216
|
S(this, "refresh", /* @__PURE__ */ c(() => {
|
|
217
|
-
if (!t(this,
|
|
217
|
+
if (!t(this, V) || !t(this, E) || t(this, $)) return;
|
|
218
218
|
const e = t(this, E).container, s = e.querySelector("table");
|
|
219
219
|
if (!s) return;
|
|
220
|
-
const n = t(this, E).track,
|
|
221
|
-
if (l <=
|
|
222
|
-
|
|
220
|
+
const n = t(this, E).track, o = t(this, E).thumb, r = e.clientHeight, l = s.scrollHeight;
|
|
221
|
+
if (l <= r) {
|
|
222
|
+
o.style.display = "none", t(this, E).top.disabled = !0, t(this, E).bottom.disabled = !0;
|
|
223
223
|
return;
|
|
224
224
|
} else
|
|
225
|
-
|
|
225
|
+
o.style.display = "block";
|
|
226
226
|
const a = n.clientHeight;
|
|
227
227
|
if (a <= 0) return;
|
|
228
|
-
const d = Math.max(Math.min(a * (
|
|
229
|
-
|
|
230
|
-
const u = e.scrollTop, f = l -
|
|
228
|
+
const d = Math.max(Math.min(a * (r / l), a), 20);
|
|
229
|
+
o.style.height = `${d}px`;
|
|
230
|
+
const u = e.scrollTop, f = l - r;
|
|
231
231
|
let g = 0;
|
|
232
232
|
f > 0 && (g = u / f * (a - d));
|
|
233
233
|
const y = a - d;
|
|
234
|
-
g < 0 && (g = 0), g > y && (g = y),
|
|
234
|
+
g < 0 && (g = 0), g > y && (g = y), o.style.top = `${g}px`, t(this, E).top.disabled = u <= 0, t(this, E).bottom.disabled = u >= f - 1;
|
|
235
235
|
}, "refresh"));
|
|
236
|
-
h(this,
|
|
236
|
+
h(this, dt, /* @__PURE__ */ c(() => {
|
|
237
237
|
const e = t(this, E).container;
|
|
238
238
|
e.addEventListener("scroll", () => {
|
|
239
|
-
t(this,
|
|
239
|
+
t(this, $) || this.refresh();
|
|
240
240
|
}), t(this, E).thumb.addEventListener("mousedown", (s) => {
|
|
241
241
|
if (s.button !== 0) return;
|
|
242
|
-
s.stopPropagation(), s.preventDefault(), b(this,
|
|
243
|
-
const n = /* @__PURE__ */ c((
|
|
244
|
-
if (!t(this,
|
|
245
|
-
const l = t(this, E).track.getBoundingClientRect(), a = t(this, E).thumb.clientHeight, u = l.height - a, f =
|
|
242
|
+
s.stopPropagation(), s.preventDefault(), b(this, $, !0), b(this, Q, s.clientY), b(this, tt, e.scrollTop);
|
|
243
|
+
const n = /* @__PURE__ */ c((r) => {
|
|
244
|
+
if (!t(this, $)) return;
|
|
245
|
+
const l = t(this, E).track.getBoundingClientRect(), a = t(this, E).thumb.clientHeight, u = l.height - a, f = r.clientY - t(this, Q), g = e.clientHeight, w = table.scrollHeight - g;
|
|
246
246
|
if (u > 0 && w > 0) {
|
|
247
247
|
const L = f / u * w;
|
|
248
248
|
e.scrollTop = t(this, tt) + L;
|
|
249
249
|
}
|
|
250
250
|
this.refresh();
|
|
251
|
-
}, "onMouseMove"),
|
|
252
|
-
b(this,
|
|
251
|
+
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
252
|
+
b(this, $, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
|
|
253
253
|
}, "onMouseUp");
|
|
254
|
-
document.addEventListener("mousemove", n), document.addEventListener("mouseup",
|
|
254
|
+
document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
|
|
255
255
|
}), t(this, E).track.addEventListener("mousedown", (s) => {
|
|
256
256
|
if (s.button !== 0 || s.target === t(this, E).thumb) return;
|
|
257
|
-
const n = t(this, E).track.getBoundingClientRect(),
|
|
257
|
+
const n = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientHeight, r = s.clientY - n.top - o / 2, a = n.height - o, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
|
|
258
258
|
if (a > 0 && f > 0) {
|
|
259
|
-
const g = Math.max(0, Math.min(1,
|
|
259
|
+
const g = Math.max(0, Math.min(1, r / a));
|
|
260
260
|
e.scrollTop = g * f;
|
|
261
261
|
}
|
|
262
262
|
this.refresh();
|
|
@@ -268,7 +268,7 @@ const Xt = class Xt extends HTMLElement {
|
|
|
268
268
|
}, "#init"));
|
|
269
269
|
}
|
|
270
270
|
connectedCallback() {
|
|
271
|
-
if (b(this,
|
|
271
|
+
if (b(this, V, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, V)) return;
|
|
272
272
|
this.innerHTML = `
|
|
273
273
|
<style>
|
|
274
274
|
nine-table-vscrollbar {
|
|
@@ -333,7 +333,7 @@ const Xt = class Xt extends HTMLElement {
|
|
|
333
333
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
334
334
|
`;
|
|
335
335
|
const e = /* @__PURE__ */ c(() => {
|
|
336
|
-
const s = t(this,
|
|
336
|
+
const s = t(this, V).querySelector(".ng-container-body");
|
|
337
337
|
if (!s) {
|
|
338
338
|
setTimeout(e, 10);
|
|
339
339
|
return;
|
|
@@ -344,15 +344,15 @@ const Xt = class Xt extends HTMLElement {
|
|
|
344
344
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
345
345
|
top: this.querySelector(".ng-scroll-top"),
|
|
346
346
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
347
|
-
}), t(this,
|
|
347
|
+
}), t(this, dt).call(this), this.refresh();
|
|
348
348
|
}, "initWhenReady");
|
|
349
349
|
e();
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
V = new WeakMap(), $ = new WeakMap(), E = new WeakMap(), Q = new WeakMap(), tt = new WeakMap(), dt = new WeakMap(), c(Xt, "NineTableVScrollBar");
|
|
353
353
|
let It = Xt;
|
|
354
354
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", It);
|
|
355
|
-
var
|
|
355
|
+
var ft, et;
|
|
356
356
|
const C = class C {
|
|
357
357
|
/**
|
|
358
358
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
@@ -364,10 +364,10 @@ const C = class C {
|
|
|
364
364
|
* π― λ¨μΌ μλ³Έ ν
μ΄λΈμ λ°μ κΈ°λ³Έ ꡬ쑰 보μ λ° 2μ°¨μ 격μ μΈλ±μ€ μ¬μ λΆμ¬ μλ£λ λ§μ€ν° ν
μ΄λΈ λ°ν
|
|
365
365
|
*/
|
|
366
366
|
static compile(i) {
|
|
367
|
-
var n,
|
|
367
|
+
var n, o, r;
|
|
368
368
|
if (!i) return null;
|
|
369
369
|
const e = i.cloneNode(!0);
|
|
370
|
-
return t(n = C,
|
|
370
|
+
return t(n = C, ft).call(n, e), t(o = C, et).call(o, e, "thead"), t(r = C, et).call(r, e, "tbody"), Array.from(e.querySelectorAll("colgroup col")).forEach((l, a) => {
|
|
371
371
|
const d = l.getAttribute("fixed");
|
|
372
372
|
d && e.querySelectorAll(`[data-col="${a}"]`).forEach((u) => {
|
|
373
373
|
u.setAttribute("fixed", d);
|
|
@@ -375,12 +375,12 @@ const C = class C {
|
|
|
375
375
|
}), e;
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
|
-
|
|
378
|
+
ft = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, ft, /* @__PURE__ */ c((i) => {
|
|
379
379
|
if (!i.querySelector("colgroup")) {
|
|
380
|
-
const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"),
|
|
381
|
-
for (let
|
|
380
|
+
const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), o = Math.max(Math.floor(i.clientWidth / s), 100);
|
|
381
|
+
for (let r = 0; r < s; r++) {
|
|
382
382
|
const l = document.createElement("col");
|
|
383
|
-
l.setAttribute("width",
|
|
383
|
+
l.setAttribute("width", o), n.appendChild(l);
|
|
384
384
|
}
|
|
385
385
|
i.prepend(n);
|
|
386
386
|
}
|
|
@@ -390,13 +390,13 @@ dt = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, dt, /* @__PU
|
|
|
390
390
|
}
|
|
391
391
|
i.classList.add("nine-table-element"), i.style.display = "table";
|
|
392
392
|
}, "#ensureTableStructure")), h(C, et, /* @__PURE__ */ c((i, e) => {
|
|
393
|
-
const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")),
|
|
394
|
-
if (
|
|
395
|
-
let
|
|
393
|
+
const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), o = s.length;
|
|
394
|
+
if (o === 0 || n.length === 0) return;
|
|
395
|
+
let r = 0;
|
|
396
396
|
n.forEach((a) => {
|
|
397
|
-
|
|
397
|
+
r += a.colSpan || 1;
|
|
398
398
|
});
|
|
399
|
-
const l = Array.from(Array(
|
|
399
|
+
const l = Array.from(Array(o), () => Array(r).fill(null));
|
|
400
400
|
s.forEach((a) => {
|
|
401
401
|
const d = a.sectionRowIndex;
|
|
402
402
|
let u = 0;
|
|
@@ -409,7 +409,7 @@ dt = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, dt, /* @__PU
|
|
|
409
409
|
const g = f.rowSpan || 1, y = f.colSpan || 1;
|
|
410
410
|
for (let w = 0; w < g; w++)
|
|
411
411
|
for (let L = 0; L < y; L++)
|
|
412
|
-
d + w <
|
|
412
|
+
d + w < o && u + L < r && (l[d + w][u + L] = w === 0 && L === 0 ? "1" : "0");
|
|
413
413
|
});
|
|
414
414
|
}), s.forEach((a) => {
|
|
415
415
|
const d = a.sectionRowIndex;
|
|
@@ -423,77 +423,85 @@ dt = new WeakMap(), et = new WeakMap(), c(C, "TableCompiler"), h(C, dt, /* @__PU
|
|
|
423
423
|
});
|
|
424
424
|
}, "#resetColIndex"));
|
|
425
425
|
let $t = C;
|
|
426
|
-
var
|
|
426
|
+
var x, M, R, W, Y, X, ut, gt, bt, it, pt, yt, st, nt, mt;
|
|
427
427
|
const Ut = class Ut {
|
|
428
428
|
constructor(i) {
|
|
429
|
-
h(this,
|
|
430
|
-
h(this,
|
|
429
|
+
h(this, x);
|
|
430
|
+
h(this, M, /* @__PURE__ */ new Map());
|
|
431
431
|
// κ° μ»¨ν
μ΄λλ³ λ
립λ ν
νλ¦Ώ TR κ΄λ¦¬
|
|
432
432
|
h(this, R, null);
|
|
433
|
-
h(this,
|
|
433
|
+
h(this, W, null);
|
|
434
434
|
h(this, Y, 0);
|
|
435
|
-
h(this,
|
|
435
|
+
h(this, X, 40);
|
|
436
|
+
/**
|
|
437
|
+
* π― μΈλΆμμ λ°μ΄ν°κ° λ‘λλκ±°λ λ³κ²½λ ν κ°μ λμ΄μ λ·°λ₯Ό μ¬κ°±μ νλ νΌλΈλ¦ λ©μλ
|
|
438
|
+
*/
|
|
439
|
+
S(this, "refresh", /* @__PURE__ */ c(() => {
|
|
440
|
+
var e;
|
|
441
|
+
const i = t(this, x).querySelector(".ng-container-body");
|
|
442
|
+
i && (t(this, bt).call(this), t(this, nt).call(this, i.scrollTop), (e = t(this, x).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
443
|
+
}, "refresh"));
|
|
436
444
|
/**
|
|
437
445
|
* π― NineTableSheetμμ λ§μ€ν° ν
μ΄λΈμ μ λ¬λ°μ κ° μμλ³ ν
μ΄λΈ μμ± λ° ν
νλ¦Ώ μΆμΆ μΌμν
|
|
438
446
|
*/
|
|
439
447
|
// [RowManager.js μμ λ΄μ© λ°μ·]
|
|
440
448
|
S(this, "initialize", /* @__PURE__ */ c(() => {
|
|
441
|
-
b(this, R, null), t(this,
|
|
442
|
-
const s = t(this,
|
|
449
|
+
b(this, R, null), t(this, M).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
450
|
+
const s = t(this, x).querySelector(e);
|
|
443
451
|
if (!s) return;
|
|
444
452
|
const n = s.querySelector("table");
|
|
445
453
|
if (!n) return;
|
|
446
|
-
const
|
|
447
|
-
if (!
|
|
448
|
-
const l = Array.from(
|
|
449
|
-
t(this,
|
|
454
|
+
const o = n.querySelector("tbody");
|
|
455
|
+
if (!o) return;
|
|
456
|
+
const l = Array.from(o.querySelectorAll("tr")).map((a) => a.cloneNode(!0));
|
|
457
|
+
t(this, M).set(e, l);
|
|
450
458
|
});
|
|
451
|
-
const i = t(this,
|
|
459
|
+
const i = t(this, x).querySelector(".ng-container-body");
|
|
452
460
|
if (i) {
|
|
453
|
-
t(this,
|
|
461
|
+
t(this, gt).call(this, i), t(this, st).call(this);
|
|
454
462
|
let e = i.scrollTop;
|
|
455
463
|
i.addEventListener("scroll", () => {
|
|
456
464
|
var n;
|
|
457
465
|
const s = i.scrollTop;
|
|
458
|
-
|
|
466
|
+
_.log(e, s), e !== s && (e = s, t(this, nt).call(this, s)), (n = t(this, x).querySelector("nine-table-vscrollbar")) == null || n.refresh();
|
|
459
467
|
});
|
|
460
468
|
}
|
|
461
469
|
}, "initialize"));
|
|
462
|
-
h(this,
|
|
463
|
-
const s = t(this,
|
|
470
|
+
h(this, ut, /* @__PURE__ */ c((i, e) => {
|
|
471
|
+
const s = t(this, M).get(e);
|
|
464
472
|
if (!s || s.length === 0) return;
|
|
465
473
|
const n = i.querySelector("tbody");
|
|
466
474
|
if (!n) return;
|
|
467
475
|
n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
|
|
468
|
-
const
|
|
469
|
-
for (let l = 0; l < t(this,
|
|
476
|
+
const o = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
|
|
477
|
+
for (let l = 0; l < t(this, X); l++)
|
|
470
478
|
s.forEach((a) => {
|
|
471
|
-
|
|
479
|
+
r.appendChild(a.cloneNode(!0));
|
|
472
480
|
});
|
|
473
|
-
|
|
481
|
+
o ? o.before(r) : n.appendChild(r);
|
|
474
482
|
}, "#renderRows"));
|
|
475
483
|
/**
|
|
476
484
|
* π― ν
νλ¦Ώ TRλ€μ μ΄ λμ΄λ₯Ό μΈ‘μ νκ³ μΊμ±
|
|
477
485
|
*/
|
|
478
|
-
h(this,
|
|
486
|
+
h(this, gt, /* @__PURE__ */ c((i) => {
|
|
479
487
|
if (t(this, R) !== null && t(this, R) > 0)
|
|
480
488
|
return t(this, R);
|
|
481
|
-
const e = t(this,
|
|
489
|
+
const e = t(this, M).get(".ng-container-body");
|
|
482
490
|
if (!e || e.length === 0) return 24;
|
|
483
491
|
const s = i.querySelector("tbody");
|
|
484
492
|
if (!s) return 24;
|
|
485
493
|
s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
|
|
486
|
-
const n = s.querySelector("tr.nodata"),
|
|
494
|
+
const n = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
487
495
|
e.forEach((g) => {
|
|
488
|
-
|
|
489
|
-
}), n ? n.before(
|
|
490
|
-
const
|
|
491
|
-
(l === "none" || window.getComputedStyle(
|
|
496
|
+
o.appendChild(g.cloneNode(!0));
|
|
497
|
+
}), n ? n.before(o) : s.appendChild(o);
|
|
498
|
+
const r = t(this, x), l = r.style.display, a = r.style.visibility, d = r.style.position;
|
|
499
|
+
(l === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
|
|
492
500
|
let u = 0;
|
|
493
501
|
const f = s.querySelectorAll("tr:not(.nodata)");
|
|
494
502
|
return f.forEach((g) => {
|
|
495
503
|
u += g.offsetHeight || g.getBoundingClientRect().height;
|
|
496
|
-
}), f.forEach((g) => g.remove()),
|
|
504
|
+
}), f.forEach((g) => g.remove()), r.style.display = l, r.style.visibility = a, r.style.position = d, b(this, R, u > 0 ? u : 24), t(this, it).call(this), _.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, X)}`), t(this, R);
|
|
497
505
|
}, "#measureAndCacheHeight"));
|
|
498
506
|
/**
|
|
499
507
|
* π― μ 체 λ°μ΄ν° κ°μ κΈ°λ°μΌλ‘ κ°μ μ€ν¬λ‘€ λμ΄ μ€μ
|
|
@@ -501,79 +509,79 @@ const Ut = class Ut {
|
|
|
501
509
|
/**
|
|
502
510
|
* π― μ 체 λ°μ΄ν° κ°μ κΈ°λ°μΌλ‘ κ°μ μ€ν¬λ‘€ λμ΄ μ€μ
|
|
503
511
|
*/
|
|
504
|
-
h(this,
|
|
505
|
-
var
|
|
506
|
-
if (!t(this,
|
|
507
|
-
const e = (typeof ((
|
|
508
|
-
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
|
|
509
|
-
const u = t(this,
|
|
510
|
-
f
|
|
512
|
+
h(this, bt, /* @__PURE__ */ c(() => {
|
|
513
|
+
var o, r, l, a;
|
|
514
|
+
if (!t(this, x).querySelector(".ng-container-body")) return;
|
|
515
|
+
const e = (typeof ((o = t(this, x).data) == null ? void 0 : o.count) == "function" ? t(this, x).data.count() : null) ?? ((l = (r = t(this, x).dataManager) == null ? void 0 : r.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, x).data) == null ? void 0 : a.length) ?? 0, s = t(this, R) || 24, n = e * s;
|
|
516
|
+
_.log(`[RowManager] TotalCount: ${e} | RowHeight: ${s}px | TotalVirtualHeight: ${n}px`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
|
|
517
|
+
const u = t(this, x).querySelector(d), f = u == null ? void 0 : u.querySelector("table");
|
|
518
|
+
f ? (f.style.height = `${n}px`, _.log(`[RowManager] Applied height to ${d} table:`, f.style.height)) : _.log(`[RowManager] Table not found for selector: ${d}`);
|
|
511
519
|
});
|
|
512
520
|
}, "#updateVirtualScrollHeight"));
|
|
513
521
|
h(this, it, /* @__PURE__ */ c(() => {
|
|
514
522
|
if (t(this, Y) > 0 && t(this, R) > 0) {
|
|
515
523
|
const i = Math.ceil(t(this, Y) / t(this, R));
|
|
516
|
-
b(this,
|
|
524
|
+
b(this, X, i + 20);
|
|
517
525
|
} else
|
|
518
|
-
b(this,
|
|
526
|
+
b(this, X, 40);
|
|
519
527
|
}, "#updateRowCount"));
|
|
520
|
-
h(this,
|
|
528
|
+
h(this, pt, /* @__PURE__ */ c(() => {
|
|
521
529
|
var a, d, u;
|
|
522
|
-
const i = t(this,
|
|
530
|
+
const i = t(this, x).querySelector(".ng-container-left table"), e = t(this, x).querySelector(".ng-container-body table"), s = t(this, x).querySelector(".ng-container-right table");
|
|
523
531
|
if (!e) return;
|
|
524
|
-
const n = i ? Array.from(i.querySelectorAll("tr")) : [],
|
|
532
|
+
const n = i ? Array.from(i.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), r = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, o.length, r.length);
|
|
525
533
|
for (let f = 0; f < l; f++) {
|
|
526
534
|
const g = [
|
|
527
535
|
((a = n[f]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
528
|
-
((d =
|
|
529
|
-
((u =
|
|
536
|
+
((d = o[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
|
|
537
|
+
((u = r[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
|
|
530
538
|
], y = Math.max(...g);
|
|
531
|
-
y > 0 && (n[f] && (n[f].style.height = `${y}px`),
|
|
539
|
+
y > 0 && (n[f] && (n[f].style.height = `${y}px`), o[f] && (o[f].style.height = `${y}px`), r[f] && (r[f].style.height = `${y}px`));
|
|
532
540
|
}
|
|
533
541
|
}, "#syncRowHeights"));
|
|
534
542
|
/**
|
|
535
543
|
* π― ResizeObserver μ€μ : μνΈ ν¬κΈ° λ³κ²½ μ ν κ°μ μ¬μ°μ λ° μ¬λ λλ§
|
|
536
544
|
*/
|
|
537
|
-
h(this,
|
|
538
|
-
!t(this,
|
|
545
|
+
h(this, yt, /* @__PURE__ */ c(() => {
|
|
546
|
+
!t(this, x) || !(t(this, x) instanceof HTMLElement) || (b(this, W, new ResizeObserver((i) => {
|
|
539
547
|
for (const e of i) {
|
|
540
548
|
const s = e.target;
|
|
541
549
|
if (!s.classList.contains("active")) continue;
|
|
542
550
|
const n = e.contentRect.height;
|
|
543
551
|
if (n > 0) {
|
|
544
|
-
let
|
|
545
|
-
const
|
|
546
|
-
|
|
547
|
-
const l = Math.max(n -
|
|
552
|
+
let o = 0;
|
|
553
|
+
const r = s.querySelector("thead");
|
|
554
|
+
r && (o += r.offsetHeight || r.getBoundingClientRect().height);
|
|
555
|
+
const l = Math.max(n - o, 100);
|
|
548
556
|
t(this, Y) !== l && (b(this, Y, l), t(this, it).call(this), t(this, R) !== null && t(this, st).call(this));
|
|
549
557
|
}
|
|
550
558
|
}
|
|
551
|
-
})), t(this,
|
|
559
|
+
})), t(this, W).observe(t(this, x)));
|
|
552
560
|
}, "#initResizeObserver"));
|
|
553
561
|
/**
|
|
554
562
|
* π― λ°λ λ° μ’μ° κ³ μ 컨ν
μ΄λ μ 체μ κ°κ°μ λ§λ ν
νλ¦Ώ ν λΌλ μ£Όμ
|
|
555
563
|
*/
|
|
556
564
|
h(this, st, /* @__PURE__ */ c(() => {
|
|
557
565
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
|
|
558
|
-
const e = t(this,
|
|
559
|
-
e && e.querySelector("tbody") && t(this,
|
|
560
|
-
}), t(this,
|
|
566
|
+
const e = t(this, x).querySelector(i);
|
|
567
|
+
e && e.querySelector("tbody") && t(this, ut).call(this, e, i);
|
|
568
|
+
}), t(this, pt).call(this);
|
|
561
569
|
}, "#renderAllContainers"));
|
|
562
570
|
/**
|
|
563
571
|
* π― μ€ν¬λ‘€ μμΉμ λ°λ₯Έ λ°μ΄ν° λ°μΈλ© κ°±μ
|
|
564
572
|
*/
|
|
565
|
-
h(this,
|
|
566
|
-
var
|
|
573
|
+
h(this, nt, /* @__PURE__ */ c((i) => {
|
|
574
|
+
var r;
|
|
567
575
|
const e = t(this, R);
|
|
568
576
|
if (!e || e <= 0) return;
|
|
569
|
-
const s = ((
|
|
577
|
+
const s = ((r = t(this, M).get(".ng-container-body")) == null ? void 0 : r.length) || 1, n = Math.floor(i / e), o = Math.max(0, n);
|
|
570
578
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((l) => {
|
|
571
|
-
const a = t(this,
|
|
579
|
+
const a = t(this, x).querySelector(l);
|
|
572
580
|
if (!a) return;
|
|
573
581
|
const d = a.querySelector("tbody");
|
|
574
582
|
if (!d) return;
|
|
575
583
|
Array.from(d.querySelectorAll("tr:not(.nodata)")).forEach((f, g) => {
|
|
576
|
-
const y =
|
|
584
|
+
const y = o + Math.floor(g / s), w = t(this, x).getData ? t(this, x).getData(y) : null;
|
|
577
585
|
w ? (f.style.display = "", t(this, mt).call(this, f, w, y)) : f.style.display = "none";
|
|
578
586
|
});
|
|
579
587
|
});
|
|
@@ -583,56 +591,56 @@ const Ut = class Ut {
|
|
|
583
591
|
*/
|
|
584
592
|
h(this, mt, /* @__PURE__ */ c((i, e, s) => {
|
|
585
593
|
i.dataset.row = s, Array.from(i.cells).forEach((n) => {
|
|
586
|
-
const
|
|
587
|
-
|
|
594
|
+
const o = n.dataset.bind;
|
|
595
|
+
o && e[o] !== void 0 && (n.textContent = e[o]), n.dataset.row = s;
|
|
588
596
|
});
|
|
589
597
|
}, "#bindRowData"));
|
|
590
598
|
S(this, "destroy", /* @__PURE__ */ c(() => {
|
|
591
|
-
t(this,
|
|
599
|
+
t(this, W) && (t(this, W).disconnect(), b(this, W, null));
|
|
592
600
|
}, "destroy"));
|
|
593
|
-
b(this,
|
|
601
|
+
b(this, x, i), t(this, yt).call(this);
|
|
594
602
|
}
|
|
595
603
|
getRowHeight() {
|
|
596
604
|
return t(this, R);
|
|
597
605
|
}
|
|
598
606
|
templateLength(i = ".ng-container-body") {
|
|
599
607
|
var e;
|
|
600
|
-
return ((e = t(this,
|
|
608
|
+
return ((e = t(this, M).get(i)) == null ? void 0 : e.length) || 1;
|
|
601
609
|
}
|
|
602
610
|
};
|
|
603
|
-
|
|
611
|
+
x = new WeakMap(), M = new WeakMap(), R = new WeakMap(), W = new WeakMap(), Y = new WeakMap(), X = new WeakMap(), ut = new WeakMap(), gt = new WeakMap(), bt = new WeakMap(), it = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), st = new WeakMap(), nt = new WeakMap(), mt = new WeakMap(), c(Ut, "RowManager");
|
|
604
612
|
let Wt = Ut;
|
|
605
|
-
var
|
|
613
|
+
var F, Z, xt, vt, wt, St, Et;
|
|
606
614
|
const J = class J extends HTMLElement {
|
|
607
615
|
constructor() {
|
|
608
616
|
super();
|
|
609
|
-
h(this,
|
|
610
|
-
h(this,
|
|
617
|
+
h(this, F, null);
|
|
618
|
+
h(this, Z);
|
|
611
619
|
h(this, xt, /* @__PURE__ */ c(() => {
|
|
612
620
|
[
|
|
613
621
|
{ selector: ".ng-container-body", type: null },
|
|
614
622
|
{ selector: ".ng-container-left", type: "left" },
|
|
615
623
|
{ selector: ".ng-container-right", type: "right" }
|
|
616
624
|
].forEach(({ selector: s, type: n }) => {
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
|
|
625
|
+
const o = this.querySelector(s);
|
|
626
|
+
if (!o) return;
|
|
627
|
+
const r = t(this, wt).call(this, t(this, F), n);
|
|
628
|
+
o.innerHTML = "", o.appendChild(r);
|
|
621
629
|
});
|
|
622
630
|
}, "#renderSplitContainers"));
|
|
623
631
|
h(this, vt, /* @__PURE__ */ c(() => {
|
|
624
632
|
["left", "right"].forEach((e) => {
|
|
625
633
|
const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
|
|
626
634
|
if (!s || !n) return;
|
|
627
|
-
let
|
|
628
|
-
n.querySelectorAll("col").forEach((
|
|
629
|
-
const l = parseInt(
|
|
630
|
-
isNaN(
|
|
631
|
-
}), s.style.flex = `0 0 ${
|
|
635
|
+
let o = 0;
|
|
636
|
+
n.querySelectorAll("col").forEach((r) => {
|
|
637
|
+
const l = parseInt(r.getAttribute("width"), 10);
|
|
638
|
+
isNaN(o) || (o += l);
|
|
639
|
+
}), s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`;
|
|
632
640
|
});
|
|
633
641
|
}, "#updateContainerWidths"));
|
|
634
642
|
S(this, "generate", /* @__PURE__ */ c((e) => {
|
|
635
|
-
e && (b(this,
|
|
643
|
+
e && (b(this, F, $t.compile(e)), t(this, F).style.display = "table", t(this, xt).call(this), t(this, vt).call(this), t(this, Z).initialize(), setTimeout(() => {
|
|
636
644
|
var s;
|
|
637
645
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
638
646
|
}, 0));
|
|
@@ -642,15 +650,15 @@ const J = class J extends HTMLElement {
|
|
|
642
650
|
*/
|
|
643
651
|
h(this, wt, /* @__PURE__ */ c((e, s) => {
|
|
644
652
|
const n = e.cloneNode(!0);
|
|
645
|
-
return s === "left" ? n.querySelectorAll("col, th, td").forEach((
|
|
646
|
-
|
|
647
|
-
}) : s === "right" ? n.querySelectorAll("col, th, td").forEach((
|
|
648
|
-
|
|
649
|
-
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((
|
|
650
|
-
|
|
653
|
+
return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
|
|
654
|
+
o.getAttribute("fixed") !== "left" && o.remove();
|
|
655
|
+
}) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
|
|
656
|
+
o.getAttribute("fixed") !== "right" && o.remove();
|
|
657
|
+
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
|
|
658
|
+
o.remove();
|
|
651
659
|
}), n;
|
|
652
660
|
}, "#createSplitTable"));
|
|
653
|
-
S(this, "getRowHeight", /* @__PURE__ */ c(() => t(this,
|
|
661
|
+
S(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, Z).getRowHeight(), "getRowHeight"));
|
|
654
662
|
S(this, "scrollToX", /* @__PURE__ */ c((e) => {
|
|
655
663
|
const s = this.querySelector(".ng-container-body");
|
|
656
664
|
s && (s.scrollLeft = e);
|
|
@@ -786,31 +794,31 @@ const J = class J extends HTMLElement {
|
|
|
786
794
|
</div>
|
|
787
795
|
`;
|
|
788
796
|
}, "#render"));
|
|
789
|
-
b(this,
|
|
797
|
+
b(this, Z, new Wt(this));
|
|
790
798
|
}
|
|
791
799
|
connectedCallback() {
|
|
792
800
|
t(this, St).call(this);
|
|
793
801
|
}
|
|
794
802
|
disconnectedCallback() {
|
|
795
|
-
this.innerHTML = "",
|
|
803
|
+
this.innerHTML = "", _.log("NineTableSheet destroyed.");
|
|
796
804
|
}
|
|
797
805
|
};
|
|
798
|
-
|
|
799
|
-
let
|
|
800
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
801
|
-
var Rt,
|
|
806
|
+
F = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), c(J, "NineTableSheet"), S(J, "SCROLLBAR_SIZE", 16);
|
|
807
|
+
let ct = J;
|
|
808
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ct);
|
|
809
|
+
var Rt, ot;
|
|
802
810
|
const Kt = class Kt extends HTMLElement {
|
|
803
811
|
constructor() {
|
|
804
812
|
super();
|
|
805
813
|
h(this, Rt, /* @__PURE__ */ c(() => {
|
|
806
814
|
var e;
|
|
807
815
|
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
|
|
808
|
-
var
|
|
809
|
-
const n = s.ctrlKey || s.metaKey || s.shiftKey,
|
|
810
|
-
t(this,
|
|
811
|
-
}), t(this,
|
|
816
|
+
var r;
|
|
817
|
+
const n = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((r = s.target.closest(".nine-tab-item")) == null ? void 0 : r.dataset.index, 10);
|
|
818
|
+
t(this, ot).call(this, o, n);
|
|
819
|
+
}), t(this, ot).call(this, 0, !1);
|
|
812
820
|
}, "#init"));
|
|
813
|
-
h(this,
|
|
821
|
+
h(this, ot, /* @__PURE__ */ c((e, s = !1) => {
|
|
814
822
|
const n = /* @__PURE__ */ c(() => {
|
|
815
823
|
const u = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
816
824
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
|
|
@@ -819,7 +827,7 @@ const Kt = class Kt extends HTMLElement {
|
|
|
819
827
|
const w = parseInt(y.getAttribute("data-index"), 10), L = this.querySelector(`nine-splitter[data-split-index="${w}"]`), Jt = u[w + 1];
|
|
820
828
|
L && Jt && Jt.classList.contains("active") && L.style.setProperty("display", "flex");
|
|
821
829
|
});
|
|
822
|
-
}, "updateSplitters"),
|
|
830
|
+
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), a = r.querySelectorAll("nine-table-sheet");
|
|
823
831
|
if (!l[e]) return;
|
|
824
832
|
if (!s)
|
|
825
833
|
l.forEach((u, f) => {
|
|
@@ -829,14 +837,14 @@ const Kt = class Kt extends HTMLElement {
|
|
|
829
837
|
u.classList.toggle("active", g), u.style.flex = g ? "1 1 100%" : "";
|
|
830
838
|
});
|
|
831
839
|
else {
|
|
832
|
-
const u = l[e], f =
|
|
840
|
+
const u = l[e], f = o.querySelectorAll(".nine-tab-item.active");
|
|
833
841
|
if (u.classList.contains("active") && f.length <= 1)
|
|
834
842
|
return;
|
|
835
843
|
u.classList.toggle("active");
|
|
836
|
-
const g =
|
|
844
|
+
const g = r.querySelector(`nine-table-sheet[data-index="${e}"]`);
|
|
837
845
|
g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
|
|
838
846
|
}
|
|
839
|
-
const d =
|
|
847
|
+
const d = r.querySelectorAll("nine-table-sheet.active");
|
|
840
848
|
d == null || d.forEach((u) => {
|
|
841
849
|
u.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
|
|
842
850
|
}), n();
|
|
@@ -846,32 +854,32 @@ const Kt = class Kt extends HTMLElement {
|
|
|
846
854
|
t(this, Rt).call(this);
|
|
847
855
|
}
|
|
848
856
|
};
|
|
849
|
-
Rt = new WeakMap(),
|
|
857
|
+
Rt = new WeakMap(), ot = new WeakMap(), c(Kt, "NineTableSheets");
|
|
850
858
|
let Ot = Kt;
|
|
851
859
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Ot);
|
|
852
|
-
var
|
|
860
|
+
var T, Tt, rt, At;
|
|
853
861
|
const Ft = class Ft {
|
|
854
862
|
constructor(i) {
|
|
855
|
-
h(this,
|
|
856
|
-
h(this,
|
|
857
|
-
t(this,
|
|
863
|
+
h(this, T);
|
|
864
|
+
h(this, Tt, /* @__PURE__ */ c(() => {
|
|
865
|
+
t(this, At).call(this), new ResizeObserver((i) => {
|
|
858
866
|
for (let e of i)
|
|
859
|
-
t(this,
|
|
860
|
-
}).observe(t(this,
|
|
867
|
+
t(this, T).getAttribute("auto-height") === "true" && t(this, rt).call(this);
|
|
868
|
+
}).observe(t(this, T));
|
|
861
869
|
}, "#init"));
|
|
862
870
|
h(this, rt, /* @__PURE__ */ c(() => {
|
|
863
871
|
var a, d;
|
|
864
|
-
const i = Array.from(t(this,
|
|
872
|
+
const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
865
873
|
if (i.length === 0) return;
|
|
866
|
-
const e = parseInt(t(this,
|
|
867
|
-
t(this,
|
|
874
|
+
const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (a = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, o = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, r = ct.SCROLLBAR_SIZE, l = e * s + n + o + r;
|
|
875
|
+
t(this, T).style.height = `${l}px`;
|
|
868
876
|
}, "#applyAutoHeight"));
|
|
869
|
-
h(this,
|
|
870
|
-
const e = Array.from(t(this,
|
|
877
|
+
h(this, At, /* @__PURE__ */ c(() => {
|
|
878
|
+
const e = Array.from(t(this, T).children).filter((a) => a.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", n = e.length, o = e.map((a, d) => {
|
|
871
879
|
const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
|
|
872
880
|
return f + g;
|
|
873
|
-
}).join(""),
|
|
874
|
-
t(this,
|
|
881
|
+
}).join(""), r = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
|
|
882
|
+
t(this, T).shadowRoot.innerHTML = `
|
|
875
883
|
<style>
|
|
876
884
|
:host {
|
|
877
885
|
display: flex;
|
|
@@ -960,9 +968,9 @@ const Ft = class Ft {
|
|
|
960
968
|
<nine-table-body>
|
|
961
969
|
<nine-table-summary></nine-table-summary>
|
|
962
970
|
<nine-table-sheets>
|
|
963
|
-
<nine-table-sheets-body>${
|
|
971
|
+
<nine-table-sheets-body>${o}</nine-table-sheets-body>
|
|
964
972
|
<nine-table-sheets-footer>
|
|
965
|
-
<div class="nine-tab-bar">${
|
|
973
|
+
<div class="nine-tab-bar">${r}</div>
|
|
966
974
|
<div class="sheets-counter">Total : <span id="row-count">0</span></div>
|
|
967
975
|
</nine-table-sheets-footer>
|
|
968
976
|
</nine-table-sheets>
|
|
@@ -970,163 +978,163 @@ const Ft = class Ft {
|
|
|
970
978
|
</nine-table-body>
|
|
971
979
|
<nine-table-footer></nine-table-footer>
|
|
972
980
|
`;
|
|
973
|
-
const l = t(this,
|
|
981
|
+
const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
974
982
|
l == null || l.forEach((a, d) => {
|
|
975
983
|
e[d] && setTimeout(() => {
|
|
976
984
|
a.generate(e[d]), s && t(this, rt).call(this);
|
|
977
985
|
});
|
|
978
986
|
});
|
|
979
987
|
}, "#render"));
|
|
980
|
-
b(this,
|
|
988
|
+
b(this, T, i), t(this, Tt).call(this);
|
|
981
989
|
}
|
|
982
990
|
};
|
|
983
|
-
|
|
991
|
+
T = new WeakMap(), Tt = new WeakMap(), rt = new WeakMap(), At = new WeakMap(), c(Ft, "LayoutManager");
|
|
984
992
|
let zt = Ft;
|
|
985
|
-
var
|
|
993
|
+
var O, U;
|
|
986
994
|
const Zt = class Zt {
|
|
987
995
|
constructor(i) {
|
|
988
|
-
h(this,
|
|
989
|
-
h(this,
|
|
990
|
-
S(this, "count", /* @__PURE__ */ c(() => t(this,
|
|
991
|
-
b(this,
|
|
996
|
+
h(this, O);
|
|
997
|
+
h(this, U, -1);
|
|
998
|
+
S(this, "count", /* @__PURE__ */ c(() => t(this, O).rawRecords.length, "count"));
|
|
999
|
+
b(this, O, i);
|
|
992
1000
|
}
|
|
993
1001
|
get at() {
|
|
994
|
-
return t(this,
|
|
1002
|
+
return t(this, U);
|
|
995
1003
|
}
|
|
996
1004
|
set at(i) {
|
|
997
1005
|
var s, n;
|
|
998
|
-
b(this,
|
|
999
|
-
const e = ((n = (s = t(this,
|
|
1000
|
-
e && !e.querySelector(`tbody.bindable tr[data-row="${t(this,
|
|
1001
|
-
var
|
|
1002
|
-
(
|
|
1006
|
+
b(this, U, parseInt(i, 10));
|
|
1007
|
+
const e = ((n = (s = t(this, O).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, O).owner.body;
|
|
1008
|
+
e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, U)}"]`) && setTimeout(() => {
|
|
1009
|
+
var o, r;
|
|
1010
|
+
(r = (o = t(this, O).owner).scrollTo_V1) == null || r.call(o, t(this, U));
|
|
1003
1011
|
});
|
|
1004
1012
|
}
|
|
1005
1013
|
};
|
|
1006
|
-
|
|
1014
|
+
O = new WeakMap(), U = new WeakMap(), c(Zt, "ngRow");
|
|
1007
1015
|
let Dt = Zt;
|
|
1008
|
-
var
|
|
1016
|
+
var A, v, k, j, kt, z, qt, lt, Lt, Ht, G;
|
|
1009
1017
|
const q = class q {
|
|
1010
1018
|
constructor(i, e) {
|
|
1011
|
-
h(this,
|
|
1012
|
-
h(this,
|
|
1019
|
+
h(this, A);
|
|
1020
|
+
h(this, v);
|
|
1013
1021
|
h(this, k, []);
|
|
1014
|
-
h(this,
|
|
1022
|
+
h(this, j, []);
|
|
1015
1023
|
h(this, kt, 0);
|
|
1016
|
-
h(this,
|
|
1024
|
+
h(this, z, []);
|
|
1017
1025
|
h(this, qt, /* @__PURE__ */ c(() => {
|
|
1018
|
-
b(this,
|
|
1019
|
-
const i = t(this,
|
|
1026
|
+
b(this, z, []);
|
|
1027
|
+
const i = t(this, A).template || [];
|
|
1020
1028
|
Array.from(i).forEach((e) => {
|
|
1021
1029
|
var s;
|
|
1022
|
-
t(this,
|
|
1023
|
-
}), (t(this,
|
|
1024
|
-
e.__ng || (e.__ng = t(this,
|
|
1030
|
+
t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1031
|
+
}), (t(this, v).rawRecords || []).forEach((e) => {
|
|
1032
|
+
e.__ng || (e.__ng = t(this, lt).call(this)), e.__ng.height = t(this, z).slice();
|
|
1025
1033
|
});
|
|
1026
1034
|
}, "#initialize"));
|
|
1027
1035
|
S(this, "set", /* @__PURE__ */ c((i) => {
|
|
1028
1036
|
this.clear(), this.add(i, !1);
|
|
1029
1037
|
}, "set"));
|
|
1030
|
-
h(this,
|
|
1038
|
+
h(this, lt, /* @__PURE__ */ c(() => ({
|
|
1031
1039
|
rowState: q.ROW_STATE.EMPTY,
|
|
1032
1040
|
deleted: !1,
|
|
1033
1041
|
filtered: !1,
|
|
1034
|
-
height: t(this,
|
|
1042
|
+
height: t(this, z).slice(),
|
|
1035
1043
|
o: {},
|
|
1036
1044
|
c: {},
|
|
1037
|
-
_: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this,
|
|
1045
|
+
_: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
|
|
1038
1046
|
}), "#getDefaultMeta"));
|
|
1039
1047
|
S(this, "reset", /* @__PURE__ */ c(() => {
|
|
1040
|
-
b(this, k, []), b(this,
|
|
1048
|
+
b(this, k, []), b(this, j, []);
|
|
1041
1049
|
}, "reset"));
|
|
1042
1050
|
S(this, "clear", /* @__PURE__ */ c(() => {
|
|
1043
1051
|
var i;
|
|
1044
|
-
t(this,
|
|
1052
|
+
t(this, v).rawRecords = [], b(this, k, []), b(this, j, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
|
|
1045
1053
|
}, "clear"));
|
|
1046
1054
|
h(this, Lt, /* @__PURE__ */ c((i) => {
|
|
1047
1055
|
var n;
|
|
1048
1056
|
Array.isArray(i) || (i = [i]);
|
|
1049
|
-
const e = typeof ((n = t(this,
|
|
1050
|
-
return i.forEach((
|
|
1051
|
-
const
|
|
1057
|
+
const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
1058
|
+
return i.forEach((o) => {
|
|
1059
|
+
const r = { v: [] };
|
|
1052
1060
|
e.forEach((l) => {
|
|
1053
|
-
|
|
1054
|
-
}), s.push(
|
|
1061
|
+
r.v.push(o[l] !== void 0 && o[l] !== null ? o[l] : "");
|
|
1062
|
+
}), s.push(r);
|
|
1055
1063
|
}), s;
|
|
1056
1064
|
}, "#json2Array"));
|
|
1057
1065
|
h(this, Ht, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
|
|
1058
|
-
e.__ng = t(this,
|
|
1066
|
+
e.__ng = t(this, lt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = q.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1059
1067
|
}), i), "#defaultInsert"));
|
|
1060
1068
|
S(this, "add", /* @__PURE__ */ c((i, e = !0) => {
|
|
1061
|
-
var
|
|
1069
|
+
var o;
|
|
1062
1070
|
i === void 0 && (i = {});
|
|
1063
1071
|
const s = t(this, Lt).call(this, i);
|
|
1064
|
-
t(this,
|
|
1072
|
+
t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Ht).call(this, s)), this.resetRecords();
|
|
1065
1073
|
const n = this.count() - 1;
|
|
1066
|
-
return e || s.forEach((
|
|
1067
|
-
const a = t(this,
|
|
1074
|
+
return e || s.forEach((r, l) => {
|
|
1075
|
+
const a = t(this, v).rawRecords[n - l];
|
|
1068
1076
|
a && (a.__ng.rowState = q.ROW_STATE.EMPTY);
|
|
1069
|
-
}), (
|
|
1077
|
+
}), (o = t(this, v).viewRecords) != null && o.reset && t(this, v).viewRecords.reset(), n;
|
|
1070
1078
|
}, "add"));
|
|
1071
1079
|
S(this, "delete", /* @__PURE__ */ c((i) => {
|
|
1072
1080
|
var s;
|
|
1073
1081
|
let e = [];
|
|
1074
|
-
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this,
|
|
1082
|
+
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, o) => o - n).forEach((n) => {
|
|
1075
1083
|
if (t(this, k)[n]) {
|
|
1076
|
-
const
|
|
1077
|
-
t(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this,
|
|
1078
|
-
|
|
1084
|
+
const o = t(this, k)[n].__ng.rowid;
|
|
1085
|
+
t(this, k)[n].__ng.rowState === q.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, v).rawRecords.forEach((r) => {
|
|
1086
|
+
r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = q.ROW_STATE.DELETE);
|
|
1079
1087
|
});
|
|
1080
1088
|
}
|
|
1081
|
-
}), this.resetRecords(), (s = t(this,
|
|
1089
|
+
}), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
|
|
1082
1090
|
}, "delete"));
|
|
1083
1091
|
S(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
|
|
1084
1092
|
var a;
|
|
1085
1093
|
i = parseInt(i, 10);
|
|
1086
|
-
const
|
|
1087
|
-
if (
|
|
1088
|
-
const
|
|
1089
|
-
if (!
|
|
1090
|
-
const l =
|
|
1091
|
-
l !== s &&
|
|
1094
|
+
const o = (typeof ((a = t(this, A).fields) == null ? void 0 : a.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
|
|
1095
|
+
if (o < 0) return;
|
|
1096
|
+
const r = this.getValidData()[i];
|
|
1097
|
+
if (!r) return;
|
|
1098
|
+
const l = r.v[o];
|
|
1099
|
+
l !== s && r.__ng.rowState !== q.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(e) || (r.__ng.o[e] = l), r.__ng.rowState = q.ROW_STATE.UPDATE), r.v[o] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
|
|
1092
1100
|
}, "setValue"));
|
|
1093
1101
|
S(this, "resetRecords", /* @__PURE__ */ c(() => {
|
|
1094
|
-
b(this,
|
|
1102
|
+
b(this, j, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), b(this, k, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
|
|
1095
1103
|
i.__ng.rowidx = e;
|
|
1096
1104
|
}), t(this, k).forEach((i, e) => {
|
|
1097
1105
|
i.__ng.i = e;
|
|
1098
1106
|
});
|
|
1099
1107
|
}, "resetRecords"));
|
|
1100
|
-
S(this, "getValidData", /* @__PURE__ */ c(() => (t(this, k).length === 0 && t(this,
|
|
1101
|
-
h(this,
|
|
1108
|
+
S(this, "getValidData", /* @__PURE__ */ c(() => (t(this, k).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, k)), "getValidData"));
|
|
1109
|
+
h(this, G, /* @__PURE__ */ c((i) => {
|
|
1102
1110
|
var s;
|
|
1103
1111
|
if (!i) return i;
|
|
1104
|
-
const e = typeof ((s = t(this,
|
|
1112
|
+
const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
|
|
1105
1113
|
return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
|
|
1106
|
-
const
|
|
1107
|
-
return e.forEach((
|
|
1108
|
-
r
|
|
1109
|
-
}),
|
|
1114
|
+
const o = {};
|
|
1115
|
+
return e.forEach((r, l) => {
|
|
1116
|
+
o[r] = n.v ? n.v[l] : n[r];
|
|
1117
|
+
}), o.__ng = n.__ng, o;
|
|
1110
1118
|
}) : i;
|
|
1111
1119
|
}, "#conv2"));
|
|
1112
1120
|
S(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
|
|
1113
1121
|
S(this, "get", /* @__PURE__ */ c((i, e) => {
|
|
1114
|
-
var
|
|
1122
|
+
var o;
|
|
1115
1123
|
const s = this.getValidData();
|
|
1116
1124
|
if (!s || s.length <= 0) return;
|
|
1117
|
-
if (i == null) return t(this,
|
|
1125
|
+
if (i == null) return t(this, G).call(this, s);
|
|
1118
1126
|
if (i < 0 || i >= s.length) return null;
|
|
1119
|
-
const n = typeof ((
|
|
1127
|
+
const n = typeof ((o = t(this, A).fields) == null ? void 0 : o.get) == "function" ? t(this, A).fields.get() : [];
|
|
1120
1128
|
if (e != null) {
|
|
1121
|
-
const
|
|
1122
|
-
return
|
|
1129
|
+
const r = n.indexOf(e);
|
|
1130
|
+
return r >= 0 ? s[i].v[r] : null;
|
|
1123
1131
|
}
|
|
1124
|
-
return t(this,
|
|
1132
|
+
return t(this, G).call(this, s[i]);
|
|
1125
1133
|
}, "get"));
|
|
1126
|
-
b(this,
|
|
1134
|
+
b(this, A, i), b(this, v, e), t(this, qt).call(this);
|
|
1127
1135
|
}
|
|
1128
1136
|
get source() {
|
|
1129
|
-
return t(this,
|
|
1137
|
+
return t(this, G).call(this, t(this, v).rawRecords);
|
|
1130
1138
|
}
|
|
1131
1139
|
set source(i) {
|
|
1132
1140
|
this.clear(), this.add(i, !1);
|
|
@@ -1141,7 +1149,7 @@ const q = class q {
|
|
|
1141
1149
|
return this.length;
|
|
1142
1150
|
}
|
|
1143
1151
|
};
|
|
1144
|
-
|
|
1152
|
+
A = new WeakMap(), v = new WeakMap(), k = new WeakMap(), j = new WeakMap(), kt = new WeakMap(), z = new WeakMap(), qt = new WeakMap(), lt = new WeakMap(), Lt = new WeakMap(), Ht = new WeakMap(), G = new WeakMap(), c(q, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1145
1153
|
S(q, "ROW_STATE", {
|
|
1146
1154
|
EMPTY: "EMPTY",
|
|
1147
1155
|
NORMAL: "NORMAL",
|
|
@@ -1158,10 +1166,10 @@ const jt = class jt {
|
|
|
1158
1166
|
}, this.setDataSource = (e) => {
|
|
1159
1167
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1160
1168
|
}, this.getRowState = (e) => {
|
|
1161
|
-
var n,
|
|
1169
|
+
var n, o;
|
|
1162
1170
|
const s = parseInt(e, 10);
|
|
1163
1171
|
if (!(s >= this.data.count()))
|
|
1164
|
-
return (
|
|
1172
|
+
return (o = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : o.rowState;
|
|
1165
1173
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
|
|
1166
1174
|
this.row.at = e;
|
|
1167
1175
|
}, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, n) => {
|
|
@@ -1171,35 +1179,35 @@ const jt = class jt {
|
|
|
1171
1179
|
};
|
|
1172
1180
|
c(jt, "ngDataManager");
|
|
1173
1181
|
let Bt = jt;
|
|
1174
|
-
var
|
|
1182
|
+
var K, Ct;
|
|
1175
1183
|
const Gt = class Gt extends HTMLElement {
|
|
1176
1184
|
constructor() {
|
|
1177
1185
|
super();
|
|
1178
1186
|
//#created = false;
|
|
1179
|
-
h(this,
|
|
1187
|
+
h(this, K);
|
|
1180
1188
|
h(this, Ct);
|
|
1181
|
-
this.attachShadow({ mode: "open" }), b(this,
|
|
1189
|
+
this.attachShadow({ mode: "open" }), b(this, K, new Bt(this));
|
|
1182
1190
|
}
|
|
1183
1191
|
connectedCallback() {
|
|
1184
|
-
b(this, Ct, new zt(this)),
|
|
1192
|
+
b(this, Ct, new zt(this)), _.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1185
1193
|
}
|
|
1186
1194
|
disconnectedCallback() {
|
|
1187
|
-
|
|
1195
|
+
_.log("NineTable disconnected.");
|
|
1188
1196
|
}
|
|
1189
1197
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1190
1198
|
get data() {
|
|
1191
|
-
return t(this,
|
|
1199
|
+
return t(this, K).data;
|
|
1192
1200
|
}
|
|
1193
1201
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1194
1202
|
get row() {
|
|
1195
|
-
return t(this,
|
|
1203
|
+
return t(this, K).row;
|
|
1196
1204
|
}
|
|
1197
1205
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1198
1206
|
get dataManager() {
|
|
1199
|
-
return t(this,
|
|
1207
|
+
return t(this, K);
|
|
1200
1208
|
}
|
|
1201
1209
|
};
|
|
1202
|
-
|
|
1210
|
+
K = new WeakMap(), Ct = new WeakMap(), c(Gt, "NineTable");
|
|
1203
1211
|
let Nt = Gt;
|
|
1204
1212
|
customElements.get("nine-table") || customElements.define("nine-table", Nt);
|
|
1205
1213
|
//# sourceMappingURL=nine-table.js.map
|