@guiexpert/table 1.1.8 → 1.1.9
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 +42 -36
- package/index.js +777 -647
- package/lib/table/data/common/args-render-cell-div.d.ts +0 -2
- package/lib/table/data/options/header-group-options.d.ts +7 -0
- package/lib/table/data/options/header-group-options.if.d.ts +5 -0
- package/lib/table/data/options/table-options.d.ts +2 -0
- package/lib/table/data/options/table-options.if.d.ts +3 -8
- package/lib/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +18 -14
- package/lib/table/data/tablemodel/cellgroup/cell-group-ext.d.ts +1 -1
- package/lib/table/render-scope.d.ts +1 -1
- package/lib/table/renderer/cell-group-ext-cell-renderer.d.ts +14 -7
- package/lib/table/service/convenience-dom.service.d.ts +15 -1
- package/lib/table/service/copy-service.d.ts +30 -0
- package/lib/table/service/copy-service.if.d.ts +25 -0
- package/lib/table/table-api.d.ts +6 -0
- package/lib/table/table-scope.d.ts +60 -45
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -23,18 +23,18 @@ class F {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function L(c) {
|
|
27
|
+
return c && c.type === "TreeRow";
|
|
28
28
|
}
|
|
29
|
-
function z(
|
|
30
|
-
return
|
|
29
|
+
function z(c) {
|
|
30
|
+
return c && c.type === "AreaModelTree";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function ye(c) {
|
|
33
|
+
return c && c.type === "CheckboxColumnDef";
|
|
34
34
|
}
|
|
35
35
|
class K {
|
|
36
|
-
constructor(e = -1, t = -1, o = -1, s = -1, i, r,
|
|
37
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent =
|
|
36
|
+
constructor(e = -1, t = -1, o = -1, s = -1, i, r, n, l = 0, d = 0, a = 0, h = "") {
|
|
37
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = s, this.areaIdent = i, this.sideIdent = r, this.originalEvent = n, this.clickCount = l, this.draggingX = d, this.draggingY = a, this.action = h;
|
|
38
38
|
}
|
|
39
39
|
clone() {
|
|
40
40
|
return new K(
|
|
@@ -52,25 +52,25 @@ class K {
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
class
|
|
55
|
+
class O {
|
|
56
56
|
constructor(e = ">", t = "", o = []) {
|
|
57
57
|
this.content = e, this.style = t, this.classes = o;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
class ge {
|
|
61
|
-
constructor(e = new
|
|
61
|
+
constructor(e = new O(
|
|
62
62
|
">",
|
|
63
63
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
64
64
|
["gt-table-tree-arrow-expanded"]
|
|
65
|
-
), t = new
|
|
65
|
+
), t = new O(
|
|
66
66
|
">",
|
|
67
67
|
"",
|
|
68
68
|
["ge-table-tree-arrow-collapsed"]
|
|
69
|
-
), o = new
|
|
69
|
+
), o = new O(
|
|
70
70
|
">",
|
|
71
71
|
"color:transparent;",
|
|
72
72
|
["gt-table-tree-arrow-hidden"]
|
|
73
|
-
), s = new
|
|
73
|
+
), s = new O(
|
|
74
74
|
"↕",
|
|
75
75
|
"",
|
|
76
76
|
["gt-table-tree-arrow-expanded-all"]
|
|
@@ -79,11 +79,11 @@ class ge {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
class be {
|
|
82
|
-
constructor(e = new
|
|
82
|
+
constructor(e = new O("↑", "", ["ge-header-sorted-asc"]), t = new O("↓", "", ["ge-header-sorted-desc"]), o = new O("↑", "color:transparent;", [])) {
|
|
83
83
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
class
|
|
86
|
+
class Ce {
|
|
87
87
|
constructor(e) {
|
|
88
88
|
this.domService = e;
|
|
89
89
|
}
|
|
@@ -157,26 +157,26 @@ class xe {
|
|
|
157
157
|
return this.addClass(e, o), this.domService.appendChild(t, o), o;
|
|
158
158
|
}
|
|
159
159
|
addRowDiv(e, t, o = -1, s, i, r = "") {
|
|
160
|
-
const
|
|
161
|
-
if (this.domService.addClass(
|
|
160
|
+
const n = t.index ?? -1, l = this.getDivOrCreateDiv(n, e);
|
|
161
|
+
if (this.domService.addClass(l, "ge-table-row-div"), this.domService.addClass(l, `ge-table-row-div-${t.index}`), s === "body" && i === "center") {
|
|
162
162
|
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
163
|
-
this.domService.addClass(
|
|
163
|
+
this.domService.addClass(l, `ge-table-row-${d}`);
|
|
164
164
|
}
|
|
165
|
-
if (this.domService.setStyle(
|
|
165
|
+
if (this.domService.setStyle(l, "display", "clip"), this.domService.setStyle(l, "position", "absolute"), this.domService.setStyle(l, "left", `${t.left}px`), this.domService.setStyle(l, "top", `${t.top}px`), this.domService.setStyle(l, "width", `${t.width}px`), this.domService.setStyle(l, "height", `${t.height}px`), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-area", `${s}`), r) {
|
|
166
166
|
const d = this.domService.createText(r);
|
|
167
|
-
this.domService.appendChild(
|
|
167
|
+
this.domService.appendChild(l, d);
|
|
168
168
|
}
|
|
169
|
-
return this.domService.appendChild(e.child,
|
|
170
|
-
}
|
|
171
|
-
addColumnDiv(e
|
|
172
|
-
const
|
|
173
|
-
this.domService.addClass(
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
const
|
|
177
|
-
this.addLabelDiv(
|
|
169
|
+
return this.domService.appendChild(e.child, l), l;
|
|
170
|
+
}
|
|
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, w = a == null ? void 0 : a.treeOptions, f = a == null ? void 0 : a.showCheckboxWihoutExtraColumn, p = this.domService.createElement("div");
|
|
173
|
+
this.domService.addClass(p, "ge-table-col-div"), this.domService.addClass(p, `ge-table-col-div-${o.index}`), this.domService.setAttribute(p, "data-col-index", `${o.index}`), this.domService.setAttribute(p, "data-row-index", `${s}`), this.domService.setAttribute(p, "data-area", `${r}`);
|
|
174
|
+
const g = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
175
|
+
if (r === "body" && n === "center" && this.domService.addClass(p, `ge-table-column-${g}`), this.domService.setStyle(p, "display", "clip"), this.domService.setStyle(p, "position", "absolute"), this.domService.setStyle(p, "left", `${o.left}px`), this.domService.setStyle(p, "top", `${o.top}px`), this.domService.setStyle(p, "width", `${o.width}px`), this.domService.setStyle(p, "height", `${o.height}px`), d && d !== "none" && (this.domService.addClass(p, "ge-table-col-tree"), this.addArrowDiv(p, d, w, s, i, r)), f && i === 0 && h && this.addCheckboxToDiv(p, h, r, s), l) {
|
|
176
|
+
const b = d !== "none" && i === 0;
|
|
177
|
+
this.addLabelDiv(p, l, b, s, i, r);
|
|
178
178
|
}
|
|
179
|
-
return
|
|
179
|
+
return u && this.addSortedIcon(p, u, a == null ? void 0 : a.sortedOptions, i), this.domService.appendChild(t, p), p;
|
|
180
180
|
}
|
|
181
181
|
addCheckboxToDiv(e, t, o, s) {
|
|
182
182
|
const i = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
@@ -190,40 +190,40 @@ class xe {
|
|
|
190
190
|
class="ge-table-row-checkbox"> `, this.domService.setStyle(i, "display", "inline"), this.domService.setStyle(i, "width", "inherit"), this.domService.setAttribute(i, "data-row-index", `${s}`), this.domService.appendChild(e, i), i;
|
|
191
191
|
}
|
|
192
192
|
addLabelDiv(e, t = "", o = !1, s = -1, i = -1, r = "body") {
|
|
193
|
-
const
|
|
194
|
-
if (this.domService.addClass(
|
|
193
|
+
const n = this.domService.createElement("div");
|
|
194
|
+
if (this.domService.addClass(n, "ge-table-label-div"), this.domService.setStyle(n, "position", "relative"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "width", "100%"), this.domService.setStyle(n, "height", "100%"), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`), t)
|
|
195
195
|
if (o) {
|
|
196
|
-
const
|
|
197
|
-
this.domService.appendChild(
|
|
196
|
+
const l = this.domService.createText(t);
|
|
197
|
+
this.domService.appendChild(n, l);
|
|
198
198
|
} else {
|
|
199
|
-
const
|
|
200
|
-
this.domService.appendChild(
|
|
199
|
+
const l = this.domService.createElement("div");
|
|
200
|
+
this.domService.appendChild(n, l);
|
|
201
201
|
const d = this.domService.createText(t);
|
|
202
|
-
this.domService.addClass(
|
|
202
|
+
this.domService.addClass(l, "ge-table-label"), this.domService.appendChild(l, d), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
203
203
|
}
|
|
204
|
-
return this.domService.appendChild(e,
|
|
204
|
+
return this.domService.appendChild(e, n), n;
|
|
205
205
|
}
|
|
206
206
|
addSortedIcon(e, t = "", o = new be(), s = -1) {
|
|
207
207
|
const i = this.domService.createElement("div");
|
|
208
208
|
this.domService.addClass(i, "ge-table-sorted-icon-div"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, "right", "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${s}`), this.domService.setAttribute(i, "data-area", "header");
|
|
209
209
|
let r;
|
|
210
210
|
t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
|
|
211
|
-
const
|
|
212
|
-
this.domService.appendChild(i,
|
|
211
|
+
const n = r.content, l = this.domService.createText(n);
|
|
212
|
+
this.domService.appendChild(i, l), r.style && this.applyStyleString(i, r.style);
|
|
213
213
|
for (const d of r.classes)
|
|
214
214
|
this.domService.addClass(i, d);
|
|
215
215
|
return this.domService.appendChild(e, i), i;
|
|
216
216
|
}
|
|
217
217
|
addArrowDiv(e, t = "none", o = new ge(), s = -1, i = -1, r = "body") {
|
|
218
|
-
const
|
|
219
|
-
this.domService.addClass(
|
|
220
|
-
let
|
|
221
|
-
t === "expanded" ?
|
|
222
|
-
const d =
|
|
223
|
-
this.domService.appendChild(
|
|
224
|
-
for (const
|
|
225
|
-
this.domService.addClass(
|
|
226
|
-
return this.domService.appendChild(e,
|
|
218
|
+
const n = this.domService.createElement("div");
|
|
219
|
+
this.domService.addClass(n, "ge-table-tree-arrow-div"), this.domService.setStyle(n, "display", "inline-block"), this.domService.setStyle(n, "position", ""), this.domService.setStyle(n, "width", "20px"), this.domService.setStyle(n, "background", "transparent"), this.domService.setStyle(n, "cursor", "pointer"), this.domService.setAttribute(n, "data-row-index", `${s}`), this.domService.setAttribute(n, "data-col-index", `${i}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
220
|
+
let l;
|
|
221
|
+
t === "expanded" ? l = o.arrowExpanded : t === "collapsed" ? l = o.arrowCollapsed : l = o.arrowPlaceholder;
|
|
222
|
+
const d = l.content, a = this.domService.createText(d);
|
|
223
|
+
this.domService.appendChild(n, a), l.style && this.applyStyleString(n, l.style);
|
|
224
|
+
for (const h of l.classes)
|
|
225
|
+
this.domService.addClass(n, h);
|
|
226
|
+
return this.domService.appendChild(e, n), n;
|
|
227
227
|
}
|
|
228
228
|
addColumnBorderDivs(e, t, o, s, i) {
|
|
229
229
|
if (e.verticalBorderVisible) {
|
|
@@ -265,8 +265,8 @@ class xe {
|
|
|
265
265
|
return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
const U = (
|
|
269
|
-
class
|
|
268
|
+
const U = (c) => c === "header" ? "header" : c === "footer" ? "footer" : "body";
|
|
269
|
+
class ve {
|
|
270
270
|
constructor(e, t) {
|
|
271
271
|
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)) {
|
|
272
272
|
this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
|
|
@@ -278,7 +278,7 @@ class ye {
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
class
|
|
281
|
+
class Re {
|
|
282
282
|
constructor(e) {
|
|
283
283
|
this.tableScope = e, this.doubleClickDelay = 500, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, this.lastClicked = 0, this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this)), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this)), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this)), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this)), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this)), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this)), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope)), [window, this.tableScope.hostElement].forEach(
|
|
284
284
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
@@ -308,12 +308,14 @@ class Ce {
|
|
|
308
308
|
if (t - this.lastClicked < this.doubleClickDelay)
|
|
309
309
|
return;
|
|
310
310
|
this.lastClicked = t;
|
|
311
|
-
const o = new
|
|
311
|
+
const o = new ve(e.target, this.tableScope);
|
|
312
312
|
if (o.action === "toggleExpandCollapseAll")
|
|
313
313
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
314
|
+
else if (o.action === "toggleHeaderGroup")
|
|
315
|
+
this.tableScope.toggleHeaderGroup(o), e.preventDefault(), e.stopPropagation();
|
|
314
316
|
else if (o.inputType === "checkbox" && o.areaIdent)
|
|
315
317
|
this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
316
|
-
else if (
|
|
318
|
+
else if (L(o.row) && o.areaModel) {
|
|
317
319
|
const s = o.colIdx === this.getArrowColumnIndex() && e.altKey, i = o.className.includes("ge-table-tree-arrow-div");
|
|
318
320
|
if (console.info(i, s), s || i) {
|
|
319
321
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -335,15 +337,15 @@ class Ce {
|
|
|
335
337
|
*/
|
|
336
338
|
onHostElementDblClicked(e) {
|
|
337
339
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
338
|
-
const t = e.target, o = t.getAttribute("data-area"), s = U(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")),
|
|
340
|
+
const t = e.target, o = t.getAttribute("data-area"), s = U(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), n = this.tableScope.tableModel.getAreaModel(s);
|
|
339
341
|
if (o && s === "header")
|
|
340
342
|
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, i, r));
|
|
341
343
|
else if (t.getAttribute("data-row-index")) {
|
|
342
|
-
const
|
|
343
|
-
if (o && s === "body" &&
|
|
344
|
+
const l = n.getRowByIndex(i);
|
|
345
|
+
if (o && s === "body" && n.isEditable(i, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(i, r)), L(l) && r === this.getArrowColumnIndex()) {
|
|
344
346
|
e.preventDefault(), e.stopPropagation();
|
|
345
|
-
const d =
|
|
346
|
-
d.expanded = !d.expanded, "recalcVisibleTreeRows" in
|
|
347
|
+
const d = l;
|
|
348
|
+
d.expanded = !d.expanded, "recalcVisibleTreeRows" in n && n.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
347
349
|
}
|
|
348
350
|
}
|
|
349
351
|
}
|
|
@@ -368,11 +370,11 @@ class Ce {
|
|
|
368
370
|
* @returns {void}
|
|
369
371
|
*/
|
|
370
372
|
updateCollapsedExpandedState(e) {
|
|
371
|
-
var o, s, i, r,
|
|
373
|
+
var o, s, i, r, n;
|
|
372
374
|
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
373
375
|
if (t) {
|
|
374
|
-
const
|
|
375
|
-
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(
|
|
376
|
+
const l = (i = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : i.collapsedExpandedStateGet().mode, d = l === "collapsed" && !e.expanded || l === "expanded" && e.expanded, a = l === "collapsed" && e.expanded || l === "expanded" && !e.expanded, h = t(e.data);
|
|
377
|
+
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : a && ((n = this.tableScope.storeStateCollapsedExpandService) == null || n.collapsedStateIdsRemove(h));
|
|
376
378
|
}
|
|
377
379
|
}
|
|
378
380
|
getArrowColumnIndex() {
|
|
@@ -408,7 +410,7 @@ class Ce {
|
|
|
408
410
|
}
|
|
409
411
|
}
|
|
410
412
|
}
|
|
411
|
-
class
|
|
413
|
+
class Ae {
|
|
412
414
|
constructor(e) {
|
|
413
415
|
this.tableScope = e;
|
|
414
416
|
}
|
|
@@ -552,6 +554,18 @@ class ve {
|
|
|
552
554
|
getShortcutActionMapping() {
|
|
553
555
|
return this.tableScope.shortcutService.getShortcutActionMapping();
|
|
554
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* Copies the selected data from the table to the clipboard.
|
|
559
|
+
*
|
|
560
|
+
* @return {Promise<string>} - A promise that resolves with the copied data as a string.
|
|
561
|
+
*/
|
|
562
|
+
copyToClipboard() {
|
|
563
|
+
return this.tableScope.copyService.copyToClipboard(
|
|
564
|
+
this.tableScope.tableModel,
|
|
565
|
+
this.tableScope.selectionModel(),
|
|
566
|
+
this.tableScope.focusModel()
|
|
567
|
+
);
|
|
568
|
+
}
|
|
555
569
|
}
|
|
556
570
|
class q {
|
|
557
571
|
constructor(e) {
|
|
@@ -628,7 +642,7 @@ class q {
|
|
|
628
642
|
// }
|
|
629
643
|
// }
|
|
630
644
|
}
|
|
631
|
-
class
|
|
645
|
+
class Me extends q {
|
|
632
646
|
constructor(e) {
|
|
633
647
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
634
648
|
}
|
|
@@ -650,14 +664,14 @@ class Re extends q {
|
|
|
650
664
|
}
|
|
651
665
|
}
|
|
652
666
|
}
|
|
653
|
-
class
|
|
667
|
+
class Ee {
|
|
654
668
|
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
655
669
|
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
656
670
|
}
|
|
657
671
|
}
|
|
658
|
-
class
|
|
672
|
+
class Ie extends q {
|
|
659
673
|
constructor(e) {
|
|
660
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
674
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ee(), this.load();
|
|
661
675
|
}
|
|
662
676
|
collapsedExpandedStateGet() {
|
|
663
677
|
return this.collapsedExpandedState;
|
|
@@ -689,7 +703,7 @@ class Ee extends q {
|
|
|
689
703
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
690
704
|
}
|
|
691
705
|
}
|
|
692
|
-
class
|
|
706
|
+
class ke extends q {
|
|
693
707
|
constructor(e) {
|
|
694
708
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
695
709
|
}
|
|
@@ -716,7 +730,7 @@ class $ {
|
|
|
716
730
|
this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
|
|
717
731
|
}
|
|
718
732
|
}
|
|
719
|
-
class
|
|
733
|
+
class Te {
|
|
720
734
|
constructor(e, t, o, s) {
|
|
721
735
|
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new $(), this.areaBodyCenterGeo = new $(), this.areaBodyEastGeo = new $();
|
|
722
736
|
const i = this.hostElement;
|
|
@@ -867,7 +881,7 @@ class ke {
|
|
|
867
881
|
this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
|
|
868
882
|
}
|
|
869
883
|
}
|
|
870
|
-
class
|
|
884
|
+
class R {
|
|
871
885
|
/**
|
|
872
886
|
* Represents a constructor for a class.
|
|
873
887
|
* @constructor
|
|
@@ -881,7 +895,7 @@ class v {
|
|
|
881
895
|
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
882
896
|
}
|
|
883
897
|
static create(e) {
|
|
884
|
-
return e.gammaRange === void 0 && (e.gammaRange = !1), new
|
|
898
|
+
return e.gammaRange === void 0 && (e.gammaRange = !1), new R(
|
|
885
899
|
e.rowIndex1,
|
|
886
900
|
e.columnIndex1,
|
|
887
901
|
e.rowIndex2,
|
|
@@ -890,19 +904,19 @@ class v {
|
|
|
890
904
|
);
|
|
891
905
|
}
|
|
892
906
|
static singleCell(e, t) {
|
|
893
|
-
return new
|
|
907
|
+
return new R(e, t, e, t);
|
|
894
908
|
}
|
|
895
909
|
static singleRow(e) {
|
|
896
|
-
return new
|
|
910
|
+
return new R(e, 0, e, Number.MAX_SAFE_INTEGER);
|
|
897
911
|
}
|
|
898
912
|
static singleColumn(e) {
|
|
899
|
-
return new
|
|
913
|
+
return new R(0, e, Number.MAX_SAFE_INTEGER, e);
|
|
900
914
|
}
|
|
901
915
|
isInRange(e, t) {
|
|
902
916
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
903
917
|
}
|
|
904
918
|
}
|
|
905
|
-
class
|
|
919
|
+
class _e {
|
|
906
920
|
constructor(e, t) {
|
|
907
921
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
908
922
|
}
|
|
@@ -916,9 +930,9 @@ class Ie {
|
|
|
916
930
|
let i = this.areaModel.getColspanAt(o, s), r = this.areaModel.getRowspanAt(o, s);
|
|
917
931
|
if (i > 1 || r > 1) {
|
|
918
932
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
919
|
-
const
|
|
933
|
+
const n = "gammaCells" in this.areaModel;
|
|
920
934
|
this.colAndRowspanRanges.push(
|
|
921
|
-
new
|
|
935
|
+
new R(o, s, o + r - 1, s + i - 1, n)
|
|
922
936
|
);
|
|
923
937
|
}
|
|
924
938
|
}
|
|
@@ -940,17 +954,17 @@ class T {
|
|
|
940
954
|
this.header = e, this.body = t, this.footer = o;
|
|
941
955
|
}
|
|
942
956
|
}
|
|
943
|
-
class
|
|
957
|
+
class De extends Te {
|
|
944
958
|
constructor(e, t, o, s) {
|
|
945
|
-
var r,
|
|
959
|
+
var r, n;
|
|
946
960
|
super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
947
961
|
header: [],
|
|
948
962
|
body: [],
|
|
949
963
|
footer: []
|
|
950
|
-
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (
|
|
951
|
-
(
|
|
964
|
+
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.editing = !1, this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (n = this.tableOptions) != null && n.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), z(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
965
|
+
(l) => {
|
|
952
966
|
var d;
|
|
953
|
-
this.colAndRowspanModels[
|
|
967
|
+
this.colAndRowspanModels[l] = new _e(t, t.getAreaModel(l)), (d = this.colAndRowspanModels[l]) == null || d.init();
|
|
954
968
|
}
|
|
955
969
|
);
|
|
956
970
|
}
|
|
@@ -1079,84 +1093,84 @@ class Te extends ke {
|
|
|
1079
1093
|
var g;
|
|
1080
1094
|
const o = this.getArea(e, "west"), s = this.getArea(e, "center"), i = this.getArea(e, "east"), r = s.child.clientHeight;
|
|
1081
1095
|
o.child.innerText = "", s.child.innerText = "", i.child.innerText = "";
|
|
1082
|
-
const
|
|
1083
|
-
for (; this.cleanupFunctions[e].length; ) {
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1096
|
+
const n = 0, l = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), a = this.tableModel.getAreaModel(e), h = a.getRowCount();
|
|
1097
|
+
for (e === "header" && console.info("rowCount", h); this.cleanupFunctions[e].length; ) {
|
|
1098
|
+
const b = this.cleanupFunctions[e].shift();
|
|
1099
|
+
b && b();
|
|
1086
1100
|
}
|
|
1087
1101
|
let u = t;
|
|
1088
|
-
const
|
|
1089
|
-
for (let
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
1092
|
-
this.firstVisibleRowIndex =
|
|
1093
|
-
let
|
|
1094
|
-
const
|
|
1102
|
+
const w = this.tableModel.getColumnCount(), f = this.tableModel.getFixedRightColumnCount(), p = this.tableModel.getFixedLeftColumnCount();
|
|
1103
|
+
for (let b = 0; b < h; b++) {
|
|
1104
|
+
const C = u, v = b === h - 1, A = this.tableModel.getRowHeight(e, b);
|
|
1105
|
+
if (C + A > 0) {
|
|
1106
|
+
this.firstVisibleRowIndex = b;
|
|
1107
|
+
let y = { left: n, width: l, height: A, top: C, index: b }, S = this.dom.addRowDiv(s, y, b, e, "center");
|
|
1108
|
+
const k = p;
|
|
1095
1109
|
if (this.adjustColumnsToRowParent({
|
|
1096
1110
|
areaIdent: e,
|
|
1097
1111
|
sideIdent: "center",
|
|
1098
1112
|
areaModel: a,
|
|
1099
|
-
geo:
|
|
1100
|
-
parent:
|
|
1101
|
-
rowIndex:
|
|
1102
|
-
columnIndexStart:
|
|
1103
|
-
columnIndexEnd:
|
|
1113
|
+
geo: y,
|
|
1114
|
+
parent: S,
|
|
1115
|
+
rowIndex: b,
|
|
1116
|
+
columnIndexStart: k,
|
|
1117
|
+
columnIndexEnd: w - f - 1,
|
|
1104
1118
|
verticalFixed: !1,
|
|
1105
|
-
lastRowOfModel:
|
|
1106
|
-
}), d.left > 0 && (
|
|
1119
|
+
lastRowOfModel: v
|
|
1120
|
+
}), d.left > 0 && (y = { left: n, width: this.areaBodyWestGeo.width, height: A, top: C, index: b }, S = this.dom.addRowDiv(o, y, b, e, "west"), this.adjustColumnsToRowParent({
|
|
1107
1121
|
areaIdent: e,
|
|
1108
1122
|
sideIdent: "west",
|
|
1109
1123
|
areaModel: a,
|
|
1110
|
-
geo:
|
|
1111
|
-
parent:
|
|
1112
|
-
rowIndex:
|
|
1124
|
+
geo: y,
|
|
1125
|
+
parent: S,
|
|
1126
|
+
rowIndex: b,
|
|
1113
1127
|
columnIndexStart: 0,
|
|
1114
|
-
columnIndexEnd:
|
|
1128
|
+
columnIndexEnd: k - 1,
|
|
1115
1129
|
verticalFixed: !0,
|
|
1116
|
-
lastRowOfModel:
|
|
1117
|
-
})), d.right > 0 && (
|
|
1130
|
+
lastRowOfModel: v
|
|
1131
|
+
})), d.right > 0 && (y = { left: n, width: this.areaBodyEastGeo.width, height: A, top: C, index: b }, S = this.dom.addRowDiv(i, y, b, e, "east"), this.adjustColumnsToRowParent({
|
|
1118
1132
|
areaIdent: e,
|
|
1119
1133
|
sideIdent: "east",
|
|
1120
1134
|
areaModel: a,
|
|
1121
|
-
geo:
|
|
1122
|
-
parent:
|
|
1123
|
-
rowIndex:
|
|
1124
|
-
columnIndexStart:
|
|
1125
|
-
columnIndexEnd:
|
|
1135
|
+
geo: y,
|
|
1136
|
+
parent: S,
|
|
1137
|
+
rowIndex: b,
|
|
1138
|
+
columnIndexStart: w - f,
|
|
1139
|
+
columnIndexEnd: w - 1,
|
|
1126
1140
|
verticalFixed: !0,
|
|
1127
|
-
lastRowOfModel:
|
|
1128
|
-
})), e === "header" && this.tree &&
|
|
1141
|
+
lastRowOfModel: v
|
|
1142
|
+
})), e === "header" && this.tree && b === h - 1) {
|
|
1129
1143
|
const M = this.dom.applyStyle(
|
|
1130
1144
|
this.dom.setAttribute(
|
|
1131
|
-
this.dom.addDiv(
|
|
1145
|
+
this.dom.addDiv(S, new $(16, 20, 20, 8)),
|
|
1132
1146
|
"data-ge-action",
|
|
1133
1147
|
"toggleExpandCollapseAll"
|
|
1134
1148
|
),
|
|
1135
1149
|
{ cursor: "pointer" }
|
|
1136
|
-
),
|
|
1137
|
-
if (
|
|
1138
|
-
const
|
|
1139
|
-
this.dom.domService.appendChild(M,
|
|
1150
|
+
), E = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1151
|
+
if (E) {
|
|
1152
|
+
const B = this.dom.domService.createText(E.content);
|
|
1153
|
+
this.dom.domService.appendChild(M, B), E.style && this.dom.applyStyleString(M, E.style);
|
|
1140
1154
|
}
|
|
1141
1155
|
}
|
|
1142
1156
|
}
|
|
1143
|
-
if (u = u +
|
|
1157
|
+
if (u = u + A, u > r)
|
|
1144
1158
|
break;
|
|
1145
1159
|
}
|
|
1146
1160
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
1149
|
-
for (const
|
|
1150
|
-
let
|
|
1151
|
-
if (
|
|
1152
|
-
|
|
1153
|
-
else if (
|
|
1154
|
-
|
|
1161
|
+
const b = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
1162
|
+
if (b.length)
|
|
1163
|
+
for (const C of b) {
|
|
1164
|
+
let v = 0, A = s.child, y = "center";
|
|
1165
|
+
if (C.c1 < p)
|
|
1166
|
+
A = o.child, y = "west";
|
|
1167
|
+
else if (f > 0 && C.c1 >= w - f)
|
|
1168
|
+
A = i.child, y = "east";
|
|
1155
1169
|
else {
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1170
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1171
|
+
v = this.scrollFactorX * S - this.areaBodyWestGeo.width, y = "center";
|
|
1158
1172
|
}
|
|
1159
|
-
this.drawBigCell(
|
|
1173
|
+
this.drawBigCell(C, v, t, a, A, y);
|
|
1160
1174
|
}
|
|
1161
1175
|
}
|
|
1162
1176
|
}
|
|
@@ -1171,46 +1185,46 @@ class Te extends ke {
|
|
|
1171
1185
|
* @protected
|
|
1172
1186
|
*/
|
|
1173
1187
|
drawBigCell(e, t, o, s, i, r) {
|
|
1174
|
-
const
|
|
1188
|
+
const n = o + this.getRowHeights(0, e.r1 - 1, s).reduce((g, b) => g + b, 0), l = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
1175
1189
|
let a = 0;
|
|
1176
|
-
d > 0 && e.c1 >=
|
|
1177
|
-
const
|
|
1178
|
-
let
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1190
|
+
d > 0 && e.c1 >= l - d && (a = l - d);
|
|
1191
|
+
const h = t + this.getColumnWidths(a, e.c1 - 1).reduce((g, b) => g + b, 0), u = this.getRowHeights(e.r1, e.r2, s).reduce((g, b) => g + b, 0), w = this.getColumnWidths(e.c1, e.c2).reduce((g, b) => g + b, 0);
|
|
1192
|
+
let f = !1;
|
|
1193
|
+
const p = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1194
|
+
p && (f = p.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1181
1195
|
areaModel: s,
|
|
1182
1196
|
areaIdent: s.areaIdent,
|
|
1183
1197
|
sideIdent: r,
|
|
1184
1198
|
rowIndex: e.r1,
|
|
1185
1199
|
columnIndex: e.c1,
|
|
1186
|
-
left:
|
|
1187
|
-
top:
|
|
1188
|
-
width:
|
|
1200
|
+
left: h,
|
|
1201
|
+
top: n,
|
|
1202
|
+
width: w,
|
|
1189
1203
|
height: u,
|
|
1190
1204
|
parent: i,
|
|
1191
|
-
cellSelected:
|
|
1205
|
+
cellSelected: f,
|
|
1192
1206
|
lastRowOfModel: !0,
|
|
1193
1207
|
gammaRange: e.gammaRange
|
|
1194
|
-
})
|
|
1208
|
+
}) : this.renderCell({
|
|
1195
1209
|
areaModel: s,
|
|
1196
1210
|
areaIdent: s.areaIdent,
|
|
1197
1211
|
sideIdent: r,
|
|
1198
1212
|
rowIndex: e.r1,
|
|
1199
1213
|
columnIndex: e.c1,
|
|
1200
|
-
left:
|
|
1201
|
-
top:
|
|
1202
|
-
width:
|
|
1214
|
+
left: h,
|
|
1215
|
+
top: n,
|
|
1216
|
+
width: w,
|
|
1203
1217
|
height: u,
|
|
1204
1218
|
parent: i,
|
|
1205
|
-
cellSelected:
|
|
1219
|
+
cellSelected: f,
|
|
1206
1220
|
lastRowOfModel: !0,
|
|
1207
1221
|
gammaRange: e.gammaRange
|
|
1208
1222
|
}), s.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1209
1223
|
rowIndex: e.r1,
|
|
1210
1224
|
columnIndex: e.c1,
|
|
1211
|
-
cellLeft:
|
|
1212
|
-
cellTop:
|
|
1213
|
-
cellWidth:
|
|
1225
|
+
cellLeft: h,
|
|
1226
|
+
cellTop: n,
|
|
1227
|
+
cellWidth: w,
|
|
1214
1228
|
cellHeight: u,
|
|
1215
1229
|
parent: i
|
|
1216
1230
|
});
|
|
@@ -1233,45 +1247,45 @@ class Te extends ke {
|
|
|
1233
1247
|
geo: s,
|
|
1234
1248
|
parent: i,
|
|
1235
1249
|
rowIndex: r,
|
|
1236
|
-
columnIndexStart:
|
|
1237
|
-
columnIndexEnd:
|
|
1250
|
+
columnIndexStart: n,
|
|
1251
|
+
columnIndexEnd: l,
|
|
1238
1252
|
verticalFixed: d = !1,
|
|
1239
1253
|
lastRowOfModel: a = !1
|
|
1240
1254
|
}) {
|
|
1241
|
-
var
|
|
1255
|
+
var p;
|
|
1242
1256
|
this.scrollViewportLeft = this.scrollViewport.scrollLeft;
|
|
1243
|
-
let
|
|
1257
|
+
let h = 0;
|
|
1244
1258
|
if (!d) {
|
|
1245
1259
|
const g = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1246
|
-
|
|
1260
|
+
h = this.scrollFactorX * g;
|
|
1247
1261
|
}
|
|
1248
|
-
const u = 0,
|
|
1249
|
-
let
|
|
1250
|
-
for (let g =
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1253
|
-
let
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1256
|
-
let
|
|
1257
|
-
|
|
1258
|
-
let
|
|
1259
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (
|
|
1260
|
-
this.renderDragTargetDiv(i,
|
|
1261
|
-
const M = { left:
|
|
1262
|
+
const u = 0, w = !!(e === "body" && t);
|
|
1263
|
+
let f = h;
|
|
1264
|
+
for (let g = n; g <= l; g++) {
|
|
1265
|
+
const b = f, C = this.tableModel.getColumnWidth(g);
|
|
1266
|
+
if (C > 0 && b + C > 0) {
|
|
1267
|
+
let v = s.height;
|
|
1268
|
+
const A = o.getRowspanAt(r, g), y = o.getColspanAt(r, g);
|
|
1269
|
+
A > 1 && (v = this.getRowHeights(r, r + A - 1, o).reduce((M, E) => M + E, 0));
|
|
1270
|
+
let S = C;
|
|
1271
|
+
y > 1 && (S = this.getColumnWidths(g, g + y - 1).reduce((M, E) => M + E, 0));
|
|
1272
|
+
let k = !1;
|
|
1273
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (p = this.colAndRowspanModels[e]) != null && p.isInRange(r, g) && (k = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1274
|
+
this.renderDragTargetDiv(i, b, u, S, v);
|
|
1275
|
+
const M = { left: b, top: u, width: S, height: v };
|
|
1262
1276
|
this.dom.addColumnBorderDivs(this.tableOptions, i, M, e, t);
|
|
1263
1277
|
} else {
|
|
1264
|
-
const M = this.renderSelectedBackgroundDiv(
|
|
1265
|
-
|
|
1278
|
+
const M = this.renderSelectedBackgroundDiv(k, w, t, o, r, g, i, b, u, S, v);
|
|
1279
|
+
"gammaCells" in o && o.getValueAt(r, g) && (k = !1), k || this.renderCell({
|
|
1266
1280
|
areaModel: o,
|
|
1267
1281
|
areaIdent: e,
|
|
1268
1282
|
sideIdent: t,
|
|
1269
1283
|
rowIndex: r,
|
|
1270
1284
|
columnIndex: g,
|
|
1271
|
-
left:
|
|
1285
|
+
left: b,
|
|
1272
1286
|
top: u,
|
|
1273
|
-
width:
|
|
1274
|
-
height:
|
|
1287
|
+
width: S,
|
|
1288
|
+
height: v,
|
|
1275
1289
|
parent: i,
|
|
1276
1290
|
cellSelected: M,
|
|
1277
1291
|
lastRowOfModel: a,
|
|
@@ -1279,18 +1293,18 @@ class Te extends ke {
|
|
|
1279
1293
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1280
1294
|
rowIndex: r,
|
|
1281
1295
|
columnIndex: g,
|
|
1282
|
-
cellLeft:
|
|
1296
|
+
cellLeft: b,
|
|
1283
1297
|
cellTop: u,
|
|
1284
|
-
cellWidth:
|
|
1285
|
-
cellHeight:
|
|
1298
|
+
cellWidth: S,
|
|
1299
|
+
cellHeight: v,
|
|
1286
1300
|
parent: i
|
|
1287
1301
|
});
|
|
1288
1302
|
}
|
|
1289
1303
|
}
|
|
1290
|
-
if (
|
|
1304
|
+
if (f = f + C, f > this.areaBodyCenterGeo.width)
|
|
1291
1305
|
break;
|
|
1292
1306
|
}
|
|
1293
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(
|
|
1307
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(f - 1, 1, s.height, 0), i);
|
|
1294
1308
|
}
|
|
1295
1309
|
getTreeArrowColumnIndex() {
|
|
1296
1310
|
return this.tableOptions.showCheckboxWihoutExtraColumn ? 0 : this.tableModel.isRowCheckboxVisible() ? 1 : 0;
|
|
@@ -1302,54 +1316,55 @@ class Te extends ke {
|
|
|
1302
1316
|
rowIndex: s,
|
|
1303
1317
|
index: i,
|
|
1304
1318
|
left: r,
|
|
1305
|
-
width:
|
|
1306
|
-
height:
|
|
1319
|
+
width: n,
|
|
1320
|
+
height: l,
|
|
1307
1321
|
top: d,
|
|
1308
1322
|
parent: a,
|
|
1309
|
-
lastRowOfModel:
|
|
1310
|
-
gammaRange: u
|
|
1323
|
+
lastRowOfModel: h
|
|
1311
1324
|
}) {
|
|
1312
1325
|
var te;
|
|
1313
|
-
const
|
|
1314
|
-
let
|
|
1315
|
-
if (i === this.getTreeArrowColumnIndex() &&
|
|
1316
|
-
const
|
|
1317
|
-
(te =
|
|
1326
|
+
const w = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), f = { left: r, width: n, height: l, top: d, index: i }, p = e.getRowByIndex(s);
|
|
1327
|
+
let g = "none";
|
|
1328
|
+
if (i === this.getTreeArrowColumnIndex() && L(p)) {
|
|
1329
|
+
const x = p;
|
|
1330
|
+
(te = x.children) != null && te.length ? x.expanded ? g = "expanded" : g = "collapsed" : g = "hidden";
|
|
1318
1331
|
}
|
|
1319
1332
|
let C;
|
|
1320
1333
|
if (t === "header") {
|
|
1321
|
-
const
|
|
1322
|
-
(!(
|
|
1334
|
+
const x = this.tableModel.getColumnDef(i);
|
|
1335
|
+
(!(x != null && x.sortIconVisible) || x != null && x.sortIconVisible()) && (C = x == null ? void 0 : x.sortState);
|
|
1323
1336
|
}
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
k &&
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1337
|
+
const v = e.getValueAt(s, i), A = w ? "" : `${v}`, y = e.isRowChecked(s), S = this.dom.addColumnDiv(
|
|
1338
|
+
{
|
|
1339
|
+
parent: a,
|
|
1340
|
+
geo: f,
|
|
1341
|
+
rowIndex: s,
|
|
1342
|
+
columnIndex: i,
|
|
1343
|
+
areaIdent: t,
|
|
1344
|
+
sideIdent: o,
|
|
1345
|
+
text: A,
|
|
1346
|
+
treeArrow: g,
|
|
1347
|
+
tableOptions: this.tableOptions,
|
|
1348
|
+
checkedType: y,
|
|
1349
|
+
sortState: C
|
|
1350
|
+
}
|
|
1351
|
+
), k = e.getTooltipAt(s, i);
|
|
1352
|
+
k && this.dom.setAttribute(S, "title", k);
|
|
1353
|
+
const M = this.tableModel.getColumnDef(i);
|
|
1354
|
+
M && M.classes[t] && this.dom.addClasses(M.classes[t], S);
|
|
1355
|
+
let E;
|
|
1356
|
+
w && (E = w.render(S, s, i, t, e, v, this.dom.domService));
|
|
1357
|
+
const B = e.getCustomClassesAt(s, i);
|
|
1358
|
+
if (B.length && this.dom.addClasses(B, S), this.dom.addColumnBorderDivs(this.tableOptions, a, f, t, o), h && this.dom.addHorizontalBorder({ left: r, width: n, height: l, top: d + l }, a), this.getFocusModel && t === "body") {
|
|
1359
|
+
const x = this.getFocusModel();
|
|
1360
|
+
x != null && x.hasFocus(s, i) && this.dom.addFocusBorderDivs(a, f, {});
|
|
1346
1361
|
}
|
|
1347
|
-
t === "header" && this.dom.setAttribute(
|
|
1362
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1348
1363
|
const G = e.getCustomStyleAt(s, i);
|
|
1349
1364
|
if (G)
|
|
1350
|
-
for (const
|
|
1351
|
-
this.dom.setStyle(
|
|
1352
|
-
return [
|
|
1365
|
+
for (const x in G)
|
|
1366
|
+
this.dom.setStyle(S, x, G[x]);
|
|
1367
|
+
return [S, E];
|
|
1353
1368
|
}
|
|
1354
1369
|
applyCssClasses(e, t = {}) {
|
|
1355
1370
|
e && Object.entries(t).forEach(([o, s]) => {
|
|
@@ -1357,22 +1372,22 @@ class Te extends ke {
|
|
|
1357
1372
|
});
|
|
1358
1373
|
}
|
|
1359
1374
|
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: s, cssClasses: i }) {
|
|
1360
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1361
|
-
if (
|
|
1375
|
+
const r = this.tableModel.getAreaModel(e), n = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', l = document.querySelector(n);
|
|
1376
|
+
if (l) {
|
|
1362
1377
|
let d;
|
|
1363
|
-
const
|
|
1364
|
-
if (
|
|
1365
|
-
d =
|
|
1378
|
+
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1379
|
+
if (l.innerText = "", this.applyCssClasses(l, i), h)
|
|
1380
|
+
d = h.render(l, t, o, e, r, s, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1366
1381
|
else {
|
|
1367
|
-
const
|
|
1368
|
-
this.dom.addLabelDiv(
|
|
1382
|
+
const f = `${s}`;
|
|
1383
|
+
this.dom.addLabelDiv(l, f, !1, t, o, e);
|
|
1369
1384
|
}
|
|
1370
1385
|
const u = r.getCustomClassesAt(t, o);
|
|
1371
|
-
u.length && this.dom.addClasses(u,
|
|
1372
|
-
const
|
|
1373
|
-
if (
|
|
1374
|
-
for (const
|
|
1375
|
-
this.dom.setStyle(
|
|
1386
|
+
u.length && this.dom.addClasses(u, l);
|
|
1387
|
+
const w = r.getCustomStyleAt(t, o);
|
|
1388
|
+
if (w)
|
|
1389
|
+
for (const f in w)
|
|
1390
|
+
this.dom.setStyle(l, f, w[f]);
|
|
1376
1391
|
}
|
|
1377
1392
|
}
|
|
1378
1393
|
getColumnWidths(e, t) {
|
|
@@ -1432,19 +1447,19 @@ class Te extends ke {
|
|
|
1432
1447
|
);
|
|
1433
1448
|
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${s}px`), this.dom.setStyle(r, "height", `${i}px`), r;
|
|
1434
1449
|
}
|
|
1435
|
-
renderSelectedBackgroundDiv(e, t, o, s, i, r,
|
|
1450
|
+
renderSelectedBackgroundDiv(e, t, o, s, i, r, n, l, d, a, h) {
|
|
1436
1451
|
let u = !1;
|
|
1437
1452
|
if (!e && t && s.isSelectable(i, r) && this.getSelectionModel) {
|
|
1438
|
-
const
|
|
1439
|
-
if (
|
|
1440
|
-
const
|
|
1441
|
-
u =
|
|
1442
|
-
for (let
|
|
1453
|
+
const w = this.getSelectionModel();
|
|
1454
|
+
if (w) {
|
|
1455
|
+
const f = w.getSelectionCount(i, r);
|
|
1456
|
+
u = f > 0;
|
|
1457
|
+
for (let p = 0; p < f; p++) {
|
|
1443
1458
|
const g = this.dom.applyStylePosistionAbsolute(
|
|
1444
1459
|
// ge-table-body-west-selected-range
|
|
1445
|
-
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`,
|
|
1460
|
+
this.dom.createDivWithClass(`ge-table-${s.areaIdent}-${o}-selected-range`, n)
|
|
1446
1461
|
);
|
|
1447
|
-
this.dom.setStyle(g, "left", `${
|
|
1462
|
+
this.dom.setStyle(g, "left", `${l}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${a}px`), this.dom.setStyle(g, "height", `${h}px`);
|
|
1448
1463
|
}
|
|
1449
1464
|
}
|
|
1450
1465
|
}
|
|
@@ -1457,41 +1472,39 @@ class Te extends ke {
|
|
|
1457
1472
|
rowIndex: s,
|
|
1458
1473
|
columnIndex: i,
|
|
1459
1474
|
left: r,
|
|
1460
|
-
top:
|
|
1461
|
-
width:
|
|
1475
|
+
top: n,
|
|
1476
|
+
width: l,
|
|
1462
1477
|
height: d,
|
|
1463
1478
|
parent: a,
|
|
1464
|
-
cellSelected:
|
|
1465
|
-
lastRowOfModel: u
|
|
1466
|
-
gammaRange: m
|
|
1479
|
+
cellSelected: h,
|
|
1480
|
+
lastRowOfModel: u
|
|
1467
1481
|
}) {
|
|
1468
|
-
const [
|
|
1482
|
+
const [w, f] = this.addAndRenderCellDiv({
|
|
1469
1483
|
areaModel: e,
|
|
1470
1484
|
areaIdent: t,
|
|
1471
1485
|
sideIdent: o,
|
|
1472
1486
|
rowIndex: s,
|
|
1473
1487
|
index: i,
|
|
1474
1488
|
left: r,
|
|
1475
|
-
width:
|
|
1489
|
+
width: l,
|
|
1476
1490
|
height: d,
|
|
1477
|
-
top:
|
|
1491
|
+
top: n,
|
|
1478
1492
|
parent: a,
|
|
1479
|
-
lastRowOfModel: u
|
|
1480
|
-
gammaRange: m
|
|
1493
|
+
lastRowOfModel: u
|
|
1481
1494
|
});
|
|
1482
|
-
|
|
1495
|
+
h && this.dom.addClass(`ge-table-${t}-${o}-selected-range`, w), f && this.cleanupFunctions[t].push(f);
|
|
1483
1496
|
}
|
|
1484
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent:
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1497
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: s, cellWidth: i, cellHeight: r, parent: n }) {
|
|
1498
|
+
const l = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = l.createElement("div");
|
|
1499
|
+
l.setAttribute(a, "data-col-index", `${t}`), l.setAttribute(a, "data-row-index", `${e}`), l.setAttribute(a, "data-area", "header"), l.setAttribute(a, "data-ge-action", "resize-column"), l.addClass(a, "ge-table-column-resize-handle"), l.setStyle(a, "display", "clip"), l.setStyle(a, "position", "absolute"), l.setStyle(a, "cursor", "col-resize"), l.setStyle(a, "left", `${o + i - d}px`), l.setStyle(a, "top", `${s}px`), l.setStyle(a, "width", `${d}px`), l.setStyle(a, "height", `${r}px`), l.appendChild(n, a);
|
|
1487
1500
|
}
|
|
1488
1501
|
}
|
|
1489
|
-
class
|
|
1502
|
+
class $e {
|
|
1490
1503
|
constructor(e, t) {
|
|
1491
1504
|
this.columnIndex = e, this.sortState = t;
|
|
1492
1505
|
}
|
|
1493
1506
|
}
|
|
1494
|
-
class
|
|
1507
|
+
class Oe {
|
|
1495
1508
|
constructor(e) {
|
|
1496
1509
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1497
1510
|
}
|
|
@@ -1507,13 +1520,13 @@ class De {
|
|
|
1507
1520
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1508
1521
|
const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
1509
1522
|
if (o && s && i) {
|
|
1510
|
-
const r = U(o),
|
|
1511
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
1523
|
+
const r = U(o), n = Number(s), l = Number(i);
|
|
1524
|
+
this.tableScope.updateModelValueAfterEdit(r, n, l, t.value);
|
|
1512
1525
|
}
|
|
1513
1526
|
}
|
|
1514
1527
|
}
|
|
1515
1528
|
}
|
|
1516
|
-
class
|
|
1529
|
+
class Pe {
|
|
1517
1530
|
constructor(e = -1, t = -1) {
|
|
1518
1531
|
this.rowIndex = e, this.columnIndex = t;
|
|
1519
1532
|
}
|
|
@@ -1523,20 +1536,20 @@ class J {
|
|
|
1523
1536
|
this.cells = e;
|
|
1524
1537
|
}
|
|
1525
1538
|
static createSingle(e, t) {
|
|
1526
|
-
return new J([new
|
|
1539
|
+
return new J([new Pe(e, t)]);
|
|
1527
1540
|
}
|
|
1528
1541
|
}
|
|
1529
|
-
class
|
|
1542
|
+
class Fe {
|
|
1530
1543
|
constructor(e) {
|
|
1531
1544
|
var t, o;
|
|
1532
1545
|
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);
|
|
1533
1546
|
}
|
|
1534
1547
|
onMouseClicked(e, t) {
|
|
1535
|
-
var i, r,
|
|
1548
|
+
var i, r, n, l, d, a, h;
|
|
1536
1549
|
let o = !1, s = !1;
|
|
1537
1550
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1538
|
-
const u = this.getSelectionModel(),
|
|
1539
|
-
u &&
|
|
1551
|
+
const u = this.getSelectionModel(), w = this.getFocusModel();
|
|
1552
|
+
u && w && (w.hasFocus(e.rowIndex, e.columnIndex) || (w.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(R.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (a = e.originalEvent) != null && a.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (u.addSelection(R.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (u.firstClick(e.rowIndex, e.columnIndex), o = !0));
|
|
1540
1553
|
}
|
|
1541
1554
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1542
1555
|
}
|
|
@@ -1559,7 +1572,7 @@ class Pe {
|
|
|
1559
1572
|
createRangeByEvents(e, t) {
|
|
1560
1573
|
t || (t = e);
|
|
1561
1574
|
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);
|
|
1562
|
-
return
|
|
1575
|
+
return R.create({
|
|
1563
1576
|
rowIndex1: o,
|
|
1564
1577
|
columnIndex1: i,
|
|
1565
1578
|
rowIndex2: s,
|
|
@@ -1587,7 +1600,7 @@ class Le {
|
|
|
1587
1600
|
};
|
|
1588
1601
|
}
|
|
1589
1602
|
}
|
|
1590
|
-
class
|
|
1603
|
+
class He {
|
|
1591
1604
|
get() {
|
|
1592
1605
|
return {
|
|
1593
1606
|
f2: "START_EDITING",
|
|
@@ -1609,7 +1622,7 @@ class Fe {
|
|
|
1609
1622
|
};
|
|
1610
1623
|
}
|
|
1611
1624
|
}
|
|
1612
|
-
class
|
|
1625
|
+
class Ve {
|
|
1613
1626
|
constructor(e) {
|
|
1614
1627
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
1615
1628
|
}
|
|
@@ -1630,7 +1643,7 @@ class Oe {
|
|
|
1630
1643
|
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));
|
|
1631
1644
|
}
|
|
1632
1645
|
assignPredefinedSystemShortcutMappings() {
|
|
1633
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
1646
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new He().get()) : Object.assign(this.shortcutActionIdMapping, new Le().get());
|
|
1634
1647
|
}
|
|
1635
1648
|
isMacintosh() {
|
|
1636
1649
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -1698,7 +1711,7 @@ class oe {
|
|
|
1698
1711
|
onMouseMoved(e) {
|
|
1699
1712
|
}
|
|
1700
1713
|
}
|
|
1701
|
-
class
|
|
1714
|
+
class Be {
|
|
1702
1715
|
setStyle(e, t, o) {
|
|
1703
1716
|
return e.style[t] = o, e;
|
|
1704
1717
|
}
|
|
@@ -1725,15 +1738,15 @@ class Ve {
|
|
|
1725
1738
|
e.setAttribute(t, o);
|
|
1726
1739
|
}
|
|
1727
1740
|
}
|
|
1728
|
-
class
|
|
1729
|
-
render(e, t, o, s, i, r,
|
|
1741
|
+
class We {
|
|
1742
|
+
render(e, t, o, s, i, r, n) {
|
|
1730
1743
|
if (i.isEditable(t, o)) {
|
|
1731
|
-
|
|
1732
|
-
const
|
|
1744
|
+
n.addClass(e, "ge-table-row-input-div");
|
|
1745
|
+
const l = i.getValueAt(t, o);
|
|
1733
1746
|
e.innerHTML = `
|
|
1734
1747
|
<input
|
|
1735
1748
|
type="text"
|
|
1736
|
-
value="${
|
|
1749
|
+
value="${l}"
|
|
1737
1750
|
autofocus
|
|
1738
1751
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
1739
1752
|
data-listen="change"
|
|
@@ -1746,12 +1759,12 @@ class Be {
|
|
|
1746
1759
|
}
|
|
1747
1760
|
}
|
|
1748
1761
|
}
|
|
1749
|
-
class
|
|
1762
|
+
class Ge {
|
|
1750
1763
|
constructor(e = "none", t = "single") {
|
|
1751
1764
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1752
1765
|
}
|
|
1753
1766
|
firstClick(e, t) {
|
|
1754
|
-
this.selectionType === "row" ? this.addRange(
|
|
1767
|
+
this.selectionType === "row" ? this.addRange(R.singleRow(e)) : this.selectionType === "column" && this.addRange(R.singleColumn(t));
|
|
1755
1768
|
}
|
|
1756
1769
|
getSelectionCount(e, t) {
|
|
1757
1770
|
let o = 0;
|
|
@@ -1784,10 +1797,10 @@ class He {
|
|
|
1784
1797
|
if (this.selectionType === "none")
|
|
1785
1798
|
return;
|
|
1786
1799
|
let t = e;
|
|
1787
|
-
this.selectionType === "row" ? t =
|
|
1800
|
+
this.selectionType === "row" ? t = R.singleRow(e.r1) : this.selectionType === "column" && (t = R.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
1788
1801
|
}
|
|
1789
1802
|
togglePoint(e, t) {
|
|
1790
|
-
this.getSelectionCount(e, t) > 0 ? this.removeSelection(
|
|
1803
|
+
this.getSelectionCount(e, t) > 0 ? this.removeSelection(R.singleCell(e, t)) : this.addSelection(R.singleCell(e, t));
|
|
1791
1804
|
}
|
|
1792
1805
|
isSelected(e, t) {
|
|
1793
1806
|
return this.getSelectionCount(e, t) > 0;
|
|
@@ -1796,7 +1809,7 @@ class He {
|
|
|
1796
1809
|
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));
|
|
1797
1810
|
}
|
|
1798
1811
|
}
|
|
1799
|
-
class
|
|
1812
|
+
class Ne {
|
|
1800
1813
|
constructor(e = "none") {
|
|
1801
1814
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
1802
1815
|
}
|
|
@@ -1819,69 +1832,129 @@ class We {
|
|
|
1819
1832
|
return [this.rowIndex, this.columnIndex];
|
|
1820
1833
|
}
|
|
1821
1834
|
}
|
|
1822
|
-
|
|
1835
|
+
class Q {
|
|
1836
|
+
constructor(e = new O(
|
|
1837
|
+
"❯",
|
|
1838
|
+
"",
|
|
1839
|
+
["gt-table-icon-expanded"]
|
|
1840
|
+
), t = new O(
|
|
1841
|
+
"❯",
|
|
1842
|
+
"transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
|
|
1843
|
+
["ge-table-icon-collapsed"]
|
|
1844
|
+
)) {
|
|
1845
|
+
this.iconExpanded = e, this.iconCollapsed = t;
|
|
1846
|
+
}
|
|
1847
|
+
// `⊖ `, `⊕ `;
|
|
1848
|
+
}
|
|
1849
|
+
const ze = new Ge(), je = new Ne("cell");
|
|
1823
1850
|
class j {
|
|
1824
1851
|
constructor() {
|
|
1825
1852
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
1826
1853
|
header: 34,
|
|
1827
1854
|
body: 34,
|
|
1828
1855
|
footer: 34
|
|
1829
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new be(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new
|
|
1856
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new ge(), this.headerGroupOptions = new Q(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new be(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new We(), this.getSelectionModel = () => ze, this.getFocusModel = () => je;
|
|
1830
1857
|
}
|
|
1831
1858
|
}
|
|
1832
|
-
const
|
|
1859
|
+
const Z = class X {
|
|
1860
|
+
/**
|
|
1861
|
+
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
1862
|
+
*
|
|
1863
|
+
* @param {TableModelIf} tableModel - The table model for data retrieval.
|
|
1864
|
+
* @param {SelectionModelIf} selectionModel - The selection model to determine the selected range.
|
|
1865
|
+
* @param {FocusModelIf} focusModel - The focus model to determine the focused cell.
|
|
1866
|
+
* @return {Promise<string>} A promise that resolves to the copied content as a string.
|
|
1867
|
+
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
1868
|
+
*/
|
|
1833
1869
|
createContent(e, t, o) {
|
|
1834
1870
|
return new Promise((s, i) => {
|
|
1835
1871
|
if (t != null && t.hasSelection()) {
|
|
1836
1872
|
const r = this.mergeRanges(t.getRanges());
|
|
1837
1873
|
if (r) {
|
|
1838
1874
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
1839
|
-
const
|
|
1840
|
-
for (let
|
|
1875
|
+
const n = [];
|
|
1876
|
+
for (let l = r.r1; l <= r.r2; l++) {
|
|
1841
1877
|
const d = [];
|
|
1842
1878
|
for (let a = r.c1; a <= r.c2; a++) {
|
|
1843
|
-
const
|
|
1844
|
-
d.push(
|
|
1879
|
+
const h = t.isSelected(l, a) ? e.getBodyModel().getTextValueAt(l, a) : "";
|
|
1880
|
+
d.push(h);
|
|
1845
1881
|
}
|
|
1846
|
-
|
|
1882
|
+
n.push(d.join(X.columnSeparatorChar));
|
|
1847
1883
|
}
|
|
1848
|
-
return s(
|
|
1884
|
+
return s(n.join(X.rowSeparatorChar));
|
|
1849
1885
|
}
|
|
1850
1886
|
}
|
|
1851
1887
|
if (o) {
|
|
1852
|
-
const [r,
|
|
1853
|
-
return s(
|
|
1888
|
+
const [r, n] = o.getFocus(), l = e.getBodyModel().getTextValueAt(r, n);
|
|
1889
|
+
return s(l);
|
|
1854
1890
|
}
|
|
1855
1891
|
i("Cannot copy, neither selection nor focus defined.");
|
|
1856
1892
|
});
|
|
1857
1893
|
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Copy the provided content to the clipboard.
|
|
1896
|
+
*
|
|
1897
|
+
* @param {string} content - The content to be copied.
|
|
1898
|
+
* @return {Promise<void>} A promise that resolves when the content has been successfully copied to the clipboard.
|
|
1899
|
+
*/
|
|
1858
1900
|
copyContent(e) {
|
|
1859
1901
|
return navigator.clipboard.writeText(e);
|
|
1860
1902
|
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Asynchronously copies the content of a table to the clipboard.
|
|
1905
|
+
*
|
|
1906
|
+
* @param {TableModelIf} tableModel - The table model to copy from.
|
|
1907
|
+
* @param {SelectionModelIf} selectionModel - The selection model of the table.
|
|
1908
|
+
* @param {FocusModelIf} focusModel - The focus model of the table.
|
|
1909
|
+
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
1910
|
+
*/
|
|
1911
|
+
copyToClipboard(e, t, o) {
|
|
1912
|
+
return new Promise((s, i) => {
|
|
1913
|
+
this.createContent(
|
|
1914
|
+
e,
|
|
1915
|
+
t,
|
|
1916
|
+
o
|
|
1917
|
+
).then((r) => {
|
|
1918
|
+
r && this.copyContent(r).then((n) => {
|
|
1919
|
+
s(r);
|
|
1920
|
+
}).catch((n) => {
|
|
1921
|
+
i();
|
|
1922
|
+
});
|
|
1923
|
+
}).catch((r) => {
|
|
1924
|
+
i();
|
|
1925
|
+
});
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Merges an array of CellRanges into a single merged CellRange.
|
|
1930
|
+
*
|
|
1931
|
+
* @param {CellRange[]} ranges - The array of CellRanges to be merged.
|
|
1932
|
+
* @return {CellRange | undefined} - The merged CellRange, or undefined if the ranges array is empty.
|
|
1933
|
+
*/
|
|
1861
1934
|
mergeRanges(e) {
|
|
1862
1935
|
let t;
|
|
1863
1936
|
for (const o of e)
|
|
1864
|
-
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
|
|
1937
|
+
t ? (t.r1 = Math.min(t.r1, o.r1), t.c1 = Math.min(t.c1, o.c1), t.r2 = Math.max(t.r2, o.r2), t.c2 = Math.max(t.c2, o.c2)) : t = new R(o.r1, o.c1, o.r2, o.c2);
|
|
1865
1938
|
return t;
|
|
1866
1939
|
}
|
|
1867
1940
|
};
|
|
1868
|
-
|
|
1869
|
-
|
|
1941
|
+
Z.columnSeparatorChar = " ";
|
|
1942
|
+
Z.rowSeparatorChar = `
|
|
1870
1943
|
`;
|
|
1871
|
-
let se =
|
|
1872
|
-
class pe extends
|
|
1944
|
+
let se = Z;
|
|
1945
|
+
class pe extends De {
|
|
1873
1946
|
constructor(e, t, o, s, i, r = new se()) {
|
|
1874
|
-
var
|
|
1947
|
+
var n;
|
|
1875
1948
|
if (super(
|
|
1876
1949
|
e,
|
|
1877
1950
|
t,
|
|
1878
|
-
new
|
|
1951
|
+
new Ce(o),
|
|
1879
1952
|
s
|
|
1880
|
-
), this.eventListener = i, this.copyService = r, this.licenseManager = F.getInstance(), this.selectionService = new
|
|
1881
|
-
const
|
|
1882
|
-
d && (
|
|
1953
|
+
), this.eventListener = i, this.copyService = r, this.licenseManager = F.getInstance(), this.selectionService = new Fe(this), this.api = new Ae(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, i || (this.eventListener = new oe()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
|
|
1954
|
+
const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
|
|
1955
|
+
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Me(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ie(d)), l.autoRestoreSortingState && (this.storeSortingService = new ke(d)));
|
|
1883
1956
|
}
|
|
1884
|
-
this.mouseHandler = new
|
|
1957
|
+
this.mouseHandler = new Re(this), this.inputHandler = new Oe(this), this.shortcutService = new Ve(this), this.shortcutService.addListener(this.selectionService);
|
|
1885
1958
|
}
|
|
1886
1959
|
/**
|
|
1887
1960
|
* Creates a TableScope instance.
|
|
@@ -1894,7 +1967,7 @@ class pe extends Te {
|
|
|
1894
1967
|
*
|
|
1895
1968
|
* @return {TableScope} - The newly created TableScope instance.
|
|
1896
1969
|
*/
|
|
1897
|
-
static create(e, t, o = new j(), s = new oe(), i = new
|
|
1970
|
+
static create(e, t, o = new j(), s = new oe(), i = new Be(), r = new se()) {
|
|
1898
1971
|
return new pe(
|
|
1899
1972
|
e,
|
|
1900
1973
|
t,
|
|
@@ -2040,11 +2113,11 @@ class pe extends Te {
|
|
|
2040
2113
|
* @return {void} - This method does not return anything.
|
|
2041
2114
|
*/
|
|
2042
2115
|
toggleRowCheckbox(e, t, o) {
|
|
2043
|
-
var
|
|
2116
|
+
var l;
|
|
2044
2117
|
const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
2045
2118
|
s.setRowChecked(e, r), this.repaint();
|
|
2046
|
-
const
|
|
2047
|
-
this.eventListener.onCheckboxChanged(
|
|
2119
|
+
const n = (l = s.rowSelectionModel) == null ? void 0 : l.getCheckedRows();
|
|
2120
|
+
this.eventListener.onCheckboxChanged(n || []);
|
|
2048
2121
|
}
|
|
2049
2122
|
/**
|
|
2050
2123
|
* Handle mouse click events.
|
|
@@ -2092,10 +2165,65 @@ class pe extends Te {
|
|
|
2092
2165
|
const s = this.tableModel.getColumnDef(o);
|
|
2093
2166
|
if (s != null && s.sortable && s.sortable()) {
|
|
2094
2167
|
e.preventDefault(), e.stopPropagation();
|
|
2095
|
-
const
|
|
2168
|
+
const n = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, l = s.sortState ?? "", d = n[(n.indexOf(l) + 1) % n.length], a = new $e(o, d);
|
|
2096
2169
|
this.tableModel.doSort([a]) && ((i = this.tableModel.getColumnDefs()) == null || i.forEach((u) => u.sortState = ""), s.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
|
|
2097
2170
|
}
|
|
2098
2171
|
}
|
|
2172
|
+
/**
|
|
2173
|
+
* Scrolls the viewport to the specified pixel coordinates.
|
|
2174
|
+
*
|
|
2175
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
2176
|
+
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
2177
|
+
*
|
|
2178
|
+
* @return {void}
|
|
2179
|
+
*/
|
|
2180
|
+
scrollToPixel(e, t) {
|
|
2181
|
+
this.scrollViewport.scrollTo(e, t);
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Scrolls to the specified index in the table.
|
|
2185
|
+
*
|
|
2186
|
+
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
2187
|
+
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
2188
|
+
* @return {void}
|
|
2189
|
+
*/
|
|
2190
|
+
scrollToIndex(e, t) {
|
|
2191
|
+
const s = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2192
|
+
this.scrollToPixel(0, s);
|
|
2193
|
+
}
|
|
2194
|
+
/**
|
|
2195
|
+
* Sets the selection model for the table.
|
|
2196
|
+
*
|
|
2197
|
+
* @param {SelectionModel} sm - The selection model to be set.
|
|
2198
|
+
* @param {boolean} rerender - Optional parameter indicating whether to rerender the table after setting the selection model. Default value is false.
|
|
2199
|
+
*
|
|
2200
|
+
* @return {void} - This method does not return any value.
|
|
2201
|
+
*/
|
|
2202
|
+
setSelectionModel(e, t = !1) {
|
|
2203
|
+
const o = () => e;
|
|
2204
|
+
this.tableOptions.getSelectionModel = o, this.getSelectionModel = o, this.selectionService.getSelectionModel = o, t && this.repaint();
|
|
2205
|
+
}
|
|
2206
|
+
toggleHeaderGroup(e) {
|
|
2207
|
+
const t = this.tableModel.getAreaModel("header");
|
|
2208
|
+
"columnDefs" in this.tableModel && (this.tableModel.columnDefs = t.toggleHeaderGroup(e), console.info("####### !!!!!! *******, this.tableModel.columnDefs")), this.firstInit();
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* Retrieves the selection model.
|
|
2212
|
+
* @returns {SelectionModelIf | undefined} The selection model if available, otherwise undefined.
|
|
2213
|
+
*/
|
|
2214
|
+
selectionModel() {
|
|
2215
|
+
if (this != null && this.getSelectionModel)
|
|
2216
|
+
return this.getSelectionModel();
|
|
2217
|
+
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Retrieves the focus model.
|
|
2220
|
+
*
|
|
2221
|
+
* @returns {FocusModelIf | undefined} The focus model if it exists, or undefined otherwise.
|
|
2222
|
+
*/
|
|
2223
|
+
focusModel() {
|
|
2224
|
+
if (this != null && this.getFocusModel)
|
|
2225
|
+
return this.getFocusModel();
|
|
2226
|
+
}
|
|
2099
2227
|
/**
|
|
2100
2228
|
* Changes the focus cell using the specified deltas.
|
|
2101
2229
|
*
|
|
@@ -2181,8 +2309,8 @@ class pe extends Te {
|
|
|
2181
2309
|
if (o.autoRestoreCollapsedExpandedState && s) {
|
|
2182
2310
|
const i = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2183
2311
|
if (z(r)) {
|
|
2184
|
-
const
|
|
2185
|
-
for (let d = 0; d <
|
|
2312
|
+
const n = r, l = r.getRowCount();
|
|
2313
|
+
for (let d = 0; d < l; d++) {
|
|
2186
2314
|
const a = r.getRowByIndex(d);
|
|
2187
2315
|
if (a)
|
|
2188
2316
|
if (i.allExpanded)
|
|
@@ -2190,49 +2318,15 @@ class pe extends Te {
|
|
|
2190
2318
|
else if (i.allCollapsed)
|
|
2191
2319
|
a.expanded = !1;
|
|
2192
2320
|
else {
|
|
2193
|
-
const
|
|
2194
|
-
i.mode === "expanded" ? a.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(
|
|
2321
|
+
const h = s(a.data);
|
|
2322
|
+
i.mode === "expanded" ? a.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : i.mode === "collapsed" && (a.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
2195
2323
|
}
|
|
2196
2324
|
}
|
|
2197
|
-
|
|
2325
|
+
n.recalcVisibleTreeRows();
|
|
2198
2326
|
}
|
|
2199
2327
|
}
|
|
2200
2328
|
}
|
|
2201
2329
|
}
|
|
2202
|
-
/**
|
|
2203
|
-
* Scrolls the viewport to the specified pixel coordinates.
|
|
2204
|
-
*
|
|
2205
|
-
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
2206
|
-
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
2207
|
-
*
|
|
2208
|
-
* @return {void}
|
|
2209
|
-
*/
|
|
2210
|
-
scrollToPixel(e, t) {
|
|
2211
|
-
this.scrollViewport.scrollTo(e, t);
|
|
2212
|
-
}
|
|
2213
|
-
/**
|
|
2214
|
-
* Scrolls to the specified index in the table.
|
|
2215
|
-
*
|
|
2216
|
-
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
2217
|
-
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
2218
|
-
* @return {void}
|
|
2219
|
-
*/
|
|
2220
|
-
scrollToIndex(e, t) {
|
|
2221
|
-
const s = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2222
|
-
this.scrollToPixel(0, s);
|
|
2223
|
-
}
|
|
2224
|
-
/**
|
|
2225
|
-
* Sets the selection model for the table.
|
|
2226
|
-
*
|
|
2227
|
-
* @param {SelectionModel} sm - The selection model to be set.
|
|
2228
|
-
* @param {boolean} rerender - Optional parameter indicating whether to rerender the table after setting the selection model. Default value is false.
|
|
2229
|
-
*
|
|
2230
|
-
* @return {void} - This method does not return any value.
|
|
2231
|
-
*/
|
|
2232
|
-
setSelectionModel(e, t = !1) {
|
|
2233
|
-
const o = () => e;
|
|
2234
|
-
this.tableOptions.getSelectionModel = o, this.getSelectionModel = o, this.selectionService.getSelectionModel = o, t && this.repaint();
|
|
2235
|
-
}
|
|
2236
2330
|
}
|
|
2237
2331
|
class fe {
|
|
2238
2332
|
}
|
|
@@ -2472,8 +2566,8 @@ fe.vars = {
|
|
|
2472
2566
|
}`
|
|
2473
2567
|
};
|
|
2474
2568
|
class ie {
|
|
2475
|
-
constructor(e, t = !0, o, s, i = 0, r = !1,
|
|
2476
|
-
this.data = e, this.expanded = t, this.children = o, this.parent = s, this.deep = i, this.checked = r, this.keep =
|
|
2569
|
+
constructor(e, t = !0, o, s, i = 0, r = !1, n = !1) {
|
|
2570
|
+
this.data = e, this.expanded = t, this.children = o, this.parent = s, this.deep = i, this.checked = r, this.keep = n, this.type = "TreeRow";
|
|
2477
2571
|
}
|
|
2478
2572
|
}
|
|
2479
2573
|
class Y {
|
|
@@ -2484,15 +2578,15 @@ class Y {
|
|
|
2484
2578
|
return s;
|
|
2485
2579
|
}
|
|
2486
2580
|
static buildTreeRow(e, t = "children", o = new ie(e, !0, [], void 0, 0), s = 0, i = 12) {
|
|
2487
|
-
var
|
|
2581
|
+
var n;
|
|
2488
2582
|
if (s > i)
|
|
2489
2583
|
return console.warn("Max deep limit reached: ", s), o;
|
|
2490
2584
|
const r = e[t];
|
|
2491
2585
|
if (r)
|
|
2492
|
-
for (const
|
|
2493
|
-
const d = new ie(
|
|
2494
|
-
if ((
|
|
2495
|
-
|
|
2586
|
+
for (const l of r) {
|
|
2587
|
+
const d = new ie(l, !0, [], o, s + 1);
|
|
2588
|
+
if ((n = o.children) == null || n.push(d), Y.buildTreeRow(
|
|
2589
|
+
l,
|
|
2496
2590
|
t,
|
|
2497
2591
|
d,
|
|
2498
2592
|
s + 1
|
|
@@ -2502,20 +2596,20 @@ class Y {
|
|
|
2502
2596
|
return o;
|
|
2503
2597
|
}
|
|
2504
2598
|
}
|
|
2505
|
-
class
|
|
2599
|
+
class H {
|
|
2506
2600
|
constructor(e = 34, t = 34, o = 34) {
|
|
2507
2601
|
this.header = e, this.body = t, this.footer = o;
|
|
2508
2602
|
}
|
|
2509
2603
|
}
|
|
2510
|
-
class
|
|
2604
|
+
class m {
|
|
2511
2605
|
constructor(e = 100, t = "px") {
|
|
2512
2606
|
this.value = e, this.unit = t;
|
|
2513
2607
|
}
|
|
2514
2608
|
}
|
|
2515
|
-
const
|
|
2516
|
-
class
|
|
2517
|
-
constructor(e, t, o = new
|
|
2518
|
-
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth =
|
|
2609
|
+
const Xe = () => !0, re = () => !1;
|
|
2610
|
+
class V {
|
|
2611
|
+
constructor(e, t, o = new m(100, "px"), s = new T(), i = new T(), r = new m(100, "px"), n = new m(100, "px"), l, d, a, h, u, w, f, p, g = () => this.visible) {
|
|
2612
|
+
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = n, this.sortable = l, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable = w, this.getEditRenderer = f, this.editInputPipe = p, this.isVisible = g, this.visible = !0;
|
|
2519
2613
|
}
|
|
2520
2614
|
static bodyRenderer(e) {
|
|
2521
2615
|
return new T(
|
|
@@ -2533,15 +2627,15 @@ class B {
|
|
|
2533
2627
|
e.headerClasses,
|
|
2534
2628
|
e.bodyClasses,
|
|
2535
2629
|
e.footerClasses
|
|
2536
|
-
), s = e.sortIconVisible ?? e.sortable ?? re, i = e.editable ?? e.editable ?? re, r = e.isVisible ?? e.isVisible ??
|
|
2537
|
-
return new
|
|
2630
|
+
), s = e.sortIconVisible ?? e.sortable ?? re, i = e.editable ?? e.editable ?? re, r = e.isVisible ?? e.isVisible ?? Xe;
|
|
2631
|
+
return new V(
|
|
2538
2632
|
e.property ?? "",
|
|
2539
2633
|
e.headerLabel ?? "",
|
|
2540
|
-
e.width ?? new
|
|
2634
|
+
e.width ?? new m(100, "px"),
|
|
2541
2635
|
o,
|
|
2542
2636
|
t,
|
|
2543
|
-
e.minWidth ?? new
|
|
2544
|
-
e.maxWidth ?? new
|
|
2637
|
+
e.minWidth ?? new m(100, "px"),
|
|
2638
|
+
e.maxWidth ?? new m(100, "px"),
|
|
2545
2639
|
e.sortable,
|
|
2546
2640
|
e.sortComparator,
|
|
2547
2641
|
e.sortState,
|
|
@@ -2554,8 +2648,8 @@ class B {
|
|
|
2554
2648
|
);
|
|
2555
2649
|
}
|
|
2556
2650
|
}
|
|
2557
|
-
const
|
|
2558
|
-
class
|
|
2651
|
+
const tt = new m(300, "px"), ot = new m(290, "px"), st = new m(280, "px"), it = new m(270, "px"), rt = new m(260, "px"), lt = new m(250, "px"), nt = new m(240, "px"), at = new m(230, "px"), dt = new m(220, "px"), ht = new m(210, "px"), le = new m(200, "px"), ct = new m(190, "px"), ut = new m(180, "px"), gt = new m(170, "px"), bt = new m(160, "px"), pt = new m(150, "px"), ft = new m(140, "px"), mt = new m(130, "px"), wt = new m(120, "px"), St = new m(110, "px"), xt = new m(100, "px"), yt = new m(90, "px"), Ct = new m(80, "px"), vt = new m(70, "px"), Rt = new m(60, "px"), At = new m(50, "px"), Mt = new m(40, "px"), Et = new m(30, "px"), It = new m(20, "px"), kt = new m(10, "px"), Tt = new m(0, "px");
|
|
2652
|
+
class ee {
|
|
2559
2653
|
constructor(e, t = [], o = -1) {
|
|
2560
2654
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
|
|
2561
2655
|
}
|
|
@@ -2618,8 +2712,8 @@ class Z {
|
|
|
2618
2712
|
return this.columnDefs && t < this.columnDefs.length && this.columnDefs[t].editable ? this.columnDefs[t].editable() : !1;
|
|
2619
2713
|
}
|
|
2620
2714
|
setValue(e, t, o) {
|
|
2621
|
-
var
|
|
2622
|
-
const s = (
|
|
2715
|
+
var n;
|
|
2716
|
+
const s = (n = this.columnDefs[t]) == null ? void 0 : n.editInputPipe;
|
|
2623
2717
|
s && (o = s(o, e, t));
|
|
2624
2718
|
const i = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
2625
2719
|
return r.includes(".") ? this.setPropertyValue(i, r.split("."), o) : (i[r] = o, !0);
|
|
@@ -2649,7 +2743,7 @@ class Z {
|
|
|
2649
2743
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
2650
2744
|
}
|
|
2651
2745
|
}
|
|
2652
|
-
class _ extends
|
|
2746
|
+
class _ extends ee {
|
|
2653
2747
|
constructor(e, t, o, s = []) {
|
|
2654
2748
|
super(e, s, o), this.areaIdent = e, this.arr = t, this.defaultRowHeight = o, this.columnDefs = s, this.filteredArr = [...t];
|
|
2655
2749
|
}
|
|
@@ -2749,7 +2843,7 @@ class D {
|
|
|
2749
2843
|
changeColumnOrder(e, t) {
|
|
2750
2844
|
}
|
|
2751
2845
|
}
|
|
2752
|
-
class
|
|
2846
|
+
class Ye {
|
|
2753
2847
|
flattenTree(e, t = []) {
|
|
2754
2848
|
var o;
|
|
2755
2849
|
for (const s of e)
|
|
@@ -2778,9 +2872,9 @@ class me {
|
|
|
2778
2872
|
return o * ("" + e).localeCompare("" + t);
|
|
2779
2873
|
}
|
|
2780
2874
|
}
|
|
2781
|
-
class ne extends
|
|
2875
|
+
class ne extends ee {
|
|
2782
2876
|
constructor(e, t, o, s = []) {
|
|
2783
|
-
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new me(), this.service = new
|
|
2877
|
+
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new me(), this.service = new Ye(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
|
|
2784
2878
|
}
|
|
2785
2879
|
changeColumnOrder(e, t) {
|
|
2786
2880
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -2837,8 +2931,8 @@ class ne extends Z {
|
|
|
2837
2931
|
s && (o = s(o, e, t));
|
|
2838
2932
|
const i = this.getRowByIndex(e);
|
|
2839
2933
|
if (i) {
|
|
2840
|
-
const
|
|
2841
|
-
return
|
|
2934
|
+
const n = i.data, l = this.columnDefs[t].property;
|
|
2935
|
+
return l.includes(".") ? this.setPropertyValue(n, l.split("."), o) : (n[l] = o, !0);
|
|
2842
2936
|
}
|
|
2843
2937
|
return !1;
|
|
2844
2938
|
}
|
|
@@ -2947,7 +3041,7 @@ class de {
|
|
|
2947
3041
|
this.top = e, this.right = t, this.bottom = o, this.left = s;
|
|
2948
3042
|
}
|
|
2949
3043
|
}
|
|
2950
|
-
class
|
|
3044
|
+
class Ke {
|
|
2951
3045
|
constructor() {
|
|
2952
3046
|
this.checkedRows = [];
|
|
2953
3047
|
}
|
|
@@ -2979,10 +3073,10 @@ class Xe {
|
|
|
2979
3073
|
}
|
|
2980
3074
|
}
|
|
2981
3075
|
class N {
|
|
2982
|
-
constructor(e, t, o, s = 0, i = 0, r = !1,
|
|
3076
|
+
constructor(e, t, o, s = 0, i = 0, r = !1, n = new H(), l = [], d = [], a = -1, h = 0, u = 400, w = () => {
|
|
2983
3077
|
}) {
|
|
2984
|
-
var
|
|
2985
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights =
|
|
3078
|
+
var f, p, g, b;
|
|
3079
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = n, this.columnDefs = l, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel = w, 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 || ((f = this.columnDefs) != null && f.length ? this.columnCount = this.columnDefs.length : (p = this.columnSizes) != null && p.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (b = this.columnDefs) != null && b.length && ye(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ke());
|
|
2986
3080
|
}
|
|
2987
3081
|
init() {
|
|
2988
3082
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -3301,12 +3395,12 @@ class N {
|
|
|
3301
3395
|
if (i.width.unit === "%" && e) {
|
|
3302
3396
|
let r = Math.floor(i.width.value * e / 100);
|
|
3303
3397
|
if (i.minWidth) {
|
|
3304
|
-
let
|
|
3305
|
-
r = Math.max(
|
|
3398
|
+
let n = i.minWidth.unit === "px" ? i.minWidth.value : Math.floor(i.minWidth.value * e / 100);
|
|
3399
|
+
r = Math.max(n, r);
|
|
3306
3400
|
}
|
|
3307
3401
|
if (i.maxWidth) {
|
|
3308
|
-
let
|
|
3309
|
-
r = Math.min(
|
|
3402
|
+
let n = i.maxWidth.unit === "px" ? i.maxWidth.value : Math.floor(i.maxWidth.value * e / 100);
|
|
3403
|
+
r = Math.min(n, r);
|
|
3310
3404
|
}
|
|
3311
3405
|
return r;
|
|
3312
3406
|
}
|
|
@@ -3327,7 +3421,7 @@ class N {
|
|
|
3327
3421
|
this.xPositions[t + 1] = this.getColumnWidth(t) + this.xPositions[t];
|
|
3328
3422
|
}
|
|
3329
3423
|
}
|
|
3330
|
-
class
|
|
3424
|
+
class Ue extends ee {
|
|
3331
3425
|
constructor(e, t, o, s = []) {
|
|
3332
3426
|
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);
|
|
3333
3427
|
}
|
|
@@ -3338,7 +3432,7 @@ class Ye extends Z {
|
|
|
3338
3432
|
getValueAt(e, t) {
|
|
3339
3433
|
const o = this.properties[t];
|
|
3340
3434
|
let s = this.filteredRows[e];
|
|
3341
|
-
return
|
|
3435
|
+
return L(s) && (s = s.data), s ? this.getValueByT(s, o) : "";
|
|
3342
3436
|
}
|
|
3343
3437
|
getFilteredRows() {
|
|
3344
3438
|
return this.filteredRows;
|
|
@@ -3380,7 +3474,7 @@ class Ye extends Z {
|
|
|
3380
3474
|
return s && t.length ? this.getPropertyValue(s, t) : s;
|
|
3381
3475
|
}
|
|
3382
3476
|
}
|
|
3383
|
-
class he extends
|
|
3477
|
+
class he extends Ue {
|
|
3384
3478
|
constructor(e, t, o, s) {
|
|
3385
3479
|
super(
|
|
3386
3480
|
e,
|
|
@@ -3390,14 +3484,14 @@ class he extends Ye {
|
|
|
3390
3484
|
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = s;
|
|
3391
3485
|
}
|
|
3392
3486
|
}
|
|
3393
|
-
class
|
|
3487
|
+
class P {
|
|
3394
3488
|
static createTableModel(e) {
|
|
3395
|
-
var t, o, s, i, r,
|
|
3489
|
+
var t, o, s, i, r, n, l, d, a, h, u, w, f, p;
|
|
3396
3490
|
if (e.defaultRowHeights === void 0)
|
|
3397
3491
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
3398
3492
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
3399
3493
|
else {
|
|
3400
|
-
if (e.defaultRowHeights = new
|
|
3494
|
+
if (e.defaultRowHeights = new H(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
|
|
3401
3495
|
const g = e.headerAreaModel.defaultRowHeight;
|
|
3402
3496
|
g > -1 && (e.defaultRowHeights.header = g);
|
|
3403
3497
|
}
|
|
@@ -3410,7 +3504,7 @@ class L {
|
|
|
3410
3504
|
g > -1 && (e.defaultRowHeights.footer = g);
|
|
3411
3505
|
}
|
|
3412
3506
|
}
|
|
3413
|
-
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new
|
|
3507
|
+
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new V(g, g.toUpperCase(), le)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new V(g, g.toUpperCase(), le)) : e.columnDefs = []), e.columnCount === void 0 && ((i = e.columnDefs) != null && i.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (n = e.columnSizes) != null && n.length ? e.columnCount = (l = e.columnSizes) == null ? void 0 : l.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new _(
|
|
3414
3508
|
"header",
|
|
3415
3509
|
e.headerData,
|
|
3416
3510
|
e.defaultRowHeights.header,
|
|
@@ -3420,21 +3514,21 @@ class L {
|
|
|
3420
3514
|
[e.columnDefs.map((g) => g.headerLabel)],
|
|
3421
3515
|
e.defaultRowHeights.header,
|
|
3422
3516
|
e.columnDefs
|
|
3423
|
-
) : e.headerAreaModel = new D("header")), e.footerAreaModel || ((
|
|
3517
|
+
) : e.headerAreaModel = new D("header")), e.footerAreaModel || ((h = e.footerData) != null && h.length ? e.footerAreaModel = new _(
|
|
3424
3518
|
"footer",
|
|
3425
3519
|
e.footerData,
|
|
3426
3520
|
e.defaultRowHeights.footer,
|
|
3427
3521
|
e.columnDefs
|
|
3428
3522
|
) : e.footerAreaModel = new D("footer")), !e.bodyAreaModel)
|
|
3429
3523
|
if (e.rows)
|
|
3430
|
-
if ((u = e.rows) != null && u.length &&
|
|
3524
|
+
if ((u = e.rows) != null && u.length && L(e.rows[0])) {
|
|
3431
3525
|
const g = e.rows;
|
|
3432
3526
|
e.bodyAreaModel = new ne(
|
|
3433
3527
|
"body",
|
|
3434
3528
|
g,
|
|
3435
3529
|
e.defaultRowHeights.body,
|
|
3436
3530
|
e.columnDefs
|
|
3437
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (
|
|
3531
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (w = e.tableOptions) != null && w.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new ae(g));
|
|
3438
3532
|
} else
|
|
3439
3533
|
e.bodyAreaModel = new he(
|
|
3440
3534
|
"body",
|
|
@@ -3448,7 +3542,7 @@ class L {
|
|
|
3448
3542
|
e.bodyData,
|
|
3449
3543
|
e.defaultRowHeights.body
|
|
3450
3544
|
) : e.bodyAreaModel = new D("body");
|
|
3451
|
-
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 && ((
|
|
3545
|
+
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((f = e.tableOptions) != null && f.getSelectionModel) && (e.getSelectionModel = (p = e.tableOptions) == null ? void 0 : p.getSelectionModel), new N(
|
|
3452
3546
|
e.headerAreaModel,
|
|
3453
3547
|
e.bodyAreaModel,
|
|
3454
3548
|
e.footerAreaModel,
|
|
@@ -3465,7 +3559,7 @@ class L {
|
|
|
3465
3559
|
);
|
|
3466
3560
|
}
|
|
3467
3561
|
static buildByTypedRowsParam(e) {
|
|
3468
|
-
return
|
|
3562
|
+
return P.buildByTypedRows(
|
|
3469
3563
|
e.rows ?? [],
|
|
3470
3564
|
e.columnDefs,
|
|
3471
3565
|
e.tableOptions ?? new j(),
|
|
@@ -3474,15 +3568,15 @@ class L {
|
|
|
3474
3568
|
);
|
|
3475
3569
|
}
|
|
3476
3570
|
static buildByTypedRows(e, t, o = new j(), s = 0, i = 0) {
|
|
3477
|
-
const r = o.defaultRowHeights,
|
|
3478
|
-
if (e != null && e.length &&
|
|
3479
|
-
const
|
|
3571
|
+
const r = o.defaultRowHeights, n = t[0].property === "CheckboxColumn";
|
|
3572
|
+
if (e != null && e.length && L(e[0])) {
|
|
3573
|
+
const l = e, d = new ne(
|
|
3480
3574
|
"body",
|
|
3481
|
-
|
|
3575
|
+
l,
|
|
3482
3576
|
r.body,
|
|
3483
3577
|
t
|
|
3484
3578
|
);
|
|
3485
|
-
return (
|
|
3579
|
+
return (n || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ae(l)), P.createByAreaModelsParam({
|
|
3486
3580
|
headerAreaModel: new _("header", [t.map((a) => a.headerLabel)], r.header),
|
|
3487
3581
|
bodyAreaModel: d,
|
|
3488
3582
|
footerAreaModel: new _("footer", [], r.footer),
|
|
@@ -3496,7 +3590,7 @@ class L {
|
|
|
3496
3590
|
overridingColumnWidth: -1
|
|
3497
3591
|
});
|
|
3498
3592
|
}
|
|
3499
|
-
return
|
|
3593
|
+
return P.createByObjectArrayParam({
|
|
3500
3594
|
rows: e,
|
|
3501
3595
|
columnDefs: t,
|
|
3502
3596
|
fixedLeftColumnCount: s,
|
|
@@ -3506,19 +3600,19 @@ class L {
|
|
|
3506
3600
|
}
|
|
3507
3601
|
static createByObjectArrayParam(e) {
|
|
3508
3602
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
3509
|
-
return
|
|
3603
|
+
return P.createByObjectArray(
|
|
3510
3604
|
e.rows,
|
|
3511
3605
|
e.header ?? [],
|
|
3512
3606
|
e.footer ?? [],
|
|
3513
3607
|
e.fixedLeftColumnCount ?? 0,
|
|
3514
3608
|
e.fixedRightColumnCount ?? 0,
|
|
3515
3609
|
t,
|
|
3516
|
-
e.defaultRowHeights ?? new
|
|
3610
|
+
e.defaultRowHeights ?? new H(),
|
|
3517
3611
|
e.columnDefs ?? [],
|
|
3518
3612
|
e.columnSizes ?? []
|
|
3519
3613
|
);
|
|
3520
3614
|
}
|
|
3521
|
-
static createByAreaModels(e = new D(), t, o = new D(), s = 0, i = 0, r = !1,
|
|
3615
|
+
static createByAreaModels(e = new D(), t, o = new D(), s = 0, i = 0, r = !1, n = new H(), l, d = [], a = -1, h) {
|
|
3522
3616
|
return new N(
|
|
3523
3617
|
e,
|
|
3524
3618
|
t,
|
|
@@ -3526,15 +3620,15 @@ class L {
|
|
|
3526
3620
|
s,
|
|
3527
3621
|
i,
|
|
3528
3622
|
r,
|
|
3529
|
-
l,
|
|
3530
3623
|
n,
|
|
3624
|
+
l,
|
|
3531
3625
|
d,
|
|
3532
3626
|
a,
|
|
3533
|
-
|
|
3627
|
+
h
|
|
3534
3628
|
);
|
|
3535
3629
|
}
|
|
3536
3630
|
static createByAreaModelsParam(e) {
|
|
3537
|
-
return
|
|
3631
|
+
return P.createByAreaModels(
|
|
3538
3632
|
e.headerAreaModel ?? new D(),
|
|
3539
3633
|
e.bodyAreaModel,
|
|
3540
3634
|
e.footerAreaModel ?? new D(),
|
|
@@ -3548,24 +3642,24 @@ class L {
|
|
|
3548
3642
|
e.columnCount ?? 0
|
|
3549
3643
|
);
|
|
3550
3644
|
}
|
|
3551
|
-
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1,
|
|
3645
|
+
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, n = new H(), l, d = []) {
|
|
3552
3646
|
let a;
|
|
3553
|
-
t != null && t.length ? a = new _("header", t,
|
|
3554
|
-
const
|
|
3647
|
+
t != null && t.length ? a = new _("header", t, n.header, l) : l != null && l.length ? a = new _("header", [l.map((w) => w.headerLabel)], n.header, l) : a = new D();
|
|
3648
|
+
const h = o ? new _("footer", o, n.footer, l) : new D(), u = new he("body", e, l, n.body);
|
|
3555
3649
|
return new N(
|
|
3556
3650
|
a,
|
|
3557
3651
|
u,
|
|
3558
|
-
|
|
3652
|
+
h,
|
|
3559
3653
|
s,
|
|
3560
3654
|
i,
|
|
3561
3655
|
r,
|
|
3562
|
-
l,
|
|
3563
3656
|
n,
|
|
3657
|
+
l,
|
|
3564
3658
|
d
|
|
3565
3659
|
);
|
|
3566
3660
|
}
|
|
3567
3661
|
}
|
|
3568
|
-
const
|
|
3662
|
+
const _t = [
|
|
3569
3663
|
"COPY_2_CLIPBOARD",
|
|
3570
3664
|
"START_EDITING",
|
|
3571
3665
|
"TOGGLE_SELECTION",
|
|
@@ -3583,18 +3677,18 @@ const It = [
|
|
|
3583
3677
|
// "PAGEUP_PRESSED",
|
|
3584
3678
|
// "PAGEDOWN_PRESSED"
|
|
3585
3679
|
];
|
|
3586
|
-
class
|
|
3680
|
+
class Dt {
|
|
3587
3681
|
constructor(e, t) {
|
|
3588
3682
|
this.tableModel = e, this.tableOptions = t;
|
|
3589
3683
|
}
|
|
3590
3684
|
}
|
|
3591
|
-
class
|
|
3592
|
-
constructor(e, t, o, s, i, r,
|
|
3593
|
-
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = s, this.sorting = i, this.startIndex = r, this.endIndex =
|
|
3685
|
+
class qe {
|
|
3686
|
+
constructor(e, t, o, s, i, r, n) {
|
|
3687
|
+
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = s, this.sorting = i, this.startIndex = r, this.endIndex = n;
|
|
3594
3688
|
}
|
|
3595
3689
|
}
|
|
3596
|
-
class
|
|
3597
|
-
constructor(e, t, o, s, i, r,
|
|
3690
|
+
class $t extends qe {
|
|
3691
|
+
constructor(e, t, o, s, i, r, n, l) {
|
|
3598
3692
|
super(
|
|
3599
3693
|
e,
|
|
3600
3694
|
t,
|
|
@@ -3602,38 +3696,38 @@ class _t extends Ke {
|
|
|
3602
3696
|
s,
|
|
3603
3697
|
i,
|
|
3604
3698
|
r,
|
|
3605
|
-
|
|
3606
|
-
), this.rows =
|
|
3699
|
+
n
|
|
3700
|
+
), this.rows = l;
|
|
3607
3701
|
}
|
|
3608
3702
|
}
|
|
3609
|
-
class
|
|
3703
|
+
class Je {
|
|
3610
3704
|
constructor(e, t) {
|
|
3611
3705
|
this.value = e, this.label = t;
|
|
3612
3706
|
}
|
|
3613
3707
|
}
|
|
3614
|
-
class
|
|
3708
|
+
class Ot {
|
|
3615
3709
|
constructor(e, t) {
|
|
3616
3710
|
this.index = e, this.px = t;
|
|
3617
3711
|
}
|
|
3618
3712
|
}
|
|
3619
|
-
const
|
|
3713
|
+
const Pt = { body: ["ge-table-text-align-left"] }, Ft = { body: ["ge-table-text-align-center"] }, Lt = { body: ["ge-table-text-align-right"] }, Ht = {
|
|
3620
3714
|
header: ["ge-table-text-align-left"],
|
|
3621
3715
|
body: ["ge-table-text-align-left"],
|
|
3622
3716
|
footer: ["ge-table-text-align-left"]
|
|
3623
|
-
},
|
|
3717
|
+
}, Vt = {
|
|
3624
3718
|
header: ["ge-table-text-align-center"],
|
|
3625
3719
|
body: ["ge-table-text-align-center"],
|
|
3626
3720
|
footer: ["ge-table-text-align-center"]
|
|
3627
|
-
},
|
|
3721
|
+
}, Bt = {
|
|
3628
3722
|
header: ["ge-table-text-align-right"],
|
|
3629
3723
|
body: ["ge-table-text-align-right"],
|
|
3630
3724
|
footer: ["ge-table-text-align-right"]
|
|
3631
3725
|
};
|
|
3632
3726
|
class ce {
|
|
3633
|
-
render(e, t, o, s, i, r,
|
|
3727
|
+
render(e, t, o, s, i, r, n) {
|
|
3634
3728
|
if (i.isRowCheckable(t)) {
|
|
3635
|
-
|
|
3636
|
-
const
|
|
3729
|
+
n.addClass(e, "ge-table-row-checkbox-div");
|
|
3730
|
+
const l = i.isRowChecked(t), d = l === "full" ? "checked" : "", a = l === "semi" ? '<span style="opacity: 0.4;">✓<span>' : "";
|
|
3637
3731
|
e.innerHTML = `
|
|
3638
3732
|
<input
|
|
3639
3733
|
type="checkbox"
|
|
@@ -3647,16 +3741,16 @@ class ce {
|
|
|
3647
3741
|
}
|
|
3648
3742
|
}
|
|
3649
3743
|
}
|
|
3650
|
-
class
|
|
3744
|
+
class Wt {
|
|
3651
3745
|
constructor() {
|
|
3652
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new
|
|
3746
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new m(50, "px"), this.minWidth = new m(50, "px"), this.maxWidth = new m(100, "px"), this.rendererMap = new T(new ce(), new ce(), void 0), this.classes = new T(
|
|
3653
3747
|
[],
|
|
3654
3748
|
["ge-table-text-align-left"],
|
|
3655
3749
|
[]
|
|
3656
3750
|
);
|
|
3657
3751
|
}
|
|
3658
3752
|
}
|
|
3659
|
-
class
|
|
3753
|
+
class Gt {
|
|
3660
3754
|
/**
|
|
3661
3755
|
* A factory that creates a new AreaObjectMap with the given body renderer.
|
|
3662
3756
|
*
|
|
@@ -3671,17 +3765,17 @@ class Ht {
|
|
|
3671
3765
|
);
|
|
3672
3766
|
}
|
|
3673
3767
|
}
|
|
3674
|
-
class
|
|
3768
|
+
class Nt {
|
|
3675
3769
|
constructor(e = "down", t) {
|
|
3676
3770
|
this.status = e, this.originalEvent = t;
|
|
3677
3771
|
}
|
|
3678
3772
|
}
|
|
3679
|
-
class
|
|
3773
|
+
class zt {
|
|
3680
3774
|
constructor(e, t, o, s, i = {}) {
|
|
3681
3775
|
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = s, this.cssClasses = i;
|
|
3682
3776
|
}
|
|
3683
3777
|
}
|
|
3684
|
-
class
|
|
3778
|
+
class jt {
|
|
3685
3779
|
constructor() {
|
|
3686
3780
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, o) => {
|
|
3687
3781
|
if (e && t && o.getRowId) {
|
|
@@ -3706,12 +3800,12 @@ class Nt {
|
|
|
3706
3800
|
};
|
|
3707
3801
|
}
|
|
3708
3802
|
}
|
|
3709
|
-
class
|
|
3803
|
+
class Qe {
|
|
3710
3804
|
constructor(e, t, o, s = !1, i = "normal", r = void 0) {
|
|
3711
3805
|
this.data = e, this.property = t, this.toggle = o, this.closed = s, this.visibility = i, this.children = r, this.impl = "CellGroup";
|
|
3712
3806
|
}
|
|
3713
3807
|
}
|
|
3714
|
-
class
|
|
3808
|
+
class Ze extends Qe {
|
|
3715
3809
|
constructor(e, t = 0, o = 0, s) {
|
|
3716
3810
|
super(
|
|
3717
3811
|
e.data,
|
|
@@ -3783,29 +3877,31 @@ class Je extends qe {
|
|
|
3783
3877
|
getParentCount(e = this, t = 0) {
|
|
3784
3878
|
return e.parent && (t = t + 1 + this.getParentCount(e.parent, t)), t;
|
|
3785
3879
|
}
|
|
3786
|
-
log(e) {
|
|
3787
|
-
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`, s = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}
|
|
3788
|
-
if (console.info(`${t + this.data}
|
|
3880
|
+
log(e = 10) {
|
|
3881
|
+
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`, s = `${this.getColumnCount(this)}`, i = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`, n = `${t + this.data}
|
|
3789
3882
|
childIndex:${this.childIndex}
|
|
3790
3883
|
row:${this.rowIndex}
|
|
3791
3884
|
col:${o}
|
|
3792
3885
|
vis:${this.visibility}
|
|
3886
|
+
toggle:${this.toggle}
|
|
3793
3887
|
closed:${this.closed}
|
|
3794
3888
|
isVisible:${this.isVisible()}
|
|
3795
3889
|
ownColumn:${this.ownColumn()}
|
|
3796
3890
|
claimsSpace:${this.claimsSpace()}
|
|
3797
3891
|
colCount:${s}
|
|
3798
3892
|
rowSpan:${i}
|
|
3799
|
-
pc:${r}`.replace(/[ \n]+/g, " ")
|
|
3893
|
+
pc:${r}`.replace(/[ \n]+/g, " ");
|
|
3894
|
+
if (this.children)
|
|
3800
3895
|
for (const l of this.children)
|
|
3801
3896
|
l.log(e);
|
|
3897
|
+
return n;
|
|
3802
3898
|
}
|
|
3803
3899
|
}
|
|
3804
3900
|
class I {
|
|
3805
3901
|
static buildColumnDefs(e, t = []) {
|
|
3806
3902
|
for (const o of e)
|
|
3807
3903
|
o.property && t.push(
|
|
3808
|
-
|
|
3904
|
+
V.create({
|
|
3809
3905
|
property: o.property,
|
|
3810
3906
|
headerLabel: o.data ? o.data : o.property,
|
|
3811
3907
|
isVisible: () => typeof o.isVisible == "function" ? o.isVisible() : !0
|
|
@@ -3834,8 +3930,8 @@ class I {
|
|
|
3834
3930
|
static buildGroupExts(e, t = [], o = 0, s) {
|
|
3835
3931
|
let i;
|
|
3836
3932
|
for (let r = 0; r < e.length; r++) {
|
|
3837
|
-
const
|
|
3838
|
-
i && (
|
|
3933
|
+
const n = e[r], l = new Ze(n, o, r, s);
|
|
3934
|
+
i && (l.leftNeighbour = i, i.rightNeighbour = l), t.push(l), n.children && (l.children = I.buildGroupExts(n.children, [], o + 1, l)), i = l;
|
|
3839
3935
|
}
|
|
3840
3936
|
return t;
|
|
3841
3937
|
}
|
|
@@ -3857,15 +3953,15 @@ class I {
|
|
|
3857
3953
|
for (const r of e) {
|
|
3858
3954
|
if (r.rowIndex <= s) {
|
|
3859
3955
|
o++;
|
|
3860
|
-
for (let
|
|
3861
|
-
t[
|
|
3956
|
+
for (let n = 0; n < t.length; n++)
|
|
3957
|
+
t[n][o] = null;
|
|
3862
3958
|
}
|
|
3863
3959
|
if (t[r.rowIndex][o] = r, s = r.rowIndex, r.ownColumn() && ((i = r.children) != null && i.length)) {
|
|
3864
|
-
for (let
|
|
3865
|
-
t[
|
|
3960
|
+
for (let n = r.rowIndex + 1; n < t.length; n++)
|
|
3961
|
+
t[n][o] = void 0;
|
|
3866
3962
|
o++;
|
|
3867
|
-
for (let
|
|
3868
|
-
t[
|
|
3963
|
+
for (let n = 0; n < t.length; n++)
|
|
3964
|
+
t[n][o] = null;
|
|
3869
3965
|
}
|
|
3870
3966
|
}
|
|
3871
3967
|
return t;
|
|
@@ -3876,7 +3972,7 @@ class I {
|
|
|
3876
3972
|
e.push(s.data + " rowIndex:" + s.rowIndex), (o = s.children) != null && o.length && I.iterateThrowColumns(e, s.children);
|
|
3877
3973
|
}
|
|
3878
3974
|
}
|
|
3879
|
-
class
|
|
3975
|
+
class Xt {
|
|
3880
3976
|
constructor() {
|
|
3881
3977
|
this.areaIdent = "body", this.rowSelectionModel = void 0;
|
|
3882
3978
|
}
|
|
@@ -3946,19 +4042,56 @@ class zt {
|
|
|
3946
4042
|
return !1;
|
|
3947
4043
|
}
|
|
3948
4044
|
}
|
|
3949
|
-
class
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
e.innerHTML = `${n}`;
|
|
4045
|
+
const we = class Se {
|
|
4046
|
+
constructor(e = new Q()) {
|
|
4047
|
+
this.headerGroupOptions = e;
|
|
3953
4048
|
}
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
4049
|
+
render(e, t, o, s, i, r, n) {
|
|
4050
|
+
const l = r != null && r.data ? r.data : "";
|
|
4051
|
+
if (r) {
|
|
4052
|
+
const { toggle: d, visibility: a, closed: h } = r, u = d ? Se.toggleHeaderGroup : "";
|
|
4053
|
+
this.addText(e, s, t, o, l, u), d && a !== "always" && this.addArrowDiv(n, e, !h, t, o, s, u);
|
|
4054
|
+
} else
|
|
4055
|
+
this.addText(e, s, t, o, l, "");
|
|
4056
|
+
}
|
|
4057
|
+
addText(e, t, o, s, i, r) {
|
|
4058
|
+
e.innerHTML = `<span
|
|
4059
|
+
data-ge-action="${r}"
|
|
4060
|
+
data-area="${t}"
|
|
4061
|
+
data-row-index="${o}"
|
|
4062
|
+
data-col-index="${s}"
|
|
4063
|
+
>${i}</span>`;
|
|
4064
|
+
}
|
|
4065
|
+
addArrowDiv(e, t, o = !0, s = -1, i = -1, r = "header", n) {
|
|
4066
|
+
const l = e.createElement("div");
|
|
4067
|
+
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", `${n}`);
|
|
4068
|
+
let d;
|
|
4069
|
+
o ? d = this.headerGroupOptions.iconExpanded : d = this.headerGroupOptions.iconCollapsed;
|
|
4070
|
+
const a = d.content, h = e.createText(a);
|
|
4071
|
+
e.appendChild(l, h), d.style && this.applyStyleString(e, l, d.style);
|
|
4072
|
+
for (const u of d.classes)
|
|
4073
|
+
e.addClass(l, u);
|
|
4074
|
+
return e.appendChild(t, l), l;
|
|
4075
|
+
}
|
|
4076
|
+
applyStyleString(e, t, o) {
|
|
4077
|
+
const s = o.split(";").map((i) => i.trim()).filter((i) => i);
|
|
4078
|
+
for (const i of s) {
|
|
4079
|
+
const [r, n] = i.split(":");
|
|
4080
|
+
e.setStyle(t, r.trim(), n.trim());
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
};
|
|
4084
|
+
we.toggleHeaderGroup = "toggleHeaderGroup";
|
|
4085
|
+
let et = we;
|
|
4086
|
+
class Yt {
|
|
4087
|
+
constructor(e = "header", t, o = [], s, i = new Q()) {
|
|
4088
|
+
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new et(this.headerGroupOptions), this.groupExts = I.buildGroupExts(t), this.init();
|
|
4089
|
+
}
|
|
4090
|
+
init() {
|
|
4091
|
+
var e;
|
|
4092
|
+
for (const t of this.groupExts)
|
|
4093
|
+
t.log(this.getMaxRowCount());
|
|
4094
|
+
this.arr = this.buildArray(), !((e = this.columnDefs) != null && e.length) && this.areaIdent === "header" && (this.columnDefs = I.buildColumnDefs(this.groups)), console.info("this.arr", this.arr);
|
|
3962
4095
|
}
|
|
3963
4096
|
getAllLeafs() {
|
|
3964
4097
|
return I.flattenGroupExts(this.groupExts).filter((t) => !t.children);
|
|
@@ -3968,15 +4101,10 @@ class jt {
|
|
|
3968
4101
|
return e != null && e.length ? 1 + Math.max(...e.map((t) => t.getParentCount(t))) : 0;
|
|
3969
4102
|
}
|
|
3970
4103
|
buildArray() {
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
const
|
|
3974
|
-
console.
|
|
3975
|
-
const s = [];
|
|
3976
|
-
I.iterateThrowColumns(s, this.groupExts), console.info(s);
|
|
3977
|
-
const i = Array.from(Array(o).keys()).map((l) => []);
|
|
3978
|
-
let r = I.buildArrayOfArrays(e, i);
|
|
3979
|
-
return console.table(r), r;
|
|
4104
|
+
const e = I.flattenGroupExts(this.groupExts), t = 1 + Math.max(...e.map((r) => r.rowIndex)), o = [];
|
|
4105
|
+
I.iterateThrowColumns(o, this.groupExts);
|
|
4106
|
+
const s = Array.from(Array(t).keys()).map((r) => []), i = I.buildArrayOfArrays(e, s);
|
|
4107
|
+
return console.table(i), i;
|
|
3980
4108
|
}
|
|
3981
4109
|
changeColumnOrder(e, t) {
|
|
3982
4110
|
}
|
|
@@ -4028,8 +4156,6 @@ class jt {
|
|
|
4028
4156
|
getYPosByRowIndex(e) {
|
|
4029
4157
|
return 0;
|
|
4030
4158
|
}
|
|
4031
|
-
init() {
|
|
4032
|
-
}
|
|
4033
4159
|
getRowHeight(e) {
|
|
4034
4160
|
return this.defaultRowHeight;
|
|
4035
4161
|
}
|
|
@@ -4052,25 +4178,29 @@ class jt {
|
|
|
4052
4178
|
setValue(e, t, o) {
|
|
4053
4179
|
return !1;
|
|
4054
4180
|
}
|
|
4181
|
+
toggleHeaderGroup(e) {
|
|
4182
|
+
const t = this.arr[e.rowIdx][e.colIdx];
|
|
4183
|
+
return t != null && t.toggle && t.visibility !== "always" && (t.closed = !t.closed, this.init()), I.buildColumnDefs(this.groupExts);
|
|
4184
|
+
}
|
|
4055
4185
|
}
|
|
4056
|
-
class
|
|
4186
|
+
class Kt {
|
|
4057
4187
|
filterPredict(e, t, o = this.objectToString.bind(this)) {
|
|
4058
4188
|
if (!e)
|
|
4059
4189
|
return !1;
|
|
4060
4190
|
if (!t)
|
|
4061
4191
|
return !0;
|
|
4062
4192
|
t = t.toLowerCase();
|
|
4063
|
-
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((
|
|
4064
|
-
let a = !
|
|
4065
|
-
for (let
|
|
4066
|
-
(a || o(e).includes(
|
|
4193
|
+
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((h) => h !== s && h !== i && h !== ""), n = r.filter((h) => !h.startsWith(s) && !h.startsWith(i)), l = r.filter((h) => h.startsWith(s)).map((h) => h.replace(/\+/g, "")), d = r.filter((h) => h.startsWith(i)).map((h) => h.replace(/-/g, ""));
|
|
4194
|
+
let a = !n.length;
|
|
4195
|
+
for (let h = 0; h < n.length; h++)
|
|
4196
|
+
(a || o(e).includes(n[h])) && (a = !0);
|
|
4067
4197
|
if (!a)
|
|
4068
4198
|
return !1;
|
|
4069
|
-
for (let
|
|
4070
|
-
if (!o(e).includes(
|
|
4199
|
+
for (let h = 0; h < l.length; h++)
|
|
4200
|
+
if (!o(e).includes(l[h]))
|
|
4071
4201
|
return !1;
|
|
4072
|
-
for (let
|
|
4073
|
-
if (o(e).includes(d[
|
|
4202
|
+
for (let h = 0; h < d.length; h++)
|
|
4203
|
+
if (o(e).includes(d[h]))
|
|
4074
4204
|
return !1;
|
|
4075
4205
|
return !0;
|
|
4076
4206
|
}
|
|
@@ -4080,15 +4210,15 @@ class Xt {
|
|
|
4080
4210
|
if (!t)
|
|
4081
4211
|
return [...e];
|
|
4082
4212
|
t = t.toLowerCase();
|
|
4083
|
-
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((a) => a !== s && a !== i && a !== ""),
|
|
4213
|
+
const s = "+", i = "-", r = t.toLowerCase().split(" ").filter((a) => a !== s && a !== i && a !== ""), n = r.filter((a) => !a.startsWith(s) && !a.startsWith(i)), l = r.filter((a) => a.startsWith(s)).map((a) => a.replace(/\+/g, "")), d = r.filter((a) => a.startsWith(i)).map((a) => a.replace(/-/g, ""));
|
|
4084
4214
|
return e == null ? void 0 : e.filter((a) => {
|
|
4085
|
-
let
|
|
4086
|
-
for (let u = 0; u < l.length; u++)
|
|
4087
|
-
(c || o(a).includes(l[u])) && (c = !0);
|
|
4088
|
-
if (!c)
|
|
4089
|
-
return !1;
|
|
4215
|
+
let h = !n.length;
|
|
4090
4216
|
for (let u = 0; u < n.length; u++)
|
|
4091
|
-
|
|
4217
|
+
(h || o(a).includes(n[u])) && (h = !0);
|
|
4218
|
+
if (!h)
|
|
4219
|
+
return !1;
|
|
4220
|
+
for (let u = 0; u < l.length; u++)
|
|
4221
|
+
if (!o(a).includes(l[u]))
|
|
4092
4222
|
return !1;
|
|
4093
4223
|
for (let u = 0; u < d.length; u++)
|
|
4094
4224
|
if (o(a).includes(d[u]))
|
|
@@ -4107,20 +4237,20 @@ class Xt {
|
|
|
4107
4237
|
return t.join(" ").toLowerCase();
|
|
4108
4238
|
}
|
|
4109
4239
|
}
|
|
4110
|
-
class
|
|
4240
|
+
class Ut {
|
|
4111
4241
|
static bodyRenderer(e) {
|
|
4112
4242
|
return new T(void 0, e, void 0);
|
|
4113
4243
|
}
|
|
4114
4244
|
}
|
|
4115
|
-
class
|
|
4245
|
+
class qt {
|
|
4116
4246
|
constructor(e, t = !0, o = !1) {
|
|
4117
4247
|
this.property = e, this.skipCheckableCheck = t, this.readonly = o;
|
|
4118
4248
|
}
|
|
4119
|
-
render(e, t, o, s, i, r,
|
|
4249
|
+
render(e, t, o, s, i, r, n) {
|
|
4120
4250
|
if (this.readonly || this.skipCheckableCheck || i.isRowCheckable(t)) {
|
|
4121
|
-
|
|
4122
|
-
const
|
|
4123
|
-
if (
|
|
4251
|
+
n.addClass(e, "ge-table-row-checkbox-div");
|
|
4252
|
+
const l = i.getRowByIndex(t), a = i.getValueByT(l, this.property) === !0 ? "checked" : "", h = this.readonly ? " readonly " : "";
|
|
4253
|
+
if (n.addClass(e, "ge-padding-property-checkbox"), e.innerHTML = `
|
|
4124
4254
|
<input
|
|
4125
4255
|
type="checkbox"
|
|
4126
4256
|
data-area="${s}"
|
|
@@ -4129,20 +4259,20 @@ class Kt {
|
|
|
4129
4259
|
data-property-index="${this.property}"
|
|
4130
4260
|
data-input-type="checkbox"
|
|
4131
4261
|
${a}
|
|
4132
|
-
${
|
|
4262
|
+
${h}
|
|
4133
4263
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
4134
4264
|
const u = e.querySelector(".ge-input-checkbox");
|
|
4135
|
-
u && u.addEventListener("click", (
|
|
4265
|
+
u && u.addEventListener("click", (w, f) => (l[this.property] = !l[this.property], !0));
|
|
4136
4266
|
}
|
|
4137
4267
|
}
|
|
4138
4268
|
}
|
|
4139
4269
|
}
|
|
4140
|
-
class
|
|
4141
|
-
render(e, t, o, s, i, r,
|
|
4270
|
+
class Jt {
|
|
4271
|
+
render(e, t, o, s, i, r, n) {
|
|
4142
4272
|
r && (e.innerText = new Date(r).toISOString());
|
|
4143
4273
|
}
|
|
4144
4274
|
}
|
|
4145
|
-
class
|
|
4275
|
+
class Qt {
|
|
4146
4276
|
constructor() {
|
|
4147
4277
|
this.formatter = new Intl.DateTimeFormat("de-DE", {
|
|
4148
4278
|
year: "numeric",
|
|
@@ -4150,37 +4280,37 @@ class qt {
|
|
|
4150
4280
|
day: "2-digit"
|
|
4151
4281
|
});
|
|
4152
4282
|
}
|
|
4153
|
-
render(e, t, o, s, i, r,
|
|
4283
|
+
render(e, t, o, s, i, r, n) {
|
|
4154
4284
|
if (r) {
|
|
4155
|
-
let
|
|
4285
|
+
let l = "";
|
|
4156
4286
|
try {
|
|
4157
|
-
|
|
4287
|
+
l = this.formatter.format(new Date(r));
|
|
4158
4288
|
} catch {
|
|
4159
|
-
|
|
4289
|
+
l = r;
|
|
4160
4290
|
}
|
|
4161
4291
|
e.innerHTML = `
|
|
4162
4292
|
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4163
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${
|
|
4293
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${l}</div>
|
|
4164
4294
|
</div>`;
|
|
4165
4295
|
}
|
|
4166
4296
|
}
|
|
4167
4297
|
}
|
|
4168
|
-
class
|
|
4169
|
-
render(e, t, o, s, i, r,
|
|
4298
|
+
class Zt {
|
|
4299
|
+
render(e, t, o, s, i, r, n) {
|
|
4170
4300
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
4171
4301
|
}
|
|
4172
4302
|
}
|
|
4173
|
-
class
|
|
4174
|
-
render(e, t, o, s, i, r,
|
|
4303
|
+
class eo {
|
|
4304
|
+
render(e, t, o, s, i, r, n) {
|
|
4175
4305
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
4176
4306
|
}
|
|
4177
4307
|
}
|
|
4178
|
-
class
|
|
4308
|
+
class to {
|
|
4179
4309
|
constructor(e = 100, t = !1) {
|
|
4180
4310
|
this.maxValue = e, this.labelVisible = t;
|
|
4181
4311
|
}
|
|
4182
|
-
render(e, t, o, s, i, r,
|
|
4183
|
-
if (
|
|
4312
|
+
render(e, t, o, s, i, r, n) {
|
|
4313
|
+
if (n.addClass(e, "ge-progressbar-div"), !isNaN(r)) {
|
|
4184
4314
|
const d = Number(r) * 100 / this.maxValue, a = this.labelVisible ? Math.round(d) + "%" : "";
|
|
4185
4315
|
e.innerHTML = `
|
|
4186
4316
|
<div class="ge-table-label-div"
|
|
@@ -4205,58 +4335,58 @@ class Zt {
|
|
|
4205
4335
|
}
|
|
4206
4336
|
}
|
|
4207
4337
|
}
|
|
4208
|
-
class
|
|
4209
|
-
render(e, t, o, s, i, r,
|
|
4338
|
+
class oo {
|
|
4339
|
+
render(e, t, o, s, i, r, n) {
|
|
4210
4340
|
r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
|
|
4211
4341
|
}
|
|
4212
4342
|
}
|
|
4213
|
-
class
|
|
4214
|
-
render(e, t, o, s, i, r,
|
|
4343
|
+
class so {
|
|
4344
|
+
render(e, t, o, s, i, r, n) {
|
|
4215
4345
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
4216
4346
|
}
|
|
4217
4347
|
}
|
|
4218
|
-
class
|
|
4348
|
+
class io {
|
|
4219
4349
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
4220
4350
|
this.min = e, this.max = t;
|
|
4221
4351
|
}
|
|
4222
|
-
render(e, t, o, s, i, r,
|
|
4223
|
-
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) &&
|
|
4352
|
+
render(e, t, o, s, i, r, n) {
|
|
4353
|
+
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && n.addClass(e, "ge-cell-error"));
|
|
4224
4354
|
}
|
|
4225
4355
|
}
|
|
4226
|
-
class
|
|
4356
|
+
class ro {
|
|
4227
4357
|
constructor(e) {
|
|
4228
4358
|
this.property = e;
|
|
4229
4359
|
}
|
|
4230
|
-
render(e, t, o, s, i, r,
|
|
4231
|
-
|
|
4232
|
-
const
|
|
4360
|
+
render(e, t, o, s, i, r, n) {
|
|
4361
|
+
n.addClass(e, "ge-star-rating-div");
|
|
4362
|
+
const l = i.getRowByIndex(t), d = +("" + i.getValueByT(l, this.property));
|
|
4233
4363
|
if (!isNaN(d)) {
|
|
4234
4364
|
const a = [];
|
|
4235
4365
|
for (let u = 0; u < d; u++)
|
|
4236
4366
|
a.push("★");
|
|
4237
|
-
const
|
|
4367
|
+
const h = a.join(" ");
|
|
4238
4368
|
e.innerHTML = `
|
|
4239
4369
|
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${s}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4240
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${
|
|
4370
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${s}">${h}</div>
|
|
4241
4371
|
</div>`;
|
|
4242
4372
|
}
|
|
4243
4373
|
}
|
|
4244
4374
|
}
|
|
4245
|
-
class
|
|
4375
|
+
class lo {
|
|
4246
4376
|
constructor(e, t = 100, o = !1) {
|
|
4247
4377
|
this.property = e, this.maxValue = t, this.labelVisible = o;
|
|
4248
4378
|
}
|
|
4249
|
-
render(e, t, o, s, i, r,
|
|
4250
|
-
|
|
4251
|
-
const
|
|
4379
|
+
render(e, t, o, s, i, r, n) {
|
|
4380
|
+
n.addClass(e, "ge-star-rating-div");
|
|
4381
|
+
const l = i.getRowByIndex(t), d = +("" + i.getValueByT(l, this.property));
|
|
4252
4382
|
if (!isNaN(d)) {
|
|
4253
|
-
const a = d * 100 / this.maxValue,
|
|
4383
|
+
const a = d * 100 / this.maxValue, h = this.labelVisible ? Math.round(a) + "%" : "";
|
|
4254
4384
|
e.innerHTML = `
|
|
4255
4385
|
<div class="ge-table-label-div"
|
|
4256
4386
|
data-row-index="${t}"
|
|
4257
4387
|
data-col-index="${o}"
|
|
4258
4388
|
data-area="${s}"
|
|
4259
|
-
title="${
|
|
4389
|
+
title="${h}"
|
|
4260
4390
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4261
4391
|
<div class="ge-table-progress-container"
|
|
4262
4392
|
style="width:100%;height:50%;padding:0;margin-top:6px;"
|
|
@@ -4274,8 +4404,8 @@ class io {
|
|
|
4274
4404
|
}
|
|
4275
4405
|
}
|
|
4276
4406
|
}
|
|
4277
|
-
class
|
|
4278
|
-
render(e, t, o, s, i, r,
|
|
4407
|
+
class no {
|
|
4408
|
+
render(e, t, o, s, i, r, n) {
|
|
4279
4409
|
if (r) {
|
|
4280
4410
|
e.innerHTML = `
|
|
4281
4411
|
<div
|
|
@@ -4289,37 +4419,37 @@ class ro {
|
|
|
4289
4419
|
data-row-index="${t}"
|
|
4290
4420
|
data-col-index="${o}"
|
|
4291
4421
|
data-area="${s}">${r}</div></div>`;
|
|
4292
|
-
const
|
|
4293
|
-
|
|
4422
|
+
const l = Number(r);
|
|
4423
|
+
l > 0 ? n.addClass(e, "ge-positive-text-color") : l < 0 && n.addClass(e, "ge-negative-text-color");
|
|
4294
4424
|
}
|
|
4295
4425
|
}
|
|
4296
4426
|
}
|
|
4297
|
-
const
|
|
4298
|
-
return
|
|
4427
|
+
const ao = function(c, e, t) {
|
|
4428
|
+
return c ? Number(c) : "";
|
|
4299
4429
|
};
|
|
4300
|
-
class
|
|
4430
|
+
class xe {
|
|
4301
4431
|
constructor(e) {
|
|
4302
4432
|
this.options = e;
|
|
4303
4433
|
}
|
|
4304
4434
|
static create(e) {
|
|
4305
|
-
return new
|
|
4306
|
-
e.map((t) => new
|
|
4435
|
+
return new xe(
|
|
4436
|
+
e.map((t) => new Je(t, t))
|
|
4307
4437
|
);
|
|
4308
4438
|
}
|
|
4309
|
-
render(e, t, o, s, i, r,
|
|
4439
|
+
render(e, t, o, s, i, r, n) {
|
|
4310
4440
|
if (i.isEditable(t, o)) {
|
|
4311
|
-
|
|
4312
|
-
const
|
|
4441
|
+
n.addClass(e, "ge-table-row-select-div");
|
|
4442
|
+
const l = i.getValueAt(t, o);
|
|
4313
4443
|
let d = [];
|
|
4314
|
-
for (let
|
|
4315
|
-
const u =
|
|
4316
|
-
d.push(`<option value="${
|
|
4444
|
+
for (let h of this.options) {
|
|
4445
|
+
const u = h.value === l ? " selected " : "";
|
|
4446
|
+
d.push(`<option value="${h.value}" ${u}>${h.label}</option>`);
|
|
4317
4447
|
}
|
|
4318
4448
|
const a = d.join("");
|
|
4319
4449
|
e.innerHTML = `
|
|
4320
4450
|
<select
|
|
4321
4451
|
type="text"
|
|
4322
|
-
value="${
|
|
4452
|
+
value="${l}"
|
|
4323
4453
|
autofocus
|
|
4324
4454
|
data-listen="change"
|
|
4325
4455
|
data-area="${s}"
|
|
@@ -4331,7 +4461,7 @@ class Se {
|
|
|
4331
4461
|
}
|
|
4332
4462
|
}
|
|
4333
4463
|
}
|
|
4334
|
-
class
|
|
4464
|
+
class ho {
|
|
4335
4465
|
constructor(e, t, o) {
|
|
4336
4466
|
this.r = e, this.g = t, this.b = o;
|
|
4337
4467
|
}
|
|
@@ -4346,151 +4476,151 @@ class W {
|
|
|
4346
4476
|
return (e - t) / (o - t) * (i - s) + s;
|
|
4347
4477
|
}
|
|
4348
4478
|
static getTwoColorGradientRGB(e, t) {
|
|
4349
|
-
const o = W.normalize(e, t.minValue, t.maxValue, 0, 1), s = t.maxColor.r - t.minColor.r, i = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b,
|
|
4350
|
-
return `rgb(${Math.round(
|
|
4479
|
+
const o = W.normalize(e, t.minValue, t.maxValue, 0, 1), s = t.maxColor.r - t.minColor.r, i = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b, n = s * o + t.minColor.r, l = i * o + t.minColor.g, d = r * o + t.minColor.b;
|
|
4480
|
+
return `rgb(${Math.round(n)}, ${Math.round(l)}, ${Math.round(d)})`;
|
|
4351
4481
|
}
|
|
4352
4482
|
static getThreeColorGradientRGB(e, t) {
|
|
4353
4483
|
return e < t.middleValue ? W.getTwoColorGradientRGB(e, new ue(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? W.getTwoColorGradientRGB(e, new ue(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
|
|
4354
4484
|
}
|
|
4355
4485
|
}
|
|
4356
|
-
class
|
|
4486
|
+
class co {
|
|
4357
4487
|
constructor(e, t, o, s, i, r) {
|
|
4358
4488
|
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
|
|
4359
4489
|
}
|
|
4360
4490
|
}
|
|
4361
4491
|
export {
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4492
|
+
ee as AbstractAreaModel,
|
|
4493
|
+
Gt as AreaMapFactory,
|
|
4494
|
+
Xt as AreaModel,
|
|
4365
4495
|
_ as AreaModelArrayOfArrays,
|
|
4366
|
-
|
|
4496
|
+
Yt as AreaModelCellGroups,
|
|
4367
4497
|
D as AreaModelHidden,
|
|
4368
4498
|
he as AreaModelObjectArrayWithColumndefs,
|
|
4369
|
-
|
|
4499
|
+
Ue as AreaModelObjectyArray,
|
|
4370
4500
|
ne as AreaModelTree,
|
|
4371
4501
|
T as AreaObjectMap,
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4502
|
+
jt as AutoRestoreOptions,
|
|
4503
|
+
Qe as CellGroup,
|
|
4504
|
+
Ze as CellGroupExt,
|
|
4505
|
+
et as CellGroupExtCellRenderer,
|
|
4506
|
+
R as CellRange,
|
|
4377
4507
|
I as CellgroupFactory,
|
|
4378
|
-
|
|
4508
|
+
qt as CheckboxBooleanPropertyCellRenderer,
|
|
4379
4509
|
ce as CheckboxCellRenderer,
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4510
|
+
Wt as CheckboxColumnDef,
|
|
4511
|
+
Ke as CheckboxModel,
|
|
4512
|
+
$t as ChunkData,
|
|
4513
|
+
_e as ColAndRowspanModel,
|
|
4514
|
+
Ee as CollapsedExpandedData,
|
|
4515
|
+
ho as ColorRgb,
|
|
4516
|
+
V as ColumnDef,
|
|
4517
|
+
Ce as ConvenienceDomService,
|
|
4388
4518
|
se as CopyService,
|
|
4389
4519
|
fe as CssVars,
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4520
|
+
Qt as DateToIntlDDMMYYYYCellRenderer,
|
|
4521
|
+
Jt as DateToIsoCellRenderer,
|
|
4522
|
+
Zt as DateToLocaleDateCellRenderer,
|
|
4523
|
+
so as DateToTecCellRenderer,
|
|
4524
|
+
H as DefaultRowHeights,
|
|
4525
|
+
Te as EleScope,
|
|
4396
4526
|
oe as EventAdapter,
|
|
4397
4527
|
re as FalseFn,
|
|
4398
|
-
|
|
4399
|
-
|
|
4528
|
+
Ne as FocusModel,
|
|
4529
|
+
Pe as GeCellIndices,
|
|
4400
4530
|
W as GeCssColorUtil,
|
|
4401
|
-
|
|
4402
|
-
|
|
4531
|
+
Kt as GeFilterService,
|
|
4532
|
+
Nt as GeKeyEvent,
|
|
4403
4533
|
J as GeModelChangeEvent,
|
|
4404
4534
|
K as GeMouseEvent,
|
|
4405
4535
|
$ as GeoData,
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4536
|
+
O as Icon,
|
|
4537
|
+
Ot as IndexAndPx,
|
|
4538
|
+
We as InputCellRenderer,
|
|
4539
|
+
Oe as InputHandler,
|
|
4410
4540
|
F as LicenseManager,
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4541
|
+
eo as MaleFemaleToIconCellRenderer,
|
|
4542
|
+
Re as MouseHandler,
|
|
4543
|
+
ve as MouseTargetData,
|
|
4544
|
+
to as NumberCellProgressBarCellRenderer,
|
|
4545
|
+
io as NumberCellRenderer,
|
|
4546
|
+
He as OsxShortcutActionIdMapping,
|
|
4417
4547
|
de as Padding,
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4548
|
+
no as PositiveAndNegativeNumberRenderer,
|
|
4549
|
+
lo as ProgressBarCellRenderer,
|
|
4550
|
+
De as RenderScope,
|
|
4551
|
+
Ut as Renderer,
|
|
4552
|
+
qe as RequestChunk,
|
|
4553
|
+
xe as SelectCellRenderer,
|
|
4554
|
+
Ge as SelectionModel,
|
|
4555
|
+
Fe as SelectionService,
|
|
4556
|
+
Ve as ShortcutService,
|
|
4557
|
+
Be as SimpleDomService,
|
|
4558
|
+
m as Size,
|
|
4559
|
+
$e as SortItem,
|
|
4430
4560
|
be as SortedOptions,
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4561
|
+
ro as StarRatingCellRenderer,
|
|
4562
|
+
Ie as StoreStateCollapsedExpandService,
|
|
4563
|
+
Me as StoreStateScrollPosService,
|
|
4564
|
+
ke as StoreStateSortingService,
|
|
4565
|
+
Ae as TableApi,
|
|
4566
|
+
zt as TableCellUpdateEvent,
|
|
4567
|
+
P as TableFactory,
|
|
4438
4568
|
N as TableModel,
|
|
4439
|
-
|
|
4569
|
+
Dt as TableModelAndOptions,
|
|
4440
4570
|
j as TableOptions,
|
|
4441
4571
|
pe as TableScope,
|
|
4442
|
-
|
|
4572
|
+
co as ThreeColorGradientArg,
|
|
4443
4573
|
ae as TreeCheckboxModel,
|
|
4444
4574
|
Y as TreeFactory,
|
|
4445
4575
|
ge as TreeOptions,
|
|
4446
4576
|
ie as TreeRow,
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4577
|
+
Ye as TreeRowService,
|
|
4578
|
+
oo as TrueFalseCellRenderer,
|
|
4579
|
+
Xe as TrueFn,
|
|
4450
4580
|
ue as TwoColorGradientArg,
|
|
4451
|
-
|
|
4581
|
+
Je as ValueLabel,
|
|
4452
4582
|
Le as WindowsShortcutActionIdMapping,
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4583
|
+
_t as actionIds,
|
|
4584
|
+
Vt as allCenter,
|
|
4585
|
+
Ht as allLeft,
|
|
4586
|
+
Bt as allRight,
|
|
4587
|
+
Ft as bodyCenter,
|
|
4588
|
+
Pt as bodyLeft,
|
|
4459
4589
|
Lt as bodyRight,
|
|
4460
|
-
|
|
4590
|
+
ao as editInputPipeForNumber,
|
|
4461
4591
|
U as getAreaIdentByString,
|
|
4462
4592
|
z as isAreaModelTree,
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4593
|
+
ye as isCheckboxColumnDef,
|
|
4594
|
+
L as isTreeRow,
|
|
4595
|
+
Tt as px0,
|
|
4596
|
+
kt as px10,
|
|
4597
|
+
xt as px100,
|
|
4598
|
+
St as px110,
|
|
4599
|
+
wt as px120,
|
|
4600
|
+
mt as px130,
|
|
4601
|
+
ft as px140,
|
|
4602
|
+
pt as px150,
|
|
4603
|
+
bt as px160,
|
|
4604
|
+
gt as px170,
|
|
4605
|
+
ut as px180,
|
|
4606
|
+
ct as px190,
|
|
4607
|
+
It as px20,
|
|
4478
4608
|
le as px200,
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4609
|
+
ht as px210,
|
|
4610
|
+
dt as px220,
|
|
4611
|
+
at as px230,
|
|
4612
|
+
nt as px240,
|
|
4613
|
+
lt as px250,
|
|
4614
|
+
rt as px260,
|
|
4615
|
+
it as px270,
|
|
4616
|
+
st as px280,
|
|
4617
|
+
ot as px290,
|
|
4618
|
+
Et as px30,
|
|
4619
|
+
tt as px300,
|
|
4620
|
+
Mt as px40,
|
|
4621
|
+
At as px50,
|
|
4622
|
+
Rt as px60,
|
|
4623
|
+
vt as px70,
|
|
4624
|
+
Ct as px80,
|
|
4625
|
+
yt as px90
|
|
4496
4626
|
};
|