@refinitiv-ui/efx-grid 6.0.20 → 6.0.22
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.js +46 -24
- package/lib/core/dist/core.js +61 -14
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +11 -1
- package/lib/core/es6/grid/LayoutGrid.js +1 -0
- package/lib/core/es6/grid/components/CellSpans.d.ts +2 -0
- package/lib/core/es6/grid/components/CellSpans.js +35 -10
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +2 -0
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +14 -3
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +362 -41
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.d.ts +10 -1
- package/lib/rt-grid/es6/Grid.js +196 -17
- package/lib/rt-grid/es6/ReferenceCounter.js +13 -2
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -0
- package/lib/rt-grid/es6/RowDefinition.js +74 -8
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +9 -5
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +365 -133
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +11 -37
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +15 -15
- package/lib/tr-grid-row-selection/es6/RowSelection.js +9 -1
- package/lib/types/es6/ColumnGrouping.d.ts +9 -5
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +10 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -0
- package/lib/types/es6/RowSelection.d.ts +15 -15
- package/lib/versions.json +4 -4
- package/package.json +6 -2
@@ -260,7 +260,6 @@ ColumnResizingPlugin.prototype.initialize = function (host, options) {
|
|
260
260
|
this.config(options);
|
261
261
|
ColumnResizingPlugin._applyStyles(host);
|
262
262
|
this._updateResizerCount(host);
|
263
|
-
this._updateResizeHitBoxPosition(host);
|
264
263
|
};
|
265
264
|
/** @public
|
266
265
|
* @param {Object} host core grid object
|
@@ -432,7 +431,7 @@ ColumnResizingPlugin.prototype.disableResizing = function(colIndex, opt_disabled
|
|
432
431
|
colData["noResizing"] = opt_disabled !== false;
|
433
432
|
|
434
433
|
for(var i = this._hosts.length; --i >= 0;) {
|
435
|
-
this.
|
434
|
+
this._updateResizerCount(this._hosts[i]);
|
436
435
|
}
|
437
436
|
};
|
438
437
|
|
@@ -603,7 +602,6 @@ ColumnResizingPlugin.prototype._updateResizers = function () {
|
|
603
602
|
for(var i = this._hosts.length; --i >= 0;) {
|
604
603
|
var host = this._hosts[i];
|
605
604
|
this._updateResizerCount(host);
|
606
|
-
this._updateResizeHitBoxPosition(host, 0);
|
607
605
|
}
|
608
606
|
}
|
609
607
|
};
|
@@ -881,7 +879,15 @@ ColumnResizingPlugin.prototype._updateResizerCount = function (host) {
|
|
881
879
|
boxes = col._resizers = [];
|
882
880
|
}
|
883
881
|
for (var j = 0; j < rowCount; j++) {
|
882
|
+
var disabled = false;
|
884
883
|
var cell = titleSect.getCell(c, j); // TODO: This can be optimized
|
884
|
+
var cellColSpan = titleSect.getCellColSpan(c, j);
|
885
|
+
if(cellColSpan){
|
886
|
+
var lastSpanCol = c + cellColSpan - 1;
|
887
|
+
disabled = this._getColumnOption(lastSpanCol, "noResizing");
|
888
|
+
} else {
|
889
|
+
disabled = this._getColumnOption(c, "noResizing");
|
890
|
+
}
|
885
891
|
var box = cell._resizer;
|
886
892
|
if (!box) {
|
887
893
|
box = this._newResizer();
|
@@ -890,6 +896,8 @@ ColumnResizingPlugin.prototype._updateResizerCount = function (host) {
|
|
890
896
|
cellElem.insertBefore(box, cellElem.firstChild);
|
891
897
|
boxes.push(box);
|
892
898
|
}
|
899
|
+
box._disabled = disabled; // disabled is an internal flag
|
900
|
+
box.style.display = (disabled) ? "none" : "";
|
893
901
|
}
|
894
902
|
}
|
895
903
|
}
|
@@ -913,40 +921,6 @@ ColumnResizingPlugin.prototype._newResizer = function (classStr) {
|
|
913
921
|
return box;
|
914
922
|
};
|
915
923
|
/** @private
|
916
|
-
* @param {Object} host core grid object
|
917
|
-
* @param {number=} from
|
918
|
-
*/
|
919
|
-
ColumnResizingPlugin.prototype._updateResizeHitBoxPosition = function (host, from) { // Slow
|
920
|
-
if(this._hbMode || this._disabled) {
|
921
|
-
return;
|
922
|
-
}
|
923
|
-
|
924
|
-
var titleSect = host.getSection("title");
|
925
|
-
if(!titleSect) {
|
926
|
-
return;
|
927
|
-
}
|
928
|
-
|
929
|
-
if(!from) {
|
930
|
-
from = 0;
|
931
|
-
}
|
932
|
-
|
933
|
-
var titleSects = host.getAllSections("title");
|
934
|
-
var colCount = host.getColumnCount();
|
935
|
-
for (var i = 0; i < titleSects.length; i++) {
|
936
|
-
titleSect = titleSects[i];
|
937
|
-
for (var c = from; c < colCount; ++c) {
|
938
|
-
var col = titleSect.getColumn(c);
|
939
|
-
var disabled = this._getColumnOption(c, "noResizing");
|
940
|
-
var boxes = col._resizers;
|
941
|
-
for (var j = 0; j < boxes.length; j++) {
|
942
|
-
var box = boxes[j];
|
943
|
-
box._disabled = disabled; // disabled is an internal flag
|
944
|
-
box.style.display = (disabled) ? "none" : "";
|
945
|
-
}
|
946
|
-
}
|
947
|
-
}
|
948
|
-
};
|
949
|
-
/** @private
|
950
924
|
* @param {Event} e
|
951
925
|
* @return {Object} host, core grid object
|
952
926
|
*/
|
@@ -9,20 +9,20 @@ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
9
9
|
declare namespace RowSelectionPlugin {
|
10
10
|
|
11
11
|
type Options = {
|
12
|
-
singleSelection?: boolean,
|
13
|
-
selectionChanged?: ((...params: any[]) => any),
|
14
|
-
beforeSelection?: ((...params: any[]) => any),
|
15
|
-
basedOnContent?: boolean,
|
16
|
-
selectionField?: string,
|
17
|
-
menuClicked?: ((...params: any[]) => any),
|
18
|
-
menuPosition?: string
|
12
|
+
singleSelection?: boolean|null,
|
13
|
+
selectionChanged?: ((...params: any[]) => any)|null,
|
14
|
+
beforeSelection?: ((...params: any[]) => any)|null,
|
15
|
+
basedOnContent?: boolean|null,
|
16
|
+
selectionField?: string|null,
|
17
|
+
menuClicked?: ((...params: any[]) => any)|null,
|
18
|
+
menuPosition?: string|null
|
19
19
|
};
|
20
20
|
|
21
21
|
}
|
22
22
|
|
23
23
|
declare class RowSelectionPlugin extends GridPlugin {
|
24
24
|
|
25
|
-
constructor(options?: RowSelectionPlugin.Options);
|
25
|
+
constructor(options?: RowSelectionPlugin.Options|null);
|
26
26
|
|
27
27
|
public getName(): string;
|
28
28
|
|
@@ -36,11 +36,11 @@ declare class RowSelectionPlugin extends GridPlugin {
|
|
36
36
|
|
37
37
|
public getConfigObject(gridOptions?: any): any;
|
38
38
|
|
39
|
-
public clearAllSelections(preserveAnchor?: boolean, activeGrid?: any): void;
|
39
|
+
public clearAllSelections(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
40
40
|
|
41
|
-
public clearSelectedRows(preserveAnchor?: boolean, activeGrid?: any): void;
|
41
|
+
public clearSelectedRows(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
42
42
|
|
43
|
-
public clearSelection(preserveAnchor?: boolean, activeGrid?: any): void;
|
43
|
+
public clearSelection(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
44
44
|
|
45
45
|
public getActiveGrid(): any;
|
46
46
|
|
@@ -56,19 +56,19 @@ declare class RowSelectionPlugin extends GridPlugin {
|
|
56
56
|
|
57
57
|
public getSelectedRowCount(sectRef?: any): number;
|
58
58
|
|
59
|
-
public setSelectedRow(rowIndex: number, opt_select?: boolean, sectRef?: any): void;
|
59
|
+
public setSelectedRow(rowIndex: number, opt_select?: boolean|null, sectRef?: any): void;
|
60
60
|
|
61
61
|
public selectSingleRow(rowIndex: number, sectRef?: any, activeGrid?: any): boolean;
|
62
62
|
|
63
63
|
public selectAllRows(activeGrid?: any): void;
|
64
64
|
|
65
|
-
public selectRowRange(rowIndex: number, length: number, sectRef?: any, opt_scrollToRow?: boolean): void;
|
65
|
+
public selectRowRange(rowIndex: number, length: number, sectRef?: any, opt_scrollToRow?: boolean|null): void;
|
66
66
|
|
67
|
-
public disable(disabled?: boolean): void;
|
67
|
+
public disable(disabled?: boolean|null): void;
|
68
68
|
|
69
69
|
public isEnabled(): boolean;
|
70
70
|
|
71
|
-
public disableMultiSelection(disabled?: boolean): void;
|
71
|
+
public disableMultiSelection(disabled?: boolean|null): void;
|
72
72
|
|
73
73
|
public getSelectedText(): string;
|
74
74
|
|
@@ -615,7 +615,15 @@ RowSelectionPlugin.prototype._onClick = function (e) {
|
|
615
615
|
this._dispatchSelectionChanged(e);
|
616
616
|
}
|
617
617
|
if(this._activeGrid != null){
|
618
|
-
|
618
|
+
var selectionText;
|
619
|
+
if(this._isIE) {
|
620
|
+
selectionText = document.selection.createRange().htmlText;
|
621
|
+
} else {
|
622
|
+
selectionText = window.getSelection().toString();
|
623
|
+
}
|
624
|
+
if(!selectionText) { // Doesn't select text, tried to focus
|
625
|
+
this._activeGrid.focus();
|
626
|
+
}
|
619
627
|
}
|
620
628
|
};
|
621
629
|
/** @private
|
@@ -38,19 +38,19 @@ declare class ColumnGroupingPlugin extends GridPlugin {
|
|
38
38
|
|
39
39
|
public addColumnToGroup(column: any, groupId: string, colIndex: number): void;
|
40
40
|
|
41
|
-
public addGroup(groupDef: ColumnGroupingPlugin.GroupDefinition|null):
|
41
|
+
public addGroup(groupDef: ColumnGroupingPlugin.GroupDefinition|null): string;
|
42
42
|
|
43
43
|
public addColumnGrouping(groupDef: ColumnGroupingPlugin.GroupDefinition|null): void;
|
44
44
|
|
45
|
-
public removeGroup(groupId: string):
|
45
|
+
public removeGroup(groupId: string): ColumnGroupingPlugin.GroupDefinition|null;
|
46
46
|
|
47
|
-
public
|
47
|
+
public getGroupDefinition(groupId: string): ColumnGroupingPlugin.GroupDefinition|null;
|
48
48
|
|
49
49
|
public getGroupDefinitions(): ColumnGroupingPlugin.GroupDefinitions;
|
50
50
|
|
51
|
-
public setGroupDefinition(groupId: string,
|
51
|
+
public setGroupDefinition(groupId: string, groupDef?: ColumnGroupingPlugin.GroupDefinition|null): string;
|
52
52
|
|
53
|
-
public
|
53
|
+
public setGroupDefinitions(groupDefs: ColumnGroupingPlugin.GroupDefinitions|null): void;
|
54
54
|
|
55
55
|
public setGroupChildren(groupId: string, newChildList: (string)[]|null): void;
|
56
56
|
|
@@ -70,6 +70,10 @@ declare class ColumnGroupingPlugin extends GridPlugin {
|
|
70
70
|
|
71
71
|
public setColumnParent(colRef: number|string|null, groupId: string): void;
|
72
72
|
|
73
|
+
public getValidDestinationIndex(id: string, destCol: number|string|null): number;
|
74
|
+
|
75
|
+
public moveGroup(id: string, destCol: number|string|null): void;
|
76
|
+
|
73
77
|
}
|
74
78
|
|
75
79
|
export default ColumnGroupingPlugin;
|
@@ -110,6 +110,8 @@ declare class SortableTitlePlugin extends EventDispatcher {
|
|
110
110
|
|
111
111
|
public disableTwoStateSorting(disabled?: boolean|null): void;
|
112
112
|
|
113
|
+
public freezeIndicator(bool?: boolean|null): void;
|
114
|
+
|
113
115
|
public disableSortSymbols(disabled?: boolean|null): void;
|
114
116
|
|
115
117
|
public disableDataSorting(disabled?: boolean|null): void;
|
@@ -82,7 +82,8 @@ declare namespace Grid {
|
|
82
82
|
scrollbarParent?: Element|null,
|
83
83
|
formulaEngine?: boolean|null,
|
84
84
|
adcPollingInterval?: number|null,
|
85
|
-
fieldCaching?: boolean|null
|
85
|
+
fieldCaching?: boolean|null,
|
86
|
+
childDataField?: string|null
|
86
87
|
};
|
87
88
|
|
88
89
|
type RowReference = number|string|RowDefinition|null;
|
@@ -145,6 +146,8 @@ declare class Grid extends EventDispatcher {
|
|
145
146
|
|
146
147
|
public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
|
147
148
|
|
149
|
+
public reorderColumns(colRefs: number|string|(number|string)[]|null, destCol: number|string|null): boolean;
|
150
|
+
|
148
151
|
public hideColumn(colRef: Grid.ColumnReference|null, hidden?: boolean|null): void;
|
149
152
|
|
150
153
|
public hideColumns(colRefs: (Grid.ColumnReference)[]|null, hidden?: boolean|null): void;
|
@@ -259,6 +262,12 @@ declare class Grid extends EventDispatcher {
|
|
259
262
|
|
260
263
|
public freezeColumn(colIndex?: number|null, pinnedRightColumns?: number|null): void;
|
261
264
|
|
265
|
+
public pinColumn(colRef: Grid.ColumnReference|(Grid.ColumnReference)[]|null): boolean;
|
266
|
+
|
267
|
+
public unpinColumn(colRef: Grid.ColumnReference|(Grid.ColumnReference)[]|null, dest?: Grid.ColumnReference|null): boolean;
|
268
|
+
|
269
|
+
public unpinAllColumns(): boolean;
|
270
|
+
|
262
271
|
public updateColumnTitle(): void;
|
263
272
|
|
264
273
|
public isSorting(): boolean;
|
@@ -45,6 +45,8 @@ declare class RowDefinition {
|
|
45
45
|
|
46
46
|
public setStaticRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
|
47
47
|
|
48
|
+
public _getStaticRowData(): { [key: string]: any };
|
49
|
+
|
48
50
|
public updateRowData(data: { [key: string]: any }|any[], opt_fields?: (string)[]|null): void;
|
49
51
|
|
50
52
|
public setStaticData(field: string, value: any): void;
|
@@ -9,20 +9,20 @@ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
9
9
|
declare namespace RowSelectionPlugin {
|
10
10
|
|
11
11
|
type Options = {
|
12
|
-
singleSelection?: boolean,
|
13
|
-
selectionChanged?: ((...params: any[]) => any),
|
14
|
-
beforeSelection?: ((...params: any[]) => any),
|
15
|
-
basedOnContent?: boolean,
|
16
|
-
selectionField?: string,
|
17
|
-
menuClicked?: ((...params: any[]) => any),
|
18
|
-
menuPosition?: string
|
12
|
+
singleSelection?: boolean|null,
|
13
|
+
selectionChanged?: ((...params: any[]) => any)|null,
|
14
|
+
beforeSelection?: ((...params: any[]) => any)|null,
|
15
|
+
basedOnContent?: boolean|null,
|
16
|
+
selectionField?: string|null,
|
17
|
+
menuClicked?: ((...params: any[]) => any)|null,
|
18
|
+
menuPosition?: string|null
|
19
19
|
};
|
20
20
|
|
21
21
|
}
|
22
22
|
|
23
23
|
declare class RowSelectionPlugin extends GridPlugin {
|
24
24
|
|
25
|
-
constructor(options?: RowSelectionPlugin.Options);
|
25
|
+
constructor(options?: RowSelectionPlugin.Options|null);
|
26
26
|
|
27
27
|
public getName(): string;
|
28
28
|
|
@@ -36,11 +36,11 @@ declare class RowSelectionPlugin extends GridPlugin {
|
|
36
36
|
|
37
37
|
public getConfigObject(gridOptions?: any): any;
|
38
38
|
|
39
|
-
public clearAllSelections(preserveAnchor?: boolean, activeGrid?: any): void;
|
39
|
+
public clearAllSelections(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
40
40
|
|
41
|
-
public clearSelectedRows(preserveAnchor?: boolean, activeGrid?: any): void;
|
41
|
+
public clearSelectedRows(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
42
42
|
|
43
|
-
public clearSelection(preserveAnchor?: boolean, activeGrid?: any): void;
|
43
|
+
public clearSelection(preserveAnchor?: boolean|null, activeGrid?: any): void;
|
44
44
|
|
45
45
|
public getActiveGrid(): any;
|
46
46
|
|
@@ -56,19 +56,19 @@ declare class RowSelectionPlugin extends GridPlugin {
|
|
56
56
|
|
57
57
|
public getSelectedRowCount(sectRef?: any): number;
|
58
58
|
|
59
|
-
public setSelectedRow(rowIndex: number, opt_select?: boolean, sectRef?: any): void;
|
59
|
+
public setSelectedRow(rowIndex: number, opt_select?: boolean|null, sectRef?: any): void;
|
60
60
|
|
61
61
|
public selectSingleRow(rowIndex: number, sectRef?: any, activeGrid?: any): boolean;
|
62
62
|
|
63
63
|
public selectAllRows(activeGrid?: any): void;
|
64
64
|
|
65
|
-
public selectRowRange(rowIndex: number, length: number, sectRef?: any, opt_scrollToRow?: boolean): void;
|
65
|
+
public selectRowRange(rowIndex: number, length: number, sectRef?: any, opt_scrollToRow?: boolean|null): void;
|
66
66
|
|
67
|
-
public disable(disabled?: boolean): void;
|
67
|
+
public disable(disabled?: boolean|null): void;
|
68
68
|
|
69
69
|
public isEnabled(): boolean;
|
70
70
|
|
71
|
-
public disableMultiSelection(disabled?: boolean): void;
|
71
|
+
public disableMultiSelection(disabled?: boolean|null): void;
|
72
72
|
|
73
73
|
public getSelectedText(): string;
|
74
74
|
|
package/lib/versions.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"tr-grid-util": "1.3.82",
|
3
|
-
"@grid/column-dragging": "1.0.
|
3
|
+
"@grid/column-dragging": "1.0.11",
|
4
4
|
"@grid/row-segmenting": "1.0.22",
|
5
5
|
"@grid/statistics-row": "1.0.13",
|
6
6
|
"@grid/zoom": "1.0.11",
|
@@ -9,8 +9,8 @@
|
|
9
9
|
"tr-grid-checkbox": "1.0.60",
|
10
10
|
"tr-grid-column-fitter": "1.0.39",
|
11
11
|
"tr-grid-column-formatting": "0.9.34",
|
12
|
-
"tr-grid-column-grouping": "1.0.
|
13
|
-
"tr-grid-column-resizing": "1.0.
|
12
|
+
"tr-grid-column-grouping": "1.0.41",
|
13
|
+
"tr-grid-column-resizing": "1.0.28",
|
14
14
|
"tr-grid-column-selection": "1.0.25",
|
15
15
|
"tr-grid-column-stack": "1.0.48",
|
16
16
|
"tr-grid-conditional-coloring": "1.0.57",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"tr-grid-row-dragging": "1.0.24",
|
27
27
|
"tr-grid-row-filtering": "1.0.55",
|
28
28
|
"tr-grid-row-grouping": "1.0.80",
|
29
|
-
"tr-grid-row-selection": "1.0.
|
29
|
+
"tr-grid-row-selection": "1.0.22",
|
30
30
|
"tr-grid-rowcoloring": "1.0.21",
|
31
31
|
"tr-grid-textformatting": "1.0.44",
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
package/package.json
CHANGED
@@ -23,6 +23,9 @@
|
|
23
23
|
],
|
24
24
|
"grid": [
|
25
25
|
"lib/grid/lib/efx-grid.d.ts"
|
26
|
+
],
|
27
|
+
"*": [
|
28
|
+
"lib/types/index.d.ts"
|
26
29
|
]
|
27
30
|
}
|
28
31
|
},
|
@@ -49,7 +52,8 @@
|
|
49
52
|
"./filter-dialog/themes/solar/pearl": "./lib/filter-dialog/themes/solar/pearl.js",
|
50
53
|
"./extensions": "./lib/index.js",
|
51
54
|
"./window-exporter": "./lib/window-exporter.js",
|
52
|
-
"./grid": "./lib/grid/lib/efx-grid.js"
|
55
|
+
"./grid": "./lib/grid/lib/efx-grid.js",
|
56
|
+
"./formatters/": "./lib/formatters/es6/"
|
53
57
|
},
|
54
58
|
"peerDependencies": {
|
55
59
|
"@refinitiv-ui/core": "^6.2.0",
|
@@ -58,5 +62,5 @@
|
|
58
62
|
"publishConfig": {
|
59
63
|
"access": "public"
|
60
64
|
},
|
61
|
-
"version": "6.0.
|
65
|
+
"version": "6.0.22"
|
62
66
|
}
|