@refinitiv-ui/efx-grid 6.0.65 → 6.0.67

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/lib/core/dist/core.js +31 -9
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataView.d.ts +2 -0
  4. package/lib/core/es6/data/DataView.js +26 -4
  5. package/lib/core/es6/grid/Core.js +5 -5
  6. package/lib/grid/index.js +1 -1
  7. package/lib/rt-grid/dist/rt-grid.js +176 -72
  8. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  9. package/lib/rt-grid/es6/ColumnDefinition.d.ts +0 -2
  10. package/lib/rt-grid/es6/ColumnDefinition.js +1 -1
  11. package/lib/rt-grid/es6/Grid.d.ts +0 -2
  12. package/lib/rt-grid/es6/Grid.js +2 -2
  13. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +4 -3
  14. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +1 -1
  15. package/lib/tr-grid-column-stack/es6/ColumnStack.js +17 -26
  16. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +11 -5
  17. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +153 -55
  18. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +2 -1
  19. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +8 -8
  20. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +3 -0
  21. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +23 -2
  22. package/lib/tr-grid-util/es6/CellPainter.d.ts +4 -2
  23. package/lib/tr-grid-util/es6/CellPainter.js +18 -8
  24. package/lib/tr-grid-util/es6/FilterOperators.js +13 -0
  25. package/lib/types/es6/ColumnStack.d.ts +1 -1
  26. package/lib/types/es6/ConditionalColoring.d.ts +11 -5
  27. package/lib/types/es6/ContextMenu.d.ts +2 -1
  28. package/lib/types/es6/Core/data/DataView.d.ts +2 -0
  29. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +0 -2
  30. package/lib/types/es6/RealtimeGrid/Grid.d.ts +0 -2
  31. package/lib/types/es6/RowFiltering.d.ts +3 -0
  32. package/lib/versions.json +6 -6
  33. package/package.json +1 -1
