@refinitiv-ui/efx-grid 6.0.134 → 6.0.136

Sign up to get free protection for your applications and to get access to all the features.
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.134" };
3
+ window.EFX_GRID = { version: "6.0.136" };
@@ -16106,7 +16106,11 @@ let SnapshotFiller = function () {
16106
16106
  };
16107
16107
  Ext.inherits(SnapshotFiller, EventDispatcher);
16108
16108
 
16109
- //#region Private Members
16109
+ /** @private
16110
+ * @type {Object}
16111
+ */
16112
+ SnapshotFiller._mockAdc = null;
16113
+
16110
16114
  /** @type {number}
16111
16115
  * @private
16112
16116
  */
@@ -16127,23 +16131,27 @@ SnapshotFiller.prototype._rtk;
16127
16131
  * @private
16128
16132
  */
16129
16133
  SnapshotFiller.prototype._adcOptions = null;
16130
- //#endregion Private Members
16134
+
16131
16135
 
16132
16136
  /** @public
16133
16137
  * @param {*} rtk RTK instance
16134
16138
  */
16135
- SnapshotFiller.prototype.setRTK = function (rtk) {
16136
- this._rtk = rtk;
16139
+ SnapshotFiller.prototype.dispose = function () {
16140
+ this.removeAllEventListeners();
16141
+ if(this._timerId) {
16142
+ clearTimeout(this._timerId);
16143
+ this._timerId = 0;
16144
+ }
16145
+ this._rics = this._fields = this._rtk = this._adcOptions = null;
16137
16146
  };
16138
16147
 
16139
- /**
16140
- * @public
16141
- * @type {Object}
16148
+ /** @public
16149
+ * @param {*} rtk RTK instance
16142
16150
  */
16143
- SnapshotFiller._mockAdc = null;
16144
-
16145
- /**
16146
- * @public
16151
+ SnapshotFiller.prototype.setRTK = function (rtk) {
16152
+ this._rtk = rtk;
16153
+ };
16154
+ /** @public
16147
16155
  * @param {string} str
16148
16156
  * @param {*} value
16149
16157
  */
@@ -16154,8 +16162,7 @@ SnapshotFiller.setMockAdc = function(str, value) {
16154
16162
  SnapshotFiller._mockAdc[str] = value;
16155
16163
  };
16156
16164
 
16157
- /**
16158
- * @public
16165
+ /** @public
16159
16166
  * @param {string} str
16160
16167
  * @return {*}
16161
16168
  */
@@ -16166,8 +16173,7 @@ SnapshotFiller.getMockAdc = function(str) {
16166
16173
  return SnapshotFiller._mockAdc[str];
16167
16174
  };
16168
16175
 
16169
- /**
16170
- * @public
16176
+ /** @public
16171
16177
  */
16172
16178
  SnapshotFiller.clearMockAdc = function() {
16173
16179
  SnapshotFiller._mockAdc = null;
@@ -42372,8 +42378,8 @@ ReferenceCounter.prototype.log = function() {
42372
42378
  */
42373
42379
  let DataConnector = function () {
42374
42380
  let t = this;
42375
- t._commitRicsChanges = t._commitRicsChanges.bind(this);
42376
- t._commitFieldsChanges = t._commitFieldsChanges.bind(this);
42381
+ t._commitRicsChanges = t._commitRicsChanges.bind(t);
42382
+ t._commitFieldsChanges = t._commitFieldsChanges.bind(t);
42377
42383
  t._fieldChangedConflator = new Conflator(0, t._commitFieldsChanges);
42378
42384
  t._ricChangedConflator = new Conflator(0, t._commitRicsChanges);
42379
42385
  t._fields = new js_ReferenceCounter();
@@ -42382,8 +42388,6 @@ let DataConnector = function () {
42382
42388
  };
42383
42389
  Ext.inherits(DataConnector, EventDispatcher);
42384
42390
 
42385
-
42386
- //#region Private Members
42387
42391
  /** @type {Conflator}
42388
42392
  * @private
42389
42393
  */
@@ -42404,7 +42408,16 @@ DataConnector.prototype._rics = null;
42404
42408
  * @private
42405
42409
  */
42406
42410
  DataConnector.prototype._fields = null;
42407
- //#endregion Private Members
42411
+
42412
+ /** @public
42413
+ */
42414
+ DataConnector.prototype.dispose = function () {
42415
+ this.removeAllEventListeners();
42416
+
42417
+ this._rowDefMap = this._fields = this._rics = null;
42418
+ this._fieldChangedConflator.reset();
42419
+ this._ricChangedConflator.reset();
42420
+ };
42408
42421
 
42409
42422
  /** Get all ric with no duplication
42410
42423
  * @public
@@ -45459,7 +45472,9 @@ Grid.prototype.dispose = function() {
45459
45472
  this.removeAllRows(); // Some conflators are reset
45460
45473
  this._sorter.dispose();
45461
45474
  this._grid.dispose();
45462
- this._connector.reset();
45475
+ this._snapshot.dispose();
45476
+ this._connector.dispose();
45477
+ this._connector = null;
45463
45478
 
45464
45479
  if(!this._sharedDataSource) { // Make sure that this is the final grid, and its data is disposed
45465
45480
  if(this._subs) {
@@ -46470,7 +46485,7 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
46470
46485
  * @param {Object} response
46471
46486
  */
46472
46487
  Grid.prototype._onFieldLoadedSuccess = function (field, colDef, response) {
46473
- if (response && response.id) {
46488
+ if(this._connector && response && response.id) {
46474
46489
  let fieldDef = response;
46475
46490
  if (colDef && colDef.getField() === field) {
46476
46491
  if (colDef.isDefaultName() && fieldDef.name) {
@@ -46495,12 +46510,14 @@ Grid.prototype._onFieldLoadedError = function (err) {
46495
46510
  * @param {string} referrer
46496
46511
  */
46497
46512
  Grid.prototype._onFieldLoaded = function (field, referrer) {
46498
- // For time series, we need to wait until the field is loadedm, then we can insert a child from the field data.
46499
- if(js_FieldDefinition.isTimeSeries(field)) {
46500
- let colDef = this.getColumnDefinitionById(referrer); // The 'referrer' is a column ID that was just added
46501
- this._populateTimeSeriesChildren(colDef);
46513
+ if(this._connector) {
46514
+ // For time series, we need to wait until the field is loadedm, then we can insert a child from the field data.
46515
+ if(js_FieldDefinition.isTimeSeries(field)) {
46516
+ let colDef = this.getColumnDefinitionById(referrer); // The 'referrer' is a column ID that was just added
46517
+ this._populateTimeSeriesChildren(colDef);
46518
+ }
46519
+ this._connector.addFields(field, referrer);
46502
46520
  }
46503
- this._connector.addFields(field, referrer);
46504
46521
  };
46505
46522
 
46506
46523
  /**
@@ -47521,6 +47538,7 @@ Grid.prototype.removeAllRows = function() {
47521
47538
 
47522
47539
  this._dc.clearAllData();
47523
47540
  this._dt.clearAllData();
47541
+ this._dt.setClassificationSource(this._dc);
47524
47542
  this._clearDataUpdates();
47525
47543
 
47526
47544
  rowDefs.forEach(RowDefinition.dispose); // Each individual subscription is unsubscribed along with disposed rowDef
@@ -49874,7 +49892,7 @@ let _fieldInfo = {
49874
49892
  "CF_LAST": {type: "number", min: 0.01, max: 1000, prec: 2},
49875
49893
  "PCTCHNG": {type: "number", min: -1, max: 1, prec: 2, suffix: "%"},
49876
49894
  "PCTCHNG2": {type: "float", min: -20, max: 20, prec: 2, suffix: "%"},
49877
- "CF_CURR": {fixedValue: "USD"},
49895
+ "CF_CURR": {type: "set", members: ["USD", "GBP", "EUR", "JPY", "THB"]},
49878
49896
  "INDICATOR": {type: "number", min: 0, max: 5},
49879
49897
  "CF_TICK": {type: "number", min: 1, max: 3, changeOnly: true},
49880
49898
  "PRCTCK_1": {type: "set", members: ["\u21e7", "B\u21e7", "\u2191", "B\u2191", "26", "1", "\"1\"", "-1", "\u21e9", "B\u21e9", "\u2193", "B\u2193", "27", "2", "\"2\""] },
@@ -49893,9 +49911,9 @@ let _fieldInfo = {
49893
49911
  "TR.IPODate": {type: "isoDate", min: Date.now() - 63072000000 /* 2 years back from now */, max: Date.now()},
49894
49912
  "TR.Volume": {type: "number", min: 2000, max: 1e7},
49895
49913
  "TR.Price52WeekHigh": {type: "number", min: 100, max: 300, prec: 2},
49896
- "TR.Price52WeekLow": { type: "number", min: 1, max: 200, prec: 2 },
49897
- // eslint-disable-next-line
49898
- "TR.InvalidField": { type: "set", members: [undefined] },
49914
+ "TR.Price52WeekLow": {type: "number", min: 1, max: 200, prec: 2 },
49915
+ "TR.InvalidField": {type: "set", members: [undefined, null, NaN]}, // eslint-disable-line
49916
+ "falsyValues": {type: "set", members: [undefined, null, NaN, 0, false, ""]}, // eslint-disable-line
49899
49917
  "percent": {type: "number", min: 0, max: 101 },
49900
49918
  "number_1": {type: "number", min: 1, max: 100 },
49901
49919
  "number_2": {type: "number", min: -100, max: 100 },
@@ -50312,8 +50330,8 @@ let _generateFieldData = function(field, options, seed) {
50312
50330
  fInfo.type = "number";
50313
50331
  addFieldInfo(field, fInfo);
50314
50332
  }
50315
- if(fInfo.fixedValue){
50316
- fInfo.value = value;
50333
+ if(fInfo.fixedValue !== undefined){ // eslint-disable-line
50334
+ fInfo.value = fInfo.fixedValue;
50317
50335
  return fInfo;
50318
50336
  }
50319
50337
  if(seed != null) {