@refinitiv-ui/efx-grid 6.0.145 → 6.0.147
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 +2 -1
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +2 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +140 -119
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +1 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +7 -2
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +35 -35
- package/lib/versions.json +1 -1
- package/package.json +1 -1
@@ -75,6 +75,7 @@ let _createHiddenInput = function () {
|
|
75
75
|
styleObj.width = styleObj.height = styleObj.padding = styleObj.border = "0";
|
76
76
|
hiddenInput.value = "0";
|
77
77
|
hiddenInput.role = "grid";
|
78
|
+
hiddenInput.readOnly = true;
|
78
79
|
return hiddenInput;
|
79
80
|
};
|
80
81
|
/** @private
|
@@ -621,7 +622,7 @@ Core.prototype._hasPendingRowChange = false;
|
|
621
622
|
* @return {string}
|
622
623
|
*/
|
623
624
|
Core.getVersion = function () {
|
624
|
-
return "5.1.
|
625
|
+
return "5.1.137";
|
625
626
|
};
|
626
627
|
/** {@link ElementWrapper#dispose}
|
627
628
|
* @override
|
package/lib/grid/index.js
CHANGED
@@ -3318,6 +3318,15 @@ ElfUtil._icons = {
|
|
3318
3318
|
ElfUtil._icons["halo-theme"] = ElfUtil._icons["elf-theme-halo"];
|
3319
3319
|
ElfUtil._icons["solar-theme"] = ElfUtil._icons["elf-theme-solar"];
|
3320
3320
|
|
3321
|
+
|
3322
|
+
/** Set ELF version for testing purpose
|
3323
|
+
* @public
|
3324
|
+
* @function
|
3325
|
+
* @param {number} ver
|
3326
|
+
*/
|
3327
|
+
ElfUtil.setElfVersion = function (ver) {
|
3328
|
+
ElfUtil._elfVersion = ver;
|
3329
|
+
};
|
3321
3330
|
/** Check ELF version
|
3322
3331
|
* @public
|
3323
3332
|
* @function
|
@@ -3481,9 +3490,8 @@ ElfUtil.isHaloTheme = function (themeName) {
|
|
3481
3490
|
* @public
|
3482
3491
|
* @function
|
3483
3492
|
* @param {Object} configObj Object to mutate
|
3484
|
-
* @param {Element=} optElem Deprecated param: will no longer use anymore
|
3485
3493
|
*/
|
3486
|
-
ElfUtil.injectIcons = function (configObj
|
3494
|
+
ElfUtil.injectIcons = function (configObj) {
|
3487
3495
|
if (typeof configObj !== "object") { return; }
|
3488
3496
|
|
3489
3497
|
let theme = ElfUtil.getThemeName();
|
@@ -3735,7 +3743,8 @@ ElfUtil._profileNameRetrieved = function() {
|
|
3735
3743
|
};
|
3736
3744
|
|
3737
3745
|
/** Get theme colors from document
|
3738
|
-
* @
|
3746
|
+
* @public
|
3747
|
+
* @ignore
|
3739
3748
|
* @param {string} profileName Movement color profile name
|
3740
3749
|
*/
|
3741
3750
|
ElfUtil._retrieveThemeColors = function(profileName) {
|
@@ -47206,7 +47215,7 @@ Grid_Grid.prototype._cloneChain = function(newRowDef) {
|
|
47206
47215
|
"subId": subId
|
47207
47216
|
};
|
47208
47217
|
for (let i = 0; i < count; i++) {
|
47209
|
-
let childRowDef = constituents[i];
|
47218
|
+
let childRowDef = constituents[i];
|
47210
47219
|
evtArg["ric"] = childRowDef.getRic();
|
47211
47220
|
evtArg["values"] = childRowDef.cloneRowData();
|
47212
47221
|
evtArg["values"]["SUB_ID"] = subId; // Imitate real-time service responses
|
@@ -49933,6 +49942,7 @@ let _fieldInfo = {
|
|
49933
49942
|
"PRCTCK_1": {type: "set", members: ["\u21e7", "B\u21e7", "\u2191", "B\u2191", "26", "1", "\"1\"", "-1", "\u21e9", "B\u21e9", "\u2193", "B\u2193", "27", "2", "\"2\""] },
|
49934
49943
|
"CF_NETCHNG": {type: "number", min: -100, max: 100},
|
49935
49944
|
"CF_VOLUME": {type: "number", min: 0, max: 1e7},
|
49945
|
+
"CHILD_ORDER": {type: "set", ignore: true, members: [undefined]}, // eslint-disable-line
|
49936
49946
|
"RI_FLAG": {type: "set", members: ["R", "Q", "I", "_", ""]},
|
49937
49947
|
"RI_CODE": {type: "number", min: 0, max: 2},
|
49938
49948
|
"STATUS": {type: "number", min: 0, max: 6},
|
@@ -50097,8 +50107,12 @@ let randBoolean = function(seed) {
|
|
50097
50107
|
* @return {*}
|
50098
50108
|
*/
|
50099
50109
|
let randMember = function(set, seed) {
|
50100
|
-
|
50101
|
-
|
50110
|
+
var len = set ? (set.length || 0) : 0;
|
50111
|
+
if(len) {
|
50112
|
+
if(len === 1) {
|
50113
|
+
return set[0];
|
50114
|
+
}
|
50115
|
+
let index = randIndex(len, seed);
|
50102
50116
|
return set[index];
|
50103
50117
|
}
|
50104
50118
|
return String.fromCharCode(randInt(65, 90, seed));
|
@@ -51217,6 +51231,10 @@ MockSubscriptions.prototype._maxInterval = 850;
|
|
51217
51231
|
*/
|
51218
51232
|
MockSubscriptions.prototype._percentageDataUpdate = 0.1; // 10% by default
|
51219
51233
|
/** @private
|
51234
|
+
* @type {number}
|
51235
|
+
*/
|
51236
|
+
MockSubscriptions.prototype._percentageOrderChange = 1; // 100%
|
51237
|
+
/** @private
|
51220
51238
|
* @type {boolean}
|
51221
51239
|
*/
|
51222
51240
|
MockSubscriptions.prototype._constituentCache = false;
|
@@ -51249,6 +51267,11 @@ MockSubscriptions.prototype.config = function(options) {
|
|
51249
51267
|
this._percentageDataUpdate = num / 100;
|
51250
51268
|
}
|
51251
51269
|
|
51270
|
+
num = options.percentageOrderChange;
|
51271
|
+
if(typeof num === "number") {
|
51272
|
+
this._percentageOrderChange = num / 100;
|
51273
|
+
}
|
51274
|
+
|
51252
51275
|
let value = options.constituentCache;
|
51253
51276
|
if(value != null) {
|
51254
51277
|
this._constituentCache = value;
|
@@ -51277,6 +51300,15 @@ MockSubscriptions.prototype.setPercentageDataUpdate = function(percent) {
|
|
51277
51300
|
}
|
51278
51301
|
};
|
51279
51302
|
|
51303
|
+
/** @public
|
51304
|
+
* @param {number=} percent
|
51305
|
+
*/
|
51306
|
+
MockSubscriptions.prototype.setPercentageOrderChanged = function(percent) {
|
51307
|
+
if(typeof percent === "number") {
|
51308
|
+
this._percentageOrderChange = Math.round(percent / 100);
|
51309
|
+
}
|
51310
|
+
};
|
51311
|
+
|
51280
51312
|
/** @public
|
51281
51313
|
* @param {number} seed
|
51282
51314
|
*/
|
@@ -51564,7 +51596,7 @@ MockSubscriptions.prototype._addSymbol = function(ric, asChain, subId) {
|
|
51564
51596
|
childSub["CHILD_ORDER"] = i;
|
51565
51597
|
this._dataMap.addItem(_joinSubKeys(sub, childSub), childSub);
|
51566
51598
|
}
|
51567
|
-
} else {
|
51599
|
+
} else { // Duplicate chain
|
51568
51600
|
let firstSub = subs[0];
|
51569
51601
|
let constituents = firstSub["children"];
|
51570
51602
|
childCount = constituents.length;
|
@@ -51612,7 +51644,6 @@ MockSubscriptions.prototype._connect = function() {
|
|
51612
51644
|
}
|
51613
51645
|
};
|
51614
51646
|
|
51615
|
-
/** @private */
|
51616
51647
|
MockSubscriptions.prototype._onSubscriptionResponse = function() {
|
51617
51648
|
this._timerId = 0;
|
51618
51649
|
|
@@ -51630,57 +51661,66 @@ MockSubscriptions.prototype._onSubscriptionResponse = function() {
|
|
51630
51661
|
let numRows = this._dataGen.randInt(minRow, maxRow);
|
51631
51662
|
let fields = this._fields;
|
51632
51663
|
|
51664
|
+
let updateCount = 0;
|
51665
|
+
let childOrderChange;
|
51633
51666
|
for(let i = 0; i < numRows; i++) {
|
51667
|
+
// find key to random subs (key is subId)
|
51634
51668
|
let key = keys[this._dataGen.randIndex(len)]; // WARNING: Same sub could be picked more than once
|
51635
51669
|
let subs = this._dataMap.getItems(key); // Get all subs with the same RIC
|
51670
|
+
let subCount = subs.length;
|
51636
51671
|
|
51637
|
-
let
|
51638
|
-
let
|
51639
|
-
let
|
51672
|
+
let j;
|
51673
|
+
let firstSub = subs[0]; // Only the first sub is need to generate data
|
51674
|
+
let subParent = firstSub.parent;
|
51675
|
+
let updatePosition = this._dataGen.randInt(0, 100) < this._percentageOrderChange * 100 ? true : false; // Random chance to change dynamic chain position (2% to change)
|
51640
51676
|
|
51641
|
-
let values
|
51642
|
-
if(_isDynamicChain(key) && subParent && updatePosition) { // subParent in header of dynamic chain
|
51643
|
-
// TODO: support rate of ordering is changed
|
51677
|
+
let values = this._generateQuoteData(firstSub, fields);
|
51678
|
+
if(_isDynamicChain(key) && subParent && updatePosition) { // subParent in header of dynamic chain behaves like a normal ric
|
51644
51679
|
let children = subParent.children;
|
51680
|
+
let childCount = children.length;
|
51645
51681
|
|
51646
|
-
children = _shuffleArray(children);
|
51647
|
-
let
|
51648
|
-
|
51649
|
-
|
51650
|
-
|
51651
|
-
values = this._generateQuoteData(sub, fields);
|
51682
|
+
children = _shuffleArray(children); // Random swap children in array
|
51683
|
+
let newOrder = children.indexOf(firstSub);
|
51684
|
+
firstSub["CHILD_ORDER"] = newOrder; // This is bad
|
51685
|
+
values["CHILD_ORDER"] = newOrder;
|
51652
51686
|
|
51653
|
-
|
51654
|
-
for(j = 0; j <
|
51655
|
-
|
51656
|
-
|
51657
|
-
|
51658
|
-
|
51659
|
-
this._dispatchDataChanged(
|
51660
|
-
|
51661
|
-
|
51662
|
-
this._dispatchDataChanged(child, {
|
51663
|
-
X_RIC_NAME: child.ric,
|
51664
|
-
CHILD_ORDER: currentChild
|
51687
|
+
childOrderChange = true;
|
51688
|
+
for(j = 0; j < subCount; ++j) { // It could be same ric and it need to dispatch with same ric number
|
51689
|
+
this._dispatchDataChanged(subs[j], values);
|
51690
|
+
// Update child order for all children with the same parent
|
51691
|
+
for (let k = 0; k < childCount; k++) { // This is not correct, if there is a duplicate dynamic chain
|
51692
|
+
if(k !== newOrder) {
|
51693
|
+
this._dispatchDataChanged(children[k], {
|
51694
|
+
X_RIC_NAME: children[k].ric,
|
51695
|
+
CHILD_ORDER: k
|
51665
51696
|
});
|
51666
51697
|
}
|
51667
51698
|
}
|
51668
|
-
this._dispatchPostUpdate({ childOrderChange: true });
|
51669
51699
|
}
|
51670
|
-
|
51671
51700
|
} else {
|
51672
|
-
|
51673
|
-
|
51674
|
-
for(j = 0; j < jLen; ++j) { // It could be same ric and it need to dispatch with same ric number
|
51675
|
-
let childOrder = subs[j]["CHILD_ORDER"];
|
51701
|
+
if(subCount > 1) { // Duplicate CHILD_ORDER from the first sub for other sub with the same RIC (not entirely correct)
|
51702
|
+
let childOrder = firstSub["CHILD_ORDER"];
|
51676
51703
|
if(childOrder != null) { // Children of chain will have a CHILD_ORDER
|
51677
51704
|
values["CHILD_ORDER"] = childOrder;
|
51678
51705
|
}
|
51706
|
+
}
|
51707
|
+
for(j = 0; j < subCount; ++j) { // It could be same ric and it need to dispatch with same ric number
|
51679
51708
|
this._dispatchDataChanged(subs[j], values);
|
51709
|
+
updateCount++;
|
51680
51710
|
}
|
51681
51711
|
}
|
51682
51712
|
}
|
51683
51713
|
|
51714
|
+
let postObj = {};
|
51715
|
+
if(childOrderChange != null) {
|
51716
|
+
postObj["childOrderChange"] = childOrderChange;
|
51717
|
+
}
|
51718
|
+
if(updateCount != null) {
|
51719
|
+
postObj["updateCount"] = updateCount;
|
51720
|
+
}
|
51721
|
+
|
51722
|
+
this._dispatchPostUpdate(postObj);
|
51723
|
+
|
51684
51724
|
this._connect();
|
51685
51725
|
};
|
51686
51726
|
|
@@ -51707,20 +51747,24 @@ MockSubscriptions.prototype._generateQuoteData = function(sub, fields) {
|
|
51707
51747
|
prefix: sub["parent"] ? sub["parent"]["ric"] : "" // prefix for constituents
|
51708
51748
|
};
|
51709
51749
|
for(let field in fields){
|
51710
|
-
let
|
51750
|
+
let fInfo = this._dataGen.generateQuoteData(field, options);
|
51751
|
+
if(fInfo.ignore) {
|
51752
|
+
continue;
|
51753
|
+
}
|
51754
|
+
|
51711
51755
|
let formattedField = field + "_FORMATTED";
|
51712
51756
|
if(prevData) {
|
51713
|
-
if(
|
51714
|
-
if(prevData[field] ===
|
51757
|
+
if(fInfo.changeOnly) {
|
51758
|
+
if(prevData[field] === fInfo.value) {
|
51715
51759
|
continue;
|
51716
51760
|
}
|
51717
51761
|
}
|
51718
|
-
prevData[field] =
|
51719
|
-
prevData[formattedField] =
|
51762
|
+
prevData[field] = fInfo.value;
|
51763
|
+
prevData[formattedField] = fInfo.formattedValue;
|
51720
51764
|
}
|
51721
51765
|
|
51722
|
-
values[field] =
|
51723
|
-
values[formattedField] =
|
51766
|
+
values[field] = fInfo.value;
|
51767
|
+
values[formattedField] = fInfo.formattedValue;
|
51724
51768
|
}
|
51725
51769
|
|
51726
51770
|
// The delay symbol for X_RIC_NAME will depend on the INDICATOR field.
|
@@ -52948,14 +52992,25 @@ ExpressionParser.parse = function(expression) {
|
|
52948
52992
|
* @property {string=} tickDown Color for negative tick icon
|
52949
52993
|
*/
|
52950
52994
|
|
52951
|
-
/** @constructor
|
52952
|
-
|
52995
|
+
/** @constructor
|
52996
|
+
*/
|
52953
52997
|
let CellPainter = function() {
|
52954
52998
|
this._conditions = [];
|
52955
52999
|
this._scopes = [];
|
52956
53000
|
|
52957
53001
|
CellPainter._painters.push(this); // For later referencing
|
52958
53002
|
};
|
53003
|
+
/** @private
|
53004
|
+
* @function
|
53005
|
+
* @param {Element} elem
|
53006
|
+
* @param {string=} targetClass
|
53007
|
+
*/
|
53008
|
+
let _removeCssClass = function(elem, targetClass) {
|
53009
|
+
if (elem._coloringCssClass != null && elem._coloringCssClass !== targetClass) {
|
53010
|
+
elem.classList.remove(elem._coloringCssClass);
|
53011
|
+
elem._coloringCssClass = null;
|
53012
|
+
}
|
53013
|
+
};
|
52959
53014
|
|
52960
53015
|
/** Enum for coloring types.
|
52961
53016
|
* @enum {number}
|
@@ -53078,25 +53133,7 @@ CellPainter.prototype.dispose = function() {
|
|
53078
53133
|
/** @public */
|
53079
53134
|
CellPainter.prototype.reset = function() {
|
53080
53135
|
this._setColoringType(0);
|
53081
|
-
|
53082
|
-
let len = this._scopes.length;
|
53083
|
-
if(len) {
|
53084
|
-
for(let i = 0; i < len; ++i) {
|
53085
|
-
let scope = this._scopes[i];
|
53086
|
-
if(CellPainter._clearBlinkTimer(scope)) {
|
53087
|
-
scope._restorer();
|
53088
|
-
}
|
53089
|
-
let cell = scope["cell"];
|
53090
|
-
if(cell) {
|
53091
|
-
delete cell["blinking"]; // Delete cell blinking scope
|
53092
|
-
}
|
53093
|
-
|
53094
|
-
scope["cell"] = null;
|
53095
|
-
}
|
53096
|
-
this._scopes.length = 0;
|
53097
|
-
}
|
53098
|
-
|
53099
|
-
this._blinkCondition = null;
|
53136
|
+
this.clearBlinking();
|
53100
53137
|
};
|
53101
53138
|
|
53102
53139
|
/** @public */
|
@@ -53107,12 +53144,6 @@ CellPainter.prototype.resetColoring = function() {
|
|
53107
53144
|
this._conditions.length = 0;
|
53108
53145
|
};
|
53109
53146
|
|
53110
|
-
/** @public */
|
53111
|
-
CellPainter.prototype.resetBlinking = function() {
|
53112
|
-
this._blinkCondition = null;
|
53113
|
-
this._scopes.length = 0;
|
53114
|
-
};
|
53115
|
-
|
53116
53147
|
/** @public */
|
53117
53148
|
CellPainter.prototype.clearBlinking = function() {
|
53118
53149
|
this._blinkCondition = null;
|
@@ -53133,12 +53164,11 @@ CellPainter.prototype.clearBlinking = function() {
|
|
53133
53164
|
this._scopes.length = 0;
|
53134
53165
|
}
|
53135
53166
|
};
|
53136
|
-
|
53137
|
-
|
53138
|
-
|
53139
|
-
|
53140
|
-
|
53141
|
-
};
|
53167
|
+
/** @public
|
53168
|
+
* @ignore
|
53169
|
+
* @function
|
53170
|
+
*/
|
53171
|
+
CellPainter.prototype.resetBlinking = CellPainter.prototype.clearBlinking;
|
53142
53172
|
|
53143
53173
|
/** Return true if no one is using this painter
|
53144
53174
|
* @public
|
@@ -53154,6 +53184,14 @@ CellPainter.prototype.clearHeatMap = function() {
|
|
53154
53184
|
return true;
|
53155
53185
|
}
|
53156
53186
|
};
|
53187
|
+
/** @public
|
53188
|
+
* @ignore
|
53189
|
+
* @function
|
53190
|
+
*/
|
53191
|
+
CellPainter.prototype.resetHeatMap = function() {
|
53192
|
+
this._conditions.length = 0;
|
53193
|
+
this._columnStats = null;
|
53194
|
+
};
|
53157
53195
|
|
53158
53196
|
/** @public */
|
53159
53197
|
CellPainter.prototype.applyThemeColor = function() {
|
@@ -53221,7 +53259,7 @@ CellPainter.prototype.setConditions = function(conditions) {
|
|
53221
53259
|
this._conditions.length = 0; // TODO: Clear existing cell styles first
|
53222
53260
|
this._setColoringType(CellPainter.ColoringTypes.CONDITIONAL);
|
53223
53261
|
|
53224
|
-
let len = conditions.length;
|
53262
|
+
let len = conditions ? conditions.length : 0;
|
53225
53263
|
for (let i = 0; i < len; i++) {
|
53226
53264
|
this._addCondition(conditions[i]);
|
53227
53265
|
}
|
@@ -53313,6 +53351,7 @@ CellPainter.prototype._addColorText = function(expression, field, upClass, downC
|
|
53313
53351
|
condition["upClass"] = upClass;
|
53314
53352
|
condition["downClass"] = downClass;
|
53315
53353
|
condition["levelClass"] = levelClass;
|
53354
|
+
// TODO: Make this consistent with other type (e.g., heat map and blinking)
|
53316
53355
|
|
53317
53356
|
this._addCondition(condition);
|
53318
53357
|
return condition;
|
@@ -53439,20 +53478,14 @@ CellPainter.prototype.renderForPrinting = function(cell, rowData, min, max) {
|
|
53439
53478
|
}
|
53440
53479
|
let styles = this._getStyles(rowData, min, max);
|
53441
53480
|
let cssClass = styles["cssClass"]; // Can be an empty string
|
53481
|
+
|
53482
|
+
_removeCssClass(cell, cssClass);
|
53442
53483
|
if (cssClass != null) { // Predefined colors mode
|
53443
|
-
if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
|
53444
|
-
elem.classList.remove(elem._coloringCssClass);
|
53445
|
-
elem._coloringCssClass = null;
|
53446
|
-
}
|
53447
53484
|
if (cssClass) {
|
53448
|
-
|
53449
|
-
|
53485
|
+
cell.classList.add(cssClass);
|
53486
|
+
cell._coloringCssClass = cssClass;
|
53450
53487
|
}
|
53451
53488
|
} else {
|
53452
|
-
if (cell._coloringCssClass) {
|
53453
|
-
cell.classList.remove(cell._coloringCssClass);
|
53454
|
-
cell._coloringCssClass = null;
|
53455
|
-
}
|
53456
53489
|
cell.style.backgroundColor = styles["backgroundColor"] || "";
|
53457
53490
|
cell.style.color = styles["color"] || "";
|
53458
53491
|
}
|
@@ -53573,11 +53606,8 @@ CellPainter._cellRestorer = function(scope) {
|
|
53573
53606
|
|
53574
53607
|
let styles = this._getStyles(rowData, min, max);
|
53575
53608
|
let cssClass = styles["cssClass"]; // Can be an empty string
|
53609
|
+
_removeCssClass(elem, cssClass);
|
53576
53610
|
if (cssClass != null) { // Predefined colors mode
|
53577
|
-
if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
|
53578
|
-
elem.classList.remove(elem._coloringCssClass);
|
53579
|
-
elem._coloringCssClass = null;
|
53580
|
-
}
|
53581
53611
|
if (cssClass) {
|
53582
53612
|
elem.classList.add(cssClass);
|
53583
53613
|
elem._coloringCssClass = cssClass;
|
@@ -53586,10 +53616,6 @@ CellPainter._cellRestorer = function(scope) {
|
|
53586
53616
|
elem.style.backgroundColor = "";
|
53587
53617
|
elem.style.color = "";
|
53588
53618
|
} else {
|
53589
|
-
if (elem._coloringCssClass) {
|
53590
|
-
elem.classList.remove(elem._coloringCssClass);
|
53591
|
-
elem._coloringCssClass = null;
|
53592
|
-
}
|
53593
53619
|
elem.style.backgroundColor = styles["backgroundColor"] || "";
|
53594
53620
|
elem.style.color = styles["color"] || "";
|
53595
53621
|
}
|
@@ -53641,10 +53667,12 @@ CellPainter.prototype._getStyles = function(rowData, min, max) {
|
|
53641
53667
|
curCond["cssClass"] = curCond["upClass"];
|
53642
53668
|
} else if(ret < 0) {
|
53643
53669
|
curCond["cssClass"] = curCond["downClass"];
|
53644
|
-
} else {
|
53670
|
+
} else if(ret === 0) {
|
53645
53671
|
curCond["cssClass"] = curCond["levelClass"];
|
53672
|
+
} // else case is no change in cssClass
|
53673
|
+
if(!curCond["cssClass"]) {
|
53674
|
+
curCond["cssClass"] = ""; // If no cssClass, remove existing one
|
53646
53675
|
}
|
53647
|
-
curCond["cssClass"] = curCond["cssClass"] || "";
|
53648
53676
|
return curCond;
|
53649
53677
|
}
|
53650
53678
|
|
@@ -53777,9 +53805,7 @@ CellPainter.clearCellStyle = function(cell, styles) {
|
|
53777
53805
|
// WARNING: Scope is not removed from the this._scopes collection to speed things up
|
53778
53806
|
}
|
53779
53807
|
|
53780
|
-
|
53781
|
-
elem.classList.remove(elem._coloringCssClass);
|
53782
|
-
}
|
53808
|
+
_removeCssClass(elem);
|
53783
53809
|
|
53784
53810
|
if(!styles){
|
53785
53811
|
styles = CellPainter.supportedStyles;
|
@@ -53862,9 +53888,8 @@ CellPainter.getOppositeColor = function (hexCode) {
|
|
53862
53888
|
* @param {Object} rowData e.g. { PCTCHNG: 0.53, CF_NETCHNG: 0.75 }
|
53863
53889
|
* @param {number} min
|
53864
53890
|
* @param {number} max
|
53865
|
-
* @param {Object=} changedCols
|
53866
53891
|
*/
|
53867
|
-
CellPainter.prototype.render = function (cell, rowData, min, max
|
53892
|
+
CellPainter.prototype.render = function (cell, rowData, min, max) {
|
53868
53893
|
if (min != null && min === min) { // Render heatmap
|
53869
53894
|
this._paintCell(cell, rowData, min, max);
|
53870
53895
|
} else if (this._conditions.length && this._coloringType === CellPainter.ColoringTypes.CONDITIONAL) { // Render conditional-coloring
|
@@ -53918,10 +53943,7 @@ CellPainter.prototype._paintCell = function(cell, rowData, min, max) {
|
|
53918
53943
|
let elStyle = elem.style;
|
53919
53944
|
|
53920
53945
|
let cssClass = styles["cssClass"]; // Can be an empty string
|
53921
|
-
|
53922
|
-
elem.classList.remove(elem._coloringCssClass);
|
53923
|
-
elem._coloringCssClass = null;
|
53924
|
-
}
|
53946
|
+
_removeCssClass(elem, cssClass);
|
53925
53947
|
if (cssClass != null) { // Predefined colors mode
|
53926
53948
|
if (cssClass) {
|
53927
53949
|
elem.classList.add(cssClass);
|
@@ -53999,7 +54021,8 @@ CellPainter.prototype.blink = function (cell, blinkSignal, rowData) {
|
|
53999
54021
|
contrastColor = bc["contrastLevelColor"];
|
54000
54022
|
}
|
54001
54023
|
|
54002
|
-
|
54024
|
+
this._blink(scope, elem, blinkColor, contrastColor);
|
54025
|
+
return true;
|
54003
54026
|
};
|
54004
54027
|
|
54005
54028
|
/** Blink cell with specific color or theme's neutral movement color.
|
@@ -54025,32 +54048,30 @@ CellPainter.prototype.flash = function(cell, blinkColor, rowData) {
|
|
54025
54048
|
blinkColor = ElfUtil.themeColors["level"];
|
54026
54049
|
}
|
54027
54050
|
|
54028
|
-
|
54051
|
+
this._blink(scope, elem, blinkColor, CellPainter.getOppositeColor(blinkColor));
|
54052
|
+
return true;
|
54029
54053
|
};
|
54030
54054
|
|
54031
|
-
/**
|
54032
|
-
* @public
|
54055
|
+
/** @private
|
54033
54056
|
* @param {Object} scope
|
54034
54057
|
* @param {Element} elem
|
54035
54058
|
* @param {string} blinkColor
|
54036
54059
|
* @param {string} contrastColor
|
54037
|
-
* @return {boolean}
|
54060
|
+
* @return {boolean} Returns true if it is a background blinking, otherwise returns false
|
54038
54061
|
*/
|
54039
54062
|
CellPainter.prototype._blink = function (scope, elem, blinkColor, contrastColor) {
|
54040
|
-
|
54063
|
+
CellPainter._clearBlinkTimer(scope);
|
54064
|
+
scope["blinkTimer"] = setTimeout(scope._restorer, this._blinkingDuration);
|
54041
54065
|
|
54042
54066
|
if (this._blinkCondition["border"]) {
|
54043
54067
|
elem.style.border = "1px solid " + blinkColor;
|
54044
|
-
|
54068
|
+
return false;
|
54045
54069
|
} else {
|
54046
54070
|
elem.style.backgroundColor = blinkColor;
|
54047
54071
|
elem.style.color = contrastColor;
|
54048
54072
|
}
|
54049
54073
|
|
54050
|
-
|
54051
|
-
scope["blinkTimer"] = setTimeout(scope._restorer, this._blinkingDuration);
|
54052
|
-
|
54053
|
-
return bgBlinking;
|
54074
|
+
return true;
|
54054
54075
|
};
|
54055
54076
|
|
54056
54077
|
/**
|