@genesislcap/grid-pro 15.50.0 → 15.50.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +128 -42
- package/dist/dts/datasource/dataserver-result.filter.d.ts +12 -0
- package/dist/dts/datasource/dataserver-result.filter.d.ts.map +1 -1
- package/dist/dts/datasource/infinite.resource.d.ts +23 -18
- package/dist/dts/datasource/infinite.resource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts +32 -0
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +26 -6
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/datasource/dataserver-result.filter.js +32 -0
- package/dist/esm/datasource/infinite.resource.js +66 -72
- package/dist/esm/datasource/server-side.resource-base.js +7 -4
- package/dist/esm/datasource/server-side.resource-dataserver.js +84 -12
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +100 -15
- package/dist/grid-pro.d.ts +49 -24
- package/package.json +12 -12
|
@@ -12529,6 +12529,46 @@
|
|
|
12529
12529
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12530
12530
|
}
|
|
12531
12531
|
},
|
|
12532
|
+
{
|
|
12533
|
+
"kind": "field",
|
|
12534
|
+
"name": "_pendingLoadMore",
|
|
12535
|
+
"type": {
|
|
12536
|
+
"text": "number"
|
|
12537
|
+
},
|
|
12538
|
+
"privacy": "private",
|
|
12539
|
+
"default": "0",
|
|
12540
|
+
"description": "How many MORE_ROWS sent by loadMore() are awaiting their reply. @internal",
|
|
12541
|
+
"inheritedFrom": {
|
|
12542
|
+
"name": "GridProGenesisDatasource",
|
|
12543
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12544
|
+
}
|
|
12545
|
+
},
|
|
12546
|
+
{
|
|
12547
|
+
"kind": "field",
|
|
12548
|
+
"name": "_serverMoreRows",
|
|
12549
|
+
"type": {
|
|
12550
|
+
"text": "boolean | undefined"
|
|
12551
|
+
},
|
|
12552
|
+
"privacy": "private",
|
|
12553
|
+
"description": "The latest MORE_ROWS the server sent. @internal",
|
|
12554
|
+
"inheritedFrom": {
|
|
12555
|
+
"name": "GridProGenesisDatasource",
|
|
12556
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12557
|
+
}
|
|
12558
|
+
},
|
|
12559
|
+
{
|
|
12560
|
+
"kind": "field",
|
|
12561
|
+
"name": "_pagingStopped",
|
|
12562
|
+
"type": {
|
|
12563
|
+
"text": "'view-full' | 'stalled' | undefined"
|
|
12564
|
+
},
|
|
12565
|
+
"privacy": "private",
|
|
12566
|
+
"description": "Set when Load More stops short of MORE_ROWS false - see notePagingStatus. @internal",
|
|
12567
|
+
"inheritedFrom": {
|
|
12568
|
+
"name": "GridProGenesisDatasource",
|
|
12569
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12570
|
+
}
|
|
12571
|
+
},
|
|
12532
12572
|
{
|
|
12533
12573
|
"kind": "field",
|
|
12534
12574
|
"name": "_sourceRef",
|
|
@@ -12741,6 +12781,30 @@
|
|
|
12741
12781
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12742
12782
|
}
|
|
12743
12783
|
},
|
|
12784
|
+
{
|
|
12785
|
+
"kind": "method",
|
|
12786
|
+
"name": "emitMoreRowsChanged",
|
|
12787
|
+
"privacy": "private",
|
|
12788
|
+
"parameters": [
|
|
12789
|
+
{
|
|
12790
|
+
"name": "moreRows",
|
|
12791
|
+
"type": {
|
|
12792
|
+
"text": "boolean"
|
|
12793
|
+
}
|
|
12794
|
+
},
|
|
12795
|
+
{
|
|
12796
|
+
"name": "sourceRef",
|
|
12797
|
+
"type": {
|
|
12798
|
+
"text": "string"
|
|
12799
|
+
}
|
|
12800
|
+
}
|
|
12801
|
+
],
|
|
12802
|
+
"description": "Emits `more-rows-changed` when the availability of more rows changes. @internal",
|
|
12803
|
+
"inheritedFrom": {
|
|
12804
|
+
"name": "GridProGenesisDatasource",
|
|
12805
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
12806
|
+
}
|
|
12807
|
+
},
|
|
12744
12808
|
{
|
|
12745
12809
|
"kind": "method",
|
|
12746
12810
|
"name": "updateLoadMoreStatus",
|
|
@@ -16101,16 +16165,6 @@
|
|
|
16101
16165
|
"default": "new Set()",
|
|
16102
16166
|
"description": "Blocks waiting for the cache to reach their range. @internal"
|
|
16103
16167
|
},
|
|
16104
|
-
{
|
|
16105
|
-
"kind": "field",
|
|
16106
|
-
"name": "deliveredRowCount",
|
|
16107
|
-
"type": {
|
|
16108
|
-
"text": "number"
|
|
16109
|
-
},
|
|
16110
|
-
"privacy": "private",
|
|
16111
|
-
"default": "0",
|
|
16112
|
-
"description": "Highest absolute row index already handed to AG Grid. @internal"
|
|
16113
|
-
},
|
|
16114
16168
|
{
|
|
16115
16169
|
"kind": "field",
|
|
16116
16170
|
"name": "streamStarted",
|
|
@@ -16150,16 +16204,6 @@
|
|
|
16150
16204
|
"default": "false",
|
|
16151
16205
|
"description": "Whether the current subscription was opened with a CRITERIA_MATCH. @internal"
|
|
16152
16206
|
},
|
|
16153
|
-
{
|
|
16154
|
-
"kind": "field",
|
|
16155
|
-
"name": "viewTruncationWarned",
|
|
16156
|
-
"type": {
|
|
16157
|
-
"text": "boolean"
|
|
16158
|
-
},
|
|
16159
|
-
"privacy": "private",
|
|
16160
|
-
"default": "false",
|
|
16161
|
-
"description": "So the MAX_VIEW truncation warning is logged once per subscription. @internal"
|
|
16162
|
-
},
|
|
16163
16207
|
{
|
|
16164
16208
|
"kind": "method",
|
|
16165
16209
|
"name": "buildRequestServerParams",
|
|
@@ -16326,29 +16370,14 @@
|
|
|
16326
16370
|
]
|
|
16327
16371
|
},
|
|
16328
16372
|
{
|
|
16329
|
-
"kind": "
|
|
16330
|
-
"name": "
|
|
16331
|
-
"
|
|
16332
|
-
|
|
16333
|
-
"type": {
|
|
16334
|
-
"text": "number"
|
|
16335
|
-
}
|
|
16373
|
+
"kind": "field",
|
|
16374
|
+
"name": "streamEnded",
|
|
16375
|
+
"type": {
|
|
16376
|
+
"text": "boolean"
|
|
16336
16377
|
},
|
|
16337
|
-
"
|
|
16338
|
-
|
|
16339
|
-
|
|
16340
|
-
"type": {
|
|
16341
|
-
"text": "Map<string, any>"
|
|
16342
|
-
}
|
|
16343
|
-
},
|
|
16344
|
-
{
|
|
16345
|
-
"name": "key",
|
|
16346
|
-
"type": {
|
|
16347
|
-
"text": "string"
|
|
16348
|
-
}
|
|
16349
|
-
}
|
|
16350
|
-
],
|
|
16351
|
-
"description": "Position of a key in the cache, or -1. @internal"
|
|
16378
|
+
"privacy": "private",
|
|
16379
|
+
"description": "Whether the stream will deliver no more rows: the data ran out, or paging stopped. @internal",
|
|
16380
|
+
"readonly": true
|
|
16352
16381
|
},
|
|
16353
16382
|
{
|
|
16354
16383
|
"kind": "method",
|
|
@@ -18942,6 +18971,15 @@
|
|
|
18942
18971
|
"default": "false",
|
|
18943
18972
|
"description": "Whether a MORE_ROWS request is awaiting its batch. @internal"
|
|
18944
18973
|
},
|
|
18974
|
+
{
|
|
18975
|
+
"kind": "field",
|
|
18976
|
+
"name": "reportedRowsCount",
|
|
18977
|
+
"type": {
|
|
18978
|
+
"text": "number | undefined"
|
|
18979
|
+
},
|
|
18980
|
+
"privacy": "private",
|
|
18981
|
+
"description": "ROWS_COUNT from the logon batch, when the server sent one. @internal"
|
|
18982
|
+
},
|
|
18945
18983
|
{
|
|
18946
18984
|
"kind": "field",
|
|
18947
18985
|
"name": "dataserverStream",
|
|
@@ -21155,6 +21193,34 @@
|
|
|
21155
21193
|
"privacy": "private",
|
|
21156
21194
|
"default": "false"
|
|
21157
21195
|
},
|
|
21196
|
+
{
|
|
21197
|
+
"kind": "field",
|
|
21198
|
+
"name": "_pendingLoadMore",
|
|
21199
|
+
"type": {
|
|
21200
|
+
"text": "number"
|
|
21201
|
+
},
|
|
21202
|
+
"privacy": "private",
|
|
21203
|
+
"default": "0",
|
|
21204
|
+
"description": "How many MORE_ROWS sent by loadMore() are awaiting their reply. @internal"
|
|
21205
|
+
},
|
|
21206
|
+
{
|
|
21207
|
+
"kind": "field",
|
|
21208
|
+
"name": "_serverMoreRows",
|
|
21209
|
+
"type": {
|
|
21210
|
+
"text": "boolean | undefined"
|
|
21211
|
+
},
|
|
21212
|
+
"privacy": "private",
|
|
21213
|
+
"description": "The latest MORE_ROWS the server sent. @internal"
|
|
21214
|
+
},
|
|
21215
|
+
{
|
|
21216
|
+
"kind": "field",
|
|
21217
|
+
"name": "_pagingStopped",
|
|
21218
|
+
"type": {
|
|
21219
|
+
"text": "'view-full' | 'stalled' | undefined"
|
|
21220
|
+
},
|
|
21221
|
+
"privacy": "private",
|
|
21222
|
+
"description": "Set when Load More stops short of MORE_ROWS false - see notePagingStatus. @internal"
|
|
21223
|
+
},
|
|
21158
21224
|
{
|
|
21159
21225
|
"kind": "field",
|
|
21160
21226
|
"name": "_sourceRef",
|
|
@@ -21332,6 +21398,26 @@
|
|
|
21332
21398
|
}
|
|
21333
21399
|
]
|
|
21334
21400
|
},
|
|
21401
|
+
{
|
|
21402
|
+
"kind": "method",
|
|
21403
|
+
"name": "emitMoreRowsChanged",
|
|
21404
|
+
"privacy": "private",
|
|
21405
|
+
"parameters": [
|
|
21406
|
+
{
|
|
21407
|
+
"name": "moreRows",
|
|
21408
|
+
"type": {
|
|
21409
|
+
"text": "boolean"
|
|
21410
|
+
}
|
|
21411
|
+
},
|
|
21412
|
+
{
|
|
21413
|
+
"name": "sourceRef",
|
|
21414
|
+
"type": {
|
|
21415
|
+
"text": "string"
|
|
21416
|
+
}
|
|
21417
|
+
}
|
|
21418
|
+
],
|
|
21419
|
+
"description": "Emits `more-rows-changed` when the availability of more rows changes. @internal"
|
|
21420
|
+
},
|
|
21335
21421
|
{
|
|
21336
21422
|
"kind": "method",
|
|
21337
21423
|
"name": "updateLoadMoreStatus",
|
|
@@ -14,4 +14,16 @@ import { FilteredDataServerResult, RawDataServerResult } from '@genesislcap/foun
|
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
16
|
export declare function filterDataserverResult(result: RawDataServerResult, rowId: string): FilteredDataServerResult;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a function that resolves the key of the cached row a pushed DATASERVER row refers to.
|
|
19
|
+
* @remarks Under a custom `row-id` a pushed row carries no custom id: GSF sends a DELETE as
|
|
20
|
+
* nothing but `DETAILS: { OPERATION, ROW_REF }`, and a MODIFY as that plus the changed fields.
|
|
21
|
+
* `filterDataserverResult` keeps the `ROW_REF` on every row, so the cached row with the same
|
|
22
|
+
* `ROW_REF` supplies the key. Returns `undefined` when the row matches nothing cached.
|
|
23
|
+
*
|
|
24
|
+
* The `ROW_REF` index is built from `rows` on first use, so resolve a batch's inserts into the
|
|
25
|
+
* cache before resolving its updates and deletes.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function cachedRowKeyResolver(rows: Map<string, any>, rowId: string): (row: any) => string | undefined;
|
|
17
29
|
//# sourceMappingURL=dataserver-result.filter.d.ts.map
|
|
@@ -1 +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"}
|
|
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;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EACtB,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAAG,SAAS,CAqBlC"}
|
|
@@ -52,8 +52,8 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
52
52
|
/**
|
|
53
53
|
* Called when an unsolicited batch changes which rows exist or their order (an INSERT or a
|
|
54
54
|
* DELETE). The cache cannot be patched in place for those - a created row arrives at the end
|
|
55
|
-
* rather than in sort position, and a
|
|
56
|
-
*
|
|
55
|
+
* rather than in sort position, and removing a delivered row would shift the slice offsets of
|
|
56
|
+
* every later block - so the rows have to be re-read. Receives the pushed change so the
|
|
57
57
|
* host can report it before the re-read.
|
|
58
58
|
* @internal
|
|
59
59
|
*/
|
|
@@ -161,12 +161,19 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
161
161
|
private rowData;
|
|
162
162
|
/** Blocks waiting for the cache to reach their range. @internal */
|
|
163
163
|
private pendingBlocks;
|
|
164
|
-
/** Highest absolute row index already handed to AG Grid. @internal */
|
|
165
|
-
private deliveredRowCount;
|
|
166
164
|
/** False until the first message arrives on the subscription. @internal */
|
|
167
165
|
private streamStarted;
|
|
168
166
|
/** MORE_ROWS from the most recent batch. @internal */
|
|
169
167
|
private moreRows;
|
|
168
|
+
/**
|
|
169
|
+
* Set when paging stops short of MORE_ROWS false: the view is full at MAX_VIEW, or a MORE_ROWS
|
|
170
|
+
* came back empty while the view had room (see `DataserverPagingStatus`).
|
|
171
|
+
* @remarks Treated like the end of the data, so the walk stops instead of answering each empty
|
|
172
|
+
* page with another request. A moving view is capped at MAX_VIEW too: past the cap its pages
|
|
173
|
+
* arrive as INSERT+DELETE pairs, and every DELETE re-reads the cache from a fresh logon.
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
private pagingStopped;
|
|
170
177
|
/** Whether a MORE_ROWS request is awaiting its batch. @internal */
|
|
171
178
|
private moreRowsInFlight;
|
|
172
179
|
/**
|
|
@@ -180,8 +187,6 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
180
187
|
private serverRowsCount;
|
|
181
188
|
/** Whether the current subscription was opened with a CRITERIA_MATCH. @internal */
|
|
182
189
|
private hasCriteria;
|
|
183
|
-
/** So the MAX_VIEW truncation warning is logged once per subscription. @internal */
|
|
184
|
-
private viewTruncationWarned;
|
|
185
190
|
constructor(options: {
|
|
186
191
|
createSnapshotFunc: (params?: any) => Promise<RequestServerResult | FilteredDataServerResult>;
|
|
187
192
|
createDataserverStreamFunc?: (params?: any) => SocketObservable<FilteredDataServerResult>;
|
|
@@ -273,6 +278,15 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
273
278
|
* @internal
|
|
274
279
|
*/
|
|
275
280
|
private handleDataserverMessage;
|
|
281
|
+
/**
|
|
282
|
+
* Stops the walk when the view is full at MAX_VIEW (checked by row count, which saves asking for
|
|
283
|
+
* the empty page) or a MORE_ROWS came back empty, and says why.
|
|
284
|
+
* @param emptyReply - Whether this message answered a MORE_ROWS with no rows.
|
|
285
|
+
* @internal
|
|
286
|
+
*/
|
|
287
|
+
private notePagingStatus;
|
|
288
|
+
/** Whether the stream will deliver no more rows: the data ran out, or paging stopped. @internal */
|
|
289
|
+
private get streamEnded();
|
|
276
290
|
/**
|
|
277
291
|
* Reports a server-pushed change to the host so the grid can catch up.
|
|
278
292
|
* @internal
|
|
@@ -286,12 +300,12 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
286
300
|
/** @internal */
|
|
287
301
|
private createBlockTimer;
|
|
288
302
|
/**
|
|
289
|
-
* Merges a batch into the cumulative cache.
|
|
303
|
+
* Merges a batch's INSERT and MODIFY rows into the cumulative cache.
|
|
304
|
+
* @remarks A DELETE never reaches here: any batch carrying one drops the cache instead (see
|
|
305
|
+
* notifyLiveChange), as removing a delivered row would shift the slice of every later block.
|
|
290
306
|
* @internal
|
|
291
307
|
*/
|
|
292
308
|
private accumulate;
|
|
293
|
-
/** Position of a key in the cache, or -1. @internal */
|
|
294
|
-
private cacheIndexOf;
|
|
295
309
|
/**
|
|
296
310
|
* Settles every pending block the cache now covers.
|
|
297
311
|
* @internal
|
|
@@ -315,15 +329,6 @@ export declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
315
329
|
* @internal
|
|
316
330
|
*/
|
|
317
331
|
private deliverRows;
|
|
318
|
-
/**
|
|
319
|
-
* Warns when the view filled up before the data ran out.
|
|
320
|
-
* @remarks The server stops sending at MAX_VIEW rows and reports MORE_ROWS false, which is
|
|
321
|
-
* indistinguishable from the end of the data - the grid would silently show a truncated view
|
|
322
|
-
* and a row count smaller than the resource's. Raising `max-view` past the row count is the
|
|
323
|
-
* fix, so say so rather than leaving it to be discovered.
|
|
324
|
-
* @internal
|
|
325
|
-
*/
|
|
326
|
-
private warnIfViewTruncated;
|
|
327
332
|
/** @internal */
|
|
328
333
|
private failAllPendingBlocks;
|
|
329
334
|
/**
|
|
@@ -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,EAGL,wBAAwB,EAExB,cAAc,EAEd,mBAAmB,EAEnB,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KA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;IACH,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,cAAc;IA8BtB,OAAO,CAAC,iBAAiB;IAgDzB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAcpB;;;OAGG;YACW,eAAe;IA6B7B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAkF/B;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IA2BxB,mGAAmG;IACnG,OAAO,KAAK,WAAW,GAEtB;IAED;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAwBxB;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAO/B,gBAAgB;IAChB,OAAO,CAAC,gBAAgB;IASxB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IA8BlB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;OAGG;IACH,OAAO,CAAC,WAAW;IAsCnB;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAenB,gBAAgB;IAChB,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,OAAO,CAAC,8BAA8B;IAgBtC;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,IAAI;IAMhB;;;;;;;OAOG;IACH,MAAM,IAAI,IAAI;CAOf"}
|
|
@@ -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,
|
|
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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AAmB,IAAI,IAAI;CAGtC"}
|
|
@@ -52,6 +52,19 @@ export declare class DataserverServerSideDatasource extends BaseServerSideDataso
|
|
|
52
52
|
private streamStarted;
|
|
53
53
|
/** Whether a MORE_ROWS request is awaiting its batch. @internal */
|
|
54
54
|
private moreRowsInFlight;
|
|
55
|
+
/**
|
|
56
|
+
* Set when paging stops short of MORE_ROWS false: the view is full at MAX_VIEW, or a MORE_ROWS
|
|
57
|
+
* came back empty while the view had room (see `DataserverPagingStatus`).
|
|
58
|
+
* @remarks Treated like the end of the data, so a block waiting for rows past the view settles
|
|
59
|
+
* at once instead of sitting out the safety valve. A moving view is capped at MAX_VIEW too: past
|
|
60
|
+
* the cap its pages arrive as INSERT+DELETE pairs, and a DELETE of a delivered row leaves the
|
|
61
|
+
* cache out of step with the grid until a re-read refreshes it. A full view that shrinks (rows
|
|
62
|
+
* deleted on the server) pages again, as GSF fills the room on the next MORE_ROWS.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
private pagingStopped;
|
|
66
|
+
/** ROWS_COUNT from the logon batch, when the server sent one. @internal */
|
|
67
|
+
private reportedRowsCount;
|
|
55
68
|
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
56
69
|
dataserverStreamSubscription: SocketSubscription;
|
|
57
70
|
createDataserverStreamFunc: (existingParams?: any) => Promise<SocketObservable<FilteredDataServerResult>>;
|
|
@@ -70,6 +83,25 @@ export declare class DataserverServerSideDatasource extends BaseServerSideDataso
|
|
|
70
83
|
* @internal
|
|
71
84
|
*/
|
|
72
85
|
private dispatchStreamMessage;
|
|
86
|
+
/**
|
|
87
|
+
* Rows the server's view holds, as far as the cache knows: deleted rows kept as tombstones
|
|
88
|
+
* below the delivered watermark have already left it.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
private get viewRowsHeld();
|
|
92
|
+
/**
|
|
93
|
+
* Stops paging when the view is full at MAX_VIEW (checked by row count, which saves asking for
|
|
94
|
+
* the empty page) or a MORE_ROWS came back empty, says why, and pages again once a full view
|
|
95
|
+
* shrinks.
|
|
96
|
+
* @param emptyReply - Whether this message answered a MORE_ROWS with no rows.
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
private notePagingStatus;
|
|
100
|
+
/**
|
|
101
|
+
* Once paging stops the dataset ends where the cache does, so the grid shows no rows past it.
|
|
102
|
+
* @internal
|
|
103
|
+
*/
|
|
104
|
+
protected getCorrectRowCount(params: IServerSideGetRowsParams): number | undefined;
|
|
73
105
|
/**
|
|
74
106
|
* Dataserver-specific sorting setup that validates columns are part of an index.
|
|
75
107
|
* This is required because dataserver needs indexed columns for efficient sorting.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.resource-dataserver.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.resource-dataserver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"server-side.resource-dataserver.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.resource-dataserver.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EAGjB,wBAAwB,EAGxB,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAYvE;;;GAGG;AACH,qBAAa,8BACX,SAAQ,wBACR,YAAW,qBAAqB;IAEhC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAS;IAEzD;;;;OAIG;IACH,OAAO,CAAC,aAAa,CAAgC;IAErD;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB,CAAK;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|
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
137
137
|
setHTMLUnsafe(html: string): void;
|
|
138
138
|
setPointerCapture(pointerId: number): void;
|
|
139
|
-
toggleAttribute(qualifiedName: string, force
|
|
140
|
-
* Sets the columnDefs and rowData for the grid.
|
|
141
|
-
* @remarks Full replace: the snapshot is authoritative. Stream deltas still use `emitDataChanged`.
|
|
142
|
-
* An empty snapshot emits `datasource-no-data-available`; a snapshot with rows emits `datasource-loading-finished`.
|
|
143
|
-
* @internal
|
|
144
|
-
*/: boolean): boolean;
|
|
139
|
+
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
145
140
|
webkitMatchesSelector(selectors: string): boolean;
|
|
146
141
|
textContent: string;
|
|
147
142
|
readonly baseURI: string;
|
|
@@ -427,6 +422,12 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
427
422
|
private requiresFullRowDataAndColDefs;
|
|
428
423
|
private _lastMoreRows;
|
|
429
424
|
private _isMoreRowsResult;
|
|
425
|
+
/** How many MORE_ROWS sent by loadMore() are awaiting their reply. @internal */
|
|
426
|
+
private _pendingLoadMore;
|
|
427
|
+
/** The latest MORE_ROWS the server sent. @internal */
|
|
428
|
+
private _serverMoreRows;
|
|
429
|
+
/** Set when Load More stops short of MORE_ROWS false - see notePagingStatus. @internal */
|
|
430
|
+
private _pagingStopped;
|
|
430
431
|
private _sourceRef;
|
|
431
432
|
private _nextOffset;
|
|
432
433
|
private _loadMoreCount;
|
|
@@ -518,6 +519,25 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
518
519
|
private loadResourceData;
|
|
519
520
|
private handleSnapshot;
|
|
520
521
|
private handleStreamResult;
|
|
522
|
+
/**
|
|
523
|
+
* Counts off one reply to an outstanding loadMore().
|
|
524
|
+
* @returns Whether a loadMore() was awaiting this reply.
|
|
525
|
+
* @internal
|
|
526
|
+
*/
|
|
527
|
+
private takeLoadMoreReply;
|
|
528
|
+
/**
|
|
529
|
+
* Works out whether more rows can be loaded after a stream message.
|
|
530
|
+
* @remarks On DATASERVER, Load More turns off once the view is full at MAX_VIEW, as every
|
|
531
|
+
* further MORE_ROWS would come back empty (see `dataserverPagingStatus`), or after a MORE_ROWS
|
|
532
|
+
* came back empty while the view had room. It turns back on when a full view shrinks, since GSF
|
|
533
|
+
* fills the freed room on the next MORE_ROWS. A moving view never fills, and under VIEW_NUMBER
|
|
534
|
+
* pagination the view is a single page, so both follow MORE_ROWS alone, as REQUEST_SERVER does.
|
|
535
|
+
* @returns Whether more rows can be loaded, or `undefined` before the server has said.
|
|
536
|
+
* @internal
|
|
537
|
+
*/
|
|
538
|
+
private notePagingStatus;
|
|
539
|
+
/** Emits `more-rows-changed` when the availability of more rows changes. @internal */
|
|
540
|
+
private emitMoreRowsChanged;
|
|
521
541
|
/**
|
|
522
542
|
* Updates the status bar based on more rows status
|
|
523
543
|
* @param moreRows - Whether more rows are available
|
|
@@ -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":"AACA,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAYlB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAqB,MAAM,+BAA+B,CAAC;AAwBzF;;GAEG;AACH,UAAU,eAAe;IACvB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;;;;;;;;kBAwB8B,CAAC;;;;;;;;8BA+CN,CAAC,cAAc,CAAC;;;;;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;IACH,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,sBAAsB;IAoE9B,OAAO,CAAC,mBAAmB;YA0Bb,eAAe;IAWtB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAKrC,OAAO,CAAC,iBAAiB;IAQhB,mBAAmB,CAAC,OAAO,QAAK;IAKhC,mBAAmB,CAAC,OAAO,QAAK;IAKzC;;;OAGG;IACM,mBAAmB,CAAC,OAAO,QAAK;IAKzC;;;;;OAKG;cACgB,iBAAiB,IAAI,iBAAiB;IAazD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAQnC;;;;;;OAMG;IACM,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE;IAqBlD;;;OAGG;IACH,OAAO,CAAC,cAAc;IAQb,QAAQ;CA2ClB"}
|
|
@@ -26,3 +26,35 @@ export function filterDataserverResult(result, rowId) {
|
|
|
26
26
|
}) });
|
|
27
27
|
return dataServerResultFilter(withRowRef, rowId);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns a function that resolves the key of the cached row a pushed DATASERVER row refers to.
|
|
31
|
+
* @remarks Under a custom `row-id` a pushed row carries no custom id: GSF sends a DELETE as
|
|
32
|
+
* nothing but `DETAILS: { OPERATION, ROW_REF }`, and a MODIFY as that plus the changed fields.
|
|
33
|
+
* `filterDataserverResult` keeps the `ROW_REF` on every row, so the cached row with the same
|
|
34
|
+
* `ROW_REF` supplies the key. Returns `undefined` when the row matches nothing cached.
|
|
35
|
+
*
|
|
36
|
+
* The `ROW_REF` index is built from `rows` on first use, so resolve a batch's inserts into the
|
|
37
|
+
* cache before resolving its updates and deletes.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export function cachedRowKeyResolver(rows, rowId) {
|
|
41
|
+
const defaultRowId = DatasourceDefaults.DATASERVER_ROW_ID;
|
|
42
|
+
let keysByRowRef;
|
|
43
|
+
return (row) => {
|
|
44
|
+
const key = row === null || row === void 0 ? void 0 : row[rowId];
|
|
45
|
+
if (key !== undefined && key !== null) {
|
|
46
|
+
return key;
|
|
47
|
+
}
|
|
48
|
+
const rowRef = row === null || row === void 0 ? void 0 : row[defaultRowId];
|
|
49
|
+
if (rowId === defaultRowId || rowRef === undefined || rowRef === null) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (!keysByRowRef) {
|
|
53
|
+
keysByRowRef = new Map();
|
|
54
|
+
for (const [cacheKey, cached] of rows) {
|
|
55
|
+
keysByRowRef.set(cached === null || cached === void 0 ? void 0 : cached[defaultRowId], cacheKey);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return keysByRowRef.get(rowRef);
|
|
59
|
+
};
|
|
60
|
+
}
|