@refinitiv-ui/efx-grid 6.0.35 → 6.0.37
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.css +1 -1
- package/lib/core/dist/core.js +150 -6
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataCache.js +20 -1
- package/lib/core/es6/grid/Core.js +25 -2
- package/lib/core/es6/grid/ILayoutGrid.js +4 -0
- package/lib/core/es6/grid/LayoutGrid.d.ts +4 -0
- package/lib/core/es6/grid/LayoutGrid.js +95 -3
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +6 -0
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/grid/themes/base.less +1 -0
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +2 -0
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +302 -107
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/FieldDefinition.js +0 -41
- package/lib/rt-grid/es6/Grid.js +4 -5
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.js +102 -52
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +1 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +579 -607
- package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +4 -1
- package/lib/tr-grid-range-bar/es6/RangeBar.js +99 -39
- package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +7 -1
- package/lib/tr-grid-util/es6/GroupDefinitions.js +39 -3
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +7 -0
- package/lib/types/es6/ColumnStack.d.ts +1 -0
- package/lib/types/es6/Core/grid/Core.d.ts +12 -0
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -2
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -9380,7 +9380,8 @@ DataCache_DataCache.prototype._insertRic = function (subId, ric, values) {
|
|
9380
9380
|
// We cannot cache event arguments because user may want to collect all the updates
|
9381
9381
|
this._onADCForNewRic(subId, ric);
|
9382
9382
|
|
9383
|
-
|
9383
|
+
var rowData = this.getRowData(rid);
|
9384
|
+
if (!rowData) { // Ensure that we have subscription id and ric from Quotes2
|
9384
9385
|
var tmp = values;
|
9385
9386
|
|
9386
9387
|
values = {}; // Clone a new object for duplicated ric
|
@@ -9391,6 +9392,11 @@ DataCache_DataCache.prototype._insertRic = function (subId, ric, values) {
|
|
9391
9392
|
|
9392
9393
|
values["SUB_ID"] = subId;
|
9393
9394
|
values["RIC"] = ric;
|
9395
|
+
} else {
|
9396
|
+
var rowDef = rowData["ROW_DEF"];
|
9397
|
+
if(rowDef && rowDef.isChain()){
|
9398
|
+
values["SUB_ID"] = subId;
|
9399
|
+
}
|
9394
9400
|
}
|
9395
9401
|
|
9396
9402
|
this.setRowData(rid, values);
|
@@ -9427,6 +9433,12 @@ DataCache_DataCache.prototype._onQ2SubAdded = function (e) {
|
|
9427
9433
|
var sub = subs[i];
|
9428
9434
|
var ric = sub["ric"];
|
9429
9435
|
|
9436
|
+
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
9437
|
+
// the subId with "_ci_" should be ignore
|
9438
|
+
if(sub["id"].indexOf("_ci_") >= 0){
|
9439
|
+
continue;
|
9440
|
+
}
|
9441
|
+
|
9430
9442
|
this.addSubscription(sub, ric);
|
9431
9443
|
|
9432
9444
|
if (duplicateSubIds) { // There will be no network request for duplicate subs, and hence we need to update the data from our cache
|
@@ -9451,6 +9463,13 @@ DataCache_DataCache.prototype._onQ2SubRemoved = function (e) {
|
|
9451
9463
|
|
9452
9464
|
for (var i = 0; i < len; ++i) {
|
9453
9465
|
var sub = subs[i];
|
9466
|
+
|
9467
|
+
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
9468
|
+
// the subId with "_ci_" should be ignore
|
9469
|
+
if(sub["id"].indexOf("_ci_") >= 0){
|
9470
|
+
continue;
|
9471
|
+
}
|
9472
|
+
|
9454
9473
|
this.removeSubscription(sub);
|
9455
9474
|
}
|
9456
9475
|
};
|
@@ -13176,9 +13195,10 @@ DataTable._proto = DataTable.prototype;
|
|
13176
13195
|
* @property {Array.<string>=} fields=null Field that corresponds to the given static values
|
13177
13196
|
* @property {boolean=} asChain=false The given ric will be treated as a chain
|
13178
13197
|
* @property {string=} chainRic="" RIC to be used for chain request (overiding ric property)
|
13179
|
-
* @property {boolean=} collapsed=
|
13198
|
+
* @property {boolean=} collapsed=true Chain is collapsed by default
|
13180
13199
|
* @property {(string|null)=} label=null
|
13181
13200
|
* @property {boolean=} hidden=true When this row is hidden
|
13201
|
+
* @pro // realTime
|
13182
13202
|
*/
|
13183
13203
|
|
13184
13204
|
/** @typedef {Object} RowDefinition~RowTypes
|
@@ -13254,18 +13274,18 @@ RowDefinition.prototype._ric = ""; // Contains no 0#
|
|
13254
13274
|
* @private
|
13255
13275
|
*/
|
13256
13276
|
RowDefinition.prototype._permId = "";
|
13257
|
-
/** @type {string}
|
13258
|
-
* @private
|
13259
|
-
*/
|
13260
|
-
RowDefinition.prototype._displayText = "";
|
13261
13277
|
/** @type {string|null}
|
13262
13278
|
* @private
|
13263
13279
|
*/
|
13264
13280
|
RowDefinition.prototype._label = null; // Label overrides _ric and _displayText
|
13281
|
+
/** @type {boolean|null}
|
13282
|
+
* @private
|
13283
|
+
*/
|
13284
|
+
RowDefinition.prototype._isChain = null;
|
13265
13285
|
/** @type {boolean}
|
13266
13286
|
* @private
|
13267
13287
|
*/
|
13268
|
-
RowDefinition.prototype.
|
13288
|
+
RowDefinition.prototype._realTime = true;
|
13269
13289
|
|
13270
13290
|
/** @type {string}
|
13271
13291
|
* @private
|
@@ -13289,10 +13309,10 @@ RowDefinition.prototype._view = null;
|
|
13289
13309
|
*/
|
13290
13310
|
RowDefinition.prototype._subId = "";
|
13291
13311
|
|
13292
|
-
/** @type {boolean}
|
13312
|
+
/** @type {boolean|null}
|
13293
13313
|
* @private
|
13294
13314
|
*/
|
13295
|
-
RowDefinition.prototype._expanded =
|
13315
|
+
RowDefinition.prototype._expanded = null;
|
13296
13316
|
/** @type {boolean}
|
13297
13317
|
* @private
|
13298
13318
|
*/
|
@@ -13380,18 +13400,19 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
13380
13400
|
return;
|
13381
13401
|
}
|
13382
13402
|
|
13383
|
-
var val = rowOptions["
|
13403
|
+
var val = rowOptions["permId"];
|
13384
13404
|
if(val != null) {
|
13385
|
-
this.
|
13405
|
+
this._permId = val;
|
13386
13406
|
}
|
13387
|
-
val = rowOptions["
|
13407
|
+
val = rowOptions["ric"];
|
13388
13408
|
if(val != null) {
|
13389
|
-
this.
|
13409
|
+
this._ric = val;
|
13390
13410
|
}
|
13391
|
-
|
13392
|
-
|
13411
|
+
val = rowOptions["label"];
|
13412
|
+
// eslint-disable-next-line no-undefined
|
13413
|
+
if(val !== undefined) { // Empty string and null are allowed
|
13414
|
+
this._label = val;
|
13393
13415
|
}
|
13394
|
-
|
13395
13416
|
val = rowOptions["chainRic"];
|
13396
13417
|
if(val != null) {
|
13397
13418
|
this._chainRic = val;
|
@@ -13403,26 +13424,40 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
13403
13424
|
}
|
13404
13425
|
|
13405
13426
|
val = rowOptions["asChain"];
|
13406
|
-
if(val) {
|
13407
|
-
this._isChain =
|
13408
|
-
this._expanded = !rowOptions["collapsed"];
|
13409
|
-
} else if(this._isChain) {
|
13410
|
-
var collapsed = rowOptions["collapsed"];
|
13411
|
-
if(collapsed != null) {
|
13412
|
-
this._expanded = !collapsed;
|
13413
|
-
}
|
13427
|
+
if(val !== null) {
|
13428
|
+
this._isChain = val;
|
13414
13429
|
}
|
13415
13430
|
|
13416
|
-
val = rowOptions["
|
13417
|
-
|
13418
|
-
|
13419
|
-
this._label = val;
|
13431
|
+
val = rowOptions["realTime"];
|
13432
|
+
if(val != null) {
|
13433
|
+
this._realTime = val;
|
13420
13434
|
}
|
13421
13435
|
|
13436
|
+
val = rowOptions["collapsed"];
|
13437
|
+
if(val != null){
|
13438
|
+
this._expanded = !val;
|
13439
|
+
}
|
13422
13440
|
val = rowOptions["keepModel"];
|
13423
13441
|
if(val) {
|
13424
13442
|
this._userModel = rowOptions;
|
13425
13443
|
}
|
13444
|
+
|
13445
|
+
var expanded = this._expanded;
|
13446
|
+
var symbol = this._ric || this._chainRic;
|
13447
|
+
var asChain = rowOptions["asChain"] || !!this._chainRic;
|
13448
|
+
if(this._ric && this._ric.indexOf("0#") >= 0){
|
13449
|
+
asChain = true;
|
13450
|
+
expanded = true;
|
13451
|
+
}
|
13452
|
+
if(rowOptions["asChain"] === false){
|
13453
|
+
asChain = false;
|
13454
|
+
}
|
13455
|
+
if(rowOptions["collapsed"] === true){
|
13456
|
+
expanded = false;
|
13457
|
+
}
|
13458
|
+
if(symbol || this._permId){
|
13459
|
+
this.setContent(symbol, this._permId, asChain, expanded); // this._dataId is modified
|
13460
|
+
}
|
13426
13461
|
};
|
13427
13462
|
/** @private
|
13428
13463
|
* @param {!Object} rowOptions
|
@@ -13432,7 +13467,6 @@ RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
|
13432
13467
|
var parentDef = /** @type{RowDefinition} */(rowOptions["parent"]);
|
13433
13468
|
if(this.setParent(parentDef)) {
|
13434
13469
|
this._dataId = /** @type{string} */(rowOptions["dataId"]); // Constituent will have the same subId as its parent but with different ric
|
13435
|
-
this._displayText = this._ric = /** @type{string} */(rowOptions["ric"]);
|
13436
13470
|
|
13437
13471
|
this._dc = parentDef._dc; // Parent chain must have data cache
|
13438
13472
|
if(this._dc) {
|
@@ -13451,9 +13485,12 @@ RowDefinition.prototype._initializeAsConstituent = function(rowOptions) {
|
|
13451
13485
|
/** @public
|
13452
13486
|
* @param {string} userInput RIC
|
13453
13487
|
* @param {string=} permId=null Organization PermId, which use for getting ADC data for private company
|
13488
|
+
* @param {boolean=} asChain
|
13489
|
+
* @param {boolean=} expanded
|
13490
|
+
* @param {boolean=} realTime
|
13454
13491
|
* @return {boolean} True if there is any change otherwise false
|
13455
13492
|
*/
|
13456
|
-
RowDefinition.prototype.setContent = function(userInput, permId) {
|
13493
|
+
RowDefinition.prototype.setContent = function(userInput, permId, asChain, expanded) {
|
13457
13494
|
if(this._autoGenerated) { // AutoGenerated RowDefinition cannot be changed by user input
|
13458
13495
|
return false;
|
13459
13496
|
}
|
@@ -13467,10 +13504,7 @@ RowDefinition.prototype.setContent = function(userInput, permId) {
|
|
13467
13504
|
var dirty = (this._userInput !== userInput);
|
13468
13505
|
if(this._permId !== permId){
|
13469
13506
|
this._permId = permId || "";
|
13470
|
-
|
13471
|
-
this._displayText = this._permId;
|
13472
|
-
dirty = true;
|
13473
|
-
}
|
13507
|
+
dirty = true;
|
13474
13508
|
}
|
13475
13509
|
if(!dirty) {
|
13476
13510
|
return false;
|
@@ -13479,34 +13513,44 @@ RowDefinition.prototype.setContent = function(userInput, permId) {
|
|
13479
13513
|
this.unsubscribeForUpdates();
|
13480
13514
|
this.resetUpdates(); // Remove all previous data updates because a new content is just entered
|
13481
13515
|
|
13516
|
+
// TODO: handle changing between chain and ric row
|
13482
13517
|
this._userInput = userInput;
|
13483
13518
|
if(this._userInput.charAt(0) === "'") { // This is a row header
|
13484
|
-
this._displayText = this._userInput.substr(1);
|
13485
13519
|
this._ric = this._chainRic = ""; // No ric for realtime request
|
13486
13520
|
} else {
|
13487
13521
|
if(this._userInput.indexOf("0#") >= 0) {
|
13488
|
-
|
13489
|
-
|
13490
|
-
|
13491
|
-
|
13492
|
-
this.
|
13493
|
-
this.
|
13522
|
+
if(asChain === false){
|
13523
|
+
this._ric = this._userInput;
|
13524
|
+
} else {
|
13525
|
+
this._ric = expanded ? this._userInput.replace("0#", "") : this._userInput;
|
13526
|
+
this._expanded = expanded;
|
13527
|
+
this._isChain = true; // Only chain can be expanded by 0#
|
13528
|
+
this._chainRic = this._userInput;
|
13529
|
+
if(this._view) {
|
13530
|
+
this._view.setSegmentSeparator(this._rowId);
|
13531
|
+
this.expandChain();
|
13532
|
+
}
|
13494
13533
|
}
|
13495
13534
|
} else {
|
13496
13535
|
this._ric = this._userInput;
|
13497
|
-
|
13536
|
+
if(asChain){
|
13537
|
+
this._isChain = true;
|
13538
|
+
}
|
13498
13539
|
}
|
13499
|
-
this._displayText = this._ric; // No 0#
|
13500
13540
|
}
|
13501
13541
|
|
13502
13542
|
this._dataId = this._rowId + this.getSymbol(); // JET/RTK will generate data id to be rowId (given from this rowDef) + ric;
|
13503
13543
|
|
13504
|
-
|
13544
|
+
|
13505
13545
|
if(!this.subscribeForUpdates()) {
|
13506
|
-
|
13507
|
-
|
13508
|
-
|
13509
|
-
|
13546
|
+
if(this._dc) {
|
13547
|
+
// This will work for runtime ric modification, but not for first initilization.
|
13548
|
+
// Avoid losing the ROW_DEF pointer.
|
13549
|
+
var rowData = {};
|
13550
|
+
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
13551
|
+
rowData["X_RIC_NAME"] = this.getDisplayText();
|
13552
|
+
this.setRowData(rowData);
|
13553
|
+
}
|
13510
13554
|
}
|
13511
13555
|
return true;
|
13512
13556
|
};
|
@@ -13527,6 +13571,16 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
13527
13571
|
obj["ric"] = val;
|
13528
13572
|
}
|
13529
13573
|
|
13574
|
+
// The user passed a single quote (') case
|
13575
|
+
if(!this._ric && this._userInput.charAt(0) === "'") {
|
13576
|
+
obj["ric"] = this._userInput;
|
13577
|
+
}
|
13578
|
+
|
13579
|
+
val = this._realTime;
|
13580
|
+
if(val !== true) {
|
13581
|
+
obj["realTime"] = val;
|
13582
|
+
}
|
13583
|
+
|
13530
13584
|
val = this._permId;
|
13531
13585
|
if(val) {
|
13532
13586
|
obj["permId"] = val;
|
@@ -13548,12 +13602,12 @@ RowDefinition.prototype.getConfigObject = function(rowOptions) {
|
|
13548
13602
|
}
|
13549
13603
|
|
13550
13604
|
val = this._isChain;
|
13551
|
-
if(val) {
|
13605
|
+
if(val != null) {
|
13552
13606
|
obj["asChain"] = val;
|
13553
13607
|
}
|
13554
13608
|
|
13555
13609
|
val = this._expanded;
|
13556
|
-
if(val) {
|
13610
|
+
if(val != null) {
|
13557
13611
|
obj["collapsed"] = !val;
|
13558
13612
|
}
|
13559
13613
|
|
@@ -13651,6 +13705,7 @@ RowDefinition.prototype.setDataSource = function(dataSource) {
|
|
13651
13705
|
if(!rowData) {
|
13652
13706
|
rowData = {};
|
13653
13707
|
rowData[ROW_DEF] = this; // Enable tracking back and updating data
|
13708
|
+
rowData["X_RIC_NAME"] = this.getDisplayText();
|
13654
13709
|
this.setRowData(rowData); // TODO: This will dispatch dataChanged event and caused update to be added, which should not happen
|
13655
13710
|
}
|
13656
13711
|
|
@@ -13793,7 +13848,16 @@ RowDefinition.prototype.getDisplayText = function() {
|
|
13793
13848
|
if(this._label != null) { // Empty string is allowed
|
13794
13849
|
return this._label;
|
13795
13850
|
}
|
13796
|
-
|
13851
|
+
|
13852
|
+
if(this._ric) {
|
13853
|
+
return this._ric;
|
13854
|
+
}
|
13855
|
+
|
13856
|
+
if(this._permId) {
|
13857
|
+
return this._permId;
|
13858
|
+
}
|
13859
|
+
|
13860
|
+
return this._userInput;
|
13797
13861
|
};
|
13798
13862
|
/** @public
|
13799
13863
|
* @return {string|null}
|
@@ -13857,13 +13921,18 @@ RowDefinition.prototype.isRealTimeRow = function() {
|
|
13857
13921
|
if(!this.getRic()) { // Empty row
|
13858
13922
|
return false;
|
13859
13923
|
}
|
13860
|
-
if(this.
|
13924
|
+
if(!this._realTime) {
|
13861
13925
|
return false;
|
13862
13926
|
}
|
13927
|
+
|
13863
13928
|
if(this._autoGenerated) { // Constituents in chain are not real-time row
|
13864
13929
|
return false;
|
13865
13930
|
}
|
13866
13931
|
|
13932
|
+
if(this.isRowHeader()) {
|
13933
|
+
return false;
|
13934
|
+
}
|
13935
|
+
|
13867
13936
|
return true;
|
13868
13937
|
};
|
13869
13938
|
|
@@ -13892,7 +13961,7 @@ RowDefinition.prototype.subscribeForUpdates = function() {
|
|
13892
13961
|
if(prevRowData) {
|
13893
13962
|
this._dc.setRowData(this._dataId, prevRowData); // TODO: We may need to create a new object instead of prevRowData for data correctness
|
13894
13963
|
} else {
|
13895
|
-
this._dc.setRowData(this._dataId, {"X_RIC_NAME": this.
|
13964
|
+
this._dc.setRowData(this._dataId, {"X_RIC_NAME": this.getDisplayText(), "ROW_DEF": this}); // Trigger data update immediately
|
13896
13965
|
}
|
13897
13966
|
return true;
|
13898
13967
|
};
|
@@ -14353,40 +14422,6 @@ var SYNAPSE_URL =
|
|
14353
14422
|
+ 'hits=1' // search only 1 result
|
14354
14423
|
+ '&profile=' + encodeURIComponent('Field Selector');
|
14355
14424
|
|
14356
|
-
/** @function
|
14357
|
-
* @private
|
14358
|
-
* @param {Object} e
|
14359
|
-
*/
|
14360
|
-
function xRicNameRenderer(e) {
|
14361
|
-
e.cell.setContent(e.rowDef.getDisplayText());
|
14362
|
-
}
|
14363
|
-
/** @function
|
14364
|
-
* @private
|
14365
|
-
* @param {RowDefinition} rowA
|
14366
|
-
* @param {RowDefinition} rowB
|
14367
|
-
* @param {number} order
|
14368
|
-
* @returns {number}
|
14369
|
-
*/
|
14370
|
-
function xRicNameSorter(rowA, rowB, order) {
|
14371
|
-
var A = rowA.getDisplayText();
|
14372
|
-
var B = rowB.getDisplayText();
|
14373
|
-
if(A === B) {
|
14374
|
-
return 0;
|
14375
|
-
}
|
14376
|
-
if(!A) {
|
14377
|
-
return 1;
|
14378
|
-
}
|
14379
|
-
if(!B) {
|
14380
|
-
return -1;
|
14381
|
-
}
|
14382
|
-
if(A < B) {
|
14383
|
-
return -order;
|
14384
|
-
}
|
14385
|
-
|
14386
|
-
return order;
|
14387
|
-
}
|
14388
|
-
|
14389
|
-
|
14390
14425
|
/* @namespace */
|
14391
14426
|
var FieldDefinition = {};
|
14392
14427
|
|
@@ -14394,13 +14429,6 @@ var FieldDefinition = {};
|
|
14394
14429
|
* @private
|
14395
14430
|
*/
|
14396
14431
|
FieldDefinition._defs = {
|
14397
|
-
"X_RIC_NAME": {
|
14398
|
-
name: "RIC",
|
14399
|
-
IsRealtimeField: false,
|
14400
|
-
width: 100,
|
14401
|
-
binding: xRicNameRenderer,
|
14402
|
-
sortLogic: xRicNameSorter
|
14403
|
-
},
|
14404
14432
|
"CF_NAME": {
|
14405
14433
|
name: "Name",
|
14406
14434
|
rank: 2800003,
|
@@ -16795,6 +16823,13 @@ GroupDefinitions.prototype.getGroups = function () {
|
|
16795
16823
|
}
|
16796
16824
|
return groupDefs;
|
16797
16825
|
};
|
16826
|
+
/** Get array of all existing group ids
|
16827
|
+
* @public
|
16828
|
+
* @return {!Array.<string>}
|
16829
|
+
*/
|
16830
|
+
GroupDefinitions.prototype.getGroupIds = function () {
|
16831
|
+
return Object.keys(this._groupMap);
|
16832
|
+
};
|
16798
16833
|
/** @public
|
16799
16834
|
* @return {!Object.<string, Object>}
|
16800
16835
|
*/
|
@@ -16901,7 +16936,18 @@ GroupDefinitions.prototype.getParentId = function (childId, groupLevel) {
|
|
16901
16936
|
return parentId || "";
|
16902
16937
|
};
|
16903
16938
|
|
16904
|
-
|
16939
|
+
/** Remove all existing group definitions
|
16940
|
+
* @public
|
16941
|
+
* @return {boolean}
|
16942
|
+
*/
|
16943
|
+
GroupDefinitions.prototype.removeAllGroups = function () {
|
16944
|
+
for(var groupId in this._groupMap) { // eslint-disable-line
|
16945
|
+
this._groupMap = {};
|
16946
|
+
this._childToParent = {};
|
16947
|
+
return true;
|
16948
|
+
}
|
16949
|
+
return false;
|
16950
|
+
};
|
16905
16951
|
/** Remove all existing group definitions and replace them with the given definitions.
|
16906
16952
|
* @public
|
16907
16953
|
* @param {Array.<Object>=} groupDefs Use null or empty array to remove all existing groups
|
@@ -17046,9 +17092,10 @@ GroupDefinitions.prototype.hasGroupChild = function (parentId, childId) {
|
|
17046
17092
|
/** @public
|
17047
17093
|
* @param {string} parentId Group id
|
17048
17094
|
* @param {string} childId
|
17095
|
+
* @param {number=} position
|
17049
17096
|
* @return {boolean}
|
17050
17097
|
*/
|
17051
|
-
GroupDefinitions.prototype.addGroupChild = function (parentId, childId) {
|
17098
|
+
GroupDefinitions.prototype.addGroupChild = function (parentId, childId, position) {
|
17052
17099
|
var groupDef = this._groupMap[parentId];
|
17053
17100
|
|
17054
17101
|
if(childId && groupDef) {
|
@@ -17061,7 +17108,11 @@ GroupDefinitions.prototype.addGroupChild = function (parentId, childId) {
|
|
17061
17108
|
if(childDef) {
|
17062
17109
|
childDef.parentId = parentId;
|
17063
17110
|
}
|
17064
|
-
|
17111
|
+
if(position != null && position >= 0) {
|
17112
|
+
chdr.splice(position, 0, childId);
|
17113
|
+
} else {
|
17114
|
+
chdr.push(childId);
|
17115
|
+
}
|
17065
17116
|
return true;
|
17066
17117
|
}
|
17067
17118
|
}
|
@@ -17170,6 +17221,18 @@ GroupDefinitions.prototype.setGroupChildren = function (groupId, newChildList) {
|
|
17170
17221
|
}
|
17171
17222
|
return false;
|
17172
17223
|
};
|
17224
|
+
|
17225
|
+
/** @public
|
17226
|
+
* @param {string} groupId
|
17227
|
+
* @return {string}
|
17228
|
+
*/
|
17229
|
+
GroupDefinitions.prototype.getGroupName = function (groupId) {
|
17230
|
+
var groupDef = this._groupMap[groupId];
|
17231
|
+
if(groupDef) {
|
17232
|
+
return groupDef.name || "";
|
17233
|
+
}
|
17234
|
+
return "";
|
17235
|
+
};
|
17173
17236
|
/** @public
|
17174
17237
|
* @param {string} groupId
|
17175
17238
|
* @param {string} groupName
|
@@ -17186,6 +17249,7 @@ GroupDefinitions.prototype.setGroupName = function (groupId, groupName) {
|
|
17186
17249
|
|
17187
17250
|
return false;
|
17188
17251
|
};
|
17252
|
+
|
17189
17253
|
/* harmony default export */ var es6_GroupDefinitions = (GroupDefinitions);
|
17190
17254
|
|
17191
17255
|
|
@@ -20347,6 +20411,10 @@ ILayoutGrid.prototype.calculateColumnBounds = function (lftIdx, rgtIdx, outPosit
|
|
20347
20411
|
* @param {number=} topPx Top position of bound
|
20348
20412
|
*/
|
20349
20413
|
ILayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderAry, topPx) {};
|
20414
|
+
/** @public
|
20415
|
+
* @ignore
|
20416
|
+
*/
|
20417
|
+
ILayoutGrid.prototype.updateColumnSeparators = function () {};
|
20350
20418
|
|
20351
20419
|
/* harmony default export */ var grid_ILayoutGrid = (ILayoutGrid);
|
20352
20420
|
|
@@ -24336,7 +24404,14 @@ LayoutGrid.prototype._colSelDirty = false;
|
|
24336
24404
|
* @private
|
24337
24405
|
*/
|
24338
24406
|
LayoutGrid.prototype._hscrollbar = null;
|
24339
|
-
|
24407
|
+
/** @type {Element}
|
24408
|
+
* @private
|
24409
|
+
*/
|
24410
|
+
LayoutGrid.prototype._leftColumnSeparator = null;
|
24411
|
+
/** @type {Element}
|
24412
|
+
* @private
|
24413
|
+
*/
|
24414
|
+
LayoutGrid.prototype._rightColumnSeparator = null;
|
24340
24415
|
|
24341
24416
|
/**
|
24342
24417
|
* {@link ElementWrapper#dispose}
|
@@ -26303,8 +26378,7 @@ LayoutGrid.prototype.selectColumn = function (colIndex, selected) {
|
|
26303
26378
|
|
26304
26379
|
var boundLayer = this._boundLayer;
|
26305
26380
|
if(!boundLayer) {
|
26306
|
-
|
26307
|
-
boundLayer.className = "cover-layer";
|
26381
|
+
this._initBoundLayer();
|
26308
26382
|
this._updateLayers();
|
26309
26383
|
}
|
26310
26384
|
}
|
@@ -26476,6 +26550,92 @@ LayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderAry, topPx)
|
|
26476
26550
|
}
|
26477
26551
|
};
|
26478
26552
|
|
26553
|
+
/** @public
|
26554
|
+
*/
|
26555
|
+
LayoutGrid.prototype.updateColumnSeparators = function () {
|
26556
|
+
var pinnedLeftCount = this._hscrollbar.getPinnedLeftColumnCount();
|
26557
|
+
var pinnedRightCount = this._hscrollbar.getPinnedRightColumnCount();
|
26558
|
+
if ((pinnedLeftCount || pinnedRightCount) && !this._boundLayer) {
|
26559
|
+
this._initBoundLayer();
|
26560
|
+
}
|
26561
|
+
|
26562
|
+
var isScrollbarActive = false;
|
26563
|
+
if(this._hscrollbar) {
|
26564
|
+
isScrollbarActive = this._hscrollbar.isActive();
|
26565
|
+
}
|
26566
|
+
|
26567
|
+
var boundLayer = this._boundLayer;
|
26568
|
+
|
26569
|
+
var colSeparator = this._leftColumnSeparator;
|
26570
|
+
if (isScrollbarActive && pinnedLeftCount) {
|
26571
|
+
if (!colSeparator) {
|
26572
|
+
colSeparator = this._leftColumnSeparator = this._createColumnSeparator();
|
26573
|
+
}
|
26574
|
+
if (!colSeparator.parentNode) {
|
26575
|
+
if (boundLayer.children.length) {
|
26576
|
+
boundLayer.insertBefore(colSeparator, boundLayer.children[0]);
|
26577
|
+
} else {
|
26578
|
+
boundLayer.appendChild(colSeparator);
|
26579
|
+
}
|
26580
|
+
}
|
26581
|
+
|
26582
|
+
var rightPos = this._trackX.getLaneStart(pinnedLeftCount);
|
26583
|
+
colSeparator.style.left = (rightPos - 1) + "px";
|
26584
|
+
colSeparator.style.height = this._trackY.getTrackSize() + "px";
|
26585
|
+
} else {
|
26586
|
+
if (colSeparator && colSeparator.parentNode) {
|
26587
|
+
this._boundLayer.removeChild(colSeparator);
|
26588
|
+
}
|
26589
|
+
}
|
26590
|
+
|
26591
|
+
colSeparator = this._rightColumnSeparator;
|
26592
|
+
if (isScrollbarActive && pinnedRightCount) {
|
26593
|
+
if (!colSeparator) {
|
26594
|
+
colSeparator = this._rightColumnSeparator = this._createColumnSeparator();
|
26595
|
+
}
|
26596
|
+
|
26597
|
+
if (!colSeparator.parentNode) {
|
26598
|
+
if (boundLayer.children.length) {
|
26599
|
+
boundLayer.insertBefore(colSeparator, boundLayer.children[0]);
|
26600
|
+
} else {
|
26601
|
+
boundLayer.appendChild(colSeparator);
|
26602
|
+
}
|
26603
|
+
}
|
26604
|
+
var colCount = this.getColumnCount();
|
26605
|
+
var colWidth = this._trackX.getLaneEnd(colCount - 1) - this._trackX.getLaneStart(colCount - pinnedRightCount);
|
26606
|
+
var viewSize = this._getViewSize();
|
26607
|
+
|
26608
|
+
colSeparator.style.left = (viewSize - colWidth - this._rightSpaceSize) + "px";
|
26609
|
+
colSeparator.style.height = this._trackY.getTrackSize() + "px";
|
26610
|
+
} else {
|
26611
|
+
if (colSeparator && colSeparator.parentNode) {
|
26612
|
+
this._boundLayer.removeChild(colSeparator);
|
26613
|
+
}
|
26614
|
+
}
|
26615
|
+
};
|
26616
|
+
|
26617
|
+
/** @private
|
26618
|
+
* @return {Element}
|
26619
|
+
*/
|
26620
|
+
LayoutGrid.prototype._createColumnSeparator = function() {
|
26621
|
+
var colSeparator = document.createElement("div");
|
26622
|
+
colSeparator.classList.add("column-separator");
|
26623
|
+
return colSeparator;
|
26624
|
+
};
|
26625
|
+
|
26626
|
+
/** @private
|
26627
|
+
* @return {Element}
|
26628
|
+
*/
|
26629
|
+
LayoutGrid.prototype._initBoundLayer = function () {
|
26630
|
+
var boundLayer = this._boundLayer;
|
26631
|
+
if(!boundLayer) {
|
26632
|
+
boundLayer = this._boundLayer = document.createElement("div");
|
26633
|
+
boundLayer.className = "cover-layer";
|
26634
|
+
this._element.appendChild(boundLayer);
|
26635
|
+
}
|
26636
|
+
return boundLayer;
|
26637
|
+
};
|
26638
|
+
|
26479
26639
|
/**
|
26480
26640
|
* @private
|
26481
26641
|
* @param {number} indexX
|
@@ -34995,6 +35155,12 @@ VirtualizedLayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderA
|
|
34995
35155
|
this._grid.updateColumnBounds(posAry, noBorderAry, topPx);
|
34996
35156
|
this._updateRowBounds();
|
34997
35157
|
};
|
35158
|
+
/** @public
|
35159
|
+
* @ignore
|
35160
|
+
*/
|
35161
|
+
VirtualizedLayoutGrid.prototype.updateColumnSeparators = function () {
|
35162
|
+
this._grid.updateColumnSeparators();
|
35163
|
+
};
|
34998
35164
|
/** @private
|
34999
35165
|
*/
|
35000
35166
|
VirtualizedLayoutGrid.prototype._initBoundLayer = function () {
|
@@ -35760,7 +35926,7 @@ Core.prototype._batches = null;
|
|
35760
35926
|
* @return {string}
|
35761
35927
|
*/
|
35762
35928
|
Core.getVersion = function () {
|
35763
|
-
return "5.1.
|
35929
|
+
return "5.1.50";
|
35764
35930
|
};
|
35765
35931
|
/** {@link ElementWrapper#dispose}
|
35766
35932
|
* @override
|
@@ -36973,6 +37139,7 @@ Core.prototype._moveColumn = function (fromCol, destCol) {
|
|
36973
37139
|
}
|
36974
37140
|
}
|
36975
37141
|
this._updateColumnBounds();
|
37142
|
+
this._updateColumnSeparators();
|
36976
37143
|
return true;
|
36977
37144
|
};
|
36978
37145
|
|
@@ -37303,6 +37470,7 @@ Core.prototype.setDefaultRowHeight = function (val, opt_includeTitle) {
|
|
37303
37470
|
this._syncRowHeights();
|
37304
37471
|
this._rowHeightSync = true;
|
37305
37472
|
this.setRowScrollingStep(this._rowScrollingStep);
|
37473
|
+
this._updateColumnSeparators();
|
37306
37474
|
}
|
37307
37475
|
};
|
37308
37476
|
|
@@ -38137,6 +38305,7 @@ Core.prototype.freezeColumn = function (frozenColIndex, numRightColumn) {
|
|
38137
38305
|
|
38138
38306
|
this._onColumnCountChanged(); // Activate horizontal scrollbar and column virtualization
|
38139
38307
|
this._updateScrollbarWidth(true, true);
|
38308
|
+
this._updateColumnSeparators();
|
38140
38309
|
};
|
38141
38310
|
|
38142
38311
|
/** @private
|
@@ -39378,6 +39547,21 @@ Core.prototype._updateColumnBounds = function () {
|
|
39378
39547
|
section.updateColumnBounds(posAry, noBorderAry);
|
39379
39548
|
}
|
39380
39549
|
};
|
39550
|
+
/* @private
|
39551
|
+
*/
|
39552
|
+
Core.prototype._updateColumnSeparators = function() {
|
39553
|
+
var sectCount = this._settings.length;
|
39554
|
+
if(!sectCount) {
|
39555
|
+
return;
|
39556
|
+
}
|
39557
|
+
|
39558
|
+
for(var i = 0; i < sectCount; i++) {
|
39559
|
+
var section = this._settings[i].getSection();
|
39560
|
+
if (section) {
|
39561
|
+
section.updateColumnSeparators();
|
39562
|
+
}
|
39563
|
+
}
|
39564
|
+
};
|
39381
39565
|
|
39382
39566
|
/** @public
|
39383
39567
|
* @param {number} startColIndex INCLUSIVE
|
@@ -40447,6 +40631,8 @@ Core.prototype._onRowCountChanged = function (e) {
|
|
40447
40631
|
if(!forceUpdate) {
|
40448
40632
|
this._updateVScrollbar(); // Asynchronous
|
40449
40633
|
}
|
40634
|
+
|
40635
|
+
this._updateColumnSeparators();
|
40450
40636
|
if(prevRowCount < newRowCount) {
|
40451
40637
|
this._dispatch("rowAdded", e);
|
40452
40638
|
} else if(prevRowCount > newRowCount) {
|
@@ -40504,7 +40690,7 @@ Core.prototype._onRowHeightChanged = function (e) {
|
|
40504
40690
|
minSectionIndex >= this._startVScrollbarIndex);
|
40505
40691
|
}
|
40506
40692
|
}
|
40507
|
-
|
40693
|
+
this._updateColumnSeparators();
|
40508
40694
|
this._dispatchRowPositionChanged();
|
40509
40695
|
};
|
40510
40696
|
/** @private
|
@@ -40569,6 +40755,7 @@ Core.prototype._onColumnCountChanged = function () {
|
|
40569
40755
|
var pinnedRight = this._countPinnedRightColumns();
|
40570
40756
|
|
40571
40757
|
this._updateColumnBounds();
|
40758
|
+
this._updateColumnSeparators();
|
40572
40759
|
|
40573
40760
|
if (this._hScrollbarEnabled && pinnedLeft + pinnedRight < this.getColumnCount()) {
|
40574
40761
|
this._hscrollbar.enable();
|
@@ -40850,6 +41037,7 @@ Core.prototype._syncLayoutToColumns = function (from, to, opt_forceDispatching)
|
|
40850
41037
|
var paneChanged = forceUpdate || (from < this.getHScrollStartIndex()) || (to > this.getFirstPinnedRightIndex());
|
40851
41038
|
this._updateScrollbarWidth(paneChanged, true /* contentChanged */);
|
40852
41039
|
this._updateColumnBounds();
|
41040
|
+
this._updateColumnSeparators();
|
40853
41041
|
this._dispatchColumnPositionChanged();
|
40854
41042
|
|
40855
41043
|
if (dirty || opt_forceDispatching) {
|
@@ -40945,6 +41133,7 @@ Core.prototype._updateLayout = function () {
|
|
40945
41133
|
var section = this._settings[s].getSection();
|
40946
41134
|
section.updateLayout(); // Notify section about forced recalculation of the layout
|
40947
41135
|
}
|
41136
|
+
this._updateColumnSeparators();
|
40948
41137
|
};
|
40949
41138
|
|
40950
41139
|
/** @private */
|
@@ -43907,6 +44096,7 @@ var Grid = function(placeholder, config) {
|
|
43907
44096
|
t._dc = new DataCache_DataCache();
|
43908
44097
|
t._dc.listen("dataChanged", t._onDataChanged);
|
43909
44098
|
t._dc.listen("dataComposed", t._onDataComposed);
|
44099
|
+
t._dc.addStaticFields([ROW_DEF, SUB_ID]); // Static fields are deprecated, set fields to be ignore during clone in DataCache
|
43910
44100
|
|
43911
44101
|
t._dt = new DataTable();
|
43912
44102
|
t._dt.setSortingLogic(/** @type{Function} */(t._mainSorter));
|
@@ -45107,8 +45297,11 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
|
|
45107
45297
|
if(colDef.getChildren()) { // Parent time series field doesn't provide hidden property
|
45108
45298
|
colConfig["hidden"] = false;
|
45109
45299
|
}
|
45300
|
+
|
45301
|
+
this._grid.startBatch("reset");
|
45110
45302
|
this.insertColumn(colConfig, colIndex);
|
45111
45303
|
this.removeColumn(colIndex + 1); // remove existing column after insert
|
45304
|
+
this._grid.stopBatch("reset");
|
45112
45305
|
};
|
45113
45306
|
|
45114
45307
|
/** to update column name when field info is loaded
|
@@ -45369,11 +45562,6 @@ Grid.prototype._onColumnAdded = function(e) {
|
|
45369
45562
|
this._grid.enableColumnClass(idx, classes[i]);
|
45370
45563
|
}
|
45371
45564
|
var colField = colDef.getField();
|
45372
|
-
if (!colDef.isRealTimeField()) {
|
45373
|
-
if(this._dc) {
|
45374
|
-
this._dc.addStaticFields([colField]);
|
45375
|
-
}
|
45376
|
-
}
|
45377
45565
|
this._grid.setDataColumnName(idx, ROW_DEF); // This make ColumnDefinition renderer work
|
45378
45566
|
var fields = colDef.getAllFields();
|
45379
45567
|
var referrer = colDef.getId();
|
@@ -49555,6 +49743,13 @@ MockSubscriptions.prototype._generateQuoteData = function(sub, fields) {
|
|
49555
49743
|
values[field] = data.value;
|
49556
49744
|
values[formattedField] = data.formattedValue;
|
49557
49745
|
}
|
49746
|
+
|
49747
|
+
// The delay symbol for X_RIC_NAME will depend on the INDICATOR field.
|
49748
|
+
if(values["X_RIC_NAME"] != null && values["INDICATOR"] != null) {
|
49749
|
+
if(values["INDICATOR"] > 0) {
|
49750
|
+
values["X_RIC_NAME"] = "/" + values["X_RIC_NAME"];
|
49751
|
+
}
|
49752
|
+
}
|
49558
49753
|
return values;
|
49559
49754
|
};
|
49560
49755
|
|