@genesislcap/grid-pro 14.151.1 → 14.152.0
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/dist/custom-elements.json +245 -9
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +22 -11
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/state-persistence/index.d.ts +4 -0
- package/dist/dts/state-persistence/index.d.ts.map +1 -0
- package/dist/dts/state-persistence/kv-state.d.ts +15 -0
- package/dist/dts/state-persistence/kv-state.d.ts.map +1 -0
- package/dist/dts/state-persistence/local-state.d.ts +13 -0
- package/dist/dts/state-persistence/local-state.d.ts.map +1 -0
- package/dist/dts/state-persistence/state-persistence.d.ts +24 -0
- package/dist/dts/state-persistence/state-persistence.d.ts.map +1 -0
- package/dist/esm/datasource/server-side.datasource.js +41 -39
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +65 -61
- package/dist/esm/grid-pro.js +102 -90
- package/dist/esm/index.js +1 -0
- package/dist/esm/state-persistence/index.js +3 -0
- package/dist/esm/state-persistence/kv-state.js +58 -0
- package/dist/esm/state-persistence/local-state.js +30 -0
- package/dist/esm/state-persistence/state-persistence.js +7 -0
- package/dist/grid-pro.api.json +795 -158
- package/dist/grid-pro.d.ts +69 -11
- package/docs/api/grid-pro.gridpro.applytemplatedefinitions.md +2 -2
- package/docs/api/grid-pro.gridpro.getsavedcolumnstate.md +3 -3
- package/docs/api/grid-pro.gridpro.md +2 -1
- package/docs/api/grid-pro.gridpro.mergeallcolumndefsandstates.md +2 -2
- package/docs/api/grid-pro.gridpro.statepersistence.md +11 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.getcolumnstate.md +22 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.kvstorage.md +11 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.md +29 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.savecolumnstate.md +23 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.session.md +11 -0
- package/docs/api/grid-pro.localstoragestatepersistence.getcolumnstate.md +22 -0
- package/docs/api/grid-pro.localstoragestatepersistence.md +28 -0
- package/docs/api/grid-pro.localstoragestatepersistence.savecolumnstate.md +23 -0
- package/docs/api/grid-pro.localstoragestatepersistence.session.md +11 -0
- package/docs/api/grid-pro.md +3 -0
- package/docs/api/grid-pro.statepersistence.getcolumnstate.md +24 -0
- package/docs/api/grid-pro.statepersistence.md +21 -0
- package/docs/api/grid-pro.statepersistence.savecolumnstate.md +25 -0
- package/docs/api-report.md +40 -3
- package/package.json +14 -13
package/dist/grid-pro.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ import type { IServerSideGetRowsParams } from '@ag-grid-community/core';
|
|
|
33
33
|
import type { IServerSideRowModel } from '@ag-grid-community/core';
|
|
34
34
|
import { ITooltipComp } from '@ag-grid-community/core';
|
|
35
35
|
import { ITooltipParams } from '@ag-grid-community/core';
|
|
36
|
+
import { KVStorage } from '@genesislcap/foundation-comms';
|
|
36
37
|
import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
37
38
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
38
39
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
@@ -41,6 +42,7 @@ import type { RowDataTransaction } from '@ag-grid-community/core';
|
|
|
41
42
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
42
43
|
import type { ServerSideTransaction } from '@ag-grid-community/core';
|
|
43
44
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
45
|
+
import { Session } from '@genesislcap/foundation-comms';
|
|
44
46
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
45
47
|
import { Swatch } from '@microsoft/fast-components';
|
|
46
48
|
import { SwatchRGB } from '@microsoft/fast-components';
|
|
@@ -1166,7 +1168,7 @@ export declare const GridOptionsConfig: InterfaceSymbol<GridOptionsConfig>;
|
|
|
1166
1168
|
export declare class GridPro extends GridPro_base {
|
|
1167
1169
|
columnApi: ColumnApi;
|
|
1168
1170
|
gridApi: GridApi;
|
|
1169
|
-
|
|
1171
|
+
statePersistence: StatePersistence;
|
|
1170
1172
|
/**
|
|
1171
1173
|
* Timeout function used to debounce resize calls
|
|
1172
1174
|
* @internal
|
|
@@ -1235,6 +1237,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
1235
1237
|
gridComponents: {
|
|
1236
1238
|
[componentName: string]: any;
|
|
1237
1239
|
};
|
|
1240
|
+
private columnState;
|
|
1238
1241
|
protected agAttributes: Record<string, string>;
|
|
1239
1242
|
protected agPropertiesMap: Record<string, string>;
|
|
1240
1243
|
protected agGridOptions: GridOptions;
|
|
@@ -1277,12 +1280,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
1277
1280
|
private removeConfigWidthsToAutosize;
|
|
1278
1281
|
private saveColumnState;
|
|
1279
1282
|
/**
|
|
1280
|
-
* Gets the saved grid ColumnState[] from
|
|
1283
|
+
* Gets the saved grid ColumnState[] from storage
|
|
1281
1284
|
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
1282
1285
|
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
1283
1286
|
* @public
|
|
1284
1287
|
*/
|
|
1285
|
-
getSavedColumnState(): ColumnState[]
|
|
1288
|
+
getSavedColumnState(): Promise<ColumnState[]>;
|
|
1286
1289
|
private restoreColumnState;
|
|
1287
1290
|
private cacheFilterConfig;
|
|
1288
1291
|
private restoreCachedFilterConfig;
|
|
@@ -1292,6 +1295,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
1292
1295
|
get gridOptions(): GridOptions;
|
|
1293
1296
|
get gridProDatasource(): GridProBaseDatasource;
|
|
1294
1297
|
set gridOptions(options: GridOptions);
|
|
1298
|
+
private initGridOptions;
|
|
1295
1299
|
/**
|
|
1296
1300
|
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
1297
1301
|
* @deprecated use `applyTemplateDefinitions` instead.
|
|
@@ -1299,7 +1303,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
1299
1303
|
* @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
|
|
1300
1304
|
* @returns The merged column definitions.
|
|
1301
1305
|
*/
|
|
1302
|
-
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
1306
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
1303
1307
|
/**
|
|
1304
1308
|
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
1305
1309
|
* @public
|
|
@@ -1309,7 +1313,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
1309
1313
|
* on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
|
|
1310
1314
|
* @returns The merged column definitions.
|
|
1311
1315
|
*/
|
|
1312
|
-
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
1316
|
+
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
1313
1317
|
get observedAttributes(): string[];
|
|
1314
1318
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
1315
1319
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -1360,6 +1364,20 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1360
1364
|
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
|
|
1361
1365
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1362
1366
|
readonly attributes: NamedNodeMap;
|
|
1367
|
+
/**
|
|
1368
|
+
* Injectable config that allows to change grid options on an app level basis
|
|
1369
|
+
* To modify options, register instance of the config in DOM container that is
|
|
1370
|
+
* above the grid or on the top level of the application, so it applies to all grids.
|
|
1371
|
+
*
|
|
1372
|
+
* @example
|
|
1373
|
+
* ```
|
|
1374
|
+
* DI.getOrCreateDOMContainer().register([
|
|
1375
|
+
* Registration.instance<GridOptionsConfig>(GridOptionsConfig, {
|
|
1376
|
+
* headerHeight: 50,
|
|
1377
|
+
* }),
|
|
1378
|
+
* ]);
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1363
1381
|
readonly classList: DOMTokenList;
|
|
1364
1382
|
className: string;
|
|
1365
1383
|
readonly clientHeight: number;
|
|
@@ -1444,12 +1462,6 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1444
1462
|
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
1445
1463
|
compareDocumentPosition(other: Node): number;
|
|
1446
1464
|
contains(other: Node): boolean;
|
|
1447
|
-
/**
|
|
1448
|
-
* Gets the saved grid ColumnState[] from local storage
|
|
1449
|
-
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
1450
|
-
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
1451
|
-
* @public
|
|
1452
|
-
*/
|
|
1453
1465
|
getRootNode(options?: GetRootNodeOptions): Node;
|
|
1454
1466
|
hasChildNodes(): boolean;
|
|
1455
1467
|
insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
|
|
@@ -2552,6 +2564,28 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2552
2564
|
*/
|
|
2553
2565
|
export declare const gridProTemplate: ViewTemplate;
|
|
2554
2566
|
|
|
2567
|
+
/**
|
|
2568
|
+
* Implementation for the KV Storage State Persistence interface.
|
|
2569
|
+
* @public
|
|
2570
|
+
*/
|
|
2571
|
+
export declare class KVStorageStatePersistence implements StatePersistence {
|
|
2572
|
+
kvStorage: KVStorage;
|
|
2573
|
+
session: Session;
|
|
2574
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
2575
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2576
|
+
private migrateLocalStorageToKVStorage;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
/**
|
|
2580
|
+
* Implementation for the Local Storage State Persistence interface.
|
|
2581
|
+
* @public
|
|
2582
|
+
*/
|
|
2583
|
+
export declare class LocalStorageStatePersistence implements StatePersistence {
|
|
2584
|
+
session: Session;
|
|
2585
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
2586
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2555
2589
|
/**
|
|
2556
2590
|
* Logger for the grid-pro package
|
|
2557
2591
|
* @public
|
|
@@ -2689,6 +2723,30 @@ export declare class SelectRenderer extends FoundationElement implements ICellRe
|
|
|
2689
2723
|
selectionChanged: (e: any) => void;
|
|
2690
2724
|
}
|
|
2691
2725
|
|
|
2726
|
+
/**
|
|
2727
|
+
* Represents a state persistence and its capabilities.
|
|
2728
|
+
* Provides methods to set and get columns from the storage.
|
|
2729
|
+
* @public
|
|
2730
|
+
*/
|
|
2731
|
+
export declare interface StatePersistence {
|
|
2732
|
+
/**
|
|
2733
|
+
* Returns the column state for the given key.
|
|
2734
|
+
* @public
|
|
2735
|
+
*/
|
|
2736
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
2737
|
+
/**
|
|
2738
|
+
* Saves the column state for the given key.
|
|
2739
|
+
* @public
|
|
2740
|
+
*/
|
|
2741
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* The DI token for the StatePersistence interface.
|
|
2746
|
+
* @internal
|
|
2747
|
+
*/
|
|
2748
|
+
export declare const StatePersistence: InterfaceSymbol<StatePersistence>;
|
|
2749
|
+
|
|
2692
2750
|
declare class StreamBaseDatasource {
|
|
2693
2751
|
protected rowId: string;
|
|
2694
2752
|
rowData: Map<string, any>;
|
|
@@ -14,7 +14,7 @@ Will merge templated column definitions with `columnDefs` plus localStorage's co
|
|
|
14
14
|
**Signature:**
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
17
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Parameters
|
|
@@ -26,7 +26,7 @@ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boole
|
|
|
26
26
|
|
|
27
27
|
**Returns:**
|
|
28
28
|
|
|
29
|
-
ColDef<any>\[\]
|
|
29
|
+
Promise<ColDef<any>\[\]>
|
|
30
30
|
|
|
31
31
|
The merged column definitions.
|
|
32
32
|
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## GridPro.getSavedColumnState() method
|
|
6
6
|
|
|
7
|
-
Gets the saved grid ColumnState\[\] from
|
|
7
|
+
Gets the saved grid ColumnState\[\] from storage
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
getSavedColumnState(): ColumnState[]
|
|
12
|
+
getSavedColumnState(): Promise<ColumnState[]>;
|
|
13
13
|
```
|
|
14
14
|
**Returns:**
|
|
15
15
|
|
|
16
|
-
ColumnState\[\]
|
|
16
|
+
Promise<ColumnState\[\]>
|
|
17
17
|
|
|
18
18
|
## Remarks
|
|
19
19
|
|
|
@@ -58,6 +58,7 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
58
58
|
| [onlyTemplateColDefs](./grid-pro.gridpro.onlytemplatecoldefs.md) | | boolean | |
|
|
59
59
|
| [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the column state in local storage. |
|
|
60
60
|
| [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
|
|
61
|
+
| [statePersistence](./grid-pro.gridpro.statepersistence.md) | | [StatePersistence](./grid-pro.statepersistence.md) | |
|
|
61
62
|
| [theme](./grid-pro.gridpro.theme.md) | | string | |
|
|
62
63
|
|
|
63
64
|
## Methods
|
|
@@ -70,7 +71,7 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
70
71
|
| [combineAllGridComponents(gridOptionsComponents)](./grid-pro.gridpro.combineallgridcomponents.md) | | |
|
|
71
72
|
| [connectedCallback()](./grid-pro.gridpro.connectedcallback.md) | | |
|
|
72
73
|
| [disconnectedCallback()](./grid-pro.gridpro.disconnectedcallback.md) | | |
|
|
73
|
-
| [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from
|
|
74
|
+
| [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from storage |
|
|
74
75
|
| [globalEventListener(eventType, event)](./grid-pro.gridpro.globaleventlistener.md) | | |
|
|
75
76
|
| [mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState)](./grid-pro.gridpro.mergeallcolumndefsandstates.md) | | Will merge templated column definitions with <code>columnDefs</code> plus localStorage's column state or <code>deferredColumnStates</code>. |
|
|
76
77
|
| [statePersistanceEnabled()](./grid-pro.gridpro.statepersistanceenabled.md) | | |
|
|
@@ -9,7 +9,7 @@ Will merge templated column definitions with `columnDefs` plus localStorage's co
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
12
|
+
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
@@ -21,7 +21,7 @@ mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: bo
|
|
|
21
21
|
|
|
22
22
|
**Returns:**
|
|
23
23
|
|
|
24
|
-
ColDef<any>\[\]
|
|
24
|
+
Promise<ColDef<any>\[\]>
|
|
25
25
|
|
|
26
26
|
The merged column definitions.
|
|
27
27
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [statePersistence](./grid-pro.gridpro.statepersistence.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.statePersistence property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
statePersistence: StatePersistence;
|
|
11
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [getColumnState](./grid-pro.kvstoragestatepersistence.getcolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.getColumnState() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| persistColumnStateKey | string | |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
Promise<ColumnState\[\]>
|
|
22
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [kvStorage](./grid-pro.kvstoragestatepersistence.kvstorage.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.kvStorage property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
kvStorage: KVStorage;
|
|
11
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence class
|
|
6
|
+
|
|
7
|
+
Implementation for the KV Storage State Persistence interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class KVStorageStatePersistence implements StatePersistence
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [StatePersistence](./grid-pro.statepersistence.md)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [kvStorage](./grid-pro.kvstoragestatepersistence.kvstorage.md) | | KVStorage | |
|
|
21
|
+
| [session](./grid-pro.kvstoragestatepersistence.session.md) | | Session | |
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
| Method | Modifiers | Description |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| [getColumnState(persistColumnStateKey)](./grid-pro.kvstoragestatepersistence.getcolumnstate.md) | | |
|
|
28
|
+
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.kvstoragestatepersistence.savecolumnstate.md) | | |
|
|
29
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [saveColumnState](./grid-pro.kvstoragestatepersistence.savecolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.saveColumnState() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| persistColumnStateKey | string | |
|
|
18
|
+
| columnState | ColumnState\[\] | |
|
|
19
|
+
|
|
20
|
+
**Returns:**
|
|
21
|
+
|
|
22
|
+
Promise<void>
|
|
23
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [session](./grid-pro.kvstoragestatepersistence.session.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.session property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
session: Session;
|
|
11
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) > [getColumnState](./grid-pro.localstoragestatepersistence.getcolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence.getColumnState() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| persistColumnStateKey | string | |
|
|
18
|
+
|
|
19
|
+
**Returns:**
|
|
20
|
+
|
|
21
|
+
Promise<ColumnState\[\]>
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence class
|
|
6
|
+
|
|
7
|
+
Implementation for the Local Storage State Persistence interface.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare class LocalStorageStatePersistence implements StatePersistence
|
|
13
|
+
```
|
|
14
|
+
**Implements:** [StatePersistence](./grid-pro.statepersistence.md)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
| Property | Modifiers | Type | Description |
|
|
19
|
+
| --- | --- | --- | --- |
|
|
20
|
+
| [session](./grid-pro.localstoragestatepersistence.session.md) | | Session | |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
| Method | Modifiers | Description |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| [getColumnState(persistColumnStateKey)](./grid-pro.localstoragestatepersistence.getcolumnstate.md) | | |
|
|
27
|
+
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.localstoragestatepersistence.savecolumnstate.md) | | |
|
|
28
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) > [saveColumnState](./grid-pro.localstoragestatepersistence.savecolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence.saveColumnState() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| persistColumnStateKey | string | |
|
|
18
|
+
| columnState | ColumnState\[\] | |
|
|
19
|
+
|
|
20
|
+
**Returns:**
|
|
21
|
+
|
|
22
|
+
Promise<void>
|
|
23
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) > [session](./grid-pro.localstoragestatepersistence.session.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence.session property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
session: Session;
|
|
11
|
+
```
|
package/docs/api/grid-pro.md
CHANGED
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
| [GridProClientSideDatasource](./grid-pro.gridproclientsidedatasource.md) | The Genesis Datasource element, for client-side \| CSRM-compatible data fetching and used exclusively by the GridPro element. |
|
|
21
21
|
| [GridProColumn](./grid-pro.gridprocolumn.md) | The Grid Pro Column element. |
|
|
22
22
|
| [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) | The Genesis Datasource element, for CSRM-compatible data fetching and used exclusively by the GridPro element. |
|
|
23
|
+
| [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) | Implementation for the KV Storage State Persistence interface. |
|
|
24
|
+
| [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) | Implementation for the Local Storage State Persistence interface. |
|
|
23
25
|
| [MultiselectEditor](./grid-pro.multiselecteditor.md) | The AG Multiselect Editor element. |
|
|
24
26
|
| [NumberEditor](./grid-pro.numbereditor.md) | The AG Number Editor element. |
|
|
25
27
|
| [SelectEditor](./grid-pro.selecteditor.md) | The AG Select Editor element. |
|
|
@@ -55,6 +57,7 @@
|
|
|
55
57
|
| [MultiselectEditorParams](./grid-pro.multiselecteditorparams.md) | Parameters used to configure [MultiselectEditor](./grid-pro.multiselecteditor.md) |
|
|
56
58
|
| [NumberEditorParams](./grid-pro.numbereditorparams.md) | Parameters used to configure [NumberEditor](./grid-pro.numbereditor.md) |
|
|
57
59
|
| [SelectEditorParams](./grid-pro.selecteditorparams.md) | Parameters used to configure [SelectEditor](./grid-pro.selecteditor.md) |
|
|
60
|
+
| [StatePersistence](./grid-pro.statepersistence.md) | Represents a state persistence and its capabilities. Provides methods to set and get columns from the storage. |
|
|
58
61
|
| [StringEditorParams](./grid-pro.stringeditorparams.md) | Parameters used to configure [StringEditor](./grid-pro.stringeditor.md) |
|
|
59
62
|
|
|
60
63
|
## Variables
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [StatePersistence](./grid-pro.statepersistence.md) > [getColumnState](./grid-pro.statepersistence.getcolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## StatePersistence.getColumnState() method
|
|
6
|
+
|
|
7
|
+
Returns the column state for the given key.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistColumnStateKey | string | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<ColumnState\[\]>
|
|
24
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [StatePersistence](./grid-pro.statepersistence.md)
|
|
4
|
+
|
|
5
|
+
## StatePersistence interface
|
|
6
|
+
|
|
7
|
+
Represents a state persistence and its capabilities. Provides methods to set and get columns from the storage.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface StatePersistence
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| [getColumnState(persistColumnStateKey)](./grid-pro.statepersistence.getcolumnstate.md) | Returns the column state for the given key. |
|
|
20
|
+
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.statepersistence.savecolumnstate.md) | Saves the column state for the given key. |
|
|
21
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [StatePersistence](./grid-pro.statepersistence.md) > [saveColumnState](./grid-pro.statepersistence.savecolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## StatePersistence.saveColumnState() method
|
|
6
|
+
|
|
7
|
+
Saves the column state for the given key.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistColumnStateKey | string | |
|
|
20
|
+
| columnState | ColumnState\[\] | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
Promise<void>
|
|
25
|
+
|
package/docs/api-report.md
CHANGED
|
@@ -39,6 +39,7 @@ import type { IServerSideGetRowsParams } from '@ag-grid-community/core';
|
|
|
39
39
|
import type { IServerSideRowModel } from '@ag-grid-community/core';
|
|
40
40
|
import { ITooltipComp } from '@ag-grid-community/core';
|
|
41
41
|
import { ITooltipParams } from '@ag-grid-community/core';
|
|
42
|
+
import { KVStorage } from '@genesislcap/foundation-comms';
|
|
42
43
|
import { LayoutCacheContainer } from '@genesislcap/foundation-utils';
|
|
43
44
|
import { Logger } from '@genesislcap/foundation-logger';
|
|
44
45
|
import { MetadataDetail } from '@genesislcap/foundation-comms';
|
|
@@ -47,6 +48,7 @@ import type { RowDataTransaction } from '@ag-grid-community/core';
|
|
|
47
48
|
import type { RowNodeTransaction } from '@ag-grid-community/core';
|
|
48
49
|
import type { ServerSideTransaction } from '@ag-grid-community/core';
|
|
49
50
|
import type { ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
51
|
+
import { Session } from '@genesislcap/foundation-comms';
|
|
50
52
|
import { SocketObservable } from '@genesislcap/foundation-comms';
|
|
51
53
|
import { Swatch } from '@microsoft/fast-components';
|
|
52
54
|
import { SwatchRGB } from '@microsoft/fast-components';
|
|
@@ -798,7 +800,7 @@ export class GridPro extends GridPro_base {
|
|
|
798
800
|
// (undocumented)
|
|
799
801
|
protected agPropertiesMap: Record<string, string>;
|
|
800
802
|
// @deprecated
|
|
801
|
-
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
803
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
802
804
|
asyncAdd: boolean;
|
|
803
805
|
asyncRemove: boolean;
|
|
804
806
|
asyncUpdate: boolean;
|
|
@@ -822,7 +824,7 @@ export class GridPro extends GridPro_base {
|
|
|
822
824
|
enableRowFlashing: boolean;
|
|
823
825
|
// (undocumented)
|
|
824
826
|
eventsAndCallbacks: any;
|
|
825
|
-
getSavedColumnState(): ColumnState[]
|
|
827
|
+
getSavedColumnState(): Promise<ColumnState[]>;
|
|
826
828
|
// (undocumented)
|
|
827
829
|
globalEventListener(eventType: any, event: any): void;
|
|
828
830
|
// (undocumented)
|
|
@@ -849,7 +851,7 @@ export class GridPro extends GridPro_base {
|
|
|
849
851
|
headerHeight: number;
|
|
850
852
|
// (undocumented)
|
|
851
853
|
protected initialised: boolean;
|
|
852
|
-
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[]
|
|
854
|
+
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): Promise<ColDef<any>[]>;
|
|
853
855
|
// (undocumented)
|
|
854
856
|
get observedAttributes(): string[];
|
|
855
857
|
// (undocumented)
|
|
@@ -860,6 +862,8 @@ export class GridPro extends GridPro_base {
|
|
|
860
862
|
// (undocumented)
|
|
861
863
|
statePersistanceEnabled(): boolean;
|
|
862
864
|
// (undocumented)
|
|
865
|
+
statePersistence: StatePersistence;
|
|
866
|
+
// (undocumented)
|
|
863
867
|
theme: string;
|
|
864
868
|
// (undocumented)
|
|
865
869
|
themeChanged(oldValue: string, newValue: string): void;
|
|
@@ -1041,6 +1045,28 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1041
1045
|
// @public
|
|
1042
1046
|
export const gridProTemplate: ViewTemplate;
|
|
1043
1047
|
|
|
1048
|
+
// @public
|
|
1049
|
+
export class KVStorageStatePersistence implements StatePersistence {
|
|
1050
|
+
// (undocumented)
|
|
1051
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1052
|
+
// (undocumented)
|
|
1053
|
+
kvStorage: KVStorage;
|
|
1054
|
+
// (undocumented)
|
|
1055
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1056
|
+
// (undocumented)
|
|
1057
|
+
session: Session;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// @public
|
|
1061
|
+
export class LocalStorageStatePersistence implements StatePersistence {
|
|
1062
|
+
// (undocumented)
|
|
1063
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1064
|
+
// (undocumented)
|
|
1065
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1066
|
+
// (undocumented)
|
|
1067
|
+
session: Session;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1044
1070
|
// @public
|
|
1045
1071
|
export const logger: Logger;
|
|
1046
1072
|
|
|
@@ -1193,6 +1219,17 @@ export class SelectRenderer extends FoundationElement implements ICellRendererCo
|
|
|
1193
1219
|
value: string;
|
|
1194
1220
|
}
|
|
1195
1221
|
|
|
1222
|
+
// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "StatePersistence" because one of its declarations is marked as @internal
|
|
1223
|
+
//
|
|
1224
|
+
// @public
|
|
1225
|
+
export interface StatePersistence {
|
|
1226
|
+
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1227
|
+
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// @internal
|
|
1231
|
+
export const StatePersistence: InterfaceSymbol<StatePersistence>;
|
|
1232
|
+
|
|
1196
1233
|
// Warning: (ae-forgotten-export) The symbol "StreamBaseDatasource" needs to be exported by the entry point index.d.ts
|
|
1197
1234
|
//
|
|
1198
1235
|
// @alpha
|