@genesislcap/foundation-ui 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.
@@ -151,6 +151,15 @@ export declare const ActionsMenu: React.ForwardRefExoticComponent<
151
151
  >;
152
152
  export type ActionsMenuRef = ActionsMenuWC;
153
153
 
154
+ export declare const AiIndicator: React.ForwardRefExoticComponent<
155
+ React.PropsWithChildren<
156
+ Omit<PublicOf<AiIndicatorWC>, 'children' | 'style'> &
157
+ HTMLWCProps & {
158
+ }
159
+ > & React.RefAttributes<AiIndicatorWC>
160
+ >;
161
+ export type AiIndicatorRef = AiIndicatorWC;
162
+
154
163
  export declare const AiCriteriaSearch: React.ForwardRefExoticComponent<
155
164
  React.PropsWithChildren<
156
165
  Omit<PublicOf<AiCriteriaSearchWC>, 'children' | 'style'> &
@@ -171,15 +180,6 @@ export declare const Accordion: React.ForwardRefExoticComponent<
171
180
  >;
172
181
  export type AccordionRef = AccordionWC;
173
182
 
174
- export declare const AiIndicator: React.ForwardRefExoticComponent<
175
- React.PropsWithChildren<
176
- Omit<PublicOf<AiIndicatorWC>, 'children' | 'style'> &
177
- HTMLWCProps & {
178
- }
179
- > & React.RefAttributes<AiIndicatorWC>
180
- >;
181
- export type AiIndicatorRef = AiIndicatorWC;
182
-
183
183
  export declare const Anchor: React.ForwardRefExoticComponent<
184
184
  React.PropsWithChildren<
185
185
  Omit<PublicOf<AnchorWC>, 'children' | 'style'> &
@@ -416,6 +416,20 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
416
416
  * Whether the server reported more rows are available beyond the ones already fetched.
417
417
  */
418
418
  protected moreRowsAvailable: boolean;
419
+ /**
420
+ * How many DATASERVER MORE_ROWS sent by `requestMoreRows` are awaiting their reply, so a reply
421
+ * can be told apart from the logon batch.
422
+ */
423
+ private pendingMoreRows;
424
+ /** The latest MORE_ROWS the DATASERVER stream sent. */
425
+ private serverMoreRows;
426
+ /**
427
+ * Rows in the server's view, counted off the stream (INSERTs in, DELETEs out). Kept apart from
428
+ * the rendered rows, which a subclass may not trim on a DELETE.
429
+ */
430
+ private viewRowCount;
431
+ /** Set when DATASERVER paging stops short of MORE_ROWS false - see updateStreamPagingState. */
432
+ private pagingStopped;
419
433
  /**
420
434
  * The OFFSET to request the next page from, for REQUEST_SERVER paging.
421
435
  */
@@ -468,6 +482,14 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
468
482
  * response (with MORE_ROWS/NEXT_OFFSET paging metadata) remains available.
469
483
  */
470
484
  private filterSnapshotResult;
485
+ /**
486
+ * Re-evaluates paging from a stream message.
487
+ * @remarks On DATASERVER, paging stops once the view is full at MAX_VIEW, as every further
488
+ * MORE_ROWS would come back empty (see `dataserverPagingStatus`), or after a MORE_ROWS came back
489
+ * empty while the view had room. It resumes when a full view shrinks, since GSF fills the freed
490
+ * room on the next MORE_ROWS.
491
+ */
492
+ private updateStreamPagingState;
471
493
  private updateRequestPagingState;
472
494
  private initialRequestOffset;
