@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
@@ -49,6 +49,10 @@ var _newArrayOfObject = function (num) {
|
|
49
49
|
* @param {boolean=} bool
|
50
50
|
*/
|
51
51
|
var _toggleInlineElement = function (elem, bool) {
|
52
|
+
if(!elem || elem.style.display === "none") {
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
|
52
56
|
var s = elem.style;
|
53
57
|
if(bool == null) {
|
54
58
|
bool = s.display !== "inline-block";
|
@@ -68,7 +72,7 @@ var _toggleInlineElement = function (elem, bool) {
|
|
68
72
|
var MultiTableManager = function (gridElem) {
|
69
73
|
this._onDelayedConfiguration = this._onDelayedConfiguration.bind(this);
|
70
74
|
this._onConfiguration = this._onConfiguration.bind(this);
|
71
|
-
this.
|
75
|
+
this._onWrapCountChanged = this._onWrapCountChanged.bind(this);
|
72
76
|
|
73
77
|
this._tables = [];
|
74
78
|
if(gridElem) {
|
@@ -102,6 +106,10 @@ MultiTableManager.prototype._emeraldGrid = false;
|
|
102
106
|
* @private
|
103
107
|
*/
|
104
108
|
MultiTableManager.prototype._ready = false;
|
109
|
+
/** @type {number}
|
110
|
+
* @private
|
111
|
+
*/
|
112
|
+
MultiTableManager.prototype._wrapSize = 0;
|
105
113
|
|
106
114
|
|
107
115
|
/** @public
|
@@ -196,6 +204,7 @@ MultiTableManager._onVScrollbarSynchronization = function(vScrollbarHost, hScrol
|
|
196
204
|
for(var i = 0; i < gridLen; ++i) {
|
197
205
|
var gridElem = gridElems[i];
|
198
206
|
var core = gridElem.api.getCoreGrid();
|
207
|
+
|
199
208
|
_toggleInlineElement(gridElem, true);
|
200
209
|
if(i > 0) {
|
201
210
|
mainCore.synchronizeVScrollbar(core);
|
@@ -234,6 +243,8 @@ MultiTableManager.prototype.setGridConfig = function (configObj) {
|
|
234
243
|
* @param {Object} e
|
235
244
|
*/
|
236
245
|
MultiTableManager.prototype._onDelayedConfiguration = function (e) {
|
246
|
+
this._ready = false;
|
247
|
+
// TODO: Handle the case where config is changed at runtime
|
237
248
|
setTimeout(this._onConfiguration, 10); // Add delay to ensure that scrollbars are synchronized first
|
238
249
|
};
|
239
250
|
/** @private
|
@@ -245,15 +256,16 @@ MultiTableManager.prototype._onConfiguration = function () {
|
|
245
256
|
}
|
246
257
|
this._ready = true;
|
247
258
|
|
248
|
-
|
259
|
+
if(this._wrapSize) {
|
260
|
+
this._wrapTable(this._wrapSize);
|
261
|
+
} else {
|
262
|
+
this._setTableCount(this._tableCount);
|
263
|
+
}
|
249
264
|
};
|
250
265
|
|
251
266
|
/** @public
|
252
267
|
*/
|
253
268
|
MultiTableManager.prototype.dispose = function () {
|
254
|
-
// var main = this._tables[0];
|
255
|
-
// main.api.getDataSource().unlisten("dataChanged", this._onDataChanged);
|
256
|
-
|
257
269
|
var len = this._tables.length;
|
258
270
|
for(var i = 0; i < len; ++i) {
|
259
271
|
this._tables[i].dispose();
|
@@ -272,7 +284,8 @@ MultiTableManager.prototype._cloneConfig = function () {
|
|
272
284
|
if(this._configObj) {
|
273
285
|
obj = cloneObject(this._configObj);
|
274
286
|
if(Array.isArray(obj.columns)) {
|
275
|
-
|
287
|
+
var runtimeConfig = this._tables[0].api ? this._tables[0].api.getConfigObject() : this._configObj;
|
288
|
+
obj.columns = runtimeConfig.columns.slice();
|
276
289
|
}
|
277
290
|
}
|
278
291
|
return obj || {};
|
@@ -282,13 +295,12 @@ MultiTableManager.prototype._cloneConfig = function () {
|
|
282
295
|
* @return {number}
|
283
296
|
*/
|
284
297
|
MultiTableManager.prototype.getTableCount = function() {
|
285
|
-
return this.
|
298
|
+
return this._tables.length;
|
286
299
|
};
|
287
|
-
/**
|
288
|
-
* @public
|
300
|
+
/** @private
|
289
301
|
* @param {number} num Number of tables. Number cannot be less than one.
|
290
302
|
*/
|
291
|
-
MultiTableManager.prototype.
|
303
|
+
MultiTableManager.prototype._setTableCount = function(num) {
|
292
304
|
this._tableCount = num > 0 ? num : 1;
|
293
305
|
|
294
306
|
if(this._ready) {
|
@@ -301,30 +313,53 @@ MultiTableManager.prototype.setTableCount = function(num) {
|
|
301
313
|
}
|
302
314
|
};
|
303
315
|
/**
|
316
|
+
* @public
|
317
|
+
* @param {number} num Number of tables. Number cannot be less than one.
|
318
|
+
*/
|
319
|
+
MultiTableManager.prototype.setTableCount = function(num) {
|
320
|
+
if(this._wrapSize) {
|
321
|
+
this._wrapTable(0);
|
322
|
+
}
|
323
|
+
this._setTableCount(num);
|
324
|
+
};
|
325
|
+
/**
|
304
326
|
* @private
|
327
|
+
* @param {number} tableIndex
|
305
328
|
* @return {Element}
|
306
329
|
*/
|
307
|
-
MultiTableManager.prototype._addTable = function() {
|
330
|
+
MultiTableManager.prototype._addTable = function(tableIndex) {
|
308
331
|
var main = this._tables[0];
|
309
332
|
var parentElem = main.parentNode;
|
333
|
+
var core = main.api.getCoreGrid();
|
310
334
|
var mainDataView = main.api.getDataView();
|
311
335
|
// var mainDataTable = main.api.getDataTable();
|
336
|
+
var stp = core.getPlugin("SortableTitlePlugin");
|
337
|
+
var dtp = core.getPlugin("DragAndDropTitlePlugin");
|
312
338
|
|
313
339
|
var configObj = this._cloneConfig();
|
314
340
|
configObj.extensions = this._generateExtensions();
|
341
|
+
|
315
342
|
delete configObj.staticDataRows;
|
316
343
|
delete configObj.rows;
|
317
344
|
delete configObj.dataModel;
|
318
345
|
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
configObj.dataModel = {
|
324
|
-
data: ary
|
325
|
-
};
|
346
|
+
if(this._wrapSize) {
|
347
|
+
var wrappedViews = mainDataView.getWrappedViews();
|
348
|
+
configObj.dataView = wrappedViews[tableIndex - 1];
|
349
|
+
configObj.grid = main.api;
|
326
350
|
} else {
|
327
|
-
configObj
|
351
|
+
configObj["SortableTitle"] = stp;
|
352
|
+
configObj["DragAndDropTitle"] = dtp;
|
353
|
+
var rowCount = mainDataView.getRowCount();
|
354
|
+
|
355
|
+
var ary = _newArrayOfObject(rowCount);
|
356
|
+
if(this._emeraldGrid) {
|
357
|
+
configObj.dataModel = {
|
358
|
+
data: ary
|
359
|
+
};
|
360
|
+
} else {
|
361
|
+
configObj.rows = ary;
|
362
|
+
}
|
328
363
|
}
|
329
364
|
|
330
365
|
var sub = document.createElement(main.tagName);
|
@@ -347,19 +382,22 @@ MultiTableManager.prototype._addTables = function(num) {
|
|
347
382
|
|
348
383
|
var main = this._tables[0];
|
349
384
|
_toggleInlineElement(main, true); // TODO: Check if we need to do this every time
|
385
|
+
|
350
386
|
// main.api.setFitContentWidth(true);
|
351
387
|
|
352
388
|
for(var i = 0; i < num; ++i) {
|
353
|
-
var grid = this._addTable();
|
389
|
+
var grid = this._addTable(this._tables.length);
|
354
390
|
this._tables.push(grid);
|
355
391
|
}
|
356
392
|
|
357
|
-
if(
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
393
|
+
if(!this._wrapSize) {
|
394
|
+
if(main._vScrollbarSynchronization) {
|
395
|
+
MultiTableManager.synchronizeVScrollbar(
|
396
|
+
main.api.getCoreGrid().getVScrollbar().getParent(),
|
397
|
+
main.parentNode,
|
398
|
+
this._tables
|
399
|
+
);
|
400
|
+
}
|
363
401
|
}
|
364
402
|
};
|
365
403
|
/**
|
@@ -381,20 +419,62 @@ MultiTableManager.prototype._removeTables = function(num) {
|
|
381
419
|
sub.parentNode.removeChild(sub);
|
382
420
|
}
|
383
421
|
}
|
384
|
-
if(this._tables.length === 1) {
|
385
|
-
|
386
|
-
|
422
|
+
// if(this._tables.length === 1) {
|
423
|
+
// TODO: Reset state
|
424
|
+
// this._tables[0].style.display = ""; // Remove display inline
|
425
|
+
// }
|
426
|
+
};
|
427
|
+
|
428
|
+
|
429
|
+
/** @private
|
430
|
+
* @param {number} rowCount Number of row per table. Set number to zero to turn off wrap mode.
|
431
|
+
*/
|
432
|
+
MultiTableManager.prototype._wrapTable = function(rowCount) {
|
433
|
+
this._wrapSize = rowCount > 0 ? rowCount : 0;
|
434
|
+
|
435
|
+
if(this._ready) {
|
436
|
+
var main = this._tables[0];
|
437
|
+
if(this._wrapSize) {
|
438
|
+
main.style.display = "none";
|
439
|
+
main.api.getCoreGrid().getVScrollbar().disable();
|
440
|
+
} else {
|
441
|
+
main.style.display = "";
|
442
|
+
_toggleInlineElement(main, true);
|
443
|
+
main.api.getCoreGrid().getVScrollbar().disable(false);
|
444
|
+
}
|
445
|
+
|
446
|
+
var dv = main.api.getDataView();
|
447
|
+
dv.listen("wrapCountChanged", this._onWrapCountChanged);
|
448
|
+
dv.wrapView(this._wrapSize);
|
387
449
|
}
|
388
450
|
};
|
389
451
|
/**
|
390
|
-
* @
|
452
|
+
* @public
|
453
|
+
* @param {number} rowCount Number of row per table. Set number to zero to turn off wrap mode.
|
454
|
+
*/
|
455
|
+
MultiTableManager.prototype.wrapTable = function(rowCount) {
|
456
|
+
if(rowCount && this._tableCount > 1) {
|
457
|
+
this._setTableCount(1);
|
458
|
+
}
|
459
|
+
if(!rowCount || rowCount < 0) {
|
460
|
+
rowCount = 0;
|
461
|
+
}
|
462
|
+
if(this._wrapSize !== rowCount) {
|
463
|
+
this._wrapTable(rowCount);
|
464
|
+
}
|
465
|
+
};
|
466
|
+
/** @private
|
391
467
|
* @param {Object} e
|
392
468
|
*/
|
393
|
-
MultiTableManager.prototype.
|
394
|
-
|
469
|
+
MultiTableManager.prototype._onWrapCountChanged = function(e) {
|
470
|
+
if(e.prevCount < e.newCount) {
|
471
|
+
this._addTables(e.newCount - e.prevCount);
|
472
|
+
}
|
473
|
+
if(e.newCount < e.prevCount) {
|
474
|
+
this._removeTables(e.prevCount - e.newCount);
|
475
|
+
}
|
395
476
|
};
|
396
477
|
|
397
|
-
|
398
478
|
/** @public
|
399
479
|
* @param {number=} at
|
400
480
|
* @return {Element}
|
@@ -445,23 +525,6 @@ MultiTableManager.prototype._execAll = function(methodName, args) {
|
|
445
525
|
}
|
446
526
|
};
|
447
527
|
|
448
|
-
/** @private
|
449
|
-
* @param {number} num
|
450
|
-
*/
|
451
|
-
MultiTableManager.prototype._setRtRowCount = function(num) {
|
452
|
-
var tableCount = this._tables.length;
|
453
|
-
// grid.api.getRowCount();
|
454
|
-
for(var i = 1; i < tableCount; ++i) {
|
455
|
-
var sub = this._tables[i];
|
456
|
-
sub.api.insertRows(_newArrayOfObject(num));
|
457
|
-
}
|
458
|
-
};
|
459
|
-
/** @private
|
460
|
-
* @param {number} num
|
461
|
-
*/
|
462
|
-
MultiTableManager.prototype._addCsRows = function(num) {
|
463
|
-
};
|
464
|
-
|
465
528
|
/** @public
|
466
529
|
* @param {Object=} rowOption
|
467
530
|
* @param {number=} at
|
@@ -471,10 +534,14 @@ MultiTableManager.prototype.insertRow = function(rowOption, at) {
|
|
471
534
|
return; // TODO
|
472
535
|
}
|
473
536
|
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
537
|
+
if(this._wrapSize) {
|
538
|
+
this.getTable().api.insertRow(rowOption, at);
|
539
|
+
} else {
|
540
|
+
var tableCount = this._tables.length;
|
541
|
+
for(var i = 0; i < tableCount; ++i) {
|
542
|
+
var tbl = this._tables[i];
|
543
|
+
tbl.api.insertRow(rowOption, at);
|
544
|
+
}
|
478
545
|
}
|
479
546
|
};
|
480
547
|
/** @public
|
@@ -488,18 +555,58 @@ MultiTableManager.prototype.removeRow = function(at) {
|
|
488
555
|
at = this.getRowCount() - 1;
|
489
556
|
}
|
490
557
|
|
558
|
+
if(this._wrapSize) {
|
559
|
+
this.getTable().api.removeRow(at);
|
560
|
+
} else {
|
561
|
+
var tableCount = this._tables.length;
|
562
|
+
for(var i = 0; i < tableCount; ++i) {
|
563
|
+
var tbl = this._tables[i];
|
564
|
+
tbl.api.removeRow(at);
|
565
|
+
}
|
566
|
+
}
|
567
|
+
};
|
568
|
+
|
569
|
+
/** @public
|
570
|
+
* @return {number}
|
571
|
+
*/
|
572
|
+
MultiTableManager.prototype.getRowCount = function() {
|
573
|
+
return this.getTable().api.getRowCount();
|
574
|
+
};
|
575
|
+
|
576
|
+
/** @public
|
577
|
+
* @param {*} columnOption String will be treated as field, while object is treated as the column options
|
578
|
+
* @param {number=} idx
|
579
|
+
*/
|
580
|
+
MultiTableManager.prototype.insertColumn = function(columnOption, idx) {
|
581
|
+
if(this._emeraldGrid) {
|
582
|
+
return; // TODO
|
583
|
+
}
|
584
|
+
|
491
585
|
var tableCount = this._tables.length;
|
492
586
|
for(var i = 0; i < tableCount; ++i) {
|
493
587
|
var tbl = this._tables[i];
|
494
|
-
tbl.api.
|
588
|
+
tbl.api.insertColumn(columnOption, idx);
|
589
|
+
}
|
590
|
+
};
|
591
|
+
/** @public
|
592
|
+
* @param {*} colRef Column reference
|
593
|
+
*/
|
594
|
+
MultiTableManager.prototype.removeColumn = function(colRef) {
|
595
|
+
if(this._emeraldGrid) {
|
596
|
+
return; // TODO
|
597
|
+
}
|
598
|
+
var tableCount = this._tables.length;
|
599
|
+
for(var i = 0; i < tableCount; ++i) {
|
600
|
+
var tbl = this._tables[i];
|
601
|
+
tbl.api.removeColumn(colRef);
|
495
602
|
}
|
496
603
|
};
|
497
604
|
|
498
605
|
/** @public
|
499
606
|
* @return {number}
|
500
607
|
*/
|
501
|
-
MultiTableManager.prototype.
|
502
|
-
return this.getTable().api.
|
608
|
+
MultiTableManager.prototype.getColumnCount = function() {
|
609
|
+
return this.getTable().api.getColumnCount();
|
503
610
|
};
|
504
611
|
|
505
612
|
export default MultiTableManager;
|
@@ -27,6 +27,8 @@ declare class NumberFormatter {
|
|
27
27
|
|
28
28
|
public static padDecimalPartWithZeroes(str: string, precision: number): string;
|
29
29
|
|
30
|
+
public static multiplyByHundred(num: number): number;
|
31
|
+
|
30
32
|
public getOptions(options?: any): any;
|
31
33
|
|
32
34
|
public format(origVal: number): string;
|
@@ -13,6 +13,22 @@
|
|
13
13
|
* @property {boolean=} mutiplyBy100=false Alias of multiplyBy100
|
14
14
|
*/
|
15
15
|
|
16
|
+
/** @private
|
17
|
+
* @function
|
18
|
+
* @param {number} num Absolute number
|
19
|
+
* @return {number}
|
20
|
+
*/
|
21
|
+
var _multiplyByHundred = function(num) {
|
22
|
+
var intPart = num | 0;
|
23
|
+
if(intPart && num > intPart) {
|
24
|
+
var str = num + "";
|
25
|
+
var at = str.indexOf(".");
|
26
|
+
var fracStr = str.slice(at + 1) + "00";
|
27
|
+
return +(str.slice(0, at) + fracStr.slice(0, 2) + "." + fracStr.slice(2));
|
28
|
+
}
|
29
|
+
return num * 100;
|
30
|
+
};
|
31
|
+
|
16
32
|
/** NumberFormatter provides a way to format the given number quickly.
|
17
33
|
* @constructor
|
18
34
|
* @param {NumberFormatter~Options=} options
|
@@ -198,6 +214,24 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
|
|
198
214
|
}
|
199
215
|
return str;
|
200
216
|
};
|
217
|
+
/** @public
|
218
|
+
* @function
|
219
|
+
* @param {number} num
|
220
|
+
* @return {number}
|
221
|
+
* @example
|
222
|
+
* NumberFormatter.multiplyByHundred(1); // 1
|
223
|
+
* NumberFormatter.multiplyByHundred(1.1); // 110
|
224
|
+
* NumberFormatter.multiplyByHundred(1.21); // 121
|
225
|
+
* NumberFormatter.multiplyByHundred(1.321); // 132.1
|
226
|
+
* NumberFormatter.multiplyByHundred(-1.4321); // -143.21
|
227
|
+
*/
|
228
|
+
NumberFormatter.multiplyByHundred = function (num) {
|
229
|
+
if(num < 0) {
|
230
|
+
return -(_multiplyByHundred(-num));
|
231
|
+
}
|
232
|
+
return _multiplyByHundred(num);
|
233
|
+
};
|
234
|
+
|
201
235
|
|
202
236
|
/** @public
|
203
237
|
* @param {Object=} options
|
@@ -206,20 +240,28 @@ NumberFormatter.padDecimalPartWithZeroes = function (str, precision) {
|
|
206
240
|
NumberFormatter.prototype.getOptions = function(options) { // serialize
|
207
241
|
if(!options) { options = {}; }
|
208
242
|
|
243
|
+
var formatType = options["formatType"];
|
244
|
+
|
209
245
|
options["precisionEnabled"] = this._precisionEnabled;
|
210
246
|
options["decimalPlaces"] = this._precision;
|
211
247
|
options["plusSign"] = this._plusSignEnabled;
|
212
248
|
options["separator"] = this._separatorEnabled;
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
249
|
+
|
250
|
+
if(formatType === "scaled" || formatType === "scaledvalue") {
|
251
|
+
var su = "";
|
252
|
+
if(this._scaler == "b") {
|
253
|
+
su = "billion";
|
254
|
+
} else if(this._scaler == "m") {
|
255
|
+
su = "million";
|
256
|
+
}
|
257
|
+
options["scalingUnit"] = su;
|
258
|
+
}
|
259
|
+
|
260
|
+
if(formatType === "percent") {
|
261
|
+
options["percentSign"] = this._percentSignEnabled;
|
262
|
+
options["mutiplyBy100"] = this._multiplyBy100Enabled;
|
263
|
+
options["multiplyBy100"] = this._multiplyBy100Enabled;
|
219
264
|
}
|
220
|
-
options["scalingUnit"] = su;
|
221
|
-
options["mutiplyBy100"] = this._multiplyBy100Enabled;
|
222
|
-
options["multiplyBy100"] = this._multiplyBy100Enabled;
|
223
265
|
return options;
|
224
266
|
};
|
225
267
|
|
@@ -240,7 +282,7 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
240
282
|
}
|
241
283
|
}
|
242
284
|
|
243
|
-
//
|
285
|
+
// Simplify logic by making positive value
|
244
286
|
var val, sign;
|
245
287
|
if(origVal >= 0) {
|
246
288
|
val = origVal;
|
@@ -249,14 +291,18 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
249
291
|
val = -origVal;
|
250
292
|
sign = "-";
|
251
293
|
}
|
252
|
-
if(this._multiplyBy100Enabled) {
|
253
|
-
val = val * 100;
|
254
|
-
}
|
255
|
-
var absVal = val;
|
256
294
|
var scalingMode = this._percentFormatEnabled ? "" : this._scaler; // Percent formatting overwrite scaling mode
|
257
295
|
|
258
|
-
|
296
|
+
if(this._multiplyBy100Enabled) {
|
297
|
+
if(this._precisionEnabled || scalingMode) {
|
298
|
+
val = val * 100; // Since value will be rounded later, there is no need to avoid rounding issue
|
299
|
+
} else {
|
300
|
+
val = _multiplyByHundred(val);
|
301
|
+
}
|
302
|
+
}
|
259
303
|
|
304
|
+
var absVal = val;
|
305
|
+
// Perform scaling
|
260
306
|
if (scalingMode) {
|
261
307
|
if (scalingMode === "b" && val < 1e9) {
|
262
308
|
scalingMode = "m";
|
@@ -270,11 +316,8 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
270
316
|
} else if (scalingMode === "b") {
|
271
317
|
val = val / 1e9;
|
272
318
|
}
|
273
|
-
|
274
|
-
if (!this._precisionEnabled) {
|
275
|
-
val = Math.round(val * 100) / 100;
|
276
|
-
}
|
277
319
|
}
|
320
|
+
// Perform rounding
|
278
321
|
if (this._precisionEnabled) {
|
279
322
|
if (this._precision > 0) {
|
280
323
|
var deno = NumberFormatter._denominator[this._precision];
|
@@ -282,6 +325,8 @@ NumberFormatter.prototype.format = function(origVal) {
|
|
282
325
|
} else {
|
283
326
|
val = Math.round(val);
|
284
327
|
}
|
328
|
+
} else if(scalingMode) {
|
329
|
+
val = Math.round(val * 100) / 100;
|
285
330
|
}
|
286
331
|
|
287
332
|
// Convert value to string
|
@@ -12,13 +12,13 @@ declare namespace Perf {
|
|
12
12
|
|
13
13
|
function clearResourceTimings(): void;
|
14
14
|
|
15
|
-
function getEntries(): (PerformanceEntry)[];
|
15
|
+
function getEntries(): (PerformanceEntry)[]|null;
|
16
16
|
|
17
|
-
function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[];
|
17
|
+
function getEntriesByName(entryName: string, entryType?: string): (PerformanceEntry)[]|null;
|
18
18
|
|
19
|
-
function getEntriesByType(entryType: string): (PerformanceEntry)[];
|
19
|
+
function getEntriesByType(entryType: string): (PerformanceEntry)[]|null;
|
20
20
|
|
21
|
-
function getEntry(entryName: string, entryType?: string): PerformanceEntry;
|
21
|
+
function getEntry(entryName: string, entryType?: string): PerformanceEntry|null;
|
22
22
|
|
23
23
|
function mark(markName: string): void;
|
24
24
|
|
@@ -28,7 +28,7 @@ declare class Popup extends EventDispatcher {
|
|
28
28
|
|
29
29
|
public dispose(): void;
|
30
30
|
|
31
|
-
public getElement(): Element;
|
31
|
+
public getElement(): Element|null;
|
32
32
|
|
33
33
|
public appendChild(childElem: Element): void;
|
34
34
|
|
@@ -50,7 +50,7 @@ declare class Popup extends EventDispatcher {
|
|
50
50
|
|
51
51
|
public setPopupGap(gap?: number): void;
|
52
52
|
|
53
|
-
public setParentElement(parentElement: Element): Element;
|
53
|
+
public setParentElement(parentElement: Element): Element|null;
|
54
54
|
|
55
55
|
public show(opt_shown?: boolean, parentElement?: Element): void;
|
56
56
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { injectCss, prettifyCss } from "./Util.js";
|
2
2
|
import { ExpanderIcon } from "./ExpanderIcon.js";
|
3
|
+
import { Icon } from "./Icon.js";
|
3
4
|
|
4
5
|
declare class RowPainter {
|
5
6
|
|
@@ -9,6 +10,8 @@ declare class RowPainter {
|
|
9
10
|
|
10
11
|
public static disableColorTag(grid: any, disabled?: boolean): void;
|
11
12
|
|
13
|
+
public static enableHeaderMenu(grid: any, enabled?: boolean): void;
|
14
|
+
|
12
15
|
public removeHeaderStyle(section: any, columnIndex: number, rowIndex: number): void;
|
13
16
|
|
14
17
|
public applyHeaderStyle(e: any): void;
|