@genesislcap/grid-pro 15.30.0 → 15.30.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 +5837 -5435
- package/dist/dts/datasource/base.datasource.d.ts +69 -8
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/base.types.d.ts +10 -0
- package/dist/dts/datasource/base.types.d.ts.map +1 -1
- package/dist/dts/datasource/dataserver-result.filter.d.ts +17 -0
- package/dist/dts/datasource/dataserver-result.filter.d.ts.map +1 -0
- package/dist/dts/datasource/delivered-block.ledger.d.ts +37 -0
- package/dist/dts/datasource/delivered-block.ledger.d.ts.map +1 -0
- package/dist/dts/datasource/infinite.datasource.d.ts +65 -1
- package/dist/dts/datasource/infinite.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/infinite.resource.d.ts +136 -6
- package/dist/dts/datasource/infinite.resource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.datasource.d.ts +8 -4
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-base.d.ts +23 -0
- package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts +28 -0
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts +1 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
- package/dist/dts/grid-pro-beta.d.ts +6 -0
- package/dist/dts/grid-pro-beta.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts +4 -0
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +2 -2
- package/dist/esm/datasource/base.datasource.js +182 -27
- package/dist/esm/datasource/dataserver-result.filter.js +28 -0
- package/dist/esm/datasource/delivered-block.ledger.js +52 -0
- package/dist/esm/datasource/infinite.datasource.js +131 -20
- package/dist/esm/datasource/infinite.resource.js +221 -16
- package/dist/esm/datasource/server-side.datasource.js +80 -29
- package/dist/esm/datasource/server-side.resource-base.js +39 -0
- package/dist/esm/datasource/server-side.resource-dataserver.js +110 -23
- package/dist/esm/datasource/server-side.resource-reqrep.js +25 -3
- package/dist/esm/grid-pro-beta.js +20 -2
- package/dist/esm/grid-pro.js +4 -1
- package/dist/grid-pro.api.json +35 -35
- package/dist/grid-pro.d.ts +290 -18
- package/dist/react.cjs +11 -11
- package/dist/react.mjs +11 -11
- package/package.json +13 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColDef, ColumnState, GridOptions } from '@ag-grid-community/core';
|
|
2
2
|
import { Connect, Datasource, DatasourceOptions, DatasourceStatus, FieldMetadata, FieldTypeEnum, IndexDetail } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { JSONSerializer } from '@genesislcap/foundation-utils';
|
|
3
4
|
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
4
5
|
import { type BaseDatasourceErrorEventDetail } from './base.types';
|
|
5
6
|
/**
|
|
@@ -49,12 +50,7 @@ declare const GenesisGridDatasourceElement_base: new () => {
|
|
|
49
50
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
50
51
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
51
52
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
52
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options
|
|
53
|
-
/**
|
|
54
|
-
* Optional parameter that allows you to select a subset of fields from the query if the client is not interested in receiving all of them.
|
|
55
|
-
* @remarks DATASERVER only.
|
|
56
|
-
*/
|
|
57
|
-
?: boolean | EventListenerOptions): void;
|
|
53
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
58
54
|
readonly attributes: NamedNodeMap;
|
|
59
55
|
get classList(): DOMTokenList;
|
|
60
56
|
set classList(value: string): any;
|
|
@@ -119,7 +115,15 @@ declare const GenesisGridDatasourceElement_base: new () => {
|
|
|
119
115
|
removeAttribute(qualifiedName: string): void;
|
|
120
116
|
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
121
117
|
removeAttributeNode(attr: Attr): Attr;
|
|
122
|
-
requestFullscreen(options
|
|
118
|
+
requestFullscreen(options
|
|
119
|
+
/**
|
|
120
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
? /**
|
|
124
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
125
|
+
* @internal
|
|
126
|
+
*/: FullscreenOptions): Promise<void>;
|
|
123
127
|
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
124
128
|
scroll(options?: ScrollToOptions): void;
|
|
125
129
|
scroll(x: number, y: number): void;
|
|
@@ -505,7 +509,12 @@ export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceE
|
|
|
505
509
|
protected criteriaFromFilters: Map<string, string>;
|
|
506
510
|
protected update: BehaviorSubject<Map<string, string>>;
|
|
507
511
|
protected datasourceOptions(): DatasourceOptions;
|
|
508
|
-
|
|
512
|
+
/**
|
|
513
|
+
* The criteria the resource should be read with: the `criteria` attribute plus anything added
|
|
514
|
+
* through `setFilter()`.
|
|
515
|
+
* @internal
|
|
516
|
+
*/
|
|
517
|
+
protected buildCriteria(): string;
|
|
509
518
|
setFilter(fieldName: string, newFilter: string): void;
|
|
510
519
|
removeFilter(fieldName: string): void;
|
|
511
520
|
get isRequestServer(): boolean;
|
|
@@ -550,19 +559,71 @@ interface TransactionData {
|
|
|
550
559
|
addIndex?: number;
|
|
551
560
|
}
|
|
552
561
|
export declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
562
|
+
serializer: JSONSerializer;
|
|
553
563
|
protected dataSubWasLoggedOff: boolean;
|
|
554
564
|
keepColDefsOnClearRowData: boolean;
|
|
555
565
|
rowData: Map<string, any>;
|
|
556
566
|
protected transactionData: TransactionData;
|
|
567
|
+
/** So rows without a row id are warned about once per element, not once per block. @internal */
|
|
568
|
+
private missingRowIdWarned;
|
|
557
569
|
protected connectionSub: Subscription | undefined;
|
|
558
570
|
protected subscribeToConnection(): void;
|
|
559
571
|
protected unsubscribeFromConnection(): void;
|
|
560
572
|
protected generateColumnDefsFromMetadata(fieldsMetadata: FieldMetadata[], getFilterParamsByFieldType: (field: FieldMetadata) => ColDef['filterParams'] | any, getFilterByFieldType: (type: FieldTypeEnum) => string): ColDef[];
|
|
561
573
|
protected handleStreamInserts(insertedRows: any[], addIndex?: number): void;
|
|
574
|
+
/**
|
|
575
|
+
* Resolves the id of the held row a stream row refers to.
|
|
576
|
+
* @remarks Under a custom `row-id` a DATASERVER push may carry only the default id
|
|
577
|
+
* (`ROW_REF`), so the held row with that default id supplies the custom one. Returns
|
|
578
|
+
* `undefined` when neither id is present - callers skip the row rather than matching
|
|
579
|
+
* `undefined === undefined` against the first held row.
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
protected resolveRowId(row: any): string | undefined;
|
|
562
583
|
protected handleStreamDeletes(deletedRows: any[]): void;
|
|
563
584
|
protected handleStreamUpdates(updatedRows: any[]): void;
|
|
564
585
|
protected applyAllTransactions(): void;
|
|
565
586
|
private applyMappedTransaction;
|
|
587
|
+
/**
|
|
588
|
+
* Reports rows a block-based row model (server-side, infinite) has just handed to the grid.
|
|
589
|
+
* Rows not held before are reported as `add`; rows already held (a block re-read after a
|
|
590
|
+
* refresh, or a req/rep re-read after a commit or poll) are reported as `update` only when
|
|
591
|
+
* their content changed, so a plain re-read is silent.
|
|
592
|
+
* @remarks `rowData` holds the rows delivered since the last cache reset: the resource reports
|
|
593
|
+
* rows a re-read no longer returned (`reportWithdrawnRows`), and `clearRowData` empties it when
|
|
594
|
+
* the grid drops its cache. Block eviction is not mirrored - see `DeliveredBlockLedger` - so
|
|
595
|
+
* this is a superset of what the grid holds.
|
|
596
|
+
* @internal
|
|
597
|
+
*/
|
|
598
|
+
protected reportDeliveredRows(rows: any[]): void;
|
|
599
|
+
/**
|
|
600
|
+
* Reports rows a block re-read no longer returned: they left the grid (deleted on the server,
|
|
601
|
+
* or moved into a block that reports them again). Rows already reported removed - a DATASERVER
|
|
602
|
+
* push, say - are skipped.
|
|
603
|
+
* @internal
|
|
604
|
+
*/
|
|
605
|
+
protected reportWithdrawnRows(rowIds: string[]): void;
|
|
606
|
+
/**
|
|
607
|
+
* Starts a fresh transaction and returns it, so a caller can keep working on the object it
|
|
608
|
+
* built even if a consumer's `datasource-data-changed` handler resets the element meanwhile.
|
|
609
|
+
* @internal
|
|
610
|
+
*/
|
|
611
|
+
protected resetTransaction(): TransactionData & {
|
|
612
|
+
add: any[];
|
|
613
|
+
remove: any[];
|
|
614
|
+
update: any[];
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* Whether two versions of a row differ in content. Identity and a key-order-insensitive
|
|
618
|
+
* field comparison come first, so a re-read of unchanged rows costs no serialization; nested
|
|
619
|
+
* values fall back to the serializer.
|
|
620
|
+
* @internal
|
|
621
|
+
*/
|
|
622
|
+
protected hasRowContentChanged(known: any, row: any): boolean;
|
|
623
|
+
/** Emits `datasource-data-changed` for `transaction` when it is non-empty. @internal */
|
|
624
|
+
protected emitTransaction(transaction: TransactionData | undefined): void;
|
|
625
|
+
/** @internal */
|
|
626
|
+
private warnMissingRowIdOnce;
|
|
566
627
|
/**
|
|
567
628
|
* Builds the index map used for server-side sorting from the resource's metadata.
|
|
568
629
|
* @remarks Real DATASERVER indexes keep their names; when the resource also (or only) reports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,OAAO,EACP,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,EAIZ,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,OAAO,EACP,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,WAAW,EAIZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAUrD,OAAO,EAA4B,KAAK,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;;;;QASlB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAiCJ,CAAC;4IAGyH,CAAC;wFAGtI,CAAC;+IAMc,CAAC;2FAKc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyBc,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBAiDV,CAAC;;;;;;;;;;;;;;IAsBtC;;;OAGG;IACH,CAJF,CAAE;;;OAGG;8BAF4D,CAAC;kBAGzD,CAAC;;oBAGW,CAAC;;sBAC6B,CAAC;oBAIR,CAAC;;;;;;;;gDAa9B,CAAC;;;;;;;;;;;;;;;;qBAwBI,CAAC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,EAAE,eAAe,EAAE,GAAG,GAAG,GAAG,EAAE;CAiExF"}
|
|
@@ -32,6 +32,16 @@ export type ServerSideDatasourceOptions = {
|
|
|
32
32
|
onNoDataAvailableFunc?: () => void;
|
|
33
33
|
/** Called when a server-side load finishes with one or more rows. */
|
|
34
34
|
onDataAvailableFunc?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Called with the rows just handed to AG Grid for a block. This is the only point at which
|
|
37
|
+
* rows leave the datasource, so it is where the host learns which rows the grid holds.
|
|
38
|
+
*/
|
|
39
|
+
onRowsDeliveredFunc?: (rows: any[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Called with the ids of rows a re-read of a block no longer returned - they left the grid
|
|
42
|
+
* (deleted on the server, or moved to a block that reports them again).
|
|
43
|
+
*/
|
|
44
|
+
onRowsWithdrawnFunc?: (rowIds: string[]) => void;
|
|
35
45
|
resourceName: string;
|
|
36
46
|
resourceParams?: DataserverParams | RequestParams;
|
|
37
47
|
resourceIndexes?: Map<string, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.types.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACX,MAAM,+BAA+B,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,0BAA0B,CAAC,EAAE,CAC3B,cAAc,CAAC,EAAE,GAAG,KACjB,OAAO,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACzD,uBAAuB,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACjF;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC;QACjD,MAAM,EAAE,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KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,gBAAgB,GAAG,aAAa,CAAC;IAClD,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,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,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EACA,YAAY,GACZ,qBAAqB,GACrB,eAAe,GACf,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,8BAA8B,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FilteredDataServerResult, RawDataServerResult } from '@genesislcap/foundation-comms';
|
|
2
|
+
/**
|
|
3
|
+
* Filters a DATASERVER batch into inserts/updates/deletes, keeping the default row id
|
|
4
|
+
* (`ROW_REF`) on every row alongside the configured one.
|
|
5
|
+
* @remarks `dataServerResultFilter` resolves the configured `rowId` out of `DETAILS` and then
|
|
6
|
+
* drops `DETAILS` entirely. Under a custom `row-id` that loses the only id a pushed MODIFY or
|
|
7
|
+
* DELETE carries: Genesis sends those as `DETAILS: { OPERATION, ROW_REF }` plus the changed
|
|
8
|
+
* fields, so the custom id is absent and the row arrives with no resolvable identity at all.
|
|
9
|
+
* Hoisting `ROW_REF` before the filter runs keeps it on both the rows a block delivers and the
|
|
10
|
+
* rows a push carries, which is what lets `resolveRowId` match one to the other.
|
|
11
|
+
*
|
|
12
|
+
* Columns come from the resource's field metadata, not from row keys, so the extra field does
|
|
13
|
+
* not add a column.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function filterDataserverResult(result: RawDataServerResult, rowId: string): FilteredDataServerResult;
|
|
17
|
+
//# sourceMappingURL=dataserver-result.filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataserver-result.filter.d.ts","sourceRoot":"","sources":["../../../src/datasource/dataserver-result.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,MAAM,GACZ,wBAAwB,CAgB1B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one block delivery changed about the rows the grid holds.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type BlockDeliveryReport = {
|
|
6
|
+
/** Ids the previous delivery of this block carried that this one does not, and no other held block carries. */
|
|
7
|
+
withdrawnRowIds: string[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Tracks which row ids each block has handed to AG Grid, so the host can learn when a re-read of
|
|
11
|
+
* a block no longer returns a row (it left the grid).
|
|
12
|
+
* @remarks Plain class shared by the infinite and SSRM resources - AG Grid does not report that
|
|
13
|
+
* event.
|
|
14
|
+
*
|
|
15
|
+
* Block eviction is deliberately **not** mirrored here. AG Grid evicts by last access
|
|
16
|
+
* (`InfiniteCache.purgeBlocksIfNeeded` sorts on `lastAccessed` and never evicts a displayed or
|
|
17
|
+
* focused block; the SSRM `LazyCache` purges by distance from the viewport), and a datasource is
|
|
18
|
+
* told about neither the accesses nor the evictions. Any eviction model built from delivery order
|
|
19
|
+
* alone diverges from the grid's as soon as the user scrolls back, which would drop a visible
|
|
20
|
+
* row from the held set and silence the pushes that follow. So the held set means "rows delivered
|
|
21
|
+
* since the last cache reset": a superset of what the grid holds, which keeps every push for a
|
|
22
|
+
* possibly-visible row flowing and costs only a re-delivered row being reported as unchanged
|
|
23
|
+
* rather than as an `add`.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare class DeliveredBlockLedger {
|
|
27
|
+
private readonly rowId;
|
|
28
|
+
/** Row ids per block start row. */
|
|
29
|
+
private blocks;
|
|
30
|
+
constructor(rowId: string);
|
|
31
|
+
/** Records the rows handed to the grid for the block at `startRow`. */
|
|
32
|
+
record(startRow: number, rows: any[]): BlockDeliveryReport;
|
|
33
|
+
/** Forgets every block, for when the grid drops its whole cache (filter/sort change, destroy). */
|
|
34
|
+
clear(): void;
|
|
35
|
+
private isHeld;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=delivered-block.ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delivered-block.ledger.d.ts","sourceRoot":"","sources":["../../../src/datasource/delivered-block.ledger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,+GAA+G;IAC/G,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,oBAAoB;IAInB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAHlC,mCAAmC;IACnC,OAAO,CAAC,MAAM,CAAuC;gBAExB,KAAK,EAAE,MAAM;IAE1C,uEAAuE;IACvE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,mBAAmB;IAmB1D,kGAAkG;IAClG,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,MAAM;CAQf"}
|
|
@@ -398,12 +398,15 @@ declare const GridProInfiniteDatasource_base: (new (...args: any[]) => {
|
|
|
398
398
|
* @fires datasource-initialize - Fired to hand off infinite row model grid options. detail: `InitializeEventDetail`
|
|
399
399
|
* @fires datasource-init - Fired when the infinite grid model should initialize data
|
|
400
400
|
* @fires datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`
|
|
401
|
+
* @fires datasource-data-changed - Fired when rows are delivered to the grid, a DATASERVER push changes them, or a re-read no longer returns them; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`
|
|
401
402
|
* @fires set-infinite-datasource - Fired to attach or clear the infinite row model datasource. detail: `SetInfiniteDatasourceEventDetail`
|
|
402
403
|
* @fires refresh-infinite-cache - Fired to request an infinite row model refresh; `purge` drops the block cache and re-reads. detail: `RefreshInfiniteCacheEventDetail`
|
|
403
404
|
* @fires add-grid-css-class - Fired to add a CSS class on the grid host (hover sort indicators). detail: `GridCssClassEventDetail`
|
|
404
405
|
* @fires remove-grid-css-class - Fired to remove that CSS class from the grid host. detail: `GridCssClassEventDetail`
|
|
405
406
|
* @fires cache-filter-config - Fired to persist filter configuration for the grid
|
|
406
|
-
* @fires datasource-data-cleared - Fired when
|
|
407
|
+
* @fires datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`
|
|
408
|
+
* @fires datasource-loading-finished - Fired when the first block comes back with rows
|
|
409
|
+
* @fires datasource-no-data-available - Fired when the first block comes back empty
|
|
407
410
|
* @fires datasource-filters-restored - Fired when persisted filters are reapplied
|
|
408
411
|
*/
|
|
409
412
|
export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource_base {
|
|
@@ -419,6 +422,19 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
|
|
|
419
422
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
420
423
|
connectedCallback(): void;
|
|
421
424
|
disconnectedCallback(): void;
|
|
425
|
+
/** Unsubscribes the `setFilter()` listener. @internal */
|
|
426
|
+
private filterSub;
|
|
427
|
+
/**
|
|
428
|
+
* Reloads when `setFilter()` or `removeFilter()` changes the criteria.
|
|
429
|
+
* @remarks The criteria a block is read with is captured when the resource is built, so a
|
|
430
|
+
* filter added later reaches nothing until the rows are re-read. The `criteria` attribute
|
|
431
|
+
* already reloads through `criteriaChanged`; this gives the programmatic API the same
|
|
432
|
+
* behaviour instead of silently doing nothing.
|
|
433
|
+
* @internal
|
|
434
|
+
*/
|
|
435
|
+
private subscribeToFilterChanges;
|
|
436
|
+
/** @internal */
|
|
437
|
+
private unsubscribeFromFilterChanges;
|
|
422
438
|
deepClone(): Node;
|
|
423
439
|
/**
|
|
424
440
|
* Resets the grid data while keeping columnDefs and reloads data.
|
|
@@ -429,10 +445,58 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
|
|
|
429
445
|
init(): Promise<void>;
|
|
430
446
|
/** @internal */
|
|
431
447
|
private clearReadyListener;
|
|
448
|
+
/**
|
|
449
|
+
* Whether the infinite row model can drive this resource.
|
|
450
|
+
* @remarks It pages a req/rep by sending CRITERIA_MATCH, ORDER_BY and OFFSET in DETAILS, which
|
|
451
|
+
* a request reply only accepts when it is declared `criteriaOnlyRequest`
|
|
452
|
+
* (`CRITERIA_ONLY_REQUEST` in its metadata). Without it the server expects its inputs in
|
|
453
|
+
* `REQUEST` instead and rejects every block, which on this row model surfaces as a grid that
|
|
454
|
+
* simply never fills. Report it once, up front, as the server-side model does.
|
|
455
|
+
* @returns `true` when the infinite model can be used, `false` after reporting a
|
|
456
|
+
* `resource-type` error.
|
|
457
|
+
* @internal
|
|
458
|
+
*/
|
|
459
|
+
private isInfiniteSupportedForResource;
|
|
432
460
|
/** @internal */
|
|
433
461
|
private onDatasourceReady;
|
|
462
|
+
/**
|
|
463
|
+
* A pushed INSERT/DELETE changes which rows exist or their order, so the change is reported
|
|
464
|
+
* and then the rows are re-read (purge).
|
|
465
|
+
* @internal
|
|
466
|
+
*/
|
|
467
|
+
private handleLiveRowsInvalidated;
|
|
468
|
+
/**
|
|
469
|
+
* A pushed MODIFY is already patched into the paging cache, so the change is reported and the
|
|
470
|
+
* grid only needs to re-render its blocks.
|
|
471
|
+
* @internal
|
|
472
|
+
*/
|
|
473
|
+
private handleLiveRowsUpdated;
|
|
474
|
+
/**
|
|
475
|
+
* Turns a DATASERVER push into the same transaction the client-side datasource reports:
|
|
476
|
+
* partial MODIFY rows are merged into the held row, and a remove carries just the row id.
|
|
477
|
+
* @remarks Unlike the client-side model, a pushed row need not be held here - it may sit
|
|
478
|
+
* beyond the loaded blocks, in which case the grid will never show it.
|
|
479
|
+
*
|
|
480
|
+
* So a pushed INSERT is deliberately not reported: nothing here says where the new row sorts,
|
|
481
|
+
* and reporting an `add` for a row that lands at position 40,000 of an unscrolled grid would
|
|
482
|
+
* contradict the event's contract and leave the row held forever, since no block re-read ever
|
|
483
|
+
* delivers (or withdraws) it. Every INSERT is followed by a purge and re-read, which reports
|
|
484
|
+
* the row as `add` if and when it actually reaches the grid.
|
|
485
|
+
*
|
|
486
|
+
* A MODIFY for a row that is not held is skipped for the same reason; a DELETE is reported by
|
|
487
|
+
* the id it carries, and one that cannot be resolved to an id is skipped with a warning rather
|
|
488
|
+
* than matched against the wrong row.
|
|
489
|
+
* @internal
|
|
490
|
+
*/
|
|
491
|
+
private reportLiveChange;
|
|
434
492
|
destroy(): Promise<void>;
|
|
435
493
|
restart(): Promise<void>;
|
|
494
|
+
/**
|
|
495
|
+
* Forgets every held row and tells consumers, as the client-side datasource does: the grid is
|
|
496
|
+
* dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
|
|
497
|
+
* clears the column definitions.
|
|
498
|
+
* @internal
|
|
499
|
+
*/
|
|
436
500
|
private clearRowData;
|
|
437
501
|
/**
|
|
438
502
|
* Honours `pollTriggerEvents` without polling: a commit ACK for one of the listed events
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infinite.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/infinite.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAC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ortModel: SortModelItem[], re
|
|
|
16
16
|
orderBy: string | null;
|
|
17
17
|
reverse: boolean;
|
|
18
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* Turns whatever a rejected resource read produced into a message worth showing.
|
|
21
|
+
* @remarks Genesis rejects with a message object (`{ ERROR: [{ TEXT }], MESSAGE_TYPE }`), not an
|
|
22
|
+
* `Error`, so stringifying it naively yields "[object Object]" in the grid's error dialog.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function describeResourceError(error: unknown): string;
|
|
19
26
|
/**
|
|
20
27
|
* AG Grid Infinite Row Model datasource implementation.
|
|
21
28
|
* This class implements the IDatasource interface required by AG Grid's Infinite Row Model.
|
|
@@ -30,6 +37,15 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
30
37
|
private rowId;
|
|
31
38
|
private baseCriteria;
|
|
32
39
|
private isRequestServer;
|
|
40
|
+
/**
|
|
41
|
+
* The `order-by` attribute, used when the grid itself is unsorted.
|
|
42
|
+
* @remarks DATASERVER takes the name of an index on the query; REQUEST_SERVER takes a column
|
|
43
|
+
* with the direction inline.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
private defaultOrderBy?;
|
|
47
|
+
/** The `reverse` attribute, applied alongside `defaultOrderBy` on DATASERVER. @internal */
|
|
48
|
+
private defaultReverse;
|
|
33
49
|
private createSnapshotFunc;
|
|
34
50
|
private createDataserverStreamFunc;
|
|
35
51
|
private getMoreRowsFunc;
|
|
@@ -37,17 +53,69 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
37
53
|
* Called when an unsolicited batch changes which rows exist or their order (an INSERT or a
|
|
38
54
|
* DELETE). The cache cannot be patched in place for those - a created row arrives at the end
|
|
39
55
|
* rather than in sort position, and a delete below the delivered watermark is skipped to keep
|
|
40
|
-
* slice offsets stable - so the rows have to be re-read.
|
|
56
|
+
* slice offsets stable - so the rows have to be re-read. Receives the pushed change so the
|
|
57
|
+
* host can report it before the re-read.
|
|
41
58
|
* @internal
|
|
42
59
|
*/
|
|
43
60
|
private onRowsInvalidatedFunc?;
|
|
44
61
|
/**
|
|
45
62
|
* Called when an unsolicited batch only modified rows already held. The cache is patched in
|
|
46
|
-
* place, so the grid just needs to re-render its blocks.
|
|
63
|
+
* place, so the grid just needs to re-render its blocks. Receives the pushed change so the
|
|
64
|
+
* host can report it.
|
|
47
65
|
* @internal
|
|
48
66
|
*/
|
|
49
67
|
private onRowsUpdatedFunc?;
|
|
68
|
+
/**
|
|
69
|
+
* Called with the rows just handed to AG Grid for a block, on either transport. This is the
|
|
70
|
+
* only point at which rows leave the datasource, so it is where the host learns which rows
|
|
71
|
+
* the grid holds (a re-read after a refresh delivers the same rows again).
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
private onRowsDeliveredFunc?;
|
|
75
|
+
/**
|
|
76
|
+
* Called with the ids of rows a re-read of a block no longer returned: they left the grid
|
|
77
|
+
* (deleted on the server, or moved into a block that reports them again).
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
private onRowsWithdrawnFunc?;
|
|
81
|
+
/**
|
|
82
|
+
* Called when a filter or sort change drops every row the grid held, on either transport, so
|
|
83
|
+
* the host forgets them too. AG Grid purges its own cache on those changes.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
private onRowCacheResetFunc?;
|
|
87
|
+
/**
|
|
88
|
+
* Called when the first block comes back with no rows, and when it comes back with rows, so
|
|
89
|
+
* the host can raise the same no-data / loading-finished events the server-side model does.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
private onNoDataAvailableFunc?;
|
|
93
|
+
/** @internal */
|
|
94
|
+
private onDataAvailableFunc?;
|
|
50
95
|
private errorHandlerFunc;
|
|
96
|
+
/** Which rows each delivered block carried, for withdrawal and eviction reporting. @internal */
|
|
97
|
+
private ledger;
|
|
98
|
+
/**
|
|
99
|
+
* Bumped whenever the rows this datasource was reading for are dropped (a teardown, or a
|
|
100
|
+
* filter/sort change). A REQUEST_SERVER reply that resolves for an earlier generation was read
|
|
101
|
+
* for a cache the grid no longer has.
|
|
102
|
+
* @remarks Deliberately a generation rather than a "destroyed" flag: AG Grid calls `destroy()`
|
|
103
|
+
* on the datasource bean it then keeps using (`InfiniteRowModel.start()` re-applies the
|
|
104
|
+
* `datasource` grid option, and `setDatasource` destroys the previous one first), so a sticky
|
|
105
|
+
* flag would disable the instance the grid is still driving.
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
private loadGeneration;
|
|
109
|
+
/**
|
|
110
|
+
* Set once the host has dropped this instance for a replacement (a criteria change, a resource
|
|
111
|
+
* change, teardown). AG Grid keeps calling the bean it was given until the new one is attached,
|
|
112
|
+
* and its purge re-requests blocks immediately, so without this the replaced instance keeps
|
|
113
|
+
* reading with its captured criteria and reporting those rows to the host as delivered.
|
|
114
|
+
* @remarks Distinct from `destroy()`, which AG Grid itself calls on a bean it then keeps using;
|
|
115
|
+
* only the host calls `detach()`, and only when it will never use this instance again.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
private detached;
|
|
51
119
|
/**
|
|
52
120
|
* Max time a DATASERVER block may stay pending before the safety valve resolves it with the
|
|
53
121
|
* rows accumulated so far.
|
|
@@ -70,11 +138,20 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
70
138
|
private dataserverStreamSubscription;
|
|
71
139
|
private sourceRef;
|
|
72
140
|
/**
|
|
73
|
-
* Identifies the CRITERIA_MATCH/ORDER_BY the current
|
|
74
|
-
*
|
|
141
|
+
* Identifies the CRITERIA_MATCH/ORDER_BY the current rows were read with. A change means AG
|
|
142
|
+
* Grid has dropped every block (it purges on filter/sort changes): on DATASERVER the
|
|
143
|
+
* subscription has to be re-opened, as those are DATA_LOGON parameters, and on both transports
|
|
144
|
+
* the host is told its held rows are gone.
|
|
75
145
|
* @internal
|
|
76
146
|
*/
|
|
77
147
|
private subscriptionKey;
|
|
148
|
+
/**
|
|
149
|
+
* Identifies the CRITERIA_MATCH/ORDER_BY the rows the host currently holds were read with.
|
|
150
|
+
* Unlike `subscriptionKey` this survives a subscription teardown, so a filter or sort change
|
|
151
|
+
* is still recognised as one when a live push tore the subscription down first.
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
private rowCacheKey;
|
|
78
155
|
/**
|
|
79
156
|
* Session-cumulative row cache, keyed by row id. A Map preserves insertion order, so the
|
|
80
157
|
* cache can be sliced by block range; Genesis splits batches across messages and later
|
|
@@ -109,8 +186,11 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
109
186
|
createSnapshotFunc: (params?: any) => Promise<RequestServerResult | FilteredDataServerResult>;
|
|
110
187
|
createDataserverStreamFunc?: (params?: any) => SocketObservable<FilteredDataServerResult>;
|
|
111
188
|
getMoreRowsFunc?: (sourceRef: string) => Promise<unknown>;
|
|
112
|
-
onRowsInvalidatedFunc?: () => void;
|
|
113
|
-
onRowsUpdatedFunc?: () => void;
|
|
189
|
+
onRowsInvalidatedFunc?: (change: FilteredDataServerResult) => void;
|
|
190
|
+
onRowsUpdatedFunc?: (change: FilteredDataServerResult) => void;
|
|
191
|
+
onRowsDeliveredFunc?: (rows: any[]) => void;
|
|
192
|
+
onRowsWithdrawnFunc?: (rowIds: string[]) => void;
|
|
193
|
+
onRowCacheResetFunc?: () => void;
|
|
114
194
|
errorHandlerFunc: (message: string, type: string) => void;
|
|
115
195
|
resourceName: string;
|
|
116
196
|
resourceParams: any;
|
|
@@ -120,6 +200,10 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
120
200
|
rowId: string;
|
|
121
201
|
baseCriteria?: string;
|
|
122
202
|
isRequestServer: boolean;
|
|
203
|
+
defaultOrderBy?: string;
|
|
204
|
+
defaultReverse?: boolean;
|
|
205
|
+
onNoDataAvailableFunc?: () => void;
|
|
206
|
+
onDataAvailableFunc?: () => void;
|
|
123
207
|
});
|
|
124
208
|
/**
|
|
125
209
|
* Builds request parameters for REQUEST_SERVER resources.
|
|
@@ -153,6 +237,23 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
153
237
|
* outstanding at once, and each settles as soon as the cache covers its range.
|
|
154
238
|
* @internal
|
|
155
239
|
*/
|
|
240
|
+
/**
|
|
241
|
+
* Notes the CRITERIA_MATCH/ORDER_BY a block is being read with. A change means AG Grid has
|
|
242
|
+
* purged its cache and restarted from block 0: on DATASERVER the subscription is re-opened
|
|
243
|
+
* (those are DATA_LOGON parameters), and on both transports the host is told the rows it held
|
|
244
|
+
* are gone, so the rows read under the new filter or sort are reported as new.
|
|
245
|
+
* @internal
|
|
246
|
+
*/
|
|
247
|
+
/**
|
|
248
|
+
* The sort a block is read with: the grid's own sort model when the user has sorted, and the
|
|
249
|
+
* `order-by` / `reverse` attributes otherwise.
|
|
250
|
+
* @remarks Without the fallback those attributes reached the comms datasource but were then
|
|
251
|
+
* dropped, because the logon builder removes ORDER_BY and REVERSE whenever the grid is
|
|
252
|
+
* unsorted. Sorting from the grid still wins, as it is the more specific instruction.
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
private resolveSortConfig;
|
|
256
|
+
private noteRequestKey;
|
|
156
257
|
private getDataserverRows;
|
|
157
258
|
/**
|
|
158
259
|
* Keeps pulling batches while blocks are still waiting.
|
|
@@ -201,6 +302,19 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
201
302
|
* @internal
|
|
202
303
|
*/
|
|
203
304
|
private settleBlock;
|
|
305
|
+
/**
|
|
306
|
+
* Raises the no-data / data-available hooks for the first block, as the server-side resource
|
|
307
|
+
* does. Later blocks say nothing: the question is whether the resource has any rows at all,
|
|
308
|
+
* and the answer cannot change once the first block has been served.
|
|
309
|
+
* @internal
|
|
310
|
+
*/
|
|
311
|
+
private notifyDataAvailability;
|
|
312
|
+
/**
|
|
313
|
+
* Reports rows handed to the grid for a block, then the rows a re-read of that block no longer
|
|
314
|
+
* carries and the rows whose block the grid evicted.
|
|
315
|
+
* @internal
|
|
316
|
+
*/
|
|
317
|
+
private deliverRows;
|
|
204
318
|
/**
|
|
205
319
|
* Warns when the view filled up before the data ran out.
|
|
206
320
|
* @remarks The server stops sending at MAX_VIEW rows and reports MORE_ROWS false, which is
|
|
@@ -226,6 +340,22 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
226
340
|
* @internal
|
|
227
341
|
*/
|
|
228
342
|
private teardownDataserverSubscription;
|
|
343
|
+
/**
|
|
344
|
+
* Drops the subscription and the cached rows.
|
|
345
|
+
* @remarks AG Grid calls this on the bean it then keeps using (`InfiniteRowModel.start()`
|
|
346
|
+
* re-applies the `datasource` grid option, and `setDatasource` destroys the previous one
|
|
347
|
+
* first), and it can land while a block request is in flight. So it must leave the datasource
|
|
348
|
+
* able to serve that reply and the next `getRows`: it drops the subscription, not the instance.
|
|
349
|
+
*/
|
|
229
350
|
destroy?(): void;
|
|
351
|
+
/**
|
|
352
|
+
* Drops this instance for good: the host is replacing it, so it must stop serving the grid and
|
|
353
|
+
* stop reporting rows, even though AG Grid still holds it as its `datasource` until the
|
|
354
|
+
* replacement is attached.
|
|
355
|
+
* @remarks Deliberately separate from `destroy()`, which AG Grid calls on a bean it then keeps
|
|
356
|
+
* using (`InfiniteRowModel.start()` re-applies the `datasource` grid option, and `setDatasource`
|
|
357
|
+
* destroys the previous one first).
|
|
358
|
+
*/
|
|
359
|
+
detach(): void;
|
|
230
360
|
}
|
|
231
361
|
//# sourceMappingURL=infinite.resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infinite.resource.d.ts","sourceRoot":"","sources":["../../../src/datasource/infinite.resource.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"infinite.resource.d.ts","sourceRoot":"","sources":["../../../src/datasource/infinite.resource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,cAAc,EAEd,mBAAmB,EACnB,gBAAgB,EAEjB,MAA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AAO,CAAC,IAAI,CAAC;IAoGpD;;;;;;OAMG;IACH;;;;;;OAMG;IACH;;;;;;;OAOG;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,cAAc;IA8BtB,OAAO,CAAC,iBAAiB;IAgDzB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAcpB;;;OAGG;YACW,eAAe;IA+B7B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IA2E/B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAwBxB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAO/B,gBAAgB;IAChB,OAAO,CAAC,gBAAgB;IASxB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAwClB,uDAAuD;IACvD,OAAO,CAAC,YAAY;IAWpB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAyCnB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAenB;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAgB3B,gBAAgB;IAChB,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAiBtC;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,IAAI;IAMhB;;;;;;;OAOG;IACH,MAAM,IAAI,IAAI;CAOf"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Datasource, DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
2
|
-
import { JSONSerializer } from '@genesislcap/foundation-utils';
|
|
3
2
|
import { GridProBaseDatasource } from './base.datasource';
|
|
4
3
|
declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
5
4
|
#_container: import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
@@ -387,7 +386,7 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
387
386
|
* @fires base-datasource-connected - Fired when error state is cleared after connection succeeds
|
|
388
387
|
* @fires datasource-loading-finished - Fired when pending stream transactions are flushed with no row changes
|
|
389
388
|
* @fires datasource-no-data-available - Fired when loading finishes with an empty row set
|
|
390
|
-
* @fires datasource-data-changed - Fired when
|
|
389
|
+
* @fires datasource-data-changed - Fired when rows are delivered to the grid, a live stream pushes a change, a poll detects one, or a re-read no longer returns a row; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`
|
|
391
390
|
* @fires cache-filter-config - Fired to persist filter configuration for the grid
|
|
392
391
|
* @fires refresh-server-side - Fired to request a server-side refresh. detail: `RefreshServerSideEventDetail`
|
|
393
392
|
* @fires set-server-side-datasource - Fired to attach or clear the server-side row model datasource
|
|
@@ -398,12 +397,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
398
397
|
* @fires datasource-init - Fired when the server-side grid model should initialize data
|
|
399
398
|
* @fires datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`
|
|
400
399
|
* @fires datasource-filters-restored - Fired when persisted filters are reapplied
|
|
401
|
-
* @fires datasource-data-cleared - Fired when
|
|
400
|
+
* @fires datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`
|
|
402
401
|
* @fires apply-server-side-transaction - Fired to apply a server-side row transaction
|
|
403
402
|
* @fires datasource-ready - Fired when the host grid is ready to start loading data
|
|
404
403
|
*/
|
|
405
404
|
export declare class GridProServerSideDatasource extends GridProServerSideDatasource_base {
|
|
406
|
-
serializer: JSONSerializer;
|
|
407
405
|
pollingDatasource: Datasource;
|
|
408
406
|
/**
|
|
409
407
|
* Enable live updates for the grid.
|
|
@@ -440,6 +438,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
440
438
|
private onDatasourceReady;
|
|
441
439
|
destroy(): Promise<void>;
|
|
442
440
|
restart(): Promise<void>;
|
|
441
|
+
/**
|
|
442
|
+
* Forgets every held row and tells consumers, as the client-side datasource does: the grid is
|
|
443
|
+
* dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
|
|
444
|
+
* clears the column definitions.
|
|
445
|
+
* @internal
|
|
446
|
+
*/
|
|
443
447
|
private clearRowData;
|
|
444
448
|
/**
|
|
445
449
|
* Checks whether the resolved resource can be served through the Server-Side Row Model.
|