473
495
  private datasourceOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"base-datasource.d.ts","sourceRoot":"","sources":["../../../src/utils/base-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,UAAU,EAGV,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,wBAAwB,EAKxB,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,EAAU,OAAO,EAAE,MAAM,UAAU,CAAC;AAO3C,MAAM,WAAW,kCAAkC;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;CACpB;;;;QA2B+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAoChB,CAAC;4IAIS,CAAC;wFAQH,CAAC;+IAMa,CAAC;2FAItC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,IAAI;IAEzC,gBAAgB,CAAC,YAAY,UAAO;IA0EpC,cAAc;IAI3B;;;OAGG;IACI,kBAAkB,IAAI,OAAO;IAiBpC;;;;;;;;OAQG;IACU,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAkD7C;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAa5B;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAoD/B,OAAO,CAAC,wBAAwB;IAgChC,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,kBAAkB;IAYnB,sBAAsB,CAAC,mBAAmB,EAAE,mBAAmB;IAgC/D,mBAAmB,CAAC,gBAAgB,EAAE,wBAAwB;IAwBrE,OAAO,CAAC,aAAa;IAKd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAKrC,WAAW,CAAC,MAAM,GAAE,kCAAuC,GAAG,IAAI;IAQlE,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa;IAIlD,qBAAqB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa;CAOtD"}
@@ -1,5 +1,5 @@
1
1
  import { __awaiter, __decorate } from "tslib";
2
- import { Connect, dataServerResultFilter, Datasource, DatasourceDefaults, DatasourceEventHandler, FieldTypeEnum, MessageType, normaliseCriteria, ResourceType, } from '@genesislcap/foundation-comms';
2
+ import { Connect, dataServerResultFilter, dataserverPagingStatus, Datasource, DatasourceDefaults, DatasourceEventHandler, describeDataserverPagingStop, FieldTypeEnum, MessageType, normaliseCriteria, ResourceType, } from '@genesislcap/foundation-comms';
3
3
  import { formatTimestamp } from '@genesislcap/foundation-utils';
4
4
  import { attr, observable } from '@microsoft/fast-element';
5
5
  import { FoundationElement } from '@microsoft/fast-foundation';
@@ -27,6 +27,16 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
27
27
  * Whether the server reported more rows are available beyond the ones already fetched.
28
28
  */
29
29
  this.moreRowsAvailable = false;
30
+ /**
31
+ * How many DATASERVER MORE_ROWS sent by `requestMoreRows` are awaiting their reply, so a reply
32
+ * can be told apart from the logon batch.
33
+ */
34
+ this.pendingMoreRows = 0;
35
+ /**
36
+ * Rows in the server's view, counted off the stream (INSERTs in, DELETEs out). Kept apart from
37
+ * the rendered rows, which a subclass may not trim on a DELETE.
38
+ */
39
+ this.viewRowCount = 0;
30
40
  /**
31
41
  * The OFFSET to request the next page from, for REQUEST_SERVER paging.
32
42
  */
@@ -112,6 +122,10 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
112
122
  (_a = this.dataSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
113
123
  this.dataSub = undefined;
114
124
  this.moreRowsAvailable = false;
125
+ this.pendingMoreRows = 0;
126
+ this.serverMoreRows = undefined;
127
+ this.viewRowCount = 0;
128
+ this.pagingStopped = undefined;
115
129
  this.nextRequestOffset = 0;
116
130
  this.fetchGeneration += 1;
117
131
  const generation = this.fetchGeneration;
@@ -156,17 +170,15 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
156
170
  });
157
171
  }
158
172
  this.sourceRef = result.SOURCE_REF;
159
- if (typeof result.MORE_ROWS === 'boolean') {
160
- this.moreRowsAvailable = result.MORE_ROWS;
161
- }
173
+ const nextMessage = result.ROW ? dataServerResultFilter(result) : undefined;
174
+ this.updateStreamPagingState(result, nextMessage);
162
175
  const messageType = result.MESSAGE_TYPE;
163
176
  if (messageType && messageType === MessageType.LOGOFF_ACK) {
164
177
  this.dataSubWasLoggedOff = true;
165
178
  return;
166
179
  }
167
180
  this.dataSubWasLoggedOff = false;
