@genesislcap/foundation-comms 14.102.0 → 14.103.0-auth-mf.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/dts/datasource/criteriaFiltersToFields.d.ts +28 -2
- package/dist/dts/datasource/criteriaFiltersToFields.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.d.ts.map +1 -1
- package/dist/dts/datasource/datasource.types.d.ts +4 -0
- package/dist/dts/datasource/datasource.types.d.ts.map +1 -1
- package/dist/esm/datasource/criteriaFiltersToFields.js +71 -8
- package/dist/esm/datasource/datasource.js +2 -1
- package/dist/foundation-comms.api.json +28 -1
- package/dist/foundation-comms.d.ts +32 -2
- package/docs/api/foundation-comms.criteriafilterstofields.md +25 -1
- package/docs/api/foundation-comms.datasourceoptions.disablepolling.md +13 -0
- package/docs/api/foundation-comms.datasourceoptions.md +1 -0
- package/docs/api-report.md +1 -0
- package/package.json +6 -6
@@ -5,8 +5,34 @@
|
|
5
5
|
*
|
6
6
|
* @public
|
7
7
|
* @remarks
|
8
|
-
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
9
|
-
*
|
8
|
+
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
9
|
+
* from a grid to a request fields object. Date/datetime groovy expressions will
|
10
|
+
* append `_FROM` and `_TO` onto field names appropriately
|
11
|
+
*
|
12
|
+
* eg: converts
|
13
|
+
*
|
14
|
+
* ```
|
15
|
+
* foo == 'bar' &&
|
16
|
+
* asd == 'zxc' &&
|
17
|
+
* Expr.containsIgnoreCase(FIELD, 'abc') &&
|
18
|
+
* Expr.dateIsToday(DATE) &&
|
19
|
+
* Expr.dateTimeIsGreaterEqual(DATETIME, '20231110-03:23') &&
|
20
|
+
* Expr.dateTimeIsLessEqual(DATETIME, '20231115-03:23')
|
21
|
+
* ```
|
22
|
+
*
|
23
|
+
* into
|
24
|
+
*
|
25
|
+
* ```
|
26
|
+
* {
|
27
|
+
* foo: 'bar',
|
28
|
+
* asd: 'zxc',
|
29
|
+
* FIELD: '*abc*',
|
30
|
+
* DATE_FROM: '20231110-00:00',
|
31
|
+
* DATE_TO: '20231111-00:00',
|
32
|
+
* DATETIME_FROM: '20231110-03:23',
|
33
|
+
* DATETIME_TO: '20231115-03:23',
|
34
|
+
* }
|
35
|
+
* ```
|
10
36
|
*/
|
11
37
|
export declare function criteriaFiltersToFields(filters: string): Record<string, string>;
|
12
38
|
//# sourceMappingURL=criteriaFiltersToFields.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"criteriaFiltersToFields.d.ts","sourceRoot":"","sources":["../../../src/datasource/criteriaFiltersToFields.ts"],"names":[],"mappings":"AAAA
|
1
|
+
{"version":3,"file":"criteriaFiltersToFields.d.ts","sourceRoot":"","sources":["../../../src/datasource/criteriaFiltersToFields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoD/E"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,
|
1
|
+
{"version":3,"file":"datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,WAAW,EACX,cAAc,EAEd,mBAAmB,EACpB,MAAM,4BAA4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AAE,OAAO,EACnB,IAAI,EAAE,IAAI,EACY,MAAM,mBAA0B;IAGjE,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO;IAOjD,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,SAAS,GAAE,OAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAqCnF,MAAM;IAUN,IACI,MAAM,IAAI,gBAAgB,CAAC,wBAAwB,GAAG,mBAAmB,CAAC,CAE7E;IAED,IAAI,MAAM,QA4BT;IAEK,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC;IA2B5B,gBAAgB,CAAC,KAAK,GAAE,MAAkB;YAYlC,YAAY;YAeZ,sBAAsB;IAMpC,OAAO,CAAC,kBAAkB;CAY3B;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,kEAAwE,CAAC"}
|
@@ -75,6 +75,10 @@ export interface DatasourceOptions {
|
|
75
75
|
* @remarks in milliseconds
|
76
76
|
*/
|
77
77
|
pollingInterval?: number;
|
78
|
+
/**
|
79
|
+
* Whether to disable polling when using request/reply
|
80
|
+
*/
|
81
|
+
disablePolling?: boolean;
|
78
82
|
/**
|
79
83
|
* The field to use for sorting the data.
|
80
84
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"datasource.types.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,oBAAY,YAAY;IACtB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;C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C,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAAC;CAC/F;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,wEAAyC,CAAC"}
|
1
|
+
{"version":3,"file":"datasource.types.d.ts","sourceRoot":"","sources":["../../../src/datasource/datasource.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,oBAAY,YAAY;IACtB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C;;OAEG;IACH,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,EAAE,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,QAAQ,CAAC,YAAY,OAAO;IACnC,MAAM,CAAC,QAAQ,CAAC,aAAa,QAAQ;IACrC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,SAAS;IACpD,MAAM,CAAC,QAAQ,CAAC,iBAAiB,aAAa;IAC9C,MAAM,CAAC,QAAQ,CAAC,qBAAqB,eAAe;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAAC;CAC/F;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,wEAAyC,CAAC"}
|
@@ -5,19 +5,82 @@
|
|
5
5
|
*
|
6
6
|
* @public
|
7
7
|
* @remarks
|
8
|
-
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
9
|
-
*
|
8
|
+
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
9
|
+
* from a grid to a request fields object. Date/datetime groovy expressions will
|
10
|
+
* append `_FROM` and `_TO` onto field names appropriately
|
11
|
+
*
|
12
|
+
* eg: converts
|
13
|
+
*
|
14
|
+
* ```
|
15
|
+
* foo == 'bar' &&
|
16
|
+
* asd == 'zxc' &&
|
17
|
+
* Expr.containsIgnoreCase(FIELD, 'abc') &&
|
18
|
+
* Expr.dateIsToday(DATE) &&
|
19
|
+
* Expr.dateTimeIsGreaterEqual(DATETIME, '20231110-03:23') &&
|
20
|
+
* Expr.dateTimeIsLessEqual(DATETIME, '20231115-03:23')
|
21
|
+
* ```
|
22
|
+
*
|
23
|
+
* into
|
24
|
+
*
|
25
|
+
* ```
|
26
|
+
* {
|
27
|
+
* foo: 'bar',
|
28
|
+
* asd: 'zxc',
|
29
|
+
* FIELD: '*abc*',
|
30
|
+
* DATE_FROM: '20231110-00:00',
|
31
|
+
* DATE_TO: '20231111-00:00',
|
32
|
+
* DATETIME_FROM: '20231110-03:23',
|
33
|
+
* DATETIME_TO: '20231115-03:23',
|
34
|
+
* }
|
35
|
+
* ```
|
10
36
|
*/
|
11
37
|
export function criteriaFiltersToFields(filters) {
|
12
38
|
const criteria = filters.split('&&').map((s) => s.trim());
|
13
39
|
const reqFields = {};
|
14
40
|
criteria.forEach((c) => {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
41
|
+
if (c.startsWith('Expr')) {
|
42
|
+
switch (c.match(/Expr\.(\w+)\(/)[1]) {
|
43
|
+
case 'dateIsToday':
|
44
|
+
{
|
45
|
+
const fieldNameMatcher = /Expr\.dateIsToday\((\w+)\)/;
|
46
|
+
const [, fieldName] = c.match(fieldNameMatcher);
|
47
|
+
const date = new Date();
|
48
|
+
reqFields[`${fieldName}_FROM`] = `${date.toISOString().replace(/-/g, '').split('T')[0]}-00:00`;
|
49
|
+
date.setDate(date.getDate() + 1);
|
50
|
+
reqFields[`${fieldName}_TO`] = `${date.toISOString().replace(/-/g, '').split('T')[0]}-00:00`;
|
51
|
+
}
|
52
|
+
break;
|
53
|
+
case 'dateTimeIsGreaterEqual':
|
54
|
+
{
|
55
|
+
const fieldNameValueMatcher = /Expr\.dateTimeIsGreaterEqual\((\w+), ?['"](.+)['"]\)/;
|
56
|
+
const [, fieldName, value] = c.match(fieldNameValueMatcher);
|
57
|
+
reqFields[`${fieldName}_FROM`] = value;
|
58
|
+
}
|
59
|
+
break;
|
60
|
+
case 'dateTimeIsLessEqual':
|
61
|
+
{
|
62
|
+
const fieldNameValueMatcher = /Expr\.dateTimeIsLessEqual\((\w+), ?['"](.+)['"]\)/;
|
63
|
+
const [, fieldName, value] = c.match(fieldNameValueMatcher);
|
64
|
+
reqFields[`${fieldName}_TO`] = value;
|
65
|
+
}
|
66
|
+
break;
|
67
|
+
case 'containsIgnoreCase':
|
68
|
+
{
|
69
|
+
const fieldNameValueMatcher = /Expr\.containsIgnoreCase\((\w+), ?['"](.+)['"]\)/;
|
70
|
+
const [, fieldName, value] = c.match(fieldNameValueMatcher);
|
71
|
+
reqFields[fieldName] = `*${value}*`;
|
72
|
+
}
|
73
|
+
break;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
const key = c.substr(0, c.indexOf('=')).trim().replace(/["']/g, '');
|
78
|
+
const val = c
|
79
|
+
.substr(c.lastIndexOf('=') + 1, c.length)
|
80
|
+
.trim()
|
81
|
+
.replace(/["']/g, '');
|
82
|
+
reqFields[key] = val;
|
83
|
+
}
|
21
84
|
});
|
22
85
|
return reqFields;
|
23
86
|
}
|
@@ -103,6 +103,7 @@ let DefaultDatasource = class DefaultDatasource {
|
|
103
103
|
MAX_VIEW: this.options.maxView,
|
104
104
|
MOVING_VIEW: this.options.movingView,
|
105
105
|
POLLING_INTERVAL: this.options.pollingInterval,
|
106
|
+
DISABLE_POLLING: this.options.disablePolling,
|
106
107
|
REQUEST: this.options.request,
|
107
108
|
REVERSE: this.options.reverse,
|
108
109
|
};
|
@@ -173,7 +174,7 @@ let DefaultDatasource = class DefaultDatasource {
|
|
173
174
|
});
|
174
175
|
}
|
175
176
|
createReqRepStream() {
|
176
|
-
return timer(0, this.params.POLLING_INTERVAL).pipe(switchMap(() => {
|
177
|
+
return timer(0, this.params.DISABLE_POLLING ? undefined : this.params.POLLING_INTERVAL).pipe(switchMap(() => {
|
177
178
|
// Combine the isConnected status with the isLoggedIn status
|
178
179
|
return combineLatest([this.connect.isConnected$, this.auth.isLoggedIn$]).pipe(
|
179
180
|
// Use takeWhile to continue polling until isConnected becomes false or isLoggedIn becomes false
|
@@ -3223,7 +3223,7 @@
|
|
3223
3223
|
{
|
3224
3224
|
"kind": "Function",
|
3225
3225
|
"canonicalReference": "@genesislcap/foundation-comms!criteriaFiltersToFields:function(1)",
|
3226
|
-
"docComment": "/**\n * Criteria filters to fields.\n *\n * @remarks\n *\n * For filtering REQUEST_SERVER resources. Maps concatenated criteria filters from a grid to a request fields object
|
3226
|
+
"docComment": "/**\n * Criteria filters to fields.\n *\n * @remarks\n *\n * For filtering REQUEST_SERVER resources. Maps concatenated criteria filters from a grid to a request fields object. Date/datetime groovy expressions will append `_FROM` and `_TO` onto field names appropriately\n *\n * eg: converts\n * ```\n * foo == 'bar' &&\n * asd == 'zxc' &&\n * Expr.containsIgnoreCase(FIELD, 'abc') &&\n * Expr.dateIsToday(DATE) &&\n * Expr.dateTimeIsGreaterEqual(DATETIME, '20231110-03:23') &&\n * Expr.dateTimeIsLessEqual(DATETIME, '20231115-03:23')\n * ```\n *\n * into\n * ```\n * {\n * foo: 'bar',\n * asd: 'zxc',\n * FIELD: '*abc*',\n * DATE_FROM: '20231110-00:00',\n * DATE_TO: '20231111-00:00',\n * DATETIME_FROM: '20231110-03:23',\n * DATETIME_TO: '20231115-03:23',\n * }\n * ```\n *\n * @param filters - Concatenated criteria filters.\n *\n * @public\n */\n",
|
3227
3227
|
"excerptTokens": [
|
3228
3228
|
{
|
3229
3229
|
"kind": "Content",
|
@@ -4996,6 +4996,33 @@
|
|
4996
4996
|
"endIndex": 2
|
4997
4997
|
}
|
4998
4998
|
},
|
4999
|
+
{
|
5000
|
+
"kind": "PropertySignature",
|
5001
|
+
"canonicalReference": "@genesislcap/foundation-comms!DatasourceOptions#disablePolling:member",
|
5002
|
+
"docComment": "/**\n * Whether to disable polling when using request/reply\n */\n",
|
5003
|
+
"excerptTokens": [
|
5004
|
+
{
|
5005
|
+
"kind": "Content",
|
5006
|
+
"text": "disablePolling?: "
|
5007
|
+
},
|
5008
|
+
{
|
5009
|
+
"kind": "Content",
|
5010
|
+
"text": "boolean"
|
5011
|
+
},
|
5012
|
+
{
|
5013
|
+
"kind": "Content",
|
5014
|
+
"text": ";"
|
5015
|
+
}
|
5016
|
+
],
|
5017
|
+
"isReadonly": false,
|
5018
|
+
"isOptional": true,
|
5019
|
+
"releaseTag": "Public",
|
5020
|
+
"name": "disablePolling",
|
5021
|
+
"propertyTypeTokenRange": {
|
5022
|
+
"startIndex": 1,
|
5023
|
+
"endIndex": 2
|
5024
|
+
}
|
5025
|
+
},
|
4999
5026
|
{
|
5000
5027
|
"kind": "PropertySignature",
|
5001
5028
|
"canonicalReference": "@genesislcap/foundation-comms!DatasourceOptions#fields:member",
|
@@ -592,8 +592,34 @@ export declare const credentialSeparator = ":";
|
|
592
592
|
*
|
593
593
|
* @public
|
594
594
|
* @remarks
|
595
|
-
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
596
|
-
*
|
595
|
+
* For filtering REQUEST_SERVER resources. Maps concatenated criteria filters
|
596
|
+
* from a grid to a request fields object. Date/datetime groovy expressions will
|
597
|
+
* append `_FROM` and `_TO` onto field names appropriately
|
598
|
+
*
|
599
|
+
* eg: converts
|
600
|
+
*
|
601
|
+
* ```
|
602
|
+
* foo == 'bar' &&
|
603
|
+
* asd == 'zxc' &&
|
604
|
+
* Expr.containsIgnoreCase(FIELD, 'abc') &&
|
605
|
+
* Expr.dateIsToday(DATE) &&
|
606
|
+
* Expr.dateTimeIsGreaterEqual(DATETIME, '20231110-03:23') &&
|
607
|
+
* Expr.dateTimeIsLessEqual(DATETIME, '20231115-03:23')
|
608
|
+
* ```
|
609
|
+
*
|
610
|
+
* into
|
611
|
+
*
|
612
|
+
* ```
|
613
|
+
* {
|
614
|
+
* foo: 'bar',
|
615
|
+
* asd: 'zxc',
|
616
|
+
* FIELD: '*abc*',
|
617
|
+
* DATE_FROM: '20231110-00:00',
|
618
|
+
* DATE_TO: '20231111-00:00',
|
619
|
+
* DATETIME_FROM: '20231110-03:23',
|
620
|
+
* DATETIME_TO: '20231115-03:23',
|
621
|
+
* }
|
622
|
+
* ```
|
597
623
|
*/
|
598
624
|
export declare function criteriaFiltersToFields(filters: string): Record<string, string>;
|
599
625
|
|
@@ -866,6 +892,10 @@ export declare interface DatasourceOptions {
|
|
866
892
|
* @remarks in milliseconds
|
867
893
|
*/
|
868
894
|
pollingInterval?: number;
|
895
|
+
/**
|
896
|
+
* Whether to disable polling when using request/reply
|
897
|
+
*/
|
898
|
+
disablePolling?: boolean;
|
869
899
|
/**
|
870
900
|
* The field to use for sorting the data.
|
871
901
|
*/
|
@@ -24,5 +24,29 @@ Record<string, string>
|
|
24
24
|
|
25
25
|
## Remarks
|
26
26
|
|
27
|
-
For filtering REQUEST\_SERVER resources. Maps concatenated criteria filters from a grid to a request fields object
|
27
|
+
For filtering REQUEST\_SERVER resources. Maps concatenated criteria filters from a grid to a request fields object. Date/datetime groovy expressions will append `_FROM` and `_TO` onto field names appropriately
|
28
|
+
|
29
|
+
eg: converts
|
30
|
+
|
31
|
+
```
|
32
|
+
foo == 'bar' &&
|
33
|
+
asd == 'zxc' &&
|
34
|
+
Expr.containsIgnoreCase(FIELD, 'abc') &&
|
35
|
+
Expr.dateIsToday(DATE) &&
|
36
|
+
Expr.dateTimeIsGreaterEqual(DATETIME, '20231110-03:23') &&
|
37
|
+
Expr.dateTimeIsLessEqual(DATETIME, '20231115-03:23')
|
38
|
+
```
|
39
|
+
into
|
40
|
+
|
41
|
+
```
|
42
|
+
{
|
43
|
+
foo: 'bar',
|
44
|
+
asd: 'zxc',
|
45
|
+
FIELD: '*abc*',
|
46
|
+
DATE_FROM: '20231110-00:00',
|
47
|
+
DATE_TO: '20231111-00:00',
|
48
|
+
DATETIME_FROM: '20231110-03:23',
|
49
|
+
DATETIME_TO: '20231115-03:23',
|
50
|
+
}
|
51
|
+
```
|
28
52
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-comms](./foundation-comms.md) > [DatasourceOptions](./foundation-comms.datasourceoptions.md) > [disablePolling](./foundation-comms.datasourceoptions.disablepolling.md)
|
4
|
+
|
5
|
+
## DatasourceOptions.disablePolling property
|
6
|
+
|
7
|
+
Whether to disable polling when using request/reply
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
disablePolling?: boolean;
|
13
|
+
```
|
@@ -17,6 +17,7 @@ export interface DatasourceOptions
|
|
17
17
|
| Property | Modifiers | Type | Description |
|
18
18
|
| --- | --- | --- | --- |
|
19
19
|
| [criteria?](./foundation-comms.datasourceoptions.criteria.md) | | string | _(Optional)_ The criteria used to filter data in the datasource. |
|
20
|
+
| [disablePolling?](./foundation-comms.datasourceoptions.disablepolling.md) | | boolean | _(Optional)_ Whether to disable polling when using request/reply |
|
20
21
|
| [fields?](./foundation-comms.datasourceoptions.fields.md) | | string | _(Optional)_ The fields to include in the returned data. |
|
21
22
|
| [isSnapshot?](./foundation-comms.datasourceoptions.issnapshot.md) | | boolean | _(Optional)_ Whether the datasource is a snapshot or not. |
|
22
23
|
| [maxRows?](./foundation-comms.datasourceoptions.maxrows.md) | | number | _(Optional)_ The maximum number of rows to return from the datasource. |
|
package/docs/api-report.md
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genesislcap/foundation-comms",
|
3
3
|
"description": "Genesis Foundation UI Comms",
|
4
|
-
"version": "14.
|
4
|
+
"version": "14.103.0-auth-mf.23",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -59,8 +59,8 @@
|
|
59
59
|
"test:debug": "genx test --debug"
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@genesislcap/foundation-testing": "14.
|
63
|
-
"@genesislcap/genx": "14.
|
62
|
+
"@genesislcap/foundation-testing": "14.103.0-auth-mf.23",
|
63
|
+
"@genesislcap/genx": "14.103.0-auth-mf.23",
|
64
64
|
"@types/js-cookie": "^3.0.2",
|
65
65
|
"@types/json-schema": "^7.0.11",
|
66
66
|
"@types/webappsec-credential-management": "^0.6.2",
|
@@ -68,8 +68,8 @@
|
|
68
68
|
},
|
69
69
|
"dependencies": {
|
70
70
|
"@finos/fdc3": "^1.2.0",
|
71
|
-
"@genesislcap/foundation-logger": "14.
|
72
|
-
"@genesislcap/foundation-utils": "14.
|
71
|
+
"@genesislcap/foundation-logger": "14.103.0-auth-mf.23",
|
72
|
+
"@genesislcap/foundation-utils": "14.103.0-auth-mf.23",
|
73
73
|
"@microsoft/fast-element": "^1.7.0",
|
74
74
|
"@microsoft/fast-foundation": "^2.33.2",
|
75
75
|
"analytics": "^0.8.0",
|
@@ -86,5 +86,5 @@
|
|
86
86
|
"publishConfig": {
|
87
87
|
"access": "public"
|
88
88
|
},
|
89
|
-
"gitHead": "
|
89
|
+
"gitHead": "66e311fb26ce45f26e0083e7075e73948e1765e9"
|
90
90
|
}
|