@genesislcap/grid-pro 14.199.2-alpha-1ab46f4.0 → 14.199.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/README.md +111 -117
- package/dist/custom-elements.json +841 -2743
- package/dist/dts/datasource/base.datasource.d.ts +6 -22
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.datasource.d.ts +83 -27
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- 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 +13 -13
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +2 -16
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/esm/datasource/base.datasource.js +9 -79
- package/dist/esm/datasource/client-side.grid-definitions.js +1 -1
- package/dist/esm/datasource/server-side.datasource.js +396 -220
- package/dist/esm/datasource/server-side.grid-definitions.js +7 -42
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +60 -54
- package/dist/esm/grid-pro.js +4 -7
- package/dist/grid-pro.api.json +142 -21
- package/dist/grid-pro.d.ts +112 -77
- package/docs/api/grid-pro.gridpro.addeventlistener.md +2 -2
- package/docs/api/grid-pro.gridpro.md +1 -1
- package/docs/api/{grid-pro.gridprogenesisdatasource.destroy.md → grid-pro.gridprogenesisdatasource.auth.md} +3 -9
- package/docs/api/grid-pro.gridprogenesisdatasource.datasource.md +11 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.deinit.md +0 -5
- package/docs/api/grid-pro.gridprogenesisdatasource.disablepolling.md +11 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.handleerrors.md +2 -2
- package/docs/api/grid-pro.gridprogenesisdatasource.md +6 -2
- package/docs/api/grid-pro.gridprogenesisdatasource.pollinginterval.md +11 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.request.md +11 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.reset.md +1 -1
- package/docs/api-report.md +68 -19
- package/package.json +13 -13
- package/dist/dts/datasource/base.types.d.ts +0 -22
- package/dist/dts/datasource/base.types.d.ts.map +0 -1
- package/dist/dts/datasource/server-side.resource-base.d.ts +0 -55
- package/dist/dts/datasource/server-side.resource-base.d.ts.map +0 -1
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts +0 -20
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +0 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts +0 -17
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +0 -1
- package/dist/esm/datasource/base.types.js +0 -1
- package/dist/esm/datasource/server-side.resource-base.js +0 -285
- package/dist/esm/datasource/server-side.resource-dataserver.js +0 -132
- package/dist/esm/datasource/server-side.resource-reqrep.js +0 -131
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { ColDef, ColumnState, GridOptions, RowDataTransaction, ServerSideTransaction } from '@ag-grid-community/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DatasourceStatus, FieldMetadata } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
-
import { BehaviorSubject } from 'rxjs';
|
|
5
4
|
import type { GridPro } from '../grid-pro';
|
|
6
|
-
export declare const criteriaDelimiter = ";";
|
|
7
|
-
export declare const criteriaJoin = " && ";
|
|
8
5
|
declare const GenesisGridDatasourceElement_base: new () => {
|
|
9
6
|
datasourceStatus: DatasourceStatus;
|
|
10
7
|
resourceName: string;
|
|
@@ -326,7 +323,6 @@ declare const GenesisGridDatasourceElement_base: new () => {
|
|
|
326
323
|
};
|
|
327
324
|
export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceElement_base {
|
|
328
325
|
connect: Connect;
|
|
329
|
-
datasource: Datasource;
|
|
330
326
|
deferredGridOptions: GridOptions;
|
|
331
327
|
deferredColumnStates: ColumnState[];
|
|
332
328
|
/**
|
|
@@ -342,16 +338,6 @@ export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceE
|
|
|
342
338
|
orderBy: string;
|
|
343
339
|
resourceName: string;
|
|
344
340
|
reverse: boolean;
|
|
345
|
-
viewNumber: number;
|
|
346
|
-
pollingInterval: number;
|
|
347
|
-
disablePolling: boolean;
|
|
348
|
-
request: any;
|
|
349
|
-
/**
|
|
350
|
-
* Attribute to set whether the REQUEST object should be automatically set up.
|
|
351
|
-
* @remarks Defaults to `true`. Only applies to REQUEST_SERVER (REQ-REP) resources.
|
|
352
|
-
* @privateRemarks To avoid breaking changes for now, once V15 is out this will be removed and the default behavior will be the same as `false` here.
|
|
353
|
-
*/
|
|
354
|
-
requestAutoSetup: boolean;
|
|
355
341
|
/**
|
|
356
342
|
* Attribute to set an unique identifier for the row.
|
|
357
343
|
*
|
|
@@ -366,13 +352,7 @@ export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceE
|
|
|
366
352
|
*/
|
|
367
353
|
protected get hasDefaultRowId(): boolean;
|
|
368
354
|
protected get defaultRowIdByResourceType(): string;
|
|
369
|
-
protected
|
|
370
|
-
protected update: BehaviorSubject<Map<string, string>>;
|
|
371
|
-
protected datasourceOptions(): DatasourceOptions;
|
|
372
|
-
private buildCriteria;
|
|
373
|
-
setFilter(fieldName: string, newFilter: string): void;
|
|
374
|
-
removeFilter(fieldName: string): void;
|
|
375
|
-
get isRequestServer(): boolean;
|
|
355
|
+
protected isRequestServer: boolean;
|
|
376
356
|
datasourceStatusChanged(prev: DatasourceStatus, next: DatasourceStatus): void;
|
|
377
357
|
protected get agGrid(): GridPro | null;
|
|
378
358
|
}
|
|
@@ -408,5 +388,9 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
|
|
|
408
388
|
*/
|
|
409
389
|
private mapTransaction;
|
|
410
390
|
}
|
|
391
|
+
export declare class StreamBaseDatasource {
|
|
392
|
+
protected rowId: string;
|
|
393
|
+
rowData: Map<string, any>;
|
|
394
|
+
}
|
|
411
395
|
export {};
|
|
412
396
|
//# sourceMappingURL=base.datasource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,gBAAgB,EAChB,aAAa,EAId,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS3C,qBAAa,4BAA6B,SAAQ,iCAAyC;IAChF,OAAO,EAAG,OAAO,CAAC;IAEf,mBAAmB,EAAE,WAAW,CAAC;IACjC,oBAAoB,EAAE,WAAW,EAAE,CAAC;IAEhD;;OAEG;IACS,aAAa,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GAAG,EAAE;IAuBhD,SAAS,CAAC,sBAAsB;IAsChC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,wBAAwB;IAkBhC,SAAS,CAAC,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,GAAG,GAAG;IAIlE,SAAS,CAAC,qBAAqB,CAAC,aAAa,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI;IAI3F;;;;;OAKG;IACH,OAAO,CAAC,cAAc;CAwBvB;AAED,qBAAa,oBAAoB;IAC/B,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAa;CACvC"}
|
|
@@ -1,5 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { IServerSideDatasource, IServerSideGetRowsParams, IServerSideRowModel, RowDataTransaction, ServerSideTransactionResult } from '@ag-grid-community/core';
|
|
2
|
+
import { Auth, Connect, FilteredDataServerResult, MetadataDetail, SocketObservable, SocketSubscription } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { GridProBaseDatasource, StreamBaseDatasource } from './base.datasource';
|
|
4
|
+
/**
|
|
5
|
+
* Type definition for configuration options used for streams.
|
|
6
|
+
* @remarks
|
|
7
|
+
* Used by {@link @genesislcap/grid-pro#StreamDatasource} constructor to configure options for the stream.
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export type StreamDatasourceOptions = {
|
|
11
|
+
createDataserverStreamFunc: (existingParams?: any) => Promise<SocketObservable<FilteredDataServerResult>>;
|
|
12
|
+
resourceName: string;
|
|
13
|
+
resourceParams?: any;
|
|
14
|
+
resourceIndexes?: Map<string, [string]>;
|
|
15
|
+
resourceColDefs?: MetadataDetail[];
|
|
16
|
+
maxRows?: number;
|
|
17
|
+
maxView?: number;
|
|
18
|
+
rowId?: string;
|
|
19
|
+
pagination?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The IServerSideDatasource implementation, used for SSRM (Server-Side Row Model) in the grid.
|
|
23
|
+
* @alpha
|
|
24
|
+
*/
|
|
25
|
+
export declare class StreamDatasource extends StreamBaseDatasource implements IServerSideDatasource {
|
|
26
|
+
auth: Auth;
|
|
27
|
+
connect: Connect;
|
|
28
|
+
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
29
|
+
dataserverStreamSubscription: SocketSubscription;
|
|
30
|
+
createDataserverStreamFunc: (existingParams?: any) => Promise<SocketObservable<FilteredDataServerResult>>;
|
|
31
|
+
private resourceName;
|
|
32
|
+
resourceParams: any;
|
|
33
|
+
private resourceIndexes;
|
|
34
|
+
private resourceColDefs;
|
|
35
|
+
private maxRows;
|
|
36
|
+
private maxView;
|
|
37
|
+
private pagination;
|
|
38
|
+
streamSourceRef: string;
|
|
39
|
+
/**
|
|
40
|
+
* The number of rows in the grid. THIS DO NOT CONSIDER CRITERIA_MATCH scenarios.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
server_ROWS_COUNT: number;
|
|
44
|
+
/**
|
|
45
|
+
* The number of rows in the grid. THIS IS A LOCAL COUNT CONSIDERING CONSIDER CRITERIA_MATCH scenarios.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
client_ROWS_COUNT: number;
|
|
49
|
+
private moreRows;
|
|
50
|
+
private calculatedRowsCount;
|
|
51
|
+
private lastSequenceId;
|
|
52
|
+
private currentFilterModel;
|
|
53
|
+
private originalCriteriaMatch;
|
|
54
|
+
private currentSortModel;
|
|
55
|
+
constructor(options: StreamDatasourceOptions);
|
|
56
|
+
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
57
|
+
private applyServerSideData;
|
|
58
|
+
private sortMapByNumericKey;
|
|
59
|
+
deinit(): Promise<void>;
|
|
60
|
+
private refreshDatasource;
|
|
61
|
+
private getOrderByAndToBeSortedColIds;
|
|
62
|
+
private handleCurrentStreamLoad;
|
|
63
|
+
private buildCriteriaMatchFromFilters;
|
|
64
|
+
private criteriaFromFilters;
|
|
65
|
+
private getFiltersByType;
|
|
66
|
+
}
|
|
3
67
|
declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
4
68
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
5
69
|
"__#1@#_latestTokenCode": string;
|
|
@@ -209,7 +273,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
209
273
|
readonly children: HTMLCollection;
|
|
210
274
|
readonly firstElementChild: Element;
|
|
211
275
|
readonly lastElementChild: Element;
|
|
212
|
-
append(...nodes: (string | Node)[]): void;
|
|
276
|
+
append(...nodes: (string | Node)[]): void; /**
|
|
277
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
278
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
279
|
+
* @internal
|
|
280
|
+
*/
|
|
213
281
|
prepend(...nodes: (string | Node)[]): void;
|
|
214
282
|
querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6];
|
|
215
283
|
querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7];
|
|
@@ -333,42 +401,30 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
333
401
|
export declare class GridProServerSideDatasource extends GridProServerSideDatasource_base {
|
|
334
402
|
applyFuncName: string;
|
|
335
403
|
applyAsyncFuncName: string;
|
|
336
|
-
pagination: boolean;
|
|
337
|
-
/**
|
|
338
|
-
* The starting VIEW_NUMBER of the data to be fetched.
|
|
339
|
-
* @remarks The VIEW_NUMBER isincremented by the grid as the user scrolls or changes pages.
|
|
340
|
-
*/
|
|
341
|
-
zeroBasedViewNumber: boolean;
|
|
342
|
-
/**
|
|
343
|
-
* Enable live updates for the grid.
|
|
344
|
-
* @remarks Only works with DATASERVER resources (StreamDatasource) right now.
|
|
345
|
-
*/
|
|
346
|
-
liveUpdates: boolean;
|
|
347
|
-
request: any;
|
|
348
|
-
private indexes;
|
|
349
|
-
private ssrmDatasource;
|
|
350
|
-
private liveUpdatesStream;
|
|
351
|
-
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
352
404
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
353
|
-
connectedCallback(): void;
|
|
354
|
-
disconnectedCallback(): void;
|
|
355
|
-
deepClone(): Node;
|
|
356
405
|
/**
|
|
357
406
|
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
358
407
|
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
359
408
|
* @internal
|
|
360
409
|
*/
|
|
361
410
|
private reloadResourceData;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
411
|
+
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
412
|
+
pagination: boolean;
|
|
413
|
+
private indexes;
|
|
414
|
+
private ssrmDatasource;
|
|
415
|
+
private originalFieldDef;
|
|
416
|
+
connectedCallback(): void;
|
|
417
|
+
disconnectedCallback(): void;
|
|
418
|
+
deepClone(): Node;
|
|
419
|
+
deinit(): void;
|
|
420
|
+
init(): void;
|
|
421
|
+
restart(): void;
|
|
366
422
|
private clearRowData;
|
|
367
423
|
private getResourceIndexes;
|
|
368
424
|
get params(): any;
|
|
369
425
|
get rowModel(): IServerSideRowModel;
|
|
370
|
-
private createReqRepRequest;
|
|
371
426
|
private createDataserverStream;
|
|
427
|
+
private handleStreamDeletesTemp;
|
|
372
428
|
private getAgColumnDefs;
|
|
373
429
|
applyTransaction(agTransaction: RowDataTransaction): ServerSideTransactionResult;
|
|
374
430
|
applyTransactionAsync(agTransaction: RowDataTransaction, callback?: (res: ServerSideTransactionResult) => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,EAIP,wBAAwB,EAIxB,cAAc,EAId,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,0BAA0B,EAAE,CAC1B,cAAc,CAAC,EAAE,GAAG,KACjB,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACzD,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,4BAA4B,EAAE,kBAAkB,CAAC;IACjD,0BAA0B,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzBL;;;;GAIG;AACH,qBAGa,2BAA4B,SAAQ,gCAAqC;IACpF,aAAa,SAAgC;IAC7C,kBAAkB,SAAqC;IAEvD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASxD;;;;OAIG;YACW,kBAAkB;IAYhC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAK3B,UAAU,UAAS;IAE9C,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAmB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;IAE3C,iBAAiB;IASjB,oBAAoB;IASX,SAAS,IAAI,IAAI;IAO1B,MAAM;IAQN,IAAI;IA4EJ,OAAO;IAKP,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,kBAAkB;IAU1B,IAAI,MAAM,QA2BT;IAED,IAAI,QAAQ,IAAI,mBAAmB,CAElC;YAEa,sBAAsB;IA2CpC,OAAO,CAAC,uBAAuB;YAUjB,eAAe;IAoBpB,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,GAAG,2BAA2B;IAIhF,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,2BAA2B,KAAK,IAAI;CAIxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.grid-definitions.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.grid-definitions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"server-side.grid-definitions.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.grid-definitions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAsFtE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ColDef, ColumnState, RowDataTransaction, RowNodeTransaction } from '@ag-grid-community/core';
|
|
1
|
+
import type { ColDef, ColumnState, RowDataTransaction, RowNodeTransaction } from '@ag-grid-community/core';
|
|
2
|
+
import { Auth, Datasource } from '@genesislcap/foundation-comms';
|
|
2
3
|
import { GridProBaseDatasource } from '../datasource/base.datasource';
|
|
3
4
|
declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
4
5
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
@@ -45,10 +46,6 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
45
46
|
readonly classList: DOMTokenList;
|
|
46
47
|
className: string;
|
|
47
48
|
readonly clientHeight: number;
|
|
48
|
-
/**
|
|
49
|
-
* Destroys the datasource, resetting it to its initial state.
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
49
|
readonly clientLeft: number;
|
|
53
50
|
readonly clientTop: number;
|
|
54
51
|
readonly clientWidth: number;
|
|
@@ -335,9 +332,14 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
335
332
|
* @public
|
|
336
333
|
*/
|
|
337
334
|
export declare class GridProGenesisDatasource extends GridProGenesisDatasource_base {
|
|
335
|
+
auth: Auth;
|
|
336
|
+
datasource: Datasource;
|
|
338
337
|
applyFuncName: string;
|
|
339
338
|
applyAsyncFuncName: string;
|
|
340
339
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
340
|
+
pollingInterval: number;
|
|
341
|
+
disablePolling: boolean;
|
|
342
|
+
request: any;
|
|
341
343
|
requestChanged(oldRequest: string, newRequest: string): void;
|
|
342
344
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
343
345
|
restartOnReconnection: boolean;
|
|
@@ -346,6 +348,8 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
346
348
|
private updateSub;
|
|
347
349
|
private connectionSub;
|
|
348
350
|
private requiresFullRowDataAndColDefs;
|
|
351
|
+
private criteriaFromFilters;
|
|
352
|
+
private update;
|
|
349
353
|
connectedCallback(): void;
|
|
350
354
|
disconnectedCallback(): void;
|
|
351
355
|
deepClone(): Node;
|
|
@@ -358,21 +362,15 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
358
362
|
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
359
363
|
*/
|
|
360
364
|
init(columnDefinitions?: ColDef[], columnStates?: ColumnState[]): Promise<void>;
|
|
361
|
-
/**
|
|
362
|
-
* Destroys the datasource, resetting it to its initial state.
|
|
363
|
-
* @public
|
|
364
|
-
*/
|
|
365
|
-
destroy(): void;
|
|
366
365
|
/**
|
|
367
366
|
* Deinitialises the datasource, resetting it to its initial state.
|
|
368
|
-
* @deprecated Use `destroy` instead
|
|
369
367
|
* @public
|
|
370
368
|
*/
|
|
371
369
|
deinit(): void;
|
|
372
370
|
/**
|
|
373
371
|
* Resets the datasource to its initial state.
|
|
374
372
|
* @public
|
|
375
|
-
* @deprecated Use `
|
|
373
|
+
* @deprecated Use `deinit` instead
|
|
376
374
|
*/
|
|
377
375
|
reset(): void;
|
|
378
376
|
/**
|
|
@@ -413,11 +411,13 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
413
411
|
*/
|
|
414
412
|
private loadResourceData;
|
|
415
413
|
private handleSnapshot;
|
|
416
|
-
handleErrors(
|
|
414
|
+
handleErrors(message: string): void;
|
|
415
|
+
private datasourceOptions;
|
|
417
416
|
private handleStreamResult;
|
|
418
417
|
private applyRequestServerData;
|
|
419
418
|
private applyDataserverData;
|
|
420
419
|
private getAgColumnDefs;
|
|
420
|
+
private buildCriteria;
|
|
421
421
|
setFilter(fieldName: string, newFilter: string): void;
|
|
422
422
|
removeFilter(fieldName: string): void;
|
|
423
423
|
applyTransaction(agTransaction: RowDataTransaction): RowNodeTransaction | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EAEX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,UAAU,EAWX,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAatE;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAqC;IAC3E,IAAI,EAAG,IAAI,CAAC;IACN,UAAU,EAAG,UAAU,CAAC;IAEpC,aAAa,SAAsB;IACnC,kBAAkB,SAA2B;IAG7C,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASf,eAAe,EAAE,MAAM,CACf;IACQ,cAAc,EAAE,OAAO,CA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AC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAC3C,IAAI;IAIP,OAAO,CAAC,iBAAiB;CAO1B"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -213,12 +213,7 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
213
213
|
ariaValueNow: string;
|
|
214
214
|
ariaValueText: string;
|
|
215
215
|
role: string;
|
|
216
|
-
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
217
|
-
* Gets the saved grid ColumnState[] from storage
|
|
218
|
-
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
219
|
-
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
220
|
-
* @public
|
|
221
|
-
*/
|
|
216
|
+
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
222
217
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
223
218
|
after(...nodes: (string | Node)[]): void;
|
|
224
219
|
before(...nodes: (string | Node)[]): void;
|
|
@@ -311,15 +306,6 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
311
306
|
onprogress: (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any;
|
|
312
307
|
onratechange: (this: GlobalEventHandlers, ev: Event) => any;
|
|
313
308
|
onreset: (this: GlobalEventHandlers, ev: Event) => any;
|
|
314
|
-
/**
|
|
315
|
-
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
316
|
-
* @public
|
|
317
|
-
* @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
|
|
318
|
-
* @param columnDefs - The column definitions to apply to the grid.
|
|
319
|
-
* @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
|
|
320
|
-
* on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
|
|
321
|
-
* @returns The merged column definitions.
|
|
322
|
-
*/
|
|
323
309
|
onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
|
|
324
310
|
onscroll: (this: GlobalEventHandlers, ev: Event) => any;
|
|
325
311
|
onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
|
|
@@ -477,7 +463,7 @@ export declare class GridPro extends GridPro_base {
|
|
|
477
463
|
*/
|
|
478
464
|
gridOptionsConfig: GridOptionsConfig;
|
|
479
465
|
constructor();
|
|
480
|
-
addEventListener(
|
|
466
|
+
addEventListener(type: any, listener: any, options?: boolean | AddEventListenerOptions): void;
|
|
481
467
|
private addGridEventListener;
|
|
482
468
|
private handleError;
|
|
483
469
|
hideDatasourceError(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAiB,IAAI,EAAkB,MAAM,yBAAyB,CAAC;AAC3F,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EAET,OAAO,EACP,WAAW,EACX,UAAU,EAEX,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAoB/D,OAAO,EAAE,2BAA2B,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAExF,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAML,iBAAiB,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,gBAAgB,EAChB,iBAAiB,EAEjB,yBAAyB,EAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAcvD;;;;GAIG;AACH,eAA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,IAAI,UAAU,IAAI,UAAU,CAI3B;IAED;;;;OAIG;IACH,IAAI,iBAAiB,IACjB,wBAAwB,GACxB,2BAA2B,GAC3B,2BAA2B,CAM9B;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EA2FnC;IAED,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,QAAQ;IAehB;;;;;;OAMG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAKhF;;;;;;;;OAQG;IACG,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAuFzF,IAAI,kBAAkB,aAWrB;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,13 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { DatasourceDefaults, DatasourceEventHandler, FieldTypeEnum, logger, ResourceType, } from '@genesislcap/foundation-comms';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
-
import { attr, observable
|
|
4
|
+
import { attr, observable } from '@microsoft/fast-element';
|
|
5
5
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
6
|
-
import { BehaviorSubject } from 'rxjs';
|
|
7
6
|
import { dateValueFormatter, dateTimeValueFormatter, getColumnType, getFilterByFieldType, } from '../grid-pro.definitions';
|
|
8
7
|
import { GridProRendererTypes } from '../grid-pro.types';
|
|
9
|
-
export const criteriaDelimiter = ';';
|
|
10
|
-
export const criteriaJoin = ' && ';
|
|
11
8
|
export class GenesisGridDatasourceElement extends DatasourceEventHandler(FoundationElement) {
|
|
12
9
|
constructor() {
|
|
13
10
|
super(...arguments);
|
|
@@ -16,16 +13,7 @@ export class GenesisGridDatasourceElement extends DatasourceEventHandler(Foundat
|
|
|
16
13
|
this.maxView = DatasourceDefaults.MAX_VIEW_1000;
|
|
17
14
|
this.movingView = false;
|
|
18
15
|
this.reverse = false;
|
|
19
|
-
this.
|
|
20
|
-
this.disablePolling = false;
|
|
21
|
-
/**
|
|
22
|
-
* Attribute to set whether the REQUEST object should be automatically set up.
|
|
23
|
-
* @remarks Defaults to `true`. Only applies to REQUEST_SERVER (REQ-REP) resources.
|
|
24
|
-
* @privateRemarks To avoid breaking changes for now, once V15 is out this will be removed and the default behavior will be the same as `false` here.
|
|
25
|
-
*/
|
|
26
|
-
this.requestAutoSetup = true;
|
|
27
|
-
this.criteriaFromFilters = new Map();
|
|
28
|
-
this.update = new BehaviorSubject(new Map());
|
|
16
|
+
this.isRequestServer = false;
|
|
29
17
|
}
|
|
30
18
|
/* Returns the `row-id` attribute, depending on the resource type.
|
|
31
19
|
* @remarks Will favour the `row-id` attribute if set.
|
|
@@ -52,50 +40,8 @@ export class GenesisGridDatasourceElement extends DatasourceEventHandler(Foundat
|
|
|
52
40
|
? DatasourceDefaults.REQUEST_SERVER_ROW_ID
|
|
53
41
|
: DatasourceDefaults.DATASERVER_ROW_ID;
|
|
54
42
|
}
|
|
55
|
-
datasourceOptions() {
|
|
56
|
-
return {
|
|
57
|
-
// Common between DATASERVER and REQUEST_SERVER (REQ-REP)
|
|
58
|
-
resourceName: this.resourceName,
|
|
59
|
-
isSnapshot: this.isSnapshot,
|
|
60
|
-
criteria: this.buildCriteria(),
|
|
61
|
-
maxRows: +this.maxRows,
|
|
62
|
-
viewNumber: this.viewNumber,
|
|
63
|
-
// DATASERVER only
|
|
64
|
-
fields: this.fields,
|
|
65
|
-
maxView: +this.maxView,
|
|
66
|
-
movingView: this.movingView,
|
|
67
|
-
orderBy: this.orderBy,
|
|
68
|
-
reverse: this.reverse,
|
|
69
|
-
// REQUEST_SERVER only
|
|
70
|
-
disablePolling: this.disablePolling,
|
|
71
|
-
pollingInterval: this.pollingInterval,
|
|
72
|
-
request: this.request,
|
|
73
|
-
requestAutoSetup: this.requestAutoSetup,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
buildCriteria() {
|
|
77
|
-
var _a;
|
|
78
|
-
const initialCriteria = ((_a = this.criteria) === null || _a === void 0 ? void 0 : _a.split(criteriaDelimiter)) || [];
|
|
79
|
-
const criteria = initialCriteria.concat(Array.from(this.criteriaFromFilters.values()));
|
|
80
|
-
const normalisedCriteria = normaliseCriteria(criteria.join(criteriaJoin), criteriaDelimiter);
|
|
81
|
-
return normalisedCriteria ? normalisedCriteria : undefined;
|
|
82
|
-
}
|
|
83
|
-
setFilter(fieldName, newFilter) {
|
|
84
|
-
this.criteriaFromFilters.set(fieldName, newFilter);
|
|
85
|
-
this.update.next(this.criteriaFromFilters);
|
|
86
|
-
}
|
|
87
|
-
removeFilter(fieldName) {
|
|
88
|
-
this.criteriaFromFilters.delete(fieldName);
|
|
89
|
-
this.update.next(this.criteriaFromFilters);
|
|
90
|
-
}
|
|
91
|
-
get isRequestServer() {
|
|
92
|
-
var _a;
|
|
93
|
-
return ((_a = this.datasource.status) === null || _a === void 0 ? void 0 : _a.type) === ResourceType.REQUEST_SERVER;
|
|
94
|
-
}
|
|
95
|
-
// protected isRequestServer = false;
|
|
96
43
|
datasourceStatusChanged(prev, next) {
|
|
97
|
-
|
|
98
|
-
// TODO: this is not triggered after first init :(
|
|
44
|
+
this.isRequestServer = next.type === ResourceType.REQUEST_SERVER;
|
|
99
45
|
}
|
|
100
46
|
get agGrid() {
|
|
101
47
|
return this.parentElement;
|
|
@@ -104,9 +50,6 @@ export class GenesisGridDatasourceElement extends DatasourceEventHandler(Foundat
|
|
|
104
50
|
__decorate([
|
|
105
51
|
Connect
|
|
106
52
|
], GenesisGridDatasourceElement.prototype, "connect", void 0);
|
|
107
|
-
__decorate([
|
|
108
|
-
Datasource
|
|
109
|
-
], GenesisGridDatasourceElement.prototype, "datasource", void 0);
|
|
110
53
|
__decorate([
|
|
111
54
|
observable
|
|
112
55
|
], GenesisGridDatasourceElement.prototype, "deferredGridOptions", void 0);
|
|
@@ -143,27 +86,9 @@ __decorate([
|
|
|
143
86
|
__decorate([
|
|
144
87
|
attr({ mode: 'boolean' })
|
|
145
88
|
], GenesisGridDatasourceElement.prototype, "reverse", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
attr({ attribute: 'view-number' })
|
|
148
|
-
], GenesisGridDatasourceElement.prototype, "viewNumber", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
attr({ attribute: 'polling-interval' })
|
|
151
|
-
], GenesisGridDatasourceElement.prototype, "pollingInterval", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
attr({ mode: 'boolean', attribute: 'disable-polling' })
|
|
154
|
-
], GenesisGridDatasourceElement.prototype, "disablePolling", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
observable
|
|
157
|
-
], GenesisGridDatasourceElement.prototype, "request", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
attr({ mode: 'boolean', attribute: 'request-auto-setup' })
|
|
160
|
-
], GenesisGridDatasourceElement.prototype, "requestAutoSetup", void 0);
|
|
161
89
|
__decorate([
|
|
162
90
|
attr({ attribute: 'row-id' })
|
|
163
91
|
], GenesisGridDatasourceElement.prototype, "rowIdAttr", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
volatile
|
|
166
|
-
], GenesisGridDatasourceElement.prototype, "isRequestServer", null);
|
|
167
92
|
/**
|
|
168
93
|
* The operation type for the {@link @genesislcap/grid-pro#GridProBaseDatasource.mapTransaction} method.
|
|
169
94
|
* @internal
|
|
@@ -345,3 +270,8 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
345
270
|
return mappedTransaction;
|
|
346
271
|
}
|
|
347
272
|
}
|
|
273
|
+
export class StreamBaseDatasource {
|
|
274
|
+
constructor() {
|
|
275
|
+
this.rowData = new Map();
|
|
276
|
+
}
|
|
277
|
+
}
|