@refinitiv-ui/efx-grid 6.0.128 → 6.0.130

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.
Files changed (36) hide show
  1. package/lib/core/dist/core.js +258 -20
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataCache.js +29 -0
  4. package/lib/core/es6/data/DataTable.d.ts +4 -0
  5. package/lib/core/es6/data/DataTable.js +117 -1
  6. package/lib/core/es6/data/DataView.d.ts +6 -0
  7. package/lib/core/es6/data/DataView.js +43 -0
  8. package/lib/core/es6/data/SegmentCollection.d.ts +2 -0
  9. package/lib/core/es6/data/SegmentCollection.js +21 -0
  10. package/lib/core/es6/grid/Core.js +39 -10
  11. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +9 -9
  12. package/lib/grid/index.js +1 -1
  13. package/lib/row-segmenting/es6/RowSegmenting.d.ts +6 -0
  14. package/lib/row-segmenting/es6/RowSegmenting.js +62 -11
  15. package/lib/rt-grid/dist/rt-grid.js +337 -55
  16. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  17. package/lib/rt-grid/es6/DataConnector.js +1 -1
  18. package/lib/rt-grid/es6/Grid.d.ts +2 -0
  19. package/lib/rt-grid/es6/Grid.js +90 -23
  20. package/lib/rt-grid/es6/RowDefinition.d.ts +1 -1
  21. package/lib/rt-grid/es6/RowDefinition.js +26 -20
  22. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +3 -2
  23. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1100 -1124
  24. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +2 -1
  25. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +8 -2
  26. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +2 -2
  27. package/lib/types/es6/CellSelection.d.ts +3 -2
  28. package/lib/types/es6/ColumnGrouping.d.ts +2 -1
  29. package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
  30. package/lib/types/es6/Core/data/DataView.d.ts +6 -0
  31. package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
  32. package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
  33. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +1 -1
  34. package/lib/types/es6/RowSegmenting.d.ts +6 -0
  35. package/lib/versions.json +6 -6
  36. package/package.json +1 -1
@@ -15,7 +15,8 @@ declare namespace ColumnGroupingPlugin {
15
15
  tooltip?: (boolean|string)|null,
16
16
  children: (string)[]|null,
17
17
  alignment?: string|null,
18
- render?: ((...params: any[]) => any)|null
18
+ render?: ((...params: any[]) => any)|null,
19
+ backgroundColor?: string|null
19
20
  };
20
21
 
21
22
  }
@@ -19,6 +19,7 @@ import { cloneObject, injectCss, prettifyCss, deepEqual } from "../../tr-grid-ut
19
19
  * @property {Array.<string>} children Child member in this group
20
20
  * @property {string=} alignment eg. left, center, right
21
21
  * @property {Function=} render render function handler
22
+ * @property {string=} backgroundColor Background color of group header
22
23
  */
23
24
 
