@refinitiv-ui/efx-grid 6.0.34 → 6.0.35
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.js +50 -40
- package/lib/core/dist/core.js +99 -3
- 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 +18 -1
- package/lib/core/es6/data/DataView.d.ts +2 -0
- package/lib/core/es6/data/DataView.js +11 -0
- package/lib/core/es6/grid/Core.d.ts +12 -0
- package/lib/core/es6/grid/Core.js +64 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +6 -0
- package/lib/grid/index.js +1 -1
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +1 -1
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +343 -142
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +33 -26
- package/lib/rt-grid/es6/RowDefSorter.d.ts +5 -5
- package/lib/rt-grid/es6/RowDefSorter.js +165 -71
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +66 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +2 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +17 -3
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +1 -1
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +14 -3
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +3 -2
- package/lib/tr-grid-util/es6/DragUI.js +7 -3
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +36 -33
- package/lib/types/es6/ColumnStack.d.ts +2 -0
- package/lib/types/es6/Core/data/DataTable.d.ts +3 -1
- package/lib/types/es6/Core/data/DataView.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +5 -5
- package/lib/versions.json +7 -7
- package/package.json +1 -1
@@ -83,7 +83,7 @@ var _fieldInfo = {
|
|
83
83
|
"words2": {type: "string", min: 3, max: 10},
|
84
84
|
"words3": {type: "string", min: 5, max: 15},
|
85
85
|
"sentence": {type: "string", min: 8, max: 20},
|
86
|
-
"id": {type: "function", generate: _generateId},
|
86
|
+
"id": {type: "function", hash: 0, generate: _generateId},
|
87
87
|
"companyName": {type: "set", members: DataSet.companyName },
|
88
88
|
"industry": {type: "set", members: DataSet.industry },
|
89
89
|
"market": {type: "set", members: DataSet.market },
|
@@ -103,14 +103,16 @@ var getFieldInfo = function(field) {
|
|
103
103
|
* @param {Object|Function} options
|
104
104
|
*/
|
105
105
|
var addFieldInfo = function(field, options) {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
106
|
+
if(field) {
|
107
|
+
var opt = options;
|
108
|
+
if(typeof options === "function") {
|
109
|
+
opt = {
|
110
|
+
type: "function",
|
111
|
+
generate: options
|
112
|
+
};
|
113
|
+
}
|
114
|
+
_fieldInfo[field] = opt; // WARNING: This could replace existing info
|
112
115
|
}
|
113
|
-
_fieldInfo[field] = opt;
|
114
116
|
};
|
115
117
|
|
116
118
|
/** Return pseudo random number in the range of 0 to 1 (exclusive of 1)
|
@@ -452,8 +454,9 @@ var _generate2DArray = function(fields, options, seed) {
|
|
452
454
|
*/
|
453
455
|
var _hash = function(str) {
|
454
456
|
var sum = 0;
|
455
|
-
|
456
|
-
|
457
|
+
var i = str ? str.length : 0;
|
458
|
+
while(--i >= 0) {
|
459
|
+
sum += str.charCodeAt(i) * (i + 0.9879);
|
457
460
|
}
|
458
461
|
return sum;
|
459
462
|
};
|
@@ -465,35 +468,34 @@ var _hash = function(str) {
|
|
465
468
|
*/
|
466
469
|
var _generateFieldData = function(field, options, seed) {
|
467
470
|
var fInfo = getFieldInfo(field);
|
471
|
+
if(!fInfo.type) {
|
472
|
+
fInfo.type = "number";
|
473
|
+
addFieldInfo(field, fInfo);
|
474
|
+
}
|
475
|
+
if(fInfo.fixedValue){
|
476
|
+
fInfo.value = value;
|
477
|
+
return fInfo;
|
478
|
+
}
|
479
|
+
if(seed != null) {
|
480
|
+
if(fInfo.hash == null) {
|
481
|
+
fInfo.hash = _hash(field);
|
482
|
+
}
|
483
|
+
seed += fInfo.hash; // Make each field unique for the same seed
|
484
|
+
}
|
485
|
+
|
468
486
|
var min = fInfo.min != null ? fInfo.min : 100; // WARNING: Default values are non-standard values
|
469
487
|
var max = fInfo.max != null ? fInfo.max : 10000;
|
470
|
-
var prec = fInfo.prec != null ? fInfo.prec : 0;
|
471
488
|
var value;
|
472
489
|
|
473
|
-
if(fInfo.
|
474
|
-
value = fInfo.fixedValue;
|
475
|
-
} else if(!fInfo.type) { // Unknown type
|
476
|
-
if(seed != null) {
|
477
|
-
if(field) {
|
478
|
-
if(!fInfo.hash) {
|
479
|
-
fInfo.hash = _hash(field);
|
480
|
-
addFieldInfo(field, fInfo); // WARNING: modify global state
|
481
|
-
}
|
482
|
-
seed += fInfo.hash;
|
483
|
-
}
|
484
|
-
}
|
485
|
-
value = randNumber(min, max, prec, seed);
|
486
|
-
} else if(fInfo.type === "string") {
|
490
|
+
if(fInfo.type === "string") {
|
487
491
|
if(fInfo.min != null || fInfo.max != null) {
|
488
|
-
if(seed != null) {
|
489
|
-
if(!fInfo.hash) {
|
490
|
-
fInfo.hash = _hash(field);
|
491
|
-
}
|
492
|
-
seed += fInfo.hash;
|
493
|
-
}
|
494
492
|
value = randString(min, max, seed);
|
495
493
|
} else {
|
496
|
-
|
494
|
+
if(options) {
|
495
|
+
value = options.text || "";
|
496
|
+
} else {
|
497
|
+
value = "";
|
498
|
+
}
|
497
499
|
}
|
498
500
|
} else if(fInfo.type === "set") {
|
499
501
|
value = randMember(fInfo.members, seed);
|
@@ -510,7 +512,8 @@ var _generateFieldData = function(field, options, seed) {
|
|
510
512
|
} else if(fInfo.type === "function") {
|
511
513
|
fInfo.field = field;
|
512
514
|
value = fInfo.generate(fInfo, seed);
|
513
|
-
} else { // Default is number
|
515
|
+
} else { // Default is number for all unknown type
|
516
|
+
var prec = fInfo.prec != null ? fInfo.prec : 0;
|
514
517
|
value = randNumber(min, max, prec, seed);
|
515
518
|
}
|
516
519
|
fInfo.value = value;
|
@@ -137,6 +137,8 @@ declare class ColumnStackPlugin extends GridPlugin {
|
|
137
137
|
|
138
138
|
public isStackHidden(stackId: string): boolean|null|null;
|
139
139
|
|
140
|
+
public moveStack(stackId: string, destCol?: (number|string)|null): boolean;
|
141
|
+
|
140
142
|
}
|
141
143
|
|
142
144
|
export default ColumnStackPlugin;
|
@@ -70,6 +70,8 @@ declare class DataTable extends DataCache {
|
|
70
70
|
|
71
71
|
public setColumnSortingLogic(cid: string, func: DataTable.SortLogic|null): void;
|
72
72
|
|
73
|
+
public getColumnSortingLogic(cid?: string|null): DataTable.SortLogic|null;
|
74
|
+
|
73
75
|
public freeze(bool?: boolean|null): boolean;
|
74
76
|
|
75
77
|
public unfreeze(bool?: boolean|null): boolean;
|
@@ -90,7 +92,7 @@ declare class DataTable extends DataCache {
|
|
90
92
|
|
91
93
|
public getSegmentParentRowId(rid: string): string;
|
92
94
|
|
93
|
-
public getSegmentValues(rids?: (string)[]|null): (number)[]|null;
|
95
|
+
public getSegmentValues(rids?: (string)[]|null, partial?: boolean|null): (number)[]|null;
|
94
96
|
|
95
97
|
public fillSegment(segmentId: string): void;
|
96
98
|
|
@@ -80,6 +80,8 @@ declare class DataView extends EventDispatcher {
|
|
80
80
|
|
81
81
|
public setColumnSortingLogic(cid: string, func: DataTable.SortLogic|null): void;
|
82
82
|
|
83
|
+
public getColumnSortingLogic(cid?: string|null): DataTable.SortLogic|null;
|
84
|
+
|
83
85
|
public isSorting(): boolean;
|
84
86
|
|
85
87
|
public hideRow(rId: string|number|null, hidden?: boolean|null): void;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { cloneObject } from "../../../tr-grid-util/es6/Util.js";
|
2
2
|
|
3
3
|
declare class RowDefSorter {
|
4
4
|
|
@@ -6,14 +6,14 @@ declare class RowDefSorter {
|
|
6
6
|
|
7
7
|
public dispose(): void;
|
8
8
|
|
9
|
-
public getSorter(
|
10
|
-
|
11
|
-
public setSortLogic(func?: ((...params: any[]) => any)|null): void;
|
9
|
+
public getSorter(): ((...params: any[]) => any)|null;
|
12
10
|
|
13
|
-
public
|
11
|
+
public reset(key: string, value: any): void;
|
14
12
|
|
15
13
|
public setContext(key: string, value: any): void;
|
16
14
|
|
15
|
+
public addColumnContext(field: string, logic: ((...params: any[]) => any)|null, rowSorting: boolean, order: string, colIndex: number, colDef: any): void;
|
16
|
+
|
17
17
|
}
|
18
18
|
|
19
19
|
export default RowDefSorter;
|
package/lib/versions.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
3
|
-
"@grid/column-dragging": "1.0.
|
2
|
+
"tr-grid-util": "1.3.101",
|
3
|
+
"@grid/column-dragging": "1.0.13",
|
4
4
|
"@grid/row-segmenting": "1.0.23",
|
5
5
|
"@grid/statistics-row": "1.0.14",
|
6
6
|
"@grid/zoom": "1.0.11",
|
@@ -11,9 +11,9 @@
|
|
11
11
|
"tr-grid-column-formatting": "0.9.34",
|
12
12
|
"tr-grid-column-grouping": "1.0.47",
|
13
13
|
"tr-grid-column-resizing": "1.0.28",
|
14
|
-
"tr-grid-column-selection": "1.0.
|
15
|
-
"tr-grid-column-stack": "1.0.
|
16
|
-
"tr-grid-conditional-coloring": "1.0.
|
14
|
+
"tr-grid-column-selection": "1.0.28",
|
15
|
+
"tr-grid-column-stack": "1.0.57",
|
16
|
+
"tr-grid-conditional-coloring": "1.0.61",
|
17
17
|
"tr-grid-content-wrap": "1.0.20",
|
18
18
|
"tr-grid-contextmenu": "1.0.38",
|
19
19
|
"tr-grid-filter-input": "0.9.31",
|
@@ -23,11 +23,11 @@
|
|
23
23
|
"tr-grid-percent-bar": "1.0.22",
|
24
24
|
"tr-grid-printer": "1.0.16",
|
25
25
|
"tr-grid-range-bar": "2.0.3",
|
26
|
-
"tr-grid-row-dragging": "1.0.
|
26
|
+
"tr-grid-row-dragging": "1.0.27",
|
27
27
|
"tr-grid-row-filtering": "1.0.55",
|
28
28
|
"tr-grid-row-grouping": "1.0.80",
|
29
29
|
"tr-grid-row-selection": "1.0.22",
|
30
|
-
"tr-grid-rowcoloring": "1.0.
|
30
|
+
"tr-grid-rowcoloring": "1.0.22",
|
31
31
|
"tr-grid-textformatting": "1.0.45",
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
33
33
|
"@grid/formatters": "1.0.49",
|
package/package.json
CHANGED