@refinitiv-ui/efx-grid 6.0.2 → 6.0.5

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 (203) hide show
  1. package/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
  2. package/lib/column-dragging/es6/ColumnDragging.js +764 -0
  3. package/lib/column-dragging/es6/index.d.ts +1 -0
  4. package/lib/column-dragging/es6/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
  6. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
  7. package/lib/column-selection-dialog/lib/column-selection-dialog.js +146 -5
  8. package/lib/core/dist/core.css +1 -1
  9. package/lib/core/dist/core.js +468 -1092
  10. package/lib/core/dist/core.min.js +1 -1
  11. package/lib/core/es6/data/ColumnStats.d.ts +2 -2
  12. package/lib/core/es6/data/DataCache.d.ts +4 -4
  13. package/lib/core/es6/data/DataTable.d.ts +5 -5
  14. package/lib/core/es6/data/DataTable.js +33 -11
  15. package/lib/core/es6/data/DataView.d.ts +12 -18
  16. package/lib/core/es6/data/DataView.js +0 -4
  17. package/lib/core/es6/data/Segment.d.ts +2 -0
  18. package/lib/core/es6/data/Segment.js +7 -0
  19. package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
  20. package/lib/core/es6/data/WrappedView.d.ts +13 -13
  21. package/lib/core/es6/data/WrappedView.js +6 -6
  22. package/lib/core/es6/grid/Core.d.ts +31 -27
  23. package/lib/core/es6/grid/Core.js +47 -11
  24. package/lib/core/es6/grid/ILayoutGrid.d.ts +15 -15
  25. package/lib/core/es6/grid/LayoutGrid.js +54 -26
  26. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +71 -0
  27. package/lib/core/es6/grid/components/Cell.d.ts +4 -4
  28. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
  29. package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
  30. package/lib/core/es6/grid/components/Column.d.ts +1 -1
  31. package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
  32. package/lib/core/es6/grid/components/Scrollbar.d.ts +3 -1
  33. package/lib/core/es6/grid/components/Scrollbar.js +13 -0
  34. package/lib/core/es6/grid/components/StretchedCells.js +2 -2
  35. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  36. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
  37. package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
  38. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
  39. package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
  40. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
  41. package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
  42. package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
  43. package/lib/core/es6/grid/util/SectionSettings.js +5 -0
  44. package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
  45. package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
  46. package/lib/core/es6/grid/util/TrackLayout.js +27 -0
  47. package/lib/core/es6/grid/util/util.d.ts +2 -2
  48. package/lib/core/es6/index.d.ts +1 -5
  49. package/lib/core/es6/index.js +1 -7
  50. package/lib/core/es6/tr-grid-theme.js +1 -1
  51. package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
  52. package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
  53. package/lib/filter-dialog/lib/filter-dialog.js +86 -26
  54. package/lib/filter-dialog/themes/base-checkbox.less +8 -1
  55. package/lib/filter-dialog/themes/base.less +69 -1
  56. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
  57. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
  58. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
  59. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
  60. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
  61. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
  62. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
  63. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
  64. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
  65. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
  66. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
  67. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
  68. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
  69. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
  70. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
  71. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
  72. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
  73. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
  74. package/lib/grid/lib/efx-grid.d.ts +25 -10
  75. package/lib/grid/lib/efx-grid.js +22 -56
  76. package/lib/grid/themes/base.less +1 -1
  77. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  78. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  79. package/lib/grid/themes/halo/efx-grid.less +33 -39
  80. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  81. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  82. package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
  83. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
  84. package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
  85. package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
  86. package/lib/index.d.ts +2 -0
  87. package/lib/index.js +2 -0
  88. package/lib/row-segmenting/es6/RowSegmenting.d.ts +7 -2
  89. package/lib/row-segmenting/es6/RowSegmenting.js +98 -11
  90. package/lib/rt-grid/dist/rt-grid.js +1244 -1249
  91. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  92. package/lib/rt-grid/es6/ColumnDefinition.d.ts +5 -3
  93. package/lib/rt-grid/es6/ColumnDefinition.js +17 -108
  94. package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
  95. package/lib/rt-grid/es6/Grid.d.ts +24 -9
  96. package/lib/rt-grid/es6/Grid.js +285 -103
  97. package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
  98. package/lib/rt-grid/es6/RowDefSorter.js +137 -0
  99. package/lib/rt-grid/es6/RowDefinition.d.ts +9 -7
  100. package/lib/rt-grid/es6/RowDefinition.js +6 -0
  101. package/lib/rt-grid/es6/SnapshotFiller.d.ts +6 -1
  102. package/lib/rt-grid/es6/SnapshotFiller.js +144 -15
  103. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +4 -3
  104. package/lib/tr-grid-checkbox/es6/Checkbox.js +51 -21
  105. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +46 -9
  106. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
  107. package/lib/tr-grid-column-stack/es6/ColumnStack.js +240 -125
  108. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +4 -3
  109. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +28 -13
  110. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
  111. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
  112. package/lib/tr-grid-percent-bar/es6/PercentBar.js +1 -1
  113. package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
  114. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
  115. package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
  116. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
  117. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
  118. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
  119. package/lib/tr-grid-row-dragging/es6/RowDragging.js +86 -195
  120. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
  121. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +97 -7
  122. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +8 -8
  123. package/lib/tr-grid-row-selection/es6/RowSelection.js +55 -31
  124. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
  125. package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
  126. package/lib/tr-grid-util/es6/CellPainter.js +1 -1
  127. package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
  128. package/lib/tr-grid-util/es6/DragUI.js +214 -0
  129. package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
  130. package/lib/tr-grid-util/es6/ElementObserver.js +32 -2
  131. package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -1
  132. package/lib/tr-grid-util/es6/ElfUtil.js +131 -28
  133. package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
  134. package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
  135. package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
  136. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +8 -0
  137. package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
  138. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
  139. package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
  140. package/lib/tr-grid-util/es6/RowPainter.js +57 -19
  141. package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
  142. package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
  143. package/lib/types/es6/Checkbox.d.ts +4 -3
  144. package/lib/types/es6/ColumnStack.d.ts +8 -4
  145. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
  146. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
  147. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
  148. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
  149. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
  150. package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
  151. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
  152. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
  153. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
  154. package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
  155. package/lib/types/es6/ConditionalColoring.d.ts +4 -3
  156. package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
  157. package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
  158. package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
  159. package/lib/types/es6/Core/data/DataView.d.ts +12 -18
  160. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  161. package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
  162. package/lib/types/es6/Core/data/WrappedView.d.ts +13 -13
  163. package/lib/types/es6/Core/grid/Core.d.ts +31 -27
  164. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +15 -15
  165. package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
  166. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
  167. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
  168. package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
  169. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
  170. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +3 -1
  171. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
  172. package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
  173. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
  174. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
  175. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
  176. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
  177. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
  178. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
  179. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
  180. package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
  181. package/lib/types/es6/Core/index.d.ts +1 -5
  182. package/lib/types/es6/ExtensionOptions.d.ts +2 -0
  183. package/lib/types/es6/InCellEditing.d.ts +8 -5
  184. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +5 -3
  185. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
  186. package/lib/types/es6/RealtimeGrid/Grid.d.ts +24 -9
  187. package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
  188. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +9 -7
  189. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +6 -1
  190. package/lib/types/es6/RowDragging.d.ts +3 -4
  191. package/lib/types/es6/RowGrouping.d.ts +7 -2
  192. package/lib/types/es6/RowSegmenting.d.ts +7 -2
  193. package/lib/types/es6/RowSelection.d.ts +8 -8
  194. package/lib/types/es6/TextFormatting.d.ts +1 -1
  195. package/lib/types/es6/index.d.ts +1 -0
  196. package/lib/versions.json +17 -16
  197. package/package.json +1 -1
  198. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
  200. package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
  201. package/lib/core/es6/grid/plugins/Plugin.js +0 -272
  202. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
  203. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +0 -28
