@refinitiv-ui/efx-grid 6.0.90 → 6.0.91
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 +40 -8
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataTable.d.ts +2 -0
- package/lib/core/es6/data/DataTable.js +12 -1
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +10 -2
- package/lib/core/es6/data/Segment.js +6 -4
- package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
- package/lib/core/es6/data/SegmentCollection.js +11 -0
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/grid/index.js +1 -1
- package/package.json +1 -1
@@ -1037,7 +1037,7 @@ DataTable.prototype.isSegmentSeparator = function(rid) {
|
|
1037
1037
|
/** Get Segment object
|
1038
1038
|
* @public
|
1039
1039
|
* @param {string} rid Row id
|
1040
|
-
* @return {Segment}
|
1040
|
+
* @return {Segment} Returns null if a segment cannot be found
|
1041
1041
|
*/
|
1042
1042
|
DataTable.prototype.getSegment = function(rid) {
|
1043
1043
|
if(this._segments) {
|
@@ -1045,6 +1045,17 @@ DataTable.prototype.getSegment = function(rid) {
|
|
1045
1045
|
}
|
1046
1046
|
return null;
|
1047
1047
|
};
|
1048
|
+
/**
|
1049
|
+
* @public
|
1050
|
+
* @param {string} rid Row id of a segment child
|
1051
|
+
* @return {string} Returns null if a segment cannot be found
|
1052
|
+
*/
|
1053
|
+
DataTable.prototype.getSegmentParent = function(rid) {
|
1054
|
+
if(this._segments) {
|
1055
|
+
return this._segments.getSegmentParent(rid);
|
1056
|
+
}
|
1057
|
+
return null;
|
1058
|
+
};
|
1048
1059
|
/** Segment level starts from 1
|
1049
1060
|
* @public
|
1050
1061
|
* @param {string} rid
|
@@ -254,6 +254,8 @@ declare class DataView extends EventDispatcher {
|
|
254
254
|
|
255
255
|
public getSegment(rid: string): Segment|null;
|
256
256
|
|
257
|
+
public getSegmentParent(rid: string): string;
|
258
|
+
|
257
259
|
public getSegmentLevel(rid: string): number;
|
258
260
|
|
259
261
|
public getSegmentParentRowId(rid: string): string;
|
@@ -2453,12 +2453,20 @@ DataView.prototype.isSegmentSeparator = function(rid) {
|
|
2453
2453
|
|
2454
2454
|
/** Get Segment object
|
2455
2455
|
* @public
|
2456
|
-
* @param {string} rid Row id
|
2457
|
-
* @return {Segment}
|
2456
|
+
* @param {string} rid Row id of a segment
|
2457
|
+
* @return {Segment} Returns null if a segment cannot be found
|
2458
2458
|
*/
|
2459
2459
|
DataView.prototype.getSegment = function(rid) {
|
2460
2460
|
return this._dt.getSegment(rid);
|
2461
2461
|
};
|
2462
|
+
/**
|
2463
|
+
* @public
|
2464
|
+
* @param {string} rid Row id of a segment child
|
2465
|
+
* @return {string} Returns null if a segment cannot be found
|
2466
|
+
*/
|
2467
|
+
DataView.prototype.getSegmentParent = function(rid) {
|
2468
|
+
return this._dt.getSegmentParent(rid);
|
2469
|
+
};
|
2462
2470
|
/** Segment level starts from 1
|
2463
2471
|
* @public
|
2464
2472
|
* @param {string} rid Row id
|
@@ -176,10 +176,12 @@ Segment.prototype.getSubSegmentIds = function(out_ary) {
|
|
176
176
|
Segment.prototype.addChild = function(rid, dataId) {
|
177
177
|
if(rid) {
|
178
178
|
this._shared.childToSegment[rid] = this._rid;
|
179
|
-
if(this.
|
180
|
-
this.
|
181
|
-
}
|
182
|
-
|
179
|
+
if(this._children[rid]) {
|
180
|
+
this._children[rid] = dataId || rid; // Update data id
|
181
|
+
} else {
|
182
|
+
if(this._collapsed) {
|
183
|
+
this._shared.dirtyCollapsingState = true; // TODO: Check if we need to update this only when new child is added
|
184
|
+
}
|
183
185
|
this._children[rid] = dataId || rid;
|
184
186
|
++this._childCount;
|
185
187
|
return true;
|
@@ -24,6 +24,8 @@ declare class SegmentCollection extends EventDispatcher {
|
|
24
24
|
|
25
25
|
public getSegment(rid: string): Segment|null;
|
26
26
|
|
27
|
+
public getSegmentParent(rid: string): Segment|null;
|
28
|
+
|
27
29
|
public getSegments(): { [key: string]: Segment }|null;
|
28
30
|
|
29
31
|
public getSegmentIds(): (string)[];
|
@@ -184,6 +184,17 @@ SegmentCollection.prototype.getSegment = function(rid) {
|
|
184
184
|
return this._segments[rid] || null;
|
185
185
|
};
|
186
186
|
/** @public
|
187
|
+
* @param {string} rid
|
188
|
+
* @return {Segment}
|
189
|
+
*/
|
190
|
+
SegmentCollection.prototype.getSegmentParent = function(rid) {
|
191
|
+
var parentRowId = this.getParentRowId(rid);
|
192
|
+
if(parentRowId) {
|
193
|
+
return this.getSegment(parentRowId);
|
194
|
+
}
|
195
|
+
return null;
|
196
|
+
};
|
197
|
+
/** @public
|
187
198
|
* @return {Object.<string, Segment>}
|
188
199
|
*/
|
189
200
|
SegmentCollection.prototype.getSegments = function() {
|
package/lib/grid/index.js
CHANGED
package/package.json
CHANGED