@guiexpert/table 1.1.13 → 1.1.15
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 +2 -2
- package/index.js +323 -0
- package/lib/table/ele-scope.d.ts +18 -0
- package/lib/table/render-scope.d.ts +265 -0
- package/lib/table/selection/selection-model.d.ts +7 -0
- package/lib/table/selection/selection-model.if.d.ts +21 -0
- package/lib/table/table-api.d.ts +23 -1
- package/lib/table/table-scope.d.ts +24 -6
- package/package.json +1 -1
|
@@ -47,6 +47,14 @@ export declare class RenderScope extends EleScope {
|
|
|
47
47
|
private removables;
|
|
48
48
|
constructor(hostElement: HTMLDivElement, tableModel: TableModelIf, dom: ConvenienceDomService, tableOptions: TableOptionsIf);
|
|
49
49
|
isEditing(): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Resets the editor renderer by clearing its values and state.
|
|
52
|
+
*
|
|
53
|
+
* @function resetEditorRenderer
|
|
54
|
+
* @memberof ClassName
|
|
55
|
+
*
|
|
56
|
+
* @returns {void}
|
|
57
|
+
*/
|
|
50
58
|
resetEditorRenderer(): void;
|
|
51
59
|
/**
|
|
52
60
|
* Clears the selection in the component.
|
|
@@ -56,19 +64,109 @@ export declare class RenderScope extends EleScope {
|
|
|
56
64
|
* @return {void}
|
|
57
65
|
*/
|
|
58
66
|
clearSelection(rerender?: boolean): void;
|
|
67
|
+
/**
|
|
68
|
+
* Initializes and renders the editor for a specified row and column index.
|
|
69
|
+
*
|
|
70
|
+
* @param {number} rowIdx - The index of the row.
|
|
71
|
+
* @param {number} colIdx - The index of the column.
|
|
72
|
+
*/
|
|
59
73
|
initRenderEditor(rowIdx: number, colIdx: number): void;
|
|
74
|
+
/**
|
|
75
|
+
* Adjusts the content after scrolling and initiates a repaint of the component.
|
|
76
|
+
*
|
|
77
|
+
* @return {void}
|
|
78
|
+
*/
|
|
60
79
|
repaint(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Repaints the UI by resetting the size of the wrapper div,
|
|
82
|
+
* adjusting the containers and rows, and performing additional adjustments
|
|
83
|
+
* after scrolling.
|
|
84
|
+
*
|
|
85
|
+
* @return {void} This method does not return any value.
|
|
86
|
+
*/
|
|
61
87
|
repaintHard(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Adjusts the table after scrolling. This method performs various adjustments
|
|
90
|
+
* to the table's appearance and behavior after a scroll event occurs.
|
|
91
|
+
*/
|
|
62
92
|
adjustAfterScrolling(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Checks if the scroll position should be saved and saves it.
|
|
95
|
+
*
|
|
96
|
+
* @return {void}
|
|
97
|
+
*/
|
|
63
98
|
checkForScrollPosSaving(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Updates the cells in the table with the provided values and optionally repaints all cells.
|
|
101
|
+
*
|
|
102
|
+
* @param {TableCellUpdateEventIf[]} events - The array of events containing information about the cells to update.
|
|
103
|
+
* @param {boolean} repaintAll - Optional. If true, repaints all cells after updating. Defaults to false.
|
|
104
|
+
*
|
|
105
|
+
* @returns {void}
|
|
106
|
+
*/
|
|
64
107
|
updateCells(events: TableCellUpdateEventIf[], repaintAll?: boolean): void;
|
|
108
|
+
/**
|
|
109
|
+
* Rerenders the content of a table cell based on the given parameters.
|
|
110
|
+
*
|
|
111
|
+
* @param {TableCellUpdateEventIf} area - The area of the table.
|
|
112
|
+
* @param {number} rowIndex - The index of the row.
|
|
113
|
+
* @param {number} columnIndex - The index of the column.
|
|
114
|
+
* @param {any} value - The new value to be displayed in the cell.
|
|
115
|
+
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
116
|
+
*/
|
|
65
117
|
rerenderCellContent({ area, rowIndex, columnIndex, value, cssClasses }: TableCellUpdateEventIf): void;
|
|
118
|
+
/**
|
|
119
|
+
* Stores the widths of all columns in the table.
|
|
120
|
+
*
|
|
121
|
+
* @protected
|
|
122
|
+
* @function storeColumnWidths
|
|
123
|
+
* @returns {void}
|
|
124
|
+
*/
|
|
66
125
|
protected storeColumnWidths(): void;
|
|
67
126
|
protected getAreaAndSideIdentByAttr(srcElement: HTMLElement): [AreaIdent | undefined, SideIdent | undefined];
|
|
127
|
+
/**
|
|
128
|
+
* Retrieves the specified area from the grid layout.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} areaIdent - The identifier for the area ('header', 'body', or 'footer').
|
|
131
|
+
* @param {string} sideIdent - The identifier for the side of the area ('west', 'center', or 'east').
|
|
132
|
+
* @protected
|
|
133
|
+
* @returns {HTMLElement} - The requested area element.
|
|
134
|
+
* @throws {Error} - If the area identifier or side identifier is incorrect.
|
|
135
|
+
*/
|
|
68
136
|
protected getArea(areaIdent: AreaIdent, sideIdent: SideIdent): DivScope;
|
|
137
|
+
/**
|
|
138
|
+
* Adjusts the body of the table.
|
|
139
|
+
*
|
|
140
|
+
* @protected
|
|
141
|
+
* @return {void}
|
|
142
|
+
*/
|
|
69
143
|
protected adjustBody(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Returns a number value extracted from the specified attribute of the source element.
|
|
146
|
+
*
|
|
147
|
+
* @param {HTMLElement} srcElement - The source element from which to extract the attribute value.
|
|
148
|
+
* @param {string} key - The attribute key to extract the value from.
|
|
149
|
+
* @returns {number} - The extracted number value, or -1 if the attribute was not found or not a valid number.
|
|
150
|
+
* @protected
|
|
151
|
+
*/
|
|
70
152
|
protected getNumberByAttr(srcElement: HTMLElement, key: string): number;
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves the value of the specified attribute from the nearest ancestor element that has the attribute.
|
|
155
|
+
*
|
|
156
|
+
* @param {HTMLElement} srcElement - The source element from which to start searching for the nearest ancestor element.
|
|
157
|
+
* @param {string} key - The name of the attribute to retrieve.
|
|
158
|
+
* @returns {string} The value of the specified attribute, or an empty string if the attribute is not found.
|
|
159
|
+
* @protected
|
|
160
|
+
*/
|
|
71
161
|
protected getStringByAttr(srcElement: HTMLElement, key: string): string;
|
|
162
|
+
/**
|
|
163
|
+
* Adjusts the layout and positioning of the specified area in the table.
|
|
164
|
+
* This method is used internally and should not be called directly.
|
|
165
|
+
*
|
|
166
|
+
* @param {AreaIdent} areaIdent - The identifier of the area to adjust (e.g. header, body, footer).
|
|
167
|
+
* @param {number} [yStart=0] - The starting y-position for the layout adjustments.
|
|
168
|
+
* @protected
|
|
169
|
+
*/
|
|
72
170
|
protected adjustArea(areaIdent: AreaIdent, yStart?: number): void;
|
|
73
171
|
/**
|
|
74
172
|
* Draws big cells (rowspan and or colspan) in body/center
|
|
@@ -81,18 +179,97 @@ export declare class RenderScope extends EleScope {
|
|
|
81
179
|
* @protected
|
|
82
180
|
*/
|
|
83
181
|
protected drawBigCell(range: CellRange, xStart: number, yStart: number, areaModel: AreaModelIf, parentDiv: HTMLDivElement, sideIdent: SideIdent): void;
|
|
182
|
+
/**
|
|
183
|
+
* Finds the row index of an important rowspan cell in a given area model.
|
|
184
|
+
*
|
|
185
|
+
* @param {AreaModelIf} areaModel - The area model to search in.
|
|
186
|
+
* @param {number} rowIndex - The current row index.
|
|
187
|
+
* @param {number} colIndex - The current column index.
|
|
188
|
+
* @returns {number} - The row index of the important rowspan cell, or -1 if not found.
|
|
189
|
+
* @protected
|
|
190
|
+
*/
|
|
84
191
|
protected findRowOfImportantRowspanCell(areaModel: AreaModelIf, rowIndex: number, colIndex: number): number;
|
|
192
|
+
/**
|
|
193
|
+
* Adjusts the columns to fit the width of the row's parent element.
|
|
194
|
+
*
|
|
195
|
+
* @param {ArgsAdjustColumnsToRowParentParams} params - The parameters for adjusting the columns.
|
|
196
|
+
* @protected
|
|
197
|
+
* @return {void}
|
|
198
|
+
*/
|
|
85
199
|
protected adjustColumnsToRowParent({ areaIdent, sideIdent, areaModel, geo, parent, rowIndex, columnIndexStart, columnIndexEnd, verticalFixed, lastRowOfModel }: ArgsAdjustColumnsToRowParentParams): void;
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves the column index of the tree arrow column in the table.
|
|
202
|
+
*
|
|
203
|
+
* @protected
|
|
204
|
+
*
|
|
205
|
+
* @returns {0 | 1} The column index of the tree arrow column.
|
|
206
|
+
* Returns 0 if the checkbox is not visible,
|
|
207
|
+
* otherwise returns 1.
|
|
208
|
+
*/
|
|
86
209
|
protected getTreeArrowColumnIndex(): 0 | 1;
|
|
87
210
|
protected addAndRenderCellDiv({ areaModel, areaIdent, sideIdent, rowIndex, index, left, width, height, top, parent, lastRowOfModel }: ArgsRenderCellDiv): [HTMLDivElement, RendererCleanupFnType | undefined];
|
|
211
|
+
/**
|
|
212
|
+
* Applies CSS classes to an HTML element.
|
|
213
|
+
*
|
|
214
|
+
* @param {HTMLDivElement} ele - The HTML element to which CSS classes will be applied.
|
|
215
|
+
* @param {Object.<string, boolean>} cssClasses - An object containing CSS class names as keys and boolean values indicating whether to apply or remove the class.
|
|
216
|
+
* @protected
|
|
217
|
+
*/
|
|
88
218
|
protected applyCssClasses(ele: HTMLDivElement, cssClasses?: {
|
|
89
219
|
[key: string]: boolean;
|
|
90
220
|
}): void;
|
|
221
|
+
/**
|
|
222
|
+
* Retrieves the column widths of a table within a specified range.
|
|
223
|
+
*
|
|
224
|
+
* @param {number} startIndex - The index of the first column to retrieve the width of.
|
|
225
|
+
* @param {number} endIndex - The index of the last column to retrieve the width of.
|
|
226
|
+
*
|
|
227
|
+
* @return {number[]} An array containing the widths of the columns within the specified range.
|
|
228
|
+
*/
|
|
91
229
|
protected getColumnWidths(startIndex: number, endIndex: number): number[];
|
|
230
|
+
/**
|
|
231
|
+
* Retrieves the heights of rows within a specified range.
|
|
232
|
+
*
|
|
233
|
+
* @param {number} startIndex - The index of the first row in the range.
|
|
234
|
+
* @param {number} endIndex - The index of the last row in the range.
|
|
235
|
+
* @param {AreaModelIf} areaModel - The area model.
|
|
236
|
+
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
237
|
+
*/
|
|
92
238
|
protected getRowHeights(startIndex: number, endIndex: number, areaModel: AreaModelIf): number[];
|
|
239
|
+
/**
|
|
240
|
+
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
241
|
+
*
|
|
242
|
+
* @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
|
|
243
|
+
*
|
|
244
|
+
* @return {void}
|
|
245
|
+
*/
|
|
93
246
|
protected adjustHoverRows(mouseMoveEvent: GeMouseEvent): void;
|
|
247
|
+
/**
|
|
248
|
+
* Hides the hover row by applying 'display: none' style to it.
|
|
249
|
+
*
|
|
250
|
+
* @protected
|
|
251
|
+
* @function
|
|
252
|
+
* @name hideHoverRow
|
|
253
|
+
* @memberof ClassName
|
|
254
|
+
*
|
|
255
|
+
* @returns {void}
|
|
256
|
+
*/
|
|
94
257
|
protected hideHoverRow(): void;
|
|
258
|
+
/**
|
|
259
|
+
* Adjusts the position and size of the hover column based on the mouse move event.
|
|
260
|
+
*
|
|
261
|
+
* @param {GeMouseEvent} mouseMoveEvent - The mouse move event object.
|
|
262
|
+
*/
|
|
95
263
|
protected adjustHoverColumns(mouseMoveEvent: GeMouseEvent): void;
|
|
264
|
+
/**
|
|
265
|
+
* Hide hover column.
|
|
266
|
+
*
|
|
267
|
+
* This method hides the hover column by applying a style of 'display: none'
|
|
268
|
+
* to the element representing the hover column.
|
|
269
|
+
*
|
|
270
|
+
* @protected
|
|
271
|
+
* @memberof ClassName
|
|
272
|
+
*/
|
|
96
273
|
protected hideHoverColumn(): void;
|
|
97
274
|
/**
|
|
98
275
|
* Executes a function after a specified delay, ensuring that the function is called only once within that delay period.
|
|
@@ -103,12 +280,100 @@ export declare class RenderScope extends EleScope {
|
|
|
103
280
|
* @return {undefined}
|
|
104
281
|
*/
|
|
105
282
|
protected debounce(fn: () => void, delay?: number): void;
|
|
283
|
+
/**
|
|
284
|
+
* Adjusts the dragging column during a mouse move event.
|
|
285
|
+
*
|
|
286
|
+
* @param {GeMouseEvent} mouseMoveEvent - The mouse move event.
|
|
287
|
+
* @param {number} sourceColumnIndex - The index of the source column.
|
|
288
|
+
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
289
|
+
*/
|
|
106
290
|
protected adjustDraggingColumn(mouseMoveEvent: GeMouseEvent, sourceColumnIndex: number, firstDraggingRendering: boolean): void;
|
|
291
|
+
/**
|
|
292
|
+
* Renders the content of a dragging column.
|
|
293
|
+
*
|
|
294
|
+
* @param {GeoData} columnGeo - The geographic data of the column.
|
|
295
|
+
*
|
|
296
|
+
* @returns {number} The y-coordinate of the rendered content.
|
|
297
|
+
*/
|
|
107
298
|
protected renderContentOfDraggingColumn(columnGeo: GeoData): void;
|
|
299
|
+
/**
|
|
300
|
+
* Renders the content of the dragging column for a specific area.
|
|
301
|
+
*
|
|
302
|
+
* @param {GeoData} columnGeo - The geometry data of the dragging column.
|
|
303
|
+
* @param {AreaIdent} areaIdent - The identifier of the area.
|
|
304
|
+
* @param {number} [y=0] - The starting y-position.
|
|
305
|
+
* @return {number} The final y-position after rendering all the content.
|
|
306
|
+
*/
|
|
108
307
|
protected renderContentOfDraggingColumnForArea(columnGeo: GeoData, areaIdent: AreaIdent, y?: number): number;
|
|
308
|
+
/**
|
|
309
|
+
* Hides the dragging column by applying a 'display: none' style to it.
|
|
310
|
+
* This method is protected and can only be accessed within the class.
|
|
311
|
+
*
|
|
312
|
+
* @return {void}
|
|
313
|
+
*/
|
|
109
314
|
protected hideDraggingColumn(): void;
|
|
315
|
+
/**
|
|
316
|
+
* Renders a draggable target div element.
|
|
317
|
+
*
|
|
318
|
+
* @param {HTMLDivElement} parent - The parent element where the target div will be appended to.
|
|
319
|
+
* @param {number} left - The left position of the target div in pixels.
|
|
320
|
+
* @param {number} top - The top position of the target div in pixels.
|
|
321
|
+
* @param {number} width - The width of the target div in pixels.
|
|
322
|
+
* @param {number} height - The height of the target div in pixels.
|
|
323
|
+
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
324
|
+
*/
|
|
110
325
|
private renderDragTargetDiv;
|
|
326
|
+
/**
|
|
327
|
+
* Render selected background div.
|
|
328
|
+
*
|
|
329
|
+
* @private
|
|
330
|
+
* @param {boolean} skip - Whether to skip rendering.
|
|
331
|
+
* @param {boolean} renderSelection - Whether to render the selection.
|
|
332
|
+
* @param {SideIdent} sideIdent - The side identifier.
|
|
333
|
+
* @param {AreaModelIf} areaModel - The area model.
|
|
334
|
+
* @param {number} rowIndex - The row index.
|
|
335
|
+
* @param {number} index - The index.
|
|
336
|
+
* @param {HTMLDivElement} parent - The parent div element.
|
|
337
|
+
* @param {number} left - The left position.
|
|
338
|
+
* @param {number} top - The top position.
|
|
339
|
+
* @param {number} width - The width of the div.
|
|
340
|
+
* @param {number} height - The height of the div.
|
|
341
|
+
* @returns {boolean} - Whether the cell is selected.
|
|
342
|
+
*/
|
|
111
343
|
private renderSelectedBackgroundDiv;
|
|
344
|
+
/**
|
|
345
|
+
* Renders a cell in the grid.
|
|
346
|
+
*
|
|
347
|
+
* @param {ArgsRenderCell} args - The arguments for rendering the cell.
|
|
348
|
+
* @param {AreaModel} args.areaModel - The area model of the grid.
|
|
349
|
+
* @param {string} args.areaIdent - The identifier of the area.
|
|
350
|
+
* @param {string} args.sideIdent - The identifier of the side.
|
|
351
|
+
* @param {number} args.rowIndex - The index of the row.
|
|
352
|
+
* @param {number} args.columnIndex - The index of the column.
|
|
353
|
+
* @param {number} args.left - The left position of the cell.
|
|
354
|
+
* @param {number} args.top - The top position of the cell.
|
|
355
|
+
* @param {number} args.width - The width of the cell.
|
|
356
|
+
* @param {number} args.height - The height of the cell.
|
|
357
|
+
* @param {HTMLElement} args.parent - The parent element of the cell.
|
|
358
|
+
* @param {boolean} args.cellSelected - Indicates if the cell is selected.
|
|
359
|
+
* @param {boolean} args.lastRowOfModel - Indicates if the cell is in the last row of the model.
|
|
360
|
+
*
|
|
361
|
+
* @returns {void}
|
|
362
|
+
*/
|
|
112
363
|
private renderCell;
|
|
364
|
+
/**
|
|
365
|
+
* Render the header cell resize handle.
|
|
366
|
+
*
|
|
367
|
+
* @param {ArgsRenderHeaderCellResizeHandle} args - The arguments for rendering the handle.
|
|
368
|
+
* @param {number} args.rowIndex - The index of the row.
|
|
369
|
+
* @param {number} args.columnIndex - The index of the column.
|
|
370
|
+
* @param {number} args.cellLeft - The left position of the cell.
|
|
371
|
+
* @param {number} args.cellTop - The top position of the cell.
|
|
372
|
+
* @param {number} args.cellWidth - The width of the cell.
|
|
373
|
+
* @param {number} args.cellHeight - The height of the cell.
|
|
374
|
+
* @param {HTMLElement} args.parent - The parent element to append the handle to.
|
|
375
|
+
*
|
|
376
|
+
* @return {void}
|
|
377
|
+
*/
|
|
113
378
|
private renderHeaderCellResizeHandle;
|
|
114
379
|
}
|
|
@@ -15,9 +15,16 @@ export declare class SelectionModel implements SelectionModelIf {
|
|
|
15
15
|
clear(): void;
|
|
16
16
|
hasSelection(): boolean;
|
|
17
17
|
selectAll(): void;
|
|
18
|
+
isAllSelected(): boolean;
|
|
18
19
|
addSelection(range: CellRange): void;
|
|
19
20
|
removeSelection(range: CellRange): void;
|
|
20
21
|
togglePoint(row: number, col: number): void;
|
|
21
22
|
isSelected(row: number, col: number): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves the merged row indices from the given range selection.
|
|
25
|
+
*
|
|
26
|
+
* @returns {number[]} Array of merged row indices
|
|
27
|
+
*/
|
|
28
|
+
getMergedRowIndices(): number[];
|
|
22
29
|
private addRange;
|
|
23
30
|
}
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import { CellRange } from "../data/common/cell-range";
|
|
2
2
|
export interface SelectionModelIf {
|
|
3
|
+
/**
|
|
4
|
+
* Toggles the selection state of a point at the specified row and column in a grid.
|
|
5
|
+
*
|
|
6
|
+
* @param {number} row - The row index of the point to toggle.
|
|
7
|
+
* @param {number} col - The column index of the point to toggle.
|
|
8
|
+
* @return {void}
|
|
9
|
+
*/
|
|
3
10
|
togglePoint(row: number, col: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a specific cell in a grid is selected.
|
|
13
|
+
*
|
|
14
|
+
* @param {number} row - The row index of the cell to check.
|
|
15
|
+
* @param {number} col - The column index of the cell to check.
|
|
16
|
+
* @returns {boolean} - Returns true if the cell is selected, otherwise false.
|
|
17
|
+
*/
|
|
4
18
|
isSelected(row: number, col: number): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Returns an array of CellRange objects representing the selections.
|
|
21
|
+
*
|
|
22
|
+
* @return {CellRange[]} Array of CellRange objects representing the ranges.
|
|
23
|
+
*/
|
|
5
24
|
getRanges(): CellRange[];
|
|
25
|
+
getMergedRowIndices(): number[];
|
|
6
26
|
clear(): void;
|
|
7
27
|
hasSelection(): boolean;
|
|
8
28
|
addSelection(range: CellRange): void;
|
|
9
29
|
removeSelection(range: CellRange): void;
|
|
10
30
|
getSelectionCount(rowIndex: number, columnIndex: number): number;
|
|
11
31
|
selectAll(): void;
|
|
32
|
+
isAllSelected(): boolean;
|
|
12
33
|
firstClick(rowIndex: number, columnIndex: number): void;
|
|
13
34
|
}
|
package/lib/table/table-api.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import { TableCellUpdateEventIf } from "./data/common/event/input/table-cell-upd
|
|
|
4
4
|
import { SelectionModel } from './selection/selection-model';
|
|
5
5
|
import { ActionId } from './action/action-id.type';
|
|
6
6
|
import { ShortcutActionIdMapping } from './action/shortcut-actionid-mapping.type';
|
|
7
|
+
import { SelectionModelIf } from './selection/selection-model.if';
|
|
7
8
|
export declare class TableApi {
|
|
8
|
-
|
|
9
|
+
readonly tableScope: TableScope;
|
|
9
10
|
constructor(tableScope: TableScope);
|
|
10
11
|
/**
|
|
11
12
|
* Updates the cells in the table based on the provided events.
|
|
@@ -90,6 +91,14 @@ export declare class TableApi {
|
|
|
90
91
|
* to update and redraw the table based on the latest data.
|
|
91
92
|
*/
|
|
92
93
|
repaint(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Repaints the table scope with hard repaint.
|
|
96
|
+
* Repaints the UI by resetting the size of the wrapper div,
|
|
97
|
+
* adjusting the containers and rows, and performing additional adjustments
|
|
98
|
+
* after scrolling.
|
|
99
|
+
*
|
|
100
|
+
* @return {void}
|
|
101
|
+
*/
|
|
93
102
|
repaintHard(): void;
|
|
94
103
|
/**
|
|
95
104
|
* Clears the current selection of the table.
|
|
@@ -127,4 +136,17 @@ export declare class TableApi {
|
|
|
127
136
|
* @return {Promise<string>} - A promise that resolves with the copied data as a string.
|
|
128
137
|
*/
|
|
129
138
|
copyToClipboard(): Promise<string>;
|
|
139
|
+
/**
|
|
140
|
+
* Retrieves the current scope of the table.
|
|
141
|
+
*
|
|
142
|
+
* @returns {TableScope} The current scope of the table.
|
|
143
|
+
*/
|
|
144
|
+
getTableScope(): TableScope;
|
|
145
|
+
/**
|
|
146
|
+
* Retrieves the selection model of the table.
|
|
147
|
+
*
|
|
148
|
+
* @return {SelectionModelIf | undefined} The selection model of the table,
|
|
149
|
+
* or undefined if no selection model is available.
|
|
150
|
+
*/
|
|
151
|
+
getSelectionModel(): SelectionModelIf | undefined;
|
|
130
152
|
}
|
|
@@ -22,12 +22,30 @@ import { MouseTargetData } from './data/event/mouse-target-data';
|
|
|
22
22
|
import { SelectionModelIf } from './selection/selection-model.if';
|
|
23
23
|
import { FocusModelIf } from './focus/focus-model.if';
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @
|
|
28
|
-
* @
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
25
|
+
* The TableScope class extends the RenderScope class and provides functionality for rendering and interacting with a table.
|
|
26
|
+
*
|
|
27
|
+
* @property {LicenseManager} licenseManager - An instance of LicenseManager.
|
|
28
|
+
* @property {MouseHandler} mouseHandler - An instance of MouseHandler to handle mouse events.
|
|
29
|
+
* @property {InputHandler} inputHandler - An instance of InputHandler to handle keyboard inputs.
|
|
30
|
+
* @property {ShortcutService} shortcutService - An instance of ShortcutService to register and handle shortcuts.
|
|
31
|
+
* @property {StoreStateCollapsedExpandService | undefined} storeStateCollapsedExpandService - A service to manage and restore the collapsed or expanded state of the table's rows.
|
|
32
|
+
* @property {StoreStateSortingService | undefined} storeSortingService - A service to manage and restore the sort state of the table's columns.
|
|
33
|
+
* @property {SelectionService} selectionService - An instance of SelectionService to manage cell selection in the table.
|
|
34
|
+
* @property {GeKeyEvent | undefined} keyEvent - An object representing the last processed keyboard event.
|
|
35
|
+
* @property {TableApi} api - An instance of TableApi, providing an API for table interactions.
|
|
36
|
+
*
|
|
37
|
+
* Additional properties related to the dragging state of the table:
|
|
38
|
+
* - mouseStartAction: The action performed at the start of a mouse drag operation.
|
|
39
|
+
* - mouseStartWidth: The initial width of an element at the start of a resizing drag operation.
|
|
40
|
+
* - mouseStartColumnIndex: The index of the column at the start of a resizing drag operation.
|
|
41
|
+
* - dragFrom: The initial cell index of a drag operation.
|
|
42
|
+
* - dragTo: The current cell index of a drag operation.
|
|
43
|
+
* - lastDragFrom: The previous initial cell index of a drag operation.
|
|
44
|
+
* - lastDragTo: The previous current cell index of a drag operation.
|
|
45
|
+
* - firstDraggingRendering: A boolean indicating if this is the first render during the current drag operation.
|
|
46
|
+
*
|
|
47
|
+
* Methods: Please refer to the documentation of the superclass RenderScope for the inherited methods.
|
|
48
|
+
* The TableScope class introduces additional methods not listed here. Please refer to the source code for further details.
|
|
31
49
|
*/
|
|
32
50
|
export declare class TableScope extends RenderScope implements OnActionTriggeredIf {
|
|
33
51
|
protected readonly eventListener: EventListenerIf;
|