@@ -3,11 +3,14 @@ import { GridPlugin, rowDefRowGetter } from "../../tr-grid-util/es6/GridPlugin.j
3
3
  import { ExpanderIcon } from "../../tr-grid-util/es6/ExpanderIcon.js";
4
4
  import { ElfUtil } from "../../tr-grid-util/es6/ElfUtil.js";
5
5
  import { RowPainter } from "../../tr-grid-util/es6/RowPainter.js";
6
+ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
6
7
 
7
8
  /** @typedef {Object} RowSegmentingPlugin~Options
8
9
  * @description The options can be specified by `rowSegmenting` property of the main grid's options
9
10
  * @property {boolean=} spanning=true If disabled, segment separator rows will not be spanned/stretched across multiple cells
10
11
  * @property {boolean=} colorTag If not specified, the color tag will be disabled when using extension without halo theme.
12
+ * @property {string=} cssField="TAG_CSS_CLASS" Apply CSS class based on the given field
13
+ * @property {Object=} predefinedColors Predefined color object map for color tag
11
14
  * @property {Function=} clicked=null Event handler when user clicks on arrows or cells
12
15
  * @property {Function=} headerMenuClicked=null Event handler when user clicks on menu icon. The menu icon will be displayed if spanning option is true.
13
16
  * @property {Function=} segmentSeparatorBinding=null Logic that will be executed on each segment separator row
@@ -67,6 +70,23 @@ RowSegmentingPlugin.prototype._rowPainter = null;
67
70
  * @private
68
71
  */
