@genesislcap/grid-pro 15.24.2 → 15.25.0-FUI-2611.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.
Files changed (39) hide show
  1. package/dist/custom-elements.json +549 -44
  2. package/dist/dts/datasource/base.datasource.d.ts +70 -7
  3. package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
  4. package/dist/dts/datasource/base.types.d.ts +27 -0
  5. package/dist/dts/datasource/base.types.d.ts.map +1 -1
  6. package/dist/dts/datasource/delivered-block.ledger.d.ts +32 -0
  7. package/dist/dts/datasource/delivered-block.ledger.d.ts.map +1 -0
  8. package/dist/dts/datasource/infinite.datasource.d.ts +33 -1
  9. package/dist/dts/datasource/infinite.datasource.d.ts.map +1 -1
  10. package/dist/dts/datasource/infinite.resource.d.ts +75 -6
  11. package/dist/dts/datasource/infinite.resource.d.ts.map +1 -1
  12. package/dist/dts/datasource/server-side.datasource.d.ts +14 -4
  13. package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
  14. package/dist/dts/datasource/server-side.resource-base.d.ts +24 -0
  15. package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
  16. package/dist/dts/datasource/server-side.resource-dataserver.d.ts +26 -0
  17. package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
  18. package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
  19. package/dist/dts/grid-pro-beta.d.ts +6 -0
  20. package/dist/dts/grid-pro-beta.d.ts.map +1 -1
  21. package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts +4 -0
  22. package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts.map +1 -1
  23. package/dist/dts/grid-pro.d.ts.map +1 -1
  24. package/dist/dts/react.d.ts +1 -1
  25. package/dist/esm/datasource/base.datasource.js +177 -23
  26. package/dist/esm/datasource/delivered-block.ledger.js +59 -0
  27. package/dist/esm/datasource/infinite.datasource.js +61 -17
  28. package/dist/esm/datasource/infinite.resource.js +81 -10
  29. package/dist/esm/datasource/server-side.datasource.js +73 -25
  30. package/dist/esm/datasource/server-side.resource-base.js +43 -0
  31. package/dist/esm/datasource/server-side.resource-dataserver.js +77 -17
  32. package/dist/esm/datasource/server-side.resource-reqrep.js +12 -0
  33. package/dist/esm/grid-pro-beta.js +20 -2
  34. package/dist/esm/grid-pro.js +4 -1
  35. package/dist/grid-pro.api.json +35 -35
  36. package/dist/grid-pro.d.ts +228 -17
  37. package/dist/react.cjs +6 -6
  38. package/dist/react.mjs +6 -6
  39. 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?: FullscreenOptions): Promise<void>;
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;
@@ -550,19 +554,78 @@ interface TransactionData {
550
554
  addIndex?: number;
551
555
  }
552
556
  export declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
557
+ serializer: JSONSerializer;
553
558
  protected dataSubWasLoggedOff: boolean;
554
559
  keepColDefsOnClearRowData: boolean;
555
560
  rowData: Map<string, any>;
556
561
  protected transactionData: TransactionData;
562
+ /** So rows without a row id are warned about once per element, not once per block. @internal */
563
+ private missingRowIdWarned;
557
564
  protected connectionSub: Subscription | undefined;
558
565
  protected subscribeToConnection(): void;
559
566
  protected unsubscribeFromConnection(): void;
560
567
  protected generateColumnDefsFromMetadata(fieldsMetadata: FieldMetadata[], getFilterParamsByFieldType: (field: FieldMetadata) => ColDef['filterParams'] | any, getFilterByFieldType: (type: FieldTypeEnum) => string): ColDef[];
561
568
  protected handleStreamInserts(insertedRows: any[], addIndex?: number): void;
