@genesislcap/grid-pro 14.323.0 → 14.324.0

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 (51) hide show
  1. package/README.md +1 -1
  2. package/dist/custom-elements.json +941 -349
  3. package/dist/dts/datasource/base.datasource.d.ts +64 -5
  4. package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
  5. package/dist/dts/datasource/base.types.d.ts +5 -2
  6. package/dist/dts/datasource/base.types.d.ts.map +1 -1
  7. package/dist/dts/datasource/datasource.types.d.ts +8 -0
  8. package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
  9. package/dist/dts/datasource/server-side.datasource.d.ts +9 -1
  10. package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
  11. package/dist/dts/datasource/server-side.resource-base.d.ts +26 -2
  12. package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
  13. package/dist/dts/datasource/server-side.resource-dataserver.d.ts +5 -0
  14. package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
  15. package/dist/dts/datasource/server-side.resource-reqrep.d.ts +9 -0
  16. package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
  17. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +2 -0
  18. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
  19. package/dist/dts/status-bar-components/pagination.status-bar.d.ts.map +1 -1
  20. package/dist/esm/datasource/base.datasource.js +61 -19
  21. package/dist/esm/datasource/server-side.datasource.js +32 -44
  22. package/dist/esm/datasource/server-side.resource-base.js +36 -38
  23. package/dist/esm/datasource/server-side.resource-dataserver.js +47 -1
  24. package/dist/esm/datasource/server-side.resource-reqrep.js +174 -39
  25. package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +40 -2
  26. package/dist/esm/status-bar-components/pagination.status-bar.js +29 -4
  27. package/dist/grid-pro.api.json +82 -21
  28. package/dist/grid-pro.d.ts +83 -6
  29. package/docs/api/grid-pro.genesisgriddatasourceelement.criteria.md +2 -0
  30. package/docs/api/grid-pro.genesisgriddatasourceelement.disablepolling.md +7 -0
  31. package/docs/api/grid-pro.genesisgriddatasourceelement.fields.md +7 -0
  32. package/docs/api/grid-pro.genesisgriddatasourceelement.issnapshot.md +7 -0
  33. package/docs/api/grid-pro.genesisgriddatasourceelement.maxrows.md +7 -0
  34. package/docs/api/grid-pro.genesisgriddatasourceelement.maxview.md +7 -0
  35. package/docs/api/grid-pro.genesisgriddatasourceelement.md +47 -0
  36. package/docs/api/grid-pro.genesisgriddatasourceelement.movingview.md +7 -0
  37. package/docs/api/grid-pro.genesisgriddatasourceelement.offset.md +18 -0
  38. package/docs/api/grid-pro.genesisgriddatasourceelement.orderby.md +7 -0
  39. package/docs/api/grid-pro.genesisgriddatasourceelement.pollinginterval.md +7 -0
  40. package/docs/api/grid-pro.genesisgriddatasourceelement.polltriggerevents.md +7 -0
  41. package/docs/api/grid-pro.genesisgriddatasourceelement.request.md +7 -0
  42. package/docs/api/grid-pro.genesisgriddatasourceelement.resourcename.md +7 -0
  43. package/docs/api/grid-pro.genesisgriddatasourceelement.reverse.md +7 -0
  44. package/docs/api/grid-pro.genesisgriddatasourceelement.viewnumber.md +2 -0
  45. package/docs/api/grid-pro.gridproserversidedatasource.md +3 -5
  46. package/docs/api/grid-pro.gridproserversidedatasource.pagingmode.md +21 -0
  47. package/docs/api/grid-pro.md +11 -0
  48. package/docs/api/grid-pro.pagingmode.md +18 -0
  49. package/docs/api-report.md.api.md +5 -16
  50. package/package.json +13 -13
  51. package/docs/api/grid-pro.gridproserversidedatasource.params.md +0 -14
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
2
  import { Events, } from '@ag-grid-community/core';
