@guiexpert/table 1.1.3 → 1.1.5
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 +30 -11
- package/index.d.ts +2 -0
- package/index.js +360 -279
- package/lib/table/license-manager.d.ts +22 -0
- package/lib/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +11 -0
- package/lib/table/table-api.d.ts +6 -6
- package/lib/table/table-scope.d.ts +25 -3
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LicenseManager class responsible for managing license keys.
|
|
3
|
+
* As it's a singleton class, it only allows one instance of itself to exist.
|
|
4
|
+
*
|
|
5
|
+
* Usage: LicenseManager.getInstance().setLicenseKey('Your API key');
|
|
6
|
+
*/
|
|
7
|
+
export declare class LicenseManager {
|
|
8
|
+
private static instance;
|
|
9
|
+
private alreadySet;
|
|
10
|
+
private constructor();
|
|
11
|
+
static getInstance(): LicenseManager;
|
|
12
|
+
/**
|
|
13
|
+
* Method to set the license key for the application.
|
|
14
|
+
* A 'meta' element is created with content as 'guiexperttable=<license key>'
|
|
15
|
+
* and appended into the head section of the document
|
|
16
|
+
*
|
|
17
|
+
* @param {string} key - The license key to set for the application.
|
|
18
|
+
*
|
|
19
|
+
* @return {void} - This method does not return anything
|
|
20
|
+
*/
|
|
21
|
+
setLicenseKey(key: string | undefined): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CellRendererIf } from "./cell-render.if";
|
|
2
|
+
import { DomServiceIf } from "../service/dom-service.if";
|
|
3
|
+
import { AreaIdent } from "../data/tablemodel/area-ident.type";
|
|
4
|
+
import { RendererCleanupFnType } from "./renderer-cleanup-fn.type";
|
|
5
|
+
import { AreaModelObjectyArray } from "../data/tablemodel/areamodel/area-model-object-array";
|
|
6
|
+
export declare class NumberCellProgressBarCellRenderer<T> implements CellRendererIf {
|
|
7
|
+
maxValue: number;
|
|
8
|
+
labelVisible: boolean;
|
|
9
|
+
constructor(maxValue?: number, labelVisible?: boolean);
|
|
10
|
+
render(cellDiv: HTMLDivElement, rowIndex: number, columnIndex: number, areaIdent: AreaIdent, _areaModel: AreaModelObjectyArray<T>, cellValue: number, domService: DomServiceIf): RendererCleanupFnType | undefined;
|
|
11
|
+
}
|
package/lib/table/table-api.d.ts
CHANGED
|
@@ -22,20 +22,20 @@ export declare class TableApi {
|
|
|
22
22
|
/**
|
|
23
23
|
* Scrolls the table body to the specified pixel coordinates.
|
|
24
24
|
*
|
|
25
|
-
* @param {number}
|
|
26
|
-
* @param {number}
|
|
25
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to. Defaults to 0.
|
|
26
|
+
* @param {number} py - The vertical pixel coordinate to scroll to. Defaults to 0.
|
|
27
27
|
* @return {void}
|
|
28
28
|
*/
|
|
29
|
-
scrollToPixel(
|
|
29
|
+
scrollToPixel(px?: number, py?: number): void;
|
|
30
30
|
/**
|
|
31
31
|
* Scrolls to the specified index in both horizontal and vertical directions.
|
|
32
32
|
*
|
|
33
|
-
* @param {number}
|
|
34
|
-
* @param {number}
|
|
33
|
+
* @param {number} indexX - The index of the column to scroll to in the horizontal direction. Default is 0.
|
|
34
|
+
* @param {number} indexY - The index of the row to scroll to in the vertical direction. Default is 0.
|
|
35
35
|
*
|
|
36
36
|
* @return undefined
|
|
37
37
|
*/
|
|
38
|
-
scrollToIndex(
|
|
38
|
+
scrollToIndex(indexX?: number, indexY?: number): void;
|
|
39
39
|
/**
|
|
40
40
|
* Sets whether the header is visible or not.
|
|
41
41
|
*
|
|
@@ -15,13 +15,18 @@ import { GeKeyEvent } from "./data/common/event/ge-key-event";
|
|
|
15
15
|
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
|
+
import { LicenseManager } from './license-manager';
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
* @
|
|
20
|
+
* Creates a TableScope instance.
|
|
21
|
+
* @param {HTMLDivElement} hostElement - The host element.
|
|
22
|
+
* @param {TableModelIf} tableModel - The table model object.
|
|
23
|
+
* @param {TableOptionsIf} [tableOptions=new TableOptions()] - Optional table options object.
|
|
24
|
+
* @param {EventListenerIf} [eventListener=new EventAdapter()] - Optional event listener object.
|
|
25
|
+
* @param {DomServiceIf} [domService=new SimpleDomService()] - Optional DOM service object.
|
|
22
26
|
*/
|
|
23
27
|
export declare class TableScope extends RenderScope implements OnActionTriggeredIf {
|
|
24
28
|
protected readonly eventListener: EventListenerIf;
|
|
29
|
+
licenseManager: LicenseManager;
|
|
25
30
|
mouseHandler: MouseHandler;
|
|
26
31
|
inputHandler: InputHandler;
|
|
27
32
|
shortcutService: ShortcutService;
|
|
@@ -202,4 +207,21 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
202
207
|
* @private
|
|
203
208
|
*/
|
|
204
209
|
private autoRestoreCollapsedExpandedState;
|
|
210
|
+
/**
|
|
211
|
+
* Scrolls the viewport to the specified pixel coordinates.
|
|
212
|
+
*
|
|
213
|
+
* @param {number} px - The horizontal pixel coordinate to scroll to.
|
|
214
|
+
* @param {number} py - The vertical pixel coordinate to scroll to.
|
|
215
|
+
*
|
|
216
|
+
* @return {void}
|
|
217
|
+
*/
|
|
218
|
+
scrollToPixel(px: number, py: number): void;
|
|
219
|
+
/**
|
|
220
|
+
* Scrolls to the specified index in the table.
|
|
221
|
+
*
|
|
222
|
+
* @param {number} _indexX - The horizontal index of the table where scrolling is needed.
|
|
223
|
+
* @param {number} indexY - The vertical index of the table where scrolling is needed.
|
|
224
|
+
* @return {void}
|
|
225
|
+
*/
|
|
226
|
+
scrollToIndex(_indexX: number, indexY: number): void;
|
|
205
227
|
}
|