@genesislcap/grid-pro 14.157.1-alpha-e60ad86.0 → 14.158.1-forms-deepclone.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/dist/custom-elements.json +272 -89
- package/dist/dts/datasource/base.datasource.d.ts +3 -1
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/client-side.grid-definitions.d.ts +9 -0
- package/dist/dts/datasource/client-side.grid-definitions.d.ts.map +1 -0
- package/dist/dts/datasource/server-side.datasource.d.ts +6 -5
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.grid-definitions.d.ts +1 -17
- package/dist/dts/datasource/server-side.grid-definitions.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +24 -7
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +27 -18
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/grid-pro.definitions.d.ts +0 -8
- package/dist/dts/grid-pro.definitions.d.ts.map +1 -1
- package/dist/dts/state-persistence/kv-state.d.ts +6 -0
- package/dist/dts/state-persistence/kv-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/local-state.d.ts +6 -0
- package/dist/dts/state-persistence/local-state.d.ts.map +1 -1
- package/dist/dts/state-persistence/state-persistence.d.ts +14 -0
- package/dist/dts/state-persistence/state-persistence.d.ts.map +1 -1
- package/dist/esm/datasource/base.datasource.js +59 -4
- package/dist/esm/datasource/client-side.grid-definitions.js +37 -0
- package/dist/esm/datasource/server-side.datasource.js +7 -40
- package/dist/esm/datasource/server-side.grid-definitions.js +1 -45
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +7 -58
- package/dist/esm/grid-pro.definitions.js +10 -47
- package/dist/esm/grid-pro.js +37 -13
- package/dist/esm/state-persistence/kv-state.js +21 -0
- package/dist/esm/state-persistence/local-state.js +19 -0
- package/dist/grid-pro.api.json +516 -1
- package/dist/grid-pro.d.ts +85 -39
- package/docs/api/grid-pro.gridpro.getfiltermodel.md +17 -0
- package/docs/api/grid-pro.gridpro.md +5 -1
- package/docs/api/grid-pro.gridpro.persistcolumnstatekey.md +1 -1
- package/docs/api/grid-pro.gridpro.persistfiltermodelkey.md +13 -0
- package/docs/api/grid-pro.gridpro.restorecachedfilterconfig.md +15 -0
- package/docs/api/grid-pro.gridpro.setfiltermodel.md +24 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.getfiltermodel.md +24 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.md +2 -0
- package/docs/api/grid-pro.kvstoragestatepersistence.savefiltermodel.md +25 -0
- package/docs/api/grid-pro.localstoragestatepersistence.getfiltermodel.md +24 -0
- package/docs/api/grid-pro.localstoragestatepersistence.md +2 -0
- package/docs/api/grid-pro.localstoragestatepersistence.savefiltermodel.md +25 -0
- package/docs/api/grid-pro.statepersistence.getfiltermodel.md +26 -0
- package/docs/api/grid-pro.statepersistence.md +2 -0
- package/docs/api/grid-pro.statepersistence.savefiltermodel.md +27 -0
- package/docs/api-report.md +34 -3
- package/package.json +13 -13
package/dist/grid-pro.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { Datasource } from '@genesislcap/foundation-comms';
|
|
|
15
15
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
16
16
|
import { DOMContainer } from '@genesislcap/foundation-utils';
|
|
17
17
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
18
|
+
import { FieldMetadata } from '@genesislcap/foundation-comms';
|
|
18
19
|
import { FilteredDataServerResult } from '@genesislcap/foundation-comms';
|
|
19
20
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
20
21
|
import { FoundationElementRegistry } from '@microsoft/fast-foundation';
|
|
@@ -1069,15 +1070,6 @@ export declare const getDateEditorTemplate: (prefix?: string) => ViewTemplate<Da
|
|
|
1069
1070
|
*/
|
|
1070
1071
|
export declare function getFilterByFieldType(type: string): string;
|
|
1071
1072
|
|
|
1072
|
-
/**
|
|
1073
|
-
* Returns the filter params based on the Grid Pro field/column type.
|
|
1074
|
-
* @param type - The type of the field/column
|
|
1075
|
-
* @returns the filter params for the specified field type
|
|
1076
|
-
* @remarks Currently only returns a default filter params object, for all field types
|
|
1077
|
-
* @alpha
|
|
1078
|
-
*/
|
|
1079
|
-
export declare function getFilterParamsByFieldType(type: string): any;
|
|
1080
|
-
|
|
1081
1073
|
/**
|
|
1082
1074
|
* Get a Design System prefixed Select template.
|
|
1083
1075
|
* @param designSystem - The design system prefix to use. Defaults to 'foundation'.
|
|
@@ -1215,9 +1207,13 @@ export declare class GridPro extends GridPro_base {
|
|
|
1215
1207
|
*/
|
|
1216
1208
|
enableRowFlashing: boolean;
|
|
1217
1209
|
/**
|
|
1218
|
-
* The key to use for persisting the column state in local storage.
|
|
1210
|
+
* The key to use for persisting the column state in local broswer or KV storage.
|
|
1219
1211
|
*/
|
|
1220
1212
|
persistColumnStateKey: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* The key to use for persisting the filter model in local browser or KV storage.
|
|
1215
|
+
*/
|
|
1216
|
+
persistFilterModelKey: string;
|
|
1221
1217
|
/**
|
|
1222
1218
|
* The case type to use for the header names. If not set, the default CONSTANT_CASE will be used.
|
|
1223
1219
|
* @remarks Can be one of the following: camelCase, capitalCase, dotCase, headerCase, noCase, paramCase, pascalCase, pathCase, sentenceCase, snakeCase.
|
|
@@ -1244,7 +1240,13 @@ export declare class GridPro extends GridPro_base {
|
|
|
1244
1240
|
protected initialised: boolean;
|
|
1245
1241
|
private rehydrationAttempted;
|
|
1246
1242
|
private gridEventsQueue;
|
|
1247
|
-
private
|
|
1243
|
+
private _filterConfig;
|
|
1244
|
+
getfilterModel(): Promise<{
|
|
1245
|
+
[key: string]: any;
|
|
1246
|
+
}>;
|
|
1247
|
+
setFilterModel(value: {
|
|
1248
|
+
[key: string]: any;
|
|
1249
|
+
}): Promise<void>;
|
|
1248
1250
|
/**
|
|
1249
1251
|
* Injectable config that allows to change grid options on an app level basis
|
|
1250
1252
|
* To modify options, register instance of the config in DOM container that is
|
|
@@ -1288,7 +1290,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
1288
1290
|
getSavedColumnState(): Promise<ColumnState[]>;
|
|
1289
1291
|
private restoreColumnState;
|
|
1290
1292
|
private cacheFilterConfig;
|
|
1291
|
-
|
|
1293
|
+
restoreCachedFilterConfig(): Promise<void>;
|
|
1292
1294
|
/**
|
|
1293
1295
|
* @public
|
|
1294
1296
|
*/
|
|
@@ -1364,20 +1366,6 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1364
1366
|
removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions): void;
|
|
1365
1367
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1366
1368
|
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
|
-
*/
|
|
1381
1369
|
readonly classList: DOMTokenList;
|
|
1382
1370
|
className: string;
|
|
1383
1371
|
readonly clientHeight: number;
|
|
@@ -1396,7 +1384,20 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1396
1384
|
readonly scrollHeight: number;
|
|
1397
1385
|
scrollLeft: number;
|
|
1398
1386
|
scrollTop: number;
|
|
1399
|
-
readonly scrollWidth: number;
|
|
1387
|
+
readonly scrollWidth: number; /**
|
|
1388
|
+
* Injectable config that allows to change grid options on an app level basis
|
|
1389
|
+
* To modify options, register instance of the config in DOM container that is
|
|
1390
|
+
* above the grid or on the top level of the application, so it applies to all grids.
|
|
1391
|
+
*
|
|
1392
|
+
* @example
|
|
1393
|
+
* ```
|
|
1394
|
+
* DI.getOrCreateDOMContainer().register([
|
|
1395
|
+
* Registration.instance<GridOptionsConfig>(GridOptionsConfig, {
|
|
1396
|
+
* headerHeight: 50,
|
|
1397
|
+
* }),
|
|
1398
|
+
* ]);
|
|
1399
|
+
* ```
|
|
1400
|
+
*/
|
|
1400
1401
|
readonly shadowRoot: ShadowRoot;
|
|
1401
1402
|
slot: string;
|
|
1402
1403
|
readonly tagName: string;
|
|
@@ -1668,6 +1669,7 @@ declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
1668
1669
|
protected agTransaction: RowDataTransaction | ServerSideTransaction;
|
|
1669
1670
|
protected applyFuncName: string;
|
|
1670
1671
|
protected applyAsyncFuncName: string;
|
|
1672
|
+
protected generateColumnDefsFromMetadata(fieldsMetadata: FieldMetadata[], getFilterParamsByFieldType: Function): ColDef[];
|
|
1671
1673
|
protected handleStreamInserts(insertedRows: any[]): void;
|
|
1672
1674
|
protected handleStreamDeletes(deletedRows: any[]): void;
|
|
1673
1675
|
protected handleStreamUpdates(updatedRows: any[]): void;
|
|
@@ -1892,15 +1894,15 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1892
1894
|
readonly classList: DOMTokenList;
|
|
1893
1895
|
className: string;
|
|
1894
1896
|
readonly clientHeight: number;
|
|
1895
|
-
readonly clientLeft: number;
|
|
1897
|
+
readonly clientLeft: number; /**
|
|
1898
|
+
* Restarts the datasource, uses `deinit` and `init` in sequence.
|
|
1899
|
+
* @public
|
|
1900
|
+
*/
|
|
1896
1901
|
readonly clientTop: number;
|
|
1897
1902
|
readonly clientWidth: number;
|
|
1898
1903
|
id: string;
|
|
1899
1904
|
readonly localName: string;
|
|
1900
|
-
readonly namespaceURI: string;
|
|
1901
|
-
* Restarts the datasource, uses `deinit` and `init` in sequence.
|
|
1902
|
-
* @public
|
|
1903
|
-
*/
|
|
1905
|
+
readonly namespaceURI: string;
|
|
1904
1906
|
onfullscreenchange: (this: Element, ev: Event) => any;
|
|
1905
1907
|
onfullscreenerror: (this: Element, ev: Event) => any;
|
|
1906
1908
|
outerHTML: string;
|
|
@@ -1914,7 +1916,12 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1914
1916
|
readonly shadowRoot: ShadowRoot;
|
|
1915
1917
|
slot: string;
|
|
1916
1918
|
readonly tagName: string;
|
|
1917
|
-
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
1919
|
+
attachShadow(init: ShadowRootInit): ShadowRoot; /**
|
|
1920
|
+
* Clears the rowData and columnDefs for the grid.
|
|
1921
|
+
* @remarks This is called when `reloadResourceData` happens, on criteria and filters change or full `reset`.
|
|
1922
|
+
* @param withColumnDefs - Whether to clear the columnDefs as well. Defaults to true.
|
|
1923
|
+
* @internal
|
|
1924
|
+
*/
|
|
1918
1925
|
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
|
|
1919
1926
|
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
|
|
1920
1927
|
closest<E extends Element = Element>(selectors: string): E;
|
|
@@ -1940,6 +1947,12 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1940
1947
|
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
1941
1948
|
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
1942
1949
|
matches(selectors: string): boolean;
|
|
1950
|
+
/**
|
|
1951
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
1952
|
+
* Proxies to {@link @genesislcap/grid-pro#GridProGenesisDatasource.loadResourceData} but without the full init (no metadata fetch).
|
|
1953
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
1954
|
+
* @internal
|
|
1955
|
+
*/
|
|
1943
1956
|
releasePointerCapture(pointerId: number): void;
|
|
1944
1957
|
removeAttribute(qualifiedName: string): void;
|
|
1945
1958
|
removeAttributeNS(namespace: string, localName: string): void;
|
|
@@ -1953,7 +1966,13 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1953
1966
|
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
1954
1967
|
scrollTo(options?: ScrollToOptions): void;
|
|
1955
1968
|
scrollTo(x: number, y: number): void;
|
|
1956
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
1969
|
+
setAttribute(qualifiedName: string, value: string): void; /**
|
|
1970
|
+
* Initializes the datasource and loads the data for the grid.
|
|
1971
|
+
* Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
|
|
1972
|
+
*
|
|
1973
|
+
* @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
|
|
1974
|
+
* @internal
|
|
1975
|
+
*/
|
|
1957
1976
|
setAttributeNS(namespace: string, qualifiedName: string, value: string): void;
|
|
1958
1977
|
setAttributeNode(attr: Attr): Attr;
|
|
1959
1978
|
setAttributeNodeNS(attr: Attr): Attr;
|
|
@@ -2415,6 +2434,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2415
2434
|
ariaReadOnly: string;
|
|
2416
2435
|
ariaRequired: string;
|
|
2417
2436
|
ariaRoleDescription: string;
|
|
2437
|
+
/**
|
|
2438
|
+
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
2439
|
+
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
2440
|
+
* @alpha
|
|
2441
|
+
*/
|
|
2418
2442
|
ariaRowCount: string;
|
|
2419
2443
|
ariaRowIndex: string;
|
|
2420
2444
|
ariaRowIndexText: string;
|
|
@@ -2440,11 +2464,7 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2440
2464
|
readonly children: HTMLCollection;
|
|
2441
2465
|
readonly firstElementChild: Element;
|
|
2442
2466
|
readonly lastElementChild: Element;
|
|
2443
|
-
append(...nodes: (string | Node)[]): void;
|
|
2444
|
-
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2445
|
-
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2446
|
-
* @internal
|
|
2447
|
-
*/
|
|
2467
|
+
append(...nodes: (string | Node)[]): void;
|
|
2448
2468
|
prepend(...nodes: (string | Node)[]): void;
|
|
2449
2469
|
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
|
|
2450
2470
|
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
|
|
@@ -2577,6 +2597,12 @@ export declare class KVStorageStatePersistence implements StatePersistence {
|
|
|
2577
2597
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
2578
2598
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2579
2599
|
private migrateLocalStorageToKVStorage;
|
|
2600
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
2601
|
+
[key: string]: any;
|
|
2602
|
+
}>;
|
|
2603
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
2604
|
+
[key: string]: any;
|
|
2605
|
+
}): Promise<void>;
|
|
2580
2606
|
}
|
|
2581
2607
|
|
|
2582
2608
|
/**
|
|
@@ -2587,6 +2613,12 @@ export declare class LocalStorageStatePersistence implements StatePersistence {
|
|
|
2587
2613
|
session: Session;
|
|
2588
2614
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
2589
2615
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2616
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
2617
|
+
[key: string]: any;
|
|
2618
|
+
}>;
|
|
2619
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
2620
|
+
[key: string]: any;
|
|
2621
|
+
}): Promise<void>;
|
|
2590
2622
|
}
|
|
2591
2623
|
|
|
2592
2624
|
/**
|
|
@@ -2742,6 +2774,20 @@ export declare interface StatePersistence {
|
|
|
2742
2774
|
* @public
|
|
2743
2775
|
*/
|
|
2744
2776
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
2777
|
+
/**
|
|
2778
|
+
* Returns the filter model for the given key.
|
|
2779
|
+
* @public
|
|
2780
|
+
*/
|
|
2781
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
2782
|
+
[key: string]: any;
|
|
2783
|
+
}>;
|
|
2784
|
+
/**
|
|
2785
|
+
* Saves the filter model for the given key.
|
|
2786
|
+
* @public
|
|
2787
|
+
*/
|
|
2788
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
2789
|
+
[key: string]: any;
|
|
2790
|
+
}): Promise<void>;
|
|
2745
2791
|
}
|
|
2746
2792
|
|
|
2747
2793
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
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) > [getfilterModel](./grid-pro.gridpro.getfiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.getfilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
getfilterModel(): Promise<{
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
Promise<{ \[key: string\]: any; }>
|
|
17
|
+
|
|
@@ -56,7 +56,8 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
56
56
|
| [initialised](./grid-pro.gridpro.initialised.md) | <code>protected</code> | boolean | |
|
|
57
57
|
| [observedAttributes](./grid-pro.gridpro.observedattributes.md) | <code>readonly</code> | string\[\] | |
|
|
58
58
|
| [onlyTemplateColDefs](./grid-pro.gridpro.onlytemplatecoldefs.md) | | boolean | |
|
|
59
|
-
| [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the column state in local storage. |
|
|
59
|
+
| [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | The key to use for persisting the column state in local broswer or KV storage. |
|
|
60
|
+
| [persistFilterModelKey](./grid-pro.gridpro.persistfiltermodelkey.md) | | string | The key to use for persisting the filter model in local browser or KV storage. |
|
|
60
61
|
| [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
|
|
61
62
|
| [statePersistence](./grid-pro.gridpro.statepersistence.md) | | [StatePersistence](./grid-pro.statepersistence.md) | |
|
|
62
63
|
| [theme](./grid-pro.gridpro.theme.md) | | string | |
|
|
@@ -71,9 +72,12 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
71
72
|
| [combineAllGridComponents(gridOptionsComponents)](./grid-pro.gridpro.combineallgridcomponents.md) | | |
|
|
72
73
|
| [connectedCallback()](./grid-pro.gridpro.connectedcallback.md) | | |
|
|
73
74
|
| [disconnectedCallback()](./grid-pro.gridpro.disconnectedcallback.md) | | |
|
|
75
|
+
| [getfilterModel()](./grid-pro.gridpro.getfiltermodel.md) | | |
|
|
74
76
|
| [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from storage |
|
|
75
77
|
| [globalEventListener(eventType, event)](./grid-pro.gridpro.globaleventlistener.md) | | |
|
|
76
78
|
| [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>. |
|
|
79
|
+
| [restoreCachedFilterConfig()](./grid-pro.gridpro.restorecachedfilterconfig.md) | | |
|
|
80
|
+
| [setFilterModel(value)](./grid-pro.gridpro.setfiltermodel.md) | | |
|
|
77
81
|
| [statePersistanceEnabled()](./grid-pro.gridpro.statepersistanceenabled.md) | | |
|
|
78
82
|
| [themeChanged(oldValue, newValue)](./grid-pro.gridpro.themechanged.md) | | |
|
|
79
83
|
|
|
@@ -0,0 +1,13 @@
|
|
|
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) > [persistFilterModelKey](./grid-pro.gridpro.persistfiltermodelkey.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.persistFilterModelKey property
|
|
6
|
+
|
|
7
|
+
The key to use for persisting the filter model in local browser or KV storage.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
persistFilterModelKey: string;
|
|
13
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
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) > [restoreCachedFilterConfig](./grid-pro.gridpro.restorecachedfilterconfig.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.restoreCachedFilterConfig() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
restoreCachedFilterConfig(): Promise<void>;
|
|
11
|
+
```
|
|
12
|
+
**Returns:**
|
|
13
|
+
|
|
14
|
+
Promise<void>
|
|
15
|
+
|
|
@@ -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) > [GridPro](./grid-pro.gridpro.md) > [setFilterModel](./grid-pro.gridpro.setfiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.setFilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
setFilterModel(value: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| value | { \[key: string\]: any; } | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<void>
|
|
24
|
+
|
|
@@ -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) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [getFilterModel](./grid-pro.kvstoragestatepersistence.getfiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.getFilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistFilterModelKey | string | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<{ \[key: string\]: any; }>
|
|
24
|
+
|
|
@@ -25,5 +25,7 @@ export declare class KVStorageStatePersistence implements StatePersistence
|
|
|
25
25
|
| Method | Modifiers | Description |
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| [getColumnState(persistColumnStateKey)](./grid-pro.kvstoragestatepersistence.getcolumnstate.md) | | |
|
|
28
|
+
| [getFilterModel(persistFilterModelKey)](./grid-pro.kvstoragestatepersistence.getfiltermodel.md) | | |
|
|
28
29
|
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.kvstoragestatepersistence.savecolumnstate.md) | | |
|
|
30
|
+
| [saveFilterModel(persistFilterModelKey, filterModel)](./grid-pro.kvstoragestatepersistence.savefiltermodel.md) | | |
|
|
29
31
|
|
|
@@ -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) > [KVStorageStatePersistence](./grid-pro.kvstoragestatepersistence.md) > [saveFilterModel](./grid-pro.kvstoragestatepersistence.savefiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## KVStorageStatePersistence.saveFilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistFilterModelKey | string | |
|
|
20
|
+
| filterModel | { \[key: string\]: any; } | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
Promise<void>
|
|
25
|
+
|
|
@@ -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) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) > [getFilterModel](./grid-pro.localstoragestatepersistence.getfiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence.getFilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistFilterModelKey | string | |
|
|
20
|
+
|
|
21
|
+
**Returns:**
|
|
22
|
+
|
|
23
|
+
Promise<{ \[key: string\]: any; }>
|
|
24
|
+
|
|
@@ -24,5 +24,7 @@ export declare class LocalStorageStatePersistence implements StatePersistence
|
|
|
24
24
|
| Method | Modifiers | Description |
|
|
25
25
|
| --- | --- | --- |
|
|
26
26
|
| [getColumnState(persistColumnStateKey)](./grid-pro.localstoragestatepersistence.getcolumnstate.md) | | |
|
|
27
|
+
| [getFilterModel(persistFilterModelKey)](./grid-pro.localstoragestatepersistence.getfiltermodel.md) | | |
|
|
27
28
|
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.localstoragestatepersistence.savecolumnstate.md) | | |
|
|
29
|
+
| [saveFilterModel(persistFilterModelKey, filterModel)](./grid-pro.localstoragestatepersistence.savefiltermodel.md) | | |
|
|
28
30
|
|
|
@@ -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) > [LocalStorageStatePersistence](./grid-pro.localstoragestatepersistence.md) > [saveFilterModel](./grid-pro.localstoragestatepersistence.savefiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## LocalStorageStatePersistence.saveFilterModel() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| persistFilterModelKey | string | |
|
|
20
|
+
| filterModel | { \[key: string\]: any; } | |
|
|
21
|
+
|
|
22
|
+
**Returns:**
|
|
23
|
+
|
|
24
|
+
Promise<void>
|
|
25
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
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) > [getFilterModel](./grid-pro.statepersistence.getfiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## StatePersistence.getFilterModel() method
|
|
6
|
+
|
|
7
|
+
Returns the filter model for the given key.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}>;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| persistFilterModelKey | string | |
|
|
22
|
+
|
|
23
|
+
**Returns:**
|
|
24
|
+
|
|
25
|
+
Promise<{ \[key: string\]: any; }>
|
|
26
|
+
|
|
@@ -17,5 +17,7 @@ export interface StatePersistence
|
|
|
17
17
|
| Method | Description |
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| [getColumnState(persistColumnStateKey)](./grid-pro.statepersistence.getcolumnstate.md) | Returns the column state for the given key. |
|
|
20
|
+
| [getFilterModel(persistFilterModelKey)](./grid-pro.statepersistence.getfiltermodel.md) | Returns the filter model for the given key. |
|
|
20
21
|
| [saveColumnState(persistColumnStateKey, columnState)](./grid-pro.statepersistence.savecolumnstate.md) | Saves the column state for the given key. |
|
|
22
|
+
| [saveFilterModel(persistFilterModelKey, filterModel)](./grid-pro.statepersistence.savefiltermodel.md) | Saves the filter model for the given key. |
|
|
21
23
|
|
|
@@ -0,0 +1,27 @@
|
|
|
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) > [saveFilterModel](./grid-pro.statepersistence.savefiltermodel.md)
|
|
4
|
+
|
|
5
|
+
## StatePersistence.saveFilterModel() method
|
|
6
|
+
|
|
7
|
+
Saves the filter model for the given key.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| persistFilterModelKey | string | |
|
|
22
|
+
| filterModel | { \[key: string\]: any; } | |
|
|
23
|
+
|
|
24
|
+
**Returns:**
|
|
25
|
+
|
|
26
|
+
Promise<void>
|
|
27
|
+
|
package/docs/api-report.md
CHANGED
|
@@ -21,6 +21,7 @@ import { Datasource } from '@genesislcap/foundation-comms';
|
|
|
21
21
|
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
22
22
|
import { DOMContainer } from '@genesislcap/foundation-utils';
|
|
23
23
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
24
|
+
import { FieldMetadata } from '@genesislcap/foundation-comms';
|
|
24
25
|
import { FilteredDataServerResult } from '@genesislcap/foundation-comms';
|
|
25
26
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
26
27
|
import { FoundationElementRegistry } from '@microsoft/fast-foundation';
|
|
@@ -740,9 +741,6 @@ export const getDateEditorTemplate: (prefix?: string) => ViewTemplate<DateEditor
|
|
|
740
741
|
// @alpha
|
|
741
742
|
export function getFilterByFieldType(type: string): string;
|
|
742
743
|
|
|
743
|
-
// @alpha
|
|
744
|
-
export function getFilterParamsByFieldType(type: string): any;
|
|
745
|
-
|
|
746
744
|
// @public
|
|
747
745
|
export const getMultiselectEditorTemplate: (designSystem?: string) => ViewTemplate<MultiselectEditor, any>;
|
|
748
746
|
|
|
@@ -824,6 +822,10 @@ export class GridPro extends GridPro_base {
|
|
|
824
822
|
enableRowFlashing: boolean;
|
|
825
823
|
// (undocumented)
|
|
826
824
|
eventsAndCallbacks: any;
|
|
825
|
+
// (undocumented)
|
|
826
|
+
getfilterModel(): Promise<{
|
|
827
|
+
[key: string]: any;
|
|
828
|
+
}>;
|
|
827
829
|
getSavedColumnState(): Promise<ColumnState[]>;
|
|
828
830
|
// (undocumented)
|
|
829
831
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -857,9 +859,16 @@ export class GridPro extends GridPro_base {
|
|
|
857
859
|
// (undocumented)
|
|
858
860
|
onlyTemplateColDefs: boolean;
|
|
859
861
|
persistColumnStateKey: string;
|
|
862
|
+
persistFilterModelKey: string;
|
|
863
|
+
// (undocumented)
|
|
864
|
+
restoreCachedFilterConfig(): Promise<void>;
|
|
860
865
|
// (undocumented)
|
|
861
866
|
rowHeight: number;
|
|
862
867
|
// (undocumented)
|
|
868
|
+
setFilterModel(value: {
|
|
869
|
+
[key: string]: any;
|
|
870
|
+
}): Promise<void>;
|
|
871
|
+
// (undocumented)
|
|
863
872
|
statePersistanceEnabled(): boolean;
|
|
864
873
|
// (undocumented)
|
|
865
874
|
statePersistence: StatePersistence;
|
|
@@ -1050,10 +1059,18 @@ export class KVStorageStatePersistence implements StatePersistence {
|
|
|
1050
1059
|
// (undocumented)
|
|
1051
1060
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1052
1061
|
// (undocumented)
|
|
1062
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
1063
|
+
[key: string]: any;
|
|
1064
|
+
}>;
|
|
1065
|
+
// (undocumented)
|
|
1053
1066
|
kvStorage: KVStorage;
|
|
1054
1067
|
// (undocumented)
|
|
1055
1068
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1056
1069
|
// (undocumented)
|
|
1070
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
1071
|
+
[key: string]: any;
|
|
1072
|
+
}): Promise<void>;
|
|
1073
|
+
// (undocumented)
|
|
1057
1074
|
session: Session;
|
|
1058
1075
|
}
|
|
1059
1076
|
|
|
@@ -1062,8 +1079,16 @@ export class LocalStorageStatePersistence implements StatePersistence {
|
|
|
1062
1079
|
// (undocumented)
|
|
1063
1080
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1064
1081
|
// (undocumented)
|
|
1082
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
1083
|
+
[key: string]: any;
|
|
1084
|
+
}>;
|
|
1085
|
+
// (undocumented)
|
|
1065
1086
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1066
1087
|
// (undocumented)
|
|
1088
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
1089
|
+
[key: string]: any;
|
|
1090
|
+
}): Promise<void>;
|
|
1091
|
+
// (undocumented)
|
|
1067
1092
|
session: Session;
|
|
1068
1093
|
}
|
|
1069
1094
|
|
|
@@ -1224,7 +1249,13 @@ export class SelectRenderer extends FoundationElement implements ICellRendererCo
|
|
|
1224
1249
|
// @public
|
|
1225
1250
|
export interface StatePersistence {
|
|
1226
1251
|
getColumnState(persistColumnStateKey: string): Promise<ColumnState[]>;
|
|
1252
|
+
getFilterModel(persistFilterModelKey: string): Promise<{
|
|
1253
|
+
[key: string]: any;
|
|
1254
|
+
}>;
|
|
1227
1255
|
saveColumnState(persistColumnStateKey: string, columnState: ColumnState[]): Promise<void>;
|
|
1256
|
+
saveFilterModel(persistFilterModelKey: string, filterModel: {
|
|
1257
|
+
[key: string]: any;
|
|
1258
|
+
}): Promise<void>;
|
|
1228
1259
|
}
|
|
1229
1260
|
|
|
1230
1261
|
// @internal
|