@refinitiv-ui/efx-grid 6.0.120 → 6.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +7 -4
- package/lib/core/dist/core.js +8 -5
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +3 -3
- package/lib/core/es6/grid/components/HScrollbar.d.ts +1 -1
- package/lib/core/es6/grid/components/HScrollbar.js +5 -2
- package/lib/filter-dialog/themes/base.less +8 -3
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +30 -17
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +2 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +28 -17
- package/lib/tr-grid-checkbox/es6/Checkbox.js +4 -0
- package/lib/tr-grid-filter-input/es6/FilterInput.js +1 -0
- package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +1 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/versions.json +4 -4
- package/package.json +1 -1
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -4112,6 +4112,8 @@ Grid.prototype._logData = function(rowDefs, options) {
|
|
4112
4112
|
|
4113
4113
|
/** @public
|
4114
4114
|
* @description Replace existing row by a new row. Row Id is always changed, after the row is replaced.
|
4115
|
+
* If the rowId of the new row is identical to that of the replacing row. Grid will do nothing because
|
4116
|
+
* similar rowIds indicate that they are the same row.
|
4115
4117
|
* @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
|
4116
4118
|
* @param {(RowDefinition~Options|string)=} rowOption
|
4117
4119
|
* @returns {RowDefinition} Returns null, if the row is not replaced. Otherwise, a newly created row is returned
|
@@ -108,7 +108,7 @@ declare class RowDefinition {
|
|
108
108
|
|
109
109
|
public resetUpdates(): void;
|
110
110
|
|
111
|
-
public registerToView(view: DataView|null,
|
111
|
+
public registerToView(view: DataView|null, destRowId?: string|null): void;
|
112
112
|
|
113
113
|
public static deregisterFromView(rowIds: (string)[]|null, rowDef: RowDefinition|null): (string)[]|null;
|
114
114
|
|
@@ -17,7 +17,7 @@ import { DataTable } from "../../core/es6/data/DataTable.js";
|
|
17
17
|
* @property {boolean=} hidden=true When this row is hidden
|
18
18
|
* @property {boolean=} realTime=true Realtime row, able to request for JET/RTK
|
19
19
|
* @property {Object=} info=null For storing any additional information to the row
|
20
|
-
* @property {string=} rowId Row identifier used for referencing the row
|
20
|
+
* @property {string=} rowId Row identifier used for referencing the row. The value cannot be in "_x_" format.
|
21
21
|
*/
|
22
22
|
|
23
23
|
/** @typedef {Object} RowDefinition~RowTypes
|
@@ -48,6 +48,12 @@ const ROW_TYPES = {
|
|
48
48
|
GROUP_MEMBER: "GROUP_MEMBER"
|
49
49
|
};
|
50
50
|
|
51
|
+
/** @type {RegExp}
|
52
|
+
* @private
|
53
|
+
* @const
|
54
|
+
*/
|
55
|
+
const ROW_ID_PATTERN = /^_[^_]+_$/;
|
56
|
+
|
51
57
|
/** @constructor
|
52
58
|
* @param {RowDefinition~Options=} rowOptions
|
53
59
|
*/
|
@@ -236,8 +242,12 @@ RowDefinition.prototype.initialize = function(rowOptions) {
|
|
236
242
|
if(!this._autoGenerated) {
|
237
243
|
let userRowId = rowOptions["rowId"];
|
238
244
|
if(userRowId && typeof userRowId === "string") {
|
239
|
-
|
240
|
-
|
245
|
+
if(userRowId.match(ROW_ID_PATTERN)) {
|
246
|
+
console.warn("Please change the rowId format to avoid duplicated rows' id causing unexpected behavior.");
|
247
|
+
} else {
|
248
|
+
this._rowId = this._dataId = userRowId;
|
249
|
+
this._userId = true;
|
250
|
+
}
|
241
251
|
}
|
242
252
|
}
|
243
253
|
|
@@ -991,14 +1001,20 @@ RowDefinition.prototype.resetUpdates = function() {
|
|
991
1001
|
|
992
1002
|
/** @public
|
993
1003
|
* @param {DataView} view
|
994
|
-
* @param {string=}
|
1004
|
+
* @param {string=} destRowId Destination position where the row will be placed BEFORE the specified position.
|
995
1005
|
*/
|
996
|
-
RowDefinition.prototype.registerToView = function(view,
|
1006
|
+
RowDefinition.prototype.registerToView = function(view, destRowId) {
|
997
1007
|
if(!view || this._view === view) {
|
998
1008
|
return; // Already in the view
|
999
1009
|
}
|
1000
1010
|
this._view = view;
|
1001
1011
|
|
1012
|
+
let rowId = this.getRowId();
|
1013
|
+
if(view.getRowData(rowId)) {
|
1014
|
+
console.warn("Duplicated rows' id.");
|
1015
|
+
return;
|
1016
|
+
}
|
1017
|
+
|
1002
1018
|
let rowData = null;
|
1003
1019
|
if(this._subSegment) {
|
1004
1020
|
rowData = this._view.getRowData(this.getRowId());
|
@@ -1013,32 +1029,27 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
|
|
1013
1029
|
|
1014
1030
|
let parentRowId = "";
|
1015
1031
|
let isSegment = this._isChain || this._asSegment;
|
1016
|
-
if(
|
1017
|
-
parentRowId = view.getSegmentParentRowId(
|
1032
|
+
if(destRowId) {
|
1033
|
+
parentRowId = view.getSegmentParentRowId(destRowId);
|
1018
1034
|
if(parentRowId) {
|
1019
1035
|
if(isSegment) { // A chain or a segment cannot be put inside another segment
|
1020
|
-
|
1036
|
+
destRowId = _getEndOfSegmentRowId(view, destRowId);
|
1021
1037
|
} // else { // Normal row is inserted into a segment
|
1022
1038
|
}
|
1023
1039
|
}
|
1024
1040
|
|
1025
1041
|
let stalledSorting = _stallSorting(view, isSegment, false);
|
1026
|
-
|
1027
|
-
let newRowId = view.insertRow(rowId, rowData, this.getRowId());
|
1028
|
-
if(newRowId !== this._rowId) {
|
1029
|
-
this._rowId = newRowId; // In case there is some duplicate row id
|
1030
|
-
this._userId = false;
|
1031
|
-
}
|
1042
|
+
view.insertRow(destRowId, rowData, rowId);
|
1032
1043
|
|
1033
1044
|
if(isSegment) {
|
1034
|
-
view.setSegmentSeparator(
|
1045
|
+
view.setSegmentSeparator(rowId);
|
1035
1046
|
_stallSorting(view, false, stalledSorting);
|
1036
1047
|
if(this._collapsed != null) {
|
1037
|
-
view.collapseSegment(
|
1048
|
+
view.collapseSegment(rowId, this._collapsed);
|
1038
1049
|
this._collapsed = null;
|
1039
1050
|
}
|
1040
1051
|
} else if(!this._parent && parentRowId) { // Constituent cannot be added to another segment
|
1041
|
-
view.addSegmentChild(parentRowId,
|
1052
|
+
view.addSegmentChild(parentRowId, rowId, this._dataId);
|
1042
1053
|
}
|
1043
1054
|
};
|
1044
1055
|
/** @private
|
@@ -710,6 +710,9 @@ CheckboxPlugin.prototype._createCheckbox = function (sectionSettings, colIndex,
|
|
710
710
|
|
711
711
|
cell.setContent(chkbox);
|
712
712
|
let sectionType = sectionSettings.getType();
|
713
|
+
if(sectionType === "title") {
|
714
|
+
chkbox.setAttribute("aria-label", "all rows");
|
715
|
+
}
|
713
716
|
|
714
717
|
if(!this._coralCheckboxVer) { // Workaround for UIFR theme styling
|
715
718
|
let lbl = document.createElement("label");
|
@@ -1658,6 +1661,7 @@ CheckboxPlugin.prototype._onPostSectionDataBinding = function (e) {
|
|
1658
1661
|
if(!chkbox) {
|
1659
1662
|
chkbox = checkboxes[i] = this._createCheckbox(sectionSettings, this._displayColumn, rowIndex);
|
1660
1663
|
}
|
1664
|
+
chkbox.setAttribute("aria-label", "row " + rowIndex);
|
1661
1665
|
let rowId = dv.getRowId(rowIndex); // Slow
|
1662
1666
|
rowData = this._getRowFromId(dv, rowId);
|
1663
1667
|
if(hasBinding && chkbox) {
|
@@ -532,6 +532,7 @@ FilterInputPlugin.prototype._createFilterUI = function (colOpt) {
|
|
532
532
|
elem.className = "filter-input";
|
533
533
|
elem.style.width = "100%";
|
534
534
|
elem.style.margin = "0";
|
535
|
+
elem.setAttribute("aria-label", "column filtering");
|
535
536
|
var placeholder = colOpt["placeholder"];
|
536
537
|
|
537
538
|
if (placeholder) {
|
@@ -108,7 +108,7 @@ declare class RowDefinition {
|
|
108
108
|
|
109
109
|
public resetUpdates(): void;
|
110
110
|
|
111
|
-
public registerToView(view: DataView|null,
|
111
|
+
public registerToView(view: DataView|null, destRowId?: string|null): void;
|
112
112
|
|
113
113
|
public static deregisterFromView(rowIds: (string)[]|null, rowDef: RowDefinition|null): (string)[]|null;
|
114
114
|
|
package/lib/utils/index.d.ts
CHANGED
@@ -4,4 +4,4 @@ import { MultiTableManager } from "../tr-grid-util/es6/MultiTableManager.js";
|
|
4
4
|
import { FilterOperators, OperatorFunctions } from "../tr-grid-util/es6/FilterOperators.js";
|
5
5
|
import { DataGenerator } from "../tr-grid-util/es6/jet/DataGenerator.js";
|
6
6
|
import { MockRTK } from "../tr-grid-util/es6/jet/MockRTK.js";
|
7
|
-
export { GridPrinter, Table, MultiTableManager,
|
7
|
+
export { GridPrinter, Table, MultiTableManager, FilterOperators, OperatorFunctions, DataGenerator, MockRTK };
|
package/lib/utils/index.js
CHANGED
@@ -4,4 +4,4 @@ import { MultiTableManager } from "../tr-grid-util/es6/MultiTableManager.js";
|
|
4
4
|
import { FilterOperators, OperatorFunctions } from "../tr-grid-util/es6/FilterOperators.js";
|
5
5
|
import { DataGenerator } from "../tr-grid-util/es6/jet/DataGenerator.js";
|
6
6
|
import { MockRTK } from "../tr-grid-util/es6/jet/MockRTK.js";
|
7
|
-
export { GridPrinter, Table, MultiTableManager,
|
7
|
+
export { GridPrinter, Table, MultiTableManager, FilterOperators, OperatorFunctions, DataGenerator, MockRTK };
|
package/lib/versions.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"tr-grid-util": "1.3.157",
|
3
3
|
"tr-grid-printer": "1.0.18",
|
4
|
-
"@grid/column-dragging": "1.0.
|
4
|
+
"@grid/column-dragging": "1.0.21",
|
5
5
|
"@grid/row-segmenting": "1.0.33",
|
6
6
|
"@grid/statistics-row": "1.0.17",
|
7
7
|
"@grid/zoom": "1.0.11",
|
8
8
|
"tr-grid-auto-tooltip": "1.1.8",
|
9
9
|
"tr-grid-cell-selection": "1.0.38",
|
10
|
-
"tr-grid-checkbox": "1.0.
|
10
|
+
"tr-grid-checkbox": "1.0.69",
|
11
11
|
"tr-grid-column-fitter": "1.0.41",
|
12
12
|
"tr-grid-column-formatting": "0.9.36",
|
13
13
|
"tr-grid-column-grouping": "1.0.63",
|
@@ -17,7 +17,7 @@
|
|
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
|
-
"tr-grid-filter-input": "0.9.
|
20
|
+
"tr-grid-filter-input": "0.9.42",
|
21
21
|
"tr-grid-heat-map": "1.0.29",
|
22
22
|
"tr-grid-in-cell-editing": "1.0.90",
|
23
23
|
"tr-grid-pagination": "1.0.24",
|
@@ -32,6 +32,6 @@
|
|
32
32
|
"tr-grid-titlewrap": "1.0.22",
|
33
33
|
"@grid/formatters": "1.0.55",
|
34
34
|
"@grid/column-selection-dialog": "4.0.57",
|
35
|
-
"@grid/filter-dialog": "4.0.
|
35
|
+
"@grid/filter-dialog": "4.0.70",
|
36
36
|
"@grid/column-format-dialog": "4.0.45"
|
37
37
|
}
|
package/package.json
CHANGED