@refinitiv-ui/efx-grid 6.0.35 → 6.0.37
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -832,7 +832,8 @@ DataCache.prototype._insertRic = function (subId, ric, values) {
|
|
832
832
|
// We cannot cache event arguments because user may want to collect all the updates
|
833
833
|
this._onADCForNewRic(subId, ric);
|
834
834
|
|
835
|
-
|
835
|
+
var rowData = this.getRowData(rid);
|
836
|
+
if (!rowData) { // Ensure that we have subscription id and ric from Quotes2
|
836
837
|
var tmp = values;
|
837
838
|
|
838
839
|
values = {}; // Clone a new object for duplicated ric
|
@@ -843,6 +844,11 @@ DataCache.prototype._insertRic = function (subId, ric, values) {
|
|
843
844
|
|
844
845
|
values["SUB_ID"] = subId;
|
845
846
|
values["RIC"] = ric;
|
847
|
+
} else {
|
848
|
+
var rowDef = rowData["ROW_DEF"];
|
849
|
+
if(rowDef && rowDef.isChain()){
|
850
|
+
values["SUB_ID"] = subId;
|
851
|
+
}
|
846
852
|
}
|
847
853
|
|
848
854
|
this.setRowData(rid, values);
|
@@ -879,6 +885,12 @@ DataCache.prototype._onQ2SubAdded = function (e) {
|
|
879
885
|
var sub = subs[i];
|
880
886
|
var ric = sub["ric"];
|
881
887
|
|
888
|
+
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
889
|
+
// the subId with "_ci_" should be ignore
|
890
|
+
if(sub["id"].indexOf("_ci_") >= 0){
|
891
|
+
continue;
|
892
|
+
}
|
893
|
+
|
882
894
|
this.addSubscription(sub, ric);
|
883
895
|
|
884
896
|
if (duplicateSubIds) { // There will be no network request for duplicate subs, and hence we need to update the data from our cache
|
@@ -903,6 +915,13 @@ DataCache.prototype._onQ2SubRemoved = function (e) {
|
|
903
915
|
|
904
916
|
for (var i = 0; i < len; ++i) {
|
905
917
|
var sub = subs[i];
|
918
|
+
|
919
|
+
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
920
|
+
// the subId with "_ci_" should be ignore
|
921
|
+
if(sub["id"].indexOf("_ci_") >= 0){
|
922
|
+
continue;
|
923
|
+
}
|
924
|
+
|
906
925
|
this.removeSubscription(sub);
|
907
926
|
}
|
908
927
|
};
|
@@ -552,7 +552,7 @@ Core.prototype._batches = null;
|
|
552
552
|
* @return {string}
|
553
553
|
*/
|
554
554
|
Core.getVersion = function () {
|
555
|
-
return "5.1.
|
555
|
+
return "5.1.50";
|
556
556
|
};
|
557
557
|
/** {@link ElementWrapper#dispose}
|
558
558
|
* @override
|
@@ -1765,6 +1765,7 @@ Core.prototype._moveColumn = function (fromCol, destCol) {
|
|
1765
1765
|
}
|
1766
1766
|
}
|
1767
1767
|
this._updateColumnBounds();
|
1768
|
+
this._updateColumnSeparators();
|
1768
1769
|
return true;
|
1769
1770
|
};
|
1770
1771
|
|
@@ -2095,6 +2096,7 @@ Core.prototype.setDefaultRowHeight = function (val, opt_includeTitle) {
|
|
2095
2096
|
this._syncRowHeights();
|
2096
2097
|
this._rowHeightSync = true;
|
2097
2098
|
this.setRowScrollingStep(this._rowScrollingStep);
|
2099
|
+
this._updateColumnSeparators();
|
2098
2100
|
}
|
2099
2101
|
};
|
2100
2102
|
|
@@ -2929,6 +2931,7 @@ Core.prototype.freezeColumn = function (frozenColIndex, numRightColumn) {
|
|
2929
2931
|
|
2930
2932
|
this._onColumnCountChanged(); // Activate horizontal scrollbar and column virtualization
|
2931
2933
|
this._updateScrollbarWidth(true, true);
|
2934
|
+
this._updateColumnSeparators();
|
2932
2935
|
};
|
2933
2936
|
|
2934
2937
|
/** @private
|
@@ -4170,6 +4173,21 @@ Core.prototype._updateColumnBounds = function () {
|
|
4170
4173
|
section.updateColumnBounds(posAry, noBorderAry);
|
4171
4174
|
}
|
4172
4175
|
};
|
4176
|
+
/* @private
|
4177
|
+
*/
|
4178
|
+
Core.prototype._updateColumnSeparators = function() {
|
4179
|
+
var sectCount = this._settings.length;
|
4180
|
+
if(!sectCount) {
|
4181
|
+
return;
|
4182
|
+
}
|
4183
|
+
|
4184
|
+
for(var i = 0; i < sectCount; i++) {
|
4185
|
+
var section = this._settings[i].getSection();
|
4186
|
+
if (section) {
|
4187
|
+
section.updateColumnSeparators();
|
4188
|
+
}
|
4189
|
+
}
|
4190
|
+
};
|
4173
4191
|
|
4174
4192
|
/** @public
|
4175
4193
|
* @param {number} startColIndex INCLUSIVE
|
@@ -5239,6 +5257,8 @@ Core.prototype._onRowCountChanged = function (e) {
|
|
5239
5257
|
if(!forceUpdate) {
|
5240
5258
|
this._updateVScrollbar(); // Asynchronous
|
5241
5259
|
}
|
5260
|
+
|
5261
|
+
this._updateColumnSeparators();
|
5242
5262
|
if(prevRowCount < newRowCount) {
|
5243
5263
|
this._dispatch("rowAdded", e);
|
5244
5264
|
} else if(prevRowCount > newRowCount) {
|
@@ -5296,7 +5316,7 @@ Core.prototype._onRowHeightChanged = function (e) {
|
|
5296
5316
|
minSectionIndex >= this._startVScrollbarIndex);
|
5297
5317
|
}
|
5298
5318
|
}
|
5299
|
-
|
5319
|
+
this._updateColumnSeparators();
|
5300
5320
|
this._dispatchRowPositionChanged();
|
5301
5321
|
};
|
5302
5322
|
/** @private
|
@@ -5361,6 +5381,7 @@ Core.prototype._onColumnCountChanged = function () {
|
|
5361
5381
|
var pinnedRight = this._countPinnedRightColumns();
|
5362
5382
|
|
5363
5383
|
this._updateColumnBounds();
|
5384
|
+
this._updateColumnSeparators();
|
5364
5385
|
|
5365
5386
|
if (this._hScrollbarEnabled && pinnedLeft + pinnedRight < this.getColumnCount()) {
|
5366
5387
|
this._hscrollbar.enable();
|
@@ -5642,6 +5663,7 @@ Core.prototype._syncLayoutToColumns = function (from, to, opt_forceDispatching)
|
|
5642
5663
|
var paneChanged = forceUpdate || (from < this.getHScrollStartIndex()) || (to > this.getFirstPinnedRightIndex());
|
5643
5664
|
this._updateScrollbarWidth(paneChanged, true /* contentChanged */);
|
5644
5665
|
this._updateColumnBounds();
|
5666
|
+
this._updateColumnSeparators();
|
5645
5667
|
this._dispatchColumnPositionChanged();
|
5646
5668
|
|
5647
5669
|
if (dirty || opt_forceDispatching) {
|
@@ -5737,6 +5759,7 @@ Core.prototype._updateLayout = function () {
|
|
5737
5759
|
var section = this._settings[s].getSection();
|
5738
5760
|
section.updateLayout(); // Notify section about forced recalculation of the layout
|
5739
5761
|
}
|
5762
|
+
this._updateColumnSeparators();
|
5740
5763
|
};
|
5741
5764
|
|
5742
5765
|
/** @private */
|
@@ -697,6 +697,10 @@ ILayoutGrid.prototype.calculateColumnBounds = function (lftIdx, rgtIdx, outPosit
|
|
697
697
|
* @param {number=} topPx Top position of bound
|
698
698
|
*/
|
699
699
|
ILayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderAry, topPx) {};
|
700
|
+
/** @public
|
701
|
+
* @ignore
|
702
|
+
*/
|
703
|
+
ILayoutGrid.prototype.updateColumnSeparators = function () {};
|
700
704
|
|
701
705
|
export default ILayoutGrid;
|
702
706
|
export { ILayoutGrid };
|
@@ -26,7 +26,11 @@ declare class LayoutGrid extends ElementWrapper {
|
|
26
26
|
|
27
27
|
public setCellBounds(colIndex: number, rowIndex: number, width: number, height: number): void;
|
28
28
|
|
29
|
+
public updateColumnSeparators(): void;
|
30
|
+
|
29
31
|
}
|
30
32
|
|
33
|
+
declare function rgtPx(): void;
|
34
|
+
|
31
35
|
export default LayoutGrid;
|
32
36
|
export { LayoutGrid };
|
@@ -269,7 +269,14 @@ LayoutGrid.prototype._colSelDirty = false;
|
|
269
269
|
* @private
|
270
270
|
*/
|
271
271
|
LayoutGrid.prototype._hscrollbar = null;
|
272
|
-
|
272
|
+
/** @type {Element}
|
273
|
+
* @private
|
274
|
+
*/
|
275
|
+
LayoutGrid.prototype._leftColumnSeparator = null;
|
276
|
+
/** @type {Element}
|
277
|
+
* @private
|
278
|
+
*/
|
279
|
+
LayoutGrid.prototype._rightColumnSeparator = null;
|
273
280
|
|
274
281
|
/**
|
275
282
|
* {@link ElementWrapper#dispose}
|
@@ -2236,8 +2243,7 @@ LayoutGrid.prototype.selectColumn = function (colIndex, selected) {
|
|
2236
2243
|
|
2237
2244
|
var boundLayer = this._boundLayer;
|
2238
2245
|
if(!boundLayer) {
|
2239
|
-
|
2240
|
-
boundLayer.className = "cover-layer";
|
2246
|
+
this._initBoundLayer();
|
2241
2247
|
this._updateLayers();
|
2242
2248
|
}
|
2243
2249
|
}
|
@@ -2409,6 +2415,92 @@ LayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderAry, topPx)
|
|
2409
2415
|
}
|
2410
2416
|
};
|
2411
2417
|
|
2418
|
+
/** @public
|
2419
|
+
*/
|
2420
|
+
LayoutGrid.prototype.updateColumnSeparators = function () {
|
2421
|
+
var pinnedLeftCount = this._hscrollbar.getPinnedLeftColumnCount();
|
2422
|
+
var pinnedRightCount = this._hscrollbar.getPinnedRightColumnCount();
|
2423
|
+
if ((pinnedLeftCount || pinnedRightCount) && !this._boundLayer) {
|
2424
|
+
this._initBoundLayer();
|
2425
|
+
}
|
2426
|
+
|
2427
|
+
var isScrollbarActive = false;
|
2428
|
+
if(this._hscrollbar) {
|
2429
|
+
isScrollbarActive = this._hscrollbar.isActive();
|
2430
|
+
}
|
2431
|
+
|
2432
|
+
var boundLayer = this._boundLayer;
|
2433
|
+
|
2434
|
+
var colSeparator = this._leftColumnSeparator;
|
2435
|
+
if (isScrollbarActive && pinnedLeftCount) {
|
2436
|
+
if (!colSeparator) {
|
2437
|
+
colSeparator = this._leftColumnSeparator = this._createColumnSeparator();
|
2438
|
+
}
|
2439
|
+
if (!colSeparator.parentNode) {
|
2440
|
+
if (boundLayer.children.length) {
|
2441
|
+
boundLayer.insertBefore(colSeparator, boundLayer.children[0]);
|
2442
|
+
} else {
|
2443
|
+
boundLayer.appendChild(colSeparator);
|
2444
|
+
}
|
2445
|
+
}
|
2446
|
+
|
2447
|
+
var rightPos = this._trackX.getLaneStart(pinnedLeftCount);
|
2448
|
+
colSeparator.style.left = (rightPos - 1) + "px";
|
2449
|
+
colSeparator.style.height = this._trackY.getTrackSize() + "px";
|
2450
|
+
} else {
|
2451
|
+
if (colSeparator && colSeparator.parentNode) {
|
2452
|
+
this._boundLayer.removeChild(colSeparator);
|
2453
|
+
}
|
2454
|
+
}
|
2455
|
+
|
2456
|
+
colSeparator = this._rightColumnSeparator;
|
2457
|
+
if (isScrollbarActive && pinnedRightCount) {
|
2458
|
+
if (!colSeparator) {
|
2459
|
+
colSeparator = this._rightColumnSeparator = this._createColumnSeparator();
|
2460
|
+
}
|
2461
|
+
|
2462
|
+
if (!colSeparator.parentNode) {
|
2463
|
+
if (boundLayer.children.length) {
|
2464
|
+
boundLayer.insertBefore(colSeparator, boundLayer.children[0]);
|
2465
|
+
} else {
|
2466
|
+
boundLayer.appendChild(colSeparator);
|
2467
|
+
}
|
2468
|
+
}
|
2469
|
+
var colCount = this.getColumnCount();
|
2470
|
+
var colWidth = this._trackX.getLaneEnd(colCount - 1) - this._trackX.getLaneStart(colCount - pinnedRightCount);
|
2471
|
+
var viewSize = this._getViewSize();
|
2472
|
+
|
2473
|
+
colSeparator.style.left = (viewSize - colWidth - this._rightSpaceSize) + "px";
|
2474
|
+
colSeparator.style.height = this._trackY.getTrackSize() + "px";
|
2475
|
+
} else {
|
2476
|
+
if (colSeparator && colSeparator.parentNode) {
|
2477
|
+
this._boundLayer.removeChild(colSeparator);
|
2478
|
+
}
|
2479
|
+
}
|
2480
|
+
};
|
2481
|
+
|
2482
|
+
/** @private
|
2483
|
+
* @return {Element}
|
2484
|
+
*/
|
2485
|
+
LayoutGrid.prototype._createColumnSeparator = function() {
|
2486
|
+
var colSeparator = document.createElement("div");
|
2487
|
+
colSeparator.classList.add("column-separator");
|
2488
|
+
return colSeparator;
|
2489
|
+
};
|
2490
|
+
|
2491
|
+
/** @private
|
2492
|
+
* @return {Element}
|
2493
|
+
*/
|
2494
|
+
LayoutGrid.prototype._initBoundLayer = function () {
|
2495
|
+
var boundLayer = this._boundLayer;
|
2496
|
+
if(!boundLayer) {
|
2497
|
+
boundLayer = this._boundLayer = document.createElement("div");
|
2498
|
+
boundLayer.className = "cover-layer";
|
2499
|
+
this._element.appendChild(boundLayer);
|
2500
|
+
}
|
2501
|
+
return boundLayer;
|
2502
|
+
};
|
2503
|
+
|
2412
2504
|
/**
|
2413
2505
|
* @private
|
2414
2506
|
* @param {number} indexX
|
@@ -1102,6 +1102,12 @@ VirtualizedLayoutGrid.prototype.updateColumnBounds = function (posAry, noBorderA
|
|
1102
1102
|
this._grid.updateColumnBounds(posAry, noBorderAry, topPx);
|
1103
1103
|
this._updateRowBounds();
|
1104
1104
|
};
|
1105
|
+
/** @public
|
1106
|
+
* @ignore
|
1107
|
+
*/
|
1108
|
+
VirtualizedLayoutGrid.prototype.updateColumnSeparators = function () {
|
1109
|
+
this._grid.updateColumnSeparators();
|
1110
|
+
};
|
1105
1111
|
/** @private
|
1106
1112
|
*/
|
1107
1113
|
VirtualizedLayoutGrid.prototype._initBoundLayer = function () {
|