@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
@@ -38,7 +38,10 @@ declare namespace ColumnDefinition {
|
|
38
38
|
hidden?: boolean,
|
39
39
|
id?: string,
|
40
40
|
textSelect?: boolean,
|
41
|
-
keepModel?: boolean
|
41
|
+
keepModel?: boolean,
|
42
|
+
stationary?: boolean,
|
43
|
+
leftPinned?: boolean,
|
44
|
+
rightPinned?: boolean
|
42
45
|
};
|
43
46
|
|
44
47
|
}
|
@@ -59,9 +62,7 @@ declare class ColumnDefinition {
|
|
59
62
|
|
60
63
|
public getRenderer(): ((...params: any[]) => any);
|
61
64
|
|
62
|
-
public getHeaderRenderer(): ((...params: any[]) => any);
|
63
|
-
|
64
|
-
public getSorter(): ((...params: any[]) => any);
|
65
|
+
public getHeaderRenderer(): ((...params: any[]) => any)|null;
|
65
66
|
|
66
67
|
public getName(): string;
|
67
68
|
|
@@ -125,8 +126,12 @@ declare class ColumnDefinition {
|
|
125
126
|
|
126
127
|
public activateRenderer(id?: string, func?: ((...params: any[]) => any)): boolean;
|
127
128
|
|
129
|
+
public getSorter(): ((...params: any[]) => any)|null;
|
130
|
+
|
128
131
|
public setSorter(func?: ColumnDefinition.SortLogic): void;
|
129
132
|
|
133
|
+
public isRowSorting(): boolean;
|
134
|
+
|
130
135
|
public setName(str: string): void;
|
131
136
|
|
132
137
|
public getUserModel(): any;
|
@@ -45,6 +45,9 @@ import Engine from "../../tr-grid-util/es6/formula/Engine.js";
|
|
45
45
|
* @property {string=} id Id for unique identifier
|
46
46
|
* @property {boolean=} textSelect=false If enabled, user can select text in this column
|
47
47
|
* @property {boolean=} keepModel If enabled, initial column's options will be kept
|
48
|
+
* @property {boolean=} stationary=false If enabled, the column order cannot be changed (i.e., this column and any column to its left cannot be moved)
|
49
|
+
* @property {boolean=} leftPinned=false If enabled, the column will not be part of the scrollable area and is pinned to the left side
|
50
|
+
* @property {boolean=} rightPinned=false If enabled, the column will not be part of the scrollable area and is pinned to the right side
|
48
51
|
*/
|
49
52
|
|
50
53
|
/** mapping of field type to javascript type
|
@@ -102,16 +105,12 @@ var _toAlignment = function(str) {
|
|
102
105
|
var ColumnDefinition = function(columnOption, hostGrid) {
|
103
106
|
this._defaultRenderer = this._defaultRenderer.bind(this);
|
104
107
|
this._customRenderer = this._customRenderer.bind(this);
|
105
|
-
this._defaultSorter = this._defaultSorter.bind(this);
|
106
|
-
this._dataSorter = this._dataSorter.bind(this);
|
107
|
-
this._rowDefSorter = this._rowDefSorter.bind(this);
|
108
108
|
|
109
109
|
this._id = "" + ColumnDefinition._runningId++;
|
110
110
|
this._internalRenderer = this._defaultRenderer;
|
111
111
|
this._internalSorter = this._defaultSorter;
|
112
112
|
|
113
113
|
this._eventArg = {"colDef": this}; // WARNING: Circular reference
|
114
|
-
this._sortContext = {"colDef": this};
|
115
114
|
if(hostGrid) {
|
116
115
|
this._updateContext("grid", hostGrid);
|
117
116
|
this._updateContext("core", hostGrid["getCoreGrid"]()); // TODO: Handle multiple core grids
|
@@ -180,15 +179,6 @@ ColumnDefinition.prototype._activatedRenderer = null;
|
|
180
179
|
* @private
|
181
180
|
*/
|
182
181
|
ColumnDefinition.prototype._rendererMap = null;
|
183
|
-
/** @type {!Function}
|
184
|
-
* @private
|
185
|
-
*/
|
186
|
-
ColumnDefinition.prototype._internalSorter;
|
187
|
-
/** Workaround to provide user a context during the sorting process
|
188
|
-
* @type {Object}
|
189
|
-
* @private
|
190
|
-
*/
|
191
|
-
ColumnDefinition.prototype._sortContext = null;
|
192
182
|
/** @type {Function}
|
193
183
|
* @private
|
194
184
|
*/
|
@@ -434,25 +424,6 @@ ColumnDefinition.prototype.getRenderer = function() {
|
|
434
424
|
ColumnDefinition.prototype.getHeaderRenderer = function() {
|
435
425
|
return this._headerRenderer;
|
436
426
|
};
|
437
|
-
/** @public
|
438
|
-
* @return {!Function}
|
439
|
-
*/
|
440
|
-
ColumnDefinition.prototype.getSorter = function() {
|
441
|
-
return this._internalSorter;
|
442
|
-
};
|
443
|
-
/** Internal method for preparing sort context
|
444
|
-
* @public
|
445
|
-
* @ignore
|
446
|
-
* @param {number} colIndex
|
447
|
-
* @return {!Function}
|
448
|
-
*/
|
449
|
-
ColumnDefinition.prototype._prepareSortContext = function(colIndex) {
|
450
|
-
// TODO: Context does not get updated when column is moved or removed
|
451
|
-
this._sortContext["colIndex"] = colIndex;
|
452
|
-
this._sortContext["field"] = this._field;
|
453
|
-
|
454
|
-
return this._internalSorter;
|
455
|
-
};
|
456
427
|
|
457
428
|
/** @public
|
458
429
|
* @return {string}
|
@@ -850,21 +821,27 @@ ColumnDefinition.prototype.activateRenderer = function(id, func) {
|
|
850
821
|
this.setRenderer(renderer);
|
851
822
|
return this._activatedRenderer ? true : false;
|
852
823
|
};
|
824
|
+
|
825
|
+
/** @public
|
826
|
+
* @return {Function}
|
827
|
+
*/
|
828
|
+
ColumnDefinition.prototype.getSorter = function() {
|
829
|
+
return this._userSorter;
|
830
|
+
};
|
853
831
|
/** @public
|
854
832
|
* @param {ColumnDefinition~SortLogic=} func
|
855
833
|
*/
|
856
834
|
ColumnDefinition.prototype.setSorter = function(func) {
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
this._userSorter = null;
|
866
|
-
this._internalSorter = this._defaultSorter;
|
835
|
+
this._userSorter = (typeof func === "function") ? func : null;
|
836
|
+
};
|
837
|
+
/** @public
|
838
|
+
* @return {boolean}
|
839
|
+
*/
|
840
|
+
ColumnDefinition.prototype.isRowSorting = function() {
|
841
|
+
if(this._rowSorting == null) {
|
842
|
+
return !this._realTimeField;
|
867
843
|
}
|
844
|
+
return this._rowSorting ? true : false;
|
868
845
|
};
|
869
846
|
|
870
847
|
/** To allow user change column name in run-time (language change or localization)
|
@@ -983,78 +960,13 @@ ColumnDefinition.prototype._customRenderer = function(e) {
|
|
983
960
|
}
|
984
961
|
}
|
985
962
|
};
|
986
|
-
/** @private
|
987
|
-
* @param {RowDefinition} rowDefA
|
988
|
-
* @param {RowDefinition} rowDefB
|
989
|
-
* @param {number} order
|
990
|
-
* @return {number}
|
991
|
-
*/
|
992
|
-
ColumnDefinition.prototype._defaultSorter = function(rowDefA, rowDefB, order) {
|
993
|
-
var orderA = rowDefA.getGroupOrder();
|
994
|
-
var orderB = rowDefB.getGroupOrder();
|
995
|
-
if(orderA !== orderB) {
|
996
|
-
return orderA - orderB; // Regardless of sort order
|
997
|
-
}
|
998
|
-
|
999
|
-
var a = rowDefA.getData(this._field);
|
1000
|
-
var b = rowDefB.getData(this._field);
|
1001
|
-
|
1002
|
-
if(a == null || a !== a) {
|
1003
|
-
if(b == null || b !== b) {
|
1004
|
-
return 0;
|
1005
|
-
}
|
1006
|
-
return 1;
|
1007
|
-
}
|
1008
|
-
if(b == null || b !== b) {
|
1009
|
-
return -1;
|
1010
|
-
}
|
1011
|
-
|
1012
|
-
if(a < b) {
|
1013
|
-
return -order;
|
1014
|
-
}
|
1015
|
-
if(b < a) {
|
1016
|
-
return order;
|
1017
|
-
}
|
1018
|
-
return 0;
|
1019
|
-
};
|
1020
|
-
/** @private
|
1021
|
-
* @param {RowDefinition} rowDefA
|
1022
|
-
* @param {RowDefinition} rowDefB
|
1023
|
-
* @param {number} order
|
1024
|
-
* @return {number}
|
1025
|
-
*/
|
1026
|
-
ColumnDefinition.prototype._dataSorter = function(rowDefA, rowDefB, order) {
|
1027
|
-
var orderA = rowDefA.getGroupOrder();
|
1028
|
-
var orderB = rowDefB.getGroupOrder();
|
1029
|
-
if(orderA !== orderB) {
|
1030
|
-
return orderA - orderB; // Regardless of sort order
|
1031
|
-
}
|
1032
963
|
|
1033
|
-
var a = rowDefA.getData(this._field);
|
1034
|
-
var b = rowDefB.getData(this._field);
|
1035
|
-
return this._userSorter(a, b, order, this._sortContext);
|
1036
|
-
};
|
1037
|
-
/** @private
|
1038
|
-
* @param {RowDefinition} rowDefA
|
1039
|
-
* @param {RowDefinition} rowDefB
|
1040
|
-
* @param {number} order
|
1041
|
-
* @return {number}
|
1042
|
-
*/
|
1043
|
-
ColumnDefinition.prototype._rowDefSorter = function(rowDefA, rowDefB, order) {
|
1044
|
-
var orderA = rowDefA.getGroupOrder();
|
1045
|
-
var orderB = rowDefB.getGroupOrder();
|
1046
|
-
if(orderA !== orderB) {
|
1047
|
-
return orderA - orderB; // Regardless of sort order
|
1048
|
-
}
|
1049
|
-
|
1050
|
-
return this._userSorter(rowDefA, rowDefB, order, this._sortContext);
|
1051
|
-
};
|
1052
964
|
/** @private
|
1053
965
|
* @param {string} propName
|
1054
966
|
* @param {*} val
|
1055
967
|
*/
|
1056
968
|
ColumnDefinition.prototype._updateContext = function(propName, val) {
|
1057
|
-
this._eventArg[propName] =
|
969
|
+
this._eventArg[propName] = val;
|
1058
970
|
};
|
1059
971
|
|
1060
972
|
/** @public
|
@@ -9,13 +9,13 @@ declare class DataConnector extends EventDispatcher {
|
|
9
9
|
|
10
10
|
constructor();
|
11
11
|
|
12
|
-
public getAllRics(): (string)[];
|
12
|
+
public getAllRics(): (string)[]|null;
|
13
13
|
|
14
|
-
public getAllRowDefs(): (RowDefinition)[];
|
14
|
+
public getAllRowDefs(): (RowDefinition)[]|null;
|
15
15
|
|
16
16
|
public getAllFields(): (string)[];
|
17
17
|
|
18
|
-
public getRowDefByRic(ric: string): (RowDefinition)[];
|
18
|
+
public getRowDefByRic(ric: string): (RowDefinition)[]|null;
|
19
19
|
|
20
20
|
public addRic(rowDef: RowDefinition): boolean;
|
21
21
|
|
@@ -1,21 +1,21 @@
|
|
1
|
-
import {Dom} from "../../tr-grid-util/es6/Dom.js";
|
2
|
-
import {Conflator} from "../../tr-grid-util/es6/Conflator.js";
|
3
|
-
import {Ext} from "../../tr-grid-util/es6/Ext.js";
|
1
|
+
import { Dom } from "../../tr-grid-util/es6/Dom.js";
|
2
|
+
import { Conflator } from "../../tr-grid-util/es6/Conflator.js";
|
3
|
+
import { Ext } from "../../tr-grid-util/es6/Ext.js";
|
4
4
|
import { EventDispatcher } from "../../tr-grid-util/es6/EventDispatcher.js";
|
5
5
|
import { Engine } from "../../tr-grid-util/es6/formula/Engine.js";
|
6
6
|
import { cloneObject, extendObject, arrayToObject } from "../../tr-grid-util/es6/Util.js";
|
7
7
|
import { DateTime } from "../../tr-grid-util/es6/DateTime.js";
|
8
8
|
|
9
|
-
import {RowDefinition, ROW_DEF} from "./RowDefinition.js";
|
10
|
-
import {ColumnDefinition, COL_DEF} from "./ColumnDefinition.js";
|
9
|
+
import { RowDefinition, ROW_DEF } from "./RowDefinition.js";
|
10
|
+
import { ColumnDefinition, COL_DEF } from "./ColumnDefinition.js";
|
11
11
|
import SnapshotFiller from "./SnapshotFiller.js";
|
12
12
|
import StyleLoader from "./StyleLoader.js";
|
13
13
|
import FieldDefinition from "./FieldDefinition.js";
|
14
14
|
import DataConnector from "./DataConnector.js";
|
15
|
+
import RowDefSorter from "./RowDefSorter.js";
|
15
16
|
|
16
17
|
import { Core } from "../../core/es6/grid/Core.js";
|
17
18
|
import { SortableTitlePlugin } from "../../core/es6/grid/plugins/SortableTitlePlugin.js";
|
18
|
-
import { DragAndDropTitlePlugin } from "../../core/es6/grid/plugins/DragAndDropTitlePlugin.js";
|
19
19
|
import { DataCache } from "../../core/es6/data/DataCache.js";
|
20
20
|
import { DataTable } from "../../core/es6/data/DataTable.js";
|
21
21
|
import { DataView } from "../../core/es6/data/DataView.js";
|
@@ -70,7 +70,10 @@ declare namespace Grid {
|
|
70
70
|
dataComposed?: ((...params: any[]) => any),
|
71
71
|
autoDateConversion?: boolean,
|
72
72
|
textSelect?: boolean,
|
73
|
-
lang?: string
|
73
|
+
lang?: string,
|
74
|
+
scrollbarParent?: Element,
|
75
|
+
formulaEngine?: boolean,
|
76
|
+
adcPollingInterval?: number
|
74
77
|
};
|
75
78
|
|
76
79
|
type RowReference = number|string|RowDefinition;
|
@@ -85,7 +88,7 @@ declare class Grid extends EventDispatcher {
|
|
85
88
|
|
86
89
|
public dispose(): void;
|
87
90
|
|
88
|
-
public getElement(): Element;
|
91
|
+
public getElement(): Element|null;
|
89
92
|
|
90
93
|
public removeEventListeners(): void;
|
91
94
|
|
@@ -107,12 +110,14 @@ declare class Grid extends EventDispatcher {
|
|
107
110
|
|
108
111
|
public getRelativePosition(obj: ElementWrapper|Element|Event|MouseEvent): any;
|
109
112
|
|
110
|
-
public getCoreGrid(): Core;
|
113
|
+
public getCoreGrid(): Core|null;
|
111
114
|
|
112
115
|
public initialize(gridOption?: Grid.GridOptions): void;
|
113
116
|
|
114
117
|
public getConfigObject(gridOptions?: any): any;
|
115
118
|
|
119
|
+
public setLocale(lang: string): void;
|
120
|
+
|
116
121
|
public insertColumn(columnOption: ColumnDefinition.Options|string, idx?: number): void;
|
117
122
|
|
118
123
|
public setColumns(columns: (any)[]): void;
|
@@ -159,9 +164,9 @@ declare class Grid extends EventDispatcher {
|
|
159
164
|
|
160
165
|
public updateDataSet(records: (any)[], rowIdentifier: string): void;
|
161
166
|
|
162
|
-
public removeRow(rowRef: Grid.RowReference): RowDefinition;
|
167
|
+
public removeRow(rowRef: Grid.RowReference): RowDefinition|null;
|
163
168
|
|
164
|
-
public removeRows(rowRefs: (Grid.RowReference)[]): (RowDefinition)[];
|
169
|
+
public removeRows(rowRefs: (Grid.RowReference)[]): (RowDefinition)[]|null;
|
165
170
|
|
166
171
|
public removeAllRows(): void;
|
167
172
|
|
@@ -193,12 +198,14 @@ declare class Grid extends EventDispatcher {
|
|
193
198
|
|
194
199
|
public getColumnDataType(colIndex: number): string;
|
195
200
|
|
196
|
-
public getColumnDefinition(colIndex: number): ColumnDefinition;
|
201
|
+
public getColumnDefinition(colIndex: number): ColumnDefinition|null;
|
197
202
|
|
198
|
-
public getRowDefinition(rowRef: number|string): RowDefinition;
|
203
|
+
public getRowDefinition(rowRef: number|string): RowDefinition|null;
|
199
204
|
|
200
205
|
public getRowDefinitions(): (RowDefinition)[];
|
201
206
|
|
207
|
+
public getAllRowDefinitions(inclAutoGenerate?: boolean): (RowDefinition)[];
|
208
|
+
|
202
209
|
public getRowData(rowIndex: number): any;
|
203
210
|
|
204
211
|
public getMultipleRowData(obj?: any): (any)[];
|
@@ -219,7 +226,7 @@ declare class Grid extends EventDispatcher {
|
|
219
226
|
|
220
227
|
public getAllFields(): (string)[];
|
221
228
|
|
222
|
-
public freezeColumn(
|
229
|
+
public freezeColumn(colIndex?: number, pinnedRightColumns?: number): void;
|
223
230
|
|
224
231
|
public updateColumnTitle(): void;
|
225
232
|
|
@@ -231,7 +238,7 @@ declare class Grid extends EventDispatcher {
|
|
231
238
|
|
232
239
|
public clearSort(): void;
|
233
240
|
|
234
|
-
public getDataView(): DataView;
|
241
|
+
public getDataView(): DataView|null;
|
235
242
|
|
236
243
|
public setPage(pageIndex: number): boolean;
|
237
244
|
|
@@ -249,6 +256,14 @@ declare class Grid extends EventDispatcher {
|
|
249
256
|
|
250
257
|
public requestRowRefresh(): void;
|
251
258
|
|
259
|
+
public updateLayout(): void;
|
260
|
+
|
261
|
+
public getExtension(str: string): any;
|
262
|
+
|
263
|
+
public activateADCPolling(activated?: boolean): void;
|
264
|
+
|
265
|
+
public refreshADCData(): boolean;
|
266
|
+
|
252
267
|
public logDT(opt_options?: any): void;
|
253
268
|
|
254
269
|
public logDV(opt_options?: any): void;
|