3
- import { MessageType, dataServerResultFilter, normaliseCriteria, } from '@genesislcap/foundation-comms';
3
+ import { MessageType, ResourceType, dataServerResultFilter, normaliseCriteria, } from '@genesislcap/foundation-comms';
4
4
  import { LifecycleMixin } from '@genesislcap/foundation-utils';
5
5
  import { DOM, attr, customElement } from '@microsoft/fast-element';
6
6
  import { BehaviorSubject, EMPTY } from 'rxjs';
@@ -28,6 +28,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
28
28
  this.requiresFullRowDataAndColDefs = true;
29
29
  this._lastMoreRows = false;
30
30
  this._isMoreRowsResult = false;
31
+ this._nextOffset = 0;
32
+ this._loadMoreCount = 0;
31
33
  }
32
34
  // DatasourceOptions
33
35
  criteriaChanged(oldCriteria, newCriteria) {
@@ -157,6 +159,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
157
159
  this.clearRowData();
158
160
  this._lastMoreRows = false;
159
161
  this._isMoreRowsResult = false;
162
+ this._nextOffset = 0;
163
+ this._loadMoreCount = 0;
160
164
  this.agGrid.clearLocalGridOptions();
161
165
  this.requiresFullRowDataAndColDefs = true;
162
166
  this.dataSubWasLoggedOff = false;
@@ -286,6 +290,10 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
286
290
  this.dataSub.unsubscribe();
287
291
  this.dataSub = undefined;
288
292
  }
293
+ // Reset load more tracking on reload
294
+ this._nextOffset = 0;
295
+ this._loadMoreCount = 0;
296
+ this.datasource.updateLoadMoreCount(0);
289
297
  this.datasource.stream = undefined;
290
298
  // Cache the current filter model before clearing data to preserve column filters
291
299
  yield ((_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.cacheFilterConfig());
@@ -336,7 +344,12 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
336
344
  this._sourceRef = result.SOURCE_REF;
337
345
  const hasMoreRowsInResult = 'MORE_ROWS' in result;
338
346
  const hasRowsCountInResult = 'ROWS_COUNT' in result;
347
+ const hasNextOffsetInResult = this.datasource.resourceType === ResourceType.REQUEST_SERVER && 'NEXT_OFFSET' in result;
339
348
  this._isMoreRowsResult = hasMoreRowsInResult && !hasRowsCountInResult;
349
+ // Store NEXT_OFFSET for RequestServer load more functionality
350
+ if (hasNextOffsetInResult) {
351
+ this._nextOffset = result.NEXT_OFFSET;
352
+ }
340
353
  if (result === null || result === void 0 ? void 0 : result.ERROR) {
341
354
  this.handleErrors(result.ERROR, 'criteria');
342
355
  }
@@ -540,7 +553,32 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
540
553
  this.updateCachedRowArray();
541
554
  }
542
555
  loadMore() {
543
- this.connect.getMoreRows(this._sourceRef);
556
+ switch (this.datasource.resourceType) {
557
+ case ResourceType.DATASERVER:
558
+ let viewNumber;
559
+ if (this.viewNumber) {
560
+ this._loadMoreCount = +this.viewNumber + 1;
561
+ viewNumber = this._loadMoreCount;
562
+ }
563
+ else {
564
+ this._loadMoreCount += 1;
565
+ }
566
+ this.connect.getMoreRows(this._sourceRef, viewNumber);
567
+ break;
568
+ case ResourceType.REQUEST_SERVER:
569
+ this._loadMoreCount += 1;
570
+ // TODO: Will get back to this soon, want to improve loadMore for isSnapshot + extras
571
+ // const requestParams = this.datasource.requestOnlyParams;
572
+ // // Set OFFSET for the next request
573
+ // if (requestParams.DETAILS) {
574
+ // requestParams.DETAILS.OFFSET = this._nextOffset;
575
+ // }
576
+ // this.datasource.snapshot(requestParams).then((result) => {
577
+ // this.applyRequestServerData(result as RequestServerResult);
578
+ // });
579
+ break;
580
+ }
581
+ this.datasource.updateLoadMoreCount(this._loadMoreCount);
544
582
  }
