@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
@@ -5,13 +5,22 @@ import Reverter from "./util/Reverter.js";
|
|
5
5
|
import ILayoutGrid from "./ILayoutGrid.js";
|
6
6
|
import LayoutGrid from "./LayoutGrid.js";
|
7
7
|
import ElementWrapper from "./components/ElementWrapper.js";
|
8
|
+
import HScrollbar from "./components/HScrollbar.js";
|
8
9
|
|
9
10
|
declare class VirtualizedLayoutGrid extends ElementWrapper {
|
10
11
|
|
11
|
-
constructor(
|
12
|
+
constructor(options?: any);
|
12
13
|
|
13
14
|
public getContextRow(rowIndex: number): any;
|
14
15
|
|
16
|
+
public selectColumn(colIndex: number, selected?: boolean): void;
|
17
|
+
|
18
|
+
public isSelectedColumn(colIndex: number): boolean;
|
19
|
+
|
20
|
+
public selectCell(colIndex: number, rowIndex: number, selected?: boolean): void;
|
21
|
+
|
22
|
+
public setCellBounds(colIndex: number, rowIndex: number, width: number, height: number): void;
|
23
|
+
|
15
24
|
}
|
16
25
|
|
17
26
|
export default VirtualizedLayoutGrid;
|
@@ -6,23 +6,47 @@ import Reverter from "./util/Reverter.js";
|
|
6
6
|
import ILayoutGrid from "./ILayoutGrid.js";
|
7
7
|
import LayoutGrid from "./LayoutGrid.js";
|
8
8
|
import ElementWrapper from "./components/ElementWrapper.js";
|
9
|
+
import HScrollbar from "./components/HScrollbar.js";
|
9
10
|
/* eslint-enable */
|
10
11
|
|
12
|
+
|
13
|
+
/** @private
|
14
|
+
* @function
|
15
|
+
* @param {number} idx
|
16
|
+
* @param {number} limit
|
17
|
+
* @return {number}
|
18
|
+
*/
|
19
|
+
var _validateIndex = function(idx, limit) {
|
20
|
+
if(idx > limit) {
|
21
|
+
return limit;
|
22
|
+
} else if(idx < 0) {
|
23
|
+
return 0;
|
24
|
+
}
|
25
|
+
return idx;
|
26
|
+
};
|
27
|
+
|
11
28
|
/** @constructor
|
12
29
|
* @ignore
|
13
|
-
* @param {
|
14
|
-
* @param {string=} opt_className
|
30
|
+
* @param {Object=} options
|
15
31
|
* @extends {ElementWrapper}
|
16
32
|
*/
|
17
|
-
var VirtualizedLayoutGrid = function (
|
33
|
+
var VirtualizedLayoutGrid = function (options) {
|
18
34
|
var _t = this;
|
19
35
|
_t._onRestingPosition = _t._onRestingPosition.bind(_t);
|
36
|
+
_t._updateRowBounds = _t._updateRowBounds.bind(_t);
|
20
37
|
|
21
|
-
_t._element =
|
22
|
-
_t._element.className = "tr-vlg";
|
23
|
-
if(opt_className) { _t.enableClass(/** @type{string} */(opt_className), true); }
|
38
|
+
_t._element = document.createElement("div");
|
39
|
+
_t._element.className = "tr-vlg section";
|
24
40
|
|
25
|
-
|
41
|
+
if(!options) {
|
42
|
+
options = {};
|
43
|
+
}
|
44
|
+
if(options["horizontalScrollbar"]) {
|
45
|
+
_t._hscrollbar = options["horizontalScrollbar"];
|
46
|
+
}
|
47
|
+
options["owner"] = this;
|
48
|
+
|
49
|
+
_t._grid = new LayoutGrid(options);
|
26
50
|
_t._grid.setParent(_t._element);
|
27
51
|
|
28
52
|
_t._layoutY = new TrackLayout();
|
@@ -37,19 +61,18 @@ var VirtualizedLayoutGrid = function (opt_initializer, opt_className) {
|
|
37
61
|
Ext.inherits(VirtualizedLayoutGrid, ElementWrapper);
|
38
62
|
|
39
63
|
|
40
|
-
/**
|
64
|
+
/**
|
41
65
|
* @private
|
42
66
|
* @type {number}
|
43
67
|
*/
|
44
68
|
VirtualizedLayoutGrid.prototype._index = -1;
|
45
69
|
|
46
|
-
/**
|
70
|
+
/** Number of rows offsetting from the first section
|
47
71
|
* @private
|
48
72
|
* @type {number}
|
49
73
|
*/
|
50
|
-
VirtualizedLayoutGrid.prototype.
|
51
|
-
|
52
|
-
/**
|
74
|
+
VirtualizedLayoutGrid.prototype._rowOffset = 0;
|
75
|
+
/** For virtualization in Y-Axis
|
53
76
|
* @private
|
54
77
|
* @type {number}
|
55
78
|
*/
|
@@ -71,9 +94,53 @@ VirtualizedLayoutGrid.prototype._layoutY;
|
|
71
94
|
VirtualizedLayoutGrid.prototype._selectionList = null;
|
72
95
|
|
73
96
|
/** @type {Reverter}
|
74
|
-
|
75
|
-
|
97
|
+
* @private
|
98
|
+
*/
|
76
99
|
VirtualizedLayoutGrid.prototype._reverter = null;
|
100
|
+
/** @type {Element}
|
101
|
+
* @private
|
102
|
+
*/
|
103
|
+
VirtualizedLayoutGrid.prototype._rowBound = null;
|
104
|
+
/** @type {Element}
|
105
|
+
* @private
|
106
|
+
*/
|
107
|
+
VirtualizedLayoutGrid.prototype._cellBound = null;
|
108
|
+
/** @type {number}
|
109
|
+
* @private
|
110
|
+
*/
|
111
|
+
VirtualizedLayoutGrid.prototype._cbLftIdx = 0;
|
112
|
+
/** @type {number}
|
113
|
+
* @private
|
114
|
+
*/
|
115
|
+
VirtualizedLayoutGrid.prototype._cbRgtIdx = 0;
|
116
|
+
/** @type {number}
|
117
|
+
* @private
|
118
|
+
*/
|
119
|
+
VirtualizedLayoutGrid.prototype._cbTopIdx = 0;
|
120
|
+
/** @type {number}
|
121
|
+
* @private
|
122
|
+
*/
|
123
|
+
VirtualizedLayoutGrid.prototype._cbBtmIdx = 0;
|
124
|
+
/** @type {number}
|
125
|
+
* @private
|
126
|
+
*/
|
127
|
+
VirtualizedLayoutGrid.prototype._rowBoundTimer = 0;
|
128
|
+
/** @type {Element}
|
129
|
+
* @private
|
130
|
+
*/
|
131
|
+
VirtualizedLayoutGrid.prototype._boundLayer = null;
|
132
|
+
/** @type {HScrollbar}
|
133
|
+
* @private
|
134
|
+
*/
|
135
|
+
VirtualizedLayoutGrid.prototype._hscrollbar = null;
|
136
|
+
/** @type {string}
|
137
|
+
* @private
|
138
|
+
*/
|
139
|
+
VirtualizedLayoutGrid.prototype._session = "A";
|
140
|
+
/** @type {Array<boolean>}
|
141
|
+
* @private
|
142
|
+
*/
|
143
|
+
VirtualizedLayoutGrid.prototype._tempRowHeights = null;
|
77
144
|
|
78
145
|
//#region ====== Override ElementWrapper ======//
|
79
146
|
/** @override */
|
@@ -95,9 +162,14 @@ VirtualizedLayoutGrid.prototype.dispose = function () {
|
|
95
162
|
this.setRowCount(0); // Fire rowCountChanged
|
96
163
|
this.unlistenAll();
|
97
164
|
|
165
|
+
this._hscrollbar = null;
|
98
166
|
this._grid.dispose();
|
99
167
|
this._dispose();
|
100
168
|
this._reverter.dispose();
|
169
|
+
if(this._rowBoundTimer) {
|
170
|
+
clearTimeout(this._rowBoundTimer);
|
171
|
+
this._rowBoundTimer = 0;
|
172
|
+
}
|
101
173
|
};
|
102
174
|
/** @override */
|
103
175
|
VirtualizedLayoutGrid.prototype.setWidth = function (px) {
|
@@ -180,16 +252,72 @@ VirtualizedLayoutGrid.prototype._setColumnWidth = function (indexX, val) {
|
|
180
252
|
VirtualizedLayoutGrid.prototype._updateColumnLayout = function () {
|
181
253
|
this._grid._updateColumnLayout();
|
182
254
|
};
|
255
|
+
/** @public
|
256
|
+
* @ignore
|
257
|
+
* @param {boolean} enabled
|
258
|
+
*/
|
259
|
+
VirtualizedLayoutGrid.prototype._startBindingSession = function (enabled) {
|
260
|
+
this._isBinding = enabled;
|
261
|
+
if(!enabled){
|
262
|
+
// Clear old session
|
263
|
+
if(this._tempRowHeights){
|
264
|
+
var defaultRowHeight = this.getDefaultRowHeight();
|
265
|
+
var hasSession = true;
|
266
|
+
var removedIndices = [];
|
267
|
+
|
268
|
+
for(var key in this._tempRowHeights){
|
269
|
+
var index = +key;
|
270
|
+
var rowSession = this._layoutY.getLaneProperty(index, "sizeSession");
|
271
|
+
if(rowSession) {
|
272
|
+
if(rowSession != this._session){
|
273
|
+
this.setRowHeight(index, defaultRowHeight);
|
274
|
+
this._layoutY.setLaneProperty(index, "sizeSession", null);
|
275
|
+
removedIndices.push(index);
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}
|
279
|
+
var removedCount = removedIndices.length;
|
280
|
+
for(var i = 0; i < removedCount; i++){
|
281
|
+
delete this._tempRowHeights[removedIndices[i]];
|
282
|
+
}
|
283
|
+
if(removedCount){
|
284
|
+
for(var remainingKey in this._tempRowHeights){
|
285
|
+
hasSession = remainingKey != null;
|
286
|
+
break;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
if(!hasSession){
|
290
|
+
this._tempRowHeights = null;
|
291
|
+
}
|
183
292
|
|
293
|
+
}
|
294
|
+
this._session = this._session === "A" ? "B" : "A";
|
295
|
+
}
|
296
|
+
};
|
297
|
+
/** @public
|
298
|
+
* @ignore
|
299
|
+
* @return {Array<boolean>}
|
300
|
+
*/
|
301
|
+
VirtualizedLayoutGrid.prototype._getTempRowHeights = function () {
|
302
|
+
return this._tempRowHeights;
|
303
|
+
};
|
184
304
|
/** @inheritDoc */
|
185
305
|
VirtualizedLayoutGrid.prototype.getRowHeight = function (index) {
|
186
306
|
return this._layoutY.getLaneSize(index);
|
187
307
|
};
|
188
308
|
/** @inheritDoc */
|
189
309
|
VirtualizedLayoutGrid.prototype.setRowHeight = function (index, val) {
|
310
|
+
if(this._isBinding && val != this.getDefaultRowHeight()){
|
311
|
+
this._layoutY.setLaneProperty(index, "sizeSession", this._session);
|
312
|
+
if(!this._tempRowHeights){
|
313
|
+
this._tempRowHeights = [];
|
314
|
+
}
|
315
|
+
this._tempRowHeights[index] = true; // Store row index that set temporary row height
|
316
|
+
}
|
190
317
|
if(this._layoutY.setLaneSize(index, val)) {
|
191
318
|
this._grid.setRowHeight(index - this._firstIndex, val);
|
192
319
|
this._element.style.height = this._layoutY.getTrackSize() + "px";
|
320
|
+
this._requestUpdatingRowBounds();
|
193
321
|
return this._dispatchRowHeightChangedEvent(index, index + 1);
|
194
322
|
}
|
195
323
|
return false;
|
@@ -339,7 +467,11 @@ VirtualizedLayoutGrid.prototype.setRowCount = function (val, noBinding) {
|
|
339
467
|
var prevCount = this._layoutY.getLaneCount();
|
340
468
|
if(prevCount !== val){
|
341
469
|
this._layoutY.setLaneCount(val);
|
470
|
+
if(this._tempRowHeights){
|
471
|
+
this._tempRowHeights.length = val;
|
472
|
+
}
|
342
473
|
this._element.style.height = this._layoutY.getTrackSize() + "px";
|
474
|
+
this._requestUpdatingRowBounds();
|
343
475
|
//After rowCountChanged fires, virtualizer will update virtual row count if
|
344
476
|
//the range of virtual layout changed.
|
345
477
|
this._dispatch("rowCountChanged", { "rowCount": val, "prevCount": prevCount, "noBinding": noBinding });
|
@@ -481,24 +613,33 @@ VirtualizedLayoutGrid.prototype.isSelectedRow = function (at) {
|
|
481
613
|
VirtualizedLayoutGrid.prototype.setSelectedRow = function (rowIndex, opt_selected) {
|
482
614
|
this._selectionList.setSelection(rowIndex, opt_selected);
|
483
615
|
|
484
|
-
var
|
485
|
-
this._grid.setSelectedRow(
|
616
|
+
var selected = this._selectionList.getSelection(rowIndex);
|
617
|
+
this._grid.setSelectedRow(rowIndex - this._firstIndex, selected);
|
618
|
+
|
619
|
+
if(selected) {
|
620
|
+
this._initRowBounds();
|
621
|
+
}
|
622
|
+
this._updateRowBounds();
|
486
623
|
};
|
487
624
|
|
488
625
|
/** @inheritDoc */
|
489
626
|
VirtualizedLayoutGrid.prototype.selectSingleRow = function (rowIndex) {
|
490
|
-
this.
|
627
|
+
this._selectionList.clearAllSelections();
|
628
|
+
this._grid.clearSelectedRows();
|
491
629
|
this.setSelectedRow(rowIndex);
|
492
630
|
};
|
493
631
|
/** @inheritDoc */
|
494
632
|
VirtualizedLayoutGrid.prototype.selectRowRange = function (rowIndex, length) {
|
495
633
|
this._selectionList.selectRange(rowIndex, length);
|
496
634
|
this._updateRowSelection();
|
635
|
+
this._initRowBounds();
|
636
|
+
this._updateRowBounds();
|
497
637
|
};
|
498
638
|
/** @inheritDoc */
|
499
639
|
VirtualizedLayoutGrid.prototype.clearSelectedRows = function () {
|
500
640
|
var count = this._selectionList.clearAllSelections();
|
501
641
|
this._grid.clearSelectedRows();
|
642
|
+
this._updateRowBounds();
|
502
643
|
return count;
|
503
644
|
};
|
504
645
|
/** @inheritDoc */
|
@@ -698,8 +839,12 @@ VirtualizedLayoutGrid.prototype.getRowOffset = function(){
|
|
698
839
|
return this._rowOffset;
|
699
840
|
};
|
700
841
|
|
701
|
-
/** @
|
702
|
-
|
842
|
+
/** @public
|
843
|
+
* @ignore
|
844
|
+
*/
|
845
|
+
VirtualizedLayoutGrid.prototype.updateLayout = function () {
|
846
|
+
this._grid.updateLayout();
|
847
|
+
};
|
703
848
|
|
704
849
|
/** {@link ILayoutGrid#stretchCell}
|
705
850
|
* @inheritDoc */
|
@@ -722,8 +867,8 @@ VirtualizedLayoutGrid.prototype.unstretchCell = function (cellRef, rowIndex) {
|
|
722
867
|
};
|
723
868
|
/** {@link ILayoutGrid#unstretchAllCells}
|
724
869
|
* @inheritDoc */
|
725
|
-
VirtualizedLayoutGrid.prototype.unstretchAllCells = function (
|
726
|
-
|
870
|
+
VirtualizedLayoutGrid.prototype.unstretchAllCells = function () {
|
871
|
+
this._grid.unstretchAllCells();
|
727
872
|
};
|
728
873
|
|
729
874
|
/** {@link ILayoutGrid#getStretchedCell}
|
@@ -803,6 +948,220 @@ VirtualizedLayoutGrid.prototype.setRowAttributes = function (rowIndex, func) {
|
|
803
948
|
VirtualizedLayoutGrid.prototype.getContextRow = function (rowIndex) {
|
804
949
|
return this._grid.getContextRow(rowIndex - this._firstIndex);
|
805
950
|
};
|
951
|
+
|
952
|
+
/** @public
|
953
|
+
* @param {number} colIndex
|
954
|
+
* @param {boolean=} selected
|
955
|
+
*/
|
956
|
+
VirtualizedLayoutGrid.prototype.selectColumn = function (colIndex, selected) {
|
957
|
+
this._grid.selectColumn(colIndex, selected);
|
958
|
+
};
|
959
|
+
/** @public
|
960
|
+
* @param {number} colIndex
|
961
|
+
* @return {boolean}
|
962
|
+
*/
|
963
|
+
VirtualizedLayoutGrid.prototype.isSelectedColumn = function (colIndex) {
|
964
|
+
return this._grid.isSelectedColumn(colIndex);
|
965
|
+
};
|
966
|
+
/** @public
|
967
|
+
* @param {number} colIndex
|
968
|
+
* @param {number} rowIndex
|
969
|
+
* @param {boolean=} selected
|
970
|
+
*/
|
971
|
+
VirtualizedLayoutGrid.prototype.selectCell = function (colIndex, rowIndex, selected) {
|
972
|
+
this._grid.selectCell(colIndex, rowIndex - this._firstIndex, selected);
|
973
|
+
};
|
974
|
+
/** @public
|
975
|
+
* @param {number} colIndex
|
976
|
+
* @param {number} rowIndex
|
977
|
+
* @param {number} width
|
978
|
+
* @param {number} height
|
979
|
+
*/
|
980
|
+
VirtualizedLayoutGrid.prototype.setCellBounds = function (colIndex, rowIndex, width, height) {
|
981
|
+
var cellBound = this._cellBound;
|
982
|
+
if(!cellBound) {
|
983
|
+
cellBound = this._cellBound = document.createElement("div");
|
984
|
+
cellBound.className = "selection-bound";
|
985
|
+
}
|
986
|
+
this._initBoundLayer();
|
987
|
+
|
988
|
+
// Validate inputs
|
989
|
+
var rgtIndex = colIndex + width; // Exclusive
|
990
|
+
var btmIndex = rowIndex + height; // Exclusive
|
991
|
+
|
992
|
+
var colCount = this.getColumnCount();
|
993
|
+
var rowCount = this._layoutY.getLaneCount();
|
994
|
+
|
995
|
+
this._cbLftIdx = _validateIndex(colIndex, colCount);
|
996
|
+
this._cbRgtIdx = _validateIndex(rgtIndex, colCount);
|
997
|
+
this._cbTopIdx = _validateIndex(rowIndex, rowCount);
|
998
|
+
this._cbBtmIdx = _validateIndex(btmIndex, rowCount);
|
999
|
+
|
1000
|
+
this._updateCellBounds();
|
1001
|
+
};
|
1002
|
+
/** @public
|
1003
|
+
* @ignore
|
1004
|
+
* @return {!TrackLayout}
|
1005
|
+
*/
|
1006
|
+
VirtualizedLayoutGrid.prototype.getHorizontalLayout = function () {
|
1007
|
+
return this._grid.getHorizontalLayout();
|
1008
|
+
};
|
1009
|
+
/** @public
|
1010
|
+
* @ignore
|
1011
|
+
* @param {number} lftIdx
|
1012
|
+
* @param {number} rgtIdx Inclusive index
|
1013
|
+
* @param {!Array.<number>} outPositions
|
1014
|
+
* @param {!Array.<boolean>} outNoBorders
|
1015
|
+
*/
|
1016
|
+
VirtualizedLayoutGrid.prototype.calculateColumnBounds = function (lftIdx, rgtIdx, outPositions, outNoBorders) {
|
1017
|
+
this._grid.calculateColumnBounds(lftIdx, rgtIdx, outPositions, outNoBorders);
|
1018
|
+
};
|
1019
|
+
/** @private
|
1020
|
+
*/
|
1021
|
+
VirtualizedLayoutGrid.prototype._updateCellBounds = function () {
|
1022
|
+
var cellBound = this._cellBound;
|
1023
|
+
if(!cellBound) {
|
1024
|
+
return;
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
var layoutX = this.getHorizontalLayout();
|
1028
|
+
var layoutY = this._layoutY;
|
1029
|
+
var lftIdx = this._cbLftIdx;
|
1030
|
+
var rgtIdx = this._cbRgtIdx; // Exclusive
|
1031
|
+
var topIdx = this._cbTopIdx;
|
1032
|
+
var btmIdx = this._cbBtmIdx; // Exclusive
|
1033
|
+
var lftPx, rgtPx, topPx, btmPx;
|
1034
|
+
lftPx = rgtPx = topPx = btmPx = 0;
|
1035
|
+
if(lftIdx < rgtIdx && topIdx < btmIdx) {
|
1036
|
+
lftPx = layoutX.getLaneStart(lftIdx);
|
1037
|
+
rgtPx = layoutX.getLaneEnd(rgtIdx - 1);
|
1038
|
+
topPx = layoutY.getLaneStart(topIdx);
|
1039
|
+
btmPx = layoutY.getLaneEnd(btmIdx - 1);
|
1040
|
+
}
|
1041
|
+
|
1042
|
+
var width = rgtPx - lftPx;
|
1043
|
+
var height = btmPx - topPx;
|
1044
|
+
var noBorders = [false, false];
|
1045
|
+
if(width > 0 && height > 0 && this._hscrollbar) {
|
1046
|
+
var positions = [0, 0];
|
1047
|
+
this.calculateColumnBounds(lftIdx, rgtIdx - 1, positions, noBorders);
|
1048
|
+
lftPx = positions[0];
|
1049
|
+
rgtPx = positions[1];
|
1050
|
+
width = rgtPx - lftPx;
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
if(width > 0) {
|
1054
|
+
cellBound.style.left = lftPx + "px";
|
1055
|
+
cellBound.style.top = topPx + "px";
|
1056
|
+
cellBound.style.width = width + "px";
|
1057
|
+
cellBound.style.height = height + "px";
|
1058
|
+
|
1059
|
+
cellBound.classList.toggle("no-left-bound", noBorders[0]);
|
1060
|
+
cellBound.classList.toggle("no-right-bound", noBorders[1]);
|
1061
|
+
|
1062
|
+
if(this._boundLayer) {
|
1063
|
+
this._boundLayer.appendChild(cellBound);
|
1064
|
+
}
|
1065
|
+
} else {
|
1066
|
+
var pn = cellBound.parentNode;
|
1067
|
+
if(pn) {
|
1068
|
+
pn.removeChild(cellBound);
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
};
|
1072
|
+
/** @public
|
1073
|
+
* @ignore
|
1074
|
+
* @param {!Array.<number>} positions Left and right bound positions in pixel
|
1075
|
+
* @param {!Array.<boolean>} noBorders Boolean values indicating existence of left and right CSS borders
|
1076
|
+
*/
|
1077
|
+
VirtualizedLayoutGrid.prototype.updateColumnBounds = function (positions, noBorders) {
|
1078
|
+
this._grid.updateColumnBounds(positions, noBorders);
|
1079
|
+
this._updateRowBounds();
|
1080
|
+
};
|
1081
|
+
/** @private
|
1082
|
+
*/
|
1083
|
+
VirtualizedLayoutGrid.prototype._initBoundLayer = function () {
|
1084
|
+
var boundLayer = this._boundLayer;
|
1085
|
+
if(!boundLayer) {
|
1086
|
+
boundLayer = this._boundLayer = document.createElement("div");
|
1087
|
+
boundLayer.className = "cover-layer";
|
1088
|
+
this._element.appendChild(boundLayer);
|
1089
|
+
}
|
1090
|
+
};
|
1091
|
+
/** @private
|
1092
|
+
*/
|
1093
|
+
VirtualizedLayoutGrid.prototype._initRowBounds = function () {
|
1094
|
+
var rowBound = this._rowBound;
|
1095
|
+
if(!rowBound) {
|
1096
|
+
rowBound = this._rowBound = document.createElement("div");
|
1097
|
+
rowBound.className = "selection-bound";
|
1098
|
+
}
|
1099
|
+
this._initBoundLayer();
|
1100
|
+
};
|
1101
|
+
/** @private
|
1102
|
+
*/
|
1103
|
+
VirtualizedLayoutGrid.prototype._requestUpdatingRowBounds = function () {
|
1104
|
+
if(!this._rowBoundTimer) {
|
1105
|
+
this._rowBoundTimer = setTimeout(this._updateRowBounds, 10);
|
1106
|
+
}
|
1107
|
+
};
|
1108
|
+
/** @private
|
1109
|
+
*/
|
1110
|
+
VirtualizedLayoutGrid.prototype._updateRowBounds = function () {
|
1111
|
+
this._rowBoundTimer = 0;
|
1112
|
+
this._updateCellBounds();
|
1113
|
+
|
1114
|
+
var rowBound = this._rowBound;
|
1115
|
+
if(!rowBound) {
|
1116
|
+
return;
|
1117
|
+
}
|
1118
|
+
var topIdx = this.getFirstSelectedRow();
|
1119
|
+
var btmIdx = -1; // Inclusive
|
1120
|
+
var topPx = 0;
|
1121
|
+
var btmPx = 0;
|
1122
|
+
var rowCount = this._layoutY.getLaneCount();
|
1123
|
+
if(topIdx >= rowCount) {
|
1124
|
+
topIdx = rowCount - 1;
|
1125
|
+
}
|
1126
|
+
if(topIdx >= 0) {
|
1127
|
+
btmIdx = this.getLastSelectedRow();
|
1128
|
+
if(btmIdx >= rowCount) {
|
1129
|
+
btmIdx = rowCount - 1;
|
1130
|
+
}
|
1131
|
+
topPx = this._layoutY.getLaneStart(topIdx);
|
1132
|
+
btmPx = this._layoutY.getLaneEnd(btmIdx);
|
1133
|
+
}
|
1134
|
+
|
1135
|
+
if(topPx >= btmPx) {
|
1136
|
+
var pn = rowBound.parentNode;
|
1137
|
+
if(pn) {
|
1138
|
+
pn.removeChild(rowBound);
|
1139
|
+
}
|
1140
|
+
} else {
|
1141
|
+
rowBound.style.top = topPx + "px";
|
1142
|
+
rowBound.style.height = (btmPx - topPx) + "px";
|
1143
|
+
|
1144
|
+
var boundWidth = this._grid._getViewSize();
|
1145
|
+
rowBound.style.width = boundWidth + "px";
|
1146
|
+
|
1147
|
+
var scrollLeft = 0;
|
1148
|
+
var pinnedLftCount = 0;
|
1149
|
+
var pinnedRgtCount = 0;
|
1150
|
+
var endOfScroll = false;
|
1151
|
+
if(this._hscrollbar) {
|
1152
|
+
scrollLeft = this._hscrollbar.getScrollLeft();
|
1153
|
+
pinnedLftCount = this._hscrollbar.getPinnedLeftColumnCount();
|
1154
|
+
pinnedRgtCount = this._hscrollbar.getPinnedRightColumnCount();
|
1155
|
+
endOfScroll = this._hscrollbar.isEndOfHorizontalScroll();
|
1156
|
+
}
|
1157
|
+
rowBound.classList.toggle("no-left-bound", !pinnedLftCount && scrollLeft > 0);
|
1158
|
+
rowBound.classList.toggle("no-right-bound", !pinnedRgtCount && !endOfScroll);
|
1159
|
+
|
1160
|
+
if(this._boundLayer) {
|
1161
|
+
this._boundLayer.appendChild(rowBound);
|
1162
|
+
}
|
1163
|
+
}
|
1164
|
+
};
|
806
1165
|
//#endregion public methods
|
807
1166
|
|
808
1167
|
//#region ====== Private methods ======//
|
@@ -873,10 +1232,9 @@ VirtualizedLayoutGrid.prototype._onRestingPosition = function () {
|
|
873
1232
|
};
|
874
1233
|
/** @public
|
875
1234
|
* @ignore
|
876
|
-
* @param {boolean} absolutePos if true, the right space element will be positioned absolutely
|
877
1235
|
*/
|
878
|
-
VirtualizedLayoutGrid.prototype._updateRightSpaceStyle = function(
|
879
|
-
this._grid._updateRightSpaceStyle(
|
1236
|
+
VirtualizedLayoutGrid.prototype._updateRightSpaceStyle = function() {
|
1237
|
+
this._grid._updateRightSpaceStyle();
|
880
1238
|
};
|
881
1239
|
/** @public
|
882
1240
|
* @ignore
|
@@ -10,11 +10,11 @@ declare class Cell extends ElementWrapper {
|
|
10
10
|
|
11
11
|
public setTextContent(str: string): void;
|
12
12
|
|
13
|
-
public getTextElement(): Element;
|
13
|
+
public getTextElement(): Element|null;
|
14
14
|
|
15
15
|
public hasElement(): boolean;
|
16
16
|
|
17
|
-
public getSection(): ILayoutGrid;
|
17
|
+
public getSection(): ILayoutGrid|null;
|
18
18
|
|
19
19
|
public initialize(): Element;
|
20
20
|
|
@@ -34,11 +34,11 @@ declare class Cell extends ElementWrapper {
|
|
34
34
|
|
35
35
|
public insertFloatingIcon(elem: Element, opt_order?: number): void;
|
36
36
|
|
37
|
-
public removeFloatingIcon(elemRef: Element|string): Element|null;
|
37
|
+
public removeFloatingIcon(elemRef: Element|string): Element|null|null;
|
38
38
|
|
39
39
|
public insertFrontIcon(elem: Element, opt_order?: number): void;
|
40
40
|
|
41
|
-
public removeFrontIcon(elemRef: Element|string): Element|null;
|
41
|
+
public removeFrontIcon(elemRef: Element|string): Element|null|null;
|
42
42
|
|
43
43
|
public updatePadding(): void;
|
44
44
|
|
@@ -9,7 +9,7 @@ declare class CellFloatingPanel extends ElementWrapper {
|
|
9
9
|
|
10
10
|
public insertItem(item: Element, opt_order?: number): void;
|
11
11
|
|
12
|
-
public removeItem(elemRef?: (Element|string)): Element|null;
|
12
|
+
public removeItem(elemRef?: (Element|string)): Element|null|null;
|
13
13
|
|
14
14
|
public clearItems(): void;
|
15
15
|
|
@@ -8,19 +8,19 @@ declare class CellSpans {
|
|
8
8
|
|
9
9
|
public shiftColumn(from: number, amount: number): boolean;
|
10
10
|
|
11
|
-
public removeSpan(indexX: number, indexY: number): CellSpan;
|
11
|
+
public removeSpan(indexX: number, indexY: number): CellSpan|null;
|
12
12
|
|
13
|
-
public removeSpanByColIndex(at: number, opt_ary?: (CellSpan)[]): (CellSpan)[];
|
13
|
+
public removeSpanByColIndex(at: number, opt_ary?: (CellSpan)[]): (CellSpan)[]|null;
|
14
14
|
|
15
|
-
public removeSpanStartedFromRowIndex(at: number, opt_ary?: (CellSpan)[]): (CellSpan)[];
|
15
|
+
public removeSpanStartedFromRowIndex(at: number, opt_ary?: (CellSpan)[]): (CellSpan)[]|null;
|
16
16
|
|
17
|
-
public clearAllSpans(): (CellSpan)[];
|
17
|
+
public clearAllSpans(): (CellSpan)[]|null;
|
18
18
|
|
19
19
|
public hasSpan(): boolean;
|
20
20
|
|
21
|
-
public getSpan(indexX: number, indexY: number): CellSpan|null;
|
21
|
+
public getSpan(indexX: number, indexY: number): CellSpan|null|null;
|
22
22
|
|
23
|
-
public getOccupyingSpan(indexX: number, indexY: number): CellSpan|null;
|
23
|
+
public getOccupyingSpan(indexX: number, indexY: number): CellSpan|null|null;
|
24
24
|
|
25
25
|
public getAllSpans(): (CellSpan)[];
|
26
26
|
|
@@ -28,9 +28,9 @@ declare class CellSpans {
|
|
28
28
|
|
29
29
|
public getRowSpan(indexX: number, indexY: number): number;
|
30
30
|
|
31
|
-
public setColSpan(indexX: number, indexY: number, spanVal: number): CellSpan;
|
31
|
+
public setColSpan(indexX: number, indexY: number, spanVal: number): CellSpan|null;
|
32
32
|
|
33
|
-
public setRowSpan(indexX: number, indexY: number, spanVal: number): CellSpan;
|
33
|
+
public setRowSpan(indexX: number, indexY: number, spanVal: number): CellSpan|null;
|
34
34
|
|
35
35
|
}
|
36
36
|
|
@@ -178,10 +178,16 @@ Column.prototype.show = function (opt_shown) {
|
|
178
178
|
*/
|
179
179
|
Column.prototype.setWidth = function (val) {
|
180
180
|
this._element.style.width = val + "px";
|
181
|
-
var magnitude =
|
182
|
-
if(
|
181
|
+
var magnitude = 0;
|
182
|
+
if(val > 0 && val <= 24){
|
183
183
|
magnitude = 3;
|
184
184
|
}
|
185
|
+
else if(val > 24 && val <= 40){
|
186
|
+
magnitude = 2;
|
187
|
+
}
|
188
|
+
else if(val > 40 && val < 60){
|
189
|
+
magnitude = 1;
|
190
|
+
}
|
185
191
|
|
186
192
|
var i;
|
187
193
|
var sc = this._sizeClasses;
|
@@ -7,11 +7,11 @@ declare class ElementWrapper extends EventDispatcher {
|
|
7
7
|
|
8
8
|
constructor(opt_element?: Element);
|
9
9
|
|
10
|
-
public getContent(opt_allContent?: boolean): Element|Node|NodeList;
|
10
|
+
public getContent(opt_allContent?: boolean): Element|Node|NodeList|null;
|
11
11
|
|
12
|
-
public setContent(content: string|Element|ElementWrapper|any, opt_tooltip?: string): Element;
|
12
|
+
public setContent(content: string|Element|ElementWrapper|any, opt_tooltip?: string): Element|null;
|
13
13
|
|
14
|
-
public addContent(content: Element|Node|ElementWrapper): Element;
|
14
|
+
public addContent(content: Element|Node|ElementWrapper): Element|null;
|
15
15
|
|
16
16
|
public removeContent(content: Element|Node|ElementWrapper): boolean;
|
17
17
|
|
@@ -23,11 +23,11 @@ declare class ElementWrapper extends EventDispatcher {
|
|
23
23
|
|
24
24
|
public dispose(): void;
|
25
25
|
|
26
|
-
public getElement(): Element;
|
26
|
+
public getElement(): Element|null;
|
27
27
|
|
28
|
-
public getNextSibling(): Element|Node;
|
28
|
+
public getNextSibling(): Element|Node|null;
|
29
29
|
|
30
|
-
public getParent(): Element|Node;
|
30
|
+
public getParent(): Element|Node|null;
|
31
31
|
|
32
32
|
public setParent(parent: ElementWrapper|Element|Node, opt_prepend?: boolean): void;
|
33
33
|
|
@@ -8,6 +8,10 @@ declare class HScrollbar extends Scrollbar {
|
|
8
8
|
|
9
9
|
public setScrollLeft(px: number): void;
|
10
10
|
|
11
|
+
public getPinnedLeftColumnCount(): number;
|
12
|
+
|
13
|
+
public getPinnedRightColumnCount(): number;
|
14
|
+
|
11
15
|
public isEndOfHorizontalScroll(): boolean;
|
12
16
|
|
13
17
|
public getContentWidth(): number;
|