@refinitiv-ui/efx-grid 6.0.56 → 6.0.58

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.
Files changed (43) hide show
  1. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +7 -2
  2. package/lib/column-selection-dialog/lib/column-selection-dialog.js +340 -44
  3. package/lib/column-selection-dialog/lib/locale/translation-de.js +1 -1
  4. package/lib/column-selection-dialog/lib/locale/translation-en.js +1 -1
  5. package/lib/column-selection-dialog/lib/locale/translation-ja.js +1 -1
  6. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +1 -1
  7. package/lib/column-selection-dialog/lib/locale/translation-zh.js +1 -1
  8. package/lib/column-selection-dialog/themes/base.less +10 -0
  9. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +1 -1
  10. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
  11. package/lib/column-selection-dialog/themes/elemental/dark.js +3 -1
  12. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +1 -1
  13. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +1 -1
  14. package/lib/column-selection-dialog/themes/elemental/light.js +3 -1
  15. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
  16. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
  17. package/lib/column-selection-dialog/themes/halo/dark.js +3 -1
  18. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
  19. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
  20. package/lib/column-selection-dialog/themes/halo/light.js +3 -1
  21. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +1 -1
  22. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
  23. package/lib/column-selection-dialog/themes/solar/charcoal.js +3 -1
  24. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +1 -1
  25. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
  26. package/lib/column-selection-dialog/themes/solar/pearl.js +3 -1
  27. package/lib/core/dist/core.js +22 -1
  28. package/lib/core/dist/core.min.js +1 -1
  29. package/lib/core/es6/data/DataTable.js +8 -0
  30. package/lib/core/es6/grid/Core.js +3 -1
  31. package/lib/core/es6/grid/event/EventListeners.js +3 -0
  32. package/lib/core/es6/grid/util/TrackLayout.d.ts +2 -0
  33. package/lib/core/es6/grid/util/TrackLayout.js +8 -0
  34. package/lib/grid/index.js +1 -1
  35. package/lib/rt-grid/dist/rt-grid.js +40 -8
  36. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  37. package/lib/rt-grid/es6/Grid.js +8 -0
  38. package/lib/tr-grid-printer/es6/index.js +1 -1
  39. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  40. package/lib/tr-grid-textformatting/es6/TextFormatting.js +35 -5
  41. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +2 -0
  42. package/lib/versions.json +2 -2
  43. 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.72";
565
+ return "5.1.73";
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
@@ -6,6 +6,8 @@ declare class TrackLayout {
6
6
 
7
7
  public hitTest(val: number): number;
8
8
 
9
+ public dispose(): void;
10
+
9
11
  public isAtDefaultSize(opt_index?: number|null): boolean;
10
12
 
11
13
  public isHomogeneous(): boolean;
@@ -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
@@ -1,3 +1,3 @@
1
1
  import {Grid} from "./lib/efx-grid.js";
2
2
  export {Grid}
3
- window.EFX_GRID = { version: "6.0.56" };
3
+ window.EFX_GRID = { version: "6.0.58" };
@@ -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.71";
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>=} colIds
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 (colIds) {
40018
- if(!colIds){
40019
- colIds = this.getColumnIds();
40038
+ Core.prototype.createColumnMap = function (colRefs) {
40039
+ if(!colRefs){
40040
+ colRefs = this.getColumnIds();
40020
40041
  }
40021
40042
  var mappingObj = {};
40022
- var count = colIds.length;
40043
+ var count = colRefs.length;
40023
40044
  for(var i = 0; i < count; i++){
40024
- var colId = colIds[i];
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) {