@refinitiv-ui/efx-grid 6.0.1 → 6.0.4
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 +226 -23
- package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +1 -1
- package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +1 -1
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +17835 -16266
- 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 +26 -17
- package/lib/core/es6/data/DataView.js +172 -49
- 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 +289 -0
- package/lib/core/es6/data/WrappedView.js +1319 -0
- package/lib/core/es6/grid/Core.d.ts +42 -27
- package/lib/core/es6/grid/Core.js +431 -163
- package/lib/core/es6/grid/ILayoutGrid.d.ts +23 -15
- package/lib/core/es6/grid/ILayoutGrid.js +45 -2
- package/lib/core/es6/grid/LayoutGrid.d.ts +10 -1
- package/lib/core/es6/grid/LayoutGrid.js +311 -108
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +10 -1
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +382 -24
- 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/Column.js +8 -2
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +6 -6
- package/lib/core/es6/grid/components/HScrollbar.d.ts +4 -0
- package/lib/core/es6/grid/components/HScrollbar.js +20 -4
- package/lib/core/es6/grid/components/Scrollbar.d.ts +1 -1
- 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 +29 -3
- 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 +94 -32
- 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 +30 -8
- package/lib/grid/lib/efx-grid.js +120 -115
- package/lib/grid/themes/base.less +5 -3
- 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 +72 -41
- 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 +8 -2
- package/lib/row-segmenting/es6/RowSegmenting.js +137 -21
- package/lib/rt-grid/dist/rt-grid.js +11017 -9193
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +9 -4
- package/lib/rt-grid/es6/ColumnDefinition.js +20 -108
- package/lib/rt-grid/es6/DataConnector.d.ts +3 -3
- package/lib/rt-grid/es6/Grid.d.ts +30 -15
- package/lib/rt-grid/es6/Grid.js +436 -167
- 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 +12 -7
- package/lib/rt-grid/es6/RowDefinition.js +58 -2
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -1
- package/lib/rt-grid/es6/SnapshotFiller.js +23 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +1 -1
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +53 -40
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +6 -3
- package/lib/tr-grid-checkbox/es6/Checkbox.js +79 -34
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +10 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +5 -1
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +269 -10
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +8 -4
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +243 -125
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +1 -1
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +24 -13
- package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +4 -2
- package/lib/tr-grid-filter-input/es6/FilterInput.js +73 -10
- 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-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 +108 -127
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +2 -0
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +88 -33
- package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +7 -2
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +138 -38
- package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +13 -9
- package/lib/tr-grid-row-selection/es6/RowSelection.js +230 -29
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +2 -0
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +36 -0
- 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.d.ts +8 -8
- package/lib/tr-grid-util/es6/Conflator.d.ts +2 -2
- package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
- package/lib/tr-grid-util/es6/DateTime.d.ts +4 -4
- package/lib/tr-grid-util/es6/Delay.d.ts +1 -1
- package/lib/tr-grid-util/es6/Dom.d.ts +4 -4
- 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 +28 -1
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +1 -1
- package/lib/tr-grid-util/es6/ElfDate.d.ts +3 -3
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +4 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +1 -1
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +1 -1
- package/lib/tr-grid-util/es6/ExpanderIcon.js +2 -2
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.js +7 -5
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +5 -5
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +3 -3
- package/lib/tr-grid-util/es6/GridPlugin.js +8 -4
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +1 -1
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +10 -2
- 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/PercentBar.d.ts +1 -1
- package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
- package/lib/tr-grid-util/es6/Popup.d.ts +2 -2
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +1 -1
- package/lib/tr-grid-util/es6/RowPainter.d.ts +3 -0
- package/lib/tr-grid-util/es6/RowPainter.js +120 -28
- package/lib/tr-grid-util/es6/SubTable.d.ts +9 -9
- package/lib/tr-grid-util/es6/Table.d.ts +13 -13
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +3 -3
- package/lib/tr-grid-util/es6/TickCodes.d.ts +2 -2
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +1 -1
- package/lib/tr-grid-util/es6/Util.d.ts +6 -6
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +5 -5
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +3 -3
- package/lib/tr-grid-util/es6/formula/Formula.js +9 -1
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +2 -2
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +4 -4
- package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/MockJET.d.ts +4 -4
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +11 -11
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +7 -7
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +1 -1
- package/lib/tr-grid-util/es6/jsx.d.ts +223 -0
- package/lib/types/es6/CellSelection.d.ts +1 -1
- package/lib/types/es6/Checkbox.d.ts +6 -3
- package/lib/types/es6/ColumnGrouping.d.ts +1 -0
- package/lib/types/es6/ColumnSelection.d.ts +5 -1
- 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 +1 -1
- 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 +26 -17
- 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 +289 -0
- package/lib/types/es6/Core/grid/Core.d.ts +42 -27
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +23 -15
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +10 -1
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +10 -1
- 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/HScrollbar.d.ts +4 -0
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +1 -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/FilterInput.d.ts +4 -2
- package/lib/types/es6/InCellEditing.d.ts +8 -5
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +9 -4
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +31 -16
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +19 -0
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +12 -7
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -1
- package/lib/types/es6/RowColoring.d.ts +2 -0
- package/lib/types/es6/RowDragging.d.ts +3 -4
- package/lib/types/es6/RowFiltering.d.ts +2 -0
- package/lib/types/es6/RowGrouping.d.ts +7 -2
- package/lib/types/es6/RowSegmenting.d.ts +8 -2
- package/lib/types/es6/RowSelection.d.ts +13 -9
- package/lib/types/es6/TextFormatting.d.ts +1 -1
- package/lib/types/es6/Zoom.d.ts +2 -1
- package/lib/types/es6/index.d.ts +3 -0
- package/lib/versions.json +22 -21
- package/lib/zoom/es6/Zoom.d.ts +2 -1
- package/lib/zoom/es6/Zoom.js +11 -4
- package/package.json +7 -7
- 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,12 +3,16 @@ 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
|
15
|
+
* @property {Function=} headerMenuClicked=null Event handler when user clicks on menu icon. The menu icon will be displayed if spanning option is true.
|
12
16
|
* @property {Function=} segmentSeparatorBinding=null Logic that will be executed on each segment separator row
|
13
17
|
* @property {Function=} nonSegmentSeparatorBinding=null Logic that will be executed for all non segment separator row
|
14
18
|
* @property {Function=} sortingLogic=null Logic to be used by sortSegments method
|
@@ -34,7 +38,6 @@ var RowSegmentingPlugin = function (options) {
|
|
34
38
|
t._rtSortingLogic = t._rtSortingLogic.bind(t);
|
35
39
|
|
36
40
|
t._hosts = [];
|
37
|
-
t._indentSize = [0, 22, 37, 52, 67];
|
38
41
|
this.config({ rowSegmenting: options });
|
39
42
|
};
|
40
43
|
Ext.inherits(RowSegmentingPlugin, GridPlugin);
|
@@ -51,10 +54,14 @@ RowSegmentingPlugin.prototype._userSortingLogic = null;
|
|
51
54
|
* @private
|
52
55
|
*/
|
53
56
|
RowSegmentingPlugin.prototype._spanning = true;
|
54
|
-
/** @type {
|
57
|
+
/** @type {Array.<number>}
|
55
58
|
* @private
|
56
59
|
*/
|
57
|
-
RowSegmentingPlugin.prototype.
|
60
|
+
RowSegmentingPlugin.prototype._indentSizes = null;
|
61
|
+
/** @type {number}
|
62
|
+
* @private
|
63
|
+
*/
|
64
|
+
RowSegmentingPlugin.prototype._arrowSize = 9;
|
58
65
|
/** @type {Object}
|
59
66
|
* @private
|
60
67
|
*/
|
@@ -63,6 +70,23 @@ RowSegmentingPlugin.prototype._rowPainter = null;
|
|
63
70
|
* @private
|
64
71
|
*/
|
65
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
|
+
|
66
90
|
|
67
91
|
/** @public
|
68
92
|
* @return {string}
|
@@ -77,12 +101,8 @@ RowSegmentingPlugin.prototype.getName = function () {
|
|
77
101
|
* @param {Object} config
|
78
102
|
*/
|
79
103
|
RowSegmentingPlugin.prototype.beforeInit = function(elem, config) {
|
80
|
-
// Set default indentSize here
|
81
104
|
if (ElfUtil.isHaloTheme()) {
|
82
|
-
|
83
|
-
this._indentSize = [0, 30, 50, 70, 90];
|
84
|
-
} else {
|
85
|
-
this._indentSize = [0, 22, 37, 52, 67];
|
105
|
+
this._arrowSize = 18;
|
86
106
|
}
|
87
107
|
};
|
88
108
|
|
@@ -105,7 +125,18 @@ 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
|
136
|
+
|
137
|
+
enabled = this._headerMenuClicked;
|
138
|
+
RowPainter.enableHeaderMenu(host, enabled ? true : false);
|
139
|
+
|
109
140
|
this._applyInitialSegments();
|
110
141
|
};
|
111
142
|
/** @public
|
@@ -136,23 +167,34 @@ RowSegmentingPlugin.prototype.config = function (options) {
|
|
136
167
|
if (typeof option.sortingLogic === "function") {
|
137
168
|
this._userSortingLogic = option.sortingLogic;
|
138
169
|
}
|
139
|
-
if(option.
|
170
|
+
if (typeof option.headerMenuClicked === "function") {
|
171
|
+
this._headerMenuClicked = option.headerMenuClicked;
|
172
|
+
}
|
173
|
+
if (option.spanning != null) {
|
140
174
|
this._spanning = option.spanning ? true : false;
|
141
175
|
}
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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
|
+
}
|
146
185
|
|
147
186
|
this._rowPainter = new RowPainter({
|
148
187
|
clickableCell: false,
|
149
188
|
headerSpanning: this._spanning,
|
150
189
|
footerSpanning: false,
|
151
|
-
onCellClicked: this._onArrowClick
|
190
|
+
onCellClicked: this._onArrowClick,
|
191
|
+
headerMenuClicked: this._headerMenuClicked,
|
192
|
+
segmentMode: true
|
152
193
|
});
|
153
|
-
|
154
|
-
|
155
|
-
|
194
|
+
|
195
|
+
this.addListener(option, "clicked");
|
196
|
+
this.addListener(option, "segmentSeparatorBinding");
|
197
|
+
this.addListener(option, "nonSegmentSeparatorBinding");
|
156
198
|
};
|
157
199
|
|
158
200
|
/** @public
|
@@ -175,9 +217,41 @@ RowSegmentingPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
175
217
|
if(this._colorTag != null) {
|
176
218
|
extOptions.colorTag = this._colorTag;
|
177
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
|
+
}
|
178
226
|
return obj;
|
179
227
|
};
|
180
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
|
+
|
181
255
|
/** @private
|
182
256
|
*/
|
183
257
|
RowSegmentingPlugin.prototype._applyInitialSegments = function () {
|
@@ -281,8 +355,9 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
281
355
|
break;
|
282
356
|
}
|
283
357
|
}
|
284
|
-
|
358
|
+
var cssField = this._cssField;
|
285
359
|
var rowPainter = this._rowPainter;
|
360
|
+
var parentRows = {};
|
286
361
|
for (var r = fi; r <= li; r++) {
|
287
362
|
var cell = section.getCell(headerColumn, r, false); // Work only one row
|
288
363
|
if (!cell) { // There may be no header to be updated
|
@@ -298,7 +373,10 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
298
373
|
arg.collapsedSegment = arg.collapsed = segmentSeparator ? dv.isSegmentCollapsed(rowId) : false;
|
299
374
|
var indentLevel = 0;
|
300
375
|
if (segmentSeparator) {
|
301
|
-
|
376
|
+
if (this._predefinedColors) {
|
377
|
+
arg.colorTagClass = arg.rowData[cssField];
|
378
|
+
}
|
379
|
+
arg.indentSize = this._getIndentSize(indentLevel, true);
|
302
380
|
rowPainter.applyHeaderStyle(arg);
|
303
381
|
this._dispatch("segmentSeparatorBinding", arg);
|
304
382
|
} else {
|
@@ -306,10 +384,17 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
306
384
|
if(parentId) {
|
307
385
|
indentLevel = 1; // TODO: Provide a way for segmenting multiple levels. Currently, just one level is supported.
|
308
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];
|
309
393
|
} else {
|
394
|
+
arg.colorTagClass = null;
|
310
395
|
arg.nonGroupRow = true;
|
311
396
|
}
|
312
|
-
arg.indentSize = this.
|
397
|
+
arg.indentSize = this._getIndentSize(indentLevel, false);
|
313
398
|
rowPainter.removeHeaderStyle(arg.section, arg.colIndex, r);
|
314
399
|
rowPainter.applyRowStyle(arg);
|
315
400
|
this._dispatch("nonSegmentSeparatorBinding", arg);
|
@@ -317,6 +402,27 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
317
402
|
}
|
318
403
|
};
|
319
404
|
|
405
|
+
/** @private
|
406
|
+
* @param {number} indentLevel
|
407
|
+
* @param {boolean} groupRow
|
408
|
+
* @return {number}
|
409
|
+
*/
|
410
|
+
RowSegmentingPlugin.prototype._getIndentSize = function (indentLevel, groupRow) {
|
411
|
+
var indentSize = 0;
|
412
|
+
if(this._indentSizes) {
|
413
|
+
indentSize = this._indentSizes[0];
|
414
|
+
if(indentLevel > 0) {
|
415
|
+
var indentLimit = this._indentSizes.length;
|
416
|
+
indentSize = indentLevel < indentLimit ? this._indentSizes[indentLevel] : this._indentSizes[indentLimit - 1];
|
417
|
+
}
|
418
|
+
} else if(indentLevel > 0) {
|
419
|
+
indentSize = 8 + indentLevel * 4; // 8 is default cell padding
|
420
|
+
if(!groupRow) {
|
421
|
+
indentSize += this._arrowSize;
|
422
|
+
}
|
423
|
+
}
|
424
|
+
return indentSize;
|
425
|
+
};
|
320
426
|
/** @private
|
321
427
|
* @param {MouseEvent} e
|
322
428
|
*/
|
@@ -469,7 +575,7 @@ RowSegmentingPlugin.prototype.setSegmentCollapsingLogic = function(func) {
|
|
469
575
|
RowSegmentingPlugin.prototype.fillSegment = function(segmentRef) {
|
470
576
|
var dv = this._getDataView();
|
471
577
|
if(dv) {
|
472
|
-
dv.fillSegment(
|
578
|
+
dv.fillSegment(segmentRef);
|
473
579
|
}
|
474
580
|
};
|
475
581
|
/** Remove all existing segment children in each segment and fill the segments with all contnet rows before the next segment separator
|
@@ -586,6 +692,16 @@ RowSegmentingPlugin.prototype._rtSortingLogic = function (rowDataA, rowDataB) {
|
|
586
692
|
);
|
587
693
|
};
|
588
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
|
+
|
589
705
|
|
590
706
|
|
591
707
|
export default RowSegmentingPlugin;
|