@refinitiv-ui/efx-grid 6.0.4 → 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 +392 -230
- 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 +97 -95
- package/lib/core/es6/grid/Core.js +180 -26
- 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 +11 -9
- package/lib/core/es6/grid/components/Scrollbar.js +13 -0
- 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 +7 -44
- 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 +1354 -435
- 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 +106 -91
- package/lib/rt-grid/es6/Grid.js +151 -106
- 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 +5 -2
- package/lib/rt-grid/es6/SnapshotFiller.js +121 -15
- 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 +14 -4
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +314 -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 +16 -13
- 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/ElementObserver.js +6 -3
- 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 +13 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +178 -26
- 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 +14 -4
- 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 +97 -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 +11 -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 +104 -89
- 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 +5 -2
- 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
@@ -201,5 +201,13 @@ SectionWriter.prototype.getCellElement = function (colIndex, rowIndex) {
|
|
201
201
|
return this._table.getCell(colIndex, rowIndex);
|
202
202
|
};
|
203
203
|
|
204
|
+
/** @public
|
205
|
+
* @ignore
|
206
|
+
* @param {boolean} enabled
|
207
|
+
*/
|
208
|
+
SectionWriter.prototype._startBindingSession = function (enabled) {
|
209
|
+
// Prevent error when calling _startBindingSession in LayoutGrid
|
210
|
+
};
|
211
|
+
|
204
212
|
|
205
213
|
export { SectionWriter };
|
@@ -35,11 +35,6 @@ Ext.inherits(RangeBarPlugin, GridPlugin);
|
|
35
35
|
* @private
|
36
36
|
*/
|
37
37
|
|
38
|
-
RangeBarPlugin._themeLoaded = false;
|
39
|
-
/** @type {boolean}
|
40
|
-
* @private
|
41
|
-
*/
|
42
|
-
|
43
38
|
RangeBarPlugin.prototype._themeLoading = false;
|
44
39
|
/** @type {number}
|
45
40
|
* @private
|
@@ -75,9 +70,9 @@ RangeBarPlugin.prototype.initialize = function (host, options) {
|
|
75
70
|
host.listen("columnAdded", this._onColumnAdded);
|
76
71
|
host.listen("columnRemoved", this._onColumnRemoved);
|
77
72
|
|
78
|
-
if (!
|
73
|
+
if (!this._themeLoading) {
|
79
74
|
this._themeLoading = true;
|
80
|
-
ElfUtil.getThemeColors().then(this._onThemeLoaded);
|
75
|
+
ElfUtil.getThemeColors().then(this._onThemeLoaded)["catch"](this._onThemeLoaded);
|
81
76
|
}
|
82
77
|
};
|
83
78
|
/** @override */
|
@@ -265,8 +260,6 @@ RangeBarPlugin.prototype._getColumnRangeDef = function (colIndex) {
|
|
265
260
|
|
266
261
|
|
267
262
|
RangeBarPlugin.prototype._onThemeLoaded = function () {
|
268
|
-
RangeBarPlugin._themeLoaded = true;
|
269
|
-
|
270
263
|
for (var i = this._hosts.length; --i >= 0;) {
|
271
264
|
this._hosts[i].requestRowRefresh();
|
272
265
|
}
|
@@ -277,7 +270,7 @@ RangeBarPlugin.prototype._onThemeLoaded = function () {
|
|
277
270
|
|
278
271
|
|
279
272
|
RangeBarPlugin.prototype._renderer = function (e) {
|
280
|
-
if (!
|
273
|
+
if (!ElfUtil.isThemeLoaded()) {
|
281
274
|
return;
|
282
275
|
}
|
283
276
|
|
@@ -46,6 +46,12 @@ declare class RowDraggingPlugin extends GridPlugin {
|
|
46
46
|
|
47
47
|
public getGuideline(): Element|null;
|
48
48
|
|
49
|
+
public disable(disabled?: boolean): void;
|
50
|
+
|
51
|
+
public isDisabled(): boolean;
|
52
|
+
|
53
|
+
public disableUIs(disabled?: boolean): void;
|
54
|
+
|
49
55
|
}
|
50
56
|
|
51
57
|
export default RowDraggingPlugin;
|
@@ -8,7 +8,7 @@ import { DragUI } from "../../tr-grid-util/es6/DragUI.js";
|
|
8
8
|
/** @typedef {Object} RowDraggingPlugin~Options
|
9
9
|
* @description Available options describing `rowDragging` object specified in grid's option
|
10
10
|
* @property {boolean=} dragBox=false If enabled, information box will be shown during the drag
|
11
|
-
* @property {boolean=} disabled=false If enabled,
|
11
|
+
* @property {boolean=} disabled=false A flag to turn off UIs, while events will still be dispatched. If enabled, guileline and drag box will be hidden. autoScroll will also be turned off.
|
12
12
|
* @property {boolean=} mouseInput=true If disabled, mousemove/mousedown will not trigger the drag operation.
|
13
13
|
* @property {boolean=} dataTransfer=true If disabled, internal row data will not be moved at the end of the drag operation.
|
14
14
|
* @property {boolean=} autoScroll=true If disabled, grid will not be verticallly scrolled when mouse is hovering around the edges of the grid.
|
@@ -85,7 +85,9 @@ var RowDraggingPlugin = function (options) {
|
|
85
85
|
t._dragBoxIcon = document.createElement("ef-icon");
|
86
86
|
t._dragBoxIcon.className = "drag-box-icon";
|
87
87
|
|
88
|
-
|
88
|
+
if(options) {
|
89
|
+
t.config({ "rowDragging": options });
|
90
|
+
}
|
89
91
|
};
|
90
92
|
Ext.inherits(RowDraggingPlugin, GridPlugin);
|
91
93
|
|
@@ -110,7 +112,12 @@ RowDraggingPlugin.prototype._dragBox = null;
|
|
110
112
|
* @private
|
111
113
|
*/
|
112
114
|
RowDraggingPlugin.prototype._dragBoxIcon = null;
|
113
|
-
/** For
|
115
|
+
/** For disabling UIs
|
116
|
+
* @type {boolean}
|
117
|
+
* @private
|
118
|
+
*/
|
119
|
+
RowDraggingPlugin.prototype._uiDisabled = false;
|
120
|
+
/** For disabling drag and drop functionalities
|
114
121
|
* @type {boolean}
|
115
122
|
* @private
|
116
123
|
*/
|
@@ -249,7 +256,7 @@ RowDraggingPlugin.prototype.initialize = function (host, options) {
|
|
249
256
|
DragUI.applyThemeColor(host);
|
250
257
|
} else {
|
251
258
|
DragUI.stylePromise = ElfUtil.getThemeColors();
|
252
|
-
DragUI.stylePromise.then(this._onThemeLoaded);
|
259
|
+
DragUI.stylePromise.then(this._onThemeLoaded).catch(this._onThemeLoaded);
|
253
260
|
}
|
254
261
|
|
255
262
|
// In case of lazy loading
|
@@ -275,9 +282,9 @@ RowDraggingPlugin.prototype.unload = function (host) {
|
|
275
282
|
};
|
276
283
|
|
277
284
|
/** @private
|
278
|
-
* @param {Object} colors
|
279
285
|
*/
|
280
|
-
RowDraggingPlugin.prototype._onThemeLoaded = function(
|
286
|
+
RowDraggingPlugin.prototype._onThemeLoaded = function() {
|
287
|
+
var colors = ElfUtil.getColors();
|
281
288
|
this._dragUI.onThemeLoaded(colors); // TODO : onThemeLoaded should be static function like DragUI.applyThemeColor
|
282
289
|
for(var i = this._hosts.length; --i >= 0;) {
|
283
290
|
DragUI.applyThemeColor(this._hosts[i]);
|
@@ -318,7 +325,7 @@ RowDraggingPlugin.prototype.config = function (options) {
|
|
318
325
|
}
|
319
326
|
|
320
327
|
if (extOptions["disabled"]) {
|
321
|
-
this.
|
328
|
+
this._uiDisabled = true;
|
322
329
|
}
|
323
330
|
|
324
331
|
this.addListener(extOptions, "dragStart");
|
@@ -343,7 +350,7 @@ RowDraggingPlugin.prototype.getConfigObject = function (out_obj) {
|
|
343
350
|
extOptions.mouseInput = this._mouseInput;
|
344
351
|
extOptions.autoScroll = this._autoScroll;
|
345
352
|
extOptions.dataTransfer = this._dataTransfer;
|
346
|
-
extOptions.disabled = this.
|
353
|
+
extOptions.disabled = this._uiDisabled;
|
347
354
|
|
348
355
|
return obj;
|
349
356
|
};
|
@@ -354,6 +361,9 @@ RowDraggingPlugin.prototype.getConfigObject = function (out_obj) {
|
|
354
361
|
*/
|
355
362
|
RowDraggingPlugin.prototype.startDrag = function (startRef) {
|
356
363
|
if (this._dragging || this._hosts.length <= 0) { return; }
|
364
|
+
if (this._disabled) {
|
365
|
+
return;
|
366
|
+
}
|
357
367
|
|
358
368
|
var pos;
|
359
369
|
if (startRef) {
|
@@ -401,6 +411,31 @@ RowDraggingPlugin.prototype.getGuideline = function () {
|
|
401
411
|
return this._guideline;
|
402
412
|
};
|
403
413
|
|
414
|
+
/** Disable drag and drop functionality. Unlike disableUIs method, no events will be triggered or dispatched by user actions.
|
415
|
+
* This method is useful for temporary turnning off drag and drop functionalities.
|
416
|
+
* @public
|
417
|
+
* @param {boolean=} disabled
|
418
|
+
* @see {@link RowDraggingPlugin#disable}
|
419
|
+
*/
|
420
|
+
RowDraggingPlugin.prototype.disable = function (disabled) {
|
421
|
+
this._disabled = disabled !== false;
|
422
|
+
};
|
423
|
+
/** @public
|
424
|
+
* @return {boolean}
|
425
|
+
*/
|
426
|
+
RowDraggingPlugin.prototype.isDisabled = function () {
|
427
|
+
return this._disabled;
|
428
|
+
};
|
429
|
+
/** Disable UIs, while events will still be triggered by user actions. This method modify `disabled` property on the configuration object.
|
430
|
+
* This method is useful for customizing UIs during the drag operations.
|
431
|
+
* @public
|
432
|
+
* @param {boolean=} disabled
|
433
|
+
* @see {@link RowDraggingPlugin#disable}
|
434
|
+
*/
|
435
|
+
RowDraggingPlugin.prototype.disableUIs = function (disabled) {
|
436
|
+
this._uiDisabled = disabled !== false;
|
437
|
+
};
|
438
|
+
|
404
439
|
/** @private
|
405
440
|
* @param {*} e
|
406
441
|
* @return {!Object}
|
@@ -467,7 +502,7 @@ RowDraggingPlugin.prototype._onDragStart = function (e) {
|
|
467
502
|
}
|
468
503
|
|
469
504
|
// Update UI, grid cursor and guideline
|
470
|
-
if (!this.
|
505
|
+
if (!this._uiDisabled) { //disabledUI
|
471
506
|
var grid = this._pos["grid"] || null;
|
472
507
|
if (!grid) return;
|
473
508
|
|
@@ -536,7 +571,7 @@ RowDraggingPlugin.prototype._onMouseMove = function (e) {
|
|
536
571
|
|
537
572
|
// Dispatch drag event to let user determine valid drop target using allowDrag (allowDrop) method
|
538
573
|
this._dispatch("drag", this._pos);
|
539
|
-
if(!this.
|
574
|
+
if(!this._uiDisabled) {
|
540
575
|
e.dragBoxIcon = this._pos.dragBoxIcon; // access event object instread of element for prevent element persistence
|
541
576
|
var drop = this._dragUI.renderDragBox(e, this._startingGrid);
|
542
577
|
if(!drop) { // can not be drop or not allow to drop or insertion
|
@@ -582,20 +617,18 @@ RowDraggingPlugin.prototype._onDragEnd = function (e) {
|
|
582
617
|
// WARNING: dropTarget is not correct for element in a shadow root
|
583
618
|
destPos["dropTarget"] = e ? e.target : null;
|
584
619
|
|
585
|
-
if (
|
586
|
-
|
587
|
-
|
588
|
-
var destRowIndex = destPos["rowIndex"];
|
620
|
+
if (this._dataTransfer && _isInContentSection(this._pos)) {
|
621
|
+
var destGrid = destPos["grid"] || srcGrid;
|
622
|
+
var destRowIndex = destPos["rowIndex"];
|
589
623
|
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
}
|
596
|
-
|
597
|
-
this._moveRows(srcRowIndices, destRowIndex, srcGrid, destGrid, destPos);
|
624
|
+
var rowSelection = srcGrid.getPlugin('RowSelectionPlugin');
|
625
|
+
var srcRowIndices = rowSelection && rowSelection.getSelectedRows();
|
626
|
+
if (!srcRowIndices || !srcRowIndices.length) {
|
627
|
+
// case no row selection or it disabled
|
628
|
+
srcRowIndices = this._startingRid; // Str Type
|
598
629
|
}
|
630
|
+
|
631
|
+
this._moveRows(srcRowIndices, destRowIndex, srcGrid, destGrid, destPos);
|
599
632
|
}
|
600
633
|
}
|
601
634
|
|
@@ -689,7 +722,7 @@ RowDraggingPlugin.prototype._isDragCancelled = function () {
|
|
689
722
|
*/
|
690
723
|
RowDraggingPlugin.prototype._updateGuidePosition = function (e) {
|
691
724
|
var pos = this._pos;
|
692
|
-
if (this.
|
725
|
+
if (this._uiDisabled || !pos || pos["invalidTarget"]) {
|
693
726
|
return;
|
694
727
|
}
|
695
728
|
|
@@ -18,7 +18,8 @@ declare namespace RowFilteringPlugin {
|
|
18
18
|
|
19
19
|
type ColumnOptions = {
|
20
20
|
filter?: RowFilteringPlugin.Expression,
|
21
|
-
filterState?: any
|
21
|
+
filterState?: any,
|
22
|
+
filterIcon?: boolean
|
22
23
|
};
|
23
24
|
|
24
25
|
type FilterDialogOptions = {
|
@@ -86,13 +87,13 @@ declare class RowFilteringPlugin extends GridPlugin {
|
|
86
87
|
|
87
88
|
public getAllColumnFilters(): (((...params: any[]) => any))[];
|
88
89
|
|
89
|
-
public getFilterExpressions(): (RowFilteringPlugin.FilterExpression)[];
|
90
|
+
public getFilterExpressions(): (RowFilteringPlugin.FilterExpression)[]|null;
|
90
91
|
|
91
92
|
public setFilterExpressions(filterExps: (RowFilteringPlugin.FilterExpression)[]): void;
|
92
93
|
|
93
94
|
public hasColumnFilter(): boolean;
|
94
95
|
|
95
|
-
public getColumnFilterIcons(colIndex: number): (Element)[];
|
96
|
+
public getColumnFilterIcons(colIndex: number): (Element)[]|null;
|
96
97
|
|
97
98
|
public updateAllColumnIcons(): void;
|
98
99
|
|
@@ -56,6 +56,7 @@ The expression can take various forms:<br>
|
|
56
56
|
* @description Extension column options that can be specified on each individual grid's column option:
|
57
57
|
* @property {RowFilteringPlugin~Expression=} filter An expression string or Function
|
58
58
|
* @property {*=} filterState Context object that will be passed as the third parameter for the filter logic
|
59
|
+
* @property {boolean=} filterIcon=true If disabled, filter icon will not be shown. This property only works with 'always' mode
|
59
60
|
*/
|
60
61
|
|
61
62
|
/** @typedef {Object} RowFilteringPlugin~FilterDialogOptions
|
@@ -234,7 +235,7 @@ RowFilteringPlugin.prototype.initialize = function (host, options) {
|
|
234
235
|
this._hosts.push(host);
|
235
236
|
|
236
237
|
if (!RowFilteringPlugin._styles) {
|
237
|
-
RowFilteringPlugin._styles = prettifyCss([".hovering-filter-icon .cell:not(.active-filter):hover .floating-panel .title-filter-icon", ["display: flex;"], ".hovering-filter-icon .cell:not(.active-filter) .floating-panel .title-filter-icon", ["display: none;"], ".floating-panel", ["position:relative;"], ".floating-panel .title-filter-icon", ["color: var(--grid-title-filter-icon-color,inherit);"], ".floating-panel .title-filter-icon:hover", ["color: var(--grid-title-filter-icon-hover-color,inherit);"], ".hovering-filter-icon .tiny-col .cell:hover, .tr-grid .tiny-col .cell.active-filter", ["padding-left:0px;"], ".tiny-col .cell .floating-panel .title-filter-icon:before", ["content: '.';", "position: absolute;", "margin-left: auto;", "margin-right: auto;", "left: 0;", "right: 0;", "top: -10px;", "font-size: 10px;", "font-family: monospace;", "color: var(--grid-title-dot-icon,inherit);", "text-align:center;"]]);
|
238
|
+
RowFilteringPlugin._styles = prettifyCss([".hovering-filter-icon .cell:not(.active-filter):hover .floating-panel .title-filter-icon", ["display: flex;"], ".hovering-filter-icon .cell:not(.active-filter) .floating-panel .title-filter-icon", ["display: none;"], ".floating-panel", ["position:relative;"], ".floating-panel .title-filter-icon", ["color: var(--grid-title-filter-icon-color,inherit);"], ".title .floating-panel .title-filter-icon:hover", ["color: var(--grid-title-filter-icon-hover-color,inherit);"], ".always-on-filter .floating-panel .title-filter-icon", ["color: var(--grid-header-txtcolor,inherit);"], ".always-on-filter .active-filter .floating-panel .title-filter-icon", ["color: var(--grid-title-filter-icon-hover-color,inherit);"], ".hovering-filter-icon .tiny-col .cell:hover, .tr-grid .tiny-col .cell.active-filter", ["padding-left:0px;"], ".tiny-col.movable .cell .floating-panel .title-filter-icon:before", ["content: '.';", "position: absolute;", "margin-left: auto;", "margin-right: auto;", "left: 0;", "right: 0;", "top: -10px;", "font-size: 10px;", "font-family: monospace;", "color: var(--grid-title-dot-icon,inherit);", "text-align:center;"]]);
|
238
239
|
}
|
239
240
|
|
240
241
|
if (!host._rowFilteringStyles) {
|
@@ -292,10 +293,18 @@ RowFilteringPlugin.prototype.config = function (options) {
|
|
292
293
|
if (rowFiltering["iconActivation"]) {
|
293
294
|
this._iconActivation = rowFiltering["iconActivation"];
|
294
295
|
|
295
|
-
|
296
|
-
this.
|
297
|
-
|
298
|
-
|
296
|
+
for (var index = 0; index < this._hosts.length; index++) {
|
297
|
+
if (this._iconActivation === "onHover") {
|
298
|
+
this._hosts[index].enableClass("hovering-filter-icon", true);
|
299
|
+
} else {
|
300
|
+
this._hosts[index].enableClass("hovering-filter-icon", false);
|
301
|
+
}
|
302
|
+
|
303
|
+
if (this._iconActivation === "always") {
|
304
|
+
this._hosts[index].enableClass("always-on-filter", true);
|
305
|
+
} else {
|
306
|
+
this._hosts[index].enableClass("always-on-filter", false);
|
307
|
+
}
|
299
308
|
}
|
300
309
|
}
|
301
310
|
|
@@ -323,8 +332,6 @@ RowFilteringPlugin.prototype.config = function (options) {
|
|
323
332
|
|
324
333
|
this._setColumnOptions(i, column);
|
325
334
|
}
|
326
|
-
|
327
|
-
this.updateAllColumnIcons(); //Create icon at first time
|
328
335
|
};
|
329
336
|
/** @public
|
330
337
|
* @param {Object=} gridOptions
|
@@ -627,18 +634,26 @@ RowFilteringPlugin.prototype.setColumnFilter = function (colIndex, exp, ctx) {
|
|
627
634
|
|
628
635
|
|
629
636
|
RowFilteringPlugin.prototype._setColumnOptions = function (colIndex, columnOptions) {
|
637
|
+
var colOptions = this._newExtColumnOptions(colIndex);
|
638
|
+
|
639
|
+
var filterIcon = columnOptions["filterIcon"];
|
630
640
|
var fieldDataType = columnOptions["fieldDataType"] || columnOptions["dataType"]; // TODO: This should not be set here, should retreive data type from Composite/Realtime Grid
|
631
641
|
|
632
642
|
if (fieldDataType) {
|
633
|
-
var colOptions = this._newExtColumnOptions(colIndex);
|
634
|
-
|
635
643
|
colOptions.fieldDataType = fieldDataType; // TODO: This should not be set here, should retreive data type from Composite/Realtime Grid
|
636
644
|
}
|
637
645
|
|
646
|
+
if (filterIcon != null) {
|
647
|
+
colOptions.filterIcon = filterIcon;
|
648
|
+
}
|
649
|
+
|
650
|
+
var iconActivation = filterIcon == false ? "none" : this._iconActivation;
|
638
651
|
var exp = columnOptions["filter"];
|
639
652
|
|
640
653
|
if (exp) {
|
641
654
|
this.addColumnFilter(colIndex, exp, columnOptions["filterState"]);
|
655
|
+
} else if (iconActivation == "always" || iconActivation == "onHover") {
|
656
|
+
this._updateColumnIcon(colIndex);
|
642
657
|
}
|
643
658
|
};
|
644
659
|
/** @private
|
@@ -1241,6 +1256,9 @@ RowFilteringPlugin.prototype.refresh = function () {
|
|
1241
1256
|
RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
|
1242
1257
|
var cfo = this._getColumnFilterOption(colIndex);
|
1243
1258
|
|
1259
|
+
var co = this._getExtColumnOptions(colIndex);
|
1260
|
+
|
1261
|
+
var iconActivation = co.filterIcon == false ? "none" : this._iconActivation;
|
1244
1262
|
var hasFilter = cfo ? cfo._filters.length : 0;
|
1245
1263
|
|
1246
1264
|
for (var i = this._hosts.length; --i >= 0;) {
|
@@ -1254,6 +1272,8 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
|
|
1254
1272
|
var rCount = tsect.getRowCount();
|
1255
1273
|
var cell = tsect.getCell(colIndex, rCount - 1, true); // Get bottom cell
|
1256
1274
|
|
1275
|
+
var column = tsect.getColumn(colIndex);
|
1276
|
+
|
1257
1277
|
if (!cell) {
|
1258
1278
|
continue;
|
1259
1279
|
} // HACK: Update cell padding for all type of icons (sorting and column grouping icons)
|
@@ -1263,8 +1283,16 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
|
|
1263
1283
|
cell["updatePadding"]();
|
1264
1284
|
}
|
1265
1285
|
|
1266
|
-
var
|
1267
|
-
|
1286
|
+
var isColumnMovable = host.isColumnMovable(colIndex);
|
1287
|
+
|
1288
|
+
if (isColumnMovable) {
|
1289
|
+
column.enableClass("movable", true);
|
1290
|
+
} else {
|
1291
|
+
column.enableClass("movable", false);
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
var onActiveFilter = iconActivation !== "always" && iconActivation !== "onHover";
|
1295
|
+
var noFilterIcon = this._disabled || iconActivation === "none" || onActiveFilter && !hasFilter;
|
1268
1296
|
|
1269
1297
|
if (!noFilterIcon) {
|
1270
1298
|
if (!cell._filterIcon) {
|
@@ -1292,7 +1320,7 @@ RowFilteringPlugin.prototype._updateColumnIcon = function (colIndex) {
|
|
1292
1320
|
cell._filterIcon = filterIcon;
|
1293
1321
|
}
|
1294
1322
|
|
1295
|
-
if (hasFilter
|
1323
|
+
if (hasFilter) {
|
1296
1324
|
cell.enableClass("active-filter", true);
|
1297
1325
|
} else {
|
1298
1326
|
cell.enableClass("active-filter", false);
|
@@ -1709,6 +1737,21 @@ RowFilteringPlugin.prototype.openDialog = function (colIndex, options) {
|
|
1709
1737
|
this._filterDialog.init(dialogConfig);
|
1710
1738
|
}
|
1711
1739
|
|
1740
|
+
var colData = host.getColumnData(colIndex);
|
1741
|
+
var formatOptions = colData.formatOptions;
|
1742
|
+
var useUTCTime = false;
|
1743
|
+
|
1744
|
+
if (formatOptions) {
|
1745
|
+
if (formatOptions.formatType) {
|
1746
|
+
useUTCTime = true;
|
1747
|
+
|
1748
|
+
if (formatOptions.useUTCTime != null) {
|
1749
|
+
useUTCTime = formatOptions.useUTCTime;
|
1750
|
+
}
|
1751
|
+
}
|
1752
|
+
}
|
1753
|
+
|
1754
|
+
this._filterDialog.useUTCTime = useUTCTime;
|
1712
1755
|
this._filterDialog.target = cell.getElement();
|
1713
1756
|
this._filterDialog._colIndex = colIndex;
|
1714
1757
|
this._filterDialog.data = items; // TODO: Move all settings to configuration object
|
@@ -1915,7 +1958,8 @@ RowFilteringPlugin.prototype._onColumnRemoved = function (e) {
|
|
1915
1958
|
return;
|
1916
1959
|
}
|
1917
1960
|
|
1918
|
-
var
|
1961
|
+
var crf = colData["rowFiltering"];
|
1962
|
+
var cfo = crf["filterOption"];
|
1919
1963
|
|
1920
1964
|
if (cfo) {
|
1921
1965
|
var funcIndex = this._columnFilters.indexOf(cfo);
|
@@ -1088,7 +1088,7 @@ RowGroupingPlugin.prototype._clearSectionStyles = function (colIndex) {
|
|
1088
1088
|
var fi = section.getFirstIndexInView();
|
1089
1089
|
var li = section.getLastIndexInView();
|
1090
1090
|
for (var r = fi; r <= li; r++) {
|
1091
|
-
rowPainter.
|
1091
|
+
rowPainter.removeAllStyles(section, colIndex, r);
|
1092
1092
|
}
|
1093
1093
|
}
|
1094
1094
|
};
|
@@ -50,7 +50,6 @@ var RowSelectionPlugin = function (options) {
|
|
50
50
|
t._updateMenuIcon = t._updateMenuIcon.bind(t);
|
51
51
|
|
52
52
|
t._hosts = [];
|
53
|
-
t._anchorRowDict = {};
|
54
53
|
t._isIE = isIE();
|
55
54
|
t._textRange = document.createRange();
|
56
55
|
|
@@ -94,11 +93,11 @@ RowSelectionPlugin.prototype._basedOnContent = false;
|
|
94
93
|
* @private
|
95
94
|
*/
|
96
95
|
RowSelectionPlugin.prototype._selectionField = "SELECTED_ROW";
|
97
|
-
/** @type {
|
96
|
+
/** @type {string}
|
98
97
|
* @private
|
99
98
|
* @description use with _basedOnContent mode for tracking current anchor row
|
100
99
|
*/
|
101
|
-
RowSelectionPlugin.prototype.
|
100
|
+
RowSelectionPlugin.prototype._anchorRowId = "";
|
102
101
|
/** @type {boolean}
|
103
102
|
* @private
|
104
103
|
*/
|
@@ -177,16 +176,15 @@ RowSelectionPlugin.prototype.initialize = function (host, options) {
|
|
177
176
|
RowSelectionPlugin._applyThemeColor(host);
|
178
177
|
} else {
|
179
178
|
RowSelectionPlugin._stylePromise = ElfUtil.getThemeColors();
|
180
|
-
RowSelectionPlugin._stylePromise.then(this._onThemeLoaded);
|
179
|
+
RowSelectionPlugin._stylePromise.then(this._onThemeLoaded).catch(this._onThemeLoaded);
|
181
180
|
}
|
182
181
|
}
|
183
182
|
|
184
183
|
};
|
185
184
|
|
186
185
|
/** @private
|
187
|
-
* @param {Object} colors
|
188
186
|
*/
|
189
|
-
RowSelectionPlugin.prototype._onThemeLoaded = function(
|
187
|
+
RowSelectionPlugin.prototype._onThemeLoaded = function() {
|
190
188
|
if(!RowSelectionPlugin._styles) {
|
191
189
|
var styles = [
|
192
190
|
".row-selection-menu", [
|
@@ -367,13 +365,18 @@ RowSelectionPlugin.prototype.getActiveGrid = function () {
|
|
367
365
|
* @return {number} rowIndex of anchor
|
368
366
|
*/
|
369
367
|
RowSelectionPlugin.prototype.getRowAnchor = function (sectRef) {
|
370
|
-
var section = this._getSection(sectRef);
|
371
|
-
if (!section || !section.getRowAnchor) return -1;
|
372
368
|
if (this._basedOnContent) {
|
373
|
-
|
369
|
+
var dv = this._activeGrid ? this._activeGrid.getDataSource() : null;
|
370
|
+
if( dv && this._anchorRowId){
|
371
|
+
return dv.getRowIndex(this._anchorRowId);
|
372
|
+
}
|
374
373
|
} else {
|
375
|
-
|
374
|
+
var section = this._getSection(sectRef);
|
375
|
+
if (section && section.getRowAnchor){
|
376
|
+
return section.getRowAnchor();
|
377
|
+
}
|
376
378
|
}
|
379
|
+
return -1;
|
377
380
|
};
|
378
381
|
|
379
382
|
/** @public
|
@@ -868,7 +871,7 @@ RowSelectionPlugin.prototype._onPostSectionDataBinding = function (e) {
|
|
868
871
|
|
869
872
|
var fromR = section.getFirstIndexInView();
|
870
873
|
var toR = section.getLastIndexInView();
|
871
|
-
for (var r = fromR; r
|
874
|
+
for (var r = fromR; r <= toR; ++r) {
|
872
875
|
var dataRow = this._rowGetter(dv.getRowDataAt(r));
|
873
876
|
if(dataRow) {
|
874
877
|
if(dataRow[field]) {
|
@@ -1084,7 +1087,7 @@ RowSelectionPlugin.prototype._sectionSetSelectedRow = function (section, rowInde
|
|
1084
1087
|
var dataRow = this._getRow(dv, rowIndex);
|
1085
1088
|
if (dataRow) {
|
1086
1089
|
this._setData(dv, rowIndex, this._selectionField, isSelect);
|
1087
|
-
if (isSelect) this.
|
1090
|
+
if (isSelect) this._anchorRowId = dv.getRowId(rowIndex);
|
1088
1091
|
}
|
1089
1092
|
}
|
1090
1093
|
} else {
|
@@ -1142,7 +1145,7 @@ RowSelectionPlugin.prototype._sectionClearSelectedRows = function (section, pres
|
|
1142
1145
|
}
|
1143
1146
|
}
|
1144
1147
|
if (!preserveAnchor) {
|
1145
|
-
this.
|
1148
|
+
this._anchorRowId = "";
|
1146
1149
|
}
|
1147
1150
|
} else {
|
1148
1151
|
section.clearSelectedRows();
|
@@ -30,8 +30,6 @@ declare class RowColoringPlugin extends GridPlugin {
|
|
30
30
|
|
31
31
|
public getConfigObject(gridOptions?: any): any;
|
32
32
|
|
33
|
-
public getRowConfigObject(rowId: string): any|null;
|
34
|
-
|
35
33
|
public setRowColor(rowRef: string|number, bgColor?: (string|null), txtColor?: (string|null)): void;
|
36
34
|
|
37
35
|
public getRowColor(rowRef: string|number): string;
|
@@ -231,42 +231,6 @@ RowColoringPlugin.prototype.getConfigObject = function (gridOptions) {
|
|
231
231
|
return obj;
|
232
232
|
};
|
233
233
|
/** @public
|
234
|
-
* @param {string} rowId
|
235
|
-
* @return {Object|null} If this row doesn't contain a config object, return null.
|
236
|
-
*/
|
237
|
-
|
238
|
-
|
239
|
-
RowColoringPlugin.prototype.getRowConfigObject = function (rowId) {
|
240
|
-
// TODO: Should be call a method for get data from dataTable in tr-grid-util instead of call direct in dataTable
|
241
|
-
var dv = this._getDataView();
|
242
|
-
|
243
|
-
if (!dv) {
|
244
|
-
return null;
|
245
|
-
}
|
246
|
-
|
247
|
-
var dt = dv.getDataSource();
|
248
|
-
|
249
|
-
if (!dt) {
|
250
|
-
return null;
|
251
|
-
}
|
252
|
-
|
253
|
-
var rowData = this._rowGetter(dt.getRowData(rowId)); // get data from dataTable
|
254
|
-
|
255
|
-
|
256
|
-
if (!rowData) {
|
257
|
-
return null;
|
258
|
-
}
|
259
|
-
|
260
|
-
var obj = {}; // Only css field for predefine user color classes are currently supported
|
261
|
-
|
262
|
-
if (rowData[this._cssField]) {
|
263
|
-
obj[this._cssField] = rowData[this._cssField];
|
264
|
-
return obj;
|
265
|
-
}
|
266
|
-
|
267
|
-
return null;
|
268
|
-
};
|
269
|
-
/** @public
|
270
234
|
* @param {string|number} rowRef Row id in the data table or row index
|
271
235
|
* @param {(string|null)=} bgColor
|
272
236
|
* @param {(string|null)=} txtColor
|
@@ -369,10 +333,7 @@ RowColoringPlugin.prototype.setRowPredefinedColor = function (rowRef, color) {
|
|
369
333
|
return;
|
370
334
|
}
|
371
335
|
|
372
|
-
|
373
|
-
values[this._cssField] = color || "";
|
374
|
-
|
375
|
-
this._setRowData(dv, rowRef, values);
|
336
|
+
this._setStaticData(dv, rowRef, this._cssField, color || "");
|
376
337
|
};
|
377
338
|
/** @public
|
378
339
|
* @return {Object} Return predefined color object map
|