@guiexpert/table 1.1.0 → 1.1.2
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 +11 -11
- package/index.js +794 -338
- package/lib/table/action/action-id.type.d.ts +12 -0
- package/lib/table/action/on-action-triggered.if.d.ts +7 -0
- package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +5 -0
- package/lib/table/action/shortcut-actionid-mapping.type.d.ts +4 -0
- package/lib/table/action/shortcut.service.d.ts +3 -0
- package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +3 -0
- package/lib/table/color/color-rgb.if.d.ts +5 -0
- package/lib/table/color/three-color-gradient-arg.if.d.ts +5 -0
- package/lib/table/color/two-color-gradient-arg.if.d.ts +4 -0
- package/lib/table/data/common/aligns.d.ts +23 -0
- package/lib/table/data/common/area-map-factory.d.ts +6 -0
- package/lib/table/data/common/area-map.d.ts +7 -0
- package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +4 -0
- package/lib/table/data/common/args-render-cell-div.d.ts +17 -0
- package/lib/table/data/common/boolean-function.d.ts +12 -0
- package/lib/table/data/common/cell-range.d.ts +9 -0
- package/lib/table/data/common/checkbox-column-def.d.ts +5 -0
- package/lib/table/data/common/checked-type.d.ts +5 -0
- package/lib/table/data/common/event/ge-cell-indices.d.ts +3 -0
- package/lib/table/data/common/event/ge-key-event.d.ts +5 -0
- package/lib/table/data/common/event/ge-model-change-event.d.ts +3 -0
- package/lib/table/data/common/event/ge-mouse-event.d.ts +3 -0
- package/lib/table/data/common/event/input/table-cell-update-event.d.ts +12 -0
- package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +41 -0
- package/lib/table/data/common/filter-function.d.ts +8 -0
- package/lib/table/data/common/get-t.d.ts +6 -0
- package/lib/table/data/common/index-and-px.d.ts +3 -0
- package/lib/table/data/common/size.if.d.ts +4 -0
- package/lib/table/data/common/sort-item.d.ts +3 -0
- package/lib/table/data/common/sort-state.type.d.ts +6 -0
- package/lib/table/data/common/tree-arrow.type.d.ts +7 -0
- package/lib/table/data/common/tree-row-if.d.ts +3 -0
- package/lib/table/data/common/tree-row.d.ts +4 -0
- package/lib/table/data/div-scope.type.d.ts +9 -0
- package/lib/table/data/event/mouse-target-data.d.ts +3 -0
- package/lib/table/data/geo-data.d.ts +3 -0
- package/lib/table/data/options/icon.if.d.ts +13 -0
- package/lib/table/data/options/sorted-options.if.d.ts +4 -0
- package/lib/table/data/options/table-options.if.d.ts +186 -0
- package/lib/table/data/side-ident.type.d.ts +3 -0
- package/lib/table/data/table-model-and-options.d.ts +3 -0
- package/lib/table/data/table-model-and-options.if.d.ts +3 -0
- package/lib/table/data/tablemodel/area-ident.type.d.ts +1 -1
- package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +4 -0
- package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +1 -1
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +5 -0
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +4 -0
- package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +6 -0
- package/lib/table/data/tablemodel/areamodel/area-model.d.ts +3 -0
- package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +3 -0
- package/lib/table/data/tablemodel/column/column-def.d.ts +3 -0
- package/lib/table/data/tablemodel/column/column-def.if.d.ts +113 -0
- package/lib/table/data/tablemodel/padding.d.ts +3 -0
- package/lib/table/data/tablemodel/table-model.d.ts +186 -0
- package/lib/table/data/tablemodel/table-model.if.d.ts +165 -0
- package/lib/table/ele-scope.d.ts +4 -0
- package/lib/table/event-adapter.d.ts +7 -0
- package/lib/table/event-listener.if.d.ts +5 -0
- package/lib/table/input-handler.d.ts +14 -0
- package/lib/table/instanceof-workaround.d.ts +19 -0
- package/lib/table/mouse-handler.d.ts +38 -0
- package/lib/table/render-scope.d.ts +1 -1
- package/lib/table/renderer/edit/edit-input-pipe.if.d.ts +8 -0
- package/lib/table/table-api.d.ts +72 -0
- package/lib/table/table-scope.d.ts +148 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function O(h) {
|
|
|
4
4
|
function N(h) {
|
|
5
5
|
return h && h.type === "AreaModelTree";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function pe(h) {
|
|
8
8
|
return h && h.type === "CheckboxColumnDef";
|
|
9
9
|
}
|
|
10
10
|
class X {
|
|
@@ -32,7 +32,7 @@ class F {
|
|
|
32
32
|
this.content = e, this.style = t, this.classes = o;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
class
|
|
35
|
+
class de {
|
|
36
36
|
constructor(e = new F(
|
|
37
37
|
">",
|
|
38
38
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
@@ -53,12 +53,12 @@ class ae {
|
|
|
53
53
|
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = s;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
class
|
|
56
|
+
class he {
|
|
57
57
|
constructor(e = new F("↑", "", ["ge-header-sorted-asc"]), t = new F("↓", "", ["ge-header-sorted-desc"]), o = new F("↑", "color:transparent;", [])) {
|
|
58
58
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
class
|
|
61
|
+
class fe {
|
|
62
62
|
constructor(e) {
|
|
63
63
|
this.domService = e;
|
|
64
64
|
}
|
|
@@ -178,7 +178,7 @@ class pe {
|
|
|
178
178
|
}
|
|
179
179
|
return this.domService.appendChild(e, l), l;
|
|
180
180
|
}
|
|
181
|
-
addSortedIcon(e, t = "", o = new
|
|
181
|
+
addSortedIcon(e, t = "", o = new he(), s = -1) {
|
|
182
182
|
const i = this.domService.createElement("div");
|
|
183
183
|
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");
|
|
184
184
|
let r;
|
|
@@ -189,7 +189,7 @@ class pe {
|
|
|
189
189
|
this.domService.addClass(i, d);
|
|
190
190
|
return this.domService.appendChild(e, i), i;
|
|
191
191
|
}
|
|
192
|
-
addArrowDiv(e, t = "none", o = new
|
|
192
|
+
addArrowDiv(e, t = "none", o = new de(), s = -1, i = -1, r = "body") {
|
|
193
193
|
const l = this.domService.createElement("div");
|
|
194
194
|
this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${s}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
195
195
|
let n;
|
|
@@ -240,7 +240,7 @@ class pe {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
const Y = (h) => h === "header" ? "header" : h === "footer" ? "footer" : "body";
|
|
243
|
-
class
|
|
243
|
+
class me {
|
|
244
244
|
constructor(e, t) {
|
|
245
245
|
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)) {
|
|
246
246
|
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"));
|
|
@@ -252,19 +252,33 @@ class fe {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
class
|
|
255
|
+
class we {
|
|
256
256
|
constructor(e) {
|
|
257
257
|
this.tableScope = e, this.expandedAll = !0, this.mouseDown = !1, this.dragging = !1, 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(
|
|
258
258
|
(t) => t.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope))
|
|
259
259
|
);
|
|
260
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* Handles the "contextmenu" event.
|
|
263
|
+
*
|
|
264
|
+
* @private
|
|
265
|
+
* @param {MouseEvent} evt - The mouse event object.
|
|
266
|
+
* @return {void}
|
|
267
|
+
*/
|
|
261
268
|
onContextmenu(e) {
|
|
262
269
|
this.mouseEvent = e;
|
|
263
270
|
const t = this.tableScope.createGeMouseEvent(this.mouseEvent);
|
|
264
271
|
this.tableScope.contextmenu(t);
|
|
265
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* Handles the click event on the host element.
|
|
275
|
+
*
|
|
276
|
+
* @param {MouseEvent} event - The click event.
|
|
277
|
+
*
|
|
278
|
+
* @return {void}
|
|
279
|
+
*/
|
|
266
280
|
onHostElementClicked(e) {
|
|
267
|
-
const t = new
|
|
281
|
+
const t = new me(e.target, this.tableScope);
|
|
268
282
|
if (t.action === "toggleExpandCollapseAll")
|
|
269
283
|
this.expandedAll = !this.expandedAll, this.tableScope.toggleExpandCollapseAll(this.expandedAll), e.preventDefault(), e.stopPropagation();
|
|
270
284
|
else if (t.inputType === "checkbox" && t.areaIdent)
|
|
@@ -283,6 +297,12 @@ class me {
|
|
|
283
297
|
}
|
|
284
298
|
this.publishGeMouseEvent(e, 1);
|
|
285
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Handles the double click event on the host element.
|
|
302
|
+
* This method is private.
|
|
303
|
+
*
|
|
304
|
+
* @param {MouseEvent} event - The double click event.
|
|
305
|
+
*/
|
|
286
306
|
onHostElementDblClicked(e) {
|
|
287
307
|
if (e.target instanceof HTMLElement) {
|
|
288
308
|
const t = e.target, o = t.getAttribute("data-area"), s = Y(o), i = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(s);
|
|
@@ -299,10 +319,24 @@ class me {
|
|
|
299
319
|
}
|
|
300
320
|
this.publishGeMouseEvent(e, 2);
|
|
301
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Publishes a GeMouseEvent.
|
|
324
|
+
*
|
|
325
|
+
* @param {MouseEvent} event - The MouseEvent to publish.
|
|
326
|
+
* @param {number} clickCount - The number of clicks for the GeMouseEvent.
|
|
327
|
+
*
|
|
328
|
+
* @return {void}
|
|
329
|
+
*/
|
|
302
330
|
publishGeMouseEvent(e, t) {
|
|
303
331
|
var o;
|
|
304
332
|
this.mouseEvent = e, this.geMouseEventOld = (o = this.geMouseEvent) == null ? void 0 : o.clone(), this.geMouseEvent = this.tableScope.createGeMouseEvent(e), this.geMouseEvent && (this.geMouseEvent.clickCount = t), this.tableScope.onMouseClicked(this.geMouseEvent, this.geMouseEventOld);
|
|
305
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Update the collapsed/expanded state of a tree row.
|
|
336
|
+
*
|
|
337
|
+
* @param {TreeRowIf<any>} tr - The tree row object.
|
|
338
|
+
* @returns {void}
|
|
339
|
+
*/
|
|
306
340
|
updateCollapsedExpandedState(e) {
|
|
307
341
|
var o, s, i, r, l;
|
|
308
342
|
const t = (s = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : s.getRowId;
|
|
@@ -344,35 +378,107 @@ class me {
|
|
|
344
378
|
}
|
|
345
379
|
}
|
|
346
380
|
}
|
|
347
|
-
class
|
|
381
|
+
class Se {
|
|
348
382
|
constructor(e) {
|
|
349
383
|
this.tableScope = e;
|
|
350
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* Updates the cells in the table based on the provided events.
|
|
387
|
+
*
|
|
388
|
+
* @param {TableCellUpdateEventIf[]} events - The array of events representing the updates to perform on the cells.
|
|
389
|
+
* @param {boolean} [repaintAll=false] - Optional parameter indicating whether to repaint all cells or not. Default value is false. If true, the full table will be rendered. If false, the table cell will be rendered immediately.
|
|
390
|
+
*
|
|
391
|
+
* @return {void} - This method doesn't return anything.
|
|
392
|
+
*/
|
|
351
393
|
updateCells(e, t = !1) {
|
|
352
394
|
this.tableScope.updateCells(e, t);
|
|
353
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Notifies that the external filter has changed.
|
|
398
|
+
*
|
|
399
|
+
* @return {void}
|
|
400
|
+
*/
|
|
354
401
|
externalFilterChanged() {
|
|
355
402
|
this.tableScope.externalFilterChanged();
|
|
356
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* Scrolls the table body to the specified pixel coordinates.
|
|
406
|
+
*
|
|
407
|
+
* @param {number} _px - The horizontal pixel coordinate to scroll to. Defaults to 0.
|
|
408
|
+
* @param {number} _py - The vertical pixel coordinate to scroll to. Defaults to 0.
|
|
409
|
+
* @return {void}
|
|
410
|
+
*/
|
|
357
411
|
scrollToPixel(e = 0, t = 0) {
|
|
358
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* Scrolls to the specified index in both horizontal and vertical directions.
|
|
415
|
+
*
|
|
416
|
+
* @param {number} _indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
|
|
417
|
+
* @param {number} _indexY - The index of the row to scroll to in the vertical direction. Default is 0.
|
|
418
|
+
*
|
|
419
|
+
* @return undefined
|
|
420
|
+
*/
|
|
359
421
|
scrollToIndex(e = 0, t = 0) {
|
|
360
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Sets whether the header is visible or not.
|
|
425
|
+
*
|
|
426
|
+
* @param _visible - A boolean value indicating whether the header should be visible. Default value is true.
|
|
427
|
+
*
|
|
428
|
+
* @return undefined
|
|
429
|
+
*/
|
|
361
430
|
setHeaderVisible(e = !0) {
|
|
362
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* Sets the visibility of a column in the table.
|
|
434
|
+
*
|
|
435
|
+
* @param {_column} - The column index or column definition to set visibility for.
|
|
436
|
+
* @param {_visible=true} - The flag to set visibility to. true for visible, false for hidden.
|
|
437
|
+
*
|
|
438
|
+
* @return {void} - There is no return value.
|
|
439
|
+
*/
|
|
363
440
|
setColumnVisible(e, t = !0) {
|
|
364
441
|
}
|
|
442
|
+
/**
|
|
443
|
+
* Returns whether a column is visible or not.
|
|
444
|
+
*
|
|
445
|
+
* @param {number | ColumnDefIf} _column - The column index or the column definition.
|
|
446
|
+
* @return {boolean} - True if the column is visible, false otherwise.
|
|
447
|
+
*/
|
|
365
448
|
isColumnVisible(e) {
|
|
366
449
|
return !0;
|
|
367
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* Checks if the header is visible.
|
|
453
|
+
*
|
|
454
|
+
* @return {boolean} - Returns true if the header is visible, otherwise returns false.
|
|
455
|
+
*/
|
|
368
456
|
isHeaderVisible() {
|
|
369
457
|
return !0;
|
|
370
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* Sets the visibility of the footer.
|
|
461
|
+
*
|
|
462
|
+
* @param {boolean} _visible - Indicates whether the footer should be visible or not. Default value is true.
|
|
463
|
+
*
|
|
464
|
+
* @return {void} - This method does not return any value.
|
|
465
|
+
*/
|
|
371
466
|
setFooterVisible(e = !0) {
|
|
372
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* Determines if the footer is visible.
|
|
470
|
+
*
|
|
471
|
+
* @returns {boolean} True if the footer is visible, false otherwise.
|
|
472
|
+
*/
|
|
373
473
|
isFooterVisible() {
|
|
374
474
|
return !0;
|
|
375
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Repaints the table.
|
|
478
|
+
*
|
|
479
|
+
* This method calls the repaint method of the tableScope object
|
|
480
|
+
* to update and redraw the table based on the latest data.
|
|
481
|
+
*/
|
|
376
482
|
repaint() {
|
|
377
483
|
this.tableScope.repaint();
|
|
378
484
|
}
|
|
@@ -452,7 +558,7 @@ class K {
|
|
|
452
558
|
// }
|
|
453
559
|
// }
|
|
454
560
|
}
|
|
455
|
-
class
|
|
561
|
+
class xe extends K {
|
|
456
562
|
constructor(e) {
|
|
457
563
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
458
564
|
}
|
|
@@ -474,14 +580,14 @@ class Se extends K {
|
|
|
474
580
|
}
|
|
475
581
|
}
|
|
476
582
|
}
|
|
477
|
-
class
|
|
583
|
+
class ye {
|
|
478
584
|
constructor(e = "collapsed", t = [], o = !1, s = !1) {
|
|
479
585
|
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = s;
|
|
480
586
|
}
|
|
481
587
|
}
|
|
482
|
-
class
|
|
588
|
+
class Ce extends K {
|
|
483
589
|
constructor(e) {
|
|
484
|
-
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new
|
|
590
|
+
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new ye(), this.load();
|
|
485
591
|
}
|
|
486
592
|
collapsedExpandedStateGet() {
|
|
487
593
|
return this.collapsedExpandedState;
|
|
@@ -513,7 +619,7 @@ class ye extends K {
|
|
|
513
619
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
514
620
|
}
|
|
515
621
|
}
|
|
516
|
-
class
|
|
622
|
+
class ve extends K {
|
|
517
623
|
constructor(e) {
|
|
518
624
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
519
625
|
}
|
|
@@ -540,7 +646,7 @@ class $ {
|
|
|
540
646
|
this.left = e, this.width = t, this.height = o, this.top = s, this.index = i;
|
|
541
647
|
}
|
|
542
648
|
}
|
|
543
|
-
class
|
|
649
|
+
class Re {
|
|
544
650
|
constructor(e, t, o, s) {
|
|
545
651
|
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = s, this.scrollTop = 0, this.areaBodyWestGeo = new $(), this.areaBodyCenterGeo = new $(), this.areaBodyEastGeo = new $();
|
|
546
652
|
const i = this.hostElement;
|
|
@@ -691,12 +797,21 @@ class ve {
|
|
|
691
797
|
this.dom.setStyle(this.contentWrapperDiv, "width", e), this.dom.setStyle(this.contentWrapperDiv, "height", t);
|
|
692
798
|
}
|
|
693
799
|
}
|
|
694
|
-
class
|
|
800
|
+
class M {
|
|
801
|
+
/**
|
|
802
|
+
* Represents a constructor for a class.
|
|
803
|
+
* @constructor
|
|
804
|
+
* @param {number} r1 - The value for r1.
|
|
805
|
+
* @param {number} c1 - The value for c1.
|
|
806
|
+
* @param {number} r2 - The value for r2.
|
|
807
|
+
* @param {number} c2 - The value for c2.
|
|
808
|
+
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
809
|
+
*/
|
|
695
810
|
constructor(e, t, o, s, i = !1) {
|
|
696
811
|
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = s, this.gammaRange = i;
|
|
697
812
|
}
|
|
698
813
|
static create(e) {
|
|
699
|
-
return e.gammaRange === void 0 && (e.gammaRange = !1), new
|
|
814
|
+
return e.gammaRange === void 0 && (e.gammaRange = !1), new M(
|
|
700
815
|
e.rowIndex1,
|
|
701
816
|
e.columnIndex1,
|
|
702
817
|
e.rowIndex2,
|
|
@@ -705,19 +820,19 @@ class E {
|
|
|
705
820
|
);
|
|
706
821
|
}
|
|
707
822
|
static singleCell(e, t) {
|
|
708
|
-
return new
|
|
823
|
+
return new M(e, t, e, t);
|
|
709
824
|
}
|
|
710
825
|
static singleRow(e) {
|
|
711
|
-
return new
|
|
826
|
+
return new M(e, 0, e, Number.MAX_SAFE_INTEGER);
|
|
712
827
|
}
|
|
713
828
|
static singleColumn(e) {
|
|
714
|
-
return new
|
|
829
|
+
return new M(0, e, Number.MAX_SAFE_INTEGER, e);
|
|
715
830
|
}
|
|
716
831
|
isInRange(e, t) {
|
|
717
832
|
return e >= this.r1 && e <= this.r2 && t >= this.c1 && t <= this.c2;
|
|
718
833
|
}
|
|
719
834
|
}
|
|
720
|
-
class
|
|
835
|
+
class Ae {
|
|
721
836
|
constructor(e, t) {
|
|
722
837
|
this.tableModel = e, this.areaModel = t, this.colAndRowspanRanges = void 0;
|
|
723
838
|
}
|
|
@@ -733,7 +848,7 @@ class Re {
|
|
|
733
848
|
i === 0 && (i = 1), r === 0 && (r = 1);
|
|
734
849
|
const l = this.areaModel.hasOwnProperty("gammaCells");
|
|
735
850
|
this.colAndRowspanRanges.push(
|
|
736
|
-
new
|
|
851
|
+
new M(o, s, o + r - 1, s + i - 1, l)
|
|
737
852
|
);
|
|
738
853
|
}
|
|
739
854
|
}
|
|
@@ -750,22 +865,22 @@ class Re {
|
|
|
750
865
|
return !1;
|
|
751
866
|
}
|
|
752
867
|
}
|
|
753
|
-
class
|
|
868
|
+
class T {
|
|
754
869
|
constructor(e, t, o) {
|
|
755
870
|
this.header = e, this.body = t, this.footer = o;
|
|
756
871
|
}
|
|
757
872
|
}
|
|
758
|
-
class
|
|
873
|
+
class Ee extends Re {
|
|
759
874
|
constructor(e, t, o, s) {
|
|
760
875
|
var r, l;
|
|
761
876
|
super(e, t, o, s), this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
762
877
|
header: [],
|
|
763
878
|
body: [],
|
|
764
879
|
footer: []
|
|
765
|
-
}, this.tree = !1, this.colAndRowspanModels = new
|
|
880
|
+
}, 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), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), N(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
766
881
|
(n) => {
|
|
767
882
|
var d;
|
|
768
|
-
this.colAndRowspanModels[n] = new
|
|
883
|
+
this.colAndRowspanModels[n] = new Ae(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
769
884
|
}
|
|
770
885
|
);
|
|
771
886
|
}
|
|
@@ -895,76 +1010,76 @@ class Ae extends ve {
|
|
|
895
1010
|
let u = t;
|
|
896
1011
|
const m = this.tableModel.getColumnCount(), b = this.tableModel.getFixedRightColumnCount(), w = this.tableModel.getFixedLeftColumnCount();
|
|
897
1012
|
for (let p = 0; p < c; p++) {
|
|
898
|
-
const
|
|
899
|
-
if (
|
|
1013
|
+
const R = u, C = p === c - 1, v = this.tableModel.getRowHeight(e, p);
|
|
1014
|
+
if (R + v > 0) {
|
|
900
1015
|
this.firstVisibleRowIndex = p;
|
|
901
|
-
let
|
|
902
|
-
const
|
|
1016
|
+
let x = { left: l, width: n, height: v, top: R, index: p }, y = this.dom.addRowDiv(s, x, p, e, "center");
|
|
1017
|
+
const A = w;
|
|
903
1018
|
if (this.adjustColumnsToRowParent({
|
|
904
1019
|
areaIdent: e,
|
|
905
1020
|
sideIdent: "center",
|
|
906
1021
|
areaModel: a,
|
|
907
|
-
geo:
|
|
908
|
-
parent:
|
|
1022
|
+
geo: x,
|
|
1023
|
+
parent: y,
|
|
909
1024
|
rowIndex: p,
|
|
910
|
-
columnIndexStart:
|
|
1025
|
+
columnIndexStart: A,
|
|
911
1026
|
columnIndexEnd: m - b - 1,
|
|
912
1027
|
verticalFixed: !1,
|
|
913
|
-
lastRowOfModel:
|
|
914
|
-
}), d.left > 0 && (
|
|
1028
|
+
lastRowOfModel: C
|
|
1029
|
+
}), d.left > 0 && (x = { left: l, width: this.areaBodyWestGeo.width, height: v, top: R, index: p }, y = this.dom.addRowDiv(o, x, p, e, "west"), this.adjustColumnsToRowParent({
|
|
915
1030
|
areaIdent: e,
|
|
916
1031
|
sideIdent: "west",
|
|
917
1032
|
areaModel: a,
|
|
918
|
-
geo:
|
|
919
|
-
parent:
|
|
1033
|
+
geo: x,
|
|
1034
|
+
parent: y,
|
|
920
1035
|
rowIndex: p,
|
|
921
1036
|
columnIndexStart: 0,
|
|
922
|
-
columnIndexEnd:
|
|
1037
|
+
columnIndexEnd: A - 1,
|
|
923
1038
|
verticalFixed: !0,
|
|
924
|
-
lastRowOfModel:
|
|
925
|
-
})), d.right > 0 && (
|
|
1039
|
+
lastRowOfModel: C
|
|
1040
|
+
})), d.right > 0 && (x = { left: l, width: this.areaBodyEastGeo.width, height: v, top: R, index: p }, y = this.dom.addRowDiv(i, x, p, e, "east"), this.adjustColumnsToRowParent({
|
|
926
1041
|
areaIdent: e,
|
|
927
1042
|
sideIdent: "east",
|
|
928
1043
|
areaModel: a,
|
|
929
|
-
geo:
|
|
930
|
-
parent:
|
|
1044
|
+
geo: x,
|
|
1045
|
+
parent: y,
|
|
931
1046
|
rowIndex: p,
|
|
932
1047
|
columnIndexStart: m - b,
|
|
933
1048
|
columnIndexEnd: m - 1,
|
|
934
1049
|
verticalFixed: !0,
|
|
935
|
-
lastRowOfModel:
|
|
1050
|
+
lastRowOfModel: C
|
|
936
1051
|
})), e === "header" && this.tree && p === c - 1) {
|
|
937
|
-
const
|
|
1052
|
+
const E = this.dom.applyStyle(
|
|
938
1053
|
this.dom.setAttribute(
|
|
939
|
-
this.dom.addDiv(
|
|
1054
|
+
this.dom.addDiv(y, new $(16, 20, 20, 8)),
|
|
940
1055
|
"data-ge-action",
|
|
941
1056
|
"toggleExpandCollapseAll"
|
|
942
1057
|
),
|
|
943
1058
|
{ cursor: "pointer" }
|
|
944
|
-
),
|
|
945
|
-
if (
|
|
946
|
-
const V = this.dom.domService.createText(
|
|
947
|
-
this.dom.domService.appendChild(
|
|
1059
|
+
), k = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1060
|
+
if (k) {
|
|
1061
|
+
const V = this.dom.domService.createText(k.content);
|
|
1062
|
+
this.dom.domService.appendChild(E, V), k.style && this.dom.applyStyleString(E, k.style);
|
|
948
1063
|
}
|
|
949
1064
|
}
|
|
950
1065
|
}
|
|
951
|
-
if (u = u +
|
|
1066
|
+
if (u = u + v, u > r)
|
|
952
1067
|
break;
|
|
953
1068
|
}
|
|
954
1069
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e]) {
|
|
955
1070
|
const p = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
956
1071
|
if (p.length)
|
|
957
|
-
for (const
|
|
958
|
-
let
|
|
959
|
-
if (
|
|
960
|
-
|
|
961
|
-
else if (b > 0 &&
|
|
962
|
-
|
|
1072
|
+
for (const R of p) {
|
|
1073
|
+
let C = 0, v = s.child, x = "center";
|
|
1074
|
+
if (R.c1 < w)
|
|
1075
|
+
v = o.child, x = "west";
|
|
1076
|
+
else if (b > 0 && R.c1 >= m - b)
|
|
1077
|
+
v = i.child, x = "east";
|
|
963
1078
|
else {
|
|
964
|
-
const
|
|
965
|
-
|
|
1079
|
+
const y = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1080
|
+
C = this.scrollFactorX * y - this.areaBodyWestGeo.width, x = "center";
|
|
966
1081
|
}
|
|
967
|
-
this.drawBigCell(
|
|
1082
|
+
this.drawBigCell(R, C, t, a, v, x);
|
|
968
1083
|
}
|
|
969
1084
|
}
|
|
970
1085
|
}
|
|
@@ -1056,21 +1171,21 @@ class Ae extends ve {
|
|
|
1056
1171
|
const u = 0, m = !!(e === "body" && t);
|
|
1057
1172
|
let b = c;
|
|
1058
1173
|
for (let g = l; g <= n; g++) {
|
|
1059
|
-
const p = b,
|
|
1060
|
-
if (
|
|
1061
|
-
let
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
let
|
|
1065
|
-
|
|
1066
|
-
let
|
|
1067
|
-
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (w = this.colAndRowspanModels[e]) != null && w.isInRange(r, g) && (
|
|
1068
|
-
this.renderDragTargetDiv(i, p, u,
|
|
1069
|
-
const
|
|
1070
|
-
this.dom.addColumnBorderDivs(this.tableOptions, i,
|
|
1174
|
+
const p = b, R = this.tableModel.getColumnWidth(g);
|
|
1175
|
+
if (R > 0 && p + R > 0) {
|
|
1176
|
+
let C = s.height;
|
|
1177
|
+
const v = o.getRowspanAt(r, g), x = o.getColspanAt(r, g);
|
|
1178
|
+
v > 1 && (C = this.getRowHeights(r, r + v - 1, o).reduce((E, k) => E + k, 0));
|
|
1179
|
+
let y = R;
|
|
1180
|
+
x > 1 && (y = this.getColumnWidths(g, g + x - 1).reduce((E, k) => E + k, 0));
|
|
1181
|
+
let A = !1;
|
|
1182
|
+
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (w = this.colAndRowspanModels[e]) != null && w.isInRange(r, g) && (A = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1183
|
+
this.renderDragTargetDiv(i, p, u, y, C);
|
|
1184
|
+
const E = { left: p, top: u, width: y, height: C };
|
|
1185
|
+
this.dom.addColumnBorderDivs(this.tableOptions, i, E, e, t);
|
|
1071
1186
|
} else {
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1187
|
+
const E = this.renderSelectedBackgroundDiv(A, m, t, o, r, g, i, p, u, y, C);
|
|
1188
|
+
A || this.renderCell({
|
|
1074
1189
|
areaModel: o,
|
|
1075
1190
|
areaIdent: e,
|
|
1076
1191
|
sideIdent: t,
|
|
@@ -1078,10 +1193,10 @@ class Ae extends ve {
|
|
|
1078
1193
|
columnIndex: g,
|
|
1079
1194
|
left: p,
|
|
1080
1195
|
top: u,
|
|
1081
|
-
width:
|
|
1082
|
-
height:
|
|
1196
|
+
width: y,
|
|
1197
|
+
height: C,
|
|
1083
1198
|
parent: i,
|
|
1084
|
-
cellSelected:
|
|
1199
|
+
cellSelected: E,
|
|
1085
1200
|
lastRowOfModel: a,
|
|
1086
1201
|
gammaRange: !0
|
|
1087
1202
|
}), e === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
@@ -1089,13 +1204,13 @@ class Ae extends ve {
|
|
|
1089
1204
|
columnIndex: g,
|
|
1090
1205
|
cellLeft: p,
|
|
1091
1206
|
cellTop: u,
|
|
1092
|
-
cellWidth:
|
|
1093
|
-
cellHeight:
|
|
1207
|
+
cellWidth: y,
|
|
1208
|
+
cellHeight: C,
|
|
1094
1209
|
parent: i
|
|
1095
1210
|
});
|
|
1096
1211
|
}
|
|
1097
1212
|
}
|
|
1098
|
-
if (b = b +
|
|
1213
|
+
if (b = b + R, b > this.areaBodyCenterGeo.width)
|
|
1099
1214
|
break;
|
|
1100
1215
|
}
|
|
1101
1216
|
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new $(b - 1, 1, s.height, 0), i);
|
|
@@ -1114,49 +1229,50 @@ class Ae extends ve {
|
|
|
1114
1229
|
height: n,
|
|
1115
1230
|
top: d,
|
|
1116
1231
|
parent: a,
|
|
1117
|
-
lastRowOfModel: c
|
|
1232
|
+
lastRowOfModel: c,
|
|
1233
|
+
gammaRange: u
|
|
1118
1234
|
}) {
|
|
1119
|
-
var
|
|
1120
|
-
const
|
|
1121
|
-
let
|
|
1122
|
-
if (i === this.getTreeArrowColumnIndex() && O(
|
|
1123
|
-
const
|
|
1124
|
-
(
|
|
1235
|
+
var Q;
|
|
1236
|
+
const b = this.editorRenderer && this.editorRendererRow === s && this.editorRendererColumn === i ? this.editorRenderer : e.getCellRenderer(s, i), w = { left: r, width: l, height: n, top: d, index: i }, g = e.getRowByIndex(s);
|
|
1237
|
+
let p = "none";
|
|
1238
|
+
if (i === this.getTreeArrowColumnIndex() && O(g)) {
|
|
1239
|
+
const S = g;
|
|
1240
|
+
(Q = S.children) != null && Q.length ? S.expanded ? p = "expanded" : p = "collapsed" : p = "hidden";
|
|
1125
1241
|
}
|
|
1126
1242
|
let C;
|
|
1127
1243
|
if (t === "header") {
|
|
1128
|
-
const
|
|
1129
|
-
(!(
|
|
1244
|
+
const S = this.tableModel.getColumnDef(i);
|
|
1245
|
+
(!(S != null && S.sortIconVisible) || S != null && S.sortIconVisible()) && (C = S == null ? void 0 : S.sortState);
|
|
1130
1246
|
}
|
|
1131
|
-
const v = e.getValueAt(s, i),
|
|
1247
|
+
const v = e.getValueAt(s, i), x = b ? "" : `${v}`, y = e.isRowChecked(s), A = this.dom.addColumnDiv(
|
|
1132
1248
|
a,
|
|
1133
|
-
|
|
1249
|
+
w,
|
|
1134
1250
|
s,
|
|
1135
1251
|
i,
|
|
1136
1252
|
t,
|
|
1137
1253
|
o,
|
|
1138
|
-
|
|
1139
|
-
|
|
1254
|
+
x,
|
|
1255
|
+
p,
|
|
1140
1256
|
this.tableOptions,
|
|
1141
1257
|
y,
|
|
1142
1258
|
C
|
|
1143
|
-
),
|
|
1144
|
-
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1147
|
-
let
|
|
1148
|
-
|
|
1149
|
-
const
|
|
1150
|
-
if (
|
|
1151
|
-
const
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1154
|
-
t === "header" && this.dom.setAttribute(
|
|
1259
|
+
), E = e.getTooltipAt(s, i);
|
|
1260
|
+
E && this.dom.setAttribute(A, "title", E);
|
|
1261
|
+
const k = this.tableModel.getColumnDef(i);
|
|
1262
|
+
k && k.classes[t] && this.dom.addClasses(k.classes[t], A);
|
|
1263
|
+
let V;
|
|
1264
|
+
b && (V = b.render(A, s, i, t, e, v, this.dom.domService));
|
|
1265
|
+
const J = e.getCustomClassesAt(s, i);
|
|
1266
|
+
if (J.length && this.dom.addClasses(J, A), this.dom.addColumnBorderDivs(this.tableOptions, a, w, t, o), c && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, a), this.getFocusModel && t === "body") {
|
|
1267
|
+
const S = this.getFocusModel();
|
|
1268
|
+
S != null && S.hasFocus(s, i) && this.dom.addFocusBorderDivs(a, w, {});
|
|
1269
|
+
}
|
|
1270
|
+
t === "header" && this.dom.setAttribute(A, "data-ge-action", "drag-column");
|
|
1155
1271
|
const W = e.getCustomStyleAt(s, i);
|
|
1156
1272
|
if (W)
|
|
1157
|
-
for (const
|
|
1158
|
-
this.dom.setStyle(
|
|
1159
|
-
return [
|
|
1273
|
+
for (const S in W)
|
|
1274
|
+
this.dom.setStyle(A, S, W[S]);
|
|
1275
|
+
return [A, V];
|
|
1160
1276
|
}
|
|
1161
1277
|
applyCssClasses(e, t = {}) {
|
|
1162
1278
|
e && Object.entries(t).forEach(([o, s]) => {
|
|
@@ -1293,15 +1409,23 @@ class Ae extends ve {
|
|
|
1293
1409
|
n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${o + i - d}px`), n.setStyle(a, "top", `${s}px`), n.setStyle(a, "width", `${d}px`), n.setStyle(a, "height", `${r}px`), n.appendChild(l, a);
|
|
1294
1410
|
}
|
|
1295
1411
|
}
|
|
1296
|
-
class
|
|
1412
|
+
class Me {
|
|
1297
1413
|
constructor(e, t) {
|
|
1298
1414
|
this.columnIndex = e, this.sortState = t;
|
|
1299
1415
|
}
|
|
1300
1416
|
}
|
|
1301
|
-
class
|
|
1417
|
+
class ke {
|
|
1302
1418
|
constructor(e) {
|
|
1303
1419
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1304
1420
|
}
|
|
1421
|
+
/**
|
|
1422
|
+
* Handles the onHostElementChanged event.
|
|
1423
|
+
* In case that the element is an input field, the tableScope.updateModelValueAfterEdit() method is triggered.
|
|
1424
|
+
*
|
|
1425
|
+
* @param {Event} event - The event object.
|
|
1426
|
+
*
|
|
1427
|
+
* @return {void}
|
|
1428
|
+
*/
|
|
1305
1429
|
onHostElementChanged(e) {
|
|
1306
1430
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1307
1431
|
const t = e.target, o = t.getAttribute("data-area"), s = t.getAttribute("data-row-index"), i = t.getAttribute("data-col-index");
|
|
@@ -1312,7 +1436,7 @@ class Me {
|
|
|
1312
1436
|
}
|
|
1313
1437
|
}
|
|
1314
1438
|
}
|
|
1315
|
-
class
|
|
1439
|
+
class Ie {
|
|
1316
1440
|
constructor(e = -1, t = -1) {
|
|
1317
1441
|
this.rowIndex = e, this.columnIndex = t;
|
|
1318
1442
|
}
|
|
@@ -1322,10 +1446,10 @@ class U {
|
|
|
1322
1446
|
this.cells = e;
|
|
1323
1447
|
}
|
|
1324
1448
|
static createSingle(e, t) {
|
|
1325
|
-
return new U([new
|
|
1449
|
+
return new U([new Ie(e, t)]);
|
|
1326
1450
|
}
|
|
1327
1451
|
}
|
|
1328
|
-
class
|
|
1452
|
+
class Te {
|
|
1329
1453
|
constructor(e) {
|
|
1330
1454
|
var t, o;
|
|
1331
1455
|
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);
|
|
@@ -1335,7 +1459,7 @@ class Ie {
|
|
|
1335
1459
|
let o = !1, s = !1;
|
|
1336
1460
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1337
1461
|
const u = this.getSelectionModel(), m = this.getFocusModel();
|
|
1338
|
-
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), o = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (u.addSelection(
|
|
1462
|
+
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), o = !0), (i = e.originalEvent) != null && i.shiftKey || u.hasSelection() && (u.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), s = !0, o = !0) : (l = e.originalEvent) != null && l.ctrlKey || (n = e.originalEvent) != null && n.metaKey ? (u.addSelection(M.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0) : (d = e.originalEvent) != null && d.altKey && ((a = e.originalEvent) != null && a.ctrlKey || (c = e.originalEvent) != null && c.metaKey) && (u.removeSelection(M.singleCell(e.rowIndex, e.columnIndex)), s = !0, o = !0));
|
|
1339
1463
|
}
|
|
1340
1464
|
return s ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1341
1465
|
}
|
|
@@ -1358,7 +1482,7 @@ class Ie {
|
|
|
1358
1482
|
createRangeByEvents(e, t) {
|
|
1359
1483
|
t || (t = e);
|
|
1360
1484
|
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);
|
|
1361
|
-
return
|
|
1485
|
+
return M.create({
|
|
1362
1486
|
rowIndex1: o,
|
|
1363
1487
|
columnIndex1: i,
|
|
1364
1488
|
rowIndex2: s,
|
|
@@ -1366,7 +1490,7 @@ class Ie {
|
|
|
1366
1490
|
});
|
|
1367
1491
|
}
|
|
1368
1492
|
}
|
|
1369
|
-
class
|
|
1493
|
+
class _e {
|
|
1370
1494
|
get() {
|
|
1371
1495
|
return {
|
|
1372
1496
|
f2: "START_EDITING",
|
|
@@ -1384,7 +1508,7 @@ class Te {
|
|
|
1384
1508
|
};
|
|
1385
1509
|
}
|
|
1386
1510
|
}
|
|
1387
|
-
class
|
|
1511
|
+
class De {
|
|
1388
1512
|
get() {
|
|
1389
1513
|
return {
|
|
1390
1514
|
f2: "START_EDITING",
|
|
@@ -1404,7 +1528,7 @@ class _e {
|
|
|
1404
1528
|
};
|
|
1405
1529
|
}
|
|
1406
1530
|
}
|
|
1407
|
-
class
|
|
1531
|
+
class $e {
|
|
1408
1532
|
constructor(e) {
|
|
1409
1533
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
1410
1534
|
}
|
|
@@ -1412,7 +1536,7 @@ class De {
|
|
|
1412
1536
|
this.listener.includes(e) || this.listener.push(e);
|
|
1413
1537
|
}
|
|
1414
1538
|
init() {
|
|
1415
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
1539
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new De().get()) : Object.assign(this.shortcutActionIdMapping, new _e().get()), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
1416
1540
|
}
|
|
1417
1541
|
isMacintosh() {
|
|
1418
1542
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -1456,7 +1580,7 @@ class De {
|
|
|
1456
1580
|
return e.altKey && t.push("alt"), e.shiftKey && t.push("shift"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), e.code && t.push(e.code.toLowerCase().replace(/key/g, "")), t.sort();
|
|
1457
1581
|
}
|
|
1458
1582
|
}
|
|
1459
|
-
class
|
|
1583
|
+
class Z {
|
|
1460
1584
|
onCheckboxChanged(e) {
|
|
1461
1585
|
}
|
|
1462
1586
|
onContextmenu(e) {
|
|
@@ -1472,7 +1596,7 @@ class Q {
|
|
|
1472
1596
|
onMouseMoved(e) {
|
|
1473
1597
|
}
|
|
1474
1598
|
}
|
|
1475
|
-
class
|
|
1599
|
+
class Fe {
|
|
1476
1600
|
setStyle(e, t, o) {
|
|
1477
1601
|
return e.style[t] = o, e;
|
|
1478
1602
|
}
|
|
@@ -1499,7 +1623,7 @@ class $e {
|
|
|
1499
1623
|
e.setAttribute(t, o);
|
|
1500
1624
|
}
|
|
1501
1625
|
}
|
|
1502
|
-
class
|
|
1626
|
+
class Le {
|
|
1503
1627
|
render(e, t, o, s, i, r, l) {
|
|
1504
1628
|
if (i.isEditable(t, o)) {
|
|
1505
1629
|
l.addClass(e, "ge-table-row-input-div");
|
|
@@ -1520,7 +1644,7 @@ class Fe {
|
|
|
1520
1644
|
}
|
|
1521
1645
|
}
|
|
1522
1646
|
}
|
|
1523
|
-
class
|
|
1647
|
+
class Oe {
|
|
1524
1648
|
constructor(e = "none", t = "single") {
|
|
1525
1649
|
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
1526
1650
|
}
|
|
@@ -1555,16 +1679,16 @@ class Le {
|
|
|
1555
1679
|
if (this.selectionType === "none")
|
|
1556
1680
|
return;
|
|
1557
1681
|
let t = e;
|
|
1558
|
-
this.selectionType === "row" ? t =
|
|
1682
|
+
this.selectionType === "row" ? t = M.singleRow(e.r1) : this.selectionType === "column" && (t = M.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
1559
1683
|
}
|
|
1560
1684
|
togglePoint(e, t) {
|
|
1561
|
-
this.getSelectionCount(e, t) > 0 ? this.removeSelection(
|
|
1685
|
+
this.getSelectionCount(e, t) > 0 ? this.removeSelection(M.singleCell(e, t)) : this.addSelection(M.singleCell(e, t));
|
|
1562
1686
|
}
|
|
1563
1687
|
addRange(e) {
|
|
1564
1688
|
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));
|
|
1565
1689
|
}
|
|
1566
1690
|
}
|
|
1567
|
-
class
|
|
1691
|
+
class Pe {
|
|
1568
1692
|
constructor(e = "none") {
|
|
1569
1693
|
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
1570
1694
|
}
|
|
@@ -1587,32 +1711,43 @@ class Oe {
|
|
|
1587
1711
|
return [this.rowIndex, this.columnIndex];
|
|
1588
1712
|
}
|
|
1589
1713
|
}
|
|
1590
|
-
const
|
|
1714
|
+
const He = new Oe(), Ve = new Pe("cell");
|
|
1591
1715
|
class z {
|
|
1592
1716
|
constructor() {
|
|
1593
1717
|
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 = {
|
|
1594
1718
|
header: 34,
|
|
1595
1719
|
body: 34,
|
|
1596
1720
|
footer: 34
|
|
1597
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
1721
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new de(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new he(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Le(), this.getSelectionModel = () => He, this.getFocusModel = () => Ve;
|
|
1598
1722
|
}
|
|
1599
1723
|
}
|
|
1600
|
-
class
|
|
1724
|
+
class ce extends Ee {
|
|
1601
1725
|
constructor(e, t, o, s, i) {
|
|
1602
1726
|
var r;
|
|
1603
1727
|
if (super(
|
|
1604
1728
|
e,
|
|
1605
1729
|
t,
|
|
1606
|
-
new
|
|
1730
|
+
new fe(o),
|
|
1607
1731
|
s
|
|
1608
|
-
), this.eventListener = i, this.selectionService = new
|
|
1732
|
+
), this.eventListener = i, this.selectionService = new Te(this), this.api = new Se(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, i || (this.eventListener = new Z()), (r = this.tableOptions) != null && r.autoRestoreOptions) {
|
|
1609
1733
|
const l = this.tableOptions.autoRestoreOptions, n = l.getStorageKeyFn;
|
|
1610
|
-
n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new
|
|
1734
|
+
n && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new xe(n)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new Ce(n)), l.autoRestoreSortingState && (this.storeSortingService = new ve(n)));
|
|
1611
1735
|
}
|
|
1612
|
-
this.mouseHandler = new
|
|
1736
|
+
this.mouseHandler = new we(this), this.inputHandler = new ke(this), this.shortcutService = new $e(this), this.shortcutService.addListener(this.selectionService);
|
|
1613
1737
|
}
|
|
1614
|
-
|
|
1615
|
-
|
|
1738
|
+
/**
|
|
1739
|
+
* Creates a TableScope instance.
|
|
1740
|
+
*
|
|
1741
|
+
* @param {HTMLDivElement} hostElement - The HTML div element that will contain the table.
|
|
1742
|
+
* @param {TableModelIf} tableModel - The table model object.
|
|
1743
|
+
* @param {TableOptionsIf} [tableOptions=new TableOptions()] - The optional table options object.
|
|
1744
|
+
* @param {EventListenerIf} [eventListener=new EventAdapter()] - The optional event listener object.
|
|
1745
|
+
* @param {DomServiceIf} [domService=new SimpleDomService()] - The optional DOM service object.
|
|
1746
|
+
*
|
|
1747
|
+
* @return {TableScope} - The newly created TableScope instance.
|
|
1748
|
+
*/
|
|
1749
|
+
static create(e, t, o = new z(), s = new Z(), i = new Fe()) {
|
|
1750
|
+
return new ce(
|
|
1616
1751
|
e,
|
|
1617
1752
|
t,
|
|
1618
1753
|
i,
|
|
@@ -1636,16 +1771,32 @@ class he extends Ae {
|
|
|
1636
1771
|
updateModelValueAfterEdit(e, t, o, s) {
|
|
1637
1772
|
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, s) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(U.createSingle(t, o)), this.hostElement.focus());
|
|
1638
1773
|
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Retrieves the TableApi object.
|
|
1776
|
+
*
|
|
1777
|
+
* @return {TableApi} The TableApi object.
|
|
1778
|
+
*/
|
|
1639
1779
|
getApi() {
|
|
1640
1780
|
return this.api;
|
|
1641
1781
|
}
|
|
1642
|
-
|
|
1643
|
-
* Called by the table component
|
|
1782
|
+
/**
|
|
1783
|
+
* Initializes the table. Called by the table component.
|
|
1784
|
+
*
|
|
1785
|
+
* @function firstInit
|
|
1786
|
+
* @memberof TableScope
|
|
1787
|
+
*
|
|
1788
|
+
* @returns {TableScope} This instance of the table scope.
|
|
1644
1789
|
*/
|
|
1645
1790
|
firstInit() {
|
|
1646
1791
|
var e;
|
|
1647
1792
|
return this.tableModel.init(), (e = this.tableOptions) != null && e.externalFilterFunction && this.externalFilterChanged(!1), this.autoRestoreCollapsedExpandedState(), this.autoRestoreSortingState(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.autoRestoreScrollPosition(), this;
|
|
1648
1793
|
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Creates a GeMouseEvent object based on a MouseEvent.
|
|
1796
|
+
*
|
|
1797
|
+
* @param {MouseEvent} mouseEvent - The MouseEvent object to create the GeMouseEvent from.
|
|
1798
|
+
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
1799
|
+
*/
|
|
1649
1800
|
createGeMouseEvent(e) {
|
|
1650
1801
|
const t = new X();
|
|
1651
1802
|
if (t.originalEvent = e, e) {
|
|
@@ -1661,26 +1812,72 @@ class he extends Ae {
|
|
|
1661
1812
|
}
|
|
1662
1813
|
return t;
|
|
1663
1814
|
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Handles the mouse down event.
|
|
1817
|
+
*
|
|
1818
|
+
* @param {GeMouseEvent} mouseEvent - The mouse event object.
|
|
1819
|
+
* @return {void}
|
|
1820
|
+
*/
|
|
1664
1821
|
onMouseDown(e) {
|
|
1665
1822
|
e.columnIndex > -1 && e.action && ["resize-column", "drag-column"].includes(e.action) && (this.mouseStartWidth = this.tableModel.getColumnWidth(e.columnIndex), this.mouseStartAction = e.action, this.mouseStartColumnIndex = e.columnIndex, this.mouseStartAction === "drag-column" && (this.dragFrom = this.mouseStartColumnIndex));
|
|
1666
1823
|
}
|
|
1824
|
+
/**
|
|
1825
|
+
* Handles mouse dragging on the frame.
|
|
1826
|
+
*
|
|
1827
|
+
* @param {GeMouseEvent} mouseEvent - The mouse event object.
|
|
1828
|
+
*/
|
|
1667
1829
|
mouseDraggingOnFrame(e) {
|
|
1668
1830
|
this.eventListener.onMouseDragging(e), this.mouseEvent = e, this.mouseStartColumnIndex > -1 && this.mouseStartAction === "resize-column" && this.tableOptions.columnsResizable ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && e.columnIndex > -1 && this.tableOptions.columnsDraggable && (this.draggingTargetColumnIndex = e.columnIndex, this.dragTo = this.draggingTargetColumnIndex, this.dragFrom > -1 && this.dragTo > -1 && this.dragFrom !== this.dragTo && (this.tableModel.changeColumnOrder(this.dragFrom, this.dragTo), this.dragFrom = this.dragTo, this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows()), this.repaint());
|
|
1669
1831
|
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Handles the end of mouse dragging event on a frame.
|
|
1834
|
+
*
|
|
1835
|
+
* @param {GeMouseEvent} mouseEvent - The mouse event object.
|
|
1836
|
+
*
|
|
1837
|
+
* @returns {void}
|
|
1838
|
+
*/
|
|
1670
1839
|
mouseDraggingEndOnFrame(e) {
|
|
1671
1840
|
this.eventListener.onMouseDraggingEnd(e), this.draggingTargetColumnIndex = -1, this.mouseStartAction === "resize-column" ? this.resizeColumn(e) : this.mouseStartAction === "drag-column" && this.repaint(), this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.mouseStartAction = "";
|
|
1672
1841
|
}
|
|
1842
|
+
/**
|
|
1843
|
+
* Handles the mouse move event.
|
|
1844
|
+
*
|
|
1845
|
+
* @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
|
|
1846
|
+
* @return {void}
|
|
1847
|
+
*/
|
|
1673
1848
|
mouseMove(e) {
|
|
1674
1849
|
this.eventListener.onMouseMoved(e), this.adjustHoverRows(e), this.adjustHoverColumns(e);
|
|
1675
1850
|
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Triggers the context menu event based on the mouse move event.
|
|
1853
|
+
*
|
|
1854
|
+
* @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
|
|
1855
|
+
* @return {void}
|
|
1856
|
+
*/
|
|
1676
1857
|
contextmenu(e) {
|
|
1677
1858
|
this.eventListener.onContextmenu(e);
|
|
1678
1859
|
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Toggles the expand or collapse state of all items in the body area model.
|
|
1862
|
+
*
|
|
1863
|
+
* @param {boolean} [expand=true] - Whether to expand or collapse all items. Default is true.
|
|
1864
|
+
*
|
|
1865
|
+
* @return {void}
|
|
1866
|
+
*/
|
|
1679
1867
|
toggleExpandCollapseAll(e = !0) {
|
|
1680
1868
|
var o;
|
|
1681
1869
|
const t = this.tableModel.getBodyModel();
|
|
1682
1870
|
N(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
|
|
1683
1871
|
}
|
|
1872
|
+
/**
|
|
1873
|
+
* Toggles the checkbox state of a specific row in a table.
|
|
1874
|
+
*
|
|
1875
|
+
* @param {number} rowIdx - The index of the row to toggle the checkbox state.
|
|
1876
|
+
* @param {number} _colIdx - The index of the column. This parameter is unused.
|
|
1877
|
+
* @param {AreaIdent} areaIdent - The identifier of the table area.
|
|
1878
|
+
*
|
|
1879
|
+
* @return {void} - This method does not return anything.
|
|
1880
|
+
*/
|
|
1684
1881
|
toggleRowCheckbox(e, t, o) {
|
|
1685
1882
|
var n;
|
|
1686
1883
|
const s = this.tableModel.getAreaModel(o), i = s.isRowChecked(e), r = i === void 0 || i === "semi" || i === "none";
|
|
@@ -1688,6 +1885,13 @@ class he extends Ae {
|
|
|
1688
1885
|
const l = (n = s.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
1689
1886
|
this.eventListener.onCheckboxChanged(l || []);
|
|
1690
1887
|
}
|
|
1888
|
+
/**
|
|
1889
|
+
* Handle mouse click events.
|
|
1890
|
+
*
|
|
1891
|
+
* @param {GeMouseEvent} evt - The mouse click event.
|
|
1892
|
+
* @param {GeMouseEvent | undefined} previousEvt - The previous mouse click event, if any.
|
|
1893
|
+
* @returns {void}
|
|
1894
|
+
*/
|
|
1691
1895
|
onMouseClicked(e, t) {
|
|
1692
1896
|
let o = this.selectionService.onMouseClicked(e, t);
|
|
1693
1897
|
if (!o && this.getFocusModel) {
|
|
@@ -1696,19 +1900,41 @@ class he extends Ae {
|
|
|
1696
1900
|
}
|
|
1697
1901
|
this.eventListener.onMouseClicked(e), o && this.debounce(this.repaint.bind(this), 10);
|
|
1698
1902
|
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Updates the table (repaint) when an external filter is changed.
|
|
1905
|
+
*
|
|
1906
|
+
* @param {boolean} clearSelection - Indicates whether to clear the selection model or not. Default value is true.
|
|
1907
|
+
* @return {void}
|
|
1908
|
+
*/
|
|
1699
1909
|
externalFilterChanged(e = !0) {
|
|
1700
1910
|
const t = this.tableOptions.externalFilterFunction;
|
|
1701
1911
|
t && (e && this.clearSelectionModel(), this.tableModel.externalFilterChanged(t), this.scrollViewport.scrollTo(0, 0), this.tableModel.recalcHeightAndPadding(), this.resetSizeOfWrapperDiv(), this.repaint());
|
|
1702
1912
|
}
|
|
1913
|
+
/**
|
|
1914
|
+
* Handle the double click event on the table header.
|
|
1915
|
+
*
|
|
1916
|
+
* @param {MouseEvent} event - The mouse event that triggered the double click.
|
|
1917
|
+
* @param {number} _rowIdx - The row index of the header.
|
|
1918
|
+
* @param {number} colIdx - The column index of the header.
|
|
1919
|
+
*
|
|
1920
|
+
* @return {void}
|
|
1921
|
+
*/
|
|
1703
1922
|
onHeaderDblClicked(e, t, o) {
|
|
1704
1923
|
var i, r;
|
|
1705
1924
|
const s = this.tableModel.getColumnDef(o);
|
|
1706
1925
|
if (s != null && s.sortable && s.sortable()) {
|
|
1707
1926
|
e.preventDefault(), e.stopPropagation();
|
|
1708
|
-
const l = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, n = s.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], a = new
|
|
1927
|
+
const l = s.sortStatesOrder ? s.sortStatesOrder : this.tableOptions.sortOrder, n = s.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], a = new Me(o, d);
|
|
1709
1928
|
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]);
|
|
1710
1929
|
}
|
|
1711
1930
|
}
|
|
1931
|
+
/**
|
|
1932
|
+
* Changes the focus cell using the specified deltas.
|
|
1933
|
+
*
|
|
1934
|
+
* @param {number} dx - The delta for the column index.
|
|
1935
|
+
* @param {number} dy - The delta for the row index.
|
|
1936
|
+
* @return {boolean} - True if the focus cell was changed, false otherwise.
|
|
1937
|
+
*/
|
|
1712
1938
|
changeFocusCell(e, t) {
|
|
1713
1939
|
if (!this.isEditing() && this.getFocusModel) {
|
|
1714
1940
|
const o = this.getFocusModel();
|
|
@@ -1719,9 +1945,19 @@ class he extends Ae {
|
|
|
1719
1945
|
}
|
|
1720
1946
|
return !1;
|
|
1721
1947
|
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Resizes the column based on the mouse event.
|
|
1950
|
+
*
|
|
1951
|
+
* @param {GeMouseEvent} mouseEvent - The mouse event that triggered the resize.
|
|
1952
|
+
*/
|
|
1722
1953
|
resizeColumn(e) {
|
|
1723
1954
|
this.tableModel.setColumnWidth(this.mouseStartColumnIndex, this.mouseStartWidth + e.draggingX), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
|
|
1724
1955
|
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Clears the selection model, if available.
|
|
1958
|
+
*
|
|
1959
|
+
* @return {void}
|
|
1960
|
+
*/
|
|
1725
1961
|
clearSelectionModel() {
|
|
1726
1962
|
var e;
|
|
1727
1963
|
this.getSelectionModel && ((e = this.getSelectionModel()) == null || e.clear());
|
|
@@ -1730,6 +1966,14 @@ class he extends Ae {
|
|
|
1730
1966
|
var o;
|
|
1731
1967
|
console.clear(), console.info("this.hostElement.offsetTop", this.hostElement.offsetTop), console.info("this.hostElement.scrollHeight", this.hostElement.scrollHeight), console.info("this.scrollViewportTop", this.scrollTop), console.info("this.areaHeaderCenter.parent.clientHeight", this.areaHeaderCenter.parent.clientHeight), console.info("bodyY", t), console.info("bodyX", e), console.info("rows", this.firstVisibleRowIndex), console.info(""), console.info("this.tableModel", this.tableModel), console.info(""), console.info("this.mouseMoveEvent.clientX", (o = this.mouseHandler.mouseEvent) == null ? void 0 : o.clientX), console.info("this.hostElement.offsetLeft", this.hostElement.offsetLeft), console.info("this.areaBodyWestGeo.width", this.areaBodyWestGeo.width);
|
|
1732
1968
|
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Restores the scroll position of the table if auto restore options are enabled.
|
|
1971
|
+
*
|
|
1972
|
+
* @private
|
|
1973
|
+
* @memberof ClassName
|
|
1974
|
+
*
|
|
1975
|
+
* @returns {void}
|
|
1976
|
+
*/
|
|
1733
1977
|
autoRestoreScrollPosition() {
|
|
1734
1978
|
var e;
|
|
1735
1979
|
if ((e = this.tableOptions) != null && e.autoRestoreOptions && this.storeScrollPosStateService && this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition) {
|
|
@@ -1737,6 +1981,20 @@ class he extends Ae {
|
|
|
1737
1981
|
o && this.scrollViewport.scrollTo(...o);
|
|
1738
1982
|
}
|
|
1739
1983
|
}
|
|
1984
|
+
/**
|
|
1985
|
+
* Automatically restores the sorting state of the table.
|
|
1986
|
+
*
|
|
1987
|
+
* @private
|
|
1988
|
+
* @function autoRestoreSortingState
|
|
1989
|
+
* @memberof ClassName
|
|
1990
|
+
*
|
|
1991
|
+
* @description
|
|
1992
|
+
* This method checks if the autoRestoreSortingState option is enabled in the tableOptions.
|
|
1993
|
+
* If enabled, it uses the storeSortingService to retrieve the sort items array.
|
|
1994
|
+
* If there are sort items present, it applies them to the table's body model using the doSort method.
|
|
1995
|
+
*
|
|
1996
|
+
* @returns {void}
|
|
1997
|
+
*/
|
|
1740
1998
|
autoRestoreSortingState() {
|
|
1741
1999
|
var e, t;
|
|
1742
2000
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.autoRestoreSortingState && this.storeSortingService) {
|
|
@@ -1744,6 +2002,12 @@ class he extends Ae {
|
|
|
1744
2002
|
o != null && o.length && this.tableModel.getBodyModel().doSort(o);
|
|
1745
2003
|
}
|
|
1746
2004
|
}
|
|
2005
|
+
/**
|
|
2006
|
+
* Restores the collapsed/expanded state of the rows in the table based on the autoRestoreOptions
|
|
2007
|
+
* specified in the tableOptions. This method is private and should not be called directly.
|
|
2008
|
+
*
|
|
2009
|
+
* @private
|
|
2010
|
+
*/
|
|
1747
2011
|
autoRestoreCollapsedExpandedState() {
|
|
1748
2012
|
var e, t;
|
|
1749
2013
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
@@ -1770,10 +2034,10 @@ class he extends Ae {
|
|
|
1770
2034
|
}
|
|
1771
2035
|
}
|
|
1772
2036
|
}
|
|
1773
|
-
class
|
|
2037
|
+
class ue {
|
|
1774
2038
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
2039
|
+
ue.themes = ["light", "combat", "paper", "blackboard"];
|
|
2040
|
+
ue.vars = {
|
|
1777
2041
|
light: `html[data-theme="light"] {
|
|
1778
2042
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
1779
2043
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -2007,7 +2271,7 @@ ce.vars = {
|
|
|
2007
2271
|
--ge-table-drop-zone-bg: #758129;
|
|
2008
2272
|
}`
|
|
2009
2273
|
};
|
|
2010
|
-
class
|
|
2274
|
+
class ee {
|
|
2011
2275
|
constructor(e, t = !0, o, s, i = 0, r = !1, l = !1) {
|
|
2012
2276
|
this.data = e, this.expanded = t, this.children = o, this.parent = s, this.deep = i, this.checked = r, this.keep = l, this.type = "TreeRow";
|
|
2013
2277
|
}
|
|
@@ -2019,14 +2283,14 @@ class j {
|
|
|
2019
2283
|
s.push(j.buildTreeRow(i, t, void 0, 0, o));
|
|
2020
2284
|
return s;
|
|
2021
2285
|
}
|
|
2022
|
-
static buildTreeRow(e, t = "children", o = new
|
|
2286
|
+
static buildTreeRow(e, t = "children", o = new ee(e, !0, [], void 0, 0), s = 0, i = 12) {
|
|
2023
2287
|
var l;
|
|
2024
2288
|
if (s > i)
|
|
2025
2289
|
return console.warn("Max deep limit reached: ", s), o;
|
|
2026
2290
|
const r = e[t];
|
|
2027
2291
|
if (r)
|
|
2028
2292
|
for (const n of r) {
|
|
2029
|
-
const d = new
|
|
2293
|
+
const d = new ee(n, !0, [], o, s + 1);
|
|
2030
2294
|
if ((l = o.children) == null || l.push(d), j.buildTreeRow(
|
|
2031
2295
|
n,
|
|
2032
2296
|
t,
|
|
@@ -2048,28 +2312,28 @@ class f {
|
|
|
2048
2312
|
this.value = e, this.unit = t;
|
|
2049
2313
|
}
|
|
2050
2314
|
}
|
|
2051
|
-
const
|
|
2315
|
+
const Be = () => !0, te = () => !1;
|
|
2052
2316
|
class H {
|
|
2053
|
-
constructor(e, t, o = new f(100, "px"), s = new
|
|
2317
|
+
constructor(e, t, o = new f(100, "px"), s = new T(), i = new T(), r = new f(100, "px"), l = new f(100, "px"), n, d, a, c, u, m, b, w, g = () => this.visible) {
|
|
2054
2318
|
this.property = e, this.headerLabel = t, this.width = o, this.classes = s, this.rendererMap = i, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = c, this.sortIconVisible = u, this.editable = m, this.getEditRenderer = b, this.editInputPipe = w, this.isVisible = g, this.visible = !0;
|
|
2055
2319
|
}
|
|
2056
2320
|
static bodyRenderer(e) {
|
|
2057
|
-
return new
|
|
2321
|
+
return new T(
|
|
2058
2322
|
void 0,
|
|
2059
2323
|
e,
|
|
2060
2324
|
void 0
|
|
2061
2325
|
);
|
|
2062
2326
|
}
|
|
2063
2327
|
static create(e) {
|
|
2064
|
-
const t = new
|
|
2328
|
+
const t = new T(
|
|
2065
2329
|
e.headerRenderer,
|
|
2066
2330
|
e.bodyRenderer,
|
|
2067
2331
|
e.footerRenderer
|
|
2068
|
-
), o = new
|
|
2332
|
+
), o = new T(
|
|
2069
2333
|
e.headerClasses,
|
|
2070
2334
|
e.bodyClasses,
|
|
2071
2335
|
e.footerClasses
|
|
2072
|
-
), s = e.sortIconVisible ?? e.sortable ??
|
|
2336
|
+
), s = e.sortIconVisible ?? e.sortable ?? te, i = e.editable ?? e.editable ?? te, r = e.isVisible ?? e.isVisible ?? Be;
|
|
2073
2337
|
return new H(
|
|
2074
2338
|
e.property ?? "",
|
|
2075
2339
|
e.headerLabel ?? "",
|
|
@@ -2090,7 +2354,7 @@ class H {
|
|
|
2090
2354
|
);
|
|
2091
2355
|
}
|
|
2092
2356
|
}
|
|
2093
|
-
const
|
|
2357
|
+
const Ue = new f(300, "px"), qe = new f(290, "px"), Je = new f(280, "px"), Qe = new f(270, "px"), Ze = new f(260, "px"), et = new f(250, "px"), tt = new f(240, "px"), ot = new f(230, "px"), st = new f(220, "px"), it = new f(210, "px"), oe = new f(200, "px"), rt = new f(190, "px"), lt = new f(180, "px"), nt = new f(170, "px"), at = new f(160, "px"), dt = new f(150, "px"), ht = new f(140, "px"), ct = new f(130, "px"), ut = new f(120, "px"), gt = new f(110, "px"), bt = new f(100, "px"), pt = new f(90, "px"), ft = new f(80, "px"), mt = new f(70, "px"), wt = new f(60, "px"), St = new f(50, "px"), xt = new f(40, "px"), yt = new f(30, "px"), Ct = new f(20, "px"), vt = new f(10, "px"), Rt = new f(0, "px");
|
|
2094
2358
|
class q {
|
|
2095
2359
|
constructor(e, t = [], o = -1) {
|
|
2096
2360
|
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((s) => s.rendererMap[e]);
|
|
@@ -2279,7 +2543,7 @@ class D {
|
|
|
2279
2543
|
changeColumnOrder(e, t) {
|
|
2280
2544
|
}
|
|
2281
2545
|
}
|
|
2282
|
-
class
|
|
2546
|
+
class We {
|
|
2283
2547
|
flattenTree(e, t = []) {
|
|
2284
2548
|
var o;
|
|
2285
2549
|
for (const s of e)
|
|
@@ -2290,7 +2554,7 @@ class Be {
|
|
|
2290
2554
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
2291
2555
|
}
|
|
2292
2556
|
}
|
|
2293
|
-
class
|
|
2557
|
+
class ge {
|
|
2294
2558
|
genericSortComparator(e, t, o) {
|
|
2295
2559
|
if (typeof e == "number" && typeof t == "number")
|
|
2296
2560
|
return o * (e - t);
|
|
@@ -2308,9 +2572,9 @@ class ue {
|
|
|
2308
2572
|
return o * ("" + e).localeCompare("" + t);
|
|
2309
2573
|
}
|
|
2310
2574
|
}
|
|
2311
|
-
class
|
|
2575
|
+
class se extends q {
|
|
2312
2576
|
constructor(e, t, o, s = []) {
|
|
2313
|
-
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new
|
|
2577
|
+
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.type = "AreaModelTree", this.sorterService = new ge(), this.service = new We(), this.properties = s.map((i) => i.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
|
|
2314
2578
|
}
|
|
2315
2579
|
changeColumnOrder(e, t) {
|
|
2316
2580
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -2412,7 +2676,7 @@ class oe extends q {
|
|
|
2412
2676
|
s.children && this.treeSort(s.children, t, o);
|
|
2413
2677
|
}
|
|
2414
2678
|
}
|
|
2415
|
-
class
|
|
2679
|
+
class ie {
|
|
2416
2680
|
constructor(e = []) {
|
|
2417
2681
|
this.allRootNodes = e;
|
|
2418
2682
|
}
|
|
@@ -2472,12 +2736,12 @@ class se {
|
|
|
2472
2736
|
o.checked && t.push(o), o.children && this.addSelectedRecursive(o.children, t);
|
|
2473
2737
|
}
|
|
2474
2738
|
}
|
|
2475
|
-
class
|
|
2739
|
+
class re {
|
|
2476
2740
|
constructor(e = 0, t = 0, o = 0, s = 0) {
|
|
2477
2741
|
this.top = e, this.right = t, this.bottom = o, this.left = s;
|
|
2478
2742
|
}
|
|
2479
2743
|
}
|
|
2480
|
-
class
|
|
2744
|
+
class Ge {
|
|
2481
2745
|
constructor() {
|
|
2482
2746
|
this.checkedRows = [];
|
|
2483
2747
|
}
|
|
@@ -2512,57 +2776,143 @@ class G {
|
|
|
2512
2776
|
constructor(e, t, o, s = 0, i = 0, r = !1, l = new P(), n = [], d = [], a = -1, c = 0, u = 400, m = () => {
|
|
2513
2777
|
}) {
|
|
2514
2778
|
var b, w, g, p;
|
|
2515
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = c, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new
|
|
2779
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = s, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = c, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new re(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (w = this.columnSizes) != null && w.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && pe(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ge());
|
|
2516
2780
|
}
|
|
2517
2781
|
init() {
|
|
2518
2782
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
2519
2783
|
}
|
|
2784
|
+
/**
|
|
2785
|
+
* Retrieves the count of columns in the current instance.
|
|
2786
|
+
*
|
|
2787
|
+
* @return {number} The count of columns.
|
|
2788
|
+
*/
|
|
2520
2789
|
getColumnCount() {
|
|
2521
2790
|
return this.columnCount;
|
|
2522
2791
|
}
|
|
2792
|
+
/**
|
|
2793
|
+
* Sets the width in pixel of a column (by columnIndex) in a table.
|
|
2794
|
+
*
|
|
2795
|
+
* @param {number} columnIndex - The index of the column.
|
|
2796
|
+
* @param {number} width - The desired width of the column.
|
|
2797
|
+
* @return {void}
|
|
2798
|
+
*/
|
|
2523
2799
|
setColumnWidth(e, t) {
|
|
2524
2800
|
var o;
|
|
2525
2801
|
t = Math.max(0, t), this.overridingColumnWidth !== -1 && (this.overridingColumnWidth = t), e > -1 && e < ((o = this.columnSizes) == null ? void 0 : o.length) && (this.columnSizes[e] = t), this.recalcContentWidthInPx();
|
|
2526
2802
|
}
|
|
2803
|
+
/**
|
|
2804
|
+
* Retrieves the width of a column specified by its index.
|
|
2805
|
+
*
|
|
2806
|
+
* @param {number} columnIndex - The index of the desired column.
|
|
2807
|
+
* @return {number} - The width of the specified column.
|
|
2808
|
+
*/
|
|
2527
2809
|
getColumnWidth(e) {
|
|
2528
2810
|
var o;
|
|
2529
2811
|
const t = this.getColumnDef(e);
|
|
2530
2812
|
return t && t.isVisible && !t.isVisible() ? 0 : this.overridingColumnWidth !== -1 ? this.overridingColumnWidth : e > -1 && e < ((o = this.columnSizes) == null ? void 0 : o.length) ? this.columnSizes[e] : 0;
|
|
2531
2813
|
}
|
|
2814
|
+
/**
|
|
2815
|
+
* Retrieves the x position for a given column index.
|
|
2816
|
+
*
|
|
2817
|
+
* @param {number} columnIndex - The index of the column.
|
|
2818
|
+
* @return {number} - The x position of the column.
|
|
2819
|
+
*/
|
|
2532
2820
|
getXPosByColumnIndex(e) {
|
|
2533
2821
|
return e === 0 ? 0 : this.overridingColumnWidth > -1 ? this.overridingColumnWidth * e : this.xPositions[e];
|
|
2534
2822
|
}
|
|
2823
|
+
/**
|
|
2824
|
+
* Recalculates the size (width, height, padding) of the elements based on the client width.
|
|
2825
|
+
*
|
|
2826
|
+
* @param {number} clientWidth - The width of the client area.
|
|
2827
|
+
*
|
|
2828
|
+
* @return {void} - This method does not return a value.
|
|
2829
|
+
*/
|
|
2535
2830
|
recalcSize(e) {
|
|
2536
2831
|
this.recalcColumnWidthes(e), this.recalcHeightAndPadding();
|
|
2537
2832
|
}
|
|
2833
|
+
/**
|
|
2834
|
+
* Recalculates the height and padding for the body area.
|
|
2835
|
+
*
|
|
2836
|
+
* This method retrieves the area model for the "body" area,
|
|
2837
|
+
* and updates the rowCount property with the row count of the model.
|
|
2838
|
+
*
|
|
2839
|
+
* The contentHeightInPx property is then updated with the height of the "body" area.
|
|
2840
|
+
*
|
|
2841
|
+
* The method calls the recalcContentWidthInPx() method to recalculate the content width.
|
|
2842
|
+
*
|
|
2843
|
+
* Finally, the method calls the recalcPadding() method to recalculate the padding.
|
|
2844
|
+
*
|
|
2845
|
+
* @return {void}
|
|
2846
|
+
*/
|
|
2538
2847
|
recalcHeightAndPadding() {
|
|
2539
2848
|
const e = this.getAreaModel("body");
|
|
2540
2849
|
this.rowCount = e.getRowCount(), this.contentHeightInPx = this.getAreaHeight("body"), this.recalcContentWidthInPx(), this.recalcPadding();
|
|
2541
2850
|
}
|
|
2851
|
+
/**
|
|
2852
|
+
* Recalculates the padding of an element based on the width and height of its surrounding areas.
|
|
2853
|
+
*
|
|
2854
|
+
* @method recalcPadding
|
|
2855
|
+
*
|
|
2856
|
+
* @returns {void}
|
|
2857
|
+
*/
|
|
2542
2858
|
recalcPadding() {
|
|
2543
2859
|
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"), s = this.getAreaHeight("footer");
|
|
2544
|
-
this.padding = new
|
|
2860
|
+
this.padding = new re(
|
|
2545
2861
|
o,
|
|
2546
2862
|
t,
|
|
2547
2863
|
s,
|
|
2548
2864
|
e
|
|
2549
2865
|
);
|
|
2550
2866
|
}
|
|
2867
|
+
/**
|
|
2868
|
+
* Retrieves the padding value.
|
|
2869
|
+
*
|
|
2870
|
+
* @returns {Padding} The padding value.
|
|
2871
|
+
*/
|
|
2551
2872
|
getPadding() {
|
|
2552
2873
|
return this.padding;
|
|
2553
2874
|
}
|
|
2875
|
+
/**
|
|
2876
|
+
* Returns the height of the content in pixels.
|
|
2877
|
+
*
|
|
2878
|
+
* @returns {number} The height of the content in pixels.
|
|
2879
|
+
*/
|
|
2554
2880
|
getContentHeightInPixel() {
|
|
2555
2881
|
return this.contentHeightInPx;
|
|
2556
2882
|
}
|
|
2883
|
+
/**
|
|
2884
|
+
* Returns the width of the content in pixels.
|
|
2885
|
+
*
|
|
2886
|
+
* @returns {number} The width of the content in pixels.
|
|
2887
|
+
*/
|
|
2557
2888
|
getContentWidthInPixel() {
|
|
2558
2889
|
return this.contentWidthInPx;
|
|
2559
2890
|
}
|
|
2891
|
+
/**
|
|
2892
|
+
* Returns the height of the specified row in the given row area identifier.
|
|
2893
|
+
*
|
|
2894
|
+
* @param {AreaIdent} rowAreaIdent - The row area identifier.
|
|
2895
|
+
* @param {number} rowIndex - The index of the row.
|
|
2896
|
+
* @return {number} - The height of the specified row.
|
|
2897
|
+
*/
|
|
2560
2898
|
getRowHeight(e, t) {
|
|
2561
2899
|
return this.getAreaModel(e).getRowHeight(t);
|
|
2562
2900
|
}
|
|
2901
|
+
/**
|
|
2902
|
+
* Retrieves the model for the given row area identifier.
|
|
2903
|
+
*
|
|
2904
|
+
* @param {AreaIdent} rowAreaIdent - The identifier of the row area.
|
|
2905
|
+
* @return {AreaModelIf} - The model of the specified row area.
|
|
2906
|
+
*/
|
|
2563
2907
|
getModel(e) {
|
|
2564
2908
|
return this.getAreaModel(e);
|
|
2565
2909
|
}
|
|
2910
|
+
/**
|
|
2911
|
+
* Calculates the height of the area identified by the given area identifier.
|
|
2912
|
+
*
|
|
2913
|
+
* @param {AreaIdent} areaIdent - The identifier of the area.
|
|
2914
|
+
* @return {number} - The height of the area.
|
|
2915
|
+
*/
|
|
2566
2916
|
getAreaHeight(e) {
|
|
2567
2917
|
const t = this.getModel(e), o = t.getRowCount();
|
|
2568
2918
|
if (this.defaultRowHeights[e])
|
|
@@ -2572,6 +2922,12 @@ class G {
|
|
|
2572
2922
|
s = s + t.getRowHeight(i);
|
|
2573
2923
|
return s;
|
|
2574
2924
|
}
|
|
2925
|
+
/**
|
|
2926
|
+
* Returns the total width of the side area identified by sideIdent.
|
|
2927
|
+
*
|
|
2928
|
+
* @param {SideIdent} sideIdent - The identifier of the side area ("west" | "center" | "east").
|
|
2929
|
+
* @return {number} - The total width in pixels of the side area.
|
|
2930
|
+
*/
|
|
2575
2931
|
getSideAreaWidth(e) {
|
|
2576
2932
|
const [t, o] = this.getSideStartAndEndColumnIndex(e);
|
|
2577
2933
|
let s = 0;
|
|
@@ -2579,21 +2935,50 @@ class G {
|
|
|
2579
2935
|
s = s + this.getColumnWidth(i);
|
|
2580
2936
|
return s;
|
|
2581
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* Retrieves the start and end column indices based on the given side identifier.
|
|
2940
|
+
*
|
|
2941
|
+
* @param {SideIdent} sideIdent - The side identifier, which can be "west", "east", or "center".
|
|
2942
|
+
* @return {[number, number]} - An array containing the start and end column indices.
|
|
2943
|
+
*/
|
|
2582
2944
|
getSideStartAndEndColumnIndex(e) {
|
|
2583
2945
|
const t = this.getFixedLeftColumnCount(), o = this.getFixedRightColumnCount();
|
|
2584
2946
|
let s = 0, i = this.columnCount - 1;
|
|
2585
2947
|
return e === "west" ? i = t - 1 : e === "east" ? s = this.columnCount - o : (s = t, i = this.columnCount - o - 1), [s, i];
|
|
2586
2948
|
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Returns the column definition at the specified index.
|
|
2951
|
+
*
|
|
2952
|
+
* @param {number} index - The index of the column definition to retrieve.
|
|
2953
|
+
* @returns {ColumnDefIf | undefined} - The column definition at the specified index, or undefined if no ColumnDef is specified for the given column
|
|
2954
|
+
*/
|
|
2587
2955
|
getColumnDef(e) {
|
|
2588
2956
|
if (e < this.columnDefs.length)
|
|
2589
2957
|
return this.columnDefs[e];
|
|
2590
2958
|
}
|
|
2959
|
+
/**
|
|
2960
|
+
* Retrieves the count of fixed left columns.
|
|
2961
|
+
*
|
|
2962
|
+
* @returns {number} The count of fixed left columns.
|
|
2963
|
+
*/
|
|
2591
2964
|
getFixedLeftColumnCount() {
|
|
2592
2965
|
return this.fixedLeftColumnCount;
|
|
2593
2966
|
}
|
|
2967
|
+
/**
|
|
2968
|
+
* Returns the number of fixed right columns.
|
|
2969
|
+
*
|
|
2970
|
+
* @returns {number} The number of fixed right columns.
|
|
2971
|
+
*/
|
|
2594
2972
|
getFixedRightColumnCount() {
|
|
2595
2973
|
return this.fixedRightColumnCount;
|
|
2596
2974
|
}
|
|
2975
|
+
/**
|
|
2976
|
+
* Retrieves the area model (header, body or footer) based on the area identification.
|
|
2977
|
+
*
|
|
2978
|
+
* @param {AreaIdent} area - The identifier of the area.
|
|
2979
|
+
* @return {AreaModelIf} The area model corresponding to the given area identification.
|
|
2980
|
+
* @throws {Error} If the area identification is invalid.
|
|
2981
|
+
*/
|
|
2597
2982
|
getAreaModel(e) {
|
|
2598
2983
|
if (e === "header")
|
|
2599
2984
|
return this.headerAreaModel;
|
|
@@ -2603,38 +2988,103 @@ class G {
|
|
|
2603
2988
|
return this.footerAreaModel;
|
|
2604
2989
|
throw new Error("Wrong ident.");
|
|
2605
2990
|
}
|
|
2991
|
+
/**
|
|
2992
|
+
* Returns the body area model.
|
|
2993
|
+
*
|
|
2994
|
+
* @returns {AreaModelIf} The body area model.
|
|
2995
|
+
*/
|
|
2606
2996
|
getBodyModel() {
|
|
2607
2997
|
return this.bodyAreaModel;
|
|
2608
2998
|
}
|
|
2999
|
+
/**
|
|
3000
|
+
* Checks if the footer is visible.
|
|
3001
|
+
*
|
|
3002
|
+
* @returns {boolean} True if the footer is visible, false otherwise.
|
|
3003
|
+
*/
|
|
2609
3004
|
isFooterVisibe() {
|
|
2610
3005
|
var e;
|
|
2611
3006
|
return (((e = this.footerAreaModel) == null ? void 0 : e.getRowCount()) ?? 0) > 0;
|
|
2612
3007
|
}
|
|
3008
|
+
/**
|
|
3009
|
+
* Checks if the header area is visible.
|
|
3010
|
+
* @return {boolean} Returns true if the header area is visible, otherwise false.
|
|
3011
|
+
*/
|
|
2613
3012
|
isHeaderVisibe() {
|
|
2614
3013
|
var e;
|
|
2615
3014
|
return (((e = this.headerAreaModel) == null ? void 0 : e.getRowCount()) ?? 0) > 0;
|
|
2616
3015
|
}
|
|
3016
|
+
/**
|
|
3017
|
+
* Checks whether the row checkbox is visible.
|
|
3018
|
+
*
|
|
3019
|
+
* @returns {boolean} True if the row checkbox is visible, otherwise false.
|
|
3020
|
+
*/
|
|
2617
3021
|
isRowCheckboxVisible() {
|
|
2618
3022
|
return this.rowCheckboxVisible;
|
|
2619
3023
|
}
|
|
3024
|
+
/**
|
|
3025
|
+
* This method is called when an external filter is changed.
|
|
3026
|
+
*
|
|
3027
|
+
* @param {FilterFunction<T>} predictFn - The function used to predict whether an element should be filtered or not.
|
|
3028
|
+
* @return {void}
|
|
3029
|
+
*/
|
|
2620
3030
|
externalFilterChanged(e) {
|
|
2621
3031
|
this.getAreaModel("body").externalFilterChanged(e);
|
|
2622
3032
|
}
|
|
3033
|
+
/**
|
|
3034
|
+
* Sorts the items using the given sortItems array.
|
|
3035
|
+
*
|
|
3036
|
+
* @param {SortItem[]} sortItems - An array of sort items to sort the items.
|
|
3037
|
+
* @return {boolean} - Returns true if the sorting is successful, otherwise false.
|
|
3038
|
+
*/
|
|
2623
3039
|
doSort(e) {
|
|
2624
3040
|
return this.getAreaModel("body").doSort(e);
|
|
2625
3041
|
}
|
|
3042
|
+
/**
|
|
3043
|
+
* Returns an array of ColumnDefIf objects or undefined.
|
|
3044
|
+
*
|
|
3045
|
+
* @return {ColumnDefIf[] | undefined} An array of ColumnDefIf objects or undefined.
|
|
3046
|
+
*/
|
|
2626
3047
|
getColumnDefs() {
|
|
2627
3048
|
return this.columnDefs;
|
|
2628
3049
|
}
|
|
3050
|
+
/**
|
|
3051
|
+
* Retrieves the property key of the table row business object associated with the specified column index.
|
|
3052
|
+
* It's only available when columnDefs are specified.
|
|
3053
|
+
*
|
|
3054
|
+
* @param {number} columnIndex - The index of the column to retrieve the property from.
|
|
3055
|
+
* @return {string} The property associated with the specified column index.
|
|
3056
|
+
*/
|
|
2629
3057
|
getColumnProperty(e) {
|
|
2630
|
-
return this.columnDefs[e].property;
|
|
3058
|
+
return this.columnDefs ? this.columnDefs[e].property : "";
|
|
2631
3059
|
}
|
|
3060
|
+
/**
|
|
3061
|
+
* Retrieves the row object from the body model at the specified index.
|
|
3062
|
+
*
|
|
3063
|
+
* @param {number} rowIndex - The index of the row to retrieve.
|
|
3064
|
+
*
|
|
3065
|
+
* @return {any} The row object at the specified index.
|
|
3066
|
+
*/
|
|
2632
3067
|
getBodyRowByIndex(e) {
|
|
2633
3068
|
return this.getBodyModel().getRowByIndex(e);
|
|
2634
3069
|
}
|
|
3070
|
+
/**
|
|
3071
|
+
* Checks if a column at the given index is sortable.
|
|
3072
|
+
*
|
|
3073
|
+
* @param {number} columnIndex - The index of the column to check.
|
|
3074
|
+
*
|
|
3075
|
+
* @returns {boolean} - `true` if the column is sortable, `false` otherwise.
|
|
3076
|
+
*/
|
|
2635
3077
|
isSortable(e) {
|
|
2636
3078
|
return this.columnDefs && e < this.columnDefs.length && this.columnDefs[e].sortable ? this.columnDefs[e].sortable() : !1;
|
|
2637
3079
|
}
|
|
3080
|
+
/**
|
|
3081
|
+
* Moves a column in the column order.
|
|
3082
|
+
*
|
|
3083
|
+
* @param {number} sourceColumnIndex - The index of the column to be moved.
|
|
3084
|
+
* @param {number} targetColumnIndex - The index where the column should be moved to.
|
|
3085
|
+
*
|
|
3086
|
+
* @returns {void}
|
|
3087
|
+
*/
|
|
2638
3088
|
changeColumnOrder(e, t) {
|
|
2639
3089
|
var o, s, i;
|
|
2640
3090
|
this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (s = this.bodyAreaModel) == null || s.changeColumnOrder(e, t), (i = this.footerAreaModel) == null || i.changeColumnOrder(e, t), this.calcXPositions();
|
|
@@ -2671,9 +3121,9 @@ class G {
|
|
|
2671
3121
|
this.xPositions[t + 1] = this.getColumnWidth(t) + this.xPositions[t];
|
|
2672
3122
|
}
|
|
2673
3123
|
}
|
|
2674
|
-
class
|
|
3124
|
+
class Ne extends q {
|
|
2675
3125
|
constructor(e, t, o, s = []) {
|
|
2676
|
-
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new
|
|
3126
|
+
super(e, s, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = s, this.sorterService = new ge(), this.filteredRows = [...t], this.properties = s.map((i) => i.property);
|
|
2677
3127
|
}
|
|
2678
3128
|
getRowCount() {
|
|
2679
3129
|
var e;
|
|
@@ -2724,7 +3174,7 @@ class Ge extends q {
|
|
|
2724
3174
|
return s && t.length ? this.getPropertyValue(s, t) : s;
|
|
2725
3175
|
}
|
|
2726
3176
|
}
|
|
2727
|
-
class
|
|
3177
|
+
class le extends Ne {
|
|
2728
3178
|
constructor(e, t, o, s) {
|
|
2729
3179
|
super(
|
|
2730
3180
|
e,
|
|
@@ -2754,7 +3204,7 @@ class L {
|
|
|
2754
3204
|
g > -1 && (e.defaultRowHeights.footer = g);
|
|
2755
3205
|
}
|
|
2756
3206
|
}
|
|
2757
|
-
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new H(g, g.toUpperCase(),
|
|
3207
|
+
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new H(g, g.toUpperCase(), oe)) : (s = e.rows) != null && s.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new H(g, g.toUpperCase(), oe)) : 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 : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.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 _(
|
|
2758
3208
|
"header",
|
|
2759
3209
|
e.headerData,
|
|
2760
3210
|
e.defaultRowHeights.header,
|
|
@@ -2773,14 +3223,14 @@ class L {
|
|
|
2773
3223
|
if (e.rows)
|
|
2774
3224
|
if ((u = e.rows) != null && u.length && O(e.rows[0])) {
|
|
2775
3225
|
const g = e.rows;
|
|
2776
|
-
e.bodyAreaModel = new
|
|
3226
|
+
e.bodyAreaModel = new se(
|
|
2777
3227
|
"body",
|
|
2778
3228
|
g,
|
|
2779
3229
|
e.defaultRowHeights.body,
|
|
2780
3230
|
e.columnDefs
|
|
2781
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new
|
|
3231
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new ie(g));
|
|
2782
3232
|
} else
|
|
2783
|
-
e.bodyAreaModel = new
|
|
3233
|
+
e.bodyAreaModel = new le(
|
|
2784
3234
|
"body",
|
|
2785
3235
|
e.rows,
|
|
2786
3236
|
e.columnDefs,
|
|
@@ -2820,13 +3270,13 @@ class L {
|
|
|
2820
3270
|
static buildByTypedRows(e, t, o = new z(), s = 0, i = 0) {
|
|
2821
3271
|
const r = o.defaultRowHeights, l = t[0].property === "CheckboxColumn";
|
|
2822
3272
|
if (e != null && e.length && O(e[0])) {
|
|
2823
|
-
const n = e, d = new
|
|
3273
|
+
const n = e, d = new se(
|
|
2824
3274
|
"body",
|
|
2825
3275
|
n,
|
|
2826
3276
|
r.body,
|
|
2827
3277
|
t
|
|
2828
3278
|
);
|
|
2829
|
-
return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new
|
|
3279
|
+
return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ie(n)), L.createByAreaModelsParam({
|
|
2830
3280
|
headerAreaModel: new _("header", [t.map((a) => a.headerLabel)], r.header),
|
|
2831
3281
|
bodyAreaModel: d,
|
|
2832
3282
|
footerAreaModel: new _("footer", [], r.footer),
|
|
@@ -2895,7 +3345,7 @@ class L {
|
|
|
2895
3345
|
static createByObjectArray(e, t = [], o = [], s = 0, i = 0, r = !1, l = new P(), n, d = []) {
|
|
2896
3346
|
let a;
|
|
2897
3347
|
t != null && t.length ? a = new _("header", t, l.header, n) : n != null && n.length ? a = new _("header", [n.map((m) => m.headerLabel)], l.header, n) : a = new D();
|
|
2898
|
-
const c = o ? new _("footer", o, l.footer, n) : new D(), u = new
|
|
3348
|
+
const c = o ? new _("footer", o, l.footer, n) : new D(), u = new le("body", e, n, l.body);
|
|
2899
3349
|
return new G(
|
|
2900
3350
|
a,
|
|
2901
3351
|
u,
|
|
@@ -2909,7 +3359,7 @@ class L {
|
|
|
2909
3359
|
);
|
|
2910
3360
|
}
|
|
2911
3361
|
}
|
|
2912
|
-
const
|
|
3362
|
+
const At = [
|
|
2913
3363
|
//"COPY_2_CLIPBOARD",
|
|
2914
3364
|
"START_EDITING",
|
|
2915
3365
|
"TOGGLE_SELECTION",
|
|
@@ -2927,17 +3377,17 @@ const Rt = [
|
|
|
2927
3377
|
// "PAGEUP_PRESSED",
|
|
2928
3378
|
// "PAGEDOWN_PRESSED"
|
|
2929
3379
|
];
|
|
2930
|
-
class
|
|
3380
|
+
class Et {
|
|
2931
3381
|
constructor(e, t) {
|
|
2932
3382
|
this.tableModel = e, this.tableOptions = t;
|
|
2933
3383
|
}
|
|
2934
3384
|
}
|
|
2935
|
-
class
|
|
3385
|
+
class ze {
|
|
2936
3386
|
constructor(e, t, o, s, i, r, l) {
|
|
2937
3387
|
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = s, this.sorting = i, this.startIndex = r, this.endIndex = l;
|
|
2938
3388
|
}
|
|
2939
3389
|
}
|
|
2940
|
-
class
|
|
3390
|
+
class Mt extends ze {
|
|
2941
3391
|
constructor(e, t, o, s, i, r, l, n) {
|
|
2942
3392
|
super(
|
|
2943
3393
|
e,
|
|
@@ -2950,30 +3400,30 @@ class Et extends Ne {
|
|
|
2950
3400
|
), this.rows = n;
|
|
2951
3401
|
}
|
|
2952
3402
|
}
|
|
2953
|
-
class
|
|
3403
|
+
class je {
|
|
2954
3404
|
constructor(e, t) {
|
|
2955
3405
|
this.value = e, this.label = t;
|
|
2956
3406
|
}
|
|
2957
3407
|
}
|
|
2958
|
-
class
|
|
3408
|
+
class kt {
|
|
2959
3409
|
constructor(e, t) {
|
|
2960
3410
|
this.index = e, this.px = t;
|
|
2961
3411
|
}
|
|
2962
3412
|
}
|
|
2963
|
-
const
|
|
3413
|
+
const It = { body: ["ge-table-text-align-left"] }, Tt = { body: ["ge-table-text-align-center"] }, _t = { body: ["ge-table-text-align-right"] }, Dt = {
|
|
2964
3414
|
header: ["ge-table-text-align-left"],
|
|
2965
3415
|
body: ["ge-table-text-align-left"],
|
|
2966
3416
|
footer: ["ge-table-text-align-left"]
|
|
2967
|
-
},
|
|
3417
|
+
}, $t = {
|
|
2968
3418
|
header: ["ge-table-text-align-center"],
|
|
2969
3419
|
body: ["ge-table-text-align-center"],
|
|
2970
3420
|
footer: ["ge-table-text-align-center"]
|
|
2971
|
-
},
|
|
3421
|
+
}, Ft = {
|
|
2972
3422
|
header: ["ge-table-text-align-right"],
|
|
2973
3423
|
body: ["ge-table-text-align-right"],
|
|
2974
3424
|
footer: ["ge-table-text-align-right"]
|
|
2975
3425
|
};
|
|
2976
|
-
class
|
|
3426
|
+
class ne {
|
|
2977
3427
|
render(e, t, o, s, i, r, l) {
|
|
2978
3428
|
if (i.isRowCheckable(t)) {
|
|
2979
3429
|
l.addClass(e, "ge-table-row-checkbox-div");
|
|
@@ -2991,35 +3441,41 @@ class le {
|
|
|
2991
3441
|
}
|
|
2992
3442
|
}
|
|
2993
3443
|
}
|
|
2994
|
-
class
|
|
3444
|
+
class Lt {
|
|
2995
3445
|
constructor() {
|
|
2996
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new f(50, "px"), this.minWidth = new f(50, "px"), this.maxWidth = new f(100, "px"), this.rendererMap = new
|
|
3446
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new f(50, "px"), this.minWidth = new f(50, "px"), this.maxWidth = new f(100, "px"), this.rendererMap = new T(new ne(), new ne(), void 0), this.classes = new T(
|
|
2997
3447
|
[],
|
|
2998
3448
|
["ge-table-text-align-left"],
|
|
2999
3449
|
[]
|
|
3000
3450
|
);
|
|
3001
3451
|
}
|
|
3002
3452
|
}
|
|
3003
|
-
class
|
|
3453
|
+
class Ot {
|
|
3454
|
+
/**
|
|
3455
|
+
* A factory that creates a new AreaObjectMap with the given body renderer.
|
|
3456
|
+
*
|
|
3457
|
+
* @param {CellRendererIf} bodyRenderer - The renderer for the body of the map.
|
|
3458
|
+
* @returns {AreaObjectMap<CellRendererIf>} The newly created AreaObjectMap.
|
|
3459
|
+
*/
|
|
3004
3460
|
static body(e) {
|
|
3005
|
-
return new
|
|
3461
|
+
return new T(
|
|
3006
3462
|
void 0,
|
|
3007
3463
|
e,
|
|
3008
3464
|
void 0
|
|
3009
3465
|
);
|
|
3010
3466
|
}
|
|
3011
3467
|
}
|
|
3012
|
-
class
|
|
3468
|
+
class Pt {
|
|
3013
3469
|
constructor(e = "down", t) {
|
|
3014
3470
|
this.status = e, this.originalEvent = t;
|
|
3015
3471
|
}
|
|
3016
3472
|
}
|
|
3017
|
-
class
|
|
3473
|
+
class Ht {
|
|
3018
3474
|
constructor(e, t, o, s, i = {}) {
|
|
3019
3475
|
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = s, this.cssClasses = i;
|
|
3020
3476
|
}
|
|
3021
3477
|
}
|
|
3022
|
-
class
|
|
3478
|
+
class Vt {
|
|
3023
3479
|
constructor() {
|
|
3024
3480
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, o) => {
|
|
3025
3481
|
if (e && t && o.getRowId) {
|
|
@@ -3044,12 +3500,12 @@ class Ht {
|
|
|
3044
3500
|
};
|
|
3045
3501
|
}
|
|
3046
3502
|
}
|
|
3047
|
-
class
|
|
3503
|
+
class Xe {
|
|
3048
3504
|
constructor(e, t, o, s = !1, i = "normal", r = void 0) {
|
|
3049
3505
|
this.data = e, this.property = t, this.toggle = o, this.closed = s, this.visibility = i, this.children = r, this.impl = "CellGroup";
|
|
3050
3506
|
}
|
|
3051
3507
|
}
|
|
3052
|
-
class
|
|
3508
|
+
class Ye extends Xe {
|
|
3053
3509
|
constructor(e, t = 0, o = 0, s) {
|
|
3054
3510
|
super(
|
|
3055
3511
|
e.data,
|
|
@@ -3139,7 +3595,7 @@ class Xe extends je {
|
|
|
3139
3595
|
l.log(e);
|
|
3140
3596
|
}
|
|
3141
3597
|
}
|
|
3142
|
-
class
|
|
3598
|
+
class I {
|
|
3143
3599
|
static buildColumnDefs(e, t = []) {
|
|
3144
3600
|
for (const o of e)
|
|
3145
3601
|
o.property && t.push(
|
|
@@ -3148,7 +3604,7 @@ class k {
|
|
|
3148
3604
|
headerLabel: o.data ? o.data : o.property,
|
|
3149
3605
|
isVisible: () => typeof o.isVisible == "function" ? o.isVisible() : !0
|
|
3150
3606
|
})
|
|
3151
|
-
), o.children &&
|
|
3607
|
+
), o.children && I.buildColumnDefs(o.children, t);
|
|
3152
3608
|
return t;
|
|
3153
3609
|
}
|
|
3154
3610
|
/*
|
|
@@ -3172,14 +3628,14 @@ class k {
|
|
|
3172
3628
|
static buildGroupExts(e, t = [], o = 0, s) {
|
|
3173
3629
|
let i;
|
|
3174
3630
|
for (let r = 0; r < e.length; r++) {
|
|
3175
|
-
const l = e[r], n = new
|
|
3176
|
-
i && (n.leftNeighbour = i, i.rightNeighbour = n), t.push(n), l.children && (n.children =
|
|
3631
|
+
const l = e[r], n = new Ye(l, o, r, s);
|
|
3632
|
+
i && (n.leftNeighbour = i, i.rightNeighbour = n), t.push(n), l.children && (n.children = I.buildGroupExts(l.children, [], o + 1, n)), i = n;
|
|
3177
3633
|
}
|
|
3178
3634
|
return t;
|
|
3179
3635
|
}
|
|
3180
3636
|
static flattenGroupExts(e, t = []) {
|
|
3181
3637
|
for (const o of e)
|
|
3182
|
-
t.push(o), o.children &&
|
|
3638
|
+
t.push(o), o.children && I.flattenGroupExts(o.children, t);
|
|
3183
3639
|
return t;
|
|
3184
3640
|
}
|
|
3185
3641
|
/*
|
|
@@ -3211,10 +3667,10 @@ class k {
|
|
|
3211
3667
|
static iterateThrowColumns(e = [], t) {
|
|
3212
3668
|
var o;
|
|
3213
3669
|
for (const s of t)
|
|
3214
|
-
e.push(s.data + " rowIndex:" + s.rowIndex), (o = s.children) != null && o.length &&
|
|
3670
|
+
e.push(s.data + " rowIndex:" + s.rowIndex), (o = s.children) != null && o.length && I.iterateThrowColumns(e, s.children);
|
|
3215
3671
|
}
|
|
3216
3672
|
}
|
|
3217
|
-
class
|
|
3673
|
+
class Bt {
|
|
3218
3674
|
constructor() {
|
|
3219
3675
|
this.areaIdent = "body", this.rowSelectionModel = void 0;
|
|
3220
3676
|
}
|
|
@@ -3281,22 +3737,22 @@ class Vt {
|
|
|
3281
3737
|
return !1;
|
|
3282
3738
|
}
|
|
3283
3739
|
}
|
|
3284
|
-
class
|
|
3740
|
+
class Ke {
|
|
3285
3741
|
render(e, t, o, s, i, r, l) {
|
|
3286
3742
|
const n = r != null && r.data ? r.data : "";
|
|
3287
3743
|
e.innerHTML = `${n}`;
|
|
3288
3744
|
}
|
|
3289
3745
|
}
|
|
3290
|
-
class
|
|
3746
|
+
class Wt {
|
|
3291
3747
|
constructor(e = "header", t, o = [], s) {
|
|
3292
3748
|
var i;
|
|
3293
|
-
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.gammaCells = !0, this.groupExts = [], this.cellGroupExtCellRenderer = new
|
|
3749
|
+
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = s, this.gammaCells = !0, this.groupExts = [], this.cellGroupExtCellRenderer = new Ke(), this.groupExts = I.buildGroupExts(t), console.info(this.groupExts), console.info(this.getAllLeafs()), console.info(this.getMaxRowCount());
|
|
3294
3750
|
for (const r of this.groupExts)
|
|
3295
3751
|
r.log(this.getMaxRowCount());
|
|
3296
|
-
this.arr = this.buildArray(), !((i = this.columnDefs) != null && i.length) && e === "header" && (this.columnDefs =
|
|
3752
|
+
this.arr = this.buildArray(), !((i = this.columnDefs) != null && i.length) && e === "header" && (this.columnDefs = I.buildColumnDefs(t)), console.info("this.columnDefs", this.columnDefs), console.info("this.arr", this.arr);
|
|
3297
3753
|
}
|
|
3298
3754
|
getAllLeafs() {
|
|
3299
|
-
return
|
|
3755
|
+
return I.flattenGroupExts(this.groupExts).filter((t) => !t.children);
|
|
3300
3756
|
}
|
|
3301
3757
|
getMaxRowCount() {
|
|
3302
3758
|
const e = this.getAllLeafs();
|
|
@@ -3304,13 +3760,13 @@ class Bt {
|
|
|
3304
3760
|
}
|
|
3305
3761
|
buildArray() {
|
|
3306
3762
|
console.info("");
|
|
3307
|
-
let e =
|
|
3763
|
+
let e = I.flattenGroupExts(this.groupExts);
|
|
3308
3764
|
const t = e.length, o = 1 + Math.max(...e.map((l) => l.rowIndex));
|
|
3309
3765
|
console.info("max row/col:", o + "/" + t);
|
|
3310
3766
|
const s = [];
|
|
3311
|
-
|
|
3767
|
+
I.iterateThrowColumns(s, this.groupExts), console.info(s);
|
|
3312
3768
|
const i = Array.from(Array(o).keys()).map((l) => []);
|
|
3313
|
-
let r =
|
|
3769
|
+
let r = I.buildArrayOfArrays(e, i);
|
|
3314
3770
|
return console.table(r), r;
|
|
3315
3771
|
}
|
|
3316
3772
|
changeColumnOrder(e, t) {
|
|
@@ -3385,7 +3841,7 @@ class Bt {
|
|
|
3385
3841
|
return !1;
|
|
3386
3842
|
}
|
|
3387
3843
|
}
|
|
3388
|
-
class
|
|
3844
|
+
class Gt {
|
|
3389
3845
|
filterPredict(e, t, o = this.objectToString.bind(this)) {
|
|
3390
3846
|
if (!e)
|
|
3391
3847
|
return !1;
|
|
@@ -3439,12 +3895,12 @@ class Wt {
|
|
|
3439
3895
|
return t.join(" ").toLowerCase();
|
|
3440
3896
|
}
|
|
3441
3897
|
}
|
|
3442
|
-
class
|
|
3898
|
+
class Nt {
|
|
3443
3899
|
static bodyRenderer(e) {
|
|
3444
|
-
return new
|
|
3900
|
+
return new T(void 0, e, void 0);
|
|
3445
3901
|
}
|
|
3446
3902
|
}
|
|
3447
|
-
class
|
|
3903
|
+
class zt {
|
|
3448
3904
|
constructor(e, t = !0, o = !1) {
|
|
3449
3905
|
this.property = e, this.skipCheckableCheck = t, this.readonly = o;
|
|
3450
3906
|
}
|
|
@@ -3469,12 +3925,12 @@ class Nt {
|
|
|
3469
3925
|
}
|
|
3470
3926
|
}
|
|
3471
3927
|
}
|
|
3472
|
-
class
|
|
3928
|
+
class jt {
|
|
3473
3929
|
render(e, t, o, s, i, r, l) {
|
|
3474
3930
|
r && (e.innerText = new Date(r).toISOString());
|
|
3475
3931
|
}
|
|
3476
3932
|
}
|
|
3477
|
-
class
|
|
3933
|
+
class Xt {
|
|
3478
3934
|
constructor() {
|
|
3479
3935
|
this.formatter = new Intl.DateTimeFormat("de-DE", {
|
|
3480
3936
|
year: "numeric",
|
|
@@ -3497,27 +3953,27 @@ class jt {
|
|
|
3497
3953
|
}
|
|
3498
3954
|
}
|
|
3499
3955
|
}
|
|
3500
|
-
class
|
|
3956
|
+
class Yt {
|
|
3501
3957
|
render(e, t, o, s, i, r, l) {
|
|
3502
3958
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
3503
3959
|
}
|
|
3504
3960
|
}
|
|
3505
|
-
class
|
|
3961
|
+
class Kt {
|
|
3506
3962
|
render(e, t, o, s, i, r, l) {
|
|
3507
3963
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
3508
3964
|
}
|
|
3509
3965
|
}
|
|
3510
|
-
class
|
|
3966
|
+
class Ut {
|
|
3511
3967
|
render(e, t, o, s, i, r, l) {
|
|
3512
3968
|
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 = "";
|
|
3513
3969
|
}
|
|
3514
3970
|
}
|
|
3515
|
-
class
|
|
3971
|
+
class qt {
|
|
3516
3972
|
render(e, t, o, s, i, r, l) {
|
|
3517
3973
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
3518
3974
|
}
|
|
3519
3975
|
}
|
|
3520
|
-
class
|
|
3976
|
+
class Jt {
|
|
3521
3977
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
3522
3978
|
this.min = e, this.max = t;
|
|
3523
3979
|
}
|
|
@@ -3525,7 +3981,7 @@ class qt {
|
|
|
3525
3981
|
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
|
|
3526
3982
|
}
|
|
3527
3983
|
}
|
|
3528
|
-
class
|
|
3984
|
+
class Qt {
|
|
3529
3985
|
constructor(e) {
|
|
3530
3986
|
this.property = e;
|
|
3531
3987
|
}
|
|
@@ -3544,7 +4000,7 @@ class Jt {
|
|
|
3544
4000
|
}
|
|
3545
4001
|
}
|
|
3546
4002
|
}
|
|
3547
|
-
class
|
|
4003
|
+
class Zt {
|
|
3548
4004
|
constructor(e, t = 100, o = !1) {
|
|
3549
4005
|
this.property = e, this.maxValue = t, this.labelVisible = o;
|
|
3550
4006
|
}
|
|
@@ -3576,16 +4032,16 @@ class Qt {
|
|
|
3576
4032
|
}
|
|
3577
4033
|
}
|
|
3578
4034
|
}
|
|
3579
|
-
const
|
|
4035
|
+
const eo = function(h, e, t) {
|
|
3580
4036
|
return h ? Number(h) : "";
|
|
3581
4037
|
};
|
|
3582
|
-
class
|
|
4038
|
+
class be {
|
|
3583
4039
|
constructor(e) {
|
|
3584
4040
|
this.options = e;
|
|
3585
4041
|
}
|
|
3586
4042
|
static create(e) {
|
|
3587
|
-
return new
|
|
3588
|
-
e.map((t) => new
|
|
4043
|
+
return new be(
|
|
4044
|
+
e.map((t) => new je(t, t))
|
|
3589
4045
|
);
|
|
3590
4046
|
}
|
|
3591
4047
|
render(e, t, o, s, i, r, l) {
|
|
@@ -3613,12 +4069,12 @@ class ge {
|
|
|
3613
4069
|
}
|
|
3614
4070
|
}
|
|
3615
4071
|
}
|
|
3616
|
-
class
|
|
4072
|
+
class to {
|
|
3617
4073
|
constructor(e, t, o) {
|
|
3618
4074
|
this.r = e, this.g = t, this.b = o;
|
|
3619
4075
|
}
|
|
3620
4076
|
}
|
|
3621
|
-
class
|
|
4077
|
+
class ae {
|
|
3622
4078
|
constructor(e, t, o, s) {
|
|
3623
4079
|
this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor = s;
|
|
3624
4080
|
}
|
|
@@ -3632,143 +4088,143 @@ class B {
|
|
|
3632
4088
|
return `rgb(${Math.round(l)}, ${Math.round(n)}, ${Math.round(d)})`;
|
|
3633
4089
|
}
|
|
3634
4090
|
static getThreeColorGradientRGB(e, t) {
|
|
3635
|
-
return e < t.middleValue ? B.getTwoColorGradientRGB(e, new
|
|
4091
|
+
return e < t.middleValue ? B.getTwoColorGradientRGB(e, new ae(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? B.getTwoColorGradientRGB(e, new ae(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
|
|
3636
4092
|
}
|
|
3637
4093
|
}
|
|
3638
|
-
class
|
|
4094
|
+
class oo {
|
|
3639
4095
|
constructor(e, t, o, s, i, r) {
|
|
3640
4096
|
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = s, this.maxValue = i, this.maxColor = r;
|
|
3641
4097
|
}
|
|
3642
4098
|
}
|
|
3643
4099
|
export {
|
|
3644
4100
|
q as AbstractAreaModel,
|
|
3645
|
-
|
|
3646
|
-
|
|
4101
|
+
Ot as AreaMapFactory,
|
|
4102
|
+
Bt as AreaModel,
|
|
3647
4103
|
_ as AreaModelArrayOfArrays,
|
|
3648
|
-
|
|
4104
|
+
Wt as AreaModelCellGroups,
|
|
3649
4105
|
D as AreaModelHidden,
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
4106
|
+
le as AreaModelObjectArrayWithColumndefs,
|
|
4107
|
+
Ne as AreaModelObjectyArray,
|
|
4108
|
+
se as AreaModelTree,
|
|
4109
|
+
T as AreaObjectMap,
|
|
4110
|
+
Vt as AutoRestoreOptions,
|
|
4111
|
+
Xe as CellGroup,
|
|
4112
|
+
Ye as CellGroupExt,
|
|
4113
|
+
Ke as CellGroupExtCellRenderer,
|
|
4114
|
+
M as CellRange,
|
|
4115
|
+
I as CellgroupFactory,
|
|
4116
|
+
zt as CheckboxBooleanPropertyCellRenderer,
|
|
4117
|
+
ne as CheckboxCellRenderer,
|
|
4118
|
+
Lt as CheckboxColumnDef,
|
|
4119
|
+
Ge as CheckboxModel,
|
|
4120
|
+
Mt as ChunkData,
|
|
4121
|
+
Ae as ColAndRowspanModel,
|
|
4122
|
+
ye as CollapsedExpandedData,
|
|
4123
|
+
to as ColorRgb,
|
|
3668
4124
|
H as ColumnDef,
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
4125
|
+
fe as ConvenienceDomService,
|
|
4126
|
+
ue as CssVars,
|
|
4127
|
+
Xt as DateToIntlDDMMYYYYCellRenderer,
|
|
4128
|
+
jt as DateToIsoCellRenderer,
|
|
4129
|
+
Yt as DateToLocaleDateCellRenderer,
|
|
4130
|
+
qt as DateToTecCellRenderer,
|
|
3675
4131
|
P as DefaultRowHeights,
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
4132
|
+
Re as EleScope,
|
|
4133
|
+
Z as EventAdapter,
|
|
4134
|
+
te as FalseFn,
|
|
4135
|
+
Pe as FocusModel,
|
|
4136
|
+
Ie as GeCellIndices,
|
|
3681
4137
|
B as GeCssColorUtil,
|
|
3682
|
-
|
|
3683
|
-
|
|
4138
|
+
Gt as GeFilterService,
|
|
4139
|
+
Pt as GeKeyEvent,
|
|
3684
4140
|
U as GeModelChangeEvent,
|
|
3685
4141
|
X as GeMouseEvent,
|
|
3686
4142
|
$ as GeoData,
|
|
3687
4143
|
F as Icon,
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
4144
|
+
kt as IndexAndPx,
|
|
4145
|
+
Le as InputCellRenderer,
|
|
4146
|
+
ke as InputHandler,
|
|
4147
|
+
Kt as MaleFemaleToIconCellRenderer,
|
|
4148
|
+
we as MouseHandler,
|
|
4149
|
+
me as MouseTargetData,
|
|
4150
|
+
Jt as NumberCellRenderer,
|
|
4151
|
+
De as OsxShortcutActionIdMapping,
|
|
4152
|
+
re as Padding,
|
|
4153
|
+
Zt as ProgressBarCellRenderer,
|
|
4154
|
+
Ee as RenderScope,
|
|
4155
|
+
Nt as Renderer,
|
|
4156
|
+
ze as RequestChunk,
|
|
4157
|
+
be as SelectCellRenderer,
|
|
4158
|
+
Oe as SelectionModel,
|
|
4159
|
+
Te as SelectionService,
|
|
4160
|
+
$e as ShortcutService,
|
|
4161
|
+
Fe as SimpleDomService,
|
|
3706
4162
|
f as Size,
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
4163
|
+
Me as SortItem,
|
|
4164
|
+
he as SortedOptions,
|
|
4165
|
+
Qt as StarRatingCellRenderer,
|
|
4166
|
+
Ce as StoreStateCollapsedExpandService,
|
|
4167
|
+
xe as StoreStateScrollPosService,
|
|
4168
|
+
ve as StoreStateSortingService,
|
|
4169
|
+
Se as TableApi,
|
|
4170
|
+
Ht as TableCellUpdateEvent,
|
|
3715
4171
|
L as TableFactory,
|
|
3716
4172
|
G as TableModel,
|
|
3717
|
-
|
|
4173
|
+
Et as TableModelAndOptions,
|
|
3718
4174
|
z as TableOptions,
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
4175
|
+
ce as TableScope,
|
|
4176
|
+
oo as ThreeColorGradientArg,
|
|
4177
|
+
ie as TreeCheckboxModel,
|
|
3722
4178
|
j as TreeFactory,
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
4179
|
+
de as TreeOptions,
|
|
4180
|
+
ee as TreeRow,
|
|
4181
|
+
We as TreeRowService,
|
|
4182
|
+
Ut as TrueFalseCellRenderer,
|
|
4183
|
+
Be as TrueFn,
|
|
4184
|
+
ae as TwoColorGradientArg,
|
|
4185
|
+
je as ValueLabel,
|
|
4186
|
+
_e as WindowsShortcutActionIdMapping,
|
|
4187
|
+
At as actionIds,
|
|
4188
|
+
$t as allCenter,
|
|
4189
|
+
Dt as allLeft,
|
|
4190
|
+
Ft as allRight,
|
|
4191
|
+
Tt as bodyCenter,
|
|
4192
|
+
It as bodyLeft,
|
|
4193
|
+
_t as bodyRight,
|
|
4194
|
+
eo as editInputPipeForNumber,
|
|
3739
4195
|
Y as getAreaIdentByString,
|
|
3740
4196
|
N as isAreaModelTree,
|
|
3741
|
-
|
|
4197
|
+
pe as isCheckboxColumnDef,
|
|
3742
4198
|
O as isTreeRow,
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
4199
|
+
Rt as px0,
|
|
4200
|
+
vt as px10,
|
|
4201
|
+
bt as px100,
|
|
4202
|
+
gt as px110,
|
|
4203
|
+
ut as px120,
|
|
4204
|
+
ct as px130,
|
|
4205
|
+
ht as px140,
|
|
4206
|
+
dt as px150,
|
|
4207
|
+
at as px160,
|
|
4208
|
+
nt as px170,
|
|
4209
|
+
lt as px180,
|
|
4210
|
+
rt as px190,
|
|
4211
|
+
Ct as px20,
|
|
4212
|
+
oe as px200,
|
|
4213
|
+
it as px210,
|
|
4214
|
+
st as px220,
|
|
4215
|
+
ot as px230,
|
|
4216
|
+
tt as px240,
|
|
4217
|
+
et as px250,
|
|
4218
|
+
Ze as px260,
|
|
4219
|
+
Qe as px270,
|
|
4220
|
+
Je as px280,
|
|
4221
|
+
qe as px290,
|
|
4222
|
+
yt as px30,
|
|
4223
|
+
Ue as px300,
|
|
4224
|
+
xt as px40,
|
|
4225
|
+
St as px50,
|
|
4226
|
+
wt as px60,
|
|
4227
|
+
mt as px70,
|
|
4228
|
+
ft as px80,
|
|
4229
|
+
pt as px90
|
|
3774
4230
|
};
|