@refinitiv-ui/efx-grid 6.0.27 → 6.0.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/lib/core/dist/core.js +248 -29
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataTable.d.ts +1 -1
  4. package/lib/core/es6/data/DataTable.js +3 -2
  5. package/lib/core/es6/data/DataView.d.ts +1 -1
  6. package/lib/core/es6/data/DataView.js +3 -2
  7. package/lib/core/es6/data/Segment.d.ts +1 -1
  8. package/lib/core/es6/data/Segment.js +12 -3
  9. package/lib/core/es6/data/SegmentCollection.d.ts +1 -1
  10. package/lib/core/es6/data/SegmentCollection.js +3 -2
  11. package/lib/core/es6/grid/Core.d.ts +17 -3
  12. package/lib/core/es6/grid/Core.js +226 -20
  13. package/lib/core/es6/grid/LayoutGrid.js +1 -0
  14. package/lib/grid/index.js +1 -1
  15. package/lib/row-segmenting/es6/RowSegmenting.js +21 -2
  16. package/lib/rt-grid/dist/rt-grid.js +418 -238
  17. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  18. package/lib/rt-grid/es6/ColumnDefinition.d.ts +2 -2
  19. package/lib/rt-grid/es6/ColumnDefinition.js +71 -70
  20. package/lib/rt-grid/es6/Grid.d.ts +9 -2
  21. package/lib/rt-grid/es6/Grid.js +55 -132
  22. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -3
  23. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +9 -27
  24. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +6 -0
  25. package/lib/tr-grid-column-stack/es6/ColumnStack.js +68 -9
  26. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +30 -23
  27. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +78 -3
  28. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +24 -10
  29. package/lib/tr-grid-util/es6/CellPainter.d.ts +2 -1
  30. package/lib/tr-grid-util/es6/CellPainter.js +53 -15
  31. package/lib/tr-grid-util/es6/GridPlugin.d.ts +6 -0
  32. package/lib/tr-grid-util/es6/GridPlugin.js +67 -0
  33. package/lib/types/es6/ColumnGrouping.d.ts +3 -3
  34. package/lib/types/es6/ColumnStack.d.ts +6 -0
  35. package/lib/types/es6/Core/data/DataTable.d.ts +1 -1
  36. package/lib/types/es6/Core/data/DataView.d.ts +1 -1
  37. package/lib/types/es6/Core/data/Segment.d.ts +1 -1
  38. package/lib/types/es6/Core/data/SegmentCollection.d.ts +1 -1
  39. package/lib/types/es6/Core/grid/Core.d.ts +17 -3
  40. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +2 -2
  41. package/lib/types/es6/RealtimeGrid/Grid.d.ts +9 -2
  42. package/lib/utils/index.d.ts +3 -0
  43. package/lib/utils/index.js +3 -0
  44. package/lib/versions.json +6 -6
  45. package/package.json +6 -2
@@ -1,10 +1,15 @@
1
1
  import {Ext} from '../../tr-grid-util/es6/Ext.js';
2
- import { GridPlugin } from '../../tr-grid-util/es6/GridPlugin.js';
3
- import { extendObject } from '../../tr-grid-util/es6/Util.js';
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
+ /** @typedef {Object} ConditionalColoringPlugin~Options
9
+ * @description The options can be specified by `conditionalColoring` property of the main grid's options
10
+ * @property {Object=} predefinedColors Predefined color object map for conditional coloring
11
+ */
12
+
8
13
  /** @typedef {Object} ConditionalColoringPlugin~ColumnOptions
9
14
  * @description Extension column options that can be specified on each individual grid's column option:
10
15
  * @property {Array.<ConditionalColoringPlugin~Condition>=} conditions=null List of condition options
@@ -27,6 +32,7 @@ import {ElfUtil} from '../../tr-grid-util/es6/ElfUtil.js';
27
32
  * @property {(string|Function)=} expression Expression could be `[FIELD_1] > 0`
28
33
  * @property {string=} backgroundColor="" CSS color (e.g. #ffffff, black)
29
34
  * @property {string=} color CSS="" color (e.g. #000000, white)
35
+ * @property {string=} cssClass cssClass="" Predefined color class name
30
36
  */
