@refinitiv-ui/efx-grid 6.0.87 → 6.0.89
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/column-dragging/es6/ColumnDragging.js +55 -0
- package/lib/core/dist/core.js +2 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.d.ts +0 -2
- package/lib/core/es6/grid/Core.js +2 -2
- package/lib/grid/index.js +1 -1
- package/lib/row-segmenting/es6/RowSegmenting.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +786 -706
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +68 -68
- package/lib/rt-grid/es6/DataConnector.js +26 -26
- package/lib/rt-grid/es6/FieldDefinition.js +27 -27
- package/lib/rt-grid/es6/Grid.js +390 -378
- package/lib/rt-grid/es6/PredefinedFormula.js +1 -1
- package/lib/rt-grid/es6/ReferenceCounter.js +15 -15
- package/lib/rt-grid/es6/RowDefSorter.js +26 -26
- package/lib/rt-grid/es6/RowDefinition.d.ts +5 -6
- package/lib/rt-grid/es6/RowDefinition.js +105 -76
- package/lib/rt-grid/es6/SnapshotFiller.js +77 -77
- package/lib/rt-grid/es6/StyleLoader.js +1 -1
- package/lib/statistics-row/es6/StatisticsRow.d.ts +1 -0
- package/lib/statistics-row/es6/StatisticsRow.js +18 -2
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +0 -4
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +2 -2
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +18 -18
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +7 -1
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +69 -18
- package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +0 -2
- package/lib/tr-grid-titlewrap/es6/TitleWrap.js +1 -1
- package/lib/tr-grid-util/es6/DragUI.js +2 -1
- package/lib/types/es6/PercentBar.d.ts +18 -18
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +5 -2
- package/lib/types/es6/RowFiltering.d.ts +2 -0
- package/lib/types/es6/StatisticsRow.d.ts +1 -0
- package/lib/versions.json +10 -10
- package/package.json +1 -1
@@ -9,7 +9,7 @@ import { isEmptyObject } from "../../tr-grid-util/es6/Util.js";
|
|
9
9
|
* @constructor
|
10
10
|
* @extends {EventDispatcher}
|
11
11
|
*/
|
12
|
-
|
12
|
+
let SnapshotFiller = function () {
|
13
13
|
this._onRequest = this._onRequest.bind(this);
|
14
14
|
|
15
15
|
this._rics = {};
|
@@ -92,16 +92,16 @@ SnapshotFiller.clearMockAdc = function() {
|
|
92
92
|
*/
|
93
93
|
SnapshotFiller.prototype.setADCOptions = function (adcOptions) {
|
94
94
|
|
95
|
-
|
95
|
+
let val = adcOptions["productId"];
|
96
96
|
if(val) {
|
97
97
|
this._adcOptions.productId = val;
|
98
98
|
}
|
99
99
|
// TODO: support requesting level parameter https://confluence.refinitiv.com/display/ADC/Request+level+parameters
|
100
|
-
//
|
100
|
+
// let val = adcOptions["lang"];
|
101
101
|
// if(val) {
|
102
102
|
// this._adcOptions.lang = val;
|
103
103
|
// }
|
104
|
-
//
|
104
|
+
// let val = adcOptions["cache"];
|
105
105
|
// if(val) {
|
106
106
|
// this._adcOptions.cache = val;
|
107
107
|
// }
|
@@ -129,10 +129,10 @@ SnapshotFiller.prototype.addRic = function (ric) {
|
|
129
129
|
* @return {boolean}
|
130
130
|
*/
|
131
131
|
SnapshotFiller.prototype.addRics = function (rics) {
|
132
|
-
|
133
|
-
|
134
|
-
for(
|
135
|
-
|
132
|
+
let len = rics ? rics.length : 0;
|
133
|
+
let dirty = false;
|
134
|
+
for(let i = 0; i < len; ++i) {
|
135
|
+
let ric = rics[i];
|
136
136
|
if (ric && !this._rics[ric]) {
|
137
137
|
this._rics[ric] = 1;
|
138
138
|
dirty = true;
|
@@ -157,9 +157,9 @@ SnapshotFiller.prototype.addField = function (str) {
|
|
157
157
|
* @return {boolean}
|
158
158
|
*/
|
159
159
|
SnapshotFiller.prototype.addFields = function (fields) {
|
160
|
-
|
161
|
-
|
162
|
-
for(
|
160
|
+
let len = fields.length;
|
161
|
+
let dirty = 0;
|
162
|
+
for(let i = 0; i < len; ++i) {
|
163
163
|
dirty |= this._addField(fields[i]);
|
164
164
|
}
|
165
165
|
if(dirty) {
|
@@ -204,7 +204,7 @@ SnapshotFiller.prototype._request = function () {
|
|
204
204
|
SnapshotFiller.prototype._onRequest = function () {
|
205
205
|
this._timerId = 0;
|
206
206
|
|
207
|
-
|
207
|
+
let jet = window["JET"]; // Assume that JET is already exist.
|
208
208
|
if (this._rtk) {
|
209
209
|
if (!this._rtk.Data) {
|
210
210
|
return; // Require RTK.Data plugin to get snapshot data
|
@@ -214,20 +214,20 @@ SnapshotFiller.prototype._onRequest = function () {
|
|
214
214
|
}
|
215
215
|
|
216
216
|
// Retrieve instruments and ADC fields
|
217
|
-
|
217
|
+
let instruments = Object.keys(this._rics);
|
218
218
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
for (
|
219
|
+
let i;
|
220
|
+
let fields = [];
|
221
|
+
let timeSeriesFields = [];
|
222
|
+
for (let field in this._fields) {
|
223
223
|
if(!FieldDefinition.isTimeSeries(field)) {
|
224
224
|
fields.push(field);
|
225
225
|
} else {
|
226
226
|
timeSeriesFields.push(field);
|
227
227
|
}
|
228
228
|
}
|
229
|
-
|
230
|
-
|
229
|
+
let fieldLen = fields.length;
|
230
|
+
let timeSeriesFieldLen = timeSeriesFields.length;
|
231
231
|
|
232
232
|
if ( (!fieldLen && !timeSeriesFieldLen ) || !instruments.length) { // No ADC field or real-time RIC
|
233
233
|
return;
|
@@ -237,13 +237,13 @@ SnapshotFiller.prototype._onRequest = function () {
|
|
237
237
|
this._rics = {};
|
238
238
|
this._fields = {};
|
239
239
|
|
240
|
-
|
240
|
+
let onSuccess, payload;
|
241
241
|
if (this._rtk) {
|
242
|
-
|
242
|
+
let strFields;
|
243
243
|
// Request time serie fields
|
244
244
|
if(timeSeriesFields.length > 0) {
|
245
245
|
// request time series field
|
246
|
-
|
246
|
+
let strtTimeSeriesFields = timeSeriesFields.join(',');
|
247
247
|
payload = {
|
248
248
|
"method": "select",
|
249
249
|
"formula": strtTimeSeriesFields,
|
@@ -252,7 +252,7 @@ SnapshotFiller.prototype._onRequest = function () {
|
|
252
252
|
"output": "Col,date|,Row,In|,va,T,NoEmptyTickers" // For customize output server, for more information please visit "https://confluence.refinitiv.com/display/ADC/Data+Cloud+Output+Format"
|
253
253
|
};
|
254
254
|
onSuccess = this._onRTKTimeSeriesSuccess.bind(this, timeSeriesFields);
|
255
|
-
|
255
|
+
let responseMockAdc = SnapshotFiller.getMockAdc(payload.formula);
|
256
256
|
if(responseMockAdc) {
|
257
257
|
setTimeout(function() {
|
258
258
|
onSuccess(responseMockAdc);
|
@@ -288,7 +288,7 @@ SnapshotFiller.prototype._onRequest = function () {
|
|
288
288
|
|
289
289
|
|
290
290
|
} else {
|
291
|
-
|
291
|
+
let reqFields = [];
|
292
292
|
for(i = 0; i < fieldLen; i++) {
|
293
293
|
reqFields.push({ "name": fields[i] });
|
294
294
|
}
|
@@ -314,8 +314,8 @@ SnapshotFiller.prototype._onRequest = function () {
|
|
314
314
|
*/
|
315
315
|
SnapshotFiller.prototype._onJETSuccess = function (fields, serverResult) {
|
316
316
|
this._dispatch("adcDataReceived", serverResult);
|
317
|
-
|
318
|
-
|
317
|
+
let data2D = serverResult["data"];
|
318
|
+
let svHeaders = serverResult["headers"] && serverResult["headers"][0];
|
319
319
|
|
320
320
|
if (!Array.isArray(data2D) || !Array.isArray(svHeaders)) {
|
321
321
|
return; //TODO: Return Promise.reject(errMsg);
|
@@ -325,11 +325,11 @@ SnapshotFiller.prototype._onJETSuccess = function (fields, serverResult) {
|
|
325
325
|
// Server will return field only in UPPERCASE
|
326
326
|
// ex. requestField = TR.Volume ===> serverField = TR.VOLUME
|
327
327
|
// so we need convert UPPERCASE to be original
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
328
|
+
let i, field, ric;
|
329
|
+
let j = 1; // to skip instrument index, use j = 1
|
330
|
+
let fLength = fields.length;
|
331
|
+
let hLength = svHeaders.length;
|
332
|
+
let headers = new Array(hLength);
|
333
333
|
for (i = 0; i < fLength && j < hLength; i++) {
|
334
334
|
field = fields[i];
|
335
335
|
if (svHeaders[j].field === field.toUpperCase()) {
|
@@ -338,24 +338,24 @@ SnapshotFiller.prototype._onJETSuccess = function (fields, serverResult) {
|
|
338
338
|
}
|
339
339
|
}
|
340
340
|
|
341
|
-
|
342
|
-
|
343
|
-
|
341
|
+
let len = data2D.length;
|
342
|
+
let fieldLen = headers.length;
|
343
|
+
let ricMap = {};
|
344
344
|
|
345
345
|
// TODO: Freeze the data view before setting multiple data
|
346
346
|
for (i = 0; i < len; i++) {
|
347
|
-
|
347
|
+
let dataRow = data2D[i];
|
348
348
|
ric = dataRow[0];
|
349
349
|
|
350
350
|
if (ricMap[ric]) {
|
351
351
|
continue; // we interested only first row of ric
|
352
352
|
}
|
353
353
|
|
354
|
-
|
354
|
+
let snapData = ricMap[ric] = {};
|
355
355
|
|
356
356
|
// loop for create rowData for update
|
357
357
|
for (j = 1; j < fieldLen; j++) { // to skip instrument index, use j = 1
|
358
|
-
|
358
|
+
let value = dataRow[j];
|
359
359
|
if (value != null && value !== "") {
|
360
360
|
field = headers[j];
|
361
361
|
snapData[field] = value;
|
@@ -364,9 +364,9 @@ SnapshotFiller.prototype._onJETSuccess = function (fields, serverResult) {
|
|
364
364
|
}
|
365
365
|
|
366
366
|
// return result only ric that has update data
|
367
|
-
|
367
|
+
let updatedData = {};
|
368
368
|
for (ric in ricMap) {
|
369
|
-
|
369
|
+
let obj = ricMap[ric];
|
370
370
|
if (!isEmptyObject(obj)) {
|
371
371
|
updatedData[ric] = obj;
|
372
372
|
}
|
@@ -384,8 +384,8 @@ SnapshotFiller.prototype._onJETSuccess = function (fields, serverResult) {
|
|
384
384
|
*/
|
385
385
|
SnapshotFiller.prototype._onRTKSuccess = function (fields, serverResult) {
|
386
386
|
this._dispatch("adcDataReceived", serverResult);
|
387
|
-
|
388
|
-
|
387
|
+
let data2D = serverResult["rows"];
|
388
|
+
let svHeaders = serverResult["rows"] && serverResult["rows"][0];
|
389
389
|
if (!Array.isArray(data2D) || !Array.isArray(svHeaders)) {
|
390
390
|
return; //TODO: Return Promise.reject(errMsg);
|
391
391
|
}
|
@@ -393,11 +393,11 @@ SnapshotFiller.prototype._onRTKSuccess = function (fields, serverResult) {
|
|
393
393
|
// Server will return field only in UPPERCASE
|
394
394
|
// ex. requestField = TR.Volume ===> serverField = TR.VOLUME
|
395
395
|
// so we need convert UPPERCASE to be original
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
396
|
+
let i, field, ric;
|
397
|
+
let j = 1; // to skip instrument index, use j = 1
|
398
|
+
let fLength = fields.length;
|
399
|
+
let hLength = svHeaders.length;
|
400
|
+
let headers = new Array(hLength);
|
401
401
|
for (i = 0; i < fLength && j < hLength; i++) {
|
402
402
|
field = fields[i];
|
403
403
|
if (svHeaders[j].r.toUpperCase() === field.toUpperCase()) {
|
@@ -406,23 +406,23 @@ SnapshotFiller.prototype._onRTKSuccess = function (fields, serverResult) {
|
|
406
406
|
}
|
407
407
|
}
|
408
408
|
|
409
|
-
|
410
|
-
|
411
|
-
|
409
|
+
let len = data2D.length;
|
410
|
+
let fieldLen = headers.length;
|
411
|
+
let ricMap = {};
|
412
412
|
|
413
413
|
// TODO: Freeze the data view before setting multiple data
|
414
414
|
for (i = 1; i < len; i++) { // to skip column header index, use i = 1
|
415
|
-
|
415
|
+
let dataRow = data2D[i];
|
416
416
|
ric = dataRow[0];
|
417
417
|
|
418
418
|
if (ricMap[ric]) {
|
419
419
|
continue; // we interested only first row of ric
|
420
420
|
}
|
421
|
-
|
421
|
+
let snapData = ricMap[ric] = {};
|
422
422
|
|
423
423
|
// loop for create rowData for update
|
424
424
|
for (j = 1; j < fieldLen; j++) { // to skip instrument index, use j = 1
|
425
|
-
|
425
|
+
let value = dataRow[j];
|
426
426
|
if (value != null && value !== "") {
|
427
427
|
if(typeof value !== 'object') {
|
428
428
|
field = headers[j];
|
@@ -437,9 +437,9 @@ SnapshotFiller.prototype._onRTKSuccess = function (fields, serverResult) {
|
|
437
437
|
}
|
438
438
|
|
439
439
|
// return result only ric that has update data
|
440
|
-
|
440
|
+
let updatedData = {};
|
441
441
|
for (ric in ricMap) {
|
442
|
-
|
442
|
+
let obj = ricMap[ric];
|
443
443
|
if (!isEmptyObject(obj)) {
|
444
444
|
updatedData[ric] = obj;
|
445
445
|
}
|
@@ -460,45 +460,45 @@ SnapshotFiller.prototype._onRTKTimeSeriesSuccess = function (fields, serverResul
|
|
460
460
|
|
461
461
|
// TODO: noti the user for change structure
|
462
462
|
this._dispatch("adcDataReceived", serverResult);
|
463
|
-
|
464
|
-
|
463
|
+
let data2D = serverResult["rows"];
|
464
|
+
let svHeaders = serverResult["rows"] && serverResult["rows"][0];
|
465
465
|
if (!Array.isArray(data2D) || !Array.isArray(svHeaders)) {
|
466
466
|
return; // TODO: Return Promise.reject(errMsg);
|
467
467
|
}
|
468
468
|
// Extract header dates
|
469
|
-
|
469
|
+
let headerDates = svHeaders.slice(2).map(header => header.v);
|
470
470
|
// Create necessary variables
|
471
|
-
|
472
|
-
|
471
|
+
let fileNameToTSField = {};
|
472
|
+
let count = 0;
|
473
473
|
// Convert map to fieldMap
|
474
|
-
|
475
|
-
for (
|
476
|
-
|
477
|
-
|
474
|
+
let data2DLength = data2D.length;
|
475
|
+
for (let i = 1; i < data2DLength; i++) {
|
476
|
+
let dataRow = data2D[i];
|
477
|
+
let fieldName = dataRow[1];
|
478
478
|
if (!fileNameToTSField[fieldName]) {
|
479
479
|
fileNameToTSField[fieldName] = fields[count++];
|
480
480
|
}
|
481
481
|
}
|
482
482
|
// Process data and populate ricMap and childrenFieldToParent
|
483
|
-
|
484
|
-
|
485
|
-
for (
|
486
|
-
|
487
|
-
|
488
|
-
|
483
|
+
let ricMap = {};
|
484
|
+
let childrenFieldToParent = {};
|
485
|
+
for (let i = 1; i < data2DLength; i++) {
|
486
|
+
let dataRow = data2D[i];
|
487
|
+
let ric = dataRow[0];
|
488
|
+
let fieldName = dataRow[1];
|
489
489
|
|
490
490
|
if (!ricMap[ric]) {
|
491
491
|
ricMap[ric] = {};
|
492
492
|
}
|
493
|
-
|
493
|
+
let snapData = ricMap[ric];
|
494
494
|
if (headerDates.length === 1) {
|
495
495
|
// Time series with only 1 column, it will be a normal adc field
|
496
496
|
snapData[fileNameToTSField[fieldName]] = dataRow[2];
|
497
497
|
} else {
|
498
498
|
// Multiple columns, it will be a time series field
|
499
|
-
for (
|
500
|
-
|
501
|
-
|
499
|
+
for (let k = 0; k < headerDates.length; k++) {
|
500
|
+
let field = fileNameToTSField[fieldName].replace("TR.", "") + "_" + headerDates[k];
|
501
|
+
let celLData = dataRow[2 + k];
|
502
502
|
if(celLData !== null) {
|
503
503
|
childrenFieldToParent[field] = fileNameToTSField[fieldName];
|
504
504
|
snapData[field] = celLData;
|
@@ -508,16 +508,16 @@ SnapshotFiller.prototype._onRTKTimeSeriesSuccess = function (fields, serverResul
|
|
508
508
|
}
|
509
509
|
|
510
510
|
// Return result only for ric that has updated data
|
511
|
-
|
512
|
-
for (
|
513
|
-
|
511
|
+
let dataMapping = {};
|
512
|
+
for (let ric in ricMap) {
|
513
|
+
let obj = ricMap[ric];
|
514
514
|
if (!isEmptyObject(obj)) {
|
515
515
|
dataMapping[ric] = obj;
|
516
516
|
}
|
517
517
|
}
|
518
518
|
|
519
519
|
// Dispatch events based on the header length
|
520
|
-
|
520
|
+
let eventData = {
|
521
521
|
data: dataMapping,
|
522
522
|
};
|
523
523
|
if (headerDates.length > 1) {
|
@@ -8,6 +8,7 @@ declare namespace StatisticsRowPlugin {
|
|
8
8
|
invalidText?: string|null,
|
9
9
|
noColoring?: boolean|null,
|
10
10
|
noFormatting?: boolean|null,
|
11
|
+
useAllData?: boolean|null,
|
11
12
|
postCalculation?: ((...params: any[]) => any)|null,
|
12
13
|
postRendering?: ((...params: any[]) => any)|null
|
13
14
|
};
|
@@ -7,6 +7,7 @@ import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
|
|
7
7
|
* @property {string=} invalidText="" Text to be shown for invalid statistic (i.e. Not a Number value)
|
8
8
|
* @property {boolean=} noColoring=false If enabled, all conditional coloring (i.e. tick coloring) will not automatically be applied.
|
9
9
|
* @property {boolean=} noFormatting=false If enabled, all formatting (i.e. decimal places) will not automatically be applied.
|
10
|
+
* @property {boolean=} useAllData=true If disabled, filtered out rows will not be included in the calculation.
|
10
11
|
* @property {Function=} postCalculation Function handler excuted after statistics calculation and before default rendering
|
11
12
|
* @property {Function=} postRendering Function handler excuted after default rendering
|
12
13
|
*/
|
@@ -163,7 +164,10 @@ StatisticsRowPlugin.prototype._ccExt = null;
|
|
163
164
|
* @private
|
164
165
|
*/
|
165
166
|
StatisticsRowPlugin.prototype._disabledUIs = false;
|
166
|
-
|
167
|
+
/** @type {boolean}
|
168
|
+
* @private
|
169
|
+
*/
|
170
|
+
StatisticsRowPlugin.prototype._useAllData = true;
|
167
171
|
/** @public
|
168
172
|
* @return {string}
|
169
173
|
*/
|
@@ -248,6 +252,9 @@ StatisticsRowPlugin.prototype.config = function (options) {
|
|
248
252
|
if(extOptions.noFormatting != null) {
|
249
253
|
this._noFormatting = extOptions.noFormatting ? true : false;
|
250
254
|
}
|
255
|
+
if(extOptions.useAllData != null) {
|
256
|
+
this._useAllData = extOptions.useAllData ? true : false;
|
257
|
+
}
|
251
258
|
this.addListener(extOptions, "postCalculation");
|
252
259
|
this.addListener(extOptions, "postRendering");
|
253
260
|
|
@@ -314,6 +321,10 @@ StatisticsRowPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
314
321
|
extOptions.noFormatting = this._noFormatting;
|
315
322
|
}
|
316
323
|
|
324
|
+
if(!this._useAllData) {
|
325
|
+
extOptions.useAllData = this._useAllData;
|
326
|
+
}
|
327
|
+
|
317
328
|
return obj;
|
318
329
|
};
|
319
330
|
|
@@ -619,7 +630,12 @@ StatisticsRowPlugin.prototype._onPostSectionDataBinding = function (e) {
|
|
619
630
|
var colCount = host.getColumnCount();
|
620
631
|
var dv = host.getDataSource();
|
621
632
|
var dt = dv.getDataSource();
|
622
|
-
var rows
|
633
|
+
var rows;
|
634
|
+
if(this._useAllData) {
|
635
|
+
rows = dt.getAllRowData(); // Slow: A new copy of data is created
|
636
|
+
} else {
|
637
|
+
rows = dv.getAllRowData();
|
638
|
+
}
|
623
639
|
var rowCount = rows.length;
|
624
640
|
|
625
641
|
var fields = null;
|
@@ -89,10 +89,6 @@ declare class InCellEditingPlugin extends GridPlugin {
|
|
89
89
|
|
90
90
|
public _getRowIndex(rowId: string): number;
|
91
91
|
|
92
|
-
public _getRowId(rowIndex: number): string;
|
93
|
-
|
94
|
-
public getActiveGrid(): any|null|null;
|
95
|
-
|
96
92
|
public getActiveColIndex(): number;
|
97
93
|
|
98
94
|
public getActiveRowIndex(): number;
|
@@ -959,7 +959,7 @@ InCellEditingPlugin.prototype._getRowIndex = function (rowId) {
|
|
959
959
|
};
|
960
960
|
|
961
961
|
/**
|
962
|
-
* @
|
962
|
+
* @private
|
963
963
|
* @param {number} rowIndex
|
964
964
|
* @return {!string} return empty string if not found
|
965
965
|
*/
|
@@ -971,7 +971,7 @@ InCellEditingPlugin.prototype._getRowId = function (rowIndex) {
|
|
971
971
|
return "";
|
972
972
|
};
|
973
973
|
|
974
|
-
/** @
|
974
|
+
/** @private
|
975
975
|
* @return {Object|null} core grid object
|
976
976
|
*/
|
977
977
|
InCellEditingPlugin.prototype.getActiveGrid = function () {
|
@@ -7,29 +7,29 @@ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
|
|
7
7
|
declare namespace PercentBarPlugin {
|
8
8
|
|
9
9
|
type Options = {
|
10
|
-
padding?: number,
|
11
|
-
percentageLabel?: boolean,
|
12
|
-
autoTextSizing?: boolean,
|
13
|
-
autoFitting?: boolean,
|
14
|
-
zeroValueHidden?: boolean
|
10
|
+
padding?: number|null,
|
11
|
+
percentageLabel?: boolean|null,
|
12
|
+
autoTextSizing?: boolean|null,
|
13
|
+
autoFitting?: boolean|null,
|
14
|
+
zeroValueHidden?: boolean|null
|
15
15
|
};
|
16
16
|
|
17
17
|
type PercentBarOptions = {
|
18
|
-
alignment?: string,
|
19
|
-
field?: string,
|
20
|
-
textHidden?: boolean,
|
21
|
-
textWidth?: (number|string),
|
22
|
-
useMovementColor?: boolean,
|
23
|
-
barColor?: string,
|
24
|
-
padding?: number,
|
25
|
-
percentageLabel?: boolean,
|
26
|
-
autoTextSizing?: boolean,
|
27
|
-
autoFitting?: boolean,
|
28
|
-
zeroValueHidden?: boolean
|
18
|
+
alignment?: string|null,
|
19
|
+
field?: string|null,
|
20
|
+
textHidden?: boolean|null,
|
21
|
+
textWidth?: (number|string)|null,
|
22
|
+
useMovementColor?: boolean|null,
|
23
|
+
barColor?: string|null,
|
24
|
+
padding?: number|null,
|
25
|
+
percentageLabel?: boolean|null,
|
26
|
+
autoTextSizing?: boolean|null,
|
27
|
+
autoFitting?: boolean|null,
|
28
|
+
zeroValueHidden?: boolean|null
|
29
29
|
};
|
30
30
|
|
31
31
|
type ColumnOptions = {
|
32
|
-
percentBar?: (PercentBarPlugin.PercentBarOptions|boolean)
|
32
|
+
percentBar?: (PercentBarPlugin.PercentBarOptions|boolean)|null
|
33
33
|
};
|
34
34
|
|
35
35
|
}
|
@@ -50,7 +50,7 @@ declare class PercentBarPlugin extends GridPlugin {
|
|
50
50
|
|
51
51
|
public setPercentBarAlignment(colIndex: number, alignment: string): void;
|
52
52
|
|
53
|
-
public setColumnPercentBar(colIndex: number, columnOptions: PercentBarPlugin.ColumnOptions): void;
|
53
|
+
public setColumnPercentBar(colIndex: number, columnOptions: PercentBarPlugin.ColumnOptions|null): void;
|
54
54
|
|
55
55
|
public reloadThemeColors(): Promise<any>|null;
|
56
56
|
|
@@ -128,7 +128,9 @@ PercentBarPlugin.prototype.initialize = function (host, options) {
|
|
128
128
|
ElfUtil.getThemeColors(this._onThemeLoaded).then(this._onThemeLoaded)["catch"](this._onThemeLoaded);
|
129
129
|
}
|
130
130
|
};
|
131
|
-
/** @override
|
131
|
+
/** @override
|
132
|
+
* @ignore
|
133
|
+
*/
|
132
134
|
|
133
135
|
|
134
136
|
PercentBarPlugin.prototype._afterInit = function () {
|
@@ -264,6 +266,10 @@ PercentBarPlugin.prototype.getColumnConfigObject = function (colIndex, out_obj)
|
|
264
266
|
percentBar.autoFitting = opt.autoFitting;
|
265
267
|
}
|
266
268
|
|
269
|
+
if (opt.zeroValueHidden != null) {
|
270
|
+
percentBar.zeroValueHidden = opt.zeroValueHidden;
|
271
|
+
}
|
272
|
+
|
267
273
|
return out_obj;
|
268
274
|
};
|
269
275
|
/** Get a current state of grid and extension config
|
@@ -131,6 +131,8 @@ declare class RowFilteringPlugin extends GridPlugin {
|
|
131
131
|
|
132
132
|
declare function colSettings(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
|
133
133
|
|
134
|
+
declare function selCount(sortOrder: string): void;
|
135
|
+
|
134
136
|
declare function crf(enabled?: boolean|null): void;
|
135
137
|
|
136
138
|
export default RowFilteringPlugin;
|