@refinitiv-ui/efx-grid 6.0.118 → 6.0.119
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +1 -1
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +82 -22
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +39 -2
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -0
- package/lib/rt-grid/es6/RowDefinition.js +29 -19
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +2 -1
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +2 -2
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +11 -6
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +13 -0
- package/lib/types/es6/AutoTooltip.d.ts +1 -0
- package/lib/types/es6/InCellEditing.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -0
- package/lib/versions.json +3 -3
- package/package.json +1 -1
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -2290,9 +2290,46 @@ Grid.prototype.setColumnSorter = function(colRef, func) {
|
|
2290
2290
|
* @param {!RowDefinition} rowDef
|
2291
2291
|
*/
|
2292
2292
|
Grid.prototype._initDuplicateRicData = function(rowDef) {
|
2293
|
+
if(!rowDef) {
|
2294
|
+
return;
|
2295
|
+
}
|
2293
2296
|
let rowDefs = this._connector.getRowDefByRic(rowDef.getSymbol());
|
2294
|
-
if(rowDefs) {
|
2295
|
-
|
2297
|
+
if(rowDefs && rowDefs.length > 0) { // Found at least 1 Duplicate chain/ric data
|
2298
|
+
let firstRowDef = rowDefs[0];
|
2299
|
+
rowDef.copyRowData(firstRowDef);
|
2300
|
+
if(rowDef.isChain()) {
|
2301
|
+
let children = firstRowDef.getChildren();
|
2302
|
+
if(children && children.length > 0) {
|
2303
|
+
setTimeout(this._cloneChain.bind(this, rowDef), 0); // Need to delay to wait row inserted
|
2304
|
+
}
|
2305
|
+
}
|
2306
|
+
}
|
2307
|
+
};
|
2308
|
+
|
2309
|
+
/** @private
|
2310
|
+
* @param {Object} rowDef
|
2311
|
+
* @param {Array<Object>} children
|
2312
|
+
*/
|
2313
|
+
Grid.prototype._cloneChain = function(rowDef) {
|
2314
|
+
let rowDefs = this._connector.getRowDefByRic(rowDef.getSymbol());
|
2315
|
+
let firstRowDef = rowDefs ? rowDefs[0] : null;
|
2316
|
+
let constituents = firstRowDef ? firstRowDef.getChildren() : null;
|
2317
|
+
|
2318
|
+
if(!constituents) {
|
2319
|
+
return;
|
2320
|
+
}
|
2321
|
+
let count = constituents.length;
|
2322
|
+
if(count < 0 ) {
|
2323
|
+
return;
|
2324
|
+
}
|
2325
|
+
|
2326
|
+
let subId = rowDef.getData(SUB_ID);
|
2327
|
+
for (let i = 0; i < count; i++) {
|
2328
|
+
let childRowDef = constituents[i];
|
2329
|
+
let rowData = childRowDef.cloneRowData();
|
2330
|
+
rowData["SUB_ID"] = subId;
|
2331
|
+
let rid = subId + rowData["RIC"];
|
2332
|
+
this._dc.setRowData(rid, rowData);
|
2296
2333
|
}
|
2297
2334
|
};
|
2298
2335
|
/** @public
|
@@ -64,6 +64,8 @@ declare class RowDefinition {
|
|
64
64
|
|
65
65
|
public copyRowData(srcRowDef: RowDefinition|null): void;
|
66
66
|
|
67
|
+
public cloneRowData(obj?: any, exceptionObj?: any): any;
|
68
|
+
|
67
69
|
public setRowData(data: { [key: string]: any }): void;
|
68
70
|
|
69
71
|
public setData(field: string, value: any): void;
|
@@ -704,28 +704,38 @@ RowDefinition.prototype.updateRowData = function(data, indexToFieldMap) {
|
|
704
704
|
*/
|
705
705
|
RowDefinition.prototype.copyRowData = function(srcRowDef) {
|
706
706
|
if(srcRowDef && srcRowDef !== this) {
|
707
|
-
let field;
|
708
|
-
let uncopiable_fields = {
|
709
|
-
"ROW_DEF": 1,
|
710
|
-
"SUB_ID": 1
|
711
|
-
};
|
712
|
-
let staticValues = this._staticValues;
|
713
|
-
for(field in staticValues) {
|
714
|
-
uncopiable_fields[field] = 1;
|
715
|
-
}
|
716
|
-
staticValues = srcRowDef._staticValues;
|
717
|
-
for(field in staticValues) {
|
718
|
-
uncopiable_fields[field] = 1;
|
719
|
-
}
|
720
|
-
|
721
|
-
let srcRowData = srcRowDef.getRowData();
|
722
707
|
let rowData = this.getRowData();
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
708
|
+
srcRowDef.cloneRowData(rowData, this._staticValues);
|
709
|
+
}
|
710
|
+
};
|
711
|
+
/** @public
|
712
|
+
* @param {Object=} obj
|
713
|
+
* @param {Object=} exceptionObj
|
714
|
+
* @return {!Object}
|
715
|
+
*/
|
716
|
+
RowDefinition.prototype.cloneRowData = function(obj, exceptionObj) {
|
717
|
+
let rowObj = obj || {};
|
718
|
+
let field;
|
719
|
+
let uncopiable_fields = {
|
720
|
+
"ROW_DEF": 1,
|
721
|
+
"SUB_ID": 1
|
722
|
+
};
|
723
|
+
let staticValues = this._staticValues;
|
724
|
+
for(field in staticValues) {
|
725
|
+
uncopiable_fields[field] = 1;
|
726
|
+
}
|
727
|
+
|
728
|
+
for(field in exceptionObj) {
|
729
|
+
uncopiable_fields[field] = 1;
|
730
|
+
}
|
731
|
+
|
732
|
+
let rowData = this.getRowData();
|
733
|
+
for(field in rowData) {
|
734
|
+
if(!uncopiable_fields[field]) {
|
735
|
+
rowObj[field] = rowData[field];
|
727
736
|
}
|
728
737
|
}
|
738
|
+
return rowObj;
|
729
739
|
};
|
730
740
|
/** @public
|
731
741
|
* @param {Object.<string, *>} data
|
@@ -297,7 +297,8 @@ ColumnStackPlugin._styles = prettifyCss([
|
|
297
297
|
"cursor: pointer;" // change the mouse cursor on the collapsed stack icon to allow for expansion but disallow sorting
|
298
298
|
],
|
299
299
|
".tr-grid .collapsed .cell.grouping .floating-panel .stack-icon", [
|
300
|
-
"margin-left: 0;"
|
300
|
+
"margin-left: 0;",
|
301
|
+
"margin-right: 0;"
|
301
302
|
],
|
302
303
|
".stack-icon", [
|
303
304
|
"color: var(--grid-title-filter-icon-color);"
|
@@ -106,9 +106,9 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
106
106
|
|
107
107
|
public isColumnEditable(colIndex: number): boolean;
|
108
108
|
|
109
|
-
public enableReadonly(
|
109
|
+
public enableReadonly(enabled?: boolean|null): void;
|
110
110
|
|
111
|
-
public disableReadonly(
|
111
|
+
public disableReadonly(disabled?: boolean|null): void;
|
112
112
|
|
113
113
|
public openRowEditor(rowIndex: number, grid?: any): void;
|
114
114
|
|
@@ -1387,17 +1387,22 @@ InCellEditingPlugin.prototype.isColumnEditable = function (colIndex) {
|
|
1387
1387
|
|
1388
1388
|
/**
|
1389
1389
|
* @public
|
1390
|
-
* @param {boolean}
|
1390
|
+
* @param {boolean=} enabled
|
1391
1391
|
*/
|
1392
|
-
InCellEditingPlugin.prototype.enableReadonly = function (
|
1393
|
-
this._readonly =
|
1392
|
+
InCellEditingPlugin.prototype.enableReadonly = function (enabled) {
|
1393
|
+
this._readonly = enabled !== false;
|
1394
|
+
if(this._readonly) {
|
1395
|
+
this._updateStaterText(false);
|
1396
|
+
} else {
|
1397
|
+
this._updateStaterText();
|
1398
|
+
}
|
1394
1399
|
};
|
1395
1400
|
/**
|
1396
1401
|
* @public
|
1397
|
-
* @param {boolean}
|
1402
|
+
* @param {boolean=} disabled
|
1398
1403
|
*/
|
1399
|
-
InCellEditingPlugin.prototype.disableReadonly = function () {
|
1400
|
-
this.enableReadonly(false);
|
1404
|
+
InCellEditingPlugin.prototype.disableReadonly = function (disabled) {
|
1405
|
+
this.enableReadonly(disabled === false);
|
1401
1406
|
};
|
1402
1407
|
/** @public
|
1403
1408
|
* @description Supply an keyboard input. This is for testing purpose.
|
@@ -151,6 +151,10 @@ MockSubscriptions.prototype._maxInterval = 850;
|
|
151
151
|
* @type {number}
|
152
152
|
*/
|
153
153
|
MockSubscriptions.prototype._percentageDataUpdate = 0.1; // 10% by default
|
154
|
+
/** @private
|
155
|
+
* @type {boolean}
|
156
|
+
*/
|
157
|
+
MockSubscriptions.prototype._constituentCache = false;
|
154
158
|
|
155
159
|
/** @public
|
156
160
|
* @param {Object=} options
|
@@ -179,6 +183,12 @@ MockSubscriptions.prototype.config = function(options) {
|
|
179
183
|
if(typeof num === "number") {
|
180
184
|
this._percentageDataUpdate = num / 100;
|
181
185
|
}
|
186
|
+
|
187
|
+
let value = options.constituentCache;
|
188
|
+
if(value != null) {
|
189
|
+
this._constituentCache = value;
|
190
|
+
}
|
191
|
+
|
182
192
|
};
|
183
193
|
/** @public
|
184
194
|
* @param {number=} min
|
@@ -706,6 +716,9 @@ MockSubscriptions.prototype._updateDuplicateSymbol = function(ric) {
|
|
706
716
|
if(!isChain) {
|
707
717
|
return;
|
708
718
|
}
|
719
|
+
if(!this._constituentCache) {
|
720
|
+
return;
|
721
|
+
}
|
709
722
|
let ricList = firstSub["ricList"];
|
710
723
|
if(!ricList) {
|
711
724
|
return;
|
@@ -106,9 +106,9 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
106
106
|
|
107
107
|
public isColumnEditable(colIndex: number): boolean;
|
108
108
|
|
109
|
-
public enableReadonly(
|
109
|
+
public enableReadonly(enabled?: boolean|null): void;
|
110
110
|
|
111
|
-
public disableReadonly(
|
111
|
+
public disableReadonly(disabled?: boolean|null): void;
|
112
112
|
|
113
113
|
public openRowEditor(rowIndex: number, grid?: any): void;
|
114
114
|
|
@@ -64,6 +64,8 @@ declare class RowDefinition {
|
|
64
64
|
|
65
65
|
public copyRowData(srcRowDef: RowDefinition|null): void;
|
66
66
|
|
67
|
+
public cloneRowData(obj?: any, exceptionObj?: any): any;
|
68
|
+
|
67
69
|
public setRowData(data: { [key: string]: any }): void;
|
68
70
|
|
69
71
|
public setData(field: string, value: any): void;
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.157",
|
3
3
|
"tr-grid-printer": "1.0.18",
|
4
4
|
"@grid/column-dragging": "1.0.20",
|
5
5
|
"@grid/row-segmenting": "1.0.33",
|
@@ -13,13 +13,13 @@
|
|
13
13
|
"tr-grid-column-grouping": "1.0.62",
|
14
14
|
"tr-grid-column-resizing": "1.0.29",
|
15
15
|
"tr-grid-column-selection": "1.0.33",
|
16
|
-
"tr-grid-column-stack": "1.0.
|
16
|
+
"tr-grid-column-stack": "1.0.76",
|
17
17
|
"tr-grid-conditional-coloring": "1.0.70",
|
18
18
|
"tr-grid-content-wrap": "1.0.20",
|
19
19
|
"tr-grid-contextmenu": "1.0.44",
|
20
20
|
"tr-grid-filter-input": "0.9.41",
|
21
21
|
"tr-grid-heat-map": "1.0.29",
|
22
|
-
"tr-grid-in-cell-editing": "1.0.
|
22
|
+
"tr-grid-in-cell-editing": "1.0.90",
|
23
23
|
"tr-grid-pagination": "1.0.24",
|
24
24
|
"tr-grid-percent-bar": "1.0.24",
|
25
25
|
"tr-grid-range-bar": "2.0.8",
|
package/package.json
CHANGED