31
37
 
32
38
  /** @typedef {(string|boolean|Object)} ConditionalColoringPlugin~Blinking
@@ -79,6 +85,10 @@ Ext.inherits(ConditionalColoringPlugin, GridPlugin);
79
85
  * @private
80
86
  */
81
87
  ConditionalColoringPlugin._cleanUpTimer = 0;
88
+ /** @type {string}
89
+ * @private
90
+ */
91
+ ConditionalColoringPlugin._controlClass = "predefined-conditional-color";
82
92
 
83
93
  /** @type {boolean}
84
94
  * @private
@@ -89,6 +99,10 @@ ConditionalColoringPlugin.prototype._blinkingEnabled = false; // WORKAROUND: To
89
99
  * @private
90
100
  */
91
101
  ConditionalColoringPlugin.prototype._pendingFields;
102
+ /** @type {Object}
103
+ * @private
104
+ */
105
+ ConditionalColoringPlugin.prototype._predefinedColors = null;
92
106
 
93
107
  /** @override
94
108
  * @return {string}
@@ -118,6 +132,15 @@ ConditionalColoringPlugin.prototype.initialize = function (host, options) {
118
132
 
119
133
  hosts.push(host);
120
134
 
135
+ var extOptions = options["conditionalColoring"];
136
+ if (extOptions) {
137
+ var predefinedColors = extOptions["predefinedColors"];
138
+ if (predefinedColors != null && typeof predefinedColors === "object") {
139
+ this._injectStyles(predefinedColors);
140
+ host.enableClass(ConditionalColoringPlugin._controlClass);
141
+ }
142
+ }
143
+
121
144
  if(hosts.length === 1) {
122
145
  this.config(options);
123
146
  } else {
@@ -206,6 +229,14 @@ ConditionalColoringPlugin.prototype.config = function (options) {
206
229
  ConditionalColoringPlugin.prototype.getConfigObject = function (gridOptions) {
207
230
  var obj = gridOptions || {};
208
231
 
232
+ if(this._predefinedColors != null) {
233
+ var extOptions = obj["conditionalColoring"];
234
+ if(!extOptions) {
235
+ extOptions = obj["conditionalColoring"] = {};
236
+ }
237
+ extOptions["predefinedColors"] = this._predefinedColors;
238
+ }
239
+
209
240
  var columns = obj.columns;
210
241
  if (!columns) {
211
242
  columns = obj.columns = [];
@@ -244,7 +275,8 @@ ConditionalColoringPlugin.prototype.getColumnColoring = function(colIndex, optio
244
275
  extendObject(exCondition, conditions[n], [
245
276
  "expression",
246
277
  "backgroundColor",
247
- "color"
278
+ "color",
279
+ "cssClass"
248
280
  ]);
249
281
 
250
282
  options.conditions.push(exCondition);
@@ -824,6 +856,49 @@ ConditionalColoringPlugin._mergeUpdates = function(e) {
824
856
  return changedRows;
825
857
  };
826
858
  /** @private
859
+ * @param {Object} predefinedColors Predefined color object map
860
+ */
861
+ ConditionalColoringPlugin.prototype._injectStyles = function(predefinedColors) {
862
+ var prefix = ".tr-grid." + ConditionalColoringPlugin._controlClass + " .tr-lg .cell";
863
+ var css = [];
864
+ var ss, styles, value;
865
+ for (var className in predefinedColors) {
866
+ css.push(prefix + "." + className);
867
+ ss = [];
868
+ styles = predefinedColors[className];
869
+
870
+ value = styles["backgroundColor"];
871
+ if(value) {
872
+ ss.push("background-color: " + value + ";");
873
+ }
874
+
875
+ value = styles["color"];
876
+ if(value) {
877
+ ss.push("color: " + value + ";");
878
+ }
879
+
880
+ css.push(ss);
881
+ }
882
+
883
+ // TODO: support multitable
884
+ var host = this._hosts[0];
885
+
886
+ if(this._styleTag) {
887
+ this._styleTag.parentNode.removeChild(this._styleTag);
888
+ this._styleTag = null;
889
+ }
890
+ this._styleTag = injectCss(prettifyCss(css), host.getElement());
891
+ this._predefinedColors = predefinedColors;
892
+ };
893
+ /** @public
894
+ * @param {Object} predefinedColors Predefined color object map
895
+ */
896
+ ConditionalColoringPlugin.prototype.setPredefinedColors = function(predefinedColors) {
897
+ if(predefinedColors != null && typeof predefinedColors === "object") {
898
+ this._injectStyles(predefinedColors);
899
+ }
900
+ };
901
+ /** @private
827
902
  * @function
828
903
  * @return {!FilterBuilder}
829
904
  */
