@genesislcap/grid-pro 14.501.0 → 15.0.0-FUI-2567.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 (52) hide show
  1. package/dist/custom-elements.json +1069 -1673
  2. package/dist/dts/datasource/base.datasource.d.ts +0 -1
  3. package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
  4. package/dist/dts/datasource/base.types.d.ts +0 -1
  5. package/dist/dts/datasource/base.types.d.ts.map +1 -1
  6. package/dist/dts/datasource/client-side.datasource.d.ts +1 -1
  7. package/dist/dts/datasource/server-side.datasource.d.ts +1 -2
  8. package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
  9. package/dist/dts/datasource/server-side.resource-base.d.ts +1 -10
  10. package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
  11. package/dist/dts/datasource/server-side.resource-dataserver.d.ts +1 -2
  12. package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
  13. package/dist/dts/datasource/server-side.resource-reqrep.d.ts +2 -2
  14. package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
  15. package/dist/dts/grid-pro-beta.d.ts +1 -23
  16. package/dist/dts/grid-pro-beta.d.ts.map +1 -1
  17. package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts +1 -7
  18. package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts.map +1 -1
  19. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +1 -1
  20. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
  21. package/dist/dts/grid-pro.d.ts +1 -23
  22. package/dist/dts/grid-pro.d.ts.map +1 -1
  23. package/dist/dts/grid-pro.types.d.ts +0 -1
  24. package/dist/dts/grid-pro.types.d.ts.map +1 -1
  25. package/dist/dts/react.d.ts +49 -49
  26. package/dist/dts/status-bar-components/index.d.ts +0 -1
  27. package/dist/dts/status-bar-components/index.d.ts.map +1 -1
  28. package/dist/dts/status-bar-components/load-more.status-bar.d.ts +0 -2
  29. package/dist/dts/status-bar-components/load-more.status-bar.d.ts.map +1 -1
  30. package/dist/dts/status-bar-components/row-count.status-bar.d.ts +1 -2
  31. package/dist/dts/status-bar-components/row-count.status-bar.d.ts.map +1 -1
  32. package/dist/esm/datasource/base.datasource.js +1 -1
  33. package/dist/esm/datasource/client-side.datasource.js +1 -1
  34. package/dist/esm/datasource/server-side.datasource.js +3 -13
  35. package/dist/esm/datasource/server-side.resource-base.js +1 -26
  36. package/dist/esm/datasource/server-side.resource-dataserver.js +25 -150
  37. package/dist/esm/datasource/server-side.resource-reqrep.js +10 -37
  38. package/dist/esm/grid-pro-beta.js +8 -52
  39. package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +2 -4
  40. package/dist/esm/grid-pro.js +8 -52
  41. package/dist/esm/grid-pro.types.js +0 -1
  42. package/dist/esm/status-bar-components/index.js +0 -1
  43. package/dist/esm/status-bar-components/load-more.status-bar.js +5 -19
  44. package/dist/esm/status-bar-components/row-count.status-bar.js +1 -2
  45. package/dist/grid-pro.api.json +12 -430
  46. package/dist/grid-pro.d.ts +7 -96
  47. package/dist/react.cjs +30 -30
  48. package/dist/react.mjs +25 -25
  49. package/package.json +14 -14
  50. package/dist/dts/status-bar-components/pagination.status-bar.d.ts +0 -32
  51. package/dist/dts/status-bar-components/pagination.status-bar.d.ts.map +0 -1
  52. package/dist/esm/status-bar-components/pagination.status-bar.js +0 -238
