@ninebone/table 0.0.107 β 0.0.109
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 +227 -209
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +4 -4
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
var qe = Object.defineProperty;
|
|
2
|
-
var ke = (
|
|
3
|
-
throw TypeError(
|
|
2
|
+
var ke = (w) => {
|
|
3
|
+
throw TypeError(w);
|
|
4
4
|
};
|
|
5
|
-
var _e = (
|
|
6
|
-
var l = (
|
|
7
|
-
var v = (
|
|
8
|
-
var e = (
|
|
9
|
-
var Ae = (
|
|
5
|
+
var _e = (w, s, t) => s in w ? qe(w, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[s] = t;
|
|
6
|
+
var l = (w, s) => qe(w, "name", { value: s, configurable: !0 });
|
|
7
|
+
var v = (w, s, t) => _e(w, typeof s != "symbol" ? s + "" : s, t), Le = (w, s, t) => s.has(w) || ke("Cannot " + t);
|
|
8
|
+
var e = (w, s, t) => (Le(w, s, "read from private field"), t ? t.call(w) : s.get(w)), f = (w, s, t) => s.has(w) ? ke("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(w) : s.set(w, t), y = (w, s, t, i) => (Le(w, s, "write to private field"), i ? i.call(w, t) : s.set(w, t), t);
|
|
9
|
+
var Ae = (w, s, t, i) => ({
|
|
10
10
|
set _(n) {
|
|
11
|
-
y(
|
|
11
|
+
y(w, s, n, t);
|
|
12
12
|
},
|
|
13
13
|
get _() {
|
|
14
|
-
return e(
|
|
14
|
+
return e(w, s, i);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
import { trace as Ce } from "@ninebone/util";
|
|
18
|
-
const
|
|
18
|
+
const we = class we extends Ce.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
l(
|
|
24
|
-
let ae =
|
|
25
|
-
const
|
|
26
|
-
var _,
|
|
27
|
-
const
|
|
23
|
+
l(we, "Trace");
|
|
24
|
+
let ae = we;
|
|
25
|
+
const F = new ae();
|
|
26
|
+
var _, H, p, W, O, z, Z, B, j;
|
|
27
|
+
const me = class me extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
30
|
f(this, _);
|
|
31
|
-
f(this,
|
|
31
|
+
f(this, H, !1);
|
|
32
32
|
f(this, p);
|
|
33
33
|
f(this, W);
|
|
34
|
-
f(this, H);
|
|
35
34
|
f(this, O);
|
|
35
|
+
f(this, z);
|
|
36
36
|
f(this, Z, /* @__PURE__ */ l(() => {
|
|
37
37
|
if (!e(this, _)) return;
|
|
38
38
|
const t = e(this, _).querySelector(".ng-container-body");
|
|
39
|
-
t && (y(this,
|
|
39
|
+
t && (y(this, z, new ResizeObserver(() => {
|
|
40
40
|
this.refresh();
|
|
41
|
-
})), e(this,
|
|
41
|
+
})), e(this, z).observe(t));
|
|
42
42
|
}, "#observeResize"));
|
|
43
43
|
v(this, "refresh", /* @__PURE__ */ l(() => {
|
|
44
|
-
if (!e(this, _) || !e(this, p) || e(this,
|
|
44
|
+
if (!e(this, _) || !e(this, p) || e(this, H)) return;
|
|
45
45
|
const t = e(this, p).container, i = t.querySelector("table");
|
|
46
46
|
if (!i) return;
|
|
47
|
-
const n = e(this, p).track, o = e(this, p).thumb, r = e(this, _).querySelector(".ng-container-bottom"),
|
|
48
|
-
if (
|
|
47
|
+
const n = e(this, p).track, o = e(this, p).thumb, r = e(this, _).querySelector(".ng-container-bottom"), a = t.clientWidth, u = i.scrollWidth;
|
|
48
|
+
if (a !== 0 && u > a)
|
|
49
49
|
r && (r.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
r && (r.style.display = "none");
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const g = Math.max(Math.min(
|
|
54
|
+
const c = n.clientWidth;
|
|
55
|
+
if (c <= 0) return;
|
|
56
|
+
const g = Math.max(Math.min(c * (a / u), c), 20);
|
|
57
57
|
o.style.width = `${g}px`;
|
|
58
58
|
let h = 0;
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const x =
|
|
59
|
+
const b = i.style.transform;
|
|
60
|
+
if (b && b.includes("translateX")) {
|
|
61
|
+
const x = b.match(/translateX\(([-\d.]+)px\)/);
|
|
62
62
|
x && x[1] && (h = parseFloat(x[1]));
|
|
63
63
|
} else
|
|
64
64
|
h = parseInt(i.style.left || 0, 10);
|
|
65
|
-
let d = parseInt(Math.abs(h) *
|
|
65
|
+
let d = parseInt(Math.abs(h) * c / u, 10);
|
|
66
66
|
d < 0 && (d = 0);
|
|
67
|
-
const
|
|
68
|
-
d >
|
|
67
|
+
const R = c - g;
|
|
68
|
+
d > R && (d = R), o.style.left = `${d}px`, e(this, p).left.disabled = d === 0, e(this, p).right.disabled = d >= R - 1;
|
|
69
69
|
}, "refresh"));
|
|
70
|
-
f(this,
|
|
70
|
+
f(this, B, /* @__PURE__ */ l((t) => {
|
|
71
71
|
if (!e(this, p)) return !1;
|
|
72
72
|
const i = e(this, p).container, n = i.querySelector("table");
|
|
73
73
|
if (!n) return !1;
|
|
74
74
|
const o = e(this, p).track.getBoundingClientRect(), r = e(this, p).thumb.clientWidth;
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
let h =
|
|
81
|
-
return -h > g -
|
|
75
|
+
let a = t;
|
|
76
|
+
a < 0 && (a = 0);
|
|
77
|
+
const u = o.width - r;
|
|
78
|
+
a > u && (a = u), a = parseInt(a, 10), e(this, p).thumb.style.left = `${a}px`, e(this, p).left.disabled = a === 0, e(this, p).right.disabled = a >= u - 1;
|
|
79
|
+
const c = i.clientWidth, g = n.scrollWidth;
|
|
80
|
+
let h = u > 0 ? -a * (g - c) / u : 0;
|
|
81
|
+
return -h > g - c && (h = -(g - c)), -h + 5 > g - c && (h = -(g - c)), c >= g && (h = 0), n.style.transform = `translateX(${h}px)`, a > 0 && a < u - 1;
|
|
82
82
|
}, "#thumbMoveTo"));
|
|
83
83
|
f(this, j, /* @__PURE__ */ l(() => {
|
|
84
84
|
const t = /* @__PURE__ */ l((n) => {
|
|
85
|
-
clearInterval(e(this, W)), clearInterval(e(this,
|
|
85
|
+
clearInterval(e(this, W)), clearInterval(e(this, O));
|
|
86
86
|
const o = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
87
|
-
e(this,
|
|
88
|
-
clearInterval(e(this, W)), y(this,
|
|
87
|
+
e(this, B).call(this, o + n), y(this, W, setInterval(() => {
|
|
88
|
+
clearInterval(e(this, W)), y(this, O, setInterval(() => {
|
|
89
89
|
const r = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
90
|
-
e(this,
|
|
90
|
+
e(this, B).call(this, r + n) || clearInterval(e(this, O));
|
|
91
91
|
}, 50));
|
|
92
92
|
}, 500));
|
|
93
93
|
}, "delayScroll"), i = /* @__PURE__ */ l(() => {
|
|
94
|
-
clearInterval(e(this, W)), clearInterval(e(this,
|
|
94
|
+
clearInterval(e(this, W)), clearInterval(e(this, O));
|
|
95
95
|
}, "clearTimer");
|
|
96
96
|
["mouseup", "mouseleave", "touchend"].forEach((n) => {
|
|
97
97
|
e(this, p).left.addEventListener(n, i), e(this, p).right.addEventListener(n, i), e(this, p).track.addEventListener(n, i);
|
|
@@ -103,16 +103,16 @@ const we = class we extends HTMLElement {
|
|
|
103
103
|
if (n.button !== 0) return;
|
|
104
104
|
n.preventDefault();
|
|
105
105
|
const o = e(this, p).track.getBoundingClientRect(), r = e(this, p).thumb.clientWidth;
|
|
106
|
-
e(this,
|
|
106
|
+
e(this, B).call(this, n.clientX - o.left - r / 2);
|
|
107
107
|
}), e(this, p).thumb.addEventListener("mousedown", (n) => {
|
|
108
108
|
if (n.button !== 0) return;
|
|
109
|
-
n.stopPropagation(), n.preventDefault(), y(this,
|
|
110
|
-
const o = /* @__PURE__ */ l((
|
|
111
|
-
if (!e(this,
|
|
112
|
-
const
|
|
113
|
-
e(this,
|
|
109
|
+
n.stopPropagation(), n.preventDefault(), y(this, H, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
|
|
110
|
+
const o = /* @__PURE__ */ l((a) => {
|
|
111
|
+
if (!e(this, H)) return;
|
|
112
|
+
const u = e(this, p).track.getBoundingClientRect();
|
|
113
|
+
e(this, B).call(this, a.clientX - u.left - this.shiftX);
|
|
114
114
|
}, "onMouseMove"), r = /* @__PURE__ */ l(() => {
|
|
115
|
-
y(this,
|
|
115
|
+
y(this, H, !1), i(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
|
|
116
116
|
}, "onMouseUp");
|
|
117
117
|
document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
|
|
118
118
|
});
|
|
@@ -200,121 +200,139 @@ const we = class we extends HTMLElement {
|
|
|
200
200
|
t();
|
|
201
201
|
}
|
|
202
202
|
disconnectedCallback() {
|
|
203
|
-
e(this,
|
|
203
|
+
e(this, z) && e(this, z).disconnect();
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
-
_ = new WeakMap(),
|
|
207
|
-
let ce =
|
|
206
|
+
_ = new WeakMap(), H = new WeakMap(), p = new WeakMap(), W = new WeakMap(), O = new WeakMap(), z = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), j = new WeakMap(), l(me, "NineTableHScrollBar");
|
|
207
|
+
let ce = me;
|
|
208
208
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ce);
|
|
209
|
-
var G,
|
|
209
|
+
var G, C;
|
|
210
210
|
const ve = class ve {
|
|
211
211
|
constructor(s) {
|
|
212
212
|
f(this, G);
|
|
213
|
-
f(this,
|
|
214
|
-
/**
|
|
215
|
-
* μ΄κΈ° ν
νλ¦Ώ TR ꡬ쑰λ₯Ό μΆμΆν©λλ€ (λ€μ€ tr μ§μ)
|
|
216
|
-
*/
|
|
213
|
+
f(this, C, []);
|
|
217
214
|
v(this, "initTemplate", /* @__PURE__ */ l((s) => {
|
|
218
215
|
const t = s.querySelector("tbody.bindable") || s.querySelector("tbody");
|
|
219
216
|
if (!t) return;
|
|
220
217
|
const i = Array.from(t.querySelectorAll("tr")).filter((n) => !n.classList.contains("nodata"));
|
|
221
|
-
y(this,
|
|
218
|
+
y(this, C, i.map((n) => n.cloneNode(!0))), console.log(`[RowManager] Template initialized with ${e(this, C).length} row(s).`);
|
|
222
219
|
}, "initTemplate"));
|
|
223
220
|
/**
|
|
224
|
-
*
|
|
221
|
+
* π― ν
νλ¦Ώ 1μΈνΈμ μ΄ λμ΄λ₯Ό κ³μ°ν©λλ€. (λ‘κ·Έ μΆκ°)
|
|
222
|
+
*/
|
|
223
|
+
v(this, "getTemplateHeight", /* @__PURE__ */ l(() => {
|
|
224
|
+
if (e(this, C).length === 0)
|
|
225
|
+
return console.log("[RowManager] Template is empty, fallback height: 24px"), 24;
|
|
226
|
+
let s = 0;
|
|
227
|
+
return e(this, C).forEach((t, i) => {
|
|
228
|
+
F.log(t.offsetHeight);
|
|
229
|
+
const n = t.offsetHeight || 24;
|
|
230
|
+
s += n, console.log(`[RowManager] Template TR[${i}] height: ${n}px`);
|
|
231
|
+
}), console.log(`[RowManager] Total Template Set Height: ${s}px`), s;
|
|
232
|
+
}, "getTemplateHeight"));
|
|
233
|
+
/**
|
|
234
|
+
* π― 컨ν
μ΄λ λμ΄μ ν
νλ¦Ώ λμ΄λ₯Ό λ°νμΌλ‘ νμν TR μ
νΈ(ν) κ°μλ₯Ό λμ μ°μ ν©λλ€. (λ‘κ·Έ μΆκ°)
|
|
225
235
|
*/
|
|
226
|
-
v(this, "
|
|
227
|
-
|
|
236
|
+
v(this, "calculateRequiredRowCount", /* @__PURE__ */ l((s) => {
|
|
237
|
+
const t = s.clientHeight || s.getBoundingClientRect().height || 400, i = this.getTemplateHeight(), n = Math.ceil(t / i), o = 20, r = n + o;
|
|
238
|
+
return console.log(`[RowManager] Container Height: ${t}px | Visible Rows: ${n} | Buffer: ${o} | Final Target Rows: ${r}`), r;
|
|
239
|
+
}, "calculateRequiredRowCount"));
|
|
240
|
+
v(this, "renderRows", /* @__PURE__ */ l((s, t = null) => {
|
|
241
|
+
if (e(this, C).length === 0) {
|
|
242
|
+
console.warn("[RowManager] Cannot render rows because template is empty.");
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
228
245
|
const i = s.querySelector("tbody.bindable") || s.querySelector("tbody");
|
|
229
246
|
if (!i) return;
|
|
230
|
-
i.querySelectorAll("tr:not(.nodata)").forEach((
|
|
231
|
-
const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment();
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
247
|
+
i.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
|
|
248
|
+
const n = i.querySelector("tr.nodata"), o = document.createDocumentFragment(), r = t !== null ? t : this.calculateRequiredRowCount(s);
|
|
249
|
+
console.log(`[RowManager] Rendering ${r} row sets into container...`);
|
|
250
|
+
for (let a = 0; a < r; a++)
|
|
251
|
+
e(this, C).forEach((u) => {
|
|
252
|
+
o.appendChild(u.cloneNode(!0));
|
|
235
253
|
});
|
|
236
|
-
n ? n.before(o) : i.appendChild(o);
|
|
254
|
+
n ? n.before(o) : i.appendChild(o), console.log(`[RowManager] Successfully rendered. Total DOM tr count in tbody: ${i.querySelectorAll("tr:not(.nodata)").length}`);
|
|
237
255
|
}, "renderRows"));
|
|
238
256
|
y(this, G, s);
|
|
239
257
|
}
|
|
240
258
|
get templateLength() {
|
|
241
|
-
return e(this,
|
|
259
|
+
return e(this, C).length || 1;
|
|
242
260
|
}
|
|
243
261
|
};
|
|
244
|
-
G = new WeakMap(),
|
|
262
|
+
G = new WeakMap(), C = new WeakMap(), l(ve, "RowManager");
|
|
245
263
|
let he = ve;
|
|
246
|
-
var L,
|
|
247
|
-
const
|
|
264
|
+
var L, I, J;
|
|
265
|
+
const X = class X extends HTMLElement {
|
|
248
266
|
constructor() {
|
|
249
267
|
super();
|
|
250
268
|
f(this, L, null);
|
|
251
|
-
f(this,
|
|
269
|
+
f(this, I);
|
|
252
270
|
v(this, "init", /* @__PURE__ */ l((t) => {
|
|
253
271
|
if (!t) return;
|
|
254
|
-
const i = /* @__PURE__ */ l((
|
|
255
|
-
const g = /* @__PURE__ */ l((
|
|
256
|
-
if (
|
|
257
|
-
const d =
|
|
258
|
-
for (let
|
|
272
|
+
const i = /* @__PURE__ */ l((c) => {
|
|
273
|
+
const g = /* @__PURE__ */ l((b) => {
|
|
274
|
+
if (b.querySelector("colgroup")) return;
|
|
275
|
+
const d = b.querySelector("tbody tr") || b.querySelector("tr"), R = d ? d.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), k = Math.max(Math.floor((b.clientWidth || 600) / R), 100);
|
|
276
|
+
for (let E = 0; E < R; E++) {
|
|
259
277
|
const le = document.createElement("col");
|
|
260
278
|
le.setAttribute("width", k), x.appendChild(le);
|
|
261
279
|
}
|
|
262
|
-
|
|
263
|
-
}, "ensureColgroup"), h = /* @__PURE__ */ l((
|
|
264
|
-
if (
|
|
265
|
-
const d = document.createElement("thead"),
|
|
266
|
-
|
|
280
|
+
b.prepend(x);
|
|
281
|
+
}, "ensureColgroup"), h = /* @__PURE__ */ l((b) => {
|
|
282
|
+
if (b.querySelector("thead")) return;
|
|
283
|
+
const d = document.createElement("thead"), R = b.querySelector("colgroup");
|
|
284
|
+
R ? R.after(d) : b.prepend(d);
|
|
267
285
|
}, "ensureThead");
|
|
268
|
-
return g(
|
|
286
|
+
return g(c), h(c), c.classList.add("nine-table-element"), c;
|
|
269
287
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
270
|
-
y(this, L, i(n)), e(this, L).style.display = "table", e(this,
|
|
271
|
-
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"),
|
|
272
|
-
const
|
|
288
|
+
y(this, L, i(n)), e(this, L).style.display = "table", e(this, I).initTemplate(e(this, L));
|
|
289
|
+
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), a = this.querySelector(".ng-container-right"), u = /* @__PURE__ */ l((c, g, h = !1) => {
|
|
290
|
+
const b = c.cloneNode(!0), d = Array.from(b.querySelectorAll("colgroup col")), R = [];
|
|
273
291
|
return d.forEach((x, k) => {
|
|
274
|
-
const
|
|
275
|
-
(h ? !
|
|
276
|
-
}),
|
|
277
|
-
d[x] && d[x].remove(),
|
|
278
|
-
const
|
|
279
|
-
|
|
292
|
+
const E = x.getAttribute("fixed");
|
|
293
|
+
(h ? !E || E === "" : E === g) || R.push(k);
|
|
294
|
+
}), R.reverse().forEach((x) => {
|
|
295
|
+
d[x] && d[x].remove(), b.querySelectorAll("tr").forEach((k) => {
|
|
296
|
+
const E = k.querySelectorAll("th, td");
|
|
297
|
+
E[x] && E[x].remove();
|
|
280
298
|
});
|
|
281
|
-
}),
|
|
299
|
+
}), b;
|
|
282
300
|
}, "filterTableByFixed");
|
|
283
301
|
if (r) {
|
|
284
|
-
const
|
|
285
|
-
r.innerHTML = "", r.appendChild(
|
|
302
|
+
const c = u(e(this, L), null, !0);
|
|
303
|
+
r.innerHTML = "", r.appendChild(c), e(this, I).renderRows(r);
|
|
286
304
|
}
|
|
287
305
|
if (o) {
|
|
288
|
-
const
|
|
306
|
+
const c = u(e(this, L), "left", !1);
|
|
289
307
|
let g = 0;
|
|
290
|
-
|
|
291
|
-
const d = parseInt(
|
|
308
|
+
c.querySelectorAll("col").forEach((b) => {
|
|
309
|
+
const d = parseInt(b.getAttribute("width"), 10);
|
|
292
310
|
isNaN(d) || (g += d);
|
|
293
|
-
}), o.innerHTML = "", o.appendChild(
|
|
311
|
+
}), o.innerHTML = "", o.appendChild(c), e(this, I).renderRows(o);
|
|
294
312
|
const h = g > 0 ? g : 0;
|
|
295
313
|
o.style.flex = `0 0 ${h}px`, o.style.width = `${h}px`;
|
|
296
314
|
}
|
|
297
|
-
if (
|
|
298
|
-
const
|
|
315
|
+
if (a) {
|
|
316
|
+
const c = u(e(this, L), "right", !1);
|
|
299
317
|
let g = 0;
|
|
300
|
-
|
|
301
|
-
const d = parseInt(
|
|
318
|
+
c.querySelectorAll("col").forEach((b) => {
|
|
319
|
+
const d = parseInt(b.getAttribute("width"), 10);
|
|
302
320
|
isNaN(d) || (g += d);
|
|
303
|
-
}),
|
|
321
|
+
}), a.innerHTML = "", a.appendChild(c), e(this, I).renderRows(a);
|
|
304
322
|
const h = g > 0 ? g : 0;
|
|
305
|
-
|
|
323
|
+
a.style.flex = `0 0 ${h}px`, a.style.width = `${h}px`;
|
|
306
324
|
}
|
|
307
325
|
if (r) {
|
|
308
|
-
const
|
|
309
|
-
r.style.overflowY =
|
|
326
|
+
const c = this.getRowCount();
|
|
327
|
+
r.style.overflowY = c > 10 ? "auto" : "hidden", r.addEventListener("scroll", () => {
|
|
310
328
|
const g = this.querySelector("nine-table-hscrollbar");
|
|
311
329
|
g && typeof g.refresh == "function" && g.refresh();
|
|
312
330
|
});
|
|
313
331
|
}
|
|
314
332
|
setTimeout(() => {
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
}, 0),
|
|
333
|
+
const c = this.querySelector("nine-table-hscrollbar");
|
|
334
|
+
c && typeof c.refresh == "function" && c.refresh();
|
|
335
|
+
}, 0), F.log(`NineTableSheet 3-split initialized with rows: ${this.getRowCount()}`);
|
|
318
336
|
}, "init"));
|
|
319
337
|
v(this, "getRowCount", /* @__PURE__ */ l(() => e(this, L) ? e(this, L).querySelectorAll("tbody tr").length : 0, "getRowCount"));
|
|
320
338
|
v(this, "scrollToX", /* @__PURE__ */ l((t) => {
|
|
@@ -326,7 +344,7 @@ const V = class V extends HTMLElement {
|
|
|
326
344
|
i && (i.scrollTop = t);
|
|
327
345
|
}, "scrollToY"));
|
|
328
346
|
f(this, J, /* @__PURE__ */ l(() => {
|
|
329
|
-
const t =
|
|
347
|
+
const t = X.SCROLLBAR_SIZE;
|
|
330
348
|
this.innerHTML = `
|
|
331
349
|
<style>
|
|
332
350
|
nine-table-sheet {
|
|
@@ -442,17 +460,17 @@ const V = class V extends HTMLElement {
|
|
|
442
460
|
</div>
|
|
443
461
|
`;
|
|
444
462
|
}, "#render"));
|
|
445
|
-
y(this,
|
|
463
|
+
y(this, I, new he(this));
|
|
446
464
|
}
|
|
447
465
|
connectedCallback() {
|
|
448
466
|
e(this, J).call(this);
|
|
449
467
|
}
|
|
450
468
|
disconnectedCallback() {
|
|
451
|
-
this.innerHTML = "",
|
|
469
|
+
this.innerHTML = "", F.log("NineTableSheet destroyed.");
|
|
452
470
|
}
|
|
453
471
|
};
|
|
454
|
-
L = new WeakMap(),
|
|
455
|
-
let de =
|
|
472
|
+
L = new WeakMap(), I = new WeakMap(), J = new WeakMap(), l(X, "NineTableSheet"), v(X, "SCROLLBAR_SIZE", 16);
|
|
473
|
+
let de = X;
|
|
456
474
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", de);
|
|
457
475
|
var Q;
|
|
458
476
|
const xe = class xe extends HTMLElement {
|
|
@@ -471,35 +489,35 @@ const xe = class xe extends HTMLElement {
|
|
|
471
489
|
const n = /* @__PURE__ */ l(() => {
|
|
472
490
|
const h = this.querySelector("nine-table-sheets-body");
|
|
473
491
|
h.querySelectorAll("nine-splitter").forEach((d) => {
|
|
474
|
-
const
|
|
492
|
+
const R = parseInt(d.dataset.splitIndex, 10), x = h.querySelector(`nine-table-sheet[data-index="${R - 1}"]`), k = h.querySelector(`nine-table-sheet[data-index="${R}"]`);
|
|
475
493
|
x && k && x.classList.contains("active") && k.classList.contains("active") ? d.classList.add("active") : d.classList.remove("active");
|
|
476
494
|
});
|
|
477
|
-
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"),
|
|
478
|
-
if (!
|
|
495
|
+
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), u = r.querySelectorAll("nine-table-sheet");
|
|
496
|
+
if (!a[t]) return;
|
|
479
497
|
if (!i)
|
|
480
|
-
|
|
481
|
-
h.classList.toggle("active",
|
|
482
|
-
const d = r.querySelector(`nine-table-sheet[data-index="${
|
|
498
|
+
a.forEach((h, b) => {
|
|
499
|
+
h.classList.toggle("active", b === t);
|
|
500
|
+
const d = r.querySelector(`nine-table-sheet[data-index="${b}"]`);
|
|
483
501
|
d && (d.style.flex = "");
|
|
484
|
-
}),
|
|
485
|
-
h.classList.toggle("active",
|
|
502
|
+
}), u.forEach((h, b) => {
|
|
503
|
+
h.classList.toggle("active", b === t);
|
|
486
504
|
});
|
|
487
505
|
else {
|
|
488
|
-
const h =
|
|
489
|
-
if (h.classList.contains("active") &&
|
|
506
|
+
const h = a[t], b = o.querySelectorAll(".nine-tab-item.active");
|
|
507
|
+
if (h.classList.contains("active") && b.length <= 1)
|
|
490
508
|
return;
|
|
491
509
|
h.classList.toggle("active");
|
|
492
510
|
const d = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
|
|
493
511
|
d && (d.classList.toggle("active"), d.classList.contains("active") || (d.style.flex = ""));
|
|
494
512
|
}
|
|
495
|
-
const
|
|
496
|
-
if (
|
|
497
|
-
const h = 1 /
|
|
498
|
-
|
|
499
|
-
(!
|
|
513
|
+
const c = Array.from(r.querySelectorAll("nine-table-sheet.active"));
|
|
514
|
+
if (c.length > 1) {
|
|
515
|
+
const h = 1 / c.length;
|
|
516
|
+
c.forEach((b) => {
|
|
517
|
+
(!b.style.flex || b.style.flex === "1 1 100%") && (b.style.flex = `${h} ${h} 0px`);
|
|
500
518
|
});
|
|
501
519
|
} else
|
|
502
|
-
|
|
520
|
+
c.forEach((h) => {
|
|
503
521
|
h.style.flex = "1 1 100%";
|
|
504
522
|
});
|
|
505
523
|
n();
|
|
@@ -517,8 +535,8 @@ const xe = class xe extends HTMLElement {
|
|
|
517
535
|
Q = new WeakMap(), l(xe, "NineTableSheets");
|
|
518
536
|
let fe = xe;
|
|
519
537
|
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", fe);
|
|
520
|
-
var A, Y, ee,
|
|
521
|
-
const
|
|
538
|
+
var A, Y, ee, U, te;
|
|
539
|
+
const Re = class Re {
|
|
522
540
|
constructor(s) {
|
|
523
541
|
f(this, A);
|
|
524
542
|
f(this, Y, null);
|
|
@@ -526,20 +544,20 @@ const Se = class Se {
|
|
|
526
544
|
const s = e(this, A).host;
|
|
527
545
|
s && (y(this, Y, new ResizeObserver((t) => {
|
|
528
546
|
for (let i of t)
|
|
529
|
-
s.getAttribute("auto-height") === "true" && e(this,
|
|
547
|
+
s.getAttribute("auto-height") === "true" && e(this, U).call(this, s);
|
|
530
548
|
})), e(this, Y).observe(s));
|
|
531
549
|
}, "#observeResize"));
|
|
532
|
-
f(this,
|
|
533
|
-
var k,
|
|
550
|
+
f(this, U, /* @__PURE__ */ l((s) => {
|
|
551
|
+
var k, E;
|
|
534
552
|
const t = (k = s.shadowRoot) == null ? void 0 : k.querySelector("nine-table-sheet.active");
|
|
535
553
|
if (!t) return;
|
|
536
|
-
const i = ((
|
|
537
|
-
s.style.height = `${
|
|
554
|
+
const i = ((E = t.getRowCount) == null ? void 0 : E.call(t)) || 0, n = parseInt(s.getAttribute("max-display-row"), 10) || 10, o = Math.min(i, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), a = r ? r.getBoundingClientRect().height : 32, u = e(this, A).querySelector("nine-table-header"), c = e(this, A).querySelector("nine-table-sheets-footer"), g = u ? u.getBoundingClientRect().height : 40, h = c ? c.getBoundingClientRect().height : 32, d = g + h + 16, R = o * a + d;
|
|
555
|
+
s.style.height = `${R}px`, s.style.maxHeight = `${n * a + d}px`;
|
|
538
556
|
const x = e(this, A).querySelector("nine-table-sheets-body");
|
|
539
557
|
x && (x.style.overflowY = i > n ? "auto" : "hidden");
|
|
540
558
|
}, "#applyAutoHeight"));
|
|
541
559
|
f(this, te, /* @__PURE__ */ l(() => {
|
|
542
|
-
const s = e(this, A).host, i = Array.from(s.children).filter((
|
|
560
|
+
const s = e(this, A).host, i = Array.from(s.children).filter((u) => u.tagName === "TABLE"), n = s.getAttribute("auto-height") === "true", o = i.map((u, c) => `<nine-table-sheet class="${c === 0 ? "active" : ""}" data-index="${c}"></nine-table-sheet>`).join(""), r = i.map((u, c) => `<div class="nine-tab-item ${c === 0 ? "active" : ""}" data-index="${c}">Sheet ${c + 1}</div>`).join("");
|
|
543
561
|
e(this, A).innerHTML = `
|
|
544
562
|
<style>
|
|
545
563
|
:host {
|
|
@@ -638,25 +656,25 @@ const Se = class Se {
|
|
|
638
656
|
</nine-table-body>
|
|
639
657
|
<nine-table-footer></nine-table-footer>
|
|
640
658
|
`;
|
|
641
|
-
const
|
|
642
|
-
|
|
643
|
-
i[
|
|
644
|
-
|
|
659
|
+
const a = e(this, A).querySelectorAll("nine-table-sheet");
|
|
660
|
+
a == null || a.forEach((u, c) => {
|
|
661
|
+
i[c] && setTimeout(() => {
|
|
662
|
+
u.init(i[c]), n && e(this, U).call(this, s);
|
|
645
663
|
});
|
|
646
664
|
});
|
|
647
665
|
}, "#render"));
|
|
648
666
|
y(this, A, s), e(this, te).call(this), e(this, ee).call(this);
|
|
649
667
|
}
|
|
650
668
|
};
|
|
651
|
-
A = new WeakMap(), Y = new WeakMap(), ee = new WeakMap(),
|
|
652
|
-
let ue =
|
|
653
|
-
var
|
|
654
|
-
const
|
|
669
|
+
A = new WeakMap(), Y = new WeakMap(), ee = new WeakMap(), U = new WeakMap(), te = new WeakMap(), l(Re, "LayoutManager");
|
|
670
|
+
let ue = Re;
|
|
671
|
+
var $, D;
|
|
672
|
+
const Se = class Se {
|
|
655
673
|
constructor(s) {
|
|
656
|
-
f(this,
|
|
674
|
+
f(this, $);
|
|
657
675
|
f(this, D, -1);
|
|
658
|
-
v(this, "count", /* @__PURE__ */ l(() => e(this,
|
|
659
|
-
y(this,
|
|
676
|
+
v(this, "count", /* @__PURE__ */ l(() => e(this, $).rawRecords.length, "count"));
|
|
677
|
+
y(this, $, s);
|
|
660
678
|
}
|
|
661
679
|
get at() {
|
|
662
680
|
return e(this, D);
|
|
@@ -664,116 +682,116 @@ const Ee = class Ee {
|
|
|
664
682
|
set at(s) {
|
|
665
683
|
var i, n;
|
|
666
684
|
y(this, D, parseInt(s, 10));
|
|
667
|
-
const t = ((n = (i = e(this,
|
|
685
|
+
const t = ((n = (i = e(this, $).owner).querySelector) == null ? void 0 : n.call(i, ".ng-container-body")) || e(this, $).owner.body;
|
|
668
686
|
t && !t.querySelector(`tbody.bindable tr[data-row="${e(this, D)}"]`) && setTimeout(() => {
|
|
669
687
|
var o, r;
|
|
670
|
-
(r = (o = e(this,
|
|
688
|
+
(r = (o = e(this, $).owner).scrollTo_V1) == null || r.call(o, e(this, D));
|
|
671
689
|
});
|
|
672
690
|
}
|
|
673
691
|
};
|
|
674
|
-
|
|
675
|
-
let be =
|
|
676
|
-
var
|
|
692
|
+
$ = new WeakMap(), D = new WeakMap(), l(Se, "ngRow");
|
|
693
|
+
let be = Se;
|
|
694
|
+
var S, m, q, P, se, M, ie, K, ne, re, V;
|
|
677
695
|
const T = class T {
|
|
678
696
|
constructor(s, t) {
|
|
679
|
-
f(this,
|
|
680
|
-
f(this,
|
|
697
|
+
f(this, S);
|
|
698
|
+
f(this, m);
|
|
681
699
|
f(this, q, []);
|
|
682
700
|
f(this, P, []);
|
|
683
701
|
f(this, se, 0);
|
|
684
|
-
f(this,
|
|
702
|
+
f(this, M, []);
|
|
685
703
|
f(this, ie, /* @__PURE__ */ l(() => {
|
|
686
|
-
y(this,
|
|
687
|
-
const s = e(this,
|
|
704
|
+
y(this, M, []);
|
|
705
|
+
const s = e(this, S).template || [];
|
|
688
706
|
Array.from(s).forEach((t) => {
|
|
689
707
|
var i;
|
|
690
|
-
e(this,
|
|
691
|
-
}), (e(this,
|
|
692
|
-
t.__ng || (t.__ng = e(this,
|
|
708
|
+
e(this, M).push(((i = t.getBoundingClientRect) == null ? void 0 : i.call(t).height) || 24);
|
|
709
|
+
}), (e(this, m).rawRecords || []).forEach((t) => {
|
|
710
|
+
t.__ng || (t.__ng = e(this, K).call(this)), t.__ng.height = e(this, M).slice();
|
|
693
711
|
});
|
|
694
712
|
}, "#initialize"));
|
|
695
713
|
v(this, "set", /* @__PURE__ */ l((s) => {
|
|
696
714
|
this.clear(), this.add(s, !1);
|
|
697
715
|
}, "set"));
|
|
698
|
-
f(this,
|
|
716
|
+
f(this, K, /* @__PURE__ */ l(() => ({
|
|
699
717
|
rowState: T.ROW_STATE.EMPTY,
|
|
700
718
|
deleted: !1,
|
|
701
719
|
filtered: !1,
|
|
702
|
-
height: e(this,
|
|
720
|
+
height: e(this, M).slice(),
|
|
703
721
|
o: {},
|
|
704
722
|
c: {},
|
|
705
|
-
_: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this,
|
|
723
|
+
_: [0, 0, 0, 0, T.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, e(this, M).slice(), -1, {}, {}]
|
|
706
724
|
}), "#getDefaultMeta"));
|
|
707
725
|
v(this, "reset", /* @__PURE__ */ l(() => {
|
|
708
726
|
y(this, q, []), y(this, P, []);
|
|
709
727
|
}, "reset"));
|
|
710
728
|
v(this, "clear", /* @__PURE__ */ l(() => {
|
|
711
729
|
var s;
|
|
712
|
-
e(this,
|
|
730
|
+
e(this, m).rawRecords = [], y(this, q, []), y(this, P, []), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
|
|
713
731
|
}, "clear"));
|
|
714
732
|
f(this, ne, /* @__PURE__ */ l((s) => {
|
|
715
733
|
var n;
|
|
716
734
|
Array.isArray(s) || (s = [s]);
|
|
717
|
-
const t = typeof ((n = e(this,
|
|
735
|
+
const t = typeof ((n = e(this, S).fields) == null ? void 0 : n.get) == "function" ? e(this, S).fields.get() : Object.keys(s[0] || {}), i = [];
|
|
718
736
|
return s.forEach((o) => {
|
|
719
737
|
const r = { v: [] };
|
|
720
|
-
t.forEach((
|
|
721
|
-
r.v.push(o[
|
|
738
|
+
t.forEach((a) => {
|
|
739
|
+
r.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
|
|
722
740
|
}), i.push(r);
|
|
723
741
|
}), i;
|
|
724
742
|
}, "#json2Array"));
|
|
725
743
|
f(this, re, /* @__PURE__ */ l((s) => (Array.isArray(s) || (s = [s]), s.forEach((t) => {
|
|
726
|
-
t.__ng = e(this,
|
|
744
|
+
t.__ng = e(this, K).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = T.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
|
|
727
745
|
}), s), "#defaultInsert"));
|
|
728
746
|
v(this, "add", /* @__PURE__ */ l((s, t = !0) => {
|
|
729
747
|
var o;
|
|
730
748
|
s === void 0 && (s = {});
|
|
731
749
|
const i = e(this, ne).call(this, s);
|
|
732
|
-
e(this,
|
|
750
|
+
e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, re).call(this, i)), this.resetRecords();
|
|
733
751
|
const n = this.count() - 1;
|
|
734
|
-
return t || i.forEach((r,
|
|
735
|
-
const
|
|
736
|
-
|
|
737
|
-
}), (o = e(this,
|
|
752
|
+
return t || i.forEach((r, a) => {
|
|
753
|
+
const u = e(this, m).rawRecords[n - a];
|
|
754
|
+
u && (u.__ng.rowState = T.ROW_STATE.EMPTY);
|
|
755
|
+
}), (o = e(this, m).viewRecords) != null && o.reset && e(this, m).viewRecords.reset(), n;
|
|
738
756
|
}, "add"));
|
|
739
757
|
v(this, "delete", /* @__PURE__ */ l((s) => {
|
|
740
758
|
var i;
|
|
741
759
|
let t = [];
|
|
742
|
-
Array.isArray(s) ? t = s : typeof s > "u" ? t = [e(this,
|
|
760
|
+
Array.isArray(s) ? t = s : typeof s > "u" ? t = [e(this, m).owner.row.at] : t = [parseInt(s, 10)], t.sort((n, o) => o - n).forEach((n) => {
|
|
743
761
|
if (e(this, q)[n]) {
|
|
744
762
|
const o = e(this, q)[n].__ng.rowid;
|
|
745
|
-
e(this, q)[n].__ng.rowState === T.ROW_STATE.INSERT ? e(this,
|
|
763
|
+
e(this, q)[n].__ng.rowState === T.ROW_STATE.INSERT ? e(this, m).rawRecords = e(this, m).rawRecords.filter((r) => r.__ng.rowid !== o) : e(this, m).rawRecords.forEach((r) => {
|
|
746
764
|
r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = T.ROW_STATE.DELETE);
|
|
747
765
|
});
|
|
748
766
|
}
|
|
749
|
-
}), this.resetRecords(), (i = e(this,
|
|
767
|
+
}), this.resetRecords(), (i = e(this, m).viewRecords) != null && i.reset && e(this, m).viewRecords.reset();
|
|
750
768
|
}, "delete"));
|
|
751
769
|
v(this, "setValue", /* @__PURE__ */ l((s, t, i) => {
|
|
752
|
-
var
|
|
770
|
+
var u;
|
|
753
771
|
s = parseInt(s, 10);
|
|
754
|
-
const o = (typeof ((
|
|
772
|
+
const o = (typeof ((u = e(this, S).fields) == null ? void 0 : u.get) == "function" ? e(this, S).fields.get() : []).indexOf(t);
|
|
755
773
|
if (o < 0) return;
|
|
756
774
|
const r = this.getValidData()[s];
|
|
757
775
|
if (!r) return;
|
|
758
|
-
const
|
|
759
|
-
|
|
776
|
+
const a = r.v[o];
|
|
777
|
+
a !== i && r.__ng.rowState !== T.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(t) || (r.__ng.o[t] = a), r.__ng.rowState = T.ROW_STATE.UPDATE), r.v[o] = i, e(this, m).owner.refreshData && e(this, m).owner.refreshData(s);
|
|
760
778
|
}, "setValue"));
|
|
761
779
|
v(this, "resetRecords", /* @__PURE__ */ l(() => {
|
|
762
|
-
y(this, P, e(this,
|
|
780
|
+
y(this, P, e(this, m).rawRecords.filter((s) => !s.__ng.deleted)), y(this, q, e(this, m).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), e(this, m).rawRecords.forEach((s, t) => {
|
|
763
781
|
s.__ng.rowidx = t;
|
|
764
782
|
}), e(this, q).forEach((s, t) => {
|
|
765
783
|
s.__ng.i = t;
|
|
766
784
|
});
|
|
767
785
|
}, "resetRecords"));
|
|
768
|
-
v(this, "getValidData", /* @__PURE__ */ l(() => (e(this, q).length === 0 && e(this,
|
|
769
|
-
f(this,
|
|
786
|
+
v(this, "getValidData", /* @__PURE__ */ l(() => (e(this, q).length === 0 && e(this, m).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
|
|
787
|
+
f(this, V, /* @__PURE__ */ l((s) => {
|
|
770
788
|
var i;
|
|
771
789
|
if (!s) return s;
|
|
772
|
-
const t = typeof ((i = e(this,
|
|
790
|
+
const t = typeof ((i = e(this, S).fields) == null ? void 0 : i.get) == "function" ? e(this, S).fields.get() : [];
|
|
773
791
|
return Array.isArray(s) ? s.filter((n) => !n.__ng.deleted).map((n) => {
|
|
774
792
|
const o = {};
|
|
775
|
-
return t.forEach((r,
|
|
776
|
-
o[r] = n.v ? n.v[
|
|
793
|
+
return t.forEach((r, a) => {
|
|
794
|
+
o[r] = n.v ? n.v[a] : n[r];
|
|
777
795
|
}), o.__ng = n.__ng, o;
|
|
778
796
|
}) : s;
|
|
779
797
|
}, "#conv2"));
|
|
@@ -782,19 +800,19 @@ const T = class T {
|
|
|
782
800
|
var o;
|
|
783
801
|
const i = this.getValidData();
|
|
784
802
|
if (!i || i.length <= 0) return;
|
|
785
|
-
if (s == null) return e(this,
|
|
803
|
+
if (s == null) return e(this, V).call(this, i);
|
|
786
804
|
if (s < 0 || s >= i.length) return null;
|
|
787
|
-
const n = typeof ((o = e(this,
|
|
805
|
+
const n = typeof ((o = e(this, S).fields) == null ? void 0 : o.get) == "function" ? e(this, S).fields.get() : [];
|
|
788
806
|
if (t != null) {
|
|
789
807
|
const r = n.indexOf(t);
|
|
790
808
|
return r >= 0 ? i[s].v[r] : null;
|
|
791
809
|
}
|
|
792
|
-
return e(this,
|
|
810
|
+
return e(this, V).call(this, i[s]);
|
|
793
811
|
}, "get"));
|
|
794
|
-
y(this,
|
|
812
|
+
y(this, S, s), y(this, m, t), e(this, ie).call(this);
|
|
795
813
|
}
|
|
796
814
|
get source() {
|
|
797
|
-
return e(this,
|
|
815
|
+
return e(this, V).call(this, e(this, m).rawRecords);
|
|
798
816
|
}
|
|
799
817
|
set source(s) {
|
|
800
818
|
this.clear(), this.add(s, !1);
|
|
@@ -803,7 +821,7 @@ const T = class T {
|
|
|
803
821
|
return ++Ae(this, se)._;
|
|
804
822
|
}
|
|
805
823
|
};
|
|
806
|
-
|
|
824
|
+
S = new WeakMap(), m = new WeakMap(), q = new WeakMap(), P = new WeakMap(), se = new WeakMap(), M = new WeakMap(), ie = new WeakMap(), K = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), V = new WeakMap(), l(T, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
807
825
|
v(T, "ROW_STATE", {
|
|
808
826
|
EMPTY: "EMPTY",
|
|
809
827
|
NORMAL: "NORMAL",
|
|
@@ -812,7 +830,7 @@ v(T, "ROW_STATE", {
|
|
|
812
830
|
DELETE: "DELETE"
|
|
813
831
|
});
|
|
814
832
|
let ge = T;
|
|
815
|
-
const
|
|
833
|
+
const Ee = class Ee {
|
|
816
834
|
constructor(s) {
|
|
817
835
|
this.owner = s, this.row = new be(this), this.data = new ge(s, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
818
836
|
var t;
|
|
@@ -831,37 +849,37 @@ const Re = class Re {
|
|
|
831
849
|
}, this.setDataSource([]);
|
|
832
850
|
}
|
|
833
851
|
};
|
|
834
|
-
l(
|
|
835
|
-
let pe =
|
|
836
|
-
var
|
|
852
|
+
l(Ee, "ngDataManager");
|
|
853
|
+
let pe = Ee;
|
|
854
|
+
var N, oe;
|
|
837
855
|
const Te = class Te extends HTMLElement {
|
|
838
856
|
constructor() {
|
|
839
857
|
super();
|
|
840
858
|
//#created = false;
|
|
841
|
-
f(this,
|
|
859
|
+
f(this, N);
|
|
842
860
|
f(this, oe);
|
|
843
|
-
this.attachShadow({ mode: "open" }), y(this,
|
|
861
|
+
this.attachShadow({ mode: "open" }), y(this, N, new pe(this));
|
|
844
862
|
}
|
|
845
863
|
connectedCallback() {
|
|
846
|
-
y(this, oe, new ue(this.shadowRoot)),
|
|
864
|
+
y(this, oe, new ue(this.shadowRoot)), F.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
847
865
|
}
|
|
848
866
|
disconnectedCallback() {
|
|
849
|
-
|
|
867
|
+
F.log("NineTable disconnected.");
|
|
850
868
|
}
|
|
851
869
|
// π― μΈλΆμμ grid.data.set(...) ννλ‘ μ κ·Όν μ μλλ‘ λ°μ΄ν° λ§€λμ μ€ν
|
|
852
870
|
get data() {
|
|
853
|
-
return e(this,
|
|
871
|
+
return e(this, N).data;
|
|
854
872
|
}
|
|
855
873
|
// π― ν(row) κ΄λ ¨ μ μ΄ μ κ·Όμ μ€ν
|
|
856
874
|
get row() {
|
|
857
|
-
return e(this,
|
|
875
|
+
return e(this, N).row;
|
|
858
876
|
}
|
|
859
877
|
// π― μ 체 λ°μ΄ν° λ§€λμ μ κ·Ό νμν κ²½μ°
|
|
860
878
|
get dataManager() {
|
|
861
|
-
return e(this,
|
|
879
|
+
return e(this, N);
|
|
862
880
|
}
|
|
863
881
|
};
|
|
864
|
-
|
|
882
|
+
N = new WeakMap(), oe = new WeakMap(), l(Te, "NineTable");
|
|
865
883
|
let ye = Te;
|
|
866
884
|
customElements.get("nine-table") || customElements.define("nine-table", ye);
|
|
867
885
|
//# sourceMappingURL=nine-table.js.map
|