@genesislcap/grid-pro 14.150.2 → 14.151.1
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 +68 -34
- package/dist/dts/datasource/server-side.datasource.d.ts +13 -3
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +5 -12
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/string.d.ts +8 -0
- package/dist/dts/utils/string.d.ts.map +1 -0
- package/dist/esm/cell-renderers/actions-menu.renderer.js +1 -1
- package/dist/esm/datasource/server-side.datasource.js +88 -53
- package/dist/esm/grid-pro.js +1 -8
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/string.js +7 -0
- package/dist/grid-pro.api.json +1 -1
- package/dist/grid-pro.d.ts +18 -8
- package/docs/api-report.md +4 -2
- package/package.json +13 -13
|
@@ -263,26 +263,6 @@
|
|
|
263
263
|
"kind": "javascript-module",
|
|
264
264
|
"path": "src/grid-pro.ts",
|
|
265
265
|
"declarations": [
|
|
266
|
-
{
|
|
267
|
-
"kind": "function",
|
|
268
|
-
"name": "convertToKebabCase",
|
|
269
|
-
"parameters": [
|
|
270
|
-
{
|
|
271
|
-
"name": "value",
|
|
272
|
-
"type": {
|
|
273
|
-
"text": "string"
|
|
274
|
-
},
|
|
275
|
-
"description": "The value to convert to Kebab case."
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"description": "Convert string values from 'camelCase' to 'kebab-case'",
|
|
279
|
-
"return": {
|
|
280
|
-
"type": {
|
|
281
|
-
"text": ""
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
"privacy": "public"
|
|
285
|
-
},
|
|
286
266
|
{
|
|
287
267
|
"kind": "class",
|
|
288
268
|
"description": "The Grid Pro element.",
|
|
@@ -1173,14 +1153,6 @@
|
|
|
1173
1153
|
}
|
|
1174
1154
|
],
|
|
1175
1155
|
"exports": [
|
|
1176
|
-
{
|
|
1177
|
-
"kind": "js",
|
|
1178
|
-
"name": "convertToKebabCase",
|
|
1179
|
-
"declaration": {
|
|
1180
|
-
"name": "convertToKebabCase",
|
|
1181
|
-
"module": "src/grid-pro.ts"
|
|
1182
|
-
}
|
|
1183
|
-
},
|
|
1184
1156
|
{
|
|
1185
1157
|
"kind": "js",
|
|
1186
1158
|
"name": "GridPro",
|
|
@@ -7934,13 +7906,25 @@
|
|
|
7934
7906
|
},
|
|
7935
7907
|
{
|
|
7936
7908
|
"kind": "method",
|
|
7937
|
-
"name": "dataLogoff"
|
|
7938
|
-
"privacy": "private"
|
|
7909
|
+
"name": "dataLogoff"
|
|
7939
7910
|
},
|
|
7940
7911
|
{
|
|
7941
7912
|
"kind": "method",
|
|
7942
7913
|
"name": "restartSubscription",
|
|
7943
|
-
"privacy": "private"
|
|
7914
|
+
"privacy": "private",
|
|
7915
|
+
"return": {
|
|
7916
|
+
"type": {
|
|
7917
|
+
"text": "Promise<void>"
|
|
7918
|
+
}
|
|
7919
|
+
},
|
|
7920
|
+
"parameters": [
|
|
7921
|
+
{
|
|
7922
|
+
"name": "params",
|
|
7923
|
+
"type": {
|
|
7924
|
+
"text": "IServerSideGetRowsParams"
|
|
7925
|
+
}
|
|
7926
|
+
}
|
|
7927
|
+
]
|
|
7944
7928
|
},
|
|
7945
7929
|
{
|
|
7946
7930
|
"kind": "method",
|
|
@@ -8150,11 +8134,11 @@
|
|
|
8150
8134
|
},
|
|
8151
8135
|
{
|
|
8152
8136
|
"kind": "method",
|
|
8153
|
-
"name": "
|
|
8137
|
+
"name": "deinit"
|
|
8154
8138
|
},
|
|
8155
8139
|
{
|
|
8156
8140
|
"kind": "method",
|
|
8157
|
-
"name": "
|
|
8141
|
+
"name": "init"
|
|
8158
8142
|
},
|
|
8159
8143
|
{
|
|
8160
8144
|
"kind": "method",
|
|
@@ -8163,7 +8147,13 @@
|
|
|
8163
8147
|
{
|
|
8164
8148
|
"kind": "method",
|
|
8165
8149
|
"name": "clearRowData",
|
|
8166
|
-
"privacy": "private"
|
|
8150
|
+
"privacy": "private",
|
|
8151
|
+
"parameters": [
|
|
8152
|
+
{
|
|
8153
|
+
"name": "withColumnDefs",
|
|
8154
|
+
"default": "true"
|
|
8155
|
+
}
|
|
8156
|
+
]
|
|
8167
8157
|
},
|
|
8168
8158
|
{
|
|
8169
8159
|
"kind": "method",
|
|
@@ -10638,6 +10628,14 @@
|
|
|
10638
10628
|
"name": "*",
|
|
10639
10629
|
"package": "./sanitasations"
|
|
10640
10630
|
}
|
|
10631
|
+
},
|
|
10632
|
+
{
|
|
10633
|
+
"kind": "js",
|
|
10634
|
+
"name": "*",
|
|
10635
|
+
"declaration": {
|
|
10636
|
+
"name": "*",
|
|
10637
|
+
"package": "./string"
|
|
10638
|
+
}
|
|
10641
10639
|
}
|
|
10642
10640
|
]
|
|
10643
10641
|
},
|
|
@@ -10753,6 +10751,42 @@
|
|
|
10753
10751
|
}
|
|
10754
10752
|
]
|
|
10755
10753
|
},
|
|
10754
|
+
{
|
|
10755
|
+
"kind": "javascript-module",
|
|
10756
|
+
"path": "src/utils/string.ts",
|
|
10757
|
+
"declarations": [
|
|
10758
|
+
{
|
|
10759
|
+
"kind": "function",
|
|
10760
|
+
"name": "convertToKebabCase",
|
|
10761
|
+
"parameters": [
|
|
10762
|
+
{
|
|
10763
|
+
"name": "value",
|
|
10764
|
+
"type": {
|
|
10765
|
+
"text": "string"
|
|
10766
|
+
},
|
|
10767
|
+
"description": "The value to convert to Kebab case."
|
|
10768
|
+
}
|
|
10769
|
+
],
|
|
10770
|
+
"description": "Convert string values from 'camelCase' to 'kebab-case'",
|
|
10771
|
+
"return": {
|
|
10772
|
+
"type": {
|
|
10773
|
+
"text": ""
|
|
10774
|
+
}
|
|
10775
|
+
},
|
|
10776
|
+
"privacy": "public"
|
|
10777
|
+
}
|
|
10778
|
+
],
|
|
10779
|
+
"exports": [
|
|
10780
|
+
{
|
|
10781
|
+
"kind": "js",
|
|
10782
|
+
"name": "convertToKebabCase",
|
|
10783
|
+
"declaration": {
|
|
10784
|
+
"name": "convertToKebabCase",
|
|
10785
|
+
"module": "src/utils/string.ts"
|
|
10786
|
+
}
|
|
10787
|
+
}
|
|
10788
|
+
]
|
|
10789
|
+
},
|
|
10756
10790
|
{
|
|
10757
10791
|
"kind": "javascript-module",
|
|
10758
10792
|
"path": "src/cell-renderers/utils/accessor.ts",
|
|
@@ -53,7 +53,7 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
53
53
|
constructor(options: StreamDatasourceOptions);
|
|
54
54
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
55
55
|
private sortMapByNumericKey;
|
|
56
|
-
|
|
56
|
+
dataLogoff(): Promise<void>;
|
|
57
57
|
private restartSubscription;
|
|
58
58
|
private getOrderByAndToBeSortedColIds;
|
|
59
59
|
private handleCurrentStreamLoad;
|
|
@@ -270,7 +270,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
270
270
|
readonly children: HTMLCollection;
|
|
271
271
|
readonly firstElementChild: Element;
|
|
272
272
|
readonly lastElementChild: Element;
|
|
273
|
-
append(...nodes: (string | Node)[]): void;
|
|
273
|
+
append(...nodes: (string | Node)[]): void; /**
|
|
274
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
275
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
274
278
|
prepend(...nodes: (string | Node)[]): void;
|
|
275
279
|
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
|
|
276
280
|
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
|
|
@@ -395,6 +399,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
395
399
|
applyFuncName: string;
|
|
396
400
|
applyAsyncFuncName: string;
|
|
397
401
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
402
|
+
/**
|
|
403
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
404
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
405
|
+
* @internal
|
|
406
|
+
*/
|
|
407
|
+
private reloadResourceData;
|
|
398
408
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
399
409
|
pagination: boolean;
|
|
400
410
|
private indexes;
|
|
@@ -403,8 +413,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
403
413
|
connectedCallback(): void;
|
|
404
414
|
disconnectedCallback(): void;
|
|
405
415
|
deepClone(): Node;
|
|
416
|
+
deinit(): void;
|
|
406
417
|
init(): void;
|
|
407
|
-
reset(): void;
|
|
408
418
|
restart(): void;
|
|
409
419
|
private clearRowData;
|
|
410
420
|
private getResourceIndexes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,OAAO,EAKP,wBAAwB,EAIxB,cAAc,EAGd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,oBAAqB,YAAW,qBAAqB;IACnF,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IAE3B,gBAAgB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAC7D,OAAO,CAAC,YAAY,CAAS;IAC7B,cAAc,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,eAAe,CAAmB;IAE1C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAU;IAE5B,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,qBAAqB,CAAoB;IACjD,OAAO,CAAC,gBAAgB,CAAkB;gBAE9B,OAAO,EAAE,uBAAuB;IAiBtC,OAAO,CAAC,MAAM,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBA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AO;IAKP,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,kBAAkB;IAU1B,IAAI,MAAM,QA2BT;IAED,IAAI,QAAQ,IAAI,mBAAmB,CAElC;YAEa,sBAAsB;IAqCpC,OAAO,CAAC,uBAAuB;IAU/B,OAAO,CAAC,eAAe;IA6Dd,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,GAAG,2BAA2B;IAIhF,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,2BAA2B,KAAK,IAAI;CAIxD"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -2,13 +2,6 @@ import { ColDef, ColumnApi, ColumnState, Grid, GridApi, GridOptions } from '@ag-
|
|
|
2
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
3
|
import { GridProBaseDatasource } from './datasource/base.datasource';
|
|
4
4
|
import { GridComponents, GridOptionsConfig, GridProCaseType } from './grid-pro.types';
|
|
5
|
-
/**
|
|
6
|
-
* Convert string values from 'camelCase' to 'kebab-case'
|
|
7
|
-
* @param value - The value to convert to Kebab case.
|
|
8
|
-
* @returns The Kebab case result.
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare const convertToKebabCase: (value: string) => string;
|
|
12
5
|
declare const GridPro_base: (new (...args: any[]) => {
|
|
13
6
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
14
7
|
"__#1@#_latestTokenCode": string;
|
|
@@ -135,17 +128,17 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
135
128
|
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
136
129
|
compareDocumentPosition(other: Node): number;
|
|
137
130
|
contains(other: Node): boolean;
|
|
138
|
-
getRootNode(options?: GetRootNodeOptions): Node;
|
|
139
|
-
hasChildNodes(): boolean;
|
|
140
|
-
insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
|
|
141
|
-
isDefaultNamespace(namespace: string): boolean;
|
|
142
|
-
isEqualNode(otherNode: Node): boolean;
|
|
143
131
|
/**
|
|
144
132
|
* Gets the saved grid ColumnState[] from local storage
|
|
145
133
|
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
146
134
|
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
147
135
|
* @public
|
|
148
136
|
*/
|
|
137
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
138
|
+
hasChildNodes(): boolean;
|
|
139
|
+
insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
|
|
140
|
+
isDefaultNamespace(namespace: string): boolean;
|
|
141
|
+
isEqualNode(otherNode: Node): boolean;
|
|
149
142
|
isSameNode(otherNode: Node): boolean;
|
|
150
143
|
lookupNamespaceURI(prefix: string): string;
|
|
151
144
|
lookupPrefix(namespace: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,SAAS,EACT,WAAW,EAGX,IAAI,EACJ,OAAO,EACP,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAmB/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAMrE,OAAO,EAKL,cAAc,EAId,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAC
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,SAAS,EACT,WAAW,EAGX,IAAI,EACJ,OAAO,EACP,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE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AAC,yBAAyB;IAOjC;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,iBAAiB,IAAI,qBAAqB,CAM7C;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EA6FnC;IAED;;;;;;OAMG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAKhF;;;;;;;;OAQG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAwFnF,IAAI,kBAAkB,aAerB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IAiBpC,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;CAMxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,cAA0B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAM5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert string values from 'camelCase' to 'kebab-case'
|
|
3
|
+
* @param value - The value to convert to Kebab case.
|
|
4
|
+
* @returns The Kebab case result.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const convertToKebabCase: (value: string) => string;
|
|
8
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,WACa,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, observable } from '@microsoft/fast-element';
|
|
3
3
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
4
|
-
import { convertToKebabCase } from '../grid-pro';
|
|
5
4
|
import { GridProRendererTypes } from '../grid-pro.types';
|
|
5
|
+
import { convertToKebabCase } from '../utils';
|
|
6
6
|
/**
|
|
7
7
|
* The Actions Menu Renderer element.
|
|
8
8
|
* @remarks For multiple actions scenarios.
|
|
@@ -50,29 +50,33 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
50
50
|
if (filtersAreGettingCleaned && this.currentFilterModel) {
|
|
51
51
|
this.currentFilterModel = null;
|
|
52
52
|
this.resourceParams.CRITERIA_MATCH = this.originalCriteriaMatch;
|
|
53
|
-
this.restartSubscription();
|
|
53
|
+
yield this.restartSubscription(params);
|
|
54
|
+
return;
|
|
54
55
|
}
|
|
55
56
|
else if (filterModelBeingAppliedDiffersFromCurrent && filtersAreBeingApplied) {
|
|
56
57
|
this.currentFilterModel = filterModelBeingApplied;
|
|
57
58
|
this.resourceParams.CRITERIA_MATCH = this.buildCriteriaMatchFromFilters();
|
|
58
|
-
this.restartSubscription();
|
|
59
|
+
yield this.restartSubscription(params);
|
|
60
|
+
return;
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
const toBeAppliedSortModel = params.request.sortModel;
|
|
62
64
|
if (toBeAppliedSortModel.length !== ((_a = this.currentSortModel) === null || _a === void 0 ? void 0 : _a.length) ||
|
|
63
65
|
toBeAppliedSortModel.length > 0) {
|
|
64
66
|
if (toBeAppliedSortModel.length === 0 && this.currentSortModel) {
|
|
67
|
+
this.calculatedRowsCount = 0;
|
|
65
68
|
this.currentSortModel = null;
|
|
66
69
|
this.resourceParams.ORDER_BY = null;
|
|
67
70
|
this.resourceParams.REVERSE = null;
|
|
68
|
-
this.restartSubscription();
|
|
71
|
+
yield this.restartSubscription(params);
|
|
72
|
+
return;
|
|
69
73
|
}
|
|
70
74
|
else if (toBeAppliedSortModel.length > 0) {
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
const sortTypeBeingApplied = this.currentSortModel[0].sort;
|
|
75
|
+
const coldIdBeingSorted = toBeAppliedSortModel[0].colId; // Not allowing multiple sorts by user
|
|
76
|
+
const sortTypeBeingApplied = toBeAppliedSortModel[0].sort;
|
|
74
77
|
const orderByAndToBeSortedColIds = this.getOrderByAndToBeSortedColIds(this.resourceIndexes, coldIdBeingSorted);
|
|
75
78
|
if (!orderByAndToBeSortedColIds) {
|
|
79
|
+
this.calculatedRowsCount = 0;
|
|
76
80
|
const availableIndexes = getAvailableIndexes(this.resourceIndexes);
|
|
77
81
|
const availableIndexFields = getAvailableIndexFields(this.resourceIndexes);
|
|
78
82
|
logger.warn('The FIELD/column (${coldIdBeingSorted}) being sorted is not part of an INDEX, required for the [orderBy] operation. See https://learn.genesis.global/docs/database/data-types/index-entities/');
|
|
@@ -82,13 +86,12 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
82
86
|
params.fail();
|
|
83
87
|
return;
|
|
84
88
|
}
|
|
85
|
-
else {
|
|
86
|
-
|
|
87
|
-
this.currentSortModel.push({ sort: sortTypeBeingApplied, colId });
|
|
88
|
-
});
|
|
89
|
+
else if (JSON.stringify(toBeAppliedSortModel) !== JSON.stringify(this.currentSortModel)) {
|
|
90
|
+
this.currentSortModel = toBeAppliedSortModel;
|
|
89
91
|
this.resourceParams.ORDER_BY = orderByAndToBeSortedColIds.orderBy;
|
|
90
92
|
this.resourceParams.REVERSE = sortTypeBeingApplied === 'desc' ? true : false;
|
|
91
|
-
this.restartSubscription();
|
|
93
|
+
yield this.restartSubscription(params);
|
|
94
|
+
return;
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
}
|
|
@@ -96,7 +99,7 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
96
99
|
this.connect.getMoreRows(this.streamSourceRef);
|
|
97
100
|
}
|
|
98
101
|
this.dataserverStream.pipe(take(1)).subscribe((result) => {
|
|
99
|
-
var _a
|
|
102
|
+
var _a;
|
|
100
103
|
const messageType = result.MESSAGE_TYPE;
|
|
101
104
|
if (messageType &&
|
|
102
105
|
(messageType === MessageType.LOGOFF_ACK || messageType === MessageType.MSG_NACK)) {
|
|
@@ -122,12 +125,14 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
122
125
|
}
|
|
123
126
|
const successRowData = {
|
|
124
127
|
rowData: Array.from(this.sortMapByNumericKey(this.rowData).values()),
|
|
125
|
-
rowCount: this.pagination
|
|
128
|
+
rowCount: this.pagination && !this.resourceParams.CRITERIA_MATCH
|
|
129
|
+
? Math.min(this.server_ROWS_COUNT, this.maxView)
|
|
130
|
+
: undefined,
|
|
126
131
|
};
|
|
127
|
-
this.calculatedRowsCount
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
this.calculatedRowsCount = this.client_ROWS_COUNT;
|
|
133
|
+
if (this.calculatedRowsCount === 0) {
|
|
134
|
+
this.calculatedRowsCount = params.request.endRow;
|
|
135
|
+
}
|
|
131
136
|
if (params.request.endRow > this.maxView ||
|
|
132
137
|
params.request.endRow > this.calculatedRowsCount) {
|
|
133
138
|
successRowData.rowCount = this.calculatedRowsCount;
|
|
@@ -135,6 +140,9 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
135
140
|
else if (params.request.endRow === this.server_ROWS_COUNT) {
|
|
136
141
|
successRowData.rowCount = this.server_ROWS_COUNT;
|
|
137
142
|
}
|
|
143
|
+
else if (!this.moreRows && this.server_ROWS_COUNT > this.calculatedRowsCount) {
|
|
144
|
+
successRowData.rowCount = this.calculatedRowsCount;
|
|
145
|
+
}
|
|
138
146
|
params.success(successRowData);
|
|
139
147
|
});
|
|
140
148
|
});
|
|
@@ -147,27 +155,35 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
147
155
|
return sortedMap;
|
|
148
156
|
}
|
|
149
157
|
dataLogoff() {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const shouldPerformDataLogoff = this.streamSourceRef;
|
|
160
|
+
if (shouldPerformDataLogoff && this.auth.isLoggedIn) {
|
|
161
|
+
yield this.connect.dataLogoff(this.streamSourceRef);
|
|
162
|
+
}
|
|
163
|
+
this.streamSourceRef = undefined;
|
|
164
|
+
});
|
|
155
165
|
}
|
|
156
|
-
restartSubscription() {
|
|
157
|
-
|
|
158
|
-
this
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
restartSubscription(params) {
|
|
167
|
+
var _a;
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
yield this.dataLogoff();
|
|
170
|
+
this.rowData = new Map();
|
|
171
|
+
this.client_ROWS_COUNT = 0;
|
|
172
|
+
const streamOnMessage = (message) => message;
|
|
173
|
+
const onError = (error) => logger.error(error);
|
|
174
|
+
this.dataserverStream = undefined;
|
|
175
|
+
this.dataserverStream = this.connect.stream(this.resourceName, streamOnMessage, onError, this.resourceParams);
|
|
176
|
+
(_a = params.api) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
177
|
+
params.fail();
|
|
178
|
+
});
|
|
163
179
|
}
|
|
164
180
|
getOrderByAndToBeSortedColIds(map, searchValue) {
|
|
165
181
|
for (const [key, value] of map.entries()) {
|
|
166
182
|
const searchIndex = value.findIndex((x) => x === searchValue);
|
|
167
183
|
if (searchIndex !== -1) {
|
|
168
184
|
const copy = [...value];
|
|
169
|
-
copy.splice(searchIndex, 1);
|
|
170
|
-
return { orderBy: key, toBeSorted
|
|
185
|
+
const toBeSorted = copy.splice(searchIndex, 1);
|
|
186
|
+
return { orderBy: key, toBeSorted };
|
|
171
187
|
}
|
|
172
188
|
}
|
|
173
189
|
}
|
|
@@ -261,6 +277,7 @@ __decorate([
|
|
|
261
277
|
Connect
|
|
262
278
|
], StreamDatasource.prototype, "connect", void 0);
|
|
263
279
|
const criteriaDelimiter = ';';
|
|
280
|
+
const withoutColumnDefs = null;
|
|
264
281
|
/**
|
|
265
282
|
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
266
283
|
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
@@ -274,14 +291,27 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
274
291
|
this.pagination = false;
|
|
275
292
|
}
|
|
276
293
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
// TODO: check grid-pro-genesis-datasource criteriaChanged
|
|
281
|
-
if (!startingCriteria && criteriaNotDuplicate) {
|
|
282
|
-
this.restart();
|
|
294
|
+
const criteriaIsNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);
|
|
295
|
+
if (this.ssrmDatasource && criteriaIsNotDuplicate) {
|
|
296
|
+
this.reloadResourceData();
|
|
283
297
|
}
|
|
284
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
301
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
302
|
+
* @internal
|
|
303
|
+
*/
|
|
304
|
+
reloadResourceData() {
|
|
305
|
+
var _a, _b, _c;
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
this.ssrmDatasource.dataLogoff();
|
|
308
|
+
this.clearRowData(withoutColumnDefs);
|
|
309
|
+
this.ssrmDatasource = undefined;
|
|
310
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
311
|
+
(_c = (_b = this.agGrid) === null || _b === void 0 ? void 0 : _b.gridApi) === null || _c === void 0 ? void 0 : _c.showLoadingOverlay();
|
|
312
|
+
this.init();
|
|
313
|
+
});
|
|
314
|
+
}
|
|
285
315
|
resourceNameChanged(oldValue, newValue) {
|
|
286
316
|
if (!oldValue || oldValue === newValue)
|
|
287
317
|
return;
|
|
@@ -302,7 +332,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
302
332
|
DOM.queueUpdate(() => {
|
|
303
333
|
if (!shouldRunDisconnect)
|
|
304
334
|
return;
|
|
305
|
-
this.
|
|
335
|
+
this.deinit();
|
|
306
336
|
});
|
|
307
337
|
}
|
|
308
338
|
deepClone() {
|
|
@@ -311,6 +341,13 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
311
341
|
copy.deferredColumnStates = structuredClone(this.deferredColumnStates);
|
|
312
342
|
return copy;
|
|
313
343
|
}
|
|
344
|
+
deinit() {
|
|
345
|
+
var _a;
|
|
346
|
+
this.clearRowData();
|
|
347
|
+
this.ssrmDatasource = undefined;
|
|
348
|
+
this.originalFieldDef = undefined;
|
|
349
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
350
|
+
}
|
|
314
351
|
init() {
|
|
315
352
|
if (this.agGrid && this.resourceName && this.connect.isConnected) {
|
|
316
353
|
this.agGrid.gridOptions = Object.assign({ getRowId: (params) => {
|
|
@@ -357,25 +394,22 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
357
394
|
}
|
|
358
395
|
logger.warn(`Application not connected, falling back to local columnDefs/rowData`);
|
|
359
396
|
}
|
|
360
|
-
reset() {
|
|
361
|
-
var _a;
|
|
362
|
-
this.clearRowData();
|
|
363
|
-
this.ssrmDatasource = undefined;
|
|
364
|
-
this.originalFieldDef = undefined;
|
|
365
|
-
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
366
|
-
}
|
|
367
397
|
restart() {
|
|
368
|
-
this.
|
|
398
|
+
this.deinit();
|
|
369
399
|
this.init();
|
|
370
400
|
}
|
|
371
|
-
clearRowData() {
|
|
401
|
+
clearRowData(withColumnDefs = true) {
|
|
372
402
|
var _a, _b, _c, _d;
|
|
373
|
-
|
|
374
|
-
|
|
403
|
+
this.rowData = new Map();
|
|
404
|
+
if (withColumnDefs) {
|
|
405
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
|
|
406
|
+
}
|
|
407
|
+
this.agTransaction = { remove: [] };
|
|
375
408
|
(_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.forEachNode((node) => {
|
|
376
|
-
agTransaction.remove.push(node.data);
|
|
409
|
+
this.agTransaction.remove.push(node.data);
|
|
377
410
|
});
|
|
378
|
-
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(agTransaction);
|
|
411
|
+
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(this.agTransaction);
|
|
412
|
+
this.agTransaction = undefined;
|
|
379
413
|
}
|
|
380
414
|
getResourceIndexes(avaialbleIndexes) {
|
|
381
415
|
const resourceIndexesMap = new Map();
|
|
@@ -412,7 +446,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
412
446
|
createDataserverStream(existingParams = null) {
|
|
413
447
|
return __awaiter(this, void 0, void 0, function* () {
|
|
414
448
|
const streamOnMessage = (message) => __awaiter(this, void 0, void 0, function* () {
|
|
415
|
-
var _a
|
|
449
|
+
var _a;
|
|
416
450
|
const messageType = message.MESSAGE_TYPE;
|
|
417
451
|
if (messageType === MessageType.QUERY_UPDATE && message.ROW) {
|
|
418
452
|
const nextMessage = dataServerResultFilter(message);
|
|
@@ -422,11 +456,12 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
422
456
|
// this.handleStreamDeletes(nextMessage.deletes);
|
|
423
457
|
this.handleStreamDeletesTemp(nextMessage.deletes);
|
|
424
458
|
this.handleStreamUpdates(nextMessage.updates);
|
|
425
|
-
this.ssrmDatasource.client_ROWS_COUNT
|
|
459
|
+
this.ssrmDatasource.client_ROWS_COUNT += (_a = nextMessage.inserts.length) !== null && _a !== void 0 ? _a : 0;
|
|
426
460
|
if (message.SEQUENCE_ID > 1) {
|
|
427
461
|
const updatedInfo = yield this.connect.snapshot(this.resourceName, {
|
|
428
462
|
MAX_ROWS: 1,
|
|
429
463
|
MAX_VIEW: 1,
|
|
464
|
+
CRITERIA_MATCH: this.criteria,
|
|
430
465
|
});
|
|
431
466
|
this.ssrmDatasource.server_ROWS_COUNT = updatedInfo.ROWS_COUNT;
|
|
432
467
|
}
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -20,20 +20,13 @@ import { foundationGridProStyles as styles } from './grid-pro.styles';
|
|
|
20
20
|
import { gridProTemplate as template } from './grid-pro.template';
|
|
21
21
|
import { AgGridTheme, GridProRendererTypes, agThemeFontsId, agThemeTokenMapClassname, GRID_READY_EVENT, ERROR_COLUMN_FIELD, EDITED_COLUMN_FIELD, GridOptionsConfig, } from './grid-pro.types';
|
|
22
22
|
import { ErrorTooltip } from './tooltips';
|
|
23
|
-
import { logger, mergeAndDedupColDefWithColumnState } from './utils';
|
|
23
|
+
import { convertToKebabCase, logger, mergeAndDedupColDefWithColumnState } from './utils';
|
|
24
24
|
GridProGenesisDatasource;
|
|
25
25
|
GridProClientSideDatasource;
|
|
26
26
|
GridProServerSideDatasource;
|
|
27
27
|
GridProCell;
|
|
28
28
|
GridProColumn;
|
|
29
29
|
ModuleRegistry.registerModules([CsvExportModule, ClientSideRowModelModule]);
|
|
30
|
-
/**
|
|
31
|
-
* Convert string values from 'camelCase' to 'kebab-case'
|
|
32
|
-
* @param value - The value to convert to Kebab case.
|
|
33
|
-
* @returns The Kebab case result.
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
export const convertToKebabCase = (value) => value.replace(/([a-z])([A-Z])|\s+/g, '$1-$2').toLowerCase();
|
|
37
30
|
/**
|
|
38
31
|
* The Grid Pro element.
|
|
39
32
|
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert string values from 'camelCase' to 'kebab-case'
|
|
3
|
+
* @param value - The value to convert to Kebab case.
|
|
4
|
+
* @returns The Kebab case result.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const convertToKebabCase = (value) => value.replace(/([a-z])([A-Z])|\s+/g, '$1-$2').toLowerCase();
|
package/dist/grid-pro.api.json
CHANGED
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1444,17 +1444,17 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
1444
1444
|
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
1445
1445
|
compareDocumentPosition(other: Node): number;
|
|
1446
1446
|
contains(other: Node): boolean;
|
|
1447
|
-
getRootNode(options?: GetRootNodeOptions): Node;
|
|
1448
|
-
hasChildNodes(): boolean;
|
|
1449
|
-
insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
|
|
1450
|
-
isDefaultNamespace(namespace: string): boolean;
|
|
1451
|
-
isEqualNode(otherNode: Node): boolean;
|
|
1452
1447
|
/**
|
|
1453
1448
|
* Gets the saved grid ColumnState[] from local storage
|
|
1454
1449
|
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
1455
1450
|
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
1456
1451
|
* @public
|
|
1457
1452
|
*/
|
|
1453
|
+
getRootNode(options?: GetRootNodeOptions): Node;
|
|
1454
|
+
hasChildNodes(): boolean;
|
|
1455
|
+
insertBefore<T_2 extends Node>(node: T_2, child: Node): T_2;
|
|
1456
|
+
isDefaultNamespace(namespace: string): boolean;
|
|
1457
|
+
isEqualNode(otherNode: Node): boolean;
|
|
1458
1458
|
isSameNode(otherNode: Node): boolean;
|
|
1459
1459
|
lookupNamespaceURI(prefix: string): string;
|
|
1460
1460
|
lookupPrefix(namespace: string): string;
|
|
@@ -2188,6 +2188,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2188
2188
|
applyFuncName: string;
|
|
2189
2189
|
applyAsyncFuncName: string;
|
|
2190
2190
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
2191
|
+
/**
|
|
2192
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2193
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2194
|
+
* @internal
|
|
2195
|
+
*/
|
|
2196
|
+
private reloadResourceData;
|
|
2191
2197
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
2192
2198
|
pagination: boolean;
|
|
2193
2199
|
private indexes;
|
|
@@ -2196,8 +2202,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2196
2202
|
connectedCallback(): void;
|
|
2197
2203
|
disconnectedCallback(): void;
|
|
2198
2204
|
deepClone(): Node;
|
|
2205
|
+
deinit(): void;
|
|
2199
2206
|
init(): void;
|
|
2200
|
-
reset(): void;
|
|
2201
2207
|
restart(): void;
|
|
2202
2208
|
private clearRowData;
|
|
2203
2209
|
private getResourceIndexes;
|
|
@@ -2419,7 +2425,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2419
2425
|
readonly children: HTMLCollection;
|
|
2420
2426
|
readonly firstElementChild: Element;
|
|
2421
2427
|
readonly lastElementChild: Element;
|
|
2422
|
-
append(...nodes: (string | Node)[]): void;
|
|
2428
|
+
append(...nodes: (string | Node)[]): void; /**
|
|
2429
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2430
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2431
|
+
* @internal
|
|
2432
|
+
*/
|
|
2423
2433
|
prepend(...nodes: (string | Node)[]): void;
|
|
2424
2434
|
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
|
|
2425
2435
|
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
|
|
@@ -2719,7 +2729,7 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
2719
2729
|
constructor(options: StreamDatasourceOptions);
|
|
2720
2730
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
2721
2731
|
private sortMapByNumericKey;
|
|
2722
|
-
|
|
2732
|
+
dataLogoff(): Promise<void>;
|
|
2723
2733
|
private restartSubscription;
|
|
2724
2734
|
private getOrderByAndToBeSortedColIds;
|
|
2725
2735
|
private handleCurrentStreamLoad;
|
package/docs/api-report.md
CHANGED
|
@@ -1021,6 +1021,8 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1021
1021
|
// (undocumented)
|
|
1022
1022
|
deepClone(): Node;
|
|
1023
1023
|
// (undocumented)
|
|
1024
|
+
deinit(): void;
|
|
1025
|
+
// (undocumented)
|
|
1024
1026
|
disconnectedCallback(): void;
|
|
1025
1027
|
// (undocumented)
|
|
1026
1028
|
init(): void;
|
|
@@ -1029,8 +1031,6 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1029
1031
|
// (undocumented)
|
|
1030
1032
|
get params(): any;
|
|
1031
1033
|
// (undocumented)
|
|
1032
|
-
reset(): void;
|
|
1033
|
-
// (undocumented)
|
|
1034
1034
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
1035
1035
|
// (undocumented)
|
|
1036
1036
|
restart(): void;
|
|
@@ -1205,6 +1205,8 @@ export class StreamDatasource extends StreamBaseDatasource implements IServerSid
|
|
|
1205
1205
|
// (undocumented)
|
|
1206
1206
|
connect: Connect;
|
|
1207
1207
|
// (undocumented)
|
|
1208
|
+
dataLogoff(): Promise<void>;
|
|
1209
|
+
// (undocumented)
|
|
1208
1210
|
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
1209
1211
|
// (undocumented)
|
|
1210
1212
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-pro",
|
|
3
3
|
"description": "Genesis Foundation AG Grid",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.151.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"test:debug": "genx test --debug"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@genesislcap/foundation-testing": "14.
|
|
34
|
-
"@genesislcap/genx": "14.
|
|
35
|
-
"@genesislcap/rollup-builder": "14.
|
|
36
|
-
"@genesislcap/ts-builder": "14.
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
38
|
-
"@genesislcap/vite-builder": "14.
|
|
39
|
-
"@genesislcap/webpack-builder": "14.
|
|
33
|
+
"@genesislcap/foundation-testing": "14.151.1",
|
|
34
|
+
"@genesislcap/genx": "14.151.1",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.151.1",
|
|
36
|
+
"@genesislcap/ts-builder": "14.151.1",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.151.1",
|
|
38
|
+
"@genesislcap/vite-builder": "14.151.1",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.151.1",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.
|
|
44
|
-
"@genesislcap/foundation-logger": "14.
|
|
45
|
-
"@genesislcap/foundation-ui": "14.
|
|
46
|
-
"@genesislcap/foundation-utils": "14.
|
|
43
|
+
"@genesislcap/foundation-comms": "14.151.1",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.151.1",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.151.1",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.151.1",
|
|
47
47
|
"@microsoft/fast-colors": "^5.3.1",
|
|
48
48
|
"@microsoft/fast-components": "^2.30.6",
|
|
49
49
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"customElements": "dist/custom-elements.json",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "b56ae0d22c24098e5fd2e771a9ec1749de9cabbf"
|
|
72
72
|
}
|