@guiexpert/table 1.1.90 → 1.1.92
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/README.md +8 -2
- package/css/main.css +129 -4
- package/css/table-classes.css +93 -0
- package/css/table-color-classes.css +3 -1
- package/css/table-color-vars.css +20 -2
- package/css/table-tree.css +13 -1
- package/index.cjs +111 -96
- package/index.d.ts +203 -184
- package/index.js +4927 -2096
- package/lib/common/debounce.d.ts +1 -0
- package/lib/common/decorator/avoid-double-execution.decorator.d.ts +2 -0
- package/lib/common/escape-html.d.ts +22 -0
- package/lib/common/generator/column-def-generator-service.d.ts +2 -1
- package/lib/common/generator/domain/property-type.d.ts +19 -0
- package/lib/common/generator/domain/value-info.d.ts +2 -1
- package/lib/common/generator/json-service.d.ts +1 -0
- package/lib/common/generator/property-type.service.d.ts +3 -2
- package/lib/common/generator/scheme-generator-service.d.ts +3 -1
- package/lib/common/generator/string-util.d.ts +7 -0
- package/lib/common/throttle.d.ts +1 -0
- package/lib/table/action/action-id.type.d.ts +5 -1
- package/lib/table/action/on-action-triggered.if.d.ts +2 -1
- package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +3 -1
- package/lib/table/action/shortcut-actionid-mapping.type.d.ts +3 -1
- package/lib/table/action/shortcut-util.d.ts +12 -0
- package/lib/table/action/shortcut.service.d.ts +5 -3
- package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +3 -1
- package/lib/table/aria/aria-grid-info.d.ts +76 -0
- package/lib/table/aria/aria-ids.d.ts +56 -0
- package/lib/table/aria/aria-texts.d.ts +34 -0
- package/lib/table/aria/aria-texts.if.d.ts +88 -0
- package/lib/table/aria/live-announcer.d.ts +62 -0
- package/lib/table/aria/tree-aria-info.d.ts +58 -0
- package/lib/table/checkbox/all-rows-checkbox-model.d.ts +31 -0
- 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 +19 -4
- package/lib/table/color/color-rgb.d.ts +2 -1
- package/lib/table/color/color-rgb.if.d.ts +2 -0
- package/lib/table/color/ge-css-color-util.d.ts +25 -2
- package/lib/table/color/three-color-gradient-arg.d.ts +3 -2
- package/lib/table/color/three-color-gradient-arg.if.d.ts +3 -1
- package/lib/table/color/two-color-gradient-arg.d.ts +3 -2
- package/lib/table/color/two-color-gradient-arg.if.d.ts +3 -1
- package/lib/table/crud/column-widths.d.ts +2 -1
- package/lib/table/crud/column-widths.if.d.ts +1 -0
- package/lib/table/crud/crud-action.d.ts +1 -0
- package/lib/table/crud/crud-object-edit.d.ts +25 -3
- package/lib/table/crud/crud-object-view.d.ts +6 -0
- package/lib/table/crud/crud-options.d.ts +35 -4
- package/lib/table/crud/crud-options.if.d.ts +3 -2
- package/lib/table/crud/crud-table-model-factory.d.ts +72 -8
- package/lib/table/crud/url-info.d.ts +2 -1
- package/lib/table/crud/url-info.if.d.ts +1 -0
- package/lib/table/crud/urls.if.d.ts +2 -1
- package/lib/table/css-vars.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/chunk/request-chunk.if.d.ts +1 -0
- package/lib/table/data/common/aligns.d.ts +18 -0
- package/lib/table/data/common/area-map-factory.d.ts +3 -2
- package/lib/table/data/common/area-map.d.ts +3 -1
- package/lib/table/data/common/area-map.type.d.ts +1 -0
- package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +6 -4
- package/lib/table/data/common/args-render-cell-div.d.ts +5 -3
- package/lib/table/data/common/boolean-function.d.ts +10 -0
- package/lib/table/data/common/cell-range.d.ts +16 -7
- package/lib/table/data/common/checkbox-column-def.d.ts +6 -4
- package/lib/table/data/common/checked-type.d.ts +2 -0
- package/lib/table/data/common/event/ge-cell-indices.d.ts +2 -0
- package/lib/table/data/common/event/ge-key-event.d.ts +2 -0
- package/lib/table/data/common/event/ge-model-change-event.d.ts +16 -2
- package/lib/table/data/common/event/ge-mouse-event.d.ts +52 -4
- package/lib/table/data/common/event/ge-scroll-event.d.ts +27 -1
- package/lib/table/data/common/event/ge-state-change-event.d.ts +30 -0
- package/lib/table/data/common/event/input/table-cell-update-event.d.ts +14 -10
- package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +3 -1
- package/lib/table/data/common/filter-function.d.ts +2 -0
- package/lib/table/data/common/get-t.d.ts +2 -0
- package/lib/table/data/common/index-and-px.d.ts +2 -0
- package/lib/table/data/common/size-unit.type.d.ts +2 -0
- package/lib/table/data/common/size.d.ts +13 -2
- package/lib/table/data/common/size.if.d.ts +3 -1
- package/lib/table/data/common/sizes.d.ts +133 -1
- package/lib/table/data/common/sort-item.d.ts +16 -3
- package/lib/table/data/common/sort-state.type.d.ts +2 -0
- package/lib/table/data/common/tree-arrow.type.d.ts +2 -0
- package/lib/table/data/common/tree-row-if.d.ts +22 -1
- package/lib/table/data/common/tree-row.d.ts +3 -1
- package/lib/table/data/common/value-label.d.ts +2 -1
- package/lib/table/data/common/value-label.if.d.ts +1 -0
- package/lib/table/data/div-scope.type.d.ts +2 -0
- package/lib/table/data/event/mouse-target-data.d.ts +5 -3
- package/lib/table/data/geo-data.d.ts +2 -0
- package/lib/table/data/options/auto-restore-options.d.ts +44 -1
- package/lib/table/data/options/auto-restore-options.if.d.ts +95 -45
- package/lib/table/data/options/default-row-heights.d.ts +20 -2
- package/lib/table/data/options/default-row-heights.if.d.ts +4 -1
- package/lib/table/data/options/default-row-id.d.ts +4 -0
- package/lib/table/data/options/header-group-options.d.ts +3 -2
- package/lib/table/data/options/header-group-options.if.d.ts +3 -4
- package/lib/table/data/options/icon.d.ts +2 -1
- package/lib/table/data/options/icon.if.d.ts +2 -0
- package/lib/table/data/options/overlay-options.d.ts +30 -0
- package/lib/table/data/options/overlay-options.if.d.ts +79 -0
- package/lib/table/data/options/sorted-options.d.ts +3 -2
- package/lib/table/data/options/sorted-options.if.d.ts +3 -1
- package/lib/table/data/options/table-options.d.ts +40 -13
- package/lib/table/data/options/table-options.if.d.ts +152 -44
- package/lib/table/data/options/tree-options.d.ts +3 -2
- package/lib/table/data/options/tree-options.if.d.ts +3 -1
- package/lib/table/data/side-ident.type.d.ts +2 -0
- package/lib/table/data/table-model-and-options.d.ts +5 -3
- package/lib/table/data/table-model-and-options.if.d.ts +4 -2
- package/lib/table/data/tablemodel/area-ident.type.d.ts +4 -0
- 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 +13 -4
- package/lib/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +44 -12
- package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +9 -7
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +16 -14
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +48 -31
- package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +162 -11
- package/lib/table/data/tablemodel/areamodel/area-model.d.ts +66 -104
- package/lib/table/data/tablemodel/areamodel/area-model.if.d.ts +75 -50
- package/lib/table/data/tablemodel/areamodel/async-area-model-object-array.d.ts +5 -5
- package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +14 -3
- package/lib/table/data/tablemodel/areamodel/cover-grid-body-model.d.ts +17 -8
- package/lib/table/data/tablemodel/areamodel/has-default-row-height-if.d.ts +1 -0
- package/lib/table/data/tablemodel/areamodel/object-array-holder.if.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 +4 -1
- package/lib/table/data/tablemodel/cellgroup/cell-group.if.d.ts +34 -0
- package/lib/table/data/tablemodel/cellgroup/cellgroup-factory.d.ts +4 -3
- package/lib/table/data/tablemodel/column/column-def.d.ts +67 -10
- package/lib/table/data/tablemodel/column/column-def.if.d.ts +63 -96
- package/lib/table/data/tablemodel/column/column-visibility.d.ts +11 -0
- package/lib/table/data/tablemodel/cover-grid-table-model.d.ts +11 -10
- package/lib/table/data/tablemodel/padding.d.ts +2 -0
- package/lib/table/data/tablemodel/table-model.d.ts +75 -14
- package/lib/table/data/tablemodel/table-model.if.d.ts +52 -8
- package/lib/table/ele-scope.d.ts +53 -5
- package/lib/table/event-adapter.d.ts +20 -10
- package/lib/table/event-checkbox-changed-handler.d.ts +2 -1
- package/lib/table/event-listener.if.d.ts +50 -9
- package/lib/table/factory/cover-grid-factory.d.ts +4 -3
- package/lib/table/factory/table-factory.d.ts +103 -64
- package/lib/table/factory/tree-factory.d.ts +45 -3
- package/lib/table/focus/event-focus-changed-listener.if.d.ts +5 -3
- package/lib/table/focus/focus-model.d.ts +7 -5
- package/lib/table/focus/focus-model.if.d.ts +22 -1
- package/lib/table/focus/focus.type.d.ts +2 -0
- package/lib/table/input-handler.d.ts +5 -1
- package/lib/table/instanceof-workaround.d.ts +16 -0
- package/lib/table/license-manager.d.ts +2 -0
- package/lib/table/mouse-handler.d.ts +20 -9
- package/lib/table/overlay/calc-overlay-kind.d.ts +31 -0
- package/lib/table/overlay/ge-overlay-kind.type.d.ts +17 -0
- package/lib/table/overlay/table-overlay.d.ts +108 -0
- package/lib/table/render-scope.d.ts +141 -27
- package/lib/table/renderer/action/action-event-listener.if.d.ts +2 -1
- package/lib/table/renderer/action/action-event.d.ts +4 -3
- package/lib/table/renderer/action/action-event.if.d.ts +2 -1
- package/lib/table/renderer/action/actions-cell-renderer.d.ts +8 -7
- package/lib/table/renderer/cell-group-ext-cell-renderer.d.ts +8 -7
- package/lib/table/renderer/cell-render.if.d.ts +41 -4
- package/lib/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +7 -5
- package/lib/table/renderer/checkbox-cell-renderer.d.ts +8 -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/edit-input-pipe.if.d.ts +2 -0
- 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 +19 -6
- package/lib/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +11 -6
- 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 +12 -6
- package/lib/table/renderer/renderer-cleanup-fn.type.d.ts +1 -0
- 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 +12 -6
- package/lib/table/renderer/true-false-cell-renderer.d.ts +17 -5
- package/lib/table/resize-handler.d.ts +3 -1
- package/lib/table/selection/event-selection-changed-listener.if.d.ts +2 -1
- package/lib/table/selection/multi-rows-selection-model.d.ts +7 -4
- package/lib/table/selection/selection-model.d.ts +112 -10
- package/lib/table/selection/selection-model.if.d.ts +48 -3
- package/lib/table/selection/selection-service.d.ts +35 -7
- package/lib/table/selection/selection.type.d.ts +3 -0
- package/lib/table/service/abstract-store-state.service.d.ts +1 -1
- package/lib/table/service/convenience-dom.service.d.ts +37 -14
- package/lib/table/service/copy-service.d.ts +18 -4
- package/lib/table/service/copy-service.if.d.ts +4 -3
- package/lib/table/service/data/collapsed-expanded.data.d.ts +1 -0
- package/lib/table/service/data/html-style.type.d.ts +1 -0
- package/lib/table/service/dom-service.if.d.ts +30 -0
- package/lib/table/service/excel-service.d.ts +24 -1
- package/lib/table/service/excel-service.if.d.ts +7 -0
- package/lib/table/service/ge-filter.service.d.ts +1 -0
- package/lib/table/service/simple-dom-service.d.ts +3 -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 +5 -1
- package/lib/table/state/state-storage.if.d.ts +39 -0
- package/lib/table/state/table-state-migration.d.ts +36 -0
- package/lib/table/state/table-state-part.d.ts +13 -0
- package/lib/table/state/table-state.if.d.ts +181 -0
- package/lib/table/state/table-state.service.d.ts +158 -0
- package/lib/table/table-api.d.ts +450 -550
- package/lib/table/table-scope.d.ts +288 -114
- package/package.json +23 -8
|
@@ -1,10 +1,10 @@
|
|
|
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';
|
|
1
|
+
import { SizeIf } from '../../common/size.if.js';
|
|
2
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if.js';
|
|
3
|
+
import { AreaObjectMapType } from '../../common/area-map.type.js';
|
|
4
|
+
import { BooleanFunction } from '../../common/boolean-function.js';
|
|
5
|
+
import { SortState } from '../../common/sort-state.type.js';
|
|
6
|
+
import { GetEditRenderer } from '../../../renderer/edit/edit-cell-renderer.type.js';
|
|
7
|
+
import { editInputPipe } from '../../../renderer/edit/edit-input-pipe.if.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Represents a function that compares two values for sorting purposes.
|
|
@@ -21,132 +21,99 @@ import { editInputPipe } from '../../../renderer/edit/edit-input-pipe.if';
|
|
|
21
21
|
* @param f Optional. The direction. It is not necessary to use this value in the comparator, as this number is used as a factor (1 or -1) in the outer sort method.
|
|
22
22
|
*
|
|
23
23
|
* @returns A number indicating the relative order of 'valueA' and 'valueB'.
|
|
24
|
+
*
|
|
25
|
+
* @category Columns
|
|
24
26
|
*/
|
|
25
27
|
export type ValueRowSortComparator = (valueA: any, valueB: any, rowA?: any, rowB?: any, f?: number) => number;
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
29
|
+
* Describes one column: which property it shows, header label, width, CSS classes, renderers,
|
|
30
|
+
* sorting, editing and visibility. Create it with {@link ColumnDef} – `new ColumnDef(property, label, width, classes)`
|
|
31
|
+
* or {@link ColumnDef.create} with named parameters.
|
|
32
|
+
*
|
|
33
|
+
* Column indices (e.g. in {@link AreaModelIf.getValueAt}) are positions in the `columnDefs` array –
|
|
34
|
+
* fixed columns and hidden columns included.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const columnDefs: ColumnDefIf[] = [
|
|
38
|
+
* new ColumnDef("id", "ID", px80, allRight),
|
|
39
|
+
* ColumnDef.create({
|
|
40
|
+
* property: "total", headerLabel: "Total", width: px120,
|
|
41
|
+
* headerClasses: ["ge-table-text-align-right"], bodyClasses: ["ge-table-text-align-right"],
|
|
42
|
+
* sortable: TrueFn, sortState: "desc"
|
|
43
|
+
* })
|
|
44
|
+
* ];
|
|
45
|
+
*
|
|
46
|
+
* @see Training: [Columns with ColumnDef](https://gui.expert/training/column-definitions/)
|
|
47
|
+
*
|
|
48
|
+
* @category Columns
|
|
28
49
|
*/
|
|
29
50
|
export interface ColumnDefIf {
|
|
30
|
-
/**
|
|
31
|
-
* Represents a property name of the table row element.
|
|
32
|
-
* @typedef {String} VariableProperty
|
|
33
|
-
*/
|
|
51
|
+
/** Property of the row object shown in this column (`"customer"`). With nested objects a path like `"address.city"`. */
|
|
34
52
|
property: string;
|
|
35
|
-
/**
|
|
36
|
-
* Represents the label for a header.
|
|
37
|
-
*
|
|
38
|
-
* @typedef {string} headerLabel
|
|
39
|
-
*/
|
|
53
|
+
/** Text of the header cell (used when the header is built from the column definitions). */
|
|
40
54
|
headerLabel: string;
|
|
41
|
-
/**
|
|
42
|
-
* Represents the size of a column along the width dimension.
|
|
43
|
-
*
|
|
44
|
-
* @typedef {number} Width
|
|
45
|
-
*/
|
|
55
|
+
/** Width of the column: `px120`, `new Size(10, "%")` or `new Size(1, "weight")`. See {@link SizeUnitType}. */
|
|
46
56
|
width: SizeIf;
|
|
47
|
-
/**
|
|
48
|
-
* Represents the minimum width of a column.
|
|
49
|
-
*
|
|
50
|
-
* @typedef {SizeIf} minWidth
|
|
51
|
-
* @property {number} width - The minimum width value.
|
|
52
|
-
* @property {string} unit - The unit of measurement for the minimum width value.
|
|
53
|
-
* Default value is 'px' if not specified.
|
|
54
|
-
*/
|
|
57
|
+
/** Lower limit for percentage widths (`"%"`). Not applied to pixel widths or to resizing with the mouse. */
|
|
55
58
|
minWidth: SizeIf;
|
|
56
|
-
/**
|
|
57
|
-
* Represents the maximum width of a column.
|
|
58
|
-
*
|
|
59
|
-
* @typedef {number} SizeIf
|
|
60
|
-
*/
|
|
59
|
+
/** Upper limit for percentage widths (`"%"`). Not applied to pixel widths or to resizing with the mouse. */
|
|
61
60
|
maxWidth: SizeIf;
|
|
62
61
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
62
|
+
* Cell renderers per area – `rendererMap.header`, `.body`, `.footer`.
|
|
63
|
+
* Without a renderer the value is shown as text.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* column.rendererMap.body = new NumberCellProgressBarCellRenderer(20, false);
|
|
67
|
+
* column.rendererMap.footer = new EuroRenderer(); // an own CellRendererIf
|
|
68
|
+
*
|
|
69
|
+
* @see Training: [Cell renderers](https://gui.expert/training/cell-renderers/)
|
|
66
70
|
*/
|
|
67
71
|
rendererMap: AreaObjectMapType<CellRendererIf>;
|
|
68
72
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @typedef {Object.<string, string[]>} AreaObjectMapType
|
|
73
|
+
* CSS classes per area – `classes.header`, `.body`, `.footer`. The constants {@link bodyLeft}, {@link allRight} …
|
|
74
|
+
* are ready-made maps for the alignment.
|
|
72
75
|
*/
|
|
73
76
|
classes: AreaObjectMapType<string[]>;
|
|
74
|
-
/**
|
|
75
|
-
* Determines whether or not a column can be sorted.
|
|
76
|
-
*
|
|
77
|
-
* @param {boolean} sortable - Specifies if an item is sortable.
|
|
78
|
-
* @returns {boolean} - Indicating whether the item is sortable or not.
|
|
79
|
-
*/
|
|
77
|
+
/** The column can be sorted by a double-click on its header (e.g. `TrueFn`). */
|
|
80
78
|
sortable?: BooleanFunction;
|
|
81
|
-
/**
|
|
82
|
-
* Determines if the sort icon is visible.
|
|
83
|
-
*
|
|
84
|
-
* @typedef {BooleanFunction} sortIconVisible
|
|
85
|
-
* @returns {boolean} Indicates whether the sort icon is visible.
|
|
86
|
-
*/
|
|
79
|
+
/** Show the sort icon in the header. Default: follows `sortable` resp. `sortState`. */
|
|
87
80
|
sortIconVisible?: BooleanFunction;
|
|
88
81
|
/**
|
|
89
|
-
*
|
|
90
|
-
* The function takes two values and optionally their corresponding row objects,
|
|
91
|
-
* compares them, and returns a number.
|
|
92
|
-
* If the result is negative, it means 'valueA' comes before 'valueB' in the sorted order.
|
|
93
|
-
* If the result is positive, it means 'valueB' comes before 'valueA' in the sorted order.
|
|
94
|
-
* If the result is zero, it means the two values are considered equal for sorting purposes.
|
|
82
|
+
* Own comparison of two cell values (and their rows), like for `Array.prototype.sort`.
|
|
95
83
|
*
|
|
96
|
-
* @
|
|
84
|
+
* @example
|
|
85
|
+
* sortComparator: (a: string, b: string) => a.localeCompare(b, "de") // "Müller" before "Nordlicht"
|
|
86
|
+
*
|
|
87
|
+
* @see Training: [Sorting](https://gui.expert/training/sorting/)
|
|
97
88
|
*/
|
|
98
89
|
sortComparator?: ValueRowSortComparator;
|
|
99
90
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* @typedef {Object} SortState
|
|
103
|
-
*
|
|
104
|
-
* @property {string} [sortKey] - The key to sort the list by. If not provided, no sorting will be applied.
|
|
105
|
-
* @property {boolean} [reverse] - Indicates whether the list should be sorted in reverse order. Defaults to false.
|
|
91
|
+
* The sort icon shown in the header: `"asc"`, `"desc"` or `""` (none). It only sets the icon –
|
|
92
|
+
* sort the rows once with {@link TableModelIf.doSort} to match it.
|
|
106
93
|
*/
|
|
107
94
|
sortState?: SortState;
|
|
108
|
-
/**
|
|
109
|
-
* Represents the order of multiple sort states.
|
|
110
|
-
*
|
|
111
|
-
* @typedef {SortState[]} SortStatesOrder
|
|
112
|
-
*/
|
|
95
|
+
/** Order of the sort states on repeated double-clicks. Default: `TableOptions.sortOrder` (`["asc", "desc"]`). */
|
|
113
96
|
sortStatesOrder?: SortState[];
|
|
114
97
|
/**
|
|
115
|
-
*
|
|
98
|
+
* The cells of this column can be edited (double-click or F2), e.g. `TrueFn`.
|
|
116
99
|
*
|
|
117
|
-
* @
|
|
118
|
-
* @returns {boolean} - Returns true if the variable is editable, false otherwise.
|
|
100
|
+
* @see Training: [Inline editing](https://gui.expert/training/inline-editing/)
|
|
119
101
|
*/
|
|
120
102
|
editable?: BooleanFunction;
|
|
121
103
|
/**
|
|
122
|
-
*
|
|
104
|
+
* Whether the column is shown. Hidden columns are not rendered, copied or exported.
|
|
123
105
|
*
|
|
124
|
-
* @
|
|
125
|
-
*
|
|
106
|
+
* @example
|
|
107
|
+
* ColumnDef.create({ property: "category", headerLabel: "Category", isVisible: FalseFn })
|
|
126
108
|
*/
|
|
127
109
|
isVisible?: BooleanFunction;
|
|
128
110
|
/**
|
|
129
|
-
*
|
|
111
|
+
* The editor of this column. Default: `TableOptions.getEditRenderer` (a text input, {@link InputCellRenderer}).
|
|
130
112
|
*
|
|
131
|
-
* @
|
|
132
|
-
*
|
|
133
|
-
* @param {HTMLElement} element - The element for which to retrieve the edit renderer.
|
|
134
|
-
* @returns {EditRenderer | null} - The edit renderer for the specified element, or null if not found.
|
|
113
|
+
* @example
|
|
114
|
+
* getEditRenderer: () => new SelectCellRenderer(["open", "paid"].map(s => new ValueLabel(s, s)))
|
|
135
115
|
*/
|
|
136
116
|
getEditRenderer?: GetEditRenderer;
|
|
137
|
-
/**
|
|
138
|
-
* Represents an edit input pipe.
|
|
139
|
-
*
|
|
140
|
-
* @typedef {object} editInputPipe
|
|
141
|
-
* @property {string} name - The name of the edit input pipe.
|
|
142
|
-
* @property {number} id - The unique identifier of the edit input pipe.
|
|
143
|
-
* @property {boolean} isActive - Indicates whether the edit input pipe is active.
|
|
144
|
-
* @property {function} execute - Executes the edit input pipe operation.
|
|
145
|
-
* @property {function} addFilter - Adds a filter to the edit input pipe.
|
|
146
|
-
* @property {function} removeFilter - Removes a filter from the edit input pipe.
|
|
147
|
-
* @property {function} clearFilters - Clears all filters from the edit input pipe.
|
|
148
|
-
* @property {function} setPriority - Sets the priority of the edit input pipe.
|
|
149
|
-
* @property {function} getStatus - Retrieves the current status of the edit input pipe.
|
|
150
|
-
*/
|
|
117
|
+
/** Converts the text of the editor before it is written into the model, e.g. {@link editInputPipeForNumber}. */
|
|
151
118
|
editInputPipe?: editInputPipe;
|
|
152
119
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnDefIf } from './column-def.if.js';
|
|
2
|
+
|
|
3
|
+
/** Sets the API visibility of a column and rebuilds its `isVisible`. */
|
|
4
|
+
export declare function setApiColumnVisibility(columnDef: ColumnDefIf, visible: boolean): void;
|
|
5
|
+
/** Sets the header group visibility of a column and rebuilds its `isVisible`. */
|
|
6
|
+
export declare function setGroupColumnVisibility(columnDef: ColumnDefIf, isVisible: (() => boolean) | undefined): void;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the column is shown apart from a collapsed header group: hidden with `setColumnVisible(…, false)` or by its
|
|
9
|
+
* own `isVisible` (e.g. `FalseFn` in the code) → false.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isApiColumnVisible(columnDef: ColumnDefIf): boolean;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { CoverGridBodyModel } from './areamodel/cover-grid-body-model';
|
|
2
|
-
import { AreaModelIf } from './areamodel/area-model.if';
|
|
3
|
-
import { FilterFunction } from '../common/filter-function';
|
|
4
|
-
import { SortItem } from '../common/sort-item';
|
|
5
|
-
import { AreaIdent } from './area-ident.type';
|
|
6
|
-
import { TableModelIf } from './table-model.if';
|
|
7
|
-
import { TableScope } from '../../table-scope';
|
|
8
|
-
import { ColumnDefIf } from './column/column-def.if';
|
|
9
|
-
import { Padding } from './padding';
|
|
10
|
-
import { SelectionModelIf } from '../../selection/selection-model.if';
|
|
1
|
+
import { CoverGridBodyModel } from './areamodel/cover-grid-body-model.js';
|
|
2
|
+
import { AreaModelIf } from './areamodel/area-model.if.js';
|
|
3
|
+
import { FilterFunction } from '../common/filter-function.js';
|
|
4
|
+
import { SortItem } from '../common/sort-item.js';
|
|
5
|
+
import { AreaIdent } from './area-ident.type.js';
|
|
6
|
+
import { TableModelIf } from './table-model.if.js';
|
|
7
|
+
import { TableScope } from '../../table-scope.js';
|
|
8
|
+
import { ColumnDefIf } from './column/column-def.if.js';
|
|
9
|
+
import { Padding } from './padding.js';
|
|
10
|
+
import { SelectionModelIf } from '../../selection/selection-model.if.js';
|
|
11
11
|
|
|
12
|
+
/** @category Table model */
|
|
12
13
|
export declare class CoverGridTableModel<T> implements TableModelIf {
|
|
13
14
|
bodyModel: CoverGridBodyModel<T>;
|
|
14
15
|
paddingTop: number;
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
import { TableScope } from '../../table-scope';
|
|
1
|
+
import { TableModelIf } from './table-model.if.js';
|
|
2
|
+
import { Padding } from './padding.js';
|
|
3
|
+
import { AreaIdent } from './area-ident.type.js';
|
|
4
|
+
import { AreaModelIf } from './areamodel/area-model.if.js';
|
|
5
|
+
import { SideIdent } from '../side-ident.type.js';
|
|
6
|
+
import { DefaultRowHeightsIf } from '../options/default-row-heights.if.js';
|
|
7
|
+
import { ColumnDefIf } from './column/column-def.if.js';
|
|
8
|
+
import { FilterFunction } from '../common/filter-function.js';
|
|
9
|
+
import { SortItem } from '../common/sort-item.js';
|
|
10
|
+
import { SelectionModelIf } from '../../selection/selection-model.if.js';
|
|
11
|
+
import { GetT } from '../common/get-t.js';
|
|
12
|
+
import { TableScope } from '../../table-scope.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* This is a default implementation of TableModelIf.
|
|
@@ -30,6 +30,8 @@ import { TableScope } from '../../table-scope';
|
|
|
30
30
|
* | footer/west | footer/center | footer/east |
|
|
31
31
|
* +----------------+-------------------+--------------+ </pre>
|
|
32
32
|
*
|
|
33
|
+
*
|
|
34
|
+
* @category Table model
|
|
33
35
|
*/
|
|
34
36
|
export declare class TableModel implements TableModelIf {
|
|
35
37
|
readonly headerAreaModel: AreaModelIf;
|
|
@@ -50,6 +52,10 @@ export declare class TableModel implements TableModelIf {
|
|
|
50
52
|
protected contentWidthInPx: number;
|
|
51
53
|
protected padding: Padding;
|
|
52
54
|
protected xPositions: number[];
|
|
55
|
+
/** false: the header is hidden (height 0), see {@link setHeaderVisible}. */
|
|
56
|
+
protected headerVisible: boolean;
|
|
57
|
+
/** false: the footer is hidden (height 0), see {@link setFooterVisible}. */
|
|
58
|
+
protected footerVisible: boolean;
|
|
53
59
|
constructor(headerAreaModel: AreaModelIf, bodyAreaModel: AreaModelIf, footerAreaModel: AreaModelIf, fixedLeftColumnCount?: number, fixedRightColumnCount?: number, rowCheckboxVisible?: boolean, defaultRowHeights?: DefaultRowHeightsIf, columnDefs?: ColumnDefIf[], columnSizes?: number[], overridingColumnWidth?: number, columnCount?: number, parentSize?: number, // can be important when we have percentage widths,
|
|
54
60
|
getSelectionModel?: GetT<SelectionModelIf>);
|
|
55
61
|
init(): void;
|
|
@@ -62,6 +68,8 @@ export declare class TableModel implements TableModelIf {
|
|
|
62
68
|
getColumnCount(): number;
|
|
63
69
|
/**
|
|
64
70
|
* Sets the width in pixel of a column (by columnIndex) in a table.
|
|
71
|
+
* The width is also stored in the column's ColumnDef (`width` = the new px size), so it survives a host resize
|
|
72
|
+
* (the widths are recalculated from the ColumnDefs then).
|
|
65
73
|
*
|
|
66
74
|
* @param {number} columnIndex - The index of the column.
|
|
67
75
|
* @param {number} width - The desired width of the column.
|
|
@@ -201,16 +209,67 @@ export declare class TableModel implements TableModelIf {
|
|
|
201
209
|
*/
|
|
202
210
|
getBodyModel(): AreaModelIf;
|
|
203
211
|
/**
|
|
204
|
-
* Checks if the footer is visible.
|
|
212
|
+
* Checks if the footer is visible: it has rows and is not hidden with {@link setFooterVisible}.
|
|
205
213
|
*
|
|
206
214
|
* @returns {boolean} True if the footer is visible, false otherwise.
|
|
207
215
|
*/
|
|
208
216
|
isFooterVisibe(): boolean;
|
|
209
217
|
/**
|
|
210
|
-
* Checks if the header area is visible.
|
|
218
|
+
* Checks if the header area is visible: it has rows and is not hidden with {@link setHeaderVisible}.
|
|
211
219
|
* @return {boolean} Returns true if the header area is visible, otherwise false.
|
|
212
220
|
*/
|
|
213
221
|
isHeaderVisibe(): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Shows or hides the header. A hidden header takes no space (the body moves up); its area model and rows stay
|
|
224
|
+
* unchanged, so showing it again restores it. Only changes the model – {@link TableApi.setHeaderVisible} also
|
|
225
|
+
* repaints the table.
|
|
226
|
+
*
|
|
227
|
+
* @param {boolean} visible - false hides the header
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* tableModel.setHeaderVisible?.(false);
|
|
231
|
+
*/
|
|
232
|
+
setHeaderVisible(visible: boolean): void;
|
|
233
|
+
/**
|
|
234
|
+
* Shows or hides the footer. A hidden footer takes no space; its area model and rows stay unchanged.
|
|
235
|
+
* Only changes the model – {@link TableApi.setFooterVisible} also repaints the table.
|
|
236
|
+
*
|
|
237
|
+
* @param {boolean} visible - false hides the footer
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* tableModel.setFooterVisible?.(false);
|
|
241
|
+
*/
|
|
242
|
+
setFooterVisible(visible: boolean): void;
|
|
243
|
+
/**
|
|
244
|
+
* Shows or hides a column. The column keeps its definition, position and width – a hidden column has the width 0
|
|
245
|
+
* ({@link getColumnWidth}), is not rendered, copied or exported; showing it again restores its width.
|
|
246
|
+
*
|
|
247
|
+
* Works through {@link ColumnDefIf.isVisible}: it is replaced by {@link TrueFn} / {@link FalseFn} (an own
|
|
248
|
+
* `isVisible` function of the column is replaced, too). Columns without a column definition can't be hidden.
|
|
249
|
+
* With header groups ({@link AreaModelCellGroups}) the column is shown only if neither this method nor a collapsed
|
|
250
|
+
* group hides it – expanding the group does not bring back a column hidden here, and vice versa.
|
|
251
|
+
* Weight widths (`new Size(1, "weight")`) are shared among the shown columns.
|
|
252
|
+
* Recalculates the content width, the padding (fixed columns) and the x positions. Only changes the model –
|
|
253
|
+
* {@link TableApi.setColumnVisible} also repaints the table.
|
|
254
|
+
*
|
|
255
|
+
* @param {number | string | ColumnDefIf} column - column index (fixed columns included), property or column definition
|
|
256
|
+
* @param {boolean} visible - false hides the column
|
|
257
|
+
* @returns {boolean} false if there is no such column definition
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* tableModel.setColumnVisible?.("category", false);
|
|
261
|
+
*/
|
|
262
|
+
setColumnVisible(column: number | string | ColumnDefIf, visible: boolean): boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Whether a column is shown ({@link ColumnDefIf.isVisible}). Columns without a column definition are always shown.
|
|
265
|
+
*
|
|
266
|
+
* @param {number | string | ColumnDefIf} column - column index, property or column definition
|
|
267
|
+
* @returns {boolean} false for hidden and for unknown columns
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* const hidden = tableModel.isColumnVisible?.("category") === false;
|
|
271
|
+
*/
|
|
272
|
+
isColumnVisible(column: number | string | ColumnDefIf): boolean;
|
|
214
273
|
/**
|
|
215
274
|
* Checks whether the row checkbox is visible.
|
|
216
275
|
*
|
|
@@ -281,6 +340,8 @@ export declare class TableModel implements TableModelIf {
|
|
|
281
340
|
* @return {number} - The converted size value in pixels. returns -1 if unit is not '%' or 'px'.
|
|
282
341
|
*/
|
|
283
342
|
private sizeToPixel;
|
|
343
|
+
/** The column definition for a column index, a property or a column definition of this model. */
|
|
344
|
+
private findColumnDef;
|
|
284
345
|
private arrayMove;
|
|
285
346
|
private recalcContentWidthInPx;
|
|
286
347
|
private calcXPositions;
|
|
@@ -1,11 +1,11 @@
|
|
|
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
|
-
import { TableScope } from '../../table-scope';
|
|
1
|
+
import { Padding } from './padding.js';
|
|
2
|
+
import { AreaIdent } from './area-ident.type.js';
|
|
3
|
+
import { ColumnDefIf } from './column/column-def.if.js';
|
|
4
|
+
import { AreaModelIf } from './areamodel/area-model.if.js';
|
|
5
|
+
import { FilterFunction } from '../common/filter-function.js';
|
|
6
|
+
import { SortItem } from '../common/sort-item.js';
|
|
7
|
+
import { SelectionModelIf } from '../../selection/selection-model.if.js';
|
|
8
|
+
import { TableScope } from '../../table-scope.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The TableModelIf is on one hand a container for the header, body, and footer models
|
|
@@ -24,6 +24,8 @@ import { TableScope } from '../../table-scope';
|
|
|
24
24
|
* | footer/west | footer/center | footer/east |
|
|
25
25
|
* +----------------+-------------------+--------------+</pre>
|
|
26
26
|
*
|
|
27
|
+
*
|
|
28
|
+
* @category Table model
|
|
27
29
|
*/
|
|
28
30
|
export interface TableModelIf {
|
|
29
31
|
/**
|
|
@@ -111,6 +113,48 @@ export interface TableModelIf {
|
|
|
111
113
|
* @returns {boolean} Returns true if the footer is visible, otherwise returns false.
|
|
112
114
|
*/
|
|
113
115
|
isFooterVisibe(): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Optional: shows or hides the header (height 0, the rows stay in the model). Implemented by {@link TableModel};
|
|
118
|
+
* {@link TableApi.setHeaderVisible} uses it and repaints.
|
|
119
|
+
*
|
|
120
|
+
* @param {boolean} visible - false hides the header
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* tableModel.setHeaderVisible?.(false);
|
|
124
|
+
*/
|
|
125
|
+
setHeaderVisible?(visible: boolean): void;
|
|
126
|
+
/**
|
|
127
|
+
* Optional: shows or hides the footer (height 0, the rows stay in the model). Implemented by {@link TableModel};
|
|
128
|
+
* {@link TableApi.setFooterVisible} uses it and repaints.
|
|
129
|
+
*
|
|
130
|
+
* @param {boolean} visible - false hides the footer
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* tableModel.setFooterVisible?.(false);
|
|
134
|
+
*/
|
|
135
|
+
setFooterVisible?(visible: boolean): void;
|
|
136
|
+
/**
|
|
137
|
+
* Optional: shows or hides a column (width 0, definition, position and width are kept). Implemented by
|
|
138
|
+
* {@link TableModel}; {@link TableApi.setColumnVisible} uses it and repaints.
|
|
139
|
+
*
|
|
140
|
+
* @param {number | string | ColumnDefIf} column - column index, property or column definition
|
|
141
|
+
* @param {boolean} visible - false hides the column
|
|
142
|
+
* @returns {boolean} false if there is no such column definition
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* tableModel.setColumnVisible?.(3, false);
|
|
146
|
+
*/
|
|
147
|
+
setColumnVisible?(column: number | string | ColumnDefIf, visible: boolean): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Optional: whether a column is shown. Implemented by {@link TableModel}.
|
|
150
|
+
*
|
|
151
|
+
* @param {number | string | ColumnDefIf} column - column index, property or column definition
|
|
152
|
+
* @returns {boolean} false for hidden and for unknown columns
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* tableModel.isColumnVisible?.("category");
|
|
156
|
+
*/
|
|
157
|
+
isColumnVisible?(column: number | string | ColumnDefIf): boolean;
|
|
114
158
|
/**
|
|
115
159
|
* Determines if the row checkbox is visible.
|
|
116
160
|
*
|
package/lib/table/ele-scope.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
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';
|
|
1
|
+
import { ConvenienceDomService } from './service/convenience-dom.service.js';
|
|
2
|
+
import { DivScope } from './data/div-scope.type.js';
|
|
3
|
+
import { TableModelIf } from './data/tablemodel/table-model.if.js';
|
|
4
|
+
import { TableOptionsIf } from './data/options/table-options.if.js';
|
|
5
|
+
import { GeoData } from './data/geo-data.js';
|
|
6
|
+
import { AriaIds } from './aria/aria-ids.js';
|
|
7
|
+
import { AreaIdent } from './data/tablemodel/area-ident.type.js';
|
|
8
|
+
import { SideIdent } from './data/side-ident.type.js';
|
|
9
|
+
import { TableOverlay } from './overlay/table-overlay.js';
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* Represents a store for HTML elements.
|
|
9
13
|
* @class
|
|
14
|
+
*
|
|
15
|
+
* @category Internals
|
|
10
16
|
*/
|
|
11
17
|
export declare class EleScope {
|
|
12
18
|
readonly hostElement: HTMLDivElement;
|
|
@@ -43,7 +49,49 @@ export declare class EleScope {
|
|
|
43
49
|
protected areaBodyWestGeo: GeoData;
|
|
44
50
|
protected areaBodyCenterGeo: GeoData;
|
|
45
51
|
protected areaBodyEastGeo: GeoData;
|
|
52
|
+
/** The IDs this table uses for ARIA references (prefix from the host id). @since 1.1.91 */
|
|
53
|
+
readonly ariaIds: AriaIds;
|
|
54
|
+
/** The overlay layer over the body ("Loading…", "No rows to show"). @since 1.1.92 */
|
|
55
|
+
readonly tableOverlay: TableOverlay;
|
|
46
56
|
constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, dom: ConvenienceDomService, tableOptions: TableOptionsIf);
|
|
57
|
+
/**
|
|
58
|
+
* Shows the overlay that fits the current state (requested by the API, or "no rows" for an empty body).
|
|
59
|
+
* Overwritten in {@link RenderScope}.
|
|
60
|
+
*
|
|
61
|
+
* @since 1.1.92
|
|
62
|
+
*/
|
|
63
|
+
protected updateOverlay(): void;
|
|
64
|
+
/** The values of the host attributes before the table changed them (restored by {@link removeHostAria}). */
|
|
65
|
+
private readonly hostAttributesBefore;
|
|
66
|
+
/**
|
|
67
|
+
* Sets (or with `undefined` removes) an ARIA attribute of the host and remembers the app's own value the first
|
|
68
|
+
* time, so that {@link removeHostAria} can restore it (e.g. an `aria-label` the app set on an Angular host).
|
|
69
|
+
*
|
|
70
|
+
* @since 1.1.91
|
|
71
|
+
*/
|
|
72
|
+
protected setHostAriaAttribute(key: string, value: string | undefined): void;
|
|
73
|
+
/**
|
|
74
|
+
* Gives an ARIA attribute of the host back the value it had before the table changed it (e.g. `aria-busy` after
|
|
75
|
+
* loading), or removes it if the host had none.
|
|
76
|
+
*
|
|
77
|
+
* @since 1.1.92
|
|
78
|
+
*/
|
|
79
|
+
protected restoreHostAriaAttribute(key: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Removes the ARIA attributes the table has set on the host element (see {@link initHostAria}).
|
|
82
|
+
*
|
|
83
|
+
* @since 1.1.91
|
|
84
|
+
*/
|
|
85
|
+
protected removeHostAria(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Sets the static ARIA attributes of the host element: `role="grid"` (a tree body: `"treegrid"`) and its name
|
|
88
|
+
* and description from the table options. Counts and the active cell follow with every render pass.
|
|
89
|
+
*
|
|
90
|
+
* @since 1.1.91
|
|
91
|
+
*/
|
|
92
|
+
protected initHostAria(): void;
|
|
93
|
+
/** The element that holds the rows of an area (`DivScope.child`). */
|
|
94
|
+
protected getAreaChild(area: AreaIdent, side: SideIdent): HTMLDivElement;
|
|
47
95
|
/**
|
|
48
96
|
* Adjusts the containers and rows of the table based on the current state.
|
|
49
97
|
*
|
|
@@ -1,16 +1,24 @@
|
|
|
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
|
-
import { SelectionModelIf } from './selection/selection-model.if';
|
|
6
|
-
import { FocusModelIf } from './focus/focus-model.if';
|
|
1
|
+
import { GeModelChangeEvent } from './data/common/event/ge-model-change-event.js';
|
|
2
|
+
import { GeMouseEvent } from './data/common/event/ge-mouse-event.js';
|
|
3
|
+
import { GeScrollEvent } from './data/common/event/ge-scroll-event.js';
|
|
4
|
+
import { EventListenerIf } from './event-listener.if.js';
|
|
5
|
+
import { SelectionModelIf } from './selection/selection-model.if.js';
|
|
6
|
+
import { FocusModelIf } from './focus/focus-model.if.js';
|
|
7
|
+
import { GeStateChangeEvent } from './data/common/event/ge-state-change-event.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
* It provides empty implementations for all the event listener methods.
|
|
10
|
+
* Empty implementation of {@link EventListenerIf} – extend it and override only the events you need.
|
|
11
11
|
*
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
12
|
+
* @example
|
|
13
|
+
* class TreeEvents extends EventAdapter {
|
|
14
|
+
* override onCheckboxChanged(rows: any[]): void {
|
|
15
|
+
* console.log(`${rows.length} rows checked`);
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* @see Training: [Events and a context menu of your own](https://gui.expert/training/events-and-context-menu/)
|
|
20
|
+
*
|
|
21
|
+
* @category Events
|
|
14
22
|
*/
|
|
15
23
|
export declare class EventAdapter implements EventListenerIf {
|
|
16
24
|
onCheckboxChanged(_evt: any[]): void;
|
|
@@ -23,4 +31,6 @@ export declare class EventAdapter implements EventListenerIf {
|
|
|
23
31
|
onScroll(_evt: GeScrollEvent): void;
|
|
24
32
|
onSelectionChanged(_model: SelectionModelIf): void;
|
|
25
33
|
onFocusChanged(_model: FocusModelIf): void;
|
|
34
|
+
/** @since 1.1.92 */
|
|
35
|
+
onStateChanged(_evt: GeStateChangeEvent): void;
|
|
26
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EventAdapter } from './event-adapter';
|
|
1
|
+
import { EventAdapter } from './event-adapter.js';
|
|
2
2
|
|
|
3
|
+
/** @category Events */
|
|
3
4
|
export declare class EventCheckboxChangedHandler extends EventAdapter {
|
|
4
5
|
private readonly onCheckboxChangedCallback;
|
|
5
6
|
constructor(onCheckboxChangedCallback: (evt: any[]) => void);
|