@guiexpert/table 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +11 -11
- package/index.js +794 -338
- package/lib/table/action/action-id.type.d.ts +12 -0
- package/lib/table/action/on-action-triggered.if.d.ts +7 -0
- package/lib/table/action/osx-shortcut-actionId-mapping.d.ts +5 -0
- package/lib/table/action/shortcut-actionid-mapping.type.d.ts +4 -0
- package/lib/table/action/shortcut.service.d.ts +3 -0
- package/lib/table/action/windows-shortcut-actionId-mapping.d.ts +3 -0
- package/lib/table/color/color-rgb.if.d.ts +5 -0
- package/lib/table/color/three-color-gradient-arg.if.d.ts +5 -0
- package/lib/table/color/two-color-gradient-arg.if.d.ts +4 -0
- package/lib/table/data/common/aligns.d.ts +23 -0
- package/lib/table/data/common/area-map-factory.d.ts +6 -0
- package/lib/table/data/common/area-map.d.ts +7 -0
- package/lib/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +4 -0
- package/lib/table/data/common/args-render-cell-div.d.ts +17 -0
- package/lib/table/data/common/boolean-function.d.ts +12 -0
- package/lib/table/data/common/cell-range.d.ts +9 -0
- package/lib/table/data/common/checkbox-column-def.d.ts +5 -0
- package/lib/table/data/common/checked-type.d.ts +5 -0
- package/lib/table/data/common/event/ge-cell-indices.d.ts +3 -0
- package/lib/table/data/common/event/ge-key-event.d.ts +5 -0
- package/lib/table/data/common/event/ge-model-change-event.d.ts +3 -0
- package/lib/table/data/common/event/ge-mouse-event.d.ts +3 -0
- package/lib/table/data/common/event/input/table-cell-update-event.d.ts +12 -0
- package/lib/table/data/common/event/input/table-cell-update-event.if.d.ts +41 -0
- package/lib/table/data/common/filter-function.d.ts +8 -0
- package/lib/table/data/common/get-t.d.ts +6 -0
- package/lib/table/data/common/index-and-px.d.ts +3 -0
- package/lib/table/data/common/size.if.d.ts +4 -0
- package/lib/table/data/common/sort-item.d.ts +3 -0
- package/lib/table/data/common/sort-state.type.d.ts +6 -0
- package/lib/table/data/common/tree-arrow.type.d.ts +7 -0
- package/lib/table/data/common/tree-row-if.d.ts +3 -0
- package/lib/table/data/common/tree-row.d.ts +4 -0
- package/lib/table/data/div-scope.type.d.ts +9 -0
- package/lib/table/data/event/mouse-target-data.d.ts +3 -0
- package/lib/table/data/geo-data.d.ts +3 -0
- package/lib/table/data/options/icon.if.d.ts +13 -0
- package/lib/table/data/options/sorted-options.if.d.ts +4 -0
- package/lib/table/data/options/table-options.if.d.ts +186 -0
- package/lib/table/data/side-ident.type.d.ts +3 -0
- package/lib/table/data/table-model-and-options.d.ts +3 -0
- package/lib/table/data/table-model-and-options.if.d.ts +3 -0
- package/lib/table/data/tablemodel/area-ident.type.d.ts +1 -1
- package/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +4 -0
- package/lib/table/data/tablemodel/areamodel/area-model-hidden.d.ts +1 -1
- package/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +5 -0
- package/lib/table/data/tablemodel/areamodel/area-model-object-array.d.ts +4 -0
- package/lib/table/data/tablemodel/areamodel/area-model-tree.d.ts +6 -0
- package/lib/table/data/tablemodel/areamodel/area-model.d.ts +3 -0
- package/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +3 -0
- package/lib/table/data/tablemodel/column/column-def.d.ts +3 -0
- package/lib/table/data/tablemodel/column/column-def.if.d.ts +113 -0
- package/lib/table/data/tablemodel/padding.d.ts +3 -0
- package/lib/table/data/tablemodel/table-model.d.ts +186 -0
- package/lib/table/data/tablemodel/table-model.if.d.ts +165 -0
- package/lib/table/ele-scope.d.ts +4 -0
- package/lib/table/event-adapter.d.ts +7 -0
- package/lib/table/event-listener.if.d.ts +5 -0
- package/lib/table/input-handler.d.ts +14 -0
- package/lib/table/instanceof-workaround.d.ts +19 -0
- package/lib/table/mouse-handler.d.ts +38 -0
- package/lib/table/render-scope.d.ts +1 -1
- package/lib/table/renderer/edit/edit-input-pipe.if.d.ts +8 -0
- package/lib/table/table-api.d.ts +72 -0
- package/lib/table/table-scope.d.ts +148 -0
- package/package.json +1 -1
|
@@ -9,34 +9,220 @@ import { SelectionModelIf } from "../../selection/selection-model.if";
|
|
|
9
9
|
import { GetT } from "../common/get-t";
|
|
10
10
|
import { FocusModelIf } from "../../focus/focus-model.if";
|
|
11
11
|
import { ShortcutActionIdMapping } from "../../action/shortcut-actionid-mapping.type";
|
|
12
|
+
/**
|
|
13
|
+
* Represents the options for configuring a table.
|
|
14
|
+
*
|
|
15
|
+
* | Class Property | Description |
|
|
16
|
+
* |----------------------------------|-----------------------------------------------------------------------------------------------|
|
|
17
|
+
* | headerSeparatorBorderVisible | Indicates whether the header separator border is visible. |
|
|
18
|
+
* | footerSeparatorBorderVisible | Indicates whether the footer separator border is visible or not. |
|
|
19
|
+
* | fixedEastSeparatorBorderVisible | Determines whether the fixed east separator border is visible. |
|
|
20
|
+
* | fixedWestSeparatorBorderVisible | Indicates whether the fixed west separator border should be visible. |
|
|
21
|
+
* | verticalBorderVisible | Indicates whether the vertical border is visible. |
|
|
22
|
+
* | horizontalBorderVisible | Represents the visibility of the horizontal border. |
|
|
23
|
+
* | overflowX | Determines the behavior of horizontal overflow for the table body (scroll port). |
|
|
24
|
+
* | overflowY | Determines the behavior of vertical overflow for the table body (scroll port). |
|
|
25
|
+
* | tableTopBorderVisible | Indicates whether the top border of a table is visible or hidden. |
|
|
26
|
+
* | tableBottomBorderVisible | Specifies whether the bottom border of a table is visible. |
|
|
27
|
+
* | hoverRowVisible | Flag indicating whether the hover color of a row is visible or not in general. |
|
|
28
|
+
* | hoverColumnVisible | Flag indicating whether the hover color of a column is visible or not in general. |
|
|
29
|
+
* | columnsResizable | Represents whether the columns are resizable. |
|
|
30
|
+
* | columnsDraggable | Flag indicating whether the columns are draggable. |
|
|
31
|
+
* | columnResizeHandleWidthInPx | The width of the column resize handle in pixels. |
|
|
32
|
+
* | headerVerticalSeparator | Represents whether a vertical separator should be displayed in a header. |
|
|
33
|
+
* | footerVerticalSeparator | Indicates whether a vertical separator should be displayed in the footer. |
|
|
34
|
+
* | defaultRowHeights | Represents the default row heights for a given table. |
|
|
35
|
+
* | headerToggleExpandCollapseIcons | Indicates whether to show toggle icons in the header. |
|
|
36
|
+
* | treeOptions | Represents the options for configuring a tree. |
|
|
37
|
+
* | showCheckboxWihoutExtraColumn | Indicates whether to show checkbox without an extra column. |
|
|
38
|
+
* | externalFilterFunction | Represents the external filter function used to filter table rows. |
|
|
39
|
+
* | sortedOptions | Represents a sorted options object. |
|
|
40
|
+
* | sortOrder | Represents the sort order of the columns. |
|
|
41
|
+
* | autoRestoreOptions | Represents auto restoration options. |
|
|
42
|
+
* | getEditRenderer | Retrieves the edit renderer for a specific action. |
|
|
43
|
+
* | getSelectionModel | Retrieves the selection model for a specific object. |
|
|
44
|
+
* | getFocusModel | Retrieves the focus model of the component. |
|
|
45
|
+
* | shortcutActionIdMapping | Represents a mapping of shortcut action IDs. |
|
|
46
|
+
*/
|
|
12
47
|
export interface TableOptionsIf {
|
|
48
|
+
/**
|
|
49
|
+
* Indicates whether the header separator border is visible.
|
|
50
|
+
*
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
*/
|
|
13
53
|
headerSeparatorBorderVisible: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Indicates whether the footer separator border is visible or not.
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
*/
|
|
14
59
|
footerSeparatorBorderVisible: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Determines whether the fixed east separator border is visible.
|
|
62
|
+
*
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
*/
|
|
15
65
|
fixedEastSeparatorBorderVisible: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Indicates whether the fixed west separator border should be visible.
|
|
68
|
+
*
|
|
69
|
+
* @type {boolean}
|
|
70
|
+
*/
|
|
16
71
|
fixedWestSeparatorBorderVisible: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Indicates whether the vertical border is visible.
|
|
74
|
+
*
|
|
75
|
+
* @type {boolean}
|
|
76
|
+
*/
|
|
17
77
|
verticalBorderVisible: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Represents the visibility of the horizontal border.
|
|
80
|
+
*
|
|
81
|
+
* @type {boolean}
|
|
82
|
+
*/
|
|
18
83
|
horizontalBorderVisible: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The value of the css `overflowX` determines the behavior of horizontal overflow for the table body (scroll port).
|
|
86
|
+
*
|
|
87
|
+
* @typedef {'auto' | 'scroll'} OverflowX
|
|
88
|
+
*/
|
|
19
89
|
overflowX: "auto" | "scroll";
|
|
90
|
+
/**
|
|
91
|
+
* The value of the css `overflowX` determines the behavior of vertical overflow for the table body (scroll port).
|
|
92
|
+
*
|
|
93
|
+
* @typedef {'auto' | 'scroll'} OverflowX
|
|
94
|
+
*/
|
|
20
95
|
overflowY: "auto" | "scroll";
|
|
96
|
+
/**
|
|
97
|
+
* Indicates whether the top border of a table is visible or hidden.
|
|
98
|
+
*
|
|
99
|
+
* @type {boolean}
|
|
100
|
+
*/
|
|
21
101
|
tableTopBorderVisible: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Specifies whether the bottom border of a table is visible.
|
|
104
|
+
*
|
|
105
|
+
* @type {boolean}
|
|
106
|
+
*/
|
|
22
107
|
tableBottomBorderVisible: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Flag indicating whether the hover color of a row is visible or not in general.
|
|
110
|
+
* If true, the row get the hover background color while the mouse is over the row.
|
|
111
|
+
*
|
|
112
|
+
* @type {boolean}
|
|
113
|
+
*/
|
|
23
114
|
hoverRowVisible: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Flag indicating whether the hover color of a column is visible or not in general.
|
|
117
|
+
* If true, the column get the hover background color while the mouse is over the column.
|
|
118
|
+
*
|
|
119
|
+
* @typedef {boolean} hoverColumnVisible
|
|
120
|
+
*/
|
|
24
121
|
hoverColumnVisible: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Represents whether the columns are resizable.
|
|
124
|
+
*
|
|
125
|
+
* @type {boolean}
|
|
126
|
+
*/
|
|
25
127
|
columnsResizable: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Flag indicating whether the columns are draggable.
|
|
130
|
+
*
|
|
131
|
+
* @type {boolean}
|
|
132
|
+
*/
|
|
26
133
|
columnsDraggable: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* The width of the column resize handle in pixels.
|
|
136
|
+
*
|
|
137
|
+
* @type {number}
|
|
138
|
+
*/
|
|
27
139
|
columnResizeHandleWidthInPx: number;
|
|
140
|
+
/**
|
|
141
|
+
* Represents whether a vertical separator should be displayed in a header.
|
|
142
|
+
*
|
|
143
|
+
* @type {boolean}
|
|
144
|
+
* @since 1.0.0
|
|
145
|
+
*/
|
|
28
146
|
headerVerticalSeparator: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Indicates whether a vertical separator should be displayed in the footer.
|
|
149
|
+
*
|
|
150
|
+
* @type {boolean}
|
|
151
|
+
*/
|
|
29
152
|
footerVerticalSeparator: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Represents the default row heights (for header, body and footer) for a given table.
|
|
155
|
+
*
|
|
156
|
+
* @typedef {number[]} DefaultRowHeightsIf
|
|
157
|
+
* @description An array of numbers representing the default height for each row in a table.
|
|
158
|
+
*/
|
|
30
159
|
defaultRowHeights: DefaultRowHeightsIf;
|
|
31
160
|
headerToggleExpandCollapseIcons: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Represents the options for configuring a tree.
|
|
163
|
+
*
|
|
164
|
+
* @typedef {Object} TreeOptions
|
|
165
|
+
* @property {number} [maxDepth] - Maximum depth of the tree.
|
|
166
|
+
* @property {boolean} [allowDuplicates] - Indicates if duplicate items are allowed in the tree.
|
|
167
|
+
* @property {string[]} [colors] - An array of color options for styling the tree.
|
|
168
|
+
*/
|
|
32
169
|
treeOptions: TreeOptionsIf;
|
|
170
|
+
/**
|
|
171
|
+
* Indicates whether to show checkbox without an extra column.
|
|
172
|
+
* If true and the row is checkable, a checkbox is rendered in the first column.
|
|
173
|
+
* If false and the row is checkable, a checkbox is rendered in an extra column left to the first column.
|
|
174
|
+
*
|
|
175
|
+
* @type {boolean}
|
|
176
|
+
*/
|
|
33
177
|
showCheckboxWihoutExtraColumn: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Represents the external filter function that will be used to filter the table rows.
|
|
180
|
+
*
|
|
181
|
+
* @typedef {FilterFunction<any> | undefined} externalFilterFunction
|
|
182
|
+
*/
|
|
34
183
|
externalFilterFunction: FilterFunction<any> | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* Represents a sorted options object.
|
|
186
|
+
*
|
|
187
|
+
* @class
|
|
188
|
+
* @classdesc The SortedOptions represents a class that defines sorted icons, which will displayed in the header (if column is sortable).
|
|
189
|
+
*/
|
|
35
190
|
sortedOptions: SortedOptionsIf;
|
|
191
|
+
/**
|
|
192
|
+
* Represents the sort order of the columns.
|
|
193
|
+
*
|
|
194
|
+
* @typedef {SortState[]} sortOrder
|
|
195
|
+
*/
|
|
36
196
|
sortOrder: SortState[];
|
|
37
197
|
autoRestoreOptions?: AutoRestoreOptionsIf<any>;
|
|
198
|
+
/**
|
|
199
|
+
* Retrieves the edit renderer for a specific action.
|
|
200
|
+
*
|
|
201
|
+
* @function
|
|
202
|
+
* @name getEditRenderer
|
|
203
|
+
* @param {string} action - The action for which to retrieve the edit renderer.
|
|
204
|
+
* @returns {GetEditRenderer} - The edit renderer for the specified action.
|
|
205
|
+
*/
|
|
38
206
|
getEditRenderer?: GetEditRenderer;
|
|
207
|
+
/**
|
|
208
|
+
* Retrieves the selection model for a specific object.
|
|
209
|
+
*
|
|
210
|
+
* @param {SelectionModelIf} targetObj - The target object to retrieve the selection model from.
|
|
211
|
+
* @return {GetT<SelectionModelIf>} - The selection model for the given object.
|
|
212
|
+
*/
|
|
39
213
|
getSelectionModel?: GetT<SelectionModelIf>;
|
|
214
|
+
/**
|
|
215
|
+
* Retrieves the focus model of the component.
|
|
216
|
+
*
|
|
217
|
+
* @returns {GetT<FocusModelIf>} The focus model of the component.
|
|
218
|
+
*/
|
|
40
219
|
getFocusModel?: GetT<FocusModelIf>;
|
|
220
|
+
/**
|
|
221
|
+
* Represents a mapping of shortcut action IDs.
|
|
222
|
+
*
|
|
223
|
+
* @typedef {Object} ShortcutActionIdMapping
|
|
224
|
+
* @property {string} [shortcutId] - The ID of the shortcut.
|
|
225
|
+
* @property {string} [actionId] - The ID of the action associated with the shortcut.
|
|
226
|
+
*/
|
|
41
227
|
shortcutActionIdMapping?: ShortcutActionIdMapping;
|
|
42
228
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TableModelAndOptionsIf } from "./table-model-and-options.if";
|
|
2
2
|
import { TableModelIf } from "./tablemodel/table-model.if";
|
|
3
3
|
import { TableOptions } from "./options/table-options";
|
|
4
|
+
/**
|
|
5
|
+
* Container object for one table model and one table options object.
|
|
6
|
+
*/
|
|
4
7
|
export declare class TableModelAndOptions implements TableModelAndOptionsIf {
|
|
5
8
|
tableModel: TableModelIf;
|
|
6
9
|
tableOptions: TableOptions;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TableModelIf } from "./tablemodel/table-model.if";
|
|
2
2
|
import { TableOptions } from "./options/table-options";
|
|
3
|
+
/**
|
|
4
|
+
* Interface for a container object for one table model and one table options object.
|
|
5
|
+
*/
|
|
3
6
|
export interface TableModelAndOptionsIf {
|
|
4
7
|
tableModel: TableModelIf;
|
|
5
8
|
tableOptions: TableOptions;
|
|
@@ -2,6 +2,10 @@ import { AbstractAreaModel } from "./abstract-area-model";
|
|
|
2
2
|
import { AreaIdent } from "../area-ident.type";
|
|
3
3
|
import { ColumnDefIf } from "../column/column-def.if";
|
|
4
4
|
import { FilterFunction } from "../../common/filter-function";
|
|
5
|
+
/**
|
|
6
|
+
* Represents a model for an area containing a two-dimensional array of data.
|
|
7
|
+
* @template T - The type of data in the array.
|
|
8
|
+
*/
|
|
5
9
|
export declare class AreaModelArrayOfArrays<T> extends AbstractAreaModel<T[][]> {
|
|
6
10
|
areaIdent: AreaIdent;
|
|
7
11
|
readonly arr: T[][];
|
|
@@ -6,7 +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
|
/**
|
|
9
|
-
* An
|
|
9
|
+
* An invisible model, which is used internally for hiding a header.
|
|
10
10
|
*/
|
|
11
11
|
export declare class AreaModelHidden implements AreaModelIf {
|
|
12
12
|
areaIdent: AreaIdent;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { AreaModelObjectyArray } from "./area-model-object-array";
|
|
2
2
|
import { ColumnDefIf } from "../column/column-def.if";
|
|
3
3
|
import { AreaIdent } from "../area-ident.type";
|
|
4
|
+
/**
|
|
5
|
+
* Represents an array of objects with column definitions for an area model.
|
|
6
|
+
*
|
|
7
|
+
* @template T - The type of objects in the array.
|
|
8
|
+
*/
|
|
4
9
|
export declare class AreaModelObjectArrayWithColumndefs<T> extends AreaModelObjectyArray<T> {
|
|
5
10
|
areaIdent: AreaIdent;
|
|
6
11
|
protected readonly rows: T[];
|
|
@@ -4,6 +4,10 @@ import { AreaIdent } from "../area-ident.type";
|
|
|
4
4
|
import { FilterFunction } from "../../common/filter-function";
|
|
5
5
|
import { SorterService } from "../../../service/sorter.service";
|
|
6
6
|
import { SortItem } from "../../common/sort-item";
|
|
7
|
+
/**
|
|
8
|
+
* Represents an area model defined by an object array.
|
|
9
|
+
* @template T - The type of objects in the array
|
|
10
|
+
*/
|
|
7
11
|
export declare class AreaModelObjectyArray<T> extends AbstractAreaModel<T> {
|
|
8
12
|
areaIdent: AreaIdent;
|
|
9
13
|
protected readonly rows: T[];
|
|
@@ -6,6 +6,12 @@ import { FilterFunction } from "../../common/filter-function";
|
|
|
6
6
|
import { SorterService } from "../../../service/sorter.service";
|
|
7
7
|
import { SortItem } from "../../common/sort-item";
|
|
8
8
|
import { TreeRowIf } from "../../common/tree-row-if";
|
|
9
|
+
/**
|
|
10
|
+
* Represents a tree-based table model.
|
|
11
|
+
* Extends the AbstractAreaModel class.
|
|
12
|
+
*
|
|
13
|
+
* @template S - The type of the row data.
|
|
14
|
+
*/
|
|
9
15
|
export declare class AreaModelTree<S> extends AbstractAreaModel<TreeRow<S>> {
|
|
10
16
|
areaIdent: AreaIdent;
|
|
11
17
|
readonly rows: TreeRowIf<S>[];
|
|
@@ -5,6 +5,9 @@ import { SortItem } from "../../common/sort-item";
|
|
|
5
5
|
import { FilterFunction } from "../../common/filter-function";
|
|
6
6
|
import { CellRendererIf } from "../../../renderer/cell-render.if";
|
|
7
7
|
import { CheckedType } from "../../common/checked-type";
|
|
8
|
+
/**
|
|
9
|
+
* Represents the area model (header, body or footer) for the table.
|
|
10
|
+
*/
|
|
8
11
|
export declare class AreaModel implements AreaModelIf {
|
|
9
12
|
areaIdent: AreaIdent;
|
|
10
13
|
rowSelectionModel: CheckboxModelIf<any> | undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { CellRange } from "../../common/cell-range";
|
|
2
2
|
import { AreaModelIf } from "./area-model.if";
|
|
3
3
|
import { TableModelIf } from "../table-model.if";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a model for handling colspan and rowspan in a table.
|
|
6
|
+
*/
|
|
4
7
|
export declare class ColAndRowspanModel {
|
|
5
8
|
protected tableModel: TableModelIf;
|
|
6
9
|
protected areaModel: AreaModelIf;
|
|
@@ -7,6 +7,9 @@ import { BooleanFunction } from "../../common/boolean-function";
|
|
|
7
7
|
import { SortState } from "../../common/sort-state.type";
|
|
8
8
|
import { GetEditRenderer } from "../../../renderer/edit/edit-cell-renderer.type";
|
|
9
9
|
import { editInputPipe } from "../../../renderer/edit/edit-input-pipe.if";
|
|
10
|
+
/**
|
|
11
|
+
* Represents a column definition for one column of the table.
|
|
12
|
+
*/
|
|
10
13
|
export declare class ColumnDef implements ColumnDefIf {
|
|
11
14
|
property: string;
|
|
12
15
|
headerLabel: string;
|
|
@@ -5,21 +5,134 @@ import { BooleanFunction } from "../../common/boolean-function";
|
|
|
5
5
|
import { SortState } from "../../common/sort-state.type";
|
|
6
6
|
import { GetEditRenderer } from "../../../renderer/edit/edit-cell-renderer.type";
|
|
7
7
|
import { editInputPipe } from "../../../renderer/edit/edit-input-pipe.if";
|
|
8
|
+
/**
|
|
9
|
+
* Represents a column definition of one table column.
|
|
10
|
+
*/
|
|
8
11
|
export interface ColumnDefIf {
|
|
12
|
+
/**
|
|
13
|
+
* Represents a property name of the table row element.
|
|
14
|
+
* @typedef {String} VariableProperty
|
|
15
|
+
*/
|
|
9
16
|
property: string;
|
|
17
|
+
/**
|
|
18
|
+
* Represents the label for a header.
|
|
19
|
+
*
|
|
20
|
+
* @typedef {string} headerLabel
|
|
21
|
+
*/
|
|
10
22
|
headerLabel: string;
|
|
23
|
+
/**
|
|
24
|
+
* Represents the size of a column along the width dimension.
|
|
25
|
+
*
|
|
26
|
+
* @typedef {number} Width
|
|
27
|
+
*/
|
|
11
28
|
width: SizeIf;
|
|
29
|
+
/**
|
|
30
|
+
* Represents the minimum width of a column.
|
|
31
|
+
*
|
|
32
|
+
* @typedef {SizeIf} minWidth
|
|
33
|
+
* @property {number} width - The minimum width value.
|
|
34
|
+
* @property {string} unit - The unit of measurement for the minimum width value.
|
|
35
|
+
* Default value is 'px' if not specified.
|
|
36
|
+
*/
|
|
12
37
|
minWidth: SizeIf;
|
|
38
|
+
/**
|
|
39
|
+
* Represents the maximum width of a column.
|
|
40
|
+
*
|
|
41
|
+
* @typedef {number} SizeIf
|
|
42
|
+
*/
|
|
13
43
|
maxWidth: SizeIf;
|
|
44
|
+
/**
|
|
45
|
+
* @typedef {Object} AreaObjectMapType
|
|
46
|
+
* @template T
|
|
47
|
+
* @property {Object.<string, T>} map - A mapping of strings to values of type T
|
|
48
|
+
*/
|
|
14
49
|
rendererMap: AreaObjectMapType<CellRendererIf>;
|
|
50
|
+
/**
|
|
51
|
+
* Represents an object that maps an area to a collection of objects.
|
|
52
|
+
*
|
|
53
|
+
* @typedef {Object.<string, string[]>} AreaObjectMapType
|
|
54
|
+
*/
|
|
15
55
|
classes: AreaObjectMapType<string[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Determines whether or not a column can be sorted.
|
|
58
|
+
*
|
|
59
|
+
* @param {boolean} sortable - Specifies if an item is sortable.
|
|
60
|
+
* @returns {boolean} - Indicating whether the item is sortable or not.
|
|
61
|
+
*/
|
|
16
62
|
sortable?: BooleanFunction;
|
|
63
|
+
/**
|
|
64
|
+
* Determines if the sort icon is visible.
|
|
65
|
+
*
|
|
66
|
+
* @typedef {BooleanFunction} sortIconVisible
|
|
67
|
+
* @returns {boolean} Indicates whether the sort icon is visible.
|
|
68
|
+
*/
|
|
17
69
|
sortIconVisible?: BooleanFunction;
|
|
70
|
+
/**
|
|
71
|
+
* Represents a function that compares two values for sorting purposes.
|
|
72
|
+
* The function takes two arguments of type T, compares them, and returns a number.
|
|
73
|
+
* If the result is negative, it means 'a' comes before 'b' in the sorted order.
|
|
74
|
+
* If the result is positive, it means 'b' comes before 'a' in the sorted order.
|
|
75
|
+
* If the result is zero, it means the two values are considered equal for sorting purposes.
|
|
76
|
+
*
|
|
77
|
+
* @typeparam T The type of values being compared.
|
|
78
|
+
*
|
|
79
|
+
* @param a The first value to be compared.
|
|
80
|
+
* @param b The second value to be compared.
|
|
81
|
+
*
|
|
82
|
+
* @returns A number indicating the relative order of 'a' and 'b'.
|
|
83
|
+
*/
|
|
18
84
|
sortComparator?: <T>(a: T, b: T) => number;
|
|
85
|
+
/**
|
|
86
|
+
* Represents the state of sorting for a list.
|
|
87
|
+
*
|
|
88
|
+
* @typedef {Object} SortState
|
|
89
|
+
*
|
|
90
|
+
* @property {string} [sortKey] - The key to sort the list by. If not provided, no sorting will be applied.
|
|
91
|
+
* @property {boolean} [reverse] - Indicates whether the list should be sorted in reverse order. Defaults to false.
|
|
92
|
+
*/
|
|
19
93
|
sortState?: SortState;
|
|
94
|
+
/**
|
|
95
|
+
* Represents the order of multiple sort states.
|
|
96
|
+
*
|
|
97
|
+
* @typedef {SortState[]} SortStatesOrder
|
|
98
|
+
*/
|
|
20
99
|
sortStatesOrder?: SortState[];
|
|
100
|
+
/**
|
|
101
|
+
* Determines if a column is editable or not.
|
|
102
|
+
*
|
|
103
|
+
* @param {any} variable - The variable to check.
|
|
104
|
+
* @returns {boolean} - Returns true if the variable is editable, false otherwise.
|
|
105
|
+
*/
|
|
21
106
|
editable?: BooleanFunction;
|
|
107
|
+
/**
|
|
108
|
+
* Determines if the column is visible or not.
|
|
109
|
+
*
|
|
110
|
+
* @typedef {Function} isVisible
|
|
111
|
+
* @returns {boolean} - If the element is visible, returns true. Otherwise, returns false.
|
|
112
|
+
*/
|
|
22
113
|
isVisible?: BooleanFunction;
|
|
114
|
+
/**
|
|
115
|
+
* Retrieves the edit renderer for the column.
|
|
116
|
+
*
|
|
117
|
+
* @name getEditRenderer
|
|
118
|
+
* @function
|
|
119
|
+
* @param {HTMLElement} element - The element for which to retrieve the edit renderer.
|
|
120
|
+
* @returns {EditRenderer | null} - The edit renderer for the specified element, or null if not found.
|
|
121
|
+
*/
|
|
23
122
|
getEditRenderer?: GetEditRenderer;
|
|
123
|
+
/**
|
|
124
|
+
* Represents an edit input pipe.
|
|
125
|
+
*
|
|
126
|
+
* @typedef {object} editInputPipe
|
|
127
|
+
* @property {string} name - The name of the edit input pipe.
|
|
128
|
+
* @property {number} id - The unique identifier of the edit input pipe.
|
|
129
|
+
* @property {boolean} isActive - Indicates whether the edit input pipe is active.
|
|
130
|
+
* @property {function} execute - Executes the edit input pipe operation.
|
|
131
|
+
* @property {function} addFilter - Adds a filter to the edit input pipe.
|
|
132
|
+
* @property {function} removeFilter - Removes a filter from the edit input pipe.
|
|
133
|
+
* @property {function} clearFilters - Clears all filters from the edit input pipe.
|
|
134
|
+
* @property {function} setPriority - Sets the priority of the edit input pipe.
|
|
135
|
+
* @property {function} getStatus - Retrieves the current status of the edit input pipe.
|
|
136
|
+
*/
|
|
24
137
|
editInputPipe?: editInputPipe;
|
|
25
138
|
}
|