@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,15 +1,18 @@
|
|
|
1
|
-
import { DefaultRowHeightsIf } from './default-row-heights.if';
|
|
2
|
-
import { TreeOptionsIf } from './tree-options.if';
|
|
3
|
-
import { FilterFunction } from '../common/filter-function';
|
|
4
|
-
import { SortState } from '../common/sort-state.type';
|
|
5
|
-
import { SortedOptionsIf } from './sorted-options.if';
|
|
6
|
-
import { AutoRestoreOptionsIf } from './auto-restore-options.if';
|
|
7
|
-
import { GetEditRenderer } from '../../renderer/edit/edit-cell-renderer.type';
|
|
8
|
-
import { SelectionModelIf } from '../../selection/selection-model.if';
|
|
9
|
-
import { GetT } from '../common/get-t';
|
|
10
|
-
import { FocusModelIf } from '../../focus/focus-model.if';
|
|
11
|
-
import { ShortcutActionIdMapping } from '../../action/shortcut-actionid-mapping.type';
|
|
12
|
-
import { HeaderGroupOptionsIf } from './header-group-options.if';
|
|
1
|
+
import { DefaultRowHeightsIf } from './default-row-heights.if.js';
|
|
2
|
+
import { TreeOptionsIf } from './tree-options.if.js';
|
|
3
|
+
import { FilterFunction } from '../common/filter-function.js';
|
|
4
|
+
import { SortState } from '../common/sort-state.type.js';
|
|
5
|
+
import { SortedOptionsIf } from './sorted-options.if.js';
|
|
6
|
+
import { AutoRestoreOptionsIf } from './auto-restore-options.if.js';
|
|
7
|
+
import { GetEditRenderer } from '../../renderer/edit/edit-cell-renderer.type.js';
|
|
8
|
+
import { SelectionModelIf } from '../../selection/selection-model.if.js';
|
|
9
|
+
import { GetT } from '../common/get-t.js';
|
|
10
|
+
import { FocusModelIf } from '../../focus/focus-model.if.js';
|
|
11
|
+
import { ShortcutActionIdMapping } from '../../action/shortcut-actionid-mapping.type.js';
|
|
12
|
+
import { HeaderGroupOptionsIf } from './header-group-options.if.js';
|
|
13
|
+
import { AriaTextsIf } from '../../aria/aria-texts.if.js';
|
|
14
|
+
import { TableStateIf } from '../../state/table-state.if.js';
|
|
15
|
+
import { OverlayOptionsIf } from './overlay-options.if.js';
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Represents the options for configuring a table.
|
|
@@ -46,6 +49,20 @@ import { HeaderGroupOptionsIf } from './header-group-options.if';
|
|
|
46
49
|
* | getSelectionModel | Retrieves the selection model for a specific object. |
|
|
47
50
|
* | getFocusModel | Retrieves the focus model of the component. |
|
|
48
51
|
* | shortcutActionIdMapping | Represents a mapping of shortcut action IDs. |
|
|
52
|
+
*
|
|
53
|
+
* Start from the defaults in {@link TableOptions} and change only what you need.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const tableOptions: TableOptionsIf = {
|
|
57
|
+
* ...new TableOptions(),
|
|
58
|
+
* hoverColumnVisible: false,
|
|
59
|
+
* columnsDraggable: false,
|
|
60
|
+
* defaultRowHeights: { header: 40, body: 30, footer: 36 }
|
|
61
|
+
* };
|
|
62
|
+
*
|
|
63
|
+
* @see Training: [TableOptions: behaviour and look](https://gui.expert/training/table-options/)
|
|
64
|
+
*
|
|
65
|
+
* @category Options
|
|
49
66
|
*/
|
|
50
67
|
export interface TableOptionsIf {
|
|
51
68
|
/**
|
|
@@ -160,72 +177,163 @@ export interface TableOptionsIf {
|
|
|
160
177
|
*/
|
|
161
178
|
footerVerticalSeparator: boolean;
|
|
162
179
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
* @typedef {number[]} DefaultRowHeightsIf
|
|
166
|
-
* @description An array of numbers representing the default height for each row in a table.
|
|
180
|
+
* Row heights of header, body and footer in px (default 34 / 34 / 34). Read by {@link TableFactory.createTableModel}
|
|
181
|
+
* when it creates the area models – pass the options there as `tableOptions`, too.
|
|
167
182
|
*/
|
|
168
183
|
defaultRowHeights: DefaultRowHeightsIf;
|
|
184
|
+
/** Reserved – currently not evaluated (tree tables always show the expand-all / collapse-all icon in the top left header cell). */
|
|
169
185
|
headerToggleExpandCollapseIcons: boolean;
|
|
186
|
+
/** Icons and behaviour of tree tables (arrows, indentation). See {@link TreeOptionsIf}. */
|
|
170
187
|
treeOptions: TreeOptionsIf;
|
|
188
|
+
/** Icons of collapsible header groups ({@link AreaModelCellGroups}). */
|
|
171
189
|
headerGroupOptions: HeaderGroupOptionsIf;
|
|
172
190
|
/**
|
|
173
191
|
* Indicates whether to show checkbox without an extra column.
|
|
174
192
|
* If true and the row is checkable, a checkbox is rendered in the first column.
|
|
175
193
|
* If false and the row is checkable, a checkbox is rendered in an extra column left to the first column.
|
|
176
194
|
*
|
|
177
|
-
* @
|
|
195
|
+
* @see Training: [Tree table with checkboxes](https://gui.expert/training/tree-table/)
|
|
178
196
|
*/
|
|
179
197
|
showCheckboxWihoutExtraColumn: boolean;
|
|
180
198
|
/**
|
|
181
|
-
*
|
|
199
|
+
* Your filter: called for every row, return `true` to show it. After changing the filter criteria call
|
|
200
|
+
* {@link TableApi.externalFilterChanged} – the table filters again and keeps the sort order.
|
|
182
201
|
*
|
|
183
|
-
* @
|
|
202
|
+
* @example
|
|
203
|
+
* const filter = { text: "" };
|
|
204
|
+
* const tableOptions: TableOptionsIf = {
|
|
205
|
+
* ...new TableOptions(),
|
|
206
|
+
* externalFilterFunction: (order: Order) => order.customer.toLowerCase().includes(filter.text)
|
|
207
|
+
* };
|
|
208
|
+
* searchInput.addEventListener("input", () => {
|
|
209
|
+
* filter.text = searchInput.value.toLowerCase();
|
|
210
|
+
* tableApi.externalFilterChanged();
|
|
211
|
+
* });
|
|
212
|
+
*
|
|
213
|
+
* @see Training: [Filtering with a live search](https://gui.expert/training/filtering/)
|
|
184
214
|
*/
|
|
185
215
|
externalFilterFunction: FilterFunction<any> | undefined;
|
|
216
|
+
/** The sort icons shown in sortable header cells. */
|
|
217
|
+
sortedOptions: SortedOptionsIf;
|
|
186
218
|
/**
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* @class
|
|
190
|
-
* @classdesc The SortedOptions represents a class that defines sorted icons, which will displayed in the header (if column is sortable).
|
|
219
|
+
* The order of the sort states on repeated double-clicks on a header, default `["asc", "desc"]`.
|
|
220
|
+
* Add `""` to get "unsorted" as third state. Per column: {@link ColumnDefIf.sortStatesOrder}.
|
|
191
221
|
*/
|
|
192
|
-
|
|
222
|
+
sortOrder: SortState[];
|
|
193
223
|
/**
|
|
194
|
-
*
|
|
224
|
+
* Remember sorting, scroll position and expanded tree nodes in `localStorage`. Off by default.
|
|
195
225
|
*
|
|
196
|
-
* @
|
|
226
|
+
* @see {@link AutoRestoreOptions}
|
|
227
|
+
* @see Training: [Remember the state](https://gui.expert/training/persist-state/)
|
|
197
228
|
*/
|
|
198
|
-
sortOrder: SortState[];
|
|
199
229
|
autoRestoreOptions?: AutoRestoreOptionsIf<any>;
|
|
200
230
|
/**
|
|
201
|
-
*
|
|
231
|
+
* The editor for a cell, if the column has no own {@link ColumnDefIf.getEditRenderer}.
|
|
232
|
+
* Default: a text input ({@link InputCellRenderer}).
|
|
202
233
|
*
|
|
203
|
-
* @
|
|
204
|
-
* @name getEditRenderer
|
|
205
|
-
* @param {string} action - The action for which to retrieve the edit renderer.
|
|
206
|
-
* @returns {GetEditRenderer} - The edit renderer for the specified action.
|
|
234
|
+
* @see Training: [Inline editing](https://gui.expert/training/inline-editing/)
|
|
207
235
|
*/
|
|
208
236
|
getEditRenderer?: GetEditRenderer;
|
|
209
237
|
/**
|
|
210
|
-
*
|
|
238
|
+
* Returns the selection model of the table. Without it every table creates its own `new SelectionModel()`
|
|
239
|
+
* of type `"none"` – nothing can be selected.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* const selectionModel = new SelectionModel("row", "single");
|
|
243
|
+
* const tableOptions: TableOptionsIf = { ...new TableOptions(), getSelectionModel: () => selectionModel };
|
|
211
244
|
*
|
|
212
|
-
* @
|
|
213
|
-
* @return {GetT<SelectionModelIf>} - The selection model for the given object.
|
|
245
|
+
* @see Training: [Select cells, rows and ranges](https://gui.expert/training/selection-and-copy/)
|
|
214
246
|
*/
|
|
215
247
|
getSelectionModel?: GetT<SelectionModelIf>;
|
|
248
|
+
/** Returns the focus model of the table. Default: every table creates its own {@link FocusModel}. */
|
|
249
|
+
getFocusModel?: GetT<FocusModelIf>;
|
|
250
|
+
/**
|
|
251
|
+
* Own keyboard shortcuts: maps a shortcut (e.g. `"ctrl+c"`, `"f2"`) to an {@link ActionId}.
|
|
252
|
+
* Default: {@link WindowsShortcutActionIdMapping} resp. {@link OsxShortcutActionIdMapping}.
|
|
253
|
+
*/
|
|
254
|
+
shortcutActionIdMapping?: ShortcutActionIdMapping;
|
|
255
|
+
/** Switch off all keyboard shortcuts of the table (copy, select all, navigation, F2 …). */
|
|
256
|
+
shortcutActionsDisabled: boolean;
|
|
216
257
|
/**
|
|
217
|
-
*
|
|
258
|
+
* The accessible name of the table for screen readers (`aria-label` of the grid), e.g. `"Orders"`.
|
|
259
|
+
* Prefer {@link ariaLabelledBy} if the page shows a title.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* const tableOptions: TableOptionsIf = { ...new TableOptions(), ariaLabel: "Orders" };
|
|
218
263
|
*
|
|
219
|
-
* @
|
|
264
|
+
* @since 1.1.91
|
|
265
|
+
* @see Training: [Accessible tables: keyboard and screen readers](https://gui.expert/training/accessibility/)
|
|
220
266
|
*/
|
|
221
|
-
|
|
267
|
+
ariaLabel?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The id of the element that names the table, e.g. a heading above it (`aria-labelledby` of the grid).
|
|
270
|
+
* Takes precedence over {@link ariaLabel}.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* // <h2 id="orders-title">Orders 2026</h2> <div class="table-div"></div>
|
|
274
|
+
* const tableOptions: TableOptionsIf = { ...new TableOptions(), ariaLabelledBy: "orders-title" };
|
|
275
|
+
*
|
|
276
|
+
* @since 1.1.91
|
|
277
|
+
*/
|
|
278
|
+
ariaLabelledBy?: string;
|
|
222
279
|
/**
|
|
223
|
-
*
|
|
280
|
+
* The id of an element that describes the table, e.g. a hint below it (`aria-describedby` of the grid).
|
|
224
281
|
*
|
|
225
|
-
* @
|
|
226
|
-
*
|
|
227
|
-
*
|
|
282
|
+
* @example
|
|
283
|
+
* // <p id="orders-hint">Double click a header to sort.</p>
|
|
284
|
+
* const tableOptions: TableOptionsIf = { ...new TableOptions(), ariaDescribedBy: "orders-hint" };
|
|
285
|
+
*
|
|
286
|
+
* @since 1.1.91
|
|
228
287
|
*/
|
|
229
|
-
|
|
230
|
-
|
|
288
|
+
ariaDescribedBy?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Own texts for screen readers – announcements (sorting, filter, copy, select all) and the names of the row
|
|
291
|
+
* checkboxes and header group toggles. Functions you leave out keep their English default ({@link AriaTexts}).
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* const tableOptions: TableOptionsIf = {
|
|
295
|
+
* ...new TableOptions(),
|
|
296
|
+
* ariaTexts: {
|
|
297
|
+
* filtered: (rowCount: number) => `${rowCount} Zeilen`,
|
|
298
|
+
* copied: (cellCount: number) => `${cellCount} Zellen kopiert`,
|
|
299
|
+
* selectRow: (rowNumber: number) => `Zeile ${rowNumber} auswählen`,
|
|
300
|
+
* },
|
|
301
|
+
* };
|
|
302
|
+
*
|
|
303
|
+
* @since 1.1.91
|
|
304
|
+
*/
|
|
305
|
+
ariaTexts?: Partial<AriaTextsIf>;
|
|
306
|
+
/**
|
|
307
|
+
* Texts and behaviour of the overlays over the body: "Loading…" ({@link TableApi.showLoadingOverlay}),
|
|
308
|
+
* "No rows to show" (empty body, automatic) and "No matching rows" (the filter hides all rows).
|
|
309
|
+
* Fields you leave out keep their default ({@link OverlayOptions}).
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* const tableOptions: TableOptionsIf = {
|
|
313
|
+
* ...new TableOptions(),
|
|
314
|
+
* overlayOptions: { noRowsText: "No orders yet", blockInteractionWhileLoading: false },
|
|
315
|
+
* };
|
|
316
|
+
*
|
|
317
|
+
* @since 1.1.92
|
|
318
|
+
*/
|
|
319
|
+
overlayOptions?: Partial<OverlayOptionsIf>;
|
|
320
|
+
/**
|
|
321
|
+
* The state the table starts with: column layout, sorting, tree, checked and selected rows … – e.g. loaded from
|
|
322
|
+
* your server ({@link TableApi.getState}, {@link EventListenerIf.onStateChanged}). A state stored by
|
|
323
|
+
* {@link autoRestoreOptions} wins over it, part by part.
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* const saved = (await (await fetch("/api/prefs/orders")).json()) as TableStateIf | null;
|
|
327
|
+
* const tableOptions: TableOptionsIf = { ...new TableOptions(), initialState: saved ?? undefined };
|
|
328
|
+
*
|
|
329
|
+
* @since 1.1.92
|
|
330
|
+
*/
|
|
331
|
+
initialState?: Partial<TableStateIf>;
|
|
332
|
+
/**
|
|
333
|
+
* Delay in ms between the last change of the state (resize, sort, scroll …) and
|
|
334
|
+
* {@link EventListenerIf.onStateChanged} / the save of {@link autoRestoreOptions}. Default 300.
|
|
335
|
+
*
|
|
336
|
+
* @since 1.1.92
|
|
337
|
+
*/
|
|
338
|
+
stateChangedDebounceDelay?: number;
|
|
231
339
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IconIf } from './icon.if';
|
|
2
|
-
import { TreeOptionsIf } from './tree-options.if';
|
|
1
|
+
import { IconIf } from './icon.if.js';
|
|
2
|
+
import { TreeOptionsIf } from './tree-options.if.js';
|
|
3
3
|
|
|
4
|
+
/** @category Options */
|
|
4
5
|
export declare class TreeOptions implements TreeOptionsIf {
|
|
5
6
|
arrowExpanded: IconIf;
|
|
6
7
|
arrowCollapsed: IconIf;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconIf } from './icon.if';
|
|
1
|
+
import { IconIf } from './icon.if.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This interface `TreeOptionsIf` represents the specific configuration and properties of a tree component, usually displayed in a User Interface (UI).
|
|
@@ -40,6 +40,8 @@ import { IconIf } from './icon.if';
|
|
|
40
40
|
* classes: ['placeholder-icon-class'],
|
|
41
41
|
* },
|
|
42
42
|
* };
|
|
43
|
+
*
|
|
44
|
+
* @category Options
|
|
43
45
|
*/
|
|
44
46
|
export interface TreeOptionsIf {
|
|
45
47
|
arrowExpandCollapseAll: IconIf;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { TableModelAndOptionsIf } from './table-model-and-options.if';
|
|
2
|
-
import { TableModelIf } from './tablemodel/table-model.if';
|
|
3
|
-
import { TableOptions } from './options/table-options';
|
|
1
|
+
import { TableModelAndOptionsIf } from './table-model-and-options.if.js';
|
|
2
|
+
import { TableModelIf } from './tablemodel/table-model.if.js';
|
|
3
|
+
import { TableOptions } from './options/table-options.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Container object for one table model and one table options object.
|
|
7
|
+
*
|
|
8
|
+
* @category Table model
|
|
7
9
|
*/
|
|
8
10
|
export declare class TableModelAndOptions implements TableModelAndOptionsIf {
|
|
9
11
|
tableModel: TableModelIf;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { TableModelIf } from './tablemodel/table-model.if';
|
|
2
|
-
import { TableOptions } from './options/table-options';
|
|
1
|
+
import { TableModelIf } from './tablemodel/table-model.if.js';
|
|
2
|
+
import { TableOptions } from './options/table-options.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Interface for a container object for one table model and one table options object.
|
|
6
|
+
*
|
|
7
|
+
* @category Table model
|
|
6
8
|
*/
|
|
7
9
|
export interface TableModelAndOptionsIf {
|
|
8
10
|
tableModel: TableModelIf;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The AreaIdent is an identifier for the three areas : header, body, and footer.
|
|
3
|
+
*
|
|
4
|
+
* @category Area models
|
|
3
5
|
*/
|
|
4
6
|
export type AreaIdent = "header" | "body" | "footer";
|
|
5
7
|
/**
|
|
6
8
|
* Converts a string to the identifier of type AreaIdent.
|
|
7
9
|
* @param s should be "header"|"body"|"footer". The fallback return value is 'body'
|
|
10
|
+
*
|
|
11
|
+
* @category Area models
|
|
8
12
|
*/
|
|
9
13
|
export declare const getAreaIdentByString: (s: string | null) => AreaIdent;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
2
|
-
import { AreaModelIf } from './area-model.if';
|
|
3
|
-
import { CheckedType } from '../../common/checked-type';
|
|
4
|
-
import { ColumnDefIf } from '../column/column-def.if';
|
|
5
|
-
import { AreaIdent } from '../area-ident.type';
|
|
6
|
-
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if';
|
|
7
|
-
import { FilterFunction } from '../../common/filter-function';
|
|
8
|
-
import { SortItem } from '../../common/sort-item';
|
|
9
|
-
import { HasDefaultRowHeightIf } from './has-default-row-height-if';
|
|
1
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if.js';
|
|
2
|
+
import { AreaModelIf } from './area-model.if.js';
|
|
3
|
+
import { CheckedType } from '../../common/checked-type.js';
|
|
4
|
+
import { ColumnDefIf } from '../column/column-def.if.js';
|
|
5
|
+
import { AreaIdent } from '../area-ident.type.js';
|
|
6
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if.js';
|
|
7
|
+
import { FilterFunction } from '../../common/filter-function.js';
|
|
8
|
+
import { SortItem } from '../../common/sort-item.js';
|
|
9
|
+
import { HasDefaultRowHeightIf } from './has-default-row-height-if.js';
|
|
10
10
|
|
|
11
|
+
/** @category Area models */
|
|
11
12
|
export declare abstract class AbstractAreaModel<T> implements AreaModelIf, HasDefaultRowHeightIf {
|
|
12
13
|
areaIdent: AreaIdent;
|
|
13
14
|
protected columnDefs: ColumnDefIf[];
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { AbstractAreaModel } from './abstract-area-model';
|
|
2
|
-
import { AreaIdent } from '../area-ident.type';
|
|
3
|
-
import { ColumnDefIf } from '../column/column-def.if';
|
|
4
|
-
import { FilterFunction } from '../../common/filter-function';
|
|
1
|
+
import { AbstractAreaModel } from './abstract-area-model.js';
|
|
2
|
+
import { AreaIdent } from '../area-ident.type.js';
|
|
3
|
+
import { ColumnDefIf } from '../column/column-def.if.js';
|
|
4
|
+
import { FilterFunction } from '../../common/filter-function.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Represents a model for an area containing a two-dimensional array of data.
|
|
8
8
|
* @template T - The type of data in the array.
|
|
9
|
+
*
|
|
10
|
+
* @category Area models
|
|
9
11
|
*/
|
|
10
12
|
export declare class AreaModelArrayOfArrays<T> extends AbstractAreaModel<T[][]> {
|
|
11
13
|
areaIdent: AreaIdent;
|
|
@@ -16,6 +18,13 @@ export declare class AreaModelArrayOfArrays<T> extends AbstractAreaModel<T[][]>
|
|
|
16
18
|
constructor(areaIdent: AreaIdent, arr: T[][], defaultRowHeight: number, columnDefs?: ColumnDefIf[]);
|
|
17
19
|
externalFilterChanged(predictFn: FilterFunction<any>): void;
|
|
18
20
|
getRowCount(): number;
|
|
21
|
+
/**
|
|
22
|
+
* The number of all rows, without the external filter.
|
|
23
|
+
*
|
|
24
|
+
* @returns {number} the length of the array
|
|
25
|
+
* @since 1.1.92
|
|
26
|
+
*/
|
|
27
|
+
getUnfilteredRowCount(): number;
|
|
19
28
|
getValueAt(rowIndex: number, columnIndex: number): any;
|
|
20
29
|
setValue(rowIndex: number, columnIndex: number, value: any): boolean;
|
|
21
30
|
getRowByIndex(rowIndex: number): any;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { AreaIdent } from '../area-ident.type';
|
|
2
|
-
import { ColumnDefIf } from '../column/column-def.if';
|
|
3
|
-
import { AreaModelIf } from './area-model.if';
|
|
4
|
-
import { CellGroupIf } from '../cellgroup/cell-group.if';
|
|
5
|
-
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if';
|
|
6
|
-
import { SortItem } from '../../common/sort-item';
|
|
7
|
-
import { FilterFunction } from '../../common/filter-function';
|
|
8
|
-
import { CellRendererIf } from '../../../renderer/cell-render.if';
|
|
9
|
-
import { CheckedType } from '../../common/checked-type';
|
|
10
|
-
import { CellGroupExt } from '../cellgroup/cell-group-ext';
|
|
11
|
-
import { MouseTargetData } from '../../event/mouse-target-data';
|
|
12
|
-
import { HeaderGroupOptionsIf } from '../../options/header-group-options.if';
|
|
1
|
+
import { AreaIdent } from '../area-ident.type.js';
|
|
2
|
+
import { ColumnDefIf } from '../column/column-def.if.js';
|
|
3
|
+
import { AreaModelIf } from './area-model.if.js';
|
|
4
|
+
import { CellGroupIf } from '../cellgroup/cell-group.if.js';
|
|
5
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if.js';
|
|
6
|
+
import { SortItem } from '../../common/sort-item.js';
|
|
7
|
+
import { FilterFunction } from '../../common/filter-function.js';
|
|
8
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if.js';
|
|
9
|
+
import { CheckedType } from '../../common/checked-type.js';
|
|
10
|
+
import { CellGroupExt } from '../cellgroup/cell-group-ext.js';
|
|
11
|
+
import { MouseTargetData } from '../../event/mouse-target-data.js';
|
|
12
|
+
import { HeaderGroupOptionsIf } from '../../options/header-group-options.if.js';
|
|
13
|
+
import { TableHeaderGroupStateIf } from '../../../state/table-state.if.js';
|
|
13
14
|
|
|
15
|
+
/** @category Header groups */
|
|
14
16
|
export declare class AreaModelCellGroups implements AreaModelIf {
|
|
15
17
|
readonly areaIdent: AreaIdent;
|
|
16
18
|
readonly groups: CellGroupIf[];
|
|
@@ -55,4 +57,34 @@ export declare class AreaModelCellGroups implements AreaModelIf {
|
|
|
55
57
|
setRowChecked(_rowIndex: number, _checked: boolean): void;
|
|
56
58
|
setValue(_rowIndex: number, _columnIndex: number, _value: any): boolean;
|
|
57
59
|
toggleHeaderGroup(mouseTargetData: MouseTargetData): ColumnDefIf[];
|
|
60
|
+
/**
|
|
61
|
+
* The header groups the user can collapse (`toggle: true`, not `visibility: "always"`) with their id
|
|
62
|
+
* ({@link CellGroupIf.id}, otherwise the path of the labels, e.g. `"Customer"` or `"2026/Q1"`; a second group with
|
|
63
|
+
* the same path gets `#2`) and their state.
|
|
64
|
+
*
|
|
65
|
+
* @returns {TableHeaderGroupStateIf[]} id and `closed` per group, in header order
|
|
66
|
+
* @example
|
|
67
|
+
* const header = tableApi.getTableModel().getAreaModel("header") as AreaModelCellGroups;
|
|
68
|
+
* console.log(header.getToggleGroupStates()); // [{ id: "Customer", closed: false }]
|
|
69
|
+
* @since 1.1.92
|
|
70
|
+
*/
|
|
71
|
+
getToggleGroupStates(): TableHeaderGroupStateIf[];
|
|
72
|
+
/**
|
|
73
|
+
* Collapses or expands a header group by its id (see {@link getToggleGroupStates}) and returns the column
|
|
74
|
+
* definitions to use from now on – like a click on its toggle. {@link TableApi.setHeaderGroupCollapsed} does this
|
|
75
|
+
* and repaints.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} id - the id of the group
|
|
78
|
+
* @param {boolean} closed - true = collapse
|
|
79
|
+
* @returns {ColumnDefIf[] | undefined} the merged column definitions, `undefined` if there is no such group
|
|
80
|
+
* @since 1.1.92
|
|
81
|
+
*/
|
|
82
|
+
setGroupClosed(id: string, closed: boolean): ColumnDefIf[] | undefined;
|
|
83
|
+
/** The toggleable groups by id (header order). */
|
|
84
|
+
private getToggleGroups;
|
|
85
|
+
/**
|
|
86
|
+
* Keep the existing ColumnDef objects (width, classes, renderers, sorting …) – only their visibility
|
|
87
|
+
* comes from the rebuilt groups. Fresh defs would reset every width to the default (100 px).
|
|
88
|
+
*/
|
|
89
|
+
private mergeColumnDefs;
|
|
58
90
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
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';
|
|
1
|
+
import { AreaModelIf } from './area-model.if.js';
|
|
2
|
+
import { CellRendererIf } from '../../../renderer/cell-render.if.js';
|
|
3
|
+
import { CheckedType } from '../../common/checked-type.js';
|
|
4
|
+
import { CheckboxModelIf } from '../../../checkbox/checkbox-model.if.js';
|
|
5
|
+
import { FilterFunction } from '../../common/filter-function.js';
|
|
6
|
+
import { SortItem } from '../../common/sort-item.js';
|
|
7
|
+
import { AreaIdent } from '../area-ident.type.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* An invisible model, which is used internally for hiding a header.
|
|
11
|
+
*
|
|
12
|
+
* @category Area models
|
|
11
13
|
*/
|
|
12
14
|
export declare class AreaModelHidden implements AreaModelIf {
|
|
13
15
|
areaIdent: AreaIdent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AreaModelObjectArray } from './area-model-object-array';
|
|
2
|
-
import { ColumnDefIf } from '../column/column-def.if';
|
|
3
|
-
import { AreaIdent } from '../area-ident.type';
|
|
1
|
+
import { AreaModelObjectArray } from './area-model-object-array.js';
|
|
2
|
+
import { ColumnDefIf } from '../column/column-def.if.js';
|
|
3
|
+
import { AreaIdent } from '../area-ident.type.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents an area model defined by an object array with column definitions.
|
|
@@ -29,10 +29,10 @@ import { AreaIdent } from '../area-ident.type';
|
|
|
29
29
|
* { id: 3, name: 'Bob', age: 40 }
|
|
30
30
|
* ];
|
|
31
31
|
*
|
|
32
|
-
* const columnDefs = [
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* const columnDefs: ColumnDefIf[] = [
|
|
33
|
+
* new ColumnDef('id', 'ID', new Size(50, 'px')),
|
|
34
|
+
* new ColumnDef('name', 'Name', new Size(150, 'px')),
|
|
35
|
+
* new ColumnDef('age', 'Age', new Size(100, 'px'))
|
|
36
36
|
* ];
|
|
37
37
|
*
|
|
38
38
|
* const bodyAreaModel = new AreaModelObjectArrayWithColumndefs<any>(
|
|
@@ -47,9 +47,9 @@ import { AreaIdent } from '../area-ident.type';
|
|
|
47
47
|
* function createTableModel() {
|
|
48
48
|
* const rows = fetchDataFromServer();
|
|
49
49
|
* const columnDefs = [
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
50
|
+
* new ColumnDef('id', 'ID', new Size(50, 'px')),
|
|
51
|
+
* new ColumnDef('name', 'Name', new Size(150, 'px')),
|
|
52
|
+
* new ColumnDef('age', 'Age', new Size(100, 'px'))
|
|
53
53
|
* ];
|
|
54
54
|
*
|
|
55
55
|
* const tableModel = TableFactory.buildByTypedRowsParam({
|
|
@@ -81,6 +81,8 @@ import { AreaIdent } from '../area-ident.type';
|
|
|
81
81
|
* @see {@link AreaModelObjectArray} - The parent class that provides the core functionality
|
|
82
82
|
* @see {@link ColumnDefIf} - The interface that defines the structure of column definitions
|
|
83
83
|
* @see {@link CrudTableModelFactory} - A factory class that uses this class for CRUD operations
|
|
84
|
+
*
|
|
85
|
+
* @category Area models
|
|
84
86
|
*/
|
|
85
87
|
export declare class AreaModelObjectArrayWithColumndefs<T> extends AreaModelObjectArray<T> {
|
|
86
88
|
areaIdent: AreaIdent;
|
|
@@ -103,10 +105,10 @@ export declare class AreaModelObjectArrayWithColumndefs<T> extends AreaModelObje
|
|
|
103
105
|
* { id: 2, name: 'Jane', age: 25 }
|
|
104
106
|
* ];
|
|
105
107
|
*
|
|
106
|
-
* const columnDefs = [
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
108
|
+
* const columnDefs: ColumnDefIf[] = [
|
|
109
|
+
* new ColumnDef('id', 'ID', new Size(50, 'px')),
|
|
110
|
+
* new ColumnDef('name', 'Name', new Size(150, 'px')),
|
|
111
|
+
* new ColumnDef('age', 'Age', new Size(100, 'px'))
|
|
110
112
|
* ];
|
|
111
113
|
*
|
|
112
114
|
* const bodyAreaModel = new AreaModelObjectArrayWithColumndefs(
|