@guiexpert/react-table 18.0.2 → 18.0.4
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/.eslintrc.json +34 -0
- package/dist/README.md +102 -0
- package/dist/index.cjs +254 -0
- package/{index.js → dist/index.js} +157 -137
- package/{lib → dist/lib}/component-renderer-wrapper.d.ts +1 -1
- package/{lib → dist/lib}/guiexpert-table.d.ts +1 -1
- package/dist/package.json +45 -0
- package/jest.config.ts +11 -0
- package/package.json +29 -3
- package/patch.js +16 -0
- package/src/index.ts +2 -0
- package/src/lib/component-renderer-wrapper.ts +39 -0
- package/src/lib/guiexpert-table.tsx +168 -0
- package/src/lib/react-table.module.css +8 -0
- package/src/lib/react-table.spec.tsx +6 -0
- package/tsconfig.json +23 -0
- package/tsconfig.lib.json +30 -0
- package/tsconfig.spec.json +23 -0
- package/vite.config.ts +69 -0
- package/index.cjs +0 -254
- /package/{index.d.ts → dist/index.d.ts} +0 -0
|
@@ -33,8 +33,8 @@ function W(p) {
|
|
|
33
33
|
return p && p.type === "AreaModelTree";
|
|
34
34
|
}
|
|
35
35
|
class _ {
|
|
36
|
-
constructor(e = -1, t = -1, o = -1, s = -1, i, r, a, l = 0, n = 0, d = 0,
|
|
37
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = a, this.clickCount = l, this.draggingX = n, this.draggingY = d, this.action =
|
|
36
|
+
constructor(e = -1, t = -1, o = -1, s = -1, i, r, a, l = 0, n = 0, d = 0, h = "") {
|
|
37
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = a, this.clickCount = l, this.draggingX = n, this.draggingY = d, this.action = h;
|
|
38
38
|
}
|
|
39
39
|
clone() {
|
|
40
40
|
return new _(
|
|
@@ -169,14 +169,14 @@ class le {
|
|
|
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: a, text: l = "", treeArrow: n, tableOptions: d, checkedType:
|
|
172
|
+
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: l = "", treeArrow: n, tableOptions: d, checkedType: h = void 0, sortState: c } = e, f = d == null ? void 0 : d.treeOptions, u = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, S = this.domService.createElement("div");
|
|
173
173
|
this.domService.addClass(S, "ge-table-col-div"), this.domService.addClass(S, `ge-table-col-div-${o.index}`), this.domService.setAttribute(S, "data-col-index", `${o.index}`), this.domService.setAttribute(S, "data-row-index", `${s}`), this.domService.setAttribute(S, "data-area", `${r}`);
|
|
174
174
|
const b = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
175
|
-
if (r === "body" && a === "center" && this.domService.addClass(S, `ge-table-column-${b}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${o.left}px`), this.domService.setStyle(S, "top", `${o.top}px`), this.domService.setStyle(S, "width", `${o.width}px`), this.domService.setStyle(S, "height", `${o.height}px`), n && n !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, n, f, s, i, r)), u && i === 0 &&
|
|
175
|
+
if (r === "body" && a === "center" && this.domService.addClass(S, `ge-table-column-${b}`), this.domService.setStyle(S, "display", "clip"), this.domService.setStyle(S, "position", "absolute"), this.domService.setStyle(S, "left", `${o.left}px`), this.domService.setStyle(S, "top", `${o.top}px`), this.domService.setStyle(S, "width", `${o.width}px`), this.domService.setStyle(S, "height", `${o.height}px`), n && n !== "none" && (this.domService.addClass(S, "ge-table-col-tree"), this.addArrowDiv(S, n, f, s, i, r)), u && i === 0 && h && this.addCheckboxToDiv(S, h, r, s), l) {
|
|
176
176
|
const g = n !== "none" && i === 0;
|
|
177
177
|
this.addLabelDiv(S, l, g, s, i, r);
|
|
178
178
|
}
|
|
179
|
-
return
|
|
179
|
+
return c && this.addSortedIcon(S, c, d == null ? void 0 : d.sortedOptions, i), this.domService.appendChild(t, S), S;
|
|
180
180
|
}
|
|
181
181
|
addCheckboxToDiv(e, t, o, s) {
|
|
182
182
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -221,8 +221,8 @@ class le {
|
|
|
221
221
|
t === "expanded" ? l = o.arrowExpanded : t === "collapsed" ? l = o.arrowCollapsed : l = o.arrowPlaceholder;
|
|
222
222
|
const n = l.content, d = this.domService.createText(n);
|
|
223
223
|
this.domService.appendChild(a, d), l.style && this.applyStyleString(a, l.style);
|
|
224
|
-
for (const
|
|
225
|
-
this.domService.addClass(a,
|
|
224
|
+
for (const h of l.classes)
|
|
225
|
+
this.domService.addClass(a, h);
|
|
226
226
|
return this.domService.appendChild(e, a), a;
|
|
227
227
|
}
|
|
228
228
|
addColumnBorderDivs(e, t, o, s, i) {
|
|
@@ -317,7 +317,7 @@ class ne {
|
|
|
317
317
|
this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
318
318
|
else if (P(o.row) && o.areaModel) {
|
|
319
319
|
const s = o.colIdx === this.getArrowColumnIndex() && e.altKey, i = o.className.includes("ge-table-tree-arrow-div");
|
|
320
|
-
if (
|
|
320
|
+
if (s || i) {
|
|
321
321
|
e.preventDefault(), e.stopPropagation();
|
|
322
322
|
const r = o.row;
|
|
323
323
|
r.expanded = !r.expanded, "recalcVisibleTreeRows" in o.areaModel && o.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
@@ -373,8 +373,8 @@ class ne {
|
|
|
373
373
|
var o, s, i, r, a;
|
|
374
374
|
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
375
375
|
if (t) {
|
|
376
|
-
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, n = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, d = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded,
|
|
377
|
-
n ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(
|
|
376
|
+
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, n = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, d = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, h = t(e.data);
|
|
377
|
+
n ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : d && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(h));
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
getArrowColumnIndex() {
|
|
@@ -670,7 +670,7 @@ class z {
|
|
|
670
670
|
// }
|
|
671
671
|
// }
|
|
672
672
|
}
|
|
673
|
-
class
|
|
673
|
+
class he extends z {
|
|
674
674
|
constructor(e) {
|
|
675
675
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
676
676
|
}
|
|
@@ -692,14 +692,14 @@ class ce extends z {
|
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
class
|
|
695
|
+
class ce {
|
|
696
696
|
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
697
697
|
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
class ge extends z {
|
|
701
701
|
constructor(e) {
|
|
702
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
702
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new ce(), this.load();
|
|
703
703
|
}
|
|
704
704
|
collapsedExpandedStateGet() {
|
|
705
705
|
return this.collapsedExpandedState;
|
|
@@ -1140,15 +1140,15 @@ class fe extends be {
|
|
|
1140
1140
|
const r = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(a);
|
|
1141
1141
|
if (l) {
|
|
1142
1142
|
let n;
|
|
1143
|
-
const
|
|
1144
|
-
if (l.innerText = "", this.applyCssClasses(l, i),
|
|
1145
|
-
n =
|
|
1143
|
+
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1144
|
+
if (l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1145
|
+
n = h.render(l, t, o, e, r, s, this.dom.domService), n && this.cleanupFunctions[e].push(n);
|
|
1146
1146
|
else {
|
|
1147
1147
|
const u = `${s}`;
|
|
1148
1148
|
this.dom.addLabelDiv(l, u, !1, t, o, e);
|
|
1149
1149
|
}
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1150
|
+
const c = r.getCustomClassesAt(t, o);
|
|
1151
|
+
c.length && this.dom.addClasses(c, l);
|
|
1152
1152
|
const f = r.getCustomStyleAt(t, o);
|
|
1153
1153
|
if (f)
|
|
1154
1154
|
for (const u in f)
|
|
@@ -1264,53 +1264,53 @@ class fe extends be {
|
|
|
1264
1264
|
var b;
|
|
1265
1265
|
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
|
|
1266
1266
|
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
1267
|
-
const a = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e),
|
|
1267
|
+
const a = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), h = d.getRowCount();
|
|
1268
1268
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1269
1269
|
const g = this.cleanupFunctions[e].shift();
|
|
1270
1270
|
g && g();
|
|
1271
1271
|
}
|
|
1272
|
-
let
|
|
1272
|
+
let c = t;
|
|
1273
1273
|
const f = this.tableModel.getColumnCount(), u = this.tableModel.getFixedRightColumnCount(), S = this.tableModel.getFixedLeftColumnCount();
|
|
1274
|
-
for (let g = 0; g <
|
|
1275
|
-
const v =
|
|
1274
|
+
for (let g = 0; g < h; g++) {
|
|
1275
|
+
const v = c, m = g === h - 1, x = this.tableModel.getRowHeight(e, g);
|
|
1276
1276
|
if (v + x > 0) {
|
|
1277
1277
|
this.firstVisibleRowIndex = g;
|
|
1278
|
-
let
|
|
1278
|
+
let C = { left: a, width: l, height: x, top: v, index: g }, y = this.dom.addRowDiv(s, C, g, e, "center");
|
|
1279
1279
|
const R = S;
|
|
1280
1280
|
if (this.adjustColumnsToRowParent({
|
|
1281
1281
|
areaIdent: e,
|
|
1282
1282
|
sideIdent: "center",
|
|
1283
1283
|
areaModel: d,
|
|
1284
|
-
geo:
|
|
1284
|
+
geo: C,
|
|
1285
1285
|
parent: y,
|
|
1286
1286
|
rowIndex: g,
|
|
1287
1287
|
columnIndexStart: R,
|
|
1288
1288
|
columnIndexEnd: f - u - 1,
|
|
1289
1289
|
verticalFixed: !1,
|
|
1290
1290
|
lastRowOfModel: m
|
|
1291
|
-
}), n.left > 0 && (
|
|
1291
|
+
}), n.left > 0 && (C = { left: a, width: this.areaBodyWestGeo.width, height: x, top: v, index: g }, y = this.dom.addRowDiv(o, C, g, e, "west"), this.adjustColumnsToRowParent({
|
|
1292
1292
|
areaIdent: e,
|
|
1293
1293
|
sideIdent: "west",
|
|
1294
1294
|
areaModel: d,
|
|
1295
|
-
geo:
|
|
1295
|
+
geo: C,
|
|
1296
1296
|
parent: y,
|
|
1297
1297
|
rowIndex: g,
|
|
1298
1298
|
columnIndexStart: 0,
|
|
1299
1299
|
columnIndexEnd: R - 1,
|
|
1300
1300
|
verticalFixed: !0,
|
|
1301
1301
|
lastRowOfModel: m
|
|
1302
|
-
})), n.right > 0 && (
|
|
1302
|
+
})), n.right > 0 && (C = { left: a, width: this.areaBodyEastGeo.width, height: x, top: v, index: g }, y = this.dom.addRowDiv(i, C, g, e, "east"), this.adjustColumnsToRowParent({
|
|
1303
1303
|
areaIdent: e,
|
|
1304
1304
|
sideIdent: "east",
|
|
1305
1305
|
areaModel: d,
|
|
1306
|
-
geo:
|
|
1306
|
+
geo: C,
|
|
1307
1307
|
parent: y,
|
|
1308
1308
|
rowIndex: g,
|
|
1309
1309
|
columnIndexStart: f - u,
|
|
1310
1310
|
columnIndexEnd: f - 1,
|
|
1311
1311
|
verticalFixed: !0,
|
|
1312
1312
|
lastRowOfModel: m
|
|
1313
|
-
})), e === "header" && this.tree && g ===
|
|
1313
|
+
})), e === "header" && this.tree && g === h - 1) {
|
|
1314
1314
|
const A = this.dom.applyStyle(
|
|
1315
1315
|
this.dom.setAttribute(
|
|
1316
1316
|
this.dom.addDiv(y, new T(16, 20, 20, 8)),
|
|
@@ -1320,28 +1320,28 @@ class fe extends be {
|
|
|
1320
1320
|
{ cursor: "pointer" }
|
|
1321
1321
|
), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1322
1322
|
if (M) {
|
|
1323
|
-
const
|
|
1324
|
-
this.dom.domService.appendChild(A,
|
|
1323
|
+
const F = this.dom.domService.createText(M.content);
|
|
1324
|
+
this.dom.domService.appendChild(A, F), M.style && this.dom.applyStyleString(A, M.style);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
if (
|
|
1328
|
+
if (c = c + x, c > r)
|
|
1329
1329
|
break;
|
|
1330
1330
|
}
|
|
1331
1331
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1332
1332
|
const g = ((b = this.colAndRowspanModels[e]) == null ? void 0 : b.getRanges()) ?? [];
|
|
1333
1333
|
if (g.length)
|
|
1334
1334
|
for (const v of g) {
|
|
1335
|
-
let m = 0, x = s.child,
|
|
1335
|
+
let m = 0, x = s.child, C = "center";
|
|
1336
1336
|
if (v.c1 < S)
|
|
1337
|
-
x = o.child,
|
|
1337
|
+
x = o.child, C = "west";
|
|
1338
1338
|
else if (u > 0 && v.c1 >= f - u)
|
|
1339
|
-
x = i.child,
|
|
1339
|
+
x = i.child, C = "east";
|
|
1340
1340
|
else {
|
|
1341
1341
|
const y = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1342
|
-
m = this.scrollFactorX * y - this.areaBodyWestGeo.width,
|
|
1342
|
+
m = this.scrollFactorX * y - this.areaBodyWestGeo.width, C = "center";
|
|
1343
1343
|
}
|
|
1344
|
-
this.drawBigCell(v, m, t, d, x,
|
|
1344
|
+
this.drawBigCell(v, m, t, d, x, C);
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
@@ -1359,7 +1359,7 @@ class fe extends be {
|
|
|
1359
1359
|
const a = o + this.getRowHeights(0, e.r1 - 1, s).reduce((b, g) => b + g, 0), l = this.tableModel.getColumnCount(), n = this.tableModel.getFixedRightColumnCount();
|
|
1360
1360
|
let d = 0;
|
|
1361
1361
|
n > 0 && e.c1 >= l - n && (d = l - n);
|
|
1362
|
-
const
|
|
1362
|
+
const h = t + this.getColumnWidths(d, e.c1 - 1).reduce((b, g) => b + g, 0), c = this.getRowHeights(e.r1, e.r2, s).reduce((b, g) => b + g, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((b, g) => b + g, 0);
|
|
1363
1363
|
let u = !1;
|
|
1364
1364
|
const S = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1365
1365
|
S && (u = S.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
@@ -1368,10 +1368,10 @@ class fe extends be {
|
|
|
1368
1368
|
sideIdent: r,
|
|
1369
1369
|
rowIndex: e.r1,
|
|
1370
1370
|
columnIndex: e.c1,
|
|
1371
|
-
left:
|
|
1371
|
+
left: h,
|
|
1372
1372
|
top: a,
|
|
1373
1373
|
width: f,
|
|
1374
|
-
height:
|
|
1374
|
+
height: c,
|
|
1375
1375
|
parent: i,
|
|
1376
1376
|
cellSelected: u,
|
|
1377
1377
|
lastRowOfModel: !0,
|
|
@@ -1382,10 +1382,10 @@ class fe extends be {
|
|
|
1382
1382
|
sideIdent: r,
|
|
1383
1383
|
rowIndex: e.r1,
|
|
1384
1384
|
columnIndex: e.c1,
|
|
1385
|
-
left:
|
|
1385
|
+
left: h,
|
|
1386
1386
|
top: a,
|
|
1387
1387
|
width: f,
|
|
1388
|
-
height:
|
|
1388
|
+
height: c,
|
|
1389
1389
|
parent: i,
|
|
1390
1390
|
cellSelected: u,
|
|
1391
1391
|
lastRowOfModel: !0,
|
|
@@ -1393,10 +1393,10 @@ class fe extends be {
|
|
|
1393
1393
|
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1394
1394
|
rowIndex: e.r1,
|
|
1395
1395
|
columnIndex: e.c1,
|
|
1396
|
-
cellLeft:
|
|
1396
|
+
cellLeft: h,
|
|
1397
1397
|
cellTop: a,
|
|
1398
1398
|
cellWidth: f,
|
|
1399
|
-
cellHeight:
|
|
1399
|
+
cellHeight: c,
|
|
1400
1400
|
parent: i
|
|
1401
1401
|
});
|
|
1402
1402
|
}
|
|
@@ -1441,28 +1441,28 @@ class fe extends be {
|
|
|
1441
1441
|
}) {
|
|
1442
1442
|
var S;
|
|
1443
1443
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1444
|
-
let
|
|
1444
|
+
let h = 0;
|
|
1445
1445
|
if (!n) {
|
|
1446
1446
|
const b = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1447
|
-
|
|
1447
|
+
h = this.scrollFactorX * b;
|
|
1448
1448
|
}
|
|
1449
|
-
const
|
|
1450
|
-
let u =
|
|
1449
|
+
const c = 0, f = !!(e === "body" && t);
|
|
1450
|
+
let u = h;
|
|
1451
1451
|
for (let b = a; b <= l; b++) {
|
|
1452
1452
|
const g = u, v = this.tableModel.getColumnWidth(b);
|
|
1453
1453
|
if (v > 0 && g + v > 0) {
|
|
1454
1454
|
let m = s.height;
|
|
1455
|
-
const x = o.getRowspanAt(r, b),
|
|
1455
|
+
const x = o.getRowspanAt(r, b), C = o.getColspanAt(r, b);
|
|
1456
1456
|
x > 1 && (m = this.getRowHeights(r, r + x - 1, o).reduce((A, M) => A + M, 0));
|
|
1457
1457
|
let y = v;
|
|
1458
|
-
|
|
1458
|
+
C > 1 && (y = this.getColumnWidths(b, b + C - 1).reduce((A, M) => A + M, 0));
|
|
1459
1459
|
let R = !1;
|
|
1460
1460
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (S = this.colAndRowspanModels[e]) != null && S.isInRange(r, b) && (R = !0), this.draggingTargetColumnIndex === b && e !== "header") {
|
|
1461
|
-
this.renderDragTargetDiv(i, g,
|
|
1462
|
-
const A = { left: g, top:
|
|
1461
|
+
this.renderDragTargetDiv(i, g, c, y, m);
|
|
1462
|
+
const A = { left: g, top: c, width: y, height: m };
|
|
1463
1463
|
this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
|
|
1464
1464
|
} else {
|
|
1465
|
-
const A = this.renderSelectedBackgroundDiv(R, f, t, o, r, b, i, g,
|
|
1465
|
+
const A = this.renderSelectedBackgroundDiv(R, f, t, o, r, b, i, g, c, y, m);
|
|
1466
1466
|
"gammaCells" in o && o.getValueAt(r, b) && (R = !1), R || this.renderCell({
|
|
1467
1467
|
areaModel: o,
|
|
1468
1468
|
areaIdent: e,
|
|
@@ -1470,7 +1470,7 @@ class fe extends be {
|
|
|
1470
1470
|
rowIndex: r,
|
|
1471
1471
|
columnIndex: b,
|
|
1472
1472
|
left: g,
|
|
1473
|
-
top:
|
|
1473
|
+
top: c,
|
|
1474
1474
|
width: y,
|
|
1475
1475
|
height: m,
|
|
1476
1476
|
parent: i,
|
|
@@ -1481,7 +1481,7 @@ class fe extends be {
|
|
|
1481
1481
|
rowIndex: r,
|
|
1482
1482
|
columnIndex: b,
|
|
1483
1483
|
cellLeft: g,
|
|
1484
|
-
cellTop:
|
|
1484
|
+
cellTop: c,
|
|
1485
1485
|
cellWidth: y,
|
|
1486
1486
|
cellHeight: m,
|
|
1487
1487
|
parent: i
|
|
@@ -1516,21 +1516,21 @@ class fe extends be {
|
|
|
1516
1516
|
height: l,
|
|
1517
1517
|
top: n,
|
|
1518
1518
|
parent: d,
|
|
1519
|
-
lastRowOfModel:
|
|
1519
|
+
lastRowOfModel: h
|
|
1520
1520
|
}) {
|
|
1521
1521
|
var X;
|
|
1522
1522
|
const f = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), u = { left: r, width: a, height: l, top: n, index: i }, S = e.getRowByIndex(s);
|
|
1523
1523
|
let b = "none";
|
|
1524
1524
|
if (i === this.getTreeArrowColumnIndex() && P(S)) {
|
|
1525
|
-
const
|
|
1526
|
-
(X =
|
|
1525
|
+
const w = S;
|
|
1526
|
+
(X = w.children) != null && X.length ? w.expanded ? b = "expanded" : b = "collapsed" : b = "hidden";
|
|
1527
1527
|
}
|
|
1528
1528
|
let v;
|
|
1529
1529
|
if (t === "header") {
|
|
1530
|
-
const
|
|
1531
|
-
(!(
|
|
1530
|
+
const w = this.tableModel.getColumnDef(i);
|
|
1531
|
+
(!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (v = w == null ? void 0 : w.sortState);
|
|
1532
1532
|
}
|
|
1533
|
-
const m = e.getValueAt(s, i), x = f ? "" : `${m}`,
|
|
1533
|
+
const m = e.getValueAt(s, i), x = f ? "" : `${m}`, C = e.isRowChecked(s), y = this.dom.addColumnDiv(
|
|
1534
1534
|
{
|
|
1535
1535
|
parent: d,
|
|
1536
1536
|
geo: u,
|
|
@@ -1541,7 +1541,7 @@ class fe extends be {
|
|
|
1541
1541
|
text: x,
|
|
1542
1542
|
treeArrow: b,
|
|
1543
1543
|
tableOptions: this.tableOptions,
|
|
1544
|
-
checkedType:
|
|
1544
|
+
checkedType: C,
|
|
1545
1545
|
sortState: v
|
|
1546
1546
|
}
|
|
1547
1547
|
), R = e.getTooltipAt(s, i);
|
|
@@ -1550,16 +1550,16 @@ class fe extends be {
|
|
|
1550
1550
|
A && A.classes[t] && this.dom.addClasses(A.classes[t], y);
|
|
1551
1551
|
let M;
|
|
1552
1552
|
f && (M = f.render(y, s, i, t, e, m, this.dom.domService));
|
|
1553
|
-
const
|
|
1554
|
-
if (
|
|
1555
|
-
const
|
|
1556
|
-
|
|
1553
|
+
const F = e.getCustomClassesAt(s, i);
|
|
1554
|
+
if (F.length && this.dom.addClasses(F, y), this.dom.addColumnBorderDivs(this.tableOptions, d, u, t, o), h && this.dom.addHorizontalBorder({ left: r, width: a, height: l, top: n + l }, d), this.getFocusModel && t === "body") {
|
|
1555
|
+
const w = this.getFocusModel();
|
|
1556
|
+
w != null && w.hasFocus(s, i) && this.dom.addFocusBorderDivs(d, u, {});
|
|
1557
1557
|
}
|
|
1558
1558
|
t === "header" && this.dom.setAttribute(y, "data-ge-action", "drag-column");
|
|
1559
1559
|
const H = e.getCustomStyleAt(s, i);
|
|
1560
1560
|
if (H)
|
|
1561
|
-
for (const
|
|
1562
|
-
this.dom.setStyle(y,
|
|
1561
|
+
for (const w in H)
|
|
1562
|
+
this.dom.setStyle(y, w, H[w]);
|
|
1563
1563
|
return [y, M];
|
|
1564
1564
|
}
|
|
1565
1565
|
/**
|
|
@@ -1726,9 +1726,9 @@ class fe extends be {
|
|
|
1726
1726
|
if (r) {
|
|
1727
1727
|
const a = e.index ?? 0, l = this.draggingColumn;
|
|
1728
1728
|
for (let n = 0; n < r; n++) {
|
|
1729
|
-
const d = o,
|
|
1729
|
+
const d = o, h = i.getRowHeight(n), c = { left: 0, width: e.width, height: h, top: d, index: n }, f = i.getValueAt(n, a), u = i.getCellRenderer(n, a), S = u ? "" : `${f}`, b = {
|
|
1730
1730
|
parent: l,
|
|
1731
|
-
geo:
|
|
1731
|
+
geo: c,
|
|
1732
1732
|
rowIndex: n,
|
|
1733
1733
|
columnIndex: a,
|
|
1734
1734
|
areaIdent: t,
|
|
@@ -1740,12 +1740,12 @@ class fe extends be {
|
|
|
1740
1740
|
const m = i.getCustomClassesAt(n, a);
|
|
1741
1741
|
m.length && this.dom.addClasses(m, g);
|
|
1742
1742
|
const x = this.tableModel.getColumnDef(a);
|
|
1743
|
-
x && x.classes[t] && this.dom.addClasses(x.classes[t], g), this.dom.addColumnBorderDivs(this.tableOptions, l,
|
|
1744
|
-
const
|
|
1745
|
-
if (
|
|
1746
|
-
for (const y in
|
|
1747
|
-
this.dom.setStyle(g, y,
|
|
1748
|
-
o = o +
|
|
1743
|
+
x && x.classes[t] && this.dom.addClasses(x.classes[t], g), this.dom.addColumnBorderDivs(this.tableOptions, l, c, t, s);
|
|
1744
|
+
const C = i.getCustomStyleAt(n, a);
|
|
1745
|
+
if (C)
|
|
1746
|
+
for (const y in C)
|
|
1747
|
+
this.dom.setStyle(g, y, C[y]);
|
|
1748
|
+
o = o + h;
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
return o;
|
|
@@ -1794,23 +1794,23 @@ class fe extends be {
|
|
|
1794
1794
|
* @param {number} height - The height of the div.
|
|
1795
1795
|
* @returns {boolean} - Whether the cell is selected.
|
|
1796
1796
|
*/
|
|
1797
|
-
renderSelectedBackgroundDiv(e, t, o, s, i, r, a, l, n, d,
|
|
1798
|
-
let
|
|
1797
|
+
renderSelectedBackgroundDiv(e, t, o, s, i, r, a, l, n, d, h) {
|
|
1798
|
+
let c = !1;
|
|
1799
1799
|
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1800
1800
|
const f = this.getSelectionModel();
|
|
1801
1801
|
if (f) {
|
|
1802
1802
|
const u = f.getSelectionCount(i, r);
|
|
1803
|
-
|
|
1803
|
+
c = u > 0;
|
|
1804
1804
|
for (let S = 0; S < u; S++) {
|
|
1805
1805
|
const b = this.dom.applyStylePosistionAbsolute(
|
|
1806
1806
|
// ge-table-body-west-selected-range
|
|
1807
1807
|
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, a)
|
|
1808
1808
|
);
|
|
1809
|
-
this.dom.setStyle(b, "left", `${l}px`), this.dom.setStyle(b, "top", `${n}px`), this.dom.setStyle(b, "width", `${d}px`), this.dom.setStyle(b, "height", `${
|
|
1809
|
+
this.dom.setStyle(b, "left", `${l}px`), this.dom.setStyle(b, "top", `${n}px`), this.dom.setStyle(b, "width", `${d}px`), this.dom.setStyle(b, "height", `${h}px`);
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
1812
|
}
|
|
1813
|
-
return
|
|
1813
|
+
return c;
|
|
1814
1814
|
}
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Renders a cell in the grid.
|
|
@@ -1842,8 +1842,8 @@ class fe extends be {
|
|
|
1842
1842
|
width: l,
|
|
1843
1843
|
height: n,
|
|
1844
1844
|
parent: d,
|
|
1845
|
-
cellSelected:
|
|
1846
|
-
lastRowOfModel:
|
|
1845
|
+
cellSelected: h,
|
|
1846
|
+
lastRowOfModel: c
|
|
1847
1847
|
}) {
|
|
1848
1848
|
const [f, u] = this.addAndRenderCellDiv({
|
|
1849
1849
|
areaModel: e,
|
|
@@ -1856,9 +1856,9 @@ class fe extends be {
|
|
|
1856
1856
|
height: n,
|
|
1857
1857
|
top: a,
|
|
1858
1858
|
parent: d,
|
|
1859
|
-
lastRowOfModel:
|
|
1859
|
+
lastRowOfModel: c
|
|
1860
1860
|
});
|
|
1861
|
-
|
|
1861
|
+
h && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, f), u && this.cleanupFunctions[t].push(u);
|
|
1862
1862
|
}
|
|
1863
1863
|
/**
|
|
1864
1864
|
* Render the header cell resize handle.
|
|
@@ -1919,17 +1919,17 @@ class N {
|
|
|
1919
1919
|
return new N([new ve(e, t)]);
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
|
-
class
|
|
1922
|
+
class Ce {
|
|
1923
1923
|
constructor(e) {
|
|
1924
1924
|
var t, o;
|
|
1925
1925
|
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);
|
|
1926
1926
|
}
|
|
1927
1927
|
onMouseClicked(e, t) {
|
|
1928
|
-
var i, r, a, l, n, d,
|
|
1928
|
+
var i, r, a, l, n, d, h;
|
|
1929
1929
|
let o = !1, s = !1;
|
|
1930
1930
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1931
|
-
const
|
|
1932
|
-
|
|
1931
|
+
const c = this.getSelectionModel(), f = this.getFocusModel();
|
|
1932
|
+
c && f && (f.hasFocus(e.rowIndex, e.columnIndex) || (f.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(f), o = !0), (i = e.originalEvent) != null && i.shiftKey || c.hasSelection() && (c.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (c.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (a = e.originalEvent) != null && a.altKey && ((l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey) ? (c.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (c.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (c.firstClick(e.rowIndex, e.columnIndex), o = !0), this.tableScope.onSelectionChanged(c));
|
|
1933
1933
|
}
|
|
1934
1934
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1935
1935
|
}
|
|
@@ -1960,7 +1960,7 @@ class we {
|
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
class
|
|
1963
|
+
class we {
|
|
1964
1964
|
get() {
|
|
1965
1965
|
return {
|
|
1966
1966
|
f2: "START_EDITING",
|
|
@@ -2023,7 +2023,7 @@ class Ee {
|
|
|
2023
2023
|
this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2024
2024
|
}
|
|
2025
2025
|
assignPredefinedSystemShortcutMappings() {
|
|
2026
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new xe().get()) : Object.assign(this.shortcutActionIdMapping, new
|
|
2026
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new xe().get()) : Object.assign(this.shortcutActionIdMapping, new we().get());
|
|
2027
2027
|
}
|
|
2028
2028
|
isMacintosh() {
|
|
2029
2029
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2145,7 +2145,21 @@ class Ae {
|
|
|
2145
2145
|
}
|
|
2146
2146
|
class Me {
|
|
2147
2147
|
constructor(e = "none", t = "single") {
|
|
2148
|
-
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2148
|
+
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2149
|
+
}
|
|
2150
|
+
getEventSelectionChangedListeners() {
|
|
2151
|
+
return this.listenerArr;
|
|
2152
|
+
}
|
|
2153
|
+
addEventSelectionChangedListener(e) {
|
|
2154
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2155
|
+
}
|
|
2156
|
+
removeEventSelectionChangedListener(e) {
|
|
2157
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2158
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2159
|
+
}
|
|
2160
|
+
//@AvoidDoubleExecution(100)
|
|
2161
|
+
fireChangeEvent() {
|
|
2162
|
+
this.silent || this.listenerArr.forEach((e) => e.onSelectionChanged(this));
|
|
2149
2163
|
}
|
|
2150
2164
|
firstClick(e, t) {
|
|
2151
2165
|
this.selectionType === "row" ? this.addRange(E.singleRow(e)) : this.selectionType === "column" && this.addRange(E.singleColumn(t));
|
|
@@ -2166,7 +2180,7 @@ class Me {
|
|
|
2166
2180
|
return this.ranges;
|
|
2167
2181
|
}
|
|
2168
2182
|
clear() {
|
|
2169
|
-
this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2183
|
+
this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.fireChangeEvent();
|
|
2170
2184
|
}
|
|
2171
2185
|
hasSelection() {
|
|
2172
2186
|
return this.allSelected || !!this.ranges.length;
|
|
@@ -2187,19 +2201,19 @@ class Me {
|
|
|
2187
2201
|
return Array.from(e);
|
|
2188
2202
|
}
|
|
2189
2203
|
selectAll() {
|
|
2190
|
-
this.allSelected = !0;
|
|
2204
|
+
this.allSelected = !0, this.fireChangeEvent();
|
|
2191
2205
|
}
|
|
2192
2206
|
isAllSelected() {
|
|
2193
2207
|
return this.allSelected;
|
|
2194
2208
|
}
|
|
2195
2209
|
addSelection(e) {
|
|
2196
|
-
this.addRange(e);
|
|
2210
|
+
this.addRange(e), this.fireChangeEvent();
|
|
2197
2211
|
}
|
|
2198
2212
|
removeSelection(e) {
|
|
2199
2213
|
if (this.selectionType === "none")
|
|
2200
2214
|
return;
|
|
2201
2215
|
let t = e;
|
|
2202
|
-
this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
2216
|
+
this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t), this.fireChangeEvent();
|
|
2203
2217
|
}
|
|
2204
2218
|
togglePoint(e, t) {
|
|
2205
2219
|
this.getSelectionCount(e, t) > 0 ? this.removeSelection(E.singleCell(e, t)) : this.addSelection(E.singleCell(e, t));
|
|
@@ -2208,12 +2222,26 @@ class Me {
|
|
|
2208
2222
|
return this.getSelectionCount(e, t) > 0;
|
|
2209
2223
|
}
|
|
2210
2224
|
addRange(e) {
|
|
2211
|
-
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e));
|
|
2225
|
+
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
|
|
2212
2226
|
}
|
|
2213
2227
|
}
|
|
2214
2228
|
class Re {
|
|
2215
2229
|
constructor(e = "none") {
|
|
2216
|
-
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
2230
|
+
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2231
|
+
}
|
|
2232
|
+
getEventFocusChangedListeners() {
|
|
2233
|
+
return this.listenerArr;
|
|
2234
|
+
}
|
|
2235
|
+
addEventFocusChangedListener(e) {
|
|
2236
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2237
|
+
}
|
|
2238
|
+
removeEventFocusChangedListener(e) {
|
|
2239
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2240
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2241
|
+
}
|
|
2242
|
+
//@AvoidDoubleExecution(100)
|
|
2243
|
+
fireChangeEvent() {
|
|
2244
|
+
this.listenerArr.forEach((e) => e.onFocusChanged(this));
|
|
2217
2245
|
}
|
|
2218
2246
|
clearChanged() {
|
|
2219
2247
|
this.changed = !1;
|
|
@@ -2222,10 +2250,10 @@ class Re {
|
|
|
2222
2250
|
return this.changed;
|
|
2223
2251
|
}
|
|
2224
2252
|
clear() {
|
|
2225
|
-
this.rowIndex = -1, this.columnIndex = -1;
|
|
2253
|
+
this.rowIndex = -1, this.columnIndex = -1, this.fireChangeEvent();
|
|
2226
2254
|
}
|
|
2227
2255
|
setFocus(e, t) {
|
|
2228
|
-
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
|
|
2256
|
+
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0, this.fireChangeEvent());
|
|
2229
2257
|
}
|
|
2230
2258
|
hasFocus(e, t) {
|
|
2231
2259
|
return this.rowIndex === e && this.columnIndex === t;
|
|
@@ -2278,8 +2306,8 @@ const I = class I {
|
|
|
2278
2306
|
for (let l = r.r1; l <= r.r2; l++) {
|
|
2279
2307
|
const n = [];
|
|
2280
2308
|
for (let d = r.c1; d <= r.c2; d++) {
|
|
2281
|
-
const
|
|
2282
|
-
n.push(
|
|
2309
|
+
const h = t.isSelected(l, d) ? e.getBodyModel().getTextValueAt(l, d) : "";
|
|
2310
|
+
n.push(h);
|
|
2283
2311
|
}
|
|
2284
2312
|
a.push(n.join(I.columnSeparatorChar));
|
|
2285
2313
|
}
|
|
@@ -2345,17 +2373,16 @@ I.columnSeparatorChar = " ", I.rowSeparatorChar = `
|
|
|
2345
2373
|
let L = I;
|
|
2346
2374
|
class j extends fe {
|
|
2347
2375
|
constructor(e, t, o, s, i, r = new L()) {
|
|
2348
|
-
var
|
|
2349
|
-
if (super(
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
new le(o),
|
|
2353
|
-
s
|
|
2354
|
-
), this.eventListener = i, this.copyService = r, this.licenseManager = k.getInstance(), this.selectionService = new we(this), this.api = new de(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 K()), (a = this.tableOptions) != null && a.autoRestoreOptions) {
|
|
2355
|
-
const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
|
|
2356
|
-
n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ce(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ge(n)), l.autoRestoreSortingState && (this.storeSortingService = new pe(n)));
|
|
2376
|
+
var n;
|
|
2377
|
+
if (super(e, t, new le(o), s), this.eventListener = i, this.copyService = r, this.licenseManager = k.getInstance(), this.selectionService = new Ce(this), this.api = new de(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 K()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
|
|
2378
|
+
const d = this.tableOptions.autoRestoreOptions, h = d.getStorageKeyFn;
|
|
2379
|
+
h && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new he(h)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ge(h)), d.autoRestoreSortingState && (this.storeSortingService = new pe(h)));
|
|
2357
2380
|
}
|
|
2358
2381
|
this.mouseHandler = new ne(this), this.inputHandler = new ye(this), this.shortcutService = new Ee(this), this.shortcutService.addListener(this.selectionService);
|
|
2382
|
+
const a = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2383
|
+
a && a.addEventSelectionChangedListener(this);
|
|
2384
|
+
const l = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2385
|
+
l && l.addEventFocusChangedListener(this);
|
|
2359
2386
|
}
|
|
2360
2387
|
/**
|
|
2361
2388
|
* Creates a TableScope instance.
|
|
@@ -2370,14 +2397,7 @@ class j extends fe {
|
|
|
2370
2397
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2371
2398
|
*/
|
|
2372
2399
|
static create(e, t, o = new te(), s = new K(), i = new Z(), r = new L()) {
|
|
2373
|
-
return new j(
|
|
2374
|
-
e,
|
|
2375
|
-
t,
|
|
2376
|
-
i,
|
|
2377
|
-
o,
|
|
2378
|
-
s,
|
|
2379
|
-
r
|
|
2380
|
-
);
|
|
2400
|
+
return new j(e, t, i, o, s, r);
|
|
2381
2401
|
}
|
|
2382
2402
|
/**
|
|
2383
2403
|
* Triggers an action based on the provided actionId.
|
|
@@ -2575,7 +2595,7 @@ class j extends fe {
|
|
|
2575
2595
|
if (s != null && s.sortable && s.sortable()) {
|
|
2576
2596
|
e.preventDefault(), e.stopPropagation();
|
|
2577
2597
|
const a = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", n = a[(a.indexOf(l) + 1) % a.length], d = new me(o, n);
|
|
2578
|
-
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((
|
|
2598
|
+
this.tableModel.doSort([d]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((c) => c.sortState = ""), s.sortState = n), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([d]);
|
|
2579
2599
|
}
|
|
2580
2600
|
}
|
|
2581
2601
|
/**
|
|
@@ -2730,8 +2750,8 @@ class j extends fe {
|
|
|
2730
2750
|
else if (i.allCollapsed)
|
|
2731
2751
|
d.expanded = !1;
|
|
2732
2752
|
else {
|
|
2733
|
-
const
|
|
2734
|
-
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(
|
|
2753
|
+
const h = s(d.data);
|
|
2754
|
+
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
2735
2755
|
}
|
|
2736
2756
|
}
|
|
2737
2757
|
a.recalcVisibleTreeRows();
|
|
@@ -2984,8 +3004,8 @@ const B = class B {
|
|
|
2984
3004
|
render(e, t, o, s, i, r, a) {
|
|
2985
3005
|
const l = r != null && r.data ? r.data : "";
|
|
2986
3006
|
if (r) {
|
|
2987
|
-
const { toggle: n, visibility: d, closed:
|
|
2988
|
-
this.addText(e, s, t, o, l,
|
|
3007
|
+
const { toggle: n, visibility: d, closed: h } = r, c = n ? B.toggleHeaderGroup : "";
|
|
3008
|
+
this.addText(e, s, t, o, l, c), n && d !== "always" && this.addArrowDiv(a, e, !h, t, o, s, c);
|
|
2989
3009
|
} else
|
|
2990
3010
|
this.addText(e, s, t, o, l, "");
|
|
2991
3011
|
}
|
|
@@ -3002,10 +3022,10 @@ const B = class B {
|
|
|
3002
3022
|
e.addClass(l, "ge-table-toggle-icon-div"), e.setStyle(l, "display", "inline-block"), e.setStyle(l, "position", ""), e.setStyle(l, "width", "20px"), e.setStyle(l, "background", "transparent"), e.setStyle(l, "cursor", "pointer"), e.setAttribute(l, "data-row-index", `${s}`), e.setAttribute(l, "data-col-index", `${i}`), e.setAttribute(l, "data-area", `${r}`), e.setAttribute(l, "data-ge-action", `${a}`);
|
|
3003
3023
|
let n;
|
|
3004
3024
|
o ? n = this.headerGroupOptions.iconExpanded : n = this.headerGroupOptions.iconCollapsed;
|
|
3005
|
-
const d = n.content,
|
|
3006
|
-
e.appendChild(l,
|
|
3007
|
-
for (const
|
|
3008
|
-
e.addClass(l,
|
|
3025
|
+
const d = n.content, h = e.createText(d);
|
|
3026
|
+
e.appendChild(l, h), n.style && this.applyStyleString(e, l, n.style);
|
|
3027
|
+
for (const c of n.classes)
|
|
3028
|
+
e.addClass(l, c);
|
|
3009
3029
|
return e.appendChild(t, l), l;
|
|
3010
3030
|
}
|
|
3011
3031
|
applyStyleString(e, t, o) {
|
|
@@ -3018,7 +3038,7 @@ const B = class B {
|
|
|
3018
3038
|
};
|
|
3019
3039
|
B.toggleHeaderGroup = "toggleHeaderGroup";
|
|
3020
3040
|
let q = B;
|
|
3021
|
-
function
|
|
3041
|
+
function Oe({
|
|
3022
3042
|
tableModel: p,
|
|
3023
3043
|
tableOptions: e = new te(),
|
|
3024
3044
|
mouseMoved: t,
|
|
@@ -3030,8 +3050,8 @@ function Fe({
|
|
|
3030
3050
|
mouseDraggingEnd: l,
|
|
3031
3051
|
selectionChanged: n,
|
|
3032
3052
|
focusChanged: d,
|
|
3033
|
-
tableReady:
|
|
3034
|
-
licenseKey:
|
|
3053
|
+
tableReady: h,
|
|
3054
|
+
licenseKey: c
|
|
3035
3055
|
}) {
|
|
3036
3056
|
const f = se(null);
|
|
3037
3057
|
let u = !1;
|
|
@@ -3074,7 +3094,7 @@ function Fe({
|
|
|
3074
3094
|
e,
|
|
3075
3095
|
g
|
|
3076
3096
|
);
|
|
3077
|
-
v.firstInit(),
|
|
3097
|
+
v.firstInit(), h && h(v.getApi()), c && k.getInstance().setLicenseKey(c);
|
|
3078
3098
|
};
|
|
3079
3099
|
return /* @__PURE__ */ oe(
|
|
3080
3100
|
"div",
|
|
@@ -3091,15 +3111,15 @@ function Fe({
|
|
|
3091
3111
|
}
|
|
3092
3112
|
);
|
|
3093
3113
|
}
|
|
3094
|
-
var G,
|
|
3114
|
+
var G, O = re;
|
|
3095
3115
|
if (process.env.NODE_ENV === "production")
|
|
3096
|
-
G =
|
|
3116
|
+
G = O.createRoot, O.hydrateRoot;
|
|
3097
3117
|
else {
|
|
3098
|
-
var U =
|
|
3118
|
+
var U = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
3099
3119
|
G = function(p, e) {
|
|
3100
3120
|
U.usingClientEntryPoint = !0;
|
|
3101
3121
|
try {
|
|
3102
|
-
return
|
|
3122
|
+
return O.createRoot(p, e);
|
|
3103
3123
|
} finally {
|
|
3104
3124
|
U.usingClientEntryPoint = !1;
|
|
3105
3125
|
}
|
|
@@ -3125,5 +3145,5 @@ class Le {
|
|
|
3125
3145
|
}
|
|
3126
3146
|
export {
|
|
3127
3147
|
Le as ComponentRendererWrapper,
|
|
3128
|
-
|
|
3148
|
+
Oe as GuiexpertTable
|
|
3129
3149
|
};
|