@guiexpert/table 1.1.9 → 1.1.11
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 -9
- package/index.js +299 -220
- package/lib/table/ele-scope.d.ts +1 -0
- package/lib/table/render-scope.d.ts +40 -24
- package/lib/table/service/convenience-dom.service.d.ts +1 -2
- package/lib/table/table-scope.d.ts +6 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
class
|
|
1
|
+
class P {
|
|
2
2
|
// The constructor is private to prevent direct construction calls
|
|
3
3
|
// with the `new` operator
|
|
4
4
|
constructor() {
|
|
5
5
|
this.alreadySet = !1;
|
|
6
6
|
}
|
|
7
7
|
static getInstance() {
|
|
8
|
-
return
|
|
8
|
+
return P.instance || (P.instance = new P()), P.instance;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Method to set the license key for the application.
|
|
@@ -29,7 +29,7 @@ function L(c) {
|
|
|
29
29
|
function z(c) {
|
|
30
30
|
return c && c.type === "AreaModelTree";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Ce(c) {
|
|
33
33
|
return c && c.type === "CheckboxColumnDef";
|
|
34
34
|
}
|
|
35
35
|
class K {
|
|
@@ -78,12 +78,12 @@ class ge {
|
|
|
78
78
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
class
|
|
81
|
+
class pe {
|
|
82
82
|
constructor(e = new O("↑", "", ["ge-header-sorted-asc"]), t = new O("↓", "", ["ge-header-sorted-desc"]), o = new O("↑", "color:transparent;", [])) {
|
|
83
83
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
class
|
|
86
|
+
class ye {
|
|
87
87
|
constructor(e) {
|
|
88
88
|
this.domService = e;
|
|
89
89
|
}
|
|
@@ -169,14 +169,14 @@ class Ce {
|
|
|
169
169
|
return this.domService.appendChild(e.child, l), l;
|
|
170
170
|
}
|
|
171
171
|
addColumnDiv(e) {
|
|
172
|
-
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: l = "", treeArrow: d, tableOptions: a, checkedType: h = void 0, sortState: u } = e,
|
|
173
|
-
this.domService.addClass(
|
|
172
|
+
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: n, text: l = "", treeArrow: d, tableOptions: a, checkedType: h = void 0, sortState: u } = e, m = a == null ? void 0 : a.treeOptions, b = a == null ? void 0 : a.showCheckboxWihoutExtraColumn, f = this.domService.createElement("div");
|
|
173
|
+
this.domService.addClass(f, "ge-table-col-div"), this.domService.addClass(f, `ge-table-col-div-${o.index}`), this.domService.setAttribute(f, "data-col-index", `${o.index}`), this.domService.setAttribute(f, "data-row-index", `${s}`), this.domService.setAttribute(f, "data-area", `${r}`);
|
|
174
174
|
const g = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
175
|
-
if (r === "body" && n === "center" && this.domService.addClass(
|
|
176
|
-
const
|
|
177
|
-
this.addLabelDiv(
|
|
175
|
+
if (r === "body" && n === "center" && this.domService.addClass(f, `ge-table-column-${g}`), this.domService.setStyle(f, "display", "clip"), this.domService.setStyle(f, "position", "absolute"), this.domService.setStyle(f, "left", `${o.left}px`), this.domService.setStyle(f, "top", `${o.top}px`), this.domService.setStyle(f, "width", `${o.width}px`), this.domService.setStyle(f, "height", `${o.height}px`), d && d !== "none" && (this.domService.addClass(f, "ge-table-col-tree"), this.addArrowDiv(f, d, m, s, i, r)), b && i === 0 && h && this.addCheckboxToDiv(f, h, r, s), l) {
|
|
176
|
+
const p = d !== "none" && i === 0;
|
|
177
|
+
this.addLabelDiv(f, l, p, s, i, r);
|
|
178
178
|
}
|
|
179
|
-
return u && this.addSortedIcon(
|
|
179
|
+
return u && this.addSortedIcon(f, u, a == null ? void 0 : a.sortedOptions, i), this.domService.appendChild(t, f), f;
|
|
180
180
|
}
|
|
181
181
|
addCheckboxToDiv(e, t, o, s) {
|
|
182
182
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -203,7 +203,7 @@ class Ce {
|
|
|
203
203
|
}
|
|
204
204
|
return this.domService.appendChild(e, n), n;
|
|
205
205
|
}
|
|
206
|
-
addSortedIcon(e, t = "", o = new
|
|
206
|
+
addSortedIcon(e, t = "", o = new pe(), s = -1) {
|
|
207
207
|
const i = this.domService.createElement("div");
|
|
208
208
|
this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${s}`), this.domService.setAttribute(i, "data-area", "header");
|
|
209
209
|
let r;
|
|
@@ -381,19 +381,19 @@ class Re {
|
|
|
381
381
|
return this.tableScope.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
382
382
|
}
|
|
383
383
|
onMouseDown(e) {
|
|
384
|
-
this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0;
|
|
384
|
+
this.dragging || (this.mouseEvent = e, this.startMouseEvent = this.tableScope.createGeMouseEvent(this.mouseEvent), this.tableScope.onMouseDown(this.startMouseEvent), this.mouseDown = !0);
|
|
385
385
|
}
|
|
386
386
|
onMouseMove(e) {
|
|
387
|
-
this.mouseEvent = e, this.mouseDown ? (this.dragging = !0, requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
|
|
387
|
+
this.mouseEvent = e, this.mouseDown ? (this.dragging || (this.dragging = !0, this.tableScope.setDragging(!0)), requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))) : requestAnimationFrame(this.mouseMoveOnFrame.bind(this));
|
|
388
388
|
}
|
|
389
389
|
onMouseUp(e) {
|
|
390
|
-
this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1;
|
|
390
|
+
this.mouseEvent = e, this.dragging && requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)), this.mouseDown = !1, this.dragging = !1, this.tableScope.setDragging(!1);
|
|
391
391
|
}
|
|
392
392
|
mouseDraggingOnFrame() {
|
|
393
393
|
var e;
|
|
394
394
|
if (this.mouseEvent) {
|
|
395
395
|
const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
|
|
396
|
-
(e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t);
|
|
396
|
+
(e = this.startMouseEvent) != null && e.originalEvent && (t.draggingX = this.mouseEvent.clientX - this.startMouseEvent.originalEvent.clientX, t.draggingY = this.mouseEvent.clientY - this.startMouseEvent.originalEvent.clientY), this.tableScope.mouseDraggingOnFrame(t, this.startMouseEvent);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
mouseDraggingEndOnFrame() {
|
|
@@ -742,6 +742,8 @@ class Te {
|
|
|
742
742
|
o.createDivWithClass("ge-table-hover-row", i)
|
|
743
743
|
), this.hoverColumn = o.applyStylePosistionAbsolute(
|
|
744
744
|
o.createDivWithClass("ge-table-hover-column", i)
|
|
745
|
+
), this.draggingColumn = o.applyStylePosistionAbsolute(
|
|
746
|
+
o.createDivWithClass("ge-table-dragging-column", i)
|
|
745
747
|
), this.areaHeaderWest = o.appendRelativeChildDiv(
|
|
746
748
|
o.applyStylePosistionAbsolute(
|
|
747
749
|
o.createAreaDivWithClass("ge-table-header ge-table-header-west", i, "header", "west")
|
|
@@ -881,7 +883,7 @@ class Te {
|
|
|
881
883
|
this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
|
|
882
884
|
}
|
|
883
885
|
}
|
|
884
|
-
class
|
|
886
|
+
class A {
|
|
885
887
|
/**
|
|
886
888
|
* Represents a constructor for a class.
|
|
887
889
|
* @constructor
|
|
@@ -895,7 +897,7 @@ class R {
|
|
|
895
897
|
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
896
898
|
}
|
|
897
899
|
static create(e) {
|
|
898
|
-
return e.gammaRange === void 0 && (e.gammaRange = !1), new
|
|
900
|
+
return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
|
|
899
901
|
e.rowIndex1,
|
|
900
902
|
e.columnIndex1,
|
|
901
903
|
e.rowIndex2,
|
|
@@ -904,19 +906,19 @@ class R {
|
|
|
904
906
|
);
|
|
905
907
|
}
|
|
906
908
|
static singleCell(e, t) {
|
|
907
|
-
return new
|
|
909
|
+
return new A(e, t, e, t);
|
|
908
910
|
}
|
|
909
911
|
static singleRow(e) {
|
|
910
|
-
return new
|
|
912
|
+
return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
|
|
911
913
|
}
|
|
912
914
|
static singleColumn(e) {
|
|
913
|
-
return new
|
|
915
|
+
return new A(0, e, Number.MAX_SAFE_INTEGER, e);
|
|
914
916
|
}
|
|
915
917
|
isInRange(e, t) {
|
|
916
918
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
917
919
|
}
|
|
918
920
|
}
|
|
919
|
-
class
|
|
921
|
+
class De {
|
|
920
922
|
constructor(e, t) {
|
|
921
923
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
922
924
|
}
|
|
@@ -932,7 +934,7 @@ class _e {
|
|
|
932
934
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
933
935
|
const n = "gammaCells" in this.areaModel;
|
|
934
936
|
this.colAndRowspanRanges.push(
|
|
935
|
-
new
|
|
937
|
+
new A(o, s, o + r - 1, s + i - 1, n)
|
|
936
938
|
);
|
|
937
939
|
}
|
|
938
940
|
}
|
|
@@ -954,17 +956,17 @@ class T {
|
|
|
954
956
|
this.header = e, this.body = t, this.footer = o;
|
|
955
957
|
}
|
|
956
958
|
}
|
|
957
|
-
class
|
|
959
|
+
class _e extends Te {
|
|
958
960
|
constructor(e, t, o, s) {
|
|
959
961
|
var r, n;
|
|
960
|
-
super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
962
|
+
super(e, t, o, s), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
961
963
|
header: [],
|
|
962
964
|
body: [],
|
|
963
965
|
footer: []
|
|
964
|
-
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.
|
|
966
|
+
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), z(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
965
967
|
(l) => {
|
|
966
968
|
var d;
|
|
967
|
-
this.colAndRowspanModels[l] = new
|
|
969
|
+
this.colAndRowspanModels[l] = new De(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
|
|
968
970
|
}
|
|
969
971
|
);
|
|
970
972
|
}
|
|
@@ -1034,6 +1036,29 @@ class De extends Te {
|
|
|
1034
1036
|
}
|
|
1035
1037
|
), t && this.repaint();
|
|
1036
1038
|
}
|
|
1039
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1040
|
+
const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1041
|
+
if (l) {
|
|
1042
|
+
let d;
|
|
1043
|
+
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1044
|
+
if (l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1045
|
+
d = h.render(l, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1046
|
+
else {
|
|
1047
|
+
const b = `${s}`;
|
|
1048
|
+
this.dom.addLabelDiv(l, b, !1, t, o, e);
|
|
1049
|
+
}
|
|
1050
|
+
const u = r.getCustomClassesAt(t, o);
|
|
1051
|
+
u.length && this.dom.addClasses(u, l);
|
|
1052
|
+
const m = r.getCustomStyleAt(t, o);
|
|
1053
|
+
if (m)
|
|
1054
|
+
for (const b in m)
|
|
1055
|
+
this.dom.setStyle(l, b, m[b]);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
storeColumnWidths() {
|
|
1059
|
+
const e = this.tableModel.getColumnDefs();
|
|
1060
|
+
e != null && e.length && (this.storedColumnWidths = e.map((t, o) => this.tableModel.getColumnWidth(o)));
|
|
1061
|
+
}
|
|
1037
1062
|
getAreaAndSideIdentByAttr(e) {
|
|
1038
1063
|
if (e) {
|
|
1039
1064
|
const t = this.getStringByAttr(e, "data-area"), o = this.getStringByAttr(e, "data-side");
|
|
@@ -1094,52 +1119,52 @@ class De extends Te {
|
|
|
1094
1119
|
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
|
|
1095
1120
|
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
1096
1121
|
const n = 0, l = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), a = this.tableModel.getAreaModel(e), h = a.getRowCount();
|
|
1097
|
-
for (
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1122
|
+
for (; this.cleanupFunctions[e].length; ) {
|
|
1123
|
+
const p = this.cleanupFunctions[e].shift();
|
|
1124
|
+
p && p();
|
|
1100
1125
|
}
|
|
1101
1126
|
let u = t;
|
|
1102
|
-
const
|
|
1103
|
-
for (let
|
|
1104
|
-
const C = u,
|
|
1105
|
-
if (C +
|
|
1106
|
-
this.firstVisibleRowIndex =
|
|
1107
|
-
let
|
|
1108
|
-
const k =
|
|
1127
|
+
const m = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), f = this.tableModel.getFixedLeftColumnCount();
|
|
1128
|
+
for (let p = 0; p < h; p++) {
|
|
1129
|
+
const C = u, y = p === h - 1, R = this.tableModel.getRowHeight(e, p);
|
|
1130
|
+
if (C + R > 0) {
|
|
1131
|
+
this.firstVisibleRowIndex = p;
|
|
1132
|
+
let x = { left: n, width: l, height: R, top: C, index: p }, S = this.dom.addRowDiv(s, x, p, e, "center");
|
|
1133
|
+
const k = f;
|
|
1109
1134
|
if (this.adjustColumnsToRowParent({
|
|
1110
1135
|
areaIdent: e,
|
|
1111
1136
|
sideIdent: "center",
|
|
1112
1137
|
areaModel: a,
|
|
1113
|
-
geo:
|
|
1138
|
+
geo: x,
|
|
1114
1139
|
parent: S,
|
|
1115
|
-
rowIndex:
|
|
1140
|
+
rowIndex: p,
|
|
1116
1141
|
columnIndexStart: k,
|
|
1117
|
-
columnIndexEnd:
|
|
1142
|
+
columnIndexEnd: m - b - 1,
|
|
1118
1143
|
verticalFixed: !1,
|
|
1119
|
-
lastRowOfModel:
|
|
1120
|
-
}), d.left > 0 && (
|
|
1144
|
+
lastRowOfModel: y
|
|
1145
|
+
}), d.left > 0 && (x = { left: n, width: this.areaBodyWestGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(o, x, p, e, "west"), this.adjustColumnsToRowParent({
|
|
1121
1146
|
areaIdent: e,
|
|
1122
1147
|
sideIdent: "west",
|
|
1123
1148
|
areaModel: a,
|
|
1124
|
-
geo:
|
|
1149
|
+
geo: x,
|
|
1125
1150
|
parent: S,
|
|
1126
|
-
rowIndex:
|
|
1151
|
+
rowIndex: p,
|
|
1127
1152
|
columnIndexStart: 0,
|
|
1128
1153
|
columnIndexEnd: k - 1,
|
|
1129
1154
|
verticalFixed: !0,
|
|
1130
|
-
lastRowOfModel:
|
|
1131
|
-
})), d.right > 0 && (
|
|
1155
|
+
lastRowOfModel: y
|
|
1156
|
+
})), d.right > 0 && (x = { left: n, width: this.areaBodyEastGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(i, x, p, e, "east"), this.adjustColumnsToRowParent({
|
|
1132
1157
|
areaIdent: e,
|
|
1133
1158
|
sideIdent: "east",
|
|
1134
1159
|
areaModel: a,
|
|
1135
|
-
geo:
|
|
1160
|
+
geo: x,
|
|
1136
1161
|
parent: S,
|
|
1137
|
-
rowIndex:
|
|
1138
|
-
columnIndexStart:
|
|
1139
|
-
columnIndexEnd:
|
|
1162
|
+
rowIndex: p,
|
|
1163
|
+
columnIndexStart: m - b,
|
|
1164
|
+
columnIndexEnd: m - 1,
|
|
1140
1165
|
verticalFixed: !0,
|
|
1141
|
-
lastRowOfModel:
|
|
1142
|
-
})), e === "header" && this.tree &&
|
|
1166
|
+
lastRowOfModel: y
|
|
1167
|
+
})), e === "header" && this.tree && p === h - 1) {
|
|
1143
1168
|
const M = this.dom.applyStyle(
|
|
1144
1169
|
this.dom.setAttribute(
|
|
1145
1170
|
this.dom.addDiv(S, new $(16, 20, 20, 8)),
|
|
@@ -1154,23 +1179,23 @@ class De extends Te {
|
|
|
1154
1179
|
}
|
|
1155
1180
|
}
|
|
1156
1181
|
}
|
|
1157
|
-
if (u = u +
|
|
1182
|
+
if (u = u + R, u > r)
|
|
1158
1183
|
break;
|
|
1159
1184
|
}
|
|
1160
1185
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1161
|
-
const
|
|
1162
|
-
if (
|
|
1163
|
-
for (const C of
|
|
1164
|
-
let
|
|
1165
|
-
if (C.c1 <
|
|
1166
|
-
|
|
1167
|
-
else if (
|
|
1168
|
-
|
|
1186
|
+
const p = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
1187
|
+
if (p.length)
|
|
1188
|
+
for (const C of p) {
|
|
1189
|
+
let y = 0, R = s.child, x = "center";
|
|
1190
|
+
if (C.c1 < f)
|
|
1191
|
+
R = o.child, x = "west";
|
|
1192
|
+
else if (b > 0 && C.c1 >= m - b)
|
|
1193
|
+
R = i.child, x = "east";
|
|
1169
1194
|
else {
|
|
1170
1195
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1171
|
-
|
|
1196
|
+
y = this.scrollFactorX * S - this.areaBodyWestGeo.width, x = "center";
|
|
1172
1197
|
}
|
|
1173
|
-
this.drawBigCell(C,
|
|
1198
|
+
this.drawBigCell(C, y, t, a, R, x);
|
|
1174
1199
|
}
|
|
1175
1200
|
}
|
|
1176
1201
|
}
|
|
@@ -1185,13 +1210,13 @@ class De extends Te {
|
|
|
1185
1210
|
* @protected
|
|
1186
1211
|
*/
|
|
1187
1212
|
drawBigCell(e, t, o, s, i, r) {
|
|
1188
|
-
const n = o + this.getRowHeights(0, e.r1 - 1, s).reduce((g,
|
|
1213
|
+
const n = o + this.getRowHeights(0, e.r1 - 1, s).reduce((g, p) => g + p, 0), l = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
1189
1214
|
let a = 0;
|
|
1190
1215
|
d > 0 && e.c1 >= l - d && (a = l - d);
|
|
1191
|
-
const h = t + this.getColumnWidths(a, e.c1 - 1).reduce((g,
|
|
1192
|
-
let
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1216
|
+
const h = t + this.getColumnWidths(a, e.c1 - 1).reduce((g, p) => g + p, 0), u = this.getRowHeights(e.r1, e.r2, s).reduce((g, p) => g + p, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((g, p) => g + p, 0);
|
|
1217
|
+
let b = !1;
|
|
1218
|
+
const f = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1219
|
+
f && (b = f.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1195
1220
|
areaModel: s,
|
|
1196
1221
|
areaIdent: s.areaIdent,
|
|
1197
1222
|
sideIdent: r,
|
|
@@ -1199,10 +1224,10 @@ class De extends Te {
|
|
|
1199
1224
|
columnIndex: e.c1,
|
|
1200
1225
|
left: h,
|
|
1201
1226
|
top: n,
|
|
1202
|
-
width:
|
|
1227
|
+
width: m,
|
|
1203
1228
|
height: u,
|
|
1204
1229
|
parent: i,
|
|
1205
|
-
cellSelected:
|
|
1230
|
+
cellSelected: b,
|
|
1206
1231
|
lastRowOfModel: !0,
|
|
1207
1232
|
gammaRange: e.gammaRange
|
|
1208
1233
|
}) : this.renderCell({
|
|
@@ -1213,10 +1238,10 @@ class De extends Te {
|
|
|
1213
1238
|
columnIndex: e.c1,
|
|
1214
1239
|
left: h,
|
|
1215
1240
|
top: n,
|
|
1216
|
-
width:
|
|
1241
|
+
width: m,
|
|
1217
1242
|
height: u,
|
|
1218
1243
|
parent: i,
|
|
1219
|
-
cellSelected:
|
|
1244
|
+
cellSelected: b,
|
|
1220
1245
|
lastRowOfModel: !0,
|
|
1221
1246
|
gammaRange: e.gammaRange
|
|
1222
1247
|
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
@@ -1224,7 +1249,7 @@ class De extends Te {
|
|
|
1224
1249
|
columnIndex: e.c1,
|
|
1225
1250
|
cellLeft: h,
|
|
1226
1251
|
cellTop: n,
|
|
1227
|
-
cellWidth:
|
|
1252
|
+
cellWidth: m,
|
|
1228
1253
|
cellHeight: u,
|
|
1229
1254
|
parent: i
|
|
1230
1255
|
});
|
|
@@ -1252,40 +1277,40 @@ class De extends Te {
|
|
|
1252
1277
|
verticalFixed: d = !1,
|
|
1253
1278
|
lastRowOfModel: a = !1
|
|
1254
1279
|
}) {
|
|
1255
|
-
var
|
|
1280
|
+
var f;
|
|
1256
1281
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1257
1282
|
let h = 0;
|
|
1258
1283
|
if (!d) {
|
|
1259
1284
|
const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1260
1285
|
h = this.scrollFactorX * g;
|
|
1261
1286
|
}
|
|
1262
|
-
const u = 0,
|
|
1263
|
-
let
|
|
1287
|
+
const u = 0, m = !!(e === "body" && t);
|
|
1288
|
+
let b = h;
|
|
1264
1289
|
for (let g = n; g <= l; g++) {
|
|
1265
|
-
const
|
|
1266
|
-
if (C > 0 &&
|
|
1267
|
-
let
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1290
|
+
const p = b, C = this.tableModel.getColumnWidth(g);
|
|
1291
|
+
if (C > 0 && p + C > 0) {
|
|
1292
|
+
let y = s.height;
|
|
1293
|
+
const R = o.getRowspanAt(r, g), x = o.getColspanAt(r, g);
|
|
1294
|
+
R > 1 && (y = this.getRowHeights(r, r + R - 1, o).reduce((M, E) => M + E, 0));
|
|
1270
1295
|
let S = C;
|
|
1271
|
-
|
|
1296
|
+
x > 1 && (S = this.getColumnWidths(g, g + x - 1).reduce((M, E) => M + E, 0));
|
|
1272
1297
|
let k = !1;
|
|
1273
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1274
|
-
this.renderDragTargetDiv(i,
|
|
1275
|
-
const M = { left:
|
|
1298
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (f = this.colAndRowspanModels[e]) != null && f.isInRange(r, g) && (k = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1299
|
+
this.renderDragTargetDiv(i, p, u, S, y);
|
|
1300
|
+
const M = { left: p, top: u, width: S, height: y };
|
|
1276
1301
|
this.dom.addColumnBorderDivs(this.tableOptions, i, M, e, t);
|
|
1277
1302
|
} else {
|
|
1278
|
-
const M = this.renderSelectedBackgroundDiv(k,
|
|
1303
|
+
const M = this.renderSelectedBackgroundDiv(k, m, t, o, r, g, i, p, u, S, y);
|
|
1279
1304
|
"gammaCells" in o && o.getValueAt(r, g) && (k = !1), k || this.renderCell({
|
|
1280
1305
|
areaModel: o,
|
|
1281
1306
|
areaIdent: e,
|
|
1282
1307
|
sideIdent: t,
|
|
1283
1308
|
rowIndex: r,
|
|
1284
1309
|
columnIndex: g,
|
|
1285
|
-
left:
|
|
1310
|
+
left: p,
|
|
1286
1311
|
top: u,
|
|
1287
1312
|
width: S,
|
|
1288
|
-
height:
|
|
1313
|
+
height: y,
|
|
1289
1314
|
parent: i,
|
|
1290
1315
|
cellSelected: M,
|
|
1291
1316
|
lastRowOfModel: a,
|
|
@@ -1293,18 +1318,18 @@ class De extends Te {
|
|
|
1293
1318
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1294
1319
|
rowIndex: r,
|
|
1295
1320
|
columnIndex: g,
|
|
1296
|
-
cellLeft:
|
|
1321
|
+
cellLeft: p,
|
|
1297
1322
|
cellTop: u,
|
|
1298
1323
|
cellWidth: S,
|
|
1299
|
-
cellHeight:
|
|
1324
|
+
cellHeight: y,
|
|
1300
1325
|
parent: i
|
|
1301
1326
|
});
|
|
1302
1327
|
}
|
|
1303
1328
|
}
|
|
1304
|
-
if (
|
|
1329
|
+
if (b = b + C, b > this.areaBodyCenterGeo.width)
|
|
1305
1330
|
break;
|
|
1306
1331
|
}
|
|
1307
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(
|
|
1332
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
|
|
1308
1333
|
}
|
|
1309
1334
|
getTreeArrowColumnIndex() {
|
|
1310
1335
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1323,29 +1348,29 @@ class De extends Te {
|
|
|
1323
1348
|
lastRowOfModel: h
|
|
1324
1349
|
}) {
|
|
1325
1350
|
var te;
|
|
1326
|
-
const
|
|
1351
|
+
const m = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), b = { left: r, width: n, height: l, top: d, index: i }, f = e.getRowByIndex(s);
|
|
1327
1352
|
let g = "none";
|
|
1328
|
-
if (i === this.getTreeArrowColumnIndex() && L(
|
|
1329
|
-
const
|
|
1330
|
-
(te =
|
|
1353
|
+
if (i === this.getTreeArrowColumnIndex() && L(f)) {
|
|
1354
|
+
const v = f;
|
|
1355
|
+
(te = v.children) != null && te.length ? v.expanded ? g = "expanded" : g = "collapsed" : g = "hidden";
|
|
1331
1356
|
}
|
|
1332
1357
|
let C;
|
|
1333
1358
|
if (t === "header") {
|
|
1334
|
-
const
|
|
1335
|
-
(!(
|
|
1359
|
+
const v = this.tableModel.getColumnDef(i);
|
|
1360
|
+
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (C = v == null ? void 0 : v.sortState);
|
|
1336
1361
|
}
|
|
1337
|
-
const
|
|
1362
|
+
const y = e.getValueAt(s, i), R = m ? "" : `${y}`, x = e.isRowChecked(s), S = this.dom.addColumnDiv(
|
|
1338
1363
|
{
|
|
1339
1364
|
parent: a,
|
|
1340
|
-
geo:
|
|
1365
|
+
geo: b,
|
|
1341
1366
|
rowIndex: s,
|
|
1342
1367
|
columnIndex: i,
|
|
1343
1368
|
areaIdent: t,
|
|
1344
1369
|
sideIdent: o,
|
|
1345
|
-
text:
|
|
1370
|
+
text: R,
|
|
1346
1371
|
treeArrow: g,
|
|
1347
1372
|
tableOptions: this.tableOptions,
|
|
1348
|
-
checkedType:
|
|
1373
|
+
checkedType: x,
|
|
1349
1374
|
sortState: C
|
|
1350
1375
|
}
|
|
1351
1376
|
), k = e.getTooltipAt(s, i);
|
|
@@ -1353,17 +1378,17 @@ class De extends Te {
|
|
|
1353
1378
|
const M = this.tableModel.getColumnDef(i);
|
|
1354
1379
|
M && M.classes[t] && this.dom.addClasses(M.classes[t], S);
|
|
1355
1380
|
let E;
|
|
1356
|
-
|
|
1381
|
+
m && (E = m.render(S, s, i, t, e, y, this.dom.domService));
|
|
1357
1382
|
const B = e.getCustomClassesAt(s, i);
|
|
1358
|
-
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, a,
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1383
|
+
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, a, b, t, o), h && this.dom.addHorizontalBorder({ left: r, width: n, height: l, top: d + l }, a), this.getFocusModel && t === "body") {
|
|
1384
|
+
const v = this.getFocusModel();
|
|
1385
|
+
v != null && v.hasFocus(s, i) && this.dom.addFocusBorderDivs(a, b, {});
|
|
1361
1386
|
}
|
|
1362
1387
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1363
1388
|
const G = e.getCustomStyleAt(s, i);
|
|
1364
1389
|
if (G)
|
|
1365
|
-
for (const
|
|
1366
|
-
this.dom.setStyle(S,
|
|
1390
|
+
for (const v in G)
|
|
1391
|
+
this.dom.setStyle(S, v, G[v]);
|
|
1367
1392
|
return [S, E];
|
|
1368
1393
|
}
|
|
1369
1394
|
applyCssClasses(e, t = {}) {
|
|
@@ -1371,25 +1396,6 @@ class De extends Te {
|
|
|
1371
1396
|
s ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
|
|
1372
1397
|
});
|
|
1373
1398
|
}
|
|
1374
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1375
|
-
const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1376
|
-
if (l) {
|
|
1377
|
-
let d;
|
|
1378
|
-
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1379
|
-
if (l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1380
|
-
d = h.render(l, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1381
|
-
else {
|
|
1382
|
-
const f = `${s}`;
|
|
1383
|
-
this.dom.addLabelDiv(l, f, !1, t, o, e);
|
|
1384
|
-
}
|
|
1385
|
-
const u = r.getCustomClassesAt(t, o);
|
|
1386
|
-
u.length && this.dom.addClasses(u, l);
|
|
1387
|
-
const w = r.getCustomStyleAt(t, o);
|
|
1388
|
-
if (w)
|
|
1389
|
-
for (const f in w)
|
|
1390
|
-
this.dom.setStyle(l, f, w[f]);
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
1399
|
getColumnWidths(e, t) {
|
|
1394
1400
|
const o = [];
|
|
1395
1401
|
for (let s = e; s <= t; s++)
|
|
@@ -1438,9 +1444,70 @@ class De extends Te {
|
|
|
1438
1444
|
display: "none"
|
|
1439
1445
|
});
|
|
1440
1446
|
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Executes a function after a specified delay, ensuring that the function is called only once within that delay period.
|
|
1449
|
+
*
|
|
1450
|
+
* @param {() => void} fn - The function to be executed.
|
|
1451
|
+
* @param {number} [delay=1000] - The delay in milliseconds before executing the function.
|
|
1452
|
+
*
|
|
1453
|
+
* @return {undefined}
|
|
1454
|
+
*/
|
|
1441
1455
|
debounce(e, t = 1e3) {
|
|
1442
1456
|
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
|
|
1443
1457
|
}
|
|
1458
|
+
adjustDraggingColumn(e, t, o) {
|
|
1459
|
+
var s, i;
|
|
1460
|
+
if (this.dragging) {
|
|
1461
|
+
const r = this.hostElement.clientHeight, n = this.storedColumnWidths[t];
|
|
1462
|
+
if ((s = e.originalEvent) != null && s.clientX) {
|
|
1463
|
+
const a = { left: ((i = e.originalEvent) == null ? void 0 : i.clientX) - n / 2, width: n, height: r, top: 0, index: t };
|
|
1464
|
+
this.dom.applyStyle(this.draggingColumn, {
|
|
1465
|
+
background: "rgba(128,128,128,0.2)",
|
|
1466
|
+
display: "block",
|
|
1467
|
+
overfllow: "clip"
|
|
1468
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, a), o && this.renderContentOfDraggingColumn(a);
|
|
1469
|
+
}
|
|
1470
|
+
} else
|
|
1471
|
+
this.hideDraggingColumn();
|
|
1472
|
+
}
|
|
1473
|
+
renderContentOfDraggingColumn(e) {
|
|
1474
|
+
const t = this.renderContentOfDraggingColumnForArea(e, "header", 0);
|
|
1475
|
+
this.renderContentOfDraggingColumnForArea(e, "body", t);
|
|
1476
|
+
}
|
|
1477
|
+
renderContentOfDraggingColumnForArea(e, t, o = 0) {
|
|
1478
|
+
const s = "center", i = this.tableModel.getAreaModel(t), r = i == null ? void 0 : i.getRowCount();
|
|
1479
|
+
if (r) {
|
|
1480
|
+
const n = e.index ?? 0, l = this.draggingColumn;
|
|
1481
|
+
for (let d = 0; d < r; d++) {
|
|
1482
|
+
const a = o, h = i.getRowHeight(d), u = { left: 0, width: e.width, height: h, top: a, index: d }, m = i.getValueAt(d, n), b = i.getCellRenderer(d, n), f = b ? "" : `${m}`, g = {
|
|
1483
|
+
parent: l,
|
|
1484
|
+
geo: u,
|
|
1485
|
+
rowIndex: d,
|
|
1486
|
+
columnIndex: n,
|
|
1487
|
+
areaIdent: t,
|
|
1488
|
+
sideIdent: s,
|
|
1489
|
+
text: f
|
|
1490
|
+
}, p = this.dom.addColumnDiv(g);
|
|
1491
|
+
let C;
|
|
1492
|
+
b && (C = b.render(p, d, n, t, i, m, this.dom.domService), C && this.cleanupFunctions[t].push(C));
|
|
1493
|
+
const y = i.getCustomClassesAt(d, n);
|
|
1494
|
+
y.length && this.dom.addClasses(y, p);
|
|
1495
|
+
const R = this.tableModel.getColumnDef(n);
|
|
1496
|
+
R && R.classes[t] && this.dom.addClasses(R.classes[t], p), this.dom.addColumnBorderDivs(this.tableOptions, l, u, t, s);
|
|
1497
|
+
const x = i.getCustomStyleAt(d, n);
|
|
1498
|
+
if (x)
|
|
1499
|
+
for (const S in x)
|
|
1500
|
+
this.dom.setStyle(p, S, x[S]);
|
|
1501
|
+
o = o + h;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
return o;
|
|
1505
|
+
}
|
|
1506
|
+
hideDraggingColumn() {
|
|
1507
|
+
this.dom.applyStyle(this.draggingColumn, {
|
|
1508
|
+
display: "none"
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1444
1511
|
renderDragTargetDiv(e, t, o, s, i) {
|
|
1445
1512
|
const r = this.dom.applyStylePosistionAbsolute(
|
|
1446
1513
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
@@ -1450,11 +1517,11 @@ class De extends Te {
|
|
|
1450
1517
|
renderSelectedBackgroundDiv(e, t, o, s, i, r, n, l, d, a, h) {
|
|
1451
1518
|
let u = !1;
|
|
1452
1519
|
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1453
|
-
const
|
|
1454
|
-
if (
|
|
1455
|
-
const
|
|
1456
|
-
u =
|
|
1457
|
-
for (let
|
|
1520
|
+
const m = this.getSelectionModel();
|
|
1521
|
+
if (m) {
|
|
1522
|
+
const b = m.getSelectionCount(i, r);
|
|
1523
|
+
u = b > 0;
|
|
1524
|
+
for (let f = 0; f < b; f++) {
|
|
1458
1525
|
const g = this.dom.applyStylePosistionAbsolute(
|
|
1459
1526
|
// ge-table-body-west-selected-range
|
|
1460
1527
|
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, n)
|
|
@@ -1479,7 +1546,7 @@ class De extends Te {
|
|
|
1479
1546
|
cellSelected: h,
|
|
1480
1547
|
lastRowOfModel: u
|
|
1481
1548
|
}) {
|
|
1482
|
-
const [
|
|
1549
|
+
const [m, b] = this.addAndRenderCellDiv({
|
|
1483
1550
|
areaModel: e,
|
|
1484
1551
|
areaIdent: t,
|
|
1485
1552
|
sideIdent: o,
|
|
@@ -1492,7 +1559,7 @@ class De extends Te {
|
|
|
1492
1559
|
parent: a,
|
|
1493
1560
|
lastRowOfModel: u
|
|
1494
1561
|
});
|
|
1495
|
-
h && this.dom.addClass(`ge-table-${t}-${o}-selected-range`,
|
|
1562
|
+
h && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, m), b && this.cleanupFunctions[t].push(b);
|
|
1496
1563
|
}
|
|
1497
1564
|
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: n }) {
|
|
1498
1565
|
const l = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = l.createElement("div");
|
|
@@ -1526,7 +1593,7 @@ class Oe {
|
|
|
1526
1593
|
}
|
|
1527
1594
|
}
|
|
1528
1595
|
}
|
|
1529
|
-
class
|
|
1596
|
+
class Fe {
|
|
1530
1597
|
constructor(e = -1, t = -1) {
|
|
1531
1598
|
this.rowIndex = e, this.columnIndex = t;
|
|
1532
1599
|
}
|
|
@@ -1536,10 +1603,10 @@ class J {
|
|
|
1536
1603
|
this.cells = e;
|
|
1537
1604
|
}
|
|
1538
1605
|
static createSingle(e, t) {
|
|
1539
|
-
return new J([new
|
|
1606
|
+
return new J([new Fe(e, t)]);
|
|
1540
1607
|
}
|
|
1541
1608
|
}
|
|
1542
|
-
class
|
|
1609
|
+
class Pe {
|
|
1543
1610
|
constructor(e) {
|
|
1544
1611
|
var t, o;
|
|
1545
1612
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
@@ -1548,8 +1615,8 @@ class Fe {
|
|
|
1548
1615
|
var i, r, n, l, d, a, h;
|
|
1549
1616
|
let o = !1, s = !1;
|
|
1550
1617
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1551
|
-
const u = this.getSelectionModel(),
|
|
1552
|
-
u &&
|
|
1618
|
+
const u = this.getSelectionModel(), m = this.getFocusModel();
|
|
1619
|
+
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), o = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (n = e.originalEvent) != null && n.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (d = e.originalEvent) != null && d.metaKey) ? (u.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (a = e.originalEvent) != null && a.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (u.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (u.firstClick(e.rowIndex, e.columnIndex), o = !0));
|
|
1553
1620
|
}
|
|
1554
1621
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1555
1622
|
}
|
|
@@ -1572,7 +1639,7 @@ class Fe {
|
|
|
1572
1639
|
createRangeByEvents(e, t) {
|
|
1573
1640
|
t || (t = e);
|
|
1574
1641
|
const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), s = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
1575
|
-
return
|
|
1642
|
+
return A.create({
|
|
1576
1643
|
rowIndex1: o,
|
|
1577
1644
|
columnIndex1: i,
|
|
1578
1645
|
rowIndex2: s,
|
|
@@ -1764,7 +1831,7 @@ class Ge {
|
|
|
1764
1831
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1765
1832
|
}
|
|
1766
1833
|
firstClick(e, t) {
|
|
1767
|
-
this.selectionType === "row" ? this.addRange(
|
|
1834
|
+
this.selectionType === "row" ? this.addRange(A.singleRow(e)) : this.selectionType === "column" && this.addRange(A.singleColumn(t));
|
|
1768
1835
|
}
|
|
1769
1836
|
getSelectionCount(e, t) {
|
|
1770
1837
|
let o = 0;
|
|
@@ -1797,10 +1864,10 @@ class Ge {
|
|
|
1797
1864
|
if (this.selectionType === "none")
|
|
1798
1865
|
return;
|
|
1799
1866
|
let t = e;
|
|
1800
|
-
this.selectionType === "row" ? t =
|
|
1867
|
+
this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
1801
1868
|
}
|
|
1802
1869
|
togglePoint(e, t) {
|
|
1803
|
-
this.getSelectionCount(e, t) > 0 ? this.removeSelection(
|
|
1870
|
+
this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
|
|
1804
1871
|
}
|
|
1805
1872
|
isSelected(e, t) {
|
|
1806
1873
|
return this.getSelectionCount(e, t) > 0;
|
|
@@ -1853,7 +1920,7 @@ class j {
|
|
|
1853
1920
|
header: 34,
|
|
1854
1921
|
body: 34,
|
|
1855
1922
|
footer: 34
|
|
1856
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new
|
|
1923
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new pe(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new We(), this.getSelectionModel = () => ze, this.getFocusModel = () => je;
|
|
1857
1924
|
}
|
|
1858
1925
|
}
|
|
1859
1926
|
const Z = class X {
|
|
@@ -1934,7 +2001,7 @@ const Z = class X {
|
|
|
1934
2001
|
mergeRanges(e) {
|
|
1935
2002
|
let t;
|
|
1936
2003
|
for (const o of e)
|
|
1937
|
-
t ? (t.r1 = Math.min(t.r1, o.r1), t.c1 = Math.min(t.c1, o.c1), t.r2 = Math.max(t.r2, o.r2), t.c2 = Math.max(t.c2, o.c2)) : t = new
|
|
2004
|
+
t ? (t.r1 = Math.min(t.r1, o.r1), t.c1 = Math.min(t.c1, o.c1), t.r2 = Math.max(t.r2, o.r2), t.c2 = Math.max(t.c2, o.c2)) : t = new A(o.r1, o.c1, o.r2, o.c2);
|
|
1938
2005
|
return t;
|
|
1939
2006
|
}
|
|
1940
2007
|
};
|
|
@@ -1942,15 +2009,15 @@ Z.columnSeparatorChar = " ";
|
|
|
1942
2009
|
Z.rowSeparatorChar = `
|
|
1943
2010
|
`;
|
|
1944
2011
|
let se = Z;
|
|
1945
|
-
class
|
|
2012
|
+
class be extends _e {
|
|
1946
2013
|
constructor(e, t, o, s, i, r = new se()) {
|
|
1947
2014
|
var n;
|
|
1948
2015
|
if (super(
|
|
1949
2016
|
e,
|
|
1950
2017
|
t,
|
|
1951
|
-
new
|
|
2018
|
+
new ye(o),
|
|
1952
2019
|
s
|
|
1953
|
-
), this.eventListener = i, this.copyService = r, this.licenseManager =
|
|
2020
|
+
), this.eventListener = i, this.copyService = r, this.licenseManager = P.getInstance(), this.selectionService = new Pe(this), this.api = new Ae(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new oe()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
|
|
1954
2021
|
const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
|
|
1955
2022
|
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Me(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ie(d)), l.autoRestoreSortingState && (this.storeSortingService = new ke(d)));
|
|
1956
2023
|
}
|
|
@@ -1968,7 +2035,7 @@ class pe extends De {
|
|
|
1968
2035
|
* @return {TableScope} - The newly created TableScope instance.
|
|
1969
2036
|
*/
|
|
1970
2037
|
static create(e, t, o = new j(), s = new oe(), i = new Be(), r = new se()) {
|
|
1971
|
-
return new
|
|
2038
|
+
return new be(
|
|
1972
2039
|
e,
|
|
1973
2040
|
t,
|
|
1974
2041
|
i,
|
|
@@ -2053,15 +2120,16 @@ class pe extends De {
|
|
|
2053
2120
|
* @return {void}
|
|
2054
2121
|
*/
|
|
2055
2122
|
onMouseDown(e) {
|
|
2056
|
-
e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.dragFrom = this.mouseStartColumnIndex));
|
|
2123
|
+
e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.firstDraggingRendering = !0, this.dragFrom = this.mouseStartColumnIndex));
|
|
2057
2124
|
}
|
|
2058
2125
|
/**
|
|
2059
2126
|
* Handles mouse dragging on the frame.
|
|
2060
2127
|
*
|
|
2061
2128
|
* @param {GeMouseEvent} mouseEvent - The mouse event object.
|
|
2129
|
+
* @param startMouseEvent
|
|
2062
2130
|
*/
|
|
2063
|
-
mouseDraggingOnFrame(e) {
|
|
2064
|
-
this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows()), this.repaint());
|
|
2131
|
+
mouseDraggingOnFrame(e, t) {
|
|
2132
|
+
this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.lastDragFrom === this.dragTo && this.lastDragTo === this.dragFrom || (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.lastDragFrom = this.dragFrom, this.lastDragTo = this.dragTo, this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows())), t && (this.adjustDraggingColumn(e, t.columnIndex, this.firstDraggingRendering), this.firstDraggingRendering = !1), this.repaint());
|
|
2065
2133
|
}
|
|
2066
2134
|
/**
|
|
2067
2135
|
* Handles the end of mouse dragging event on a frame.
|
|
@@ -2071,7 +2139,7 @@ class pe extends De {
|
|
|
2071
2139
|
* @returns {void}
|
|
2072
2140
|
*/
|
|
2073
2141
|
mouseDraggingEndOnFrame(e) {
|
|
2074
|
-
this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && this.repaint(), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.mouseStartAction = "";
|
|
2142
|
+
this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && (this.hideDraggingColumn(), this.repaint()), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.firstDraggingRendering = !0, this.mouseStartAction = "";
|
|
2075
2143
|
}
|
|
2076
2144
|
/**
|
|
2077
2145
|
* Handles the mouse move event.
|
|
@@ -2224,6 +2292,9 @@ class pe extends De {
|
|
|
2224
2292
|
if (this != null && this.getFocusModel)
|
|
2225
2293
|
return this.getFocusModel();
|
|
2226
2294
|
}
|
|
2295
|
+
setDragging(e) {
|
|
2296
|
+
this.dragging = e, this.dragging ? (this.storeColumnWidths(), this.lastDragFrom = -1, this.lastDragTo = -1) : this.storedColumnWidths = [];
|
|
2297
|
+
}
|
|
2227
2298
|
/**
|
|
2228
2299
|
* Changes the focus cell using the specified deltas.
|
|
2229
2300
|
*
|
|
@@ -2601,15 +2672,15 @@ class H {
|
|
|
2601
2672
|
this.header = e, this.body = t, this.footer = o;
|
|
2602
2673
|
}
|
|
2603
2674
|
}
|
|
2604
|
-
class
|
|
2675
|
+
class w {
|
|
2605
2676
|
constructor(e = 100, t = "px") {
|
|
2606
2677
|
this.value = e, this.unit = t;
|
|
2607
2678
|
}
|
|
2608
2679
|
}
|
|
2609
2680
|
const Xe = () => !0, re = () => !1;
|
|
2610
2681
|
class V {
|
|
2611
|
-
constructor(e, t, o = new
|
|
2612
|
-
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = n, this.sortable = l, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable =
|
|
2682
|
+
constructor(e, t, o = new w(100, "px"), s = new T(), i = new T(), r = new w(100, "px"), n = new w(100, "px"), l, d, a, h, u, m, b, f, g = () => this.visible) {
|
|
2683
|
+
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = n, this.sortable = l, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable = m, this.getEditRenderer = b, this.editInputPipe = f, this.isVisible = g, this.visible = !0;
|
|
2613
2684
|
}
|
|
2614
2685
|
static bodyRenderer(e) {
|
|
2615
2686
|
return new T(
|
|
@@ -2631,11 +2702,11 @@ class V {
|
|
|
2631
2702
|
return new V(
|
|
2632
2703
|
e.property ?? "",
|
|
2633
2704
|
e.headerLabel ?? "",
|
|
2634
|
-
e.width ?? new
|
|
2705
|
+
e.width ?? new w(100, "px"),
|
|
2635
2706
|
o,
|
|
2636
2707
|
t,
|
|
2637
|
-
e.minWidth ?? new
|
|
2638
|
-
e.maxWidth ?? new
|
|
2708
|
+
e.minWidth ?? new w(100, "px"),
|
|
2709
|
+
e.maxWidth ?? new w(100, "px"),
|
|
2639
2710
|
e.sortable,
|
|
2640
2711
|
e.sortComparator,
|
|
2641
2712
|
e.sortState,
|
|
@@ -2648,7 +2719,7 @@ class V {
|
|
|
2648
2719
|
);
|
|
2649
2720
|
}
|
|
2650
2721
|
}
|
|
2651
|
-
const tt = new
|
|
2722
|
+
const tt = new w(300, "px"), ot = new w(290, "px"), st = new w(280, "px"), it = new w(270, "px"), rt = new w(260, "px"), lt = new w(250, "px"), nt = new w(240, "px"), at = new w(230, "px"), dt = new w(220, "px"), ht = new w(210, "px"), le = new w(200, "px"), ct = new w(190, "px"), ut = new w(180, "px"), gt = new w(170, "px"), pt = new w(160, "px"), bt = new w(150, "px"), ft = new w(140, "px"), mt = new w(130, "px"), wt = new w(120, "px"), St = new w(110, "px"), xt = new w(100, "px"), Ct = new w(90, "px"), yt = new w(80, "px"), vt = new w(70, "px"), Rt = new w(60, "px"), At = new w(50, "px"), Mt = new w(40, "px"), Et = new w(30, "px"), It = new w(20, "px"), kt = new w(10, "px"), Tt = new w(0, "px");
|
|
2652
2723
|
class ee {
|
|
2653
2724
|
constructor(e, t = [], o = -1) {
|
|
2654
2725
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
|
|
@@ -2709,7 +2780,9 @@ class ee {
|
|
|
2709
2780
|
return !1;
|
|
2710
2781
|
}
|
|
2711
2782
|
isEditable(e, t) {
|
|
2712
|
-
|
|
2783
|
+
var s, i;
|
|
2784
|
+
const o = (s = this.columnDefs) == null ? void 0 : s[t];
|
|
2785
|
+
return ((i = o == null ? void 0 : o.editable) == null ? void 0 : i.call(o)) ?? !1;
|
|
2713
2786
|
}
|
|
2714
2787
|
setValue(e, t, o) {
|
|
2715
2788
|
var n;
|
|
@@ -2727,7 +2800,7 @@ class ee {
|
|
|
2727
2800
|
setPropertyValue(e, t, o) {
|
|
2728
2801
|
const s = t.shift();
|
|
2729
2802
|
if (s) {
|
|
2730
|
-
|
|
2803
|
+
const i = e[s];
|
|
2731
2804
|
return i && t.length ? this.setPropertyValue(i, t, o) : (e[s] = o, !0);
|
|
2732
2805
|
}
|
|
2733
2806
|
return !1;
|
|
@@ -2743,7 +2816,7 @@ class ee {
|
|
|
2743
2816
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
2744
2817
|
}
|
|
2745
2818
|
}
|
|
2746
|
-
class
|
|
2819
|
+
class D extends ee {
|
|
2747
2820
|
constructor(e, t, o, s = []) {
|
|
2748
2821
|
super(e, s, o), this.areaIdent = e, this.arr = t, this.defaultRowHeight = o, this.columnDefs = s, this.filteredArr = [...t];
|
|
2749
2822
|
}
|
|
@@ -2771,7 +2844,7 @@ class _ extends ee {
|
|
|
2771
2844
|
this.filteredArr.forEach((o) => this.arrayMove(o, e, t)), super.changeColumnOrder(e, t);
|
|
2772
2845
|
}
|
|
2773
2846
|
}
|
|
2774
|
-
class
|
|
2847
|
+
class _ {
|
|
2775
2848
|
constructor(e = "body") {
|
|
2776
2849
|
this.areaIdent = e, this.rowSelectionModel = void 0;
|
|
2777
2850
|
}
|
|
@@ -3073,10 +3146,10 @@ class Ke {
|
|
|
3073
3146
|
}
|
|
3074
3147
|
}
|
|
3075
3148
|
class N {
|
|
3076
|
-
constructor(e, t, o, s = 0, i = 0, r = !1, n = new H(), l = [], d = [], a = -1, h = 0, u = 400,
|
|
3149
|
+
constructor(e, t, o, s = 0, i = 0, r = !1, n = new H(), l = [], d = [], a = -1, h = 0, u = 400, m = () => {
|
|
3077
3150
|
}) {
|
|
3078
|
-
var
|
|
3079
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel =
|
|
3151
|
+
var b, f, g, p;
|
|
3152
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new de(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (f = this.columnSizes) != null && f.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && Ce(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ke());
|
|
3080
3153
|
}
|
|
3081
3154
|
init() {
|
|
3082
3155
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -3375,7 +3448,13 @@ class N {
|
|
|
3375
3448
|
* @returns {boolean} - `true` if the column is sortable, `false` otherwise.
|
|
3376
3449
|
*/
|
|
3377
3450
|
isSortable(e) {
|
|
3378
|
-
|
|
3451
|
+
var t;
|
|
3452
|
+
if (this.columnDefs && e < this.columnDefs.length) {
|
|
3453
|
+
const o = (t = this.columnDefs[e]) == null ? void 0 : t.sortable;
|
|
3454
|
+
if (typeof o == "function")
|
|
3455
|
+
return o();
|
|
3456
|
+
}
|
|
3457
|
+
return !1;
|
|
3379
3458
|
}
|
|
3380
3459
|
/**
|
|
3381
3460
|
* Moves a column in the column order.
|
|
@@ -3395,11 +3474,11 @@ class N {
|
|
|
3395
3474
|
if (i.width.unit === "%" && e) {
|
|
3396
3475
|
let r = Math.floor(i.width.value * e / 100);
|
|
3397
3476
|
if (i.minWidth) {
|
|
3398
|
-
|
|
3477
|
+
const n = i.minWidth.unit === "px" ? i.minWidth.value : Math.floor(i.minWidth.value * e / 100);
|
|
3399
3478
|
r = Math.max(n, r);
|
|
3400
3479
|
}
|
|
3401
3480
|
if (i.maxWidth) {
|
|
3402
|
-
|
|
3481
|
+
const n = i.maxWidth.unit === "px" ? i.maxWidth.value : Math.floor(i.maxWidth.value * e / 100);
|
|
3403
3482
|
r = Math.min(n, r);
|
|
3404
3483
|
}
|
|
3405
3484
|
return r;
|
|
@@ -3484,9 +3563,9 @@ class he extends Ue {
|
|
|
3484
3563
|
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = s;
|
|
3485
3564
|
}
|
|
3486
3565
|
}
|
|
3487
|
-
class
|
|
3566
|
+
class F {
|
|
3488
3567
|
static createTableModel(e) {
|
|
3489
|
-
var t, o, s, i, r, n, l, d, a, h, u,
|
|
3568
|
+
var t, o, s, i, r, n, l, d, a, h, u, m, b, f;
|
|
3490
3569
|
if (e.defaultRowHeights === void 0)
|
|
3491
3570
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
3492
3571
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
@@ -3504,22 +3583,22 @@ class P {
|
|
|
3504
3583
|
g > -1 && (e.defaultRowHeights.footer = g);
|
|
3505
3584
|
}
|
|
3506
3585
|
}
|
|
3507
|
-
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new V(g, g.toUpperCase(), le)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new V(g, g.toUpperCase(), le)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (n = e.columnSizes) != null && n.length ? e.columnCount = (l = e.columnSizes) == null ? void 0 : l.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new
|
|
3586
|
+
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new V(g, g.toUpperCase(), le)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new V(g, g.toUpperCase(), le)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (n = e.columnSizes) != null && n.length ? e.columnCount = (l = e.columnSizes) == null ? void 0 : l.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new D(
|
|
3508
3587
|
"header",
|
|
3509
3588
|
e.headerData,
|
|
3510
3589
|
e.defaultRowHeights.header,
|
|
3511
3590
|
e.columnDefs
|
|
3512
|
-
) : (a = e.columnDefs) != null && a.length ? e.headerAreaModel = new
|
|
3591
|
+
) : (a = e.columnDefs) != null && a.length ? e.headerAreaModel = new D(
|
|
3513
3592
|
"header",
|
|
3514
3593
|
[e.columnDefs.map((g) => g.headerLabel)],
|
|
3515
3594
|
e.defaultRowHeights.header,
|
|
3516
3595
|
e.columnDefs
|
|
3517
|
-
) : e.headerAreaModel = new
|
|
3596
|
+
) : e.headerAreaModel = new _("header")), e.footerAreaModel || ((h = e.footerData) != null && h.length ? e.footerAreaModel = new D(
|
|
3518
3597
|
"footer",
|
|
3519
3598
|
e.footerData,
|
|
3520
3599
|
e.defaultRowHeights.footer,
|
|
3521
3600
|
e.columnDefs
|
|
3522
|
-
) : e.footerAreaModel = new
|
|
3601
|
+
) : e.footerAreaModel = new _("footer")), !e.bodyAreaModel)
|
|
3523
3602
|
if (e.rows)
|
|
3524
3603
|
if ((u = e.rows) != null && u.length && L(e.rows[0])) {
|
|
3525
3604
|
const g = e.rows;
|
|
@@ -3528,7 +3607,7 @@ class P {
|
|
|
3528
3607
|
g,
|
|
3529
3608
|
e.defaultRowHeights.body,
|
|
3530
3609
|
e.columnDefs
|
|
3531
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (
|
|
3610
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new ae(g));
|
|
3532
3611
|
} else
|
|
3533
3612
|
e.bodyAreaModel = new he(
|
|
3534
3613
|
"body",
|
|
@@ -3537,12 +3616,12 @@ class P {
|
|
|
3537
3616
|
e.defaultRowHeights.body
|
|
3538
3617
|
);
|
|
3539
3618
|
else
|
|
3540
|
-
e.bodyData ? e.bodyAreaModel = new
|
|
3619
|
+
e.bodyData ? e.bodyAreaModel = new D(
|
|
3541
3620
|
"body",
|
|
3542
3621
|
e.bodyData,
|
|
3543
3622
|
e.defaultRowHeights.body
|
|
3544
|
-
) : e.bodyAreaModel = new
|
|
3545
|
-
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((
|
|
3623
|
+
) : e.bodyAreaModel = new _("body");
|
|
3624
|
+
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((b = e.tableOptions) != null && b.getSelectionModel) && (e.getSelectionModel = (f = e.tableOptions) == null ? void 0 : f.getSelectionModel), new N(
|
|
3546
3625
|
e.headerAreaModel,
|
|
3547
3626
|
e.bodyAreaModel,
|
|
3548
3627
|
e.footerAreaModel,
|
|
@@ -3559,7 +3638,7 @@ class P {
|
|
|
3559
3638
|
);
|
|
3560
3639
|
}
|
|
3561
3640
|
static buildByTypedRowsParam(e) {
|
|
3562
|
-
return
|
|
3641
|
+
return F.buildByTypedRows(
|
|
3563
3642
|
e.rows ?? [],
|
|
3564
3643
|
e.columnDefs,
|
|
3565
3644
|
e.tableOptions ?? new j(),
|
|
@@ -3576,10 +3655,10 @@ class P {
|
|
|
3576
3655
|
r.body,
|
|
3577
3656
|
t
|
|
3578
3657
|
);
|
|
3579
|
-
return (n || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ae(l)),
|
|
3580
|
-
headerAreaModel: new
|
|
3658
|
+
return (n || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ae(l)), F.createByAreaModelsParam({
|
|
3659
|
+
headerAreaModel: new D("header", [t.map((a) => a.headerLabel)], r.header),
|
|
3581
3660
|
bodyAreaModel: d,
|
|
3582
|
-
footerAreaModel: new
|
|
3661
|
+
footerAreaModel: new D("footer", [], r.footer),
|
|
3583
3662
|
columnDefs: t,
|
|
3584
3663
|
fixedLeftColumnCount: s,
|
|
3585
3664
|
fixedRightColumnCount: i,
|
|
@@ -3590,7 +3669,7 @@ class P {
|
|
|
3590
3669
|
overridingColumnWidth: -1
|
|
3591
3670
|
});
|
|
3592
3671
|
}
|
|
3593
|
-
return
|
|
3672
|
+
return F.createByObjectArrayParam({
|
|
3594
3673
|
rows: e,
|
|
3595
3674
|
columnDefs: t,
|
|
3596
3675
|
fixedLeftColumnCount: s,
|
|
@@ -3600,7 +3679,7 @@ class P {
|
|
|
3600
3679
|
}
|
|
3601
3680
|
static createByObjectArrayParam(e) {
|
|
3602
3681
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
3603
|
-
return
|
|
3682
|
+
return F.createByObjectArray(
|
|
3604
3683
|
e.rows,
|
|
3605
3684
|
e.header ?? [],
|
|
3606
3685
|
e.footer ?? [],
|
|
@@ -3612,7 +3691,7 @@ class P {
|
|
|
3612
3691
|
e.columnSizes ?? []
|
|
3613
3692
|
);
|
|
3614
3693
|
}
|
|
3615
|
-
static createByAreaModels(e = new
|
|
3694
|
+
static createByAreaModels(e = new _(), t, o = new _(), s = 0, i = 0, r = !1, n = new H(), l, d = [], a = -1, h) {
|
|
3616
3695
|
return new N(
|
|
3617
3696
|
e,
|
|
3618
3697
|
t,
|
|
@@ -3628,10 +3707,10 @@ class P {
|
|
|
3628
3707
|
);
|
|
3629
3708
|
}
|
|
3630
3709
|
static createByAreaModelsParam(e) {
|
|
3631
|
-
return
|
|
3632
|
-
e.headerAreaModel ?? new
|
|
3710
|
+
return F.createByAreaModels(
|
|
3711
|
+
e.headerAreaModel ?? new _(),
|
|
3633
3712
|
e.bodyAreaModel,
|
|
3634
|
-
e.footerAreaModel ?? new
|
|
3713
|
+
e.footerAreaModel ?? new _(),
|
|
3635
3714
|
e.fixedLeftColumnCount ?? 0,
|
|
3636
3715
|
e.fixedRightColumnCount ?? 0,
|
|
3637
3716
|
e.rowCheckboxVisible === void 0 ? !1 : e.rowCheckboxVisible,
|
|
@@ -3644,8 +3723,8 @@ class P {
|
|
|
3644
3723
|
}
|
|
3645
3724
|
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, n = new H(), l, d = []) {
|
|
3646
3725
|
let a;
|
|
3647
|
-
t != null && t.length ? a = new
|
|
3648
|
-
const h = o ? new
|
|
3726
|
+
t != null && t.length ? a = new D("header", t, n.header, l) : l != null && l.length ? a = new D("header", [l.map((m) => m.headerLabel)], n.header, l) : a = new _();
|
|
3727
|
+
const h = o ? new D("footer", o, n.footer, l) : new _(), u = new he("body", e, l, n.body);
|
|
3649
3728
|
return new N(
|
|
3650
3729
|
a,
|
|
3651
3730
|
u,
|
|
@@ -3659,7 +3738,7 @@ class P {
|
|
|
3659
3738
|
);
|
|
3660
3739
|
}
|
|
3661
3740
|
}
|
|
3662
|
-
const
|
|
3741
|
+
const Dt = [
|
|
3663
3742
|
"COPY_2_CLIPBOARD",
|
|
3664
3743
|
"START_EDITING",
|
|
3665
3744
|
"TOGGLE_SELECTION",
|
|
@@ -3677,7 +3756,7 @@ const _t = [
|
|
|
3677
3756
|
// "PAGEUP_PRESSED",
|
|
3678
3757
|
// "PAGEDOWN_PRESSED"
|
|
3679
3758
|
];
|
|
3680
|
-
class
|
|
3759
|
+
class _t {
|
|
3681
3760
|
constructor(e, t) {
|
|
3682
3761
|
this.tableModel = e, this.tableOptions = t;
|
|
3683
3762
|
}
|
|
@@ -3710,7 +3789,7 @@ class Ot {
|
|
|
3710
3789
|
this.index = e, this.px = t;
|
|
3711
3790
|
}
|
|
3712
3791
|
}
|
|
3713
|
-
const
|
|
3792
|
+
const Ft = { body: ["ge-table-text-align-left"] }, Pt = { body: ["ge-table-text-align-center"] }, Lt = { body: ["ge-table-text-align-right"] }, Ht = {
|
|
3714
3793
|
header: ["ge-table-text-align-left"],
|
|
3715
3794
|
body: ["ge-table-text-align-left"],
|
|
3716
3795
|
footer: ["ge-table-text-align-left"]
|
|
@@ -3743,7 +3822,7 @@ class ce {
|
|
|
3743
3822
|
}
|
|
3744
3823
|
class Wt {
|
|
3745
3824
|
constructor() {
|
|
3746
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new
|
|
3825
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new w(50, "px"), this.minWidth = new w(50, "px"), this.maxWidth = new w(100, "px"), this.rendererMap = new T(new ce(), new ce(), void 0), this.classes = new T(
|
|
3747
3826
|
[],
|
|
3748
3827
|
["ge-table-text-align-left"],
|
|
3749
3828
|
[]
|
|
@@ -4091,7 +4170,7 @@ class Yt {
|
|
|
4091
4170
|
var e;
|
|
4092
4171
|
for (const t of this.groupExts)
|
|
4093
4172
|
t.log(this.getMaxRowCount());
|
|
4094
|
-
this.arr = this.buildArray(), !((e = this.columnDefs) != null && e.length) && this.areaIdent === "header" && (this.columnDefs = I.buildColumnDefs(this.groups))
|
|
4173
|
+
this.arr = this.buildArray(), !((e = this.columnDefs) != null && e.length) && this.areaIdent === "header" && (this.columnDefs = I.buildColumnDefs(this.groups));
|
|
4095
4174
|
}
|
|
4096
4175
|
getAllLeafs() {
|
|
4097
4176
|
return I.flattenGroupExts(this.groupExts).filter((t) => !t.children);
|
|
@@ -4262,7 +4341,7 @@ class qt {
|
|
|
4262
4341
|
${h}
|
|
4263
4342
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
4264
4343
|
const u = e.querySelector(".ge-input-checkbox");
|
|
4265
|
-
u && u.addEventListener("click", (
|
|
4344
|
+
u && u.addEventListener("click", (m, b) => (l[this.property] = !l[this.property], !0));
|
|
4266
4345
|
}
|
|
4267
4346
|
}
|
|
4268
4347
|
}
|
|
@@ -4492,9 +4571,9 @@ export {
|
|
|
4492
4571
|
ee as AbstractAreaModel,
|
|
4493
4572
|
Gt as AreaMapFactory,
|
|
4494
4573
|
Xt as AreaModel,
|
|
4495
|
-
|
|
4574
|
+
D as AreaModelArrayOfArrays,
|
|
4496
4575
|
Yt as AreaModelCellGroups,
|
|
4497
|
-
|
|
4576
|
+
_ as AreaModelHidden,
|
|
4498
4577
|
he as AreaModelObjectArrayWithColumndefs,
|
|
4499
4578
|
Ue as AreaModelObjectyArray,
|
|
4500
4579
|
ne as AreaModelTree,
|
|
@@ -4503,18 +4582,18 @@ export {
|
|
|
4503
4582
|
Qe as CellGroup,
|
|
4504
4583
|
Ze as CellGroupExt,
|
|
4505
4584
|
et as CellGroupExtCellRenderer,
|
|
4506
|
-
|
|
4585
|
+
A as CellRange,
|
|
4507
4586
|
I as CellgroupFactory,
|
|
4508
4587
|
qt as CheckboxBooleanPropertyCellRenderer,
|
|
4509
4588
|
ce as CheckboxCellRenderer,
|
|
4510
4589
|
Wt as CheckboxColumnDef,
|
|
4511
4590
|
Ke as CheckboxModel,
|
|
4512
4591
|
$t as ChunkData,
|
|
4513
|
-
|
|
4592
|
+
De as ColAndRowspanModel,
|
|
4514
4593
|
Ee as CollapsedExpandedData,
|
|
4515
4594
|
ho as ColorRgb,
|
|
4516
4595
|
V as ColumnDef,
|
|
4517
|
-
|
|
4596
|
+
ye as ConvenienceDomService,
|
|
4518
4597
|
se as CopyService,
|
|
4519
4598
|
fe as CssVars,
|
|
4520
4599
|
Qt as DateToIntlDDMMYYYYCellRenderer,
|
|
@@ -4526,7 +4605,7 @@ export {
|
|
|
4526
4605
|
oe as EventAdapter,
|
|
4527
4606
|
re as FalseFn,
|
|
4528
4607
|
Ne as FocusModel,
|
|
4529
|
-
|
|
4608
|
+
Fe as GeCellIndices,
|
|
4530
4609
|
W as GeCssColorUtil,
|
|
4531
4610
|
Kt as GeFilterService,
|
|
4532
4611
|
Nt as GeKeyEvent,
|
|
@@ -4537,7 +4616,7 @@ export {
|
|
|
4537
4616
|
Ot as IndexAndPx,
|
|
4538
4617
|
We as InputCellRenderer,
|
|
4539
4618
|
Oe as InputHandler,
|
|
4540
|
-
|
|
4619
|
+
P as LicenseManager,
|
|
4541
4620
|
eo as MaleFemaleToIconCellRenderer,
|
|
4542
4621
|
Re as MouseHandler,
|
|
4543
4622
|
ve as MouseTargetData,
|
|
@@ -4547,28 +4626,28 @@ export {
|
|
|
4547
4626
|
de as Padding,
|
|
4548
4627
|
no as PositiveAndNegativeNumberRenderer,
|
|
4549
4628
|
lo as ProgressBarCellRenderer,
|
|
4550
|
-
|
|
4629
|
+
_e as RenderScope,
|
|
4551
4630
|
Ut as Renderer,
|
|
4552
4631
|
qe as RequestChunk,
|
|
4553
4632
|
xe as SelectCellRenderer,
|
|
4554
4633
|
Ge as SelectionModel,
|
|
4555
|
-
|
|
4634
|
+
Pe as SelectionService,
|
|
4556
4635
|
Ve as ShortcutService,
|
|
4557
4636
|
Be as SimpleDomService,
|
|
4558
|
-
|
|
4637
|
+
w as Size,
|
|
4559
4638
|
$e as SortItem,
|
|
4560
|
-
|
|
4639
|
+
pe as SortedOptions,
|
|
4561
4640
|
ro as StarRatingCellRenderer,
|
|
4562
4641
|
Ie as StoreStateCollapsedExpandService,
|
|
4563
4642
|
Me as StoreStateScrollPosService,
|
|
4564
4643
|
ke as StoreStateSortingService,
|
|
4565
4644
|
Ae as TableApi,
|
|
4566
4645
|
zt as TableCellUpdateEvent,
|
|
4567
|
-
|
|
4646
|
+
F as TableFactory,
|
|
4568
4647
|
N as TableModel,
|
|
4569
|
-
|
|
4648
|
+
_t as TableModelAndOptions,
|
|
4570
4649
|
j as TableOptions,
|
|
4571
|
-
|
|
4650
|
+
be as TableScope,
|
|
4572
4651
|
co as ThreeColorGradientArg,
|
|
4573
4652
|
ae as TreeCheckboxModel,
|
|
4574
4653
|
Y as TreeFactory,
|
|
@@ -4580,17 +4659,17 @@ export {
|
|
|
4580
4659
|
ue as TwoColorGradientArg,
|
|
4581
4660
|
Je as ValueLabel,
|
|
4582
4661
|
Le as WindowsShortcutActionIdMapping,
|
|
4583
|
-
|
|
4662
|
+
Dt as actionIds,
|
|
4584
4663
|
Vt as allCenter,
|
|
4585
4664
|
Ht as allLeft,
|
|
4586
4665
|
Bt as allRight,
|
|
4587
|
-
|
|
4588
|
-
|
|
4666
|
+
Pt as bodyCenter,
|
|
4667
|
+
Ft as bodyLeft,
|
|
4589
4668
|
Lt as bodyRight,
|
|
4590
4669
|
ao as editInputPipeForNumber,
|
|
4591
4670
|
U as getAreaIdentByString,
|
|
4592
4671
|
z as isAreaModelTree,
|
|
4593
|
-
|
|
4672
|
+
Ce as isCheckboxColumnDef,
|
|
4594
4673
|
L as isTreeRow,
|
|
4595
4674
|
Tt as px0,
|
|
4596
4675
|
kt as px10,
|
|
@@ -4599,8 +4678,8 @@ export {
|
|
|
4599
4678
|
wt as px120,
|
|
4600
4679
|
mt as px130,
|
|
4601
4680
|
ft as px140,
|
|
4602
|
-
|
|
4603
|
-
|
|
4681
|
+
bt as px150,
|
|
4682
|
+
pt as px160,
|
|
4604
4683
|
gt as px170,
|
|
4605
4684
|
ut as px180,
|
|
4606
4685
|
ct as px190,
|
|
@@ -4621,6 +4700,6 @@ export {
|
|
|
4621
4700
|
At as px50,
|
|
4622
4701
|
Rt as px60,
|
|
4623
4702
|
vt as px70,
|
|
4624
|
-
|
|
4625
|
-
|
|
4703
|
+
yt as px80,
|
|
4704
|
+
Ct as px90
|
|
4626
4705
|
};
|