@guiexpert/table 1.1.10 → 1.1.12
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 +34 -34
- package/index.js +208 -167
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +1 -1
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +2 -1
- package/lib/table/render-scope.d.ts +35 -24
- package/lib/table/service/convenience-dom.service.d.ts +1 -2
- package/lib/table/table-scope.d.ts +1 -0
- 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 {
|
|
@@ -83,7 +83,7 @@ class pe {
|
|
|
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(
|
|
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
176
|
const p = d !== "none" && i === 0;
|
|
177
|
-
this.addLabelDiv(
|
|
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" : "";
|
|
@@ -883,7 +883,7 @@ class Te {
|
|
|
883
883
|
this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
class
|
|
886
|
+
class A {
|
|
887
887
|
/**
|
|
888
888
|
* Represents a constructor for a class.
|
|
889
889
|
* @constructor
|
|
@@ -897,7 +897,7 @@ class R {
|
|
|
897
897
|
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
898
898
|
}
|
|
899
899
|
static create(e) {
|
|
900
|
-
return e.gammaRange === void 0 && (e.gammaRange = !1), new
|
|
900
|
+
return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
|
|
901
901
|
e.rowIndex1,
|
|
902
902
|
e.columnIndex1,
|
|
903
903
|
e.rowIndex2,
|
|
@@ -906,13 +906,13 @@ class R {
|
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
908
|
static singleCell(e, t) {
|
|
909
|
-
return new
|
|
909
|
+
return new A(e, t, e, t);
|
|
910
910
|
}
|
|
911
911
|
static singleRow(e) {
|
|
912
|
-
return new
|
|
912
|
+
return new A(e, 0, e, Number.MAX_SAFE_INTEGER);
|
|
913
913
|
}
|
|
914
914
|
static singleColumn(e) {
|
|
915
|
-
return new
|
|
915
|
+
return new A(0, e, Number.MAX_SAFE_INTEGER, e);
|
|
916
916
|
}
|
|
917
917
|
isInRange(e, t) {
|
|
918
918
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
@@ -934,7 +934,7 @@ class De {
|
|
|
934
934
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
935
935
|
const n = "gammaCells" in this.areaModel;
|
|
936
936
|
this.colAndRowspanRanges.push(
|
|
937
|
-
new
|
|
937
|
+
new A(o, s, o + r - 1, s + i - 1, n)
|
|
938
938
|
);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
@@ -1036,6 +1036,25 @@ class _e extends Te {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
), t && this.repaint();
|
|
1038
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
|
+
}
|
|
1039
1058
|
storeColumnWidths() {
|
|
1040
1059
|
const e = this.tableModel.getColumnDefs();
|
|
1041
1060
|
e != null && e.length && (this.storedColumnWidths = e.map((t, o) => this.tableModel.getColumnWidth(o)));
|
|
@@ -1105,46 +1124,46 @@ class _e extends Te {
|
|
|
1105
1124
|
p && p();
|
|
1106
1125
|
}
|
|
1107
1126
|
let u = t;
|
|
1108
|
-
const
|
|
1127
|
+
const m = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), f = this.tableModel.getFixedLeftColumnCount();
|
|
1109
1128
|
for (let p = 0; p < h; p++) {
|
|
1110
|
-
const C = u,
|
|
1111
|
-
if (C +
|
|
1129
|
+
const C = u, y = p === h - 1, R = this.tableModel.getRowHeight(e, p);
|
|
1130
|
+
if (C + R > 0) {
|
|
1112
1131
|
this.firstVisibleRowIndex = p;
|
|
1113
|
-
let
|
|
1114
|
-
const k =
|
|
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;
|
|
1115
1134
|
if (this.adjustColumnsToRowParent({
|
|
1116
1135
|
areaIdent: e,
|
|
1117
1136
|
sideIdent: "center",
|
|
1118
1137
|
areaModel: a,
|
|
1119
|
-
geo:
|
|
1138
|
+
geo: x,
|
|
1120
1139
|
parent: S,
|
|
1121
1140
|
rowIndex: p,
|
|
1122
1141
|
columnIndexStart: k,
|
|
1123
|
-
columnIndexEnd:
|
|
1142
|
+
columnIndexEnd: m - b - 1,
|
|
1124
1143
|
verticalFixed: !1,
|
|
1125
|
-
lastRowOfModel:
|
|
1126
|
-
}), 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({
|
|
1127
1146
|
areaIdent: e,
|
|
1128
1147
|
sideIdent: "west",
|
|
1129
1148
|
areaModel: a,
|
|
1130
|
-
geo:
|
|
1149
|
+
geo: x,
|
|
1131
1150
|
parent: S,
|
|
1132
1151
|
rowIndex: p,
|
|
1133
1152
|
columnIndexStart: 0,
|
|
1134
1153
|
columnIndexEnd: k - 1,
|
|
1135
1154
|
verticalFixed: !0,
|
|
1136
|
-
lastRowOfModel:
|
|
1137
|
-
})), 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({
|
|
1138
1157
|
areaIdent: e,
|
|
1139
1158
|
sideIdent: "east",
|
|
1140
1159
|
areaModel: a,
|
|
1141
|
-
geo:
|
|
1160
|
+
geo: x,
|
|
1142
1161
|
parent: S,
|
|
1143
1162
|
rowIndex: p,
|
|
1144
|
-
columnIndexStart:
|
|
1145
|
-
columnIndexEnd:
|
|
1163
|
+
columnIndexStart: m - b,
|
|
1164
|
+
columnIndexEnd: m - 1,
|
|
1146
1165
|
verticalFixed: !0,
|
|
1147
|
-
lastRowOfModel:
|
|
1166
|
+
lastRowOfModel: y
|
|
1148
1167
|
})), e === "header" && this.tree && p === h - 1) {
|
|
1149
1168
|
const M = this.dom.applyStyle(
|
|
1150
1169
|
this.dom.setAttribute(
|
|
@@ -1160,23 +1179,23 @@ class _e extends Te {
|
|
|
1160
1179
|
}
|
|
1161
1180
|
}
|
|
1162
1181
|
}
|
|
1163
|
-
if (u = u +
|
|
1182
|
+
if (u = u + R, u > r)
|
|
1164
1183
|
break;
|
|
1165
1184
|
}
|
|
1166
1185
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1167
1186
|
const p = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
1168
1187
|
if (p.length)
|
|
1169
1188
|
for (const C of p) {
|
|
1170
|
-
let
|
|
1171
|
-
if (C.c1 <
|
|
1172
|
-
|
|
1173
|
-
else if (
|
|
1174
|
-
|
|
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";
|
|
1175
1194
|
else {
|
|
1176
1195
|
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1177
|
-
|
|
1196
|
+
y = this.scrollFactorX * S - this.areaBodyWestGeo.width, x = "center";
|
|
1178
1197
|
}
|
|
1179
|
-
this.drawBigCell(C,
|
|
1198
|
+
this.drawBigCell(C, y, t, a, R, x);
|
|
1180
1199
|
}
|
|
1181
1200
|
}
|
|
1182
1201
|
}
|
|
@@ -1194,10 +1213,10 @@ class _e extends Te {
|
|
|
1194
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();
|
|
1195
1214
|
let a = 0;
|
|
1196
1215
|
d > 0 && e.c1 >= l - d && (a = l - d);
|
|
1197
|
-
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),
|
|
1198
|
-
let
|
|
1199
|
-
const
|
|
1200
|
-
|
|
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({
|
|
1201
1220
|
areaModel: s,
|
|
1202
1221
|
areaIdent: s.areaIdent,
|
|
1203
1222
|
sideIdent: r,
|
|
@@ -1205,10 +1224,10 @@ class _e extends Te {
|
|
|
1205
1224
|
columnIndex: e.c1,
|
|
1206
1225
|
left: h,
|
|
1207
1226
|
top: n,
|
|
1208
|
-
width:
|
|
1227
|
+
width: m,
|
|
1209
1228
|
height: u,
|
|
1210
1229
|
parent: i,
|
|
1211
|
-
cellSelected:
|
|
1230
|
+
cellSelected: b,
|
|
1212
1231
|
lastRowOfModel: !0,
|
|
1213
1232
|
gammaRange: e.gammaRange
|
|
1214
1233
|
}) : this.renderCell({
|
|
@@ -1219,10 +1238,10 @@ class _e extends Te {
|
|
|
1219
1238
|
columnIndex: e.c1,
|
|
1220
1239
|
left: h,
|
|
1221
1240
|
top: n,
|
|
1222
|
-
width:
|
|
1241
|
+
width: m,
|
|
1223
1242
|
height: u,
|
|
1224
1243
|
parent: i,
|
|
1225
|
-
cellSelected:
|
|
1244
|
+
cellSelected: b,
|
|
1226
1245
|
lastRowOfModel: !0,
|
|
1227
1246
|
gammaRange: e.gammaRange
|
|
1228
1247
|
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
@@ -1230,7 +1249,7 @@ class _e extends Te {
|
|
|
1230
1249
|
columnIndex: e.c1,
|
|
1231
1250
|
cellLeft: h,
|
|
1232
1251
|
cellTop: n,
|
|
1233
|
-
cellWidth:
|
|
1252
|
+
cellWidth: m,
|
|
1234
1253
|
cellHeight: u,
|
|
1235
1254
|
parent: i
|
|
1236
1255
|
});
|
|
@@ -1258,30 +1277,30 @@ class _e extends Te {
|
|
|
1258
1277
|
verticalFixed: d = !1,
|
|
1259
1278
|
lastRowOfModel: a = !1
|
|
1260
1279
|
}) {
|
|
1261
|
-
var
|
|
1280
|
+
var f;
|
|
1262
1281
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1263
1282
|
let h = 0;
|
|
1264
1283
|
if (!d) {
|
|
1265
1284
|
const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1266
1285
|
h = this.scrollFactorX * g;
|
|
1267
1286
|
}
|
|
1268
|
-
const u = 0,
|
|
1269
|
-
let
|
|
1287
|
+
const u = 0, m = !!(e === "body" && t);
|
|
1288
|
+
let b = h;
|
|
1270
1289
|
for (let g = n; g <= l; g++) {
|
|
1271
|
-
const p =
|
|
1290
|
+
const p = b, C = this.tableModel.getColumnWidth(g);
|
|
1272
1291
|
if (C > 0 && p + C > 0) {
|
|
1273
|
-
let
|
|
1274
|
-
const
|
|
1275
|
-
|
|
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));
|
|
1276
1295
|
let S = C;
|
|
1277
|
-
|
|
1296
|
+
x > 1 && (S = this.getColumnWidths(g, g + x - 1).reduce((M, E) => M + E, 0));
|
|
1278
1297
|
let k = !1;
|
|
1279
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1280
|
-
this.renderDragTargetDiv(i, p, u, S,
|
|
1281
|
-
const M = { left: p, top: u, width: S, height:
|
|
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 };
|
|
1282
1301
|
this.dom.addColumnBorderDivs(this.tableOptions, i, M, e, t);
|
|
1283
1302
|
} else {
|
|
1284
|
-
const M = this.renderSelectedBackgroundDiv(k,
|
|
1303
|
+
const M = this.renderSelectedBackgroundDiv(k, m, t, o, r, g, i, p, u, S, y);
|
|
1285
1304
|
"gammaCells" in o && o.getValueAt(r, g) && (k = !1), k || this.renderCell({
|
|
1286
1305
|
areaModel: o,
|
|
1287
1306
|
areaIdent: e,
|
|
@@ -1291,7 +1310,7 @@ class _e extends Te {
|
|
|
1291
1310
|
left: p,
|
|
1292
1311
|
top: u,
|
|
1293
1312
|
width: S,
|
|
1294
|
-
height:
|
|
1313
|
+
height: y,
|
|
1295
1314
|
parent: i,
|
|
1296
1315
|
cellSelected: M,
|
|
1297
1316
|
lastRowOfModel: a,
|
|
@@ -1302,15 +1321,15 @@ class _e extends Te {
|
|
|
1302
1321
|
cellLeft: p,
|
|
1303
1322
|
cellTop: u,
|
|
1304
1323
|
cellWidth: S,
|
|
1305
|
-
cellHeight:
|
|
1324
|
+
cellHeight: y,
|
|
1306
1325
|
parent: i
|
|
1307
1326
|
});
|
|
1308
1327
|
}
|
|
1309
1328
|
}
|
|
1310
|
-
if (
|
|
1329
|
+
if (b = b + C, b > this.areaBodyCenterGeo.width)
|
|
1311
1330
|
break;
|
|
1312
1331
|
}
|
|
1313
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(
|
|
1332
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
|
|
1314
1333
|
}
|
|
1315
1334
|
getTreeArrowColumnIndex() {
|
|
1316
1335
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1329,29 +1348,29 @@ class _e extends Te {
|
|
|
1329
1348
|
lastRowOfModel: h
|
|
1330
1349
|
}) {
|
|
1331
1350
|
var te;
|
|
1332
|
-
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);
|
|
1333
1352
|
let g = "none";
|
|
1334
|
-
if (i === this.getTreeArrowColumnIndex() && L(
|
|
1335
|
-
const
|
|
1336
|
-
(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";
|
|
1337
1356
|
}
|
|
1338
1357
|
let C;
|
|
1339
1358
|
if (t === "header") {
|
|
1340
|
-
const
|
|
1341
|
-
(!(
|
|
1359
|
+
const v = this.tableModel.getColumnDef(i);
|
|
1360
|
+
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (C = v == null ? void 0 : v.sortState);
|
|
1342
1361
|
}
|
|
1343
|
-
const
|
|
1362
|
+
const y = e.getValueAt(s, i), R = m ? "" : `${y}`, x = e.isRowChecked(s), S = this.dom.addColumnDiv(
|
|
1344
1363
|
{
|
|
1345
1364
|
parent: a,
|
|
1346
|
-
geo:
|
|
1365
|
+
geo: b,
|
|
1347
1366
|
rowIndex: s,
|
|
1348
1367
|
columnIndex: i,
|
|
1349
1368
|
areaIdent: t,
|
|
1350
1369
|
sideIdent: o,
|
|
1351
|
-
text:
|
|
1370
|
+
text: R,
|
|
1352
1371
|
treeArrow: g,
|
|
1353
1372
|
tableOptions: this.tableOptions,
|
|
1354
|
-
checkedType:
|
|
1373
|
+
checkedType: x,
|
|
1355
1374
|
sortState: C
|
|
1356
1375
|
}
|
|
1357
1376
|
), k = e.getTooltipAt(s, i);
|
|
@@ -1359,17 +1378,17 @@ class _e extends Te {
|
|
|
1359
1378
|
const M = this.tableModel.getColumnDef(i);
|
|
1360
1379
|
M && M.classes[t] && this.dom.addClasses(M.classes[t], S);
|
|
1361
1380
|
let E;
|
|
1362
|
-
|
|
1381
|
+
m && (E = m.render(S, s, i, t, e, y, this.dom.domService));
|
|
1363
1382
|
const B = e.getCustomClassesAt(s, i);
|
|
1364
|
-
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, a,
|
|
1365
|
-
const
|
|
1366
|
-
|
|
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, {});
|
|
1367
1386
|
}
|
|
1368
1387
|
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1369
1388
|
const G = e.getCustomStyleAt(s, i);
|
|
1370
1389
|
if (G)
|
|
1371
|
-
for (const
|
|
1372
|
-
this.dom.setStyle(S,
|
|
1390
|
+
for (const v in G)
|
|
1391
|
+
this.dom.setStyle(S, v, G[v]);
|
|
1373
1392
|
return [S, E];
|
|
1374
1393
|
}
|
|
1375
1394
|
applyCssClasses(e, t = {}) {
|
|
@@ -1377,25 +1396,6 @@ class _e extends Te {
|
|
|
1377
1396
|
s ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
|
|
1378
1397
|
});
|
|
1379
1398
|
}
|
|
1380
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1381
|
-
const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1382
|
-
if (l) {
|
|
1383
|
-
let d;
|
|
1384
|
-
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1385
|
-
if (l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1386
|
-
d = h.render(l, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1387
|
-
else {
|
|
1388
|
-
const f = `${s}`;
|
|
1389
|
-
this.dom.addLabelDiv(l, f, !1, t, o, e);
|
|
1390
|
-
}
|
|
1391
|
-
const u = r.getCustomClassesAt(t, o);
|
|
1392
|
-
u.length && this.dom.addClasses(u, l);
|
|
1393
|
-
const w = r.getCustomStyleAt(t, o);
|
|
1394
|
-
if (w)
|
|
1395
|
-
for (const f in w)
|
|
1396
|
-
this.dom.setStyle(l, f, w[f]);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
1399
|
getColumnWidths(e, t) {
|
|
1400
1400
|
const o = [];
|
|
1401
1401
|
for (let s = e; s <= t; s++)
|
|
@@ -1444,27 +1444,65 @@ class _e extends Te {
|
|
|
1444
1444
|
display: "none"
|
|
1445
1445
|
});
|
|
1446
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
|
+
*/
|
|
1447
1455
|
debounce(e, t = 1e3) {
|
|
1448
1456
|
this.debounceTimeout && clearTimeout(this.debounceTimeout), this.debounceTimeout = setTimeout(e.bind(this), t);
|
|
1449
1457
|
}
|
|
1450
|
-
adjustDraggingColumn(e, t) {
|
|
1451
|
-
var
|
|
1458
|
+
adjustDraggingColumn(e, t, o) {
|
|
1459
|
+
var s, i;
|
|
1452
1460
|
if (this.dragging) {
|
|
1453
|
-
const
|
|
1454
|
-
if ((
|
|
1455
|
-
const
|
|
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 };
|
|
1456
1464
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1457
1465
|
background: "rgba(128,128,128,0.2)",
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
height: i + "px",
|
|
1462
|
-
display: "block"
|
|
1463
|
-
});
|
|
1466
|
+
display: "block",
|
|
1467
|
+
overfllow: "clip"
|
|
1468
|
+
}), this.dom.applyStyleInPx(this.draggingColumn, a), o && this.renderContentOfDraggingColumn(a);
|
|
1464
1469
|
}
|
|
1465
1470
|
} else
|
|
1466
1471
|
this.hideDraggingColumn();
|
|
1467
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
|
+
}
|
|
1468
1506
|
hideDraggingColumn() {
|
|
1469
1507
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1470
1508
|
display: "none"
|
|
@@ -1479,11 +1517,11 @@ class _e extends Te {
|
|
|
1479
1517
|
renderSelectedBackgroundDiv(e, t, o, s, i, r, n, l, d, a, h) {
|
|
1480
1518
|
let u = !1;
|
|
1481
1519
|
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1482
|
-
const
|
|
1483
|
-
if (
|
|
1484
|
-
const
|
|
1485
|
-
u =
|
|
1486
|
-
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++) {
|
|
1487
1525
|
const g = this.dom.applyStylePosistionAbsolute(
|
|
1488
1526
|
// ge-table-body-west-selected-range
|
|
1489
1527
|
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, n)
|
|
@@ -1508,7 +1546,7 @@ class _e extends Te {
|
|
|
1508
1546
|
cellSelected: h,
|
|
1509
1547
|
lastRowOfModel: u
|
|
1510
1548
|
}) {
|
|
1511
|
-
const [
|
|
1549
|
+
const [m, b] = this.addAndRenderCellDiv({
|
|
1512
1550
|
areaModel: e,
|
|
1513
1551
|
areaIdent: t,
|
|
1514
1552
|
sideIdent: o,
|
|
@@ -1521,7 +1559,7 @@ class _e extends Te {
|
|
|
1521
1559
|
parent: a,
|
|
1522
1560
|
lastRowOfModel: u
|
|
1523
1561
|
});
|
|
1524
|
-
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);
|
|
1525
1563
|
}
|
|
1526
1564
|
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: n }) {
|
|
1527
1565
|
const l = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = l.createElement("div");
|
|
@@ -1555,7 +1593,7 @@ class Oe {
|
|
|
1555
1593
|
}
|
|
1556
1594
|
}
|
|
1557
1595
|
}
|
|
1558
|
-
class
|
|
1596
|
+
class Fe {
|
|
1559
1597
|
constructor(e = -1, t = -1) {
|
|
1560
1598
|
this.rowIndex = e, this.columnIndex = t;
|
|
1561
1599
|
}
|
|
@@ -1565,10 +1603,10 @@ class J {
|
|
|
1565
1603
|
this.cells = e;
|
|
1566
1604
|
}
|
|
1567
1605
|
static createSingle(e, t) {
|
|
1568
|
-
return new J([new
|
|
1606
|
+
return new J([new Fe(e, t)]);
|
|
1569
1607
|
}
|
|
1570
1608
|
}
|
|
1571
|
-
class
|
|
1609
|
+
class Pe {
|
|
1572
1610
|
constructor(e) {
|
|
1573
1611
|
var t, o;
|
|
1574
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);
|
|
@@ -1577,8 +1615,8 @@ class Fe {
|
|
|
1577
1615
|
var i, r, n, l, d, a, h;
|
|
1578
1616
|
let o = !1, s = !1;
|
|
1579
1617
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1580
|
-
const u = this.getSelectionModel(),
|
|
1581
|
-
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));
|
|
1582
1620
|
}
|
|
1583
1621
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1584
1622
|
}
|
|
@@ -1601,7 +1639,7 @@ class Fe {
|
|
|
1601
1639
|
createRangeByEvents(e, t) {
|
|
1602
1640
|
t || (t = e);
|
|
1603
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);
|
|
1604
|
-
return
|
|
1642
|
+
return A.create({
|
|
1605
1643
|
rowIndex1: o,
|
|
1606
1644
|
columnIndex1: i,
|
|
1607
1645
|
rowIndex2: s,
|
|
@@ -1793,7 +1831,7 @@ class Ge {
|
|
|
1793
1831
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1794
1832
|
}
|
|
1795
1833
|
firstClick(e, t) {
|
|
1796
|
-
this.selectionType === "row" ? this.addRange(
|
|
1834
|
+
this.selectionType === "row" ? this.addRange(A.singleRow(e)) : this.selectionType === "column" && this.addRange(A.singleColumn(t));
|
|
1797
1835
|
}
|
|
1798
1836
|
getSelectionCount(e, t) {
|
|
1799
1837
|
let o = 0;
|
|
@@ -1826,10 +1864,10 @@ class Ge {
|
|
|
1826
1864
|
if (this.selectionType === "none")
|
|
1827
1865
|
return;
|
|
1828
1866
|
let t = e;
|
|
1829
|
-
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);
|
|
1830
1868
|
}
|
|
1831
1869
|
togglePoint(e, t) {
|
|
1832
|
-
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));
|
|
1833
1871
|
}
|
|
1834
1872
|
isSelected(e, t) {
|
|
1835
1873
|
return this.getSelectionCount(e, t) > 0;
|
|
@@ -1963,7 +2001,7 @@ const Z = class X {
|
|
|
1963
2001
|
mergeRanges(e) {
|
|
1964
2002
|
let t;
|
|
1965
2003
|
for (const o of e)
|
|
1966
|
-
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);
|
|
1967
2005
|
return t;
|
|
1968
2006
|
}
|
|
1969
2007
|
};
|
|
@@ -1977,9 +2015,9 @@ class be extends _e {
|
|
|
1977
2015
|
if (super(
|
|
1978
2016
|
e,
|
|
1979
2017
|
t,
|
|
1980
|
-
new
|
|
2018
|
+
new ye(o),
|
|
1981
2019
|
s
|
|
1982
|
-
), 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) {
|
|
1983
2021
|
const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
|
|
1984
2022
|
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Me(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ie(d)), l.autoRestoreSortingState && (this.storeSortingService = new ke(d)));
|
|
1985
2023
|
}
|
|
@@ -2082,7 +2120,7 @@ class be extends _e {
|
|
|
2082
2120
|
* @return {void}
|
|
2083
2121
|
*/
|
|
2084
2122
|
onMouseDown(e) {
|
|
2085
|
-
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));
|
|
2086
2124
|
}
|
|
2087
2125
|
/**
|
|
2088
2126
|
* Handles mouse dragging on the frame.
|
|
@@ -2091,7 +2129,7 @@ class be extends _e {
|
|
|
2091
2129
|
* @param startMouseEvent
|
|
2092
2130
|
*/
|
|
2093
2131
|
mouseDraggingOnFrame(e, t) {
|
|
2094
|
-
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.repaint());
|
|
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());
|
|
2095
2133
|
}
|
|
2096
2134
|
/**
|
|
2097
2135
|
* Handles the end of mouse dragging event on a frame.
|
|
@@ -2101,7 +2139,7 @@ class be extends _e {
|
|
|
2101
2139
|
* @returns {void}
|
|
2102
2140
|
*/
|
|
2103
2141
|
mouseDraggingEndOnFrame(e) {
|
|
2104
|
-
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.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 = "";
|
|
2105
2143
|
}
|
|
2106
2144
|
/**
|
|
2107
2145
|
* Handles the mouse move event.
|
|
@@ -2634,15 +2672,15 @@ class H {
|
|
|
2634
2672
|
this.header = e, this.body = t, this.footer = o;
|
|
2635
2673
|
}
|
|
2636
2674
|
}
|
|
2637
|
-
class
|
|
2675
|
+
class w {
|
|
2638
2676
|
constructor(e = 100, t = "px") {
|
|
2639
2677
|
this.value = e, this.unit = t;
|
|
2640
2678
|
}
|
|
2641
2679
|
}
|
|
2642
2680
|
const Xe = () => !0, re = () => !1;
|
|
2643
2681
|
class V {
|
|
2644
|
-
constructor(e, t, o = new
|
|
2645
|
-
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;
|
|
2646
2684
|
}
|
|
2647
2685
|
static bodyRenderer(e) {
|
|
2648
2686
|
return new T(
|
|
@@ -2664,11 +2702,11 @@ class V {
|
|
|
2664
2702
|
return new V(
|
|
2665
2703
|
e.property ?? "",
|
|
2666
2704
|
e.headerLabel ?? "",
|
|
2667
|
-
e.width ?? new
|
|
2705
|
+
e.width ?? new w(100, "px"),
|
|
2668
2706
|
o,
|
|
2669
2707
|
t,
|
|
2670
|
-
e.minWidth ?? new
|
|
2671
|
-
e.maxWidth ?? new
|
|
2708
|
+
e.minWidth ?? new w(100, "px"),
|
|
2709
|
+
e.maxWidth ?? new w(100, "px"),
|
|
2672
2710
|
e.sortable,
|
|
2673
2711
|
e.sortComparator,
|
|
2674
2712
|
e.sortState,
|
|
@@ -2681,7 +2719,7 @@ class V {
|
|
|
2681
2719
|
);
|
|
2682
2720
|
}
|
|
2683
2721
|
}
|
|
2684
|
-
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");
|
|
2685
2723
|
class ee {
|
|
2686
2724
|
constructor(e, t = [], o = -1) {
|
|
2687
2725
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
|
|
@@ -3108,10 +3146,10 @@ class Ke {
|
|
|
3108
3146
|
}
|
|
3109
3147
|
}
|
|
3110
3148
|
class N {
|
|
3111
|
-
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 = () => {
|
|
3112
3150
|
}) {
|
|
3113
|
-
var
|
|
3114
|
-
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());
|
|
3115
3153
|
}
|
|
3116
3154
|
init() {
|
|
3117
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();
|
|
@@ -3466,6 +3504,9 @@ class Ue extends ee {
|
|
|
3466
3504
|
constructor(e, t, o, s = []) {
|
|
3467
3505
|
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new me(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
|
|
3468
3506
|
}
|
|
3507
|
+
setRows(e) {
|
|
3508
|
+
this.rows = e, this.filteredRows = [...e];
|
|
3509
|
+
}
|
|
3469
3510
|
getRowCount() {
|
|
3470
3511
|
var e;
|
|
3471
3512
|
return ((e = this.filteredRows) == null ? void 0 : e.length) ?? 0;
|
|
@@ -3525,9 +3566,9 @@ class he extends Ue {
|
|
|
3525
3566
|
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = s;
|
|
3526
3567
|
}
|
|
3527
3568
|
}
|
|
3528
|
-
class
|
|
3569
|
+
class F {
|
|
3529
3570
|
static createTableModel(e) {
|
|
3530
|
-
var t, o, s, i, r, n, l, d, a, h, u,
|
|
3571
|
+
var t, o, s, i, r, n, l, d, a, h, u, m, b, f;
|
|
3531
3572
|
if (e.defaultRowHeights === void 0)
|
|
3532
3573
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
3533
3574
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
@@ -3569,7 +3610,7 @@ class P {
|
|
|
3569
3610
|
g,
|
|
3570
3611
|
e.defaultRowHeights.body,
|
|
3571
3612
|
e.columnDefs
|
|
3572
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (
|
|
3613
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new ae(g));
|
|
3573
3614
|
} else
|
|
3574
3615
|
e.bodyAreaModel = new he(
|
|
3575
3616
|
"body",
|
|
@@ -3583,7 +3624,7 @@ class P {
|
|
|
3583
3624
|
e.bodyData,
|
|
3584
3625
|
e.defaultRowHeights.body
|
|
3585
3626
|
) : e.bodyAreaModel = new _("body");
|
|
3586
|
-
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 && ((
|
|
3627
|
+
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(
|
|
3587
3628
|
e.headerAreaModel,
|
|
3588
3629
|
e.bodyAreaModel,
|
|
3589
3630
|
e.footerAreaModel,
|
|
@@ -3600,7 +3641,7 @@ class P {
|
|
|
3600
3641
|
);
|
|
3601
3642
|
}
|
|
3602
3643
|
static buildByTypedRowsParam(e) {
|
|
3603
|
-
return
|
|
3644
|
+
return F.buildByTypedRows(
|
|
3604
3645
|
e.rows ?? [],
|
|
3605
3646
|
e.columnDefs,
|
|
3606
3647
|
e.tableOptions ?? new j(),
|
|
@@ -3617,7 +3658,7 @@ class P {
|
|
|
3617
3658
|
r.body,
|
|
3618
3659
|
t
|
|
3619
3660
|
);
|
|
3620
|
-
return (n || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ae(l)),
|
|
3661
|
+
return (n || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ae(l)), F.createByAreaModelsParam({
|
|
3621
3662
|
headerAreaModel: new D("header", [t.map((a) => a.headerLabel)], r.header),
|
|
3622
3663
|
bodyAreaModel: d,
|
|
3623
3664
|
footerAreaModel: new D("footer", [], r.footer),
|
|
@@ -3631,7 +3672,7 @@ class P {
|
|
|
3631
3672
|
overridingColumnWidth: -1
|
|
3632
3673
|
});
|
|
3633
3674
|
}
|
|
3634
|
-
return
|
|
3675
|
+
return F.createByObjectArrayParam({
|
|
3635
3676
|
rows: e,
|
|
3636
3677
|
columnDefs: t,
|
|
3637
3678
|
fixedLeftColumnCount: s,
|
|
@@ -3641,7 +3682,7 @@ class P {
|
|
|
3641
3682
|
}
|
|
3642
3683
|
static createByObjectArrayParam(e) {
|
|
3643
3684
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
3644
|
-
return
|
|
3685
|
+
return F.createByObjectArray(
|
|
3645
3686
|
e.rows,
|
|
3646
3687
|
e.header ?? [],
|
|
3647
3688
|
e.footer ?? [],
|
|
@@ -3669,7 +3710,7 @@ class P {
|
|
|
3669
3710
|
);
|
|
3670
3711
|
}
|
|
3671
3712
|
static createByAreaModelsParam(e) {
|
|
3672
|
-
return
|
|
3713
|
+
return F.createByAreaModels(
|
|
3673
3714
|
e.headerAreaModel ?? new _(),
|
|
3674
3715
|
e.bodyAreaModel,
|
|
3675
3716
|
e.footerAreaModel ?? new _(),
|
|
@@ -3685,7 +3726,7 @@ class P {
|
|
|
3685
3726
|
}
|
|
3686
3727
|
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, n = new H(), l, d = []) {
|
|
3687
3728
|
let a;
|
|
3688
|
-
t != null && t.length ? a = new D("header", t, n.header, l) : l != null && l.length ? a = new D("header", [l.map((
|
|
3729
|
+
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 _();
|
|
3689
3730
|
const h = o ? new D("footer", o, n.footer, l) : new _(), u = new he("body", e, l, n.body);
|
|
3690
3731
|
return new N(
|
|
3691
3732
|
a,
|
|
@@ -3751,7 +3792,7 @@ class Ot {
|
|
|
3751
3792
|
this.index = e, this.px = t;
|
|
3752
3793
|
}
|
|
3753
3794
|
}
|
|
3754
|
-
const
|
|
3795
|
+
const Ft = { body: ["ge-table-text-align-left"] }, Pt = { body: ["ge-table-text-align-center"] }, Lt = { body: ["ge-table-text-align-right"] }, Ht = {
|
|
3755
3796
|
header: ["ge-table-text-align-left"],
|
|
3756
3797
|
body: ["ge-table-text-align-left"],
|
|
3757
3798
|
footer: ["ge-table-text-align-left"]
|
|
@@ -3784,7 +3825,7 @@ class ce {
|
|
|
3784
3825
|
}
|
|
3785
3826
|
class Wt {
|
|
3786
3827
|
constructor() {
|
|
3787
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new
|
|
3828
|
+
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(
|
|
3788
3829
|
[],
|
|
3789
3830
|
["ge-table-text-align-left"],
|
|
3790
3831
|
[]
|
|
@@ -4303,7 +4344,7 @@ class qt {
|
|
|
4303
4344
|
${h}
|
|
4304
4345
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
4305
4346
|
const u = e.querySelector(".ge-input-checkbox");
|
|
4306
|
-
u && u.addEventListener("click", (
|
|
4347
|
+
u && u.addEventListener("click", (m, b) => (l[this.property] = !l[this.property], !0));
|
|
4307
4348
|
}
|
|
4308
4349
|
}
|
|
4309
4350
|
}
|
|
@@ -4544,7 +4585,7 @@ export {
|
|
|
4544
4585
|
Qe as CellGroup,
|
|
4545
4586
|
Ze as CellGroupExt,
|
|
4546
4587
|
et as CellGroupExtCellRenderer,
|
|
4547
|
-
|
|
4588
|
+
A as CellRange,
|
|
4548
4589
|
I as CellgroupFactory,
|
|
4549
4590
|
qt as CheckboxBooleanPropertyCellRenderer,
|
|
4550
4591
|
ce as CheckboxCellRenderer,
|
|
@@ -4555,7 +4596,7 @@ export {
|
|
|
4555
4596
|
Ee as CollapsedExpandedData,
|
|
4556
4597
|
ho as ColorRgb,
|
|
4557
4598
|
V as ColumnDef,
|
|
4558
|
-
|
|
4599
|
+
ye as ConvenienceDomService,
|
|
4559
4600
|
se as CopyService,
|
|
4560
4601
|
fe as CssVars,
|
|
4561
4602
|
Qt as DateToIntlDDMMYYYYCellRenderer,
|
|
@@ -4567,7 +4608,7 @@ export {
|
|
|
4567
4608
|
oe as EventAdapter,
|
|
4568
4609
|
re as FalseFn,
|
|
4569
4610
|
Ne as FocusModel,
|
|
4570
|
-
|
|
4611
|
+
Fe as GeCellIndices,
|
|
4571
4612
|
W as GeCssColorUtil,
|
|
4572
4613
|
Kt as GeFilterService,
|
|
4573
4614
|
Nt as GeKeyEvent,
|
|
@@ -4578,7 +4619,7 @@ export {
|
|
|
4578
4619
|
Ot as IndexAndPx,
|
|
4579
4620
|
We as InputCellRenderer,
|
|
4580
4621
|
Oe as InputHandler,
|
|
4581
|
-
|
|
4622
|
+
P as LicenseManager,
|
|
4582
4623
|
eo as MaleFemaleToIconCellRenderer,
|
|
4583
4624
|
Re as MouseHandler,
|
|
4584
4625
|
ve as MouseTargetData,
|
|
@@ -4593,10 +4634,10 @@ export {
|
|
|
4593
4634
|
qe as RequestChunk,
|
|
4594
4635
|
xe as SelectCellRenderer,
|
|
4595
4636
|
Ge as SelectionModel,
|
|
4596
|
-
|
|
4637
|
+
Pe as SelectionService,
|
|
4597
4638
|
Ve as ShortcutService,
|
|
4598
4639
|
Be as SimpleDomService,
|
|
4599
|
-
|
|
4640
|
+
w as Size,
|
|
4600
4641
|
$e as SortItem,
|
|
4601
4642
|
pe as SortedOptions,
|
|
4602
4643
|
ro as StarRatingCellRenderer,
|
|
@@ -4605,7 +4646,7 @@ export {
|
|
|
4605
4646
|
ke as StoreStateSortingService,
|
|
4606
4647
|
Ae as TableApi,
|
|
4607
4648
|
zt as TableCellUpdateEvent,
|
|
4608
|
-
|
|
4649
|
+
F as TableFactory,
|
|
4609
4650
|
N as TableModel,
|
|
4610
4651
|
_t as TableModelAndOptions,
|
|
4611
4652
|
j as TableOptions,
|
|
@@ -4625,13 +4666,13 @@ export {
|
|
|
4625
4666
|
Vt as allCenter,
|
|
4626
4667
|
Ht as allLeft,
|
|
4627
4668
|
Bt as allRight,
|
|
4628
|
-
|
|
4629
|
-
|
|
4669
|
+
Pt as bodyCenter,
|
|
4670
|
+
Ft as bodyLeft,
|
|
4630
4671
|
Lt as bodyRight,
|
|
4631
4672
|
ao as editInputPipeForNumber,
|
|
4632
4673
|
U as getAreaIdentByString,
|
|
4633
4674
|
z as isAreaModelTree,
|
|
4634
|
-
|
|
4675
|
+
Ce as isCheckboxColumnDef,
|
|
4635
4676
|
L as isTreeRow,
|
|
4636
4677
|
Tt as px0,
|
|
4637
4678
|
kt as px10,
|
|
@@ -4662,6 +4703,6 @@ export {
|
|
|
4662
4703
|
At as px50,
|
|
4663
4704
|
Rt as px60,
|
|
4664
4705
|
vt as px70,
|
|
4665
|
-
|
|
4666
|
-
|
|
4706
|
+
yt as px80,
|
|
4707
|
+
Ct as px90
|
|
4667
4708
|
};
|