@refinitiv-ui/efx-grid 6.0.95 → 6.0.97
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +961 -963
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +17 -9
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1447 -1301
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +20 -11
- package/lib/tr-grid-util/es6/MultiTableManager.js +7 -1
- package/lib/tr-grid-util/es6/Popup.d.ts +2 -0
- package/lib/tr-grid-util/es6/Popup.js +7 -0
- package/lib/tr-grid-util/es6/SubTable.d.ts +2 -0
- package/lib/tr-grid-util/es6/SubTable.js +6 -0
- package/lib/tr-grid-util/es6/Table.d.ts +5 -1
- package/lib/tr-grid-util/es6/Table.js +17 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +1 -1
- package/lib/versions.json +3 -3
- package/package.json +1 -1
@@ -136,6 +136,23 @@ let _arrayConcat = function(ary, val) {
|
|
136
136
|
}
|
137
137
|
return ary;
|
138
138
|
};
|
139
|
+
/** @private
|
140
|
+
* @function
|
141
|
+
* @param {Object} obj
|
142
|
+
* @return {boolean}
|
143
|
+
*/
|
144
|
+
let _handledBlankProperties = function(obj) {
|
145
|
+
if(obj[""] || obj["null"] || obj["undefined"] || obj["NaN"]) {
|
146
|
+
let objClone = cloneObject(obj); // Blank item need to clone to prevent changes in the expression
|
147
|
+
delete objClone[""];
|
148
|
+
delete objClone["null"];
|
149
|
+
delete objClone["undefined"];
|
150
|
+
delete objClone["NaN"];
|
151
|
+
objClone[BLANKS] = true;
|
152
|
+
return objClone;
|
153
|
+
}
|
154
|
+
return obj;
|
155
|
+
};
|
139
156
|
|
140
157
|
/** @type {string}
|
141
158
|
* @private
|
@@ -503,17 +520,8 @@ RowFilteringPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
503
520
|
let exp = colSettings.expression;
|
504
521
|
if(exp && typeof exp !== "function") { // TODO: Accept function type
|
505
522
|
if(typeof exp === "object" && !Array.isArray(exp)) {
|
506
|
-
|
507
|
-
|
508
|
-
delete expClone[""];
|
509
|
-
delete expClone["null"];
|
510
|
-
delete expClone["undefined"];
|
511
|
-
delete expClone["NaN"];
|
512
|
-
expClone[BLANKS] = true;
|
513
|
-
column.filter = expClone; // This could be only object
|
514
|
-
} else {
|
515
|
-
column.filter = exp;
|
516
|
-
}
|
523
|
+
exp = _handledBlankProperties(exp);
|
524
|
+
column.filter = exp;
|
517
525
|
} else {
|
518
526
|
column.filter = exp; // This could be string or array
|
519
527
|
}
|
@@ -1806,6 +1814,7 @@ RowFilteringPlugin.prototype.openDialog = function(colIndex, runtimeDialogOption
|
|
1806
1814
|
filterFuncs = cfo._filters;
|
1807
1815
|
}
|
1808
1816
|
if(typeof exp === "object") {
|
1817
|
+
exp = _handledBlankProperties(exp);
|
1809
1818
|
dialogConfig.additionalItems = _arrayConcat(dialogConfig.additionalItems, Object.keys(exp));
|
1810
1819
|
}
|
1811
1820
|
}
|
@@ -266,7 +266,13 @@ MultiTableManager.prototype._onConfiguration = function () {
|
|
266
266
|
MultiTableManager.prototype.dispose = function () {
|
267
267
|
let len = this._tables.length;
|
268
268
|
for(let i = 0; i < len; ++i) {
|
269
|
-
this._tables[i]
|
269
|
+
let table = this._tables[i];
|
270
|
+
if(table.api) {
|
271
|
+
table.api.dispose();
|
272
|
+
|
273
|
+
} else {
|
274
|
+
table.dispose(); // rt-grid
|
275
|
+
}
|
270
276
|
}
|
271
277
|
this._tables = [];
|
272
278
|
this._extensions = null;
|
@@ -758,6 +758,13 @@ Popup.prototype._attachOverlay = function (parentElem) {
|
|
758
758
|
parentElem.appendChild(this._overlay);
|
759
759
|
};
|
760
760
|
|
761
|
+
/** @public
|
762
|
+
* @return {Element} Overlay element
|
763
|
+
*/
|
764
|
+
Popup.prototype.getOverlayElement = function () {
|
765
|
+
return this._overlay;
|
766
|
+
};
|
767
|
+
|
761
768
|
/** @private
|
762
769
|
* @param {Object=} e
|
763
770
|
*/
|
@@ -60,6 +60,8 @@ declare class SubTable extends ElementWrapper {
|
|
60
60
|
|
61
61
|
public setCellRenderer(func: ((...params: any[]) => any)|null): void;
|
62
62
|
|
63
|
+
public getCellRenderer(): ((...params: any[]) => any)|null;
|
64
|
+
|
63
65
|
public cloak(elem: Element|null, opt_elementType?: string|null): void;
|
64
66
|
|
65
67
|
public spanBlock(c1: number, c2: number, r1: number, r2: number): Element|null;
|
@@ -493,6 +493,12 @@ SubTable.prototype.setCellRenderer = function(func) {
|
|
493
493
|
this._render = func || SubTable._defaultCellRenderer;
|
494
494
|
};
|
495
495
|
/** @public
|
496
|
+
* @return {Function}
|
497
|
+
*/
|
498
|
+
SubTable.prototype.getCellRenderer = function() {
|
499
|
+
return this._render || SubTable._defaultCellRenderer;
|
500
|
+
};
|
501
|
+
/** @public
|
496
502
|
* @override
|
497
503
|
* @param {Element} elem
|
498
504
|
* @param {string=} opt_elementType
|
@@ -82,11 +82,15 @@ declare class Table extends ElementWrapper {
|
|
82
82
|
|
83
83
|
public setDefaultColumnWidth(val?: (number|null)|null): void;
|
84
84
|
|
85
|
+
public getDefaultColumnWidth(): number|null|null;
|
86
|
+
|
85
87
|
public setDefaultRowHeight(val?: (number|null)|null): void;
|
86
88
|
|
89
|
+
public getDefaultRowHeight(): number|null|null;
|
90
|
+
|
87
91
|
public distributeColumnWidth(): void;
|
88
92
|
|
89
|
-
public log(opt_rowLimit?: number|null):
|
93
|
+
public log(opt_rowLimit?: number|null): (any)[]|null;
|
90
94
|
|
91
95
|
public getTextContents(): (string)[][];
|
92
96
|
|
@@ -425,6 +425,13 @@ Table.prototype.setDefaultColumnWidth = function(val) {
|
|
425
425
|
}
|
426
426
|
this._updateTableWidth();
|
427
427
|
};
|
428
|
+
|
429
|
+
/** @public
|
430
|
+
* @return {number|null}
|
431
|
+
*/
|
432
|
+
Table.prototype.getDefaultColumnWidth = function() {
|
433
|
+
return this._defaultColumnWidth;
|
434
|
+
};
|
428
435
|
/** @public
|
429
436
|
* @param {(number|null)=} val
|
430
437
|
*/
|
@@ -438,6 +445,12 @@ Table.prototype.setDefaultRowHeight = function(val) {
|
|
438
445
|
this._subs[i].setDefaultRowHeight(val);
|
439
446
|
}
|
440
447
|
};
|
448
|
+
/** @public
|
449
|
+
* @return {number|null}
|
450
|
+
*/
|
451
|
+
Table.prototype.getDefaultRowHeight = function() {
|
452
|
+
return this._defaultRowHeight;
|
453
|
+
};
|
441
454
|
/** Distribute columns based on their textContent length
|
442
455
|
* @public
|
443
456
|
*/
|
@@ -452,7 +465,8 @@ Table.prototype.distributeColumnWidth = function() {
|
|
452
465
|
}
|
453
466
|
let maxWidths = new Array(this._colCount);
|
454
467
|
let txtRow = txtRows[0];
|
455
|
-
|
468
|
+
let c;
|
469
|
+
for(c = 0; c < this._colCount; ++c) {
|
456
470
|
maxWidths[c] = txtRow[c].length;
|
457
471
|
}
|
458
472
|
for(let r = 1; r < rowCount; ++r) {
|
@@ -480,6 +494,7 @@ Table.prototype.distributeColumnWidth = function() {
|
|
480
494
|
|
481
495
|
/** @public
|
482
496
|
* @param {number=} opt_rowLimit
|
497
|
+
* @return {Array<Object>} Array of rows that just log in console
|
483
498
|
*/
|
484
499
|
Table.prototype.log = function(opt_rowLimit) {
|
485
500
|
let trs = this.getRows();
|
@@ -507,6 +522,7 @@ Table.prototype.log = function(opt_rowLimit) {
|
|
507
522
|
}
|
508
523
|
}
|
509
524
|
console.table(rows);
|
525
|
+
return rows; // Debug
|
510
526
|
};
|
511
527
|
/** @public
|
512
528
|
* @return {!Array.<Array.<string>>}
|
@@ -487,6 +487,7 @@ let _hash = function(str) {
|
|
487
487
|
* @return {!Object} Object with value and other properties
|
488
488
|
*/
|
489
489
|
let _generateFieldData = function(field, options, seed) {
|
490
|
+
let value;
|
490
491
|
let fInfo = getFieldInfo(field);
|
491
492
|
if(!fInfo.type) {
|
492
493
|
fInfo.type = "number";
|
@@ -505,7 +506,6 @@ let _generateFieldData = function(field, options, seed) {
|
|
505
506
|
|
506
507
|
let min = fInfo.min != null ? fInfo.min : 100; // WARNING: Default values are non-standard values
|
507
508
|
let max = fInfo.max != null ? fInfo.max : 10000;
|
508
|
-
let value;
|
509
509
|
|
510
510
|
if(fInfo.type === "string") {
|
511
511
|
if(fInfo.min != null || fInfo.max != null) {
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.149",
|
3
3
|
"tr-grid-printer": "1.0.17",
|
4
4
|
"@grid/column-dragging": "1.0.20",
|
5
5
|
"@grid/row-segmenting": "1.0.31",
|
@@ -19,12 +19,12 @@
|
|
19
19
|
"tr-grid-contextmenu": "1.0.41",
|
20
20
|
"tr-grid-filter-input": "0.9.39",
|
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.84",
|
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",
|
26
26
|
"tr-grid-row-dragging": "1.0.34",
|
27
|
-
"tr-grid-row-filtering": "1.0.
|
27
|
+
"tr-grid-row-filtering": "1.0.74",
|
28
28
|
"tr-grid-row-grouping": "1.0.87",
|
29
29
|
"tr-grid-row-selection": "1.0.28",
|
30
30
|
"tr-grid-rowcoloring": "1.0.25",
|
package/package.json
CHANGED