@guiexpert/table 1.1.83 → 1.1.85
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/LICENSE +21 -0
- package/README.md +7 -1
- package/css/main.css +6 -6
- package/css/table-color-vars.css +6 -6
- package/index.cjs +28 -28
- package/index.d.ts +61 -61
- package/index.js +835 -679
- package/lib/common/generator/column-def-generator-service.d.ts +1 -0
- package/lib/common/generator/domain/value-info.d.ts +1 -0
- package/lib/common/generator/property-type.service.d.ts +1 -0
- package/lib/common/generator/scheme-generator-service.d.ts +1 -0
- package/lib/table/action/on-action-triggered.if.d.ts +2 -1
- package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +2 -1
- package/lib/table/action/shortcut-actionid-mapping.type.d.ts +2 -1
- package/lib/table/action/shortcut.service.d.ts +4 -3
- package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +2 -1
- package/lib/table/checkbox/checkbox-model.d.ts +3 -2
- package/lib/table/checkbox/checkbox-model.if.d.ts +2 -1
- package/lib/table/checkbox/tree-checkbox-model.d.ts +4 -3
- package/lib/table/color/color-rgb.d.ts +2 -1
- package/lib/table/color/ge-css-color-util.d.ts +3 -2
- package/lib/table/color/three-color-gradient-arg.d.ts +3 -2
- package/lib/table/color/three-color-gradient-arg.if.d.ts +2 -1
- package/lib/table/color/two-color-gradient-arg.d.ts +3 -2
- package/lib/table/color/two-color-gradient-arg.if.d.ts +2 -1
- package/lib/table/crud/column-widths.d.ts +1 -0
- package/lib/table/crud/crud-options.d.ts +1 -0
- package/lib/table/crud/crud-options.if.d.ts +1 -0
- package/lib/table/crud/crud-table-model-factory.d.ts +1 -0
- package/lib/table/crud/url-info.d.ts +1 -0
- package/lib/table/crud/urls.if.d.ts +1 -0
- package/lib/table/data/chunk/chunk.data-event.d.ts +3 -2
- package/lib/table/data/chunk/chunk.data-event.if.d.ts +2 -1
- package/lib/table/data/chunk/request-chunk.d.ts +2 -1
- package/lib/table/data/common/area-map-factory.d.ts +3 -2
- package/lib/table/data/common/area-map.d.ts +2 -1
- package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +5 -4
- package/lib/table/data/common/args-render-cell-div.d.ts +4 -3
- package/lib/table/data/common/checkbox-column-def.d.ts +5 -4
- package/lib/table/data/common/event/ge-model-change-event.d.ts +2 -1
- package/lib/table/data/common/event/ge-mouse-event.d.ts +3 -2
- package/lib/table/data/common/event/input/table-cell-update-event.d.ts +3 -2
- package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +2 -1
- package/lib/table/data/common/size.d.ts +2 -1
- package/lib/table/data/common/size.if.d.ts +1 -0
- package/lib/table/data/common/sizes.d.ts +2 -1
- package/lib/table/data/common/sort-item.d.ts +2 -1
- package/lib/table/data/common/tree-row.d.ts +2 -1
- package/lib/table/data/common/value-label.d.ts +2 -1
- package/lib/table/data/event/mouse-target-data.d.ts +4 -3
- package/lib/table/data/options/auto-restore-options.d.ts +2 -1
- package/lib/table/data/options/default-row-heights.d.ts +2 -1
- package/lib/table/data/options/header-group-options.d.ts +2 -1
- package/lib/table/data/options/header-group-options.if.d.ts +2 -1
- package/lib/table/data/options/icon.d.ts +2 -1
- package/lib/table/data/options/sorted-options.d.ts +3 -2
- package/lib/table/data/options/sorted-options.if.d.ts +2 -1
- package/lib/table/data/options/table-options.d.ts +12 -11
- package/lib/table/data/options/table-options.if.d.ts +12 -11
- package/lib/table/data/options/tree-options.d.ts +3 -2
- package/lib/table/data/options/tree-options.if.d.ts +2 -1
- package/lib/table/data/table-model-and-options.d.ts +4 -3
- package/lib/table/data/table-model-and-options.if.d.ts +3 -2
- package/lib/table/data/tablemodel/areamodel/abstract-area-model.d.ts +10 -9
- package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +12 -4
- package/lib/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +1 -0
- package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +8 -7
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +4 -3
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +8 -0
- package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +16 -8
- package/lib/table/data/tablemodel/areamodel/area-model.d.ts +21 -11
- package/lib/table/data/tablemodel/areamodel/area-model.if.d.ts +23 -6
- package/lib/table/data/tablemodel/areamodel/async-area-model-object-array.d.ts +6 -5
- package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +4 -3
- package/lib/table/data/tablemodel/areamodel/cover-grid-body-model.d.ts +1 -0
- package/lib/table/data/tablemodel/cellgroup/cell-group-ext.d.ts +3 -2
- package/lib/table/data/tablemodel/cellgroup/cell-group.d.ts +2 -1
- package/lib/table/data/tablemodel/cellgroup/cellgroup-factory.d.ts +4 -3
- package/lib/table/data/tablemodel/column/column-def.d.ts +10 -9
- package/lib/table/data/tablemodel/column/column-def.if.d.ts +8 -7
- package/lib/table/data/tablemodel/cover-grid-table-model.d.ts +1 -0
- package/lib/table/data/tablemodel/table-model.d.ts +12 -11
- package/lib/table/data/tablemodel/table-model.if.d.ts +8 -7
- package/lib/table/ele-scope.d.ts +13 -5
- package/lib/table/event-adapter.d.ts +5 -4
- package/lib/table/event-checkbox-changed-handler.d.ts +1 -0
- package/lib/table/event-listener.if.d.ts +4 -3
- package/lib/table/factory/cover-grid-factory.d.ts +3 -0
- package/lib/table/factory/table-factory.d.ts +9 -8
- package/lib/table/factory/tree-factory.d.ts +2 -1
- package/lib/table/focus/event-focus-changed-listener.if.d.ts +1 -0
- package/lib/table/focus/focus-model.d.ts +3 -2
- package/lib/table/focus/focus-model.if.d.ts +1 -0
- package/lib/table/input-handler.d.ts +2 -1
- package/lib/table/mouse-handler.d.ts +3 -2
- package/lib/table/render-scope.d.ts +37 -0
- package/lib/table/renderer/action/action-event-listener.if.d.ts +1 -0
- package/lib/table/renderer/action/action-event.d.ts +1 -0
- package/lib/table/renderer/action/action-event.if.d.ts +1 -0
- package/lib/table/renderer/action/actions-cell-renderer.d.ts +1 -0
- package/lib/table/renderer/cell-group-ext-cell-renderer.d.ts +1 -0
- package/lib/table/renderer/cell-render.if.d.ts +5 -4
- package/lib/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/checkbox-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/date-to-int-date-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/date-to-iso-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/date-to-locale-date-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/date-to-tec-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/edit/edit-cell-renderer.type.d.ts +2 -1
- package/lib/table/renderer/edit/edit-input-pipe-for-number.d.ts +2 -1
- package/lib/table/renderer/edit/input-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/edit/select-cell-renderer.d.ts +7 -6
- package/lib/table/renderer/male-female-to-icon-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/number-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/positive-and-negative-number-renderer.d.ts +6 -5
- package/lib/table/renderer/progress-bar-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/renderer.d.ts +3 -2
- package/lib/table/renderer/simple-array-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/star-rating-cell-renderer.d.ts +6 -5
- package/lib/table/renderer/true-false-cell-renderer.d.ts +6 -5
- package/lib/table/resize-handler.d.ts +2 -1
- package/lib/table/selection/event-selection-changed-listener.if.d.ts +1 -0
- package/lib/table/selection/multi-rows-selection-model.d.ts +1 -0
- package/lib/table/selection/selection-model.d.ts +3 -2
- package/lib/table/selection/selection-model.if.d.ts +2 -1
- package/lib/table/selection/selection-service.d.ts +8 -7
- package/lib/table/service/abstract-store-state.service.d.ts +2 -1
- package/lib/table/service/convenience-dom.service.d.ts +13 -12
- package/lib/table/service/copy-service.d.ts +1 -0
- package/lib/table/service/copy-service.if.d.ts +1 -0
- package/lib/table/service/excel-service.d.ts +1 -0
- package/lib/table/service/simple-dom-service.d.ts +2 -1
- package/lib/table/service/store-state-collapsed-expand.service.d.ts +4 -3
- package/lib/table/service/store-state-scroll-pos.service.d.ts +3 -2
- package/lib/table/service/store-state-sorting.service.d.ts +4 -3
- package/lib/table/service/tree-row.service.d.ts +2 -1
- package/lib/table/table-api.d.ts +4 -3
- package/lib/table/table-scope.d.ts +1 -0
- package/package.json +14 -3
|
@@ -10,6 +10,7 @@ import { CheckedType } from '../../common/checked-type';
|
|
|
10
10
|
import { CellGroupExt } from '../cellgroup/cell-group-ext';
|
|
11
11
|
import { MouseTargetData } from '../../event/mouse-target-data';
|
|
12
12
|
import { HeaderGroupOptionsIf } from '../../options/header-group-options.if';
|
|
13
|
+
|
|
13
14
|
export declare class AreaModelCellGroups implements AreaModelIf {
|
|
14
15
|
readonly areaIdent: AreaIdent;
|
|
15
16
|
readonly groups: CellGroupIf[];
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AreaModelIf } from
|
|
2
|
-
import { CellRendererIf } from
|
|
3
|
-
import { CheckedType } from
|
|
4
|
-
import { CheckboxModelIf } from
|
|
5
|
-
import { FilterFunction } from
|
|
6
|
-
import { SortItem } from
|
|
7
|
-
import { AreaIdent } from
|
|
1
|
+
import { AreaModelIf } from './area-model.if';
|
|
2
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
3
|
+
import { CheckedType } from '../../common/checked-type';
|
|
4
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if';
|
|
5
|
+
import { FilterFunction } from '../../common/filter-function';
|
|
6
|
+
import { SortItem } from '../../common/sort-item';
|
|
7
|
+
import { AreaIdent } from '../area-ident.type';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* An invisible model, which is used internally for hiding a header.
|
|
10
11
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AreaModelObjectArray } from
|
|
2
|
-
import { ColumnDefIf } from
|
|
3
|
-
import { AreaIdent } from
|
|
1
|
+
import { AreaModelObjectArray } from './area-model-object-array';
|
|
2
|
+
import { ColumnDefIf } from '../column/column-def.if';
|
|
3
|
+
import { AreaIdent } from '../area-ident.type';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Represents an area model defined by an object array with column definitions.
|
|
6
7
|
*
|
|
@@ -5,6 +5,7 @@ import { FilterFunction } from '../../common/filter-function';
|
|
|
5
5
|
import { SorterService } from '../../../service/sorter.service';
|
|
6
6
|
import { SortItem } from '../../common/sort-item';
|
|
7
7
|
import { ObjectArrayHolderIf } from './object-array-holder.if';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* @class AreaModelObjectArray
|
|
10
11
|
* @description
|
|
@@ -380,6 +381,13 @@ export declare class AreaModelObjectArray<T> extends AbstractAreaModel<T> implem
|
|
|
380
381
|
* console.log(`The first row has a height of ${rowHeight}px`);
|
|
381
382
|
*/
|
|
382
383
|
getRowHeight(_rowIndex: number): number;
|
|
384
|
+
/**
|
|
385
|
+
* All rows share `defaultRowHeight` – unless a subclass overrides `getRowHeight()`, then row heights may
|
|
386
|
+
* vary and `undefined` is returned.
|
|
387
|
+
*
|
|
388
|
+
* @returns {number | undefined} The constant row height or `undefined`.
|
|
389
|
+
*/
|
|
390
|
+
getConstantRowHeight(): number | undefined;
|
|
383
391
|
/**
|
|
384
392
|
* Returns the row object at the specified index from the filtered rows array.
|
|
385
393
|
* This method overrides the parent class implementation.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { TreeRow } from
|
|
2
|
-
import { AbstractAreaModel } from
|
|
3
|
-
import { AreaIdent } from
|
|
4
|
-
import { ColumnDefIf } from
|
|
5
|
-
import { FilterFunction } from
|
|
6
|
-
import { SorterService } from
|
|
7
|
-
import { SortItem } from
|
|
8
|
-
import { TreeRowIf } from
|
|
1
|
+
import { TreeRow } from '../../common/tree-row';
|
|
2
|
+
import { AbstractAreaModel } from './abstract-area-model';
|
|
3
|
+
import { AreaIdent } from '../area-ident.type';
|
|
4
|
+
import { ColumnDefIf } from '../column/column-def.if';
|
|
5
|
+
import { FilterFunction } from '../../common/filter-function';
|
|
6
|
+
import { SorterService } from '../../../service/sorter.service';
|
|
7
|
+
import { SortItem } from '../../common/sort-item';
|
|
8
|
+
import { TreeRowIf } from '../../common/tree-row-if';
|
|
9
|
+
|
|
9
10
|
/**
|
|
10
11
|
* Represents a tree-based table model.
|
|
11
12
|
* Extends the AbstractAreaModel class.
|
|
@@ -31,6 +32,13 @@ export declare class AreaModelTree<S> extends AbstractAreaModel<TreeRow<S>> {
|
|
|
31
32
|
getRowCount(): number;
|
|
32
33
|
getValueAt(rowIndex: number, columnIndex: number): any;
|
|
33
34
|
getRowHeight(_rowIndex: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* All rows share `defaultRowHeight` – unless a subclass overrides `getRowHeight()`, then row heights may
|
|
37
|
+
* vary and `undefined` is returned.
|
|
38
|
+
*
|
|
39
|
+
* @returns {number | undefined} The constant row height or `undefined`.
|
|
40
|
+
*/
|
|
41
|
+
getConstantRowHeight(): number | undefined;
|
|
34
42
|
getCustomClassesAt(rowIndex: number, _columnIndex: number): string[];
|
|
35
43
|
getRowByIndex(idx: number): TreeRowIf<S> | undefined;
|
|
36
44
|
getValueByT(t: S, property: string): any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { AreaModelIf } from
|
|
2
|
-
import { AreaIdent } from
|
|
3
|
-
import { CheckboxModelIf } from
|
|
4
|
-
import { SortItem } from
|
|
5
|
-
import { FilterFunction } from
|
|
6
|
-
import { CellRendererIf } from
|
|
7
|
-
import { CheckedType } from
|
|
1
|
+
import { AreaModelIf } from './area-model.if';
|
|
2
|
+
import { AreaIdent } from '../area-ident.type';
|
|
3
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if';
|
|
4
|
+
import { SortItem } from '../../common/sort-item';
|
|
5
|
+
import { FilterFunction } from '../../common/filter-function';
|
|
6
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
7
|
+
import { CheckedType } from '../../common/checked-type';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* @class AreaModel
|
|
10
11
|
* @implements {AreaModelIf}
|
|
@@ -499,10 +500,11 @@ export declare class AreaModel implements AreaModelIf {
|
|
|
499
500
|
/**
|
|
500
501
|
* Returns the Y-coordinate (in pixels) of the top of the row at the specified index.
|
|
501
502
|
* This method is used for scrolling and positioning rows in the viewport.
|
|
502
|
-
* The base implementation
|
|
503
|
-
*
|
|
503
|
+
* The base implementation computes it from `getConstantRowHeight()` (O(1)) or by summing up
|
|
504
|
+
* `getRowHeight()` of all rows above (O(n)) – override it for large models with variable row heights.
|
|
505
|
+
* (Before 1.1.85 the base implementation returned 0.)
|
|
504
506
|
*
|
|
505
|
-
* @param {number}
|
|
507
|
+
* @param {number} rowIndex - The index of the row
|
|
506
508
|
* @returns {number} The Y-coordinate of the top of the row, in pixels
|
|
507
509
|
*
|
|
508
510
|
* @example
|
|
@@ -525,7 +527,15 @@ export declare class AreaModel implements AreaModelIf {
|
|
|
525
527
|
* // return yPos;
|
|
526
528
|
* }
|
|
527
529
|
*/
|
|
528
|
-
getYPosByRowIndex(
|
|
530
|
+
getYPosByRowIndex(rowIndex: number): number;
|
|
531
|
+
/**
|
|
532
|
+
* Returns the row height if all rows have the same height, otherwise `undefined` (default).
|
|
533
|
+
* Override it together with `getRowHeight()` if your rows have a constant height – this makes rendering
|
|
534
|
+
* of very large tables independent of the scroll position.
|
|
535
|
+
*
|
|
536
|
+
* @returns {number | undefined} `undefined` in the base implementation.
|
|
537
|
+
*/
|
|
538
|
+
getConstantRowHeight(): number | undefined;
|
|
529
539
|
/**
|
|
530
540
|
* Initializes the area model.
|
|
531
541
|
* This method is called internally by the TableModel during initialization.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CellRendererIf } from
|
|
2
|
-
import { CheckedType } from
|
|
3
|
-
import { CheckboxModelIf } from
|
|
4
|
-
import { FilterFunction } from
|
|
5
|
-
import { SortItem } from
|
|
6
|
-
import { AreaIdent } from
|
|
1
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
2
|
+
import { CheckedType } from '../../common/checked-type';
|
|
3
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if';
|
|
4
|
+
import { FilterFunction } from '../../common/filter-function';
|
|
5
|
+
import { SortItem } from '../../common/sort-item';
|
|
6
|
+
import { AreaIdent } from '../area-ident.type';
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* @interface AreaModelIf
|
|
9
10
|
* @description
|
|
@@ -564,6 +565,22 @@ export interface AreaModelIf {
|
|
|
564
565
|
* }
|
|
565
566
|
*/
|
|
566
567
|
getRowHeight(rowIndex: number): number;
|
|
568
|
+
/**
|
|
569
|
+
* Returns the row height if **all** rows of this area have the same height, otherwise `undefined`.
|
|
570
|
+
*
|
|
571
|
+
* The renderer uses this value to find the first visible row directly instead of summing up the heights
|
|
572
|
+
* of all rows above it – with millions of rows this keeps scrolling at the end of the table as fast as at
|
|
573
|
+
* the beginning. Only return a number if `getRowHeight(i)` returns exactly this value for every row.
|
|
574
|
+
* If the method is missing or returns `undefined`, the renderer falls back to iterating the row heights.
|
|
575
|
+
*
|
|
576
|
+
* @returns {number | undefined} The constant row height in pixels, or `undefined` if row heights may vary.
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* // Custom area model with 34px rows:
|
|
580
|
+
* getRowHeight(_rowIndex: number): number { return 34; }
|
|
581
|
+
* getConstantRowHeight(): number | undefined { return 34; }
|
|
582
|
+
*/
|
|
583
|
+
getConstantRowHeight?(): number | undefined;
|
|
567
584
|
/**
|
|
568
585
|
* Returns the row object at the specified index.
|
|
569
586
|
* This method provides access to the underlying data structure.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AbstractAreaModel } from
|
|
2
|
-
import { ColumnDefIf } from
|
|
3
|
-
import { FilterFunction } from
|
|
4
|
-
import { SorterService } from
|
|
5
|
-
import { SortItem } from
|
|
1
|
+
import { AbstractAreaModel } from './abstract-area-model';
|
|
2
|
+
import { ColumnDefIf } from '../column/column-def.if';
|
|
3
|
+
import { FilterFunction } from '../../common/filter-function';
|
|
4
|
+
import { SorterService } from '../../../service/sorter.service';
|
|
5
|
+
import { SortItem } from '../../common/sort-item';
|
|
6
|
+
|
|
6
7
|
export declare class AsyncBodyAreaModelObjectArray<T> extends AbstractAreaModel<T> {
|
|
7
8
|
protected readonly maxRowCount: number;
|
|
8
9
|
defaultRowHeight: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CellRange } from
|
|
2
|
-
import { AreaModelIf } from
|
|
3
|
-
import { TableModelIf } from
|
|
1
|
+
import { CellRange } from '../../common/cell-range';
|
|
2
|
+
import { AreaModelIf } from './area-model.if';
|
|
3
|
+
import { TableModelIf } from '../table-model.if';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* Represents a model for handling colspan and rowspan in a table.
|
|
6
7
|
*/
|
|
@@ -6,6 +6,7 @@ import { FilterFunction } from '../../common/filter-function';
|
|
|
6
6
|
import { SortItem } from '../../common/sort-item';
|
|
7
7
|
import { AreaIdent } from '../area-ident.type';
|
|
8
8
|
import { SorterService } from '../../../service/sorter.service';
|
|
9
|
+
|
|
9
10
|
export declare class CoverGridBodyModel<T> implements AreaModelIf {
|
|
10
11
|
items: T[];
|
|
11
12
|
cellRenderer: CellRendererIf;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CellGroupIf } from
|
|
2
|
-
import { CellGroup } from
|
|
1
|
+
import { CellGroupIf } from './cell-group.if';
|
|
2
|
+
import { CellGroup } from './cell-group';
|
|
3
|
+
|
|
3
4
|
export declare class CellGroupExt extends CellGroup {
|
|
4
5
|
rowIndex: number;
|
|
5
6
|
childIndex: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CellGroupIf } from
|
|
2
|
-
import { ColumnDefIf } from
|
|
3
|
-
import { CellGroupExt } from
|
|
1
|
+
import { CellGroupIf } from './cell-group.if';
|
|
2
|
+
import { ColumnDefIf } from '../column/column-def.if';
|
|
3
|
+
import { CellGroupExt } from './cell-group-ext';
|
|
4
|
+
|
|
4
5
|
export declare class CellgroupFactory {
|
|
5
6
|
static buildColumnDefs(cellGroups: CellGroupIf[], ret?: ColumnDefIf[]): ColumnDefIf[];
|
|
6
7
|
static buildGroupExts(cellGroups: CellGroupIf[], ret?: CellGroupExt[], deep?: number, parent?: CellGroupExt): CellGroupExt[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { SizeIf } from
|
|
2
|
-
import { ColumnDefIf, ValueRowSortComparator } from
|
|
3
|
-
import { CellRendererIf } from
|
|
4
|
-
import { AreaObjectMapType } from
|
|
5
|
-
import { AreaObjectMap } from
|
|
6
|
-
import { BooleanFunction } from
|
|
7
|
-
import { SortState } from
|
|
8
|
-
import { GetEditRenderer } from
|
|
9
|
-
import { editInputPipe } from
|
|
1
|
+
import { SizeIf } from '../../common/size.if';
|
|
2
|
+
import { ColumnDefIf, ValueRowSortComparator } from './column-def.if';
|
|
3
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
4
|
+
import { AreaObjectMapType } from '../../common/area-map.type';
|
|
5
|
+
import { AreaObjectMap } from '../../common/area-map';
|
|
6
|
+
import { BooleanFunction } from '../../common/boolean-function';
|
|
7
|
+
import { SortState } from '../../common/sort-state.type';
|
|
8
|
+
import { GetEditRenderer } from '../../../renderer/edit/edit-cell-renderer.type';
|
|
9
|
+
import { editInputPipe } from '../../../renderer/edit/edit-input-pipe.if';
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* Represents a column definition for one column of the table.
|
|
12
13
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SizeIf } from
|
|
2
|
-
import { CellRendererIf } from
|
|
3
|
-
import { AreaObjectMapType } from
|
|
4
|
-
import { BooleanFunction } from
|
|
5
|
-
import { SortState } from
|
|
6
|
-
import { GetEditRenderer } from
|
|
7
|
-
import { editInputPipe } from
|
|
1
|
+
import { SizeIf } from '../../common/size.if';
|
|
2
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
3
|
+
import { AreaObjectMapType } from '../../common/area-map.type';
|
|
4
|
+
import { BooleanFunction } from '../../common/boolean-function';
|
|
5
|
+
import { SortState } from '../../common/sort-state.type';
|
|
6
|
+
import { GetEditRenderer } from '../../../renderer/edit/edit-cell-renderer.type';
|
|
7
|
+
import { editInputPipe } from '../../../renderer/edit/edit-input-pipe.if';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Represents a function that compares two values for sorting purposes.
|
|
10
11
|
* The function takes two values of type T and optionally their corresponding row objects of type U,
|
|
@@ -8,6 +8,7 @@ import { TableScope } from '../../table-scope';
|
|
|
8
8
|
import { ColumnDefIf } from './column/column-def.if';
|
|
9
9
|
import { Padding } from './padding';
|
|
10
10
|
import { SelectionModelIf } from '../../selection/selection-model.if';
|
|
11
|
+
|
|
11
12
|
export declare class CoverGridTableModel<T> implements TableModelIf {
|
|
12
13
|
bodyModel: CoverGridBodyModel<T>;
|
|
13
14
|
paddingTop: number;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { TableModelIf } from
|
|
2
|
-
import { Padding } from
|
|
3
|
-
import { AreaIdent } from
|
|
4
|
-
import { AreaModelIf } from
|
|
5
|
-
import { SideIdent } from
|
|
6
|
-
import { DefaultRowHeightsIf } from
|
|
7
|
-
import { ColumnDefIf } from
|
|
8
|
-
import { FilterFunction } from
|
|
9
|
-
import { SortItem } from
|
|
10
|
-
import { SelectionModelIf } from
|
|
11
|
-
import { GetT } from
|
|
1
|
+
import { TableModelIf } from './table-model.if';
|
|
2
|
+
import { Padding } from './padding';
|
|
3
|
+
import { AreaIdent } from './area-ident.type';
|
|
4
|
+
import { AreaModelIf } from './areamodel/area-model.if';
|
|
5
|
+
import { SideIdent } from '../side-ident.type';
|
|
6
|
+
import { DefaultRowHeightsIf } from '../options/default-row-heights.if';
|
|
7
|
+
import { ColumnDefIf } from './column/column-def.if';
|
|
8
|
+
import { FilterFunction } from '../common/filter-function';
|
|
9
|
+
import { SortItem } from '../common/sort-item';
|
|
10
|
+
import { SelectionModelIf } from '../../selection/selection-model.if';
|
|
11
|
+
import { GetT } from '../common/get-t';
|
|
12
12
|
import { TableScope } from '../../table-scope';
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* This is a default implementation of TableModelIf.
|
|
15
16
|
* Ths TableModel is on one hand a container for the header, body, and footer models
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Padding } from
|
|
2
|
-
import { AreaIdent } from
|
|
3
|
-
import { ColumnDefIf } from
|
|
4
|
-
import { AreaModelIf } from
|
|
5
|
-
import { FilterFunction } from
|
|
6
|
-
import { SortItem } from
|
|
7
|
-
import { SelectionModelIf } from
|
|
1
|
+
import { Padding } from './padding';
|
|
2
|
+
import { AreaIdent } from './area-ident.type';
|
|
3
|
+
import { ColumnDefIf } from './column/column-def.if';
|
|
4
|
+
import { AreaModelIf } from './areamodel/area-model.if';
|
|
5
|
+
import { FilterFunction } from '../common/filter-function';
|
|
6
|
+
import { SortItem } from '../common/sort-item';
|
|
7
|
+
import { SelectionModelIf } from '../../selection/selection-model.if';
|
|
8
8
|
import { TableScope } from '../../table-scope';
|
|
9
|
+
|
|
9
10
|
/**
|
|
10
11
|
* The TableModelIf is on one hand a container for the header, body, and footer models
|
|
11
12
|
* (see : #getAreaModel, and #AreaModelIf), and on the other hand the master of
|
package/lib/table/ele-scope.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ConvenienceDomService } from
|
|
2
|
-
import { DivScope } from
|
|
3
|
-
import { TableModelIf } from
|
|
4
|
-
import { TableOptionsIf } from
|
|
5
|
-
import { GeoData } from
|
|
1
|
+
import { ConvenienceDomService } from './service/convenience-dom.service';
|
|
2
|
+
import { DivScope } from './data/div-scope.type';
|
|
3
|
+
import { TableModelIf } from './data/tablemodel/table-model.if';
|
|
4
|
+
import { TableOptionsIf } from './data/options/table-options.if';
|
|
5
|
+
import { GeoData } from './data/geo-data';
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* Represents a store for HTML elements.
|
|
8
9
|
* @class
|
|
@@ -12,6 +13,13 @@ export declare class EleScope {
|
|
|
12
13
|
readonly tableModel: TableModelIf;
|
|
13
14
|
protected readonly dom: ConvenienceDomService;
|
|
14
15
|
readonly tableOptions: TableOptionsIf;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum height (px) of the scrollable content wrapper. Taller tables are scrolled proportionally
|
|
18
|
+
* (rendering is based on the scroll factor anyway): browsers clamp element heights (Chrome ~33.5 million px)
|
|
19
|
+
* and GPU rasterization loses precision long before (1px borders disappear and text jitters beyond
|
|
20
|
+
* ~16.7 million px). 8 million px keep sub-pixel precision.
|
|
21
|
+
*/
|
|
22
|
+
static maxScrollHeightInPx: number;
|
|
15
23
|
scrollViewport: HTMLDivElement;
|
|
16
24
|
protected contentWrapperDiv: HTMLDivElement;
|
|
17
25
|
protected contentDiv: HTMLDivElement;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { GeModelChangeEvent } from
|
|
2
|
-
import { GeMouseEvent } from
|
|
3
|
-
import { GeScrollEvent } from
|
|
4
|
-
import { EventListenerIf } from
|
|
1
|
+
import { GeModelChangeEvent } from './data/common/event/ge-model-change-event';
|
|
2
|
+
import { GeMouseEvent } from './data/common/event/ge-mouse-event';
|
|
3
|
+
import { GeScrollEvent } from './data/common/event/ge-scroll-event';
|
|
4
|
+
import { EventListenerIf } from './event-listener.if';
|
|
5
5
|
import { SelectionModelIf } from './selection/selection-model.if';
|
|
6
6
|
import { FocusModelIf } from './focus/focus-model.if';
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* EventAdapter class implements the EventListenerIf interface.
|
|
9
10
|
* It provides empty implementations for all the event listener methods.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { GeMouseEvent } from
|
|
2
|
-
import { GeModelChangeEvent } from
|
|
3
|
-
import { GeScrollEvent } from
|
|
1
|
+
import { GeMouseEvent } from './data/common/event/ge-mouse-event';
|
|
2
|
+
import { GeModelChangeEvent } from './data/common/event/ge-model-change-event';
|
|
3
|
+
import { GeScrollEvent } from './data/common/event/ge-scroll-event';
|
|
4
4
|
import { SelectionModelIf } from './selection/selection-model.if';
|
|
5
5
|
import { FocusModelIf } from './focus/focus-model.if';
|
|
6
6
|
import { EventFocusChangedListenerIf } from './focus/event-focus-changed-listener.if';
|
|
7
7
|
import { EventSelectionChangedListenerIf } from './selection/event-selection-changed-listener.if';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Interface representing an event listener.
|
|
10
11
|
*
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { CoverGridTableModel } from '../data/tablemodel/cover-grid-table-model';
|
|
2
2
|
import { CellRendererIf } from '../renderer/cell-render.if';
|
|
3
|
+
import { TableOptionsIf } from '../data/options/table-options.if';
|
|
4
|
+
|
|
3
5
|
export declare class CoverGridFactory {
|
|
4
6
|
static createCoverGridModel<T>(items: T[], cellRenderer: CellRendererIf, coverWidth?: number, coverHeight?: number, width?: number, firstRowPaddingTop?: number): CoverGridTableModel<T>;
|
|
7
|
+
static createCoverGrisDefaultOptions(defaultRowHeight: number, getStorageKeyFn?: () => string): TableOptionsIf;
|
|
5
8
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { AreaModelIf } from
|
|
2
|
-
import { DefaultRowHeightsIf } from
|
|
3
|
-
import { ColumnDefIf } from
|
|
4
|
-
import { GetT } from
|
|
5
|
-
import { TableOptionsIf } from
|
|
6
|
-
import { TableModelIf } from
|
|
7
|
-
import { TableModel } from
|
|
8
|
-
import { SelectionModelIf } from
|
|
1
|
+
import { AreaModelIf } from '../data/tablemodel/areamodel/area-model.if';
|
|
2
|
+
import { DefaultRowHeightsIf } from '../data/options/default-row-heights.if';
|
|
3
|
+
import { ColumnDefIf } from '../data/tablemodel/column/column-def.if';
|
|
4
|
+
import { GetT } from '../data/common/get-t';
|
|
5
|
+
import { TableOptionsIf } from '../data/options/table-options.if';
|
|
6
|
+
import { TableModelIf } from '../data/tablemodel/table-model.if';
|
|
7
|
+
import { TableModel } from '../data/tablemodel/table-model';
|
|
8
|
+
import { SelectionModelIf } from '../selection/selection-model.if';
|
|
9
|
+
|
|
9
10
|
export type CreateTableModelPara = {
|
|
10
11
|
headerAreaModel: AreaModelIf;
|
|
11
12
|
bodyAreaModel: AreaModelIf;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TreeRowIf } from
|
|
1
|
+
import { TreeRowIf } from '../data/common/tree-row-if';
|
|
2
|
+
|
|
2
3
|
export declare class TreeFactory {
|
|
3
4
|
static buildTreeRows<T>(data: T[], childrenProperty?: string, deepMaxLimit?: number): TreeRowIf<T>[];
|
|
4
5
|
static buildTreeRow<T>(data: T, childrenProperty?: string, parent?: TreeRowIf<T>, //, false , '0', '0'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FocusType } from
|
|
2
|
-
import { FocusModelIf } from
|
|
1
|
+
import { FocusType } from './focus.type';
|
|
2
|
+
import { FocusModelIf } from './focus-model.if';
|
|
3
3
|
import { EventFocusChangedListenerIf } from './event-focus-changed-listener.if';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* The `FocusModel` class is an implementation of the `FocusModelIf` interface.
|
|
6
7
|
* It provides core functionality to manage focus inside a data grid or spreadsheet-like structure.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TableScope } from
|
|
2
|
-
import { GeMouseEvent } from
|
|
1
|
+
import { TableScope } from './table-scope';
|
|
2
|
+
import { GeMouseEvent } from './data/common/event/ge-mouse-event';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Class representing a MouseHandler.
|
|
5
6
|
* @class
|
|
@@ -19,6 +19,7 @@ import { FocusModelIf } from './focus/focus-model.if';
|
|
|
19
19
|
import { ColAndRowspanModel } from './data/tablemodel/areamodel/col-and-rowspan-model';
|
|
20
20
|
import { AreaObjectMapType } from './data/common/area-map.type';
|
|
21
21
|
import { TableCellUpdateEventIf } from './data/common/event/input/table-cell-update-event.if';
|
|
22
|
+
|
|
22
23
|
export declare class RenderScope extends EleScope {
|
|
23
24
|
firstVisibleRowIndex: number;
|
|
24
25
|
lastVisibleRowIndex: number;
|
|
@@ -46,6 +47,17 @@ export declare class RenderScope extends EleScope {
|
|
|
46
47
|
protected colAndRowspanModels: AreaObjectMapType<ColAndRowspanModel>;
|
|
47
48
|
protected draggingTargetColumnIndex: number;
|
|
48
49
|
protected mouseEvent?: GeMouseEvent;
|
|
50
|
+
/** Content pixels scrolled out at the top, i.e. the offset that is actually rendered (see adjustBody). */
|
|
51
|
+
protected contentScrollTop: number;
|
|
52
|
+
/** Exact content position requested by scrollToPixel() for a capped scroll height (see TableScope). */
|
|
53
|
+
protected pendingContentScroll?: {
|
|
54
|
+
scrollTop: number;
|
|
55
|
+
contentTop: number;
|
|
56
|
+
};
|
|
57
|
+
/** Area heights read once at the start of adjustAfterScrolling() (before the DOM is modified). */
|
|
58
|
+
protected areaHeightsOfRenderPass?: {
|
|
59
|
+
[key in AreaIdent]?: number;
|
|
60
|
+
};
|
|
49
61
|
private debounceTimeout?;
|
|
50
62
|
private editorRenderer?;
|
|
51
63
|
private editorRendererColumn?;
|
|
@@ -159,6 +171,31 @@ export declare class RenderScope extends EleScope {
|
|
|
159
171
|
* @protected
|
|
160
172
|
* @return {void}
|
|
161
173
|
*/
|
|
174
|
+
/**
|
|
175
|
+
* Rounds a pixel offset to whole device pixels. The scroll offsets are derived from a scroll factor and are
|
|
176
|
+
* fractional; rows and cells placed at fractional positions render blurry text and 1px borders.
|
|
177
|
+
*
|
|
178
|
+
* @param {number} px - offset in CSS pixels
|
|
179
|
+
* @returns {number} offset snapped to the device pixel grid
|
|
180
|
+
* @protected
|
|
181
|
+
*/
|
|
182
|
+
protected snapToDevicePixel(px: number): number;
|
|
183
|
+
/**
|
|
184
|
+
* True if the table content is taller than {@link EleScope.maxScrollHeightInPx}; then the scroll bar is
|
|
185
|
+
* scaled and scrollTop is no longer a content pixel position.
|
|
186
|
+
*/
|
|
187
|
+
isScrollHeightCapped(): boolean;
|
|
188
|
+
/** Scrollable range of the content in content pixels (content height minus visible body height). */
|
|
189
|
+
protected getContentScrollRangeY(): number;
|
|
190
|
+
/** Scrollable range of the scroll viewport in scroll bar pixels. */
|
|
191
|
+
protected getScrollerRangeY(): number;
|
|
192
|
+
/**
|
|
193
|
+
* Mouse wheel on a capped scroll height: scale the wheel delta, so one wheel step still moves the content
|
|
194
|
+
* by the usual amount of pixels (otherwise it would jump many rows). No-op for normal tables.
|
|
195
|
+
*
|
|
196
|
+
* @param {WheelEvent} evt - the wheel event of the scroll viewport
|
|
197
|
+
*/
|
|
198
|
+
onWheel(evt: WheelEvent): void;
|
|
162
199
|
protected adjustBody(): void;
|
|
163
200
|
/**
|
|
164
201
|
* Returns a number value extracted from the specified attribute of the source element.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AreaIdent } from '../../data/tablemodel/area-ident.type';
|
|
2
2
|
import { ActionEventIf } from './action-event.if';
|
|
3
3
|
import { AreaModelIf } from '../../data/tablemodel/areamodel/area-model.if';
|
|
4
|
+
|
|
4
5
|
export declare class ActionEvent implements ActionEventIf {
|
|
5
6
|
action: string;
|
|
6
7
|
area: AreaIdent;
|
|
@@ -5,6 +5,7 @@ import { DomServiceIf } from '../../service/dom-service.if';
|
|
|
5
5
|
import { RendererCleanupFnType } from '../renderer-cleanup-fn.type';
|
|
6
6
|
import { ActionEventListenerIf } from './action-event-listener.if';
|
|
7
7
|
import { CrudAction } from '../../crud/crud-action';
|
|
8
|
+
|
|
8
9
|
export declare class ActionsCellRenderer implements CellRendererIf {
|
|
9
10
|
private actionEventListener;
|
|
10
11
|
private crudActions;
|