@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.
- package/lib/column-dragging/es6/ColumnDragging.d.ts +49 -0
- package/lib/column-dragging/es6/ColumnDragging.js +764 -0
- package/lib/column-dragging/es6/index.d.ts +1 -0
- package/lib/column-dragging/es6/index.js +1 -0
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +13 -1
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +15 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +146 -5
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +468 -1092
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.d.ts +2 -2
- package/lib/core/es6/data/DataCache.d.ts +4 -4
- package/lib/core/es6/data/DataTable.d.ts +5 -5
- package/lib/core/es6/data/DataTable.js +33 -11
- package/lib/core/es6/data/DataView.d.ts +12 -18
- package/lib/core/es6/data/DataView.js +0 -4
- package/lib/core/es6/data/Segment.d.ts +2 -0
- package/lib/core/es6/data/Segment.js +7 -0
- package/lib/core/es6/data/SegmentCollection.d.ts +3 -3
- package/lib/core/es6/data/WrappedView.d.ts +13 -13
- package/lib/core/es6/data/WrappedView.js +6 -6
- package/lib/core/es6/grid/Core.d.ts +31 -27
- package/lib/core/es6/grid/Core.js +47 -11
- package/lib/core/es6/grid/ILayoutGrid.d.ts +15 -15
- package/lib/core/es6/grid/LayoutGrid.js +54 -26
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +71 -0
- package/lib/core/es6/grid/components/Cell.d.ts +4 -4
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/core/es6/grid/components/CellSpans.d.ts +8 -8
- package/lib/core/es6/grid/components/Column.d.ts +1 -1
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/core/es6/grid/components/Scrollbar.d.ts +3 -1
- package/lib/core/es6/grid/components/Scrollbar.js +13 -0
- package/lib/core/es6/grid/components/StretchedCells.js +2 -2
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +147 -81
- package/lib/core/es6/grid/util/Conflator.d.ts +2 -2
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/core/es6/grid/util/HttpRequest.d.ts +2 -2
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
- package/lib/core/es6/grid/util/SectionSettings.d.ts +5 -5
- package/lib/core/es6/grid/util/SectionSettings.js +5 -0
- package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
- package/lib/core/es6/grid/util/TrackLayout.d.ts +7 -3
- package/lib/core/es6/grid/util/TrackLayout.js +27 -0
- package/lib/core/es6/grid/util/util.d.ts +2 -2
- package/lib/core/es6/index.d.ts +1 -5
- package/lib/core/es6/index.js +1 -7
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/lib/checkbox-list.d.ts +13 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +14 -1
- package/lib/filter-dialog/lib/filter-dialog.js +86 -26
- package/lib/filter-dialog/themes/base-checkbox.less +8 -1
- package/lib/filter-dialog/themes/base.less +69 -1
- package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/halo/light/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/halo/light/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +1 -1
- package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +2 -2
- package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +1 -1
- package/lib/grid/lib/efx-grid.d.ts +25 -10
- package/lib/grid/lib/efx-grid.js +22 -56
- package/lib/grid/themes/base.less +1 -1
- package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
- package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/grid/themes/halo/efx-grid.less +33 -39
- package/lib/grid/themes/halo/light/efx-grid.js +1 -1
- package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/charcoal/efx-grid.js +1 -1
- package/lib/grid/themes/solar/charcoal/es5/all-elements.js +1 -1
- package/lib/grid/themes/solar/pearl/efx-grid.js +1 -1
- package/lib/grid/themes/solar/pearl/es5/all-elements.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/row-segmenting/es6/RowSegmenting.d.ts +7 -2
- package/lib/row-segmenting/es6/RowSegmenting.js +98 -11
- package/lib/rt-grid/dist/rt-grid.js +1244 -1249
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +5 -3
- package/lib/rt-grid/es6/ColumnDefinition.js +17 -108
- package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
- package/lib/rt-grid/es6/Grid.d.ts +24 -9
- package/lib/rt-grid/es6/Grid.js +285 -103
- package/lib/rt-grid/es6/RowDefSorter.d.ts +19 -0
- package/lib/rt-grid/es6/RowDefSorter.js +137 -0
- package/lib/rt-grid/es6/RowDefinition.d.ts +9 -7
- package/lib/rt-grid/es6/RowDefinition.js +6 -0
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +6 -1
- package/lib/rt-grid/es6/SnapshotFiller.js +144 -15
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +4 -3
- package/lib/tr-grid-checkbox/es6/Checkbox.js +51 -21
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +46 -9
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +240 -125
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +4 -3
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +28 -13
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +8 -5
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +106 -3
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +1 -1
- package/lib/tr-grid-printer/es6/CellWriter.d.ts +3 -3
- package/lib/tr-grid-printer/es6/GridPrinter.d.ts +1 -1
- package/lib/tr-grid-printer/es6/GridPrinter.js +26 -13
- package/lib/tr-grid-printer/es6/PrintTrait.d.ts +2 -2
- package/lib/tr-grid-printer/es6/SectionWriter.d.ts +3 -3
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +3 -4
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +86 -195
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +97 -7
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +8 -8
- package/lib/tr-grid-row-selection/es6/RowSelection.js +55 -31
- package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +1 -1
- package/lib/tr-grid-textformatting/es6/TextFormatting.js +12 -0
- package/lib/tr-grid-util/es6/CellPainter.js +1 -1
- package/lib/tr-grid-util/es6/DragUI.d.ts +16 -0
- package/lib/tr-grid-util/es6/DragUI.js +214 -0
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -0
- package/lib/tr-grid-util/es6/ElementObserver.js +32 -2
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -1
- package/lib/tr-grid-util/es6/ElfUtil.js +131 -28
- package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
- package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
- package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +8 -0
- package/lib/tr-grid-util/es6/MultiTableManager.js +164 -57
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +2 -0
- package/lib/tr-grid-util/es6/NumberFormatter.js +64 -19
- package/lib/tr-grid-util/es6/RowPainter.js +57 -19
- package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/types/es6/Checkbox.d.ts +4 -3
- package/lib/types/es6/ColumnStack.d.ts +8 -4
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +20 -18
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +3 -2
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +28 -0
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +5 -4
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/index.d.ts +9 -9
- package/lib/types/es6/ConditionalColoring.d.ts +4 -3
- package/lib/types/es6/Core/data/ColumnStats.d.ts +2 -2
- package/lib/types/es6/Core/data/DataCache.d.ts +4 -4
- package/lib/types/es6/Core/data/DataTable.d.ts +5 -5
- package/lib/types/es6/Core/data/DataView.d.ts +12 -18
- package/lib/types/es6/Core/data/Segment.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +3 -3
- package/lib/types/es6/Core/data/WrappedView.d.ts +13 -13
- package/lib/types/es6/Core/grid/Core.d.ts +31 -27
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +15 -15
- package/lib/types/es6/Core/grid/components/Cell.d.ts +4 -4
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +8 -8
- package/lib/types/es6/Core/grid/components/Column.d.ts +1 -1
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +3 -1
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +14 -6
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +5 -5
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +7 -3
- package/lib/types/es6/Core/grid/util/util.d.ts +2 -2
- package/lib/types/es6/Core/index.d.ts +1 -5
- package/lib/types/es6/ExtensionOptions.d.ts +2 -0
- package/lib/types/es6/InCellEditing.d.ts +8 -5
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +5 -3
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +24 -9
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +9 -7
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +6 -1
- package/lib/types/es6/RowDragging.d.ts +3 -4
- package/lib/types/es6/RowGrouping.d.ts +7 -2
- package/lib/types/es6/RowSegmenting.d.ts +7 -2
- package/lib/types/es6/RowSelection.d.ts +8 -8
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/types/es6/index.d.ts +1 -0
- package/lib/versions.json +17 -16
- package/package.json +1 -1
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +0 -615
- package/lib/core/es6/grid/plugins/Plugin.d.ts +0 -28
- package/lib/core/es6/grid/plugins/Plugin.js +0 -272
- package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +0 -24
- 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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
162
|
-
|
|
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(
|
|
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;
|