@ninebone/table 0.0.433 β 0.0.435
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 +69 -69
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +5 -5
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.js
CHANGED
|
@@ -56,10 +56,10 @@ const le = class le extends HTMLElement {
|
|
|
56
56
|
const f = Math.max(Math.min(h * (l / d), h), 20);
|
|
57
57
|
r.style.width = `${f}px`;
|
|
58
58
|
const u = e.scrollLeft, g = d - l;
|
|
59
|
-
let
|
|
60
|
-
g > 0 && (
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
let p = 0;
|
|
60
|
+
g > 0 && (p = parseInt(u / g * (h - f), 10)), p < 0 && (p = 0);
|
|
61
|
+
const y = h - f;
|
|
62
|
+
p > y && (p = y), r.style.left = `${p}px`, H.log(p), t(this, m).left.disabled = p === 0, t(this, m).right.disabled = p >= y - 1;
|
|
63
63
|
}, "refresh"));
|
|
64
64
|
c(this, U, /* @__PURE__ */ a((e) => {
|
|
65
65
|
if (!t(this, m)) return !1;
|
|
@@ -201,14 +201,14 @@ const le = class le extends HTMLElement {
|
|
|
201
201
|
_ = new WeakMap(), z = new WeakMap(), m = new WeakMap(), Y = new WeakMap(), V = new WeakMap(), X = new WeakMap(), St = new WeakMap(), U = new WeakMap(), Et = new WeakMap(), a(le, "NineTableHScrollBar");
|
|
202
202
|
let Kt = le;
|
|
203
203
|
customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Kt);
|
|
204
|
-
var F, Q, N,
|
|
204
|
+
var F, Q, N, E, ct, ht, Rt;
|
|
205
205
|
const ae = class ae extends HTMLElement {
|
|
206
206
|
constructor() {
|
|
207
207
|
super();
|
|
208
208
|
c(this, F);
|
|
209
209
|
c(this, Q);
|
|
210
210
|
c(this, N, !1);
|
|
211
|
-
c(this,
|
|
211
|
+
c(this, E);
|
|
212
212
|
c(this, ct, 0);
|
|
213
213
|
c(this, ht, 0);
|
|
214
214
|
/**
|
|
@@ -216,9 +216,9 @@ const ae = class ae extends HTMLElement {
|
|
|
216
216
|
*/
|
|
217
217
|
v(this, "refresh", /* @__PURE__ */ a(() => {
|
|
218
218
|
H.log("refresh", t(this, N)), H.log("refresh2");
|
|
219
|
-
const e = t(this,
|
|
219
|
+
const e = t(this, E).container, s = t(this, E).track, o = t(this, E).thumb, r = e.clientHeight, l = (t(this, F).data.get() || []).length, d = t(this, Q).getRowHeight(), h = l * d;
|
|
220
220
|
if (h <= r) {
|
|
221
|
-
o.style.display = "none", t(this,
|
|
221
|
+
o.style.display = "none", t(this, E).top.disabled = !0, t(this, E).bottom.disabled = !0;
|
|
222
222
|
return;
|
|
223
223
|
} else
|
|
224
224
|
o.style.display = "block";
|
|
@@ -226,29 +226,29 @@ const ae = class ae extends HTMLElement {
|
|
|
226
226
|
if (f <= 0) return;
|
|
227
227
|
const u = Math.max(Math.min(f * (r / h), f), 20);
|
|
228
228
|
o.style.height = `${u}px`;
|
|
229
|
-
const g = e.scrollTop,
|
|
230
|
-
let
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
|
|
229
|
+
const g = e.scrollTop, p = Math.max(h - r, 1);
|
|
230
|
+
let y = 0;
|
|
231
|
+
p > 0 && (y = g / p * (f - u));
|
|
232
|
+
const S = f - u;
|
|
233
|
+
y < 0 && (y = 0), y > S && (y = S), o.style.top = `${y}px`, H.log("currentScrollTop", g), H.log("maxScrollTop", p), H.log("trackHeight", f), H.log("thumbHeight", u), t(this, E).top.disabled = g <= 0, t(this, E).bottom.disabled = g >= p - 1;
|
|
234
234
|
}, "refresh"));
|
|
235
235
|
c(this, Rt, /* @__PURE__ */ a(() => {
|
|
236
|
-
const e = t(this,
|
|
236
|
+
const e = t(this, E).container, s = /* @__PURE__ */ a(() => {
|
|
237
237
|
const r = (t(this, F).data.get() || []).length, n = t(this, Q).getRowHeight();
|
|
238
238
|
return r * n;
|
|
239
239
|
}, "getContentHeight");
|
|
240
240
|
e.addEventListener("scroll", () => {
|
|
241
241
|
t(this, N) || this.refresh();
|
|
242
|
-
}), t(this,
|
|
242
|
+
}), t(this, E).thumb.addEventListener("mousedown", (o) => {
|
|
243
243
|
if (o.button !== 0) return;
|
|
244
244
|
o.stopPropagation(), o.preventDefault(), b(this, N, !0), b(this, ct, o.clientY), b(this, ht, e.scrollTop);
|
|
245
245
|
const r = /* @__PURE__ */ a((l) => {
|
|
246
246
|
if (!t(this, N)) return;
|
|
247
|
-
const d = t(this,
|
|
248
|
-
if (u > 0 &&
|
|
249
|
-
const O = g / u *
|
|
247
|
+
const d = t(this, E).track.getBoundingClientRect(), h = t(this, E).thumb.clientHeight, u = d.height - h, g = l.clientY - t(this, ct), p = e.clientHeight, y = s(), S = Math.max(y - p, 1);
|
|
248
|
+
if (u > 0 && S > 0) {
|
|
249
|
+
const O = g / u * S;
|
|
250
250
|
let P = t(this, ht) + O;
|
|
251
|
-
const ye = Math.max(0,
|
|
251
|
+
const ye = Math.max(0, y - p);
|
|
252
252
|
P < 0 && (P = 0), P > ye && (P = ye), e.scrollTop = P;
|
|
253
253
|
}
|
|
254
254
|
this.refresh();
|
|
@@ -256,17 +256,17 @@ const ae = class ae extends HTMLElement {
|
|
|
256
256
|
b(this, N, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
|
|
257
257
|
}, "onMouseUp");
|
|
258
258
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
|
|
259
|
-
}), t(this,
|
|
260
|
-
if (o.button !== 0 || o.target === t(this,
|
|
261
|
-
const r = t(this,
|
|
259
|
+
}), t(this, E).track.addEventListener("mousedown", (o) => {
|
|
260
|
+
if (o.button !== 0 || o.target === t(this, E).thumb) return;
|
|
261
|
+
const r = t(this, E).track.getBoundingClientRect(), n = t(this, E).thumb.clientHeight, l = o.clientY - r.top - n / 2, h = r.height - n, f = e.clientHeight, u = s(), g = Math.max(u - f, 1);
|
|
262
262
|
if (h > 0 && g > 0) {
|
|
263
|
-
const
|
|
264
|
-
e.scrollTop =
|
|
263
|
+
const p = Math.max(0, Math.min(1, l / h));
|
|
264
|
+
e.scrollTop = p * g;
|
|
265
265
|
}
|
|
266
266
|
this.refresh();
|
|
267
|
-
}), t(this,
|
|
267
|
+
}), t(this, E).top.addEventListener("click", () => {
|
|
268
268
|
e.scrollTop -= 40;
|
|
269
|
-
}), t(this,
|
|
269
|
+
}), t(this, E).bottom.addEventListener("click", () => {
|
|
270
270
|
e.scrollTop += 40;
|
|
271
271
|
});
|
|
272
272
|
}, "#init"));
|
|
@@ -343,7 +343,7 @@ const ae = class ae extends HTMLElement {
|
|
|
343
343
|
setTimeout(e, 10);
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
b(this,
|
|
346
|
+
b(this, E, {
|
|
347
347
|
container: s,
|
|
348
348
|
track: this.querySelector(".ng-scroll-track"),
|
|
349
349
|
thumb: this.querySelector(".ng-scroll-thumb"),
|
|
@@ -354,7 +354,7 @@ const ae = class ae extends HTMLElement {
|
|
|
354
354
|
e();
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
F = new WeakMap(), Q = new WeakMap(), N = new WeakMap(),
|
|
357
|
+
F = new WeakMap(), Q = new WeakMap(), N = new WeakMap(), E = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), Rt = new WeakMap(), a(ae, "NineTableVScrollBar");
|
|
358
358
|
let Zt = ae;
|
|
359
359
|
customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Zt);
|
|
360
360
|
var At, tt;
|
|
@@ -406,15 +406,15 @@ At = new WeakMap(), tt = new WeakMap(), a(M, "TableCompiler"), c(M, At, /* @__PU
|
|
|
406
406
|
const h = d.sectionRowIndex;
|
|
407
407
|
let f = 0;
|
|
408
408
|
Array.from(d.querySelectorAll("th,td")).forEach((u) => {
|
|
409
|
-
for (let
|
|
410
|
-
if (l[h][
|
|
411
|
-
f =
|
|
409
|
+
for (let y = 0; y < l[h].length; y++)
|
|
410
|
+
if (l[h][y] === null) {
|
|
411
|
+
f = y;
|
|
412
412
|
break;
|
|
413
413
|
}
|
|
414
|
-
const g = u.rowSpan || 1,
|
|
415
|
-
for (let
|
|
416
|
-
for (let
|
|
417
|
-
h +
|
|
414
|
+
const g = u.rowSpan || 1, p = u.colSpan || 1;
|
|
415
|
+
for (let y = 0; y < g; y++)
|
|
416
|
+
for (let S = 0; S < p; S++)
|
|
417
|
+
h + y < r && f + S < n && (l[h + y][f + S] = y === 0 && S === 0 ? "1" : "0");
|
|
418
418
|
});
|
|
419
419
|
}), s.forEach((d) => {
|
|
420
420
|
const h = d.sectionRowIndex;
|
|
@@ -532,8 +532,8 @@ const ce = class ce {
|
|
|
532
532
|
((d = o[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
|
|
533
533
|
((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
|
|
534
534
|
((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
|
|
535
|
-
],
|
|
536
|
-
|
|
535
|
+
], p = Math.max(...g);
|
|
536
|
+
p > 0 && (o[u] && (o[u].style.height = `${p}px`), r[u] && (r[u].style.height = `${p}px`), n[u] && (n[u].style.height = `${p}px`));
|
|
537
537
|
}
|
|
538
538
|
}, "#syncRowHeights"));
|
|
539
539
|
c(this, Ct, /* @__PURE__ */ a(() => {
|
|
@@ -572,8 +572,8 @@ const ce = class ce {
|
|
|
572
572
|
f.style.display = "none";
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
f.style.display = "", t(this, gt).call(this, f,
|
|
575
|
+
const p = t(this, I).data.get(g);
|
|
576
|
+
f.style.display = "", t(this, gt).call(this, f, p, g);
|
|
577
577
|
});
|
|
578
578
|
});
|
|
579
579
|
}, "#adjustBufferRows"));
|
|
@@ -587,19 +587,19 @@ const ce = class ce {
|
|
|
587
587
|
if (!f) return;
|
|
588
588
|
const u = f.querySelector("table");
|
|
589
589
|
if (u) {
|
|
590
|
-
const
|
|
591
|
-
|
|
590
|
+
const y = u.querySelector("thead"), S = u.querySelector("tbody.fixed-tbody");
|
|
591
|
+
y && (y.style.position = "relative", y.style.transform = `translateY(${i}px)`, y.style.zIndex = "5"), S && (S.style.position = "relative", S.style.transform = `translateY(${i}px)`, S.style.zIndex = "6");
|
|
592
592
|
}
|
|
593
593
|
const g = f.querySelector("tbody.bindable-tbody");
|
|
594
594
|
if (!g) return;
|
|
595
|
-
g.style.transform = `translateY(${n}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((
|
|
596
|
-
const O = r + Math.floor(
|
|
595
|
+
g.style.transform = `translateY(${n}px)`, Array.from(g.querySelectorAll("tr:not(.nodata)")).forEach((y, S) => {
|
|
596
|
+
const O = r + Math.floor(S / l);
|
|
597
597
|
if (O >= o) {
|
|
598
|
-
|
|
598
|
+
y.style.display = "none";
|
|
599
599
|
return;
|
|
600
600
|
}
|
|
601
601
|
const P = t(this, I).data.get(O);
|
|
602
|
-
|
|
602
|
+
y.style.display = "", t(this, gt).call(this, y, P, O);
|
|
603
603
|
});
|
|
604
604
|
}), t(this, et) || (b(this, et, !0), setTimeout(() => {
|
|
605
605
|
t(this, Ht).call(this, r), b(this, et, !1);
|
|
@@ -626,7 +626,7 @@ const ce = class ce {
|
|
|
626
626
|
};
|
|
627
627
|
I = new WeakMap(), w = new WeakMap(), W = new WeakMap(), q = new WeakMap(), B = new WeakMap(), j = new WeakMap(), dt = new WeakMap(), et = new WeakMap(), qt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), ut = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), bt = new WeakMap(), Ht = new WeakMap(), it = new WeakMap(), gt = new WeakMap(), a(ce, "RowManager");
|
|
628
628
|
let Jt = ce;
|
|
629
|
-
var Mt, st, K, _t, $t,
|
|
629
|
+
var Mt, st, K, _t, It, $t, Wt, Ot;
|
|
630
630
|
const at = class at extends HTMLElement {
|
|
631
631
|
constructor() {
|
|
632
632
|
super();
|
|
@@ -645,7 +645,7 @@ const at = class at extends HTMLElement {
|
|
|
645
645
|
].forEach(({ selector: s, type: o }) => {
|
|
646
646
|
const r = this.querySelector(s);
|
|
647
647
|
if (!r) return;
|
|
648
|
-
const n = t(this,
|
|
648
|
+
const n = t(this, $t).call(this, t(this, st), o);
|
|
649
649
|
r.innerHTML = "";
|
|
650
650
|
const l = document.createElement("div");
|
|
651
651
|
l.className = "ng-scroll-content", l.style.position = "relative", l.style.width = "100%", l.appendChild(n);
|
|
@@ -653,7 +653,7 @@ const at = class at extends HTMLElement {
|
|
|
653
653
|
d.className = "ng-virtual-spacer", d.style.width = "100%", d.style.pointerEvents = "none", l.appendChild(d), r.appendChild(l);
|
|
654
654
|
});
|
|
655
655
|
}, "#renderSplitContainers"));
|
|
656
|
-
c(this,
|
|
656
|
+
c(this, It, /* @__PURE__ */ a(() => {
|
|
657
657
|
["left", "right"].forEach((e) => {
|
|
658
658
|
const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
|
|
659
659
|
if (!s || !o) return;
|
|
@@ -665,7 +665,7 @@ const at = class at extends HTMLElement {
|
|
|
665
665
|
});
|
|
666
666
|
}, "#updateContainerWidths"));
|
|
667
667
|
v(this, "generate", /* @__PURE__ */ a((e) => {
|
|
668
|
-
e && (b(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, _t).call(this), t(this,
|
|
668
|
+
e && (b(this, st, Gt.compile(e)), t(this, st).style.display = "table", t(this, _t).call(this), t(this, It).call(this), requestAnimationFrame(() => {
|
|
669
669
|
var o;
|
|
670
670
|
const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
|
|
671
671
|
this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
|
|
@@ -676,7 +676,7 @@ const at = class at extends HTMLElement {
|
|
|
676
676
|
(s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
|
|
677
677
|
}, 0));
|
|
678
678
|
}, "generate"));
|
|
679
|
-
c(this,
|
|
679
|
+
c(this, $t, /* @__PURE__ */ a((e, s) => {
|
|
680
680
|
const o = e.cloneNode(!0), r = o.querySelector("tbody");
|
|
681
681
|
if (r) {
|
|
682
682
|
const n = document.createElement("tbody");
|
|
@@ -857,7 +857,7 @@ const at = class at extends HTMLElement {
|
|
|
857
857
|
this.innerHTML = "", H.log("NineTableSheet destroyed.");
|
|
858
858
|
}
|
|
859
859
|
};
|
|
860
|
-
Mt = new WeakMap(), st = new WeakMap(), K = new WeakMap(), _t = new WeakMap(),
|
|
860
|
+
Mt = new WeakMap(), st = new WeakMap(), K = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), $t = new WeakMap(), Wt = new WeakMap(), Ot = new WeakMap(), a(at, "NineTableSheet"), v(at, "SCROLLBAR_SIZE", 16);
|
|
861
861
|
let wt = at;
|
|
862
862
|
customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", wt);
|
|
863
863
|
var zt, yt;
|
|
@@ -875,11 +875,11 @@ const he = class he extends HTMLElement {
|
|
|
875
875
|
c(this, yt, /* @__PURE__ */ a((e, s = !1) => {
|
|
876
876
|
const o = /* @__PURE__ */ a(() => {
|
|
877
877
|
const f = Array.from(this.querySelectorAll("nine-table-sheet"));
|
|
878
|
-
Array.from(this.querySelectorAll("nine-splitter")).forEach((
|
|
879
|
-
const g = f.filter((
|
|
880
|
-
g.length < 2 || g.forEach((
|
|
881
|
-
const
|
|
882
|
-
|
|
878
|
+
Array.from(this.querySelectorAll("nine-splitter")).forEach((p) => p.style.setProperty("display", "none"));
|
|
879
|
+
const g = f.filter((p) => p.classList.contains("active"));
|
|
880
|
+
g.length < 2 || g.forEach((p) => {
|
|
881
|
+
const y = parseInt(p.getAttribute("data-index"), 10), S = this.querySelector(`nine-splitter[data-split-index="${y}"]`), O = f[y + 1];
|
|
882
|
+
S && O && O.classList.contains("active") && S.style.setProperty("display", "flex");
|
|
883
883
|
});
|
|
884
884
|
}, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = n.querySelectorAll("nine-table-sheet");
|
|
885
885
|
if (!l[e]) return;
|
|
@@ -1054,11 +1054,11 @@ const fe = class fe {
|
|
|
1054
1054
|
};
|
|
1055
1055
|
mt = new WeakMap(), nt = new WeakMap(), a(fe, "ngRow");
|
|
1056
1056
|
let ee = fe;
|
|
1057
|
-
var k,
|
|
1057
|
+
var k, R, L, ot, Dt, D, Pt, Z, xt, Yt, Vt, rt;
|
|
1058
1058
|
const C = class C {
|
|
1059
1059
|
constructor(i, e) {
|
|
1060
1060
|
c(this, k);
|
|
1061
|
-
c(this,
|
|
1061
|
+
c(this, R);
|
|
1062
1062
|
c(this, L, []);
|
|
1063
1063
|
c(this, ot, []);
|
|
1064
1064
|
c(this, Dt, 0);
|
|
@@ -1069,7 +1069,7 @@ const C = class C {
|
|
|
1069
1069
|
Array.from(i).forEach((e) => {
|
|
1070
1070
|
var s;
|
|
1071
1071
|
t(this, D).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
|
|
1072
|
-
}), (t(this,
|
|
1072
|
+
}), (t(this, R).rawRecords || []).forEach((e) => {
|
|
1073
1073
|
e.__ng || (e.__ng = t(this, xt).call(this)), e.__ng.height = t(this, D).slice();
|
|
1074
1074
|
});
|
|
1075
1075
|
}, "#initialize"));
|
|
@@ -1108,7 +1108,7 @@ const C = class C {
|
|
|
1108
1108
|
}, "reset"));
|
|
1109
1109
|
v(this, "clear", /* @__PURE__ */ a(() => {
|
|
1110
1110
|
var i;
|
|
1111
|
-
t(this,
|
|
1111
|
+
t(this, R).rawRecords = [], b(this, L, []), b(this, ot, []), (i = t(this, R).viewRecords) != null && i.reset && t(this, R).viewRecords.reset();
|
|
1112
1112
|
}, "clear"));
|
|
1113
1113
|
c(this, Yt, /* @__PURE__ */ a((i) => {
|
|
1114
1114
|
var o;
|
|
@@ -1127,19 +1127,19 @@ const C = class C {
|
|
|
1127
1127
|
v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
|
|
1128
1128
|
i === void 0 && (i = {});
|
|
1129
1129
|
const s = t(this, Yt).call(this, i);
|
|
1130
|
-
t(this,
|
|
1130
|
+
t(this, R).rawRecords = t(this, R).rawRecords.concat(t(this, Vt).call(this, s)), this.resetRecords();
|
|
1131
1131
|
const o = this.count() - 1;
|
|
1132
1132
|
return e || s.forEach((r, n) => {
|
|
1133
|
-
const l = t(this,
|
|
1133
|
+
const l = t(this, R).rawRecords[o - n];
|
|
1134
1134
|
l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
|
|
1135
1135
|
}), t(this, Z).call(this), o;
|
|
1136
1136
|
}, "add"));
|
|
1137
1137
|
v(this, "delete", /* @__PURE__ */ a((i) => {
|
|
1138
1138
|
let e = [];
|
|
1139
|
-
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this,
|
|
1139
|
+
Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, R).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
|
|
1140
1140
|
if (t(this, L)[s]) {
|
|
1141
1141
|
const o = t(this, L)[s].__ng.rowid;
|
|
1142
|
-
t(this, L)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this,
|
|
1142
|
+
t(this, L)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, R).rawRecords = t(this, R).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, R).rawRecords.forEach((r) => {
|
|
1143
1143
|
r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
|
|
1144
1144
|
});
|
|
1145
1145
|
}
|
|
@@ -1156,13 +1156,13 @@ const C = class C {
|
|
|
1156
1156
|
l !== s && n.__ng.rowState !== C.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = C.ROW_STATE.UPDATE), n.v[r] = s;
|
|
1157
1157
|
}, "setValue"));
|
|
1158
1158
|
v(this, "resetRecords", /* @__PURE__ */ a(() => {
|
|
1159
|
-
b(this, ot, t(this,
|
|
1159
|
+
b(this, ot, t(this, R).rawRecords.filter((i) => !i.__ng.deleted)), b(this, L, t(this, R).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, R).rawRecords.forEach((i, e) => {
|
|
1160
1160
|
i.__ng.rowidx = e;
|
|
1161
1161
|
}), t(this, L).forEach((i, e) => {
|
|
1162
1162
|
i.__ng.i = e;
|
|
1163
1163
|
});
|
|
1164
1164
|
}, "resetRecords"));
|
|
1165
|
-
v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, L).length === 0 && t(this,
|
|
1165
|
+
v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, L).length === 0 && t(this, R).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
|
|
1166
1166
|
c(this, rt, /* @__PURE__ */ a((i) => {
|
|
1167
1167
|
var n;
|
|
1168
1168
|
if (!i) return i;
|
|
@@ -1175,10 +1175,10 @@ const C = class C {
|
|
|
1175
1175
|
return e ? r[0] : r;
|
|
1176
1176
|
}, "#conv"));
|
|
1177
1177
|
v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
|
|
1178
|
-
b(this, k, i), b(this,
|
|
1178
|
+
b(this, k, i), b(this, R, e), t(this, Pt).call(this);
|
|
1179
1179
|
}
|
|
1180
1180
|
get source() {
|
|
1181
|
-
return t(this, rt).call(this, t(this,
|
|
1181
|
+
return t(this, rt).call(this, t(this, R).rawRecords);
|
|
1182
1182
|
}
|
|
1183
1183
|
set source(i) {
|
|
1184
1184
|
this.clear(), this.add(i, !1);
|
|
@@ -1193,7 +1193,7 @@ const C = class C {
|
|
|
1193
1193
|
return this.length;
|
|
1194
1194
|
}
|
|
1195
1195
|
};
|
|
1196
|
-
k = new WeakMap(),
|
|
1196
|
+
k = new WeakMap(), R = new WeakMap(), L = new WeakMap(), ot = new WeakMap(), Dt = new WeakMap(), D = new WeakMap(), Pt = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), Yt = new WeakMap(), Vt = new WeakMap(), rt = new WeakMap(), a(C, "ngData"), // π― ν μν μ μ μμλ₯Ό ν΄λμ€ λ΄λΆλ‘ λ΄μ¬ν
|
|
1197
1197
|
v(C, "ROW_STATE", {
|
|
1198
1198
|
EMPTY: "EMPTY",
|
|
1199
1199
|
NORMAL: "NORMAL",
|