24
25
  /** @constructor
@@ -501,7 +502,8 @@ ColumnGroupingPlugin.prototype._applyGrouping = function () {
501
502
  let rowCount = this._maxDepth + 1;
502
503
  let hostCount = this._hosts.length;
503
504
  for(i = hostCount; --i >= 0;) {
504
- section = this._hosts[i].getSection("title");
505
+ let host = this._hosts[i];
506
+ section = host.getSection("title");
505
507
  if(section) {
506
508
  section.setRowCount(rowCount); // This will cause postSectionRender event to be fired
507
509
  section.clearCellSpans();
@@ -522,6 +524,9 @@ ColumnGroupingPlugin.prototype._applyGrouping = function () {
522
524
  }
523
525
  }
524
526
  }
527
+ if(host.applyColumnsBackgroundColor) {
528
+ host.applyColumnsBackgroundColor(section);
529
+ }
525
530
 
526
531
  this._spanGroupVertically(section);
527
532
  // TODO: Some calculation in here should not be done in this loop
@@ -833,8 +838,9 @@ ColumnGroupingPlugin.prototype._spanGroupHorizontally = function (titleSection)
833
838
  section.setCellColSpan(start, groupDef["onRow"], end - start + 1);
834
839
  groupDef["colIndex"] = start;
835
840
 
841
+ let cell = section.getCell(start, groupDef["onRow"]);
842
+ cell.setStyle("backgroundColor", groupDef["backgroundColor"] || "");
836
843
  if(isAllSelected){
837
- let cell = section.getCell(start, groupDef["onRow"]);
838
844
  cell.addClass("selected-group");
839
845
  }
840
846
  }
@@ -2305,9 +2305,9 @@ RowFilteringPlugin.prototype._onDialogSortChanged = function(e) {
2305
2305
  let eDetail = e.detail.value ? e.detail.value : e.detail;
2306
2306
 
2307
2307
  if(stp.getSortOrder(colIndex) === eDetail) {
2308
- stp.sortColumn(colIndex, "n");
2308
+ stp.sortColumn(colIndex, "n", { "isUserAction": true });
2309
2309
  } else {
2310
- stp.sortColumn(colIndex, eDetail);
2310
+ stp.sortColumn(colIndex, eDetail, { "isUserAction": true } );
2311
2311
  }
2312
2312
  this._dispatch("dialogCommitted", {
2313
2313
  "sortOrder": e.detail.value,
@@ -2,7 +2,7 @@ import { Ext } from "../../tr-grid-util/es6/Ext.js";
2
2
  import { GridPlugin } from "../../tr-grid-util/es6/GridPlugin.js";
3
3
  import { MouseDownTrait } from "../../tr-grid-util/es6/MouseDownTrait.js";
4
4
  import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
5
- import { isIE, cloneObject, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
5
+ import { cloneObject, prepareTSVContent } from "../../tr-grid-util/es6/Util.js";
6
6
  import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
7
7
  import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
8
8
 
@@ -16,7 +16,8 @@ declare namespace CellSelectionPlugin {
16
16
  selectionChanged?: ((...params: any[]) => any)|null,
17
17
  copy?: ((...params: any[]) => any)|null,
18
18
  beforeMouseDown?: ((...params: any[]) => any)|null,
19
- selectableSections?: any[]|null
19
+ selectableSections?: any[]|null,
20
+ copyDisabled?: boolean|null
20
21
  };
21
22
 
22
23
  }
@@ -15,7 +15,8 @@ declare namespace ColumnGroupingPlugin {
15
15
  tooltip?: (boolean|string)|null,
16
16
  children: (string)[]|null,
17
17
  alignment?: string|null,
18
- render?: ((...params: any[]) => any)|null
18
+ render?: ((...params: any[]) => any)|null,
19
+ backgroundColor?: string|null
19
20
  };
20
21
 
21
22
  }
@@ -80,6 +80,8 @@ declare class DataTable extends DataCache {
80
80
 
81
81
  public isFrozen(): boolean;
82
82
 
83
+ public setSegmentSeparators(rids: (string)[]|null, enabled?: boolean|null): boolean;
84
+
83
85
  public setSegmentSeparator(rid: string, enabled?: boolean|null): boolean;
84
86
 
85
87
  public unsetAllSegmentSeparators(): boolean;
@@ -106,6 +108,8 @@ declare class DataTable extends DataCache {
106
108
 
107
109
  public addSegmentChildren(segmentId: string, rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
108
110
 
111
+ public setSegmentChildren(segmentArr: (any)[]|null): boolean;
112
+
109
113
  public removeSegmentChild(segmentId: string, rid: string): boolean;
110
114
 
111
115
  public removeSegmentChildren(segmentId: string, rids: (string)[]|null): boolean;
@@ -246,6 +246,8 @@ declare class DataView extends EventDispatcher {
246
246
 
247
247
  public synchronizeRowOrder(): void;
248
248
 
249
+ public setSegmentSeparators(rowIds: (string)[]|null, enabled?: boolean|null): boolean;
250
+
249
251
  public setSegmentSeparator(rowRef: string|number|null, enabled?: boolean|null): boolean;
250
252
 
251
253
  public unsetAllSegmentSeparators(): boolean;
@@ -264,6 +266,8 @@ declare class DataView extends EventDispatcher {
264
266
 
265
267
  public collapseSegment(rowRef: string|number|null, collapsed?: boolean|null): boolean;
266
268
 
269
+ public collapseSegments(rowIds: (string|number)[]|null, collapsed?: boolean|null): boolean;
270
+
267
271
  public expandSegment(rowRef: string|number|null, expanded?: boolean|null): boolean;
268
272
 
269
273
  public expandAllSegments(): boolean;
@@ -278,6 +282,8 @@ declare class DataView extends EventDispatcher {
278
282
 
279
283
  public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null, dataIds?: (string)[]|null): boolean;
280
284
 
285
+ public setSegmentChildren(segmentArr: (any)[]|null): boolean;
286
+
281
287
  public removeSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): boolean;
282
288
 
283
289
  public removeSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): boolean;
@@ -30,6 +30,8 @@ declare class SegmentCollection extends EventDispatcher {
30
30
 
31
31
  public getSegmentIds(): (string)[];
32
32
 
33
+ public collapseSegments(segmentIds: (string)[]|null, bool?: boolean|null): boolean;
34
+
33
35
  public collapseSegment(segmentId: string, bool?: boolean|null): boolean;
34
36
 
35
37
  public expandSegment(segmentId: string, bool?: boolean|null): boolean;
@@ -295,6 +295,8 @@ declare class Grid extends EventDispatcher {
295
295
 
296
296
  public hasRic(): boolean;
297
297
 
298
+ public getRic(rowRef?: (string|number)|null): string;
299
+
298
300
  public setRowData(rowRef: Grid.RowReference|null, values: any): void;
299
301
 
300
302
  public setStaticRowData(rowRef: Grid.RowReference|null, values: any): void;
@@ -102,7 +102,7 @@ declare class RowDefinition {
102
102
 
103
103
  public subscribeForUpdates(subs?: any): boolean;
104
104
 
105
- public unsubscribeForUpdates(): null;
105
+ public unsubscribeForUpdates(keepData?: boolean|null): null;
106
106
 
107
107
  public isSubscribing(): boolean;
108
108
 
@@ -51,6 +51,8 @@ declare class RowSegmentingPlugin extends GridPlugin {
51
51
 
52
52
  public _resolveDisplayColumn(): number;
53
53
 
54
+ public setSegmentSeparators(rowIds: (string)[]|null, enabled?: boolean|null): boolean;
55
+
54
56
  public setSegmentSeparator(rowRef: string|number|null, enabled?: boolean|null): boolean;
55
57
 
56
58
  public setSegmentClassification(rowRef: string|number|null, fields: string|(string)[]|null): boolean;
@@ -61,6 +63,8 @@ declare class RowSegmentingPlugin extends GridPlugin {
61
63
 
62
64
  public isSegmentSeparator(rowRef: string|number|null): boolean;
63
65
 
66
+ public collapseSegments(rowIds: (string )[]|null, collapsed: (string )[]|null): boolean;
67
+
64
68
  public collapseSegment(rowRef: string|number|null, collapsed?: boolean|null): boolean;
65
69
 
66
70
  public expandSegment(rowRef: string|number|null, expanded?: boolean|null): boolean;
@@ -77,6 +81,8 @@ declare class RowSegmentingPlugin extends GridPlugin {
77
81
 
78
82
  public addSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): void;
79
83
 
84
+ public setSegmentChildren(segmentArr: (any)[]|null): void;
85
+
80
86
  public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): void;
81
87
 
82
88
  public removeSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): void;
package/lib/versions.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
- "tr-grid-util": "1.3.161",
2
+ "tr-grid-util": "1.3.164",
3
3
  "tr-grid-printer": "1.0.18",
4
4
  "@grid/column-dragging": "1.0.21",
5
- "@grid/row-segmenting": "1.0.34",
5
+ "@grid/row-segmenting": "1.0.35",
6
6
  "@grid/statistics-row": "1.0.17",
7
7
  "@grid/zoom": "1.0.11",
8
8
  "tr-grid-auto-tooltip": "1.1.8",
9
- "tr-grid-cell-selection": "1.0.38",
9
+ "tr-grid-cell-selection": "1.0.39",
10
10
  "tr-grid-checkbox": "1.0.70",
11
11
  "tr-grid-column-fitter": "1.0.41",
12
12
  "tr-grid-column-formatting": "0.9.36",
13
- "tr-grid-column-grouping": "1.0.63",
13
+ "tr-grid-column-grouping": "1.0.64",
14
14
  "tr-grid-column-resizing": "1.0.29",
15
15
  "tr-grid-column-selection": "1.0.33",
16
16
  "tr-grid-column-stack": "1.0.76",
@@ -24,10 +24,10 @@
24
24
  "tr-grid-percent-bar": "1.0.24",
25
25
  "tr-grid-range-bar": "2.0.8",
26
26
  "tr-grid-row-dragging": "1.0.36",
27
- "tr-grid-row-filtering": "1.0.82",
27
+ "tr-grid-row-filtering": "1.0.83",
28
28
  "tr-grid-row-grouping": "1.0.88",
29
29
  "tr-grid-row-selection": "1.0.32",
30
- "tr-grid-rowcoloring": "1.0.25",
30
+ "tr-grid-rowcoloring": "1.0.26",
31
31
  "tr-grid-textformatting": "1.0.48",
32
32
  "tr-grid-titlewrap": "1.0.22",
33
33
  "@grid/formatters": "1.0.55",
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "version": "6.0.128"
72
+ "version": "6.0.130"
73
73
  }