@refinitiv-ui/efx-grid 6.0.128 → 6.0.129
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 +220 -11
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataCache.js +29 -0
- package/lib/core/es6/data/DataTable.d.ts +4 -0
- package/lib/core/es6/data/DataTable.js +117 -1
- package/lib/core/es6/data/DataView.d.ts +6 -0
- package/lib/core/es6/data/DataView.js +43 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
- package/lib/core/es6/data/SegmentCollection.js +21 -0
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +9 -9
- package/lib/grid/index.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +6 -0
- package/lib/row-segmenting/es6/RowSegmenting.js +62 -11
- package/lib/rt-grid/dist/rt-grid.js +261 -23
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/DataConnector.js +1 -1
- package/lib/rt-grid/es6/Grid.js +40 -11
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +3 -2
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +1100 -1124
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2 -2
- package/lib/types/es6/CellSelection.d.ts +3 -2
- package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
- package/lib/types/es6/Core/data/DataView.d.ts +6 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
- package/lib/types/es6/RowSegmenting.d.ts +6 -0
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -31,7 +31,7 @@ DataConnector.prototype._fieldChangedConflator = null;
|
|
31
31
|
* @private
|
32
32
|
*/
|
33
33
|
DataConnector.prototype._ricChangedConflator = null;
|
34
|
-
/** @type {Object.<string, RowDefinition
|
34
|
+
/** @type {Object.<string, Array.<RowDefinition>>}
|
35
35
|
* @private
|
36
36
|
*/
|
37
37
|
DataConnector.prototype._rowDefMap = null;
|
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -524,6 +524,10 @@ Grid.prototype._formulaConflator = null;
|
|
524
524
|
*/
|
525
525
|
Grid.prototype._chainConflator = null;
|
526
526
|
/** @private
|
527
|
+
* @type {Object}
|
528
|
+
*/
|
529
|
+
Grid.prototype._constituentMap = null;
|
530
|
+
/** @private
|
527
531
|
* @type {number}
|
528
532
|
*/
|
529
533
|
Grid.prototype._clientWidth = NaN;
|
@@ -2694,6 +2698,7 @@ Grid.prototype.removeAllRows = function() {
|
|
2694
2698
|
this._dcConflator.reset();
|
2695
2699
|
this._formulaConflator.reset();
|
2696
2700
|
this._chainConflator.reset();
|
2701
|
+
this._constituentMap = null;
|
2697
2702
|
this._connector.removeAllRics();
|
2698
2703
|
|
2699
2704
|
// TODO: This logic should also be in the core grid
|
@@ -3593,15 +3598,15 @@ Grid.prototype._onQuote2PostUpdate = function (e) {
|
|
3593
3598
|
* @param {Object} e
|
3594
3599
|
*/
|
3595
3600
|
Grid.prototype._onQ2DataChanged = function (e) {
|
3596
|
-
let
|
3597
|
-
let rowDef = this._getRowDefinitionById(subId);
|
3601
|
+
let rowDef = this._getRowDefinitionById(e["subId"]);
|
3598
3602
|
if(!rowDef) {
|
3599
3603
|
return; // WARNING: This should not be happened because row has been removed but the data is still received
|
3600
3604
|
}
|
3601
3605
|
|
3606
|
+
let ric = e["ric"];
|
3602
3607
|
let values = e["values"];
|
3603
3608
|
if (values) {
|
3604
|
-
let
|
3609
|
+
let duplicateRics = null;
|
3605
3610
|
if(rowDef.verifyConstituent(ric)) {
|
3606
3611
|
let parentDef = rowDef;
|
3607
3612
|
let childDef = parentDef.getConstituent(ric);
|
@@ -3612,15 +3617,28 @@ Grid.prototype._onQ2DataChanged = function (e) {
|
|
3612
3617
|
if(!childDef) {
|
3613
3618
|
return; // Parent chain is not alive
|
3614
3619
|
}
|
3620
|
+
duplicateRics = this._connector.getRowDefByRic(ric);
|
3615
3621
|
this._connector.addRic(childDef); // TODO: JET/RTK should not re-subscribe this
|
3622
|
+
if(!this._constituentMap) {
|
3623
|
+
this._constituentMap = {};
|
3624
|
+
}
|
3625
|
+
this._constituentMap[childDef.getRowId()] = childDef;
|
3616
3626
|
this._registerConstituents(childDef);
|
3617
3627
|
}
|
3618
3628
|
}
|
3619
3629
|
|
3630
|
+
if(duplicateRics && duplicateRics.length) {
|
3631
|
+
let duplicateRic = duplicateRics[0];
|
3632
|
+
duplicateRic.cloneRowData(values, values);
|
3633
|
+
}
|
3634
|
+
|
3620
3635
|
rowDef.setRowData(values); // Trigger data changes
|
3621
|
-
} else
|
3622
|
-
rowDef.
|
3623
|
-
|
3636
|
+
} else { // The constituent is requested to be removed by the real-time data provider
|
3637
|
+
let childDef = rowDef.getConstituent(ric); // WARNING: normal ric and its delayed version must match with the one first given
|
3638
|
+
if(childDef) {
|
3639
|
+
childDef.setParent(null); // Manually remove child reference from its parent
|
3640
|
+
this._removeRow(childDef);
|
3641
|
+
}
|
3624
3642
|
}
|
3625
3643
|
};
|
3626
3644
|
|
@@ -3631,6 +3649,9 @@ Grid.prototype._registerConstituents = function(rowDef) {
|
|
3631
3649
|
if(this._chainConflator.conflate(rowDef)) {
|
3632
3650
|
return;
|
3633
3651
|
}
|
3652
|
+
|
3653
|
+
this._constituentMap = null;
|
3654
|
+
|
3634
3655
|
let view = this._dv;
|
3635
3656
|
let dt = view ? view.getDataSource() : null;
|
3636
3657
|
if(!dt) {
|
@@ -3940,14 +3961,21 @@ Grid.prototype._onDataComposed = function(e) {
|
|
3940
3961
|
return; // Cannot do data composition if there is no change in data
|
3941
3962
|
}
|
3942
3963
|
|
3943
|
-
|
3944
|
-
if(!rowData) {
|
3964
|
+
if(!e["rowData"]) {
|
3945
3965
|
return; // Row could already be removed or global change event is sent
|
3946
3966
|
}
|
3947
3967
|
|
3948
|
-
let
|
3968
|
+
let rowId = e["rid"];
|
3969
|
+
let rowDef = this._getRowDefinitionById(rowId);
|
3949
3970
|
if(!rowDef) {
|
3950
|
-
|
3971
|
+
rowDef = this._constituentMap ? this._constituentMap[rowId] : null; // Row def could be in pending for adding to view
|
3972
|
+
if(!rowDef) {
|
3973
|
+
return; // Somehow the given row id is invalid
|
3974
|
+
}
|
3975
|
+
if(rowDef.isDisposed()) {
|
3976
|
+
this._constituentMap[rowId] = null;
|
3977
|
+
return;
|
3978
|
+
}
|
3951
3979
|
}
|
3952
3980
|
|
3953
3981
|
if(this._autoDateConversion) { // auto data conversion
|
@@ -4521,7 +4549,8 @@ Grid.prototype._onTabNavigation = function(e) {
|
|
4521
4549
|
*/
|
4522
4550
|
Grid.prototype._getEventHandlers = function() {
|
4523
4551
|
return {
|
4524
|
-
"tabNavigation": this._onTabNavigation
|
4552
|
+
"tabNavigation": this._onTabNavigation,
|
4553
|
+
"q2DataChanged": this._onQ2DataChanged
|
4525
4554
|
};
|
4526
4555
|
};
|
4527
4556
|
|
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
|
2
2
|
import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
3
3
|
import { MouseDownTrait } from "../../tr-grid-util/es6/MouseDownTrait.js";
|
4
4
|
import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
|
5
|
-
import {
|
5
|
+
import { cloneObject, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
|
6
6
|
import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
|
7
7
|
import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
8
8
|
|
@@ -16,7 +16,8 @@ declare namespace CellSelectionPlugin {
|
|
16
16
|
selectionChanged?: ((...params: any[]) => any)|null,
|
17
17
|
copy?: ((...params: any[]) => any)|null,
|
18
18
|
beforeMouseDown?: ((...params: any[]) => any)|null,
|
19
|
-
selectableSections?: any[]|null
|
19
|
+
selectableSections?: any[]|null,
|
20
|
+
copyDisabled?: boolean|null
|
20
21
|
};
|
21
22
|
|
22
23
|
}
|