@ninebone/table 0.0.272 β 0.0.273
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 +434 -491
- 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
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var Be = Object.defineProperty;
|
|
2
|
+
var De = (p) => {
|
|
3
|
+
throw TypeError(p);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var e = (
|
|
9
|
-
var
|
|
10
|
-
set _(
|
|
11
|
-
|
|
5
|
+
var Ve = (p, i, t) => i in p ? Be(p, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[i] = t;
|
|
6
|
+
var c = (p, i) => Be(p, "name", { value: i, configurable: !0 });
|
|
7
|
+
var v = (p, i, t) => Ve(p, typeof i != "symbol" ? i + "" : i, t), Ne = (p, i, t) => i.has(p) || De("Cannot " + t);
|
|
8
|
+
var e = (p, i, t) => (Ne(p, i, "read from private field"), t ? t.call(p) : i.get(p)), f = (p, i, t) => i.has(p) ? De("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(p) : i.set(p, t), g = (p, i, t, s) => (Ne(p, i, "write to private field"), s ? s.call(p, t) : i.set(p, t), t);
|
|
9
|
+
var Pe = (p, i, t, s) => ({
|
|
10
|
+
set _(n) {
|
|
11
|
+
g(p, i, n, t);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return e(
|
|
14
|
+
return e(p, i, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as Xe } from "@ninebone/util";
|
|
18
|
+
const Ce = class Ce extends Xe.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
|
+
c(Ce, "Trace");
|
|
24
|
+
let xe = Ce;
|
|
25
|
+
const Z = new xe();
|
|
26
|
+
var T, z, y, B, D, N, se, P, ne;
|
|
27
|
+
const _e = class _e extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!e(this,
|
|
38
|
-
const t = e(this,
|
|
39
|
-
t && (
|
|
30
|
+
f(this, T);
|
|
31
|
+
f(this, z, !1);
|
|
32
|
+
f(this, y);
|
|
33
|
+
f(this, B);
|
|
34
|
+
f(this, D);
|
|
35
|
+
f(this, N);
|
|
36
|
+
f(this, se, /* @__PURE__ */ c(() => {
|
|
37
|
+
if (!e(this, T)) return;
|
|
38
|
+
const t = e(this, T).querySelector(".ng-container-body");
|
|
39
|
+
t && (g(this, N, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), e(this,
|
|
41
|
+
})), e(this, N).observe(t));
|
|
42
42
|
}, "#observeResize"));
|
|
43
|
-
|
|
44
|
-
if (!e(this,
|
|
45
|
-
const t = e(this,
|
|
43
|
+
v(this, "refresh", /* @__PURE__ */ c(() => {
|
|
44
|
+
if (!e(this, T) || !e(this, y) || e(this, z)) return;
|
|
45
|
+
const t = e(this, y).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
47
|
+
const n = e(this, y).track, r = e(this, y).thumb, o = e(this, T).querySelector(".ng-container-bottom"), l = t.clientWidth, d = s.scrollWidth;
|
|
48
|
+
if (l !== 0 && d > l)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
o && (o.style.display = "none");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const a = Math.max(Math.min(
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
54
|
+
const h = n.clientWidth;
|
|
55
|
+
if (h <= 0) return;
|
|
56
|
+
const a = Math.max(Math.min(h * (l / d), h), 20);
|
|
57
|
+
r.style.width = `${a}px`;
|
|
58
|
+
const u = t.scrollLeft, b = d - l;
|
|
59
|
+
let w = 0;
|
|
60
|
+
b > 0 && (w = parseInt(u / b * (h - a), 10)), w < 0 && (w = 0);
|
|
61
|
+
const x = h - a;
|
|
62
|
+
w > x && (w = x), r.style.left = `${w}px`, Z.log(w), e(this, y).left.disabled = w === 0, e(this, y).right.disabled = w >= x - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
|
|
65
|
-
if (!e(this,
|
|
66
|
-
const s = e(this,
|
|
67
|
-
if (!
|
|
68
|
-
const
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
let
|
|
75
|
-
return -
|
|
64
|
+
f(this, P, /* @__PURE__ */ c((t) => {
|
|
65
|
+
if (!e(this, y)) return !1;
|
|
66
|
+
const s = e(this, y).container, n = s.querySelector("table");
|
|
67
|
+
if (!n) return !1;
|
|
68
|
+
const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
|
|
69
|
+
let l = t;
|
|
70
|
+
l < 0 && (l = 0);
|
|
71
|
+
const d = r.width - o;
|
|
72
|
+
l > d && (l = d), l = parseInt(l, 10), e(this, y).thumb.style.left = `${l}px`, e(this, y).left.disabled = l === 0, e(this, y).right.disabled = l >= d - 1;
|
|
73
|
+
const h = s.clientWidth, a = n.scrollWidth;
|
|
74
|
+
let u = d > 0 ? -l * (a - h) / d : 0;
|
|
75
|
+
return -u > a - h && (u = -(a - h)), -u + 5 > a - h && (u = -(a - h)), h >= a && (u = 0), n.style.transform = `translateX(${u}px)`, l > 0 && l < d - 1;
|
|
76
76
|
}, "#thumbMoveTo"));
|
|
77
|
-
|
|
78
|
-
const t = /* @__PURE__ */
|
|
79
|
-
clearInterval(e(this,
|
|
80
|
-
const
|
|
81
|
-
e(this,
|
|
82
|
-
clearInterval(e(this,
|
|
83
|
-
const o = parseInt(e(this,
|
|
84
|
-
e(this,
|
|
77
|
+
f(this, ne, /* @__PURE__ */ c(() => {
|
|
78
|
+
const t = /* @__PURE__ */ c((n) => {
|
|
79
|
+
clearInterval(e(this, B)), clearInterval(e(this, D));
|
|
80
|
+
const r = parseInt(e(this, y).thumb.style.left || 0, 10);
|
|
81
|
+
e(this, P).call(this, r + n), g(this, B, setInterval(() => {
|
|
82
|
+
clearInterval(e(this, B)), g(this, D, setInterval(() => {
|
|
83
|
+
const o = parseInt(e(this, y).thumb.style.left || 0, 10);
|
|
84
|
+
e(this, P).call(this, o + n) || clearInterval(e(this, D));
|
|
85
85
|
}, 50));
|
|
86
86
|
}, 500));
|
|
87
|
-
}, "delayScroll"), s = /* @__PURE__ */
|
|
88
|
-
clearInterval(e(this,
|
|
87
|
+
}, "delayScroll"), s = /* @__PURE__ */ c(() => {
|
|
88
|
+
clearInterval(e(this, B)), clearInterval(e(this, D));
|
|
89
89
|
}, "clearTimer");
|
|
90
|
-
["mouseup", "mouseleave", "touchend"].forEach((
|
|
91
|
-
e(this,
|
|
92
|
-
}), e(this,
|
|
93
|
-
|
|
94
|
-
}), e(this,
|
|
95
|
-
|
|
96
|
-
}), e(this,
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
e(this,
|
|
101
|
-
}), e(this,
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
if (!e(this,
|
|
106
|
-
const
|
|
107
|
-
e(this,
|
|
108
|
-
}, "onMouseMove"), o = /* @__PURE__ */
|
|
109
|
-
|
|
90
|
+
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
91
|
+
e(this, y).left.addEventListener(n, s), e(this, y).right.addEventListener(n, s), e(this, y).track.addEventListener(n, s);
|
|
92
|
+
}), e(this, y).left.addEventListener("mousedown", (n) => {
|
|
93
|
+
n.button === 0 && t(-20);
|
|
94
|
+
}), e(this, y).right.addEventListener("mousedown", (n) => {
|
|
95
|
+
n.button === 0 && t(20);
|
|
96
|
+
}), e(this, y).left.addEventListener("touchstart", () => t(-20)), e(this, y).right.addEventListener("touchstart", () => t(20)), e(this, y).track.addEventListener("mousedown", (n) => {
|
|
97
|
+
if (n.button !== 0) return;
|
|
98
|
+
n.preventDefault();
|
|
99
|
+
const r = e(this, y).track.getBoundingClientRect(), o = e(this, y).thumb.clientWidth;
|
|
100
|
+
e(this, P).call(this, n.clientX - r.left - o / 2);
|
|
101
|
+
}), e(this, y).thumb.addEventListener("mousedown", (n) => {
|
|
102
|
+
if (n.button !== 0) return;
|
|
103
|
+
n.stopPropagation(), n.preventDefault(), g(this, z, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
|
|
104
|
+
const r = /* @__PURE__ */ c((l) => {
|
|
105
|
+
if (!e(this, z)) return;
|
|
106
|
+
const d = e(this, y).track.getBoundingClientRect();
|
|
107
|
+
e(this, P).call(this, l.clientX - d.left - this.shiftX);
|
|
108
|
+
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
109
|
+
g(this, z, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
110
110
|
}, "onMouseUp");
|
|
111
|
-
document.addEventListener("mousemove",
|
|
111
|
+
document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
|
|
112
112
|
});
|
|
113
113
|
}, "#init"));
|
|
114
114
|
}
|
|
115
115
|
connectedCallback() {
|
|
116
|
-
if (
|
|
116
|
+
if (g(this, T, this.closest("nine-table-sheet") || this.getRootNode().host), !e(this, T)) return;
|
|
117
117
|
this.innerHTML = `
|
|
118
118
|
<style>
|
|
119
119
|
nine-table-hscrollbar {
|
|
@@ -177,99 +177,99 @@ const Me = class Me extends HTMLElement {
|
|
|
177
177
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
178
178
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
179
179
|
`;
|
|
180
|
-
const t = /* @__PURE__ */
|
|
181
|
-
const s = e(this,
|
|
180
|
+
const t = /* @__PURE__ */ c(() => {
|
|
181
|
+
const s = e(this, T).querySelector(".ng-container-body");
|
|
182
182
|
if (!s) {
|
|
183
183
|
setTimeout(t, 10);
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
g(this, y, {
|
|
187
187
|
container: s,
|
|
188
188
|
track: this.querySelector(".ng-scroll-track"),
|
|
189
189
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
190
190
|
left: this.querySelector(".ng-scroll-left"),
|
|
191
191
|
right: this.querySelector(".ng-scroll-right")
|
|
192
|
-
}), e(this,
|
|
192
|
+
}), e(this, ne).call(this), e(this, se).call(this), this.refresh();
|
|
193
193
|
}, "initWhenReady");
|
|
194
194
|
t();
|
|
195
195
|
}
|
|
196
196
|
disconnectedCallback() {
|
|
197
|
-
e(this,
|
|
197
|
+
e(this, N) && e(this, N).disconnect();
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
|
|
201
|
-
let
|
|
202
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
203
|
-
var
|
|
200
|
+
T = new WeakMap(), z = new WeakMap(), y = new WeakMap(), B = new WeakMap(), D = new WeakMap(), N = new WeakMap(), se = new WeakMap(), P = new WeakMap(), ne = new WeakMap(), c(_e, "NineTableHScrollBar");
|
|
201
|
+
let ve = _e;
|
|
202
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
|
|
203
|
+
var M, L, R, $, C, _, re, oe, le, ae;
|
|
204
204
|
const He = class He {
|
|
205
205
|
constructor(i) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
e(this,
|
|
206
|
+
f(this, M);
|
|
207
|
+
f(this, L, []);
|
|
208
|
+
f(this, R, null);
|
|
209
|
+
f(this, $, null);
|
|
210
|
+
f(this, C, 0);
|
|
211
|
+
f(this, _, 0);
|
|
212
|
+
v(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, R), "getRowHeight"));
|
|
213
|
+
f(this, re, /* @__PURE__ */ c(() => {
|
|
214
|
+
e(this, oe).call(this);
|
|
215
215
|
}, "#init"));
|
|
216
216
|
/**
|
|
217
217
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
218
218
|
*/
|
|
219
|
-
|
|
220
|
-
!e(this,
|
|
219
|
+
f(this, oe, /* @__PURE__ */ c(() => {
|
|
220
|
+
!e(this, M) || !(e(this, M) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
|
|
221
221
|
for (const t of i) {
|
|
222
222
|
const s = t.target;
|
|
223
223
|
if (!s.classList.contains("active"))
|
|
224
224
|
continue;
|
|
225
|
-
const
|
|
226
|
-
if (
|
|
227
|
-
const
|
|
225
|
+
const n = t.contentRect.height || (t.borderBoxSize && t.borderBoxSize[0] ? t.borderBoxSize[0].blockSize : 0);
|
|
226
|
+
if (n > 0) {
|
|
227
|
+
const r = s.clientHeight || s.getBoundingClientRect().height || n;
|
|
228
228
|
let o = 0;
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
const a = Math.max(
|
|
232
|
-
if (e(this,
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
229
|
+
const l = s.querySelector(".ng-container-body") || s, d = l.querySelector("thead"), h = l.querySelector("tfoot");
|
|
230
|
+
d && (o += d.offsetHeight || d.getBoundingClientRect().height), h && (o += h.offsetHeight || h.getBoundingClientRect().height);
|
|
231
|
+
const a = Math.max(r - o, 100);
|
|
232
|
+
if (e(this, C) !== a && (g(this, C, a), e(this, R) !== null)) {
|
|
233
|
+
const u = Math.ceil(e(this, C) / e(this, R));
|
|
234
|
+
g(this, _, u + 20), Z.log(`[RowManager] Resized. Height: ${e(this, C)}px | Target Rows: ${e(this, _)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((b) => {
|
|
235
|
+
const w = s.querySelector(b);
|
|
236
|
+
w && w.querySelector("tbody") && e(this, ae).call(this, w);
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
})), e(this,
|
|
241
|
+
})), e(this, $).observe(e(this, M)));
|
|
242
242
|
}, "#initResizeObserver"));
|
|
243
243
|
// π― ν
νλ¦Ώ μΆμΆ, λμ΄ μΈ‘μ , μ΄κΈ° λ λλ§μ μμμ λ§κ² λ΄λΆμμ μΌκ΄ μ²λ¦¬
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
const t = e(this,
|
|
247
|
-
|
|
244
|
+
v(this, "initialize", /* @__PURE__ */ c((i) => {
|
|
245
|
+
Z.log(i);
|
|
246
|
+
const t = e(this, M).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
|
|
247
|
+
g(this, L, n.map((r) => r.cloneNode(!0))), g(this, R, null), e(this, le).call(this, t);
|
|
248
248
|
}, "initialize"));
|
|
249
|
-
|
|
250
|
-
if (e(this,
|
|
251
|
-
return e(this,
|
|
252
|
-
if (e(this,
|
|
249
|
+
f(this, le, /* @__PURE__ */ c((i) => {
|
|
250
|
+
if (e(this, R) !== null && e(this, R) > 0)
|
|
251
|
+
return e(this, R);
|
|
252
|
+
if (e(this, L).length === 0)
|
|
253
253
|
throw new Error("[RowManager] Template TRs are empty.");
|
|
254
254
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
255
255
|
if (!t) return 24;
|
|
256
|
-
t.querySelectorAll("tr:not(.nodata)").forEach((
|
|
257
|
-
const s = t.querySelector("tr.nodata"),
|
|
258
|
-
e(this,
|
|
259
|
-
|
|
260
|
-
}), s ? s.before(
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
let
|
|
256
|
+
t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
|
|
257
|
+
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
258
|
+
e(this, L).forEach((u) => {
|
|
259
|
+
n.appendChild(u.cloneNode(!0));
|
|
260
|
+
}), s ? s.before(n) : t.appendChild(n);
|
|
261
|
+
const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", l = r ? r.style.visibility : "", d = r ? r.style.position : "";
|
|
262
|
+
r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
|
|
263
|
+
let h = 0;
|
|
264
264
|
const a = t.querySelectorAll("tr:not(.nodata)");
|
|
265
|
-
if (a.forEach((
|
|
266
|
-
|
|
267
|
-
}), a.forEach((
|
|
268
|
-
const
|
|
269
|
-
|
|
265
|
+
if (a.forEach((u, b) => {
|
|
266
|
+
h += u.offsetHeight || u.getBoundingClientRect().height;
|
|
267
|
+
}), a.forEach((u) => u.remove()), r && (r.style.display = o, r.style.visibility = l, r.style.position = d), g(this, R, h), e(this, C) > 0) {
|
|
268
|
+
const u = Math.ceil(e(this, C) / e(this, R));
|
|
269
|
+
g(this, _, u + 20);
|
|
270
270
|
} else
|
|
271
|
-
|
|
272
|
-
return console.log(`[RowManager] Template Height Cached: ${e(this,
|
|
271
|
+
g(this, _, 40);
|
|
272
|
+
return console.log(`[RowManager] Template Height Cached: ${e(this, R)}px | RowCount: ${e(this, _)}`), e(this, R);
|
|
273
273
|
}, "#measureAndCacheHeight"));
|
|
274
274
|
/**
|
|
275
275
|
* π― μΊμλ ν κ°μ λ°ν (μμ λλ§ μ΅μνμ λ°©μ΄ μ°μ°)
|
|
@@ -287,172 +287,115 @@ const He = class He {
|
|
|
287
287
|
/**
|
|
288
288
|
* π― μΊμλ ν κ°μλ₯Ό κ³§λ°λ‘ κ°μ Έμμ TR λΌλ μ£Όμ
(μ€λ³΅ κ³μ° μ κ±°)
|
|
289
289
|
*/
|
|
290
|
-
|
|
291
|
-
if (e(this,
|
|
290
|
+
f(this, ae, /* @__PURE__ */ c((i) => {
|
|
291
|
+
if (e(this, L).length === 0) return;
|
|
292
292
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
293
293
|
if (!t) return;
|
|
294
294
|
t.querySelectorAll("tr:not(.nodata)").forEach((o) => o.remove());
|
|
295
|
-
const s = t.querySelector("tr.nodata"),
|
|
296
|
-
for (let o = 0; o <
|
|
297
|
-
e(this,
|
|
298
|
-
|
|
295
|
+
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment(), r = e(this, _);
|
|
296
|
+
for (let o = 0; o < r; o++)
|
|
297
|
+
e(this, L).forEach((l) => {
|
|
298
|
+
n.appendChild(l.cloneNode(!0));
|
|
299
299
|
});
|
|
300
|
-
s ? s.before(
|
|
300
|
+
s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${r} sets into DOM.`);
|
|
301
301
|
}, "#renderRows"));
|
|
302
|
-
|
|
303
|
-
e(this,
|
|
302
|
+
v(this, "destroy", /* @__PURE__ */ c(() => {
|
|
303
|
+
e(this, $) && (e(this, $).disconnect(), g(this, $, null));
|
|
304
304
|
}, "destroy"));
|
|
305
|
-
|
|
305
|
+
g(this, M, i), e(this, re).call(this);
|
|
306
306
|
}
|
|
307
307
|
get templateLength() {
|
|
308
|
-
return e(this,
|
|
308
|
+
return e(this, L).length || 1;
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
-
|
|
312
|
-
let
|
|
313
|
-
var
|
|
314
|
-
const
|
|
311
|
+
M = new WeakMap(), L = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), C = new WeakMap(), _ = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), c(He, "RowManager");
|
|
312
|
+
let Se = He;
|
|
313
|
+
var H, Y, U, G, ce, he;
|
|
314
|
+
const j = class j extends HTMLElement {
|
|
315
315
|
constructor() {
|
|
316
316
|
super();
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
* π― 2μ°¨μ μ
격μ μΈλ±μ€λ₯Ό κ³μ°νμ¬ λ³ν©(`rowSpan`/`colSpan`) μ
μ μ λ μ»¬λΌ μμΉλ₯Ό λΆμ¬
|
|
321
|
-
*/
|
|
322
|
-
g(this, J, /* @__PURE__ */ h((t, s) => {
|
|
323
|
-
const r = Array.from(t.querySelectorAll(s + " tr")), n = Array.from(t.querySelectorAll(s + " th," + s + " td")), o = r.length;
|
|
324
|
-
if (o === 0 || n.length === 0) return;
|
|
325
|
-
let c = 0;
|
|
326
|
-
n.forEach((l) => {
|
|
327
|
-
c += l.colSpan || 1;
|
|
328
|
-
});
|
|
329
|
-
const u = Array.from(Array(o), () => Array(c).fill(null));
|
|
330
|
-
r.forEach((l) => {
|
|
331
|
-
const a = l.sectionRowIndex;
|
|
332
|
-
let d = 0;
|
|
333
|
-
Array.from(l.querySelectorAll("th,td")).forEach((f) => {
|
|
334
|
-
for (let v = 0; v < u[a].length; v++)
|
|
335
|
-
if (u[a][v] === null) {
|
|
336
|
-
d = v;
|
|
337
|
-
break;
|
|
338
|
-
}
|
|
339
|
-
const b = f.rowSpan || 1, m = f.colSpan || 1;
|
|
340
|
-
for (let v = 0; v < b; v++)
|
|
341
|
-
for (let C = 0; C < m; C++)
|
|
342
|
-
a + v < o && d + C < c && (u[a + v][d + C] = v === 0 && C === 0 ? "1" : "0");
|
|
343
|
-
});
|
|
344
|
-
}), r.forEach((l) => {
|
|
345
|
-
const a = l.sectionRowIndex;
|
|
346
|
-
Array.from(l.querySelectorAll("th,td")).forEach((d) => {
|
|
347
|
-
for (let f = 0; f < u[a].length; f++)
|
|
348
|
-
if (u[a][f] === "1") {
|
|
349
|
-
d.dataset.col = f, u[a][f] = "0";
|
|
350
|
-
break;
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
}, "#resetColIndex"));
|
|
355
|
-
/**
|
|
356
|
-
* π― μμ λ°λλΌ μλ°μ€ν¬λ¦½νΈ(Vanilla JS) κΈ°λ°μ κΉλν #createSplitTable
|
|
357
|
-
*/
|
|
358
|
-
g(this, K, /* @__PURE__ */ h((t, s) => {
|
|
359
|
-
const r = t.cloneNode(!0);
|
|
360
|
-
return s === "left" ? r.querySelectorAll("col, th, td").forEach((n) => {
|
|
361
|
-
n.getAttribute("fixed") !== "left" && n.remove();
|
|
362
|
-
}) : s === "right" ? r.querySelectorAll("col, th, td").forEach((n) => {
|
|
363
|
-
n.getAttribute("fixed") !== "right" && n.remove();
|
|
364
|
-
}) : r.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
|
|
365
|
-
n.remove();
|
|
366
|
-
}), r;
|
|
367
|
-
}, "#createSplitTable"));
|
|
368
|
-
S(this, "generate", /* @__PURE__ */ h((t) => {
|
|
317
|
+
f(this, H, null);
|
|
318
|
+
f(this, Y);
|
|
319
|
+
v(this, "generate", /* @__PURE__ */ c((t) => {
|
|
369
320
|
if (!t) return;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
const Ne = document.createElement("col");
|
|
376
|
-
Ne.setAttribute("width", C), v.appendChild(Ne);
|
|
377
|
-
}
|
|
378
|
-
f.prepend(v);
|
|
379
|
-
}, "ensureColgroup"), d = /* @__PURE__ */ h((f) => {
|
|
380
|
-
if (f.querySelector("thead")) return;
|
|
381
|
-
const b = document.createElement("thead"), m = f.querySelector("colgroup");
|
|
382
|
-
m ? m.after(b) : f.prepend(b);
|
|
383
|
-
}, "ensureThead");
|
|
384
|
-
return a(l), d(l), l.classList.add("nine-table-element"), l;
|
|
385
|
-
}, "initializeTable"), r = t.cloneNode(!0);
|
|
386
|
-
y(this, E, s(r)), e(this, E).style.display = "table", e(this, J).call(this, e(this, E), "thead"), e(this, J).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, a) => {
|
|
387
|
-
const d = l.getAttribute("fixed");
|
|
388
|
-
d && e(this, E).querySelectorAll(`[data-col="${a}"]`).forEach((f) => {
|
|
389
|
-
f.setAttribute("fixed", d);
|
|
390
|
-
});
|
|
391
|
-
}), L.log(e(this, E));
|
|
392
|
-
const o = this.querySelector(".ng-container-left"), c = this.querySelector(".ng-container-body"), u = this.querySelector(".ng-container-right");
|
|
393
|
-
if (c) {
|
|
394
|
-
const l = e(this, K).call(this, e(this, E), null);
|
|
395
|
-
c.innerHTML = "", c.appendChild(l), L.log(e(this, E)), L.log(l), e(this, F).initialize(e(this, E));
|
|
321
|
+
g(this, H, t), e(this, H).style.display = "table";
|
|
322
|
+
const s = this.querySelector(".ng-container-left"), n = this.querySelector(".ng-container-body"), r = this.querySelector(".ng-container-right");
|
|
323
|
+
if (n) {
|
|
324
|
+
const o = e(this, U).call(this, e(this, H), null);
|
|
325
|
+
n.innerHTML = "", n.appendChild(o), e(this, Y).initialize(e(this, H));
|
|
396
326
|
}
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
const
|
|
402
|
-
isNaN(
|
|
403
|
-
}),
|
|
404
|
-
const d =
|
|
405
|
-
|
|
327
|
+
if (s) {
|
|
328
|
+
const o = e(this, U).call(this, e(this, H), "left");
|
|
329
|
+
let l = 0;
|
|
330
|
+
o.querySelectorAll("col").forEach((h) => {
|
|
331
|
+
const a = parseInt(h.getAttribute("width"), 10);
|
|
332
|
+
isNaN(a) || (l += a);
|
|
333
|
+
}), s.innerHTML = "", s.appendChild(o);
|
|
334
|
+
const d = l > 0 ? l : 0;
|
|
335
|
+
s.style.flex = `0 0 ${d}px`, s.style.width = `${d}px`;
|
|
406
336
|
}
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
|
|
411
|
-
const
|
|
412
|
-
isNaN(
|
|
413
|
-
}),
|
|
414
|
-
const d =
|
|
415
|
-
|
|
337
|
+
if (r) {
|
|
338
|
+
const o = e(this, U).call(this, e(this, H), "right");
|
|
339
|
+
let l = 0;
|
|
340
|
+
o.querySelectorAll("col").forEach((h) => {
|
|
341
|
+
const a = parseInt(h.getAttribute("width"), 10);
|
|
342
|
+
isNaN(a) || (l += a);
|
|
343
|
+
}), r.innerHTML = "", r.appendChild(o);
|
|
344
|
+
const d = l > 0 ? l : 0;
|
|
345
|
+
r.style.flex = `0 0 ${d}px`, r.style.width = `${d}px`;
|
|
416
346
|
}
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
(
|
|
347
|
+
n && n.addEventListener("scroll", () => {
|
|
348
|
+
var o;
|
|
349
|
+
(o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
|
|
420
350
|
}), setTimeout(() => {
|
|
421
|
-
var
|
|
422
|
-
e(this,
|
|
351
|
+
var o;
|
|
352
|
+
e(this, G).call(this), (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
|
|
423
353
|
}, 0);
|
|
424
354
|
}, "generate"));
|
|
425
|
-
|
|
426
|
-
|
|
355
|
+
/**
|
|
356
|
+
* π― λ§μ€ν° ν
μ΄λΈμ κΈ°λ°μΌλ‘ νΉμ fixed νμ
μμλ§ λ¨κΈ°λ λΆν ν¬νΌ
|
|
357
|
+
*/
|
|
358
|
+
f(this, U, /* @__PURE__ */ c((t, s) => {
|
|
359
|
+
const n = t.cloneNode(!0);
|
|
360
|
+
return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
|
|
361
|
+
r.getAttribute("fixed") !== "left" && r.remove();
|
|
362
|
+
}) : s === "right" ? n.querySelectorAll("col, th, td").forEach((r) => {
|
|
363
|
+
r.getAttribute("fixed") !== "right" && r.remove();
|
|
364
|
+
}) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
|
|
365
|
+
r.remove();
|
|
366
|
+
}), n;
|
|
367
|
+
}, "#createSplitTable"));
|
|
368
|
+
v(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, Y).getRowHeight(), "getRowHeight"));
|
|
369
|
+
v(this, "scrollToX", /* @__PURE__ */ c((t) => {
|
|
427
370
|
const s = this.querySelector(".ng-container-body");
|
|
428
371
|
s && (s.scrollLeft = t);
|
|
429
372
|
}, "scrollToX"));
|
|
430
|
-
|
|
373
|
+
v(this, "scrollToY", /* @__PURE__ */ c((t) => {
|
|
431
374
|
const s = this.querySelector(".ng-container-body");
|
|
432
375
|
s && (s.scrollTop = t);
|
|
433
376
|
}, "scrollToY"));
|
|
434
|
-
|
|
435
|
-
var
|
|
436
|
-
const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"),
|
|
377
|
+
f(this, G, /* @__PURE__ */ c(() => {
|
|
378
|
+
var h, a, u;
|
|
379
|
+
const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), n = this.querySelector(".ng-container-right table");
|
|
437
380
|
if (!s) return;
|
|
438
|
-
const
|
|
439
|
-
for (let
|
|
440
|
-
const
|
|
441
|
-
((
|
|
442
|
-
((a = o[
|
|
443
|
-
((
|
|
444
|
-
],
|
|
445
|
-
|
|
381
|
+
const r = t ? Array.from(t.querySelectorAll("tr")) : [], o = Array.from(s.querySelectorAll("tr")), l = n ? Array.from(n.querySelectorAll("tr")) : [], d = Math.max(r.length, o.length, l.length);
|
|
382
|
+
for (let b = 0; b < d; b++) {
|
|
383
|
+
const w = [
|
|
384
|
+
((h = r[b]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
385
|
+
((a = o[b]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
|
|
386
|
+
((u = l[b]) == null ? void 0 : u.getBoundingClientRect().height) || 0
|
|
387
|
+
], x = Math.max(...w);
|
|
388
|
+
x > 0 && (r[b] && (r[b].style.height = `${x}px`), o[b] && (o[b].style.height = `${x}px`), l[b] && (l[b].style.height = `${x}px`));
|
|
446
389
|
}
|
|
447
390
|
}, "#syncRowHeights"));
|
|
448
|
-
|
|
449
|
-
e(this,
|
|
391
|
+
f(this, ce, /* @__PURE__ */ c(() => {
|
|
392
|
+
e(this, he).call(this), new MutationObserver((t) => {
|
|
450
393
|
for (const s of t)
|
|
451
|
-
s.attributeName === "class" && this.classList.contains("active") && e(this,
|
|
394
|
+
s.attributeName === "class" && this.classList.contains("active") && e(this, G).call(this);
|
|
452
395
|
}).observe(this, { attributes: !0 });
|
|
453
396
|
}, "#init"));
|
|
454
|
-
|
|
455
|
-
const t =
|
|
397
|
+
f(this, he, /* @__PURE__ */ c(() => {
|
|
398
|
+
const t = j.SCROLLBAR_SIZE;
|
|
456
399
|
this.innerHTML = `
|
|
457
400
|
<style>
|
|
458
401
|
nine-table-sheet {
|
|
@@ -575,163 +518,163 @@ const G = class G extends HTMLElement {
|
|
|
575
518
|
</div>
|
|
576
519
|
`;
|
|
577
520
|
}, "#render"));
|
|
578
|
-
|
|
521
|
+
g(this, Y, new Se(this));
|
|
579
522
|
}
|
|
580
523
|
connectedCallback() {
|
|
581
|
-
e(this,
|
|
524
|
+
e(this, ce).call(this);
|
|
582
525
|
}
|
|
583
526
|
disconnectedCallback() {
|
|
584
|
-
this.innerHTML = "",
|
|
527
|
+
this.innerHTML = "", Z.log("NineTableSheet destroyed.");
|
|
585
528
|
}
|
|
586
529
|
};
|
|
587
|
-
|
|
588
|
-
let
|
|
589
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
590
|
-
var
|
|
591
|
-
const
|
|
530
|
+
H = new WeakMap(), Y = new WeakMap(), U = new WeakMap(), G = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), c(j, "NineTableSheet"), v(j, "SCROLLBAR_SIZE", 16);
|
|
531
|
+
let ie = j;
|
|
532
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
|
|
533
|
+
var de, J;
|
|
534
|
+
const Ie = class Ie extends HTMLElement {
|
|
592
535
|
constructor() {
|
|
593
536
|
super();
|
|
594
|
-
|
|
537
|
+
f(this, de, /* @__PURE__ */ c(() => {
|
|
595
538
|
var t;
|
|
596
539
|
(t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
|
|
597
540
|
var o;
|
|
598
|
-
const
|
|
599
|
-
e(this,
|
|
600
|
-
}), e(this,
|
|
541
|
+
const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
542
|
+
e(this, J).call(this, r, n);
|
|
543
|
+
}), e(this, J).call(this, 0, !1);
|
|
601
544
|
}, "#init"));
|
|
602
|
-
|
|
603
|
-
const
|
|
545
|
+
f(this, J, /* @__PURE__ */ c((t, s = !1) => {
|
|
546
|
+
const n = /* @__PURE__ */ c(() => {
|
|
604
547
|
const a = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
605
|
-
Array.from(this.querySelectorAll("nine-splitter")).forEach((
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
|
|
548
|
+
Array.from(this.querySelectorAll("nine-splitter")).forEach((w) => w.style.setProperty("display", "none"));
|
|
549
|
+
const b = a.filter((w) => w.classList.contains("active"));
|
|
550
|
+
b.length < 2 || b.forEach((w) => {
|
|
551
|
+
const x = parseInt(w.getAttribute("data-index"), 10), I = this.querySelector(`nine-splitter[data-split-index="${x}"]`), ze = a[x + 1];
|
|
552
|
+
I && ze && ze.classList.contains("active") && I.style.setProperty("display", "flex");
|
|
610
553
|
});
|
|
611
|
-
}, "updateSplitters"),
|
|
612
|
-
if (!
|
|
554
|
+
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
|
|
555
|
+
if (!l[t]) return;
|
|
613
556
|
if (!s)
|
|
614
|
-
|
|
615
|
-
a.classList.toggle("active",
|
|
616
|
-
}),
|
|
617
|
-
const
|
|
618
|
-
a.classList.toggle("active",
|
|
557
|
+
l.forEach((a, u) => {
|
|
558
|
+
a.classList.toggle("active", u === t);
|
|
559
|
+
}), d.forEach((a, u) => {
|
|
560
|
+
const b = u === t;
|
|
561
|
+
a.classList.toggle("active", b), a.style.flex = b ? "1 1 100%" : "";
|
|
619
562
|
});
|
|
620
563
|
else {
|
|
621
|
-
const a =
|
|
622
|
-
if (a.classList.contains("active") &&
|
|
564
|
+
const a = l[t], u = r.querySelectorAll(".nine-tab-item.active");
|
|
565
|
+
if (a.classList.contains("active") && u.length <= 1)
|
|
623
566
|
return;
|
|
624
567
|
a.classList.toggle("active");
|
|
625
|
-
const
|
|
626
|
-
|
|
568
|
+
const b = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
|
|
569
|
+
b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
|
|
627
570
|
}
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
a.style.flex =
|
|
631
|
-
}),
|
|
571
|
+
const h = o.querySelectorAll("nine-table-sheet.active");
|
|
572
|
+
h == null || h.forEach((a) => {
|
|
573
|
+
a.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
|
|
574
|
+
}), n();
|
|
632
575
|
}, "#switchSheet"));
|
|
633
576
|
}
|
|
634
577
|
connectedCallback() {
|
|
635
|
-
e(this,
|
|
578
|
+
e(this, de).call(this);
|
|
636
579
|
}
|
|
637
580
|
};
|
|
638
|
-
|
|
639
|
-
let
|
|
640
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
641
|
-
var
|
|
642
|
-
const
|
|
581
|
+
de = new WeakMap(), J = new WeakMap(), c(Ie, "NineTableSheets");
|
|
582
|
+
let Re = Ie;
|
|
583
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Re);
|
|
584
|
+
var fe, Q;
|
|
585
|
+
const k = class k {
|
|
643
586
|
/**
|
|
644
587
|
* π― λ μ΄μμ λ΄μ μ¬λ¬ rawTables λ°°μ΄μ μΌκ΄λ‘ λ°μ λ¨μΌ λ§μ€ν° ν
νλ¦ΏμΌλ‘ μ¬μ μ»΄νμΌν©λλ€.
|
|
645
588
|
*/
|
|
646
589
|
static compileAll(i) {
|
|
647
|
-
return Array.isArray(i) ? i.map((t) =>
|
|
590
|
+
return Array.isArray(i) ? i.map((t) => k.compile(t)) : [];
|
|
648
591
|
}
|
|
649
592
|
/**
|
|
650
593
|
* π― λ¨μΌ μλ³Έ ν
μ΄λΈμ λ°μ κΈ°λ³Έ ꡬ쑰 보μ λ° 2μ°¨μ 격μ μΈλ±μ€ μ¬μ λΆμ¬ μλ£λ λ§μ€ν° ν
μ΄λΈ λ°ν
|
|
651
594
|
*/
|
|
652
595
|
static compile(i) {
|
|
653
|
-
var
|
|
596
|
+
var n, r, o;
|
|
654
597
|
if (!i) return null;
|
|
655
598
|
const t = i.cloneNode(!0);
|
|
656
|
-
return e(
|
|
657
|
-
const
|
|
658
|
-
|
|
659
|
-
a.setAttribute("fixed",
|
|
599
|
+
return e(n = k, fe).call(n, t), e(r = k, Q).call(r, t, "thead"), e(o = k, Q).call(o, t, "tbody"), Array.from(t.querySelectorAll("colgroup col")).forEach((l, d) => {
|
|
600
|
+
const h = l.getAttribute("fixed");
|
|
601
|
+
h && t.querySelectorAll(`[data-col="${d}"]`).forEach((a) => {
|
|
602
|
+
a.setAttribute("fixed", h);
|
|
660
603
|
});
|
|
661
604
|
}), t;
|
|
662
605
|
}
|
|
663
606
|
};
|
|
664
|
-
|
|
607
|
+
fe = new WeakMap(), Q = new WeakMap(), c(k, "TableCompiler"), f(k, fe, /* @__PURE__ */ c((i) => {
|
|
665
608
|
if (!i.querySelector("colgroup")) {
|
|
666
|
-
const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1,
|
|
609
|
+
const t = i.querySelector("tbody tr") || i.querySelector("tr"), s = t ? t.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
|
|
667
610
|
for (let o = 0; o < s; o++) {
|
|
668
|
-
const
|
|
669
|
-
|
|
611
|
+
const l = document.createElement("col");
|
|
612
|
+
l.setAttribute("width", r), n.appendChild(l);
|
|
670
613
|
}
|
|
671
|
-
i.prepend(
|
|
614
|
+
i.prepend(n);
|
|
672
615
|
}
|
|
673
616
|
if (!i.querySelector("thead")) {
|
|
674
617
|
const t = document.createElement("thead"), s = i.querySelector("colgroup");
|
|
675
618
|
s ? s.after(t) : i.prepend(t);
|
|
676
619
|
}
|
|
677
620
|
i.classList.add("nine-table-element"), i.style.display = "table";
|
|
678
|
-
}, "#ensureTableStructure")),
|
|
679
|
-
const s = Array.from(i.querySelectorAll(t + " tr")),
|
|
680
|
-
if (
|
|
621
|
+
}, "#ensureTableStructure")), f(k, Q, /* @__PURE__ */ c((i, t) => {
|
|
622
|
+
const s = Array.from(i.querySelectorAll(t + " tr")), n = Array.from(i.querySelectorAll(t + " th," + t + " td")), r = s.length;
|
|
623
|
+
if (r === 0 || n.length === 0) return;
|
|
681
624
|
let o = 0;
|
|
682
|
-
|
|
683
|
-
o +=
|
|
625
|
+
n.forEach((d) => {
|
|
626
|
+
o += d.colSpan || 1;
|
|
684
627
|
});
|
|
685
|
-
const
|
|
686
|
-
s.forEach((
|
|
687
|
-
const
|
|
628
|
+
const l = Array.from(Array(r), () => Array(o).fill(null));
|
|
629
|
+
s.forEach((d) => {
|
|
630
|
+
const h = d.sectionRowIndex;
|
|
688
631
|
let a = 0;
|
|
689
|
-
Array.from(
|
|
690
|
-
for (let
|
|
691
|
-
if (
|
|
692
|
-
a =
|
|
632
|
+
Array.from(d.querySelectorAll("th,td")).forEach((u) => {
|
|
633
|
+
for (let x = 0; x < l[h].length; x++)
|
|
634
|
+
if (l[h][x] === null) {
|
|
635
|
+
a = x;
|
|
693
636
|
break;
|
|
694
637
|
}
|
|
695
|
-
const
|
|
696
|
-
for (let
|
|
697
|
-
for (let
|
|
698
|
-
|
|
638
|
+
const b = u.rowSpan || 1, w = u.colSpan || 1;
|
|
639
|
+
for (let x = 0; x < b; x++)
|
|
640
|
+
for (let I = 0; I < w; I++)
|
|
641
|
+
h + x < r && a + I < o && (l[h + x][a + I] = x === 0 && I === 0 ? "1" : "0");
|
|
699
642
|
});
|
|
700
|
-
}), s.forEach((
|
|
701
|
-
const
|
|
702
|
-
Array.from(
|
|
703
|
-
for (let
|
|
704
|
-
if (
|
|
705
|
-
a.dataset.col =
|
|
643
|
+
}), s.forEach((d) => {
|
|
644
|
+
const h = d.sectionRowIndex;
|
|
645
|
+
Array.from(d.querySelectorAll("th,td")).forEach((a) => {
|
|
646
|
+
for (let u = 0; u < l[h].length; u++)
|
|
647
|
+
if (l[h][u] === "1") {
|
|
648
|
+
a.dataset.col = u, l[h][u] = "0";
|
|
706
649
|
break;
|
|
707
650
|
}
|
|
708
651
|
});
|
|
709
652
|
});
|
|
710
653
|
}, "#resetColIndex"));
|
|
711
|
-
let
|
|
712
|
-
var
|
|
713
|
-
const
|
|
654
|
+
let Ee = k;
|
|
655
|
+
var S, ue, ee, ge;
|
|
656
|
+
const Me = class Me {
|
|
714
657
|
constructor(i) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
e(this,
|
|
658
|
+
f(this, S);
|
|
659
|
+
f(this, ue, /* @__PURE__ */ c(() => {
|
|
660
|
+
e(this, ge).call(this), new ResizeObserver((i) => {
|
|
718
661
|
for (let t of i)
|
|
719
|
-
e(this,
|
|
720
|
-
}).observe(e(this,
|
|
662
|
+
e(this, S).getAttribute("auto-height") === "true" && e(this, ee).call(this);
|
|
663
|
+
}).observe(e(this, S));
|
|
721
664
|
}, "#init"));
|
|
722
|
-
|
|
723
|
-
var
|
|
724
|
-
const i = Array.from(e(this,
|
|
665
|
+
f(this, ee, /* @__PURE__ */ c(() => {
|
|
666
|
+
var d, h;
|
|
667
|
+
const i = Array.from(e(this, S).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
725
668
|
if (i.length === 0) return;
|
|
726
|
-
const t = parseInt(e(this,
|
|
727
|
-
e(this,
|
|
669
|
+
const t = parseInt(e(this, S).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((a) => a.getRowHeight())), n = (d = e(this, S).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = e(this, S).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, l = t * s + n + r + o;
|
|
670
|
+
e(this, S).style.height = `${l}px`;
|
|
728
671
|
}, "#applyAutoHeight"));
|
|
729
|
-
|
|
730
|
-
const t = Array.from(e(this,
|
|
731
|
-
const
|
|
732
|
-
return
|
|
733
|
-
}).join(""), o = t.map((
|
|
734
|
-
e(this,
|
|
672
|
+
f(this, ge, /* @__PURE__ */ c(() => {
|
|
673
|
+
const t = Array.from(e(this, S).children).filter((h) => h.tagName === "TABLE"), s = e(this, S).getAttribute("auto-height") === "true", n = t.length, r = t.map((h, a) => {
|
|
674
|
+
const b = `<nine-table-sheet class="${a === 0 ? "active" : ""}" data-index="${a}"></nine-table-sheet>`, w = a < n - 1 ? `<nine-splitter class="h" data-split-index="${a}"></nine-splitter>` : "";
|
|
675
|
+
return b + w;
|
|
676
|
+
}).join(""), o = t.map((h, a) => `<div class="nine-tab-item ${a === 0 ? "active" : ""}" data-index="${a}">Sheet ${a + 1}</div>`).join("");
|
|
677
|
+
e(this, S).shadowRoot.innerHTML = `
|
|
735
678
|
<style>
|
|
736
679
|
:host {
|
|
737
680
|
display: flex;
|
|
@@ -820,7 +763,7 @@ const We = class We {
|
|
|
820
763
|
<nine-table-body>
|
|
821
764
|
<nine-table-summary></nine-table-summary>
|
|
822
765
|
<nine-table-sheets>
|
|
823
|
-
<nine-table-sheets-body>${
|
|
766
|
+
<nine-table-sheets-body>${r}</nine-table-sheets-body>
|
|
824
767
|
<nine-table-sheets-footer>
|
|
825
768
|
<div class="nine-tab-bar">${o}</div>
|
|
826
769
|
<div class="sheets-counter">Total : <span id="row-count">0</span></div>
|
|
@@ -830,236 +773,236 @@ const We = class We {
|
|
|
830
773
|
</nine-table-body>
|
|
831
774
|
<nine-table-footer></nine-table-footer>
|
|
832
775
|
`;
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
776
|
+
const l = e(this, S).shadowRoot.querySelectorAll("nine-table-sheet"), d = Ee.compileAll(t);
|
|
777
|
+
l == null || l.forEach((h, a) => {
|
|
778
|
+
d[a] && setTimeout(() => {
|
|
779
|
+
h.generate(d[a]), s && e(this, ee).call(this);
|
|
837
780
|
});
|
|
838
781
|
});
|
|
839
782
|
}, "#render"));
|
|
840
|
-
|
|
783
|
+
g(this, S, i), e(this, ue).call(this);
|
|
841
784
|
}
|
|
842
785
|
};
|
|
843
|
-
|
|
844
|
-
let
|
|
845
|
-
var
|
|
846
|
-
const
|
|
786
|
+
S = new WeakMap(), ue = new WeakMap(), ee = new WeakMap(), ge = new WeakMap(), c(Me, "LayoutManager");
|
|
787
|
+
let Ae = Me;
|
|
788
|
+
var W, V;
|
|
789
|
+
const $e = class $e {
|
|
847
790
|
constructor(i) {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
791
|
+
f(this, W);
|
|
792
|
+
f(this, V, -1);
|
|
793
|
+
v(this, "count", /* @__PURE__ */ c(() => e(this, W).rawRecords.length, "count"));
|
|
794
|
+
g(this, W, i);
|
|
852
795
|
}
|
|
853
796
|
get at() {
|
|
854
|
-
return e(this,
|
|
797
|
+
return e(this, V);
|
|
855
798
|
}
|
|
856
799
|
set at(i) {
|
|
857
|
-
var s,
|
|
858
|
-
|
|
859
|
-
const t = ((
|
|
860
|
-
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this,
|
|
861
|
-
var
|
|
862
|
-
(o = (
|
|
800
|
+
var s, n;
|
|
801
|
+
g(this, V, parseInt(i, 10));
|
|
802
|
+
const t = ((n = (s = e(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || e(this, W).owner.body;
|
|
803
|
+
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, V)}"]`) && setTimeout(() => {
|
|
804
|
+
var r, o;
|
|
805
|
+
(o = (r = e(this, W).owner).scrollTo_V1) == null || o.call(r, e(this, V));
|
|
863
806
|
});
|
|
864
807
|
}
|
|
865
808
|
};
|
|
866
|
-
|
|
867
|
-
let
|
|
868
|
-
var
|
|
869
|
-
const
|
|
809
|
+
W = new WeakMap(), V = new WeakMap(), c($e, "ngRow");
|
|
810
|
+
let qe = $e;
|
|
811
|
+
var E, m, A, F, be, O, ye, te, pe, me, K;
|
|
812
|
+
const q = class q {
|
|
870
813
|
constructor(i, t) {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
const i = e(this,
|
|
814
|
+
f(this, E);
|
|
815
|
+
f(this, m);
|
|
816
|
+
f(this, A, []);
|
|
817
|
+
f(this, F, []);
|
|
818
|
+
f(this, be, 0);
|
|
819
|
+
f(this, O, []);
|
|
820
|
+
f(this, ye, /* @__PURE__ */ c(() => {
|
|
821
|
+
g(this, O, []);
|
|
822
|
+
const i = e(this, E).template || [];
|
|
880
823
|
Array.from(i).forEach((t) => {
|
|
881
824
|
var s;
|
|
882
|
-
e(this,
|
|
883
|
-
}), (e(this,
|
|
884
|
-
t.__ng || (t.__ng = e(this,
|
|
825
|
+
e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
826
|
+
}), (e(this, m).rawRecords || []).forEach((t) => {
|
|
827
|
+
t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
|
|
885
828
|
});
|
|
886
829
|
}, "#initialize"));
|
|
887
|
-
|
|
830
|
+
v(this, "set", /* @__PURE__ */ c((i) => {
|
|
888
831
|
this.clear(), this.add(i, !1);
|
|
889
832
|
}, "set"));
|
|
890
|
-
|
|
891
|
-
rowState:
|
|
833
|
+
f(this, te, /* @__PURE__ */ c(() => ({
|
|
834
|
+
rowState: q.ROW_STATE.EMPTY,
|
|
892
835
|
deleted: !1,
|
|
893
836
|
filtered: !1,
|
|
894
|
-
height: e(this,
|
|
837
|
+
height: e(this, O).slice(),
|
|
895
838
|
o: {},
|
|
896
839
|
c: {},
|
|
897
|
-
_: [0, 0, 0, 0,
|
|
840
|
+
_: [0, 0, 0, 0, q.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, O).slice(), -1, {}, {}]
|
|
898
841
|
}), "#getDefaultMeta"));
|
|
899
|
-
|
|
900
|
-
|
|
842
|
+
v(this, "reset", /* @__PURE__ */ c(() => {
|
|
843
|
+
g(this, A, []), g(this, F, []);
|
|
901
844
|
}, "reset"));
|
|
902
|
-
|
|
845
|
+
v(this, "clear", /* @__PURE__ */ c(() => {
|
|
903
846
|
var i;
|
|
904
|
-
e(this,
|
|
847
|
+
e(this, m).rawRecords = [], g(this, A, []), g(this, F, []), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
|
|
905
848
|
}, "clear"));
|
|
906
|
-
|
|
907
|
-
var
|
|
849
|
+
f(this, pe, /* @__PURE__ */ c((i) => {
|
|
850
|
+
var n;
|
|
908
851
|
Array.isArray(i) || (i = [i]);
|
|
909
|
-
const t = typeof ((
|
|
910
|
-
return i.forEach((
|
|
852
|
+
const t = typeof ((n = e(this, E).fields) == null ? void 0 : n.get) == "function" ? e(this, E).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
853
|
+
return i.forEach((r) => {
|
|
911
854
|
const o = { v: [] };
|
|
912
|
-
t.forEach((
|
|
913
|
-
o.v.push(
|
|
855
|
+
t.forEach((l) => {
|
|
856
|
+
o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
|
|
914
857
|
}), s.push(o);
|
|
915
858
|
}), s;
|
|
916
859
|
}, "#json2Array"));
|
|
917
|
-
|
|
918
|
-
t.__ng = e(this,
|
|
860
|
+
f(this, me, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
|
|
861
|
+
t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = q.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
|
|
919
862
|
}), i), "#defaultInsert"));
|
|
920
|
-
|
|
921
|
-
var
|
|
863
|
+
v(this, "add", /* @__PURE__ */ c((i, t = !0) => {
|
|
864
|
+
var r;
|
|
922
865
|
i === void 0 && (i = {});
|
|
923
|
-
const s = e(this,
|
|
924
|
-
e(this,
|
|
925
|
-
const
|
|
926
|
-
return t || s.forEach((o,
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
}), (
|
|
866
|
+
const s = e(this, pe).call(this, i);
|
|
867
|
+
e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, me).call(this, s)), this.resetRecords();
|
|
868
|
+
const n = this.count() - 1;
|
|
869
|
+
return t || s.forEach((o, l) => {
|
|
870
|
+
const d = e(this, m).rawRecords[n - l];
|
|
871
|
+
d && (d.__ng.rowState = q.ROW_STATE.EMPTY);
|
|
872
|
+
}), (r = e(this, m).viewRecords) != null && r.reset && e(this, m).viewRecords.reset(), n;
|
|
930
873
|
}, "add"));
|
|
931
|
-
|
|
874
|
+
v(this, "delete", /* @__PURE__ */ c((i) => {
|
|
932
875
|
var s;
|
|
933
876
|
let t = [];
|
|
934
|
-
Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this,
|
|
935
|
-
if (e(this,
|
|
936
|
-
const
|
|
937
|
-
e(this,
|
|
938
|
-
o.__ng.rowid ===
|
|
877
|
+
Array.isArray(i) ? t = i : typeof i > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(i, 10)], t.sort((n, r) => r - n).forEach((n) => {
|
|
878
|
+
if (e(this, A)[n]) {
|
|
879
|
+
const r = e(this, A)[n].__ng.rowid;
|
|
880
|
+
e(this, A)[n].__ng.rowState === q.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((o) => o.__ng.rowid !== r) : e(this, m).rawRecords.forEach((o) => {
|
|
881
|
+
o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = q.ROW_STATE.DELETE);
|
|
939
882
|
});
|
|
940
883
|
}
|
|
941
|
-
}), this.resetRecords(), (s = e(this,
|
|
884
|
+
}), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
|
|
942
885
|
}, "delete"));
|
|
943
|
-
|
|
944
|
-
var
|
|
886
|
+
v(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
|
|
887
|
+
var d;
|
|
945
888
|
i = parseInt(i, 10);
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
889
|
+
const r = (typeof ((d = e(this, E).fields) == null ? void 0 : d.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
|
|
890
|
+
if (r < 0) return;
|
|
948
891
|
const o = this.getValidData()[i];
|
|
949
892
|
if (!o) return;
|
|
950
|
-
const
|
|
951
|
-
|
|
893
|
+
const l = o.v[r];
|
|
894
|
+
l !== s && o.__ng.rowState !== q.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(t) || (o.__ng.o[t] = l), o.__ng.rowState = q.ROW_STATE.UPDATE), o.v[r] = s, e(this, m).owner.refreshData && e(this, m).owner.refreshData(i);
|
|
952
895
|
}, "setValue"));
|
|
953
|
-
|
|
954
|
-
|
|
896
|
+
v(this, "resetRecords", /* @__PURE__ */ c(() => {
|
|
897
|
+
g(this, F, e(this, m).rawRecords.filter((i) => !i.__ng.deleted)), g(this, A, e(this, m).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), e(this, m).rawRecords.forEach((i, t) => {
|
|
955
898
|
i.__ng.rowidx = t;
|
|
956
|
-
}), e(this,
|
|
899
|
+
}), e(this, A).forEach((i, t) => {
|
|
957
900
|
i.__ng.i = t;
|
|
958
901
|
});
|
|
959
902
|
}, "resetRecords"));
|
|
960
|
-
|
|
961
|
-
|
|
903
|
+
v(this, "getValidData", /* @__PURE__ */ c(() => (e(this, A).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, A)), "getValidData"));
|
|
904
|
+
f(this, K, /* @__PURE__ */ c((i) => {
|
|
962
905
|
var s;
|
|
963
906
|
if (!i) return i;
|
|
964
|
-
const t = typeof ((s = e(this,
|
|
965
|
-
return Array.isArray(i) ? i.filter((
|
|
966
|
-
const
|
|
967
|
-
return t.forEach((o,
|
|
968
|
-
|
|
969
|
-
}),
|
|
907
|
+
const t = typeof ((s = e(this, E).fields) == null ? void 0 : s.get) == "function" ? e(this, E).fields.get() : [];
|
|
908
|
+
return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
|
|
909
|
+
const r = {};
|
|
910
|
+
return t.forEach((o, l) => {
|
|
911
|
+
r[o] = n.v ? n.v[l] : n[o];
|
|
912
|
+
}), r.__ng = n.__ng, r;
|
|
970
913
|
}) : i;
|
|
971
914
|
}, "#conv2"));
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
var
|
|
915
|
+
v(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
|
|
916
|
+
v(this, "get", /* @__PURE__ */ c((i, t) => {
|
|
917
|
+
var r;
|
|
975
918
|
const s = this.getValidData();
|
|
976
919
|
if (!s || s.length <= 0) return;
|
|
977
|
-
if (i == null) return e(this,
|
|
920
|
+
if (i == null) return e(this, K).call(this, s);
|
|
978
921
|
if (i < 0 || i >= s.length) return null;
|
|
979
|
-
const
|
|
922
|
+
const n = typeof ((r = e(this, E).fields) == null ? void 0 : r.get) == "function" ? e(this, E).fields.get() : [];
|
|
980
923
|
if (t != null) {
|
|
981
|
-
const o =
|
|
924
|
+
const o = n.indexOf(t);
|
|
982
925
|
return o >= 0 ? s[i].v[o] : null;
|
|
983
926
|
}
|
|
984
|
-
return e(this,
|
|
927
|
+
return e(this, K).call(this, s[i]);
|
|
985
928
|
}, "get"));
|
|
986
|
-
|
|
929
|
+
g(this, E, i), g(this, m, t), e(this, ye).call(this);
|
|
987
930
|
}
|
|
988
931
|
get source() {
|
|
989
|
-
return e(this,
|
|
932
|
+
return e(this, K).call(this, e(this, m).rawRecords);
|
|
990
933
|
}
|
|
991
934
|
set source(i) {
|
|
992
935
|
this.clear(), this.add(i, !1);
|
|
993
936
|
}
|
|
994
937
|
get nextId() {
|
|
995
|
-
return ++
|
|
938
|
+
return ++Pe(this, be)._;
|
|
996
939
|
}
|
|
997
940
|
get length() {
|
|
998
|
-
return e(this,
|
|
941
|
+
return e(this, A).length;
|
|
999
942
|
}
|
|
1000
943
|
getRowCount() {
|
|
1001
944
|
return this.length;
|
|
1002
945
|
}
|
|
1003
946
|
};
|
|
1004
|
-
|
|
1005
|
-
|
|
947
|
+
E = new WeakMap(), m = new WeakMap(), A = new WeakMap(), F = new WeakMap(), be = new WeakMap(), O = new WeakMap(), ye = new WeakMap(), te = new WeakMap(), pe = new WeakMap(), me = new WeakMap(), K = new WeakMap(), c(q, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
948
|
+
v(q, "ROW_STATE", {
|
|
1006
949
|
EMPTY: "EMPTY",
|
|
1007
950
|
NORMAL: "NORMAL",
|
|
1008
951
|
INSERT: "INSERT",
|
|
1009
952
|
UPDATE: "UPDATE",
|
|
1010
953
|
DELETE: "DELETE"
|
|
1011
954
|
});
|
|
1012
|
-
let
|
|
1013
|
-
const
|
|
955
|
+
let Te = q;
|
|
956
|
+
const We = class We {
|
|
1014
957
|
constructor(i) {
|
|
1015
|
-
this.owner = i, this.row = new
|
|
958
|
+
this.owner = i, this.row = new qe(this), this.data = new Te(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
1016
959
|
var t;
|
|
1017
960
|
(t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
|
|
1018
961
|
}, this.setDataSource = (t) => {
|
|
1019
962
|
this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(t || []);
|
|
1020
963
|
}, this.getRowState = (t) => {
|
|
1021
|
-
var
|
|
964
|
+
var n, r;
|
|
1022
965
|
const s = parseInt(t, 10);
|
|
1023
966
|
if (!(s >= this.data.count()))
|
|
1024
|
-
return (
|
|
967
|
+
return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
|
|
1025
968
|
}, this.getRowPosition = () => this.row.at, this.setRowPosition = (t) => {
|
|
1026
969
|
this.row.at = t;
|
|
1027
|
-
}, this.scrollTo_V1 = (t) => (t < 0 && (t = 0), t >= this.rawRecords.length && (t = this.rawRecords.length - 1), this.viewRecords.rawIndex = t, this.viewRecords.reset && this.viewRecords.reset(), !(t <= 0 || t >= this.rawRecords.length - 1)), this.getColumn = (t, s) => this.data.get(t, s), this.setColumn = (t, s,
|
|
1028
|
-
t = parseInt(t, 10), this.data.setValue(t, s,
|
|
970
|
+
}, this.scrollTo_V1 = (t) => (t < 0 && (t = 0), t >= this.rawRecords.length && (t = this.rawRecords.length - 1), this.viewRecords.rawIndex = t, this.viewRecords.reset && this.viewRecords.reset(), !(t <= 0 || t >= this.rawRecords.length - 1)), this.getColumn = (t, s) => this.data.get(t, s), this.setColumn = (t, s, n) => {
|
|
971
|
+
t = parseInt(t, 10), this.data.setValue(t, s, n);
|
|
1029
972
|
}, this.setDataSource([]);
|
|
1030
973
|
}
|
|
1031
974
|
};
|
|
1032
|
-
|
|
1033
|
-
let
|
|
1034
|
-
var
|
|
1035
|
-
const
|
|
975
|
+
c(We, "ngDataManager");
|
|
976
|
+
let ke = We;
|
|
977
|
+
var X, we;
|
|
978
|
+
const Oe = class Oe extends HTMLElement {
|
|
1036
979
|
constructor() {
|
|
1037
980
|
super();
|
|
1038
981
|
//#created = false;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
this.attachShadow({ mode: "open" }),
|
|
982
|
+
f(this, X);
|
|
983
|
+
f(this, we);
|
|
984
|
+
this.attachShadow({ mode: "open" }), g(this, X, new ke(this));
|
|
1042
985
|
}
|
|
1043
986
|
connectedCallback() {
|
|
1044
|
-
|
|
987
|
+
g(this, we, new Ae(this)), Z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
1045
988
|
}
|
|
1046
989
|
disconnectedCallback() {
|
|
1047
|
-
|
|
990
|
+
Z.log("NineTable disconnected.");
|
|
1048
991
|
}
|
|
1049
992
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
1050
993
|
get data() {
|
|
1051
|
-
return e(this,
|
|
994
|
+
return e(this, X).data;
|
|
1052
995
|
}
|
|
1053
996
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
1054
997
|
get row() {
|
|
1055
|
-
return e(this,
|
|
998
|
+
return e(this, X).row;
|
|
1056
999
|
}
|
|
1057
1000
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
1058
1001
|
get dataManager() {
|
|
1059
|
-
return e(this,
|
|
1002
|
+
return e(this, X);
|
|
1060
1003
|
}
|
|
1061
1004
|
};
|
|
1062
|
-
|
|
1063
|
-
let
|
|
1064
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
1005
|
+
X = new WeakMap(), we = new WeakMap(), c(Oe, "NineTable");
|
|
1006
|
+
let Le = Oe;
|
|
1007
|
+
customElements.get("nine-table") || customElements.define("nine-table", Le);
|
|
1065
1008
|
//# sourceMappingURL=nine-table.js.map
|