@guiexpert/solid-table 1.1.77 → 1.1.79
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/index.cjs +9 -6
- package/index.js +181 -153
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
equals:
|
|
1
|
+
const Ie = (l, e) => l === e, oe = Symbol("solid-proxy"), ke = typeof Proxy == "function", fe = {
|
|
2
|
+
equals: Ie
|
|
3
3
|
};
|
|
4
|
-
let we =
|
|
4
|
+
let we = ve;
|
|
5
5
|
const B = 1, z = 2, xe = {
|
|
6
6
|
owned: null,
|
|
7
7
|
cleanups: null,
|
|
@@ -16,7 +16,7 @@ function Le(l, e) {
|
|
|
16
16
|
cleanups: null,
|
|
17
17
|
context: i ? i.context : null,
|
|
18
18
|
owner: i
|
|
19
|
-
}, a = o ? l : () => l(() => Q(() =>
|
|
19
|
+
}, a = o ? l : () => l(() => Q(() => H(r)));
|
|
20
20
|
M = r, x = null;
|
|
21
21
|
try {
|
|
22
22
|
return _(a, !0);
|
|
@@ -26,17 +26,17 @@ function Le(l, e) {
|
|
|
26
26
|
}
|
|
27
27
|
function ie(l, e, t) {
|
|
28
28
|
const s = ae(l, e, !1, B);
|
|
29
|
-
|
|
29
|
+
$(s);
|
|
30
30
|
}
|
|
31
31
|
function Be(l, e, t) {
|
|
32
32
|
we = Ne;
|
|
33
33
|
const s = ae(l, e, !1, B);
|
|
34
|
-
s.user = !0, O ? O.push(s) :
|
|
34
|
+
s.user = !0, O ? O.push(s) : $(s);
|
|
35
35
|
}
|
|
36
36
|
function Pe(l, e, t) {
|
|
37
37
|
t = t ? Object.assign({}, fe, t) : fe;
|
|
38
38
|
const s = ae(l, e, !0, 0);
|
|
39
|
-
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0,
|
|
39
|
+
return s.observers = null, s.observerSlots = null, s.comparator = t.equals || void 0, $(s), We.bind(s);
|
|
40
40
|
}
|
|
41
41
|
function Q(l) {
|
|
42
42
|
if (x === null) return l();
|
|
@@ -48,12 +48,12 @@ function Q(l) {
|
|
|
48
48
|
x = e;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ve(l) {
|
|
52
52
|
Be(() => Q(l));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function We() {
|
|
55
55
|
if (this.sources && this.state)
|
|
56
|
-
if (this.state === B)
|
|
56
|
+
if (this.state === B) $(this);
|
|
57
57
|
else {
|
|
58
58
|
const l = R;
|
|
59
59
|
R = null, _(() => j(this), !1), R = l;
|
|
@@ -64,39 +64,39 @@ function He() {
|
|
|
64
64
|
}
|
|
65
65
|
return this.value;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function He(l, e, t) {
|
|
68
68
|
let s = l.value;
|
|
69
69
|
return (!l.comparator || !l.comparator(s, e)) && (l.value = e, l.observers && l.observers.length && _(() => {
|
|
70
70
|
for (let o = 0; o < l.observers.length; o += 1) {
|
|
71
71
|
const i = l.observers[o], r = te && te.running;
|
|
72
|
-
r && te.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? R.push(i) : O.push(i), i.observers &&
|
|
72
|
+
r && te.disposed.has(i), (r ? !i.tState : !i.state) && (i.pure ? R.push(i) : O.push(i), i.observers && Ce(i)), r || (i.state = B);
|
|
73
73
|
}
|
|
74
74
|
if (R.length > 1e6)
|
|
75
75
|
throw R = [], new Error();
|
|
76
76
|
}, !1)), e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function $(l) {
|
|
79
79
|
if (!l.fn) return;
|
|
80
|
-
|
|
80
|
+
H(l);
|
|
81
81
|
const e = Z;
|
|
82
|
-
|
|
82
|
+
$e(
|
|
83
83
|
l,
|
|
84
84
|
l.value,
|
|
85
85
|
e
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function $e(l, e, t) {
|
|
89
89
|
let s;
|
|
90
90
|
const o = M, i = x;
|
|
91
91
|
x = M = l;
|
|
92
92
|
try {
|
|
93
93
|
s = l.fn(e);
|
|
94
94
|
} catch (r) {
|
|
95
|
-
return l.pure && (l.state = B, l.owned && l.owned.forEach(
|
|
95
|
+
return l.pure && (l.state = B, l.owned && l.owned.forEach(H), l.owned = null), l.updatedAt = t + 1, Ae(r);
|
|
96
96
|
} finally {
|
|
97
97
|
x = i, M = o;
|
|
98
98
|
}
|
|
99
|
-
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ?
|
|
99
|
+
(!l.updatedAt || l.updatedAt <= t) && (l.updatedAt != null && "observers" in l ? He(l, s) : l.value = s, l.updatedAt = t);
|
|
100
100
|
}
|
|
101
101
|
function ae(l, e, t, s = B, o) {
|
|
102
102
|
const i = {
|
|
@@ -123,7 +123,7 @@ function U(l) {
|
|
|
123
123
|
l.state && e.push(l);
|
|
124
124
|
for (let t = e.length - 1; t >= 0; t--)
|
|
125
125
|
if (l = e[t], l.state === B)
|
|
126
|
-
|
|
126
|
+
$(l);
|
|
127
127
|
else if (l.state === z) {
|
|
128
128
|
const s = R;
|
|
129
129
|
R = null, _(() => j(l, e[0]), !1), R = s;
|
|
@@ -141,11 +141,11 @@ function _(l, e) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
function _e(l) {
|
|
144
|
-
if (R && (
|
|
144
|
+
if (R && (ve(R), R = null), l) return;
|
|
145
145
|
const e = O;
|
|
146
146
|
O = null, e.length && _(() => we(e), !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function ve(l) {
|
|
149
149
|
for (let e = 0; e < l.length; e++) U(l[e]);
|
|
150
150
|
}
|
|
151
151
|
function Ne(l) {
|
|
@@ -166,13 +166,13 @@ function j(l, e) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Ce(l) {
|
|
170
170
|
for (let e = 0; e < l.observers.length; e += 1) {
|
|
171
171
|
const t = l.observers[e];
|
|
172
|
-
t.state || (t.state = z, t.pure ? R.push(t) : O.push(t), t.observers &&
|
|
172
|
+
t.state || (t.state = z, t.pure ? R.push(t) : O.push(t), t.observers && Ce(t));
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function H(l) {
|
|
176
176
|
let e;
|
|
177
177
|
if (l.sources)
|
|
178
178
|
for (; l.sources.length; ) {
|
|
@@ -183,11 +183,11 @@ function $(l) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
if (l.tOwned) {
|
|
186
|
-
for (e = l.tOwned.length - 1; e >= 0; e--)
|
|
186
|
+
for (e = l.tOwned.length - 1; e >= 0; e--) H(l.tOwned[e]);
|
|
187
187
|
delete l.tOwned;
|
|
188
188
|
}
|
|
189
189
|
if (l.owned) {
|
|
190
|
-
for (e = l.owned.length - 1; e >= 0; e--)
|
|
190
|
+
for (e = l.owned.length - 1; e >= 0; e--) H(l.owned[e]);
|
|
191
191
|
l.owned = null;
|
|
192
192
|
}
|
|
193
193
|
if (l.cleanups) {
|
|
@@ -246,7 +246,7 @@ function Ee(...l) {
|
|
|
246
246
|
const a = l[r];
|
|
247
247
|
e = e || !!a && oe in a, l[r] = typeof a == "function" ? (e = !0, Pe(a)) : a;
|
|
248
248
|
}
|
|
249
|
-
if (
|
|
249
|
+
if (ke && e)
|
|
250
250
|
return new Proxy(
|
|
251
251
|
{
|
|
252
252
|
get(r) {
|
|
@@ -324,8 +324,8 @@ function je(l, e, t) {
|
|
|
324
324
|
const c = d.get(e[r]);
|
|
325
325
|
if (c != null)
|
|
326
326
|
if (a < c && c < i) {
|
|
327
|
-
let h = r, p = 1,
|
|
328
|
-
for (; ++h < o && h < i && !((
|
|
327
|
+
let h = r, p = 1, m;
|
|
328
|
+
for (; ++h < o && h < i && !((m = d.get(e[h])) == null || m !== c + p); )
|
|
329
329
|
p++;
|
|
330
330
|
if (p > c - a) {
|
|
331
331
|
const g = e[r];
|
|
@@ -368,11 +368,11 @@ function X(l, e, t, s, o) {
|
|
|
368
368
|
return t;
|
|
369
369
|
if (r) {
|
|
370
370
|
let a = t[0];
|
|
371
|
-
a && a.nodeType === 3 ? a.data !== e && (a.data = e) : a = document.createTextNode(e), t =
|
|
371
|
+
a && a.nodeType === 3 ? a.data !== e && (a.data = e) : a = document.createTextNode(e), t = V(l, t, s, a);
|
|
372
372
|
} else
|
|
373
373
|
t !== "" && typeof t == "string" ? t = l.firstChild.data = e : t = l.textContent = e;
|
|
374
374
|
} else if (e == null || i === "boolean")
|
|
375
|
-
t =
|
|
375
|
+
t = V(l, t, s);
|
|
376
376
|
else {
|
|
377
377
|
if (i === "function")
|
|
378
378
|
return ie(() => {
|
|
@@ -385,13 +385,13 @@ function X(l, e, t, s, o) {
|
|
|
385
385
|
if (re(a, e, t, o))
|
|
386
386
|
return ie(() => t = X(l, a, t, s, !0)), () => t;
|
|
387
387
|
if (a.length === 0) {
|
|
388
|
-
if (t =
|
|
389
|
-
} else n ? t.length === 0 ? ue(l, a, s) : je(l, t, a) : (t &&
|
|
388
|
+
if (t = V(l, t, s), r) return t;
|
|
389
|
+
} else n ? t.length === 0 ? ue(l, a, s) : je(l, t, a) : (t && V(l), ue(l, a));
|
|
390
390
|
t = a;
|
|
391
391
|
} else if (e.nodeType) {
|
|
392
392
|
if (Array.isArray(t)) {
|
|
393
|
-
if (r) return t =
|
|
394
|
-
|
|
393
|
+
if (r) return t = V(l, t, s, e);
|
|
394
|
+
V(l, t, null, e);
|
|
395
395
|
} else t == null || t === "" || !l.firstChild ? l.appendChild(e) : l.replaceChild(e, l.firstChild);
|
|
396
396
|
t = e;
|
|
397
397
|
}
|
|
@@ -426,7 +426,7 @@ function re(l, e, t, s) {
|
|
|
426
426
|
function ue(l, e, t = null) {
|
|
427
427
|
for (let s = 0, o = e.length; s < o; s++) l.insertBefore(e[s], t);
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function V(l, e, t, s) {
|
|
430
430
|
if (t === void 0) return l.textContent = "";
|
|
431
431
|
const o = s || document.createTextNode("");
|
|
432
432
|
if (e.length) {
|
|
@@ -521,25 +521,25 @@ class ne {
|
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
class
|
|
524
|
+
class k {
|
|
525
525
|
constructor(e = ">", t = "", s = []) {
|
|
526
526
|
this.content = e, this.style = t, this.classes = s;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
529
|
class Re {
|
|
530
|
-
constructor(e = new
|
|
530
|
+
constructor(e = new k(
|
|
531
531
|
">",
|
|
532
532
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
533
533
|
["gt-table-tree-arrow-expanded"]
|
|
534
|
-
), t = new
|
|
534
|
+
), t = new k(
|
|
535
535
|
">",
|
|
536
536
|
"",
|
|
537
537
|
["ge-table-tree-arrow-collapsed"]
|
|
538
|
-
), s = new
|
|
538
|
+
), s = new k(
|
|
539
539
|
">",
|
|
540
540
|
"color:transparent;",
|
|
541
541
|
["gt-table-tree-arrow-hidden"]
|
|
542
|
-
), o = new
|
|
542
|
+
), o = new k(
|
|
543
543
|
"↕",
|
|
544
544
|
"",
|
|
545
545
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -548,7 +548,7 @@ class Re {
|
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
class Me {
|
|
551
|
-
constructor(e = new
|
|
551
|
+
constructor(e = new k("↑", "", ["ge-header-sorted-asc"]), t = new k("↓", "", ["ge-header-sorted-desc"]), s = new k("↑", "color:transparent;", [])) {
|
|
552
552
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
@@ -638,12 +638,12 @@ class Ze {
|
|
|
638
638
|
return this.domService.appendChild(e.child, n), n;
|
|
639
639
|
}
|
|
640
640
|
addColumnDiv(e) {
|
|
641
|
-
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: n = "", treeArrow: d, tableOptions: c, checkedType: h = void 0, sortState: p } = e,
|
|
641
|
+
const { parent: t, geo: s, rowIndex: o = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: n = "", treeArrow: d, tableOptions: c, checkedType: h = void 0, sortState: p } = e, m = c == null ? void 0 : c.treeOptions, g = c == null ? void 0 : c.showCheckboxWihoutExtraColumn, b = this.domService.createElement("div");
|
|
642
642
|
this.domService.addClass(b, "ge-table-col-div"), g && this.domService.addClass(b, "ge-with-checkbox"), this.domService.addClass(b, `ge-table-col-div-${s.index}`), this.domService.setAttribute(b, "data-col-index", `${s.index}`), this.domService.setAttribute(b, "data-row-index", `${o}`), this.domService.setAttribute(b, "data-area", `${r}`);
|
|
643
643
|
const f = ((s == null ? void 0 : s.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
644
|
-
if (r === "body" && a === "center" && this.domService.addClass(b, `ge-table-column-${f}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${s.left}px`), this.domService.setStyle(b, "top", `${s.top}px`), this.domService.setStyle(b, "width", `${s.width}px`), this.domService.setStyle(b, "height", `${s.height}px`), d && d !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, d,
|
|
645
|
-
const
|
|
646
|
-
this.addLabelDiv(b, n,
|
|
644
|
+
if (r === "body" && a === "center" && this.domService.addClass(b, `ge-table-column-${f}`), this.domService.setStyle(b, "display", "clip"), this.domService.setStyle(b, "position", "absolute"), this.domService.setStyle(b, "left", `${s.left}px`), this.domService.setStyle(b, "top", `${s.top}px`), this.domService.setStyle(b, "width", `${s.width}px`), this.domService.setStyle(b, "height", `${s.height}px`), d && d !== "none" && (this.domService.addClass(b, "ge-table-col-tree"), this.addArrowDiv(b, d, m, o, i, r)), g && i === 0 && h && this.addCheckboxToDiv(b, h, r, o), n) {
|
|
645
|
+
const u = d !== "none" && i === 0;
|
|
646
|
+
this.addLabelDiv(b, n, u, o, i, r);
|
|
647
647
|
}
|
|
648
648
|
return p && this.addSortedIcon(b, p, c == null ? void 0 : c.sortedOptions, i), this.domService.appendChild(t, b), b;
|
|
649
649
|
}
|
|
@@ -1791,6 +1791,21 @@ class ot {
|
|
|
1791
1791
|
getFirstVisibleRowIndex() {
|
|
1792
1792
|
return this.tableScope.getFirstVisibleRowIndex();
|
|
1793
1793
|
}
|
|
1794
|
+
getFirstFullVisibleRowIndex() {
|
|
1795
|
+
return this.tableScope.getFirstFullVisibleRowIndex();
|
|
1796
|
+
}
|
|
1797
|
+
getLastVisibleRowIndex() {
|
|
1798
|
+
return this.tableScope.getLastVisibleRowIndex();
|
|
1799
|
+
}
|
|
1800
|
+
getLastFullVisibleRowIndex() {
|
|
1801
|
+
return this.tableScope.getLastFullVisibleRowIndex();
|
|
1802
|
+
}
|
|
1803
|
+
setLoggingActive(e) {
|
|
1804
|
+
this.tableScope.loggingActive = e;
|
|
1805
|
+
}
|
|
1806
|
+
isLoggingActive() {
|
|
1807
|
+
return this.tableScope.loggingActive;
|
|
1808
|
+
}
|
|
1794
1809
|
}
|
|
1795
1810
|
class de {
|
|
1796
1811
|
constructor(e) {
|
|
@@ -1941,14 +1956,14 @@ class at extends de {
|
|
|
1941
1956
|
}
|
|
1942
1957
|
}
|
|
1943
1958
|
}
|
|
1944
|
-
class
|
|
1959
|
+
class I {
|
|
1945
1960
|
constructor(e = 0, t = 0, s = 0, o = 0, i) {
|
|
1946
1961
|
this.left = e, this.width = t, this.height = s, this.top = o, this.index = i;
|
|
1947
1962
|
}
|
|
1948
1963
|
}
|
|
1949
1964
|
class nt {
|
|
1950
1965
|
constructor(e, t, s, o) {
|
|
1951
|
-
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new
|
|
1966
|
+
this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.areaBodyWestGeo = new I(), this.areaBodyCenterGeo = new I(), this.areaBodyEastGeo = new I();
|
|
1952
1967
|
const i = this.hostElement;
|
|
1953
1968
|
i.innerText = "", this.dom.setAttribute(i, "tabindex", "0"), this.dom.setStyle(
|
|
1954
1969
|
this.dom.addClass("ge-table", i),
|
|
@@ -2193,11 +2208,11 @@ class dt {
|
|
|
2193
2208
|
class ht extends nt {
|
|
2194
2209
|
constructor(e, t, s, o) {
|
|
2195
2210
|
var r, a;
|
|
2196
|
-
super(e, t, s, o), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
2211
|
+
super(e, t, s, o), this.firstVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1, this.displayedRowCount = 0, this.pixelLimitForFullVisible = 5, this.loggingActive = !1, this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
2197
2212
|
header: [],
|
|
2198
2213
|
body: [],
|
|
2199
2214
|
footer: []
|
|
2200
|
-
}, this.tree = !1, this.colAndRowspanModels = new dt(), this.
|
|
2215
|
+
}, this.tree = !1, this.colAndRowspanModels = new dt(), this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (a = this.tableOptions) != null && a.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), le(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
2201
2216
|
(n) => {
|
|
2202
2217
|
var d;
|
|
2203
2218
|
this.colAndRowspanModels[n] = new ct(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
@@ -2286,19 +2301,19 @@ class ht extends nt {
|
|
|
2286
2301
|
for (const t of this.removables)
|
|
2287
2302
|
t.remove();
|
|
2288
2303
|
this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
2289
|
-
new
|
|
2304
|
+
new I(0, this.hostElement.clientWidth, 1, 0),
|
|
2290
2305
|
this.hostElement,
|
|
2291
2306
|
"ge-table-border"
|
|
2292
2307
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
2293
|
-
new
|
|
2308
|
+
new I(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
2294
2309
|
this.hostElement,
|
|
2295
2310
|
"ge-table-border"
|
|
2296
2311
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
2297
|
-
new
|
|
2312
|
+
new I(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
2298
2313
|
this.hostElement,
|
|
2299
2314
|
"ge-table-body-west-vertical-border"
|
|
2300
2315
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
2301
|
-
new
|
|
2316
|
+
new I(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
2302
2317
|
this.hostElement,
|
|
2303
2318
|
"ge-table-body-west-vertical-border"
|
|
2304
2319
|
));
|
|
@@ -2350,12 +2365,27 @@ class ht extends nt {
|
|
|
2350
2365
|
}
|
|
2351
2366
|
const p = r.getCustomClassesAt(t, s);
|
|
2352
2367
|
p.length && this.dom.addClasses(p, n);
|
|
2353
|
-
const
|
|
2354
|
-
if (
|
|
2355
|
-
for (const g in
|
|
2356
|
-
this.dom.setStyle(n, g,
|
|
2368
|
+
const m = r.getCustomStyleAt(t, s);
|
|
2369
|
+
if (m)
|
|
2370
|
+
for (const g in m)
|
|
2371
|
+
this.dom.setStyle(n, g, m[g]);
|
|
2357
2372
|
}
|
|
2358
2373
|
}
|
|
2374
|
+
getFirstVisibleRowIndex() {
|
|
2375
|
+
return this.firstVisibleRowIndex;
|
|
2376
|
+
}
|
|
2377
|
+
getLastVisibleRowIndex() {
|
|
2378
|
+
return this.lastVisibleRowIndex;
|
|
2379
|
+
}
|
|
2380
|
+
getFirstFullVisibleRowIndex() {
|
|
2381
|
+
return this.firstFullVisibleRowIndex;
|
|
2382
|
+
}
|
|
2383
|
+
getLastFullVisibleRowIndex() {
|
|
2384
|
+
return this.lastFullVisibleRowIndex;
|
|
2385
|
+
}
|
|
2386
|
+
getDisplayedRowCount() {
|
|
2387
|
+
return this.displayedRowCount;
|
|
2388
|
+
}
|
|
2359
2389
|
/**
|
|
2360
2390
|
* Stores the widths of all columns in the table.
|
|
2361
2391
|
*
|
|
@@ -2456,16 +2486,17 @@ class ht extends nt {
|
|
|
2456
2486
|
s.child.innerText = "", o.child.innerText = "", i.child.innerText = "";
|
|
2457
2487
|
const a = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), c = this.tableModel.getAreaModel(e), h = c.getRowCount();
|
|
2458
2488
|
for (; this.cleanupFunctions[e].length; ) {
|
|
2459
|
-
const
|
|
2460
|
-
|
|
2489
|
+
const u = this.cleanupFunctions[e].shift();
|
|
2490
|
+
u && u();
|
|
2461
2491
|
}
|
|
2462
2492
|
let p = t;
|
|
2463
|
-
const
|
|
2464
|
-
|
|
2465
|
-
|
|
2493
|
+
const m = this.tableModel.getColumnCount(), g = this.tableModel.getFixedRightColumnCount(), b = this.tableModel.getFixedLeftColumnCount();
|
|
2494
|
+
e === "body" && (this.firstVisibleRowIndex = -1, this.firstFullVisibleRowIndex = -1, this.lastVisibleRowIndex = -1, this.lastFullVisibleRowIndex = -1);
|
|
2495
|
+
for (let u = 0; u < h; u++) {
|
|
2496
|
+
const w = p, v = u === h - 1, A = this.tableModel.getRowHeight(e, u);
|
|
2466
2497
|
if (w + A > 0) {
|
|
2467
|
-
this.firstVisibleRowIndex =
|
|
2468
|
-
let y = { left: a, width: n, height: A, top: w, index:
|
|
2498
|
+
e === "body" && this.firstVisibleRowIndex === -1 && (this.firstVisibleRowIndex = u, this.firstFullVisibleRowIndex = w < -this.pixelLimitForFullVisible ? this.firstVisibleRowIndex + 1 : this.firstVisibleRowIndex);
|
|
2499
|
+
let y = { left: a, width: n, height: A, top: w, index: u }, S = this.dom.addRowDiv(o, y, u, e, "center");
|
|
2469
2500
|
const F = b;
|
|
2470
2501
|
if (this.adjustColumnsToRowParent({
|
|
2471
2502
|
areaIdent: e,
|
|
@@ -2473,37 +2504,37 @@ class ht extends nt {
|
|
|
2473
2504
|
areaModel: c,
|
|
2474
2505
|
geo: y,
|
|
2475
2506
|
parent: S,
|
|
2476
|
-
rowIndex:
|
|
2507
|
+
rowIndex: u,
|
|
2477
2508
|
columnIndexStart: F,
|
|
2478
|
-
columnIndexEnd:
|
|
2509
|
+
columnIndexEnd: m - g - 1,
|
|
2479
2510
|
verticalFixed: !1,
|
|
2480
|
-
lastRowOfModel:
|
|
2481
|
-
}), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: A, top: w, index:
|
|
2511
|
+
lastRowOfModel: v
|
|
2512
|
+
}), d.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: A, top: w, index: u }, S = this.dom.addRowDiv(s, y, u, e, "west"), this.adjustColumnsToRowParent({
|
|
2482
2513
|
areaIdent: e,
|
|
2483
2514
|
sideIdent: "west",
|
|
2484
2515
|
areaModel: c,
|
|
2485
2516
|
geo: y,
|
|
2486
2517
|
parent: S,
|
|
2487
|
-
rowIndex:
|
|
2518
|
+
rowIndex: u,
|
|
2488
2519
|
columnIndexStart: 0,
|
|
2489
2520
|
columnIndexEnd: F - 1,
|
|
2490
2521
|
verticalFixed: !0,
|
|
2491
|
-
lastRowOfModel:
|
|
2492
|
-
})), d.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: A, top: w, index:
|
|
2522
|
+
lastRowOfModel: v
|
|
2523
|
+
})), d.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: A, top: w, index: u }, S = this.dom.addRowDiv(i, y, u, e, "east"), this.adjustColumnsToRowParent({
|
|
2493
2524
|
areaIdent: e,
|
|
2494
2525
|
sideIdent: "east",
|
|
2495
2526
|
areaModel: c,
|
|
2496
2527
|
geo: y,
|
|
2497
2528
|
parent: S,
|
|
2498
|
-
rowIndex:
|
|
2499
|
-
columnIndexStart:
|
|
2500
|
-
columnIndexEnd:
|
|
2529
|
+
rowIndex: u,
|
|
2530
|
+
columnIndexStart: m - g,
|
|
2531
|
+
columnIndexEnd: m - 1,
|
|
2501
2532
|
verticalFixed: !0,
|
|
2502
|
-
lastRowOfModel:
|
|
2503
|
-
})), e === "header" && this.tree &&
|
|
2533
|
+
lastRowOfModel: v
|
|
2534
|
+
})), e === "header" && this.tree && u === h - 1) {
|
|
2504
2535
|
const T = this.dom.applyStyle(
|
|
2505
2536
|
this.dom.setAttribute(
|
|
2506
|
-
this.dom.addDiv(S, new
|
|
2537
|
+
this.dom.addDiv(S, new I(16, 20, 20, 8)),
|
|
2507
2538
|
"data-ge-action",
|
|
2508
2539
|
"toggleExpandCollapseAll"
|
|
2509
2540
|
),
|
|
@@ -2516,24 +2547,27 @@ class ht extends nt {
|
|
|
2516
2547
|
}
|
|
2517
2548
|
}
|
|
2518
2549
|
if (p = p + A, p > r) {
|
|
2519
|
-
e === "body" && (this.displayedRowCount = this.
|
|
2550
|
+
e === "body" && (this.lastVisibleRowIndex = u, this.lastFullVisibleRowIndex = r - p < -this.pixelLimitForFullVisible ? u - 1 : u, this.displayedRowCount = this.lastFullVisibleRowIndex - this.firstFullVisibleRowIndex + 1);
|
|
2520
2551
|
break;
|
|
2521
2552
|
}
|
|
2522
2553
|
}
|
|
2523
|
-
if (this.
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2554
|
+
if (this.loggingActive && e === "body" && console.log("render scope: this.firstVisibleRowIndex <- " + this.firstVisibleRowIndex + `
|
|
2555
|
+
render scope: this.firstFullVisibleRowIndex <- ` + this.firstFullVisibleRowIndex + `
|
|
2556
|
+
render scope: this.lastVisibleRowIndex <- ` + this.lastVisibleRowIndex + `
|
|
2557
|
+
render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex), this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
2558
|
+
const u = ((f = this.colAndRowspanModels[e]) == null ? void 0 : f.getRanges()) ?? [];
|
|
2559
|
+
if (u.length)
|
|
2560
|
+
for (const w of u) {
|
|
2561
|
+
let v = 0, A = o.child, y = "center";
|
|
2528
2562
|
if (w.c1 < b)
|
|
2529
2563
|
A = s.child, y = "west";
|
|
2530
|
-
else if (g > 0 && w.c1 >=
|
|
2564
|
+
else if (g > 0 && w.c1 >= m - g)
|
|
2531
2565
|
A = i.child, y = "east";
|
|
2532
2566
|
else {
|
|
2533
2567
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
2534
|
-
|
|
2568
|
+
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
2535
2569
|
}
|
|
2536
|
-
this.drawBigCell(w,
|
|
2570
|
+
this.drawBigCell(w, v, t, c, A, y);
|
|
2537
2571
|
}
|
|
2538
2572
|
}
|
|
2539
2573
|
}
|
|
@@ -2548,10 +2582,10 @@ class ht extends nt {
|
|
|
2548
2582
|
* @protected
|
|
2549
2583
|
*/
|
|
2550
2584
|
drawBigCell(e, t, s, o, i, r) {
|
|
2551
|
-
const a = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f,
|
|
2585
|
+
const a = s + this.getRowHeights(0, e.r1 - 1, o).reduce((f, u) => f + u, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
2552
2586
|
let c = 0;
|
|
2553
2587
|
d > 0 && e.c1 >= n - d && (c = n - d);
|
|
2554
|
-
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f,
|
|
2588
|
+
const h = t + this.getColumnWidths(c, e.c1 - 1).reduce((f, u) => f + u, 0), p = this.getRowHeights(e.r1, e.r2, o).reduce((f, u) => f + u, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((f, u) => f + u, 0);
|
|
2555
2589
|
let g = !1;
|
|
2556
2590
|
const b = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2557
2591
|
b && (g = b.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
@@ -2562,7 +2596,7 @@ class ht extends nt {
|
|
|
2562
2596
|
columnIndex: e.c1,
|
|
2563
2597
|
left: h,
|
|
2564
2598
|
top: a,
|
|
2565
|
-
width:
|
|
2599
|
+
width: m,
|
|
2566
2600
|
height: p,
|
|
2567
2601
|
parent: i,
|
|
2568
2602
|
cellSelected: g,
|
|
@@ -2576,7 +2610,7 @@ class ht extends nt {
|
|
|
2576
2610
|
columnIndex: e.c1,
|
|
2577
2611
|
left: h,
|
|
2578
2612
|
top: a,
|
|
2579
|
-
width:
|
|
2613
|
+
width: m,
|
|
2580
2614
|
height: p,
|
|
2581
2615
|
parent: i,
|
|
2582
2616
|
cellSelected: g,
|
|
@@ -2587,7 +2621,7 @@ class ht extends nt {
|
|
|
2587
2621
|
columnIndex: e.c1,
|
|
2588
2622
|
cellLeft: h,
|
|
2589
2623
|
cellTop: a,
|
|
2590
|
-
cellWidth:
|
|
2624
|
+
cellWidth: m,
|
|
2591
2625
|
cellHeight: p,
|
|
2592
2626
|
parent: i
|
|
2593
2627
|
});
|
|
@@ -2638,33 +2672,33 @@ class ht extends nt {
|
|
|
2638
2672
|
const f = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
2639
2673
|
h = this.scrollFactorX * f;
|
|
2640
2674
|
}
|
|
2641
|
-
const p = 0,
|
|
2675
|
+
const p = 0, m = !!(e === "body" && t);
|
|
2642
2676
|
let g = h;
|
|
2643
2677
|
for (let f = a; f <= n; f++) {
|
|
2644
|
-
const
|
|
2645
|
-
if (w > 0 &&
|
|
2646
|
-
let
|
|
2678
|
+
const u = g, w = this.tableModel.getColumnWidth(f);
|
|
2679
|
+
if (w > 0 && u + w > 0) {
|
|
2680
|
+
let v = o.height;
|
|
2647
2681
|
const A = s.getRowspanAt(r, f), y = s.getColspanAt(r, f);
|
|
2648
|
-
A > 1 && (
|
|
2682
|
+
A > 1 && (v = this.getRowHeights(r, r + A - 1, s).reduce((T, D) => T + D, 0));
|
|
2649
2683
|
let S = w;
|
|
2650
2684
|
y > 1 && (S = this.getColumnWidths(f, f + y - 1).reduce((T, D) => T + D, 0));
|
|
2651
2685
|
let F = !1;
|
|
2652
2686
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (b = this.colAndRowspanModels[e]) != null && b.isInRange(r, f) && (F = !0), this.draggingTargetColumnIndex === f && e !== "header") {
|
|
2653
|
-
this.renderDragTargetDiv(i,
|
|
2654
|
-
const T = { left:
|
|
2687
|
+
this.renderDragTargetDiv(i, u, p, S, v);
|
|
2688
|
+
const T = { left: u, top: p, width: S, height: v };
|
|
2655
2689
|
this.dom.addColumnBorderDivs(this.tableOptions, i, T, e, t);
|
|
2656
2690
|
} else {
|
|
2657
|
-
const T = this.renderSelectedBackgroundDiv(F,
|
|
2691
|
+
const T = this.renderSelectedBackgroundDiv(F, m, t, s, r, f, i, u, p, S, v);
|
|
2658
2692
|
"gammaCells" in s && s.getValueAt(r, f) && (F = !1), F || this.renderCell({
|
|
2659
2693
|
areaModel: s,
|
|
2660
2694
|
areaIdent: e,
|
|
2661
2695
|
sideIdent: t,
|
|
2662
2696
|
rowIndex: r,
|
|
2663
2697
|
columnIndex: f,
|
|
2664
|
-
left:
|
|
2698
|
+
left: u,
|
|
2665
2699
|
top: p,
|
|
2666
2700
|
width: S,
|
|
2667
|
-
height:
|
|
2701
|
+
height: v,
|
|
2668
2702
|
parent: i,
|
|
2669
2703
|
cellSelected: T,
|
|
2670
2704
|
lastRowOfModel: c,
|
|
@@ -2672,10 +2706,10 @@ class ht extends nt {
|
|
|
2672
2706
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
2673
2707
|
rowIndex: r,
|
|
2674
2708
|
columnIndex: f,
|
|
2675
|
-
cellLeft:
|
|
2709
|
+
cellLeft: u,
|
|
2676
2710
|
cellTop: p,
|
|
2677
2711
|
cellWidth: S,
|
|
2678
|
-
cellHeight:
|
|
2712
|
+
cellHeight: v,
|
|
2679
2713
|
parent: i
|
|
2680
2714
|
});
|
|
2681
2715
|
}
|
|
@@ -2683,7 +2717,7 @@ class ht extends nt {
|
|
|
2683
2717
|
if (g = g + w, g > this.areaBodyCenterGeo.width)
|
|
2684
2718
|
break;
|
|
2685
2719
|
}
|
|
2686
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
2720
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new I(g - 1, 1, o.height, 0), i);
|
|
2687
2721
|
}
|
|
2688
2722
|
/**
|
|
2689
2723
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -2711,18 +2745,18 @@ class ht extends nt {
|
|
|
2711
2745
|
lastRowOfModel: h
|
|
2712
2746
|
}) {
|
|
2713
2747
|
var ge;
|
|
2714
|
-
const
|
|
2748
|
+
const m = this.editorRenderer && this.editorRendererRow === o && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(o, i), g = { left: r, width: a, height: n, top: d, index: i }, b = e.getRowByIndex(o);
|
|
2715
2749
|
let f = "none";
|
|
2716
2750
|
if (i === this.getTreeArrowColumnIndex() && K(b)) {
|
|
2717
|
-
const
|
|
2718
|
-
(ge =
|
|
2751
|
+
const C = b;
|
|
2752
|
+
(ge = C.children) != null && ge.length ? C.expanded ? f = "expanded" : f = "collapsed" : f = "hidden";
|
|
2719
2753
|
}
|
|
2720
2754
|
let w;
|
|
2721
2755
|
if (t === "header") {
|
|
2722
|
-
const
|
|
2723
|
-
(!(
|
|
2756
|
+
const C = this.tableModel.getColumnDef(i);
|
|
2757
|
+
(!(C != null && C.sortIconVisible) || C != null && C.sortIconVisible()) && (w = C == null ? void 0 : C.sortState);
|
|
2724
2758
|
}
|
|
2725
|
-
const
|
|
2759
|
+
const v = e.getValueAt(o, i), A = m ? "" : `${v}`, y = e.isRowChecked(o), S = this.dom.addColumnDiv(
|
|
2726
2760
|
{
|
|
2727
2761
|
parent: c,
|
|
2728
2762
|
geo: g,
|
|
@@ -2741,17 +2775,17 @@ class ht extends nt {
|
|
|
2741
2775
|
const T = this.tableModel.getColumnDef(i);
|
|
2742
2776
|
T && T.classes[t] && this.dom.addClasses(T.classes[t], S);
|
|
2743
2777
|
let D;
|
|
2744
|
-
|
|
2778
|
+
m && (D = m.render(S, o, i, t, e, v, this.dom.domService));
|
|
2745
2779
|
const N = e.getCustomClassesAt(o, i);
|
|
2746
2780
|
if (N.length && this.dom.addClasses(N, S), this.dom.addColumnBorderDivs(this.tableOptions, c, g, t, s), h && this.dom.addHorizontalBorder({ left: r, width: a, height: n, top: d + n }, c), this.getFocusModel && t === "body") {
|
|
2747
|
-
const
|
|
2748
|
-
|
|
2781
|
+
const C = this.getFocusModel();
|
|
2782
|
+
C != null && C.hasFocus(o, i) && this.dom.addFocusBorderDivs(c, g, {});
|
|
2749
2783
|
}
|
|
2750
2784
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
2751
2785
|
const ee = e.getCustomStyleAt(o, i);
|
|
2752
2786
|
if (ee)
|
|
2753
|
-
for (const
|
|
2754
|
-
this.dom.setStyle(S,
|
|
2787
|
+
for (const C in ee)
|
|
2788
|
+
this.dom.setStyle(S, C, ee[C]);
|
|
2755
2789
|
return [S, D];
|
|
2756
2790
|
}
|
|
2757
2791
|
/**
|
|
@@ -2918,7 +2952,7 @@ class ht extends nt {
|
|
|
2918
2952
|
if (r) {
|
|
2919
2953
|
const a = e.index ?? 0, n = this.draggingColumn;
|
|
2920
2954
|
for (let d = 0; d < r; d++) {
|
|
2921
|
-
const c = s, h = i.getRowHeight(d), p = { left: 0, width: e.width, height: h, top: c, index: d },
|
|
2955
|
+
const c = s, h = i.getRowHeight(d), p = { left: 0, width: e.width, height: h, top: c, index: d }, m = i.getValueAt(d, a), g = i.getCellRenderer(d, a), b = g ? "" : `${m}`, f = {
|
|
2922
2956
|
parent: n,
|
|
2923
2957
|
geo: p,
|
|
2924
2958
|
rowIndex: d,
|
|
@@ -2926,17 +2960,17 @@ class ht extends nt {
|
|
|
2926
2960
|
areaIdent: t,
|
|
2927
2961
|
sideIdent: o,
|
|
2928
2962
|
text: b
|
|
2929
|
-
},
|
|
2963
|
+
}, u = this.dom.addColumnDiv(f);
|
|
2930
2964
|
let w;
|
|
2931
|
-
g && (w = g.render(
|
|
2932
|
-
const
|
|
2933
|
-
|
|
2965
|
+
g && (w = g.render(u, d, a, t, i, m, this.dom.domService), w && this.cleanupFunctions[t].push(w));
|
|
2966
|
+
const v = i.getCustomClassesAt(d, a);
|
|
2967
|
+
v.length && this.dom.addClasses(v, u);
|
|
2934
2968
|
const A = this.tableModel.getColumnDef(a);
|
|
2935
|
-
A && A.classes[t] && this.dom.addClasses(A.classes[t],
|
|
2969
|
+
A && A.classes[t] && this.dom.addClasses(A.classes[t], u), this.dom.addColumnBorderDivs(this.tableOptions, n, p, t, o);
|
|
2936
2970
|
const y = i.getCustomStyleAt(d, a);
|
|
2937
2971
|
if (y)
|
|
2938
2972
|
for (const S in y)
|
|
2939
|
-
this.dom.setStyle(
|
|
2973
|
+
this.dom.setStyle(u, S, y[S]);
|
|
2940
2974
|
s = s + h;
|
|
2941
2975
|
}
|
|
2942
2976
|
}
|
|
@@ -2989,9 +3023,9 @@ class ht extends nt {
|
|
|
2989
3023
|
renderSelectedBackgroundDiv(e, t, s, o, i, r, a, n, d, c, h) {
|
|
2990
3024
|
let p = !1;
|
|
2991
3025
|
if (!e && t && o.isSelectable(i, r) && this.getSelectionModel) {
|
|
2992
|
-
const
|
|
2993
|
-
if (
|
|
2994
|
-
const g =
|
|
3026
|
+
const m = this.getSelectionModel();
|
|
3027
|
+
if (m) {
|
|
3028
|
+
const g = m.getSelectionCount(i, r);
|
|
2995
3029
|
p = g > 0;
|
|
2996
3030
|
for (let b = 0; b < g; b++) {
|
|
2997
3031
|
const f = this.dom.applyStylePosistionAbsolute(
|
|
@@ -3037,7 +3071,7 @@ class ht extends nt {
|
|
|
3037
3071
|
cellSelected: h,
|
|
3038
3072
|
lastRowOfModel: p
|
|
3039
3073
|
}) {
|
|
3040
|
-
const [
|
|
3074
|
+
const [m, g] = this.addAndRenderCellDiv({
|
|
3041
3075
|
areaModel: e,
|
|
3042
3076
|
areaIdent: t,
|
|
3043
3077
|
sideIdent: s,
|
|
@@ -3050,7 +3084,7 @@ class ht extends nt {
|
|
|
3050
3084
|
parent: c,
|
|
3051
3085
|
lastRowOfModel: p
|
|
3052
3086
|
});
|
|
3053
|
-
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`,
|
|
3087
|
+
h && this.dom.addClass(`ge-table-${t}-${s}-selected-range`, m), g && this.cleanupFunctions[t].push(g);
|
|
3054
3088
|
}
|
|
3055
3089
|
/**
|
|
3056
3090
|
* Render the header cell resize handle.
|
|
@@ -3120,8 +3154,8 @@ class ut {
|
|
|
3120
3154
|
var i, r, a, n, d, c, h;
|
|
3121
3155
|
let s = !1, o = !1;
|
|
3122
3156
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
3123
|
-
const p = this.getSelectionModel(),
|
|
3124
|
-
p &&
|
|
3157
|
+
const p = this.getSelectionModel(), m = this.getFocusModel();
|
|
3158
|
+
p && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(m), s = !0), (i = e.originalEvent) != null && i.shiftKey || p.hasSelection() && (p.clear(), s = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (p.addSelection(this.createRangeByEvents(e, this.previousEvt)), o = !0, s = !0) : (a = e.originalEvent) != null && a.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (d = e.originalEvent) != null && d.metaKey) ? (p.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (c = e.originalEvent) != null && c.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (p.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), o = !0, s = !0) : (p.firstClick(e.rowIndex, e.columnIndex), s = !0), this.tableScope.onSelectionChanged(p));
|
|
3125
3159
|
}
|
|
3126
3160
|
return o ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), s;
|
|
3127
3161
|
}
|
|
@@ -3455,7 +3489,7 @@ class xt {
|
|
|
3455
3489
|
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
|
|
3456
3490
|
}
|
|
3457
3491
|
}
|
|
3458
|
-
class
|
|
3492
|
+
class vt {
|
|
3459
3493
|
constructor(e = "none") {
|
|
3460
3494
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
3461
3495
|
}
|
|
@@ -3493,11 +3527,11 @@ class Ct {
|
|
|
3493
3527
|
}
|
|
3494
3528
|
}
|
|
3495
3529
|
class De {
|
|
3496
|
-
constructor(e = new
|
|
3530
|
+
constructor(e = new k(
|
|
3497
3531
|
"❯",
|
|
3498
3532
|
"",
|
|
3499
3533
|
["gt-table-icon-expanded"]
|
|
3500
|
-
), t = new
|
|
3534
|
+
), t = new k(
|
|
3501
3535
|
"❯",
|
|
3502
3536
|
"transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
|
|
3503
3537
|
["ge-table-icon-collapsed"]
|
|
@@ -3506,17 +3540,17 @@ class De {
|
|
|
3506
3540
|
}
|
|
3507
3541
|
// `⊖ `, `⊕ `;
|
|
3508
3542
|
}
|
|
3509
|
-
const
|
|
3543
|
+
const Ct = new xt(), At = new vt("cell");
|
|
3510
3544
|
class Fe {
|
|
3511
3545
|
constructor() {
|
|
3512
3546
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
3513
3547
|
header: 34,
|
|
3514
3548
|
body: 34,
|
|
3515
3549
|
footer: 34
|
|
3516
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Re(), this.headerGroupOptions = new De(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new wt(), this.getSelectionModel = () =>
|
|
3550
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new Re(), this.headerGroupOptions = new De(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new Me(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = (e, t) => new wt(), this.getSelectionModel = () => Ct, this.getFocusModel = () => At;
|
|
3517
3551
|
}
|
|
3518
3552
|
}
|
|
3519
|
-
const
|
|
3553
|
+
const W = class W {
|
|
3520
3554
|
/**
|
|
3521
3555
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
3522
3556
|
*
|
|
@@ -3539,9 +3573,9 @@ const H = class H {
|
|
|
3539
3573
|
const h = t.isSelected(n, c) ? e.getBodyModel().getTextValueAt(n, c) : "";
|
|
3540
3574
|
d.push(h);
|
|
3541
3575
|
}
|
|
3542
|
-
a.push(d.join(
|
|
3576
|
+
a.push(d.join(W.columnSeparatorChar));
|
|
3543
3577
|
}
|
|
3544
|
-
return o(a.join(
|
|
3578
|
+
return o(a.join(W.rowSeparatorChar));
|
|
3545
3579
|
}
|
|
3546
3580
|
}
|
|
3547
3581
|
if (s) {
|
|
@@ -3598,9 +3632,9 @@ const H = class H {
|
|
|
3598
3632
|
return t;
|
|
3599
3633
|
}
|
|
3600
3634
|
};
|
|
3601
|
-
|
|
3635
|
+
W.columnSeparatorChar = " ", W.rowSeparatorChar = `
|
|
3602
3636
|
`;
|
|
3603
|
-
let Y =
|
|
3637
|
+
let Y = W;
|
|
3604
3638
|
class Et {
|
|
3605
3639
|
constructor(e, t = 500) {
|
|
3606
3640
|
this.tableScope = e, this.debounceDelay = t, new ResizeObserver(qe(this.handleResize.bind(this), t)).observe(this.tableScope.hostElement);
|
|
@@ -3691,8 +3725,8 @@ class Rt {
|
|
|
3691
3725
|
let s = 0;
|
|
3692
3726
|
const o = [];
|
|
3693
3727
|
e.forEach((h, p) => {
|
|
3694
|
-
const
|
|
3695
|
-
b.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, g.length, !0), f.setUint32(22, g.length, !0), f.setUint16(26,
|
|
3728
|
+
const m = new TextEncoder().encode(p), g = new TextEncoder().encode(h), b = new Uint8Array(30 + m.length), f = new DataView(b.buffer);
|
|
3729
|
+
b.set([80, 75, 3, 4], 0), f.setUint16(4, 20, !0), f.setUint16(6, 0, !0), f.setUint16(8, 0, !0), f.setUint16(10, 0, !0), f.setUint16(12, 0, !0), f.setUint32(14, 0, !0), f.setUint32(18, g.length, !0), f.setUint32(22, g.length, !0), f.setUint16(26, m.length, !0), f.setUint16(28, 0, !0), b.set(m, 30), t.push(b, g), o.push({
|
|
3696
3730
|
path: p,
|
|
3697
3731
|
offset: s,
|
|
3698
3732
|
contentSize: g.length
|
|
@@ -3700,8 +3734,8 @@ class Rt {
|
|
|
3700
3734
|
});
|
|
3701
3735
|
const i = s;
|
|
3702
3736
|
o.forEach((h) => {
|
|
3703
|
-
const p = new TextEncoder().encode(h.path),
|
|
3704
|
-
|
|
3737
|
+
const p = new TextEncoder().encode(h.path), m = new Uint8Array(46 + p.length), g = new DataView(m.buffer);
|
|
3738
|
+
m.set([80, 75, 1, 2], 0), g.setUint16(4, 20, !0), g.setUint16(6, 20, !0), g.setUint16(8, 0, !0), g.setUint16(10, 0, !0), g.setUint16(12, 0, !0), g.setUint16(14, 0, !0), g.setUint32(16, 0, !0), g.setUint32(20, h.contentSize, !0), g.setUint32(24, h.contentSize, !0), g.setUint16(28, p.length, !0), g.setUint16(30, 0, !0), g.setUint16(32, 0, !0), g.setUint16(34, 0, !0), g.setUint16(36, 0, !0), g.setUint32(38, 0, !0), g.setUint32(42, h.offset, !0), m.set(p, 46), t.push(m), s += m.length;
|
|
3705
3739
|
});
|
|
3706
3740
|
const r = new Uint8Array(22), a = new DataView(r.buffer);
|
|
3707
3741
|
r.set([80, 75, 5, 6], 0), a.setUint16(4, 0, !0), a.setUint16(6, 0, !0), a.setUint16(8, o.length, !0), a.setUint16(10, o.length, !0), a.setUint32(12, s - i, !0), a.setUint32(16, i, !0), a.setUint16(20, 0, !0), t.push(r);
|
|
@@ -4144,9 +4178,6 @@ class pe extends ht {
|
|
|
4144
4178
|
sort(e) {
|
|
4145
4179
|
this.tableModel.sort(e);
|
|
4146
4180
|
}
|
|
4147
|
-
getDisplayedRowCount() {
|
|
4148
|
-
return this.displayedRowCount;
|
|
4149
|
-
}
|
|
4150
4181
|
/**
|
|
4151
4182
|
* Ensures that a specific row is visible in the viewport by scrolling if necessary.
|
|
4152
4183
|
* This method checks if the target row is within the currently visible range and
|
|
@@ -4199,11 +4230,8 @@ class pe extends ht {
|
|
|
4199
4230
|
* @see {@link getDisplayedRowCount} - Related method for getting visible row count
|
|
4200
4231
|
*/
|
|
4201
4232
|
ensureRowIsVisible(e) {
|
|
4202
|
-
const t = this.
|
|
4203
|
-
return e < t ? (this.scrollToIndex(0, e
|
|
4204
|
-
}
|
|
4205
|
-
getFirstVisibleRowIndex() {
|
|
4206
|
-
return this.firstVisibleRowIndex;
|
|
4233
|
+
const t = this.getFirstFullVisibleRowIndex(), s = this.getLastFullVisibleRowIndex(), o = this.getDisplayedRowCount();
|
|
4234
|
+
return e < t ? (this.scrollToIndex(0, e), !0) : e > s ? (this.scrollToIndex(0, e - o + 1), !0) : !1;
|
|
4207
4235
|
}
|
|
4208
4236
|
}
|
|
4209
4237
|
const J = class J {
|
|
@@ -4491,7 +4519,7 @@ const Ft = (l) => {
|
|
|
4491
4519
|
tableModel: null,
|
|
4492
4520
|
tableOptions: new Fe()
|
|
4493
4521
|
}, l);
|
|
4494
|
-
return
|
|
4522
|
+
return Ve(() => {
|
|
4495
4523
|
const s = {
|
|
4496
4524
|
onSelectionChanged(r) {
|
|
4497
4525
|
const a = new CustomEvent("selectionChanged", {
|