@refinitiv-ui/efx-grid 6.0.126 → 6.0.128

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.
@@ -11720,7 +11720,7 @@ GroupDefinitions._toGroupDefinition = function(obj, groupId) {
11720
11720
  groupDef = GroupDefinitions._cloneObject(obj);
11721
11721
  }
11722
11722
  if(groupId) {
11723
- if(!groupDef.id) {
11723
+ if(!groupDef.name) {
11724
11724
  groupDef.name = groupId;
11725
11725
  }
11726
11726
  groupDef.id = groupId;
@@ -12249,8 +12249,7 @@ GroupDefinitions.prototype.setGroupName = function (groupId, groupName) {
12249
12249
 
12250
12250
 
12251
12251
 
12252
- /**
12253
- * Trigger when data within the table has been changed
12252
+ /** @description Trigger when data within the table has been changed
12254
12253
  * @event DataCache#dataChanged
12255
12254
  * @property {boolean} globalChange Indicates a big change. User should expect all data has been change
12256
12255
  * @property {string} type Type of changes. Possible values are "inserted", "removed", "updated", and undefined
@@ -12258,32 +12257,34 @@ GroupDefinitions.prototype.setGroupName = function (groupId, groupName) {
12258
12257
  * @property {Object.<string, *>} rowData Column values of the changed row in JSON object format
12259
12258
  */
12260
12259
 
12261
- /**
12262
- * Trigger before DataCache#dataChanged. Perform any data update during the event will NOT cause more dataChanged events
12260
+ /** @description Trigger before DataCache#dataChanged. Perform any data update during the event will NOT cause more dataChanged events
12263
12261
  * @event DataCache#dataComposed
12264
12262
  */
12265
12263
 
12266
- /**
12264
+ /** Class for caching data and firing event when data is changed
12267
12265
  * @constructor
12268
12266
  * @extends {EventDispatcher}
12269
12267
  */
12270
12268
  let DataCache = function () {
12271
- let _t = this;
12272
-
12273
- _t._rows = {};
12274
- _t._subs = {};
12275
- _t._onInsert = _t._onInsert.bind(_t);
12276
- _t._onUpdate = _t._onUpdate.bind(_t);
12277
- _t._onDelete = _t._onDelete.bind(_t);
12278
- _t._onQ2DataChanged = _t._onQ2DataChanged.bind(_t);
12279
- _t._onQ2SubAdded = _t._onQ2SubAdded.bind(_t);
12280
- _t._onQ2SubRemoved = _t._onQ2SubRemoved.bind(_t);
12269
+ this._rows = {};
12281
12270
 
12282
- _t._addEvent("dataComposed");
12283
- _t._addEvent("dataChanged");
12271
+ this._addEvent("dataComposed");
12272
+ this._addEvent("dataChanged");
12284
12273
  };
12285
12274
  es6_Ext.inherits(DataCache, event_EventDispatcher);
12286
12275
 
12276
+ /** @protected
12277
+ * @ignore
12278
+ * @type {!Object.<string, Object>}
12279
+ */
12280
+ DataCache.prototype._rows;
12281
+
12282
+ /** @protected
12283
+ * @ignore
12284
+ * @type {boolean}
12285
+ */
12286
+ DataCache.prototype._composing = false;
12287
+
12287
12288
  //#region Public
12288
12289
  /**
12289
12290
  * @public
@@ -12291,162 +12292,64 @@ es6_Ext.inherits(DataCache, event_EventDispatcher);
12291
12292
  DataCache.prototype.dispose = function () {
12292
12293
  this.unlistenAll();
12293
12294
  this.clearAllData(true);
12294
- this._quotes2 = null;
12295
12295
  };
12296
12296
 
12297
- /**
12298
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility. This API supports only Quotes2's "Subscriptions" object.
12297
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12299
12298
  * @public
12300
- * @param {Object} subs Subscriptions object from JET.Quotes2
12299
+ * @ignore
12301
12300
  */
12302
- DataCache.prototype.setSubscriptions = function (subs) {
12303
- if (this._quotes2) {
12304
- this._quotes2["removeEventListener"]("dataChanged", this._onQ2DataChanged);
12305
- this._quotes2["removeEventListener"]("subscriptionAdded", this._onQ2SubAdded);
12306
- this._quotes2["removeEventListener"]("subscriptionRemoved", this._onQ2SubRemoved);
12307
- }
12301
+ DataCache.prototype.setSubscriptions = function () {};
12308
12302
 
12309
- this._quotes2 = subs;
12310
-
12311
- if (this._quotes2) {
12312
- this._quotes2["addEventListener"]("dataChanged", this._onQ2DataChanged);
12313
- this._quotes2["addEventListener"]("subscriptionAdded", this._onQ2SubAdded);
12314
- this._quotes2["addEventListener"]("subscriptionRemoved", this._onQ2SubRemoved);
12315
- }
12316
- };
12317
-
12318
- /**
12319
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.This API supports only Quotes2's
12320
- * "Subscriptions" object.
12303
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12321
12304
  * @public
12322
- * @return {Object} subs Subscriptions object from JET.Quotes2
12305
+ * @ignore
12306
+ * @return {Object} Always returns null
12323
12307
  */
12324
- DataCache.prototype.getSubscriptions = function () {
12325
- return this._quotes2;
12326
- };
12308
+ DataCache.prototype.getSubscriptions = function () { return null; };
12327
12309
 
12328
- /**
12329
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12310
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12330
12311
  * @public
12331
- * @param {Object} sub Subscription object from JET.Quote
12332
- * @param {string=} opt_primaryRic Main RIC for creating Id or recalling subscription. This is because subscription
12333
- * object does not provide a way to access its data
12334
- * @param {Object=} opt_values Initial values
12312
+ * @ignore
12335
12313
  */
12336
- DataCache.prototype.addSubscription = function (sub, opt_primaryRic, opt_values) {
12337
- if (this.getSubscription(sub["id"])) {
12338
- return;
12339
- }
12314
+ DataCache.prototype.addSubscription = function () {};
12340
12315
 
12341
- let internalSub = {"s": sub, "rics": {}};
12342
-
12343
- this._subs[sub["id"]] = internalSub;
12344
-
12345
- if (!this._quotes2) {
12346
- sub["onNewRow"](this._onInsert);
12347
- sub["onUpdate"](this._onUpdate);
12348
- sub["onRemoveRow"](this._onDelete);
12349
- }
12350
-
12351
- if (opt_primaryRic) {
12352
- internalSub["primary"] = opt_primaryRic;
12353
-
12354
- if (!opt_values) {
12355
- opt_values = {};
12356
- }
12357
-
12358
- this._onInsert(sub, opt_primaryRic, opt_values);
12359
- }
12360
- };
12361
-
12362
- /**
12363
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12316
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12364
12317
  * @public
12365
- * @param {Object} sub Subscription object from JET.Quote
12318
+ * @ignore
12366
12319
  */
12367
- DataCache.prototype.removeSubscription = function (sub) { // All RICs associated to the subscription are removed
12368
- let subId = sub["id"];
12369
-
12370
- if (!sub || !this._subs[subId]) {
12371
- return;
12372
- }
12373
-
12374
- if (!this._quotes2) {
12375
- sub["stop"]();
12376
- }
12377
-
12378
- let rics = this._subs[subId]["rics"];
12320
+ DataCache.prototype.removeSubscription = function () {};
12379
12321
 
12380
- for (let ric in rics) {
12381
- this.setRowData(subId + ric, null); // No subscription attached
12382
- }
12383
-
12384
- delete this._subs[subId];
12385
- };
12386
-
12387
- /**
12388
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12322
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12389
12323
  * @public
12324
+ * @ignore
12390
12325
  */
12391
- DataCache.prototype.startAllSubscriptions = function () {
12392
- if (this._quotes2) {
12393
- this._quotes2["start"]();
12394
- } else {
12395
- for (let key in this._subs) {
12396
- this._subs[key]["s"]["start"]();
12397
- }
12398
- }
12399
- };
12326
+ DataCache.prototype.startAllSubscriptions = function () {};
12400
12327
 
12401
- /**
12402
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12328
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12403
12329
  * @public
12330
+ * @ignore
12404
12331
  */
12405
- DataCache.prototype.stopAllSubscriptions = function () {
12406
- if (this._quotes2) {
12407
- this._quotes2["stop"]();
12408
- } else {
12409
- for (let key in this._subs) {
12410
- this._subs[key]["s"]["stop"]();
12411
- }
12412
- }
12413
- };
12332
+ DataCache.prototype.stopAllSubscriptions = function () {};
12414
12333
 
12415
- /**
12334
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12416
12335
  * @public
12417
- * @param {string} sub_id
12418
- * @return {Object} Subscription object from JET.Quote
12336
+ * @ignore
12337
+ * @return {Object} Always returns null
12419
12338
  */
12420
- DataCache.prototype.getSubscription = function (sub_id) {
12421
- return (this._subs[sub_id]) ? this._subs[sub_id]["s"] : null;
12422
- };
12339
+ DataCache.prototype.getSubscription = function () { return null; };
12423
12340
 
12424
- /**
12341
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12425
12342
  * @public
12426
- * @param {string} sub_id
12427
- * @return {string} ric that has been input when calling addSubscription
12343
+ * @ignore
12344
+ * @return {string} Always returns empty string
12428
12345
  */
12429
- DataCache.prototype.getPrimaryRic = function (sub_id) {
12430
- let subDef = this._subs[sub_id];
12431
- if (subDef) {
12432
- return subDef["primary"];
12433
- }
12434
- return "";
12435
- };
12346
+ DataCache.prototype.getPrimaryRic = function () { return ""; };
12436
12347
 
12437
- /**
12438
- * @public
12348
+ /** @public
12439
12349
  * @param {boolean=} opt_suppressEvent
12440
12350
  * @fires DataCache#dataChanged
12441
12351
  */
12442
- DataCache.prototype.clearAllData = function (opt_suppressEvent) { // All subscriptions are also removed
12443
- if (this._quotes2) {
12444
- this._quotes2["removeAllSubscriptions"]();
12445
- } else {
12446
- this.stopAllSubscriptions();
12447
- }
12448
-
12449
- this._subs = {};
12352
+ DataCache.prototype.clearAllData = function (opt_suppressEvent) {
12450
12353
  this._rows = {};
12451
12354
 
12452
12355
  if (!opt_suppressEvent) {
@@ -12490,28 +12393,12 @@ DataCache.prototype.getData = function (rid, cid) {
12490
12393
  return (row) ? row[cid] : null;
12491
12394
  };
12492
12395
 
12493
- /**
12494
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12396
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12495
12397
  * @public
12496
- * @return {Object.<string, Array.<string>>} Map of Array of subscription object
12398
+ * @ignore
12399
+ * @return {Object.<string, Array.<string>>} Always returns null
12497
12400
  */
12498
- DataCache.prototype.getAllRics = function () { // Slow
12499
- let ricMap = {};
12500
-
12501
- for (let subId in this._subs) {
12502
- let rics = this._subs[subId]["rics"];
12503
-
12504
- for (let ric in rics) {
12505
- if (!ricMap[ric]) {
12506
- ricMap[ric] = [];
12507
- }
12508
-
12509
- ricMap[ric].push(subId);
12510
- }
12511
- }
12512
-
12513
- return ricMap; // No duplicate ric
12514
- };
12401
+ DataCache.prototype.getAllRics = function () { return null; };
12515
12402
 
12516
12403
  /**
12517
12404
  * @public
@@ -12710,27 +12597,22 @@ DataCache.prototype.cloneRowData = function (rid) {
12710
12597
  /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12711
12598
  * @public
12712
12599
  * @ignore
12713
- * @suppress {checkTypes}
12714
12600
  */
12715
12601
  DataCache.prototype.addStaticFields = function () {};
12716
12602
 
12717
- /**
12718
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12603
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12719
12604
  * @public
12720
12605
  * @ignore
12721
- * @suppress {checkTypes}
12722
12606
  */
12723
12607
  DataCache.prototype.removeStaticFields = function () {};
12724
12608
 
12725
- /**
12726
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12609
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12727
12610
  * @public
12728
12611
  * @ignore
12729
12612
  */
12730
12613
  DataCache.prototype.resetStaticFields = function () {};
12731
12614
 
12732
- /**
12733
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12615
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12734
12616
  * @public
12735
12617
  * @ignore
12736
12618
  */
@@ -12771,40 +12653,29 @@ DataCache.prototype.log = function (opt_options) {
12771
12653
  console.table(this.dump(opt_options));
12772
12654
  };
12773
12655
 
12774
- //#region ADC
12775
12656
  /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12776
12657
  * @public
12777
12658
  * @ignore
12778
- * @param {string} userId
12779
- * @param {string} productId
12780
- * @param {string} url
12781
- * @param {string=} opt_lang
12782
12659
  */
12783
- DataCache.prototype.setDataCloudSettings = function (userId, productId, url, opt_lang) {};
12660
+ DataCache.prototype.setDataCloudSettings = function () {};
12784
12661
 
12785
- /**
12786
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12662
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12787
12663
  * @public
12788
12664
  * @ignore
12789
12665
  */
12790
12666
  DataCache.prototype.getDataCloudFields = function () {};
12791
12667
 
12792
- /**
12793
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12668
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12794
12669
  * @public
12795
12670
  * @ignore
12796
- * @param {Array.<string>|string} fields
12797
12671
  */
12798
- DataCache.prototype.addDataCloudFields = function (fields) {};
12672
+ DataCache.prototype.addDataCloudFields = function () {};
12799
12673
 
12800
- /**
12801
- * Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12674
+ /** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
12802
12675
  * @public
12803
12676
  * @ignore
12804
- * @param {string} field
12805
12677
  */
12806
- DataCache.prototype.removeDataCloudField = function (field) {};
12807
- //#endregion ADC
12678
+ DataCache.prototype.removeDataCloudField = function () {};
12808
12679
  //#endregion Public
12809
12680
 
12810
12681
  /**
@@ -12941,162 +12812,6 @@ DataCache.constructTable = function (dataset, opt_options, opt_rowIds) {
12941
12812
  };
12942
12813
 
12943
12814
 
12944
- //#region Private
12945
- /**
12946
- * For Quotes2 only
12947
- * @private
12948
- * @param {string} subId
12949
- * @param {string} ric
12950
- * @param {Object.<string, *>} values
12951
- */
12952
- DataCache.prototype._insertRic = function (subId, ric, values) {
12953
- // HACK: Some chain may have 0# symbol in there chain index (e.g. 0#CL:)
12954
- ric = ric.replace("0#", "");
12955
-
12956
- let rid = subId + ric;
12957
-
12958
- let rowData = this.getRowData(rid);
12959
- if (!rowData) { // Ensure that we have subscription id and ric from Quotes2
12960
- let tmp = values;
12961
-
12962
- values = {}; // Clone a new object for duplicated ric
12963
-
12964
- for (let key in tmp) { // Slow
12965
- values[key] = tmp[key];
12966
- }
12967
-
12968
- values["SUB_ID"] = subId;
12969
- values["RIC"] = ric;
12970
- } else {
12971
- let rowDef = rowData["ROW_DEF"];
12972
- if(rowDef && rowDef.isChain()){
12973
- values["SUB_ID"] = subId;
12974
- }
12975
- }
12976
-
12977
- this.setRowData(rid, values);
12978
- };
12979
-
12980
- /**
12981
- * @private
12982
- * @param {Object} e
12983
- */
12984
- DataCache.prototype._onQ2DataChanged = function (e) {
12985
- let subId = e["subId"];
12986
- let ric = e["ric"];
12987
- let values = /** @type{Object.<string, *>} */(e["values"]);
12988
-
12989
- if (values) {
12990
- this._insertRic(subId, ric, values);
12991
- } else { // Remove ric
12992
- delete this._subs[subId]["rics"][ric];
12993
-
12994
- this.setRowData(subId + ric, null);
12995
- }
12996
- };
12997
-
12998
- /**
12999
- * @private
13000
- * @param {Object} e
13001
- */
13002
- DataCache.prototype._onQ2SubAdded = function (e) {
13003
- let subs = e["subs"];
13004
- let len = subs.length;
13005
-
13006
- for (let i = 0; i < len; ++i) {
13007
- let sub = subs[i];
13008
-
13009
- // chain subId fires twice, one with "_ci_" and one without "_ci_"
13010
- // the subId with "_ci_" should be ignore
13011
- if(sub["id"].indexOf("_ci_") < 0){
13012
- this.addSubscription(sub, sub["ric"]);
13013
- }
13014
- }
13015
- };
13016
-
13017
- /**
13018
- * @private
13019
- * @param {Object} e
13020
- */
13021
- DataCache.prototype._onQ2SubRemoved = function (e) {
13022
- let subs = e["subs"];
13023
- let len = subs.length;
13024
-
13025
- for (let i = 0; i < len; ++i) {
13026
- let sub = subs[i];
13027
-
13028
- // chain subId fires twice, one with "_ci_" and one without "_ci_"
13029
- // the subId with "_ci_" should be ignore
13030
- if(sub["id"].indexOf("_ci_") < 0){
13031
- this.removeSubscription(sub);
13032
- }
13033
- }
13034
- };
13035
-
13036
- /**
13037
- * @private
13038
- * @param {Object} sub Subscription object from JET.Quote
13039
- * @param {string} ric
13040
- * @param {Object.<string, *>} values
13041
- */
13042
- DataCache.prototype._onInsert = function (sub, ric, values/*, rowN*/) {
13043
- let subId = sub["id"];
13044
-
13045
- if (this._quotes2) {
13046
- this._insertRic(subId, ric, values);
13047
- } else {
13048
- this.setRowData(subId + ric, values, {"subscription": sub, "ric": ric});
13049
- }
13050
- };
13051
-
13052
- /**
13053
- * @private
13054
- * @function
13055
- */
13056
- DataCache.prototype._onUpdate = DataCache.prototype._onInsert;
13057
-
13058
- /**
13059
- * This is a legacy code and should be deprecated
13060
- * @private
13061
- * @param {Object} sub Subscription object from JET.Quote
13062
- * @param {string} ric
13063
- * @param {Array.<string, *>} values
13064
- */
13065
- DataCache.prototype._onDelete = function (sub, ric, values/*, rowN*/) {
13066
- delete this._subs[sub["id"]]["rics"][ric];
13067
-
13068
- // We cannot cache event arguments because user may want to collect all the updates
13069
- this.setRowData(sub["id"] + ric, null, {"subscription": sub, "ric": ric});
13070
- };
13071
-
13072
- /** @protected
13073
- * @ignore
13074
- * @type {!Object.<string, Object>}
13075
- */
13076
- DataCache.prototype._rows;
13077
-
13078
- /**
13079
- * @private
13080
- * @type {!Object.<string, Object>}
13081
- */
13082
- DataCache.prototype._subs;
13083
-
13084
- /**
13085
- * @private
13086
- * @type {Object}
13087
- */
13088
- DataCache.prototype._quotes2 = null;
13089
-
13090
- /** @protected
13091
- * @ignore
13092
- * @type {boolean}
13093
- */
13094
- DataCache.prototype._composing = false;
13095
-
13096
- //#endregion Private
13097
-
13098
- DataCache._proto = DataCache.prototype;
13099
-
13100
12815
  /* harmony default export */ const data_DataCache = (DataCache);
13101
12816
 
13102
12817
 
@@ -25971,7 +25686,7 @@ Core_Core.prototype._hasPendingRowChange = false;
25971
25686
  * @return {string}
25972
25687
  */
25973
25688
  Core_Core.getVersion = function () {
25974
- return "5.1.124";
25689
+ return "5.1.125";
25975
25690
  };
25976
25691
  /** {@link ElementWrapper#dispose}
25977
25692
  * @override