@refinitiv-ui/efx-grid 6.0.118 → 6.0.120
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 +97 -6
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.js +7 -5
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/components/Cell.d.ts +2 -0
- package/lib/core/es6/grid/components/Cell.js +89 -0
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/themes/base-checkbox.less +1 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +292 -109
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +7 -0
- package/lib/rt-grid/es6/Grid.js +145 -83
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -0
- package/lib/rt-grid/es6/RowDefinition.js +29 -19
- package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +18 -15
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +6 -1
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2 -1
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +2 -2
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +11 -6
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +0 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +82 -77
- package/lib/tr-grid-row-selection/es6/RowSelection.js +155 -35
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +13 -0
- package/lib/types/es6/AutoTooltip.d.ts +1 -0
- package/lib/types/es6/Core/grid/components/Cell.d.ts +2 -0
- package/lib/types/es6/InCellEditing.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -0
- package/lib/types/es6/RowDragging.d.ts +0 -2
- package/lib/versions.json +8 -8
- package/package.json +1 -1
|
@@ -13628,28 +13628,38 @@ RowDefinition.prototype.updateRowData = function(data, indexToFieldMap) {
|
|
|
13628
13628
|
*/
|
|
13629
13629
|
RowDefinition.prototype.copyRowData = function(srcRowDef) {
|
|
13630
13630
|
if(srcRowDef && srcRowDef !== this) {
|
|
13631
|
-
let field;
|
|
13632
|
-
let uncopiable_fields = {
|
|
13633
|
-
"ROW_DEF": 1,
|
|
13634
|
-
"SUB_ID": 1
|
|
13635
|
-
};
|
|
13636
|
-
let staticValues = this._staticValues;
|
|
13637
|
-
for(field in staticValues) {
|
|
13638
|
-
uncopiable_fields[field] = 1;
|
|
13639
|
-
}
|
|
13640
|
-
staticValues = srcRowDef._staticValues;
|
|
13641
|
-
for(field in staticValues) {
|
|
13642
|
-
uncopiable_fields[field] = 1;
|
|
13643
|
-
}
|
|
13644
|
-
|
|
13645
|
-
let srcRowData = srcRowDef.getRowData();
|
|
13646
13631
|
let rowData = this.getRowData();
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13632
|
+
srcRowDef.cloneRowData(rowData, this._staticValues);
|
|
13633
|
+
}
|
|
13634
|
+
};
|
|
13635
|
+
/** @public
|
|
13636
|
+
* @param {Object=} obj
|
|
13637
|
+
* @param {Object=} exceptionObj
|
|
13638
|
+
* @return {!Object}
|
|
13639
|
+
*/
|
|
13640
|
+
RowDefinition.prototype.cloneRowData = function(obj, exceptionObj) {
|
|
13641
|
+
let rowObj = obj || {};
|
|
13642
|
+
let field;
|
|
13643
|
+
let uncopiable_fields = {
|
|
13644
|
+
"ROW_DEF": 1,
|
|
13645
|
+
"SUB_ID": 1
|
|
13646
|
+
};
|
|
13647
|
+
let staticValues = this._staticValues;
|
|
13648
|
+
for(field in staticValues) {
|
|
13649
|
+
uncopiable_fields[field] = 1;
|
|
13650
|
+
}
|
|
13651
|
+
|
|
13652
|
+
for(field in exceptionObj) {
|
|
13653
|
+
uncopiable_fields[field] = 1;
|
|
13654
|
+
}
|
|
13655
|
+
|
|
13656
|
+
let rowData = this.getRowData();
|
|
13657
|
+
for(field in rowData) {
|
|
13658
|
+
if(!uncopiable_fields[field]) {
|
|
13659
|
+
rowObj[field] = rowData[field];
|
|
13651
13660
|
}
|
|
13652
13661
|
}
|
|
13662
|
+
return rowObj;
|
|
13653
13663
|
};
|
|
13654
13664
|
/** @public
|
|
13655
13665
|
* @param {Object.<string, *>} data
|
|
@@ -15512,6 +15522,13 @@ ColumnDefinition.getDataType = function(field) {
|
|
|
15512
15522
|
return "";
|
|
15513
15523
|
};
|
|
15514
15524
|
/** @public
|
|
15525
|
+
* @ignore
|
|
15526
|
+
* @return {boolean|string|null}
|
|
15527
|
+
*/
|
|
15528
|
+
ColumnDefinition.prototype.getTooltipValue = function() {
|
|
15529
|
+
return this._tooltip;
|
|
15530
|
+
};
|
|
15531
|
+
/** @public
|
|
15515
15532
|
* @return {string}
|
|
15516
15533
|
*/
|
|
15517
15534
|
ColumnDefinition.prototype.getTooltip = function() {
|
|
@@ -16812,7 +16829,7 @@ GroupDefinitions._toGroupDefinition = function(obj, groupId) {
|
|
|
16812
16829
|
groupDef = GroupDefinitions._cloneObject(obj);
|
|
16813
16830
|
}
|
|
16814
16831
|
if(groupId) {
|
|
16815
|
-
if(!groupDef.
|
|
16832
|
+
if(!groupDef.name) {
|
|
16816
16833
|
groupDef.name = groupId;
|
|
16817
16834
|
}
|
|
16818
16835
|
groupDef.id = groupId;
|
|
@@ -18264,6 +18281,10 @@ Cell.prototype._floatingPanel = null;
|
|
|
18264
18281
|
* @type {CellFloatingPanel}
|
|
18265
18282
|
*/
|
|
18266
18283
|
Cell.prototype._frontIcon = null;
|
|
18284
|
+
/** @type {Object}
|
|
18285
|
+
* @private
|
|
18286
|
+
*/
|
|
18287
|
+
Cell.prototype._tooltipInfo = null;
|
|
18267
18288
|
|
|
18268
18289
|
//#region ElementWrapper
|
|
18269
18290
|
/** {@link ElementWrapper#getContent}
|
|
@@ -18856,6 +18877,91 @@ Cell.prototype.getClientWidth = function () {
|
|
|
18856
18877
|
Cell.prototype.getClientHeight = function () {
|
|
18857
18878
|
return (this._element) ? this._element.clientHeight : this.getHeight();
|
|
18858
18879
|
};
|
|
18880
|
+
|
|
18881
|
+
/** To remove the tooltip, pass str as an empty string. To allow cell calculation for the correct tooltip, set str to null.
|
|
18882
|
+
* @public
|
|
18883
|
+
* @param {string|null} str
|
|
18884
|
+
*/
|
|
18885
|
+
Cell.prototype.setTooltip = function(str) {
|
|
18886
|
+
this.setTooltipInfo("userTooltip", str);
|
|
18887
|
+
this.updateTooltip();
|
|
18888
|
+
};
|
|
18889
|
+
/** @public
|
|
18890
|
+
* @ignore
|
|
18891
|
+
* @param {string} type
|
|
18892
|
+
* @param {*=} tooltip
|
|
18893
|
+
*/
|
|
18894
|
+
Cell.prototype.setTooltipInfo = function(type, tooltip) {
|
|
18895
|
+
let tooltipInfo = this._tooltipInfo;
|
|
18896
|
+
if(!tooltipInfo) {
|
|
18897
|
+
tooltipInfo = this._tooltipInfo = {};
|
|
18898
|
+
}
|
|
18899
|
+
|
|
18900
|
+
tooltipInfo[type] = tooltip;
|
|
18901
|
+
};
|
|
18902
|
+
/** @public
|
|
18903
|
+
* @ignore
|
|
18904
|
+
*/
|
|
18905
|
+
Cell.prototype.updateTooltip = function() {
|
|
18906
|
+
let tooltipInfo = this._tooltipInfo;
|
|
18907
|
+
if(!tooltipInfo) {
|
|
18908
|
+
return;
|
|
18909
|
+
}
|
|
18910
|
+
|
|
18911
|
+
let defaultTooltip = "";
|
|
18912
|
+
let customizedTooltip = null;
|
|
18913
|
+
|
|
18914
|
+
// Clipped text tooltip takes precedence over default group header and column tooltip
|
|
18915
|
+
if(tooltipInfo["clippedText"]) { // boolean
|
|
18916
|
+
defaultTooltip = customizedTooltip = tooltipInfo["clippedTextTooltip"];
|
|
18917
|
+
}
|
|
18918
|
+
|
|
18919
|
+
if(tooltipInfo["groupHeaderTooltip"] == null) {
|
|
18920
|
+
if(tooltipInfo["columnDefault"] !== false) {
|
|
18921
|
+
if(tooltipInfo["columnDefault"] != null) { // true, "", string
|
|
18922
|
+
customizedTooltip = tooltipInfo["columnTooltip"];
|
|
18923
|
+
} else { // null
|
|
18924
|
+
defaultTooltip = tooltipInfo["columnTooltip"];
|
|
18925
|
+
}
|
|
18926
|
+
}
|
|
18927
|
+
} else { // Group header tooltip takes precedence over column tooltip
|
|
18928
|
+
if(tooltipInfo["groupHeaderDefault"] !== false) {
|
|
18929
|
+
if(tooltipInfo["groupHeaderDefault"] != null) {
|
|
18930
|
+
customizedTooltip = tooltipInfo["groupHeaderTooltip"];
|
|
18931
|
+
} else {
|
|
18932
|
+
defaultTooltip = tooltipInfo["groupHeaderTooltip"];
|
|
18933
|
+
}
|
|
18934
|
+
}
|
|
18935
|
+
}
|
|
18936
|
+
|
|
18937
|
+
// User tooltip take the highest precedence
|
|
18938
|
+
if(tooltipInfo["userTooltip"] != null) { // "", string
|
|
18939
|
+
customizedTooltip = tooltipInfo["userTooltip"];
|
|
18940
|
+
}
|
|
18941
|
+
|
|
18942
|
+
if(customizedTooltip == null) {
|
|
18943
|
+
customizedTooltip = defaultTooltip;
|
|
18944
|
+
}
|
|
18945
|
+
|
|
18946
|
+
if(customizedTooltip) {
|
|
18947
|
+
if(this.getAttribute("title") !== customizedTooltip) {
|
|
18948
|
+
this.setAttribute("title", customizedTooltip);
|
|
18949
|
+
}
|
|
18950
|
+
} else if(this.getAttribute("title") != null) {
|
|
18951
|
+
this.removeAttribute("title");
|
|
18952
|
+
}
|
|
18953
|
+
};
|
|
18954
|
+
/** @public
|
|
18955
|
+
* @ignore
|
|
18956
|
+
* @param {string} type
|
|
18957
|
+
* @return {*}
|
|
18958
|
+
*/
|
|
18959
|
+
Cell.prototype.getTooltipInfo = function(type) {
|
|
18960
|
+
if(this._tooltipInfo) {
|
|
18961
|
+
return this._tooltipInfo[type];
|
|
18962
|
+
}
|
|
18963
|
+
return null;
|
|
18964
|
+
};
|
|
18859
18965
|
//#region Internal Public Methods
|
|
18860
18966
|
|
|
18861
18967
|
//#region Private Methods
|
|
@@ -32007,7 +32113,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
|
32007
32113
|
|
|
32008
32114
|
this._excludedRids = {};
|
|
32009
32115
|
let exclusionCount = 0;
|
|
32010
|
-
exclusionCount += DataView.
|
|
32116
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._hiddenRids);
|
|
32011
32117
|
|
|
32012
32118
|
// Segment separators should not be filtered out (hidden)
|
|
32013
32119
|
let segments = this._dt._getSegmentSeparators();
|
|
@@ -32027,7 +32133,7 @@ DataView.prototype._updateRowIds = function(opt_rowIds) {
|
|
|
32027
32133
|
}
|
|
32028
32134
|
this._collapsedRids = segments.getCollapsedRows();
|
|
32029
32135
|
// Children of collapsed segments must be filtered out (hidden)
|
|
32030
|
-
exclusionCount += DataView.
|
|
32136
|
+
exclusionCount += DataView._copyValidObjectKeys(this._excludedRids, this._collapsedRids);
|
|
32031
32137
|
}
|
|
32032
32138
|
|
|
32033
32139
|
if(this._groupLevel > 0 && !opt_rowIds) { // WARNING: The line below is quite slow
|
|
@@ -32557,13 +32663,15 @@ DataView._removeArrayItems = function(ary, items) {
|
|
|
32557
32663
|
* @param {Object} masterObj
|
|
32558
32664
|
* @returns {number}
|
|
32559
32665
|
*/
|
|
32560
|
-
DataView.
|
|
32666
|
+
DataView._copyValidObjectKeys = function(baseObj, masterObj) {
|
|
32561
32667
|
if(masterObj) {
|
|
32562
32668
|
let count = 0;
|
|
32563
32669
|
|
|
32564
32670
|
for(let key in masterObj) {
|
|
32565
|
-
|
|
32566
|
-
|
|
32671
|
+
if(masterObj[key]) {
|
|
32672
|
+
baseObj[key] = 1;
|
|
32673
|
+
++count; // WARNING: duplicated key can be counted more than once
|
|
32674
|
+
}
|
|
32567
32675
|
}
|
|
32568
32676
|
return count;
|
|
32569
32677
|
}
|
|
@@ -36457,7 +36565,7 @@ Core.prototype._hasPendingRowChange = false;
|
|
|
36457
36565
|
* @return {string}
|
|
36458
36566
|
*/
|
|
36459
36567
|
Core.getVersion = function () {
|
|
36460
|
-
return "5.1.
|
|
36568
|
+
return "5.1.121";
|
|
36461
36569
|
};
|
|
36462
36570
|
/** {@link ElementWrapper#dispose}
|
|
36463
36571
|
* @override
|
|
@@ -45033,11 +45141,11 @@ let _hasFieldOrId = function(colDef, str) {
|
|
|
45033
45141
|
};
|
|
45034
45142
|
|
|
45035
45143
|
/** Compare the difference in the 'id' property.
|
|
45036
|
-
|
|
45037
|
-
|
|
45038
|
-
|
|
45039
|
-
|
|
45040
|
-
|
|
45144
|
+
* @private
|
|
45145
|
+
* @param {Object} obj1
|
|
45146
|
+
* @param {Object} obj2
|
|
45147
|
+
* @returns {boolean} If the id property of two objects is equal, the return will be true, otherwise it will be false.
|
|
45148
|
+
*/
|
|
45041
45149
|
let _hasMatchingId = function(obj1, obj2) {
|
|
45042
45150
|
if(!obj1 || !obj2 || !obj1.id || !obj2.id) { // Handle nullable, if the object or id have null, it's means difference value
|
|
45043
45151
|
return false;
|
|
@@ -45045,6 +45153,25 @@ let _hasMatchingId = function(obj1, obj2) {
|
|
|
45045
45153
|
return obj1.id === obj2.id;
|
|
45046
45154
|
};
|
|
45047
45155
|
|
|
45156
|
+
/** @private
|
|
45157
|
+
* @param {Object} e
|
|
45158
|
+
*/
|
|
45159
|
+
let _preventDefault = function(e) {
|
|
45160
|
+
if(e) {
|
|
45161
|
+
e.preventDefault();
|
|
45162
|
+
}
|
|
45163
|
+
};
|
|
45164
|
+
/** @private
|
|
45165
|
+
* @param {number=} id
|
|
45166
|
+
* @returns {number} Always return 0
|
|
45167
|
+
*/
|
|
45168
|
+
let _clearTimeout = function(id) {
|
|
45169
|
+
if(id) {
|
|
45170
|
+
clearTimeout(id);
|
|
45171
|
+
}
|
|
45172
|
+
return 0;
|
|
45173
|
+
};
|
|
45174
|
+
|
|
45048
45175
|
/** @constructor
|
|
45049
45176
|
* @extends {EventDispatcher}
|
|
45050
45177
|
* @param {(Element|null)=} placeholder
|
|
@@ -45355,10 +45482,6 @@ Grid.prototype._topSection = true;
|
|
|
45355
45482
|
* @private
|
|
45356
45483
|
*/
|
|
45357
45484
|
Grid.prototype._focusingArgs = null;
|
|
45358
|
-
/** @type {number}
|
|
45359
|
-
* @private
|
|
45360
|
-
*/
|
|
45361
|
-
Grid.prototype._scrolledRow = -1;
|
|
45362
45485
|
/** @type {boolean}
|
|
45363
45486
|
* @private
|
|
45364
45487
|
*/
|
|
@@ -45373,10 +45496,8 @@ Grid.prototype.dispose = function() {
|
|
|
45373
45496
|
clearInterval(this._autoLayoutTimer);
|
|
45374
45497
|
this._autoLayoutTimer = 0;
|
|
45375
45498
|
}
|
|
45376
|
-
|
|
45377
|
-
|
|
45378
|
-
this._pollingTimerId = 0;
|
|
45379
|
-
}
|
|
45499
|
+
this._pollingTimerId = _clearTimeout(this._pollingTimerId);
|
|
45500
|
+
|
|
45380
45501
|
this.removeAllColumns(); // Some conflators are reset
|
|
45381
45502
|
this.removeAllRows(); // Some conflators are reset
|
|
45382
45503
|
this._sorter.dispose();
|
|
@@ -45399,9 +45520,8 @@ Grid.prototype.dispose = function() {
|
|
|
45399
45520
|
}
|
|
45400
45521
|
|
|
45401
45522
|
if(this._focusingArgs) {
|
|
45402
|
-
|
|
45403
|
-
|
|
45404
|
-
}
|
|
45523
|
+
_clearTimeout(this._focusingArgs.id);
|
|
45524
|
+
_clearTimeout(this._focusingArgs.timeoutId);
|
|
45405
45525
|
this._focusingArgs = null;
|
|
45406
45526
|
}
|
|
45407
45527
|
};
|
|
@@ -45706,6 +45826,7 @@ Grid.prototype.initialize = function(gridOption) {
|
|
|
45706
45826
|
this.addListener(gridOption, "beforeContentBinding");
|
|
45707
45827
|
this.addListener(gridOption, "firstRendered");
|
|
45708
45828
|
this.addListener(gridOption, "afterContentBinding");
|
|
45829
|
+
this.addListener(gridOption, "tabNavigation");
|
|
45709
45830
|
|
|
45710
45831
|
if(gridOption["autoDateConversion"]) {
|
|
45711
45832
|
t._autoDateConversion = true;
|
|
@@ -47049,9 +47170,46 @@ Grid.prototype.setColumnSorter = function(colRef, func) {
|
|
|
47049
47170
|
* @param {!RowDefinition} rowDef
|
|
47050
47171
|
*/
|
|
47051
47172
|
Grid.prototype._initDuplicateRicData = function(rowDef) {
|
|
47173
|
+
if(!rowDef) {
|
|
47174
|
+
return;
|
|
47175
|
+
}
|
|
47176
|
+
let rowDefs = this._connector.getRowDefByRic(rowDef.getSymbol());
|
|
47177
|
+
if(rowDefs && rowDefs.length > 0) { // Found at least 1 Duplicate chain/ric data
|
|
47178
|
+
let firstRowDef = rowDefs[0];
|
|
47179
|
+
rowDef.copyRowData(firstRowDef);
|
|
47180
|
+
if(rowDef.isChain()) {
|
|
47181
|
+
let children = firstRowDef.getChildren();
|
|
47182
|
+
if(children && children.length > 0) {
|
|
47183
|
+
setTimeout(this._cloneChain.bind(this, rowDef), 0); // Need to delay to wait row inserted
|
|
47184
|
+
}
|
|
47185
|
+
}
|
|
47186
|
+
}
|
|
47187
|
+
};
|
|
47188
|
+
|
|
47189
|
+
/** @private
|
|
47190
|
+
* @param {Object} rowDef
|
|
47191
|
+
* @param {Array<Object>} children
|
|
47192
|
+
*/
|
|
47193
|
+
Grid.prototype._cloneChain = function(rowDef) {
|
|
47052
47194
|
let rowDefs = this._connector.getRowDefByRic(rowDef.getSymbol());
|
|
47053
|
-
|
|
47054
|
-
|
|
47195
|
+
let firstRowDef = rowDefs ? rowDefs[0] : null;
|
|
47196
|
+
let constituents = firstRowDef ? firstRowDef.getChildren() : null;
|
|
47197
|
+
|
|
47198
|
+
if(!constituents) {
|
|
47199
|
+
return;
|
|
47200
|
+
}
|
|
47201
|
+
let count = constituents.length;
|
|
47202
|
+
if(count < 0 ) {
|
|
47203
|
+
return;
|
|
47204
|
+
}
|
|
47205
|
+
|
|
47206
|
+
let subId = rowDef.getData(SUB_ID);
|
|
47207
|
+
for (let i = 0; i < count; i++) {
|
|
47208
|
+
let childRowDef = constituents[i];
|
|
47209
|
+
let rowData = childRowDef.cloneRowData();
|
|
47210
|
+
rowData["SUB_ID"] = subId;
|
|
47211
|
+
let rid = subId + rowData["RIC"];
|
|
47212
|
+
this._dc.setRowData(rid, rowData);
|
|
47055
47213
|
}
|
|
47056
47214
|
};
|
|
47057
47215
|
/** @public
|
|
@@ -48185,12 +48343,15 @@ Grid.prototype._renderColumnHeader = function(colIndex, arg) {
|
|
|
48185
48343
|
let colName = colDef.getName();
|
|
48186
48344
|
let colTooltip = colDef.getTooltip();
|
|
48187
48345
|
let headerAlignment = colDef.getHeaderAlignment();
|
|
48346
|
+
let tooltipValue = colDef.getTooltipValue();
|
|
48188
48347
|
|
|
48189
48348
|
for(let r = 0; r < rowCount; ++r) {
|
|
48190
48349
|
let tCell = tSection.getCell(colIndex, r, false);
|
|
48191
48350
|
// Default behaviors
|
|
48192
48351
|
tCell.setContent(colName);
|
|
48193
|
-
tCell.
|
|
48352
|
+
tCell.setTooltipInfo("columnDefault", tooltipValue);
|
|
48353
|
+
tCell.setTooltipInfo("columnTooltip", colTooltip);
|
|
48354
|
+
tCell.updateTooltip();
|
|
48194
48355
|
tCell.setStyle("textAlign", headerAlignment);
|
|
48195
48356
|
|
|
48196
48357
|
if(customRenderer) {
|
|
@@ -48938,38 +49099,49 @@ Grid.prototype.getVScrollView = function () {
|
|
|
48938
49099
|
return this._grid.getVScrollView();
|
|
48939
49100
|
};
|
|
48940
49101
|
|
|
48941
|
-
/** @private
|
|
48942
|
-
* @param {Element} el
|
|
48943
|
-
* @return {boolean}
|
|
48944
|
-
*/
|
|
48945
|
-
function isFocusableContent(el) {
|
|
48946
|
-
if(el) {
|
|
48947
|
-
return (el.tagName !== "SPAN" && !el.disabled);
|
|
48948
|
-
}
|
|
48949
|
-
return false;
|
|
48950
|
-
}
|
|
48951
49102
|
/** @private
|
|
48952
49103
|
* @param {Object} cell
|
|
49104
|
+
* @param {Object} args
|
|
48953
49105
|
* @return {boolean}
|
|
48954
49106
|
*/
|
|
48955
|
-
function
|
|
49107
|
+
Grid.prototype._focusCell = function(cell, args) {
|
|
48956
49108
|
if(cell) {
|
|
48957
49109
|
let cellContent = cell.getContent();
|
|
48958
|
-
if(cellContent
|
|
48959
|
-
|
|
48960
|
-
|
|
49110
|
+
if(cellContent) {
|
|
49111
|
+
let nfe = null;
|
|
49112
|
+
if(this.hasListener("tabNavigation")) {
|
|
49113
|
+
let tabNavArg = {
|
|
49114
|
+
"shiftKey": args.shiftKey,
|
|
49115
|
+
"activeElement": args.activeElement,
|
|
49116
|
+
"cellContent": cellContent,
|
|
49117
|
+
"cell": cell,
|
|
49118
|
+
"colIndex": args.colIndex,
|
|
49119
|
+
"rowIndex": args.rowIndex,
|
|
49120
|
+
"field": args.fields ? args.fields[args.colIndex] : ""
|
|
49121
|
+
};
|
|
49122
|
+
this._dispatch("tabNavigation", tabNavArg);
|
|
49123
|
+
nfe = tabNavArg.nextFocusableElement;
|
|
49124
|
+
} else if(cellContent.tagName !== "SPAN") {
|
|
49125
|
+
nfe = cellContent;
|
|
49126
|
+
}
|
|
49127
|
+
|
|
49128
|
+
if(nfe && nfe !== args.activeElement && !nfe.disabled) {
|
|
49129
|
+
nfe.focus();
|
|
49130
|
+
return true;
|
|
49131
|
+
}
|
|
48961
49132
|
}
|
|
48962
49133
|
}
|
|
48963
49134
|
return false;
|
|
48964
|
-
}
|
|
49135
|
+
};
|
|
48965
49136
|
/** @private
|
|
48966
49137
|
*/
|
|
48967
49138
|
Grid.prototype._onVScroll = function() {
|
|
48968
49139
|
let args = this._focusingArgs;
|
|
48969
49140
|
if(args) {
|
|
49141
|
+
args.timeoutId = _clearTimeout(args.timeoutId);
|
|
48970
49142
|
this._focusingArgs = null;
|
|
48971
49143
|
let cell = this._grid.getCell("content", args.colIndex, args.rowIndex);
|
|
48972
|
-
if(!
|
|
49144
|
+
if(!this._focusCell(cell, args)) {
|
|
48973
49145
|
if(args.shiftKey) {
|
|
48974
49146
|
this._focusPrevCellContent(args);
|
|
48975
49147
|
} else {
|
|
@@ -48980,6 +49152,11 @@ Grid.prototype._onVScroll = function() {
|
|
|
48980
49152
|
};
|
|
48981
49153
|
/** @private
|
|
48982
49154
|
*/
|
|
49155
|
+
Grid.prototype._onScrollTimeout = function() {
|
|
49156
|
+
this._focusingArgs = null;
|
|
49157
|
+
};
|
|
49158
|
+
/** @private
|
|
49159
|
+
*/
|
|
48983
49160
|
Grid.prototype._selfScrollToRow = function() {
|
|
48984
49161
|
let args = this._focusingArgs;
|
|
48985
49162
|
if(args) {
|
|
@@ -48989,20 +49166,14 @@ Grid.prototype._selfScrollToRow = function() {
|
|
|
48989
49166
|
};
|
|
48990
49167
|
/** @private
|
|
48991
49168
|
* @param {Object} args
|
|
48992
|
-
* @param {number} colIndex
|
|
48993
|
-
* @param {number} rowIndex
|
|
48994
49169
|
*/
|
|
48995
|
-
Grid.prototype._requestScroll = function(args
|
|
48996
|
-
if(this._focusingArgs
|
|
48997
|
-
|
|
49170
|
+
Grid.prototype._requestScroll = function(args) {
|
|
49171
|
+
if(!this._focusingArgs) {
|
|
49172
|
+
this._focusingArgs = args;
|
|
49173
|
+
args.event = null; // The event is invalid after the scroll
|
|
49174
|
+
args.id = setTimeout(this._selfScrollToRow, 0); // Avoid event loop protection
|
|
49175
|
+
args.timeoutId = setTimeout(this._onScrollTimeout, 100); // To avoid a fail case where scroll cannot be performed
|
|
48998
49176
|
}
|
|
48999
|
-
|
|
49000
|
-
this._scrolledRow = args.rowIndex;
|
|
49001
|
-
this._focusingArgs = args;
|
|
49002
|
-
args.colIndex = colIndex;
|
|
49003
|
-
args.rowIndex = rowIndex;
|
|
49004
|
-
args.event = null; // The event is invalid after the scroll
|
|
49005
|
-
args.id = setTimeout(this._selfScrollToRow); // Avoid event loop protection
|
|
49006
49177
|
};
|
|
49007
49178
|
/** @private
|
|
49008
49179
|
* @param {Object} args
|
|
@@ -49026,28 +49197,27 @@ Grid.prototype._focusNextCellContent = function(args) {
|
|
|
49026
49197
|
startIdx = i;
|
|
49027
49198
|
}
|
|
49028
49199
|
}
|
|
49029
|
-
// If the current focus is on a valid content, starts on the next cell
|
|
49030
|
-
if(args.event && args.validContent) {
|
|
49031
|
-
startIdx++;
|
|
49032
|
-
}
|
|
49033
49200
|
|
|
49034
49201
|
let grid = this._grid;
|
|
49035
49202
|
let section = grid.getSection("content");
|
|
49036
49203
|
let viewInfo = grid.getVerticalViewInfo();
|
|
49037
49204
|
let lastFullRow = viewInfo.lastFullRow;
|
|
49038
49205
|
let rowCount = this.getRowCount();
|
|
49206
|
+
|
|
49207
|
+
args.fields = grid.getColumnFields();
|
|
49039
49208
|
for(let r = rowIndex; r < rowCount; r++) {
|
|
49209
|
+
args.rowIndex = r;
|
|
49040
49210
|
for(i = startIdx; i < len; i++) {
|
|
49041
49211
|
let c = focusableColIndices[i];
|
|
49212
|
+
args.colIndex = c;
|
|
49042
49213
|
if(r > lastFullRow) {
|
|
49043
|
-
|
|
49214
|
+
_preventDefault(args.event);
|
|
49215
|
+
this._requestScroll(args);
|
|
49044
49216
|
return;
|
|
49045
49217
|
} else {
|
|
49046
49218
|
let cell = section.getCell(c, r);
|
|
49047
|
-
if(
|
|
49048
|
-
|
|
49049
|
-
args.event.preventDefault();
|
|
49050
|
-
}
|
|
49219
|
+
if(this._focusCell(cell, args)) {
|
|
49220
|
+
_preventDefault(args.event);
|
|
49051
49221
|
return;
|
|
49052
49222
|
}
|
|
49053
49223
|
}
|
|
@@ -49055,9 +49225,8 @@ Grid.prototype._focusNextCellContent = function(args) {
|
|
|
49055
49225
|
startIdx = 0;
|
|
49056
49226
|
}
|
|
49057
49227
|
|
|
49058
|
-
|
|
49059
|
-
|
|
49060
|
-
}
|
|
49228
|
+
// The current focus on the last focusable content
|
|
49229
|
+
this._grid.getHiddenInput().focus();
|
|
49061
49230
|
};
|
|
49062
49231
|
/** @private
|
|
49063
49232
|
* @param {Object} args
|
|
@@ -49081,27 +49250,26 @@ Grid.prototype._focusPrevCellContent = function(args) {
|
|
|
49081
49250
|
startIdx = i;
|
|
49082
49251
|
}
|
|
49083
49252
|
}
|
|
49084
|
-
// If the current focus is on a valid content, starts on the next cell
|
|
49085
|
-
if(args.event && args.validContent) {
|
|
49086
|
-
--startIdx;
|
|
49087
|
-
}
|
|
49088
49253
|
|
|
49089
49254
|
let grid = this._grid;
|
|
49090
49255
|
let section = grid.getSection("content");
|
|
49091
49256
|
let viewInfo = grid.getVerticalViewInfo();
|
|
49092
49257
|
let firstFullRow = viewInfo.firstFullRow;
|
|
49258
|
+
|
|
49259
|
+
args.fields = this.getColumnFields();
|
|
49093
49260
|
for(let r = rowIndex; r >= 0; r--) {
|
|
49261
|
+
args.rowIndex = r;
|
|
49094
49262
|
for(i = startIdx; i >= 0; i--) {
|
|
49095
49263
|
let c = focusableColIndices[i];
|
|
49264
|
+
args.colIndex = c;
|
|
49096
49265
|
if(r < firstFullRow) {
|
|
49097
|
-
|
|
49266
|
+
_preventDefault(args.event);
|
|
49267
|
+
this._requestScroll(args);
|
|
49098
49268
|
return;
|
|
49099
49269
|
} else {
|
|
49100
49270
|
let cell = section.getCell(c, r);
|
|
49101
|
-
if(
|
|
49102
|
-
|
|
49103
|
-
args.event.preventDefault();
|
|
49104
|
-
}
|
|
49271
|
+
if(this._focusCell(cell, args)) {
|
|
49272
|
+
_preventDefault(args.event);
|
|
49105
49273
|
return;
|
|
49106
49274
|
}
|
|
49107
49275
|
}
|
|
@@ -49109,15 +49277,18 @@ Grid.prototype._focusPrevCellContent = function(args) {
|
|
|
49109
49277
|
startIdx = len - 1;
|
|
49110
49278
|
}
|
|
49111
49279
|
|
|
49112
|
-
|
|
49113
|
-
|
|
49114
|
-
}
|
|
49280
|
+
// The current focus on the last focusable content
|
|
49281
|
+
this._grid.getHiddenInput(true).focus();
|
|
49115
49282
|
};
|
|
49116
49283
|
|
|
49117
49284
|
/** @private
|
|
49118
49285
|
* @param {Object} e
|
|
49119
49286
|
*/
|
|
49120
49287
|
Grid.prototype._onTabNavigation = function(e) {
|
|
49288
|
+
if(this._focusingArgs) {
|
|
49289
|
+
return; // Cannot do another tab navigation while waiting for scrolling
|
|
49290
|
+
}
|
|
49291
|
+
|
|
49121
49292
|
let colDefs = this.getColumnDefinitions();
|
|
49122
49293
|
let colCount = colDefs.length;
|
|
49123
49294
|
|
|
@@ -49132,19 +49303,8 @@ Grid.prototype._onTabNavigation = function(e) {
|
|
|
49132
49303
|
return;
|
|
49133
49304
|
}
|
|
49134
49305
|
|
|
49135
|
-
this._scrolledRow = -1; // Reset the scroll loop protector
|
|
49136
49306
|
let keyEvt = e.event;
|
|
49137
49307
|
let pos = this.getRelativePosition(keyEvt);
|
|
49138
|
-
let validContent = true;
|
|
49139
|
-
let activeElement = e.activeElement;
|
|
49140
|
-
if(activeElement) {
|
|
49141
|
-
validContent = !activeElement.classList.contains("valigner");
|
|
49142
|
-
}
|
|
49143
|
-
|
|
49144
|
-
if(validContent) {
|
|
49145
|
-
let content = pos["cell"] ? pos["cell"].getContent() : null;
|
|
49146
|
-
validContent = isFocusableContent(content);
|
|
49147
|
-
}
|
|
49148
49308
|
let startingRowIndex = pos["rowIndex"];
|
|
49149
49309
|
if(e.onTheEdge) {
|
|
49150
49310
|
let viewInfo = this._grid.getVerticalViewInfo();
|
|
@@ -49156,7 +49316,7 @@ Grid.prototype._onTabNavigation = function(e) {
|
|
|
49156
49316
|
colIndex: pos["colIndex"],
|
|
49157
49317
|
rowIndex: startingRowIndex,
|
|
49158
49318
|
focusableColIndices: focusableColIndices,
|
|
49159
|
-
|
|
49319
|
+
activeElement: e.activeElement
|
|
49160
49320
|
};
|
|
49161
49321
|
|
|
49162
49322
|
if(keyEvt.shiftKey) {
|
|
@@ -49166,6 +49326,16 @@ Grid.prototype._onTabNavigation = function(e) {
|
|
|
49166
49326
|
}
|
|
49167
49327
|
};
|
|
49168
49328
|
|
|
49329
|
+
/** @public
|
|
49330
|
+
* @ignore
|
|
49331
|
+
* @return {!Object}
|
|
49332
|
+
*/
|
|
49333
|
+
Grid.prototype._getEventHandlers = function() {
|
|
49334
|
+
return {
|
|
49335
|
+
"tabNavigation": this._onTabNavigation
|
|
49336
|
+
};
|
|
49337
|
+
};
|
|
49338
|
+
|
|
49169
49339
|
|
|
49170
49340
|
/* harmony default export */ var js_Grid = (Grid);
|
|
49171
49341
|
|
|
@@ -50910,6 +51080,10 @@ MockSubscriptions.prototype._maxInterval = 850;
|
|
|
50910
51080
|
* @type {number}
|
|
50911
51081
|
*/
|
|
50912
51082
|
MockSubscriptions.prototype._percentageDataUpdate = 0.1; // 10% by default
|
|
51083
|
+
/** @private
|
|
51084
|
+
* @type {boolean}
|
|
51085
|
+
*/
|
|
51086
|
+
MockSubscriptions.prototype._constituentCache = false;
|
|
50913
51087
|
|
|
50914
51088
|
/** @public
|
|
50915
51089
|
* @param {Object=} options
|
|
@@ -50938,6 +51112,12 @@ MockSubscriptions.prototype.config = function(options) {
|
|
|
50938
51112
|
if(typeof num === "number") {
|
|
50939
51113
|
this._percentageDataUpdate = num / 100;
|
|
50940
51114
|
}
|
|
51115
|
+
|
|
51116
|
+
let value = options.constituentCache;
|
|
51117
|
+
if(value != null) {
|
|
51118
|
+
this._constituentCache = value;
|
|
51119
|
+
}
|
|
51120
|
+
|
|
50941
51121
|
};
|
|
50942
51122
|
/** @public
|
|
50943
51123
|
* @param {number=} min
|
|
@@ -51465,6 +51645,9 @@ MockSubscriptions.prototype._updateDuplicateSymbol = function(ric) {
|
|
|
51465
51645
|
if(!isChain) {
|
|
51466
51646
|
return;
|
|
51467
51647
|
}
|
|
51648
|
+
if(!this._constituentCache) {
|
|
51649
|
+
return;
|
|
51650
|
+
}
|
|
51468
51651
|
let ricList = firstSub["ricList"];
|
|
51469
51652
|
if(!ricList) {
|
|
51470
51653
|
return;
|