@ninebone/table 0.0.262 β 0.0.264
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 -227
- 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,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var Be = (m) => {
|
|
3
3
|
throw TypeError(m);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var c = (m, i) =>
|
|
7
|
-
var x = (m, i, t) =>
|
|
8
|
-
var e = (m, i, t) => (
|
|
9
|
-
var
|
|
5
|
+
var Pe = (m, i, t) => i in m ? Oe(m, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[i] = t;
|
|
6
|
+
var c = (m, i) => Oe(m, "name", { value: i, configurable: !0 });
|
|
7
|
+
var x = (m, i, t) => Pe(m, typeof i != "symbol" ? i + "" : i, t), De = (m, i, t) => i.has(m) || Be("Cannot " + t);
|
|
8
|
+
var e = (m, i, t) => (De(m, i, "read from private field"), t ? t.call(m) : i.get(m)), g = (m, i, t) => i.has(m) ? Be("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, t), y = (m, i, t, s) => (De(m, i, "write to private field"), s ? s.call(m, t) : i.set(m, t), t);
|
|
9
|
+
var Ne = (m, i, t, s) => ({
|
|
10
10
|
set _(n) {
|
|
11
11
|
y(m, i, n, t);
|
|
12
12
|
},
|
|
@@ -14,26 +14,26 @@ var De = (m, i, t, s) => ({
|
|
|
14
14
|
return e(m, i, s);
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
import { trace as
|
|
18
|
-
const
|
|
17
|
+
import { trace as Ve } from "@ninebone/util";
|
|
18
|
+
const ke = class ke extends Ve.constructor {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(), this.init("nine-table", "green");
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
c(
|
|
24
|
-
let
|
|
25
|
-
const M = new
|
|
26
|
-
var C, B, p, D, N, P,
|
|
27
|
-
const
|
|
23
|
+
c(ke, "Trace");
|
|
24
|
+
let we = ke;
|
|
25
|
+
const M = new we();
|
|
26
|
+
var C, B, p, D, N, P, se, V, ne;
|
|
27
|
+
const Le = class Le extends HTMLElement {
|
|
28
28
|
constructor() {
|
|
29
29
|
super();
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
g(this, C);
|
|
31
|
+
g(this, B, !1);
|
|
32
|
+
g(this, p);
|
|
33
|
+
g(this, D);
|
|
34
|
+
g(this, N);
|
|
35
|
+
g(this, P);
|
|
36
|
+
g(this, se, /* @__PURE__ */ c(() => {
|
|
37
37
|
if (!e(this, C)) return;
|
|
38
38
|
const t = e(this, C).querySelector(".ng-container-body");
|
|
39
39
|
t && (y(this, P, new ResizeObserver(() => {
|
|
@@ -44,8 +44,8 @@ const ke = class ke extends HTMLElement {
|
|
|
44
44
|
if (!e(this, C) || !e(this, p) || e(this, B)) return;
|
|
45
45
|
const t = e(this, p).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), a = t.clientWidth,
|
|
48
|
-
if (a !== 0 &&
|
|
47
|
+
const n = e(this, p).track, r = e(this, p).thumb, o = e(this, C).querySelector(".ng-container-bottom"), a = t.clientWidth, f = s.scrollWidth;
|
|
48
|
+
if (a !== 0 && f > a)
|
|
49
49
|
o && (o.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
o && (o.style.display = "none");
|
|
@@ -53,28 +53,28 @@ const ke = class ke extends HTMLElement {
|
|
|
53
53
|
}
|
|
54
54
|
const l = n.clientWidth;
|
|
55
55
|
if (l <= 0) return;
|
|
56
|
-
const h = Math.max(Math.min(l * (a /
|
|
56
|
+
const h = Math.max(Math.min(l * (a / f), l), 20);
|
|
57
57
|
r.style.width = `${h}px`;
|
|
58
|
-
const
|
|
58
|
+
const u = t.scrollLeft, d = f - a;
|
|
59
59
|
let b = 0;
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
b >
|
|
60
|
+
d > 0 && (b = parseInt(u / d * (l - h), 10)), b < 0 && (b = 0);
|
|
61
|
+
const v = l - h;
|
|
62
|
+
b > v && (b = v), r.style.left = `${b}px`, M.log(b), e(this, p).left.disabled = b === 0, e(this, p).right.disabled = b >= v - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
|
-
|
|
64
|
+
g(this, V, /* @__PURE__ */ c((t) => {
|
|
65
65
|
if (!e(this, p)) return !1;
|
|
66
66
|
const s = e(this, p).container, n = s.querySelector("table");
|
|
67
67
|
if (!n) return !1;
|
|
68
68
|
const r = e(this, p).track.getBoundingClientRect(), o = e(this, p).thumb.clientWidth;
|
|
69
69
|
let a = t;
|
|
70
70
|
a < 0 && (a = 0);
|
|
71
|
-
const
|
|
72
|
-
a >
|
|
71
|
+
const f = r.width - o;
|
|
72
|
+
a > f && (a = f), 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 >= f - 1;
|
|
73
73
|
const l = s.clientWidth, h = n.scrollWidth;
|
|
74
|
-
let
|
|
75
|
-
return -
|
|
74
|
+
let u = f > 0 ? -a * (h - l) / f : 0;
|
|
75
|
+
return -u > h - l && (u = -(h - l)), -u + 5 > h - l && (u = -(h - l)), l >= h && (u = 0), n.style.transform = `translateX(${u}px)`, a > 0 && a < f - 1;
|
|
76
76
|
}, "#thumbMoveTo"));
|
|
77
|
-
|
|
77
|
+
g(this, ne, /* @__PURE__ */ c(() => {
|
|
78
78
|
const t = /* @__PURE__ */ c((n) => {
|
|
79
79
|
clearInterval(e(this, D)), clearInterval(e(this, N));
|
|
80
80
|
const r = parseInt(e(this, p).thumb.style.left || 0, 10);
|
|
@@ -103,8 +103,8 @@ const ke = class ke extends HTMLElement {
|
|
|
103
103
|
n.stopPropagation(), n.preventDefault(), y(this, B, !0), this.shiftX = n.clientX - e(this, p).thumb.getBoundingClientRect().left;
|
|
104
104
|
const r = /* @__PURE__ */ c((a) => {
|
|
105
105
|
if (!e(this, B)) return;
|
|
106
|
-
const
|
|
107
|
-
e(this, V).call(this, a.clientX -
|
|
106
|
+
const f = e(this, p).track.getBoundingClientRect();
|
|
107
|
+
e(this, V).call(this, a.clientX - f.left - this.shiftX);
|
|
108
108
|
}, "onMouseMove"), o = /* @__PURE__ */ c(() => {
|
|
109
109
|
y(this, B, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
|
|
110
110
|
}, "onMouseUp");
|
|
@@ -189,7 +189,7 @@ const ke = class ke extends HTMLElement {
|
|
|
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
|
}
|
|
@@ -197,26 +197,26 @@ const ke = class ke extends HTMLElement {
|
|
|
197
197
|
e(this, P) && e(this, P).disconnect();
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
C = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(),
|
|
201
|
-
let
|
|
202
|
-
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar",
|
|
203
|
-
var $, _, A, W, H, I,
|
|
204
|
-
const
|
|
200
|
+
C = new WeakMap(), B = new WeakMap(), p = new WeakMap(), D = new WeakMap(), N = new WeakMap(), P = new WeakMap(), se = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), c(Le, "NineTableHScrollBar");
|
|
201
|
+
let xe = Le;
|
|
202
|
+
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", xe);
|
|
203
|
+
var $, _, A, W, H, I, re, oe, le, ae;
|
|
204
|
+
const Ce = class Ce {
|
|
205
205
|
constructor(i) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
g(this, $);
|
|
207
|
+
g(this, _, []);
|
|
208
|
+
g(this, A, null);
|
|
209
|
+
g(this, W, null);
|
|
210
|
+
g(this, H, 0);
|
|
211
|
+
g(this, I, 0);
|
|
212
212
|
x(this, "getRowHeight", /* @__PURE__ */ c(() => e(this, A), "getRowHeight"));
|
|
213
|
-
|
|
214
|
-
e(this,
|
|
213
|
+
g(this, re, /* @__PURE__ */ c(() => {
|
|
214
|
+
e(this, oe).call(this);
|
|
215
215
|
}, "#init"));
|
|
216
216
|
/**
|
|
217
217
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
218
218
|
*/
|
|
219
|
-
|
|
219
|
+
g(this, oe, /* @__PURE__ */ c(() => {
|
|
220
220
|
!e(this, $) || !(e(this, $) instanceof HTMLElement) || (y(this, W, new ResizeObserver((i) => {
|
|
221
221
|
for (const t of i) {
|
|
222
222
|
const s = t.target;
|
|
@@ -226,14 +226,14 @@ const Le = class Le {
|
|
|
226
226
|
if (n > 0) {
|
|
227
227
|
const r = s.clientHeight || s.getBoundingClientRect().height || n;
|
|
228
228
|
let o = 0;
|
|
229
|
-
const a = s.querySelector(".ng-container-body") || s,
|
|
230
|
-
|
|
229
|
+
const a = s.querySelector(".ng-container-body") || s, f = a.querySelector("thead"), l = a.querySelector("tfoot");
|
|
230
|
+
f && (o += f.offsetHeight || f.getBoundingClientRect().height), l && (o += l.offsetHeight || l.getBoundingClientRect().height);
|
|
231
231
|
const h = Math.max(r - o, 100);
|
|
232
232
|
if (e(this, H) !== h && (y(this, H, h), e(this, A) !== null)) {
|
|
233
|
-
const
|
|
234
|
-
y(this, I,
|
|
235
|
-
const b = s.querySelector(
|
|
236
|
-
b && b.querySelector("tbody") && e(this,
|
|
233
|
+
const u = Math.ceil(e(this, H) / e(this, A));
|
|
234
|
+
y(this, I, u + 20), M.log(`[RowManager] Resized. Height: ${e(this, H)}px | Target Rows: ${e(this, I)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
|
|
235
|
+
const b = s.querySelector(d);
|
|
236
|
+
b && b.querySelector("tbody") && e(this, ae).call(this, b);
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -244,29 +244,29 @@ const Le = class Le {
|
|
|
244
244
|
x(this, "initialize", /* @__PURE__ */ c((i) => {
|
|
245
245
|
M.log(i);
|
|
246
246
|
const t = e(this, $).querySelector(".ng-container-body"), s = i.querySelector("tbody"), n = Array.from(s.querySelectorAll("tr"));
|
|
247
|
-
y(this, _, n.map((r) => r.cloneNode(!0))), y(this, A, null), e(this,
|
|
247
|
+
y(this, _, n.map((r) => r.cloneNode(!0))), y(this, A, null), e(this, le).call(this, t);
|
|
248
248
|
}, "initialize"));
|
|
249
|
-
|
|
249
|
+
g(this, le, /* @__PURE__ */ c((i) => {
|
|
250
250
|
if (e(this, A) !== null && e(this, A) > 0)
|
|
251
251
|
return e(this, A);
|
|
252
252
|
if (e(this, _).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((
|
|
256
|
+
t.querySelectorAll("tr:not(.nodata)").forEach((u) => u.remove());
|
|
257
257
|
const s = t.querySelector("tr.nodata"), n = document.createDocumentFragment();
|
|
258
|
-
e(this, _).forEach((
|
|
259
|
-
n.appendChild(
|
|
258
|
+
e(this, _).forEach((u) => {
|
|
259
|
+
n.appendChild(u.cloneNode(!0));
|
|
260
260
|
}), s ? s.before(n) : t.appendChild(n);
|
|
261
|
-
const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", a = r ? r.style.visibility : "",
|
|
261
|
+
const r = i.closest("nine-table-sheet"), o = r ? r.style.display : "", a = r ? r.style.visibility : "", f = r ? r.style.position : "";
|
|
262
262
|
r && (r.style.display === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
|
|
263
263
|
let l = 0;
|
|
264
264
|
const h = t.querySelectorAll("tr:not(.nodata)");
|
|
265
|
-
if (h.forEach((
|
|
266
|
-
l +=
|
|
267
|
-
}), h.forEach((
|
|
268
|
-
const
|
|
269
|
-
y(this, I,
|
|
265
|
+
if (h.forEach((u, d) => {
|
|
266
|
+
l += u.offsetHeight || u.getBoundingClientRect().height;
|
|
267
|
+
}), h.forEach((u) => u.remove()), r && (r.style.display = o, r.style.visibility = a, r.style.position = f), y(this, A, l), e(this, H) > 0) {
|
|
268
|
+
const u = Math.ceil(e(this, H) / e(this, A));
|
|
269
|
+
y(this, I, u + 20);
|
|
270
270
|
} else
|
|
271
271
|
y(this, I, 40);
|
|
272
272
|
return console.log(`[RowManager] Template Height Cached: ${e(this, A)}px | RowCount: ${e(this, I)}`), e(this, A);
|
|
@@ -287,7 +287,7 @@ const Le = class Le {
|
|
|
287
287
|
/**
|
|
288
288
|
* π― μΊμλ ν κ°μλ₯Ό κ³§λ°λ‘ κ°μ Έμμ TR λΌλ μ£Όμ
(μ€λ³΅ κ³μ° μ κ±°)
|
|
289
289
|
*/
|
|
290
|
-
|
|
290
|
+
g(this, ae, /* @__PURE__ */ c((i) => {
|
|
291
291
|
if (e(this, _).length === 0) return;
|
|
292
292
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
293
293
|
if (!t) return;
|
|
@@ -302,51 +302,51 @@ const Le = class Le {
|
|
|
302
302
|
x(this, "destroy", /* @__PURE__ */ c(() => {
|
|
303
303
|
e(this, W) && (e(this, W).disconnect(), y(this, W, null));
|
|
304
304
|
}, "destroy"));
|
|
305
|
-
y(this, $, i), e(this,
|
|
305
|
+
y(this, $, i), e(this, re).call(this);
|
|
306
306
|
}
|
|
307
307
|
get templateLength() {
|
|
308
308
|
return e(this, _).length || 1;
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
|
-
$ = new WeakMap(), _ = new WeakMap(), A = new WeakMap(), W = new WeakMap(), H = new WeakMap(), I = new WeakMap(),
|
|
312
|
-
let
|
|
313
|
-
var E, U, G, F,
|
|
311
|
+
$ = new WeakMap(), _ = new WeakMap(), A = new WeakMap(), W = new WeakMap(), H = new WeakMap(), I = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), ae = new WeakMap(), c(Ce, "RowManager");
|
|
312
|
+
let ve = Ce;
|
|
313
|
+
var E, U, G, F, J, ce, he;
|
|
314
314
|
const j = class j extends HTMLElement {
|
|
315
315
|
constructor() {
|
|
316
316
|
super();
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
g(this, E, null);
|
|
318
|
+
g(this, U);
|
|
319
319
|
/**
|
|
320
320
|
* π― 2μ°¨μ μ
격μ μΈλ±μ€λ₯Ό κ³μ°νμ¬ λ³ν©(`rowSpan`/`colSpan`) μ
μ μ λ μ»¬λΌ μμΉλ₯Ό λΆμ¬
|
|
321
321
|
*/
|
|
322
|
-
|
|
322
|
+
g(this, G, /* @__PURE__ */ c((t, s) => {
|
|
323
323
|
const n = Array.from(t.querySelectorAll(s + " tr")), r = Array.from(t.querySelectorAll(s + " th," + s + " td")), o = n.length;
|
|
324
324
|
if (o === 0 || r.length === 0) return;
|
|
325
325
|
let a = 0;
|
|
326
326
|
r.forEach((l) => {
|
|
327
327
|
a += l.colSpan || 1;
|
|
328
328
|
});
|
|
329
|
-
const
|
|
329
|
+
const f = Array.from(Array(o), () => Array(a).fill(null));
|
|
330
330
|
n.forEach((l) => {
|
|
331
331
|
const h = l.sectionRowIndex;
|
|
332
|
-
let
|
|
333
|
-
Array.from(l.querySelectorAll("th,td")).forEach((
|
|
334
|
-
for (let
|
|
335
|
-
if (
|
|
336
|
-
|
|
332
|
+
let u = 0;
|
|
333
|
+
Array.from(l.querySelectorAll("th,td")).forEach((d) => {
|
|
334
|
+
for (let S = 0; S < f[h].length; S++)
|
|
335
|
+
if (f[h][S] === null) {
|
|
336
|
+
u = S;
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
|
-
const b =
|
|
340
|
-
for (let
|
|
341
|
-
for (let L = 0; L <
|
|
342
|
-
h +
|
|
339
|
+
const b = d.rowSpan || 1, v = d.colSpan || 1;
|
|
340
|
+
for (let S = 0; S < b; S++)
|
|
341
|
+
for (let L = 0; L < v; L++)
|
|
342
|
+
h + S < o && u + L < a && (f[h + S][u + L] = S === 0 && L === 0 ? "1" : "0");
|
|
343
343
|
});
|
|
344
344
|
}), n.forEach((l) => {
|
|
345
345
|
const h = l.sectionRowIndex;
|
|
346
|
-
Array.from(l.querySelectorAll("th,td")).forEach((
|
|
347
|
-
for (let
|
|
348
|
-
if (
|
|
349
|
-
|
|
346
|
+
Array.from(l.querySelectorAll("th,td")).forEach((u) => {
|
|
347
|
+
for (let d = 0; d < f[h].length; d++)
|
|
348
|
+
if (f[h][d] === "1") {
|
|
349
|
+
u.dataset.col = d, f[h][d] = "0";
|
|
350
350
|
break;
|
|
351
351
|
}
|
|
352
352
|
});
|
|
@@ -355,7 +355,7 @@ const j = class j extends HTMLElement {
|
|
|
355
355
|
/**
|
|
356
356
|
* π― μμ λ°λλΌ μλ°μ€ν¬λ¦½νΈ(Vanilla JS) κΈ°λ°μ κΉλν #createSplitTable
|
|
357
357
|
*/
|
|
358
|
-
|
|
358
|
+
g(this, F, /* @__PURE__ */ c((t, s) => {
|
|
359
359
|
const n = t.cloneNode(!0);
|
|
360
360
|
return s === "left" ? n.querySelectorAll("col, th, td").forEach((r) => {
|
|
361
361
|
r.getAttribute("fixed") !== "left" && r.remove();
|
|
@@ -368,28 +368,28 @@ const j = class j extends HTMLElement {
|
|
|
368
368
|
x(this, "generate", /* @__PURE__ */ c((t) => {
|
|
369
369
|
if (!t) return;
|
|
370
370
|
const s = /* @__PURE__ */ c((l) => {
|
|
371
|
-
const h = /* @__PURE__ */ c((
|
|
372
|
-
if (
|
|
373
|
-
const b =
|
|
374
|
-
for (let
|
|
375
|
-
const
|
|
376
|
-
|
|
371
|
+
const h = /* @__PURE__ */ c((d) => {
|
|
372
|
+
if (d.querySelector("colgroup")) return;
|
|
373
|
+
const b = d.querySelector("tbody tr") || d.querySelector("tr"), v = b ? b.querySelectorAll("th, td").length : 1, S = document.createElement("colgroup"), L = Math.max(Math.floor(d.clientWidth / v), 100);
|
|
374
|
+
for (let We = 0; We < v; We++) {
|
|
375
|
+
const ze = document.createElement("col");
|
|
376
|
+
ze.setAttribute("width", L), S.appendChild(ze);
|
|
377
377
|
}
|
|
378
|
-
|
|
379
|
-
}, "ensureColgroup"),
|
|
380
|
-
if (
|
|
381
|
-
const b = document.createElement("thead"),
|
|
382
|
-
|
|
378
|
+
d.prepend(S);
|
|
379
|
+
}, "ensureColgroup"), u = /* @__PURE__ */ c((d) => {
|
|
380
|
+
if (d.querySelector("thead")) return;
|
|
381
|
+
const b = document.createElement("thead"), v = d.querySelector("colgroup");
|
|
382
|
+
v ? v.after(b) : d.prepend(b);
|
|
383
383
|
}, "ensureThead");
|
|
384
|
-
return h(l),
|
|
384
|
+
return h(l), u(l), l.classList.add("nine-table-element"), l;
|
|
385
385
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
386
386
|
y(this, E, s(n)), e(this, E).style.display = "table", e(this, G).call(this, e(this, E), "thead"), e(this, G).call(this, e(this, E), "tbody"), Array.from(e(this, E).querySelectorAll("colgroup col")).forEach((l, h) => {
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
const u = l.getAttribute("fixed");
|
|
388
|
+
u && e(this, E).querySelectorAll(`[data-col="${h}"]`).forEach((d) => {
|
|
389
|
+
d.setAttribute("fixed", u);
|
|
390
390
|
});
|
|
391
391
|
}), M.log(e(this, E));
|
|
392
|
-
const o = this.querySelector(".ng-container-left"), a = this.querySelector(".ng-container-body"),
|
|
392
|
+
const o = this.querySelector(".ng-container-left"), a = this.querySelector(".ng-container-body"), f = this.querySelector(".ng-container-right");
|
|
393
393
|
if (a) {
|
|
394
394
|
const l = e(this, F).call(this, e(this, E), null);
|
|
395
395
|
a.innerHTML = "", a.appendChild(l), M.log(e(this, E)), M.log(l), e(this, U).initialize(e(this, E));
|
|
@@ -397,27 +397,27 @@ const j = class j extends HTMLElement {
|
|
|
397
397
|
if (o) {
|
|
398
398
|
const l = e(this, F).call(this, e(this, E), "left");
|
|
399
399
|
let h = 0;
|
|
400
|
-
l.querySelectorAll("col").forEach((
|
|
401
|
-
const b = parseInt(
|
|
400
|
+
l.querySelectorAll("col").forEach((d) => {
|
|
401
|
+
const b = parseInt(d.getAttribute("width"), 10);
|
|
402
402
|
isNaN(b) || (h += b);
|
|
403
403
|
}), o.innerHTML = "", o.appendChild(l);
|
|
404
|
-
const
|
|
405
|
-
o.style.flex = `0 0 ${
|
|
404
|
+
const u = h > 0 ? h : 0;
|
|
405
|
+
o.style.flex = `0 0 ${u}px`, o.style.width = `${u}px`;
|
|
406
406
|
}
|
|
407
|
-
if (
|
|
407
|
+
if (f) {
|
|
408
408
|
const l = e(this, F).call(this, e(this, E), "right");
|
|
409
409
|
let h = 0;
|
|
410
|
-
l.querySelectorAll("col").forEach((
|
|
411
|
-
const b = parseInt(
|
|
410
|
+
l.querySelectorAll("col").forEach((d) => {
|
|
411
|
+
const b = parseInt(d.getAttribute("width"), 10);
|
|
412
412
|
isNaN(b) || (h += b);
|
|
413
|
-
}),
|
|
414
|
-
const
|
|
415
|
-
|
|
413
|
+
}), f.innerHTML = "", f.appendChild(l);
|
|
414
|
+
const u = h > 0 ? h : 0;
|
|
415
|
+
f.style.flex = `0 0 ${u}px`, f.style.width = `${u}px`;
|
|
416
416
|
}
|
|
417
417
|
a && a.addEventListener("scroll", () => {
|
|
418
418
|
var l;
|
|
419
419
|
(l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
|
|
420
|
-
}), setTimeout(() => {
|
|
420
|
+
}), e(this, J).call(this), setTimeout(() => {
|
|
421
421
|
var l;
|
|
422
422
|
(l = this.querySelector("nine-table-hscrollbar")) == null || l.refresh();
|
|
423
423
|
}, 0);
|
|
@@ -431,27 +431,27 @@ const j = class j extends HTMLElement {
|
|
|
431
431
|
const s = this.querySelector(".ng-container-body");
|
|
432
432
|
s && (s.scrollTop = t);
|
|
433
433
|
}, "scrollToY"));
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
e(this,
|
|
450
|
-
for (const
|
|
451
|
-
|
|
434
|
+
g(this, J, /* @__PURE__ */ c(() => {
|
|
435
|
+
var l, h, u;
|
|
436
|
+
const t = this.querySelector(".ng-container-left table"), s = this.querySelector(".ng-container-body table"), n = this.querySelector(".ng-container-right table");
|
|
437
|
+
if (!s) return;
|
|
438
|
+
const r = t ? Array.from(t.querySelectorAll("tr")) : [], o = Array.from(s.querySelectorAll("tr")), a = n ? Array.from(n.querySelectorAll("tr")) : [], f = Math.max(r.length, o.length, a.length);
|
|
439
|
+
for (let d = 0; d < f; d++) {
|
|
440
|
+
const b = [
|
|
441
|
+
((l = r[d]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
|
|
442
|
+
((h = o[d]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
443
|
+
((u = a[d]) == null ? void 0 : u.getBoundingClientRect().height) || 0
|
|
444
|
+
], v = Math.max(...b);
|
|
445
|
+
v > 0 && (r[d] && (r[d].style.height = `${v}px`), o[d] && (o[d].style.height = `${v}px`), a[d] && (a[d].style.height = `${v}px`));
|
|
446
|
+
}
|
|
447
|
+
}, "#syncRowHeights"));
|
|
448
|
+
g(this, ce, /* @__PURE__ */ c(() => {
|
|
449
|
+
e(this, he).call(this), new MutationObserver((t) => {
|
|
450
|
+
for (const s of t)
|
|
451
|
+
s.attributeName === "class" && this.classList.contains("active") && e(this, J).call(this);
|
|
452
452
|
}).observe(this, { attributes: !0 });
|
|
453
453
|
}, "#init"));
|
|
454
|
-
|
|
454
|
+
g(this, he, /* @__PURE__ */ c(() => {
|
|
455
455
|
const t = j.SCROLLBAR_SIZE;
|
|
456
456
|
this.innerHTML = `
|
|
457
457
|
<style>
|
|
@@ -575,55 +575,55 @@ const j = class j extends HTMLElement {
|
|
|
575
575
|
</div>
|
|
576
576
|
`;
|
|
577
577
|
}, "#render"));
|
|
578
|
-
y(this, U, new
|
|
578
|
+
y(this, U, new ve(this));
|
|
579
579
|
}
|
|
580
580
|
connectedCallback() {
|
|
581
|
-
e(this,
|
|
581
|
+
e(this, ce).call(this);
|
|
582
582
|
}
|
|
583
583
|
disconnectedCallback() {
|
|
584
584
|
this.innerHTML = "", M.log("NineTableSheet destroyed.");
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
|
-
E = new WeakMap(), U = new WeakMap(), G = new WeakMap(), F = new WeakMap(),
|
|
588
|
-
let
|
|
589
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
590
|
-
var
|
|
591
|
-
const
|
|
587
|
+
E = new WeakMap(), U = new WeakMap(), G = new WeakMap(), F = new WeakMap(), J = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), c(j, "NineTableSheet"), x(j, "SCROLLBAR_SIZE", 16);
|
|
588
|
+
let ie = j;
|
|
589
|
+
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ie);
|
|
590
|
+
var de, Q;
|
|
591
|
+
const _e = class _e extends HTMLElement {
|
|
592
592
|
constructor() {
|
|
593
593
|
super();
|
|
594
|
-
|
|
594
|
+
g(this, de, /* @__PURE__ */ c(() => {
|
|
595
595
|
var t;
|
|
596
596
|
(t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
|
|
597
597
|
var o;
|
|
598
598
|
const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
|
|
599
|
-
e(this,
|
|
600
|
-
}), e(this,
|
|
599
|
+
e(this, Q).call(this, r, n);
|
|
600
|
+
}), e(this, Q).call(this, 0, !1);
|
|
601
601
|
}, "#init"));
|
|
602
|
-
|
|
602
|
+
g(this, Q, /* @__PURE__ */ c((t, s = !1) => {
|
|
603
603
|
const n = /* @__PURE__ */ c(() => {
|
|
604
604
|
const h = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
605
605
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
606
|
-
const
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
|
|
606
|
+
const d = h.filter((b) => b.classList.contains("active"));
|
|
607
|
+
d.length < 2 || d.forEach((b) => {
|
|
608
|
+
const v = parseInt(b.getAttribute("data-index"), 10), S = this.querySelector(`nine-splitter[data-split-index="${v}"]`), L = h[v + 1];
|
|
609
|
+
S && L && L.classList.contains("active") && S.style.setProperty("display", "flex");
|
|
610
610
|
});
|
|
611
|
-
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = r.querySelectorAll(".nine-tab-item"),
|
|
611
|
+
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = r.querySelectorAll(".nine-tab-item"), f = o.querySelectorAll("nine-table-sheet");
|
|
612
612
|
if (!a[t]) return;
|
|
613
613
|
if (!s)
|
|
614
|
-
a.forEach((h,
|
|
615
|
-
h.classList.toggle("active",
|
|
616
|
-
}),
|
|
617
|
-
const
|
|
618
|
-
h.classList.toggle("active",
|
|
614
|
+
a.forEach((h, u) => {
|
|
615
|
+
h.classList.toggle("active", u === t);
|
|
616
|
+
}), f.forEach((h, u) => {
|
|
617
|
+
const d = u === t;
|
|
618
|
+
h.classList.toggle("active", d), h.style.flex = d ? "1 1 100%" : "";
|
|
619
619
|
});
|
|
620
620
|
else {
|
|
621
|
-
const h = a[t],
|
|
622
|
-
if (h.classList.contains("active") &&
|
|
621
|
+
const h = a[t], u = r.querySelectorAll(".nine-tab-item.active");
|
|
622
|
+
if (h.classList.contains("active") && u.length <= 1)
|
|
623
623
|
return;
|
|
624
624
|
h.classList.toggle("active");
|
|
625
|
-
const
|
|
626
|
-
|
|
625
|
+
const d = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
|
|
626
|
+
d && (d.classList.toggle("active"), d.classList.contains("active") || (d.style.flex = ""));
|
|
627
627
|
}
|
|
628
628
|
const l = o.querySelectorAll("nine-table-sheet.active");
|
|
629
629
|
l == null || l.forEach((h) => {
|
|
@@ -632,34 +632,34 @@ const Ce = class Ce extends HTMLElement {
|
|
|
632
632
|
}, "#switchSheet"));
|
|
633
633
|
}
|
|
634
634
|
connectedCallback() {
|
|
635
|
-
e(this,
|
|
635
|
+
e(this, de).call(this);
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
|
-
|
|
639
|
-
let
|
|
640
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
641
|
-
var R,
|
|
642
|
-
const
|
|
638
|
+
de = new WeakMap(), Q = new WeakMap(), c(_e, "NineTableSheets");
|
|
639
|
+
let Se = _e;
|
|
640
|
+
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Se);
|
|
641
|
+
var R, fe, ee, ue;
|
|
642
|
+
const He = class He {
|
|
643
643
|
constructor(i) {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
e(this,
|
|
644
|
+
g(this, R);
|
|
645
|
+
g(this, fe, /* @__PURE__ */ c(() => {
|
|
646
|
+
e(this, ue).call(this), new ResizeObserver((i) => {
|
|
647
647
|
for (let t of i)
|
|
648
|
-
e(this, R).getAttribute("auto-height") === "true" && e(this,
|
|
648
|
+
e(this, R).getAttribute("auto-height") === "true" && e(this, ee).call(this);
|
|
649
649
|
}).observe(e(this, R));
|
|
650
650
|
}, "#init"));
|
|
651
|
-
|
|
652
|
-
var
|
|
651
|
+
g(this, ee, /* @__PURE__ */ c(() => {
|
|
652
|
+
var f, l;
|
|
653
653
|
const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
654
654
|
if (i.length === 0) return;
|
|
655
|
-
const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (
|
|
655
|
+
const t = parseInt(e(this, R).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((h) => h.getRowHeight())), n = (f = e(this, R).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : f.getBoundingClientRect().height, r = (l = e(this, R).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = ie.SCROLLBAR_SIZE, a = t * s + n + r + o;
|
|
656
656
|
e(this, R).style.height = `${a}px`;
|
|
657
657
|
}, "#applyAutoHeight"));
|
|
658
|
-
|
|
659
|
-
const t = Array.from(e(this, R).children).filter((
|
|
660
|
-
const
|
|
661
|
-
return
|
|
662
|
-
}).join(""), o = t.map((
|
|
658
|
+
g(this, ue, /* @__PURE__ */ c(() => {
|
|
659
|
+
const t = Array.from(e(this, R).children).filter((f) => f.tagName === "TABLE"), s = e(this, R).getAttribute("auto-height") === "true", n = t.length, r = t.map((f, l) => {
|
|
660
|
+
const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, d = l < n - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
|
|
661
|
+
return u + d;
|
|
662
|
+
}).join(""), o = t.map((f, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
|
|
663
663
|
e(this, R).shadowRoot.innerHTML = `
|
|
664
664
|
<style>
|
|
665
665
|
:host {
|
|
@@ -760,22 +760,22 @@ const _e = class _e {
|
|
|
760
760
|
<nine-table-footer></nine-table-footer>
|
|
761
761
|
`;
|
|
762
762
|
const a = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
763
|
-
a == null || a.forEach((
|
|
763
|
+
a == null || a.forEach((f, l) => {
|
|
764
764
|
t[l] && setTimeout(() => {
|
|
765
|
-
|
|
765
|
+
f.generate(t[l]), s && e(this, ee).call(this);
|
|
766
766
|
});
|
|
767
767
|
});
|
|
768
768
|
}, "#render"));
|
|
769
|
-
y(this, R, i), e(this,
|
|
769
|
+
y(this, R, i), e(this, fe).call(this);
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
|
-
R = new WeakMap(),
|
|
773
|
-
let
|
|
772
|
+
R = new WeakMap(), fe = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), c(He, "LayoutManager");
|
|
773
|
+
let Ee = He;
|
|
774
774
|
var z, X;
|
|
775
|
-
const
|
|
775
|
+
const Ie = class Ie {
|
|
776
776
|
constructor(i) {
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
g(this, z);
|
|
778
|
+
g(this, X, -1);
|
|
779
779
|
x(this, "count", /* @__PURE__ */ c(() => e(this, z).rawRecords.length, "count"));
|
|
780
780
|
y(this, z, i);
|
|
781
781
|
}
|
|
@@ -792,31 +792,31 @@ const He = class He {
|
|
|
792
792
|
});
|
|
793
793
|
}
|
|
794
794
|
};
|
|
795
|
-
z = new WeakMap(), X = new WeakMap(), c(
|
|
796
|
-
let
|
|
797
|
-
var T, w, q, K,
|
|
795
|
+
z = new WeakMap(), X = new WeakMap(), c(Ie, "ngRow");
|
|
796
|
+
let Re = Ie;
|
|
797
|
+
var T, w, q, K, ge, O, be, te, ye, pe, Z;
|
|
798
798
|
const k = class k {
|
|
799
799
|
constructor(i, t) {
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
800
|
+
g(this, T);
|
|
801
|
+
g(this, w);
|
|
802
|
+
g(this, q, []);
|
|
803
|
+
g(this, K, []);
|
|
804
|
+
g(this, ge, 0);
|
|
805
|
+
g(this, O, []);
|
|
806
|
+
g(this, be, /* @__PURE__ */ c(() => {
|
|
807
807
|
y(this, O, []);
|
|
808
808
|
const i = e(this, T).template || [];
|
|
809
809
|
Array.from(i).forEach((t) => {
|
|
810
810
|
var s;
|
|
811
811
|
e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
812
812
|
}), (e(this, w).rawRecords || []).forEach((t) => {
|
|
813
|
-
t.__ng || (t.__ng = e(this,
|
|
813
|
+
t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
|
|
814
814
|
});
|
|
815
815
|
}, "#initialize"));
|
|
816
816
|
x(this, "set", /* @__PURE__ */ c((i) => {
|
|
817
817
|
this.clear(), this.add(i, !1);
|
|
818
818
|
}, "set"));
|
|
819
|
-
|
|
819
|
+
g(this, te, /* @__PURE__ */ c(() => ({
|
|
820
820
|
rowState: k.ROW_STATE.EMPTY,
|
|
821
821
|
deleted: !1,
|
|
822
822
|
filtered: !1,
|
|
@@ -832,7 +832,7 @@ const k = class k {
|
|
|
832
832
|
var i;
|
|
833
833
|
e(this, w).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, w).viewRecords) != null && i.reset && e(this, w).viewRecords.reset();
|
|
834
834
|
}, "clear"));
|
|
835
|
-
|
|
835
|
+
g(this, ye, /* @__PURE__ */ c((i) => {
|
|
836
836
|
var n;
|
|
837
837
|
Array.isArray(i) || (i = [i]);
|
|
838
838
|
const t = typeof ((n = e(this, T).fields) == null ? void 0 : n.get) == "function" ? e(this, T).fields.get() : Object.keys(i[0] || {}), s = [];
|
|
@@ -843,18 +843,18 @@ const k = class k {
|
|
|
843
843
|
}), s.push(o);
|
|
844
844
|
}), s;
|
|
845
845
|
}, "#json2Array"));
|
|
846
|
-
|
|
847
|
-
t.__ng = e(this,
|
|
846
|
+
g(this, pe, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((t) => {
|
|
847
|
+
t.__ng = e(this, te).call(this), t.__ng.rowid = this.nextId, t.__ng.rowState = k.ROW_STATE.INSERT, t.__ng._[0] = t.__ng.rowid;
|
|
848
848
|
}), i), "#defaultInsert"));
|
|
849
849
|
x(this, "add", /* @__PURE__ */ c((i, t = !0) => {
|
|
850
850
|
var r;
|
|
851
851
|
i === void 0 && (i = {});
|
|
852
|
-
const s = e(this,
|
|
853
|
-
e(this, w).rawRecords = e(this, w).rawRecords.concat(e(this,
|
|
852
|
+
const s = e(this, ye).call(this, i);
|
|
853
|
+
e(this, w).rawRecords = e(this, w).rawRecords.concat(e(this, pe).call(this, s)), this.resetRecords();
|
|
854
854
|
const n = this.count() - 1;
|
|
855
855
|
return t || s.forEach((o, a) => {
|
|
856
|
-
const
|
|
857
|
-
|
|
856
|
+
const f = e(this, w).rawRecords[n - a];
|
|
857
|
+
f && (f.__ng.rowState = k.ROW_STATE.EMPTY);
|
|
858
858
|
}), (r = e(this, w).viewRecords) != null && r.reset && e(this, w).viewRecords.reset(), n;
|
|
859
859
|
}, "add"));
|
|
860
860
|
x(this, "delete", /* @__PURE__ */ c((i) => {
|
|
@@ -870,9 +870,9 @@ const k = class k {
|
|
|
870
870
|
}), this.resetRecords(), (s = e(this, w).viewRecords) != null && s.reset && e(this, w).viewRecords.reset();
|
|
871
871
|
}, "delete"));
|
|
872
872
|
x(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
|
|
873
|
-
var
|
|
873
|
+
var f;
|
|
874
874
|
i = parseInt(i, 10);
|
|
875
|
-
const r = (typeof ((
|
|
875
|
+
const r = (typeof ((f = e(this, T).fields) == null ? void 0 : f.get) == "function" ? e(this, T).fields.get() : []).indexOf(t);
|
|
876
876
|
if (r < 0) return;
|
|
877
877
|
const o = this.getValidData()[i];
|
|
878
878
|
if (!o) return;
|
|
@@ -887,7 +887,7 @@ const k = class k {
|
|
|
887
887
|
});
|
|
888
888
|
}, "resetRecords"));
|
|
889
889
|
x(this, "getValidData", /* @__PURE__ */ c(() => (e(this, q).length === 0 && e(this, w).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
|
|
890
|
-
|
|
890
|
+
g(this, Z, /* @__PURE__ */ c((i) => {
|
|
891
891
|
var s;
|
|
892
892
|
if (!i) return i;
|
|
893
893
|
const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
|
|
@@ -912,7 +912,7 @@ const k = class k {
|
|
|
912
912
|
}
|
|
913
913
|
return e(this, Z).call(this, s[i]);
|
|
914
914
|
}, "get"));
|
|
915
|
-
y(this, T, i), y(this, w, t), e(this,
|
|
915
|
+
y(this, T, i), y(this, w, t), e(this, be).call(this);
|
|
916
916
|
}
|
|
917
917
|
get source() {
|
|
918
918
|
return e(this, Z).call(this, e(this, w).rawRecords);
|
|
@@ -921,7 +921,7 @@ const k = class k {
|
|
|
921
921
|
this.clear(), this.add(i, !1);
|
|
922
922
|
}
|
|
923
923
|
get nextId() {
|
|
924
|
-
return ++
|
|
924
|
+
return ++Ne(this, ge)._;
|
|
925
925
|
}
|
|
926
926
|
get length() {
|
|
927
927
|
return e(this, q).length;
|
|
@@ -930,7 +930,7 @@ const k = class k {
|
|
|
930
930
|
return this.length;
|
|
931
931
|
}
|
|
932
932
|
};
|
|
933
|
-
T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(),
|
|
933
|
+
T = new WeakMap(), w = new WeakMap(), q = new WeakMap(), K = new WeakMap(), ge = new WeakMap(), O = new WeakMap(), be = new WeakMap(), te = new WeakMap(), ye = new WeakMap(), pe = new WeakMap(), Z = new WeakMap(), c(k, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
934
934
|
x(k, "ROW_STATE", {
|
|
935
935
|
EMPTY: "EMPTY",
|
|
936
936
|
NORMAL: "NORMAL",
|
|
@@ -938,10 +938,10 @@ x(k, "ROW_STATE", {
|
|
|
938
938
|
UPDATE: "UPDATE",
|
|
939
939
|
DELETE: "DELETE"
|
|
940
940
|
});
|
|
941
|
-
let
|
|
942
|
-
const
|
|
941
|
+
let Ae = k;
|
|
942
|
+
const Me = class Me {
|
|
943
943
|
constructor(i) {
|
|
944
|
-
this.owner = i, this.row = new
|
|
944
|
+
this.owner = i, this.row = new Re(this), this.data = new Ae(i, this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
|
|
945
945
|
var t;
|
|
946
946
|
(t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
|
|
947
947
|
}, this.setDataSource = (t) => {
|
|
@@ -958,19 +958,19 @@ const Ie = class Ie {
|
|
|
958
958
|
}, this.setDataSource([]);
|
|
959
959
|
}
|
|
960
960
|
};
|
|
961
|
-
c(
|
|
962
|
-
let
|
|
963
|
-
var Y,
|
|
964
|
-
const
|
|
961
|
+
c(Me, "ngDataManager");
|
|
962
|
+
let Te = Me;
|
|
963
|
+
var Y, me;
|
|
964
|
+
const $e = class $e extends HTMLElement {
|
|
965
965
|
constructor() {
|
|
966
966
|
super();
|
|
967
967
|
//#created = false;
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
this.attachShadow({ mode: "open" }), y(this, Y, new
|
|
968
|
+
g(this, Y);
|
|
969
|
+
g(this, me);
|
|
970
|
+
this.attachShadow({ mode: "open" }), y(this, Y, new Te(this));
|
|
971
971
|
}
|
|
972
972
|
connectedCallback() {
|
|
973
|
-
y(this,
|
|
973
|
+
y(this, me, new Ee(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
974
974
|
}
|
|
975
975
|
disconnectedCallback() {
|
|
976
976
|
M.log("NineTable disconnected.");
|
|
@@ -988,7 +988,7 @@ const Me = class Me extends HTMLElement {
|
|
|
988
988
|
return e(this, Y);
|
|
989
989
|
}
|
|
990
990
|
};
|
|
991
|
-
Y = new WeakMap(),
|
|
992
|
-
let
|
|
993
|
-
customElements.get("nine-table") || customElements.define("nine-table",
|
|
991
|
+
Y = new WeakMap(), me = new WeakMap(), c($e, "NineTable");
|
|
992
|
+
let qe = $e;
|
|
993
|
+
customElements.get("nine-table") || customElements.define("nine-table", qe);
|
|
994
994
|
//# sourceMappingURL=nine-table.js.map
|