@guiexpert/table 1.1.5 → 1.1.7
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/css/main.css +16 -3
- package/css/table-color-classes.css +9 -1
- package/css/table-color-vars.css +7 -1
- package/index.cjs +19 -8
- package/index.d.ts +1 -0
- package/index.js +170 -97
- package/lib/table/mouse-handler.d.ts +7 -0
- package/lib/table/render-scope.d.ts +8 -1
- package/lib/table/renderer/positive-and-negative-number-renderer.d.ts +4 -0
- package/lib/table/selection/selection-model.d.ts +1 -0
- package/lib/table/selection/selection-model.if.d.ts +1 -0
- package/lib/table/selection/selection-service.d.ts +2 -2
- package/lib/table/table-api.d.ts +17 -0
- package/lib/table/table-scope.d.ts +13 -3
- package/package.json +2 -1
|
@@ -6,6 +6,12 @@ import { GeMouseEvent } from "./data/common/event/ge-mouse-event";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class MouseHandler {
|
|
8
8
|
protected tableScope: TableScope;
|
|
9
|
+
/**
|
|
10
|
+
* Represents the delay in milliseconds between two consecutive double clicks.
|
|
11
|
+
*
|
|
12
|
+
* @type {number}
|
|
13
|
+
*/
|
|
14
|
+
doubleClickDelay: number;
|
|
9
15
|
mouseEvent?: MouseEvent;
|
|
10
16
|
startMouseEvent?: GeMouseEvent;
|
|
11
17
|
geMouseEvent?: GeMouseEvent;
|
|
@@ -22,6 +28,7 @@ export declare class MouseHandler {
|
|
|
22
28
|
* @return {void}
|
|
23
29
|
*/
|
|
24
30
|
private onContextmenu;
|
|
31
|
+
private lastClicked;
|
|
25
32
|
/**
|
|
26
33
|
* Handles the click event on the host element.
|
|
27
34
|
*
|
|
@@ -45,7 +45,14 @@ export declare class RenderScope extends EleScope {
|
|
|
45
45
|
protected editing: boolean;
|
|
46
46
|
isEditing(): boolean;
|
|
47
47
|
resetEditorRenderer(): void;
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Clears the selection in the component.
|
|
50
|
+
*
|
|
51
|
+
* @param {boolean} rerender - Indicates whether to rerender the component after clearing the selection. Default value is false.
|
|
52
|
+
*
|
|
53
|
+
* @return {void}
|
|
54
|
+
*/
|
|
55
|
+
clearSelection(rerender?: boolean): void;
|
|
49
56
|
initRenderEditor(rowIdx: number, colIdx: number): void;
|
|
50
57
|
repaint(): void;
|
|
51
58
|
adjustAfterScrolling(): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from '../../../index.ts';
|
|
2
|
+
export declare class PositiveAndNegativeNumberRenderer implements CellRendererIf {
|
|
3
|
+
render(cellDiv: HTMLDivElement, rowIndex: number, columnIndex: number, areaIdent: AreaIdent, _areaModel: AreaModelIf, cellValue: any, domService: DomServiceIf): RendererCleanupFnType | undefined;
|
|
4
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare class SelectionModel implements SelectionModelIf {
|
|
|
8
8
|
protected negativeRanges: CellRange[];
|
|
9
9
|
protected allSelected: boolean;
|
|
10
10
|
constructor(selectionType?: SelectionType, selectionMode?: SelectionMode);
|
|
11
|
+
firstClick(rowIndex: number, columnIndex: number): void;
|
|
11
12
|
getSelectionCount(rowIndex: number, columnIndex: number): number;
|
|
12
13
|
isInNegativeRange(rowIndex: number, columnIndex: number): boolean;
|
|
13
14
|
getRanges(): CellRange[];
|
|
@@ -7,8 +7,8 @@ import { OnActionTriggeredIf } from "../action/on-action-triggered.if";
|
|
|
7
7
|
import { ActionId } from "../action/action-id.type";
|
|
8
8
|
export declare class SelectionService implements OnActionTriggeredIf {
|
|
9
9
|
protected readonly tableScope: TableScope;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
getSelectionModel?: GetT<SelectionModelIf>;
|
|
11
|
+
getFocusModel?: GetT<FocusModelIf>;
|
|
12
12
|
protected previousEvt?: GeMouseEvent;
|
|
13
13
|
constructor(tableScope: TableScope);
|
|
14
14
|
onMouseClicked(evt: GeMouseEvent, _previousEvt: GeMouseEvent | undefined): boolean;
|
package/lib/table/table-api.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TableScope } from "./table-scope";
|
|
2
2
|
import { ColumnDefIf } from "./data/tablemodel/column/column-def.if";
|
|
3
3
|
import { TableCellUpdateEventIf } from "./data/common/event/input/table-cell-update-event.if";
|
|
4
|
+
import { SelectionModel } from './selection/selection-model';
|
|
4
5
|
export declare class TableApi {
|
|
5
6
|
private readonly tableScope;
|
|
6
7
|
constructor(tableScope: TableScope);
|
|
@@ -87,4 +88,20 @@ export declare class TableApi {
|
|
|
87
88
|
* to update and redraw the table based on the latest data.
|
|
88
89
|
*/
|
|
89
90
|
repaint(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Clears the current selection of the table.
|
|
93
|
+
* The table will be rendered automatically.
|
|
94
|
+
*
|
|
95
|
+
* @returns {void}
|
|
96
|
+
*/
|
|
97
|
+
clearSelection(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Sets the selection model for the table scope.
|
|
100
|
+
*
|
|
101
|
+
* @param {SelectionModel} sm - The selection model to be set.
|
|
102
|
+
* @param {boolean} [repaint=true] - Indicates whether the table should be repainted after setting the selection model. Default value is true.
|
|
103
|
+
*
|
|
104
|
+
* @return {void}
|
|
105
|
+
*/
|
|
106
|
+
setSelectionModel(sm: SelectionModel, repaint?: boolean): void;
|
|
90
107
|
}
|
|
@@ -16,6 +16,7 @@ import { OnActionTriggeredIf } from "./action/on-action-triggered.if";
|
|
|
16
16
|
import { ActionId } from "./action/action-id.type";
|
|
17
17
|
import { ShortcutService } from "./action/shortcut.service";
|
|
18
18
|
import { LicenseManager } from './license-manager';
|
|
19
|
+
import { SelectionModel } from './selection/selection-model';
|
|
19
20
|
/**
|
|
20
21
|
* Creates a TableScope instance.
|
|
21
22
|
* @param {HTMLDivElement} hostElement - The host element.
|
|
@@ -137,7 +138,9 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
137
138
|
* @param {GeMouseEvent | undefined} previousEvt - The previous mouse click event, if any.
|
|
138
139
|
* @returns {void}
|
|
139
140
|
*/
|
|
140
|
-
onMouseClicked(evt: GeMouseEvent, previousEvt: GeMouseEvent | undefined):
|
|
141
|
+
onMouseClicked(evt: GeMouseEvent, previousEvt: GeMouseEvent | undefined): boolean;
|
|
142
|
+
debounceRepaint(): void;
|
|
143
|
+
publishGeMouseEvent(evt: GeMouseEvent): void;
|
|
141
144
|
/**
|
|
142
145
|
* Updates the table (repaint) when an external filter is changed.
|
|
143
146
|
*
|
|
@@ -179,8 +182,6 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
179
182
|
/**
|
|
180
183
|
* Restores the scroll position of the table if auto restore options are enabled.
|
|
181
184
|
*
|
|
182
|
-
* @private
|
|
183
|
-
* @memberof ClassName
|
|
184
185
|
*
|
|
185
186
|
* @returns {void}
|
|
186
187
|
*/
|
|
@@ -224,4 +225,13 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
224
225
|
* @return {void}
|
|
225
226
|
*/
|
|
226
227
|
scrollToIndex(_indexX: number, indexY: number): void;
|
|
228
|
+
/**
|
|
229
|
+
* Sets the selection model for the table.
|
|
230
|
+
*
|
|
231
|
+
* @param {SelectionModel} sm - The selection model to be set.
|
|
232
|
+
* @param {boolean} rerender - Optional parameter indicating whether to rerender the table after setting the selection model. Default value is false.
|
|
233
|
+
*
|
|
234
|
+
* @return {void} - This method does not return any value.
|
|
235
|
+
*/
|
|
236
|
+
setSelectionModel(sm: SelectionModel, rerender?: boolean): void;
|
|
227
237
|
}
|