@ninebone/table 0.0.440 β 0.0.442
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 +595 -581
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var xe = Object.defineProperty;
|
|
2
|
+
var ve = (S) => {
|
|
3
|
+
throw TypeError(S);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var t = (
|
|
9
|
-
var
|
|
5
|
+
var Ee = (S, n, e) => n in S ? xe(S, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[n] = e;
|
|
6
|
+
var h = (S, n) => xe(S, "name", { value: n, configurable: !0 });
|
|
7
|
+
var E = (S, n, e) => Ee(S, typeof n != "symbol" ? n + "" : n, e), we = (S, n, e) => n.has(S) || ve("Cannot " + e);
|
|
8
|
+
var t = (S, n, e) => (we(S, n, "read from private field"), e ? e.call(S) : n.get(S)), d = (S, n, e) => n.has(S) ? ve("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(S) : n.set(S, e), u = (S, n, e, i) => (we(S, n, "write to private field"), i ? i.call(S, e) : n.set(S, e), e);
|
|
9
|
+
var Se = (S, n, e, i) => ({
|
|
10
10
|
set _(s) {
|
|
11
|
-
|
|
11
|
+
u(S, n, s, e);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return t(
|
|
14
|
+
return t(S, n, i);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as Re } from "@ninebone/util";
|
|
18
|
+
const ce = class ce extends Re.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
var
|
|
27
|
-
const
|
|
23
|
+
h(ce, "Trace");
|
|
24
|
+
let Gt = ce;
|
|
25
|
+
const dt = new Gt();
|
|
26
|
+
var I, B, m, Y, F, V, At, X, qt;
|
|
27
|
+
const he = class he extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
d(this,
|
|
31
|
-
d(this,
|
|
32
|
-
d(this,
|
|
33
|
-
d(this,
|
|
34
|
-
d(this,
|
|
35
|
-
d(this,
|
|
36
|
-
d(this,
|
|
37
|
-
if (!t(this,
|
|
38
|
-
const e = t(this,
|
|
39
|
-
e && (
|
|
30
|
+
d(this, I);
|
|
31
|
+
d(this, B, !1);
|
|
32
|
+
d(this, m);
|
|
33
|
+
d(this, Y);
|
|
34
|
+
d(this, F);
|
|
35
|
+
d(this, V);
|
|
36
|
+
d(this, At, /* @__PURE__ */ h(() => {
|
|
37
|
+
if (!t(this, I)) return;
|
|
38
|
+
const e = t(this, I).querySelector(".ng-container-body .ng-part-body");
|
|
39
|
+
e && (u(this, V, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), t(this,
|
|
41
|
+
})), t(this, V).observe(e));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
44
|
-
if (!t(this,
|
|
45
|
-
const e = t(this,
|
|
46
|
-
if (!
|
|
47
|
-
const s = t(this,
|
|
48
|
-
if (l !== 0 &&
|
|
43
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
44
|
+
if (!t(this, I) || !t(this, m) || t(this, B)) return;
|
|
45
|
+
const e = t(this, m).container, i = e.querySelector("table");
|
|
46
|
+
if (!i) return;
|
|
47
|
+
const s = t(this, m).track, r = t(this, m).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, c = i.scrollWidth;
|
|
48
|
+
if (l !== 0 && c > l)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
o && (o.style.display = "none");
|
|
@@ -53,66 +53,66 @@ const ae = class ae extends HTMLElement {
|
|
|
53
53
|
}
|
|
54
54
|
const a = s.clientWidth;
|
|
55
55
|
if (a <= 0) return;
|
|
56
|
-
const f = Math.max(Math.min(a * (l /
|
|
56
|
+
const f = Math.max(Math.min(a * (l / c), a), 20);
|
|
57
57
|
r.style.width = `${f}px`;
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
58
|
+
const g = e.scrollLeft, y = c - l;
|
|
59
|
+
let b = 0;
|
|
60
|
+
y > 0 && (b = parseInt(g / y * (a - f), 10)), b < 0 && (b = 0);
|
|
61
|
+
const p = a - f;
|
|
62
|
+
b > p && (b = p), r.style.left = `${b}px`, t(this, m).left.disabled = b === 0, t(this, m).right.disabled = b >= p - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
d(this,
|
|
65
|
-
if (!t(this,
|
|
66
|
-
const
|
|
64
|
+
d(this, X, /* @__PURE__ */ h((e) => {
|
|
65
|
+
if (!t(this, m)) return !1;
|
|
66
|
+
const i = t(this, m).container, s = i.querySelector("table");
|
|
67
67
|
if (!s) return !1;
|
|
68
|
-
const r = t(this,
|
|
68
|
+
const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
|
|
69
69
|
let l = e;
|
|
70
70
|
l < 0 && (l = 0);
|
|
71
|
-
const
|
|
72
|
-
l >
|
|
73
|
-
const a =
|
|
74
|
-
return
|
|
71
|
+
const c = r.width - o;
|
|
72
|
+
l > c && (l = c), l = parseInt(l, 10), t(this, m).thumb.style.left = `${l}px`, t(this, m).left.disabled = l === 0, t(this, m).right.disabled = l >= c - 1;
|
|
73
|
+
const a = i.clientWidth, g = s.scrollWidth - a;
|
|
74
|
+
return c > 0 && g > 0 && (i.scrollLeft = l / c * g), l > 0 && l < c - 1;
|
|
75
75
|
}, "#thumbMoveTo"));
|
|
76
|
-
d(this,
|
|
77
|
-
const e = /* @__PURE__ */
|
|
78
|
-
clearInterval(t(this,
|
|
79
|
-
const r = parseInt(t(this,
|
|
80
|
-
t(this,
|
|
81
|
-
clearInterval(t(this,
|
|
82
|
-
const o = parseInt(t(this,
|
|
83
|
-
t(this,
|
|
76
|
+
d(this, qt, /* @__PURE__ */ h(() => {
|
|
77
|
+
const e = /* @__PURE__ */ h((s) => {
|
|
78
|
+
clearInterval(t(this, Y)), clearInterval(t(this, F));
|
|
79
|
+
const r = parseInt(t(this, m).thumb.style.left || 0, 10);
|
|
80
|
+
t(this, X).call(this, r + s), u(this, Y, setInterval(() => {
|
|
81
|
+
clearInterval(t(this, Y)), u(this, F, setInterval(() => {
|
|
82
|
+
const o = parseInt(t(this, m).thumb.style.left || 0, 10);
|
|
83
|
+
t(this, X).call(this, o + s) || clearInterval(t(this, F));
|
|
84
84
|
}, 50));
|
|
85
85
|
}, 500));
|
|
86
|
-
}, "delayScroll"),
|
|
87
|
-
clearInterval(t(this,
|
|
86
|
+
}, "delayScroll"), i = /* @__PURE__ */ h(() => {
|
|
87
|
+
clearInterval(t(this, Y)), clearInterval(t(this, F));
|
|
88
88
|
}, "clearTimer");
|
|
89
89
|
["mouseup", "mouseleave", "touchend"].forEach((s) => {
|
|
90
|
-
t(this,
|
|
91
|
-
}), t(this,
|
|
90
|
+
t(this, m).left.addEventListener(s, i), t(this, m).right.addEventListener(s, i), t(this, m).track.addEventListener(s, i);
|
|
91
|
+
}), t(this, m).left.addEventListener("mousedown", (s) => {
|
|
92
92
|
s.button === 0 && e(-20);
|
|
93
|
-
}), t(this,
|
|
93
|
+
}), t(this, m).right.addEventListener("mousedown", (s) => {
|
|
94
94
|
s.button === 0 && e(20);
|
|
95
|
-
}), t(this,
|
|
95
|
+
}), t(this, m).left.addEventListener("touchstart", () => e(-20)), t(this, m).right.addEventListener("touchstart", () => e(20)), t(this, m).track.addEventListener("mousedown", (s) => {
|
|
96
96
|
if (s.button !== 0) return;
|
|
97
97
|
s.preventDefault();
|
|
98
|
-
const r = t(this,
|
|
99
|
-
t(this,
|
|
100
|
-
}), t(this,
|
|
98
|
+
const r = t(this, m).track.getBoundingClientRect(), o = t(this, m).thumb.clientWidth;
|
|
99
|
+
t(this, X).call(this, s.clientX - r.left - o / 2);
|
|
100
|
+
}), t(this, m).thumb.addEventListener("mousedown", (s) => {
|
|
101
101
|
if (s.button !== 0) return;
|
|
102
|
-
s.stopPropagation(), s.preventDefault(),
|
|
103
|
-
const r = /* @__PURE__ */
|
|
104
|
-
if (!t(this,
|
|
105
|
-
const
|
|
106
|
-
t(this,
|
|
107
|
-
}, "onMouseMove"), o = /* @__PURE__ */
|
|
108
|
-
|
|
102
|
+
s.stopPropagation(), s.preventDefault(), u(this, B, !0), this.shiftX = s.clientX - t(this, m).thumb.getBoundingClientRect().left;
|
|
103
|
+
const r = /* @__PURE__ */ h((l) => {
|
|
104
|
+
if (!t(this, B)) return;
|
|
105
|
+
const c = t(this, m).track.getBoundingClientRect();
|
|
106
|
+
t(this, X).call(this, l.clientX - c.left - this.shiftX);
|
|
107
|
+
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
108
|
+
u(this, B, !1), i(), 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 (u(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, I)) return;
|
|
116
116
|
this.innerHTML = `
|
|
117
117
|
<style>
|
|
118
118
|
nine-table-hscrollbar {
|
|
@@ -176,100 +176,100 @@ const ae = class ae extends HTMLElement {
|
|
|
176
176
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
177
177
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
178
178
|
`;
|
|
179
|
-
const e = /* @__PURE__ */
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
179
|
+
const e = /* @__PURE__ */ h(() => {
|
|
180
|
+
const i = t(this, I).querySelector(".ng-container-body .ng-part-body");
|
|
181
|
+
if (!i) {
|
|
182
182
|
setTimeout(e, 10);
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
container:
|
|
185
|
+
u(this, m, {
|
|
186
|
+
container: i,
|
|
187
187
|
track: this.querySelector(".ng-scroll-track"),
|
|
188
188
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
189
189
|
left: this.querySelector(".ng-scroll-left"),
|
|
190
190
|
right: this.querySelector(".ng-scroll-right")
|
|
191
|
-
}),
|
|
192
|
-
t(this,
|
|
193
|
-
}), t(this,
|
|
191
|
+
}), i.addEventListener("scroll", () => {
|
|
192
|
+
t(this, B) || this.refresh();
|
|
193
|
+
}), t(this, qt).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, V) && t(this, V).disconnect();
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
|
|
202
|
-
let
|
|
203
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
204
|
-
var
|
|
205
|
-
const
|
|
201
|
+
I = new WeakMap(), B = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), F = new WeakMap(), V = new WeakMap(), At = new WeakMap(), X = new WeakMap(), qt = new WeakMap(), h(he, "NineTableHScrollBar");
|
|
202
|
+
let Jt = he;
|
|
203
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Jt);
|
|
204
|
+
var N, et, U, R, ft, gt, Tt;
|
|
205
|
+
const de = class de extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
|
-
d(this,
|
|
209
|
-
d(this,
|
|
210
|
-
d(this,
|
|
211
|
-
d(this,
|
|
212
|
-
d(this,
|
|
213
|
-
d(this,
|
|
214
|
-
|
|
215
|
-
if (!t(this,
|
|
216
|
-
const e = t(this,
|
|
208
|
+
d(this, N);
|
|
209
|
+
d(this, et);
|
|
210
|
+
d(this, U, !1);
|
|
211
|
+
d(this, R);
|
|
212
|
+
d(this, ft, 0);
|
|
213
|
+
d(this, gt, 0);
|
|
214
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
215
|
+
if (!t(this, N) || !t(this, R)) return;
|
|
216
|
+
const e = t(this, R).container, i = t(this, R).track, s = t(this, R).thumb, r = e.clientHeight, l = (t(this, N).data.get() || []).length, c = t(this, et).getRowHeight(), a = l * c;
|
|
217
217
|
if (a <= r) {
|
|
218
|
-
s.style.display = "none", t(this,
|
|
218
|
+
s.style.display = "none", t(this, R).top.disabled = !0, t(this, R).bottom.disabled = !0;
|
|
219
219
|
return;
|
|
220
220
|
} else
|
|
221
221
|
s.style.display = "block";
|
|
222
|
-
const f =
|
|
222
|
+
const f = i.clientHeight;
|
|
223
223
|
if (f <= 0) return;
|
|
224
|
-
const
|
|
225
|
-
s.style.height = `${
|
|
226
|
-
const
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
224
|
+
const g = Math.max(Math.min(f * (r / a), f), 20);
|
|
225
|
+
s.style.height = `${g}px`;
|
|
226
|
+
const y = e.scrollTop, b = Math.max(a - r, 1);
|
|
227
|
+
let p = 0;
|
|
228
|
+
b > 0 && (p = y / b * (f - g));
|
|
229
|
+
const v = f - g;
|
|
230
|
+
p < 0 && (p = 0), p > v && (p = v), s.style.top = `${p}px`, t(this, R).top.disabled = y <= 0, t(this, R).bottom.disabled = y >= b - 1;
|
|
231
231
|
}, "refresh"));
|
|
232
|
-
d(this,
|
|
233
|
-
const e = t(this,
|
|
234
|
-
const r = (t(this,
|
|
232
|
+
d(this, Tt, /* @__PURE__ */ h(() => {
|
|
233
|
+
const e = t(this, R).container, i = /* @__PURE__ */ h(() => {
|
|
234
|
+
const r = (t(this, N).data.get() || []).length, o = t(this, et).getRowHeight();
|
|
235
235
|
return r * o;
|
|
236
236
|
}, "getContentHeight");
|
|
237
237
|
e.addEventListener("scroll", () => {
|
|
238
|
-
t(this,
|
|
239
|
-
}), t(this,
|
|
238
|
+
t(this, U) || this.refresh();
|
|
239
|
+
}), t(this, R).thumb.addEventListener("mousedown", (s) => {
|
|
240
240
|
if (s.button !== 0) return;
|
|
241
|
-
s.stopPropagation(), s.preventDefault(),
|
|
242
|
-
const r = /* @__PURE__ */
|
|
243
|
-
if (!t(this,
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
let
|
|
248
|
-
const
|
|
249
|
-
|
|
241
|
+
s.stopPropagation(), s.preventDefault(), u(this, U, !0), u(this, ft, s.clientY), u(this, gt, e.scrollTop);
|
|
242
|
+
const r = /* @__PURE__ */ h((l) => {
|
|
243
|
+
if (!t(this, U)) return;
|
|
244
|
+
const c = t(this, R).track.getBoundingClientRect(), a = t(this, R).thumb.clientHeight, g = c.height - a, y = l.clientY - t(this, ft), b = e.clientHeight, p = i(), v = Math.max(p - b, 1);
|
|
245
|
+
if (g > 0 && v > 0) {
|
|
246
|
+
const M = y / g * v;
|
|
247
|
+
let x = t(this, gt) + M;
|
|
248
|
+
const tt = Math.max(0, p - b);
|
|
249
|
+
x < 0 && (x = 0), x > tt && (x = tt), e.scrollTop = x;
|
|
250
250
|
}
|
|
251
251
|
this.refresh();
|
|
252
|
-
}, "onMouseMove"), o = /* @__PURE__ */
|
|
253
|
-
|
|
252
|
+
}, "onMouseMove"), o = /* @__PURE__ */ h(() => {
|
|
253
|
+
u(this, U, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
254
254
|
}, "onMouseUp");
|
|
255
255
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
256
|
-
}), t(this,
|
|
257
|
-
if (s.button !== 0 || s.target === t(this,
|
|
258
|
-
const r = t(this,
|
|
259
|
-
if (a > 0 &&
|
|
260
|
-
const
|
|
261
|
-
e.scrollTop =
|
|
256
|
+
}), t(this, R).track.addEventListener("mousedown", (s) => {
|
|
257
|
+
if (s.button !== 0 || s.target === t(this, R).thumb) return;
|
|
258
|
+
const r = t(this, R).track.getBoundingClientRect(), o = t(this, R).thumb.clientHeight, l = s.clientY - r.top - o / 2, a = r.height - o, f = e.clientHeight, g = i(), y = Math.max(g - f, 1);
|
|
259
|
+
if (a > 0 && y > 0) {
|
|
260
|
+
const b = Math.max(0, Math.min(1, l / a));
|
|
261
|
+
e.scrollTop = b * y;
|
|
262
262
|
}
|
|
263
263
|
this.refresh();
|
|
264
|
-
}), t(this,
|
|
264
|
+
}), t(this, R).top.addEventListener("click", () => {
|
|
265
265
|
e.scrollTop -= 40;
|
|
266
|
-
}), t(this,
|
|
266
|
+
}), t(this, R).bottom.addEventListener("click", () => {
|
|
267
267
|
e.scrollTop += 40;
|
|
268
268
|
});
|
|
269
269
|
}, "#init"));
|
|
270
270
|
}
|
|
271
271
|
connectedCallback() {
|
|
272
|
-
|
|
272
|
+
u(this, N, this.getRootNode().host), u(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
|
|
273
273
|
<style>
|
|
274
274
|
nine-table-vscrollbar {
|
|
275
275
|
display: flex;
|
|
@@ -333,45 +333,45 @@ const ce = class ce extends HTMLElement {
|
|
|
333
333
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
334
334
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
335
335
|
`;
|
|
336
|
-
const e = /* @__PURE__ */
|
|
337
|
-
const
|
|
338
|
-
if (!
|
|
336
|
+
const e = /* @__PURE__ */ h(() => {
|
|
337
|
+
const i = t(this, N).shadowRoot.querySelector(".ng-container-body .ng-part-body");
|
|
338
|
+
if (!i) {
|
|
339
339
|
setTimeout(e, 10);
|
|
340
340
|
return;
|
|
341
341
|
}
|
|
342
|
-
|
|
343
|
-
container:
|
|
342
|
+
u(this, R, {
|
|
343
|
+
container: i,
|
|
344
344
|
track: this.querySelector(".ng-scroll-track"),
|
|
345
345
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
346
346
|
top: this.querySelector(".ng-scroll-top"),
|
|
347
347
|
bottom: this.querySelector(".ng-scroll-bottom")
|
|
348
|
-
}), t(this,
|
|
348
|
+
}), t(this, Tt).call(this), this.refresh();
|
|
349
349
|
}, "initWhenReady");
|
|
350
350
|
e();
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
|
|
354
|
-
let
|
|
355
|
-
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar",
|
|
356
|
-
var
|
|
357
|
-
const
|
|
358
|
-
constructor(
|
|
359
|
-
d(this,
|
|
353
|
+
N = new WeakMap(), et = new WeakMap(), U = new WeakMap(), R = new WeakMap(), ft = new WeakMap(), gt = new WeakMap(), Tt = new WeakMap(), h(de, "NineTableVScrollBar");
|
|
354
|
+
let Qt = de;
|
|
355
|
+
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Qt);
|
|
356
|
+
var z, w, W, T, P, j, ut, nt, kt, Lt, Ct, bt, yt, Ht, Mt, pt, _t, it, mt, $t;
|
|
357
|
+
const fe = class fe {
|
|
358
|
+
constructor(n) {
|
|
359
|
+
d(this, z);
|
|
360
360
|
d(this, w);
|
|
361
|
-
d(this,
|
|
362
|
-
d(this,
|
|
363
|
-
d(this,
|
|
364
|
-
d(this,
|
|
365
|
-
d(this,
|
|
366
|
-
d(this,
|
|
367
|
-
d(this,
|
|
368
|
-
|
|
361
|
+
d(this, W, /* @__PURE__ */ new Map());
|
|
362
|
+
d(this, T, null);
|
|
363
|
+
d(this, P, null);
|
|
364
|
+
d(this, j, 0);
|
|
365
|
+
d(this, ut, 40);
|
|
366
|
+
d(this, nt, !1);
|
|
367
|
+
d(this, kt, 3);
|
|
368
|
+
E(this, "refresh", /* @__PURE__ */ h(() => {
|
|
369
369
|
var e;
|
|
370
|
-
const
|
|
371
|
-
|
|
370
|
+
const n = t(this, w).querySelector(".ng-container-body .ng-part-body");
|
|
371
|
+
n && (t(this, bt).call(this), t(this, it).call(this, n.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
|
|
372
372
|
}, "refresh"));
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
E(this, "initialize", /* @__PURE__ */ h(() => {
|
|
374
|
+
u(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
|
|
375
375
|
const r = t(this, w).querySelector(s);
|
|
376
376
|
if (!r) return;
|
|
377
377
|
const o = r.querySelector(".ng-part-body table");
|
|
@@ -379,57 +379,58 @@ const he = class he {
|
|
|
379
379
|
const l = o.querySelector("tbody.bindable-tbody");
|
|
380
380
|
if (!l) return;
|
|
381
381
|
const a = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
|
|
382
|
-
t(this,
|
|
382
|
+
t(this, W).set(s, a);
|
|
383
383
|
});
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
386
|
-
t(this,
|
|
387
|
-
let s =
|
|
388
|
-
const r = /* @__PURE__ */
|
|
389
|
-
var
|
|
390
|
-
e && e.scrollTop !== o && (e.scrollTop = o),
|
|
384
|
+
const n = t(this, w).querySelector(".ng-container-body .ng-part-body"), e = t(this, w).querySelector(".ng-container-left .ng-part-body"), i = t(this, w).querySelector(".ng-container-right .ng-part-body");
|
|
385
|
+
if (n) {
|
|
386
|
+
t(this, Ct).call(this, n), t(this, pt).call(this), t(this, bt).call(this), t(this, it).call(this, n.scrollTop);
|
|
387
|
+
let s = !1;
|
|
388
|
+
const r = /* @__PURE__ */ h((o, l) => {
|
|
389
|
+
var c;
|
|
390
|
+
s || (s = !0, n && n.scrollTop !== o && (n.scrollTop = o), e && e.scrollTop !== o && (e.scrollTop = o), i && i.scrollTop !== o && (i.scrollTop = o), t(this, it).call(this, o), (c = t(this, w).querySelector("nine-table-vscrollbar")) == null || c.refresh(), s = !1);
|
|
391
391
|
}, "syncScroll");
|
|
392
|
-
i.
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
[n, e, i].forEach((o) => {
|
|
393
|
+
o && o.addEventListener("scroll", () => {
|
|
394
|
+
r(o.scrollTop);
|
|
395
|
+
});
|
|
395
396
|
});
|
|
396
397
|
}
|
|
397
398
|
}, "initialize"));
|
|
398
|
-
d(this,
|
|
399
|
-
const
|
|
400
|
-
if (!
|
|
401
|
-
const s =
|
|
399
|
+
d(this, Lt, /* @__PURE__ */ h((n, e) => {
|
|
400
|
+
const i = t(this, W).get(e);
|
|
401
|
+
if (!i || i.length === 0) return;
|
|
402
|
+
const s = n.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
402
403
|
if (!s) return;
|
|
403
404
|
s.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
|
|
404
405
|
const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
405
|
-
for (let l = 0; l < t(this,
|
|
406
|
-
|
|
407
|
-
o.appendChild(
|
|
406
|
+
for (let l = 0; l < t(this, ut); l++)
|
|
407
|
+
i.forEach((c) => {
|
|
408
|
+
o.appendChild(c.cloneNode(!0));
|
|
408
409
|
});
|
|
409
410
|
r ? r.before(o) : s.appendChild(o);
|
|
410
411
|
}, "#renderRows"));
|
|
411
|
-
d(this,
|
|
412
|
-
if (t(this,
|
|
413
|
-
return t(this,
|
|
414
|
-
const e = t(this,
|
|
412
|
+
d(this, Ct, /* @__PURE__ */ h((n) => {
|
|
413
|
+
if (t(this, T) !== null && t(this, T) > 0)
|
|
414
|
+
return t(this, T);
|
|
415
|
+
const e = t(this, W).get(".ng-container-body");
|
|
415
416
|
if (!e || e.length === 0) return 24;
|
|
416
|
-
const
|
|
417
|
-
if (!
|
|
418
|
-
|
|
419
|
-
const s =
|
|
420
|
-
e.forEach((
|
|
421
|
-
r.appendChild(
|
|
422
|
-
}), s ? s.before(r) :
|
|
423
|
-
const o = t(this, w), l = o.style.display,
|
|
417
|
+
const i = n.querySelector("tbody.bindable-tbody");
|
|
418
|
+
if (!i) return 24;
|
|
419
|
+
i.querySelectorAll("tr:not(.nodata)").forEach((y) => y.remove());
|
|
420
|
+
const s = i.querySelector("tr.nodata"), r = document.createDocumentFragment();
|
|
421
|
+
e.forEach((y) => {
|
|
422
|
+
r.appendChild(y.cloneNode(!0));
|
|
423
|
+
}), s ? s.before(r) : i.appendChild(r);
|
|
424
|
+
const o = t(this, w), l = o.style.display, c = o.style.visibility, a = o.style.position;
|
|
424
425
|
(l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
|
|
425
426
|
let f = 0;
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
f +=
|
|
429
|
-
}),
|
|
427
|
+
const g = i.querySelectorAll("tr:not(.nodata)");
|
|
428
|
+
return g.forEach((y) => {
|
|
429
|
+
f += y.offsetHeight || y.getBoundingClientRect().height;
|
|
430
|
+
}), g.forEach((y) => y.remove()), o.style.display = l, o.style.visibility = c, o.style.position = a, u(this, T, f > 0 ? f : 24), t(this, yt).call(this), t(this, T);
|
|
430
431
|
}, "#measureAndCacheHeight"));
|
|
431
|
-
d(this,
|
|
432
|
-
const e = (t(this,
|
|
432
|
+
d(this, bt, /* @__PURE__ */ h(() => {
|
|
433
|
+
const e = (t(this, z).data.get() || []).length, i = t(this, T) || 24, s = e * i;
|
|
433
434
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
|
|
434
435
|
const o = t(this, w).querySelector(r);
|
|
435
436
|
if (!o) return;
|
|
@@ -437,275 +438,288 @@ const he = class he {
|
|
|
437
438
|
l && (l.style.height = `${s}px`);
|
|
438
439
|
});
|
|
439
440
|
}, "#updateVirtualScrollHeight"));
|
|
440
|
-
d(this,
|
|
441
|
-
if (t(this,
|
|
442
|
-
const
|
|
443
|
-
|
|
441
|
+
d(this, yt, /* @__PURE__ */ h(() => {
|
|
442
|
+
if (t(this, j) > 0 && t(this, T) > 0) {
|
|
443
|
+
const n = Math.ceil(t(this, j) / t(this, T));
|
|
444
|
+
u(this, ut, n + t(this, kt));
|
|
444
445
|
}
|
|
445
446
|
}, "#updateRowCount"));
|
|
446
|
-
d(this,
|
|
447
|
-
var
|
|
448
|
-
const
|
|
449
|
-
if (
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
447
|
+
d(this, Ht, /* @__PURE__ */ h(() => {
|
|
448
|
+
var l, c, a, f, g, y;
|
|
449
|
+
const n = t(this, w).querySelector(".ng-container-left .ng-part-body table"), e = t(this, w).querySelector(".ng-container-body .ng-part-body table"), i = t(this, w).querySelector(".ng-container-right .ng-part-body table");
|
|
450
|
+
if (e) {
|
|
451
|
+
const b = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), v = i ? Array.from(i.querySelectorAll("tbody tr")) : [], M = Math.max(b.length, p.length, v.length);
|
|
452
|
+
for (let x = 0; x < M; x++) {
|
|
453
|
+
const tt = [
|
|
454
|
+
((l = b[x]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
455
|
+
((c = p[x]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
456
|
+
((a = v[x]) == null ? void 0 : a.getBoundingClientRect().height) || 0
|
|
457
|
+
], O = Math.max(...tt);
|
|
458
|
+
O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
const s = t(this, w).querySelector(".ng-container-left .ng-part-footer table"), r = t(this, w).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, w).querySelector(".ng-container-right .ng-part-footer table");
|
|
462
|
+
if (r) {
|
|
463
|
+
const b = s ? Array.from(s.querySelectorAll("tfoot tr")) : [], p = Array.from(r.querySelectorAll("tfoot tr")), v = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], M = Math.max(b.length, p.length, v.length);
|
|
464
|
+
for (let x = 0; x < M; x++) {
|
|
465
|
+
const tt = [
|
|
466
|
+
((f = b[x]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
|
|
467
|
+
((g = p[x]) == null ? void 0 : g.getBoundingClientRect().height) || 0,
|
|
468
|
+
((y = v[x]) == null ? void 0 : y.getBoundingClientRect().height) || 0
|
|
469
|
+
], O = Math.max(...tt);
|
|
470
|
+
O > 0 && (b[x] && (b[x].style.height = `${O}px`), p[x] && (p[x].style.height = `${O}px`), v[x] && (v[x].style.height = `${O}px`));
|
|
471
|
+
}
|
|
458
472
|
}
|
|
459
473
|
}, "#syncRowHeights"));
|
|
460
|
-
d(this,
|
|
461
|
-
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (
|
|
462
|
-
for (const e of
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
474
|
+
d(this, Mt, /* @__PURE__ */ h(() => {
|
|
475
|
+
!t(this, w) || !(t(this, w) instanceof HTMLElement) || (u(this, P, new ResizeObserver((n) => {
|
|
476
|
+
for (const e of n) {
|
|
477
|
+
const i = e.target;
|
|
478
|
+
if (!i.classList.contains("active")) continue;
|
|
465
479
|
const s = e.contentRect.height;
|
|
466
480
|
if (s > 0) {
|
|
467
481
|
let r = 0;
|
|
468
|
-
const o =
|
|
482
|
+
const o = i.querySelector(".ng-part-header"), l = i.querySelector(".ng-part-footer");
|
|
469
483
|
o && (r += o.offsetHeight), l && (r += l.offsetHeight);
|
|
470
|
-
const
|
|
471
|
-
t(this,
|
|
484
|
+
const c = Math.max(s - r, 100);
|
|
485
|
+
t(this, j) !== c && (u(this, j, c), t(this, yt).call(this), t(this, T) !== null && t(this, pt).call(this));
|
|
472
486
|
}
|
|
473
487
|
}
|
|
474
|
-
})), t(this,
|
|
488
|
+
})), t(this, P).observe(t(this, w)));
|
|
475
489
|
}, "#initResizeObserver"));
|
|
476
|
-
d(this,
|
|
477
|
-
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((
|
|
478
|
-
const e = t(this, w).querySelector(
|
|
479
|
-
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this,
|
|
480
|
-
}), t(this,
|
|
490
|
+
d(this, pt, /* @__PURE__ */ h(() => {
|
|
491
|
+
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
|
|
492
|
+
const e = t(this, w).querySelector(n);
|
|
493
|
+
e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Lt).call(this, e, n);
|
|
494
|
+
}), t(this, $t).call(this), t(this, Ht).call(this);
|
|
481
495
|
}, "#renderAllContainers"));
|
|
482
|
-
d(this,
|
|
496
|
+
d(this, _t, /* @__PURE__ */ h((n) => {
|
|
483
497
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
|
|
484
498
|
var a;
|
|
485
|
-
const
|
|
486
|
-
if (!
|
|
487
|
-
const s =
|
|
499
|
+
const i = t(this, w).querySelector(e);
|
|
500
|
+
if (!i) return;
|
|
501
|
+
const s = i.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
488
502
|
if (!s) return;
|
|
489
|
-
const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this,
|
|
490
|
-
r.forEach((f,
|
|
491
|
-
const
|
|
492
|
-
if (
|
|
503
|
+
const r = Array.from(s.querySelectorAll("tr:not(.nodata)")), o = ((a = t(this, W).get(e)) == null ? void 0 : a.length) || 1, c = (t(this, z).data.get() || []).length;
|
|
504
|
+
r.forEach((f, g) => {
|
|
505
|
+
const y = n + Math.floor(g / o);
|
|
506
|
+
if (y >= c) {
|
|
493
507
|
f.style.display = "none";
|
|
494
508
|
return;
|
|
495
509
|
}
|
|
496
|
-
const
|
|
497
|
-
f.style.display = "", t(this,
|
|
510
|
+
const b = t(this, z).data.get(y);
|
|
511
|
+
f.style.display = "", t(this, mt).call(this, f, b, y);
|
|
498
512
|
});
|
|
499
513
|
});
|
|
500
514
|
}, "#adjustBufferRows"));
|
|
501
|
-
d(this,
|
|
502
|
-
var
|
|
503
|
-
const e = t(this,
|
|
515
|
+
d(this, it, /* @__PURE__ */ h((n) => {
|
|
516
|
+
var c;
|
|
517
|
+
const e = t(this, T);
|
|
504
518
|
if (!e || e <= 0) return;
|
|
505
|
-
const s = (t(this,
|
|
519
|
+
const s = (t(this, z).data.get() || []).length, r = Math.max(0, Math.floor(n / e)), o = r * e, l = ((c = t(this, W).get(".ng-container-body")) == null ? void 0 : c.length) || 1;
|
|
506
520
|
[".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((a) => {
|
|
507
521
|
const f = t(this, w).querySelector(a);
|
|
508
522
|
if (!f) return;
|
|
509
|
-
const
|
|
510
|
-
if (!
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
514
|
-
|
|
523
|
+
const g = f.querySelector(".ng-part-body tbody.bindable-tbody");
|
|
524
|
+
if (!g) return;
|
|
525
|
+
g.style.transform = `translateY(${o}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((b, p) => {
|
|
526
|
+
const v = r + Math.floor(p / l);
|
|
527
|
+
if (v >= s) {
|
|
528
|
+
b.style.display = "none";
|
|
515
529
|
return;
|
|
516
530
|
}
|
|
517
|
-
const
|
|
518
|
-
|
|
531
|
+
const M = t(this, z).data.get(v);
|
|
532
|
+
b.style.display = "", t(this, mt).call(this, b, M, v);
|
|
519
533
|
});
|
|
520
|
-
}), t(this,
|
|
521
|
-
t(this,
|
|
534
|
+
}), t(this, nt) || (u(this, nt, !0), setTimeout(() => {
|
|
535
|
+
t(this, _t).call(this, r), u(this, nt, !1);
|
|
522
536
|
}, 0));
|
|
523
537
|
}, "#handleScroll"));
|
|
524
|
-
d(this,
|
|
525
|
-
|
|
538
|
+
d(this, mt, /* @__PURE__ */ h((n, e, i) => {
|
|
539
|
+
n.dataset.row = i, Array.from(n.cells).forEach((s, r) => {
|
|
526
540
|
const o = s.dataset.bind;
|
|
527
|
-
o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${
|
|
541
|
+
o && e && e[o] !== void 0 ? s.textContent = e[o] : s.textContent = e ? e[Object.keys(e)[r]] ?? `R${i}C${r}` : `ν ${i + 1}`, s.dataset.row = i;
|
|
528
542
|
});
|
|
529
543
|
}, "#bindRowData"));
|
|
530
|
-
d(this,
|
|
531
|
-
var
|
|
532
|
-
const
|
|
544
|
+
d(this, $t, /* @__PURE__ */ h(() => {
|
|
545
|
+
var c, a, f;
|
|
546
|
+
const n = t(this, w).querySelector(".ng-container-left .ng-part-header table"), e = t(this, w).querySelector(".ng-container-body .ng-part-header table"), i = t(this, w).querySelector(".ng-container-right .ng-part-header table");
|
|
533
547
|
if (!e) return;
|
|
534
|
-
const s =
|
|
535
|
-
for (let
|
|
536
|
-
const
|
|
537
|
-
((
|
|
538
|
-
((a = r[
|
|
539
|
-
((f = o[
|
|
540
|
-
],
|
|
541
|
-
|
|
548
|
+
const s = n ? Array.from(n.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = i ? Array.from(i.querySelectorAll("tr")) : [], l = Math.max(s.length, r.length, o.length);
|
|
549
|
+
for (let g = 0; g < l; g++) {
|
|
550
|
+
const y = [
|
|
551
|
+
((c = s[g]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
|
|
552
|
+
((a = r[g]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
553
|
+
((f = o[g]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
554
|
+
], b = Math.max(...y);
|
|
555
|
+
b > 0 && (s[g] && (s[g].style.height = `${b}px`), r[g] && (r[g].style.height = `${b}px`), o[g] && (o[g].style.height = `${b}px`));
|
|
542
556
|
}
|
|
543
557
|
}, "#syncHeaderHeights"));
|
|
544
|
-
|
|
545
|
-
t(this,
|
|
558
|
+
E(this, "destroy", /* @__PURE__ */ h(() => {
|
|
559
|
+
t(this, P) && (t(this, P).disconnect(), u(this, P, null));
|
|
546
560
|
}, "destroy"));
|
|
547
|
-
|
|
561
|
+
u(this, z, n.getRootNode().host), u(this, w, n), t(this, Mt).call(this);
|
|
548
562
|
}
|
|
549
563
|
getRowHeight() {
|
|
550
|
-
return t(this,
|
|
564
|
+
return t(this, T);
|
|
551
565
|
}
|
|
552
|
-
templateLength(
|
|
566
|
+
templateLength(n = ".ng-container-body") {
|
|
553
567
|
var e;
|
|
554
|
-
return ((e = t(this,
|
|
568
|
+
return ((e = t(this, W).get(n)) == null ? void 0 : e.length) || 1;
|
|
555
569
|
}
|
|
556
570
|
};
|
|
557
|
-
|
|
558
|
-
let
|
|
559
|
-
var
|
|
560
|
-
const
|
|
571
|
+
z = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), P = new WeakMap(), j = new WeakMap(), ut = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), yt = new WeakMap(), Ht = new WeakMap(), Mt = new WeakMap(), pt = new WeakMap(), _t = new WeakMap(), it = new WeakMap(), mt = new WeakMap(), $t = new WeakMap(), h(fe, "RowManager");
|
|
572
|
+
let te = fe;
|
|
573
|
+
var It, st;
|
|
574
|
+
const _ = class _ {
|
|
561
575
|
/**
|
|
562
576
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
563
577
|
*/
|
|
564
|
-
static compileAll(
|
|
565
|
-
return Array.isArray(
|
|
578
|
+
static compileAll(n) {
|
|
579
|
+
return Array.isArray(n) ? n.map((e) => _.compile(e)) : [];
|
|
566
580
|
}
|
|
567
581
|
/**
|
|
568
582
|
* π― λ¨μΌ μλ³Έ ν
μ΄λΈμ λ°μ κΈ°λ³Έ ꡬ쑰 보μ λ° 2μ°¨μ 격μ μΈλ±μ€ μ¬μ λΆμ¬ μλ£λ λ§μ€ν° ν
μ΄λΈ λ°ν
|
|
569
583
|
*/
|
|
570
|
-
static compile(
|
|
584
|
+
static compile(n) {
|
|
571
585
|
var s, r, o, l;
|
|
572
|
-
if (!
|
|
573
|
-
const e =
|
|
574
|
-
return t(s =
|
|
575
|
-
const f =
|
|
576
|
-
f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((
|
|
577
|
-
|
|
586
|
+
if (!n) return null;
|
|
587
|
+
const e = n.cloneNode(!0);
|
|
588
|
+
return t(s = _, It).call(s, e), t(r = _, st).call(r, e, "thead"), t(o = _, st).call(o, e, "tbody"), t(l = _, st).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, a) => {
|
|
589
|
+
const f = c.getAttribute("fixed");
|
|
590
|
+
f && e.querySelectorAll(`thead [data-col="${a}"], tbody [data-col="${a}"], tfoot [data-col="${a}"]`).forEach((g) => {
|
|
591
|
+
g.setAttribute("fixed", f);
|
|
578
592
|
});
|
|
579
593
|
}), e;
|
|
580
594
|
}
|
|
581
595
|
};
|
|
582
|
-
|
|
583
|
-
if (!
|
|
584
|
-
const e =
|
|
585
|
-
for (let o = 0; o <
|
|
596
|
+
It = new WeakMap(), st = new WeakMap(), h(_, "TableCompiler"), d(_, It, /* @__PURE__ */ h((n) => {
|
|
597
|
+
if (!n.querySelector("colgroup")) {
|
|
598
|
+
const e = n.querySelector("tbody tr") || n.querySelector("tr"), i = e ? e.querySelectorAll("th, td").length : 1, s = document.createElement("colgroup"), r = Math.max(Math.floor(n.clientWidth / i), 100);
|
|
599
|
+
for (let o = 0; o < i; o++) {
|
|
586
600
|
const l = document.createElement("col");
|
|
587
601
|
l.setAttribute("width", r), s.appendChild(l);
|
|
588
602
|
}
|
|
589
|
-
|
|
603
|
+
n.prepend(s);
|
|
590
604
|
}
|
|
591
|
-
if (!
|
|
592
|
-
const e = document.createElement("thead"),
|
|
593
|
-
|
|
605
|
+
if (!n.querySelector("thead")) {
|
|
606
|
+
const e = document.createElement("thead"), i = n.querySelector("colgroup");
|
|
607
|
+
i ? i.after(e) : n.prepend(e);
|
|
594
608
|
}
|
|
595
|
-
|
|
596
|
-
}, "#ensureTableStructure")), d(
|
|
597
|
-
const
|
|
609
|
+
n.classList.add("nine-table-element"), n.style.display = "table";
|
|
610
|
+
}, "#ensureTableStructure")), d(_, st, /* @__PURE__ */ h((n, e) => {
|
|
611
|
+
const i = Array.from(n.querySelectorAll(e + " tr")), s = Array.from(n.querySelectorAll(e + " th," + e + " td")), r = i.length;
|
|
598
612
|
if (r === 0 || s.length === 0) return;
|
|
599
613
|
let o = 0;
|
|
600
|
-
s.forEach((
|
|
601
|
-
o +=
|
|
614
|
+
s.forEach((c) => {
|
|
615
|
+
o += c.colSpan || 1;
|
|
602
616
|
});
|
|
603
617
|
const l = Array.from(Array(r), () => Array(o).fill(null));
|
|
604
|
-
|
|
605
|
-
const a =
|
|
618
|
+
i.forEach((c) => {
|
|
619
|
+
const a = c.sectionRowIndex;
|
|
606
620
|
let f = 0;
|
|
607
|
-
Array.from(
|
|
608
|
-
for (let
|
|
609
|
-
if (l[a][
|
|
610
|
-
f =
|
|
621
|
+
Array.from(c.querySelectorAll("th,td")).forEach((g) => {
|
|
622
|
+
for (let p = 0; p < l[a].length; p++)
|
|
623
|
+
if (l[a][p] === null) {
|
|
624
|
+
f = p;
|
|
611
625
|
break;
|
|
612
626
|
}
|
|
613
|
-
const
|
|
614
|
-
for (let
|
|
615
|
-
for (let
|
|
616
|
-
a +
|
|
627
|
+
const y = g.rowSpan || 1, b = g.colSpan || 1;
|
|
628
|
+
for (let p = 0; p < y; p++)
|
|
629
|
+
for (let v = 0; v < b; v++)
|
|
630
|
+
a + p < r && f + v < o && (l[a + p][f + v] = p === 0 && v === 0 ? "1" : "0");
|
|
617
631
|
});
|
|
618
|
-
}),
|
|
619
|
-
const a =
|
|
620
|
-
Array.from(
|
|
621
|
-
for (let
|
|
622
|
-
if (l[a][
|
|
623
|
-
f.dataset.col =
|
|
632
|
+
}), i.forEach((c) => {
|
|
633
|
+
const a = c.sectionRowIndex;
|
|
634
|
+
Array.from(c.querySelectorAll("th,td")).forEach((f) => {
|
|
635
|
+
for (let g = 0; g < l[a].length; g++)
|
|
636
|
+
if (l[a][g] === "1") {
|
|
637
|
+
f.dataset.col = g, l[a][g] = "0";
|
|
624
638
|
break;
|
|
625
639
|
}
|
|
626
640
|
});
|
|
627
641
|
});
|
|
628
642
|
}, "#resetColIndex"));
|
|
629
|
-
let
|
|
630
|
-
var
|
|
631
|
-
const
|
|
643
|
+
let ee = _;
|
|
644
|
+
var Wt, K, Z, Ot, zt, ot, Bt, Nt;
|
|
645
|
+
const ht = class ht extends HTMLElement {
|
|
632
646
|
constructor() {
|
|
633
647
|
super();
|
|
634
|
-
d(this,
|
|
635
|
-
d(this,
|
|
636
|
-
d(this,
|
|
637
|
-
|
|
638
|
-
var e,
|
|
639
|
-
t(this,
|
|
648
|
+
d(this, Wt);
|
|
649
|
+
d(this, K, null);
|
|
650
|
+
d(this, Z);
|
|
651
|
+
E(this, "invalidate", /* @__PURE__ */ h(() => {
|
|
652
|
+
var e, i;
|
|
653
|
+
t(this, Z).refresh(), (e = this.querySelector("nine-table-hscrollbar")) == null || e.refresh(), (i = this.querySelector("nine-table-vscrollbar")) == null || i.refresh();
|
|
640
654
|
}, "invalidate"));
|
|
641
|
-
d(this,
|
|
655
|
+
d(this, Ot, /* @__PURE__ */ h(() => {
|
|
642
656
|
[
|
|
643
657
|
{ selector: ".ng-container-body", type: null },
|
|
644
658
|
{ selector: ".ng-container-left", type: "left" },
|
|
645
659
|
{ selector: ".ng-container-right", type: "right" }
|
|
646
|
-
].forEach(({ selector:
|
|
647
|
-
const r = this.querySelector(
|
|
660
|
+
].forEach(({ selector: i, type: s }) => {
|
|
661
|
+
const r = this.querySelector(i);
|
|
648
662
|
if (!r) return;
|
|
649
663
|
r.innerHTML = "";
|
|
650
664
|
const o = document.createElement("div");
|
|
651
|
-
o.className = "ng-part-header", o.appendChild(t(this,
|
|
665
|
+
o.className = "ng-part-header", o.appendChild(t(this, ot).call(this, t(this, K), s, "header"));
|
|
652
666
|
const l = document.createElement("div");
|
|
653
667
|
l.className = "ng-part-body";
|
|
654
|
-
const
|
|
655
|
-
|
|
668
|
+
const c = document.createElement("div");
|
|
669
|
+
c.className = "ng-scroll-content", c.style.position = "relative", c.style.width = "100%", c.appendChild(t(this, ot).call(this, t(this, K), s, "body"));
|
|
656
670
|
const a = document.createElement("div");
|
|
657
|
-
a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none",
|
|
671
|
+
a.className = "ng-virtual-spacer", a.style.width = "100%", a.style.pointerEvents = "none", c.appendChild(a), l.appendChild(c);
|
|
658
672
|
const f = document.createElement("div");
|
|
659
|
-
f.className = "ng-part-footer", f.appendChild(t(this,
|
|
673
|
+
f.className = "ng-part-footer", f.appendChild(t(this, ot).call(this, t(this, K), s, "footer")), r.appendChild(o), r.appendChild(l), r.appendChild(f);
|
|
660
674
|
});
|
|
661
675
|
}, "#renderSplitContainers"));
|
|
662
|
-
d(this,
|
|
676
|
+
d(this, zt, /* @__PURE__ */ h(() => {
|
|
663
677
|
["left", "right", "body"].forEach((e) => {
|
|
664
|
-
const
|
|
665
|
-
if (!
|
|
678
|
+
const i = this.querySelector(`.ng-container-${e}`), s = i == null ? void 0 : i.querySelectorAll("table");
|
|
679
|
+
if (!i || !s || s.length === 0) return;
|
|
666
680
|
let r = 0;
|
|
667
681
|
s[0].querySelectorAll("col").forEach((o) => {
|
|
668
682
|
const l = parseInt(o.getAttribute("width"), 10);
|
|
669
683
|
isNaN(r) || (r += l);
|
|
670
|
-
}), e === "body" ?
|
|
684
|
+
}), e === "body" ? i.style.flex = "1" : (i.style.flex = `0 0 ${r}px`, i.style.width = `${r}px`);
|
|
671
685
|
});
|
|
672
686
|
}, "#updateContainerWidths"));
|
|
673
|
-
|
|
674
|
-
e && (
|
|
675
|
-
var
|
|
676
|
-
(
|
|
687
|
+
E(this, "generate", /* @__PURE__ */ h((e) => {
|
|
688
|
+
e && (u(this, K, ee.compile(e)), t(this, Ot).call(this), t(this, zt).call(this), t(this, Z).initialize(), setTimeout(() => {
|
|
689
|
+
var i;
|
|
690
|
+
(i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
|
|
677
691
|
}, 0));
|
|
678
692
|
}, "generate"));
|
|
679
|
-
d(this,
|
|
680
|
-
const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"),
|
|
693
|
+
d(this, ot, /* @__PURE__ */ h((e, i, s) => {
|
|
694
|
+
const r = e.cloneNode(!0), o = r.querySelector("thead"), l = r.querySelector("tbody"), c = r.querySelector("tfoot");
|
|
681
695
|
if (s === "header") {
|
|
682
|
-
if (l && l.remove(),
|
|
696
|
+
if (l && l.remove(), c && c.remove(), e.querySelector("tbody")) {
|
|
683
697
|
const f = document.createElement("tbody");
|
|
684
698
|
f.className = "fixed-tbody", r.appendChild(f);
|
|
685
699
|
}
|
|
686
|
-
} else s === "body" ? (o && o.remove(),
|
|
687
|
-
return
|
|
700
|
+
} else s === "body" ? (o && o.remove(), c && c.remove(), l && (l.className = "bindable-tbody")) : s === "footer" && (o && o.remove(), l && l.remove());
|
|
701
|
+
return i === "left" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
|
|
688
702
|
a.getAttribute("fixed") !== "left" && a.remove();
|
|
689
|
-
}) :
|
|
703
|
+
}) : i === "right" ? r.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((a) => {
|
|
690
704
|
a.getAttribute("fixed") !== "right" && a.remove();
|
|
691
705
|
}) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((a) => {
|
|
692
706
|
a.remove();
|
|
693
707
|
}), r;
|
|
694
708
|
}, "#createSplitTable"));
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
const
|
|
698
|
-
|
|
709
|
+
E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, Z).getRowHeight(), "getRowHeight"));
|
|
710
|
+
E(this, "scrollToX", /* @__PURE__ */ h((e) => {
|
|
711
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
712
|
+
i && (i.scrollLeft = e);
|
|
699
713
|
}, "scrollToX"));
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
|
|
714
|
+
E(this, "scrollToY", /* @__PURE__ */ h((e) => {
|
|
715
|
+
const i = this.querySelector(".ng-container-body .ng-part-body");
|
|
716
|
+
i && (i.scrollTop = e);
|
|
703
717
|
}, "scrollToY"));
|
|
704
|
-
d(this,
|
|
705
|
-
t(this,
|
|
718
|
+
d(this, Bt, /* @__PURE__ */ h(() => {
|
|
719
|
+
t(this, Nt).call(this);
|
|
706
720
|
}, "#init"));
|
|
707
|
-
d(this,
|
|
708
|
-
const e =
|
|
721
|
+
d(this, Nt, /* @__PURE__ */ h(() => {
|
|
722
|
+
const e = ht.SCROLLBAR_SIZE;
|
|
709
723
|
this.innerHTML = `
|
|
710
724
|
<style>
|
|
711
725
|
nine-table-sheet {
|
|
@@ -846,55 +860,55 @@ const ct = class ct extends HTMLElement {
|
|
|
846
860
|
</div>
|
|
847
861
|
`;
|
|
848
862
|
}, "#render"));
|
|
849
|
-
|
|
863
|
+
u(this, Z, new te(this)), u(this, Wt, this.getRootNode().host);
|
|
850
864
|
}
|
|
851
865
|
connectedCallback() {
|
|
852
|
-
t(this,
|
|
866
|
+
t(this, Bt).call(this);
|
|
853
867
|
}
|
|
854
868
|
disconnectedCallback() {
|
|
855
|
-
this.innerHTML = "",
|
|
869
|
+
this.innerHTML = "", dt.log("NineTableSheet destroyed.");
|
|
856
870
|
}
|
|
857
871
|
};
|
|
858
|
-
|
|
859
|
-
let
|
|
860
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
861
|
-
var
|
|
862
|
-
const
|
|
872
|
+
Wt = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), Ot = new WeakMap(), zt = new WeakMap(), ot = new WeakMap(), Bt = new WeakMap(), Nt = new WeakMap(), h(ht, "NineTableSheet"), E(ht, "SCROLLBAR_SIZE", 16);
|
|
873
|
+
let Rt = ht;
|
|
874
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Rt);
|
|
875
|
+
var Pt, xt;
|
|
876
|
+
const ge = class ge extends HTMLElement {
|
|
863
877
|
constructor() {
|
|
864
878
|
super();
|
|
865
|
-
d(this,
|
|
879
|
+
d(this, Pt, /* @__PURE__ */ h(() => {
|
|
866
880
|
var e;
|
|
867
|
-
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (
|
|
881
|
+
(e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (i) => {
|
|
868
882
|
var o;
|
|
869
|
-
const s =
|
|
870
|
-
t(this,
|
|
871
|
-
}), t(this,
|
|
883
|
+
const s = i.ctrlKey || i.metaKey || i.shiftKey, r = parseInt((o = i.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
884
|
+
t(this, xt).call(this, r, s);
|
|
885
|
+
}), t(this, xt).call(this, 0, !1);
|
|
872
886
|
}, "#init"));
|
|
873
|
-
d(this,
|
|
874
|
-
const s = /* @__PURE__ */
|
|
887
|
+
d(this, xt, /* @__PURE__ */ h((e, i = !1) => {
|
|
888
|
+
const s = /* @__PURE__ */ h(() => {
|
|
875
889
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
876
|
-
Array.from(this.querySelectorAll("nine-splitter")).forEach((
|
|
877
|
-
const
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
|
|
890
|
+
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
891
|
+
const y = f.filter((b) => b.classList.contains("active"));
|
|
892
|
+
y.length < 2 || y.forEach((b) => {
|
|
893
|
+
const p = parseInt(b.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${p}"]`), M = f[p + 1];
|
|
894
|
+
v && M && M.classList.contains("active") && v.style.setProperty("display", "flex");
|
|
881
895
|
});
|
|
882
|
-
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"),
|
|
896
|
+
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
|
|
883
897
|
if (!l[e]) return;
|
|
884
|
-
if (!
|
|
885
|
-
l.forEach((f,
|
|
886
|
-
f.classList.toggle("active",
|
|
887
|
-
}),
|
|
888
|
-
const
|
|
889
|
-
f.classList.toggle("active",
|
|
898
|
+
if (!i)
|
|
899
|
+
l.forEach((f, g) => {
|
|
900
|
+
f.classList.toggle("active", g === e);
|
|
901
|
+
}), c.forEach((f, g) => {
|
|
902
|
+
const y = g === e;
|
|
903
|
+
f.classList.toggle("active", y), f.style.flex = y ? "1 1 100%" : "";
|
|
890
904
|
});
|
|
891
905
|
else {
|
|
892
|
-
const f = l[e],
|
|
893
|
-
if (f.classList.contains("active") &&
|
|
906
|
+
const f = l[e], g = r.querySelectorAll(".nine-tab-item.active");
|
|
907
|
+
if (f.classList.contains("active") && g.length <= 1)
|
|
894
908
|
return;
|
|
895
909
|
f.classList.toggle("active");
|
|
896
|
-
const
|
|
897
|
-
|
|
910
|
+
const y = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
|
|
911
|
+
y && (y.classList.toggle("active"), y.classList.contains("active") || (y.style.flex = ""));
|
|
898
912
|
}
|
|
899
913
|
const a = o.querySelectorAll("nine-table-sheet.active");
|
|
900
914
|
a == null || a.forEach((f) => {
|
|
@@ -903,42 +917,42 @@ const de = class de extends HTMLElement {
|
|
|
903
917
|
}, "#switchSheet"));
|
|
904
918
|
}
|
|
905
919
|
connectedCallback() {
|
|
906
|
-
t(this,
|
|
920
|
+
t(this, Pt).call(this);
|
|
907
921
|
}
|
|
908
922
|
};
|
|
909
|
-
|
|
910
|
-
let
|
|
911
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
912
|
-
var
|
|
913
|
-
const
|
|
914
|
-
constructor(
|
|
915
|
-
d(this,
|
|
916
|
-
d(this,
|
|
917
|
-
t(this,
|
|
918
|
-
for (let e of
|
|
919
|
-
t(this,
|
|
920
|
-
}).observe(t(this,
|
|
923
|
+
Pt = new WeakMap(), xt = new WeakMap(), h(ge, "NineTableSheets");
|
|
924
|
+
let ne = ge;
|
|
925
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", ne);
|
|
926
|
+
var k, Dt, vt, Yt;
|
|
927
|
+
const ue = class ue {
|
|
928
|
+
constructor(n) {
|
|
929
|
+
d(this, k);
|
|
930
|
+
d(this, Dt, /* @__PURE__ */ h(() => {
|
|
931
|
+
t(this, Yt).call(this), new ResizeObserver((n) => {
|
|
932
|
+
for (let e of n)
|
|
933
|
+
t(this, k).getAttribute("auto-height") === "true" && t(this, vt).call(this);
|
|
934
|
+
}).observe(t(this, k));
|
|
921
935
|
}, "#init"));
|
|
922
|
-
d(this,
|
|
923
|
-
var
|
|
924
|
-
const
|
|
925
|
-
if (
|
|
926
|
-
const e = parseInt(t(this,
|
|
927
|
-
t(this,
|
|
936
|
+
d(this, vt, /* @__PURE__ */ h(() => {
|
|
937
|
+
var c, a;
|
|
938
|
+
const n = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
939
|
+
if (n.length === 0) return;
|
|
940
|
+
const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, i = Math.max(...n.map((f) => f.getRowHeight())), s = (c = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, r = (a = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : a.getBoundingClientRect().height, o = Rt.SCROLLBAR_SIZE, l = e * i + s + r + o;
|
|
941
|
+
t(this, k).style.height = `${l}px`;
|
|
928
942
|
}, "#applyAutoHeight"));
|
|
929
|
-
d(this,
|
|
930
|
-
const e = Array.from(t(this,
|
|
931
|
-
const
|
|
932
|
-
return
|
|
933
|
-
}).join(""), o = e.map((
|
|
934
|
-
t(this,
|
|
943
|
+
d(this, Yt, /* @__PURE__ */ h(() => {
|
|
944
|
+
const e = Array.from(t(this, k).children).filter((c) => c.tagName === "TABLE"), i = t(this, k).getAttribute("auto-height") === "true", s = e.length, r = e.map((c, a) => {
|
|
945
|
+
const g = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, y = a < s - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
|
|
946
|
+
return g + y;
|
|
947
|
+
}).join(""), o = e.map((c, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
|
|
948
|
+
t(this, k).shadowRoot.innerHTML = `
|
|
935
949
|
<style>
|
|
936
950
|
:host {
|
|
937
951
|
display: flex;
|
|
938
952
|
flex-direction: column;
|
|
939
953
|
position: relative;
|
|
940
954
|
overflow: hidden;
|
|
941
|
-
height: ${
|
|
955
|
+
height: ${i ? "auto" : "100%"};
|
|
942
956
|
background: #fff;
|
|
943
957
|
}
|
|
944
958
|
|
|
@@ -1022,235 +1036,235 @@ const fe = class fe {
|
|
|
1022
1036
|
</nine-table-body>
|
|
1023
1037
|
<nine-table-footer></nine-table-footer>
|
|
1024
1038
|
`;
|
|
1025
|
-
const l = t(this,
|
|
1026
|
-
l == null || l.forEach((
|
|
1039
|
+
const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
1040
|
+
l == null || l.forEach((c, a) => {
|
|
1027
1041
|
e[a] && setTimeout(() => {
|
|
1028
|
-
|
|
1042
|
+
c.generate(e[a]), i && t(this, vt).call(this);
|
|
1029
1043
|
});
|
|
1030
1044
|
});
|
|
1031
1045
|
}, "#render"));
|
|
1032
|
-
|
|
1046
|
+
u(this, k, n), t(this, Dt).call(this);
|
|
1033
1047
|
}
|
|
1034
1048
|
};
|
|
1035
|
-
|
|
1036
|
-
let
|
|
1037
|
-
var
|
|
1038
|
-
const
|
|
1039
|
-
constructor(
|
|
1040
|
-
d(this,
|
|
1041
|
-
d(this,
|
|
1042
|
-
|
|
1043
|
-
|
|
1049
|
+
k = new WeakMap(), Dt = new WeakMap(), vt = new WeakMap(), Yt = new WeakMap(), h(ue, "LayoutManager");
|
|
1050
|
+
let ie = ue;
|
|
1051
|
+
var wt, rt;
|
|
1052
|
+
const be = class be {
|
|
1053
|
+
constructor(n) {
|
|
1054
|
+
d(this, wt);
|
|
1055
|
+
d(this, rt, -1);
|
|
1056
|
+
E(this, "count", /* @__PURE__ */ h(() => t(this, wt).rawRecords.length, "count"));
|
|
1057
|
+
u(this, wt, n);
|
|
1044
1058
|
}
|
|
1045
1059
|
get at() {
|
|
1046
|
-
return t(this,
|
|
1060
|
+
return t(this, rt);
|
|
1047
1061
|
}
|
|
1048
|
-
set at(
|
|
1049
|
-
|
|
1062
|
+
set at(n) {
|
|
1063
|
+
u(this, rt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, rt)}"]`) && setTimeout(() => {
|
|
1050
1064
|
});
|
|
1051
1065
|
}
|
|
1052
1066
|
};
|
|
1053
|
-
|
|
1054
|
-
let
|
|
1055
|
-
var
|
|
1056
|
-
const
|
|
1057
|
-
constructor(
|
|
1058
|
-
d(this,
|
|
1059
|
-
d(this,
|
|
1060
|
-
d(this,
|
|
1061
|
-
d(this,
|
|
1062
|
-
d(this,
|
|
1063
|
-
d(this,
|
|
1064
|
-
d(this,
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1067
|
-
Array.from(
|
|
1068
|
-
var
|
|
1069
|
-
t(this,
|
|
1070
|
-
}), (t(this,
|
|
1071
|
-
e.__ng || (e.__ng = t(this,
|
|
1067
|
+
wt = new WeakMap(), rt = new WeakMap(), h(be, "ngRow");
|
|
1068
|
+
let se = be;
|
|
1069
|
+
var L, A, C, lt, Ft, D, Vt, G, St, Xt, Ut, at;
|
|
1070
|
+
const H = class H {
|
|
1071
|
+
constructor(n, e) {
|
|
1072
|
+
d(this, L);
|
|
1073
|
+
d(this, A);
|
|
1074
|
+
d(this, C, []);
|
|
1075
|
+
d(this, lt, []);
|
|
1076
|
+
d(this, Ft, 0);
|
|
1077
|
+
d(this, D, []);
|
|
1078
|
+
d(this, Vt, /* @__PURE__ */ h(() => {
|
|
1079
|
+
u(this, D, []);
|
|
1080
|
+
const n = t(this, L).template || [];
|
|
1081
|
+
Array.from(n).forEach((e) => {
|
|
1082
|
+
var i;
|
|
1083
|
+
t(this, D).push(((i = e.getBoundingClientRect) == null ? void 0 : i.call(e).height) || 24);
|
|
1084
|
+
}), (t(this, A).rawRecords || []).forEach((e) => {
|
|
1085
|
+
e.__ng || (e.__ng = t(this, St).call(this)), e.__ng.height = t(this, D).slice();
|
|
1072
1086
|
});
|
|
1073
1087
|
}, "#initialize"));
|
|
1074
|
-
d(this,
|
|
1075
|
-
t(this,
|
|
1076
|
-
|
|
1088
|
+
d(this, G, /* @__PURE__ */ h(() => {
|
|
1089
|
+
t(this, L).shadowRoot.querySelectorAll("nine-table-sheet").forEach((n) => {
|
|
1090
|
+
n.invalidate();
|
|
1077
1091
|
});
|
|
1078
1092
|
}, "#invalidate"));
|
|
1079
|
-
|
|
1093
|
+
E(this, "get", /* @__PURE__ */ h((n, e) => {
|
|
1080
1094
|
var r;
|
|
1081
|
-
const
|
|
1082
|
-
if (!
|
|
1083
|
-
if (
|
|
1084
|
-
if (
|
|
1085
|
-
const s = typeof ((r = t(this,
|
|
1095
|
+
const i = this.getValidData();
|
|
1096
|
+
if (!i || i.length <= 0) return;
|
|
1097
|
+
if (n == null) return t(this, at).call(this, i);
|
|
1098
|
+
if (n < 0 || n >= i.length) return null;
|
|
1099
|
+
const s = typeof ((r = t(this, L).fields) == null ? void 0 : r.get) == "function" ? t(this, L).fields.get() : [];
|
|
1086
1100
|
if (e != null) {
|
|
1087
1101
|
const o = s.indexOf(e);
|
|
1088
|
-
return o >= 0 ? n
|
|
1102
|
+
return o >= 0 ? i[n].v[o] : null;
|
|
1089
1103
|
}
|
|
1090
|
-
return t(this,
|
|
1104
|
+
return t(this, at).call(this, i[n]);
|
|
1091
1105
|
}, "get"));
|
|
1092
|
-
|
|
1093
|
-
this.clear(), this.add(
|
|
1106
|
+
E(this, "set", /* @__PURE__ */ h((n) => {
|
|
1107
|
+
this.clear(), this.add(n, !1), t(this, G).call(this);
|
|
1094
1108
|
}, "set"));
|
|
1095
|
-
d(this,
|
|
1096
|
-
rowState:
|
|
1109
|
+
d(this, St, /* @__PURE__ */ h(() => ({
|
|
1110
|
+
rowState: H.ROW_STATE.EMPTY,
|
|
1097
1111
|
deleted: !1,
|
|
1098
1112
|
filtered: !1,
|
|
1099
|
-
height: t(this,
|
|
1113
|
+
height: t(this, D).slice(),
|
|
1100
1114
|
o: {},
|
|
1101
1115
|
c: {},
|
|
1102
|
-
_: [0, 0, 0, 0,
|
|
1116
|
+
_: [0, 0, 0, 0, H.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, D).slice(), -1, {}, {}]
|
|
1103
1117
|
}), "#getDefaultMeta"));
|
|
1104
|
-
|
|
1105
|
-
|
|
1118
|
+
E(this, "reset", /* @__PURE__ */ h(() => {
|
|
1119
|
+
u(this, C, []), u(this, lt, []), t(this, G).call(this);
|
|
1106
1120
|
}, "reset"));
|
|
1107
|
-
|
|
1108
|
-
var
|
|
1109
|
-
t(this,
|
|
1121
|
+
E(this, "clear", /* @__PURE__ */ h(() => {
|
|
1122
|
+
var n;
|
|
1123
|
+
t(this, A).rawRecords = [], u(this, C, []), u(this, lt, []), (n = t(this, A).viewRecords) != null && n.reset && t(this, A).viewRecords.reset();
|
|
1110
1124
|
}, "clear"));
|
|
1111
|
-
d(this,
|
|
1125
|
+
d(this, Xt, /* @__PURE__ */ h((n) => {
|
|
1112
1126
|
var s;
|
|
1113
|
-
Array.isArray(
|
|
1114
|
-
const e = typeof ((s = t(this,
|
|
1115
|
-
return
|
|
1127
|
+
Array.isArray(n) || (n = [n]);
|
|
1128
|
+
const e = typeof ((s = t(this, L).fields) == null ? void 0 : s.get) == "function" ? t(this, L).fields.get() : Object.keys(n[0] || {}), i = [];
|
|
1129
|
+
return n.forEach((r) => {
|
|
1116
1130
|
const o = { v: [] };
|
|
1117
1131
|
e.forEach((l) => {
|
|
1118
1132
|
o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
|
|
1119
|
-
}),
|
|
1120
|
-
}),
|
|
1133
|
+
}), i.push(o);
|
|
1134
|
+
}), i;
|
|
1121
1135
|
}, "#json2Array"));
|
|
1122
|
-
d(this,
|
|
1123
|
-
e.__ng = t(this,
|
|
1124
|
-
}),
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
const
|
|
1128
|
-
t(this,
|
|
1136
|
+
d(this, Ut, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
|
|
1137
|
+
e.__ng = t(this, St).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = H.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
|
|
1138
|
+
}), n), "#defaultInsert"));
|
|
1139
|
+
E(this, "add", /* @__PURE__ */ h((n, e = !0) => {
|
|
1140
|
+
n === void 0 && (n = {});
|
|
1141
|
+
const i = t(this, Xt).call(this, n);
|
|
1142
|
+
t(this, A).rawRecords = t(this, A).rawRecords.concat(t(this, Ut).call(this, i)), this.resetRecords();
|
|
1129
1143
|
const s = this.count() - 1;
|
|
1130
|
-
return e ||
|
|
1131
|
-
const l = t(this,
|
|
1132
|
-
l && (l.__ng.rowState =
|
|
1133
|
-
}), t(this,
|
|
1144
|
+
return e || i.forEach((r, o) => {
|
|
1145
|
+
const l = t(this, A).rawRecords[s - o];
|
|
1146
|
+
l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
|
|
1147
|
+
}), t(this, G).call(this), s;
|
|
1134
1148
|
}, "add"));
|
|
1135
|
-
|
|
1149
|
+
E(this, "delete", /* @__PURE__ */ h((n) => {
|
|
1136
1150
|
let e = [];
|
|
1137
|
-
Array.isArray(
|
|
1138
|
-
if (t(this,
|
|
1139
|
-
const s = t(this,
|
|
1140
|
-
t(this,
|
|
1141
|
-
r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState =
|
|
1151
|
+
Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, A).host.row.at] : e = [parseInt(n, 10)], e.sort((i, s) => s - i).forEach((i) => {
|
|
1152
|
+
if (t(this, C)[i]) {
|
|
1153
|
+
const s = t(this, C)[i].__ng.rowid;
|
|
1154
|
+
t(this, C)[i].__ng.rowState === H.ROW_STATE.INSERT ? t(this, A).rawRecords = t(this, A).rawRecords.filter((r) => r.__ng.rowid !== s) : t(this, A).rawRecords.forEach((r) => {
|
|
1155
|
+
r.__ng.rowid === s && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
|
|
1142
1156
|
});
|
|
1143
1157
|
}
|
|
1144
|
-
}), this.resetRecords(), t(this,
|
|
1158
|
+
}), this.resetRecords(), t(this, G).call(this);
|
|
1145
1159
|
}, "delete"));
|
|
1146
|
-
|
|
1147
|
-
var
|
|
1148
|
-
|
|
1149
|
-
const r = (typeof ((
|
|
1160
|
+
E(this, "setValue", /* @__PURE__ */ h((n, e, i) => {
|
|
1161
|
+
var c;
|
|
1162
|
+
n = parseInt(n, 10);
|
|
1163
|
+
const r = (typeof ((c = t(this, L).fields) == null ? void 0 : c.get) == "function" ? t(this, L).fields.get() : []).indexOf(e);
|
|
1150
1164
|
if (r < 0) return;
|
|
1151
|
-
const o = this.getValidData()[
|
|
1165
|
+
const o = this.getValidData()[n];
|
|
1152
1166
|
if (!o) return;
|
|
1153
1167
|
const l = o.v[r];
|
|
1154
|
-
l !==
|
|
1168
|
+
l !== i && o.__ng.rowState !== H.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = H.ROW_STATE.UPDATE), o.v[r] = i;
|
|
1155
1169
|
}, "setValue"));
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}), t(this,
|
|
1160
|
-
|
|
1170
|
+
E(this, "resetRecords", /* @__PURE__ */ h(() => {
|
|
1171
|
+
u(this, lt, t(this, A).rawRecords.filter((n) => !n.__ng.deleted)), u(this, C, t(this, A).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, A).rawRecords.forEach((n, e) => {
|
|
1172
|
+
n.__ng.rowidx = e;
|
|
1173
|
+
}), t(this, C).forEach((n, e) => {
|
|
1174
|
+
n.__ng.i = e;
|
|
1161
1175
|
});
|
|
1162
1176
|
}, "resetRecords"));
|
|
1163
|
-
|
|
1164
|
-
d(this,
|
|
1177
|
+
E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, C).length === 0 && t(this, A).rawRecords.length > 0 && this.resetRecords(), t(this, C)), "getValidData"));
|
|
1178
|
+
d(this, at, /* @__PURE__ */ h((n) => {
|
|
1165
1179
|
var o;
|
|
1166
|
-
if (!
|
|
1167
|
-
const e = !Array.isArray(
|
|
1168
|
-
const
|
|
1180
|
+
if (!n) return n;
|
|
1181
|
+
const e = !Array.isArray(n), i = e ? [n] : n, s = typeof ((o = t(this, L).fields) == null ? void 0 : o.get) == "function" ? t(this, L).fields.get() : [], r = i.filter((l) => !l.__ng.deleted).map((l) => {
|
|
1182
|
+
const c = {};
|
|
1169
1183
|
return s.forEach((a, f) => {
|
|
1170
|
-
|
|
1171
|
-
}),
|
|
1184
|
+
c[a] = l.v ? l.v[f] : l[a];
|
|
1185
|
+
}), c.__ng = l.__ng, c;
|
|
1172
1186
|
});
|
|
1173
1187
|
return e ? r[0] : r;
|
|
1174
1188
|
}, "#conv"));
|
|
1175
|
-
|
|
1176
|
-
|
|
1189
|
+
E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
|
|
1190
|
+
u(this, L, n), u(this, A, e), t(this, Vt).call(this);
|
|
1177
1191
|
}
|
|
1178
1192
|
get source() {
|
|
1179
|
-
return t(this,
|
|
1193
|
+
return t(this, at).call(this, t(this, A).rawRecords);
|
|
1180
1194
|
}
|
|
1181
|
-
set source(
|
|
1182
|
-
this.clear(), this.add(
|
|
1195
|
+
set source(n) {
|
|
1196
|
+
this.clear(), this.add(n, !1);
|
|
1183
1197
|
}
|
|
1184
1198
|
get nextId() {
|
|
1185
|
-
return ++
|
|
1199
|
+
return ++Se(this, Ft)._;
|
|
1186
1200
|
}
|
|
1187
1201
|
get length() {
|
|
1188
|
-
return t(this,
|
|
1202
|
+
return t(this, C).length;
|
|
1189
1203
|
}
|
|
1190
1204
|
getRowCount() {
|
|
1191
1205
|
return this.length;
|
|
1192
1206
|
}
|
|
1193
1207
|
};
|
|
1194
|
-
|
|
1195
|
-
|
|
1208
|
+
L = new WeakMap(), A = new WeakMap(), C = new WeakMap(), lt = new WeakMap(), Ft = new WeakMap(), D = new WeakMap(), Vt = new WeakMap(), G = new WeakMap(), St = new WeakMap(), Xt = new WeakMap(), Ut = new WeakMap(), at = new WeakMap(), h(H, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1209
|
+
E(H, "ROW_STATE", {
|
|
1196
1210
|
EMPTY: "EMPTY",
|
|
1197
1211
|
NORMAL: "NORMAL",
|
|
1198
1212
|
INSERT: "INSERT",
|
|
1199
1213
|
UPDATE: "UPDATE",
|
|
1200
1214
|
DELETE: "DELETE"
|
|
1201
1215
|
});
|
|
1202
|
-
let
|
|
1203
|
-
var
|
|
1204
|
-
const
|
|
1205
|
-
constructor(
|
|
1206
|
-
d(this,
|
|
1207
|
-
|
|
1216
|
+
let oe = H;
|
|
1217
|
+
var J;
|
|
1218
|
+
const ye = class ye {
|
|
1219
|
+
constructor(n) {
|
|
1220
|
+
d(this, J);
|
|
1221
|
+
u(this, J, n), this.row = new se(this), this.data = new oe(t(this, J), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1208
1222
|
var e;
|
|
1209
|
-
(e = t(this,
|
|
1223
|
+
(e = t(this, J).view) != null && e.redraw && t(this, J).view.redraw();
|
|
1210
1224
|
}, this.setDataSource = (e) => {
|
|
1211
1225
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
|
|
1212
1226
|
}, this.getRowState = (e) => {
|
|
1213
1227
|
var s, r;
|
|
1214
|
-
const
|
|
1215
|
-
if (!(
|
|
1216
|
-
return (r = (s = this.data.getValidData()[
|
|
1228
|
+
const i = parseInt(e, 10);
|
|
1229
|
+
if (!(i >= this.data.count()))
|
|
1230
|
+
return (r = (s = this.data.getValidData()[i]) == null ? void 0 : s.__ng) == null ? void 0 : r.rowState;
|
|
1217
1231
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
|
|
1218
1232
|
this.row.at = e;
|
|
1219
|
-
}, 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,
|
|
1220
|
-
e = parseInt(e, 10), this.data.setValue(e,
|
|
1233
|
+
}, 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, i) => this.data.get(e, i), this.setColumn = (e, i, s) => {
|
|
1234
|
+
e = parseInt(e, 10), this.data.setValue(e, i, s);
|
|
1221
1235
|
}, this.setDataSource([]);
|
|
1222
1236
|
}
|
|
1223
1237
|
};
|
|
1224
|
-
|
|
1225
|
-
let
|
|
1226
|
-
var
|
|
1227
|
-
const
|
|
1238
|
+
J = new WeakMap(), h(ye, "ngDataManager");
|
|
1239
|
+
let re = ye;
|
|
1240
|
+
var ct, q, Et, jt;
|
|
1241
|
+
const pe = class pe {
|
|
1228
1242
|
// π― μ΄μ { name: string, type: string } κ°μ²΄λ€μ λ°°μ΄λ‘ κ΄λ¦¬ν©λλ€.
|
|
1229
|
-
constructor(
|
|
1230
|
-
d(this,
|
|
1231
|
-
d(this,
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
t(this,
|
|
1235
|
-
}), t(this,
|
|
1243
|
+
constructor(n) {
|
|
1244
|
+
d(this, ct);
|
|
1245
|
+
d(this, q, []);
|
|
1246
|
+
E(this, "add", /* @__PURE__ */ h((n, e = "string") => {
|
|
1247
|
+
n.forEach((i) => {
|
|
1248
|
+
t(this, q).some((s) => s.name === i) || t(this, q).push({ name: i, type: e });
|
|
1249
|
+
}), t(this, Et).call(this);
|
|
1236
1250
|
}, "add"));
|
|
1237
|
-
d(this,
|
|
1238
|
-
const
|
|
1239
|
-
t(this,
|
|
1240
|
-
|
|
1241
|
-
}),
|
|
1251
|
+
d(this, Et, /* @__PURE__ */ h(() => {
|
|
1252
|
+
const n = /* @__PURE__ */ new Map();
|
|
1253
|
+
t(this, q).forEach((e) => {
|
|
1254
|
+
n.set(e.name, e.type);
|
|
1255
|
+
}), u(this, q, Array.from(n, ([e, i]) => ({ name: e, type: i }))), u(this, q, t(this, q).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, q).sort((e, i) => e.name.length < i.name.length ? 1 : -1);
|
|
1242
1256
|
}, "#adjust"));
|
|
1243
|
-
d(this,
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1246
|
-
if (!(!
|
|
1247
|
-
for (const e of
|
|
1248
|
-
|
|
1257
|
+
d(this, jt, /* @__PURE__ */ h(() => {
|
|
1258
|
+
u(this, q, []), dt.log(t(this, ct).querySelectorAll("table"));
|
|
1259
|
+
const n = Array.from(t(this, ct).querySelectorAll("table"));
|
|
1260
|
+
if (!(!n || n.length === 0)) {
|
|
1261
|
+
for (const e of n)
|
|
1262
|
+
dt.log(e), $("[data-bind]", e).each((i, s) => {
|
|
1249
1263
|
const r = s.dataset.bind, o = s.getAttribute("data-type") || "string";
|
|
1250
|
-
r && t(this,
|
|
1251
|
-
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((
|
|
1252
|
-
$(`[${
|
|
1253
|
-
var o = r.getAttribute(
|
|
1264
|
+
r && t(this, q).push({ name: r, type: o });
|
|
1265
|
+
}), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((i) => {
|
|
1266
|
+
$(`[${i}]`, e).each((s, r) => {
|
|
1267
|
+
var o = r.getAttribute(i);
|
|
1254
1268
|
if (o.indexOf("data.") < 0) {
|
|
1255
1269
|
const l = o.search(/[(]/g);
|
|
1256
1270
|
if (l > 0)
|
|
@@ -1262,72 +1276,72 @@ const be = class be {
|
|
|
1262
1276
|
}
|
|
1263
1277
|
o.split("data.").forEach((l) => {
|
|
1264
1278
|
if (l.trim() != "") {
|
|
1265
|
-
const
|
|
1279
|
+
const c = l.search(/[^_A-Za-z0-9]/g);
|
|
1266
1280
|
let a = "";
|
|
1267
|
-
|
|
1281
|
+
c >= 0 ? a = l.substring(0, c) : o.startsWith("data.") && (a = l.replace("data.", "")), a && t(this, q).push({ name: a, type: "string" });
|
|
1268
1282
|
}
|
|
1269
1283
|
});
|
|
1270
1284
|
});
|
|
1271
1285
|
});
|
|
1272
|
-
t(this,
|
|
1286
|
+
t(this, Et).call(this);
|
|
1273
1287
|
}
|
|
1274
1288
|
}, "#init"));
|
|
1275
|
-
|
|
1289
|
+
u(this, ct, n), t(this, jt).call(this);
|
|
1276
1290
|
}
|
|
1277
1291
|
// π― κΈ°μ‘΄μ νλ μ΄λ¦λ§ μ°λ κ³³λ€κ³Όμ νΈνμ μν΄ μ΄λ¦ λ°°μ΄λ§ 리ν΄νλ λ©μλ μ μ§
|
|
1278
1292
|
get() {
|
|
1279
|
-
return t(this,
|
|
1293
|
+
return t(this, q).map((n) => n.name);
|
|
1280
1294
|
}
|
|
1281
1295
|
// π― λ΄λΆ κ°μ²΄ ν΅μ§Έλ‘ μ»κΈ°
|
|
1282
1296
|
getFields() {
|
|
1283
|
-
return t(this,
|
|
1297
|
+
return t(this, q);
|
|
1284
1298
|
}
|
|
1285
1299
|
// π― νΉμ νλμ λ°μ΄ν° νμ
μ‘°ν
|
|
1286
|
-
getType(
|
|
1287
|
-
const e = t(this,
|
|
1300
|
+
getType(n) {
|
|
1301
|
+
const e = t(this, q).find((i) => i.name === n);
|
|
1288
1302
|
return e ? e.type : "string";
|
|
1289
1303
|
}
|
|
1290
|
-
indexOf(
|
|
1291
|
-
return t(this,
|
|
1304
|
+
indexOf(n) {
|
|
1305
|
+
return t(this, q).findIndex((e) => e.name === n);
|
|
1292
1306
|
}
|
|
1293
|
-
includes(
|
|
1294
|
-
return t(this,
|
|
1307
|
+
includes(n) {
|
|
1308
|
+
return t(this, q).some((e) => e.name === n);
|
|
1295
1309
|
}
|
|
1296
1310
|
};
|
|
1297
|
-
|
|
1298
|
-
let
|
|
1299
|
-
var
|
|
1300
|
-
const
|
|
1311
|
+
ct = new WeakMap(), q = new WeakMap(), Et = new WeakMap(), jt = new WeakMap(), h(pe, "ngFields");
|
|
1312
|
+
let le = pe;
|
|
1313
|
+
var Q, Kt, Zt;
|
|
1314
|
+
const me = class me extends HTMLElement {
|
|
1301
1315
|
constructor() {
|
|
1302
1316
|
super();
|
|
1303
1317
|
//#created = false;
|
|
1304
|
-
d(this,
|
|
1305
|
-
d(this,
|
|
1306
|
-
d(this,
|
|
1307
|
-
this.fields = new
|
|
1318
|
+
d(this, Q);
|
|
1319
|
+
d(this, Kt);
|
|
1320
|
+
d(this, Zt, /* @__PURE__ */ h(() => {
|
|
1321
|
+
this.fields = new le(this), u(this, Kt, new ie(this)), dt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1308
1322
|
}, "#init"));
|
|
1309
|
-
this.attachShadow({ mode: "open" }),
|
|
1323
|
+
this.attachShadow({ mode: "open" }), u(this, Q, new re(this));
|
|
1310
1324
|
}
|
|
1311
1325
|
connectedCallback() {
|
|
1312
|
-
t(this,
|
|
1326
|
+
t(this, Zt).call(this);
|
|
1313
1327
|
}
|
|
1314
1328
|
disconnectedCallback() {
|
|
1315
|
-
|
|
1329
|
+
dt.log("NineTable disconnected.");
|
|
1316
1330
|
}
|
|
1317
1331
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1318
1332
|
get data() {
|
|
1319
|
-
return t(this,
|
|
1333
|
+
return t(this, Q).data;
|
|
1320
1334
|
}
|
|
1321
1335
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1322
1336
|
get row() {
|
|
1323
|
-
return t(this,
|
|
1337
|
+
return t(this, Q).row;
|
|
1324
1338
|
}
|
|
1325
1339
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1326
1340
|
get dataManager() {
|
|
1327
|
-
return t(this,
|
|
1341
|
+
return t(this, Q);
|
|
1328
1342
|
}
|
|
1329
1343
|
};
|
|
1330
|
-
|
|
1331
|
-
let
|
|
1332
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1344
|
+
Q = new WeakMap(), Kt = new WeakMap(), Zt = new WeakMap(), h(me, "NineTable");
|
|
1345
|
+
let ae = me;
|
|
1346
|
+
customElements.get("nine-table") || customElements.define("nine-table", ae);
|
|
1333
1347
|
//# sourceMappingURL=nine-table.js.map
|