569
+ /**
570
+ * Resolves the id of the held row a stream row refers to.
571
+ * @remarks Under a custom `row-id` a DATASERVER push may carry only the default id
572
+ * (`ROW_REF`), so the held row with that default id supplies the custom one. Returns
573
+ * `undefined` when neither id is present - callers skip the row rather than matching
574
+ * `undefined === undefined` against the first held row.
575
+ * @internal
576
+ */
577
+ protected resolveRowId(row: any): string | undefined;
562
578
  protected handleStreamDeletes(deletedRows: any[]): void;
563
579
  protected handleStreamUpdates(updatedRows: any[]): void;
564
580
  protected applyAllTransactions(): void;
565
581
  private applyMappedTransaction;
582
+ /**
583
+ * Reports rows a block-based row model (server-side, infinite) has just handed to the grid.
584
+ * Rows not held before are reported as `add`; rows already held (a block re-read after a
585
+ * refresh, or a req/rep re-read after a commit or poll) are reported as `update` only when
586
+ * their content changed, so a plain re-read is silent.
587
+ * @remarks `rowData` mirrors the rows the grid holds: the resource reports rows a re-read no
588
+ * longer returned (`reportWithdrawnRows`) and blocks the grid evicted from its cache
589
+ * (`forgetRows`), and `clearRowData` empties it when the grid drops its cache.
590
+ * @internal
591
+ */
592
+ protected reportDeliveredRows(rows: any[]): void;
593
+ /**
594
+ * Reports rows a block re-read no longer returned: they left the grid (deleted on the server,
595
+ * or moved into a block that reports them again). Rows already reported removed - a DATASERVER
596
+ * push, say - are skipped.
597
+ * @internal
598
+ */
599
+ protected reportWithdrawnRows(rowIds: string[]): void;
600
+ /**
601
+ * Forgets rows the grid evicted from its block cache. They still exist on the server, so
602
+ * nothing is emitted; a later re-read reports them as `add`, as the grid did not hold them.
603
+ * @internal
604
+ */
605
+ protected forgetRows(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
+ /** Emits `datasource-data-changed` for the current transaction when it is non-empty. @internal */
626
+ protected emitPendingTransaction(): void;
627
+ /** @internal */
628
+ private warnMissingRowIdOnce;
566
629
  /**
567
630
  * Builds the index map used for server-side sorting from the resource's metadata.
568
631
  * @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;AAGvC,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;;;;QAS8C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAoChD,CAAC;4IACO,CAAC;wFAKlC,CAAA;+IAMI,CAAC;;IAMZ;;;OAGG;IACH,CANC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAuB6G,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBAmD/G,CAAC;;;;;;;;;;;;;6BAqBsD,CAAC;8BAG9C,CAAC;kBAEE,CAAC;;oBAEA,CAAC;;sBAIwB,CAAC;oBAErB,CAAC;;;;;;;;gDAaP,CAAA;;;;;;;;;;;;;;;;qBAsB6D,CAAC;;;uBAE5C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA+G1B,CAAH;yBAEuC,CAAC;UACP,GAAG;WAC/B,GAAL;;gBACyC,GAAG;;;;;;;W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AO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,CAAC,CAAC;KACZ;IAaD;;;;OAIG;IACI,4BAA4B,CAAC,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,GAAG,EAAE;CAiExF"}
@@ -32,6 +32,33 @@ 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;
45
+ /**
46
+ * Called with the ids of rows whose block AG Grid evicted from its cache (`maxBlocksInCache`),
47
+ * so the host stops treating them as held. Nothing changed on the server.
48
+ */
49
+ onRowsEvictedFunc?: (rowIds: string[]) => void;
50
+ /**
51
+ * AG Grid's `maxBlocksInCache`, when the consumer set one, so the datasource can mirror the
52
+ * grid's block eviction. Unset means the grid keeps every block.
53
+ */
54
+ maxBlocksInCache?: number;
55
+ /**
56
+ * Whether the host applies pushed INSERTs and DELETEs to the grid as transactions
57
+ * (`live-updates`). The paging subscription receives every push either way; this decides
58
+ * whether the row cache mirrors the grid's re-indexing or treats the grid as a snapshot that
59
+ * only a refresh brings up to date.
60
+ */
61
+ gridReceivesLiveUpdates?: boolean;
35
62
  resourceName: string;
36
63
  resourceParams?: DataserverParams | RequestParams;
37
64
  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,E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EF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,32 @@
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
+ /** Ids of blocks that fell out of the grid's cache with this delivery, and no held block still carries. */
9
+ evictedRowIds: string[];
10
+ };
11
+ /**
12
+ * Tracks which row ids each block has handed to AG Grid, so the host can learn when a re-read of
13
+ * a block no longer returns a row (it left the grid) and when the grid's block cache evicts a
14
+ * block (its rows are no longer held).
15
+ * @remarks Plain class shared by the infinite and SSRM resources - AG Grid does not report either
16
+ * event. Eviction mirrors AG Grid's `maxBlocksInCache`: blocks are kept in delivery order and the
17
+ * least recently delivered one goes first, an approximation of the grid's own LRU.
18
+ * @internal
19
+ */
20
+ export declare class DeliveredBlockLedger {
21
+ private readonly rowId;
22
+ private readonly maxBlocks?;
23
+ /** Row ids per block start row, least recently delivered first. */
24
+ private blocks;
25
+ constructor(rowId: string, maxBlocks?: number);
26
+ /** Records the rows handed to the grid for the block at `startRow`. */
27
+ record(startRow: number, rows: any[]): BlockDeliveryReport;
28
+ /** Forgets every block, for when the grid drops its whole cache (filter/sort change, destroy). */
29
+ clear(): void;
30
+ private isHeld;
31
+ }
32
+ //# 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;IAC1B,2GAA2G;IAC3G,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF;;;;;;;;GAQG;AACH,qBAAa,oBAAoB;IAK7B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAL7B,mEAAmE;IACnE,OAAO,CAAC,MAAM,CAAuC;gBAGlC,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM;IAGrC,uEAAuE;IACvE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,mBAAmB;IAqC1D,kGAAkG;IAClG,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,MAAM;CAQf"}
@@ -398,12 +398,13 @@ 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 infinite row data is cleared. detail: `DataClearedEventDetail`
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`
407
408
  * @fires datasource-filters-restored - Fired when persisted filters are reapplied
408
409
  */
409
410
  export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource_base {
@@ -415,6 +416,8 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
415
416
  private infiniteDatasource;
416
417
  /** Unsubscribes the commit-response listener behind `pollTriggerEvents`. @internal */
417
418
  private commitResponseUnsubscribe?;
419
+ /** The `maxBlocksInCache` the grid was initialised with, so eviction can be mirrored. @internal */
420
+ private maxBlocksInCache?;
418
421
  resourceNameChanged(oldValue: string, newValue: string): void;
419
422
  criteriaChanged(oldCriteria: string, newCriteria: string): void;
420
423
  connectedCallback(): void;
@@ -431,8 +434,37 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
431
434
  private clearReadyListener;
432
435
  /** @internal */
433
436
  private onDatasourceReady;
437
+ /**
438
+ * A pushed INSERT/DELETE changes which rows exist or their order, so the change is reported
439
+ * and then the rows are re-read (purge).
440
+ * @internal
441
+ */
442
+ private handleLiveRowsInvalidated;
443
+ /**
444
+ * A pushed MODIFY is already patched into the paging cache, so the change is reported and the
445
+ * grid only needs to re-render its blocks.
446
+ * @internal
447
+ */
448
+ private handleLiveRowsUpdated;
449
+ /**
450
+ * Turns a DATASERVER push into the same transaction the client-side datasource reports:
451
+ * inserts of held rows become updates, partial MODIFY rows are merged into the held row, and
452
+ * a remove carries just the row id.
453
+ * @remarks Unlike the client-side model, a pushed row need not be held here - it may sit
454
+ * beyond the loaded blocks. A MODIFY for such a row is not reported (the block that delivers
455
+ * it reports it as `add`); a DELETE is reported by the id it carries, and one that cannot be
456
+ * resolved to an id is skipped with a warning rather than matched against the wrong row.
457
+ * @internal
458
+ */
459
+ private reportLiveChange;
434
460
  destroy(): Promise<void>;
435
461
  restart(): Promise<void>;
462
+ /**
463
+ * Forgets every held row and tells consumers, as the client-side datasource does: the grid is
464
+ * dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
465
+ * clears the column definitions.
466
+ * @internal
467
+ */
436
468
  private clearRowData;
437
469
  /**
438
470
  * 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,EACL,OAAO,EACP,aAAa,EACb,UAAU,EAOX,MAAM,+BAA+B,CAAC;AAcvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;;;;;;;;kBA2CvB,CAAC;;;;;;;;8BA8ChC,CAAC,cAGC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAwB8E,CAAC;4IAGvE,CAAC;wFAKP,CAAC;+IAMM,CAAC;2FAKf,CAAD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA8BK,CAAD;;;;;;;;;;;;;;;;;;;;;;;mBA2D+B,CAAC;;;;;;;;;;;;;6BAaf,CAAC;8BAEf,CAAD;kBACM,CAAC;;oBAEC,CAAC;;sBAEW,CAAC;oBAEnB,CAAC;;;;;;;;gDAYiF,CAAC;;;;;;;;;;;;;;;;;;uBAkB1E,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAsG6C,CAAC;yBACR,CAAC;UAC1C,GAAG;WAAgD,GAAG;;gBACjB,GAAE;;;;;;;WAQV,GAAG;YACzC,GAAE;;;;;;;;;;;oBA2BkC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMu1N,CAAC;cAA6F,CAAC;eAA8F,CAAC;gBAA+F,CAAC;;;;;;;;;;;;;;SAAulC,CAAC;;;iBAA+E,CAAC;;AA9Z30Q;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,qBAGa,yBAA0B,SAAQ,8BAAqC;IACzE,OAAO,EAAG,OAAO,CA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;IACG,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBnC,IAAI;IAwDV,gBAAgB;IAChB,OAAO,CAAC,kBAAkB;IAI1B,gBAAgB;IAChB,OAAO,CAAC,iBAAiB,CAyEvB;IAEF;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAOjC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAO7B;;;;;;;;;OASG;IACH,OAAO,CAAC,gBAAgB;IAUT,OAAO;IAsBP,OAAO;IAKtB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IASpB;;;;;;;OAOG;IACH,OAAO,CAAC,2BAA2B;IAkBnC,qEAAqE;IACrE,OAAO,CAAC,8BAA8B;IAKtC;;;;OAIG;YACW,cAAc;IAO5B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;YAchB,eAAe;IAsCpB,QAAQ;CAMlB"}
@@ -37,17 +37,57 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
37
37
  * Called when an unsolicited batch changes which rows exist or their order (an INSERT or a
38
38
  * DELETE). The cache cannot be patched in place for those - a created row arrives at the end
39
39
  * 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.
40
+ * slice offsets stable - so the rows have to be re-read. Receives the pushed change so the
41
+ * host can report it before the re-read.
41
42
  * @internal
42
43
  */
43
44
  private onRowsInvalidatedFunc?;
44
45
  /**
45
46
  * 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.
47
+ * place, so the grid just needs to re-render its blocks. Receives the pushed change so the
48
+ * host can report it.
47
49
  * @internal
48
50
  */
49
51
  private onRowsUpdatedFunc?;
52
+ /**
53
+ * Called with the rows just handed to AG Grid for a block, on either transport. This is the
54
+ * only point at which rows leave the datasource, so it is where the host learns which rows
55
+ * the grid holds (a re-read after a refresh delivers the same rows again).
56
+ * @internal
57
+ */
58
+ private onRowsDeliveredFunc?;
59
+ /**
60
+ * Called with the ids of rows a re-read of a block no longer returned: they left the grid
61
+ * (deleted on the server, or moved into a block that reports them again).
62
+ * @internal
63
+ */
64
+ private onRowsWithdrawnFunc?;
65
+ /**
66
+ * Called with the ids of rows whose block the grid evicted from its cache (`maxBlocksInCache`),
67
+ * so the host stops treating them as held.
68
+ * @internal
69
+ */
70
+ private onRowsEvictedFunc?;
71
+ /**
72
+ * Called when a filter or sort change drops every row the grid held, on either transport, so
73
+ * the host forgets them too. AG Grid purges its own cache on those changes.
74
+ * @internal
75
+ */
76
+ private onRowCacheResetFunc?;
50
77
  private errorHandlerFunc;
78
+ /** Which rows each delivered block carried, for withdrawal and eviction reporting. @internal */
79
+ private ledger;
80
+ /**
81
+ * Bumped whenever the rows this datasource was reading for are dropped (a teardown, or a
82
+ * filter/sort change). A REQUEST_SERVER reply that resolves for an earlier generation was read
83
+ * for a cache the grid no longer has.
84
+ * @remarks Deliberately a generation rather than a "destroyed" flag: AG Grid calls `destroy()`
85
+ * on the datasource bean it then keeps using (`InfiniteRowModel.start()` re-applies the
86
+ * `datasource` grid option, and `setDatasource` destroys the previous one first), so a sticky
87
+ * flag would disable the instance the grid is still driving.
88
+ * @internal
89
+ */
90
+ private loadGeneration;
51
91
  /**
52
92
  * Max time a DATASERVER block may stay pending before the safety valve resolves it with the
53
93
  * rows accumulated so far.
@@ -70,8 +110,10 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
70
110
  private dataserverStreamSubscription;
71
111
  private sourceRef;
72
112
  /**
73
- * Identifies the CRITERIA_MATCH/ORDER_BY the current subscription was opened with; a change
74
- * means the subscription has to be re-opened, as those are DATA_LOGON parameters.
113
+ * Identifies the CRITERIA_MATCH/ORDER_BY the current rows were read with. A change means AG
114
+ * Grid has dropped every block (it purges on filter/sort changes): on DATASERVER the
115
+ * subscription has to be re-opened, as those are DATA_LOGON parameters, and on both transports
116
+ * the host is told its held rows are gone.
75
117
  * @internal
76
118
  */
77
119
  private subscriptionKey;
@@ -109,14 +151,20 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
109
151
  createSnapshotFunc: (params?: any) => Promise<RequestServerResult | FilteredDataServerResult>;
110
152
  createDataserverStreamFunc?: (params?: any) => SocketObservable<FilteredDataServerResult>;
111
153
  getMoreRowsFunc?: (sourceRef: string) => Promise<unknown>;
112
- onRowsInvalidatedFunc?: () => void;
113
- onRowsUpdatedFunc?: () => void;
154
+ onRowsInvalidatedFunc?: (change: FilteredDataServerResult) => void;
155
+ onRowsUpdatedFunc?: (change: FilteredDataServerResult) => void;
156
+ onRowsDeliveredFunc?: (rows: any[]) => void;
157
+ onRowsWithdrawnFunc?: (rowIds: string[]) => void;
158
+ onRowsEvictedFunc?: (rowIds: string[]) => void;
159
+ onRowCacheResetFunc?: () => void;
114
160
  errorHandlerFunc: (message: string, type: string) => void;
115
161
  resourceName: string;
116
162
  resourceParams: any;
117
163
  resourceIndexes: Map<string, string[]>;
118
164
  resourceColDefs: MetadataDetail[];
119
165
  maxRows: number;
166
+ /** AG Grid's `maxBlocksInCache`, so eviction can be mirrored; unset keeps every block. */
167
+ maxBlocksInCache?: number;
120
168
  rowId: string;
121
169
  baseCriteria?: string;
122
170
  isRequestServer: boolean;
@@ -153,6 +201,14 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
153
201
  * outstanding at once, and each settles as soon as the cache covers its range.
154
202
  * @internal
155
203
  */
204
+ /**
205
+ * Notes the CRITERIA_MATCH/ORDER_BY a block is being read with. A change means AG Grid has
206
+ * purged its cache and restarted from block 0: on DATASERVER the subscription is re-opened
207
+ * (those are DATA_LOGON parameters), and on both transports the host is told the rows it held
208
+ * are gone, so the rows read under the new filter or sort are reported as new.
209
+ * @internal
210
+ */
211
+ private noteRequestKey;
156
212
  private getDataserverRows;
157
213
  /**
158
214
  * Keeps pulling batches while blocks are still waiting.
@@ -201,6 +257,12 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
201
257
  * @internal
202
258
  */
203
259
  private settleBlock;
260
+ /**
261
+ * Reports rows handed to the grid for a block, then the rows a re-read of that block no longer
262
+ * carries and the rows whose block the grid evicted.
263
+ * @internal
264
+ */
265
+ private deliverRows;
204
266
  /**
205
267
  * Warns when the view filled up before the data ran out.
206
268
  * @remarks The server stops sending at MAX_VIEW rows and reports MORE_ROWS false, which is
@@ -226,6 +288,13 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
226
288
  * @internal
227
289
  */
228
290
  private teardownDataserverSubscription;
291
+ /**
292
+ * Drops the subscription and the cached rows.
293
+ * @remarks AG Grid calls this on the bean it then keeps using (`InfiniteRowModel.start()`
294
+ * re-applies the `datasource` grid option, and `setDatasource` destroys the previous one
295
+ * first), and it can land while a block request is in flight. So it must leave the datasource
296
+ * able to serve that reply and the next `getRows`: it drops the subscription, not the instance.
297
+ */
229
298
  destroy?(): void;
230
299
  }
231
300
  //# 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,EAEL,wBAAwB,EAExB,cAAc,EAEd,mBAAmB,EACnB,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIpF;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,aAAa,EAAE,EAC1B,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACtC,eAAe,UAAQ,GACtB;IAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA8B9C;AAeD;;;GAGG;AACH,qBAAa,yBAA0B,YAAW,WAAW;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO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AA0B;IAyBlC;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAelB;;;OAGG;IACG,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAgFpD;;;;;;OAMG;IACH;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAiBtB,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;IAwCnB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAanB;;;;;;;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;CAKjB"}
@@ -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 row data changes from applied stream transactions. detail: `DataChangedEventDetail`
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,13 +397,18 @@ 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 server-side row data is cleared. detail: `DataClearedEventDetail`
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;
406
+ /**
407
+ * The `maxBlocksInCache` the consumer gave the grid, if any, so block eviction can be mirrored
408
+ * in the held-row bookkeeping. The server-side defaults set none, so AG Grid keeps every block.
409
+ * @internal
410
+ */
411
+ private get gridMaxBlocksInCache();
408
412
  /**
409
413
  * Enable live updates for the grid.
410
414
  * @remarks Only works with DATASERVER resources (StreamDatasource) right now.
@@ -440,6 +444,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
440
444
  private onDatasourceReady;
441
445
  destroy(): Promise<void>;
442
446
  restart(): Promise<void>;
447
+ /**
448
+ * Forgets every held row and tells consumers, as the client-side datasource does: the grid is
449
+ * dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
450
+ * clears the column definitions.
451
+ * @internal
452
+ */
443
453
  private clearRowData;
444
454
  /**
445
455
  * Checks whether the resolved resource can be served through the Server-Side Row Model.
@@ -1 +1 @@
1
- {"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,iBAAiB,EAWlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAY/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;;;;;;;;kBAqC9B,CAAC;;;;;;;;8BAmCM,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAkCW,CAAC;4IAMR,CAAC;wFAGT,CAAC;+IAMG,CAAC;2FAIhC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAsByB,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBA+DlC,CAAC;;;;;;;;;;;;;6BAsB+C,CAAC;8BAIrD,CAAC;kBAEK,CAAC;;oBAEV,CAAH;;sBAK6C,CAAC;oBAGtC,CAAC;;;;;;;;gDAc+B,CAAC;;;;;;;;;;;;;;;;;;uBAqBK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAiGM,CAAC;yBACb,CAAC;UACxC,GAAG;WAAgD,GAAG;;gBAClB,GAAE;;;;;;;WAMxC,GAAA;YAE4B,GAAG;;;;;;;;;;;oBAgCf,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AmBpB,QAAQ;CAGlB"}
@@ -2,6 +2,7 @@ import { IServerSideDatasource, LoadSuccessParams, SetFilterModel, SortModelItem
2
2
  import { Auth, Connect, MetadataDetail, DatasourceOptions } from '@genesislcap/foundation-comms';
3
3
  import { UUID } from '@genesislcap/foundation-utils';
4
4
  import { ServerSideDatasourceOptions } from './base.types';
5
+ import { DeliveredBlockLedger } from './delivered-block.ledger';
5
6
  /**
6
7
  * Base class for server-side resource datasources used in Grid Pro SSRM implementations.
7
8
  * Provides common logic for filtering, sorting, and infinite-scroll row counting.
@@ -18,6 +19,17 @@ export declare abstract class BaseServerSideDatasource implements IServerSideDat
18
19
  errorHandlerFunc: (message: string, type: string) => void;
19
20
  protected onNoDataAvailableFunc?: () => void;
20
21
  protected onDataAvailableFunc?: () => void;
22
+ protected onRowsDeliveredFunc?: (rows: any[]) => void;
23
+ protected onRowsWithdrawnFunc?: (rowIds: string[]) => void;
24
+ protected onRowsEvictedFunc?: (rowIds: string[]) => void;
25
+ /** Which rows each delivered block carried, for withdrawal and eviction reporting. @internal */
26
+ protected ledger: DeliveredBlockLedger;
27
+ /**
28
+ * Bumped whenever the rows the grid holds are dropped (destroy, refresh, reload). A req/rep
29
+ * reply that resolves for an earlier generation belongs to a cache the grid no longer has.
30
+ * @internal
31
+ */
32
+ protected loadGeneration: number;
21
33
  protected resourceName: string;
22
34
  resourceParams: any;
23
35
  protected resourceIndexes: Map<string, string[]>;
@@ -82,6 +94,12 @@ export declare abstract class BaseServerSideDatasource implements IServerSideDat
82
94
  */
83
95
  protected setupFilteringAndSorting(params: IServerSideGetRowsParams): Promise<void>;
84
96
  destroy?(): void;
97
+ /**
98
+ * Marks every block request still in flight as stale: the grid is dropping the cache they were
99
+ * read for, so their replies must not be handed to the host as held rows.
100
+ * @internal
101
+ */
102
+ invalidatePendingLoads(): void;
85
103
  refreshDatasource(params: DatasourceOptions): Promise<void>;
86
104
  private updateResourceParams;
87
105
  protected getOrderByAndToBeSortedColIds(map: any, searchValue: any): {
@@ -104,6 +122,12 @@ export declare abstract class BaseServerSideDatasource implements IServerSideDat
104
122
  protected getCorrectRowCount(params: IServerSideGetRowsParams<any, any>): any;
105
123
  /** Completes an SSRM request with zero rows and invokes `onNoDataAvailableFunc` on the first block only. @internal */
106
124
  protected completeEmptyResult(params: IServerSideGetRowsParams): void;
125
+ /**
126
+ * Reports rows handed to the grid for the block at `startRow`, then the rows a re-read of that
127
+ * block no longer carries and the rows whose block the grid evicted.
128
+ * @internal
129
+ */
130
+ protected deliverRows(startRow: number, rows: any[] | undefined): void;
107
131
  /** Invokes `onNoDataAvailableFunc` when the first SSRM block has no rows. @internal */
108
132
  protected notifyNoDataAvailableIfEmpty(params: IServerSideGetRowsParams, successRowData: LoadSuccessParams): void;
109
133
  protected notifyNoDataAvailable(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"server-side.resource-base.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.resource-base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAQ3D;;;;;GAKG;AACH,8BAAsB,wBAAyB,YAAW,qBAAqB;IACvE,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IACrB,IAAI,EAAG,IAAI,CAAC;IAElB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAa;IAEtC,sBAAsB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,gBAA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AAI;IAWrE,uFAAuF;IACvF,SAAS,CAAC,4BAA4B,CACpC,MAAM,EAAE,wBAAwB,EAChC,cAAc,EAAE,iBAAiB,GAChC,IAAI;IAWP,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAIvC,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAGtC"}
1
+ {"version":3,"file":"server-side.resource-base.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.resource-base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAQhE;;;;;GAKG;AACH,8BAAsB,wBAAyB,YAAW,qBAAqB;IACvE,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IACrB,IAAI,EAAG,IAAI,CAAC;IAElB,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAa;IAEtC,sBAAsB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,SAAS,CAAC,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7C,SAAS,CAAC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3C,SAAS,CAAC,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,E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,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,CAAC,GAAG,EAAE,GAAG,CAAC;IAyBvE,sHAAsH;IACtH,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI;IAcrE;;;;OAIG;IACH,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,SAAS,GAAG,IAAI;IActE,uFAAuF;IACvF,SAAS,CAAC,4BAA4B,CACpC,MAAM,EAAE,wBAAwB,EAChC,cAAc,EAAE,iBAAiB,GAChC,IAAI;IAWP,SAAS,CAAC,qBAAqB,IAAI,IAAI;IAIvC,SAAS,CAAC,mBAAmB,IAAI,IAAI;CAGtC"}
@@ -26,6 +26,30 @@ export declare class DataserverServerSideDatasource extends BaseServerSideDataso
26
26
  * @internal
27
27
  */
28
28
  private deliveredRowCount;
29
+ /**
30
+ * Ids of rows the server deleted that stay in the cache because the grid was not told
31
+ * (`live-updates` off) and they sit below the delivered watermark - see
32
+ * handleCurrentStreamLoad. They are not reported to the host as rows the grid holds, and
33
+ * their presence marks the cache out of step, so a re-read purges rather than serves them.
34
+ * @internal
35
+ */
36
+ private retainedDeletedRowIds;
37
+ /**
38
+ * Set when the cache holds a change the grid's rows do not reflect (a tombstoned DELETE). The
39
+ * blocks AG Grid holds are still consistent with what it was given, but a re-read of one of
40
+ * them must not be served from the cache: it would hand back stale content, so the datasource
41
+ * refreshes instead and the grid re-reads everything from the server.
42
+ * @internal
43
+ */
44
+ private cacheOutOfStep;
45
+ /**
46
+ * Whether the host applies pushed INSERTs/DELETEs to the grid as transactions. When it does,
47
+ * the cache mirrors the grid's re-indexing (a DELETE drops the row, a pushed INSERT goes to
48
+ * the top, where the grid puts it); when it does not, the grid is a snapshot, so the cache
49
+ * keeps the positions the grid has and defers the change to the next refresh.
50
+ * @internal
51
+ */
52
+ private gridReceivesLiveUpdates;
29
53
  dataserverStream: SocketObservable<FilteredDataServerResult>;
30
54
  dataserverStreamSubscription: SocketSubscription;
31
55
  createDataserverStreamFunc: (existingParams?: any) => Promise<SocketObservable<FilteredDataServerResult>>;
@@ -51,5 +75,7 @@ export declare class DataserverServerSideDatasource extends BaseServerSideDataso
51
75
  protected setupSorting(params: IServerSideGetRowsParams): Promise<boolean>;
52
76
  destroy(): Promise<void>;
53
77
  private handleCurrentStreamLoad;
78
+ /** Position of a key in the cache's insertion order. @internal */
79
+ private cacheIndexOf;
54
80
  }
55
81
  //# sourceMappingURL=server-side.resource-dataserver.d.ts.map