@ninebone/table 0.0.261 β 0.0.263
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 +238 -241
- 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
|
|
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,56 +368,56 @@ 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
|
-
y(this,
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
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 u = l.getAttribute("fixed");
|
|
388
|
+
u && e(this, E).querySelectorAll(`[data-col="${h}"]`).forEach((d) => {
|
|
389
|
+
d.setAttribute("fixed", u);
|
|
390
390
|
});
|
|
391
|
-
}), M.log(e(this,
|
|
392
|
-
const o = this.querySelector(".ng-container-left"), a = this.querySelector(".ng-container-body"),
|
|
391
|
+
}), M.log(e(this, E));
|
|
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
|
-
const l = e(this, F).call(this, e(this,
|
|
395
|
-
a.innerHTML = "", a.appendChild(l), M.log(e(this,
|
|
394
|
+
const l = e(this, F).call(this, e(this, E), null);
|
|
395
|
+
a.innerHTML = "", a.appendChild(l), M.log(e(this, E)), M.log(l), e(this, U).initialize(e(this, E));
|
|
396
396
|
}
|
|
397
397
|
if (o) {
|
|
398
|
-
const l = e(this, F).call(this, e(this,
|
|
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 (
|
|
408
|
-
const l = e(this, F).call(this, e(this,
|
|
407
|
+
if (f) {
|
|
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,30 +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 (
|
|
451
|
-
|
|
452
|
-
}).observe(this.querySelector(".ng-container-body")), new MutationObserver((s) => {
|
|
453
|
-
for (const n of s)
|
|
454
|
-
n.attributeName === "class" && this.classList.contains("active") && t();
|
|
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);
|
|
455
452
|
}).observe(this, { attributes: !0 });
|
|
456
453
|
}, "#init"));
|
|
457
|
-
|
|
454
|
+
g(this, he, /* @__PURE__ */ c(() => {
|
|
458
455
|
const t = j.SCROLLBAR_SIZE;
|
|
459
456
|
this.innerHTML = `
|
|
460
457
|
<style>
|
|
@@ -578,55 +575,55 @@ const j = class j extends HTMLElement {
|
|
|
578
575
|
</div>
|
|
579
576
|
`;
|
|
580
577
|
}, "#render"));
|
|
581
|
-
y(this, U, new
|
|
578
|
+
y(this, U, new ve(this));
|
|
582
579
|
}
|
|
583
580
|
connectedCallback() {
|
|
584
|
-
e(this,
|
|
581
|
+
e(this, ce).call(this);
|
|
585
582
|
}
|
|
586
583
|
disconnectedCallback() {
|
|
587
584
|
this.innerHTML = "", M.log("NineTableSheet destroyed.");
|
|
588
585
|
}
|
|
589
586
|
};
|
|
590
|
-
|
|
591
|
-
let
|
|
592
|
-
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet",
|
|
593
|
-
var
|
|
594
|
-
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 {
|
|
595
592
|
constructor() {
|
|
596
593
|
super();
|
|
597
|
-
|
|
594
|
+
g(this, de, /* @__PURE__ */ c(() => {
|
|
598
595
|
var t;
|
|
599
596
|
(t = this.querySelector(".nine-tab-bar")) == null || t.addEventListener("click", (s) => {
|
|
600
597
|
var o;
|
|
601
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);
|
|
602
|
-
e(this,
|
|
603
|
-
}), e(this,
|
|
599
|
+
e(this, Q).call(this, r, n);
|
|
600
|
+
}), e(this, Q).call(this, 0, !1);
|
|
604
601
|
}, "#init"));
|
|
605
|
-
|
|
602
|
+
g(this, Q, /* @__PURE__ */ c((t, s = !1) => {
|
|
606
603
|
const n = /* @__PURE__ */ c(() => {
|
|
607
604
|
const h = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
608
605
|
Array.from(this.querySelectorAll("nine-splitter")).forEach((b) => b.style.setProperty("display", "none"));
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
const
|
|
612
|
-
|
|
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");
|
|
613
610
|
});
|
|
614
|
-
}, "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");
|
|
615
612
|
if (!a[t]) return;
|
|
616
613
|
if (!s)
|
|
617
|
-
a.forEach((h,
|
|
618
|
-
h.classList.toggle("active",
|
|
619
|
-
}),
|
|
620
|
-
const
|
|
621
|
-
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%" : "";
|
|
622
619
|
});
|
|
623
620
|
else {
|
|
624
|
-
const h = a[t],
|
|
625
|
-
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)
|
|
626
623
|
return;
|
|
627
624
|
h.classList.toggle("active");
|
|
628
|
-
const
|
|
629
|
-
|
|
625
|
+
const d = o.querySelector(`nine-table-sheet[data-index="${t}"]`);
|
|
626
|
+
d && (d.classList.toggle("active"), d.classList.contains("active") || (d.style.flex = ""));
|
|
630
627
|
}
|
|
631
628
|
const l = o.querySelectorAll("nine-table-sheet.active");
|
|
632
629
|
l == null || l.forEach((h) => {
|
|
@@ -635,35 +632,35 @@ const Ce = class Ce extends HTMLElement {
|
|
|
635
632
|
}, "#switchSheet"));
|
|
636
633
|
}
|
|
637
634
|
connectedCallback() {
|
|
638
|
-
e(this,
|
|
635
|
+
e(this, de).call(this);
|
|
639
636
|
}
|
|
640
637
|
};
|
|
641
|
-
|
|
642
|
-
let
|
|
643
|
-
customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets",
|
|
644
|
-
var
|
|
645
|
-
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 {
|
|
646
643
|
constructor(i) {
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
e(this,
|
|
644
|
+
g(this, R);
|
|
645
|
+
g(this, fe, /* @__PURE__ */ c(() => {
|
|
646
|
+
e(this, ue).call(this), new ResizeObserver((i) => {
|
|
650
647
|
for (let t of i)
|
|
651
|
-
e(this,
|
|
652
|
-
}).observe(e(this,
|
|
648
|
+
e(this, R).getAttribute("auto-height") === "true" && e(this, ee).call(this);
|
|
649
|
+
}).observe(e(this, R));
|
|
653
650
|
}, "#init"));
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
const i = Array.from(e(this,
|
|
651
|
+
g(this, ee, /* @__PURE__ */ c(() => {
|
|
652
|
+
var f, l;
|
|
653
|
+
const i = Array.from(e(this, R).shadowRoot.querySelectorAll("nine-table-sheet.active"));
|
|
657
654
|
if (i.length === 0) return;
|
|
658
|
-
const t = parseInt(e(this,
|
|
659
|
-
e(this,
|
|
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
|
+
e(this, R).style.height = `${a}px`;
|
|
660
657
|
}, "#applyAutoHeight"));
|
|
661
|
-
|
|
662
|
-
const t = Array.from(e(this,
|
|
663
|
-
const
|
|
664
|
-
return
|
|
665
|
-
}).join(""), o = t.map((
|
|
666
|
-
e(this,
|
|
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
|
+
e(this, R).shadowRoot.innerHTML = `
|
|
667
664
|
<style>
|
|
668
665
|
:host {
|
|
669
666
|
display: flex;
|
|
@@ -762,23 +759,23 @@ const _e = class _e {
|
|
|
762
759
|
</nine-table-body>
|
|
763
760
|
<nine-table-footer></nine-table-footer>
|
|
764
761
|
`;
|
|
765
|
-
const a = e(this,
|
|
766
|
-
a == null || a.forEach((
|
|
762
|
+
const a = e(this, R).shadowRoot.querySelectorAll("nine-table-sheet");
|
|
763
|
+
a == null || a.forEach((f, l) => {
|
|
767
764
|
t[l] && setTimeout(() => {
|
|
768
|
-
|
|
765
|
+
f.generate(t[l]), s && e(this, ee).call(this);
|
|
769
766
|
});
|
|
770
767
|
});
|
|
771
768
|
}, "#render"));
|
|
772
|
-
y(this,
|
|
769
|
+
y(this, R, i), e(this, fe).call(this);
|
|
773
770
|
}
|
|
774
771
|
};
|
|
775
|
-
|
|
776
|
-
let
|
|
772
|
+
R = new WeakMap(), fe = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), c(He, "LayoutManager");
|
|
773
|
+
let Ee = He;
|
|
777
774
|
var z, X;
|
|
778
|
-
const
|
|
775
|
+
const Ie = class Ie {
|
|
779
776
|
constructor(i) {
|
|
780
|
-
|
|
781
|
-
|
|
777
|
+
g(this, z);
|
|
778
|
+
g(this, X, -1);
|
|
782
779
|
x(this, "count", /* @__PURE__ */ c(() => e(this, z).rawRecords.length, "count"));
|
|
783
780
|
y(this, z, i);
|
|
784
781
|
}
|
|
@@ -795,31 +792,31 @@ const He = class He {
|
|
|
795
792
|
});
|
|
796
793
|
}
|
|
797
794
|
};
|
|
798
|
-
z = new WeakMap(), X = new WeakMap(), c(
|
|
799
|
-
let Re =
|
|
800
|
-
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;
|
|
801
798
|
const k = class k {
|
|
802
799
|
constructor(i, t) {
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
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(() => {
|
|
810
807
|
y(this, O, []);
|
|
811
808
|
const i = e(this, T).template || [];
|
|
812
809
|
Array.from(i).forEach((t) => {
|
|
813
810
|
var s;
|
|
814
811
|
e(this, O).push(((s = t.getBoundingClientRect) == null ? void 0 : s.call(t).height) || 24);
|
|
815
812
|
}), (e(this, w).rawRecords || []).forEach((t) => {
|
|
816
|
-
t.__ng || (t.__ng = e(this,
|
|
813
|
+
t.__ng || (t.__ng = e(this, te).call(this)), t.__ng.height = e(this, O).slice();
|
|
817
814
|
});
|
|
818
815
|
}, "#initialize"));
|
|
819
816
|
x(this, "set", /* @__PURE__ */ c((i) => {
|
|
820
817
|
this.clear(), this.add(i, !1);
|
|
821
818
|
}, "set"));
|
|
822
|
-
|
|
819
|
+
g(this, te, /* @__PURE__ */ c(() => ({
|
|
823
820
|
rowState: k.ROW_STATE.EMPTY,
|
|
824
821
|
deleted: !1,
|
|
825
822
|
filtered: !1,
|
|
@@ -835,7 +832,7 @@ const k = class k {
|
|
|
835
832
|
var i;
|
|
836
833
|
e(this, w).rawRecords = [], y(this, q, []), y(this, K, []), (i = e(this, w).viewRecords) != null && i.reset && e(this, w).viewRecords.reset();
|
|
837
834
|
}, "clear"));
|
|
838
|
-
|
|
835
|
+
g(this, ye, /* @__PURE__ */ c((i) => {
|
|
839
836
|
var n;
|
|
840
837
|
Array.isArray(i) || (i = [i]);
|
|
841
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 = [];
|
|
@@ -846,18 +843,18 @@ const k = class k {
|
|
|
846
843
|
}), s.push(o);
|
|
847
844
|
}), s;
|
|
848
845
|
}, "#json2Array"));
|
|
849
|
-
|
|
850
|
-
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;
|
|
851
848
|
}), i), "#defaultInsert"));
|
|
852
849
|
x(this, "add", /* @__PURE__ */ c((i, t = !0) => {
|
|
853
850
|
var r;
|
|
854
851
|
i === void 0 && (i = {});
|
|
855
|
-
const s = e(this,
|
|
856
|
-
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();
|
|
857
854
|
const n = this.count() - 1;
|
|
858
855
|
return t || s.forEach((o, a) => {
|
|
859
|
-
const
|
|
860
|
-
|
|
856
|
+
const f = e(this, w).rawRecords[n - a];
|
|
857
|
+
f && (f.__ng.rowState = k.ROW_STATE.EMPTY);
|
|
861
858
|
}), (r = e(this, w).viewRecords) != null && r.reset && e(this, w).viewRecords.reset(), n;
|
|
862
859
|
}, "add"));
|
|
863
860
|
x(this, "delete", /* @__PURE__ */ c((i) => {
|
|
@@ -873,9 +870,9 @@ const k = class k {
|
|
|
873
870
|
}), this.resetRecords(), (s = e(this, w).viewRecords) != null && s.reset && e(this, w).viewRecords.reset();
|
|
874
871
|
}, "delete"));
|
|
875
872
|
x(this, "setValue", /* @__PURE__ */ c((i, t, s) => {
|
|
876
|
-
var
|
|
873
|
+
var f;
|
|
877
874
|
i = parseInt(i, 10);
|
|
878
|
-
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);
|
|
879
876
|
if (r < 0) return;
|
|
880
877
|
const o = this.getValidData()[i];
|
|
881
878
|
if (!o) return;
|
|
@@ -890,7 +887,7 @@ const k = class k {
|
|
|
890
887
|
});
|
|
891
888
|
}, "resetRecords"));
|
|
892
889
|
x(this, "getValidData", /* @__PURE__ */ c(() => (e(this, q).length === 0 && e(this, w).rawRecords.length > 0 && this.resetRecords(), e(this, q)), "getValidData"));
|
|
893
|
-
|
|
890
|
+
g(this, Z, /* @__PURE__ */ c((i) => {
|
|
894
891
|
var s;
|
|
895
892
|
if (!i) return i;
|
|
896
893
|
const t = typeof ((s = e(this, T).fields) == null ? void 0 : s.get) == "function" ? e(this, T).fields.get() : [];
|
|
@@ -915,7 +912,7 @@ const k = class k {
|
|
|
915
912
|
}
|
|
916
913
|
return e(this, Z).call(this, s[i]);
|
|
917
914
|
}, "get"));
|
|
918
|
-
y(this, T, i), y(this, w, t), e(this,
|
|
915
|
+
y(this, T, i), y(this, w, t), e(this, be).call(this);
|
|
919
916
|
}
|
|
920
917
|
get source() {
|
|
921
918
|
return e(this, Z).call(this, e(this, w).rawRecords);
|
|
@@ -924,7 +921,7 @@ const k = class k {
|
|
|
924
921
|
this.clear(), this.add(i, !1);
|
|
925
922
|
}
|
|
926
923
|
get nextId() {
|
|
927
|
-
return ++
|
|
924
|
+
return ++Ne(this, ge)._;
|
|
928
925
|
}
|
|
929
926
|
get length() {
|
|
930
927
|
return e(this, q).length;
|
|
@@ -933,7 +930,7 @@ const k = class k {
|
|
|
933
930
|
return this.length;
|
|
934
931
|
}
|
|
935
932
|
};
|
|
936
|
-
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"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
937
934
|
x(k, "ROW_STATE", {
|
|
938
935
|
EMPTY: "EMPTY",
|
|
939
936
|
NORMAL: "NORMAL",
|
|
@@ -941,10 +938,10 @@ x(k, "ROW_STATE", {
|
|
|
941
938
|
UPDATE: "UPDATE",
|
|
942
939
|
DELETE: "DELETE"
|
|
943
940
|
});
|
|
944
|
-
let
|
|
945
|
-
const
|
|
941
|
+
let Ae = k;
|
|
942
|
+
const Me = class Me {
|
|
946
943
|
constructor(i) {
|
|
947
|
-
this.owner = i, this.row = new Re(this), this.data = 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 = () => {
|
|
948
945
|
var t;
|
|
949
946
|
(t = this.owner.view) != null && t.redraw && this.owner.view.redraw();
|
|
950
947
|
}, this.setDataSource = (t) => {
|
|
@@ -961,19 +958,19 @@ const Ie = class Ie {
|
|
|
961
958
|
}, this.setDataSource([]);
|
|
962
959
|
}
|
|
963
960
|
};
|
|
964
|
-
c(
|
|
965
|
-
let
|
|
966
|
-
var Y,
|
|
967
|
-
const
|
|
961
|
+
c(Me, "ngDataManager");
|
|
962
|
+
let Te = Me;
|
|
963
|
+
var Y, me;
|
|
964
|
+
const $e = class $e extends HTMLElement {
|
|
968
965
|
constructor() {
|
|
969
966
|
super();
|
|
970
967
|
//#created = false;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
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));
|
|
974
971
|
}
|
|
975
972
|
connectedCallback() {
|
|
976
|
-
y(this,
|
|
973
|
+
y(this, me, new Ee(this)), M.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
|
|
977
974
|
}
|
|
978
975
|
disconnectedCallback() {
|
|
979
976
|
M.log("NineTable disconnected.");
|
|
@@ -991,7 +988,7 @@ const Me = class Me extends HTMLElement {
|
|
|
991
988
|
return e(this, Y);
|
|
992
989
|
}
|
|
993
990
|
};
|
|
994
|
-
Y = new WeakMap(),
|
|
995
|
-
let
|
|
996
|
-
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);
|
|
997
994
|
//# sourceMappingURL=nine-table.js.map
|