@refinitiv-ui/efx-grid 6.0.101 → 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/core/dist/core.js +289 -532
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataCache.d.ts +0 -12
- package/lib/core/es6/data/DataCache.js +11 -371
- package/lib/core/es6/data/WrappedView.d.ts +1 -0
- package/lib/core/es6/data/WrappedView.js +1 -0
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/LayoutGrid.d.ts +1 -0
- package/lib/core/es6/grid/LayoutGrid.js +25 -2
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +1 -0
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +24 -104
- package/lib/core/es6/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/core/es6/grid/util/CellBoundPainter.js +171 -0
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +30 -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/rt-grid/es6/RowDefinition.js +9 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +22 -8
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +8 -0
- package/lib/types/es6/Core/data/DataCache.d.ts +0 -12
- package/lib/types/es6/Core/data/WrappedView.d.ts +1 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +1 -0
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +1 -0
- package/lib/types/es6/Core/grid/util/CellBoundPainter.d.ts +16 -0
- package/lib/versions.json +2 -2
- 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
|
/**
|
@@ -1130,6 +1130,11 @@ RowDefinition.prototype._toRealTimeRow = function() {
|
|
1130
1130
|
this._parent = null;
|
1131
1131
|
this._depthLevel = 0;
|
1132
1132
|
|
1133
|
+
// Add static value to the new allocated row
|
1134
|
+
if(this._staticValues) {
|
1135
|
+
this.setRowData(this._staticValues);
|
1136
|
+
}
|
1137
|
+
|
1133
1138
|
this.subscribeForUpdates();
|
1134
1139
|
};
|
1135
1140
|
|
@@ -1148,8 +1153,12 @@ RowDefinition.prototype.unlinkChain = function() {
|
|
1148
1153
|
}
|
1149
1154
|
}
|
1150
1155
|
|
1156
|
+
let staticData = this._getStaticRowData();
|
1151
1157
|
this.unsubscribeForUpdates();
|
1152
1158
|
|
1159
|
+
// Restore static data
|
1160
|
+
this.setStaticRowData(staticData);
|
1161
|
+
|
1153
1162
|
let view = this._view;
|
1154
1163
|
if(view) {
|
1155
1164
|
let rid = this.getRowId();
|
@@ -474,8 +474,11 @@ CellSelectionPlugin.prototype._onMouseMove = function (e) {
|
|
474
474
|
}
|
475
475
|
var activeGrid = this._getActiveGrid();
|
476
476
|
var newMouse = activeGrid.getRelativePosition(e);
|
477
|
-
|
478
|
-
|
477
|
+
|
478
|
+
// Avoid cross section selection but scrolling is still working
|
479
|
+
if (this._anchor["sectionType"] === "title" && newMouse["sectionType"] !== "title") {
|
480
|
+
return;
|
481
|
+
} else if (this._anchor["sectionType"] === "content" && newMouse["sectionType"] === "title") {
|
479
482
|
return;
|
480
483
|
}
|
481
484
|
if (!newMouse['hit']) {
|
@@ -1158,17 +1161,24 @@ CellSelectionPlugin.prototype._updateSelection = function (tgtRect) {
|
|
1158
1161
|
var x = this._curRect.left;
|
1159
1162
|
var y = this._curRect.top;
|
1160
1163
|
var mapInfo = this._map[y];
|
1161
|
-
var contentType = mapInfo ? mapInfo.type === "content" : false;
|
1162
1164
|
var w = 0;
|
1163
1165
|
var h = 0;
|
1164
|
-
if (
|
1166
|
+
if (mapInfo) {
|
1165
1167
|
w = this._curRect.right - x;
|
1166
1168
|
h = this._curRect.bottom - y;
|
1167
1169
|
y -= mapInfo.rowOffset;
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1170
|
+
var contentType = mapInfo.type;
|
1171
|
+
if (contentType === "content") {
|
1172
|
+
var contentSect = activeGrid.getSection("content");
|
1173
|
+
if (contentSect) {
|
1174
|
+
contentSect.setCellBounds(x, y, w, h);
|
1175
|
+
}
|
1176
|
+
} else {
|
1177
|
+
var titleSect = activeGrid.getSection("title");
|
1178
|
+
if (titleSect) {
|
1179
|
+
titleSect.setCellBounds(x, y, w, h);
|
1180
|
+
}
|
1181
|
+
}
|
1172
1182
|
}
|
1173
1183
|
}
|
1174
1184
|
};
|
@@ -1359,6 +1369,10 @@ CellSelectionPlugin.prototype.deselectAll = function () {
|
|
1359
1369
|
if (contentSect) {
|
1360
1370
|
contentSect.setCellBounds(0, 0, 0, 0);
|
1361
1371
|
}
|
1372
|
+
var titleSect = activeGrid.getSection("title");
|
1373
|
+
if (titleSect) {
|
1374
|
+
titleSect.setCellBounds(0, 0, 0, 0);
|
1375
|
+
}
|
1362
1376
|
}
|
1363
1377
|
this._lastSelection = this.getSelectionBounds();
|
1364
1378
|
this._anchor = null;
|
@@ -1706,6 +1706,14 @@ RowFilteringPlugin._formatArrayExpression = function(exp, field, formatter) {
|
|
1706
1706
|
}
|
1707
1707
|
return null;
|
1708
1708
|
};
|
1709
|
+
/** For mocking dialog instance
|
1710
|
+
* @public
|
1711
|
+
* @ignore
|
1712
|
+
* @param {*} dialog
|
1713
|
+
*/
|
1714
|
+
RowFilteringPlugin.prototype.setDialog = function(dialog) {
|
1715
|
+
this._filterDialog = dialog;
|
1716
|
+
};
|
1709
1717
|
/** @public
|
1710
1718
|
* @param {number} colIndex
|
1711
1719
|
* @param {RowFilteringPlugin~FilterDialogOptions=} runtimeDialogOptions
|
@@ -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 {
|
@@ -11,6 +11,7 @@ import SelectionList from "./util/SelectionList.js";
|
|
11
11
|
import ILayoutGrid from "./ILayoutGrid.js";
|
12
12
|
import ElementWrapper from "./components/ElementWrapper.js";
|
13
13
|
import HScrollbar from "./components/HScrollbar.js";
|
14
|
+
import CellBoundPainter from "./util/CellBoundPainter.js";
|
14
15
|
|
15
16
|
declare class LayoutGrid extends ElementWrapper {
|
16
17
|
|
@@ -6,6 +6,7 @@ import ILayoutGrid from "./ILayoutGrid.js";
|
|
6
6
|
import LayoutGrid from "./LayoutGrid.js";
|
7
7
|
import ElementWrapper from "./components/ElementWrapper.js";
|
8
8
|
import HScrollbar from "./components/HScrollbar.js";
|
9
|
+
import CellBoundPainter from "./util/CellBoundPainter.js";
|
9
10
|
|
10
11
|
declare class VirtualizedLayoutGrid extends ElementWrapper {
|
11
12
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
declare class CellBoundPainter {
|
4
|
+
|
5
|
+
constructor(ctx: any);
|
6
|
+
|
7
|
+
public dispose(): void;
|
8
|
+
|
9
|
+
public setCellBounds(colIndex: number, rowIndex: number, width: number, height: number, colCount: number): void;
|
10
|
+
|
11
|
+
public updateCellBounds(): void;
|
12
|
+
|
13
|
+
}
|
14
|
+
|
15
|
+
export default CellBoundPainter;
|
16
|
+
export { CellBoundPainter };
|
package/lib/versions.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
"@grid/statistics-row": "1.0.17",
|
7
7
|
"@grid/zoom": "1.0.11",
|
8
8
|
"tr-grid-auto-tooltip": "1.1.6",
|
9
|
-
"tr-grid-cell-selection": "1.0.
|
9
|
+
"tr-grid-cell-selection": "1.0.38",
|
10
10
|
"tr-grid-checkbox": "1.0.67",
|
11
11
|
"tr-grid-column-fitter": "1.0.40",
|
12
12
|
"tr-grid-column-formatting": "0.9.36",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"tr-grid-percent-bar": "1.0.24",
|
25
25
|
"tr-grid-range-bar": "2.0.8",
|
26
26
|
"tr-grid-row-dragging": "1.0.35",
|
27
|
-
"tr-grid-row-filtering": "1.0.
|
27
|
+
"tr-grid-row-filtering": "1.0.76",
|
28
28
|
"tr-grid-row-grouping": "1.0.87",
|
29
29
|
"tr-grid-row-selection": "1.0.30",
|
30
30
|
"tr-grid-rowcoloring": "1.0.25",
|
package/package.json
CHANGED