69
72
  RowSegmentingPlugin.prototype._colorTag = null;
73
+ /** @type {string}
74
+ * @private
75
+ */
76
+ RowSegmentingPlugin.prototype._cssField = "TAG_CSS_CLASS";
77
+ /** @type {Object}
78
+ * @private
79
+ */
80
+ RowSegmentingPlugin.prototype._styleTag = null;
81
+ /** @type {Object}
82
+ * @private
83
+ */
84
+ RowSegmentingPlugin.prototype._predefinedColors = null;
85
+ /** @type {string}
86
+ * @private
87
+ */
88
+ RowSegmentingPlugin._controlClass = "predefined-color-tag";
89
+
70
90
 
71
91
  /** @public
72
92
  * @return {string}
@@ -105,7 +125,14 @@ RowSegmentingPlugin.prototype.initialize = function (host, options) {
105
125
 
106
126
  var enabled = this._colorTag != null ? this._colorTag : ElfUtil.isHaloTheme();
107
127
  RowPainter.disableColorTag(host, enabled === false);
128
+
129
+ if (this._predefinedColors != null) {
130
+ this._injectStyles(this._predefinedColors);
131
+ host.enableClass(RowSegmentingPlugin._controlClass);
132
+ }
133
+
108
134
  RowPainter.applyGroupingStyles(host);
135
+ host.addClass("folder-disabled"); // Mouse cursor will be pointer when hovering at header rows
109
136
 
110
137
  enabled = this._headerMenuClicked;
111
138
  RowPainter.enableHeaderMenu(host, enabled ? true : false);
@@ -143,24 +170,31 @@ RowSegmentingPlugin.prototype.config = function (options) {
143
170
  if (typeof option.headerMenuClicked === "function") {
144
171
  this._headerMenuClicked = option.headerMenuClicked;
145
172
  }
146
- if(option.spanning != null) {
173
+ if (option.spanning != null) {
147
174
  this._spanning = option.spanning ? true : false;
148
175
  }
149
-
150
- this.addListener(option, "clicked");
151
- this.addListener(option, "segmentSeparatorBinding");
152
- this.addListener(option, "nonSegmentSeparatorBinding");
176
+ if (option.colorTag != null) {
177
+ this._colorTag = option.colorTag;
178
+ }
179
+ if (option.cssField != null) {
180
+ this._cssField = option.cssField;
181
+ }
182
+ if (option.predefinedColors != null && typeof option.predefinedColors === "object") {
183
+ this._predefinedColors = option.predefinedColors;
184
+ }
153
185
 
154
186
  this._rowPainter = new RowPainter({
155
187
  clickableCell: false,
156
188
  headerSpanning: this._spanning,
157
189
  footerSpanning: false,
158
190
  onCellClicked: this._onArrowClick,
159
- headerMenuClicked: this._headerMenuClicked
191
+ headerMenuClicked: this._headerMenuClicked,
192
+ segmentMode: true
160
193
  });
161
- if (option.colorTag != null) {
162
- this._colorTag = option.colorTag;
163
- }
194
+
195
+ this.addListener(option, "clicked");
196
+ this.addListener(option, "segmentSeparatorBinding");
197
+ this.addListener(option, "nonSegmentSeparatorBinding");
164
198
  };
165
199
 
166
200
  /** @public
@@ -183,9 +217,41 @@ RowSegmentingPlugin.prototype.getConfigObject = function (gridOptions) {
183
217
  if(this._colorTag != null) {
184
218
  extOptions.colorTag = this._colorTag;
185
219
  }
220
+ if(this._cssField !== "TAG_CSS_CLASS") {
221
+ extOptions.cssField = this._cssField;
222
+ }
223
+ if(this._predefinedColors != null) {
224
+ extOptions.predefinedColors = this._predefinedColors;
225
+ }
186
226
  return obj;
187
227
  };
188
228
 
229
+ /** @private
230
+ * @param {Object} predefinedColors Predefined color object map
231
+ */
232
+ RowSegmentingPlugin.prototype._injectStyles = function(predefinedColors) {
233
+ var prefix = ".tr-grid." + RowSegmentingPlugin._controlClass + " .tr-lg .cell";
234
+ var css = [];
235
+ var value;
236
+ for (var className in predefinedColors) {
237
+ css.push(prefix + "." + className + "::before");
238
+ value = predefinedColors[className]["backgroundColor"];
239
+ if (value) {
240
+ css.push(["background-color: " + value + ";"]);
241
+ }
242
+ }
243
+
244
+ var host = this._hosts[0];
245
+
246
+ if (this._styleTag) {
247
+ if (this._styleTag.parentNode) {
248
+ this._styleTag.parentNode.removeChild(this._styleTag);
249
+ }
250
+ this._styleTag = null;
251
+ }
252
+ this._styleTag = injectCss(prettifyCss(css), host.getElement());
253
+ };
254
+
189
255
  /** @private
190
256
  */
