@refinitiv-ui/efx-grid 6.0.57 → 6.0.59
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 +25 -4
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataTable.js +8 -0
- package/lib/core/es6/grid/Core.js +3 -1
- package/lib/core/es6/grid/event/EventListeners.js +3 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +3 -3
- package/lib/core/es6/grid/util/TrackLayout.d.ts +2 -0
- package/lib/core/es6/grid/util/TrackLayout.js +8 -0
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +48 -16
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +3 -3
- package/lib/rt-grid/es6/Grid.js +16 -8
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +3 -1
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +64 -8
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +35 -5
- package/lib/tr-grid-util/es6/ElementObserver.js +4 -2
- package/lib/tr-grid-util/es6/ElementWrapper.js +3 -2
- package/lib/tr-grid-util/es6/GridPlugin.js +5 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +4 -2
- package/lib/tr-grid-util/es6/SubTable.js +136 -72
- package/lib/tr-grid-util/es6/Table.d.ts +25 -10
- package/lib/tr-grid-util/es6/Table.js +103 -78
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +1 -1
- package/lib/types/es6/ColumnStack.d.ts +3 -1
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +3 -3
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -126,6 +126,7 @@ DataTable.prototype.dispose = function() {
|
|
126
126
|
|
127
127
|
this._compMap = null; // Release user function that may be bound
|
128
128
|
this._clsSource = null;
|
129
|
+
DataTable._removeIndexArray();
|
129
130
|
if(this._segments) {
|
130
131
|
this._segments.dispose();
|
131
132
|
this._segments = null;
|
@@ -1939,6 +1940,13 @@ DataTable._createIndexArray = function(len) {
|
|
1939
1940
|
}
|
1940
1941
|
return ary.slice(); // Fastest way to clone an array is to perform slice() method
|
1941
1942
|
};
|
1943
|
+
/** Remove _idxAryMap and _idAryCount
|
1944
|
+
* @private
|
1945
|
+
*/
|
1946
|
+
DataTable._removeIndexArray = function() {
|
1947
|
+
DataTable._idxAryMap = {};
|
1948
|
+
DataTable._idxAryCount = 0;
|
1949
|
+
};
|
1942
1950
|
/** @private
|
1943
1951
|
* @type {Object.<number, Array.<number>>}
|
1944
1952
|
*/
|
@@ -562,7 +562,7 @@ Core.prototype._batches = null;
|
|
562
562
|
* @return {string}
|
563
563
|
*/
|
564
564
|
Core.getVersion = function () {
|
565
|
-
return "5.1.
|
565
|
+
return "5.1.74";
|
566
566
|
};
|
567
567
|
/** {@link ElementWrapper#dispose}
|
568
568
|
* @override
|
@@ -617,6 +617,8 @@ Core.prototype.dispose = function () {
|
|
617
617
|
this._columnBoundConflator.dispose();
|
618
618
|
this._columnPositionConflator.dispose();
|
619
619
|
this._rowPositionConflator.dispose();
|
620
|
+
this._layoutX.dispose();
|
621
|
+
this._layoutY.dispose();
|
620
622
|
|
621
623
|
|
622
624
|
// Clean Top node
|
@@ -83,6 +83,9 @@ EventListeners.prototype.dispatch = function (eventArg) {
|
|
83
83
|
this._listeners[i](eventArg);
|
84
84
|
}
|
85
85
|
|
86
|
+
if(this._sender !== null) {
|
87
|
+
eventArg["sender"] = null; // Clear ref variable to prevent memory leak
|
88
|
+
}
|
86
89
|
this._dispatching = false;
|
87
90
|
};
|
88
91
|
/** @public
|
@@ -781,9 +781,9 @@ SortableTitlePlugin.prototype.sortColumns = function (sortOptions, opt_arg) {
|
|
781
781
|
var states = [];
|
782
782
|
for (var i = 0; i < sortOptions.length; i++) {
|
783
783
|
var opt = sortOptions[i];
|
784
|
-
var colRef = opt["
|
785
|
-
if(colRef
|
786
|
-
colRef = opt["
|
784
|
+
var colRef = opt["colId"] || opt["field"];
|
785
|
+
if(colRef == null) {
|
786
|
+
colRef = opt["colIndex"];
|
787
787
|
}
|
788
788
|
var state = this._prepareSorting(
|
789
789
|
colRef,
|
@@ -76,6 +76,14 @@ TrackLayout.prototype.hitTest = function (val) {
|
|
76
76
|
return hitIndex;
|
77
77
|
};
|
78
78
|
|
79
|
+
/**
|
80
|
+
* @public
|
81
|
+
*/
|
82
|
+
TrackLayout.prototype.dispose = function () {
|
83
|
+
// TODO: Column dragging extension refers to this variable, so the reference instance should be deleted instead of set a new pointer
|
84
|
+
this._cols = this._ends = null;
|
85
|
+
};
|
86
|
+
|
79
87
|
/** If optional index is not given, the entire track is taken into account
|
80
88
|
* @public
|
81
89
|
* @param {number=} opt_index
|
package/lib/grid/index.js
CHANGED
@@ -8227,6 +8227,9 @@ EventListeners.prototype.dispatch = function (eventArg) {
|
|
8227
8227
|
this._listeners[i](eventArg);
|
8228
8228
|
}
|
8229
8229
|
|
8230
|
+
if(this._sender !== null) {
|
8231
|
+
eventArg["sender"] = null; // Clear ref variable to prevent memory leak
|
8232
|
+
}
|
8230
8233
|
this._dispatching = false;
|
8231
8234
|
};
|
8232
8235
|
/** @public
|
@@ -11299,6 +11302,7 @@ DataTable.prototype.dispose = function() {
|
|
11299
11302
|
|
11300
11303
|
this._compMap = null; // Release user function that may be bound
|
11301
11304
|
this._clsSource = null;
|
11305
|
+
DataTable._removeIndexArray();
|
11302
11306
|
if(this._segments) {
|
11303
11307
|
this._segments.dispose();
|
11304
11308
|
this._segments = null;
|
@@ -13112,6 +13116,13 @@ DataTable._createIndexArray = function(len) {
|
|
13112
13116
|
}
|
13113
13117
|
return ary.slice(); // Fastest way to clone an array is to perform slice() method
|
13114
13118
|
};
|
13119
|
+
/** Remove _idxAryMap and _idAryCount
|
13120
|
+
* @private
|
13121
|
+
*/
|
13122
|
+
DataTable._removeIndexArray = function() {
|
13123
|
+
DataTable._idxAryMap = {};
|
13124
|
+
DataTable._idxAryCount = 0;
|
13125
|
+
};
|
13115
13126
|
/** @private
|
13116
13127
|
* @type {Object.<number, Array.<number>>}
|
13117
13128
|
*/
|
@@ -18984,6 +18995,14 @@ TrackLayout.prototype.hitTest = function (val) {
|
|
18984
18995
|
return hitIndex;
|
18985
18996
|
};
|
18986
18997
|
|
18998
|
+
/**
|
18999
|
+
* @public
|
19000
|
+
*/
|
19001
|
+
TrackLayout.prototype.dispose = function () {
|
19002
|
+
// TODO: Column dragging extension refers to this variable, so the reference instance should be deleted instead of set a new pointer
|
19003
|
+
this._cols = this._ends = null;
|
19004
|
+
};
|
19005
|
+
|
18987
19006
|
/** If optional index is not given, the entire track is taken into account
|
18988
19007
|
* @public
|
18989
19008
|
* @param {number=} opt_index
|
@@ -36127,7 +36146,7 @@ Core.prototype._batches = null;
|
|
36127
36146
|
* @return {string}
|
36128
36147
|
*/
|
36129
36148
|
Core.getVersion = function () {
|
36130
|
-
return "5.1.
|
36149
|
+
return "5.1.73";
|
36131
36150
|
};
|
36132
36151
|
/** {@link ElementWrapper#dispose}
|
36133
36152
|
* @override
|
@@ -36182,6 +36201,8 @@ Core.prototype.dispose = function () {
|
|
36182
36201
|
this._columnBoundConflator.dispose();
|
36183
36202
|
this._columnPositionConflator.dispose();
|
36184
36203
|
this._rowPositionConflator.dispose();
|
36204
|
+
this._layoutX.dispose();
|
36205
|
+
this._layoutY.dispose();
|
36185
36206
|
|
36186
36207
|
|
36187
36208
|
// Clean Top node
|
@@ -40010,18 +40031,21 @@ Core.prototype.getValidColumnList = function (colIds, columnMap) {
|
|
40010
40031
|
};
|
40011
40032
|
|
40012
40033
|
/** @public
|
40013
|
-
* @description Create mapping object from an array of strings
|
40014
|
-
* @param {Array.<string>=}
|
40034
|
+
* @description Create mapping object from an array of strings or column indices
|
40035
|
+
* @param {Array.<string|number>=} colRefs
|
40015
40036
|
* @return {!Object} Column mapping object
|
40016
40037
|
*/
|
40017
|
-
Core.prototype.createColumnMap = function (
|
40018
|
-
if(!
|
40019
|
-
|
40038
|
+
Core.prototype.createColumnMap = function (colRefs) {
|
40039
|
+
if(!colRefs){
|
40040
|
+
colRefs = this.getColumnIds();
|
40020
40041
|
}
|
40021
40042
|
var mappingObj = {};
|
40022
|
-
var count =
|
40043
|
+
var count = colRefs.length;
|
40023
40044
|
for(var i = 0; i < count; i++){
|
40024
|
-
var colId =
|
40045
|
+
var colId = colRefs[i];
|
40046
|
+
if(typeof colId === "number"){
|
40047
|
+
colId = this.getColumnId(colId);
|
40048
|
+
}
|
40025
40049
|
if(colId){
|
40026
40050
|
mappingObj[colId] = true;
|
40027
40051
|
}
|
@@ -44775,6 +44799,14 @@ Grid.prototype.dispose = function() {
|
|
44775
44799
|
this._grid.dispose();
|
44776
44800
|
this._connector.reset();
|
44777
44801
|
|
44802
|
+
if(!this._sharedDataSource) { // make sure that it is the final grid, and that it will be dispose data
|
44803
|
+
if(this._dt) {
|
44804
|
+
this._dt.dispose();
|
44805
|
+
}
|
44806
|
+
if(this._dv) {
|
44807
|
+
this._dv.dispose();
|
44808
|
+
}
|
44809
|
+
}
|
44778
44810
|
this._mainGrid = this._dt = this._dv = null;
|
44779
44811
|
|
44780
44812
|
if(this._subs) {
|
@@ -45735,16 +45767,16 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
|
|
45735
45767
|
}
|
45736
45768
|
|
45737
45769
|
var colDef = this.getColumnDefinition(colIndex);
|
45738
|
-
if(colDef.getChildren()) { // Parent time series field doesn't provide hidden property
|
45770
|
+
if(colDef && colDef.getChildren().length > 0) { // Parent time series field doesn't provide hidden property
|
45739
45771
|
colConfig["hidden"] = false;
|
45740
45772
|
}
|
45741
45773
|
|
45742
|
-
if(colConfig.id == null) {
|
45774
|
+
if(colDef && colConfig.id == null) {
|
45743
45775
|
colConfig.id = colDef.getId(); // retain ID
|
45744
45776
|
}
|
45745
45777
|
this._grid.startBatch("reset");
|
45778
|
+
this.removeColumn(colIndex);
|
45746
45779
|
this.insertColumn(colConfig, colIndex);
|
45747
|
-
this.removeColumn(colIndex + 1); // remove existing column after insert
|
45748
45780
|
this._grid.stopBatch("reset");
|
45749
45781
|
};
|
45750
45782
|
|
@@ -46449,9 +46481,9 @@ Grid.prototype._initDuplicateRicData = function(rowDef) {
|
|
46449
46481
|
}
|
46450
46482
|
};
|
46451
46483
|
/** @public
|
46452
|
-
* @param {
|
46484
|
+
* @param {(RowDefinition~Options|string)=} rowOption
|
46453
46485
|
* @param {Grid~RowReference=} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
|
46454
|
-
* @returns {
|
46486
|
+
* @returns {RowDefinition}
|
46455
46487
|
* @example
|
46456
46488
|
* var grid = new rt.Grid(grid_div, options);
|
46457
46489
|
* grid.insertRow({"ric": "RIC"}, 0); // A new row is added at the top
|
@@ -46482,7 +46514,7 @@ Grid.prototype.insertRow = function(rowOption, rowRef) {
|
|
46482
46514
|
return rowDef;
|
46483
46515
|
};
|
46484
46516
|
/** @public
|
46485
|
-
* @param {Array.<
|
46517
|
+
* @param {Array.<RowDefinition~Options|string>} rowOptions Array of row option object
|
46486
46518
|
* @param {Grid~RowReference=} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
|
46487
46519
|
* @param {Array.<string>=} opt_fields
|
46488
46520
|
* @example
|
@@ -48132,8 +48164,8 @@ Grid.prototype._logData = function(rowDefs, options) {
|
|
48132
48164
|
/** @public
|
48133
48165
|
* @description Replace existing row with a new row. Row ID would be changed, after row is replaced.
|
48134
48166
|
* @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
|
48135
|
-
* @param {
|
48136
|
-
* @returns {
|
48167
|
+
* @param {(RowDefinition~Options|string)=} rowOption
|
48168
|
+
* @returns {RowDefinition}
|
48137
48169
|
*/
|
48138
48170
|
Grid.prototype.replaceRow = function(rowRef, rowOption) {
|
48139
48171
|
var rowId = this._getRowId(rowRef);
|