@refinitiv-ui/efx-grid 6.0.5 → 6.0.6
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 +13 -11
- package/lib/column-dragging/es6/ColumnDragging.js +21 -15
- package/lib/column-format-dialog/lib/column-format-dialog.d.ts +1 -1
- package/lib/column-format-dialog/lib/column-format-dialog.js +3 -4
- package/lib/column-format-dialog/lib/preview-table.js +3 -4
- package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +2 -2
- package/lib/column-selection-dialog/lib/column-selection-dialog.js +23 -7
- package/lib/core/dist/core.css +1 -1
- package/lib/core/dist/core.js +372 -229
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.d.ts +3 -3
- package/lib/core/es6/data/DataCache.d.ts +9 -9
- package/lib/core/es6/data/DataTable.d.ts +28 -28
- package/lib/core/es6/data/DataTable.js +33 -10
- package/lib/core/es6/data/DataView.d.ts +62 -62
- package/lib/core/es6/data/DataView.js +42 -22
- package/lib/core/es6/data/Segment.d.ts +4 -4
- package/lib/core/es6/data/SegmentCollection.d.ts +7 -7
- package/lib/core/es6/data/WrappedView.d.ts +62 -62
- package/lib/core/es6/grid/Core.d.ts +95 -95
- package/lib/core/es6/grid/Core.js +173 -25
- package/lib/core/es6/grid/ILayoutGrid.d.ts +20 -20
- package/lib/core/es6/grid/ILayoutGrid.js +2 -1
- package/lib/core/es6/grid/LayoutGrid.d.ts +2 -2
- package/lib/core/es6/grid/LayoutGrid.js +18 -10
- package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +2 -2
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +14 -3
- package/lib/core/es6/grid/components/Cell.d.ts +6 -6
- package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +2 -2
- package/lib/core/es6/grid/components/CellSpans.d.ts +2 -2
- package/lib/core/es6/grid/components/Column.d.ts +2 -2
- package/lib/core/es6/grid/components/ElementWrapper.d.ts +19 -19
- package/lib/core/es6/grid/components/Scrollbar.d.ts +9 -9
- package/lib/core/es6/grid/components/StretchedCells.js +12 -2
- package/lib/core/es6/grid/event/EventDispatcher.d.ts +3 -3
- package/lib/core/es6/grid/event/EventListeners.d.ts +5 -5
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +45 -44
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +62 -65
- package/lib/core/es6/grid/util/Conflator.d.ts +4 -4
- package/lib/core/es6/grid/util/HttpRequest.d.ts +3 -3
- package/lib/core/es6/grid/util/PercentBar.d.ts +8 -8
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +8 -8
- package/lib/core/es6/grid/util/RangeBar.d.ts +1 -1
- package/lib/core/es6/grid/util/RangeBar.js +1 -1
- package/lib/core/es6/grid/util/Reverter.d.ts +1 -1
- package/lib/core/es6/grid/util/SectionSettings.d.ts +13 -13
- package/lib/core/es6/grid/util/SelectionList.d.ts +2 -2
- package/lib/core/es6/grid/util/TrackLayout.d.ts +9 -9
- package/lib/core/es6/grid/util/Virtualizer.d.ts +3 -3
- package/lib/core/es6/grid/util/util.d.ts +6 -4
- package/lib/core/es6/grid/util/util.js +16 -91
- package/lib/core/es6/tr-grid-theme.js +1 -1
- package/lib/filter-dialog/lib/checkbox-list.d.ts +1 -1
- package/lib/filter-dialog/lib/filter-dialog.d.ts +1 -1
- package/lib/filter-dialog/lib/filter-dialog.js +27 -9
- package/lib/filter-dialog/themes/base-checkbox.less +0 -1
- package/lib/filter-dialog/themes/base.less +1 -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/index.js +1 -1
- package/lib/grid/lib/efx-grid.js +3 -0
- 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 +5 -5
- 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/row-segmenting/es6/RowSegmenting.d.ts +30 -24
- package/lib/row-segmenting/es6/RowSegmenting.js +122 -21
- package/lib/rt-grid/dist/rt-grid.js +689 -367
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/ColumnDefinition.d.ts +46 -42
- package/lib/rt-grid/es6/ColumnDefinition.js +31 -1
- package/lib/rt-grid/es6/DataConnector.d.ts +6 -4
- package/lib/rt-grid/es6/DataConnector.js +8 -0
- package/lib/rt-grid/es6/FieldDefinition.d.ts +2 -2
- package/lib/rt-grid/es6/FieldDefinition.js +12 -5
- package/lib/rt-grid/es6/Grid.d.ts +102 -94
- package/lib/rt-grid/es6/Grid.js +70 -105
- package/lib/rt-grid/es6/ReferenceCounter.d.ts +5 -5
- package/lib/rt-grid/es6/RowDefSorter.d.ts +2 -2
- package/lib/rt-grid/es6/RowDefinition.d.ts +22 -22
- package/lib/rt-grid/es6/RowDefinition.js +12 -5
- package/lib/rt-grid/es6/SnapshotFiller.d.ts +3 -3
- package/lib/rt-grid/es6/StyleLoader.d.ts +1 -1
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +11 -11
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +20 -35
- package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +18 -16
- package/lib/tr-grid-checkbox/es6/Checkbox.js +1 -0
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +29 -27
- package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +1 -0
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +28 -14
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +556 -11
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +2 -2
- package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1 -0
- package/lib/tr-grid-column-selection/es6/ColumnSelection.js +2 -3
- package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +15 -13
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +96 -72
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +11 -2
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +309 -114
- package/lib/tr-grid-content-wrap/es6/ContentWrap.js +1 -6
- package/lib/tr-grid-contextmenu/es6/ContextMenu.js +3 -3
- package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +2 -2
- package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +2 -2
- package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +2 -1
- package/lib/tr-grid-heat-map/es6/HeatMap.js +6 -9
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +5 -2
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +311 -71
- package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +1 -1
- package/lib/tr-grid-percent-bar/es6/PercentBar.js +8 -11
- package/lib/tr-grid-printer/es6/SectionWriter.js +8 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +3 -10
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +6 -0
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +56 -23
- package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +4 -3
- package/lib/tr-grid-row-filtering/es6/RowFiltering.js +57 -13
- package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1 -1
- package/lib/tr-grid-row-selection/es6/RowSelection.js +2 -3
- package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +0 -2
- package/lib/tr-grid-rowcoloring/es6/RowColoring.js +1 -40
- package/lib/tr-grid-util/es6/CellPainter.d.ts +30 -30
- package/lib/tr-grid-util/es6/CellPainter.js +9 -8
- package/lib/tr-grid-util/es6/Conflator.d.ts +4 -4
- package/lib/tr-grid-util/es6/CoralItems.d.ts +1 -1
- package/lib/tr-grid-util/es6/DateTime.d.ts +10 -10
- package/lib/tr-grid-util/es6/Deferred.d.ts +3 -1
- package/lib/tr-grid-util/es6/Deferred.js +11 -1
- package/lib/tr-grid-util/es6/Delay.d.ts +2 -2
- package/lib/tr-grid-util/es6/Dom.d.ts +10 -10
- package/lib/tr-grid-util/es6/Dom.js +14 -10
- package/lib/tr-grid-util/es6/DragUI.js +5 -2
- package/lib/tr-grid-util/es6/ElementObserver.d.ts +2 -2
- package/lib/tr-grid-util/es6/ElementWrapper.d.ts +4 -4
- package/lib/tr-grid-util/es6/ElfDate.d.ts +5 -5
- package/lib/tr-grid-util/es6/ElfDate.js +1 -0
- package/lib/tr-grid-util/es6/ElfUtil.d.ts +10 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +53 -4
- package/lib/tr-grid-util/es6/EventDispatcher.d.ts +5 -5
- package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +2 -2
- package/lib/tr-grid-util/es6/ExpanderIcon.js +1 -1
- package/lib/tr-grid-util/es6/Ext.d.ts +1 -1
- package/lib/tr-grid-util/es6/FieldFormatter.d.ts +12 -12
- package/lib/tr-grid-util/es6/FieldFormatter.js +1 -1
- package/lib/tr-grid-util/es6/FilterBuilder.d.ts +13 -13
- package/lib/tr-grid-util/es6/FilterBuilder.js +15 -8
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +22 -22
- package/lib/tr-grid-util/es6/FilterOperators.js +3 -3
- package/lib/tr-grid-util/es6/GridPlugin.d.ts +10 -10
- package/lib/tr-grid-util/es6/GridPlugin.js +20 -0
- package/lib/tr-grid-util/es6/Icon.d.ts +3 -3
- package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +8 -8
- package/lib/tr-grid-util/es6/MultiTableManager.d.ts +6 -6
- package/lib/tr-grid-util/es6/NumberFormatter.d.ts +19 -19
- package/lib/tr-grid-util/es6/NumberFormatter.js +1 -1
- package/lib/tr-grid-util/es6/PercentBar.d.ts +19 -19
- package/lib/tr-grid-util/es6/Perf.d.ts +4 -4
- package/lib/tr-grid-util/es6/Popup.d.ts +36 -33
- package/lib/tr-grid-util/es6/Popup.js +19 -1
- package/lib/tr-grid-util/es6/RangeBar.d.ts +5 -5
- package/lib/tr-grid-util/es6/RequestQueue.d.ts +4 -4
- package/lib/tr-grid-util/es6/RowPainter.d.ts +37 -4
- package/lib/tr-grid-util/es6/RowPainter.js +199 -76
- package/lib/tr-grid-util/es6/SubTable.d.ts +14 -14
- package/lib/tr-grid-util/es6/Table.d.ts +25 -25
- package/lib/tr-grid-util/es6/TextHighlighter.d.ts +1 -1
- package/lib/tr-grid-util/es6/Timer.d.ts +1 -1
- package/lib/tr-grid-util/es6/TouchProxy.d.ts +9 -9
- package/lib/tr-grid-util/es6/Util.d.ts +12 -12
- package/lib/tr-grid-util/es6/formula/ADCService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/Engine.d.ts +9 -9
- package/lib/tr-grid-util/es6/formula/Formula.d.ts +4 -4
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/Realtime.d.ts +3 -3
- package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/TSIService.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +1 -1
- package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +1 -1
- package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +34 -34
- 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/MockJET.js +12 -4
- package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +9 -9
- package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +17 -9
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +84 -24
- package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +42 -2
- package/lib/tr-grid-util/es6/jet/MockRTK.js +55 -16
- package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +2 -2
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +99 -1
- package/lib/types/es6/Checkbox.d.ts +18 -16
- package/lib/types/es6/ColumnFormatting.d.ts +29 -27
- package/lib/types/es6/ColumnGrouping.d.ts +28 -14
- package/lib/types/es6/ColumnResizing.d.ts +2 -2
- package/lib/types/es6/ColumnStack.d.ts +15 -13
- package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +4 -2
- package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +0 -1
- package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +1 -5
- package/lib/types/es6/CompositeGrid/Plugin.d.ts +3 -1
- package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +2 -1
- package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +1 -1
- package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +0 -1
- package/lib/types/es6/ConditionalColoring.d.ts +11 -2
- package/lib/types/es6/Core/data/ColumnStats.d.ts +3 -3
- package/lib/types/es6/Core/data/DataCache.d.ts +9 -9
- package/lib/types/es6/Core/data/DataTable.d.ts +28 -28
- package/lib/types/es6/Core/data/DataView.d.ts +62 -62
- package/lib/types/es6/Core/data/Segment.d.ts +4 -4
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +7 -7
- package/lib/types/es6/Core/data/WrappedView.d.ts +62 -62
- package/lib/types/es6/Core/grid/Core.d.ts +95 -95
- package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +20 -20
- package/lib/types/es6/Core/grid/LayoutGrid.d.ts +2 -2
- package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/Cell.d.ts +6 -6
- package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/CellSpans.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/Column.d.ts +2 -2
- package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +19 -19
- package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +9 -9
- package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +3 -3
- package/lib/types/es6/Core/grid/event/EventListeners.d.ts +5 -5
- package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +45 -44
- package/lib/types/es6/Core/grid/util/Conflator.d.ts +4 -4
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +8 -8
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +8 -8
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/Reverter.d.ts +1 -1
- package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +13 -13
- package/lib/types/es6/Core/grid/util/SelectionList.d.ts +2 -2
- package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +9 -9
- package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +3 -3
- package/lib/types/es6/Core/grid/util/util.d.ts +6 -4
- package/lib/types/es6/HeatMap.d.ts +2 -1
- package/lib/types/es6/InCellEditing.d.ts +5 -2
- package/lib/types/es6/MenuEventAPI.d.ts +2 -2
- package/lib/types/es6/MenuItem.d.ts +2 -2
- package/lib/types/es6/PercentBar.d.ts +1 -1
- package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +46 -42
- package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +6 -4
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/Grid.d.ts +100 -92
- package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +5 -5
- package/lib/types/es6/RealtimeGrid/RowDefSorter.d.ts +2 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +22 -22
- package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +3 -3
- package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +1 -1
- package/lib/types/es6/RowColoring.d.ts +0 -2
- package/lib/types/es6/RowDragging.d.ts +6 -0
- package/lib/types/es6/RowFiltering.d.ts +4 -3
- package/lib/types/es6/RowSegmenting.d.ts +30 -24
- package/lib/versions.json +26 -26
- package/package.json +2 -2
@@ -10,22 +10,24 @@ declare namespace RowSegmentingPlugin {
|
|
10
10
|
type SortingLogic = (rowDataA: any, rowDataB: any) => number;
|
11
11
|
|
12
12
|
type Options = {
|
13
|
-
spanning?: boolean,
|
14
|
-
colorTag?: boolean,
|
15
|
-
cssField?: string,
|
13
|
+
spanning?: boolean|null,
|
14
|
+
colorTag?: boolean|null,
|
15
|
+
cssField?: string|null,
|
16
16
|
predefinedColors?: any,
|
17
|
-
clicked?: ((...params: any[]) => any),
|
18
|
-
headerMenuClicked?: ((...params: any[]) => any),
|
19
|
-
segmentSeparatorBinding?: ((...params: any[]) => any),
|
20
|
-
nonSegmentSeparatorBinding?: ((...params: any[]) => any),
|
21
|
-
sortingLogic?: ((...params: any[]) => any)
|
17
|
+
clicked?: ((...params: any[]) => any)|null,
|
18
|
+
headerMenuClicked?: ((...params: any[]) => any)|null,
|
19
|
+
segmentSeparatorBinding?: ((...params: any[]) => any)|null,
|
20
|
+
nonSegmentSeparatorBinding?: ((...params: any[]) => any)|null,
|
21
|
+
sortingLogic?: ((...params: any[]) => any)|null,
|
22
|
+
rowSpanningField?: string|null,
|
23
|
+
segmentIdField?: string|null
|
22
24
|
};
|
23
25
|
|
24
26
|
}
|
25
27
|
|
26
28
|
declare class RowSegmentingPlugin extends GridPlugin {
|
27
29
|
|
28
|
-
constructor(options?: RowSegmentingPlugin.Options);
|
30
|
+
constructor(options?: RowSegmentingPlugin.Options|null);
|
29
31
|
|
30
32
|
public getName(): string;
|
31
33
|
|
@@ -37,52 +39,56 @@ declare class RowSegmentingPlugin extends GridPlugin {
|
|
37
39
|
|
38
40
|
public getConfigObject(gridOptions?: any): any;
|
39
41
|
|
42
|
+
public getRowConfigObject(rowData: any, rowId: string): any;
|
43
|
+
|
40
44
|
public updateHeaders(): void;
|
41
45
|
|
42
|
-
public getSegmentParentRowId(rowRef: string|number): string;
|
46
|
+
public getSegmentParentRowId(rowRef: string|number|null): string;
|
43
47
|
|
44
|
-
public setSegmentSeparator(rowRef: string|number, enabled?: boolean): boolean;
|
48
|
+
public setSegmentSeparator(rowRef: string|number|null, enabled?: boolean|null): boolean;
|
45
49
|
|
46
50
|
public unsetAllSegmentSeparators(): boolean;
|
47
51
|
|
48
52
|
public hasSegmentation(): boolean;
|
49
53
|
|
50
|
-
public isSegmentSeparator(rowRef: string|number): boolean;
|
54
|
+
public isSegmentSeparator(rowRef: string|number|null): boolean;
|
51
55
|
|
52
|
-
public collapseSegment(rowRef: string|number, collapsed?: boolean): boolean;
|
56
|
+
public collapseSegment(rowRef: string|number|null, collapsed?: boolean|null): boolean;
|
53
57
|
|
54
|
-
public expandSegment(rowRef: string|number, expanded?: boolean): boolean;
|
58
|
+
public expandSegment(rowRef: string|number|null, expanded?: boolean|null): boolean;
|
55
59
|
|
56
60
|
public expandAllSegments(): boolean;
|
57
61
|
|
58
|
-
public isSegmentCollapsed(rowRef: string|number): boolean;
|
62
|
+
public isSegmentCollapsed(rowRef: string|number|null): boolean;
|
59
63
|
|
60
|
-
public setSegmentCollapsingLogic(func: ((...params: any[]) => any)): void;
|
64
|
+
public setSegmentCollapsingLogic(func: ((...params: any[]) => any)|null): void;
|
61
65
|
|
62
|
-
public fillSegment(segmentRef: string|number): void;
|
66
|
+
public fillSegment(segmentRef: string|number|null): void;
|
63
67
|
|
64
68
|
public fillSegments(): void;
|
65
69
|
|
66
|
-
public addSegmentChild(segmentRef: string|number, rowRef: string|number): void;
|
70
|
+
public addSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): void;
|
67
71
|
|
68
|
-
public addSegmentChildren(segmentRef: string|number, rowRefs: (string|number)[]): void;
|
72
|
+
public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): void;
|
69
73
|
|
70
|
-
public removeSegmentChild(segmentRef: string|number, rowRef: string|number): void;
|
74
|
+
public removeSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): void;
|
71
75
|
|
72
|
-
public removeSegmentChildren(segmentRef: string|number, rowRefs: (string|number)[]): void;
|
76
|
+
public removeSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): void;
|
73
77
|
|
74
78
|
public removeAllSegmentChildren(): void;
|
75
79
|
|
76
80
|
public getSegmentIds(): (string)[]|null;
|
77
81
|
|
78
|
-
public getSegmentChildIds(segmentRef: string|number): (string)[]|null;
|
82
|
+
public getSegmentChildIds(segmentRef: string|number|null): (string)[]|null;
|
79
83
|
|
80
|
-
public setSortingLogic(sortFunction: RowSegmentingPlugin.SortingLogic): void;
|
84
|
+
public setSortingLogic(sortFunction: RowSegmentingPlugin.SortingLogic|null): void;
|
81
85
|
|
82
|
-
public sortSegments(sortFunction?: RowSegmentingPlugin.SortingLogic): void;
|
86
|
+
public sortSegments(sortFunction?: RowSegmentingPlugin.SortingLogic|null): void;
|
83
87
|
|
84
88
|
public setPredefinedColors(predefinedColors: any): void;
|
85
89
|
|
90
|
+
public spanSegmentSeparator(rowRef: number|string|null, spanning: boolean|null|null): void;
|
91
|
+
|
86
92
|
}
|
87
93
|
|
88
94
|
export default RowSegmentingPlugin;
|
@@ -16,6 +16,8 @@ import { injectCss, prettifyCss } from "../../tr-grid-util/es6/Util.js";
|
|
16
16
|
* @property {Function=} segmentSeparatorBinding=null Logic that will be executed on each segment separator row
|
17
17
|
* @property {Function=} nonSegmentSeparatorBinding=null Logic that will be executed for all non segment separator row
|
18
18
|
* @property {Function=} sortingLogic=null Logic to be used by sortSegments method
|
19
|
+
* @property {string=} rowSpanningField="ROW_SPANNING" selected field for apply row spanning in row separator
|
20
|
+
* @property {string=} segmentIdField="SEGMENT_ID" selected field for set segment separator row
|
19
21
|
*/
|
20
22
|
|
21
23
|
/** @callback RowSegmentingPlugin~SortingLogic
|
@@ -34,7 +36,6 @@ var RowSegmentingPlugin = function (options) {
|
|
34
36
|
t._onPostSectionDataBinding = t._onPostSectionDataBinding.bind(t);
|
35
37
|
t._updateHeader = t._updateHeader.bind(t);
|
36
38
|
t._onArrowClick = t._onArrowClick.bind(t);
|
37
|
-
t._applyInitialSegments = t._applyInitialSegments.bind(t);
|
38
39
|
t._rtSortingLogic = t._rtSortingLogic.bind(t);
|
39
40
|
|
40
41
|
t._hosts = [];
|
@@ -42,10 +43,6 @@ var RowSegmentingPlugin = function (options) {
|
|
42
43
|
};
|
43
44
|
Ext.inherits(RowSegmentingPlugin, GridPlugin);
|
44
45
|
|
45
|
-
/** @type {Array.<Object>}
|
46
|
-
* @private
|
47
|
-
*/
|
48
|
-
RowSegmentingPlugin.prototype.initialSegments = null;
|
49
46
|
/** @type {RowSegmentingPlugin~SortingLogic}
|
50
47
|
* @private
|
51
48
|
*/
|
@@ -74,6 +71,18 @@ RowSegmentingPlugin.prototype._colorTag = null;
|
|
74
71
|
* @private
|
75
72
|
*/
|
76
73
|
RowSegmentingPlugin.prototype._cssField = "TAG_CSS_CLASS";
|
74
|
+
/** @type {string}
|
75
|
+
* @private
|
76
|
+
*/
|
77
|
+
RowSegmentingPlugin.prototype._rowSpanningField = "ROW_SPANNING";
|
78
|
+
/** @type {string}
|
79
|
+
* @private
|
80
|
+
*/
|
81
|
+
RowSegmentingPlugin.prototype._segmentIdField = "SEGMENT_ID";
|
82
|
+
/** @type {number}
|
83
|
+
* @private
|
84
|
+
*/
|
85
|
+
RowSegmentingPlugin.prototype._runningId = 0;
|
77
86
|
/** @type {Object}
|
78
87
|
* @private
|
79
88
|
*/
|
@@ -136,8 +145,34 @@ RowSegmentingPlugin.prototype.initialize = function (host, options) {
|
|
136
145
|
|
137
146
|
enabled = this._headerMenuClicked;
|
138
147
|
RowPainter.enableHeaderMenu(host, enabled ? true : false);
|
148
|
+
};
|
149
|
+
/**
|
150
|
+
* @protected
|
151
|
+
* @ignore
|
152
|
+
*/
|
153
|
+
RowSegmentingPlugin.prototype._afterInit = function () {
|
154
|
+
var dv = this._getDataView();
|
155
|
+
if(dv) {
|
156
|
+
var rowIds = dv.getAllRowIds();
|
157
|
+
var rowCount = rowIds.length;
|
158
|
+
var separatorMapping = {};
|
159
|
+
for (var i = 0; i < rowCount; i++) {
|
160
|
+
var rowId = rowIds[i];
|
161
|
+
var rowData = this._rowGetter(dv.getRowData(rowId));
|
162
|
+
var segmentId = rowData[this._segmentIdField];
|
163
|
+
// TODO: supports collapsed and expanded for save/restore
|
164
|
+
|
165
|
+
if(segmentId != null) {
|
166
|
+
if(separatorMapping[segmentId] != null ) {
|
167
|
+
this.addSegmentChild(separatorMapping[segmentId], rowId);
|
168
|
+
} else {
|
169
|
+
separatorMapping[segmentId] = rowId;
|
170
|
+
this.setSegmentSeparator(rowId);
|
171
|
+
}
|
172
|
+
}
|
139
173
|
|
140
|
-
|
174
|
+
}
|
175
|
+
}
|
141
176
|
};
|
142
177
|
/** @public
|
143
178
|
* @param {Object=} host core grid instance
|
@@ -161,9 +196,6 @@ RowSegmentingPlugin.prototype.config = function (options) {
|
|
161
196
|
var option = options.rowSegmenting;
|
162
197
|
if (!option) { return; }
|
163
198
|
|
164
|
-
if (option.initialSegments != null) {
|
165
|
-
this._initialSegments = option.initialSegments;
|
166
|
-
}
|
167
199
|
if (typeof option.sortingLogic === "function") {
|
168
200
|
this._userSortingLogic = option.sortingLogic;
|
169
201
|
}
|
@@ -179,6 +211,12 @@ RowSegmentingPlugin.prototype.config = function (options) {
|
|
179
211
|
if (option.cssField != null) {
|
180
212
|
this._cssField = option.cssField;
|
181
213
|
}
|
214
|
+
if (option.rowSpanningField != null) {
|
215
|
+
this._rowSpanningField = option.rowSpanningField;
|
216
|
+
}
|
217
|
+
if (option.segmentIdField != null) {
|
218
|
+
this._segmentIdField = option.segmentIdField;
|
219
|
+
}
|
182
220
|
if (option.predefinedColors != null && typeof option.predefinedColors === "object") {
|
183
221
|
this._predefinedColors = option.predefinedColors;
|
184
222
|
}
|
@@ -208,9 +246,6 @@ RowSegmentingPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
208
246
|
if(!extOptions) {
|
209
247
|
extOptions = obj.rowSegmenting = {};
|
210
248
|
}
|
211
|
-
if(this._initialSegments) {
|
212
|
-
extOptions.initialSegments = this._initialSegments;
|
213
|
-
}
|
214
249
|
if(!this._spanning) {
|
215
250
|
extOptions.spanning = false;
|
216
251
|
}
|
@@ -223,6 +258,54 @@ RowSegmentingPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
223
258
|
if(this._predefinedColors != null) {
|
224
259
|
extOptions.predefinedColors = this._predefinedColors;
|
225
260
|
}
|
261
|
+
if(this._rowSpanningField != "ROW_SPANNING") {
|
262
|
+
extOptions.rowSpanningField = this._rowSpanningField;
|
263
|
+
}
|
264
|
+
if(this._segmentIdField != "SEGMENT_ID") {
|
265
|
+
extOptions.segmentIdField = this._segmentIdField;
|
266
|
+
}
|
267
|
+
|
268
|
+
// restore runningId for spanningIdField
|
269
|
+
this._runningId = 0;
|
270
|
+
|
271
|
+
return obj;
|
272
|
+
};
|
273
|
+
|
274
|
+
|
275
|
+
/** @public
|
276
|
+
* @param {Object} rowData row config object
|
277
|
+
* @param {string} rowId
|
278
|
+
* @return {!Object} return row config object with update special field data
|
279
|
+
*/
|
280
|
+
RowSegmentingPlugin.prototype.getRowConfigObject = function (rowData, rowId) {
|
281
|
+
|
282
|
+
var obj = rowData || {};
|
283
|
+
|
284
|
+
if(!this._segmentIdField) {
|
285
|
+
return obj;
|
286
|
+
}
|
287
|
+
|
288
|
+
if(obj.values) {
|
289
|
+
if(obj.values[this._segmentIdField]) {
|
290
|
+
delete obj.values[this._segmentIdField]; // clear only segmentIdField
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
if(this.isSegmentSeparator(rowId)) {
|
295
|
+
if(!obj.values) {
|
296
|
+
obj.values = {};
|
297
|
+
}
|
298
|
+
obj.values[this._segmentIdField] = ++this._runningId;
|
299
|
+
} else {
|
300
|
+
var parentId = this.getSegmentParentRowId(rowId);
|
301
|
+
if(parentId) {
|
302
|
+
if(!obj.values) {
|
303
|
+
obj.values = {};
|
304
|
+
}
|
305
|
+
obj.values[this._segmentIdField] = this._runningId;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
226
309
|
return obj;
|
227
310
|
};
|
228
311
|
|
@@ -252,12 +335,6 @@ RowSegmentingPlugin.prototype._injectStyles = function(predefinedColors) {
|
|
252
335
|
this._styleTag = injectCss(prettifyCss(css), host.getElement());
|
253
336
|
};
|
254
337
|
|
255
|
-
/** @private
|
256
|
-
*/
|
257
|
-
RowSegmentingPlugin.prototype._applyInitialSegments = function () {
|
258
|
-
|
259
|
-
};
|
260
|
-
|
261
338
|
/** @private
|
262
339
|
* @param {Object} e
|
263
340
|
*/
|
@@ -339,6 +416,7 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
339
416
|
|
340
417
|
var headerColumn = 0; // TODO: Header column is not always 0 as checkbox column can be added
|
341
418
|
var dv = settings.getDataSource();
|
419
|
+
var dt = dv.getDataSource();
|
342
420
|
var section = settings.getSection();
|
343
421
|
var fi = (firstRowIndex != null) ? firstRowIndex : section.getFirstIndexInView();
|
344
422
|
var li = (lastRowIndex != null) ? lastRowIndex : section.getLastIndexInView();
|
@@ -367,12 +445,18 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
367
445
|
arg.cell = cell;
|
368
446
|
arg.rowIndex = r;
|
369
447
|
arg.rowData = this._getRow(dv, r); // Support composite and rt-grid
|
370
|
-
|
448
|
+
arg.spanning = null;
|
371
449
|
var rowId = arg.rowId = dv.getRowId(r); // Slow
|
372
450
|
var segmentSeparator = arg.segmentSeparator = dv.isSegmentSeparator(rowId);
|
373
451
|
arg.collapsedSegment = arg.collapsed = segmentSeparator ? dv.isSegmentCollapsed(rowId) : false;
|
374
452
|
var indentLevel = 0;
|
453
|
+
|
375
454
|
if (segmentSeparator) {
|
455
|
+
var spanning = arg.rowData[this._rowSpanningField];
|
456
|
+
if(spanning != null) {
|
457
|
+
arg.spanning = !!spanning;
|
458
|
+
}
|
459
|
+
|
376
460
|
if (this._predefinedColors) {
|
377
461
|
arg.colorTagClass = arg.rowData[cssField];
|
378
462
|
}
|
@@ -386,8 +470,7 @@ RowSegmentingPlugin.prototype._updateHeader = function (settings, firstRowIndex,
|
|
386
470
|
arg.nonGroupRow = false;
|
387
471
|
var parentRowData = parentRows[parentId];
|
388
472
|
if (!parentRowData) {
|
389
|
-
|
390
|
-
parentRowData = parentRows[parentId] = this._getRow(dv, parentRowIndex);
|
473
|
+
parentRowData = parentRows[parentId] = this._rowGetter(dt.getRowData(parentId)); // We need to use Datable because parent row may be hidden
|
391
474
|
}
|
392
475
|
arg.colorTagClass = parentRowData[cssField];
|
393
476
|
} else {
|
@@ -702,6 +785,24 @@ RowSegmentingPlugin.prototype.setPredefinedColors = function(predefinedColors) {
|
|
702
785
|
}
|
703
786
|
};
|
704
787
|
|
788
|
+
/** @public
|
789
|
+
* @param {number|string} rowRef rowIndex or rowId
|
790
|
+
* @param {boolean|null} spanning if set true when rowRef is row separator, then span that row
|
791
|
+
*/
|
792
|
+
RowSegmentingPlugin.prototype.spanSegmentSeparator = function(rowRef, spanning) {
|
793
|
+
var dv = this._getDataView();
|
794
|
+
if(!dv) { return; }
|
795
|
+
|
796
|
+
if(typeof rowRef === "string") {
|
797
|
+
rowRef = dv.getRowIndex(rowRef);
|
798
|
+
}
|
799
|
+
|
800
|
+
if(rowRef == null || rowRef < 0) { return; }
|
801
|
+
|
802
|
+
this._setStaticData(dv, rowRef, this._rowSpanningField, spanning);
|
803
|
+
|
804
|
+
};
|
805
|
+
|
705
806
|
|
706
807
|
|
707
808
|
export default RowSegmentingPlugin;
|