191
257
  RowSegmentingPlugin.prototype._applyInitialSegments = function () {
@@ -289,8 +355,9 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
289
355
  break;
290
356
  }
291
357
  }
292
-
358
+ var cssField = this._cssField;
293
359
  var rowPainter = this._rowPainter;
360
+ var parentRows = {};
294
361
  for (var r = fi; r <= li; r++) {
295
362
  var cell = section.getCell(headerColumn, r, false); // Work only one row
296
363
  if (!cell) { // There may be no header to be updated
@@ -306,6 +373,9 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
306
373
  arg.collapsedSegment = arg.collapsed = segmentSeparator ? dv.isSegmentCollapsed(rowId) : false;
307
374
  var indentLevel = 0;
308
375
  if (segmentSeparator) {
376
+ if (this._predefinedColors) {
377
+ arg.colorTagClass = arg.rowData[cssField];
378
+ }
309
379
  arg.indentSize = this._getIndentSize(indentLevel, true);
310
380
  rowPainter.applyHeaderStyle(arg);
311
381
  this._dispatch("segmentSeparatorBinding", arg);
@@ -314,7 +384,14 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
314
384
  if(parentId) {
315
385
  indentLevel = 1; // TODO: Provide a way for segmenting multiple levels. Currently, just one level is supported.
316
386
  arg.nonGroupRow = false;
387
+ var parentRowData = parentRows[parentId];
388
+ if (!parentRowData) {
389
+ var parentRowIndex = dv.getRowIndex(parentId);
390
+ parentRowData = parentRows[parentId] = this._getRow(dv, parentRowIndex);
391
+ }
392
+ arg.colorTagClass = parentRowData[cssField];
317
393
  } else {
394
+ arg.colorTagClass = null;
318
395
  arg.nonGroupRow = true;
319
396
  }
320
397
  arg.indentSize = this._getIndentSize(indentLevel, false);
@@ -498,7 +575,7 @@ RowSegmentingPlugin.prototype.setSegmentCollapsingLogic = function(func) {
498
575
  RowSegmentingPlugin.prototype.fillSegment = function(segmentRef) {
499
576
  var dv = this._getDataView();
500
577
  if(dv) {
501
- dv.fillSegment(this._toRowId(segmentRef));
578
+ dv.fillSegment(segmentRef);
502
579
  }
503
580
  };
504
581
  /** Remove all existing segment children in each segment and fill the segments with all contnet rows before the next segment separator
@@ -615,6 +692,16 @@ RowSegmentingPlugin.prototype._rtSortingLogic = function (rowDataA, rowDataB) {
615
692
  );
616
693
  };
617
694
 
695
+ /** @public
696
+ * @param {Object} predefinedColors Predefined color object map
697
+ */
698
+ RowSegmentingPlugin.prototype.setPredefinedColors = function(predefinedColors) {
699
+ if(predefinedColors != null && typeof predefinedColors === "object") {
700
+ this._predefinedColors = predefinedColors;
701
+ this._injectStyles(predefinedColors);
702
+ }
703
+ };
704
+
618
705
 
619
706
 
620
707
  export default RowSegmentingPlugin;