@refinitiv-ui/efx-grid 6.0.97 → 6.0.99
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +230 -174
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataView.d.ts +3 -1
- package/lib/core/es6/data/DataView.js +32 -5
- package/lib/core/es6/grid/Core.js +20 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +11 -0
- package/lib/core/es6/grid/util/Virtualizer.js +5 -5
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +2512 -2426
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +2 -0
- package/lib/rt-grid/es6/Grid.js +16 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +0 -2
- package/lib/rt-grid/es6/RowDefinition.js +85 -44
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +12 -1
- package/lib/types/es6/Core/data/DataView.d.ts +3 -1
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +0 -2
- package/lib/versions.json +2 -2
- package/package.json +1 -1
@@ -236,7 +236,9 @@ declare class DataView extends EventDispatcher {
|
|
236
236
|
|
237
237
|
public searchNext(rowRef: number|string|null, searchLogic: ((...params: any[]) => any)|null): number;
|
238
238
|
|
239
|
-
public stall(
|
239
|
+
public stall(bool?: boolean|null): boolean;
|
240
|
+
|
241
|
+
public stallSorting(bool?: boolean|null): boolean;
|
240
242
|
|
241
243
|
public enableAutoGroupRemoval(opt_bool?: boolean|null): boolean;
|
242
244
|
|
@@ -302,6 +302,10 @@ DataView.prototype._wrapSize = 0;
|
|
302
302
|
* @type {number}
|
303
303
|
*/
|
304
304
|
DataView.prototype._wrapTimerId = 0;
|
305
|
+
/** @private
|
306
|
+
* @type {boolean}
|
307
|
+
*/
|
308
|
+
DataView.prototype._stalledSorting = false;
|
305
309
|
|
306
310
|
/** @public
|
307
311
|
* @fires DataView#preDisposed
|
@@ -2344,11 +2348,11 @@ DataView.prototype._searchRow = function(rids, searchLogic, start, end, inc) {
|
|
2344
2348
|
|
2345
2349
|
/** Blocks all row insertion and removal, but keep updating the data
|
2346
2350
|
* @public
|
2347
|
-
* @param {boolean=}
|
2348
|
-
* @return {boolean}
|
2351
|
+
* @param {boolean=} bool
|
2352
|
+
* @return {boolean} Returns true, if there is any change
|
2349
2353
|
*/
|
2350
|
-
DataView.prototype.stall = function(
|
2351
|
-
let newBool =
|
2354
|
+
DataView.prototype.stall = function(bool) {
|
2355
|
+
let newBool = bool !== false;
|
2352
2356
|
let curBool = this._shared.stalledRids ? true : false;
|
2353
2357
|
if(curBool === newBool) { return false; }
|
2354
2358
|
if(newBool) {
|
@@ -2365,6 +2369,26 @@ DataView.prototype.stall = function(opt_bool) {
|
|
2365
2369
|
}
|
2366
2370
|
return true;
|
2367
2371
|
};
|
2372
|
+
/** Blocks existing sorting from performing on every data change
|
2373
|
+
* @public
|
2374
|
+
* @param {boolean=} bool
|
2375
|
+
* @return {boolean} Returns true, if there is any change
|
2376
|
+
*/
|
2377
|
+
DataView.prototype.stallSorting = function(bool) {
|
2378
|
+
let newBool = bool !== false;
|
2379
|
+
if(this._stalledSorting !== newBool) {
|
2380
|
+
this._stalledSorting = newBool;
|
2381
|
+
|
2382
|
+
if(!newBool && this.isSorting()) {
|
2383
|
+
if(this._sort()) {
|
2384
|
+
this._dispatchDataChange(DataTable._positionChangeArg);
|
2385
|
+
}
|
2386
|
+
}
|
2387
|
+
return true;
|
2388
|
+
}
|
2389
|
+
return false;
|
2390
|
+
};
|
2391
|
+
|
2368
2392
|
/** Automatically and asyncronuosly remove group that has no member or no content. Predefined groups will not be removed in this way.
|
2369
2393
|
* @public
|
2370
2394
|
* @param {boolean=} opt_bool
|
@@ -2400,7 +2424,7 @@ DataView.prototype.enableAutoGroupHiding = function(opt_bool) {
|
|
2400
2424
|
* @public
|
2401
2425
|
*/
|
2402
2426
|
DataView.prototype.synchronizeRowOrder = function() {
|
2403
|
-
if(this.isSorting()) {
|
2427
|
+
if(!this._stalledSorting && this.isSorting()) {
|
2404
2428
|
this._dt._sort(this._sortingDefs);
|
2405
2429
|
}
|
2406
2430
|
};
|
@@ -3453,6 +3477,9 @@ DataView.prototype._sort = function() {
|
|
3453
3477
|
if(this._groupMembers) {
|
3454
3478
|
return false; // DataView with children should not be sorted as sort operation will be done on each child
|
3455
3479
|
}
|
3480
|
+
if(this._stalledSorting) {
|
3481
|
+
return false;
|
3482
|
+
}
|
3456
3483
|
|
3457
3484
|
if(this._dt._getSegmentSeparators() || this.isSorting()) {
|
3458
3485
|
let rids = this._rids;
|
@@ -574,7 +574,7 @@ Core.prototype._hasPendingRowChange = false;
|
|
574
574
|
* @return {string}
|
575
575
|
*/
|
576
576
|
Core.getVersion = function () {
|
577
|
-
return "5.1.
|
577
|
+
return "5.1.102";
|
578
578
|
};
|
579
579
|
/** {@link ElementWrapper#dispose}
|
580
580
|
* @override
|
@@ -1775,6 +1775,16 @@ Core.prototype._moveColumn = function (fromCol, destCol) {
|
|
1775
1775
|
}
|
1776
1776
|
}
|
1777
1777
|
|
1778
|
+
// The deactivated column may be moved directly or indirectly to the current view. It's necessary to make all columns in view activated.
|
1779
|
+
if(!this._frozenLayout) {
|
1780
|
+
if(this._colVirtualizer.isEnabled()) {
|
1781
|
+
let vBegin = this._colVirtualizer.getFirstIndexInView();
|
1782
|
+
if(!((fromCol < vBegin && destCol < vBegin) || (fromCol > vEnd && destCol > vEnd))) { // Columns does not move between hidden columns
|
1783
|
+
this._activateColumns(vBegin, vEnd, vBegin, vEnd); // To confirm that all columns in view are activated
|
1784
|
+
}
|
1785
|
+
}
|
1786
|
+
}
|
1787
|
+
|
1778
1788
|
// no need to invoke because moving column does not change column-width
|
1779
1789
|
// this._syncLayoutToColumns(minColumn, this.getColumnCount());
|
1780
1790
|
|
@@ -5721,7 +5731,15 @@ Core.prototype._updateScrollbarHeight = function (paneChanged, contentChanged, n
|
|
5721
5731
|
// HACK: Due to fixed layout size we need to scale view size instead of content size, when zooming
|
5722
5732
|
// TODO: Check if zoom factor is used for virtualization correctly
|
5723
5733
|
this._rowVirtualizer.setViewSize(viewSize / this._zoomFactor);
|
5724
|
-
|
5734
|
+
|
5735
|
+
let offsetRowCount = this._sectionStarts[this._startVScrollbarIndex];
|
5736
|
+
let footerCount = this.getFooterCount();
|
5737
|
+
let footerRowCount = 0;
|
5738
|
+
if(footerCount) {
|
5739
|
+
let sectionCount = this.getSectionCount();
|
5740
|
+
footerRowCount = this._sectionStarts[sectionCount] - this._sectionStarts[sectionCount - footerCount];
|
5741
|
+
}
|
5742
|
+
this._rowVirtualizer.setViewBounds(offsetRowCount, footerRowCount);
|
5725
5743
|
} else {
|
5726
5744
|
this._rowVirtualizer.validateVirtualization(); // Content height may be changed
|
5727
5745
|
}
|
@@ -1229,6 +1229,17 @@ SortableTitlePlugin.prototype._getPlugin = function(pluginName) {
|
|
1229
1229
|
let host = this._hosts[0];
|
1230
1230
|
return (host) ? host.getPlugin(pluginName) : null;
|
1231
1231
|
};
|
1232
|
+
|
1233
|
+
/** @public
|
1234
|
+
* @description Click title to sort with mouse event. This is for testing purpose.
|
1235
|
+
* @ignore
|
1236
|
+
* @param {Core} grid
|
1237
|
+
* @param {Object=} mouseEvt
|
1238
|
+
*/
|
1239
|
+
SortableTitlePlugin.prototype.clickTitleByMouse = function (grid, mouseEvt) {
|
1240
|
+
this._onClickTitle(grid, mouseEvt);
|
1241
|
+
};
|
1242
|
+
|
1232
1243
|
/** @private
|
1233
1244
|
* @param {Core} grid
|
1234
1245
|
* @param {MouseEvent} e
|
@@ -299,12 +299,12 @@ Virtualizer.prototype.setViewOffset = function (px) {
|
|
299
299
|
};
|
300
300
|
/** @public
|
301
301
|
* @ignore
|
302
|
-
* @param {number}
|
303
|
-
* @param {number}
|
302
|
+
* @param {number} startItemCount
|
303
|
+
* @param {number} endItemCount
|
304
304
|
*/
|
305
|
-
Virtualizer.prototype.setViewBounds = function (
|
306
|
-
this._startOffsetCount =
|
307
|
-
this._endOffsetCount =
|
305
|
+
Virtualizer.prototype.setViewBounds = function (startItemCount, endItemCount) {
|
306
|
+
this._startOffsetCount = startItemCount > 0 ? startItemCount : 0;
|
307
|
+
this._endOffsetCount = endItemCount > 0 ? endItemCount : 0;
|
308
308
|
this.validateVirtualization(); // Everytime row height is changed
|
309
309
|
};
|
310
310
|
/** @public
|
package/lib/grid/index.js
CHANGED