@refinitiv-ui/efx-grid 6.0.126 → 6.0.128
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 +62 -347
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataCache.d.ts +0 -18
- package/lib/core/es6/data/DataCache.js +61 -346
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +574 -753
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +150 -119
- package/lib/rt-grid/es6/RowDefinition.d.ts +14 -8
- package/lib/rt-grid/es6/RowDefinition.js +220 -208
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +2 -2
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +12 -18
- package/lib/tr-grid-filter-input/es6/FilterInput.js +685 -888
- package/lib/tr-grid-util/es6/CellPainter.d.ts +4 -0
- package/lib/tr-grid-util/es6/CellPainter.js +75 -17
- package/lib/types/es6/ConditionalColoring.d.ts +2 -2
- package/lib/types/es6/Core/data/DataCache.d.ts +0 -18
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +14 -8
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -130,6 +130,10 @@ declare class CellPainter {
|
|
130
130
|
|
131
131
|
public blink(cell: any, blinkSignal: number, rowData: any): boolean;
|
132
132
|
|
133
|
+
public flash(cell: any, blinkColor: string|null|null, rowData: any): boolean;
|
134
|
+
|
135
|
+
public _blink(scope: any, elem: Element|null, blinkColor: string, contrastColor: string): boolean;
|
136
|
+
|
133
137
|
public blinkCell(cell: any, newValue: number, oldValue: number, rowData: any): boolean;
|
134
138
|
|
135
139
|
public verifyBlinking(cell: any, rowData: any): void;
|
@@ -132,6 +132,10 @@ CellPainter.supportedStyles = CellPainter.bgStyles.concat(CellPainter.nonBgStyle
|
|
132
132
|
* @public
|
133
133
|
*/
|
134
134
|
CellPainter.themeReady = null;
|
135
|
+
/** @type {Object}
|
136
|
+
* @private
|
137
|
+
*/
|
138
|
+
CellPainter._contrastColors = {};
|
135
139
|
|
136
140
|
/** Deprecated in favor of ExpressionParser
|
137
141
|
* @public
|
@@ -926,8 +930,12 @@ CellPainter._clearBlinkTimer = function(scp, opt_restoreColor) {
|
|
926
930
|
CellPainter.getOppositeColor = function (hexCode) {
|
927
931
|
if(typeof hexCode === "string") {
|
928
932
|
if(hexCode.charAt(0) === "#") {
|
929
|
-
let
|
930
|
-
|
933
|
+
let contrastColor = CellPainter._contrastColors[hexCode];
|
934
|
+
if (!contrastColor) {
|
935
|
+
let triplet = hex2Num(hexCode);
|
936
|
+
contrastColor = CellPainter._contrastColors[hexCode] = getContrastColor(triplet);
|
937
|
+
}
|
938
|
+
return contrastColor;
|
931
939
|
}
|
932
940
|
} else if(Array.isArray(hexCode)) {
|
933
941
|
return getContrastColor(hexCode);
|
@@ -1021,21 +1029,11 @@ CellPainter.prototype._paintCell = function(cell, rowData, min, max) {
|
|
1021
1029
|
};
|
1022
1030
|
|
1023
1031
|
/**
|
1024
|
-
* @
|
1032
|
+
* @private
|
1025
1033
|
* @param {tr.grid.Cell} cell
|
1026
|
-
* @
|
1027
|
-
* @param {Object} rowData to calculate original style e.g. { PCTCHNG: 0.53, CF_NETCHNG: 0.75 }
|
1028
|
-
* @return {boolean}
|
1034
|
+
* @return {Object}
|
1029
1035
|
*/
|
1030
|
-
CellPainter.prototype.
|
1031
|
-
if (!cell) return false;
|
1032
|
-
|
1033
|
-
let elem = cell.getElement();
|
1034
|
-
if (!elem) return false; // Cell has been disposed
|
1035
|
-
|
1036
|
-
let bc = this._blinkCondition;
|
1037
|
-
if (!bc) return false;
|
1038
|
-
|
1036
|
+
CellPainter.prototype._prepareScope = function(cell) {
|
1039
1037
|
let scope = cell["blinking"];
|
1040
1038
|
if (!scope) {
|
1041
1039
|
scope = {};
|
@@ -1045,6 +1043,7 @@ CellPainter.prototype.blink = function (cell, blinkSignal, rowData) {
|
|
1045
1043
|
this._scopes.push(scope);
|
1046
1044
|
}
|
1047
1045
|
|
1046
|
+
let bc = this._blinkCondition;
|
1048
1047
|
if (scope["blinkId"] !== bc["blinkId"]) {
|
1049
1048
|
scope["blinkId"] = bc["blinkId"];
|
1050
1049
|
scope["field"] = bc["field"];
|
@@ -1052,6 +1051,27 @@ CellPainter.prototype.blink = function (cell, blinkSignal, rowData) {
|
|
1052
1051
|
scope._restorer = restorer.bind(this, scope);
|
1053
1052
|
}
|
1054
1053
|
|
1054
|
+
return scope;
|
1055
|
+
};
|
1056
|
+
|
1057
|
+
/**
|
1058
|
+
* @public
|
1059
|
+
* @param {tr.grid.Cell} cell
|
1060
|
+
* @param {number} blinkSignal
|
1061
|
+
* @param {Object} rowData to calculate original style e.g. { PCTCHNG: 0.53, CF_NETCHNG: 0.75 }
|
1062
|
+
* @return {boolean}
|
1063
|
+
*/
|
1064
|
+
CellPainter.prototype.blink = function (cell, blinkSignal, rowData) {
|
1065
|
+
if (!cell) return false;
|
1066
|
+
|
1067
|
+
let elem = cell.getElement();
|
1068
|
+
if (!elem) return false; // Cell has been disposed
|
1069
|
+
|
1070
|
+
let bc = this._blinkCondition;
|
1071
|
+
if (!bc) return false;
|
1072
|
+
|
1073
|
+
let scope = this._prepareScope(cell);
|
1074
|
+
|
1055
1075
|
scope["rowData"] = rowData;
|
1056
1076
|
|
1057
1077
|
let blinkColor, contrastColor;
|
@@ -1066,9 +1086,47 @@ CellPainter.prototype.blink = function (cell, blinkSignal, rowData) {
|
|
1066
1086
|
contrastColor = bc["contrastLevelColor"];
|
1067
1087
|
}
|
1068
1088
|
|
1089
|
+
return this._blink(scope, elem, blinkColor, contrastColor);
|
1090
|
+
};
|
1091
|
+
|
1092
|
+
/** Blink cell with specific color or theme's neutral movement color.
|
1093
|
+
* @public
|
1094
|
+
* @param {tr.grid.Cell} cell
|
1095
|
+
* @param {string|null} blinkColor
|
1096
|
+
* @param {Object} rowData to calculate original style e.g. { PCTCHNG: 0.53, CF_NETCHNG: 0.75 }
|
1097
|
+
* @return {boolean}
|
1098
|
+
*/
|
1099
|
+
CellPainter.prototype.flash = function(cell, blinkColor, rowData) {
|
1100
|
+
if (!cell) return false;
|
1101
|
+
|
1102
|
+
let elem = cell.getElement();
|
1103
|
+
if (!elem) return false; // Cell has been disposed
|
1104
|
+
|
1105
|
+
if (!this._blinkCondition) return false;
|
1106
|
+
|
1107
|
+
let scope = this._prepareScope(cell);
|
1108
|
+
|
1109
|
+
scope["rowData"] = rowData;
|
1110
|
+
|
1111
|
+
if (typeof blinkColor !== "string") {
|
1112
|
+
blinkColor = ElfUtil.themeColors["level"];
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
return this._blink(scope, elem, blinkColor, CellPainter.getOppositeColor(blinkColor));
|
1116
|
+
};
|
1117
|
+
|
1118
|
+
/**
|
1119
|
+
* @public
|
1120
|
+
* @param {Object} scope
|
1121
|
+
* @param {Element} elem
|
1122
|
+
* @param {string} blinkColor
|
1123
|
+
* @param {string} contrastColor
|
1124
|
+
* @return {boolean}
|
1125
|
+
*/
|
1126
|
+
CellPainter.prototype._blink = function (scope, elem, blinkColor, contrastColor) {
|
1069
1127
|
let bgBlinking = true;
|
1070
|
-
|
1071
|
-
if (
|
1128
|
+
|
1129
|
+
if (this._blinkCondition["border"]) {
|
1072
1130
|
elem.style.border = "1px solid " + blinkColor;
|
1073
1131
|
bgBlinking = false;
|
1074
1132
|
} else {
|
@@ -10,7 +10,7 @@ declare namespace ConditionalColoringPlugin {
|
|
10
10
|
type Options = {
|
11
11
|
predefinedColors?: any,
|
12
12
|
blinkingDuration?: number|null,
|
13
|
-
insertionBlinking?: boolean|null
|
13
|
+
insertionBlinking?: (boolean|string)|null
|
14
14
|
};
|
15
15
|
|
16
16
|
type ColumnOptions = {
|
@@ -82,7 +82,7 @@ declare class ConditionalColoringPlugin extends GridPlugin {
|
|
82
82
|
|
83
83
|
public setPredefinedColors(predefinedColors: any): void;
|
84
84
|
|
85
|
-
public setInsertionBlinking(blinking: boolean): void;
|
85
|
+
public setInsertionBlinking(blinking: boolean|string|null): void;
|
86
86
|
|
87
87
|
public getColumnPainter(colIndex: number): CellPainter|null;
|
88
88
|
|
@@ -7,30 +7,12 @@ declare class DataCache extends EventDispatcher {
|
|
7
7
|
|
8
8
|
public dispose(): void;
|
9
9
|
|
10
|
-
public setSubscriptions(subs: any): void;
|
11
|
-
|
12
|
-
public getSubscriptions(): any;
|
13
|
-
|
14
|
-
public addSubscription(sub: any, opt_primaryRic?: string|null, opt_values?: any): void;
|
15
|
-
|
16
|
-
public removeSubscription(sub: any): void;
|
17
|
-
|
18
|
-
public startAllSubscriptions(): void;
|
19
|
-
|
20
|
-
public stopAllSubscriptions(): void;
|
21
|
-
|
22
|
-
public getSubscription(sub_id: string): any;
|
23
|
-
|
24
|
-
public getPrimaryRic(sub_id: string): string;
|
25
|
-
|
26
10
|
public clearAllData(opt_suppressEvent?: boolean|null): void;
|
27
11
|
|
28
12
|
public clearColumnData(colId: (string)[]|string|null, opt_suppressEvent?: boolean|null): void;
|
29
13
|
|
30
14
|
public getData(rid: string, cid: string): any;
|
31
15
|
|
32
|
-
public getAllRics(): { [key: string]: any }|null;
|
33
|
-
|
34
16
|
public getAllRowIds(): (string)[]|null;
|
35
17
|
|
36
18
|
public hasRowId(rid: string): boolean;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { arrayToObject
|
1
|
+
import { arrayToObject } from "../../../tr-grid-util/es6/Util.js";
|
2
2
|
import { DataCache } from "../Core/data/DataCache.js";
|
3
3
|
import { DataTable } from "../Core/data/DataTable.js";
|
4
4
|
|
@@ -48,7 +48,7 @@ declare class RowDefinition {
|
|
48
48
|
|
49
49
|
public getType(): string;
|
50
50
|
|
51
|
-
public setDataSource(dataSource: DataCache|null): void;
|
51
|
+
public setDataSource(dataSource: DataCache|null, subs?: any): void;
|
52
52
|
|
53
53
|
public getDataSource(): DataCache|null;
|
54
54
|
|
@@ -68,6 +68,8 @@ declare class RowDefinition {
|
|
68
68
|
|
69
69
|
public setRowData(data: { [key: string]: any }): void;
|
70
70
|
|
71
|
+
public resetRowData(): void;
|
72
|
+
|
71
73
|
public setData(field: string, value: any): void;
|
72
74
|
|
73
75
|
public getUserInput(): string;
|
@@ -86,6 +88,8 @@ declare class RowDefinition {
|
|
86
88
|
|
87
89
|
public isChain(): boolean;
|
88
90
|
|
91
|
+
public isConstituent(): boolean;
|
92
|
+
|
89
93
|
public static hasChain(rowDef: RowDefinition|null): boolean;
|
90
94
|
|
91
95
|
public isChainCollapsed(): boolean;
|
@@ -96,21 +100,21 @@ declare class RowDefinition {
|
|
96
100
|
|
97
101
|
public isRealTimeRow(): boolean;
|
98
102
|
|
99
|
-
public subscribeForUpdates(): boolean;
|
103
|
+
public subscribeForUpdates(subs?: any): boolean;
|
100
104
|
|
101
|
-
public unsubscribeForUpdates():
|
105
|
+
public unsubscribeForUpdates(): null;
|
102
106
|
|
103
107
|
public isSubscribing(): boolean;
|
104
108
|
|
105
|
-
public
|
109
|
+
public getSubId(): string;
|
110
|
+
|
111
|
+
public addUpdate(changes: any): boolean;
|
106
112
|
|
107
113
|
public getUpdates(): { [key: string]: number }|null;
|
108
114
|
|
109
115
|
public resetUpdates(): void;
|
110
116
|
|
111
|
-
public registerToView(view: DataView|null, destRowId?: string|null):
|
112
|
-
|
113
|
-
public static deregisterFromView(rowIds: (string)[]|null, rowDef: RowDefinition|null): (string)[]|null;
|
117
|
+
public registerToView(view: DataView|null, destRowId?: string|null): boolean;
|
114
118
|
|
115
119
|
public unlinkChain(): void;
|
116
120
|
|
@@ -128,6 +132,8 @@ declare class RowDefinition {
|
|
128
132
|
|
129
133
|
public getChildCount(): number;
|
130
134
|
|
135
|
+
public countChildInView(): number;
|
136
|
+
|
131
137
|
public getParent(): RowDefinition|null;
|
132
138
|
|
133
139
|
public getDepthLevel(): number;
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.161",
|
3
3
|
"tr-grid-printer": "1.0.18",
|
4
4
|
"@grid/column-dragging": "1.0.21",
|
5
5
|
"@grid/row-segmenting": "1.0.34",
|
@@ -14,10 +14,10 @@
|
|
14
14
|
"tr-grid-column-resizing": "1.0.29",
|
15
15
|
"tr-grid-column-selection": "1.0.33",
|
16
16
|
"tr-grid-column-stack": "1.0.76",
|
17
|
-
"tr-grid-conditional-coloring": "1.0.
|
17
|
+
"tr-grid-conditional-coloring": "1.0.73",
|
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.43",
|
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",
|
package/package.json
CHANGED