@refinitiv-ui/efx-grid 6.0.12 → 6.0.14

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 (42) hide show
  1. package/lib/core/dist/core.js +1209 -160
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataCache.js +1 -1
  4. package/lib/core/es6/data/DataTable.d.ts +18 -3
  5. package/lib/core/es6/data/DataTable.js +203 -17
  6. package/lib/core/es6/data/DataView.d.ts +8 -1
  7. package/lib/core/es6/data/DataView.js +30 -2
  8. package/lib/core/es6/data/Segment.d.ts +36 -11
  9. package/lib/core/es6/data/Segment.js +575 -59
  10. package/lib/core/es6/data/SegmentCollection.d.ts +15 -1
  11. package/lib/core/es6/data/SegmentCollection.js +236 -80
  12. package/lib/core/es6/grid/Core.js +1 -1
  13. package/lib/grid/index.js +1 -1
  14. package/lib/grid/lib/efx-grid.js +1 -1
  15. package/lib/row-segmenting/es6/RowSegmenting.d.ts +2 -0
  16. package/lib/row-segmenting/es6/RowSegmenting.js +26 -3
  17. package/lib/rt-grid/dist/rt-grid.js +1144 -158
  18. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  19. package/lib/rt-grid/es6/ColumnDefinition.d.ts +6 -1
  20. package/lib/rt-grid/es6/ColumnDefinition.js +29 -0
  21. package/lib/rt-grid/es6/Grid.d.ts +2 -0
  22. package/lib/rt-grid/es6/Grid.js +53 -0
  23. package/lib/rt-grid/es6/RowDefinition.js +22 -2
  24. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
  25. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +194 -366
  26. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +24 -4
  27. package/lib/tr-grid-column-stack/es6/ColumnStack.js +177 -52
  28. package/lib/tr-grid-util/es6/RowPainter.d.ts +2 -1
  29. package/lib/tr-grid-util/es6/RowPainter.js +7 -1
  30. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -0
  31. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +191 -52
  32. package/lib/types/es6/ColumnGrouping.d.ts +1 -0
  33. package/lib/types/es6/ColumnStack.d.ts +24 -4
  34. package/lib/types/es6/Core/data/DataTable.d.ts +18 -3
  35. package/lib/types/es6/Core/data/DataView.d.ts +8 -1
  36. package/lib/types/es6/Core/data/Segment.d.ts +36 -11
  37. package/lib/types/es6/Core/data/SegmentCollection.d.ts +15 -1
  38. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +6 -1
  39. package/lib/types/es6/RealtimeGrid/Grid.d.ts +2 -0
  40. package/lib/types/es6/RowSegmenting.d.ts +2 -0
  41. package/lib/versions.json +4 -4
  42. package/package.json +1 -1
