@deephaven/grid 0.6.3-beta.9 → 0.6.3
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/dist/CellInputField.js +1 -1
- package/dist/CellInputField.js.map +1 -1
- package/dist/Grid.d.ts +13 -3
- package/dist/Grid.d.ts.map +1 -1
- package/dist/Grid.js +2 -2
- package/dist/GridMetricCalculator.d.ts +165 -448
- package/dist/GridMetricCalculator.d.ts.map +1 -1
- package/dist/GridMetricCalculator.js +122 -521
- package/dist/GridMetricCalculator.js.map +1 -1
- package/dist/GridRange.d.ts +111 -186
- package/dist/GridRange.d.ts.map +1 -1
- package/dist/GridRange.js +87 -185
- package/dist/GridRange.js.map +1 -1
- package/dist/GridRenderer.js +1 -6
- package/dist/GridRenderer.js.map +1 -1
- package/dist/GridTheme.d.ts +37 -49
- package/dist/GridTheme.d.ts.map +1 -1
- package/dist/GridTheme.js +0 -8
- package/dist/GridTheme.js.map +1 -1
- package/dist/GridUtils.d.ts +97 -236
- package/dist/GridUtils.d.ts.map +1 -1
- package/dist/GridUtils.js +76 -241
- package/dist/GridUtils.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/memoizeClear.js +1 -1
- package/dist/mouse-handlers/GridRowSeparatorMouseHandler.d.ts +1 -1
- package/dist/mouse-handlers/GridRowSeparatorMouseHandler.d.ts.map +1 -1
- package/dist/mouse-handlers/GridSelectionMouseHandler.js +4 -4
- package/dist/mouse-handlers/GridSelectionMouseHandler.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/GridMetrics.d.ts +0 -97
- package/dist/GridMetrics.d.ts.map +0 -1
- package/dist/GridMetrics.js +0 -2
- package/dist/GridMetrics.js.map +0 -1
package/dist/GridTheme.d.ts
CHANGED
|
@@ -1,62 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
export declare type GridColor = string;
|
|
3
|
-
/** A nullable color, eg. pass `null` to skip drawing this item */
|
|
4
|
-
export declare type NullableGridColor = GridColor | null;
|
|
5
|
-
/** One or more colors parsed as CSS color value separated by space, eg. '#FF0000 #00FF00' */
|
|
6
|
-
export declare type GridColorWay = string;
|
|
7
|
-
/** A font parsed as CSS font value */
|
|
8
|
-
export declare type GridFont = string;
|
|
9
|
-
export declare type GridTheme = {
|
|
1
|
+
declare var _default: Readonly<{
|
|
10
2
|
allowColumnResize: boolean;
|
|
11
3
|
allowRowResize: boolean;
|
|
12
4
|
autoSelectRow: boolean;
|
|
13
5
|
autoSelectColumn: boolean;
|
|
14
6
|
autoSizeColumns: boolean;
|
|
15
7
|
autoSizeRows: boolean;
|
|
16
|
-
backgroundColor:
|
|
17
|
-
textColor: GridColor;
|
|
8
|
+
backgroundColor: string;
|
|
18
9
|
cellHorizontalPadding: number;
|
|
19
10
|
headerHorizontalPadding: number;
|
|
20
|
-
font:
|
|
21
|
-
gridColumnColor:
|
|
22
|
-
gridRowColor:
|
|
23
|
-
headerBackgroundColor:
|
|
24
|
-
headerSeparatorColor:
|
|
25
|
-
headerSeparatorHoverColor:
|
|
11
|
+
font: string;
|
|
12
|
+
gridColumnColor: string;
|
|
13
|
+
gridRowColor: string;
|
|
14
|
+
headerBackgroundColor: string;
|
|
15
|
+
headerSeparatorColor: string;
|
|
16
|
+
headerSeparatorHoverColor: string;
|
|
26
17
|
headerSeparatorHandleSize: number;
|
|
27
18
|
headerHiddenSeparatorSize: number;
|
|
28
|
-
headerHiddenSeparatorHoverColor:
|
|
29
|
-
headerColor:
|
|
30
|
-
headerFont:
|
|
31
|
-
columnHoverBackgroundColor:
|
|
32
|
-
selectedColumnHoverBackgroundColor:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
headerHiddenSeparatorHoverColor: string;
|
|
20
|
+
headerColor: string;
|
|
21
|
+
headerFont: string;
|
|
22
|
+
columnHoverBackgroundColor: string;
|
|
23
|
+
selectedColumnHoverBackgroundColor: string;
|
|
24
|
+
rowBackgroundColors: string;
|
|
25
|
+
rowHoverBackgroundColor: string;
|
|
26
|
+
selectedRowHoverBackgroundColor: string;
|
|
36
27
|
minScrollHandleSize: number;
|
|
37
|
-
scrollBarBackgroundColor:
|
|
38
|
-
scrollBarHoverBackgroundColor:
|
|
39
|
-
scrollBarCasingColor:
|
|
40
|
-
scrollBarCornerColor:
|
|
41
|
-
scrollBarColor:
|
|
42
|
-
scrollBarHoverColor:
|
|
43
|
-
scrollBarActiveColor:
|
|
28
|
+
scrollBarBackgroundColor: string;
|
|
29
|
+
scrollBarHoverBackgroundColor: string;
|
|
30
|
+
scrollBarCasingColor: string;
|
|
31
|
+
scrollBarCornerColor: string;
|
|
32
|
+
scrollBarColor: string;
|
|
33
|
+
scrollBarHoverColor: string;
|
|
34
|
+
scrollBarActiveColor: string;
|
|
44
35
|
scrollBarSize: number;
|
|
45
36
|
scrollBarHoverSize: number;
|
|
46
37
|
scrollBarCasingWidth: number;
|
|
47
38
|
scrollSnapToColumn: boolean;
|
|
48
39
|
scrollSnapToRow: boolean;
|
|
49
|
-
selectionColor:
|
|
50
|
-
selectionOutlineColor:
|
|
51
|
-
selectionOutlineCasingColor:
|
|
40
|
+
selectionColor: string;
|
|
41
|
+
selectionOutlineColor: string;
|
|
42
|
+
selectionOutlineCasingColor: string;
|
|
52
43
|
shadowBlur: number;
|
|
53
|
-
shadowColor:
|
|
44
|
+
shadowColor: string;
|
|
45
|
+
textColor: string;
|
|
54
46
|
maxDepth: number;
|
|
55
47
|
treeDepthIndent: number;
|
|
56
48
|
treeHorizontalPadding: number;
|
|
57
|
-
treeLineColor:
|
|
58
|
-
treeMarkerColor:
|
|
59
|
-
treeMarkerHoverColor:
|
|
49
|
+
treeLineColor: string;
|
|
50
|
+
treeMarkerColor: string;
|
|
51
|
+
treeMarkerHoverColor: string;
|
|
60
52
|
rowHeight: number;
|
|
61
53
|
columnWidth: number;
|
|
62
54
|
minRowHeight: number;
|
|
@@ -69,15 +61,11 @@ export declare type GridTheme = {
|
|
|
69
61
|
allowColumnReorder: boolean;
|
|
70
62
|
allowRowReorder: boolean;
|
|
71
63
|
reorderOffset: number;
|
|
72
|
-
floatingGridColumnColor:
|
|
73
|
-
floatingGridRowColor:
|
|
74
|
-
floatingRowBackgroundColors:
|
|
75
|
-
floatingDividerOuterColor:
|
|
76
|
-
floatingDividerInnerColor:
|
|
77
|
-
}
|
|
78
|
-
declare const _default: GridTheme;
|
|
79
|
-
/**
|
|
80
|
-
* Default theme for a Grid.
|
|
81
|
-
*/
|
|
64
|
+
floatingGridColumnColor: string;
|
|
65
|
+
floatingGridRowColor: string;
|
|
66
|
+
floatingRowBackgroundColors: string;
|
|
67
|
+
floatingDividerOuterColor: string;
|
|
68
|
+
floatingDividerInnerColor: string;
|
|
69
|
+
}>;
|
|
82
70
|
export default _default;
|
|
83
71
|
//# sourceMappingURL=GridTheme.d.ts.map
|
package/dist/GridTheme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridTheme.d.ts","sourceRoot":"","sources":["../src/GridTheme.
|
|
1
|
+
{"version":3,"file":"GridTheme.d.ts","sourceRoot":"","sources":["../src/GridTheme.js"],"names":[],"mappings":""}
|
package/dist/GridTheme.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/** A color parsed as CSS color value, eg. '#FF0000' */
|
|
2
|
-
|
|
3
|
-
/** A nullable color, eg. pass `null` to skip drawing this item */
|
|
4
|
-
|
|
5
|
-
/** One or more colors parsed as CSS color value separated by space, eg. '#FF0000 #00FF00' */
|
|
6
|
-
|
|
7
|
-
/** A font parsed as CSS font value */
|
|
8
|
-
|
|
9
1
|
/**
|
|
10
2
|
* Default theme for a Grid.
|
|
11
3
|
*/
|
package/dist/GridTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/GridTheme.ts"],"names":["Object","freeze","allowColumnResize","allowRowResize","autoSelectRow","autoSelectColumn","autoSizeColumns","autoSizeRows","backgroundColor","cellHorizontalPadding","headerHorizontalPadding","font","gridColumnColor","gridRowColor","headerBackgroundColor","headerSeparatorColor","headerSeparatorHoverColor","headerSeparatorHandleSize","headerHiddenSeparatorSize","headerHiddenSeparatorHoverColor","headerColor","headerFont","columnHoverBackgroundColor","selectedColumnHoverBackgroundColor","rowBackgroundColors","rowHoverBackgroundColor","selectedRowHoverBackgroundColor","minScrollHandleSize","scrollBarBackgroundColor","scrollBarHoverBackgroundColor","scrollBarCasingColor","scrollBarCornerColor","scrollBarColor","scrollBarHoverColor","scrollBarActiveColor","scrollBarSize","scrollBarHoverSize","scrollBarCasingWidth","scrollSnapToColumn","scrollSnapToRow","selectionColor","selectionOutlineColor","selectionOutlineCasingColor","shadowBlur","shadowColor","textColor","maxDepth","treeDepthIndent","treeHorizontalPadding","treeLineColor","treeMarkerColor","treeMarkerHoverColor","rowHeight","columnWidth","minRowHeight","minColumnWidth","columnHeaderHeight","rowHeaderWidth","rowFooterWidth","headerResizeSnapThreshold","headerResizeHiddenSnapThreshold","allowColumnReorder","allowRowReorder","reorderOffset","floatingGridColumnColor","floatingGridRowColor","floatingRowBackgroundColors","floatingDividerOuterColor","floatingDividerInnerColor"],"mappings":"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","sourcesContent":["/** A color parsed as CSS color value, eg. '#FF0000' */\nexport type GridColor = string;\n\n/** A nullable color, eg. pass `null` to skip drawing this item */\nexport type NullableGridColor = GridColor | null;\n\n/** One or more colors parsed as CSS color value separated by space, eg. '#FF0000 #00FF00' */\nexport type GridColorWay = string;\n\n/** A font parsed as CSS font value */\nexport type GridFont = string;\n\nexport type GridTheme = {\n // Allow column/row resizing\n allowColumnResize: boolean;\n allowRowResize: boolean;\n\n // Select the full row/column upon selection\n autoSelectRow: boolean;\n autoSelectColumn: boolean;\n\n // Automatically size rows/columns to fit contents\n autoSizeColumns: boolean;\n autoSizeRows: boolean;\n\n // The background color for the whole grid\n backgroundColor: GridColor;\n\n // Color to draw text\n textColor: GridColor;\n\n // Amount of padding within a cell and header\n cellHorizontalPadding: number;\n headerHorizontalPadding: number;\n\n // The font to use in the grid\n font: GridFont;\n\n // Colors to draw grid lines between columns and rows\n gridColumnColor: NullableGridColor;\n gridRowColor: NullableGridColor;\n\n // Colors for drawing the column and row headers\n headerBackgroundColor: GridColor;\n headerSeparatorColor: GridColor;\n headerSeparatorHoverColor: GridColor;\n headerSeparatorHandleSize: number;\n headerHiddenSeparatorSize: number;\n headerHiddenSeparatorHoverColor: GridColor;\n headerColor: GridColor;\n headerFont: GridFont;\n\n // Background color to highlight entire column/row if set\n columnHoverBackgroundColor: NullableGridColor;\n selectedColumnHoverBackgroundColor: NullableGridColor;\n rowHoverBackgroundColor: NullableGridColor;\n selectedRowHoverBackgroundColor: NullableGridColor;\n\n // Background colors to draw for each row, cycling through each value (eg. alternating stripes)\n rowBackgroundColors: GridColorWay;\n\n // Scroll bar look and sizing\n minScrollHandleSize: number;\n scrollBarBackgroundColor: GridColor;\n scrollBarHoverBackgroundColor: GridColor;\n scrollBarCasingColor: GridColor;\n scrollBarCornerColor: GridColor;\n scrollBarColor: GridColor;\n scrollBarHoverColor: GridColor;\n scrollBarActiveColor: GridColor;\n scrollBarSize: number;\n scrollBarHoverSize: number;\n scrollBarCasingWidth: number;\n scrollSnapToColumn: boolean;\n scrollSnapToRow: boolean;\n\n // Look of the current selection\n selectionColor: GridColor;\n selectionOutlineColor: GridColor;\n selectionOutlineCasingColor: GridColor;\n\n // Shadows to draw when representing a hierarchy, eg. when one row is a higher \"depth\" than the row above it\n shadowBlur: number;\n shadowColor: GridColor;\n maxDepth: number; // max depth of the shadowing\n\n // Other tree table metrics\n treeDepthIndent: number;\n treeHorizontalPadding: number;\n treeLineColor: GridColor;\n treeMarkerColor: GridColor;\n treeMarkerHoverColor: GridColor;\n\n // Default row height/column width\n rowHeight: number;\n columnWidth: number;\n minRowHeight: number;\n minColumnWidth: number;\n\n // Default row/column header/footers width/height\n columnHeaderHeight: number;\n rowHeaderWidth: number;\n rowFooterWidth: number;\n\n // When resizing the header, will snap to the auto size of the header within this threshold\n headerResizeSnapThreshold: number;\n headerResizeHiddenSnapThreshold: number;\n\n // Allow moving/reordering columns/rows\n allowColumnReorder: boolean;\n allowRowReorder: boolean;\n\n // The number of pixels to offset a column/row while it is being dragged to move\n reorderOffset: number;\n\n // Colors for the grid in floating sections\n floatingGridColumnColor: GridColor;\n floatingGridRowColor: GridColor;\n\n // Background row colors for grid in the floating sections\n floatingRowBackgroundColors: GridColorWay;\n\n // Divider colors between the floating parts and the grid\n floatingDividerOuterColor: GridColor;\n floatingDividerInnerColor: GridColor;\n};\n\n/**\n * Default theme for a Grid.\n */\nexport default Object.freeze({\n allowColumnResize: true,\n allowRowResize: true,\n autoSelectRow: false, // Select the full row upon selection\n autoSelectColumn: false, // Select the full column upon selection\n autoSizeColumns: true, // Automatically size the columns to fit content\n autoSizeRows: true,\n backgroundColor: '#000000',\n cellHorizontalPadding: 5,\n headerHorizontalPadding: 5,\n font: '12px Arial, sans serif',\n gridColumnColor: '#8f8f8f66',\n gridRowColor: '#8f8f8f66',\n headerBackgroundColor: '#222222',\n headerSeparatorColor: '#000000',\n headerSeparatorHoverColor: '#888888',\n headerSeparatorHandleSize: 5,\n headerHiddenSeparatorSize: 5,\n headerHiddenSeparatorHoverColor: '#8888FF',\n headerColor: '#d5d5d5',\n headerFont: '10px Arial, sans serif',\n columnHoverBackgroundColor: '#444444',\n selectedColumnHoverBackgroundColor: '#494949',\n rowBackgroundColors: '#333333 #222222',\n rowHoverBackgroundColor: '#444444',\n selectedRowHoverBackgroundColor: '#494949',\n minScrollHandleSize: 50,\n scrollBarBackgroundColor: '#111111',\n scrollBarHoverBackgroundColor: '#333333',\n scrollBarCasingColor: '#000000',\n scrollBarCornerColor: '#000000',\n scrollBarColor: '#555555',\n scrollBarHoverColor: '#888888',\n scrollBarActiveColor: '#AAAAAA',\n scrollBarSize: 12,\n scrollBarHoverSize: 16,\n scrollBarCasingWidth: 1,\n scrollSnapToColumn: false,\n scrollSnapToRow: false,\n selectionColor: '#4286f433',\n selectionOutlineColor: '#4286f4',\n selectionOutlineCasingColor: '#222222',\n shadowBlur: 8,\n shadowColor: '#000000',\n textColor: '#ffffff',\n maxDepth: 6,\n treeDepthIndent: 10,\n treeHorizontalPadding: 5,\n treeLineColor: '#888888',\n treeMarkerColor: '#cccccc',\n treeMarkerHoverColor: '#ffffff',\n\n rowHeight: 20,\n columnWidth: 100,\n minRowHeight: 20,\n minColumnWidth: 55,\n columnHeaderHeight: 20,\n rowHeaderWidth: 30,\n rowFooterWidth: 0,\n\n // When resizing the header, will snap to the auto size of the header within this threshold\n headerResizeSnapThreshold: 10,\n headerResizeHiddenSnapThreshold: 8,\n\n allowColumnReorder: true,\n allowRowReorder: true,\n reorderOffset: 2,\n\n // Colors for the grid in floating sections\n floatingGridColumnColor: '#8f8f8f66',\n floatingGridRowColor: '#8f8f8f66',\n\n // Background row colors for grid in the floating sections\n floatingRowBackgroundColors: '#393939 #292929',\n\n // Divider colors between the floating parts and the grid\n floatingDividerOuterColor: '#000000',\n floatingDividerInnerColor: '#cccccc',\n}) as GridTheme;\n"],"file":"GridTheme.js"}
|
|
1
|
+
{"version":3,"sources":["../src/GridTheme.js"],"names":["Object","freeze","allowColumnResize","allowRowResize","autoSelectRow","autoSelectColumn","autoSizeColumns","autoSizeRows","backgroundColor","cellHorizontalPadding","headerHorizontalPadding","font","gridColumnColor","gridRowColor","headerBackgroundColor","headerSeparatorColor","headerSeparatorHoverColor","headerSeparatorHandleSize","headerHiddenSeparatorSize","headerHiddenSeparatorHoverColor","headerColor","headerFont","columnHoverBackgroundColor","selectedColumnHoverBackgroundColor","rowBackgroundColors","rowHoverBackgroundColor","selectedRowHoverBackgroundColor","minScrollHandleSize","scrollBarBackgroundColor","scrollBarHoverBackgroundColor","scrollBarCasingColor","scrollBarCornerColor","scrollBarColor","scrollBarHoverColor","scrollBarActiveColor","scrollBarSize","scrollBarHoverSize","scrollBarCasingWidth","scrollSnapToColumn","scrollSnapToRow","selectionColor","selectionOutlineColor","selectionOutlineCasingColor","shadowBlur","shadowColor","textColor","maxDepth","treeDepthIndent","treeHorizontalPadding","treeLineColor","treeMarkerColor","treeMarkerHoverColor","rowHeight","columnWidth","minRowHeight","minColumnWidth","columnHeaderHeight","rowHeaderWidth","rowFooterWidth","headerResizeSnapThreshold","headerResizeHiddenSnapThreshold","allowColumnReorder","allowRowReorder","reorderOffset","floatingGridColumnColor","floatingGridRowColor","floatingRowBackgroundColors","floatingDividerOuterColor","floatingDividerInnerColor"],"mappings":"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","sourcesContent":["/**\n * Default theme for a Grid.\n */\nexport default Object.freeze({\n allowColumnResize: true,\n allowRowResize: true,\n autoSelectRow: false, // Select the full row upon selection\n autoSelectColumn: false, // Select the full column upon selection\n autoSizeColumns: true, // Automatically size the columns to fit content\n autoSizeRows: true,\n backgroundColor: '#000000',\n cellHorizontalPadding: 5,\n headerHorizontalPadding: 5,\n font: '12px Arial, sans serif',\n gridColumnColor: '#8f8f8f66',\n gridRowColor: '#8f8f8f66',\n headerBackgroundColor: '#222222',\n headerSeparatorColor: '#000000',\n headerSeparatorHoverColor: '#888888',\n headerSeparatorHandleSize: 5,\n headerHiddenSeparatorSize: 5,\n headerHiddenSeparatorHoverColor: '#8888FF',\n headerColor: '#d5d5d5',\n headerFont: '10px Arial, sans serif',\n columnHoverBackgroundColor: '#444444',\n selectedColumnHoverBackgroundColor: '#494949',\n rowBackgroundColors: '#333333 #222222',\n rowHoverBackgroundColor: '#444444',\n selectedRowHoverBackgroundColor: '#494949',\n minScrollHandleSize: 50,\n scrollBarBackgroundColor: '#111111',\n scrollBarHoverBackgroundColor: '#333333',\n scrollBarCasingColor: '#000000',\n scrollBarCornerColor: '#000000',\n scrollBarColor: '#555555',\n scrollBarHoverColor: '#888888',\n scrollBarActiveColor: '#AAAAAA',\n scrollBarSize: 12,\n scrollBarHoverSize: 16,\n scrollBarCasingWidth: 1,\n scrollSnapToColumn: false,\n scrollSnapToRow: false,\n selectionColor: '#4286f433',\n selectionOutlineColor: '#4286f4',\n selectionOutlineCasingColor: '#222222',\n shadowBlur: 8,\n shadowColor: '#000000',\n textColor: '#ffffff',\n maxDepth: 6,\n treeDepthIndent: 10,\n treeHorizontalPadding: 5,\n treeLineColor: '#888888',\n treeMarkerColor: '#cccccc',\n treeMarkerHoverColor: '#ffffff',\n\n rowHeight: 20,\n columnWidth: 100,\n minRowHeight: 20,\n minColumnWidth: 55,\n columnHeaderHeight: 20,\n rowHeaderWidth: 30,\n rowFooterWidth: 0,\n\n // When resizing the header, will snap to the auto size of the header within this threshold\n headerResizeSnapThreshold: 10,\n headerResizeHiddenSnapThreshold: 8,\n\n allowColumnReorder: true,\n allowRowReorder: true,\n reorderOffset: 2,\n\n // Colors for the grid in floating sections\n floatingGridColumnColor: '#8f8f8f66',\n floatingGridRowColor: '#8f8f8f66',\n\n // Background row colors for grid in the floating sections\n floatingRowBackgroundColors: '#393939 #292929',\n\n // Divider colors between the floating parts and the grid\n floatingDividerOuterColor: '#000000',\n floatingDividerInnerColor: '#cccccc',\n});\n"],"file":"GridTheme.js"}
|
package/dist/GridUtils.d.ts
CHANGED
|
@@ -1,302 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
import GridRange, { GridRangeIndex } from './GridRange';
|
|
3
|
-
import { BoxCoordinates, Coordinate, CoordinateMap, VisibleIndex, IndexModelMap, ModelIndex, ModelSizeMap, MoveOperation, SizeMap } from './GridMetrics';
|
|
4
|
-
import type { GridMetrics } from './GridMetrics';
|
|
5
|
-
import { GridTheme } from './GridTheme';
|
|
6
|
-
export declare type AxisRange = [start: VisibleIndex, end: VisibleIndex];
|
|
7
|
-
export declare type GridAxisRange = [start: GridRangeIndex, end: GridRangeIndex];
|
|
8
|
-
export declare type GridPoint = {
|
|
9
|
-
x: Coordinate;
|
|
10
|
-
y: Coordinate;
|
|
11
|
-
column: GridRangeIndex;
|
|
12
|
-
row: GridRangeIndex;
|
|
13
|
-
};
|
|
14
|
-
export declare type IndexCallback<T> = (itemIndex: VisibleIndex) => T | undefined;
|
|
1
|
+
export default GridUtils;
|
|
15
2
|
declare class GridUtils {
|
|
16
3
|
static PIXELS_PER_LINE: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static getGridPointFromXY(x: Coordinate, y: Coordinate, metrics: GridMetrics): GridPoint;
|
|
25
|
-
/**
|
|
26
|
-
* Iterate through each floating item at the start and call a callback, returning the first result
|
|
27
|
-
* @param start The count of floating items at the start
|
|
28
|
-
* @param total The total number of items
|
|
29
|
-
* @param callback Function to call for each item
|
|
30
|
-
* @returns The result from the callback
|
|
31
|
-
*/
|
|
32
|
-
static iterateFloatingStart<T>(start: number, total: number, callback: IndexCallback<T>): T | undefined;
|
|
4
|
+
static getGridPointFromXY(x: any, y: any, metrics: any): {
|
|
5
|
+
x: any;
|
|
6
|
+
y: any;
|
|
7
|
+
row: any;
|
|
8
|
+
column: any;
|
|
9
|
+
};
|
|
10
|
+
static iterateFloatingStart(start: any, total: any, callback: any): any;
|
|
33
11
|
/**
|
|
34
12
|
* Iterate through floating items at the end. Iterates in increasing order.
|
|
35
|
-
* @param end The count of floating items at the end
|
|
36
|
-
* @param total The total number of items
|
|
37
|
-
* @param callback Function to call for each item
|
|
38
|
-
* @returns The result from the callback
|
|
39
13
|
*/
|
|
40
|
-
static iterateFloatingEnd
|
|
14
|
+
static iterateFloatingEnd(end: any, total: any, callback: any): any;
|
|
41
15
|
/**
|
|
42
16
|
* Iterate through all floating items in increasing order, starting with the top items.
|
|
43
|
-
* @param start Count of start floating rows,
|
|
44
|
-
* @param end Count of end floating rows,
|
|
45
|
-
* @param total Total number of items
|
|
46
|
-
* @param callback Callback called for each value, stopping the iterating and returning the value if one is returned
|
|
47
|
-
*/
|
|
48
|
-
static iterateFloating
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
* @param floatingStartCount Number of items floating at the start
|
|
55
|
-
* @param floatingEndCount Number of items floating at the end
|
|
56
|
-
* @param totalCount Total number of items
|
|
57
|
-
* @param callback Callback to call for each item
|
|
58
|
-
* @returns The first result from the callback called, or undefined
|
|
59
|
-
*/
|
|
60
|
-
static iterateAllItems<T>(visibleStart: VisibleIndex, visibleEnd: VisibleIndex, floatingStartCount: number, floatingEndCount: number, totalCount: number, callback: IndexCallback<T>): T | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Check if the coordinate is within the item specified in this dimension
|
|
63
|
-
* @param itemIndex Index of the item to check
|
|
64
|
-
* @param itemCoordinatess Coordinate of all items in this dimension
|
|
65
|
-
* @param itemSizes Size of all items in this dimension
|
|
66
|
-
* @param coordinate The coordinate to check
|
|
67
|
-
* @returns True if the coordinate is within the item specified, false otherwise
|
|
68
|
-
*/
|
|
69
|
-
static isInItem(itemIndex: VisibleIndex, itemCoordinates: CoordinateMap, itemSizes: SizeMap, coordinate: Coordinate): boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Get the Index of the item at the provided offset
|
|
72
|
-
* @param offset Coordinate of the offset to get the item of
|
|
73
|
-
* @param itemCount The total count of items
|
|
74
|
-
* @param floatingStart Count of floating items at the start
|
|
75
|
-
* @param floatingEnd Count of floating items at the end
|
|
76
|
-
* @param items Index of all items
|
|
77
|
-
* @param itemCoordinates The coordinate of each item
|
|
78
|
-
* @param itemSizes The size of each item
|
|
79
|
-
* @returns The item index, or null if no item matches
|
|
80
|
-
*/
|
|
81
|
-
static getItemAtOffset(offset: Coordinate, itemCount: number, floatingStart: number, floatingEnd: number, items: VisibleIndex[], itemCoordinates: CoordinateMap, itemSizes: SizeMap): VisibleIndex | null;
|
|
82
|
-
/**
|
|
83
|
-
* Get the index of the column at the specified x coordinate
|
|
84
|
-
* @param x Coordinate to get the item of
|
|
85
|
-
* @param metrics Grid metrics
|
|
86
|
-
* @returns Index of the column at that coordinate, or null if no column matches
|
|
87
|
-
*/
|
|
88
|
-
static getColumnAtX(x: Coordinate, metrics: GridMetrics): VisibleIndex | null;
|
|
89
|
-
/**
|
|
90
|
-
* Get the index of the row at the specified y coordinate
|
|
91
|
-
* @param y Coordinate to get the item of
|
|
92
|
-
* @param metrics Grid metrics
|
|
93
|
-
* @returns Index of the row at that coordinate, or null if no row matches
|
|
94
|
-
*/
|
|
95
|
-
static getRowAtY(y: Coordinate, metrics: GridMetrics): VisibleIndex | null;
|
|
17
|
+
* @param {number} start Count of start floating rows, eg. floatingTopRowCount
|
|
18
|
+
* @param {number} end Count of end floating rows, eg. floatingBottomRowCount
|
|
19
|
+
* @param {number} total Total number of items
|
|
20
|
+
* @param {(itemIndex:number) => any | undefined} callback Callback called for each value, stopping the iterating and returning the value if one is returned
|
|
21
|
+
*/
|
|
22
|
+
static iterateFloating(start: number, end: number, total: number, callback: (itemIndex: number) => any | undefined): any;
|
|
23
|
+
static iterateAllItems(visibleStart: any, visibleEnd: any, floatingStartCount: any, floatingEndCount: any, totalCount: any, callback: any): any;
|
|
24
|
+
static isInItem(itemIndex: any, itemXs: any, itemSizes: any, x: any): boolean;
|
|
25
|
+
static getItemAtOffset(offset: any, itemCount: any, floatingStart: any, floatingEnd: any, items: any, itemXs: any, itemSizes: any): any;
|
|
26
|
+
static getColumnAtX(x: any, metrics: any): any;
|
|
27
|
+
static getRowAtY(y: any, metrics: any): any;
|
|
96
28
|
/**
|
|
97
29
|
* Iterate backward through the visible items until a shown item is hit
|
|
98
30
|
* @param {Number} startIndex The index to start from
|
|
99
31
|
* @param {Map} modelIndexes The mapping of model indexes
|
|
100
32
|
* @param {Number[]} visibleItems The visible items
|
|
101
33
|
* @param {Map} userSizes The user set sizes
|
|
102
|
-
* @returns Index of the next visible item, or null if no more are visible
|
|
103
34
|
*/
|
|
104
|
-
static getNextShownItem(startIndex:
|
|
35
|
+
static getNextShownItem(startIndex: number, modelIndexes: Map<any, any>, visibleItems: number[], userSizes: Map<any, any>): number | null;
|
|
105
36
|
/**
|
|
106
37
|
* Iterate backward through the visible columns until a shown column is hit
|
|
107
|
-
* @param columnIndex The column index to start iterating backward from
|
|
108
|
-
* @param metrics The GridMetricCalculator metrics
|
|
109
|
-
* @returns Index of the next visible item, or null if no more are visible
|
|
38
|
+
* @param {Number} columnIndex The column index to start iterating backward from
|
|
39
|
+
* @param {GridMetrics} metrics The GridMetricCalculator metrics
|
|
110
40
|
*/
|
|
111
|
-
static getNextShownColumn(startIndex:
|
|
41
|
+
static getNextShownColumn(startIndex: any, metrics: any): number | null;
|
|
112
42
|
/**
|
|
113
43
|
* Iterate backward through the visible rows until a shown row is hit
|
|
114
|
-
* @param rowIndex The row index to start iterating backward from
|
|
115
|
-
* @param metrics The GridMetricCalculator metrics
|
|
116
|
-
* @returns Index of the next visible item, or null if no more are visible
|
|
44
|
+
* @param {Number} rowIndex The row index to start iterating backward from
|
|
45
|
+
* @param {GridMetrics} metrics The GridMetricCalculator metrics
|
|
117
46
|
*/
|
|
118
|
-
static getNextShownRow(startIndex:
|
|
47
|
+
static getNextShownRow(startIndex: any, metrics: any): number | null;
|
|
119
48
|
/**
|
|
120
|
-
* Gets the column index if the x/y
|
|
121
|
-
* @param x Mouse x coordinate
|
|
122
|
-
* @param y Mouse y coordinate
|
|
123
|
-
* @param metrics The
|
|
124
|
-
* @param theme The grid theme with
|
|
125
|
-
* @returns
|
|
49
|
+
* Gets the column index if the x/y coordinated provided are close enough
|
|
50
|
+
* @param {Number} x Mouse x coordinate
|
|
51
|
+
* @param {Number} y Mouse y coordinate
|
|
52
|
+
* @param {GridMetrics} metrics The GridMetricCalculator metrics
|
|
53
|
+
* @param {GridTheme} theme The grid theme with potantial user overrides
|
|
54
|
+
* @returns {Number|null} Column index or null
|
|
126
55
|
*/
|
|
127
|
-
static getColumnSeparatorIndex(x:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
* @param itemIndex Index of the item to check
|
|
131
|
-
* @param visibleSizes Sizes of all visible items
|
|
132
|
-
* @returns True if the item is hidden, false otherwise
|
|
133
|
-
*/
|
|
134
|
-
static isItemHidden(itemIndex: VisibleIndex, visibleSizes: SizeMap): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Check if the column specified is hidden
|
|
137
|
-
* @param columnIndex Index of the column to check
|
|
138
|
-
* @param metrics Grid metrics
|
|
139
|
-
* @returns True if the column is hidden, false otherwise
|
|
140
|
-
*/
|
|
141
|
-
static isColumnHidden(columnIndex: VisibleIndex, metrics: GridMetrics): boolean;
|
|
56
|
+
static getColumnSeparatorIndex(x: number, y: number, metrics: any, theme: any): number | null;
|
|
57
|
+
static isItemHidden(itemIndex: any, visibleSizes: any): boolean;
|
|
58
|
+
static isColumnHidden(columnIndex: any, metrics: any): boolean;
|
|
142
59
|
/**
|
|
143
60
|
* Check if the provided row is a floating row
|
|
144
|
-
* @param row The row index to check
|
|
145
|
-
* @param metrics The grid metrics to check against
|
|
146
|
-
* @returns True if it's a floating row, false otherwise
|
|
61
|
+
* @param {number} row The row index to check
|
|
62
|
+
* @param {GridMetrics} metrics The grid metrics to check against
|
|
147
63
|
*/
|
|
148
|
-
static isFloatingRow(row:
|
|
64
|
+
static isFloatingRow(row: number, metrics: any): boolean;
|
|
149
65
|
/**
|
|
150
66
|
* Check if the provided column is a floating column
|
|
151
|
-
* @param column The column index to check
|
|
152
|
-
* @param metrics The grid metrics to check against
|
|
153
|
-
* @returns True if it's a floating column, false otherwise
|
|
154
|
-
*/
|
|
155
|
-
static isFloatingColumn(column: VisibleIndex, metrics: GridMetrics): boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Get all the items that are hidden under the same Index
|
|
158
|
-
* E.g. If columns are 1, 2, 3, 4, 5, and column 2, 3, 4 are hidden, and we check for item 4, the return will be [2, 3, 4]
|
|
159
|
-
* @param itemIndex Index of the item to start at
|
|
160
|
-
* @param visibleSizes Visible size map
|
|
161
|
-
* @param visibleItems Visible items
|
|
162
|
-
* @returns Array of items that are hidden
|
|
163
|
-
*/
|
|
164
|
-
static getHiddenItems(itemIndex: VisibleIndex, visibleSizes: SizeMap, visibleItems: VisibleIndex[]): VisibleIndex[];
|
|
165
|
-
/**
|
|
166
|
-
* Get all the columns that are hidden under the same Index
|
|
167
|
-
* @param columnIndex Index of the item to start at
|
|
168
|
-
* @param metrics Grid metrics
|
|
169
|
-
* @returns Array of items that are hidden
|
|
67
|
+
* @param {number} column The column index to check
|
|
68
|
+
* @param {GridMetrics} metrics The grid metrics to check against
|
|
170
69
|
*/
|
|
171
|
-
static
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
* @param theme The grid theme
|
|
178
|
-
* @returns Index of the row separator at the coordinates provided, or null if none match
|
|
179
|
-
*/
|
|
180
|
-
static getRowSeparatorIndex(x: Coordinate, y: Coordinate, metrics: GridMetrics, theme: GridTheme): VisibleIndex | null;
|
|
181
|
-
/**
|
|
182
|
-
* Check if the row specified is hidden
|
|
183
|
-
* @param rowIndex Index of the row to check
|
|
184
|
-
* @param metrics Grid metrics
|
|
185
|
-
* @returns True if the row is hidden, false otherwise
|
|
186
|
-
*/
|
|
187
|
-
static isRowHidden(rowIndex: VisibleIndex, metrics: GridMetrics): boolean;
|
|
188
|
-
/**
|
|
189
|
-
* Get all the rows that are hidden under the same Index
|
|
190
|
-
* @param rowIndex Index of the item to start at
|
|
191
|
-
* @param metrics Grid metrics
|
|
192
|
-
* @returns Array of items that are hidden
|
|
193
|
-
*/
|
|
194
|
-
static getHiddenRows(rowIndex: VisibleIndex, metrics: GridMetrics): VisibleIndex[];
|
|
70
|
+
static isFloatingColumn(column: number, metrics: any): boolean;
|
|
71
|
+
static getHiddenItems(itemIndex: any, visibleSizes: any, visibleItems: any): any[];
|
|
72
|
+
static getHiddenColumns(columnIndex: any, metrics: any): any[];
|
|
73
|
+
static getRowSeparatorIndex(x: any, y: any, metrics: any, theme: any): any;
|
|
74
|
+
static isRowHidden(rowIndex: any, metrics: any): boolean;
|
|
75
|
+
static getHiddenRows(rowIndex: any, metrics: any): any[];
|
|
195
76
|
/**
|
|
196
77
|
* Set a new order for items in the grid
|
|
197
|
-
* @param from The visible index to move from
|
|
198
|
-
* @param to The visible index to move the itme to
|
|
199
|
-
* @param oldMovedItems The old reordered items
|
|
200
|
-
* @returns The new reordered items
|
|
78
|
+
* @param {Number} from The visible index to move from
|
|
79
|
+
* @param {Number} to The visible index to move the itme to
|
|
80
|
+
* @param {Array} oldMovedItems The old reordered items
|
|
81
|
+
* @returns {Number} The new reordered items
|
|
201
82
|
*/
|
|
202
|
-
static moveItem(from:
|
|
83
|
+
static moveItem(from: number, to: number, oldMovedItems?: any[]): number;
|
|
203
84
|
/**
|
|
204
85
|
* Retrieve the model index given the currently moved items
|
|
205
|
-
* @param visibleIndex The visible index of the item to get the model index for
|
|
206
|
-
* @param movedItems The moved items
|
|
207
|
-
* @returns The model index of the item
|
|
86
|
+
* @param {Number} visibleIndex The visible index of the item to get the model index for
|
|
87
|
+
* @param {Array} movedItems The moved items
|
|
88
|
+
* @returns {Number} The model index of the item
|
|
208
89
|
*/
|
|
209
|
-
static getModelIndex(visibleIndex:
|
|
90
|
+
static getModelIndex(visibleIndex: number, movedItems?: any[]): number;
|
|
210
91
|
/**
|
|
211
92
|
* Translate the provided UI start/end indexes to the model start/end indexes by applying the `movedItems` transformations.
|
|
212
93
|
* Since moved items can split apart a range, multiple pairs of indexes are returned
|
|
213
94
|
*
|
|
214
|
-
* @param start Start item in one dimension
|
|
215
|
-
* @param end End item in one dimension
|
|
216
|
-
* @param movedItems Moved item pairs in this dimension
|
|
217
|
-
* @returns Array of start/end pairs of the indexes after transformations applied.
|
|
95
|
+
* @param {number} start Start item in one dimension
|
|
96
|
+
* @param {number} end End item in one dimension
|
|
97
|
+
* @param {MovedItem[]} movedItems Moved item pairs in this dimension
|
|
98
|
+
* @returns {AxisRange[]} Array of start/end pairs of the indexes after transformations applied.
|
|
218
99
|
*/
|
|
219
|
-
static getModelRangeIndexes(start:
|
|
100
|
+
static getModelRangeIndexes(start: number, end: number, movedItems: any[]): any[];
|
|
220
101
|
/**
|
|
221
102
|
* Translate the provided UI range into model range, using the `movedColumns` and `movedRows` to apply the necessary transforms.
|
|
222
103
|
* `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items
|
|
223
104
|
*
|
|
224
|
-
* @param uiRange The currently selected UI ranges
|
|
225
|
-
* @param movedColumns The moved column pairs
|
|
226
|
-
* @param movedRows The moved row pairs
|
|
227
|
-
* @returns The model ranges after translation.
|
|
105
|
+
* @param {GridRange} uiRange The currently selected UI ranges
|
|
106
|
+
* @param {Array} movedColumns The moved column pairs
|
|
107
|
+
* @param {Array} movedRows The moved row pairs
|
|
108
|
+
* @returns {GridRange[]} The model ranges after translation.
|
|
228
109
|
*/
|
|
229
|
-
static getModelRange(uiRange: GridRange, movedColumns?:
|
|
110
|
+
static getModelRange(uiRange: GridRange, movedColumns?: any[], movedRows?: any[]): GridRange[];
|
|
230
111
|
/**
|
|
231
112
|
* Translate the provided UI range into model ranges, using the `movedColumns` and `movedRows` to apply the necessary transforms.
|
|
232
113
|
* `movedColumns` and `movedRows` are array of operations done to the UI indexes to re-order items
|
|
233
114
|
*
|
|
234
|
-
* @param uiRanges The currently selected UI ranges
|
|
235
|
-
* @param movedColumns The moved column pairs
|
|
236
|
-
* @param movedRows The moved row pairs
|
|
237
|
-
* @returns The model ranges after translation.
|
|
115
|
+
* @param {GridRange[]} uiRanges The currently selected UI ranges
|
|
116
|
+
* @param {Array} movedColumns The moved column pairs
|
|
117
|
+
* @param {Array} movedRows The moved row pairs
|
|
118
|
+
* @returns {GridRange[]} The model ranges after translation.
|
|
238
119
|
*/
|
|
239
|
-
static getModelRanges(uiRanges: GridRange[], movedColumns?:
|
|
120
|
+
static getModelRanges(uiRanges: GridRange[], movedColumns?: any[], movedRows?: any[]): GridRange[];
|
|
240
121
|
/**
|
|
241
122
|
* Retrieve the visible index given the currently moved items
|
|
242
|
-
* @param modelIndex The model index to get the visible index for
|
|
243
|
-
* @param movedItems Moved items
|
|
244
|
-
* @returns The visible index of the item
|
|
245
|
-
*/
|
|
246
|
-
static getVisibleIndex(modelIndex: ModelIndex, movedItems?: MoveOperation[]): VisibleIndex;
|
|
247
|
-
/**
|
|
248
|
-
* Check if the current platform is Mac
|
|
249
|
-
* @returns True if this platform is a Mac, false otherwise
|
|
123
|
+
* @param {Number} modelIndex The model index to get the visible index for
|
|
124
|
+
* @param {Array} movedItems Moved items
|
|
125
|
+
* @returns {Number} The visible index of the item
|
|
250
126
|
*/
|
|
127
|
+
static getVisibleIndex(modelIndex: number, movedItems?: any[]): number;
|
|
251
128
|
static isMacPlatform(): boolean;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
static getModifierKey(): 'metaKey' | 'ctrlKey';
|
|
257
|
-
/**
|
|
258
|
-
* Check if the modifier key is down for the given event
|
|
259
|
-
* @param event The event to check
|
|
260
|
-
* @returns True if the modifier key is down, false otherwise
|
|
261
|
-
*/
|
|
262
|
-
static isModifierKeyDown(event: MouseEvent | KeyboardEvent | React.KeyboardEvent | React.MouseEvent): boolean;
|
|
263
|
-
/**
|
|
264
|
-
* Check if the user has hidden the specified column
|
|
265
|
-
* @param modelIndex The model index to check
|
|
266
|
-
* @param userColumnWidths The user set column widths
|
|
267
|
-
* @returns True if the user has hidden the column
|
|
268
|
-
*/
|
|
269
|
-
static checkColumnHidden(modelIndex: ModelIndex, userColumnWidths: ModelSizeMap): boolean;
|
|
270
|
-
/**
|
|
271
|
-
* Check if all the columns specified are hidden
|
|
272
|
-
* @param columns Columns to check
|
|
273
|
-
* @param userColumnWidths The user set column widths
|
|
274
|
-
* @returns True if the user has hidden all of the columns
|
|
275
|
-
*/
|
|
276
|
-
static checkAllColumnsHidden(columns: ModelIndex[], userColumnWidths: ModelSizeMap): boolean;
|
|
129
|
+
static getModifierKey(): "metaKey" | "ctrlKey";
|
|
130
|
+
static isModifierKeyDown(event: any): any;
|
|
131
|
+
static checkColumnHidden(modelIndex: any, userColumnWidths: any): boolean;
|
|
132
|
+
static checkAllColumnsHidden(columns: any, userColumnWidths: any): any;
|
|
277
133
|
/**
|
|
278
134
|
* Get the bounds the mouse needs to be dragged outside of from an initial selection before scrolling occurs.
|
|
279
135
|
* Taking into account any floating rows that may be covering the viewport.
|
|
280
|
-
* @param metrics Grid metrics
|
|
281
|
-
* @param row The row they started dragging in
|
|
282
|
-
* @param column The column they started the drag from
|
|
136
|
+
* @param {GridMetrics} metrics Grid metrics
|
|
137
|
+
* @param {number} row The row they started dragging in
|
|
138
|
+
* @param {number} column The column they started the drag from
|
|
283
139
|
* @returns Dimensions of the drag area in relation to the canvas they need to drag outside of to start scrolling
|
|
284
140
|
*/
|
|
285
|
-
static getScrollDragBounds(metrics:
|
|
141
|
+
static getScrollDragBounds(metrics: any, row: number, column: number): {
|
|
142
|
+
x: any;
|
|
143
|
+
y: any;
|
|
144
|
+
x2: any;
|
|
145
|
+
y2: any;
|
|
146
|
+
};
|
|
286
147
|
/**
|
|
287
148
|
* Converts the delta coordinates from the provided wheel event to pixels
|
|
288
149
|
* Different platforms have different ways of providing the delta so this normalizes it
|
|
289
|
-
* @param wheelEvent The mouse wheel event to get the scrolling delta for
|
|
290
|
-
* @param pageWidth The width of the page that is scrolling
|
|
291
|
-
* @param pageHeight The height of the page that is scrolling
|
|
292
|
-
* @param lineWidth The width of the line scrolling in line mode
|
|
293
|
-
* @param lineHeight The height of the line scrolling in line mode
|
|
294
|
-
* @returns The delta coordinates normalized to pixels
|
|
295
|
-
*/
|
|
296
|
-
static getScrollDelta(wheelEvent: WheelEvent, pageWidth?: number, pageHeight?: number, lineWidth?: number, lineHeight?: number): {
|
|
150
|
+
* @param {WheelEvent} wheelEvent The mouse wheel event to get the scrolling delta for
|
|
151
|
+
* @param {number?} pageWidth The width of the page that is scrolling
|
|
152
|
+
* @param {number?} pageHeight The height of the page that is scrolling
|
|
153
|
+
* @param {number?} lineWidth The width of the line scrolling in line mode
|
|
154
|
+
* @param {number?} lineHeight The height of the line scrolling in line mode
|
|
155
|
+
* @returns {{deltaX:number, deltaY: number}} The delta coordinates normalized to pixels
|
|
156
|
+
*/
|
|
157
|
+
static getScrollDelta(wheelEvent: WheelEvent, pageWidth?: number | null, pageHeight?: number | null, lineWidth?: number | null, lineHeight?: number | null): {
|
|
297
158
|
deltaX: number;
|
|
298
159
|
deltaY: number;
|
|
299
160
|
};
|
|
300
161
|
}
|
|
301
|
-
|
|
162
|
+
import GridRange from "./GridRange";
|
|
302
163
|
//# sourceMappingURL=GridUtils.d.ts.map
|
package/dist/GridUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridUtils.d.ts","sourceRoot":"","sources":["../src/GridUtils.
|
|
1
|
+
{"version":3,"file":"GridUtils.d.ts","sourceRoot":"","sources":["../src/GridUtils.js"],"names":[],"mappings":";AAEA;IAGE,+BAAiC;IAEjC;;;;;MAKC;IAED,wEASC;IAED;;OAEG;IACH,oEASC;IAED;;;;;;OAMG;IACH,8BALW,MAAM,OACN,MAAM,SACN,MAAM,wBACK,MAAM,KAAK,GAAG,GAAG,SAAS,OAQ/C;IAED,gJA+BC;IAED,8EAIC;IAED,wIAgCC;IAED,+CAwBC;IAED,4CAwBC;IAED;;;;;;OAMG;IACH,uFAHW,QAAQ,2CAkBlB;IAED;;;;OAIG;IACH,wEAQC;IAED;;;;OAIG;IACH,qEAQC;IAED;;;;;;;OAOG;IACH,gFAFa,SAAO,IAAI,CAqFvB;IAED,gEAEC;IAED,+DAGC;IAED;;;;OAIG;IACH,0BAHW,MAAM,yBAYhB;IAED;;;;OAIG;IACH,gCAHW,MAAM,yBAiBhB;IAED,mFAmBC;IAED,+DAOC;IAGD,2EAgDC;IAED,yDAGC;IAED,yDAGC;IAED;;;;;;OAMG;IACH,yEAoBC;IAED;;;;;OAKG;IACH,uEAeC;IAED;;;;;;;;OAQG;IACH,mCALW,MAAM,OACN,MAAM,cACN,KAAW,GACT,KAAW,CA4EvB;IAED;;;;;;;;OAQG;IACH,8BALW,SAAS,4CAGP,SAAS,EAAE,CAsBvB;IAED;;;;;;;;OAQG;IACH,gCALW,SAAS,EAAE,4CAGT,SAAS,EAAE,CAUvB;IAED;;;;;OAKG;IACH,uEAqBC;IAED,gCAGC;IAED,+CAMC;IAED,0CAGC;IAED,0EAEC;IAED,uEAKC;IAED;;;;;;;OAOG;IACH,8CAJW,MAAM,UACN,MAAM;;;;;MA0ChB;IAED;;;;;;;;;OASG;IACH,kCAPW,UAAU,cACV,MAAM,sBACN,MAAM,qBACN,MAAM,sBACN,MAAM;gBACI,MAAM;gBAAU,MAAM;MAoD1C;CACF"}
|