@refinitiv-ui/efx-grid 6.0.102 → 6.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +21 -21
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/FieldDefinition.d.ts +1 -1
- package/lib/rt-grid/es6/FieldDefinition.js +21 -21
- package/lib/types/es6/Core/data/DataCache.d.ts +0 -12
- package/lib/types/es6/Core/data/WrappedView.d.ts +1 -0
- package/package.json +1 -1
@@ -12,7 +12,7 @@ declare namespace FieldDefinition {
|
|
12
12
|
|
13
13
|
function hasFieldInfo(field: string): boolean;
|
14
14
|
|
15
|
-
function getTimeSeriesChildren(field: string): any;
|
15
|
+
function getTimeSeriesChildren(field: string): any[]|null;
|
16
16
|
|
17
17
|
function addTimeSeriesChild(tsDef: string, childDef: any): void;
|
18
18
|
|
@@ -7,13 +7,28 @@ import { Deferred } from "../../tr-grid-util/es6/Deferred.js";
|
|
7
7
|
|
8
8
|
/** @type {string}
|
9
9
|
* @private
|
10
|
-
* @
|
10
|
+
* @constant
|
11
11
|
*/
|
12
12
|
const SYNAPSE_URL =
|
13
13
|
"/synapse/service/suggestions/suggest/?"
|
14
14
|
+ "hits=1" // search only 1 result
|
15
15
|
+ "&profile=" + encodeURIComponent("Field Selector");
|
16
16
|
|
17
|
+
/** @type {!RegExp}
|
18
|
+
* @private
|
19
|
+
* @constant
|
20
|
+
* @description
|
21
|
+
* ^TR. => start with TR.
|
22
|
+
* [\w]+ => any field with string and value
|
23
|
+
* [\(] => open bucket (
|
24
|
+
* [\w\-\=\,]* => any property name and follow by = EX. SDATE=2011-11-11, PRIOD=123123
|
25
|
+
* (?:EDATE|SDATE) => non-capturing group match EDATE or SDATE
|
26
|
+
* [\w\-\=\,]+ => another propertie param
|
27
|
+
* [\)]$ => end with only )
|
28
|
+
* i => for match both upper and lower cases
|
29
|
+
*/
|
30
|
+
const TimeSeriesRegEx = /^TR\.[\w]+\([\w\-\=\,]*(?:EDATE|SDATE)\=+[\w\-\=\,]*[ \w]*\)$/i;
|
31
|
+
|
17
32
|
/* @namespace */
|
18
33
|
let FieldDefinition = {};
|
19
34
|
|
@@ -192,10 +207,10 @@ FieldDefinition.hasFieldInfo = function(field) {
|
|
192
207
|
/** @public
|
193
208
|
* @function
|
194
209
|
* @param {string} field
|
195
|
-
* @return {
|
210
|
+
* @return {Array}
|
196
211
|
*/
|
197
212
|
FieldDefinition.getTimeSeriesChildren = function(field) {
|
198
|
-
return FieldDefinition._timeSeriesChildren[field];
|
213
|
+
return FieldDefinition._timeSeriesChildren[field] || null;
|
199
214
|
};
|
200
215
|
/** @public
|
201
216
|
* @function
|
@@ -256,7 +271,7 @@ FieldDefinition.isRealTimeField = function(field) {
|
|
256
271
|
return false;
|
257
272
|
}
|
258
273
|
|
259
|
-
if(FieldDefinition.isAdc(field)) {
|
274
|
+
if(FieldDefinition.isAdc(field)) { // Note that all TimeSeries fields are ADC field
|
260
275
|
return false;
|
261
276
|
}
|
262
277
|
|
@@ -268,10 +283,6 @@ FieldDefinition.isRealTimeField = function(field) {
|
|
268
283
|
return false;
|
269
284
|
}
|
270
285
|
|
271
|
-
if(FieldDefinition.isTimeSeries(field)) {
|
272
|
-
return false;
|
273
|
-
}
|
274
|
-
|
275
286
|
return FieldDefinition.getFieldProperty(field, "IsRealtimeField") !== false;
|
276
287
|
};
|
277
288
|
|
@@ -300,21 +311,10 @@ FieldDefinition.isTimeSeries = function (field) {
|
|
300
311
|
// We can check time series using a cache to avoid duplicating checks in regular expressions.
|
301
312
|
let timeSeriesField = FieldDefinition.getFieldProperty(field, "timeSeries");
|
302
313
|
if (timeSeriesField != null) {
|
303
|
-
return timeSeriesField;
|
314
|
+
return timeSeriesField ? true : false;
|
304
315
|
}
|
305
316
|
|
306
|
-
|
307
|
-
^TR. => start with TR.
|
308
|
-
[\w]+ => any field with string and value
|
309
|
-
[\(] => open bucket (
|
310
|
-
[\w\-\=\,]* => any property name and follow by = EX. SDATE=2011-11-11, PRIOD=123123
|
311
|
-
(?:EDATE|SDATE ) => non-capturing group match EDATE or SDATE
|
312
|
-
[\w\-\=\,]+ => another propertie param
|
313
|
-
[\)]$ => end with only )
|
314
|
-
i => for match both upper and lower cases
|
315
|
-
*/
|
316
|
-
let timeSeriesRegex = /^TR\.[\w]+\([\w\-\=\,]*(?:EDATE|SDATE)\=+[\w\-\=\,]*[ \w]*\)$/i;
|
317
|
-
return timeSeriesRegex.test(field);
|
317
|
+
return TimeSeriesRegEx.test(field);
|
318
318
|
};
|
319
319
|
|
320
320
|
/**
|
@@ -45,8 +45,6 @@ declare class DataCache extends EventDispatcher {
|
|
45
45
|
|
46
46
|
public setData(rid: string, cid: string, value: any): boolean;
|
47
47
|
|
48
|
-
public hasDataCloudData(rid: string): boolean;
|
49
|
-
|
50
48
|
public setRowData(rid: string, values?: { [key: string]: any }|null, opt_eventArg?: any): boolean;
|
51
49
|
|
52
50
|
public cloneRowData(rid: string): any;
|
@@ -63,19 +61,9 @@ declare class DataCache extends EventDispatcher {
|
|
63
61
|
|
64
62
|
public log(opt_options?: any): void;
|
65
63
|
|
66
|
-
public setDataCloudSettings(userId: string, productId: string, url: string, opt_lang?: string|null): void;
|
67
|
-
|
68
|
-
public getDataCloudFields(): (string)[]|null;
|
69
|
-
|
70
|
-
public addDataCloudFields(fields: (string)[]|string|null): boolean;
|
71
|
-
|
72
|
-
public removeDataCloudField(field: string): boolean;
|
73
|
-
|
74
64
|
}
|
75
65
|
|
76
66
|
declare function cid(rid: string, cid: string): any;
|
77
67
|
|
78
|
-
declare function ricMap(field: string): boolean;
|
79
|
-
|
80
68
|
export default DataCache;
|
81
69
|
export { DataCache };
|
@@ -2,6 +2,7 @@ import Ext from "../../../../tr-grid-util/es6/Ext.js";
|
|
2
2
|
import EventDispatcher from "../grid/event/EventDispatcher.js";
|
3
3
|
import DataView from "./DataView.js"; // eslint-disable-line
|
4
4
|
import DataTable from "./DataTable.js"; // eslint-disable-line
|
5
|
+
import DataCache from "./DataCache.js"; // eslint-disable-line
|
5
6
|
import ColumnStats from "./ColumnStats.js"; // eslint-disable-line
|
6
7
|
|
7
8
|
declare namespace WrappedView {
|
package/package.json
CHANGED