@refinitiv-ui/efx-grid 6.0.20 → 6.0.22
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.js +46 -24
- package/lib/core/dist/core.js +61 -14
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +11 -1
- package/lib/core/es6/grid/LayoutGrid.js +1 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +2 -0
- package/lib/core/es6/grid/components/CellSpans.js +35 -10
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +2 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +14 -3
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +362 -41
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +10 -1
- package/lib/rt-grid/es6/Grid.js +196 -17
- package/lib/rt-grid/es6/ReferenceCounter.js +13 -2
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -0
- package/lib/rt-grid/es6/RowDefinition.js +74 -8
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +9 -5
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +365 -133
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +11 -37
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +15 -15
- package/lib/tr-grid-row-selection/es6/RowSelection.js +9 -1
- package/lib/types/es6/ColumnGrouping.d.ts +9 -5
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +10 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -0
- package/lib/types/es6/RowSelection.d.ts +15 -15
- package/lib/versions.json +4 -4
- package/package.json +6 -2
@@ -528,7 +528,7 @@ Core.prototype._rowHeightTimerId = 0;
|
|
528
528
|
* @return {string}
|
529
529
|
*/
|
530
530
|
Core.getVersion = function () {
|
531
|
-
return "5.1.
|
531
|
+
return "5.1.32";
|
532
532
|
};
|
533
533
|
/** {@link ElementWrapper#dispose}
|
534
534
|
* @override
|
@@ -2880,6 +2880,13 @@ Core.prototype.freezeLayout = function (opt_bool) {
|
|
2880
2880
|
if (prevState !== opt_bool) {
|
2881
2881
|
this._frozenLayout = opt_bool;
|
2882
2882
|
|
2883
|
+
var stp = this.getPlugin("SortableTitlePlugin");
|
2884
|
+
if(this._frozenLayout) {
|
2885
|
+
if(stp) {
|
2886
|
+
stp.freezeIndicator(true);
|
2887
|
+
}
|
2888
|
+
}
|
2889
|
+
|
2883
2890
|
if (!this._frozenLayout) {
|
2884
2891
|
// Width has not yet changed so we need to disable it first
|
2885
2892
|
this._disableEvent("widthChanged");
|
@@ -2908,6 +2915,9 @@ Core.prototype.freezeLayout = function (opt_bool) {
|
|
2908
2915
|
if(!viewChanged) { // Always update virtualizer
|
2909
2916
|
this._rowVirtualizer.update(true); // Force section activation
|
2910
2917
|
}
|
2918
|
+
if(stp) {
|
2919
|
+
stp.freezeIndicator(false);
|
2920
|
+
}
|
2911
2921
|
}
|
2912
2922
|
this._rowHeightSync = true;
|
2913
2923
|
}
|
@@ -1612,6 +1612,7 @@ LayoutGrid.prototype.setFrozenLayout = function (bool) {
|
|
1612
1612
|
if (this._frozenLayout !== bool) {
|
1613
1613
|
this._frozenLayout = bool;
|
1614
1614
|
|
1615
|
+
this._cellSpans.freezeMapping(this._frozenLayout);
|
1615
1616
|
if (!this._frozenLayout) {
|
1616
1617
|
this._syncLayoutToColumns(0);
|
1617
1618
|
this._syncLayoutToRows(0, this._rowCount);
|
@@ -20,6 +20,33 @@ CellSpans.prototype.removeColumn = function (at) { // Use when a column is remov
|
|
20
20
|
}
|
21
21
|
return dirty;
|
22
22
|
};
|
23
|
+
/** @public
|
24
|
+
* @param {boolean=} bool
|
25
|
+
*/
|
26
|
+
CellSpans.prototype.freezeMapping = function (bool) {
|
27
|
+
this._frozenMapping = bool !== false;
|
28
|
+
if(!this._frozenMapping) {
|
29
|
+
this._mapCellSpans();
|
30
|
+
}
|
31
|
+
};
|
32
|
+
|
33
|
+
|
34
|
+
/** @private
|
35
|
+
*/
|
36
|
+
CellSpans.prototype._mapCellSpans = function () {
|
37
|
+
var cellSpans = this._spans;
|
38
|
+
this._spans = [];
|
39
|
+
this._occupiedMap = {};
|
40
|
+
var i, cellSpan;
|
41
|
+
for(i = cellSpans.length; --i >= 0;) {
|
42
|
+
cellSpan = cellSpans[i];
|
43
|
+
if(cellSpan.indexX >= 0) {
|
44
|
+
cellSpan.register(this._spans, this._occupiedMap);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
};
|
48
|
+
|
49
|
+
|
23
50
|
/** @public
|
24
51
|
* @param {number} from
|
25
52
|
* @param {number} amount This can be negative number
|
@@ -36,18 +63,10 @@ CellSpans.prototype.shiftColumn = function (from, amount) { // Use when a column
|
|
36
63
|
cellSpan.indexX += amount;
|
37
64
|
}
|
38
65
|
}
|
39
|
-
if(!dirty) { return false; }
|
66
|
+
if(!dirty || this._frozenMapping) { return false; }
|
40
67
|
|
41
68
|
// Re-registers all cellspans. Some of the cellspans may be lost due to shifting
|
42
|
-
|
43
|
-
this._spans = [];
|
44
|
-
this._occupiedMap = {};
|
45
|
-
for(i = cellSpans.length; --i >= 0;) {
|
46
|
-
cellSpan = cellSpans[i];
|
47
|
-
if(cellSpan.indexX >= 0) {
|
48
|
-
cellSpan.register(this._spans, this._occupiedMap);
|
49
|
-
}
|
50
|
-
}
|
69
|
+
this._mapCellSpans();
|
51
70
|
return true;
|
52
71
|
};
|
53
72
|
/** @public
|
@@ -336,6 +355,12 @@ CellSpans.prototype._spans;
|
|
336
355
|
*/
|
337
356
|
CellSpans.prototype._occupiedMap;
|
338
357
|
|
358
|
+
/**
|
359
|
+
* @private
|
360
|
+
* @type {boolean}
|
361
|
+
*/
|
362
|
+
CellSpans.prototype._frozenMapping = false;
|
363
|
+
|
339
364
|
export default CellSpans;
|
340
365
|
export { CellSpans };
|
341
366
|
|
@@ -110,6 +110,8 @@ declare class SortableTitlePlugin extends EventDispatcher {
|
|
110
110
|
|
111
111
|
public disableTwoStateSorting(disabled?: boolean|null): void;
|
112
112
|
|
113
|
+
public freezeIndicator(bool?: boolean|null): void;
|
114
|
+
|
113
115
|
public disableSortSymbols(disabled?: boolean|null): void;
|
114
116
|
|
115
117
|
public disableDataSorting(disabled?: boolean|null): void;
|
@@ -192,6 +192,10 @@ SortableTitlePlugin.prototype._userManagedLogic = false;
|
|
192
192
|
* @type {boolean}
|
193
193
|
*/
|
194
194
|
SortableTitlePlugin.prototype._disabled = false;
|
195
|
+
/** @private
|
196
|
+
* @type {boolean}
|
197
|
+
*/
|
198
|
+
SortableTitlePlugin.prototype._frozenIndicator = false;
|
195
199
|
/** Since DataView in real-time grid has only one ROW_DEF column, we need to re-map sorting field to sort correctly.
|
196
200
|
* @private
|
197
201
|
* @type {boolean}
|
@@ -750,8 +754,9 @@ SortableTitlePlugin.prototype.sortColumns = function (sortOptions, opt_arg) {
|
|
750
754
|
* @param {Object=} opt_arg Event argument to be sent with preDataSorting event
|
751
755
|
*/
|
752
756
|
SortableTitlePlugin.prototype.clearSortState = function (opt_arg) {
|
753
|
-
this._popSortState(0, opt_arg)
|
754
|
-
|
757
|
+
if(this._popSortState(0, opt_arg)) {
|
758
|
+
this.updateSortSymbols();
|
759
|
+
}
|
755
760
|
};
|
756
761
|
/** @description Perform sorting with the same parameter.
|
757
762
|
* @public
|
@@ -956,6 +961,12 @@ SortableTitlePlugin.prototype.disableTwoStateSorting = function (disabled) {
|
|
956
961
|
|
957
962
|
};
|
958
963
|
/** @public
|
964
|
+
* @param {boolean=} bool=true, if set to false it will be unfreeze indicator
|
965
|
+
*/
|
966
|
+
SortableTitlePlugin.prototype.freezeIndicator = function (bool) {
|
967
|
+
this._frozenIndicator = bool !== false;
|
968
|
+
};
|
969
|
+
/** @public
|
959
970
|
* @param {boolean=} disabled
|
960
971
|
*/
|
961
972
|
SortableTitlePlugin.prototype.disableSortSymbols = function (disabled) {
|
@@ -1568,7 +1579,7 @@ SortableTitlePlugin.prototype._clearSortSymbols = function (state) {
|
|
1568
1579
|
SortableTitlePlugin.prototype._updateSortableIndicator = function (hostIndex) {
|
1569
1580
|
var t = this;
|
1570
1581
|
var host = t._hosts[hostIndex];
|
1571
|
-
if (!host) { return; }
|
1582
|
+
if (!host || this._frozenIndicator) { return; }
|
1572
1583
|
|
1573
1584
|
var section = host.getSection("title");
|
1574
1585
|
if (section == null) { return; }
|
package/lib/grid/index.js
CHANGED