@@ -83,6 +83,8 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
83
83
  * @description Fired after the text editor has been closed and all operations are done. This is useful to clean up left over resource and get result text entered.
84
84
  * @type {Object}
85
85
  * @property {string=} text Text that user has entered
86
+ * @property {boolean=} groupHeader if the row is header of row, it will be groupHeader
87
+ * @property {Object} suggestionDetail Suggestion detail for auto suggest "item-select" event
86
88
  * @property {boolean} cancelled Readonly flag. Indicates whether the commit operation has been cancelled
87
89
  * @property {boolean} committed Readonly flag. The opposite of `cancelled` flag
88
90
  */
@@ -92,6 +94,8 @@ import { CoralItems } from "../../tr-grid-util/es6/CoralItems.js";
92
94
  * @type {Object}
93
95
  * @property {string=} text Text that user has entered
94
96
  * @property {boolean=} cancel Set to true to cancel the commit operation.
97
+ * @property {boolean=} groupHeader if the row is header of row, it will be groupHeader
98
+ * @property {Object} suggestionDetail Suggestion detail for auto suggest "item-select" event
95
99
  * @example
96
100
  * var cep = new InCellEditingPlugin();
97
101
  * cep.listen("beforeCommit", function(e) {
@@ -1450,15 +1454,20 @@ InCellEditingPlugin.prototype._onPopupHide = function (e) {
1450
1454
  * @param {Object} event
1451
1455
  */
1452
1456
  InCellEditingPlugin.prototype._onAutoSuggestItemSelected = function (event) {
1453
- if (event.detail.target) {
1454
- var method = event.detail.method;
1455
- var value = event.detail.target.value;
1456
- if (method === 'enter' || method === 'click') {
1457
- if (value) {
1458
- this.setText(value);
1459
- this._commitText(true);
1460
- }
1461
- }
1457
+ var eventDetail = event.detail;
1458
+ if (!eventDetail) {
1459
+ return;
1460
+ }
1461
+ var targetSelected = eventDetail.target;
1462
+ if (!targetSelected) {
1463
+ return;
1464
+ }
1465
+ var suggestionMethod = eventDetail.method;
1466
+ // Need to check the details of the methods, another method like a navigation, reset, clear shouldn't commit text
1467
+ // TODO: We need to handled tab to move. Currently, the property suggestionDetail in 'beforeCommit' event doesn't handlded when we use autosuggest with tab to move.
1468
+ if (suggestionMethod === "click" || suggestionMethod === "enter") {
1469
+ this.setText(targetSelected.value);
1470
+ this._commitText(true, eventDetail.suggestion);
1462
1471
  }
1463
1472
  };
1464
1473
 
@@ -1554,8 +1563,9 @@ InCellEditingPlugin.prototype._onTextKeyUp = function (e) {
1554
1563
  /** Commit text from editor to cell.
1555
1564
  * @private
1556
1565
  * @param {boolean} committed
1566
+ * @param {Object} suggestionDetail suggestion detail for auto suggest element
1557
1567
  */
1558
- InCellEditingPlugin.prototype._commitText = function (committed) {
1568
+ InCellEditingPlugin.prototype._commitText = function (committed, suggestionDetail) {
1559
1569
  var t = this;
1560
1570
  var arg = t._activePos;
1561
1571
  if (!t.isEditing() || !arg) {
@@ -1566,6 +1576,10 @@ InCellEditingPlugin.prototype._commitText = function (committed) {
1566
1576
  var enteredValue = arg["text"] = this.getValue();
1567
1577
  var groupHeader = arg["groupHeader"] || false;
1568
1578
  if (committed) {
1579
+ if (suggestionDetail) {
1580
+ // This property is only available when the user commits text from the 'item-select' event of the auto suggest.
1581
+ arg["suggestionDetail"] = suggestionDetail;
1582
+ }
1569
1583
  if (t.hasListener("beforeCommit")) {
1570
1584
  t._dispatch("beforeCommit", arg);
1571
1585
  committed = !arg["cancel"];
@@ -19,7 +19,8 @@ declare namespace CellPainter {
19
19
  fontWeight?: string|null,
20
20
  fontStyle?: string|null,
21
21
  textAlign?: string|null,
22
- textDecoration?: string|null
22
+ textDecoration?: string|null,
23
+ cssClass?: string|null
23
24
  };
24
25
 
25
26
  type ThemeColors = {
@@ -18,6 +18,7 @@ import { ElfUtil } from "./ElfUtil.js";
18
18
  * @property {string=} fontStyle
19
19
  * @property {string=} textAlign
20
20
  * @property {string=} textDecoration
21
+ * @property {string=} cssClass Predefined color class name
21
22
  */
22
23
 
23
24
  /** @typedef {Object.<string, string>} CellPainter~ThemeColors
@@ -517,14 +518,21 @@ CellPainter.prototype.renderForPrinting = function(cell, rowData, min, max) {
517
518
  return;
518
519
  }
519
520
  var styles = this._getStyles(rowData, min, max);
520
- var c = styles["backgroundColor"];
521
- if(c) {
522
- cell.style.backgroundColor = c;
523
- }
524
-
525
- c = styles["color"];
526
- if(c) {
527
- cell.style.color = c;
521
+ var cssClass = styles["cssClass"];
522
+ if (cssClass) {
523
+ if (cell._coloringCssClass !== cssClass) {
524
+ cell.classList.remove(cell._coloringCssClass);
525
+ cell._coloringCssClass = null;
526
+ }
527
+ cell.classList.add(cssClass);
528
+ cell._coloringCssClass = cssClass;
529
+ } else {
530
+ if (cell._coloringCssClass) {
531
+ cell.classList.remove(cell._coloringCssClass);
532
+ cell._coloringCssClass = null;
533
+ }
534
+ cell.style.backgroundColor = styles["backgroundColor"] || "";
535
+ cell.style.color = styles["color"] || "";
528
536
  }
529
537
  };
530
538
 
@@ -650,8 +658,24 @@ CellPainter._cellRestorer = function(scope) {
650
658
  }
651
659
 
652
660
  var styles = this._getStyles(rowData, min, max);
653
- elem.style.backgroundColor = styles["backgroundColor"] || "";
654
- elem.style.color = styles["color"] || "";
661
+ var cssClass = styles["cssClass"];
662
+ if (cssClass) {
663
+ if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
664
+ elem.classList.remove(elem._coloringCssClass);
665
+ elem._coloringCssClass = null;
666
+ }
667
+ elem.classList.add(cssClass);
668
+ elem._coloringCssClass = cssClass;
669
+ elem.style.backgroundColor = "";
670
+ elem.style.color = "";
671
+ } else {
672
+ if (elem._coloringCssClass) {
673
+ elem.classList.remove(elem._coloringCssClass);
674
+ elem._coloringCssClass = null;
675
+ }
676
+ elem.style.backgroundColor = styles["backgroundColor"] || "";
677
+ elem.style.color = styles["color"] || "";
678
+ }
655
679
  }
656
680
  };
657
681
 
@@ -1000,11 +1024,25 @@ CellPainter.prototype._paintCell = function(cell, rowData, min, max) {
1000
1024
  }
1001
1025
 
1002
1026
  var styles = this._getStyles(rowData, min, max);
1003
- var ss = CellPainter.bgStyles;
1004
- var elStyle = elem.style;
1005
- for (var n = ss.length; --n >= 0;) {
1006
- var styleName = ss[n];
1007
- elStyle[styleName] = styles[styleName] || "";
1027
+ var cssClass = styles["cssClass"];
1028
+ if (cssClass) {
1029
+ if (elem._coloringCssClass !== cssClass) {
1030
+ elem.classList.remove(elem._coloringCssClass);
1031
+ elem._coloringCssClass = null;
1032
+ }
1033
+ elem.classList.add(cssClass);
1034
+ elem._coloringCssClass = cssClass;
1035
+ } else {
1036
+ if (elem._coloringCssClass) {
1037
+ elem.classList.remove(elem._coloringCssClass);
1038
+ elem._coloringCssClass = null;
1039
+ }
1040
+ var ss = CellPainter.bgStyles;
1041
+ var elStyle = elem.style;
1042
+ for (var n = ss.length; --n >= 0;) {
1043
+ var styleName = ss[n];
1044
+ elStyle[styleName] = styles[styleName] || "";
1045
+ }
1008
1046
  }
1009
1047
  };
1010
1048
 
@@ -34,6 +34,12 @@ declare class GridPlugin extends EventDispatcher {
34
34
 
35
35
  public getColumnId(colIndex: number|string|null): string;
36
36
 
37
+ public getColumnIds(): (string)[];
38
+
39
+ public getColumnField(colIndex: number): string;
40
+
41
+ public getColumnFields(): (string)[];
42
+
37
43
  public getColumnCount(): number;
38
44
 
39
45
  public static requestPlugin(ref: any, pluginRef: any, configObj?: any, compositeGrid?: any, realTimeGrid?: any): Promise<any>|null;
@@ -238,6 +238,7 @@ GridPlugin.prototype.getColumnName = function (colRef) {
238
238
  * @return {number}
239
239
  */
240
240
  GridPlugin.prototype.getColumnIndex = function (colRef) {
241
+ // TODO: Unify the below logics
241
242
  if(typeof colRef === "number") {
242
243
  return colRef;
243
244
  }
@@ -258,6 +259,7 @@ GridPlugin.prototype.getColumnIndex = function (colRef) {
258
259
  * @return {Array.<number>} column indices
259
260
  */
260
261
  GridPlugin.prototype.getColumnIndices = function (colRefs) {
262
+ // TODO: Unify the below logics
261
263
  if(this._compositeGrid) {
262
264
  var allFields = this._compositeGrid.getColumnFields();
263
265
  var columnCount = this._compositeGrid.getColumnCount();
@@ -286,6 +288,7 @@ GridPlugin.prototype.getColumnIndices = function (colRefs) {
286
288
  * @return {string}
287
289
  */
288
290
  GridPlugin.prototype.getColumnId = function (colIndex) {
291
+ // TODO: Unify the below logics
289
292
  if(typeof colIndex === "string") {
290
293
  return colIndex;
291
294
  }
@@ -300,6 +303,34 @@ GridPlugin.prototype.getColumnId = function (colIndex) {
300
303
  return "";
301
304
  };
302
305
  /** @public
306
+ * @return {!Array.<string>} Return all column ids from existing column
307
+ */
308
+ GridPlugin.prototype.getColumnIds = function () {
309
+ if(this._hosts && this._hosts.length) {
310
+ return this._hosts[0].getColumnIds();
311
+ }
312
+ return [];
313
+ };
314
+ /** @public
315
+ * @param {number} colIndex
316
+ * @return {string} Return empty string if the specified column does not exist
317
+ */
318
+ GridPlugin.prototype.getColumnField = function (colIndex) {
319
+ if(this._hosts && this._hosts.length) {
320
+ return this._hosts[0].getColumnField(colIndex);
321
+ }
322
+ return "";
323
+ };
324
+ /** @public
325
+ * @return {!Array.<string>} Return all column fields from existing column
326
+ */
327
+ GridPlugin.prototype.getColumnFields = function () {
328
+ if(this._hosts && this._hosts.length) {
329
+ return this._hosts[0].getColumnFields();
330
+ }
331
+ return [];
332
+ };
333
+ /** @public
303
334
  * @return {number}
304
335
  */
305
336
  GridPlugin.prototype.getColumnCount = function() {
@@ -309,6 +340,42 @@ GridPlugin.prototype.getColumnCount = function() {
309
340
  }
310
341
  return 0;
311
342
  };
343
+ /** @protected
344
+ * @ignore
345
+ * @param {number|string} srcCol Column Id or index
346
+ * @param {(number|string)=} destCol Column Id or index of the destination
347
+ * @return {boolean}
348
+ */
349
+ GridPlugin.prototype._moveColumnById = function (srcCol, destCol) {
350
+ var hosts = this._hosts;
351
+ var len = hosts ? hosts.length : 0;
352
+ if(len) {
353
+ var dirty = 0;
354
+ for(var i = 0; i < len; ++i) {
355
+ dirty |= hosts[i].moveColumnById(srcCol, destCol);
356
+ }
357
+ return dirty ? true : false;
358
+ }
359
+ return false;
360
+ };
361
+ /** @protected
362
+ * @ignore
363
+ * @param {number|string|Array.<number|string>} colRefs List of column index or column id to be moved
364
+ * @param {(number|string)=} destCol Destination position where the moved columns will be placed BEFORE the specified position. This can be column id or index
365
+ * @return {boolean} Return true if there is any change, and false otherwise
366
+ */
367
+ GridPlugin.prototype._reorderColumns = function (colRefs, destCol) {
368
+ var hosts = this._hosts;
369
+ var len = hosts ? hosts.length : 0;
370
+ if(len) {
371
+ var dirty = 0;
372
+ for(var i = 0; i < len; ++i) {
373
+ dirty |= hosts[i].reorderColumns(colRefs, destCol);
374
+ }
375
+ return dirty ? true : false;
376
+ }
377
+ return false;
378
+ };
312
379
 
313
380
  /** @protected
314
381
  * @deprecated
@@ -79,11 +79,11 @@ declare class ColumnGroupingPlugin extends GridPlugin {
79
79
 
80
80
  public getValidDestinationIndex(id: string, destCol: number|string|null): number;
81
81
 
82
- public moveGroup(id: string, destCol: number|string|null): void;
82
+ public moveGroup(id: string, destCol?: (number|string)|null): void;
83
83
 
84
- public reorderColumns(colList: (number|string)[]|null, destCol: number|string|null): boolean;
84
+ public reorderColumns(colList: (number|string)[]|null, destCol?: (number|string)|null): boolean;
85
85
 
86
- public moveColumnById(srcCol: number|string|null, destCol?: number|string|null): boolean;
86
+ public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
87
87
 
88
88
  }
89
89
 
@@ -129,6 +129,12 @@ declare class ColumnStackPlugin extends GridPlugin {
129
129
 
130
130
  public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
131
131
 
132
+ public hideStack(stackId: string): void;
133
+
134
+ public showStack(stackId: string): void;
135
+
136
+ public isStackHidden(stackId: string): boolean|null|null;
137
+
132
138
  }
133
139
 
134
140
  export default ColumnStackPlugin;
@@ -98,7 +98,7 @@ declare class DataTable extends DataCache {
98
98
 
99
99
  public addSegmentChild(segmentId: string, rid: string, dataId?: string|null): boolean;
100
100
 
101
- public addSegmentChildren(segmentId: string, rids: (string)[]|null): boolean;
101
+ public addSegmentChildren(segmentId: string, rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
102
102
 
103
103
  public removeSegmentChild(segmentId: string, rid: string): boolean;
104
104
 
@@ -258,7 +258,7 @@ declare class DataView extends EventDispatcher {
258
258
 
259
259
  public addSegmentChild(segmentRef: string|number|null, rowRef: string|number|null, dataId?: string|null): boolean;
260
260
 
261
- public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): boolean;
261
+ public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null, dataIds?: (string)[]|null): boolean;
262
262
 
263
263
  public removeSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): boolean;
264
264
 
@@ -15,7 +15,7 @@ declare class Segment extends EventDispatcher {
15
15
 
16
16
  public addChild(rid: string, dataId?: string|null): boolean;
17
17
 
18
- public addChildren(rids: (string)[]|null): boolean;
18
+ public addChildren(rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
19
19
 
20
20
  public containsChild(rid: string): boolean;
21
21
 
@@ -40,7 +40,7 @@ declare class SegmentCollection extends EventDispatcher {
40
40
 
41
41
  public addSegmentChild(segmentId: string, rid: string, dataId?: string|null): boolean;
42
42
 
43
- public addSegmentChildren(segmentId: string, rids: (string)[]|null): boolean;
43
+ public addSegmentChildren(segmentId: string, rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
44
44
 
45
45
  public containsSegmentChild(segmentId: string, rid: string): boolean;
46
46
 
@@ -133,6 +133,10 @@ declare class Core extends ElementWrapper {
133
133
 
134
134
  public moveColumn(fromCol: number|(number)[]|null, destCol: number): boolean;
135
135
 
136
+ public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
137
+
138
+ public reorderColumns(colRefs: number|string|(number|string)[]|null, destCol?: (number|string)|null): boolean;
139
+
136
140
  public addRow(opt_num?: number|null): void;
137
141
 
138
142
  public removeRow(opt_num?: number|null): void;
@@ -297,8 +301,6 @@ declare class Core extends ElementWrapper {
297
301
 
298
302
  public getRelativePosition(obj: ElementWrapper|Element|Event|MouseEvent, context?: any): Core.MouseInfo;
299
303
 
300
- public getColumnIndex(str: string): number;
301
-
302
304
  public getVScrollbar(): ElementWrapper;
303
305
 
304
306
  public getHScrollbar(): ElementWrapper;
@@ -393,6 +395,18 @@ declare class Core extends ElementWrapper {
393
395
 
394
396
  public getColumnIds(): (string)[];
395
397
 
398
+ public setColumnField(colIndex: number, field: string): void;
399
+
400
+ public getColumnField(colIndex: number): string;
401
+
402
+ public getColumnFields(): (string)[];
403
+
404
+ public getColumnIndex(colRef: string|number|null): number;
405
+
406
+ public getColumnIndices(colRefs: (number|string)[]|null): (number)[];
407
+
408
+ public getColumnIndexMap(): { [key: string]: number };
409
+
396
410
  }
397
411
 
398
412
  declare function num(opt_type?: string|null): (ILayoutGrid)[];
@@ -409,7 +423,7 @@ declare function section(): number;
409
423
 
410
424
  declare function path(obj: ElementWrapper|Element|Event|MouseEvent, context?: any): Core.MouseInfo;
411
425
 
412
- declare function cellElement(str: string): number;
426
+ declare function cellElement(): ElementWrapper;
413
427
 
414
428
  export default Core;
415
429
  export { Core };
@@ -51,13 +51,13 @@ declare namespace ColumnDefinition {
51
51
 
52
52
  declare class ColumnDefinition {
53
53
 
54
- constructor(columnOption?: ColumnDefinition.Options|string|null, hostGrid?: any);
54
+ constructor(columnOption?: ColumnDefinition.Options|null, hostGrid?: any);
55
55
 
56
56
  public dispose(): void;
57
57
 
58
58
  public _initializeTimeSeriesChild(columnOption?: ColumnDefinition.Options|string|null): void;
59
59
 
60
- public initialize(columnOption?: ColumnDefinition.Options|string|null): void;
60
+ public initialize(columnOption?: ColumnDefinition.Options|null): void;
61
61
 
62
62
  public getId(): string;
63
63
 
@@ -83,7 +83,8 @@ declare namespace Grid {
83
83
  formulaEngine?: boolean|null,
84
84
  adcPollingInterval?: number|null,
85
85
  fieldCaching?: boolean|null,
86
- childDataField?: string|null
86
+ childDataField?: string|null,
87
+ topSection?: boolean|null
87
88
  };
88
89
 
89
90
  type RowReference = number|string|RowDefinition|null;
@@ -146,7 +147,7 @@ declare class Grid extends EventDispatcher {
146
147
 
147
148
  public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
148
149
 
149
- public reorderColumns(colRefs: number|string|(number|string)[]|null, destCol: number|string|null): boolean;
150
+ public reorderColumns(colRefs: number|string|(number|string)[]|null, destCol?: (number|string)|null): boolean;
150
151
 
151
152
  public hideColumn(colRef: Grid.ColumnReference|null, hidden?: boolean|null): void;
152
153
 
@@ -296,6 +297,10 @@ declare class Grid extends EventDispatcher {
296
297
 
297
298
  public setClassification(rowRef: Grid.RowReference|null, fields: (string)[]|null): boolean;
298
299
 
300
+ public contains(elem: Element|null): boolean;
301
+
302
+ public isFocused(): boolean;
303
+
299
304
  public focus(): void;
300
305
 
301
306
  public requestRowRefresh(): void;
@@ -316,6 +321,8 @@ declare class Grid extends EventDispatcher {
316
321
 
317
322
  declare function borders(gridOptions?: any): any;
318
323
 
324
+ declare function idx(colRef: Grid.ColumnReference|null): void;
325
+
319
326
  declare function colCount(rowRef: number|string|null): string;
320
327
 
321
328
  export { Grid };
@@ -0,0 +1,3 @@
1
+ import {DataGenerator} from "../tr-grid-util/es6/jet/DataGenerator.js"
2
+ import {MockRTK} from "../tr-grid-util/es6/jet/MockRTK.js"
3
+ export {DataGenerator, MockRTK}
@@ -0,0 +1,3 @@
1
+ import {DataGenerator} from "../tr-grid-util/es6/jet/DataGenerator.js"
2
+ import {MockRTK} from "../tr-grid-util/es6/jet/MockRTK.js"
3
+ export {DataGenerator, MockRTK}
package/lib/versions.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
- "tr-grid-util": "1.3.85",
2
+ "tr-grid-util": "1.3.88",
3
3
  "@grid/column-dragging": "1.0.11",
4
- "@grid/row-segmenting": "1.0.22",
4
+ "@grid/row-segmenting": "1.0.23",
5
5
  "@grid/statistics-row": "1.0.13",
6
6
  "@grid/zoom": "1.0.11",
7
7
  "tr-grid-auto-tooltip": "1.1.5",
@@ -9,16 +9,16 @@
9
9
  "tr-grid-checkbox": "1.0.60",
10
10
  "tr-grid-column-fitter": "1.0.39",
11
11
  "tr-grid-column-formatting": "0.9.34",
12
- "tr-grid-column-grouping": "1.0.45",
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.51",
16
- "tr-grid-conditional-coloring": "1.0.57",
15
+ "tr-grid-column-stack": "1.0.53",
16
+ "tr-grid-conditional-coloring": "1.0.58",
17
17
  "tr-grid-content-wrap": "1.0.19",
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",
21
- "tr-grid-in-cell-editing": "1.0.75",
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",
package/package.json CHANGED
@@ -24,6 +24,9 @@
24
24
  "grid": [
25
25
  "lib/grid/lib/efx-grid.d.ts"
26
26
  ],
27
+ "utils": [
28
+ "lib/utils/index.d.ts"
29
+ ],
27
30
  "*": [
28
31
  "lib/types/index.d.ts"
29
32
  ]
@@ -53,7 +56,8 @@
53
56
  "./extensions": "./lib/index.js",
54
57
  "./window-exporter": "./lib/window-exporter.js",
55
58
  "./grid": "./lib/grid/lib/efx-grid.js",
56
- "./formatters/": "./lib/formatters/es6/"
59
+ "./formatters/": "./lib/formatters/es6/",
60
+ "./utils": "./lib/utils/index.js"
57
61
  },
58
62
  "peerDependencies": {
59
63
  "@refinitiv-ui/core": "^6.2.0",
@@ -62,5 +66,5 @@
62
66
  "publishConfig": {
63
67
  "access": "public"
64
68
  },
65
- "version": "6.0.27"
69
+ "version": "6.0.29"
66
70
  }