@refinitiv-ui/efx-grid 6.0.29 → 6.0.31
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/core/dist/core.js +20 -2
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/core/es6/grid/components/Scrollbar.js +19 -1
- package/lib/filter-dialog/lib/filter-dialog.js +11 -8
- package/lib/filter-dialog/themes/base.less +7 -3
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +142 -26
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +2 -0
- package/lib/rt-grid/es6/ColumnDefinition.js +6 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +4 -0
- package/lib/rt-grid/es6/FieldDefinition.js +27 -1
- package/lib/rt-grid/es6/Grid.d.ts +1 -0
- package/lib/rt-grid/es6/Grid.js +14 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +7 -7
- package/lib/rt-grid/es6/SnapshotFiller.js +3 -0
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +4 -0
- package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +4 -4
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +116 -70
- package/lib/tr-grid-util/es6/DragUI.d.ts +2 -0
- package/lib/tr-grid-util/es6/DragUI.js +39 -9
- package/lib/tr-grid-util/es6/Popup.d.ts +3 -1
- package/lib/tr-grid-util/es6/Popup.js +57 -23
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +29 -1
- package/lib/types/es6/ConditionalColoring.d.ts +30 -23
- package/lib/types/es6/ContentWrap.d.ts +4 -4
- package/lib/types/es6/ExtensionOptions.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +2 -0
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +4 -0
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +1 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +1 -1
- package/lib/versions.json +4 -4
- package/package.json +1 -1
@@ -69,11 +69,13 @@ declare class Popup extends EventDispatcher {
|
|
69
69
|
|
70
70
|
public disableAutoHiding(opt_disabled?: boolean|null): void;
|
71
71
|
|
72
|
+
public disableAutoRepositioning(opt_disabled?: boolean|null): void;
|
73
|
+
|
72
74
|
public disableAutoClipping(opt_disabled?: boolean|null): void;
|
73
75
|
|
74
76
|
public disableHideOnScroll(opt_disabled?: boolean|null): void;
|
75
77
|
|
76
|
-
public updatePosition(): void;
|
78
|
+
public updatePosition(fallback?: boolean|null): void;
|
77
79
|
|
78
80
|
public enableUIBlocking(bool?: boolean|null): boolean;
|
79
81
|
|
@@ -221,6 +221,10 @@ Popup.prototype._uiBlocking = false;
|
|
221
221
|
* @private
|
222
222
|
*/
|
223
223
|
Popup.prototype._hideOnScroll = true;
|
224
|
+
/** @type {boolean}
|
225
|
+
* @private
|
226
|
+
*/
|
227
|
+
Popup.prototype._autoRepositioning = true;
|
224
228
|
|
225
229
|
/** @public */
|
226
230
|
Popup.prototype.dispose = function () {
|
@@ -303,6 +307,10 @@ Popup.prototype.init = function (options) {
|
|
303
307
|
this._hideOnScroll = false;
|
304
308
|
}
|
305
309
|
|
310
|
+
if (options["autoRepositioning"] == false) {
|
311
|
+
this._autoRepositioning = false;
|
312
|
+
}
|
313
|
+
|
306
314
|
this.addListener(options, "show");
|
307
315
|
this.addListener(options, "hide");
|
308
316
|
this.addListener(options, "shown");
|
@@ -573,6 +581,15 @@ Popup.prototype.disableAutoHiding = function (opt_disabled) {
|
|
573
581
|
/** @public
|
574
582
|
* @param {boolean=} opt_disabled
|
575
583
|
*/
|
584
|
+
Popup.prototype.disableAutoRepositioning = function (opt_disabled) {
|
585
|
+
var autoRepositioning = (opt_disabled === false);
|
586
|
+
if (this._autoRepositioning !== autoRepositioning) {
|
587
|
+
this._autoRepositioning = autoRepositioning;
|
588
|
+
}
|
589
|
+
};
|
590
|
+
/** @public
|
591
|
+
* @param {boolean=} opt_disabled
|
592
|
+
*/
|
576
593
|
Popup.prototype.disableAutoClipping = function (opt_disabled) {
|
577
594
|
var autoClipping = (opt_disabled === false);
|
578
595
|
if (this._autoClipping !== autoClipping) {
|
@@ -592,8 +609,12 @@ Popup.prototype.disableHideOnScroll = function (opt_disabled) {
|
|
592
609
|
|
593
610
|
/** @public
|
594
611
|
* @fires Popup#positioning
|
612
|
+
* @param {boolean=} fallback=true
|
595
613
|
*/
|
596
|
-
Popup.prototype.updatePosition = function () {
|
614
|
+
Popup.prototype.updatePosition = function (fallback) {
|
615
|
+
if(fallback == null){
|
616
|
+
fallback = true;
|
617
|
+
}
|
597
618
|
var t = this;
|
598
619
|
t._resizeTimer = 0;
|
599
620
|
|
@@ -630,34 +651,48 @@ Popup.prototype.updatePosition = function () {
|
|
630
651
|
if (t._positioning == "right") {
|
631
652
|
x = px + aw + this._gap;
|
632
653
|
y = py;
|
633
|
-
// Re-position, if the popup exceeds the bounds
|
634
|
-
if ((x + ew > rb) && (px - ew > sx)) {
|
635
|
-
x = px - ew - this._gap;
|
636
|
-
}
|
637
|
-
if ((y + eh > bb) && (py + ah - eh > sy)) {
|
638
|
-
y = py + ah - eh;
|
639
|
-
}
|
640
654
|
} else if (t._positioning == "over") {
|
641
655
|
x = px;
|
642
656
|
y = py;
|
643
|
-
// Re-position, if the popup exceeds the bounds
|
644
|
-
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
645
|
-
x = px + aw - ew;
|
646
|
-
}
|
647
|
-
if ((y + eh > bb) && (py + aw - eh > sy)) {
|
648
|
-
y = py + aw - eh;
|
649
|
-
}
|
650
657
|
} else { // under, bottom, or etc.
|
651
658
|
x = px;
|
652
659
|
y = py + ah;
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
if (
|
658
|
-
|
660
|
+
}
|
661
|
+
|
662
|
+
if(fallback){
|
663
|
+
// Re-position for each type of positioning, if the popup exceeds the bounds
|
664
|
+
if (t._positioning == "right") {
|
665
|
+
if ((x + ew > rb) && (px - ew > sx)) {
|
666
|
+
x = px - ew - this._gap;
|
667
|
+
}
|
668
|
+
if ((y + eh > bb) && (py + ah - eh > sy)) {
|
669
|
+
y = py + ah - eh;
|
670
|
+
}
|
671
|
+
} else if (t._positioning == "over") {
|
672
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
673
|
+
x = px + aw - ew;
|
674
|
+
}
|
675
|
+
if ((y + eh > bb) && (py + aw - eh > sy)) {
|
676
|
+
y = py + aw - eh;
|
677
|
+
}
|
678
|
+
} else { // under, bottom, or etc.
|
679
|
+
if ((x + ew > rb) && (px + aw - ew > sx)) {
|
680
|
+
x = px + aw - ew;
|
681
|
+
}
|
682
|
+
if (y + eh > bb) {
|
683
|
+
// If popup is exceeded bottom bound
|
684
|
+
if(py - eh > sy){
|
685
|
+
y = py - eh; // move popup to top of attached element, if it has enough space
|
686
|
+
} else {
|
687
|
+
y = y - (y + eh - bb); // shift the popup up to make everything in popup visible
|
688
|
+
if(y < 0){
|
689
|
+
y = 0; // popup should not shift beyond top bound
|
690
|
+
}
|
691
|
+
}
|
692
|
+
}
|
659
693
|
}
|
660
694
|
}
|
695
|
+
|
661
696
|
if (t._autoClipping) { // Last resort of positioning
|
662
697
|
if (x + ew > rb) {
|
663
698
|
if (t._origW == null) {
|
@@ -685,7 +720,6 @@ Popup.prototype.updatePosition = function () {
|
|
685
720
|
t._dispatch(evtType, t._evtArg);
|
686
721
|
};
|
687
722
|
|
688
|
-
|
689
723
|
/** @public
|
690
724
|
* @param {boolean=} bool
|
691
725
|
* @return {boolean} previous uiBlocking state
|
@@ -759,7 +793,7 @@ Popup.prototype._onBlurTimer = function () {
|
|
759
793
|
* @fires Popup#positioning
|
760
794
|
*/
|
761
795
|
Popup.prototype._onResize = function () {
|
762
|
-
if (!this._resizeTimer && this._inDoc) {
|
796
|
+
if (!this._resizeTimer && this._inDoc && this._autoRepositioning) {
|
763
797
|
this._resizeTimer = setTimeout(this.updatePosition, 50);
|
764
798
|
}
|
765
799
|
};
|
@@ -266,7 +266,7 @@ Adc.request = function (payload, mockResponse) {
|
|
266
266
|
} else {
|
267
267
|
|
268
268
|
identifiers = payload.identifiers;
|
269
|
-
formula = payload.formula
|
269
|
+
formula = Adc.splitFields(payload.formula);
|
270
270
|
fields = [];
|
271
271
|
|
272
272
|
// _invalidFieldDict is a dictionary of non exist field
|
@@ -344,6 +344,34 @@ Adc.request = function (payload, mockResponse) {
|
|
344
344
|
}));
|
345
345
|
};
|
346
346
|
|
347
|
+
/**
|
348
|
+
* Splits a string of comma-separated fields into an array of individual field names with optional parentheses and contents.
|
349
|
+
*
|
350
|
+
* @param {string} strFields - The string of comma-separated fields to split.
|
351
|
+
* @returns {Array<string>} - An array of individual field names with optional parentheses and contents.
|
352
|
+
*/
|
353
|
+
Adc.splitFields = function(strFields) {
|
354
|
+
if(!strFields) {
|
355
|
+
return [];
|
356
|
+
}
|
357
|
+
|
358
|
+
// Split the input string using the regular expression
|
359
|
+
// regex is match commas that are not inside parentheses
|
360
|
+
/*
|
361
|
+
, - matches a comma
|
362
|
+
(?![^()]*\) - negative lookahead assertion that matches if the comma is not followed by:
|
363
|
+
[^()]* - any characters that are not opening or closing parentheses
|
364
|
+
\) - a closing parenthesis
|
365
|
+
) - ending delimiter of the regular expression
|
366
|
+
*/
|
367
|
+
var fields = strFields.split(/,(?![^()]*\))/);
|
368
|
+
fields = fields.map(function(field) {
|
369
|
+
return field.trim();
|
370
|
+
});
|
371
|
+
|
372
|
+
return fields;
|
373
|
+
};
|
374
|
+
|
347
375
|
/** @public
|
348
376
|
* @function
|
349
377
|
* @param {string} dataType
|
@@ -1,39 +1,44 @@
|
|
1
1
|
import {Ext} from '../../tr-grid-util/es6/Ext.js';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import {GridPlugin} from '../../tr-grid-util/es6/GridPlugin.js';
|
3
|
+
import {extendObject, injectCss, prettifyCss} from '../../tr-grid-util/es6/Util.js';
|
4
4
|
import {CellPainter} from '../../tr-grid-util/es6/CellPainter.js';
|
5
5
|
import {FilterBuilder} from '../../tr-grid-util/es6/FilterBuilder.js';
|
6
6
|
import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
|
7
7
|
|
8
8
|
declare namespace ConditionalColoringPlugin {
|
9
9
|
|
10
|
+
type Options = {
|
11
|
+
predefinedColors?: any
|
12
|
+
};
|
13
|
+
|
10
14
|
type ColumnOptions = {
|
11
|
-
conditions?: (ConditionalColoringPlugin.Condition)[],
|
12
|
-
colorText?: (string|boolean),
|
13
|
-
tickColor?: (string|boolean),
|
14
|
-
blinking?: (ConditionalColoringPlugin.Blinking|boolean),
|
15
|
-
field?: string
|
15
|
+
conditions?: (ConditionalColoringPlugin.Condition)[]|null,
|
16
|
+
colorText?: (string|boolean)|null,
|
17
|
+
tickColor?: (string|boolean)|null,
|
18
|
+
blinking?: (ConditionalColoringPlugin.Blinking|boolean)|null,
|
19
|
+
field?: string|null
|
16
20
|
};
|
17
21
|
|
18
22
|
type ConditionalColoringOptions = {
|
19
|
-
conditions?: (ConditionalColoringPlugin.Condition)[],
|
20
|
-
colorText?: (string|boolean),
|
21
|
-
tickColor?: (string|boolean),
|
22
|
-
field?: string
|
23
|
+
conditions?: (ConditionalColoringPlugin.Condition)[]|null,
|
24
|
+
colorText?: (string|boolean)|null,
|
25
|
+
tickColor?: (string|boolean)|null,
|
26
|
+
field?: string|null
|
23
27
|
};
|
24
28
|
|
25
29
|
type Condition = {
|
26
|
-
expression?: (string|((...params: any[]) => any)),
|
27
|
-
backgroundColor?: string,
|
28
|
-
color?: string
|
30
|
+
expression?: (string|((...params: any[]) => any))|null,
|
31
|
+
backgroundColor?: string|null,
|
32
|
+
color?: string|null,
|
33
|
+
cssClass?: string|null
|
29
34
|
};
|
30
35
|
|
31
36
|
type Blinking = {
|
32
|
-
border?: boolean,
|
33
|
-
field?: string,
|
34
|
-
up?: string,
|
35
|
-
down?: string,
|
36
|
-
level?: (string|boolean)
|
37
|
+
border?: boolean|null,
|
38
|
+
field?: string|null,
|
39
|
+
up?: string|null,
|
40
|
+
down?: string|null,
|
41
|
+
level?: (string|boolean)|null
|
37
42
|
};
|
38
43
|
|
39
44
|
}
|
@@ -56,21 +61,23 @@ declare class ConditionalColoringPlugin extends GridPlugin {
|
|
56
61
|
|
57
62
|
public getColumnColoring(colIndex: number, options?: any): ConditionalColoringPlugin.ColumnOptions;
|
58
63
|
|
59
|
-
public setColumnColoring(colIndex: number, columnOptions?: (ConditionalColoringPlugin.ColumnOptions|null)): void;
|
64
|
+
public setColumnColoring(colIndex: number, columnOptions?: (ConditionalColoringPlugin.ColumnOptions|null)|null): void;
|
60
65
|
|
61
|
-
public setConditionalColoring(colIndex: number, coloringOptions?: (ConditionalColoringPlugin.ConditionalColoringOptions|null)): void;
|
66
|
+
public setConditionalColoring(colIndex: number, coloringOptions?: (ConditionalColoringPlugin.ConditionalColoringOptions|null)|null): void;
|
62
67
|
|
63
|
-
public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking), field?: string): void;
|
68
|
+
public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking)|null, field?: string|null): void;
|
64
69
|
|
65
70
|
public blinkRow(rowIndex: number, blinkSignal: number, host?: any): void;
|
66
71
|
|
72
|
+
public setPredefinedColors(predefinedColors: any): void;
|
73
|
+
|
67
74
|
public getColumnPainter(colIndex: number): CellPainter|null;
|
68
75
|
|
69
76
|
public applyColor(colIndex: number, cell: any, rowData?: any): void;
|
70
77
|
|
71
78
|
public static cleanUpPrevRows(): void;
|
72
79
|
|
73
|
-
public static setThemeColors(colors: { [key: string]: string }): void;
|
80
|
+
public static setThemeColors(colors: { [key: string]: string }|null): void;
|
74
81
|
|
75
82
|
public reloadThemeColors(): Promise<any>|null;
|
76
83
|
|
@@ -4,11 +4,11 @@ import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
|
|
4
4
|
declare namespace ContentWrapPlugin {
|
5
5
|
|
6
6
|
type Options = {
|
7
|
-
evenRowHeight?: boolean
|
7
|
+
evenRowHeight?: boolean|null
|
8
8
|
};
|
9
9
|
|
10
10
|
type ColumnOptions = {
|
11
|
-
contentWrap?: boolean
|
11
|
+
contentWrap?: boolean|null
|
12
12
|
};
|
13
13
|
|
14
14
|
}
|
@@ -29,11 +29,11 @@ declare class ContentWrapPlugin extends GridPlugin {
|
|
29
29
|
|
30
30
|
public getConfigObject(gridOptions?: any): any;
|
31
31
|
|
32
|
-
public adjustRowHeight(sectionRef: any, from?: number, to?: number): boolean;
|
32
|
+
public adjustRowHeight(sectionRef: any, from?: number|null, to?: number|null): boolean;
|
33
33
|
|
34
34
|
public adjustRowHeightAt(sectionRef: any, rowIndex: number): boolean;
|
35
35
|
|
36
|
-
public enableContentWrapping(colIndex: number, bool?: boolean): void;
|
36
|
+
public enableContentWrapping(colIndex: number, bool?: boolean|null): void;
|
37
37
|
|
38
38
|
public isWrappingContent(colIndex: number): boolean;
|
39
39
|
|
@@ -9,6 +9,7 @@ import ColumnGrouping from "../../tr-grid-column-grouping/es6/ColumnGrouping.js"
|
|
9
9
|
import ColumnResizing from "../../tr-grid-column-resizing/es6/ColumnResizing.js";
|
10
10
|
import ColumnSelection from "../../tr-grid-column-selection/es6/ColumnSelection.js";
|
11
11
|
import ColumnStack from "../../tr-grid-column-stack/es6/ColumnStack.js";
|
12
|
+
import ConditionalColoring from "../../tr-grid-conditional-coloring/es6/ConditionalColoring.js";
|
12
13
|
import ContentWrap from "../../tr-grid-content-wrap/es6/ContentWrap.js";
|
13
14
|
import ContextMenu from "../../tr-grid-contextmenu/es6/ContextMenu.js";
|
14
15
|
import FilterInput from "../../tr-grid-filter-input/es6/FilterInput.js";
|
@@ -34,6 +35,7 @@ type ExtensionOptions = {
|
|
34
35
|
columnResizing?: ColumnResizing.Options,
|
35
36
|
columnSelection?: ColumnSelection.Options,
|
36
37
|
columnStack?: ColumnStack.Options,
|
38
|
+
conditionalColoring?: ConditionalColoring.Options,
|
37
39
|
contentWrap?: ContentWrap.Options,
|
38
40
|
contextMenu?: ContextMenu.Options,
|
39
41
|
filterInput?: FilterInput.Options,
|
@@ -20,12 +20,16 @@ declare namespace FieldDefinition {
|
|
20
20
|
|
21
21
|
function setFieldCaching(caching: boolean): void;
|
22
22
|
|
23
|
+
function disableTimeSeriesExpansion(disabled: boolean): void;
|
24
|
+
|
23
25
|
function isFormula(field: string): boolean;
|
24
26
|
|
25
27
|
function isAdc(field: string): boolean;
|
26
28
|
|
27
29
|
function isRealTimeField(field: string): boolean;
|
28
30
|
|
31
|
+
function isTimeSeriesChild(field: string): boolean;
|
32
|
+
|
29
33
|
function isTimeSeries(field: string): boolean;
|
30
34
|
|
31
35
|
}
|
package/lib/versions.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"tr-grid-util": "1.3.
|
2
|
+
"tr-grid-util": "1.3.92",
|
3
3
|
"@grid/column-dragging": "1.0.11",
|
4
4
|
"@grid/row-segmenting": "1.0.23",
|
5
5
|
"@grid/statistics-row": "1.0.13",
|
@@ -12,9 +12,9 @@
|
|
12
12
|
"tr-grid-column-grouping": "1.0.46",
|
13
13
|
"tr-grid-column-resizing": "1.0.28",
|
14
14
|
"tr-grid-column-selection": "1.0.26",
|
15
|
-
"tr-grid-column-stack": "1.0.
|
15
|
+
"tr-grid-column-stack": "1.0.54",
|
16
16
|
"tr-grid-conditional-coloring": "1.0.58",
|
17
|
-
"tr-grid-content-wrap": "1.0.
|
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
20
|
"tr-grid-heat-map": "1.0.28",
|
@@ -32,6 +32,6 @@
|
|
32
32
|
"tr-grid-titlewrap": "1.0.19",
|
33
33
|
"@grid/formatters": "1.0.49",
|
34
34
|
"@grid/column-selection-dialog": "4.0.46",
|
35
|
-
"@grid/filter-dialog": "4.0.
|
35
|
+
"@grid/filter-dialog": "4.0.57",
|
36
36
|
"@grid/column-format-dialog": "4.0.43"
|
37
37
|
}
|
package/package.json
CHANGED