@@ -10,12 +10,13 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
10
10
  declare namespace ColumnStackPlugin {
11
11
 
12
12
  type Options = {
13
- fields: (string)[]|null
13
+ fields: (string)[]|null,
14
+ stacks: (ColumnStackPlugin.StackDefinition)[]|null
14
15
  };
15
16
 
16
17
  type ColumnOptions = {
17
18
  stackId?: string|null,
18
- stack?: (string|StackOptions)|null
19
+ stack?: (string|ColumnStackPlugin.StackOptions)|null
19
20
  };
20
21
 
21
22
  type StackOptions = {
@@ -24,6 +25,21 @@ declare namespace ColumnStackPlugin {
24
25
  collapsed?: boolean|null
25
26
  };
26
27
 
28
+ type StackDefinition = {
29
+ id: string,
30
+ spreading?: boolean|null,
31
+ collapsed?: boolean|null,
32
+ children: (string)[]|null,
33
+ name?: string|null,
34
+ activeColumn?: string|null
35
+ };
36
+
37
+ type StackConfiguration = {
38
+ spreading?: boolean|null,
39
+ collapsed?: boolean|null,
40
+ activeColumn?: string|null
41
+ };
42
+
27
43
  }
28
44
 
29
45
  declare class ColumnStackPlugin extends GridPlugin {
@@ -66,9 +82,9 @@ declare class ColumnStackPlugin extends GridPlugin {
66
82
 
67
83
  public getStackId(colIndex: number): string;
68
84
 
69
- public stackColumns(colRefs?: (number|string)[]|null, stackId?: string|null, options?: any, sort?: boolean|null): boolean;
85
+ public stackColumns(colRefs?: (number|string)[]|null, stackId?: string|null, options?: ColumnStackPlugin.StackConfiguration|null): boolean;
70
86
 
71
- public setStack(colRefs?: (number|string)[]|null): boolean;
87
+ public setStack(colRefs?: (number|string)[]|null, activeColRef?: number|string|null): boolean;
72
88
 
73
89
  public unstackColumns(colIndices?: (number)[]|null): boolean;
74
90
 
@@ -90,6 +106,10 @@ declare class ColumnStackPlugin extends GridPlugin {
90
106
 
91
107
  public reorderStackColumns(colRefs: (number|string)[]|null, stackId: string): void;
92
108
 
109
+ public setStackName(stackId: string, name: string): void;
110
+
111
+ public getStackName(stackId: string): string;
112
+
93
113
  }
94
114
 
95
115
  export default ColumnStackPlugin;
@@ -10,12 +10,13 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
10
10
  /** @typedef {Object} ColumnStackPlugin~Options
11
11
  * @description Available options describing `columnStack` object specified in grid's option
12
12
  * @property {Array.<string>} fields Fields for stacking. The minimum is 2 fields.
13
+ * @property {Array.<ColumnStackPlugin~StackDefinition>} stacks List of stacking configuration
13
14
  */
14
15
 
15
16
  /** @typedef {Object} ColumnStackPlugin~ColumnOptions
16
17
  * @description Extension column options that can be specified on each individual grid's column option.
17
18
  * @property {string=} stackId Group ID
18
- * @property {(string|StackOptions)=} stack Group ID or StackOptions object
19
+ * @property {(string|ColumnStackPlugin~StackOptions)=} stack Group ID or StackOptions object
19
20
  */
20
21
 
21
22
  /** @typedef {Object} ColumnStackPlugin~StackOptions
@@ -25,6 +26,23 @@ import { preventDefault } from "../../tr-grid-util/es6/EventDispatcher.js";
25
26
  * @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
26
27
  */
27
28
 
29
+ /** @typedef {Object} ColumnStackPlugin~StackDefinition
30
+ * @description Available options for setting stack
31
+ * @property {string} id Group ID
32
+ * @property {boolean=} spreading=false If specified true, this group will be running in collapsing mode
33
+ * @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
34
+ * @property {Array.<string>} children Children column ID
35
+ * @property {string=} name="" Name defined for specific stack
36
+ * @property {string=} activeColumn="" Column Id of active column in stack
37
+ */
38
+
39
+ /** @typedef {Object} ColumnStackPlugin~StackConfiguration
40
+ * @description Available options describing grouped column displaying
41
+ * @property {boolean=} spreading=false If specified true, this group will be running in collapsing mode
42
+ * @property {boolean=} collapsed=true If disabled, this group will be expanded at the first time
43
+ * @property {string=} activeColumn="" Column index or field for set as active column
44
+ */
45
+
28
46
  /** @constructor
29
47
  * @extends {GridPlugin}
30
48
  */
@@ -185,7 +203,9 @@ ColumnStackPlugin.prototype.config = function (options) {
185
203
  if(!options) { return; }
186
204
 
187
205
  var columns = options["columns"];
188
- if(!columns) { return; }
206
+ if(!columns) {
207
+ columns = [];
208
+ }
189
209
 
190
210
  var i, len = columns.length;
191
211
  for(i = 0; i < len; ++i) {
@@ -203,6 +223,19 @@ ColumnStackPlugin.prototype.config = function (options) {
203
223
  spreading: columnStack.spreading === true,
204
224
  collapsed: columnStack.collapsed !== false
205
225
  };
226
+ } else if (columnStack.stacks && columnStack.stacks.length) {
227
+ var stackLen = columnStack.stacks.length;
228
+ for(i = 0; i < stackLen; i++){
229
+ var stackConfig = columnStack.stacks[i];
230
+ sid = stackConfig.id || this._generateStackId();
231
+ if(stackConfig.collapsed == null){
232
+ stackConfig.collapsed = true;
233
+ }
234
+ if(stackConfig.spreading == null){
235
+ stackConfig.spreading = false;
236
+ }
237
+ stacks[sid] = stackConfig;
238
+ }
206
239
  }
207
240
  } else {
208
241
  var column, stackOpt;
@@ -231,8 +264,17 @@ ColumnStackPlugin.prototype.config = function (options) {
231
264
  }
232
265
 
233
266
  if(this._initializedGrid) {
267
+ if(Object.keys(stacks).length){
268
+ this.removeAllStacks(false);
269
+ } else {
270
+ this.removeAllStacks();
271
+ }
234
272
  for(sid in stacks) {
235
- this.stackColumns(stacks[sid].colRefs, sid, stacks[sid]);
273
+ var config = stacks[sid];
274
+ if(!config.colRefs){
275
+ this._transformStackConfig(config);
276
+ }
277
+ this.stackColumns(config.colRefs, sid, config);
236
278
  }
237
279
  } else {
238
280
  this._pendingStacks = this._pendingStacks || stacks;
@@ -250,27 +292,34 @@ ColumnStackPlugin.prototype.getConfigObject = function (gridOptions) {
250
292
  if (this._columnStack != null) {
251
293
  obj.columnStack = this._columnStack;
252
294
  } else {
253
- var columns = obj.columns;
254
- if (!columns) {
255
- columns = obj.columns = [];
256
- }
257
-
258
- var len = this.getColumnCount();
259
- for (var i = 0; i < len; ++i) {
260
- var column = columns[i];
261
- if (!column) {
262
- column = columns[i] = {};
263
- }
264
-
265
- var stackOpt = this._getColumnStackOptions(i);
266
- if (!stackOpt) continue;
267
-
268
- column.stack = {
269
- id: stackOpt.stackId,
270
- spreading: stackOpt.spreading,
271
- collapsed: stackOpt.collapsed
295
+ var stacks = this._stacks;
296
+ var stackOptions = [];
297
+
298
+ for (var stackKey in stacks) {
299
+ var stackOption = stacks[stackKey];
300
+ var activeColIndex = this._getColumnIndex(stackOption.activeColumn);
301
+ var stackConfigObj = {
302
+ id: stackOption.stackId,
303
+ children: this.getStackMemberIds(stackOption.stackId),
304
+ activeColumn: this.getColumnId(activeColIndex)
272
305
  };
306
+ var name = stackOption.name;
307
+ var collapsed = stackOption.collapsed;
308
+ var spreading = stackOption.spreading;
309
+ if (name) {
310
+ stackConfigObj.name = name;
311
+ }
312
+ if (collapsed !== true) {
313
+ stackConfigObj.collapsed = collapsed;
314
+ }
315
+ if (spreading !== false) {
316
+ stackConfigObj.spreading = spreading;
317
+ }
318
+ stackOptions.push(stackConfigObj);
273
319
  }
320
+
321
+ obj.columnStack = {};
322
+ obj.columnStack.stacks = stackOptions;
274
323
  }
275
324
 
276
325
  return obj;
@@ -280,8 +329,12 @@ ColumnStackPlugin.prototype.getConfigObject = function (gridOptions) {
280
329
  */
281
330
  ColumnStackPlugin.prototype._afterInit = function () {
282
331
  if(this._pendingStacks) {
332
+ this.removeAllStacks(false);
283
333
  for(var sid in this._pendingStacks) {
284
334
  var stackOpt = this._pendingStacks[sid];
335
+ if(!stackOpt.colRefs){
336
+ this._transformStackConfig(stackOpt);
337
+ }
285
338
  this.stackColumns(stackOpt.colRefs, sid, stackOpt);
286
339
  }
287
340
  this._pendingStacks = null;
@@ -331,6 +384,37 @@ ColumnStackPlugin.prototype._setColumnStackOptions = function(colIndex, stackOpt
331
384
  }
332
385
  };
333
386
  /** @private
387
+ * @param {object} stackConfig
388
+ * @return {object} stack config object
389
+ */
390
+ ColumnStackPlugin.prototype._transformStackConfig = function(stackConfig) {
391
+ stackConfig.colRefs = [];
392
+ var children = stackConfig.children;
393
+ var activeColumn = stackConfig.activeColumn;
394
+ var field;
395
+ if(children){
396
+ var childLen = stackConfig.children.length;
397
+ for(var j = 0; j < childLen; j++){
398
+ var colIndex = this.getColumnIndex(children[j]);
399
+ if(colIndex !== -1){
400
+ field = this._getField(colIndex);
401
+ stackConfig.colRefs.push(field);
402
+ }
403
+ }
404
+ }
405
+ if(activeColumn){
406
+ var activeColIndex = this.getColumnIndex(activeColumn);
407
+ if(activeColIndex !== -1){
408
+ field = this._getField(colIndex);
409
+ if(field){
410
+ stackConfig.activeColumn;
411
+ }
412
+
413
+ }
414
+ }
415
+ return stackConfig;
416
+ };
417
+ /** @private
334
418
  * @param {number} colIndex
335
419
  * @return {*}
336
420
  */
@@ -771,16 +855,16 @@ ColumnStackPlugin.prototype.getStackId = function(colIndex) {
771
855
  /** @public
772
856
  * @param {Array.<number|string>=} colRefs Names of fields or column indices. If not specified, selected columns will be used.
773
857
  * @param {string=} stackId Must be unique
774
- * @param {Object=} options
775
- * @param {boolean=} sort Default to true. If enable and colRefs are column indices, column in stack will be sorted
858
+ * @param {ColumnStackPlugin~StackConfiguration=} options
776
859
  * @return {boolean} Return true if all of the given columns is stacked together
777
860
  */
778
- ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options, sort) {
861
+ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options) {
862
+ var needSorting = true;
863
+
779
864
  if(!colRefs) {
780
865
  colRefs = this._getSelectedColumns();
781
866
  }
782
867
 
783
- var needSorting = sort !== null ? sort : true;
784
868
  if(colRefs.length) {
785
869
  if(typeof colRefs[0] === "string") {// Do not sort in the case of field stack
786
870
  needSorting = false;
@@ -811,10 +895,17 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options, s
811
895
 
812
896
  options = options || {};
813
897
 
814
- var activeIndex = colRefs[0];
898
+ var activeIndex = options.activeColumn ? this.getColumnIndices(options.activeColumn) : colRefs[0];
899
+ if (activeIndex.length){
900
+ activeIndex = activeIndex[0];
901
+ }
902
+ if(activeIndex == null || colRefs.indexOf(activeIndex) == -1){
903
+ activeIndex = colRefs[0];
904
+ }
815
905
  // Collecting data
816
906
  var stack = {};
817
907
  stack.stackId = sid;
908
+ stack.name = options.name || "";
818
909
  stack.spreading = options.spreading === true;
819
910
  if(stack.spreading) {
820
911
  activeIndex = colRefs[len - 1];
@@ -827,6 +918,10 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options, s
827
918
  this._setColumnStackOptions(colIndex, stack);
828
919
  stack.stackRefs[i] = this._getColumnStacking(colIndex);
829
920
 
921
+ if(colIndex == activeIndex){
922
+ stack.activeColumn = stack.stackRefs[i];
923
+ }
924
+
830
925
  // Prevent from flashing in stack mode
831
926
  if(colIndex !== activeIndex && stack.collapsed !== false) {
832
927
  this._setColumnVisibility(colIndex, false);
@@ -839,12 +934,12 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options, s
839
934
  if(stack.spreading) {
840
935
  stack.activeColumn = stack.stackRefs[stack.stackRefs.length - 1]; // Right most column is the active column
841
936
  } else {
842
- stack.activeColumn = stack.stackRefs[0]; // Left most column is the active column
843
937
  var csp = this._getPlugin("ColumnSelectionPlugin");
844
938
  if(csp && csp.isEnabled()) {
845
939
  csp.selectSingleColumn(activeIndex);
846
940
  }
847
941
  }
942
+
848
943
  this._stacks[sid] = stack;
849
944
 
850
945
  var cfp = this._getPlugin("ColumnFilterPlugin");
@@ -861,9 +956,10 @@ ColumnStackPlugin.prototype.stackColumns = function(colRefs, stackId, options, s
861
956
  * When adding columns, Grid will attempt to restore stacking
862
957
  * if there are at least two visible columns that match to the retained fields.
863
958
  * @param {Array.<number|string>=} colRefs Field names or column indices
959
+ * @param {number|string=} activeColRef Field names or column index of active column
864
960
  * @return {boolean} If the stack has been updated, return true.
865
961
  */
866
- ColumnStackPlugin.prototype.setStack = function(colRefs) {
962
+ ColumnStackPlugin.prototype.setStack = function(colRefs, activeColRef) {
867
963
  // Keep state
868
964
  var i, colRef, type;
869
965
  var fields = [];
@@ -878,6 +974,9 @@ ColumnStackPlugin.prototype.setStack = function(colRefs) {
878
974
  }
879
975
  }
880
976
  }
977
+ if(activeColRef && typeof activeColRef === "number") {
978
+ activeColRef = this._getField(activeColRef);
979
+ }
881
980
 
882
981
  if(fields.length > 1) {
883
982
  if(!this._columnStack) {
@@ -911,29 +1010,19 @@ ColumnStackPlugin.prototype.setStack = function(colRefs) {
911
1010
  return this.removeAllStacks();
912
1011
  }
913
1012
 
914
- // Check old data stacking
915
- var count = 0;
916
-
917
- if(this._stacks[sid]) {
918
- var stackRefs = this._stacks[sid].stackRefs;
919
- if(stackRefs.length === colRefs.length) {
920
- for (i = 0; i < colRefs.length; i++) {
921
- var stacking = this._getColumnStacking(colRefs[i]);
922
- var oldStacking = stackRefs[i];
923
- if(stacking === oldStacking) {
924
- count++;
925
- }
926
- }
927
- if(count === colRefs.length) {
928
- return false;
1013
+ var activeIndex = colRefs[0]; // For the active index, choose the first element.
1014
+ if(activeColRef){
1015
+ var indices = this.getColumnIndices(activeColRef);
1016
+ if(indices.length){
1017
+ var index = indices[0];
1018
+ if(colRefs.indexOf(index) !== -1){
1019
+ activeIndex = indices[0];
929
1020
  }
930
1021
  }
931
1022
  }
932
1023
 
933
1024
  this.removeAllStacks(false); // Remove the stack without updating the UI (UI will only update when column is stacked)
934
1025
 
935
- var activeIndex = colRefs[0]; // For the active index, choose the first element.
936
-
937
1026
  // Collecting data
938
1027
  var stack = {};
939
1028
  stack.stackId = sid;
@@ -944,6 +1033,10 @@ ColumnStackPlugin.prototype.setStack = function(colRefs) {
944
1033
  stack.stackRefs[i] = this._getColumnStacking(colIndex);
945
1034
  this._setColumnStackOptions(colIndex, stack);
946
1035
 
1036
+ if(colIndex == activeIndex){
1037
+ stack.activeColumn = stack.stackRefs[i];
1038
+ }
1039
+
947
1040
  // Prevent from flashing in stack mode
948
1041
  if(colIndex !== activeIndex && stack.collapsed !== false) {
949
1042
  this._setColumnVisibility(colIndex, false);
@@ -953,7 +1046,7 @@ ColumnStackPlugin.prototype.setStack = function(colRefs) {
953
1046
  // Make sure that all columns stay packed together
954
1047
  this._moveStackedColumns(stack.stackRefs);
955
1048
 
956
- stack.activeColumn = stack.stackRefs[0]; // The first stacking (the first given columns) is the active column
1049
+ // stack.activeColumn = stack.stackRefs[0]; // The first stacking (the first given columns) is the active column
957
1050
  this._stacks[sid] = stack;
958
1051
  var cfp = this._getPlugin("ColumnFilterPlugin");
959
1052
  if(cfp) {
@@ -1098,8 +1191,6 @@ ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
1098
1191
  return false; // The given index is already active stacked column
1099
1192
  }
1100
1193
 
1101
- colData.stackRefs.splice(swappingIndex, 1);
1102
- colData.stackRefs.unshift(newActiveColumn); // Move data to front
1103
1194
  var prevActiveColumnIndex = this._getColumnIndex(colData.activeColumn);
1104
1195
  var newActiveColumnIndex = this._getColumnIndex(newActiveColumn);
1105
1196
  colData.activeColumn = newActiveColumn; // Change active column
@@ -1107,8 +1198,6 @@ ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
1107
1198
  this._setColumnVisibility(newActiveColumnIndex, true);
1108
1199
  this._setColumnVisibility(prevActiveColumnIndex, false); // Hide current active column
1109
1200
 
1110
- this._moveColumn(newActiveColumnIndex, prevActiveColumnIndex); // Move UI to front
1111
-
1112
1201
  var csp = this._getPlugin("ColumnSelectionPlugin");
1113
1202
  if(csp && csp.isEnabled()) {
1114
1203
  csp.selectSingleColumn(newActiveColumnIndex);
@@ -1120,6 +1209,7 @@ ColumnStackPlugin.prototype.swapColumn = function(colRef, swappingIndex) {
1120
1209
 
1121
1210
  colData = this._getColumnStackOptions(prevActiveColumnIndex);
1122
1211
  this._updateIcon(prevActiveColumnIndex, colData);
1212
+ this._updateIcon(newActiveColumnIndex, colData);
1123
1213
 
1124
1214
  return true;
1125
1215
  };
@@ -1342,6 +1432,7 @@ ColumnStackPlugin.prototype._onStackButtonClicked = function(e) {
1342
1432
 
1343
1433
  var stackRefs = colData.stackRefs;
1344
1434
  var activeIndex = stackRefs.indexOf(colData.activeColumn);
1435
+
1345
1436
  var len = stackRefs.length;
1346
1437
  var colIndices = new Array(len);
1347
1438
  var menuData = new Array(len);
@@ -1601,11 +1692,45 @@ ColumnStackPlugin.prototype.reorderStackColumns = function(colRefs, stackId) {
1601
1692
  collapsed: stack.collapsed
1602
1693
  };
1603
1694
 
1695
+ for(i = 0; i < newStackMembers.length; i++){
1696
+ newStackMembers[i] = this._getField(newStackMembers[i]);
1697
+ }
1698
+
1604
1699
  this.unstackColumns(stackMemberIndices);
1605
- this.stackColumns(newStackMembers, stackId, options, false);
1700
+ this.stackColumns(newStackMembers, stackId, options);
1606
1701
 
1607
1702
  };
1608
1703
 
1704
+ /** @public
1705
+ * @description Set stack name to a stack
1706
+ * @param {string} stackId
1707
+ * @param {string} name
1708
+ */
1709
+ ColumnStackPlugin.prototype.setStackName = function(stackId, name) {
1710
+ if(stackId !== null) {
1711
+ var stack = this._stacks[stackId];
1712
+ if(stack){
1713
+ stack.name = name;
1714
+ }
1715
+ }
1716
+ };
1717
+
1718
+ /** @public
1719
+ * @description Get stack name from specific stack
1720
+ * @param {string} stackId
1721
+ * @return {string} Stack name
1722
+ */
1723
+ ColumnStackPlugin.prototype.getStackName = function(stackId) {
1724
+ var stackName = "";
1725
+ if(stackId !== null) {
1726
+ var stack = this._stacks[stackId];
1727
+ if(stack){
1728
+ stackName = stack.name;
1729
+ }
1730
+ }
1731
+ return stackName;
1732
+ };
1733
+
1609
1734
 
1610
1735
  export default ColumnStackPlugin;
1611
1736
  export { ColumnStackPlugin, ColumnStackPlugin as ColumnStack, ColumnStackPlugin as ColumnStackExtension };
@@ -26,7 +26,8 @@ declare namespace RowPainter {
26
26
  groupLevel?: number|null,
27
27
  nonGroupRow?: boolean|null,
28
28
  colorTagClass?: string|null,
29
- indentSize?: number|null
29
+ indentSize?: number|null,
30
+ content: any
30
31
  };
31
32
 
32
33
  }
@@ -25,6 +25,7 @@ import { Icon } from "./Icon.js";
25
25
  * @property {boolean=} nonGroupRow
26
26
  * @property {string=} colorTagClass CSS class for custom coloring
27
27
  * @property {number=} indentSize
28
+ * @property {*} content Content to be rendered on the first cell. If null or undefined value is given, no content will be changed.
28
29
  */
29
30
 
30
31
  /**
@@ -335,7 +336,12 @@ RowPainter.prototype.applyHeaderStyle = function(e) {
335
336
  if (this._clickableCell) {
336
337
  cell.listen("click", this._onCellClicked); // WARNING: content row share this same listener with this header cell
337
338
  }
338
- if (!this._segmentMode) {
339
+ if (this._segmentMode) {
340
+ var content = e.content;
341
+ if(content != null) {
342
+ cell.setContent(content);
343
+ }
344
+ } else {
339
345
  cell.setContent(e.groupId || "");
340
346
  }
341
347
  }
@@ -1,4 +1,5 @@
1
1
  import { DataGenerator } from "./DataGenerator.js";
2
+ import { DateTime } from "../DateTime.js";
2
3
 
3
4
  declare namespace DataGrid {
4
5