@refinitiv-ui/efx-grid 6.0.99 → 6.0.101
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 +24 -16
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +2 -0
- package/lib/core/es6/grid/Core.js +24 -16
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +303 -24
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +4 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +20 -0
- package/lib/rt-grid/es6/Grid.d.ts +2 -0
- package/lib/rt-grid/es6/Grid.js +222 -1
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +9 -1
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +207 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +18 -6
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +71 -18
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +1 -3
- package/lib/tr-grid-row-selection/es6/RowSelection.js +39 -58
- package/lib/types/es6/Core/grid/Core.d.ts +2 -0
- package/lib/types/es6/InCellEditing.d.ts +9 -1
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +4 -1
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
- package/lib/types/es6/RowSelection.d.ts +1 -3
- package/lib/versions.json +4 -4
- package/package.json +1 -1
package/lib/core/dist/core.js
CHANGED
@@ -26028,7 +26028,7 @@ Core_Core.prototype._hasPendingRowChange = false;
|
|
26028
26028
|
* @return {string}
|
26029
26029
|
*/
|
26030
26030
|
Core_Core.getVersion = function () {
|
26031
|
-
return "5.1.
|
26031
|
+
return "5.1.103";
|
26032
26032
|
};
|
26033
26033
|
/** {@link ElementWrapper#dispose}
|
26034
26034
|
* @override
|
@@ -29037,33 +29037,24 @@ Core_Core.prototype.getYScrollVal = function (sectionRef, rowIndex, topOfView) {
|
|
29037
29037
|
}
|
29038
29038
|
|
29039
29039
|
let rowCount = this._layoutY.getLaneCount();
|
29040
|
-
let rowIndexOffset = (section) ? section.getRowOffset() : this._sectionStarts[this._startVScrollbarIndex];
|
29041
|
-
|
29042
|
-
if(rowIndexOffset) {
|
29043
|
-
rowIndex += rowIndexOffset;
|
29044
|
-
}
|
29045
29040
|
if (rowIndex <= 0) { rowIndex = 0; }
|
29046
29041
|
else if (rowIndex >= rowCount) { rowIndex = rowCount - 1; }
|
29047
29042
|
|
29048
|
-
let
|
29049
|
-
let
|
29050
|
-
let viewTop = scrollTop + heightOffset;
|
29051
|
-
let viewTopIndex = section ? section.getFirstIndexInView() : this._layoutY.hitTest(viewTop); // TODO: Make it work in zooming mode
|
29043
|
+
let viewInfo = this.getVerticalViewInfo();
|
29044
|
+
let viewTopIndex = viewInfo.topRowIndex; // TODO: Make it work in zooming mode
|
29052
29045
|
|
29053
29046
|
let scrollIndex = -1;
|
29054
29047
|
if (topOfView) {
|
29055
29048
|
scrollIndex = rowIndex;
|
29056
29049
|
} else {
|
29057
|
-
if(rowIndex
|
29050
|
+
if(rowIndex < viewTopIndex) { // Scroll up
|
29058
29051
|
scrollIndex = rowIndex - 3; // Have some spaces at the top for more appealing visual
|
29059
29052
|
if(scrollIndex < 0) {
|
29060
29053
|
scrollIndex = 0;
|
29061
29054
|
}
|
29062
29055
|
} else { // Scroll down
|
29063
|
-
let
|
29064
|
-
|
29065
|
-
let viewBottomIndex = section ? section.getLastIndexInView() : this._layoutY.hitTest(viewBottom - 0.1);
|
29066
|
-
if (rowIndex >= viewBottomIndex) {
|
29056
|
+
let viewBottomIndex = viewInfo.bottomRowIndex;
|
29057
|
+
if (rowIndex > viewBottomIndex) {
|
29067
29058
|
let viewIndexSize = viewBottomIndex - viewTopIndex;
|
29068
29059
|
scrollIndex = rowIndex - viewIndexSize + 3;
|
29069
29060
|
if(scrollIndex < 0) {
|
@@ -29073,7 +29064,9 @@ Core_Core.prototype.getYScrollVal = function (sectionRef, rowIndex, topOfView) {
|
|
29073
29064
|
}
|
29074
29065
|
}
|
29075
29066
|
|
29076
|
-
|
29067
|
+
let rowIndexOffset = (section) ? section.getRowOffset() : this._sectionStarts[this._startVScrollbarIndex];
|
29068
|
+
let heightOffset = this._layoutY.getLaneStart(this._startVScrollbarIndex);
|
29069
|
+
return (scrollIndex >= 0) ? (this._layoutY.getLaneStart(scrollIndex + rowIndexOffset) - heightOffset) : null;
|
29077
29070
|
};
|
29078
29071
|
/** Scroll up or down to make specified row visible in the view
|
29079
29072
|
* @public
|
@@ -29088,6 +29081,21 @@ Core_Core.prototype.scrollToRow = function (sectionRef, rowIndex, topOfView) {
|
|
29088
29081
|
}
|
29089
29082
|
};
|
29090
29083
|
/** @public
|
29084
|
+
* @return {Object}
|
29085
|
+
*/
|
29086
|
+
Core_Core.prototype.getVerticalViewInfo = function() {
|
29087
|
+
let rowIndexOffset = this._sectionStarts[this._startVScrollbarIndex];
|
29088
|
+
let heightOffset = this._layoutY.getLaneStart(rowIndexOffset);
|
29089
|
+
let viewHeight = this._vscrollbar.getHeight();
|
29090
|
+
let viewTop = this._vscrollbar.getScrollTop() + heightOffset;
|
29091
|
+
let viewBottom = viewTop + viewHeight;
|
29092
|
+
|
29093
|
+
return {
|
29094
|
+
topRowIndex: this._layoutY.hitTest(viewTop) - rowIndexOffset,
|
29095
|
+
bottomRowIndex: this._layoutY.hitTest(viewBottom - 0.1) - rowIndexOffset
|
29096
|
+
};
|
29097
|
+
};
|
29098
|
+
/** @public
|
29091
29099
|
* @return {Object} Returns null if vscrollbar does not exists
|
29092
29100
|
*/
|
29093
29101
|
Core_Core.prototype.getVScrollView = function () {
|