@guiexpert/vue3-table 3.0.2 → 3.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/.babelrc +7 -0
- package/.eslintrc.js +79 -0
- package/components.d.ts +16 -0
- package/cypress/fixtures/example.json +3 -0
- package/cypress/plugins/index.ts +10 -0
- package/cypress/support/index.ts +1 -0
- package/dist/README.md +104 -0
- package/dist/index.cjs +254 -0
- package/{index.js → dist/index.js} +143 -123
- package/{lib → dist/lib}/ComponentRendererWrapper.d.ts +1 -1
- package/{lib → dist/lib}/GuiexpertTable.vue.d.ts +1 -1
- package/dist/package.json +50 -0
- package/jest.config.ts +19 -0
- package/package.json +34 -3
- package/patch.js +17 -0
- package/postcss.config.js +3 -0
- package/src/index.ts +3 -0
- package/src/lib/ComponentRendererWrapper.ts +61 -0
- package/src/lib/GuiexpertTable.spec.ts +9 -0
- package/src/lib/GuiexpertTable.vue +124 -0
- package/src/lib/GuiexpertTablePlugin.ts +10 -0
- package/src/shims-vue.d.ts +15 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.spec.json +20 -0
- package/vite.config.ts +62 -0
- package/index.cjs +0 -254
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{lib → dist/lib}/GuiexpertTablePlugin.d.ts +0 -0
- /package/{style.css → dist/style.css} +0 -0
|
@@ -24,15 +24,15 @@ class k {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function H(
|
|
28
|
-
return
|
|
27
|
+
function H(h) {
|
|
28
|
+
return h && h.type === "TreeRow";
|
|
29
29
|
}
|
|
30
|
-
function P(
|
|
31
|
-
return
|
|
30
|
+
function P(h) {
|
|
31
|
+
return h && h.type === "AreaModelTree";
|
|
32
32
|
}
|
|
33
33
|
class W {
|
|
34
|
-
constructor(e = -1, t = -1, o = -1, s = -1, i, r, a, l = 0, n = 0, d = 0,
|
|
35
|
-
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 =
|
|
34
|
+
constructor(e = -1, t = -1, o = -1, s = -1, i, r, a, l = 0, n = 0, d = 0, c = "") {
|
|
35
|
+
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 = c;
|
|
36
36
|
}
|
|
37
37
|
clone() {
|
|
38
38
|
return new W(
|
|
@@ -167,10 +167,10 @@ class le {
|
|
|
167
167
|
return this.domService.appendChild(e.child, l), l;
|
|
168
168
|
}
|
|
169
169
|
addColumnDiv(e) {
|
|
170
|
-
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: l = "", treeArrow: n, tableOptions: d, checkedType:
|
|
170
|
+
const { parent: t, geo: o, rowIndex: s = -1, columnIndex: i = -1, areaIdent: r, sideIdent: a, text: l = "", treeArrow: n, tableOptions: d, checkedType: c = void 0, sortState: g } = e, f = d == null ? void 0 : d.treeOptions, S = d == null ? void 0 : d.showCheckboxWihoutExtraColumn, u = this.domService.createElement("div");
|
|
171
171
|
this.domService.addClass(u, "ge-table-col-div"), this.domService.addClass(u, `ge-table-col-div-${o.index}`), this.domService.setAttribute(u, "data-col-index", `${o.index}`), this.domService.setAttribute(u, "data-row-index", `${s}`), this.domService.setAttribute(u, "data-area", `${r}`);
|
|
172
172
|
const b = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
173
|
-
if (r === "body" && a === "center" && this.domService.addClass(u, `ge-table-column-${b}`), this.domService.setStyle(u, "display", "clip"), this.domService.setStyle(u, "position", "absolute"), this.domService.setStyle(u, "left", `${o.left}px`), this.domService.setStyle(u, "top", `${o.top}px`), this.domService.setStyle(u, "width", `${o.width}px`), this.domService.setStyle(u, "height", `${o.height}px`), n && n !== "none" && (this.domService.addClass(u, "ge-table-col-tree"), this.addArrowDiv(u, n, f, s, i, r)), S && i === 0 &&
|
|
173
|
+
if (r === "body" && a === "center" && this.domService.addClass(u, `ge-table-column-${b}`), this.domService.setStyle(u, "display", "clip"), this.domService.setStyle(u, "position", "absolute"), this.domService.setStyle(u, "left", `${o.left}px`), this.domService.setStyle(u, "top", `${o.top}px`), this.domService.setStyle(u, "width", `${o.width}px`), this.domService.setStyle(u, "height", `${o.height}px`), n && n !== "none" && (this.domService.addClass(u, "ge-table-col-tree"), this.addArrowDiv(u, n, f, s, i, r)), S && i === 0 && c && this.addCheckboxToDiv(u, c, r, s), l) {
|
|
174
174
|
const p = n !== "none" && i === 0;
|
|
175
175
|
this.addLabelDiv(u, l, p, s, i, r);
|
|
176
176
|
}
|
|
@@ -219,8 +219,8 @@ class le {
|
|
|
219
219
|
t === "expanded" ? l = o.arrowExpanded : t === "collapsed" ? l = o.arrowCollapsed : l = o.arrowPlaceholder;
|
|
220
220
|
const n = l.content, d = this.domService.createText(n);
|
|
221
221
|
this.domService.appendChild(a, d), l.style && this.applyStyleString(a, l.style);
|
|
222
|
-
for (const
|
|
223
|
-
this.domService.addClass(a,
|
|
222
|
+
for (const c of l.classes)
|
|
223
|
+
this.domService.addClass(a, c);
|
|
224
224
|
return this.domService.appendChild(e, a), a;
|
|
225
225
|
}
|
|
226
226
|
addColumnBorderDivs(e, t, o, s, i) {
|
|
@@ -263,7 +263,7 @@ class le {
|
|
|
263
263
|
return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
const G = (
|
|
266
|
+
const G = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
|
|
267
267
|
class ae {
|
|
268
268
|
constructor(e, t) {
|
|
269
269
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
@@ -315,7 +315,7 @@ class ne {
|
|
|
315
315
|
this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
316
316
|
else if (H(o.row) && o.areaModel) {
|
|
317
317
|
const s = o.colIdx === this.getArrowColumnIndex() && e.altKey, i = o.className.includes("ge-table-tree-arrow-div");
|
|
318
|
-
if (
|
|
318
|
+
if (s || i) {
|
|
319
319
|
e.preventDefault(), e.stopPropagation();
|
|
320
320
|
const r = o.row;
|
|
321
321
|
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);
|
|
@@ -371,8 +371,8 @@ class ne {
|
|
|
371
371
|
var o, s, i, r, a;
|
|
372
372
|
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
373
373
|
if (t) {
|
|
374
|
-
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,
|
|
375
|
-
n ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(
|
|
374
|
+
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, c = t(e.data);
|
|
375
|
+
n ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(c) : d && ((a = this.tableScope.storeStateCollapsedExpandService) == null || a.collapsedStateIdsRemove(c));
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
getArrowColumnIndex() {
|
|
@@ -668,7 +668,7 @@ class _ {
|
|
|
668
668
|
// }
|
|
669
669
|
// }
|
|
670
670
|
}
|
|
671
|
-
class
|
|
671
|
+
class he extends _ {
|
|
672
672
|
constructor(e) {
|
|
673
673
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
674
674
|
}
|
|
@@ -690,14 +690,14 @@ class ce extends _ {
|
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
class
|
|
693
|
+
class ce {
|
|
694
694
|
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
695
695
|
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
class ge extends _ {
|
|
699
699
|
constructor(e) {
|
|
700
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
700
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new ce(), this.load();
|
|
701
701
|
}
|
|
702
702
|
collapsedExpandedStateGet() {
|
|
703
703
|
return this.collapsedExpandedState;
|
|
@@ -1138,9 +1138,9 @@ class fe extends be {
|
|
|
1138
1138
|
const r = this.tableModel.getAreaModel(e), a = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(a);
|
|
1139
1139
|
if (l) {
|
|
1140
1140
|
let n;
|
|
1141
|
-
const
|
|
1142
|
-
if (l.innerText = "", this.applyCssClasses(l, i),
|
|
1143
|
-
n =
|
|
1141
|
+
const c = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1142
|
+
if (l.innerText = "", this.applyCssClasses(l, i), c)
|
|
1143
|
+
n = c.render(l, t, o, e, r, s, this.dom.domService), n && this.cleanupFunctions[e].push(n);
|
|
1144
1144
|
else {
|
|
1145
1145
|
const S = `${s}`;
|
|
1146
1146
|
this.dom.addLabelDiv(l, S, !1, t, o, e);
|
|
@@ -1262,15 +1262,15 @@ class fe extends be {
|
|
|
1262
1262
|
var b;
|
|
1263
1263
|
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
|
|
1264
1264
|
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
1265
|
-
const a = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e),
|
|
1265
|
+
const a = 0, l = this.areaBodyCenterGeo.width, n = this.tableModel.getPadding(), d = this.tableModel.getAreaModel(e), c = d.getRowCount();
|
|
1266
1266
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1267
1267
|
const p = this.cleanupFunctions[e].shift();
|
|
1268
1268
|
p && p();
|
|
1269
1269
|
}
|
|
1270
1270
|
let g = t;
|
|
1271
1271
|
const f = this.tableModel.getColumnCount(), S = this.tableModel.getFixedRightColumnCount(), u = this.tableModel.getFixedLeftColumnCount();
|
|
1272
|
-
for (let p = 0; p <
|
|
1273
|
-
const v = g,
|
|
1272
|
+
for (let p = 0; p < c; p++) {
|
|
1273
|
+
const v = g, C = p === c - 1, x = this.tableModel.getRowHeight(e, p);
|
|
1274
1274
|
if (v + x > 0) {
|
|
1275
1275
|
this.firstVisibleRowIndex = p;
|
|
1276
1276
|
let y = { left: a, width: l, height: x, top: v, index: p }, m = this.dom.addRowDiv(s, y, p, e, "center");
|
|
@@ -1285,7 +1285,7 @@ class fe extends be {
|
|
|
1285
1285
|
columnIndexStart: R,
|
|
1286
1286
|
columnIndexEnd: f - S - 1,
|
|
1287
1287
|
verticalFixed: !1,
|
|
1288
|
-
lastRowOfModel:
|
|
1288
|
+
lastRowOfModel: C
|
|
1289
1289
|
}), n.left > 0 && (y = { left: a, width: this.areaBodyWestGeo.width, height: x, top: v, index: p }, m = this.dom.addRowDiv(o, y, p, e, "west"), this.adjustColumnsToRowParent({
|
|
1290
1290
|
areaIdent: e,
|
|
1291
1291
|
sideIdent: "west",
|
|
@@ -1296,7 +1296,7 @@ class fe extends be {
|
|
|
1296
1296
|
columnIndexStart: 0,
|
|
1297
1297
|
columnIndexEnd: R - 1,
|
|
1298
1298
|
verticalFixed: !0,
|
|
1299
|
-
lastRowOfModel:
|
|
1299
|
+
lastRowOfModel: C
|
|
1300
1300
|
})), n.right > 0 && (y = { left: a, width: this.areaBodyEastGeo.width, height: x, top: v, index: p }, m = this.dom.addRowDiv(i, y, p, e, "east"), this.adjustColumnsToRowParent({
|
|
1301
1301
|
areaIdent: e,
|
|
1302
1302
|
sideIdent: "east",
|
|
@@ -1307,8 +1307,8 @@ class fe extends be {
|
|
|
1307
1307
|
columnIndexStart: f - S,
|
|
1308
1308
|
columnIndexEnd: f - 1,
|
|
1309
1309
|
verticalFixed: !0,
|
|
1310
|
-
lastRowOfModel:
|
|
1311
|
-
})), e === "header" && this.tree && p ===
|
|
1310
|
+
lastRowOfModel: C
|
|
1311
|
+
})), e === "header" && this.tree && p === c - 1) {
|
|
1312
1312
|
const A = this.dom.applyStyle(
|
|
1313
1313
|
this.dom.setAttribute(
|
|
1314
1314
|
this.dom.addDiv(m, new T(16, 20, 20, 8)),
|
|
@@ -1318,8 +1318,8 @@ class fe extends be {
|
|
|
1318
1318
|
{ cursor: "pointer" }
|
|
1319
1319
|
), M = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1320
1320
|
if (M) {
|
|
1321
|
-
const
|
|
1322
|
-
this.dom.domService.appendChild(A,
|
|
1321
|
+
const I = this.dom.domService.createText(M.content);
|
|
1322
|
+
this.dom.domService.appendChild(A, I), M.style && this.dom.applyStyleString(A, M.style);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
@@ -1330,16 +1330,16 @@ class fe extends be {
|
|
|
1330
1330
|
const p = ((b = this.colAndRowspanModels[e]) == null ? void 0 : b.getRanges()) ?? [];
|
|
1331
1331
|
if (p.length)
|
|
1332
1332
|
for (const v of p) {
|
|
1333
|
-
let
|
|
1333
|
+
let C = 0, x = s.child, y = "center";
|
|
1334
1334
|
if (v.c1 < u)
|
|
1335
1335
|
x = o.child, y = "west";
|
|
1336
1336
|
else if (S > 0 && v.c1 >= f - S)
|
|
1337
1337
|
x = i.child, y = "east";
|
|
1338
1338
|
else {
|
|
1339
1339
|
const m = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1340
|
-
|
|
1340
|
+
C = this.scrollFactorX * m - this.areaBodyWestGeo.width, y = "center";
|
|
1341
1341
|
}
|
|
1342
|
-
this.drawBigCell(v,
|
|
1342
|
+
this.drawBigCell(v, C, t, d, x, y);
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
@@ -1357,7 +1357,7 @@ class fe extends be {
|
|
|
1357
1357
|
const a = o + this.getRowHeights(0, e.r1 - 1, s).reduce((b, p) => b + p, 0), l = this.tableModel.getColumnCount(), n = this.tableModel.getFixedRightColumnCount();
|
|
1358
1358
|
let d = 0;
|
|
1359
1359
|
n > 0 && e.c1 >= l - n && (d = l - n);
|
|
1360
|
-
const
|
|
1360
|
+
const c = t + this.getColumnWidths(d, e.c1 - 1).reduce((b, p) => b + p, 0), g = this.getRowHeights(e.r1, e.r2, s).reduce((b, p) => b + p, 0), f = this.getColumnWidths(e.c1, e.c2).reduce((b, p) => b + p, 0);
|
|
1361
1361
|
let S = !1;
|
|
1362
1362
|
const u = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1363
1363
|
u && (S = u.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
@@ -1366,7 +1366,7 @@ class fe extends be {
|
|
|
1366
1366
|
sideIdent: r,
|
|
1367
1367
|
rowIndex: e.r1,
|
|
1368
1368
|
columnIndex: e.c1,
|
|
1369
|
-
left:
|
|
1369
|
+
left: c,
|
|
1370
1370
|
top: a,
|
|
1371
1371
|
width: f,
|
|
1372
1372
|
height: g,
|
|
@@ -1380,7 +1380,7 @@ class fe extends be {
|
|
|
1380
1380
|
sideIdent: r,
|
|
1381
1381
|
rowIndex: e.r1,
|
|
1382
1382
|
columnIndex: e.c1,
|
|
1383
|
-
left:
|
|
1383
|
+
left: c,
|
|
1384
1384
|
top: a,
|
|
1385
1385
|
width: f,
|
|
1386
1386
|
height: g,
|
|
@@ -1391,7 +1391,7 @@ class fe extends be {
|
|
|
1391
1391
|
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1392
1392
|
rowIndex: e.r1,
|
|
1393
1393
|
columnIndex: e.c1,
|
|
1394
|
-
cellLeft:
|
|
1394
|
+
cellLeft: c,
|
|
1395
1395
|
cellTop: a,
|
|
1396
1396
|
cellWidth: f,
|
|
1397
1397
|
cellHeight: g,
|
|
@@ -1439,28 +1439,28 @@ class fe extends be {
|
|
|
1439
1439
|
}) {
|
|
1440
1440
|
var u;
|
|
1441
1441
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1442
|
-
let
|
|
1442
|
+
let c = 0;
|
|
1443
1443
|
if (!n) {
|
|
1444
1444
|
const b = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1445
|
-
|
|
1445
|
+
c = this.scrollFactorX * b;
|
|
1446
1446
|
}
|
|
1447
1447
|
const g = 0, f = !!(e === "body" && t);
|
|
1448
|
-
let S =
|
|
1448
|
+
let S = c;
|
|
1449
1449
|
for (let b = a; b <= l; b++) {
|
|
1450
1450
|
const p = S, v = this.tableModel.getColumnWidth(b);
|
|
1451
1451
|
if (v > 0 && p + v > 0) {
|
|
1452
|
-
let
|
|
1452
|
+
let C = s.height;
|
|
1453
1453
|
const x = o.getRowspanAt(r, b), y = o.getColspanAt(r, b);
|
|
1454
|
-
x > 1 && (
|
|
1454
|
+
x > 1 && (C = this.getRowHeights(r, r + x - 1, o).reduce((A, M) => A + M, 0));
|
|
1455
1455
|
let m = v;
|
|
1456
1456
|
y > 1 && (m = this.getColumnWidths(b, b + y - 1).reduce((A, M) => A + M, 0));
|
|
1457
1457
|
let R = !1;
|
|
1458
1458
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (u = this.colAndRowspanModels[e]) != null && u.isInRange(r, b) && (R = !0), this.draggingTargetColumnIndex === b && e !== "header") {
|
|
1459
|
-
this.renderDragTargetDiv(i, p, g, m,
|
|
1460
|
-
const A = { left: p, top: g, width: m, height:
|
|
1459
|
+
this.renderDragTargetDiv(i, p, g, m, C);
|
|
1460
|
+
const A = { left: p, top: g, width: m, height: C };
|
|
1461
1461
|
this.dom.addColumnBorderDivs(this.tableOptions, i, A, e, t);
|
|
1462
1462
|
} else {
|
|
1463
|
-
const A = this.renderSelectedBackgroundDiv(R, f, t, o, r, b, i, p, g, m,
|
|
1463
|
+
const A = this.renderSelectedBackgroundDiv(R, f, t, o, r, b, i, p, g, m, C);
|
|
1464
1464
|
"gammaCells" in o && o.getValueAt(r, b) && (R = !1), R || this.renderCell({
|
|
1465
1465
|
areaModel: o,
|
|
1466
1466
|
areaIdent: e,
|
|
@@ -1470,7 +1470,7 @@ class fe extends be {
|
|
|
1470
1470
|
left: p,
|
|
1471
1471
|
top: g,
|
|
1472
1472
|
width: m,
|
|
1473
|
-
height:
|
|
1473
|
+
height: C,
|
|
1474
1474
|
parent: i,
|
|
1475
1475
|
cellSelected: A,
|
|
1476
1476
|
lastRowOfModel: d,
|
|
@@ -1481,7 +1481,7 @@ class fe extends be {
|
|
|
1481
1481
|
cellLeft: p,
|
|
1482
1482
|
cellTop: g,
|
|
1483
1483
|
cellWidth: m,
|
|
1484
|
-
cellHeight:
|
|
1484
|
+
cellHeight: C,
|
|
1485
1485
|
parent: i
|
|
1486
1486
|
});
|
|
1487
1487
|
}
|
|
@@ -1514,21 +1514,21 @@ class fe extends be {
|
|
|
1514
1514
|
height: l,
|
|
1515
1515
|
top: n,
|
|
1516
1516
|
parent: d,
|
|
1517
|
-
lastRowOfModel:
|
|
1517
|
+
lastRowOfModel: c
|
|
1518
1518
|
}) {
|
|
1519
1519
|
var N;
|
|
1520
1520
|
const f = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), S = { left: r, width: a, height: l, top: n, index: i }, u = e.getRowByIndex(s);
|
|
1521
1521
|
let b = "none";
|
|
1522
1522
|
if (i === this.getTreeArrowColumnIndex() && H(u)) {
|
|
1523
|
-
const
|
|
1524
|
-
(N =
|
|
1523
|
+
const w = u;
|
|
1524
|
+
(N = w.children) != null && N.length ? w.expanded ? b = "expanded" : b = "collapsed" : b = "hidden";
|
|
1525
1525
|
}
|
|
1526
1526
|
let v;
|
|
1527
1527
|
if (t === "header") {
|
|
1528
|
-
const
|
|
1529
|
-
(!(
|
|
1528
|
+
const w = this.tableModel.getColumnDef(i);
|
|
1529
|
+
(!(w != null && w.sortIconVisible) || w != null && w.sortIconVisible()) && (v = w == null ? void 0 : w.sortState);
|
|
1530
1530
|
}
|
|
1531
|
-
const
|
|
1531
|
+
const C = e.getValueAt(s, i), x = f ? "" : `${C}`, y = e.isRowChecked(s), m = this.dom.addColumnDiv(
|
|
1532
1532
|
{
|
|
1533
1533
|
parent: d,
|
|
1534
1534
|
geo: S,
|
|
@@ -1547,17 +1547,17 @@ class fe extends be {
|
|
|
1547
1547
|
const A = this.tableModel.getColumnDef(i);
|
|
1548
1548
|
A && A.classes[t] && this.dom.addClasses(A.classes[t], m);
|
|
1549
1549
|
let M;
|
|
1550
|
-
f && (M = f.render(m, s, i, t, e,
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1550
|
+
f && (M = f.render(m, s, i, t, e, C, this.dom.domService));
|
|
1551
|
+
const I = e.getCustomClassesAt(s, i);
|
|
1552
|
+
if (I.length && this.dom.addClasses(I, m), this.dom.addColumnBorderDivs(this.tableOptions, d, S, t, o), c && this.dom.addHorizontalBorder({ left: r, width: a, height: l, top: n + l }, d), this.getFocusModel && t === "body") {
|
|
1553
|
+
const w = this.getFocusModel();
|
|
1554
|
+
w != null && w.hasFocus(s, i) && this.dom.addFocusBorderDivs(d, S, {});
|
|
1555
1555
|
}
|
|
1556
1556
|
t === "header" && this.dom.setAttribute(m, "data-ge-action", "drag-column");
|
|
1557
1557
|
const B = e.getCustomStyleAt(s, i);
|
|
1558
1558
|
if (B)
|
|
1559
|
-
for (const
|
|
1560
|
-
this.dom.setStyle(m,
|
|
1559
|
+
for (const w in B)
|
|
1560
|
+
this.dom.setStyle(m, w, B[w]);
|
|
1561
1561
|
return [m, M];
|
|
1562
1562
|
}
|
|
1563
1563
|
/**
|
|
@@ -1724,7 +1724,7 @@ class fe extends be {
|
|
|
1724
1724
|
if (r) {
|
|
1725
1725
|
const a = e.index ?? 0, l = this.draggingColumn;
|
|
1726
1726
|
for (let n = 0; n < r; n++) {
|
|
1727
|
-
const d = o,
|
|
1727
|
+
const d = o, c = i.getRowHeight(n), g = { left: 0, width: e.width, height: c, top: d, index: n }, f = i.getValueAt(n, a), S = i.getCellRenderer(n, a), u = S ? "" : `${f}`, b = {
|
|
1728
1728
|
parent: l,
|
|
1729
1729
|
geo: g,
|
|
1730
1730
|
rowIndex: n,
|
|
@@ -1735,15 +1735,15 @@ class fe extends be {
|
|
|
1735
1735
|
}, p = this.dom.addColumnDiv(b);
|
|
1736
1736
|
let v;
|
|
1737
1737
|
S && (v = S.render(p, n, a, t, i, f, this.dom.domService), v && this.cleanupFunctions[t].push(v));
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1738
|
+
const C = i.getCustomClassesAt(n, a);
|
|
1739
|
+
C.length && this.dom.addClasses(C, p);
|
|
1740
1740
|
const x = this.tableModel.getColumnDef(a);
|
|
1741
1741
|
x && x.classes[t] && this.dom.addClasses(x.classes[t], p), this.dom.addColumnBorderDivs(this.tableOptions, l, g, t, s);
|
|
1742
1742
|
const y = i.getCustomStyleAt(n, a);
|
|
1743
1743
|
if (y)
|
|
1744
1744
|
for (const m in y)
|
|
1745
1745
|
this.dom.setStyle(p, m, y[m]);
|
|
1746
|
-
o = o +
|
|
1746
|
+
o = o + c;
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
1749
|
return o;
|
|
@@ -1792,7 +1792,7 @@ class fe extends be {
|
|
|
1792
1792
|
* @param {number} height - The height of the div.
|
|
1793
1793
|
* @returns {boolean} - Whether the cell is selected.
|
|
1794
1794
|
*/
|
|
1795
|
-
renderSelectedBackgroundDiv(e, t, o, s, i, r, a, l, n, d,
|
|
1795
|
+
renderSelectedBackgroundDiv(e, t, o, s, i, r, a, l, n, d, c) {
|
|
1796
1796
|
let g = !1;
|
|
1797
1797
|
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1798
1798
|
const f = this.getSelectionModel();
|
|
@@ -1804,7 +1804,7 @@ class fe extends be {
|
|
|
1804
1804
|
// ge-table-body-west-selected-range
|
|
1805
1805
|
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, a)
|
|
1806
1806
|
);
|
|
1807
|
-
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", `${
|
|
1807
|
+
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", `${c}px`);
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
}
|
|
@@ -1840,7 +1840,7 @@ class fe extends be {
|
|
|
1840
1840
|
width: l,
|
|
1841
1841
|
height: n,
|
|
1842
1842
|
parent: d,
|
|
1843
|
-
cellSelected:
|
|
1843
|
+
cellSelected: c,
|
|
1844
1844
|
lastRowOfModel: g
|
|
1845
1845
|
}) {
|
|
1846
1846
|
const [f, S] = this.addAndRenderCellDiv({
|
|
@@ -1856,7 +1856,7 @@ class fe extends be {
|
|
|
1856
1856
|
parent: d,
|
|
1857
1857
|
lastRowOfModel: g
|
|
1858
1858
|
});
|
|
1859
|
-
|
|
1859
|
+
c && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, f), S && this.cleanupFunctions[t].push(S);
|
|
1860
1860
|
}
|
|
1861
1861
|
/**
|
|
1862
1862
|
* Render the header cell resize handle.
|
|
@@ -1917,17 +1917,17 @@ class V {
|
|
|
1917
1917
|
return new V([new ve(e, t)]);
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
|
-
class
|
|
1920
|
+
class Ce {
|
|
1921
1921
|
constructor(e) {
|
|
1922
1922
|
var t, o;
|
|
1923
1923
|
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);
|
|
1924
1924
|
}
|
|
1925
1925
|
onMouseClicked(e, t) {
|
|
1926
|
-
var i, r, a, l, n, d,
|
|
1926
|
+
var i, r, a, l, n, d, c;
|
|
1927
1927
|
let o = !1, s = !1;
|
|
1928
1928
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1929
1929
|
const g = this.getSelectionModel(), f = this.getFocusModel();
|
|
1930
|
-
g && 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 || g.hasSelection() && (g.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.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) ? (g.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.ctrlKey || (
|
|
1930
|
+
g && 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 || g.hasSelection() && (g.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (g.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) ? (g.removeSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.ctrlKey || (c = e.originalEvent) != null && c.metaKey ? (g.addSelection(E.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (g.firstClick(e.rowIndex, e.columnIndex), o = !0), this.tableScope.onSelectionChanged(g));
|
|
1931
1931
|
}
|
|
1932
1932
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1933
1933
|
}
|
|
@@ -1958,7 +1958,7 @@ class we {
|
|
|
1958
1958
|
});
|
|
1959
1959
|
}
|
|
1960
1960
|
}
|
|
1961
|
-
class
|
|
1961
|
+
class we {
|
|
1962
1962
|
get() {
|
|
1963
1963
|
return {
|
|
1964
1964
|
f2: "START_EDITING",
|
|
@@ -2021,7 +2021,7 @@ class Ee {
|
|
|
2021
2021
|
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));
|
|
2022
2022
|
}
|
|
2023
2023
|
assignPredefinedSystemShortcutMappings() {
|
|
2024
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new xe().get()) : Object.assign(this.shortcutActionIdMapping, new
|
|
2024
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new xe().get()) : Object.assign(this.shortcutActionIdMapping, new we().get());
|
|
2025
2025
|
}
|
|
2026
2026
|
isMacintosh() {
|
|
2027
2027
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2143,7 +2143,21 @@ class Ae {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
class Me {
|
|
2145
2145
|
constructor(e = "none", t = "single") {
|
|
2146
|
-
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2146
|
+
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2147
|
+
}
|
|
2148
|
+
getEventSelectionChangedListeners() {
|
|
2149
|
+
return this.listenerArr;
|
|
2150
|
+
}
|
|
2151
|
+
addEventSelectionChangedListener(e) {
|
|
2152
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2153
|
+
}
|
|
2154
|
+
removeEventSelectionChangedListener(e) {
|
|
2155
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2156
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2157
|
+
}
|
|
2158
|
+
//@AvoidDoubleExecution(100)
|
|
2159
|
+
fireChangeEvent() {
|
|
2160
|
+
this.silent || this.listenerArr.forEach((e) => e.onSelectionChanged(this));
|
|
2147
2161
|
}
|
|
2148
2162
|
firstClick(e, t) {
|
|
2149
2163
|
this.selectionType === "row" ? this.addRange(E.singleRow(e)) : this.selectionType === "column" && this.addRange(E.singleColumn(t));
|
|
@@ -2164,7 +2178,7 @@ class Me {
|
|
|
2164
2178
|
return this.ranges;
|
|
2165
2179
|
}
|
|
2166
2180
|
clear() {
|
|
2167
|
-
this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2181
|
+
this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.fireChangeEvent();
|
|
2168
2182
|
}
|
|
2169
2183
|
hasSelection() {
|
|
2170
2184
|
return this.allSelected || !!this.ranges.length;
|
|
@@ -2185,19 +2199,19 @@ class Me {
|
|
|
2185
2199
|
return Array.from(e);
|
|
2186
2200
|
}
|
|
2187
2201
|
selectAll() {
|
|
2188
|
-
this.allSelected = !0;
|
|
2202
|
+
this.allSelected = !0, this.fireChangeEvent();
|
|
2189
2203
|
}
|
|
2190
2204
|
isAllSelected() {
|
|
2191
2205
|
return this.allSelected;
|
|
2192
2206
|
}
|
|
2193
2207
|
addSelection(e) {
|
|
2194
|
-
this.addRange(e);
|
|
2208
|
+
this.addRange(e), this.fireChangeEvent();
|
|
2195
2209
|
}
|
|
2196
2210
|
removeSelection(e) {
|
|
2197
2211
|
if (this.selectionType === "none")
|
|
2198
2212
|
return;
|
|
2199
2213
|
let t = e;
|
|
2200
|
-
this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
2214
|
+
this.selectionType === "row" ? t = E.singleRow(e.r1) : this.selectionType === "column" && (t = E.singleColumn(e.c1)), this.negativeRanges.push(t), this.fireChangeEvent();
|
|
2201
2215
|
}
|
|
2202
2216
|
togglePoint(e, t) {
|
|
2203
2217
|
this.getSelectionCount(e, t) > 0 ? this.removeSelection(E.singleCell(e, t)) : this.addSelection(E.singleCell(e, t));
|
|
@@ -2206,12 +2220,26 @@ class Me {
|
|
|
2206
2220
|
return this.getSelectionCount(e, t) > 0;
|
|
2207
2221
|
}
|
|
2208
2222
|
addRange(e) {
|
|
2209
|
-
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));
|
|
2223
|
+
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());
|
|
2210
2224
|
}
|
|
2211
2225
|
}
|
|
2212
2226
|
class Re {
|
|
2213
2227
|
constructor(e = "none") {
|
|
2214
|
-
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
2228
|
+
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2229
|
+
}
|
|
2230
|
+
getEventFocusChangedListeners() {
|
|
2231
|
+
return this.listenerArr;
|
|
2232
|
+
}
|
|
2233
|
+
addEventFocusChangedListener(e) {
|
|
2234
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2235
|
+
}
|
|
2236
|
+
removeEventFocusChangedListener(e) {
|
|
2237
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2238
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2239
|
+
}
|
|
2240
|
+
//@AvoidDoubleExecution(100)
|
|
2241
|
+
fireChangeEvent() {
|
|
2242
|
+
this.listenerArr.forEach((e) => e.onFocusChanged(this));
|
|
2215
2243
|
}
|
|
2216
2244
|
clearChanged() {
|
|
2217
2245
|
this.changed = !1;
|
|
@@ -2220,10 +2248,10 @@ class Re {
|
|
|
2220
2248
|
return this.changed;
|
|
2221
2249
|
}
|
|
2222
2250
|
clear() {
|
|
2223
|
-
this.rowIndex = -1, this.columnIndex = -1;
|
|
2251
|
+
this.rowIndex = -1, this.columnIndex = -1, this.fireChangeEvent();
|
|
2224
2252
|
}
|
|
2225
2253
|
setFocus(e, t) {
|
|
2226
|
-
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
|
|
2254
|
+
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0, this.fireChangeEvent());
|
|
2227
2255
|
}
|
|
2228
2256
|
hasFocus(e, t) {
|
|
2229
2257
|
return this.rowIndex === e && this.columnIndex === t;
|
|
@@ -2256,7 +2284,7 @@ class Z {
|
|
|
2256
2284
|
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new q(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new U(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ae(), this.getSelectionModel = () => Te, this.getFocusModel = () => De;
|
|
2257
2285
|
}
|
|
2258
2286
|
}
|
|
2259
|
-
const
|
|
2287
|
+
const F = class F {
|
|
2260
2288
|
/**
|
|
2261
2289
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2262
2290
|
*
|
|
@@ -2276,12 +2304,12 @@ const I = class I {
|
|
|
2276
2304
|
for (let l = r.r1; l <= r.r2; l++) {
|
|
2277
2305
|
const n = [];
|
|
2278
2306
|
for (let d = r.c1; d <= r.c2; d++) {
|
|
2279
|
-
const
|
|
2280
|
-
n.push(
|
|
2307
|
+
const c = t.isSelected(l, d) ? e.getBodyModel().getTextValueAt(l, d) : "";
|
|
2308
|
+
n.push(c);
|
|
2281
2309
|
}
|
|
2282
|
-
a.push(n.join(
|
|
2310
|
+
a.push(n.join(F.columnSeparatorChar));
|
|
2283
2311
|
}
|
|
2284
|
-
return s(a.join(
|
|
2312
|
+
return s(a.join(F.rowSeparatorChar));
|
|
2285
2313
|
}
|
|
2286
2314
|
}
|
|
2287
2315
|
if (o) {
|
|
@@ -2338,22 +2366,21 @@ const I = class I {
|
|
|
2338
2366
|
return t;
|
|
2339
2367
|
}
|
|
2340
2368
|
};
|
|
2341
|
-
|
|
2369
|
+
F.columnSeparatorChar = " ", F.rowSeparatorChar = `
|
|
2342
2370
|
`;
|
|
2343
|
-
let O =
|
|
2371
|
+
let O = F;
|
|
2344
2372
|
class z extends fe {
|
|
2345
2373
|
constructor(e, t, o, s, i, r = new O()) {
|
|
2346
|
-
var
|
|
2347
|
-
if (super(
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
new le(o),
|
|
2351
|
-
s
|
|
2352
|
-
), 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 X()), (a = this.tableOptions) != null && a.autoRestoreOptions) {
|
|
2353
|
-
const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
|
|
2354
|
-
n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new ce(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ge(n)), l.autoRestoreSortingState && (this.storeSortingService = new pe(n)));
|
|
2374
|
+
var n;
|
|
2375
|
+
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 X()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
|
|
2376
|
+
const d = this.tableOptions.autoRestoreOptions, c = d.getStorageKeyFn;
|
|
2377
|
+
c && (d.autoRestoreScrollPosition && (this.storeScrollPosStateService = new he(c)), d.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ge(c)), d.autoRestoreSortingState && (this.storeSortingService = new pe(c)));
|
|
2355
2378
|
}
|
|
2356
2379
|
this.mouseHandler = new ne(this), this.inputHandler = new ye(this), this.shortcutService = new Ee(this), this.shortcutService.addListener(this.selectionService);
|
|
2380
|
+
const a = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2381
|
+
a && a.addEventSelectionChangedListener(this);
|
|
2382
|
+
const l = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2383
|
+
l && l.addEventFocusChangedListener(this);
|
|
2357
2384
|
}
|
|
2358
2385
|
/**
|
|
2359
2386
|
* Creates a TableScope instance.
|
|
@@ -2368,14 +2395,7 @@ class z extends fe {
|
|
|
2368
2395
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2369
2396
|
*/
|
|
2370
2397
|
static create(e, t, o = new Z(), s = new X(), i = new J(), r = new O()) {
|
|
2371
|
-
return new z(
|
|
2372
|
-
e,
|
|
2373
|
-
t,
|
|
2374
|
-
i,
|
|
2375
|
-
o,
|
|
2376
|
-
s,
|
|
2377
|
-
r
|
|
2378
|
-
);
|
|
2398
|
+
return new z(e, t, i, o, s, r);
|
|
2379
2399
|
}
|
|
2380
2400
|
/**
|
|
2381
2401
|
* Triggers an action based on the provided actionId.
|
|
@@ -2728,8 +2748,8 @@ class z extends fe {
|
|
|
2728
2748
|
else if (i.allCollapsed)
|
|
2729
2749
|
d.expanded = !1;
|
|
2730
2750
|
else {
|
|
2731
|
-
const
|
|
2732
|
-
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(
|
|
2751
|
+
const c = s(d.data);
|
|
2752
|
+
i.mode === "expanded" ? d.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c) : i.mode === "collapsed" && (d.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(c));
|
|
2733
2753
|
}
|
|
2734
2754
|
}
|
|
2735
2755
|
a.recalcVisibleTreeRows();
|
|
@@ -2982,8 +3002,8 @@ const $ = class $ {
|
|
|
2982
3002
|
render(e, t, o, s, i, r, a) {
|
|
2983
3003
|
const l = r != null && r.data ? r.data : "";
|
|
2984
3004
|
if (r) {
|
|
2985
|
-
const { toggle: n, visibility: d, closed:
|
|
2986
|
-
this.addText(e, s, t, o, l, g), n && d !== "always" && this.addArrowDiv(a, e, !
|
|
3005
|
+
const { toggle: n, visibility: d, closed: c } = r, g = n ? $.toggleHeaderGroup : "";
|
|
3006
|
+
this.addText(e, s, t, o, l, g), n && d !== "always" && this.addArrowDiv(a, e, !c, t, o, s, g);
|
|
2987
3007
|
} else
|
|
2988
3008
|
this.addText(e, s, t, o, l, "");
|
|
2989
3009
|
}
|
|
@@ -3000,8 +3020,8 @@ const $ = class $ {
|
|
|
3000
3020
|
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}`);
|
|
3001
3021
|
let n;
|
|
3002
3022
|
o ? n = this.headerGroupOptions.iconExpanded : n = this.headerGroupOptions.iconCollapsed;
|
|
3003
|
-
const d = n.content,
|
|
3004
|
-
e.appendChild(l,
|
|
3023
|
+
const d = n.content, c = e.createText(d);
|
|
3024
|
+
e.appendChild(l, c), n.style && this.applyStyleString(e, l, n.style);
|
|
3005
3025
|
for (const g of n.classes)
|
|
3006
3026
|
e.addClass(l, g);
|
|
3007
3027
|
return e.appendChild(t, l), l;
|
|
@@ -3047,7 +3067,7 @@ const ke = ee({
|
|
|
3047
3067
|
"mouseDraggingEnd",
|
|
3048
3068
|
"mouseMoved"
|
|
3049
3069
|
],
|
|
3050
|
-
setup(
|
|
3070
|
+
setup(h, { emit: e }) {
|
|
3051
3071
|
const t = te(null), o = (s) => {
|
|
3052
3072
|
const i = {
|
|
3053
3073
|
onSelectionChanged: (a) => {
|
|
@@ -3079,33 +3099,33 @@ const ke = ee({
|
|
|
3079
3099
|
}
|
|
3080
3100
|
}, r = new z(
|
|
3081
3101
|
s,
|
|
3082
|
-
|
|
3102
|
+
h.tableModel,
|
|
3083
3103
|
new J(),
|
|
3084
|
-
|
|
3104
|
+
h.tableOptions,
|
|
3085
3105
|
i
|
|
3086
3106
|
);
|
|
3087
3107
|
r.firstInit(), e("tableReady", r.getApi());
|
|
3088
3108
|
};
|
|
3089
3109
|
return oe(() => {
|
|
3090
3110
|
t.value && o(t.value);
|
|
3091
|
-
}),
|
|
3111
|
+
}), h.licenseKey && k.getInstance().setLicenseKey(h.licenseKey), {
|
|
3092
3112
|
root: t
|
|
3093
3113
|
};
|
|
3094
3114
|
}
|
|
3095
|
-
}),
|
|
3096
|
-
const t =
|
|
3115
|
+
}), Fe = (h, e) => {
|
|
3116
|
+
const t = h.__vccOpts || h;
|
|
3097
3117
|
for (const [o, s] of e)
|
|
3098
3118
|
t[o] = s;
|
|
3099
3119
|
return t;
|
|
3100
|
-
},
|
|
3120
|
+
}, Ie = {
|
|
3101
3121
|
ref: "root",
|
|
3102
3122
|
class: "container-div",
|
|
3103
3123
|
style: { width: "100%", height: "100%", "background-color": "transparent", padding: "0", margin: "0" }
|
|
3104
3124
|
};
|
|
3105
|
-
function Oe(
|
|
3106
|
-
return se(), ie("div",
|
|
3125
|
+
function Oe(h, e, t, o, s, i) {
|
|
3126
|
+
return se(), ie("div", Ie, null, 512);
|
|
3107
3127
|
}
|
|
3108
|
-
const Le = /* @__PURE__ */
|
|
3128
|
+
const Le = /* @__PURE__ */ Fe(ke, [["render", Oe]]);
|
|
3109
3129
|
class Be {
|
|
3110
3130
|
constructor(e, t) {
|
|
3111
3131
|
this.component = e, this.appContext = t;
|
|
@@ -3133,8 +3153,8 @@ class Be {
|
|
|
3133
3153
|
}
|
|
3134
3154
|
}
|
|
3135
3155
|
const He = {
|
|
3136
|
-
install: (
|
|
3137
|
-
|
|
3156
|
+
install: (h, e = { img: "" }) => {
|
|
3157
|
+
h.component("GuiexpertTable", Le);
|
|
3138
3158
|
}
|
|
3139
3159
|
};
|
|
3140
3160
|
export {
|