@refinitiv-ui/efx-grid 6.0.139 → 6.0.141
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 +99 -28
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataTable.d.ts +5 -1
- package/lib/core/es6/data/DataTable.js +38 -8
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +8 -0
- package/lib/core/es6/data/Segment.d.ts +1 -1
- package/lib/core/es6/data/Segment.js +16 -4
- package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
- package/lib/core/es6/data/SegmentCollection.js +21 -10
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/components/Cell.js +9 -3
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +2 -0
- package/lib/core/es6/grid/components/ElementWrapper.js +6 -2
- package/lib/grid/index.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +8 -1
- package/lib/row-segmenting/es6/RowSegmenting.js +88 -23
- package/lib/rt-grid/dist/rt-grid.js +607 -566
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +37 -14
- package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +11 -3
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +2 -3
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +2 -0
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +38 -8
- package/lib/types/es6/ConditionalColoring.d.ts +1 -1
- package/lib/types/es6/Core/data/DataTable.d.ts +5 -1
- package/lib/types/es6/Core/data/DataView.d.ts +2 -0
- package/lib/types/es6/Core/data/Segment.d.ts +1 -1
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +2 -0
- package/lib/types/es6/RowFiltering.d.ts +2 -1
- package/lib/versions.json +3 -3
- package/package.json +1 -1
package/lib/core/dist/core.js
CHANGED
@@ -1198,12 +1198,16 @@ ElementWrapper.prototype.getClass = function () { return this._element.className
|
|
1198
1198
|
*/
|
1199
1199
|
ElementWrapper.prototype.setClass = function (str) { this._element.className = str; };
|
1200
1200
|
|
1201
|
-
/**
|
1202
|
-
* @public
|
1201
|
+
/** @public
|
1203
1202
|
* @param {string} str
|
1204
1203
|
* @return {string}
|
1205
1204
|
*/
|
1206
1205
|
ElementWrapper.prototype.getAttribute = function (str) { return this._element.getAttribute(str); };
|
1206
|
+
/** @public
|
1207
|
+
* @param {string} str
|
1208
|
+
* @return {boolean}
|
1209
|
+
*/
|
1210
|
+
ElementWrapper.prototype.hasAttribute = function (str) { return this._element.hasAttribute(str); };
|
1207
1211
|
/** Sets attribute to DOM element
|
1208
1212
|
* @public
|
1209
1213
|
* @param {string} str
|
@@ -2349,11 +2353,17 @@ Cell.prototype.updateTooltip = function() {
|
|
2349
2353
|
}
|
2350
2354
|
|
2351
2355
|
if(customizedTooltip) {
|
2352
|
-
|
2356
|
+
let curTooltip = this.hasAttribute("tooltip") ? this.getAttribute("tooltip") : this.getAttribute("title");
|
2357
|
+
if(curTooltip !== customizedTooltip) {
|
2353
2358
|
this.setAttribute("title", customizedTooltip);
|
2354
2359
|
}
|
2355
|
-
} else
|
2356
|
-
this.
|
2360
|
+
} else {
|
2361
|
+
if(this.hasAttribute("title")) {
|
2362
|
+
this.removeAttribute("title");
|
2363
|
+
}
|
2364
|
+
if(this.hasAttribute("tooltip")) {
|
2365
|
+
this.removeAttribute("tooltip");
|
2366
|
+
}
|
2357
2367
|
}
|
2358
2368
|
};
|
2359
2369
|
/** @public
|
@@ -13022,6 +13032,9 @@ let Segment = function(rid, sharedObj) {
|
|
13022
13032
|
this._rid = rid;
|
13023
13033
|
this._children = {};
|
13024
13034
|
this._shared = sharedObj;
|
13035
|
+
if(sharedObj.defaultCollapsing) {
|
13036
|
+
this._collapsed = true;
|
13037
|
+
}
|
13025
13038
|
};
|
13026
13039
|
es6_Ext.inherits(Segment, es6_EventDispatcher);
|
13027
13040
|
|
@@ -13136,9 +13149,12 @@ Segment.prototype.dispose = function() {
|
|
13136
13149
|
this._subSegMap = this._subSegNames = null;
|
13137
13150
|
}
|
13138
13151
|
if(this._collapsed) {
|
13139
|
-
this.
|
13152
|
+
if(this._childCount || this._subSegDef) {
|
13153
|
+
this._shared.dirtyCollapsingState = true;
|
13154
|
+
}
|
13140
13155
|
}
|
13141
13156
|
|
13157
|
+
this._childCount = 0;
|
13142
13158
|
this._shared = null;
|
13143
13159
|
this._subSegParent = this._subSegDef = this._subSegVal = null;
|
13144
13160
|
};
|
@@ -13639,7 +13655,9 @@ Segment.prototype.collapse = function(bool) {
|
|
13639
13655
|
bool = (bool !== false);
|
13640
13656
|
if(this._collapsed !== bool) {
|
13641
13657
|
this._collapsed = bool;
|
13642
|
-
this.
|
13658
|
+
if(this._childCount || this._subSegDef) {
|
13659
|
+
this._shared.dirtyCollapsingState = true;
|
13660
|
+
}
|
13643
13661
|
return true;
|
13644
13662
|
}
|
13645
13663
|
return false;
|
@@ -13746,10 +13764,14 @@ Segment.prototype.setOrder = function(val) {
|
|
13746
13764
|
*/
|
13747
13765
|
Segment._tabs = null;
|
13748
13766
|
/** @public
|
13749
|
-
* @param {Array.<string
|
13750
|
-
* @return {Array.<string>} lines
|
13767
|
+
* @param {Array.<string>=} lines
|
13768
|
+
* @return {!Array.<string>} lines
|
13751
13769
|
*/
|
13752
13770
|
Segment.prototype.log = function(lines) {
|
13771
|
+
if(!lines) {
|
13772
|
+
lines = [];
|
13773
|
+
}
|
13774
|
+
|
13753
13775
|
let i;
|
13754
13776
|
let tabs = Segment._tabs;
|
13755
13777
|
if(!tabs) {
|
@@ -13802,7 +13824,8 @@ let SegmentCollection = function() {
|
|
13802
13824
|
|
13803
13825
|
this._shared = {
|
13804
13826
|
childToSegment: {}, // child Id to segment Id
|
13805
|
-
dirtyCollapsingState: false
|
13827
|
+
dirtyCollapsingState: false,
|
13828
|
+
defaultCollapsing: false
|
13806
13829
|
};
|
13807
13830
|
};
|
13808
13831
|
es6_Ext.inherits(SegmentCollection, es6_EventDispatcher);
|
@@ -14001,19 +14024,17 @@ SegmentCollection.prototype.getSegmentIds = function() {
|
|
14001
14024
|
* @return {boolean} Returns true if there is any change. Otherwise, returns false
|
14002
14025
|
*/
|
14003
14026
|
SegmentCollection.prototype.collapseSegments = function(segmentIds, bool) {
|
14027
|
+
let dirty = 0;
|
14004
14028
|
if(this._segmentCount) {
|
14005
|
-
let dirty = 0;
|
14006
14029
|
let len = segmentIds.length;
|
14007
14030
|
for (let i = 0; i < len; i++) {
|
14008
|
-
let
|
14009
|
-
|
14010
|
-
|
14011
|
-
|
14012
|
-
if(dirty) {
|
14013
|
-
return true;
|
14031
|
+
let segment = this._segments[segmentIds[i]];
|
14032
|
+
if(segment) {
|
14033
|
+
dirty |= segment.collapse(bool);
|
14034
|
+
}
|
14014
14035
|
}
|
14015
14036
|
}
|
14016
|
-
return false;
|
14037
|
+
return dirty ? true : false;
|
14017
14038
|
};
|
14018
14039
|
|
14019
14040
|
/** @public
|
@@ -14334,7 +14355,6 @@ SegmentCollection.prototype.logRowIdMap = function() {
|
|
14334
14355
|
return lines.join("\n");
|
14335
14356
|
};
|
14336
14357
|
|
14337
|
-
|
14338
14358
|
/** @public
|
14339
14359
|
* @param {string} segmentId
|
14340
14360
|
* @param {string|Array.<string>} fields
|
@@ -14425,6 +14445,19 @@ SegmentCollection.prototype._onSubSegmentRemoved = function(e) {
|
|
14425
14445
|
this.removeSegment(rid);
|
14426
14446
|
};
|
14427
14447
|
|
14448
|
+
/** @public
|
14449
|
+
* @param {boolean} bool
|
14450
|
+
* @return {boolean}
|
14451
|
+
*/
|
14452
|
+
SegmentCollection.prototype.setDefaultCollapsing = function(bool) {
|
14453
|
+
let newVal = bool ? true : false;
|
14454
|
+
if(this._shared.defaultCollapsing !== newVal) {
|
14455
|
+
this._shared.defaultCollapsing = newVal;
|
14456
|
+
return true;
|
14457
|
+
}
|
14458
|
+
return false;
|
14459
|
+
};
|
14460
|
+
|
14428
14461
|
|
14429
14462
|
/* harmony default export */ const data_SegmentCollection = (SegmentCollection);
|
14430
14463
|
|
@@ -14523,6 +14556,10 @@ DataTable.prototype._clsSource = null;
|
|
14523
14556
|
* @type {number}
|
14524
14557
|
*/
|
14525
14558
|
DataTable.prototype._classifyingTimer = 0;
|
14559
|
+
/** @private
|
14560
|
+
* @type {boolean}
|
14561
|
+
*/
|
14562
|
+
DataTable.prototype._segmentDefaultCollapsing = false;
|
14526
14563
|
|
14527
14564
|
|
14528
14565
|
/** @typedef {Function} DataTable~SortLogic
|
@@ -15435,6 +15472,15 @@ DataTable.prototype.isFrozen = function() {
|
|
15435
15472
|
return this._frozen;
|
15436
15473
|
};
|
15437
15474
|
|
15475
|
+
/** @private
|
15476
|
+
*/
|
15477
|
+
DataTable.prototype._initSegmentCollection = function() {
|
15478
|
+
if (!this._segments) {
|
15479
|
+
this._segments = new data_SegmentCollection();
|
15480
|
+
this._segments.setDefaultCollapsing(this._segmentDefaultCollapsing);
|
15481
|
+
this._segments.addEventListener("subSegmentChanged", this._onSubSegmentChanged);
|
15482
|
+
}
|
15483
|
+
};
|
15438
15484
|
/**
|
15439
15485
|
* @public
|
15440
15486
|
* @param {Array.<string>} rids
|
@@ -15449,10 +15495,7 @@ DataTable.prototype.setSegmentSeparators = function(rids, enabled) {
|
|
15449
15495
|
for (let i = 0; i < len; i++) {
|
15450
15496
|
if(enabled !== false) {
|
15451
15497
|
let rid = rids[i];
|
15452
|
-
|
15453
|
-
this._segments = new data_SegmentCollection();
|
15454
|
-
this._segments.addEventListener("subSegmentChanged", this._onSubSegmentChanged);
|
15455
|
-
}
|
15498
|
+
this._initSegmentCollection();
|
15456
15499
|
if(this._autoSegmentFilling) {
|
15457
15500
|
let parentId = this._segments.getParentRowId(rid);
|
15458
15501
|
if(parentId) {
|
@@ -15496,10 +15539,7 @@ DataTable.prototype.setSegmentSeparator = function(rid, enabled) {
|
|
15496
15539
|
let memberCount = 0;
|
15497
15540
|
if(rid && typeof rid === "string") {
|
15498
15541
|
if(enabled !== false) {
|
15499
|
-
|
15500
|
-
this._segments = new data_SegmentCollection();
|
15501
|
-
this._segments.addEventListener("subSegmentChanged", this._onSubSegmentChanged);
|
15502
|
-
}
|
15542
|
+
this._initSegmentCollection();
|
15503
15543
|
if(this._autoSegmentFilling) {
|
15504
15544
|
let parentId = this._segments.getParentRowId(rid);
|
15505
15545
|
if(parentId) {
|
@@ -15563,6 +15603,13 @@ DataTable.prototype.hasSegmentation = function() {
|
|
15563
15603
|
};
|
15564
15604
|
/**
|
15565
15605
|
* @public
|
15606
|
+
* @return {boolean}
|
15607
|
+
*/
|
15608
|
+
DataTable.prototype.hasSegmentClassification = function() {
|
15609
|
+
return this._segments ? this._segments.hasClassification() : false;
|
15610
|
+
};
|
15611
|
+
/**
|
15612
|
+
* @public
|
15566
15613
|
* @param {string} rid
|
15567
15614
|
* @return {boolean}
|
15568
15615
|
*/
|
@@ -16059,6 +16106,22 @@ DataTable.prototype._onSubSegmentChanged = function(e) {
|
|
16059
16106
|
}
|
16060
16107
|
};
|
16061
16108
|
|
16109
|
+
/**
|
16110
|
+
* @public
|
16111
|
+
* @param {boolean} bool
|
16112
|
+
* @return {boolean}
|
16113
|
+
*/
|
16114
|
+
DataTable.prototype.setSegmentDefaultCollapsing = function(bool) {
|
16115
|
+
if(this._segmentDefaultCollapsing !== bool) {
|
16116
|
+
this._segmentDefaultCollapsing = bool;
|
16117
|
+
if(this._segments) {
|
16118
|
+
this._segments.setDefaultCollapsing(bool);
|
16119
|
+
}
|
16120
|
+
return true;
|
16121
|
+
}
|
16122
|
+
return false;
|
16123
|
+
};
|
16124
|
+
|
16062
16125
|
|
16063
16126
|
/**
|
16064
16127
|
* @public
|
@@ -21291,6 +21354,14 @@ DataView.prototype.enableSeparatorFiltering = function (enabled) {
|
|
21291
21354
|
DataView.prototype.setSegmentClassification = function(segmentRef, fields) {
|
21292
21355
|
return this._dt.setSegmentClassification(this._toRowId(segmentRef), fields);
|
21293
21356
|
};
|
21357
|
+
/**
|
21358
|
+
* @public
|
21359
|
+
* @param {boolean} bool
|
21360
|
+
* @return {boolean}
|
21361
|
+
*/
|
21362
|
+
DataView.prototype.setSegmentDefaultCollapsing = function(bool) {
|
21363
|
+
return this._dt.setSegmentDefaultCollapsing(bool);
|
21364
|
+
};
|
21294
21365
|
|
21295
21366
|
/** @public
|
21296
21367
|
* @ignore
|
@@ -25897,7 +25968,7 @@ Core_Core.prototype._hasPendingRowChange = false;
|
|
25897
25968
|
* @return {string}
|
25898
25969
|
*/
|
25899
25970
|
Core_Core.getVersion = function () {
|
25900
|
-
return "5.1.
|
25971
|
+
return "5.1.135";
|
25901
25972
|
};
|
25902
25973
|
/** {@link ElementWrapper#dispose}
|
25903
25974
|
* @override
|