@refinitiv-ui/efx-grid 6.0.56 → 6.0.58
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +7 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +340 -44
- package/lib/column-selection-dialog/lib/locale/translation-de.js +1 -1
- package/lib/column-selection-dialog/lib/locale/translation-en.js +1 -1
- package/lib/column-selection-dialog/lib/locale/translation-ja.js +1 -1
- package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +1 -1
- package/lib/column-selection-dialog/lib/locale/translation-zh.js +1 -1
- package/lib/column-selection-dialog/themes/base.less +10 -0
- package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/dark.js +3 -1
- package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/elemental/light.js +3 -1
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark.js +3 -1
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light.js +3 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/charcoal.js +3 -1
- package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/solar/pearl.js +3 -1
- package/lib/core/dist/core.js +22 -1
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataTable.js +8 -0
- package/lib/core/es6/grid/Core.js +3 -1
- package/lib/core/es6/grid/event/EventListeners.js +3 -0
- package/lib/core/es6/grid/util/TrackLayout.d.ts +2 -0
- package/lib/core/es6/grid/util/TrackLayout.js +8 -0
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +40 -8
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +8 -0
- package/lib/tr-grid-printer/es6/index.js +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +35 -5
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +2 -0
- package/lib/versions.json +2 -2
- package/package.json +1 -1
package/lib/rt-grid/es6/Grid.js
CHANGED
@@ -613,6 +613,14 @@ Grid.prototype.dispose = function() {
|
|
613
613
|
this._grid.dispose();
|
614
614
|
this._connector.reset();
|
615
615
|
|
616
|
+
if(!this._sharedDataSource) { // make sure that it is the final grid, and that it will be dispose data
|
617
|
+
if(this._dt) {
|
618
|
+
this._dt.dispose();
|
619
|
+
}
|
620
|
+
if(this._dv) {
|
621
|
+
this._dv.dispose();
|
622
|
+
}
|
623
|
+
}
|
616
624
|
this._mainGrid = this._dt = this._dv = null;
|
617
625
|
|
618
626
|
if(this._subs) {
|
@@ -1 +1 @@
|
|
1
|
-
export * from "./GridPrinter";
|
1
|
+
export * from "./GridPrinter.js";
|
@@ -10,7 +10,7 @@ declare namespace TextFormattingPlugin {
|
|
10
10
|
formatType?: string|null,
|
11
11
|
type?: string|null,
|
12
12
|
field?: string|null,
|
13
|
-
decimalPlaces?: number|null,
|
13
|
+
decimalPlaces?: (number|boolean)|null,
|
14
14
|
precisionEnabled?: boolean|null,
|
15
15
|
plusSign?: boolean|null,
|
16
16
|
separator?: boolean|null,
|
@@ -9,9 +9,9 @@ import { DateTime } from '../../tr-grid-util/es6/DateTime.js';
|
|
9
9
|
* @description Fired only when a user click OK from the format dialog, that is generated from this extension
|
10
10
|
* @type {Object}
|
11
11
|
* @property {number} colIndex
|
12
|
-
* @property {string} formatType Available options are: number, scaled, percent,
|
12
|
+
* @property {string} formatType Available options are: number, scaled, percent, and datetime
|
13
13
|
* @property {string} field Field defined in the column
|
14
|
-
* @property {number=} decimalPlaces=2
|
14
|
+
* @property {(number|boolean)=} decimalPlaces=2
|
15
15
|
* @property {boolean=} plusSign
|
16
16
|
* @property {boolean=} separator
|
17
17
|
* @property {boolean=} percentSign
|
@@ -26,7 +26,7 @@ import { DateTime } from '../../tr-grid-util/es6/DateTime.js';
|
|
26
26
|
* @property {string=} formatType Available options are: number, scaled, percent, and datetime
|
27
27
|
* @property {string=} type Alias to formatType
|
28
28
|
* @property {string=} field Field is required but can be defined in the column definition object
|
29
|
-
* @property {number=} decimalPlaces=2
|
29
|
+
* @property {(number|boolean)=} decimalPlaces=2
|
30
30
|
* @property {boolean=} precisionEnabled=true If disabled, number of decimal will remain as original.
|
31
31
|
* @property {boolean=} plusSign=false
|
32
32
|
* @property {boolean=} separator=false Thousands separators
|
@@ -34,8 +34,8 @@ import { DateTime } from '../../tr-grid-util/es6/DateTime.js';
|
|
34
34
|
* @property {string=} scalingUnit Value can be million or billion
|
35
35
|
* @property {boolean=} multiplyBy100=false
|
36
36
|
* @property {boolean=} mutiplyBy100=false Alias of multiplyBy100
|
37
|
-
* @property {string=} dateTimeFormat
|
38
|
-
* @property {boolean=} useUTCTime
|
37
|
+
* @property {string=} dateTimeFormat="MM/DD/YYYY"
|
38
|
+
* @property {boolean=} useUTCTime=true
|
39
39
|
* @property {boolean=} autoTextFormatting=true If disabled, the extension's automatic formatting will not be triggered, including `formatLogic`
|
40
40
|
* @property {Function=} formatLogic=null If specified all default formatting will be prevented and replaced by the given function. This should be used when the column has custom rendering. The function must retrieve, format, and insert the data with the provided arguments (i.e., TextFormattingPlugin~FormatLogicArguments).
|
41
41
|
*/
|
@@ -306,6 +306,30 @@ TextFormattingPlugin.prototype._setColumnFormat = function (colIndex, userObj) {
|
|
306
306
|
var ff = new FieldFormatter(fo); // FieldFormatter will be used for rendering
|
307
307
|
var nf = null;
|
308
308
|
if (fot == "number" || fot == "scaled" || fot == "percent") {
|
309
|
+
var precision = fo["decimalPlaces"];
|
310
|
+
var precisionEnabled = fo["precisionEnabled"];
|
311
|
+
if (typeof precision == "number") {
|
312
|
+
colData["precision"] = precision;
|
313
|
+
if (precisionEnabled == null) {
|
314
|
+
precisionEnabled = true;
|
315
|
+
}
|
316
|
+
} else if (precision == true) {
|
317
|
+
colData["precision"] = null;
|
318
|
+
precision = 2;
|
319
|
+
precisionEnabled = true;
|
320
|
+
} else if (precision === false) {
|
321
|
+
colData["precision"] = null;
|
322
|
+
precision = 0;
|
323
|
+
precisionEnabled = false;
|
324
|
+
} else {
|
325
|
+
colData["precision"] = null;
|
326
|
+
precision = 2;
|
327
|
+
if (precisionEnabled == null) {
|
328
|
+
precisionEnabled = true;
|
329
|
+
}
|
330
|
+
}
|
331
|
+
fo["decimalPlaces"] = precision;
|
332
|
+
fo["precisionEnabled"] = precisionEnabled;
|
309
333
|
nf = new NumberFormatter(fo);
|
310
334
|
ff.setNumberFormatter(nf.format);
|
311
335
|
}
|
@@ -341,6 +365,12 @@ TextFormattingPlugin.prototype.getColumnFormatOptions = function (colIndex, opti
|
|
341
365
|
}
|
342
366
|
if (numberFormatter) {
|
343
367
|
numberFormatter.getOptions(options);
|
368
|
+
var precision = colData["precision"];
|
369
|
+
if (precision != null) {
|
370
|
+
options["decimalPlaces"] = precision;
|
371
|
+
} else {
|
372
|
+
delete options["decimalPlaces"];
|
373
|
+
}
|
344
374
|
}
|
345
375
|
}
|
346
376
|
return options;
|
package/lib/versions.json
CHANGED
@@ -28,10 +28,10 @@
|
|
28
28
|
"tr-grid-row-grouping": "1.0.81",
|
29
29
|
"tr-grid-row-selection": "1.0.23",
|
30
30
|
"tr-grid-rowcoloring": "1.0.23",
|
31
|
-
"tr-grid-textformatting": "1.0.
|
31
|
+
"tr-grid-textformatting": "1.0.46",
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
33
33
|
"@grid/formatters": "1.0.50",
|
34
|
-
"@grid/column-selection-dialog": "4.0.
|
34
|
+
"@grid/column-selection-dialog": "4.0.52",
|
35
35
|
"@grid/filter-dialog": "4.0.57",
|
36
36
|
"@grid/column-format-dialog": "4.0.44"
|
37
37
|
}
|
package/package.json
CHANGED