@ninebone/table 0.0.168 β 0.0.169
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 +77 -82
- 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,11 +1,11 @@
|
|
|
1
1
|
var Me = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Ie = (w) => {
|
|
3
3
|
throw TypeError(w);
|
|
4
4
|
};
|
|
5
5
|
var ze = (w, i, t) => i in w ? Me(w, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : w[i] = t;
|
|
6
6
|
var a = (w, i) => Me(w, "name", { value: i, configurable: !0 });
|
|
7
|
-
var v = (w, i, t) => ze(w, typeof i != "symbol" ? i + "" : i, t),
|
|
8
|
-
var e = (w, i, t) => (
|
|
7
|
+
var v = (w, i, t) => ze(w, typeof i != "symbol" ? i + "" : i, t), $e = (w, i, t) => i.has(w) || Ie("Cannot " + t);
|
|
8
|
+
var e = (w, i, t) => ($e(w, i, "read from private field"), t ? t.call(w) : i.get(w)), f = (w, i, t) => i.has(w) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(w) : i.set(w, t), p = (w, i, t, s) => ($e(w, i, "write to private field"), s ? s.call(w, t) : i.set(w, t), t);
|
|
9
9
|
var He = (w, i, t, s) => ({
|
|
10
10
|
set _(n) {
|
|
11
11
|
p(w, i, n, t);
|
|
@@ -44,8 +44,8 @@ const Te = class Te extends HTMLElement {
|
|
|
44
44
|
if (!e(this, _) || !e(this, y) || e(this, O)) return;
|
|
45
45
|
const t = e(this, y).container, s = t.querySelector("table");
|
|
46
46
|
if (!s) return;
|
|
47
|
-
const n = e(this, y).track, o = e(this, y).thumb, r = e(this, _).querySelector(".ng-container-bottom"), l = t.clientWidth,
|
|
48
|
-
if (l !== 0 &&
|
|
47
|
+
const n = e(this, y).track, o = e(this, y).thumb, r = e(this, _).querySelector(".ng-container-bottom"), l = t.clientWidth, b = s.scrollWidth;
|
|
48
|
+
if (l !== 0 && b > l)
|
|
49
49
|
r && (r.style.display = "flex");
|
|
50
50
|
else {
|
|
51
51
|
r && (r.style.display = "none");
|
|
@@ -53,16 +53,16 @@ const Te = class Te extends HTMLElement {
|
|
|
53
53
|
}
|
|
54
54
|
const c = n.clientWidth;
|
|
55
55
|
if (c <= 0) return;
|
|
56
|
-
const h = Math.max(Math.min(c * (l /
|
|
56
|
+
const h = Math.max(Math.min(c * (l / b), c), 20);
|
|
57
57
|
o.style.width = `${h}px`;
|
|
58
58
|
let d = 0;
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
const x =
|
|
59
|
+
const g = s.style.transform;
|
|
60
|
+
if (g && g.includes("translateX")) {
|
|
61
|
+
const x = g.match(/translateX\(([-\d.]+)px\)/);
|
|
62
62
|
x && x[1] && (d = parseFloat(x[1]));
|
|
63
63
|
} else
|
|
64
64
|
d = parseInt(s.style.left || 0, 10);
|
|
65
|
-
let u = parseInt(Math.abs(d) * c /
|
|
65
|
+
let u = parseInt(Math.abs(d) * c / b, 10);
|
|
66
66
|
u < 0 && (u = 0);
|
|
67
67
|
const S = c - h;
|
|
68
68
|
u > S && (u = S), o.style.left = `${u}px`, e(this, y).left.disabled = u === 0, e(this, y).right.disabled = u >= S - 1;
|
|
@@ -74,11 +74,11 @@ const Te = class Te extends HTMLElement {
|
|
|
74
74
|
const o = e(this, y).track.getBoundingClientRect(), r = e(this, y).thumb.clientWidth;
|
|
75
75
|
let l = t;
|
|
76
76
|
l < 0 && (l = 0);
|
|
77
|
-
const
|
|
78
|
-
l >
|
|
77
|
+
const b = o.width - r;
|
|
78
|
+
l > b && (l = b), l = parseInt(l, 10), e(this, y).thumb.style.left = `${l}px`, e(this, y).left.disabled = l === 0, e(this, y).right.disabled = l >= b - 1;
|
|
79
79
|
const c = s.clientWidth, h = n.scrollWidth;
|
|
80
|
-
let d =
|
|
81
|
-
return -d > h - c && (d = -(h - c)), -d + 5 > h - c && (d = -(h - c)), c >= h && (d = 0), n.style.transform = `translateX(${d}px)`, l > 0 && l <
|
|
80
|
+
let d = b > 0 ? -l * (h - c) / b : 0;
|
|
81
|
+
return -d > h - c && (d = -(h - c)), -d + 5 > h - c && (d = -(h - c)), c >= h && (d = 0), n.style.transform = `translateX(${d}px)`, l > 0 && l < b - 1;
|
|
82
82
|
}, "#thumbMoveTo"));
|
|
83
83
|
f(this, ie, /* @__PURE__ */ a(() => {
|
|
84
84
|
const t = /* @__PURE__ */ a((n) => {
|
|
@@ -109,8 +109,8 @@ const Te = class Te extends HTMLElement {
|
|
|
109
109
|
n.stopPropagation(), n.preventDefault(), p(this, O, !0), this.shiftX = n.clientX - e(this, y).thumb.getBoundingClientRect().left;
|
|
110
110
|
const o = /* @__PURE__ */ a((l) => {
|
|
111
111
|
if (!e(this, O)) return;
|
|
112
|
-
const
|
|
113
|
-
e(this, P).call(this, l.clientX -
|
|
112
|
+
const b = e(this, y).track.getBoundingClientRect();
|
|
113
|
+
e(this, P).call(this, l.clientX - b.left - this.shiftX);
|
|
114
114
|
}, "onMouseMove"), r = /* @__PURE__ */ a(() => {
|
|
115
115
|
p(this, O, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
|
|
116
116
|
}, "onMouseUp");
|
|
@@ -206,14 +206,14 @@ const Te = class Te extends HTMLElement {
|
|
|
206
206
|
_ = new WeakMap(), O = new WeakMap(), y = new WeakMap(), B = new WeakMap(), N = new WeakMap(), D = new WeakMap(), te = new WeakMap(), P = new WeakMap(), ie = new WeakMap(), a(Te, "NineTableHScrollBar");
|
|
207
207
|
let ge = Te;
|
|
208
208
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
|
|
209
|
-
var X, M, q, I,
|
|
209
|
+
var X, M, q, $, I, H, se, ne;
|
|
210
210
|
const qe = class qe {
|
|
211
211
|
constructor(i) {
|
|
212
212
|
f(this, X);
|
|
213
213
|
f(this, M, []);
|
|
214
214
|
f(this, q, null);
|
|
215
|
-
f(this,
|
|
216
|
-
f(this,
|
|
215
|
+
f(this, $, null);
|
|
216
|
+
f(this, I, 0);
|
|
217
217
|
f(this, H, 0);
|
|
218
218
|
f(this, se, /* @__PURE__ */ a(() => {
|
|
219
219
|
e(this, ne).call(this);
|
|
@@ -222,7 +222,7 @@ const qe = class qe {
|
|
|
222
222
|
* π― λ·°ν¬νΈ ν¬κΈ° λ³ν μμ μ λμ΄ κ³μ° λ° νμν ν κ°μ μ°μ Β·μΊμ±μ μκ²°
|
|
223
223
|
*/
|
|
224
224
|
f(this, ne, /* @__PURE__ */ a(() => {
|
|
225
|
-
!e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this,
|
|
225
|
+
!e(this, X) || !(e(this, X) instanceof HTMLElement) || (p(this, $, new ResizeObserver((i) => {
|
|
226
226
|
for (const t of i) {
|
|
227
227
|
const s = t.target;
|
|
228
228
|
if (!s.classList.contains("active"))
|
|
@@ -231,19 +231,19 @@ const qe = class qe {
|
|
|
231
231
|
if (n > 0) {
|
|
232
232
|
const o = s.clientHeight || s.getBoundingClientRect().height || n;
|
|
233
233
|
let r = 0;
|
|
234
|
-
const l = s.querySelector(".ng-container-body") || s,
|
|
235
|
-
|
|
234
|
+
const l = s.querySelector(".ng-container-body") || s, b = l.querySelector("thead"), c = l.querySelector("tfoot");
|
|
235
|
+
b && (r += b.offsetHeight || b.getBoundingClientRect().height), c && (r += c.offsetHeight || c.getBoundingClientRect().height);
|
|
236
236
|
const h = Math.max(o - r, 100);
|
|
237
|
-
if (e(this,
|
|
238
|
-
const d = Math.ceil(e(this,
|
|
239
|
-
p(this, H, d + 20), G.log(`[RowManager] Resized. Height: ${e(this,
|
|
240
|
-
const u = s.querySelector(
|
|
237
|
+
if (e(this, I) !== h && (p(this, I, h), e(this, q) !== null)) {
|
|
238
|
+
const d = Math.ceil(e(this, I) / e(this, q));
|
|
239
|
+
p(this, H, d + 20), G.log(`[RowManager] Resized. Height: ${e(this, I)}px | Target Rows: ${e(this, H)}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
|
|
240
|
+
const u = s.querySelector(g);
|
|
241
241
|
u && u.querySelector("tbody") && this.renderRows(u);
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
})), e(this,
|
|
246
|
+
})), e(this, $).observe(e(this, X)));
|
|
247
247
|
}, "#initResizeObserver"));
|
|
248
248
|
v(this, "initTemplate", /* @__PURE__ */ a((i) => {
|
|
249
249
|
const t = i.querySelector("tbody.bindable") || i.querySelector("tbody");
|
|
@@ -264,13 +264,13 @@ const qe = class qe {
|
|
|
264
264
|
n.appendChild(l.cloneNode(!0));
|
|
265
265
|
}), s ? s.before(n) : t.appendChild(n);
|
|
266
266
|
let o = 0;
|
|
267
|
-
if (t.querySelectorAll("tr:not(.nodata)").forEach((l,
|
|
267
|
+
if (t.querySelectorAll("tr:not(.nodata)").forEach((l, b) => {
|
|
268
268
|
const c = l.offsetHeight;
|
|
269
269
|
if (c === 0)
|
|
270
|
-
throw new Error(`[RowManager] Rendered TR[${
|
|
270
|
+
throw new Error(`[RowManager] Rendered TR[${b}] height is 0. Check CSS styles.`);
|
|
271
271
|
o += c;
|
|
272
|
-
}), p(this, q, o), e(this,
|
|
273
|
-
const l = Math.ceil(e(this,
|
|
272
|
+
}), p(this, q, o), e(this, I) > 0) {
|
|
273
|
+
const l = Math.ceil(e(this, I) / e(this, q));
|
|
274
274
|
p(this, H, l + 20);
|
|
275
275
|
}
|
|
276
276
|
return console.log(`[RowManager] Template Height Cached: ${e(this, q)}px | RowCount: ${e(this, H)}`), e(this, q);
|
|
@@ -304,7 +304,7 @@ const qe = class qe {
|
|
|
304
304
|
s ? s.before(n) : t.appendChild(n), console.log(`[RowManager] Rendered ${o} sets into DOM.`);
|
|
305
305
|
}, "renderRows"));
|
|
306
306
|
v(this, "destroy", /* @__PURE__ */ a(() => {
|
|
307
|
-
e(this,
|
|
307
|
+
e(this, $) && (e(this, $).disconnect(), p(this, $, null));
|
|
308
308
|
}, "destroy"));
|
|
309
309
|
p(this, X, i), e(this, se).call(this);
|
|
310
310
|
}
|
|
@@ -312,7 +312,7 @@ const qe = class qe {
|
|
|
312
312
|
return e(this, M).length || 1;
|
|
313
313
|
}
|
|
314
314
|
};
|
|
315
|
-
X = new WeakMap(), M = new WeakMap(), q = new WeakMap(),
|
|
315
|
+
X = new WeakMap(), M = new WeakMap(), q = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), H = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), a(qe, "RowManager");
|
|
316
316
|
let pe = qe;
|
|
317
317
|
var L, U, re;
|
|
318
318
|
const j = class j extends HTMLElement {
|
|
@@ -323,53 +323,53 @@ const j = class j extends HTMLElement {
|
|
|
323
323
|
v(this, "init", /* @__PURE__ */ a((t) => {
|
|
324
324
|
if (!t) return;
|
|
325
325
|
const s = /* @__PURE__ */ a((c) => {
|
|
326
|
-
const h = /* @__PURE__ */ a((
|
|
327
|
-
if (
|
|
328
|
-
const u =
|
|
326
|
+
const h = /* @__PURE__ */ a((g) => {
|
|
327
|
+
if (g.querySelector("colgroup")) return;
|
|
328
|
+
const u = g.querySelector("tbody tr") || g.querySelector("tr"), S = u ? u.querySelectorAll("th, td").length : 1, x = document.createElement("colgroup"), C = Math.max(Math.floor((g.clientWidth || 600) / S), 100);
|
|
329
329
|
for (let R = 0; R < S; R++) {
|
|
330
330
|
const F = document.createElement("col");
|
|
331
331
|
F.setAttribute("width", C), x.appendChild(F);
|
|
332
332
|
}
|
|
333
|
-
|
|
334
|
-
}, "ensureColgroup"), d = /* @__PURE__ */ a((
|
|
335
|
-
if (
|
|
336
|
-
const u = document.createElement("thead"), S =
|
|
337
|
-
S ? S.after(u) :
|
|
333
|
+
g.prepend(x);
|
|
334
|
+
}, "ensureColgroup"), d = /* @__PURE__ */ a((g) => {
|
|
335
|
+
if (g.querySelector("thead")) return;
|
|
336
|
+
const u = document.createElement("thead"), S = g.querySelector("colgroup");
|
|
337
|
+
S ? S.after(u) : g.prepend(u);
|
|
338
338
|
}, "ensureThead");
|
|
339
339
|
return h(c), d(c), c.classList.add("nine-table-element"), c;
|
|
340
340
|
}, "initializeTable"), n = t.cloneNode(!0);
|
|
341
341
|
p(this, L, s(n)), e(this, L).style.display = "table", e(this, U).initTemplate(e(this, L));
|
|
342
|
-
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"),
|
|
343
|
-
const
|
|
342
|
+
const o = this.querySelector(".ng-container-left"), r = this.querySelector(".ng-container-body"), l = this.querySelector(".ng-container-right"), b = /* @__PURE__ */ a((c, h, d = !1) => {
|
|
343
|
+
const g = c.cloneNode(!0), u = Array.from(g.querySelectorAll("colgroup col")), S = [];
|
|
344
344
|
return u.forEach((x, C) => {
|
|
345
345
|
const R = x.getAttribute("fixed");
|
|
346
346
|
(d ? !R || R === "" : R === h) || S.push(C);
|
|
347
347
|
}), S.reverse().forEach((x) => {
|
|
348
|
-
u[x] && u[x].remove(),
|
|
348
|
+
u[x] && u[x].remove(), g.querySelectorAll("tr").forEach((C) => {
|
|
349
349
|
const R = C.querySelectorAll("th, td");
|
|
350
350
|
R[x] && R[x].remove();
|
|
351
351
|
});
|
|
352
|
-
}),
|
|
352
|
+
}), g;
|
|
353
353
|
}, "filterTableByFixed");
|
|
354
354
|
if (r) {
|
|
355
|
-
const c =
|
|
355
|
+
const c = b(e(this, L), null, !0);
|
|
356
356
|
r.innerHTML = "", r.appendChild(c), e(this, U).measureAndCacheHeight(r);
|
|
357
357
|
}
|
|
358
358
|
if (o) {
|
|
359
|
-
const c =
|
|
359
|
+
const c = b(e(this, L), "left", !1);
|
|
360
360
|
let h = 0;
|
|
361
|
-
c.querySelectorAll("col").forEach((
|
|
362
|
-
const u = parseInt(
|
|
361
|
+
c.querySelectorAll("col").forEach((g) => {
|
|
362
|
+
const u = parseInt(g.getAttribute("width"), 10);
|
|
363
363
|
isNaN(u) || (h += u);
|
|
364
364
|
}), o.innerHTML = "", o.appendChild(c);
|
|
365
365
|
const d = h > 0 ? h : 0;
|
|
366
366
|
o.style.flex = `0 0 ${d}px`, o.style.width = `${d}px`;
|
|
367
367
|
}
|
|
368
368
|
if (l) {
|
|
369
|
-
const c =
|
|
369
|
+
const c = b(e(this, L), "right", !1);
|
|
370
370
|
let h = 0;
|
|
371
|
-
c.querySelectorAll("col").forEach((
|
|
372
|
-
const u = parseInt(
|
|
371
|
+
c.querySelectorAll("col").forEach((g) => {
|
|
372
|
+
const u = parseInt(g.getAttribute("width"), 10);
|
|
373
373
|
isNaN(u) || (h += u);
|
|
374
374
|
}), l.innerHTML = "", l.appendChild(c);
|
|
375
375
|
const d = h > 0 ? h : 0;
|
|
@@ -540,42 +540,37 @@ const ke = class ke extends HTMLElement {
|
|
|
540
540
|
}, "#init"));
|
|
541
541
|
v(this, "switchSheet", /* @__PURE__ */ a((t, s = !1) => {
|
|
542
542
|
const n = /* @__PURE__ */ a((d) => {
|
|
543
|
-
const
|
|
543
|
+
const g = Array.from(d.querySelectorAll("nine-table-sheet"));
|
|
544
544
|
Array.from(d.querySelectorAll("nine-splitter")).forEach((x) => x.style.setProperty("display", "none", "important"));
|
|
545
|
-
const S =
|
|
545
|
+
const S = g.filter((x) => x.classList.contains("active"));
|
|
546
546
|
S.length < 2 || S.forEach((x) => {
|
|
547
|
-
const C = parseInt(x.getAttribute("data-index"), 10), R = d.querySelector(`nine-splitter[data-split-index="${C}"]`), F =
|
|
547
|
+
const C = parseInt(x.getAttribute("data-index"), 10), R = d.querySelector(`nine-splitter[data-split-index="${C}"]`), F = g[C + 1];
|
|
548
548
|
R && F && F.classList.contains("active") && R.style.setProperty("display", "block", "important");
|
|
549
549
|
});
|
|
550
|
-
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"),
|
|
550
|
+
}, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), b = r.querySelectorAll("nine-table-sheet");
|
|
551
551
|
if (!l[t]) return;
|
|
552
552
|
if (!s)
|
|
553
|
-
l.forEach((d,
|
|
554
|
-
d.classList.toggle("active",
|
|
555
|
-
const u = r.querySelector(`nine-table-sheet[data-index="${
|
|
553
|
+
l.forEach((d, g) => {
|
|
554
|
+
d.classList.toggle("active", g === t);
|
|
555
|
+
const u = r.querySelector(`nine-table-sheet[data-index="${g}"]`);
|
|
556
556
|
u && (u.style.flex = "");
|
|
557
|
-
}),
|
|
558
|
-
d.classList.toggle("active",
|
|
557
|
+
}), b.forEach((d, g) => {
|
|
558
|
+
d.classList.toggle("active", g === t);
|
|
559
559
|
});
|
|
560
560
|
else {
|
|
561
|
-
const d = l[t],
|
|
562
|
-
if (d.classList.contains("active") &&
|
|
561
|
+
const d = l[t], g = o.querySelectorAll(".nine-tab-item.active");
|
|
562
|
+
if (d.classList.contains("active") && g.length <= 1)
|
|
563
563
|
return;
|
|
564
564
|
d.classList.toggle("active");
|
|
565
565
|
const u = r.querySelector(`nine-table-sheet[data-index="${t}"]`);
|
|
566
566
|
u && (u.classList.toggle("active"), u.classList.contains("active") || (u.style.flex = ""));
|
|
567
567
|
}
|
|
568
568
|
const c = Array.from(r.querySelectorAll("nine-table-sheet.active"));
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
} else
|
|
575
|
-
c.forEach((d) => {
|
|
576
|
-
d.style.flex = "1 1 100%";
|
|
577
|
-
});
|
|
578
|
-
n(r);
|
|
569
|
+
c.length > 1 ? c.forEach((d) => {
|
|
570
|
+
d.style.flex = "1 1 0%";
|
|
571
|
+
}) : c.forEach((d) => {
|
|
572
|
+
d.style.flex = "1 1 100%";
|
|
573
|
+
}), n(r);
|
|
579
574
|
const h = r.querySelector("nine-table-sheet.active");
|
|
580
575
|
if (h && typeof h.getRowCount == "function") {
|
|
581
576
|
const d = this.querySelector("#row-count");
|
|
@@ -606,15 +601,15 @@ const Ae = class Ae {
|
|
|
606
601
|
var C;
|
|
607
602
|
const t = e(this, k).querySelector("nine-table-sheet.active");
|
|
608
603
|
if (!t) return;
|
|
609
|
-
const s = ((C = t.getRowCount) == null ? void 0 : C.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, o = Math.min(s, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), l = r ? r.getBoundingClientRect().height : 32,
|
|
604
|
+
const s = ((C = t.getRowCount) == null ? void 0 : C.call(t)) || 0, n = parseInt(i.getAttribute("max-display-row"), 10) || 10, o = Math.min(s, n), r = t.querySelector("tbody tr") || t.querySelector("tr"), l = r ? r.getBoundingClientRect().height : 32, b = e(this, k).querySelector("nine-table-header"), c = e(this, k).querySelector("nine-table-sheets-footer"), h = b ? b.getBoundingClientRect().height : 40, d = c ? c.getBoundingClientRect().height : 32, u = h + d + 16, S = o * l + u;
|
|
610
605
|
i.style.height = `${S}px`, i.style.maxHeight = `${n * l + u}px`;
|
|
611
606
|
const x = e(this, k).querySelector("nine-table-sheets-body");
|
|
612
607
|
x && (x.style.overflowY = s > n ? "auto" : "hidden");
|
|
613
608
|
}, "#applyAutoHeight"));
|
|
614
609
|
f(this, ae, /* @__PURE__ */ a(() => {
|
|
615
610
|
const i = e(this, k).host, s = Array.from(i.children).filter((c) => c.tagName === "TABLE"), n = i.getAttribute("auto-height") === "true", o = s.length, r = s.map((c, h) => {
|
|
616
|
-
const
|
|
617
|
-
return
|
|
611
|
+
const g = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, u = h < o - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
|
|
612
|
+
return g + u;
|
|
618
613
|
}).join(""), l = s.map((c, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
|
|
619
614
|
e(this, k).innerHTML = `
|
|
620
615
|
<style>
|
|
@@ -723,8 +718,8 @@ const Ae = class Ae {
|
|
|
723
718
|
</nine-table-body>
|
|
724
719
|
<nine-table-footer></nine-table-footer>
|
|
725
720
|
`;
|
|
726
|
-
const
|
|
727
|
-
|
|
721
|
+
const b = e(this, k).querySelectorAll("nine-table-sheet");
|
|
722
|
+
b == null || b.forEach((c, h) => {
|
|
728
723
|
s[h] && setTimeout(() => {
|
|
729
724
|
c.init(s[h]), n && e(this, Q).call(this, i);
|
|
730
725
|
});
|
|
@@ -817,8 +812,8 @@ const T = class T {
|
|
|
817
812
|
e(this, m).rawRecords = e(this, m).rawRecords.concat(e(this, fe).call(this, s)), this.resetRecords();
|
|
818
813
|
const n = this.count() - 1;
|
|
819
814
|
return t || s.forEach((r, l) => {
|
|
820
|
-
const
|
|
821
|
-
|
|
815
|
+
const b = e(this, m).rawRecords[n - l];
|
|
816
|
+
b && (b.__ng.rowState = T.ROW_STATE.EMPTY);
|
|
822
817
|
}), (o = e(this, m).viewRecords) != null && o.reset && e(this, m).viewRecords.reset(), n;
|
|
823
818
|
}, "add"));
|
|
824
819
|
v(this, "delete", /* @__PURE__ */ a((i) => {
|
|
@@ -834,9 +829,9 @@ const T = class T {
|
|
|
834
829
|
}), this.resetRecords(), (s = e(this, m).viewRecords) != null && s.reset && e(this, m).viewRecords.reset();
|
|
835
830
|
}, "delete"));
|
|
836
831
|
v(this, "setValue", /* @__PURE__ */ a((i, t, s) => {
|
|
837
|
-
var
|
|
832
|
+
var b;
|
|
838
833
|
i = parseInt(i, 10);
|
|
839
|
-
const o = (typeof ((
|
|
834
|
+
const o = (typeof ((b = e(this, E).fields) == null ? void 0 : b.get) == "function" ? e(this, E).fields.get() : []).indexOf(t);
|
|
840
835
|
if (o < 0) return;
|
|
841
836
|
const r = this.getValidData()[i];
|
|
842
837
|
if (!r) return;
|