545
583
  };
546
584
  __decorate([
@@ -168,24 +168,49 @@ export class PaginationStatusBarComponent {
168
168
  }
169
169
  }
170
170
  updateDisplay() {
171
+ var _a, _b, _c, _d;
171
172
  const currentPage = this.api.paginationGetCurrentPage() + 1; // 1-based for display
172
173
  const totalPages = this.api.paginationGetTotalPages() || 1;
173
174
  const pageSize = this.api.paginationGetPageSize();
174
175
  const rowCount = this.api.paginationGetRowCount();
176
+ // Check if we're in server-side mode and if the total count is uncertain
177
+ // Add null checks for test environment compatibility
178
+ const isServerSide = ((_d = (_c = (_b = (_a = this.api).getModel) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.getType) === null || _d === void 0 ? void 0 : _d.call(_c)) === 'serverSide';
179
+ const hasUncertainTotal = isServerSide && this.api.paginationIsLastPageFound && !this.api.paginationIsLastPageFound();
175
180
  // Update the page numbers
176
181
  this.pageNumberDisplay.textContent = currentPage.toString();
177
- this.pageNumberTotalDisplay.textContent = totalPages.toString();
182
+ this.pageNumberTotalDisplay.textContent = hasUncertainTotal ? 'more' : totalPages.toString();
183
+ // Update accessibility attributes when showing "more"
184
+ if (hasUncertainTotal) {
185
+ this.pageNumberTotalDisplay.setAttribute('aria-label', 'More pages available');
186
+ this.paginationSummaryPanel.setAttribute('aria-label', 'Row count summary with more data available');
187
+ }
188
+ else {
189
+ this.pageNumberTotalDisplay.setAttribute('aria-label', 'Total number of pages');
190
+ this.paginationSummaryPanel.setAttribute('aria-label', 'Row count summary');
191
+ }
178
192
  // Update the row summary panel
179
193
  const startRow = (currentPage - 1) * pageSize + 1;
180
194
  const endRow = Math.min(currentPage * pageSize, rowCount);
181
- this.paginationSummaryPanel.textContent = `${rowCount > 0 ? startRow : 0} to ${endRow} of ${rowCount}`;
195
+ const totalDisplay = hasUncertainTotal ? 'more' : rowCount.toString();
196
+ this.paginationSummaryPanel.textContent = `${rowCount > 0 ? startRow : 0} to ${endRow} of ${totalDisplay}`;
182
197
  // Update button states
183
198
  const isFirstPage = currentPage === 1;
184
- const isLastPage = currentPage >= totalPages;
199
+ const isLastPage = hasUncertainTotal ? false : currentPage >= totalPages;
185
200
  this.updateButtonState(this.firstPageButton, isFirstPage);
186
201
  this.updateButtonState(this.prevPageButton, isFirstPage);
187
202
  this.updateButtonState(this.nextPageButton, isLastPage);
188
- this.updateButtonState(this.lastPageButton, isLastPage);
203
+ // Disable "last page" button when we don't know the total (showing "more")
204
+ this.updateButtonState(this.lastPageButton, hasUncertainTotal || isLastPage);
205
+ // Update last page button accessibility when uncertain total
206
+ if (hasUncertainTotal) {
207
+ this.lastPageButton.setAttribute('aria-label', 'Last page unavailable - total number of pages unknown');
208
+ this.lastPageButton.setAttribute('title', 'Cannot jump to last page when total is unknown');
209
+ }
210
+ else {
211
+ this.lastPageButton.setAttribute('aria-label', 'Last Page');
212
+ this.lastPageButton.removeAttribute('title');
213
+ }
189
214
  }
190
215
  updateButtonState(button, disabled) {
191
216
  if (disabled) {
@@ -7671,7 +7671,7 @@
7671
7671
  {
7672
7672
  "kind": "Property",
7673
7673
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#criteria:member",
7674
- "docComment": "",
7674
+ "docComment": "/**\n * Groovy expression to perform filters on the query server; these remain active for the life of the subscription.\n */\n",
7675
7675
  "excerptTokens": [
7676
7676
  {
7677
7677
  "kind": "Content",
@@ -7961,7 +7961,7 @@
7961
7961
  {
7962
7962
  "kind": "Property",
7963
7963
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#disablePolling:member",
7964
- "docComment": "",
7964
+ "docComment": "/**\n * Disables polling if set to true (data updates for the grid will not be fetched automatically).\n *\n * @remarks\n *\n * REQUEST_SERVER only. Defaults to false.\n */\n",
7965
7965
  "excerptTokens": [
7966
7966
  {
7967
7967
  "kind": "Content",
@@ -7991,7 +7991,7 @@
7991
7991
  {
7992
7992
  "kind": "Property",
7993
7993
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#fields:member",
7994
- "docComment": "",
7994
+ "docComment": "/**\n * 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.\n *\n * @remarks\n *\n * DATASERVER only.\n */\n",
7995
7995
  "excerptTokens": [
7996
7996
  {
7997
7997
  "kind": "Content",
@@ -8120,7 +8120,7 @@
8120
8120
  {
8121
8121
  "kind": "Property",
8122
8122
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#isSnapshot:member",
8123
- "docComment": "",
8123
+ "docComment": "/**\n * Request a snapshot from the server.\n *\n * @remarks\n *\n * Defaults to false.\n */\n",
8124
8124
  "excerptTokens": [
8125
8125
  {
8126
8126
  "kind": "Content",
@@ -8150,7 +8150,7 @@
8150
8150
  {
8151
8151
  "kind": "Property",
8152
8152
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#maxRows:member",
8153
- "docComment": "",
8153
+ "docComment": "/**\n * Maximum number of rows to be returned as part of the initial message, and as part of any additional MORE_ROWS messages.\n *\n * @remarks\n *\n * This will not affect the number of rows displayed. Defaults to 250.\n */\n",
8154
8154
  "excerptTokens": [
8155
8155
  {
8156
8156
  "kind": "Content",
@@ -8180,7 +8180,7 @@
8180
8180
  {
8181
8181
  "kind": "Property",
8182
8182
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#maxView:member",
8183
- "docComment": "",
8183
+ "docComment": "/**\n * Maximum number of rows to track as part of a client \"view\".\n *\n * @remarks\n *\n * DATASERVER only. Defaults to 1000.\n */\n",
8184
8184
  "excerptTokens": [
8185
8185
  {
8186
8186
  "kind": "Content",
@@ -8210,7 +8210,7 @@
8210
8210
  {
8211
8211
  "kind": "Property",
8212
8212
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#movingView:member",
8213
- "docComment": "",
8213
+ "docComment": "/**\n * If true, when the maximum number of rows defined in max-view is reached, the Data Server will start discarding the oldest rows (in terms of timestamp) and sending newer rows.\n *\n * @remarks\n *\n * DATASERVER only. If false, the updates in the server will be sent to the front end regardless of order. Note that this will only update the UI; no changes will be performed in the database. Defaults to false.\n */\n",
8214
8214
  "excerptTokens": [
8215
8215
  {
8216
8216
  "kind": "Content",
@@ -8237,10 +8237,40 @@
8237
8237
  "isProtected": false,
8238
8238
  "isAbstract": false
8239
8239
  },
8240
+ {
8241
+ "kind": "Property",
8242
+ "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#offset:member",
8243
+ "docComment": "/**\n * The offset for pagination in REQUEST_SERVER scenarios.\n *\n * @remarks\n *\n * REQUEST_SERVER only.\n */\n",
8244
+ "excerptTokens": [
8245
+ {
8246
+ "kind": "Content",
8247
+ "text": "offset: "
8248
+ },
8249
+ {
8250
+ "kind": "Content",
8251
+ "text": "number"
8252
+ },
8253
+ {
8254
+ "kind": "Content",
8255
+ "text": ";"
8256
+ }
8257
+ ],
8258
+ "isReadonly": false,
8259
+ "isOptional": false,
8260
+ "releaseTag": "Public",
8261
+ "name": "offset",
8262
+ "propertyTypeTokenRange": {
8263
+ "startIndex": 1,
8264
+ "endIndex": 2
8265
+ },
8266
+ "isStatic": false,
8267
+ "isProtected": false,
8268
+ "isAbstract": false
8269
+ },
8240
8270
  {
8241
8271
  "kind": "Property",
8242
8272
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#orderBy:member",
8243
- "docComment": "",
8273
+ "docComment": "/**\n * Option to select a Data Server index (defined in the Data Server query), which is especially useful if you want the data to be sorted in a specific way.\n *\n * @remarks\n *\n * By default, rows are returned in order of creation (from oldest database record to newest).\n */\n",
8244
8274
  "excerptTokens": [
8245
8275
  {
8246
8276
  "kind": "Content",
@@ -8270,7 +8300,7 @@
8270
8300
  {
8271
8301
  "kind": "Property",
8272
8302
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#pollingInterval:member",
8273
- "docComment": "",
8303
+ "docComment": "/**\n * Custom polling frequency (in milliseconds) for a Request Server resource.\n *\n * @remarks\n *\n * REQUEST_SERVER only. Note that this option only works with Request Server resources; if your resource is a Data Server query, your grid is updated in real time. Defaults to 5000ms.\n */\n",
8274
8304
  "excerptTokens": [
8275
8305
  {
8276
8306
  "kind": "Content",
@@ -8300,7 +8330,7 @@
8300
8330
  {
8301
8331
  "kind": "Property",
8302
8332
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#pollTriggerEvents:member",
8303
- "docComment": "",
8333
+ "docComment": "/**\n * Array of event names that will trigger a poll when received as commit responses.\n *\n * @remarks\n *\n * REQUEST_SERVER only.\n */\n",
8304
8334
  "excerptTokens": [
8305
8335
  {
8306
8336
  "kind": "Content",
@@ -8378,7 +8408,7 @@
8378
8408
  {
8379
8409
  "kind": "Property",
8380
8410
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#request:member",
8381
- "docComment": "",
8411
+ "docComment": "/**\n * Similar to fields but for Request Server scenarios. This optional parameter enables you to specify request fields, which can include wildcards.\n *\n * @remarks\n *\n * REQUEST_SERVER only.\n */\n",
8382
8412
  "excerptTokens": [
8383
8413
  {
8384
8414
  "kind": "Content",
@@ -8438,7 +8468,7 @@
8438
8468
  {
8439
8469
  "kind": "Property",
8440
8470
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#resourceName:member",
8441
- "docComment": "",
8471
+ "docComment": "/**\n * The name of the target Data Server query or Request Server requestReply.\n *\n * @remarks\n *\n * Required attribute.\n */\n",
8442
8472
  "excerptTokens": [
8443
8473
  {
8444
8474
  "kind": "Content",
@@ -8498,7 +8528,7 @@
8498
8528
  {
8499
8529
  "kind": "Property",
8500
8530
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#reverse:member",
8501
- "docComment": "",
8531
+ "docComment": "/**\n * Option that changes the Data Server index iteration.\n *\n * @remarks\n *\n * DATASERVER only. For example, if you are using the default index, the query will return rows in order from the newest database records to the oldest. Defaults to false.\n */\n",
8502
8532
  "excerptTokens": [
8503
8533
  {
8504
8534
  "kind": "Content",
@@ -8697,7 +8727,7 @@
8697
8727
  {
8698
8728
  "kind": "Property",
8699
8729
  "canonicalReference": "@genesislcap/grid-pro!GenesisGridDatasourceElement#viewNumber:member",
8700
- "docComment": "",
8730
+ "docComment": "/**\n * The desired view/page you want data from.\n */\n",
8701
8731
  "excerptTokens": [
8702
8732
  {
8703
8733
  "kind": "Content",
@@ -16363,29 +16393,34 @@
16363
16393
  },
16364
16394
  {
16365
16395
  "kind": "Property",
16366
- "canonicalReference": "@genesislcap/grid-pro!GridProServerSideDatasource#params:member",
16367
- "docComment": "",
16396
+ "canonicalReference": "@genesislcap/grid-pro!GridProServerSideDatasource#pagingMode:member",
16397
+ "docComment": "/**\n * The paging mode to use for data fetching.\n *\n * @remarks\n *\n * - \"viewBased\": Uses VIEW_NUMBER and NEXT_VIEW (1 by 1 increment) - \"offsetBased\": Uses OFFSET and NEXT_OFFSET (based on maxRows increment) - undefined: Auto-determines based on criteriaOnlyRequest availability\n */\n",
16368
16398
  "excerptTokens": [
16369
16399
  {
16370
16400
  "kind": "Content",
16371
- "text": "get params(): "
16401
+ "text": "pagingMode: "
16402
+ },
16403
+ {
16404
+ "kind": "Reference",
16405
+ "text": "PagingMode",
16406
+ "canonicalReference": "@genesislcap/grid-pro!PagingMode:type"
16372
16407
  },
16373
16408
  {
16374
16409
  "kind": "Content",
16375
- "text": "any"
16410
+ "text": " | undefined"
16376
16411
  },
16377
16412
  {
16378
16413
  "kind": "Content",
16379
16414
  "text": ";"
16380
16415
  }
16381
16416
  ],
16382
- "isReadonly": true,
16417
+ "isReadonly": false,
16383
16418
  "isOptional": false,
16384
16419
  "releaseTag": "Beta",
16385
- "name": "params",
16420
+ "name": "pagingMode",
16386
16421
  "propertyTypeTokenRange": {
16387
16422
  "startIndex": 1,
16388
- "endIndex": 2
16423
+ "endIndex": 3
16389
16424
  },
16390
16425
  "isStatic": false,
16391
16426
  "isProtected": false,
@@ -19856,6 +19891,32 @@
19856
19891
  }
19857
19892
  ]
19858
19893
  },
19894
+ {
19895
+ "kind": "TypeAlias",
19896
+ "canonicalReference": "@genesislcap/grid-pro!PagingMode:type",
19897
+ "docComment": "/**\n * Available paging modes for server-side datasources\n *\n * @remarks\n *\n * - This type defines the paging approach used for server-side data fetching - 'viewBased': Uses VIEW_NUMBER and NEXT_VIEW (1 by 1 increment) - 'offsetBased': Uses OFFSET and NEXT_OFFSET (based on maxRows increment)\n *\n * @public\n */\n",
19898
+ "excerptTokens": [
19899
+ {
19900
+ "kind": "Content",
19901
+ "text": "export type PagingMode = "
19902
+ },
19903
+ {
19904
+ "kind": "Content",
19905
+ "text": "'viewBased' | 'offsetBased'"
19906
+ },
19907
+ {
19908
+ "kind": "Content",
19909
+ "text": ";"
19910
+ }
19911
+ ],
19912
+ "fileUrlPath": "src/datasource/datasource.types.ts",
19913
+ "releaseTag": "Public",
19914
+ "name": "PagingMode",
19915
+ "typeTokenRange": {
19916
+ "startIndex": 1,
19917
+ "endIndex": 2
19918
+ }
19919
+ },
19859
19920
  {
19860
19921
  "kind": "Class",
19861
19922
  "canonicalReference": "@genesislcap/grid-pro!ReloadStatusBarComponent:class",
@@ -1065,19 +1065,78 @@ export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceE
1065
1065
  * Allows grid data updates to be processed via and external function before applying in grid
1066
1066
  */
1067
1067
  rowDataMapper: Function;
1068
+ /**
1069
+ * Groovy expression to perform filters on the query server; these remain active for the life of the subscription.
1070
+ */
1068
1071
  criteria: string;
1069
- fields: string;
1072
+ /**
1073
+ * Request a snapshot from the server.
1074
+ * @remarks Defaults to false.
1075
+ */
1070
1076
  isSnapshot: boolean;
1077
+ /**
1078
+ * Maximum number of rows to be returned as part of the initial message, and as part of any additional MORE_ROWS messages.
1079
+ * @remarks This will not affect the number of rows displayed. Defaults to 250.
1080
+ */
1071
1081
  maxRows: number;
1072
- maxView: number;
1073
- movingView: boolean;
1082
+ /**
1083
+ * Option to select a Data Server index (defined in the Data Server query), which is especially useful if you want the data to be sorted in a specific way.
1084
+ * @remarks By default, rows are returned in order of creation (from oldest database record to newest).
1085
+ */
1074
1086
  orderBy: string;
1087
+ /**
1088
+ * The name of the target Data Server query or Request Server requestReply.
1089
+ * @remarks Required attribute.
1090
+ */
1075
1091
  resourceName: string;
1076
- reverse: boolean;
1092
+ /**
1093
+ * The desired view/page you want data from.
1094
+ */
1077
1095
  viewNumber: number;
1096
+ /**
1097
+ * 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.
1098
+ * @remarks DATASERVER only.
1099
+ */
1100
+ fields: string;
1101
+ /**
1102
+ * Maximum number of rows to track as part of a client "view".
1103
+ * @remarks DATASERVER only. Defaults to 1000.
1104
+ */
1105
+ maxView: number;
1106
+ /**
1107
+ * If true, when the maximum number of rows defined in max-view is reached, the Data Server will start discarding the oldest rows (in terms of timestamp) and sending newer rows.
1108
+ * @remarks DATASERVER only. If false, the updates in the server will be sent to the front end regardless of order. Note that this will only update the UI; no changes will be performed in the database. Defaults to false.
1109
+ */
1110
+ movingView: boolean;
1111
+ /**
1112
+ * Option that changes the Data Server index iteration.
1113
+ * @remarks DATASERVER only. For example, if you are using the default index, the query will return rows in order from the newest database records to the oldest. Defaults to false.
1114
+ */
1115
+ reverse: boolean;
1116
+ /**
1117
+ * Disables polling if set to true (data updates for the grid will not be fetched automatically).
1118
+ * @remarks REQUEST_SERVER only. Defaults to false.
1119
+ */
1120
+ disablePolling: boolean;
1121
+ /**
1122
+ * The offset for pagination in REQUEST_SERVER scenarios.
1123
+ * @remarks REQUEST_SERVER only.
1124
+ */
1125
+ offset: number;
1126
+ /**
1127
+ * Custom polling frequency (in milliseconds) for a Request Server resource.
1128
+ * @remarks REQUEST_SERVER only. Note that this option only works with Request Server resources; if your resource is a Data Server query, your grid is updated in real time. Defaults to 5000ms.
1129
+ */
1078
1130
  pollingInterval: number;
1131
+ /**
1132
+ * Array of event names that will trigger a poll when received as commit responses.
1133
+ * @remarks REQUEST_SERVER only.
1134
+ */
1079
1135
  pollTriggerEvents: string[];
1080
- disablePolling: boolean;
1136
+ /**
1137
+ * Similar to fields but for Request Server scenarios. This optional parameter enables you to specify request fields, which can include wildcards.
1138
+ * @remarks REQUEST_SERVER only.
1139
+ */
1081
1140
  request: any;
1082
1141
  /**
1083
1142
  * Attribute to set whether the REQUEST object should be automatically set up.
@@ -2905,6 +2964,8 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
2905
2964
  private _lastMoreRows;
2906
2965
  private _isMoreRowsResult;
2907
2966
  private _sourceRef;
2967
+ private _nextOffset;
2968
+ private _loadMoreCount;
2908
2969
  connectedCallback(): void;
2909
2970
  disconnectedCallback(): void;
2910
2971
  deepClone(): Node;
@@ -3442,6 +3503,14 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
3442
3503
  * @remarks Only works with DATASERVER resources (StreamDatasource) right now.
3443
3504
  */
3444
3505
  liveUpdates: boolean;
3506
+ /**
3507
+ * The paging mode to use for data fetching.
3508
+ * @remarks
3509
+ * - "viewBased": Uses VIEW_NUMBER and NEXT_VIEW (1 by 1 increment)
3510
+ * - "offsetBased": Uses OFFSET and NEXT_OFFSET (based on maxRows increment)
3511
+ * - undefined: Auto-determines based on criteriaOnlyRequest availability
3512
+ */
3513
+ pagingMode: PagingMode | undefined;
3445
3514
  request: any;
3446
3515
  private indexes;
3447
3516
  private ssrmDatasource;
@@ -3474,7 +3543,6 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
3474
3543
  restart(): Promise<void>;
3475
3544
  private clearRowData;
3476
3545
  private getResourceIndexes;
3477
- get params(): any;
3478
3546
  get rowModel(): IServerSideRowModel;
3479
3547
  private createReqRepRequest;
3480
3548
  private createDataserverStream;
@@ -4203,6 +4271,15 @@ export declare class PaginationStatusBarComponent implements IStatusPanelComp {
4203
4271
  destroy(): void;
4204
4272
  }
4205
4273
 
4274
+ /**
4275
+ * Available paging modes for server-side datasources
4276
+ * @remarks - This type defines the paging approach used for server-side data fetching
4277
+ * - 'viewBased': Uses VIEW_NUMBER and NEXT_VIEW (1 by 1 increment)
4278
+ * - 'offsetBased': Uses OFFSET and NEXT_OFFSET (based on maxRows increment)
4279
+ * @public
4280
+ */
4281
+ export declare type PagingMode = 'viewBased' | 'offsetBased';
4282
+
4206
4283
  /**
4207
4284
  * A status bar component that shows a refresh icon to reload the grid data
4208
4285
  * @public
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.criteria property
6
6
 
7
+ Groovy expression to perform filters on the query server; these remain active for the life of the subscription.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
@@ -4,8 +4,15 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.disablePolling property
6
6
 
7
+ Disables polling if set to true (data updates for the grid will not be fetched automatically).
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
10
12
  disablePolling: boolean;
11
13
  ```
14
+
15
+ ## Remarks
16
+
17
+ REQUEST\_SERVER only. Defaults to false.
18
+
@@ -4,8 +4,15 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.fields property
6
6
 
7
+ 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.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
10
12
  fields: string;
11
13
  ```
14
+
15
+ ## Remarks
16
+
17
+ DATASERVER only.
18
+
@@ -4,8 +4,15 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.isSnapshot property
6
6
 
7
+ Request a snapshot from the server.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
10
12
  isSnapshot: boolean;
11
13
  ```
14
+
15
+ ## Remarks
16
+
17
+ Defaults to false.
18
+
@@ -4,8 +4,15 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.maxRows property
6
6
 
7
+ Maximum number of rows to be returned as part of the initial message, and as part of any additional MORE\_ROWS messages.
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
10
12
  maxRows: number;
11
13
  ```
14
+
15
+ ## Remarks
16
+
17
+ This will not affect the number of rows displayed. Defaults to 250.
18
+
@@ -4,8 +4,15 @@
4
4
 
5
5
  ## GenesisGridDatasourceElement.maxView property
6
6
 
7
+ Maximum number of rows to track as part of a client "view".
8
+
7
9
  **Signature:**
8
10
 
9
11
  ```typescript
10
12
  maxView: number;
11
13
  ```
14
+
15
+ ## Remarks
16
+
17
+ DATASERVER only. Defaults to 1000.
18
+