@refinitiv-ui/efx-grid 6.0.33 → 6.0.34
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +112 -36
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataTable.d.ts +1 -1
- package/lib/core/es6/data/DataTable.js +9 -8
- package/lib/core/es6/data/DataView.js +1 -1
- package/lib/core/es6/data/Segment.d.ts +2 -0
- package/lib/core/es6/data/Segment.js +16 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +1 -3
- package/lib/core/es6/data/SegmentCollection.js +25 -18
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +7 -7
- 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 +2 -0
- 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 +425 -153
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.js +13 -8
- package/lib/rt-grid/es6/DataConnector.js +3 -2
- package/lib/rt-grid/es6/Grid.d.ts +3 -1
- package/lib/rt-grid/es6/Grid.js +116 -15
- package/lib/rt-grid/es6/RowDefinition.d.ts +7 -2
- package/lib/rt-grid/es6/RowDefinition.js +48 -10
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +1 -0
- package/lib/rt-grid/es6/SnapshotFiller.js +1 -11
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +21 -10
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +12 -5
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +128 -42
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +3 -3
- package/lib/tr-grid-heat-map/es6/HeatMap.js +13 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +2 -1
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +142 -17
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +20 -20
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +37 -138
- package/lib/tr-grid-util/es6/CellPainter.d.ts +1 -1
- package/lib/tr-grid-util/es6/CellPainter.js +56 -55
- package/lib/tr-grid-util/es6/FieldFormatter.js +6 -2
- package/lib/tr-grid-util/es6/NumberFormatter.js +23 -11
- package/lib/tr-grid-util/es6/Util.d.ts +3 -0
- package/lib/tr-grid-util/es6/Util.js +53 -0
- package/lib/types/es6/ConditionalColoring.d.ts +12 -5
- package/lib/types/es6/Core/data/Segment.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +1 -3
- package/lib/types/es6/Core/grid/Core.d.ts +4 -0
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +1 -0
- package/lib/types/es6/HeatMap.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +3 -1
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +7 -2
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +1 -0
- package/lib/types/es6/RowDragging.d.ts +2 -1
- package/lib/types/es6/TextFormatting.d.ts +20 -20
- package/lib/versions.json +6 -6
- package/package.json +1 -1
@@ -237,25 +237,17 @@ CellPainter.prototype.clearHeatMap = function() {
|
|
237
237
|
/** @public */
|
238
238
|
CellPainter.prototype.applyThemeColor = function() {
|
239
239
|
var colors = ElfUtil.getColors();
|
240
|
-
|
241
|
-
|
242
|
-
if(
|
240
|
+
if(this._coloringType === CellPainter.ColoringTypes.HEATMAP) { // Heatmap uses grid color to blend the result color
|
241
|
+
var cond = this._conditions[0]; // Heatmap, color text condition must be the first
|
242
|
+
if(cond) {
|
243
243
|
if(cond["textMode"]) {
|
244
244
|
cond["baseColor"] = colors["baseText"];
|
245
245
|
} else {
|
246
246
|
cond["baseColor"] = colors["baseGrid"];
|
247
247
|
}
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
var up, down;
|
252
|
-
if(this._coloringType === CellPainter.ColoringTypes.TEXT && cond["field"] === "CF_TICK") {
|
253
|
-
up = colors["tickUp"];
|
254
|
-
down = colors["tickDown"];
|
255
|
-
} else {
|
256
|
-
up = colors["up"];
|
257
|
-
down = colors["down"];
|
258
|
-
}
|
248
|
+
if(cond["useThemeColor"]) {
|
249
|
+
var up = colors["up"];
|
250
|
+
var down = colors["down"];
|
259
251
|
var level = (colors["level"] === colors["baseText"]) ? "" : colors["level"];
|
260
252
|
CellPainter._setUpDownColors(cond, up, down, level);
|
261
253
|
}
|
@@ -374,34 +366,36 @@ CellPainter.prototype.addHeatmapWithTheme = function(field, midPoint, opt_textMo
|
|
374
366
|
/** @private
|
375
367
|
* @param {Function} expression
|
376
368
|
* @param {string} field
|
377
|
-
* @param {string}
|
378
|
-
* @param {string}
|
379
|
-
* @param {string}
|
369
|
+
* @param {string=} upClass CSS class name
|
370
|
+
* @param {string=} downClass CSS class name
|
371
|
+
* @param {string=} levelClass CSS class name
|
380
372
|
* @return {!Object}
|
381
373
|
*/
|
382
|
-
CellPainter.prototype._addColorText = function(expression, field,
|
374
|
+
CellPainter.prototype._addColorText = function(expression, field, upClass, downClass, levelClass) {
|
383
375
|
this._setColoringType(CellPainter.ColoringTypes.TEXT);
|
384
376
|
|
385
377
|
var condition = {};
|
386
378
|
condition["field"] = field;
|
387
379
|
condition["expression"] = expression.bind(null, field);
|
388
|
-
|
380
|
+
condition["upClass"] = upClass;
|
381
|
+
condition["downClass"] = downClass;
|
382
|
+
condition["levelClass"] = levelClass;
|
389
383
|
|
390
384
|
this._addCondition(condition);
|
391
385
|
return condition;
|
392
386
|
};
|
393
387
|
/** @public
|
394
388
|
* @param {string} field
|
395
|
-
* @param {string}
|
396
|
-
* @param {string}
|
397
|
-
* @param {string}
|
389
|
+
* @param {string=} upClass CSS class name
|
390
|
+
* @param {string=} downClass CSS class name
|
391
|
+
* @param {string=} levelClass CSS class name
|
398
392
|
* @return {!Object}
|
399
393
|
*/
|
400
|
-
CellPainter.prototype.addColorText = function(field,
|
394
|
+
CellPainter.prototype.addColorText = function(field, upClass, downClass, levelClass) {
|
401
395
|
return this._addColorText(
|
402
396
|
TickFields[field] ? CellPainter._tickColorTextCondition : CellPainter._colorTextCondition,
|
403
397
|
field,
|
404
|
-
|
398
|
+
upClass, downClass, levelClass
|
405
399
|
);
|
406
400
|
};
|
407
401
|
/** @public
|
@@ -409,14 +403,7 @@ CellPainter.prototype.addColorText = function(field, upColor, downColor, levelCo
|
|
409
403
|
* @return {!Object}
|
410
404
|
*/
|
411
405
|
CellPainter.prototype.addColorTextWithTheme = function(field) {
|
412
|
-
var
|
413
|
-
var condition = this.addColorText(field,
|
414
|
-
colors["up"],
|
415
|
-
colors["down"],
|
416
|
-
(colors["level"] === colors["baseText"]) ? "" : colors["level"]
|
417
|
-
);
|
418
|
-
|
419
|
-
condition["useThemeColor"] = true;
|
406
|
+
var condition = this.addColorText(field, "positive", "negative", "neutral");
|
420
407
|
return condition;
|
421
408
|
};
|
422
409
|
/** @public
|
@@ -518,14 +505,16 @@ CellPainter.prototype.renderForPrinting = function(cell, rowData, min, max) {
|
|
518
505
|
return;
|
519
506
|
}
|
520
507
|
var styles = this._getStyles(rowData, min, max);
|
521
|
-
var cssClass = styles["cssClass"];
|
522
|
-
if (cssClass) {
|
523
|
-
if (
|
524
|
-
|
525
|
-
|
508
|
+
var cssClass = styles["cssClass"]; // Can be an empty string
|
509
|
+
if (cssClass != null) { // Predefined colors mode
|
510
|
+
if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
|
511
|
+
elem.classList.remove(elem._coloringCssClass);
|
512
|
+
elem._coloringCssClass = null;
|
513
|
+
}
|
514
|
+
if (cssClass) {
|
515
|
+
elem.classList.add(cssClass);
|
516
|
+
elem._coloringCssClass = cssClass;
|
526
517
|
}
|
527
|
-
cell.classList.add(cssClass);
|
528
|
-
cell._coloringCssClass = cssClass;
|
529
518
|
} else {
|
530
519
|
if (cell._coloringCssClass) {
|
531
520
|
cell.classList.remove(cell._coloringCssClass);
|
@@ -658,14 +647,17 @@ CellPainter._cellRestorer = function(scope) {
|
|
658
647
|
}
|
659
648
|
|
660
649
|
var styles = this._getStyles(rowData, min, max);
|
661
|
-
var cssClass = styles["cssClass"];
|
662
|
-
if (cssClass) {
|
650
|
+
var cssClass = styles["cssClass"]; // Can be an empty string
|
651
|
+
if (cssClass != null) { // Predefined colors mode
|
663
652
|
if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
|
664
653
|
elem.classList.remove(elem._coloringCssClass);
|
665
654
|
elem._coloringCssClass = null;
|
666
655
|
}
|
667
|
-
|
668
|
-
|
656
|
+
if (cssClass) {
|
657
|
+
elem.classList.add(cssClass);
|
658
|
+
elem._coloringCssClass = cssClass;
|
659
|
+
}
|
660
|
+
// Remove blinking color
|
669
661
|
elem.style.backgroundColor = "";
|
670
662
|
elem.style.color = "";
|
671
663
|
} else {
|
@@ -720,13 +712,14 @@ CellPainter.prototype._getStyles = function(rowData, min, max) {
|
|
720
712
|
}
|
721
713
|
} else if(this._coloringType === CellPainter.ColoringTypes.TEXT) {
|
722
714
|
if(ret > 0) {
|
723
|
-
|
715
|
+
curCond["cssClass"] = curCond["upClass"];
|
724
716
|
} else if(ret < 0) {
|
725
|
-
|
717
|
+
curCond["cssClass"] = curCond["downClass"];
|
726
718
|
} else {
|
727
|
-
|
719
|
+
curCond["cssClass"] = this._levelColorDisabled ? "" : curCond["levelClass"];
|
728
720
|
}
|
729
|
-
|
721
|
+
curCond["cssClass"] = curCond["cssClass"] || "";
|
722
|
+
return curCond;
|
730
723
|
}
|
731
724
|
|
732
725
|
// Expected return value is {
|
@@ -902,6 +895,10 @@ CellPainter.clearCellStyle = function(cell, styles) {
|
|
902
895
|
// WARNING: Scope is not removed from the this._scopes collection to speed things up
|
903
896
|
}
|
904
897
|
|
898
|
+
if(elem._coloringCssClass) {
|
899
|
+
elem.classList.remove(elem._coloringCssClass);
|
900
|
+
}
|
901
|
+
|
905
902
|
styles = styles || CellPainter.supportedStyles;
|
906
903
|
for(var i = styles.length; --i >= 0;) {
|
907
904
|
elem.style[styles[i]] = ""; // WARNING: Very slow
|
@@ -915,22 +912,24 @@ CellPainter.clearCellStyle = function(cell, styles) {
|
|
915
912
|
* @param {boolean=} withContrast
|
916
913
|
*/
|
917
914
|
CellPainter._setUpDownColors = function(scp, upColor, downColor, levelColor, withContrast) {
|
915
|
+
scp["upColor"] = upColor;
|
918
916
|
if(upColor != null) {
|
919
|
-
scp["upColor"] = upColor;
|
920
917
|
if(withContrast) {
|
921
918
|
scp["contrastUpColor"] = CellPainter.getOppositeColor(upColor);
|
922
919
|
}
|
923
920
|
//scp["rgbUp"] = CellPainter.hex2Rgb(upColor);
|
924
921
|
}
|
922
|
+
|
923
|
+
scp["downColor"] = downColor;
|
925
924
|
if(downColor != null) {
|
926
|
-
scp["downColor"] = downColor;
|
927
925
|
if(withContrast) {
|
928
926
|
scp["contrastDownColor"] = CellPainter.getOppositeColor(downColor);
|
929
927
|
}
|
930
928
|
//scp["rgbDown"] = CellPainter.hex2Rgb(downColor);
|
931
929
|
}
|
930
|
+
|
931
|
+
scp["levelColor"] = levelColor;
|
932
932
|
if(levelColor != null) {
|
933
|
-
scp["levelColor"] = levelColor;
|
934
933
|
if(withContrast) {
|
935
934
|
scp["contrastLevelColor"] = CellPainter.getOppositeColor(levelColor);
|
936
935
|
}
|
@@ -1024,14 +1023,16 @@ CellPainter.prototype._paintCell = function(cell, rowData, min, max) {
|
|
1024
1023
|
}
|
1025
1024
|
|
1026
1025
|
var styles = this._getStyles(rowData, min, max);
|
1027
|
-
var cssClass = styles["cssClass"];
|
1028
|
-
if (cssClass) {
|
1029
|
-
if (elem._coloringCssClass !== cssClass) {
|
1026
|
+
var cssClass = styles["cssClass"]; // Can be an empty string
|
1027
|
+
if (cssClass != null) { // Predefined colors mode
|
1028
|
+
if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
|
1030
1029
|
elem.classList.remove(elem._coloringCssClass);
|
1031
1030
|
elem._coloringCssClass = null;
|
1032
1031
|
}
|
1033
|
-
|
1034
|
-
|
1032
|
+
if (cssClass) {
|
1033
|
+
elem.classList.add(cssClass);
|
1034
|
+
elem._coloringCssClass = cssClass;
|
1035
|
+
}
|
1035
1036
|
} else {
|
1036
1037
|
if (elem._coloringCssClass) {
|
1037
1038
|
elem.classList.remove(elem._coloringCssClass);
|
@@ -189,8 +189,12 @@ FieldFormatter.prototype.getOptions = function(options) { // serialize
|
|
189
189
|
options["field"] = this._field;
|
190
190
|
options["formatType"] = this._userFormatType ? this._userFormatType : this._formatType; // WARNING: Beware of case sensitivity
|
191
191
|
if(toDateTimeType(options["formatType"]) == DATE_TIME){
|
192
|
-
|
193
|
-
|
192
|
+
if(this._dateTimeFormat !== "") {
|
193
|
+
options["dateTimeFormat"] = this._dateTimeFormat;
|
194
|
+
}
|
195
|
+
if(this._timeZone !== "GMT") {
|
196
|
+
options["useUTCTime"] = false;
|
197
|
+
} // useUTCTime by default, otherwise is use local
|
194
198
|
}
|
195
199
|
return options;
|
196
200
|
};
|
@@ -242,25 +242,37 @@ NumberFormatter.prototype.getOptions = function(options) { // serialize
|
|
242
242
|
|
243
243
|
var formatType = options["formatType"];
|
244
244
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
245
|
+
if(this._precisionEnabled !== true) {
|
246
|
+
options["precisionEnabled"] = this._precisionEnabled; // Default in init
|
247
|
+
}
|
248
|
+
|
249
|
+
if(this._precision !== 2) {
|
250
|
+
options["decimalPlaces"] = this._precision;
|
251
|
+
}
|
252
|
+
|
253
|
+
if(this._plusSignEnabled !== false) {
|
254
|
+
options["plusSign"] = this._plusSignEnabled;
|
255
|
+
}
|
256
|
+
|
257
|
+
if(this._separatorEnabled !== false) {
|
258
|
+
options["separator"] = this._separatorEnabled;
|
259
|
+
}
|
249
260
|
|
250
261
|
if(formatType === "scaled" || formatType === "scaledvalue") {
|
251
262
|
var su = "";
|
252
263
|
if(this._scaler == "b") {
|
253
264
|
su = "billion";
|
254
|
-
|
255
|
-
|
256
|
-
}
|
257
|
-
options["scalingUnit"] = su;
|
265
|
+
options["scalingUnit"] = su;
|
266
|
+
} // We didn't return default value (million) for clean up getConfigObject
|
258
267
|
}
|
259
268
|
|
260
269
|
if(formatType === "percent") {
|
261
|
-
|
262
|
-
|
263
|
-
|
270
|
+
if(this._percentSignEnabled !== true) {
|
271
|
+
options["percentSign"] = this._percentSignEnabled;
|
272
|
+
}
|
273
|
+
if(this._multiplyBy100Enabled !== false) {
|
274
|
+
options["multiplyBy100"] = this._multiplyBy100Enabled;
|
275
|
+
}
|
264
276
|
}
|
265
277
|
return options;
|
266
278
|
};
|
@@ -24,6 +24,8 @@ declare function arrayToObject(data?: any[]|null, fields?: (string)[]|null): any
|
|
24
24
|
|
25
25
|
declare function extendProperty(obj: any, extender: any, propName: string): void;
|
26
26
|
|
27
|
+
declare function deepEqual(obj1: any, obj2: any): boolean;
|
28
|
+
|
27
29
|
declare function extendArrayProperty(obj: any, propName: string, ary: any): any[]|null;
|
28
30
|
|
29
31
|
declare function parseCondition(expression: string|((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
|
@@ -52,6 +54,7 @@ export {
|
|
52
54
|
extendObject,
|
53
55
|
cloneObject,
|
54
56
|
isEmptyObject,
|
57
|
+
deepEqual,
|
55
58
|
arrayToObject,
|
56
59
|
extendProperty,
|
57
60
|
extendArrayProperty,
|
@@ -200,6 +200,58 @@ var extendProperty = function (obj, extender, propName) {
|
|
200
200
|
}
|
201
201
|
}
|
202
202
|
};
|
203
|
+
|
204
|
+
|
205
|
+
/** Compare the values of obj1 and obj2. if they are the same object or have the same value, the result will be true. Otherwise, it will return false.
|
206
|
+
* @public
|
207
|
+
* @param {*} obj1
|
208
|
+
* @param {*} obj2
|
209
|
+
* @return {boolean}
|
210
|
+
*/
|
211
|
+
var deepEqual = function (obj1, obj2) {
|
212
|
+
|
213
|
+
if(obj1 === obj2) {
|
214
|
+
return true;
|
215
|
+
}
|
216
|
+
|
217
|
+
if (typeof obj1 !== typeof obj2) {
|
218
|
+
return false;
|
219
|
+
}
|
220
|
+
|
221
|
+
if (typeof obj1 === "object") {
|
222
|
+
|
223
|
+
// We need to split array and object for performance reason
|
224
|
+
if(Array.isArray(obj1)) {
|
225
|
+
if(obj1.length !== obj2.length) {
|
226
|
+
return false;
|
227
|
+
}
|
228
|
+
|
229
|
+
for (var i = 0; i < obj1.length; i++) {
|
230
|
+
if (!deepEqual(obj1[i], obj2[i])) { // The array may not be a match if the elements are not sorted, so it will not be considered equal if there is a mismatch.
|
231
|
+
return false;
|
232
|
+
}
|
233
|
+
}
|
234
|
+
|
235
|
+
} else {
|
236
|
+
|
237
|
+
if (Object.keys(obj1).length !== Object.keys(obj2).length) {
|
238
|
+
return false;
|
239
|
+
}
|
240
|
+
|
241
|
+
for (var key in obj1) {
|
242
|
+
if (!deepEqual(obj1[key], obj2[key])) {
|
243
|
+
return false;
|
244
|
+
}
|
245
|
+
}
|
246
|
+
}
|
247
|
+
|
248
|
+
|
249
|
+
return true;
|
250
|
+
}
|
251
|
+
|
252
|
+
return false;
|
253
|
+
|
254
|
+
};
|
203
255
|
/** Array.push() is much faster than Array.concat(). The downside is the parameters must be an array, whereas concat() has no such requirement. <br>
|
204
256
|
* This method excels in extending known array property in an object.
|
205
257
|
* @public
|
@@ -527,6 +579,7 @@ export {
|
|
527
579
|
extendObject,
|
528
580
|
cloneObject,
|
529
581
|
isEmptyObject,
|
582
|
+
deepEqual,
|
530
583
|
arrayToObject,
|
531
584
|
extendProperty,
|
532
585
|
extendArrayProperty,
|
@@ -13,16 +13,16 @@ declare namespace ConditionalColoringPlugin {
|
|
13
13
|
|
14
14
|
type ColumnOptions = {
|
15
15
|
conditions?: (ConditionalColoringPlugin.Condition)[]|null,
|
16
|
-
colorText?: (string|boolean)|null,
|
17
|
-
tickColor?: (string|boolean)|null,
|
18
|
-
blinking?: (ConditionalColoringPlugin.Blinking
|
16
|
+
colorText?: (string|boolean|ConditionalColoringPlugin.ColorText)|null,
|
17
|
+
tickColor?: (string|boolean|ConditionalColoringPlugin.ColorText)|null,
|
18
|
+
blinking?: (string|boolean|ConditionalColoringPlugin.Blinking)|null,
|
19
19
|
field?: string|null
|
20
20
|
};
|
21
21
|
|
22
22
|
type ConditionalColoringOptions = {
|
23
23
|
conditions?: (ConditionalColoringPlugin.Condition)[]|null,
|
24
|
-
colorText?: (string|boolean)|null,
|
25
|
-
tickColor?: (string|boolean)|null,
|
24
|
+
colorText?: (string|boolean|ConditionalColoringPlugin.ColorText)|null,
|
25
|
+
tickColor?: (string|boolean|ConditionalColoringPlugin.ColorText)|null,
|
26
26
|
field?: string|null
|
27
27
|
};
|
28
28
|
|
@@ -41,6 +41,13 @@ declare namespace ConditionalColoringPlugin {
|
|
41
41
|
level?: (string|boolean)|null
|
42
42
|
};
|
43
43
|
|
44
|
+
type ColorText = {
|
45
|
+
field?: string|null,
|
46
|
+
upClass?: string|null,
|
47
|
+
downClass?: string|null,
|
48
|
+
levelClass?: string|null
|
49
|
+
};
|
50
|
+
|
44
51
|
}
|
45
52
|
|
46
53
|
declare class ConditionalColoringPlugin extends GridPlugin {
|
@@ -8,7 +8,7 @@ declare class SegmentCollection extends EventDispatcher {
|
|
8
8
|
|
9
9
|
public dispose(): void;
|
10
10
|
|
11
|
-
public addSegment(rid: string): boolean;
|
11
|
+
public addSegment(rid: string, childRids?: (string)[]|null): boolean;
|
12
12
|
|
13
13
|
public addSegments(rids: (string)[]|null): boolean;
|
14
14
|
|
@@ -56,8 +56,6 @@ declare class SegmentCollection extends EventDispatcher {
|
|
56
56
|
|
57
57
|
public calcSegmentOrder(rids: (string)[]|null): void;
|
58
58
|
|
59
|
-
public getSegmentValues(rids: (string)[]): (number)[]|null;
|
60
|
-
|
61
59
|
public logStructure(): string;
|
62
60
|
|
63
61
|
public logRowIdMap(): string;
|
@@ -339,8 +339,12 @@ declare class Core extends ElementWrapper {
|
|
339
339
|
|
340
340
|
public enableRowVirtualization(opt_enabled: boolean): void;
|
341
341
|
|
342
|
+
public isRowVirtualizationEnabled(): boolean;
|
343
|
+
|
342
344
|
public enableColumnVirtualization(opt_enabled?: boolean|null): void;
|
343
345
|
|
346
|
+
public isColumnVirtualizationEnabled(): boolean;
|
347
|
+
|
344
348
|
public setRowScrollingStep(rowCount: number): void;
|
345
349
|
|
346
350
|
public getVMouseWheelHandler(): ((...params: any[]) => any)|null;
|
@@ -4,6 +4,7 @@ import Core from "../Core.js";
|
|
4
4
|
import ILayoutGrid from "../ILayoutGrid.js";
|
5
5
|
import ElementWrapper from "../components/ElementWrapper.js";
|
6
6
|
import DataTable from "../../data/DataTable.js";
|
7
|
+
import { isEmptyObject } from "../../../../../tr-grid-util/es6/Util.js";
|
7
8
|
|
8
9
|
declare namespace SortableTitlePlugin {
|
9
10
|
|
@@ -7,12 +7,12 @@ declare namespace HeatMapPlugin {
|
|
7
7
|
|
8
8
|
type ColumnOptions = {
|
9
9
|
field: string,
|
10
|
-
heatMap?: HeatMapPlugin.Heatmap
|
10
|
+
heatMap?: HeatMapPlugin.Heatmap|null
|
11
11
|
};
|
12
12
|
|
13
13
|
type Heatmap = {
|
14
|
-
midPoint?: number,
|
15
|
-
mode?: string
|
14
|
+
midPoint?: number|null,
|
15
|
+
mode?: string|null
|
16
16
|
};
|
17
17
|
|
18
18
|
}
|
@@ -5,7 +5,7 @@ import { Conflator } from "../../../tr-grid-util/es6/Conflator.js";
|
|
5
5
|
import { Ext } from "../../../tr-grid-util/es6/Ext.js";
|
6
6
|
import { EventDispatcher } from "../../../tr-grid-util/es6/EventDispatcher.js";
|
7
7
|
import { Engine } from "../../../tr-grid-util/es6/formula/Engine.js";
|
8
|
-
import { cloneObject, extendObject, arrayToObject } from "../../../tr-grid-util/es6/Util.js";
|
8
|
+
import { cloneObject, extendObject, arrayToObject, isEmptyObject, deepEqual } from "../../../tr-grid-util/es6/Util.js";
|
9
9
|
import { DateTime } from "../../../tr-grid-util/es6/DateTime.js";
|
10
10
|
|
11
11
|
import { RowDefinition, ROW_DEF } from "./RowDefinition.js";
|
@@ -136,6 +136,8 @@ declare class Grid extends EventDispatcher {
|
|
136
136
|
|
137
137
|
public setColumns(columns: (any)[]|null): void;
|
138
138
|
|
139
|
+
public restoreColumns(columns: (any)[]|null): void;
|
140
|
+
|
139
141
|
public setFields(ary: (string)[]|null): void;
|
140
142
|
|
141
143
|
public removeColumn(colRef: Grid.ColumnReference|null): void;
|
@@ -6,6 +6,7 @@ declare namespace RowDefinition {
|
|
6
6
|
|
7
7
|
type Options = {
|
8
8
|
ric?: string|null,
|
9
|
+
permId?: string|null,
|
9
10
|
values?: (any[]|any)|null,
|
10
11
|
fields?: (string)[]|null,
|
11
12
|
asChain?: boolean|null,
|
@@ -36,7 +37,7 @@ declare class RowDefinition {
|
|
36
37
|
|
37
38
|
public initialize(rowOptions?: RowDefinition.Options|null): void;
|
38
39
|
|
39
|
-
public setContent(userInput: string): boolean;
|
40
|
+
public setContent(userInput: string, permId?: string|null): boolean;
|
40
41
|
|
41
42
|
public getRowId(): string;
|
42
43
|
|
@@ -70,6 +71,10 @@ declare class RowDefinition {
|
|
70
71
|
|
71
72
|
public getRic(): string;
|
72
73
|
|
74
|
+
public getPermId(): string;
|
75
|
+
|
76
|
+
public getSymbol(): string;
|
77
|
+
|
73
78
|
public getDisplayText(): string;
|
74
79
|
|
75
80
|
public getLabel(): string|null|null;
|
@@ -138,7 +143,7 @@ declare const ROW_DEF: string;
|
|
138
143
|
|
139
144
|
declare const ROW_TYPES: RowDefinition.RowTypes;
|
140
145
|
|
141
|
-
declare function rowData(userInput: string): boolean;
|
146
|
+
declare function rowData(userInput: string, permId?: string|null): boolean;
|
142
147
|
|
143
148
|
export {RowDefinition, ROW_DEF, ROW_TYPES};
|
144
149
|
export default RowDefinition;
|
@@ -2,6 +2,7 @@ import Grid from "./Grid.js";
|
|
2
2
|
import {Ext} from '../../../tr-grid-util/es6/Ext.js';
|
3
3
|
import {EventDispatcher} from '../../../tr-grid-util/es6/EventDispatcher.js';
|
4
4
|
import {FieldDefinition} from './FieldDefinition.js';
|
5
|
+
import { isEmptyObject } from "../../../tr-grid-util/es6/Util.js";
|
5
6
|
|
6
7
|
declare class SnapshotFiller extends EventDispatcher {
|
7
8
|
|
@@ -18,7 +18,8 @@ declare namespace RowDraggingPlugin {
|
|
18
18
|
dragStart?: ((...params: any[]) => any)|null,
|
19
19
|
drag?: ((...params: any[]) => any)|null,
|
20
20
|
dragEnd?: ((...params: any[]) => any)|null,
|
21
|
-
dataMoved?: ((...params: any[]) => any)|null
|
21
|
+
dataMoved?: ((...params: any[]) => any)|null,
|
22
|
+
beforeDataMoved?: ((...params: any[]) => any)|null
|
22
23
|
};
|
23
24
|
|
24
25
|
}
|
@@ -7,30 +7,30 @@ import { DateTime } from '../../tr-grid-util/es6/DateTime.js';
|
|
7
7
|
declare namespace TextFormattingPlugin {
|
8
8
|
|
9
9
|
type FormatOptions = {
|
10
|
-
formatType?: string,
|
11
|
-
type?: string,
|
12
|
-
field?: string,
|
13
|
-
decimalPlaces?: number,
|
14
|
-
precisionEnabled?: boolean,
|
15
|
-
plusSign?: boolean,
|
16
|
-
separator?: boolean,
|
17
|
-
percentSign?: boolean,
|
18
|
-
scalingUnit?: string,
|
19
|
-
multiplyBy100?: boolean,
|
20
|
-
mutiplyBy100?: boolean,
|
21
|
-
dateTimeFormat?: string,
|
22
|
-
useUTCTime?: boolean,
|
23
|
-
autoTextFormatting?: boolean,
|
24
|
-
formatLogic?: ((...params: any[]) => any)
|
10
|
+
formatType?: string|null,
|
11
|
+
type?: string|null,
|
12
|
+
field?: string|null,
|
13
|
+
decimalPlaces?: number|null,
|
14
|
+
precisionEnabled?: boolean|null,
|
15
|
+
plusSign?: boolean|null,
|
16
|
+
separator?: boolean|null,
|
17
|
+
percentSign?: boolean|null,
|
18
|
+
scalingUnit?: string|null,
|
19
|
+
multiplyBy100?: boolean|null,
|
20
|
+
mutiplyBy100?: boolean|null,
|
21
|
+
dateTimeFormat?: string|null,
|
22
|
+
useUTCTime?: boolean|null,
|
23
|
+
autoTextFormatting?: boolean|null,
|
24
|
+
formatLogic?: ((...params: any[]) => any)|null
|
25
25
|
};
|
26
26
|
|
27
27
|
type ColumnOptions = {
|
28
|
-
formatType?: (string|TextFormattingPlugin.FormatOptions),
|
29
|
-
autoTextFormatting?: boolean
|
28
|
+
formatType?: (string|TextFormattingPlugin.FormatOptions)|null,
|
29
|
+
autoTextFormatting?: boolean|null
|
30
30
|
};
|
31
31
|
|
32
32
|
type GridOptions = {
|
33
|
-
autoTextFormatting?: boolean
|
33
|
+
autoTextFormatting?: boolean|null
|
34
34
|
};
|
35
35
|
|
36
36
|
type FormatLogicArguments = {
|
@@ -40,7 +40,7 @@ declare namespace TextFormattingPlugin {
|
|
40
40
|
formattedText: string,
|
41
41
|
cell: any,
|
42
42
|
rowData: any,
|
43
|
-
format: ((...params: any[]) => any)
|
43
|
+
format: ((...params: any[]) => any)|null
|
44
44
|
};
|
45
45
|
|
46
46
|
}
|
@@ -61,7 +61,7 @@ declare class TextFormattingPlugin extends GridPlugin {
|
|
61
61
|
|
62
62
|
public getConfigObject(gridOptions?: any): any;
|
63
63
|
|
64
|
-
public setColumnFormat(colIndex: number, formatOptions: TextFormattingPlugin.FormatOptions): void;
|
64
|
+
public setColumnFormat(colIndex: number, formatOptions: TextFormattingPlugin.FormatOptions|null): void;
|
65
65
|
|
66
66
|
public getColumnFormatOptions(colIndex: number, options?: any): any;
|
67
67
|
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.99",
|
3
3
|
"@grid/column-dragging": "1.0.11",
|
4
4
|
"@grid/row-segmenting": "1.0.23",
|
5
5
|
"@grid/statistics-row": "1.0.14",
|
@@ -12,23 +12,23 @@
|
|
12
12
|
"tr-grid-column-grouping": "1.0.47",
|
13
13
|
"tr-grid-column-resizing": "1.0.28",
|
14
14
|
"tr-grid-column-selection": "1.0.27",
|
15
|
-
"tr-grid-column-stack": "1.0.
|
16
|
-
"tr-grid-conditional-coloring": "1.0.
|
15
|
+
"tr-grid-column-stack": "1.0.56",
|
16
|
+
"tr-grid-conditional-coloring": "1.0.60",
|
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",
|
20
|
-
"tr-grid-heat-map": "1.0.
|
20
|
+
"tr-grid-heat-map": "1.0.29",
|
21
21
|
"tr-grid-in-cell-editing": "1.0.77",
|
22
22
|
"tr-grid-pagination": "1.0.24",
|
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.26",
|
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
30
|
"tr-grid-rowcoloring": "1.0.21",
|
31
|
-
"tr-grid-textformatting": "1.0.
|
31
|
+
"tr-grid-textformatting": "1.0.45",
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
33
33
|
"@grid/formatters": "1.0.49",
|
34
34
|
"@grid/column-selection-dialog": "4.0.46",
|
package/package.json
CHANGED