@@ -35,6 +35,7 @@ declare namespace RowFilteringPlugin {
35
35
 
36
36
  type Options = {
37
37
  emptySegmentFiltering?: boolean|null,
38
+ separatorFiltering?: boolean|null,
38
39
  disabledUI?: boolean|null,
39
40
  iconActivation?: string|null,
40
41
  dialogOptions?: RowFilteringPlugin.FilterDialogOptions|null,
@@ -118,6 +119,8 @@ declare class RowFilteringPlugin extends GridPlugin {
118
119
 
119
120
  public enableEmptySegmentFiltering(enabled?: boolean|null): void;
120
121
 
122
+ public enableSeparatorFiltering(enabled?: boolean|null): void;
123
+
121
124
  }
122
125
 
123
126
  declare function field(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
@@ -87,7 +87,8 @@ The expression can take various forms:<br>
87
87
 
88
88
  /** @typedef {Object} RowFilteringPlugin~Options
89
89
  * @description The options can be specified by `rowFiltering` property of the main grid's options
90
- * @property {boolean=} emptySegmentFiltering=false If enabled, the filter will automatically hide empty segment when all of its member are filtered out. If there is no active filter, any empty segment will not be hidden. Collapsed segment does not count as having a filter.
90
+ * @property {boolean=} emptySegmentFiltering=false If enabled, the filter will automatically hide empty segment when all of its member are filtered out. If there is no active filter, any empty segment will not be hidden. Collapsed segment does not count as having a filter. A segment with no child is treated the same way as an empty segment.
91
+ * @property {boolean=} separatorFiltering=false If enabled, segment separators will be filtered as if they were normal rows. Note that even if a separator row is filtered out, its child row may remain in the view and not be filtered out.
91
92
  * @property {boolean=} disabledUI=false Deprecated in favor of `iconActivation`. Set iconActivation to none instead.
92
93
  * @property {string=} iconActivation=onActiveFilter Filter icon redering behavior, can be set to `always`,`onHover`,`onActiveFilter`,or `none`
93
94
  * @property {RowFilteringPlugin~FilterDialogOptions=} dialogOptions=null Default configuration for Filter Dialog, applying to all columns.
@@ -371,6 +372,11 @@ RowFilteringPlugin.prototype.config = function (options) {
371
372
  this.enableEmptySegmentFiltering(rowFiltering["emptySegmentFiltering"] ? true : false);
372
373
  }
373
374
 
375
+ if (rowFiltering["separatorFiltering"] != null) {
376
+ // TODO: there is a chance that there is no DataView during the configuration
377
+ this.enableSeparatorFiltering(rowFiltering["separatorFiltering"] ? true : false);
378
+ }
379
+
374
380
  if (rowFiltering["iconActivation"]) {
375
381
  this._iconActivation = rowFiltering["iconActivation"];
376
382
 
@@ -479,6 +485,7 @@ RowFilteringPlugin.prototype.getConfigObject = function (gridOptions) {
479
485
 
480
486
  dirty = true;
481
487
  } // TODO: get emptySegmentFiltering setting from DataView
488
+ // TODO: get separatorFiltering setting from DataView
482
489
 
483
490
 
484
491
  if (dirty) {
@@ -2137,7 +2144,7 @@ RowFilteringPlugin.prototype._onColumnRemoved = function (e) {
2137
2144
  this._requestFilterRefresh();
2138
2145
  }
2139
2146
  };
2140
- /** the filter will automatically hide empty segment when all of its member are filtered out. If there is no active filter, any empty segment will not be hidden. Collapsed segment does not count as having a filter.
2147
+ /** the filter will automatically hide empty segment when all of its member are filtered out. If there is no active filter, any empty segment will not be hidden. Collapsed segment does not count as having a filter. A segment with no child is treated the same way as an empty segment.
2141
2148
  * @public
2142
2149
  * @param {boolean=} enabled=true
2143
2150
  */
@@ -2151,6 +2158,20 @@ RowFilteringPlugin.prototype.enableEmptySegmentFiltering = function (enabled) {
2151
2158
  dv.enableEmptySegmentFiltering(enabled);
2152
2159
  }
2153
2160
  };
2161
+ /** the filter will automatically hide empty segment when all of its member are filtered out. If there is no active filter, any empty segment will not be hidden. Collapsed segment does not count as having a filter.
2162
+ * @public
2163
+ * @param {boolean=} enabled=true
2164
+ */
2165
+
2166
+
2167
+ RowFilteringPlugin.prototype.enableSeparatorFiltering = function (enabled) {
2168
+ var host = this._hosts[0];
2169
+ var dv = host ? host.getDataSource() : null;
2170
+
2171
+ if (dv && dv.enableSeparatorFiltering) {
2172
+ dv.enableSeparatorFiltering(enabled);
2173
+ }
2174
+ };
2154
2175
 
2155
2176
  export default RowFilteringPlugin;
2156
2177
  export { RowFilteringPlugin, RowFilteringPlugin as RowFiltering, RowFilteringPlugin as RowFilteringExtension };
@@ -12,8 +12,8 @@ declare namespace CellPainter {
12
12
  };
13
13
 
14
14
  type Condition = {
15
- field: string,
16
- expression: CellPainter.Expression|string|null,
15
+ expression: string|((...params: any[]) => any)|null,
16
+ field?: string|null,
17
17
  backgroundColor?: string|null,
18
18
  color?: string|null,
19
19
  fontSize?: string|null,
@@ -136,6 +136,8 @@ declare class CellPainter {
136
136
 
137
137
  public disableLevelColor(disabled?: boolean|null): void;
138
138
 
139
+ public setBlinkingDuration(duration: number): void;
140
+
139
141
  }
140
142
 
141
143
  export default CellPainter;
@@ -4,14 +4,16 @@ import { ElfUtil } from "./ElfUtil.js";
4
4
  import { ExpressionParser } from "./ExpressionParser.js";
5
5
 
6
6
  /** @typedef {Object} CellPainter~Expression
7
+ * @ignore
8
+ * @description This form of expression is deprecated
7
9
  * @property {string=} name
8
10
  * @property {string} text Text describes condition e.g. [FIELD] > 10
9
11
  * @property {Array=} values
10
12
  */
11
13
 
12
14
  /** @typedef {Object} CellPainter~Condition
13
- * @property {string} field Field to be used in the condition
14
- * @property {CellPainter~Expression|string} expression Text describes condition e.g. [FIELD] > 10
15
+ * @property {string|Function} expression A function, text, or an object with text property that describes the condition
16
+ * @property {string=} field Field to be used in the condition
15
17
  * @property {string=} backgroundColor CSS color string
16
18
  * @property {string=} color CSS color string
17
19
  * @property {string=} fontSize
@@ -79,17 +81,16 @@ CellPainter.prototype._columnStats = null;
79
81
  * @private
80
82
  */
81
83
  CellPainter.prototype._levelColorDisabled = false;
82
-
83
84
  /** @type {number}
84
85
  * @private
85
86
  */
86
- CellPainter._runningBlinkId = 0;
87
-
87
+ CellPainter.prototype._blinkingDuration = 250;
88
88
 
89
89
  /** @type {number}
90
90
  * @private
91
91
  */
92
- CellPainter._blinkingDuration = 250;
92
+ CellPainter._runningBlinkId = 0;
93
+
93
94
  /** @type {Array.<CellPainter>}
94
95
  * @private
95
96
  * @const
@@ -325,7 +326,7 @@ CellPainter.prototype.getColumnStats = function() {
325
326
  return this._columnStats;
326
327
  };
327
328
  /** @private
328
- * @param {CellPainter~Condition|Object} condition
329
+ * @param {CellPainter~Condition} condition
329
330
  */
330
331
  CellPainter.prototype._addCondition = function(condition) {
331
332
  var exp = condition["expression"];
@@ -1165,7 +1166,7 @@ CellPainter.prototype._blinkCell = function(cell, rowData, blinkSignal) {
1165
1166
  }
1166
1167
 
1167
1168
  CellPainter._clearBlinkTimer(scope);
1168
- scope["blinkTimer"] = setTimeout(scope._restorer, CellPainter._blinkingDuration);
1169
+ scope["blinkTimer"] = setTimeout(scope._restorer, this._blinkingDuration);
1169
1170
 
1170
1171
  return bgBlinking;
1171
1172
  };
@@ -1193,6 +1194,15 @@ CellPainter.prototype.verifyBlinking = function(cell, rowData) {
1193
1194
  CellPainter.prototype.disableLevelColor = function(disabled) {
1194
1195
  this._levelColorDisabled = disabled !== false;
1195
1196
  };
1197
+ /**
1198
+ * @public
1199
+ * @param {number} duration
1200
+ */
1201
+ CellPainter.prototype.setBlinkingDuration = function(duration) {
1202
+ if(typeof duration === "number"){
1203
+ this._blinkingDuration = duration;
1204
+ }
1205
+ };
1196
1206
 
1197
1207
  export default CellPainter;
1198
1208
  export {CellPainter};
@@ -195,6 +195,19 @@ var FilterOperators = {
195
195
  FilterOperators.TXTEQ = FilterOperators.EQ;
196
196
  FilterOperators.BLANK = FilterOperators.EQ_BLANK;
197
197
  FilterOperators.NBLANK = FilterOperators.EQ_NBLANK;
198
+ FilterOperators.NEQ_BLANK = FilterOperators.EQ_NBLANK;
199
+
200
+ FilterOperators.GREATER_THAN = FilterOperators.GT;
201
+ FilterOperators.GREATER_THAN_OR_EQUAL_TO = FilterOperators.GTE;
202
+ FilterOperators.EQUAL_TO = FilterOperators.EQ;
203
+ FilterOperators.LESS_THAN = FilterOperators.LT;
204
+ FilterOperators.LESS_THAN_OR_EQUAL_TO = FilterOperators.LTE;
205
+ // FilterOperators.BETWEEN = // No equivalent operator
206
+ FilterOperators.TEXT_THAT_CONTAINS = FilterOperators.CONT;
207
+ FilterOperators.TEXT_THAT_NOT_CONTAINS = FilterOperators.NCONT;
208
+ FilterOperators.TEXT_IS = FilterOperators.EQ;
209
+ // FilterOperators.BLANK = FilterOperators.EQ_BLANK;
210
+ FilterOperators.NOT_BLANK = FilterOperators.EQ_NBLANK;
198
211
 
199
212
 
200
213
  /** @type {!Object.<string, Function>}
@@ -142,7 +142,7 @@ declare class ColumnStackPlugin extends GridPlugin {
142
142
 
143
143
  public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
144
144
 
145
- public hideStack(stackId: string): void;
145
+ public hideStack(stackId: string, hidden?: boolean|null): void;
146
146
 
147
147
  public showStack(stackId: string): void;
148
148
 
@@ -8,7 +8,9 @@ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
8
8
  declare namespace ConditionalColoringPlugin {
9
9
 
10
10
  type Options = {
11
- predefinedColors?: any
11
+ predefinedColors?: any,
12
+ blinkingDuration?: number|null,
13
+ insertionBlinking?: boolean|null
12
14
  };
13
15
 
14
16
  type ColumnOptions = {
@@ -27,10 +29,11 @@ declare namespace ConditionalColoringPlugin {
27
29
  };
28
30
 
29
31
  type Condition = {
30
- expression?: (string|((...params: any[]) => any))|null,
32
+ expression?: (string|((...params: any[]) => any)|any[])|null,
31
33
  backgroundColor?: string|null,
32
34
  color?: string|null,
33
- cssClass?: string|null
35
+ cssClass?: string|null,
36
+ field?: string|null
34
37
  };
35
38
 
36
39
  type Blinking = {
@@ -38,7 +41,8 @@ declare namespace ConditionalColoringPlugin {
38
41
  field?: string|null,
39
42
  up?: string|null,
40
43
  down?: string|null,
41
- level?: (string|boolean)|null
44
+ level?: (string|boolean)|null,
45
+ duration?: number|null
42
46
  };
43
47
 
44
48
  type ColorText = {
@@ -70,7 +74,7 @@ declare class ConditionalColoringPlugin extends GridPlugin {
70
74
 
71
75
  public setColumnColoring(colIndex: number, columnOptions?: (ConditionalColoringPlugin.ColumnOptions|null)|null): void;
72
76
 
73
- public setConditionalColoring(colIndex: number, coloringOptions?: (ConditionalColoringPlugin.ConditionalColoringOptions|null)|null): void;
77
+ public setConditionalColoring(colIndex: number, coloringOptions?: ConditionalColoringPlugin.ConditionalColoringOptions|null): void;
74
78
 
75
79
  public setColumnBlinking(colIndex: number, blinkingOptions?: (boolean|ConditionalColoringPlugin.Blinking)|null, field?: string|null): void;
76
80
 
@@ -78,6 +82,8 @@ declare class ConditionalColoringPlugin extends GridPlugin {
78
82
 
79
83
  public setPredefinedColors(predefinedColors: any): void;
80
84
 
85
+ public setInsertionBlinking(blinking: boolean): void;
86
+
81
87
  public getColumnPainter(colIndex: number): CellPainter|null;
82
88
 
83
89
  public applyColor(colIndex: number, cell: any, rowData?: any): void;
@@ -49,7 +49,8 @@ declare namespace ContextMenuPlugin {
49
49
  type OnMenuEvent = {
50
50
  cell: any,
51
51
  colIndex: number,
52
- columnDef: object|null,
52
+ field: string,
53
+ colId: string,
53
54
  context: ContextMenuPlugin.Context|null,
54
55
  items: object|null,
55
56
  menu: MenuEventAPI|null,
@@ -278,6 +278,8 @@ declare class DataView extends EventDispatcher {
278
278
 
279
279
  public enableEmptySegmentFiltering(enabled?: boolean|null): void;
280
280
 
281
+ public enableSeparatorFiltering(enabled?: boolean|null): void;
282
+
281
283
  public setSegmentClassification(segmentRef: string|number|null, fields: string|(string)[]|null): boolean;
282
284
 
283
285
  public getWrapSize(): number;
@@ -56,8 +56,6 @@ declare class ColumnDefinition {
56
56
 
57
57
  public dispose(): void;
58
58
 
59
- public _initializeTimeSeriesChild(columnOption?: ColumnDefinition.Options|string|null): void;
60
-
61
59
  public initialize(columnOption?: ColumnDefinition.Options|null): void;
62
60
 
63
61
  public getId(): string;
@@ -181,8 +181,6 @@ declare class Grid extends EventDispatcher {
181
181
 
182
182
  public setColumnSorter(colRef: Grid.ColumnReference|null, func?: ColumnDefinition.SortLogic|null): void;
183
183
 
184
- public _initDuplicateRicData(rowDef: RowDefinition|null): void;
185
-
186
184
  public insertRow(rowOption?: (RowDefinition.Options|string)|null, rowRef?: Grid.RowReference|null): RowDefinition|null;
187
185
 
188
186
  public insertRows(rowOptions: (RowDefinition.Options|string)[]|null, rowRef?: Grid.RowReference|null, opt_fields?: (string)[]|null): void;
@@ -35,6 +35,7 @@ declare namespace RowFilteringPlugin {
35
35
 
36
36
  type Options = {
37
37
  emptySegmentFiltering?: boolean|null,
38
+ separatorFiltering?: boolean|null,
38
39
  disabledUI?: boolean|null,
39
40
  iconActivation?: string|null,
40
41
  dialogOptions?: RowFilteringPlugin.FilterDialogOptions|null,
@@ -118,6 +119,8 @@ declare class RowFilteringPlugin extends GridPlugin {
118
119
 
119
120
  public enableEmptySegmentFiltering(enabled?: boolean|null): void;
120
121
 
122
+ public enableSeparatorFiltering(enabled?: boolean|null): void;
123
+
121
124
  }
122
125
 
123
126
  declare function field(colIndex: number, exp: RowFilteringPlugin.Expression|null, ctx?: (any|string)|null): boolean;
package/lib/versions.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "tr-grid-util": "1.3.130",
2
+ "tr-grid-util": "1.3.131",
3
3
  "tr-grid-printer": "1.0.16",
4
4
  "@grid/column-dragging": "1.0.14",
5
5
  "@grid/row-segmenting": "1.0.28",
@@ -9,14 +9,14 @@
9
9
  "tr-grid-cell-selection": "1.0.33",
10
10
  "tr-grid-checkbox": "1.0.60",
11
11
  "tr-grid-column-fitter": "1.0.39",
12
- "tr-grid-column-formatting": "0.9.34",
12
+ "tr-grid-column-formatting": "0.9.35",
13
13
  "tr-grid-column-grouping": "1.0.55",
14
14
  "tr-grid-column-resizing": "1.0.28",
15
15
  "tr-grid-column-selection": "1.0.29",
16
- "tr-grid-column-stack": "1.0.71",
17
- "tr-grid-conditional-coloring": "1.0.62",
16
+ "tr-grid-column-stack": "1.0.72",
17
+ "tr-grid-conditional-coloring": "1.0.65",
18
18
  "tr-grid-content-wrap": "1.0.20",
19
- "tr-grid-contextmenu": "1.0.39",
19
+ "tr-grid-contextmenu": "1.0.40",
20
20
  "tr-grid-filter-input": "0.9.33",
21
21
  "tr-grid-heat-map": "1.0.29",
22
22
  "tr-grid-in-cell-editing": "1.0.80",
@@ -24,7 +24,7 @@
24
24
  "tr-grid-percent-bar": "1.0.22",
25
25
  "tr-grid-range-bar": "2.0.5",
26
26
  "tr-grid-row-dragging": "1.0.29",
27
- "tr-grid-row-filtering": "1.0.60",
27
+ "tr-grid-row-filtering": "1.0.61",
28
28
  "tr-grid-row-grouping": "1.0.82",
29
29
  "tr-grid-row-selection": "1.0.23",
30
30
  "tr-grid-rowcoloring": "1.0.24",
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.65"
69
+ "version": "6.0.67"
70
70
  }