168
- if (result.ROW) {
169
- const nextMessage = dataServerResultFilter(result);
181
+ if (nextMessage) {
170
182
  this.handleStreamUpdate(nextMessage);
171
183
  }
172
184
  else {
@@ -217,6 +229,7 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
217
229
  }
218
230
  try {
219
231
  if (this.datasource.resourceType === ResourceType.DATASERVER) {
232
+ this.pendingMoreRows += 1;
220
233
  yield this.connect.getMoreRows(this.sourceRef);
221
234
  return;
222
235
  }
@@ -241,6 +254,8 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
241
254
  // failed request. Leaving it false would permanently stop REQUEST_SERVER paging,
242
255
  // since nothing else re-evaluates it until the next full refetch.
243
256
  this.moreRowsAvailable = true;
257
+ // No reply is coming, so the next message carrying MORE_ROWS does not answer this one.
258
+ this.pendingMoreRows = Math.max(0, this.pendingMoreRows - 1);
244
259
  this.handleError({
245
260
  message: `Failed to request more rows for ${this.resourceName}`,
246
261
  loggerType: 'error',
@@ -269,6 +284,58 @@ export class BaseDatasource extends DatasourceEventHandler(FoundationElement) {
269
284
  return dataServerResultFilter(result).inserts;
270
285
  }
271
286
  }
287
+ /**
288
+ * Re-evaluates paging from a stream message.
289
+ * @remarks On DATASERVER, paging stops once the view is full at MAX_VIEW, as every further
290
+ * MORE_ROWS would come back empty (see `dataserverPagingStatus`), or after a MORE_ROWS came back
291
+ * empty while the view had room. It resumes when a full view shrinks, since GSF fills the freed
292
+ * room on the next MORE_ROWS.
293
+ */
294
+ updateStreamPagingState(result, rows) {
295
+ var _a, _b, _c, _d, _e;
296
+ const hasMoreRows = typeof (result === null || result === void 0 ? void 0 : result.MORE_ROWS) === 'boolean';
297
+ if (this.datasource.resourceType !== ResourceType.DATASERVER) {
298
+ if (hasMoreRows) {
299
+ this.moreRowsAvailable = result.MORE_ROWS;
300
+ }
301
+ return;
302
+ }
303
+ this.viewRowCount = Math.max(0, this.viewRowCount + ((_b = (_a = rows === null || rows === void 0 ? void 0 : rows.inserts) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) - ((_d = (_c = rows === null || rows === void 0 ? void 0 : rows.deletes) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0));
304
+ let answersRequest = false;
305
+ if (hasMoreRows) {
306
+ answersRequest = this.pendingMoreRows > 0;
307
+ this.pendingMoreRows = Math.max(0, this.pendingMoreRows - 1);
308
+ this.serverMoreRows = result.MORE_ROWS;
309
+ }
310
+ if (this.serverMoreRows === undefined) {
311
+ return;
312
+ }
313
+ const emptyReply = answersRequest && result.MORE_ROWS === true && !((_e = result.ROW) === null || _e === void 0 ? void 0 : _e.length);
314
+ const status = dataserverPagingStatus({
315
+ moreRows: this.serverMoreRows,
316
+ emptyReply,
317
+ rowsHeld: this.viewRowCount,
318
+ maxView: this.maxView,
319
+ });
320
+ if (status === 'more' && this.pagingStopped === 'view-full') {
321
+ this.pagingStopped = undefined;
322
+ }
323
+ else if ((status === 'view-full' || status === 'stalled') && !this.pagingStopped) {
324
+ this.pagingStopped = status;
325
+ const warning = describeDataserverPagingStop({
326
+ status,
327
+ resourceName: this.resourceName,
328
+ rowsHeld: this.viewRowCount,
329
+ maxView: this.maxView,
330
+ emptyReply,
331
+ attribute: 'maxView',
332
+ });
333
+ if (warning) {
334
+ logger.warn(warning);
335
+ }
336
+ }
337
+ this.moreRowsAvailable = status === 'more' && !this.pagingStopped;
338
+ }
272
339
  updateRequestPagingState(result, rowCount, requestedOffset) {
273
340
  if (Array.isArray(result) || !result) {
274
341
  this.moreRowsAvailable = false;
@@ -977,6 +977,20 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
977
977
  * Whether the server reported more rows are available beyond the ones already fetched.
978
978
  */
979
979
  protected moreRowsAvailable: boolean;
980
+ /**
981
+ * How many DATASERVER MORE_ROWS sent by `requestMoreRows` are awaiting their reply, so a reply
982
+ * can be told apart from the logon batch.
983
+ */
984
+ private pendingMoreRows;
985
+ /** The latest MORE_ROWS the DATASERVER stream sent. */
986
+ private serverMoreRows;
987
+ /**
988
+ * Rows in the server's view, counted off the stream (INSERTs in, DELETEs out). Kept apart from
989
+ * the rendered rows, which a subclass may not trim on a DELETE.
990
+ */
991
+ private viewRowCount;
992
+ /** Set when DATASERVER paging stops short of MORE_ROWS false - see updateStreamPagingState. */
993
+ private pagingStopped;
980
994
  /**
981
995
  * The OFFSET to request the next page from, for REQUEST_SERVER paging.
982
996
  */
@@ -1029,6 +1043,14 @@ export declare abstract class BaseDatasource extends BaseDatasource_base {
1029
1043
  * response (with MORE_ROWS/NEXT_OFFSET paging metadata) remains available.
1030
1044
  */
1031
1045
  private filterSnapshotResult;
1046
+ /**
1047
+ * Re-evaluates paging from a stream message.
1048
+ * @remarks On DATASERVER, paging stops once the view is full at MAX_VIEW, as every further
1049
+ * MORE_ROWS would come back empty (see `dataserverPagingStatus`), or after a MORE_ROWS came back
1050
+ * empty while the view had room. It resumes when a full view shrinks, since GSF fills the freed
1051
+ * room on the next MORE_ROWS.
1052
+ */
1053
+ private updateStreamPagingState;
1032
1054
  private updateRequestPagingState;
1033
1055
  private initialRequestOffset;
1034
1056
  private datasourceOptions;
package/dist/react.cjs CHANGED
@@ -123,6 +123,11 @@ const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
123
123
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
124
124
  });
125
125
 
126
+ const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
127
+ const { children, ...rest } = props;
128
+ return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
129
+ });
130
+
126
131
  const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
127
132
  const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
128
133
  const _innerRef = React.useRef(null);
@@ -150,11 +155,6 @@ const Accordion = React.forwardRef(function Accordion(props, ref) {
150
155
  return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
151
156
  });
152
157
 
153
- const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
154
- const { children, ...rest } = props;
155
- return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
156
- });
157
-
158
158
  const Anchor = React.forwardRef(function Anchor(props, ref) {
159
159
  const { children, ...rest } = props;
160
160
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
@@ -1145,9 +1145,9 @@ const WeeklyRecurrence = React.forwardRef(function WeeklyRecurrence(props, ref)
1145
1145
  module.exports = {
1146
1146
  AccordionItem,
1147
1147
  ActionsMenu,
1148
+ AiIndicator,
1148
1149
  AiCriteriaSearch,
1149
1150
  Accordion,
1150
- AiIndicator,
1151
1151
  Anchor,
1152
1152
  AnchoredRegion,
1153
1153
  Avatar,
package/dist/react.mjs CHANGED
@@ -121,6 +121,11 @@ export const ActionsMenu = React.forwardRef(function ActionsMenu(props, ref) {
121
121
  return React.createElement(customElements.getName(ActionsMenuWC) ?? '%%prefix%%-actions-menu', { ...rest, ref }, children);
122
122
  });
123
123
 
124
+ export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
125
+ const { children, ...rest } = props;
126
+ return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
127
+ });
128
+
124
129
  export const AiCriteriaSearch = React.forwardRef(function AiCriteriaSearch(props, ref) {
125
130
  const { onCriteriaChanged, onValidationErrors, children, ...rest } = props;
126
131
  const _innerRef = React.useRef(null);
@@ -148,11 +153,6 @@ export const Accordion = React.forwardRef(function Accordion(props, ref) {
148
153
  return React.createElement(customElements.getName(AccordionWC) ?? '%%prefix%%-accordion', { ...rest, ref }, children);
149
154
  });
150
155
 
151
- export const AiIndicator = React.forwardRef(function AiIndicator(props, ref) {
152
- const { children, ...rest } = props;
153
- return React.createElement(customElements.getName(AiIndicatorWC) ?? '%%prefix%%-ai-indicator', { ...rest, ref }, children);
154
- });
155
-
156
156
  export const Anchor = React.forwardRef(function Anchor(props, ref) {
157
157
  const { children, ...rest } = props;
158
158
  return React.createElement(customElements.getName(AnchorWC) ?? '%%prefix%%-anchor', { ...rest, ref }, children);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "15.50.0",
4
+ "version": "15.50.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -82,12 +82,12 @@
82
82
  }
83
83
  },
84
84
  "devDependencies": {
85
- "@genesislcap/foundation-testing": "15.50.0",
86
- "@genesislcap/genx": "15.50.0",
87
- "@genesislcap/ts-builder": "15.50.0",
88
- "@genesislcap/uvu-playwright-builder": "15.50.0",
89
- "@genesislcap/vite-builder": "15.50.0",
90
- "@genesislcap/webpack-builder": "15.50.0",
85
+ "@genesislcap/foundation-testing": "15.50.2",
86
+ "@genesislcap/genx": "15.50.2",
87
+ "@genesislcap/ts-builder": "15.50.2",
88
+ "@genesislcap/uvu-playwright-builder": "15.50.2",
89
+ "@genesislcap/vite-builder": "15.50.2",
90
+ "@genesislcap/webpack-builder": "15.50.2",
91
91
  "copyfiles": "^2.4.1"
92
92
  },
93
93
  "dependencies": {
@@ -96,16 +96,16 @@
96
96
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
97
97
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
98
98
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
99
- "@genesislcap/expression-builder": "15.50.0",
100
- "@genesislcap/foundation-ai": "15.50.0",
101
- "@genesislcap/foundation-comms": "15.50.0",
102
- "@genesislcap/foundation-criteria": "15.50.0",
103
- "@genesislcap/foundation-errors": "15.50.0",
104
- "@genesislcap/foundation-events": "15.50.0",
105
- "@genesislcap/foundation-logger": "15.50.0",
106
- "@genesislcap/foundation-notifications": "15.50.0",
107
- "@genesislcap/foundation-user": "15.50.0",
108
- "@genesislcap/foundation-utils": "15.50.0",
99
+ "@genesislcap/expression-builder": "15.50.2",
100
+ "@genesislcap/foundation-ai": "15.50.2",
101
+ "@genesislcap/foundation-comms": "15.50.2",
102
+ "@genesislcap/foundation-criteria": "15.50.2",
103
+ "@genesislcap/foundation-errors": "15.50.2",
104
+ "@genesislcap/foundation-events": "15.50.2",
105
+ "@genesislcap/foundation-logger": "15.50.2",
106
+ "@genesislcap/foundation-notifications": "15.50.2",
107
+ "@genesislcap/foundation-user": "15.50.2",
108
+ "@genesislcap/foundation-utils": "15.50.2",
109
109
  "@microsoft/fast-colors": "5.3.1",
110
110
  "@microsoft/fast-components": "2.30.6",
111
111
  "@microsoft/fast-element": "1.14.0",