@@ -1 +1 @@
1
- {"version":3,"file":"load-more.status-bar.d.ts","sourceRoot":"","sources":["../../../src/status-bar-components/load-more.status-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;GAGG;AACH,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,OAAO,CAAM;IAErB,OAAO,CAAC,YAAY,CAA8B;IAElD,IAAI,CAAC,MAAM,EAAE,kBAAkB;IA4C/B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,oBAAoB;IAmD5B;;OAEG;IACH,OAAO,CAAC,eAAe;IAoBvB;;OAEG;IACH,OAAO,CAAC,WAAW;IA0BZ,sBAAsB;IAyBtB,YAAY,CAAC,MAAM,EAAE,uBAAuB;IAkBnD,MAAM,IAAI,WAAW;IAIrB,OAAO;CAMR"}
1
+ {"version":3,"file":"load-more.status-bar.d.ts","sourceRoot":"","sources":["../../../src/status-bar-components/load-more.status-bar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF;;;GAGG;AACH,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,SAAS,CAAkB;IAEnC,OAAO,CAAC,YAAY,CAA8B;IAElD,IAAI,CAAC,MAAM,EAAE,kBAAkB;IAiC/B,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,oBAAoB;IAmD5B;;OAEG;IACH,OAAO,CAAC,eAAe;IAoBvB;;OAEG;IACH,OAAO,CAAC,WAAW;IA0BZ,sBAAsB;IAyBtB,YAAY,CAAC,MAAM,EAAE,uBAAuB;IAkBnD,MAAM,IAAI,WAAW;IAIrB,OAAO;CAMR"}
@@ -1,8 +1,7 @@
1
1
  import { IStatusPanelComp, IStatusPanelParams } from 'ag-grid-community';
2
2
  /**
3
3
  * Row Count Status Bar Component for Server-Side Infinite Scroll
4
- * Displays current row count information for server-side grids without pagination.
5
- * For pagination scenarios, use PaginationStatusBarComponent instead.
4
+ * Displays current row count information for server-side grids.
6
5
  * @public
7
6
  */
8
7
  export declare class RowCountStatusBarComponent implements IStatusPanelComp {
@@ -1 +1 @@
1
- {"version":3,"file":"row-count.status-bar.d.ts","sourceRoot":"","sources":["../../../src/status-bar-components/row-count.status-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAW,MAAM,mBAAmB,CAAC;AAElF;;;;;GAKG;AACH,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,GAAG,CAAU;IACrB,OAAO,CAAC,eAAe,CAAc;IACrC,OAAO,CAAC,mBAAmB,CAAa;IAExC,IAAI,CAAC,MAAM,EAAE,kBAAkB;IA6B/B,OAAO,CAAC,aAAa;IAsBrB,MAAM,IAAI,WAAW;IAIrB,OAAO;CAQR"}
1
+ {"version":3,"file":"row-count.status-bar.d.ts","sourceRoot":"","sources":["../../../src/status-bar-components/row-count.status-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAW,MAAM,mBAAmB,CAAC;AAElF;;;;GAIG;AACH,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,GAAG,CAAU;IACrB,OAAO,CAAC,eAAe,CAAc;IACrC,OAAO,CAAC,mBAAmB,CAAa;IAExC,IAAI,CAAC,MAAM,EAAE,kBAAkB;IA6B/B,OAAO,CAAC,aAAa;IAsBrB,MAAM,IAAI,WAAW;IAIrB,OAAO;CAQR"}
@@ -640,7 +640,7 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
640
640
  additionalPanels.push({
641
641
  statusPanel: GridProStatusBarTypes.loadMore,
642
642
  statusPanelParams: loadMoreParams,
643
- align: this.pagination ? 'left' : 'right',
643
+ align: 'right',
644
644
  });
645
645
  }
646
646
  // Extract reload configuration
@@ -20,7 +20,7 @@ import { GridProGenesisDatasource } from '../grid-pro-genesis-datasource';
20
20
  * @fires datasource-data-loaded - Fired when a data payload is loaded for the grid. detail: `DataLoadedEventDetail`
21
21
  * @fires datasource-loading-started - Fired when a load or refresh starts
22
22
  * @fires datasource-more-data-available - Fired when more server rows can be requested. detail: `MoreDataAvailableEventDetail`
23
- * @fires datasource-ready - Fired when the host grid is ready (detail includes pagination state). detail: `DatasourceReadyEventDetail`
23
+ * @fires datasource-ready - Fired when the host grid is ready to start loading data
24
24
  * @fires datasource-init - Fired when initial grid data is ready for the client-side model
25
25
  * @fires more-rows-changed - Fired when MORE_ROWS availability changes. detail: `MoreRowsDetail`
26
26
  * @fires datasource-size-changed - Fired when layout or viewport sizing affects the datasource. detail: `GrigProGenesisDatasourceSizeChangedEventDetail`
@@ -83,7 +83,7 @@ const serverSideSortIndicatorCSS = `
83
83
  * @fires datasource-filters-restored - Fired when persisted filters are reapplied
84
84
  * @fires datasource-data-cleared - Fired when server-side row data is cleared. detail: `DataClearedEventDetail`
85
85
  * @fires apply-server-side-transaction - Fired to apply a server-side row transaction
86
- * @fires datasource-ready - Fired when the host grid is ready (detail includes pagination state). detail: `DatasourceReadyEventDetail`
86
+ * @fires datasource-ready - Fired when the host grid is ready to start loading data
87
87
  */
88
88
  let GridProServerSideDatasource = class GridProServerSideDatasource extends LifecycleMixin(GridProBaseDatasource) {
89
89
  constructor() {
@@ -265,15 +265,13 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
265
265
  resizable: true,
266
266
  sortable: false,
267
267
  unSortIcon: true,
268
- }, rowBuffer: 0, rowModelType: 'serverSide', suppressServerSideInfiniteScroll: false, suppressMultiSort: true, onFilterChanged: (params) => { }, onSortChanged: (params) => { }, onPaginationChanged: (event) => this.onPaginationChanged(event) }, this.deferredGridOptions);
268
+ }, rowBuffer: 0, rowModelType: 'serverSide', suppressServerSideInfiniteScroll: false, suppressMultiSort: true, onFilterChanged: (params) => { }, onSortChanged: (params) => { } }, this.deferredGridOptions);
269
269
  this.$emit(datasourceEventNames.initialize, {
270
270
  options: gridOptions,
271
271
  keepColDefsOnClearRowData: this.keepColDefsOnClearRowData,
272
272
  });
273
273
  // TODO: refactor this to prevent rendering datasource component until grid is ready
274
- this.addEventListener(datasourceEventNames.ready, (event) => __awaiter(this, void 0, void 0, function* () {
275
- const { pagination } = event.detail;
276
- this.pagination = pagination;
274
+ this.addEventListener(datasourceEventNames.ready, () => __awaiter(this, void 0, void 0, function* () {
277
275
  const initOK = yield this.initializeDatasource(this.datasourceOptions(), true, false);
278
276
  if (!initOK) {
279
277
  logger.debug(`Genesis Datasource init failed for ${this.resourceName}`);
@@ -313,7 +311,6 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
313
311
  maxRows: +this.maxRows,
314
312
  maxView: +this.maxView,
315
313
  rowId: this.rowId,
316
- pagination: this.pagination,
317
314
  zeroBasedViewNumber: this.zeroBasedViewNumber,
318
315
  pagingMode: this.pagingMode,
319
316
  criteriaOnlyRequest: this.datasource.criteriaOnlyRequest,
@@ -333,7 +330,6 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
333
330
  maxRows: +this.maxRows,
334
331
  maxView: +this.maxView,
335
332
  rowId: this.rowId,
336
- pagination: this.pagination,
337
333
  zeroBasedViewNumber: this.zeroBasedViewNumber,
338
334
  });
339
335
  }
@@ -351,12 +347,6 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
351
347
  }
352
348
  });
353
349
  }
354
- onPaginationChanged(event) {
355
- var _a;
356
- if (this.ssrmDatasource) {
357
- this.ssrmDatasource.isNewPageSize = (_a = event.newPage) !== null && _a !== void 0 ? _a : false;
358
- }
359
- }
360
350
  destroy() {
361
351
  return __awaiter(this, void 0, void 0, function* () {
362
352
  var _a, _b;
@@ -3,7 +3,7 @@ import { Auth, Connect, logger, } from '@genesislcap/foundation-comms';
3
3
  import { UUID } from '@genesislcap/foundation-utils';
4
4
  /**
5
5
  * Base class for server-side resource datasources used in Grid Pro SSRM implementations.
6
- * Provides common logic for filtering, sorting, and pagination.
6
+ * Provides common logic for filtering, sorting, and infinite-scroll row counting.
7
7
  *
8
8
  * @beta
9
9
  */
@@ -24,12 +24,6 @@ export class BaseServerSideDatasource {
24
24
  this.moreRows = false;
25
25
  this.calculatedRowsCount = 0;
26
26
  this.currentSequenceId = null;
27
- /**
28
- * Whether the corrective ROWS_COUNT snapshot() has resolved for the current CRITERIA_MATCH.
29
- * Reset in destroy() so it re-resolves on filter/sort changes.
30
- * @internal
31
- */
32
- this.criteriaRowCountResolved = false;
33
27
  this.reloadResourceDataFunc = options.reloadResourceDataFunc;
34
28
  this.errorHandlerFunc = options.errorHandlerFunc;
35
29
  this.onNoDataAvailableFunc = options.onNoDataAvailableFunc;
@@ -42,7 +36,6 @@ export class BaseServerSideDatasource {
42
36
  this.maxRows = options.maxRows;
43
37
  this.maxView = options.maxView;
44
38
  this.rowId = options.rowId;
45
- this.pagination = options.pagination;
46
39
  this.zeroBasedViewNumber = options.zeroBasedViewNumber;
47
40
  this.pagingMode = options.pagingMode;
48
41
  this.criteriaOnlyRequest = (_a = options.criteriaOnlyRequest) !== null && _a !== void 0 ? _a : false;
@@ -134,7 +127,6 @@ export class BaseServerSideDatasource {
134
127
  this.moreRows = false;
135
128
  this.sourceRef = undefined;
136
129
  this.lastSuccessRowData = undefined;
137
- this.criteriaRowCountResolved = false;
138
130
  }
139
131
  refreshDatasource(params) {
140
132
  return __awaiter(this, void 0, void 0, function* () {
@@ -370,27 +362,10 @@ export class BaseServerSideDatasource {
370
362
  .filter((k) => this.resourceColDefs.findIndex((o) => o.NAME === k) !== -1)
371
363
  .filter((k) => this.currentFilterModel[k].filterType === filterType);
372
364
  }
373
- getPageNumber(start, recordsPerPage, totalRecords, zeroBasedViewNumber = true) {
374
- if (totalRecords !== undefined && start > totalRecords) {
375
- start = Math.floor((totalRecords - 1) / recordsPerPage) * recordsPerPage + 1;
376
- }
377
- const currentPageIndex = Math.ceil(start / recordsPerPage);
378
- return zeroBasedViewNumber ? currentPageIndex : currentPageIndex + 1;
379
- }
380
365
  getCorrectRowCount(params) {
381
366
  const currentLastRowNumber = params.request.endRow;
382
367
  this.calculatedRowsCount = this.clientRowsCount || currentLastRowNumber;
383
- const defaultCount = Math.min(this.serverRowsCount, this.maxView);
384
368
  let rowCount;
385
- const criteriaMatch = this.getResourceParam('CRITERIA_MATCH');
386
- if (this.pagination) {
387
- rowCount = !criteriaMatch ? Math.min(this.serverRowsCount, this.maxView) : undefined;
388
- if (criteriaMatch) {
389
- const loadedCount = this.rowData.size;
390
- rowCount = loadedCount > 0 ? Math.min(loadedCount, this.maxView) : defaultCount;
391
- }
392
- return rowCount;
393
- }
394
369
  // Infinite scroll: getRows() only resolves a block once the cumulative row cache covers
395
370
  // its full extent or the stream reported no more data, so blocks are either full or final.
396
371
  if (!this.moreRows) {
@@ -17,7 +17,7 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
17
17
  */
18
18
  this.pendingBlocks = new Set();
19
19
  /**
20
- * Highest absolute row index already handed to AG Grid this session (non-pagination).
20
+ * Highest absolute row index already handed to AG Grid this session.
21
21
  * Live DELETEs below this watermark must not remove cache entries - see
22
22
  * handleCurrentStreamLoad.
23
23
  * @internal
@@ -41,7 +41,6 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
41
41
  }
42
42
  getRows(params) {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
- var _a, _b;
45
44
  // setupFiltering()/setupSorting() return true when they triggered a refresh: the
46
45
  // datasource was re-initialized and AG Grid's SSRM cache purged, so getRows() is
47
46
  // re-invoked with fresh params and this invocation is superseded. It must still resolve
@@ -57,14 +56,6 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
57
56
  params.fail();
58
57
  return;
59
58
  }
60
- if (this.pagination && !this.isNewPageSize && this.currentSequenceId > 0) {
61
- const requestFilter = JSON.stringify((_a = params.request.filterModel) !== null && _a !== void 0 ? _a : {});
62
- const currentFilter = JSON.stringify((_b = this.currentFilterModel) !== null && _b !== void 0 ? _b : {});
63
- if (requestFilter === currentFilter && this.lastSuccessRowData) {
64
- params.success(this.lastSuccessRowData);
65
- return;
66
- }
67
- }
68
59
  if (!this.dataserverStream) {
69
60
  this.dataserverStream = yield this.createDataserverStreamFunc(this.resourceParams);
70
61
  }
@@ -77,23 +68,13 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
77
68
  // Infinite scroll keeps a session-cumulative row cache (see handleCurrentStreamLoad);
78
69
  // when it already covers this block, or the stream ended, no further stream messages
79
70
  // will arrive for this request - resolve it synchronously from the cache.
80
- const blockAlreadyCovered = !this.pagination &&
81
- this.currentSequenceId >= 1 &&
82
- (this.rowData.size >= blockEndRow || !this.moreRows);
71
+ const blockAlreadyCovered = this.currentSequenceId >= 1 && (this.rowData.size >= blockEndRow || !this.moreRows);
83
72
  if (this.currentSequenceId >= 1 &&
84
73
  !blockAlreadyCovered &&
85
74
  (this.moreRows || params.request.startRow >= Number(this.maxRows))) {
86
- if (this.pagination) {
87
- const startRow = Number.isFinite(Number(params.request.startRow))
88
- ? Number(params.request.startRow)
89
- : 0;
90
- this.resourceParams.VIEW_NUMBER = this.getPageNumber(startRow, this.maxRows, this.maxView, this.zeroBasedViewNumber);
91
- }
92
- const viewNumber = this.pagination
93
- ? this.resourceParams.VIEW_NUMBER
94
- : Number.isFinite(Number(this.resourceParams.VIEW_NUMBER))
95
- ? Number(this.resourceParams.VIEW_NUMBER)
96
- : 0;
75
+ const viewNumber = Number.isFinite(Number(this.resourceParams.VIEW_NUMBER))
76
+ ? Number(this.resourceParams.VIEW_NUMBER)
77
+ : 0;
97
78
  if (Number.isFinite(viewNumber)) {
98
79
  this.connect.getMoreRows(this.sourceRef, viewNumber);
99
80
  }
@@ -118,14 +99,12 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
118
99
  applyResult = false;
119
100
  clearSafetyTimer(timer);
120
101
  settleBlock();
121
- if (!this.pagination) {
122
- this.deliveredRowCount = Math.max(this.deliveredRowCount, blockEndRow);
123
- }
102
+ this.deliveredRowCount = Math.max(this.deliveredRowCount, blockEndRow);
124
103
  const allRows = Array.from(this.rowData.values());
125
104
  const successRowData = {
126
- // Non-pagination: deliver only this block's slice of the cache - AG Grid SSRM
127
- // expects exactly the rows for its startRow..endRow range.
128
- rowData: this.pagination ? allRows : allRows.slice(blockStartRow, blockEndRow),
105
+ // Deliver only this block's slice of the cache - AG Grid SSRM expects exactly the
106
+ // rows for its startRow..endRow range.
107
+ rowData: allRows.slice(blockStartRow, blockEndRow),
129
108
  };
130
109
  successRowData.rowCount = this.getCorrectRowCount(params);
131
110
  this.lastSuccessRowData = successRowData;
@@ -155,7 +134,6 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
155
134
  }, DataserverServerSideDatasource.BLOCK_RESOLVE_TIMEOUT_MS);
156
135
  pendingBlock.cancel = () => failBlock(safetyTimer);
157
136
  pendingBlock.handle = (dataserverResult) => {
158
- var _a;
159
137
  const messageType = dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.MESSAGE_TYPE;
160
138
  if (messageType &&
161
139
  (messageType === MessageType.LOGOFF_ACK || messageType === MessageType.MSG_NACK)) {
@@ -168,52 +146,6 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
168
146
  failBlock(safetyTimer);
169
147
  return;
170
148
  }
171
- if (this.pagination) {
172
- const incomingRowCount = (_a = dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.ROW) === null || _a === void 0 ? void 0 : _a.length;
173
- const shouldApply = applyResult || (incomingRowCount > 0 && this.rowData.size === 0);
174
- if (!shouldApply) {
175
- return;
176
- }
177
- // Paginated mode keeps the original behaviour: each message resolves the request
178
- // (page swap).
179
- DOM.queueUpdate(() => __awaiter(this, void 0, void 0, function* () {
180
- var _a, _b;
181
- if (!applyResult && !(incomingRowCount > 0 && this.rowData.size === 0)) {
182
- return;
183
- }
184
- // Claim the block synchronously, before the await below, so a concurrently queued
185
- // update sees applyResult === false and bails - and so applyResult is never
186
- // reassigned based on a value read before an await (require-atomic-updates).
187
- applyResult = false;
188
- clearSafetyTimer(safetyTimer);
189
- // TODO: this is a bit of hack, due GSF not returning a different ROWS_COUNT when there is a CRITERIA_MATCH
190
- if (this.resourceParams.CRITERIA_MATCH && !this.criteriaRowCountResolved) {
191
- const updatedInfo = yield this.connect.snapshot(this.resourceName, {
192
- MAX_ROWS: this.maxView,
193
- MAX_VIEW: this.maxView,
194
- CRITERIA_MATCH: this.resourceParams.CRITERIA_MATCH,
195
- });
196
- if (!updatedInfo.ROW && !updatedInfo.ROWS_COUNT) {
197
- logger.warn('No data returned when criteria is applied.');
198
- this.serverRowsCount = 0;
199
- this.clientRowsCount = 0;
200
- }
201
- else {
202
- // ROWS_COUNT ignores CRITERIA_MATCH and ROW.length is capped at page size;
203
- // Math.max may over-report (self-corrects when the stream ends) but never
204
- // under-reports, which would make AG Grid stop requesting blocks.
205
- const rowsCount = (_a = updatedInfo.ROWS_COUNT) !== null && _a !== void 0 ? _a : 0;
206
- const rowLength = (_b = updatedInfo.ROW) === null || _b === void 0 ? void 0 : _b.length;
207
- this.serverRowsCount =
208
- rowLength !== undefined ? Math.max(rowsCount, rowLength) : rowsCount;
209
- this.criteriaRowCountResolved = true;
210
- }
211
- }
212
- this.applyServerSideData(params, dataserverResult);
213
- settleBlock();
214
- }));
215
- return;
216
- }
217
149
  if (!applyResult) {
218
150
  return;
219
151
  }
@@ -268,19 +200,17 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
268
200
  }
269
201
  return;
270
202
  }
271
- if (!this.pagination) {
272
- if ((dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.MORE_ROWS) !== undefined) {
273
- this.moreRows = dataserverResult.MORE_ROWS;
274
- }
275
- if (dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.ROW) {
276
- const nextMessage = dataServerResultFilter(dataserverResult, this.rowId);
277
- this.handleCurrentStreamLoad(nextMessage);
278
- this.currentSequenceId = dataserverResult.SEQUENCE_ID;
279
- if (this.currentSequenceId === 1) {
280
- this.sourceRef = dataserverResult.SOURCE_REF;
281
- if (this.serverRowsCount === 0) {
282
- this.serverRowsCount = (_a = dataserverResult.ROWS_COUNT) !== null && _a !== void 0 ? _a : this.rowData.size;
283
- }
203
+ if ((dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.MORE_ROWS) !== undefined) {
204
+ this.moreRows = dataserverResult.MORE_ROWS;
205
+ }
206
+ if (dataserverResult === null || dataserverResult === void 0 ? void 0 : dataserverResult.ROW) {
207
+ const nextMessage = dataServerResultFilter(dataserverResult, this.rowId);
208
+ this.handleCurrentStreamLoad(nextMessage);
209
+ this.currentSequenceId = dataserverResult.SEQUENCE_ID;
210
+ if (this.currentSequenceId === 1) {
211
+ this.sourceRef = dataserverResult.SOURCE_REF;
212
+ if (this.serverRowsCount === 0) {
213
+ this.serverRowsCount = (_a = dataserverResult.ROWS_COUNT) !== null && _a !== void 0 ? _a : this.rowData.size;
284
214
  }
285
215
  }
286
216
  }
@@ -288,61 +218,6 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
288
218
  block.handle(dataserverResult);
289
219
  }
290
220
  }
291
- applyServerSideData(params, result) {
292
- var _a;
293
- const messageType = result.MESSAGE_TYPE;
294
- if (messageType &&
295
- (messageType === MessageType.LOGOFF_ACK || messageType === MessageType.MSG_NACK)) {
296
- // Trigger error dialog for connection/authentication errors
297
- if (this.errorHandlerFunc) {
298
- const errorMessage = messageType === MessageType.LOGOFF_ACK
299
- ? `Connection lost to ${this.resourceName}`
300
- : `Authentication failed for ${this.resourceName}`;
301
- this.errorHandlerFunc(errorMessage, 'connection');
302
- }
303
- params.fail();
304
- return;
305
- }
306
- this.moreRows = result.MORE_ROWS;
307
- if (result.ROW) {
308
- const nextMessage = dataServerResultFilter(result, this.rowId);
309
- this.handleCurrentStreamLoad(nextMessage);
310
- }
311
- else {
312
- // An empty stream message arrived while we still hold previously loaded rows.
313
- // Keep showing those rows, but always resolve the AG Grid request — returning
314
- // without calling params.success/fail leaves the SSRM block stuck in a
315
- // perpetual loading state. Follow-up to PR #2327.
316
- if (this.currentSequenceId >= 1 && this.rowData.size > 0) {
317
- const retainedRowData = {
318
- rowData: Array.from(this.rowData.values()),
319
- rowCount: this.getCorrectRowCount(params),
320
- };
321
- this.lastSuccessRowData = retainedRowData;
322
- params.success(retainedRowData);
323
- return;
324
- }
325
- this.completeEmptyResult(params);
326
- return;
327
- }
328
- this.currentSequenceId = result.SEQUENCE_ID;
329
- if (this.currentSequenceId === 1) {
330
- this.sourceRef = result.SOURCE_REF;
331
- if (this.serverRowsCount === 0) {
332
- this.serverRowsCount = (_a = result.ROWS_COUNT) !== null && _a !== void 0 ? _a : this.rowData.size;
333
- }
334
- // Deliberately not overriding serverRowsCount with ROW.length under CRITERIA_MATCH:
335
- // ROW.length is just the first batch's size and clobbered the corrected count from
336
- // the snapshot() workaround in getRows().
337
- }
338
- const successRowData = {
339
- rowData: Array.from(this.rowData.values()),
340
- };
341
- successRowData.rowCount = this.getCorrectRowCount(params);
342
- this.lastSuccessRowData = successRowData;
343
- params.success(successRowData);
344
- this.notifyNoDataAvailableIfEmpty(params, successRowData);
345
- }
346
221
  /**
347
222
  * Dataserver-specific sorting setup that validates columns are part of an index.
348
223
  * This is required because dataserver needs indexed columns for efficient sorting.
@@ -422,10 +297,10 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
422
297
  var _a, _b, _c, _d, _e;
423
298
  if (!result)
424
299
  return;
425
- // Pagination replaces the buffer per message (page swap); infinite scroll accumulates a
426
- // session-cumulative cache, as GSF splits batches across messages and later batches
427
- // append. Map preserves insertion order, so the cache can be sliced by block range.
428
- const rows = this.pagination ? new Map() : new Map(this.rowData);
300
+ // Infinite scroll accumulates a session-cumulative cache, as GSF splits batches across
301
+ // messages and later batches append. Map preserves insertion order, so the cache can be
302
+ // sliced by block range.
303
+ const rows = new Map(this.rowData);
429
304
  (_a = result.inserts) === null || _a === void 0 ? void 0 : _a.forEach((insertData) => {
430
305
  rows.set(insertData[this.rowId], insertData);
431
306
  });
@@ -446,7 +321,7 @@ export class DataserverServerSideDatasource extends BaseServerSideDatasource {
446
321
  }
447
322
  // Rows already handed to AG Grid sit at fixed absolute indices; removing them from
448
323
  // the cumulative cache would shift slice() offsets for later blocks.
449
- if (!this.pagination && this.deliveredRowCount > 0) {
324
+ if (this.deliveredRowCount > 0) {
450
325
  let index = 0;
451
326
  for (const mapKey of rows.keys()) {
452
327
  if (mapKey === key) {
@@ -49,13 +49,9 @@ export class ReqRepServerSideDatasource extends BaseServerSideDatasource {
49
49
  params.fail();
50
50
  return;
51
51
  }
52
- if (this.pagination && !this.isNewPageSize && this.currentSequenceId > 0) {
53
- params.success(this.lastSuccessRowData);
54
- return;
55
- }
56
52
  const effectivePagingMode = this.getEffectivePagingMode();
57
- // Update pagination params based on paging mode
58
- this.updatePaginationParams(params, effectivePagingMode);
53
+ // Advance the view/offset position based on paging mode
54
+ this.advancePagingPosition(params, effectivePagingMode);
59
55
  const requestParams = {
60
56
  DETAILS: this.buildRequestDetails(effectivePagingMode),
61
57
  };
@@ -69,18 +65,12 @@ export class ReqRepServerSideDatasource extends BaseServerSideDatasource {
69
65
  });
70
66
  }
71
67
  /**
72
- * Update pagination params based on paging mode
68
+ * Advance the view/offset position based on paging mode
73
69
  */
74
- updatePaginationParams(params, effectivePagingMode) {
70
+ advancePagingPosition(params, effectivePagingMode) {
75
71
  if (effectivePagingMode === 'viewBased') {
76
72
  if (this.currentSequenceId !== null && this.currentSequenceId >= 0 && this.moreRows) {
77
- if (this.pagination) {
78
- this.resourceParams.DETAILS.VIEW_NUMBER = this.getPageNumber(params.request.startRow, this.maxRows, undefined, // Don't pass maxView as totalRecords since it's not a valid total count
79
- this.zeroBasedViewNumber);
80
- }
81
- else {
82
- this.resourceParams.DETAILS.VIEW_NUMBER += 1;
83
- }
73
+ this.resourceParams.DETAILS.VIEW_NUMBER += 1;
84
74
  }
85
75
  }
86
76
  else {
@@ -133,7 +123,7 @@ export class ReqRepServerSideDatasource extends BaseServerSideDatasource {
133
123
  }
134
124
  }
135
125
  applyServerSideData(params, result, isLastView) {
136
- var _a, _b, _c;
126
+ var _a, _b;
137
127
  const messageType = result.MESSAGE_TYPE;
138
128
  if (messageType &&
139
129
  (messageType === MessageType.LOGOFF_ACK || messageType === MessageType.MSG_NACK)) {
@@ -189,13 +179,7 @@ export class ReqRepServerSideDatasource extends BaseServerSideDatasource {
189
179
  const currentBatchSize = this.rowData.size;
190
180
  this.discoveredTotalRowCount = params.request.startRow + currentBatchSize;
191
181
  }
192
- // Reset serverRowsCount accumulation for req-rep pagination
193
- if (this.pagination) {
194
- this.serverRowsCount = (_b = result.ROWS_COUNT) !== null && _b !== void 0 ? _b : this.rowData.size;
195
- }
196
- else {
197
- this.serverRowsCount += (_c = result.ROWS_COUNT) !== null && _c !== void 0 ? _c : this.rowData.size;
198
- }
182
+ this.serverRowsCount += (_b = result.ROWS_COUNT) !== null && _b !== void 0 ? _b : this.rowData.size;
199
183
  const successRowData = {
200
184
  rowData: Array.from(this.rowData.values()),
201
185
  };
@@ -206,23 +190,12 @@ export class ReqRepServerSideDatasource extends BaseServerSideDatasource {
206
190
  }
207
191
  getCorrectRowCount(params) {
208
192
  let rowCount;
209
- if (this.pagination) {
210
- if (this.moreRows) {
211
- // More data available, return -1 to indicate unknown total
212
- rowCount = -1;
213
- }
214
- else {
215
- // Use discovered total if available, otherwise calculate from current position
216
- rowCount = this.discoveredTotalRowCount || params.request.startRow + this.rowData.size;
217
- }
218
- return rowCount;
219
- }
220
- // Non-pagination mode (streaming)
221
193
  if (this.moreRows) {
222
- rowCount = -1; // More data available, unknown total
194
+ // More data available, return -1 to indicate unknown total
195
+ rowCount = -1;
223
196
  }
224
197
  else {
225
- // Use discovered total or calculate from current batch
198
+ // Use discovered total if available, otherwise calculate from current position
226
199
  rowCount = this.discoveredTotalRowCount || params.request.startRow + this.rowData.size;
227
200
  }
228
201
  return rowCount;