@deephaven/grid 1.30.1-plotly-v4.888ad98.0.sha-888ad98 → 1.30.1
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/GridRenderer.d.ts.map +1 -1
- package/dist/GridRenderer.js +3 -1
- package/dist/GridRenderer.js.map +1 -1
- package/dist/mouse-handlers/GridSeparatorMouseHandler.d.ts +8 -4
- package/dist/mouse-handlers/GridSeparatorMouseHandler.d.ts.map +1 -1
- package/dist/mouse-handlers/GridSeparatorMouseHandler.js +46 -24
- package/dist/mouse-handlers/GridSeparatorMouseHandler.js.map +1 -1
- package/package.json +3 -3
|
@@ -22,14 +22,14 @@ export interface GridSeparator {
|
|
|
22
22
|
depth: number;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Abstract class that should be extended for column/row
|
|
25
|
+
* Abstract class that should be extended for column/row behavior
|
|
26
26
|
* Override the necessary functions/properties
|
|
27
27
|
*/
|
|
28
28
|
declare abstract class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
29
29
|
protected draggingIndex?: VisibleIndex;
|
|
30
30
|
protected resizingItems: VisibleIndex[];
|
|
31
31
|
protected hiddenItems: VisibleIndex[];
|
|
32
|
-
protected targetSizes: Map<
|
|
32
|
+
protected targetSizes: Map<VisibleIndex, number>;
|
|
33
33
|
protected dragOffset: number;
|
|
34
34
|
abstract hiddenCursor: string;
|
|
35
35
|
abstract defaultCursor: string;
|
|
@@ -55,8 +55,12 @@ declare abstract class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
55
55
|
onUp(gridPoint: GridPoint, grid: Grid): EventHandlerResult;
|
|
56
56
|
onDoubleClick(gridPoint: GridPoint, grid: Grid): EventHandlerResult;
|
|
57
57
|
updateCursor(metrics: GridMetrics, itemIndex: VisibleIndex): void;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Record the size the item should snap back to while dragging.
|
|
60
|
+
* @returns False if the item has no metrics to derive a target size from
|
|
61
|
+
*/
|
|
62
|
+
addTargetSize(metrics: GridMetrics, itemIndex: VisibleIndex): boolean;
|
|
63
|
+
removeTargetSize(itemIndex: VisibleIndex): void;
|
|
60
64
|
}
|
|
61
65
|
export default GridSeparatorMouseHandler;
|
|
62
66
|
//# sourceMappingURL=GridSeparatorMouseHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridSeparatorMouseHandler.d.ts","sourceRoot":"","sources":["../../src/mouse-handlers/GridSeparatorMouseHandler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,CAAC;AACtC,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AACrE,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG,iBAAiB,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAC9E,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AACrE,MAAM,MAAM,sBAAsB,GAC9B,sBAAsB,GACtB,wBAAwB,CAAC;AAC7B,MAAM,MAAM,mBAAmB,GAAG,mBAAmB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EAAE,YAAY,GAAG,IAAI;IAajE;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO;IAkBrE,gBAAgB,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI;CAGhD;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -4,7 +4,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
4
4
|
import { getOrThrow } from '@deephaven/utils';
|
|
5
5
|
import GridMouseHandler from "../GridMouseHandler.js"; // The different properties that can be used by implementing classes, whether for rows or columns
|
|
6
6
|
/**
|
|
7
|
-
* Abstract class that should be extended for column/row
|
|
7
|
+
* Abstract class that should be extended for column/row behavior
|
|
8
8
|
* Override the necessary functions/properties
|
|
9
9
|
*/
|
|
10
10
|
class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
@@ -16,7 +16,8 @@ class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
16
16
|
_defineProperty(this, "resizingItems", []);
|
|
17
17
|
// Columns that were hidden under the separator when starting a drag
|
|
18
18
|
_defineProperty(this, "hiddenItems", []);
|
|
19
|
-
// The target width of the
|
|
19
|
+
// The target width of the items being resized. Keyed by visible index so the
|
|
20
|
+
// sizes survive the items scrolling out of the metrics mid-drag.
|
|
20
21
|
_defineProperty(this, "targetSizes", new Map());
|
|
21
22
|
_defineProperty(this, "dragOffset", 0);
|
|
22
23
|
} // Override/Implement these properties/functions
|
|
@@ -76,10 +77,13 @@ class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
76
77
|
// Use a loop as we may need to resize multiple items if they drag quickly
|
|
77
78
|
var resizeIndex = this.resizingItems[this.resizingItems.length - 1];
|
|
78
79
|
while (resizeIndex != null) {
|
|
79
|
-
var itemOffset =
|
|
80
|
+
var itemOffset = visibleOffsets.get(resizeIndex);
|
|
81
|
+
var _modelIndex = modelIndexes.get(resizeIndex);
|
|
82
|
+
if (itemOffset == null || _modelIndex == null) {
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
80
85
|
var itemSize = point - margin - itemOffset - this.dragOffset;
|
|
81
|
-
var
|
|
82
|
-
var targetSize = this.targetSizes.get(_modelIndex);
|
|
86
|
+
var targetSize = this.targetSizes.get(resizeIndex);
|
|
83
87
|
var isResizingMultiple = this.resizingItems.length > 1;
|
|
84
88
|
var hiddenIndex = this.hiddenItems.indexOf(resizeIndex);
|
|
85
89
|
var calculatedSize = calculatedSizes.get(_modelIndex);
|
|
@@ -88,7 +92,7 @@ class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
88
92
|
}
|
|
89
93
|
var newSize = itemSize;
|
|
90
94
|
if (calculatedSize != null && Math.abs(itemSize - calculatedSize) <= theme.headerResizeSnapThreshold) {
|
|
91
|
-
// Snapping
|
|
95
|
+
// Snapping behavior to "natural" width
|
|
92
96
|
newSize = calculatedSize;
|
|
93
97
|
} else if (targetSize !== undefined && itemSize > targetSize && (isResizingMultiple && hiddenIndex !== 0 || hiddenIndex > 0)) {
|
|
94
98
|
newSize = targetSize;
|
|
@@ -101,25 +105,33 @@ class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
101
105
|
if (hiddenIndex >= 0 && isResizingMultiple) {
|
|
102
106
|
var _this$targetSizes$get;
|
|
103
107
|
this.resizingItems.pop();
|
|
104
|
-
this.removeTargetSize(
|
|
108
|
+
this.removeTargetSize(resizeIndex);
|
|
105
109
|
resizeIndex = this.resizingItems[this.resizingItems.length - 1];
|
|
106
|
-
this.dragOffset -= (_this$targetSizes$get = this.targetSizes.get(
|
|
110
|
+
this.dragOffset -= (_this$targetSizes$get = this.targetSizes.get(resizeIndex)) !== null && _this$targetSizes$get !== void 0 ? _this$targetSizes$get : 0;
|
|
107
111
|
} else {
|
|
108
|
-
|
|
109
|
-
if
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
var nextIndex = this.getNextShownItem(resizeIndex, metrics);
|
|
113
|
+
// Only take on another item if its target size is known, otherwise
|
|
114
|
+
// the drag offset can't be unwound when dragging back the other way
|
|
115
|
+
if (nextIndex !== null && this.addTargetSize(metrics, nextIndex)) {
|
|
116
|
+
this.resizingItems.push(nextIndex);
|
|
117
|
+
resizeIndex = nextIndex;
|
|
118
|
+
} else {
|
|
119
|
+
resizeIndex = null;
|
|
112
120
|
}
|
|
113
121
|
}
|
|
114
122
|
} else if (targetSize !== undefined && itemSize > targetSize + theme.headerResizeSnapThreshold && newSize === targetSize) {
|
|
115
123
|
if (hiddenIndex > 0) {
|
|
116
|
-
this.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
var _nextIndex = this.hiddenItems[hiddenIndex - 1];
|
|
125
|
+
if (this.addTargetSize(metrics, _nextIndex)) {
|
|
126
|
+
this.dragOffset += newSize;
|
|
127
|
+
this.resizingItems.push(_nextIndex);
|
|
128
|
+
resizeIndex = _nextIndex;
|
|
129
|
+
} else {
|
|
130
|
+
resizeIndex = null;
|
|
131
|
+
}
|
|
120
132
|
} else if (isResizingMultiple) {
|
|
121
133
|
this.resizingItems.pop();
|
|
122
|
-
this.removeTargetSize(
|
|
134
|
+
this.removeTargetSize(resizeIndex);
|
|
123
135
|
resizeIndex = this.resizingItems[this.resizingItems.length - 1];
|
|
124
136
|
} else {
|
|
125
137
|
resizeIndex = null;
|
|
@@ -168,30 +180,40 @@ class GridSeparatorMouseHandler extends GridMouseHandler {
|
|
|
168
180
|
}
|
|
169
181
|
updateCursor(metrics, itemIndex) {
|
|
170
182
|
var visibleSizes = metrics[this.visibleSizesProperty];
|
|
171
|
-
var itemSize =
|
|
183
|
+
var itemSize = visibleSizes.get(itemIndex);
|
|
184
|
+
if (itemSize == null) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
172
187
|
if (itemSize === 0) {
|
|
173
188
|
this.cursor = this.hiddenCursor;
|
|
174
189
|
} else {
|
|
175
190
|
this.cursor = this.defaultCursor;
|
|
176
191
|
}
|
|
177
192
|
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Record the size the item should snap back to while dragging.
|
|
196
|
+
* @returns False if the item has no metrics to derive a target size from
|
|
197
|
+
*/
|
|
178
198
|
addTargetSize(metrics, itemIndex) {
|
|
179
199
|
var modelIndexes = metrics[this.modelIndexesProperty];
|
|
180
200
|
var userSizes = metrics[this.userSizesProperty];
|
|
181
201
|
var calculatedSizes = metrics[this.calculatedSizesProperty];
|
|
182
202
|
var treePadding = itemIndex === 0 ? metrics[this.treePaddingProperty] : 0;
|
|
183
|
-
var modelIndex =
|
|
203
|
+
var modelIndex = modelIndexes.get(itemIndex);
|
|
204
|
+
if (modelIndex == null) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
184
207
|
var targetSize = userSizes.get(modelIndex);
|
|
185
208
|
if (targetSize == null || targetSize === 0) {
|
|
186
209
|
var _calculatedSizes$get;
|
|
187
210
|
targetSize = ((_calculatedSizes$get = calculatedSizes.get(modelIndex)) !== null && _calculatedSizes$get !== void 0 ? _calculatedSizes$get : 0) + treePadding;
|
|
188
211
|
}
|
|
189
|
-
this.targetSizes.set(
|
|
212
|
+
this.targetSizes.set(itemIndex, targetSize);
|
|
213
|
+
return true;
|
|
190
214
|
}
|
|
191
|
-
removeTargetSize(
|
|
192
|
-
|
|
193
|
-
var modelIndex = getOrThrow(modelIndexes, itemIndex);
|
|
194
|
-
this.targetSizes.delete(modelIndex);
|
|
215
|
+
removeTargetSize(itemIndex) {
|
|
216
|
+
this.targetSizes.delete(itemIndex);
|
|
195
217
|
}
|
|
196
218
|
}
|
|
197
219
|
export default GridSeparatorMouseHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridSeparatorMouseHandler.js","names":["getOrThrow","GridMouseHandler","GridSeparatorMouseHandler","constructor","arguments","_defineProperty","Map","onDown","gridPoint","grid","metrics","model","props","theme","getTheme","Error","separator","getSeparator","separatorIndex","index","dragOffset","draggingIndex","resizingItems","hiddenItems","getHiddenItems","reverse","targetSizes","clear","addTargetSize","updateCursor","updateSeparator","onMove","onDrag","point","pointProperty","metricCalculator","visibleOffsets","visibleOffsetProperty","margin","marginProperty","calculatedSizes","calculatedSizesProperty","modelIndexes","modelIndexesProperty","firstIndex","firstIndexProperty","treePadding","treePaddingProperty","newSizes","resizeIndex","length","itemOffset","itemSize","modelIndex","targetSize","get","isResizingMultiple","hiddenIndex","indexOf","calculatedSize","newSize","Math","abs","headerResizeSnapThreshold","undefined","headerResizeHiddenSnapThreshold","set","_this$targetSizes$get","pop","removeTargetSize","getNextShownItem","push","forEach","_metricCalculator$thi","defaultSize","initialSizesProperty","resetSize","setSize","onUp","onDoubleClick","forceUpdate","itemIndex","visibleSizes","visibleSizesProperty","cursor","hiddenCursor","defaultCursor","userSizes","userSizesProperty","_calculatedSizes$get","delete"],"sources":["../../src/mouse-handlers/GridSeparatorMouseHandler.ts"],"sourcesContent":["import { getOrThrow } from '@deephaven/utils';\nimport type Grid from '../Grid';\nimport type { GridMetricCalculator } from '../GridMetricCalculator';\nimport type GridModel from '../GridModel';\nimport { type EventHandlerResult } from '../EventHandlerResult';\nimport { type ModelIndex, type VisibleIndex } from '../GridMetrics';\nimport type GridMetrics from '../GridMetrics';\nimport GridMouseHandler from '../GridMouseHandler';\nimport type { GridTheme } from '../GridTheme';\nimport type { GridPoint } from '../GridUtils';\n\n// The different properties that can be used by implementing classes, whether for rows or columns\nexport type PointProperty = 'x' | 'y';\nexport type UserSizeProperty = 'userRowHeights' | 'userColumnWidths';\nexport type VisibleOffsetProperty = 'visibleRowYs' | 'visibleColumnXs';\nexport type VisibleSizeProperty = 'visibleRowHeights' | 'visibleColumnWidths';\nexport type MarginProperty = 'columnHeaderHeight' | 'rowHeaderWidth';\nexport type CalculatedSizeProperty =\n | 'calculatedRowHeights'\n | 'calculatedColumnWidths';\nexport type InitialSizeProperty = 'initialRowHeights' | 'initialColumnWidths';\nexport type ModelIndexesProperty = 'modelRows' | 'modelColumns';\nexport type FirstIndexProperty = 'firstRow' | 'firstColumn';\nexport type TreePaddingProperty = 'treePaddingX' | 'treePaddingY';\nexport interface GridSeparator {\n index: VisibleIndex;\n depth: number;\n}\n\n/**\n * Abstract class that should be extended for column/row behaviour\n * Override the necessary functions/properties\n */\nabstract class GridSeparatorMouseHandler extends GridMouseHandler {\n // The index where dragging the column separator started\n protected draggingIndex?: VisibleIndex;\n\n // The columns in the order they're being resized\n protected resizingItems: VisibleIndex[] = [];\n\n // Columns that were hidden under the separator when starting a drag\n protected hiddenItems: VisibleIndex[] = [];\n\n // The target width of the columns being resized\n protected targetSizes: Map<ModelIndex, number> = new Map();\n\n protected dragOffset = 0;\n\n // Override/Implement these properties/functions\n abstract hiddenCursor: string;\n\n abstract defaultCursor: string;\n\n abstract pointProperty: PointProperty;\n\n abstract userSizesProperty: UserSizeProperty;\n\n abstract visibleOffsetProperty: VisibleOffsetProperty;\n\n abstract visibleSizesProperty: VisibleSizeProperty;\n\n abstract marginProperty: MarginProperty;\n\n abstract calculatedSizesProperty: CalculatedSizeProperty;\n\n abstract initialSizesProperty: InitialSizeProperty;\n\n abstract modelIndexesProperty: ModelIndexesProperty;\n\n abstract firstIndexProperty: FirstIndexProperty;\n\n abstract treePaddingProperty: TreePaddingProperty;\n\n abstract getHiddenItems(\n itemIndex: VisibleIndex,\n metrics: GridMetrics\n ): VisibleIndex[];\n\n abstract getNextShownItem(\n itemIndex: VisibleIndex,\n metrics: GridMetrics\n ): VisibleIndex | null;\n\n abstract setSize(\n metricCalculator: GridMetricCalculator,\n modelIndex: ModelIndex,\n size: number\n ): void;\n\n abstract resetSize(\n metricCalculator: GridMetricCalculator,\n modelIndex: ModelIndex\n ): void;\n\n abstract updateSeparator(grid: Grid, separator: GridSeparator | null): void;\n\n abstract getSeparator(\n gridPoint: GridPoint,\n metrics: GridMetrics,\n model: GridModel,\n theme: GridTheme\n ): GridSeparator | null;\n // End of overrides\n\n onDown(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n if (separator != null) {\n const separatorIndex = separator.index;\n\n this.dragOffset = 0;\n this.draggingIndex = separatorIndex;\n this.resizingItems = [separatorIndex];\n this.hiddenItems = this.getHiddenItems(separatorIndex, metrics).reverse();\n this.targetSizes.clear();\n\n this.addTargetSize(metrics, separatorIndex);\n\n this.updateCursor(metrics, separatorIndex);\n\n this.updateSeparator(grid, separator);\n\n return true;\n }\n return false;\n }\n\n onMove(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n\n if (separator != null) {\n this.updateCursor(metrics, separator.index);\n return true;\n }\n return false;\n }\n\n onDrag(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n if (this.draggingIndex == null) {\n return false;\n }\n\n const point = gridPoint[this.pointProperty];\n const { metricCalculator, metrics } = grid;\n if (!metrics) throw new Error('metrics not set');\n\n const theme = grid.getTheme();\n\n const visibleOffsets = metrics[this.visibleOffsetProperty];\n const margin = metrics[this.marginProperty];\n const calculatedSizes = metrics[this.calculatedSizesProperty];\n const modelIndexes = metrics[this.modelIndexesProperty];\n const firstIndex = metrics[this.firstIndexProperty];\n const treePadding = metrics[this.treePaddingProperty];\n\n // New sizes are batched and applied after the loop to avoid updating state while calculating next step\n const newSizes: Map<ModelIndex, number> = new Map();\n\n // Use a loop as we may need to resize multiple items if they drag quickly\n let resizeIndex: number | null =\n this.resizingItems[this.resizingItems.length - 1];\n while (resizeIndex != null) {\n const itemOffset = getOrThrow(visibleOffsets, resizeIndex);\n const itemSize = point - margin - itemOffset - this.dragOffset;\n const modelIndex = getOrThrow(modelIndexes, resizeIndex);\n const targetSize = this.targetSizes.get(modelIndex);\n const isResizingMultiple = this.resizingItems.length > 1;\n const hiddenIndex = this.hiddenItems.indexOf(resizeIndex);\n let calculatedSize = calculatedSizes.get(modelIndex);\n if (calculatedSize != null && resizeIndex === firstIndex) {\n calculatedSize += treePadding;\n }\n let newSize = itemSize;\n if (\n calculatedSize != null &&\n Math.abs(itemSize - calculatedSize) <= theme.headerResizeSnapThreshold\n ) {\n // Snapping behaviour to \"natural\" width\n newSize = calculatedSize;\n } else if (\n targetSize !== undefined &&\n itemSize > targetSize &&\n ((isResizingMultiple && hiddenIndex !== 0) || hiddenIndex > 0)\n ) {\n newSize = targetSize;\n } else if (itemSize <= theme.headerResizeHiddenSnapThreshold) {\n // Snapping to hidden item\n newSize = 0;\n }\n\n newSizes.set(modelIndex, newSize);\n\n if (itemSize < -theme.headerResizeSnapThreshold && newSize === 0) {\n if (hiddenIndex >= 0 && isResizingMultiple) {\n this.resizingItems.pop();\n this.removeTargetSize(metrics, resizeIndex);\n resizeIndex = this.resizingItems[this.resizingItems.length - 1];\n this.dragOffset -=\n this.targetSizes.get(getOrThrow(modelIndexes, resizeIndex)) ?? 0;\n } else {\n resizeIndex = this.getNextShownItem(resizeIndex, metrics);\n if (resizeIndex !== null) {\n this.resizingItems.push(resizeIndex);\n this.addTargetSize(metrics, resizeIndex);\n }\n }\n } else if (\n targetSize !== undefined &&\n itemSize > targetSize + theme.headerResizeSnapThreshold &&\n newSize === targetSize\n ) {\n if (hiddenIndex > 0) {\n this.dragOffset += newSize;\n resizeIndex = this.hiddenItems[hiddenIndex - 1];\n this.resizingItems.push(resizeIndex);\n this.addTargetSize(metrics, resizeIndex);\n } else if (isResizingMultiple) {\n this.resizingItems.pop();\n this.removeTargetSize(metrics, resizeIndex);\n resizeIndex = this.resizingItems[this.resizingItems.length - 1];\n } else {\n resizeIndex = null;\n }\n } else {\n resizeIndex = null;\n }\n }\n\n newSizes.forEach((newSize, modelIndex) => {\n const defaultSize =\n metricCalculator[this.initialSizesProperty].get(modelIndex) ??\n calculatedSizes.get(modelIndex);\n\n if (newSize === defaultSize) {\n this.resetSize(metricCalculator, modelIndex);\n } else {\n this.setSize(metricCalculator, modelIndex, newSize);\n }\n });\n\n this.updateCursor(metrics, this.draggingIndex);\n\n return true;\n }\n\n onUp(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n if (this.draggingIndex != null) {\n this.draggingIndex = undefined;\n this.resizingItems = [];\n this.hiddenItems = [];\n this.targetSizes.clear();\n\n this.updateSeparator(grid, null);\n }\n\n return false;\n }\n\n onDoubleClick(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics, metricCalculator } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n\n if (separator != null) {\n const modelIndexes = metrics[this.modelIndexesProperty];\n const modelIndex = getOrThrow(modelIndexes, separator.index);\n\n this.resetSize(metricCalculator, modelIndex);\n\n grid.forceUpdate();\n\n return true;\n }\n return false;\n }\n\n updateCursor(metrics: GridMetrics, itemIndex: VisibleIndex): void {\n const visibleSizes = metrics[this.visibleSizesProperty];\n const itemSize = getOrThrow(visibleSizes, itemIndex);\n if (itemSize === 0) {\n this.cursor = this.hiddenCursor;\n } else {\n this.cursor = this.defaultCursor;\n }\n }\n\n addTargetSize(metrics: GridMetrics, itemIndex: VisibleIndex): void {\n const modelIndexes = metrics[this.modelIndexesProperty];\n const userSizes = metrics[this.userSizesProperty];\n const calculatedSizes = metrics[this.calculatedSizesProperty];\n const treePadding = itemIndex === 0 ? metrics[this.treePaddingProperty] : 0;\n\n const modelIndex = getOrThrow(modelIndexes, itemIndex);\n let targetSize = userSizes.get(modelIndex);\n if (targetSize == null || targetSize === 0) {\n targetSize = (calculatedSizes.get(modelIndex) ?? 0) + treePadding;\n }\n this.targetSizes.set(modelIndex, targetSize);\n }\n\n removeTargetSize(metrics: GridMetrics, itemIndex: VisibleIndex): void {\n const modelIndexes = metrics[this.modelIndexesProperty];\n const modelIndex = getOrThrow(modelIndexes, itemIndex);\n this.targetSizes.delete(modelIndex);\n }\n}\n\nexport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AAU,GAAGrD,UAAU,CAAC0C,YAAY,EAAEuC,SAAS,CAAC;IACtD,IAAI,CAACvD,WAAW,CAACgE,MAAM,CAACrC,UAAU,CAAC;EACrC;AACF;AAEA,eAAenD,yBAAyB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"GridSeparatorMouseHandler.js","names":["getOrThrow","GridMouseHandler","GridSeparatorMouseHandler","constructor","arguments","_defineProperty","Map","onDown","gridPoint","grid","metrics","model","props","theme","getTheme","Error","separator","getSeparator","separatorIndex","index","dragOffset","draggingIndex","resizingItems","hiddenItems","getHiddenItems","reverse","targetSizes","clear","addTargetSize","updateCursor","updateSeparator","onMove","onDrag","point","pointProperty","metricCalculator","visibleOffsets","visibleOffsetProperty","margin","marginProperty","calculatedSizes","calculatedSizesProperty","modelIndexes","modelIndexesProperty","firstIndex","firstIndexProperty","treePadding","treePaddingProperty","newSizes","resizeIndex","length","itemOffset","get","modelIndex","itemSize","targetSize","isResizingMultiple","hiddenIndex","indexOf","calculatedSize","newSize","Math","abs","headerResizeSnapThreshold","undefined","headerResizeHiddenSnapThreshold","set","_this$targetSizes$get","pop","removeTargetSize","nextIndex","getNextShownItem","push","forEach","_metricCalculator$thi","defaultSize","initialSizesProperty","resetSize","setSize","onUp","onDoubleClick","forceUpdate","itemIndex","visibleSizes","visibleSizesProperty","cursor","hiddenCursor","defaultCursor","userSizes","userSizesProperty","_calculatedSizes$get","delete"],"sources":["../../src/mouse-handlers/GridSeparatorMouseHandler.ts"],"sourcesContent":["import { getOrThrow } from '@deephaven/utils';\nimport type Grid from '../Grid';\nimport type { GridMetricCalculator } from '../GridMetricCalculator';\nimport type GridModel from '../GridModel';\nimport { type EventHandlerResult } from '../EventHandlerResult';\nimport { type ModelIndex, type VisibleIndex } from '../GridMetrics';\nimport type GridMetrics from '../GridMetrics';\nimport GridMouseHandler from '../GridMouseHandler';\nimport type { GridTheme } from '../GridTheme';\nimport type { GridPoint } from '../GridUtils';\n\n// The different properties that can be used by implementing classes, whether for rows or columns\nexport type PointProperty = 'x' | 'y';\nexport type UserSizeProperty = 'userRowHeights' | 'userColumnWidths';\nexport type VisibleOffsetProperty = 'visibleRowYs' | 'visibleColumnXs';\nexport type VisibleSizeProperty = 'visibleRowHeights' | 'visibleColumnWidths';\nexport type MarginProperty = 'columnHeaderHeight' | 'rowHeaderWidth';\nexport type CalculatedSizeProperty =\n | 'calculatedRowHeights'\n | 'calculatedColumnWidths';\nexport type InitialSizeProperty = 'initialRowHeights' | 'initialColumnWidths';\nexport type ModelIndexesProperty = 'modelRows' | 'modelColumns';\nexport type FirstIndexProperty = 'firstRow' | 'firstColumn';\nexport type TreePaddingProperty = 'treePaddingX' | 'treePaddingY';\nexport interface GridSeparator {\n index: VisibleIndex;\n depth: number;\n}\n\n/**\n * Abstract class that should be extended for column/row behavior\n * Override the necessary functions/properties\n */\nabstract class GridSeparatorMouseHandler extends GridMouseHandler {\n // The index where dragging the column separator started\n protected draggingIndex?: VisibleIndex;\n\n // The columns in the order they're being resized\n protected resizingItems: VisibleIndex[] = [];\n\n // Columns that were hidden under the separator when starting a drag\n protected hiddenItems: VisibleIndex[] = [];\n\n // The target width of the items being resized. Keyed by visible index so the\n // sizes survive the items scrolling out of the metrics mid-drag.\n protected targetSizes: Map<VisibleIndex, number> = new Map();\n\n protected dragOffset = 0;\n\n // Override/Implement these properties/functions\n abstract hiddenCursor: string;\n\n abstract defaultCursor: string;\n\n abstract pointProperty: PointProperty;\n\n abstract userSizesProperty: UserSizeProperty;\n\n abstract visibleOffsetProperty: VisibleOffsetProperty;\n\n abstract visibleSizesProperty: VisibleSizeProperty;\n\n abstract marginProperty: MarginProperty;\n\n abstract calculatedSizesProperty: CalculatedSizeProperty;\n\n abstract initialSizesProperty: InitialSizeProperty;\n\n abstract modelIndexesProperty: ModelIndexesProperty;\n\n abstract firstIndexProperty: FirstIndexProperty;\n\n abstract treePaddingProperty: TreePaddingProperty;\n\n abstract getHiddenItems(\n itemIndex: VisibleIndex,\n metrics: GridMetrics\n ): VisibleIndex[];\n\n abstract getNextShownItem(\n itemIndex: VisibleIndex,\n metrics: GridMetrics\n ): VisibleIndex | null;\n\n abstract setSize(\n metricCalculator: GridMetricCalculator,\n modelIndex: ModelIndex,\n size: number\n ): void;\n\n abstract resetSize(\n metricCalculator: GridMetricCalculator,\n modelIndex: ModelIndex\n ): void;\n\n abstract updateSeparator(grid: Grid, separator: GridSeparator | null): void;\n\n abstract getSeparator(\n gridPoint: GridPoint,\n metrics: GridMetrics,\n model: GridModel,\n theme: GridTheme\n ): GridSeparator | null;\n // End of overrides\n\n onDown(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n if (separator != null) {\n const separatorIndex = separator.index;\n\n this.dragOffset = 0;\n this.draggingIndex = separatorIndex;\n this.resizingItems = [separatorIndex];\n this.hiddenItems = this.getHiddenItems(separatorIndex, metrics).reverse();\n this.targetSizes.clear();\n\n this.addTargetSize(metrics, separatorIndex);\n\n this.updateCursor(metrics, separatorIndex);\n\n this.updateSeparator(grid, separator);\n\n return true;\n }\n return false;\n }\n\n onMove(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n\n if (separator != null) {\n this.updateCursor(metrics, separator.index);\n return true;\n }\n return false;\n }\n\n onDrag(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n if (this.draggingIndex == null) {\n return false;\n }\n\n const point = gridPoint[this.pointProperty];\n const { metricCalculator, metrics } = grid;\n if (!metrics) throw new Error('metrics not set');\n\n const theme = grid.getTheme();\n\n const visibleOffsets = metrics[this.visibleOffsetProperty];\n const margin = metrics[this.marginProperty];\n const calculatedSizes = metrics[this.calculatedSizesProperty];\n const modelIndexes = metrics[this.modelIndexesProperty];\n const firstIndex = metrics[this.firstIndexProperty];\n const treePadding = metrics[this.treePaddingProperty];\n\n // New sizes are batched and applied after the loop to avoid updating state while calculating next step\n const newSizes: Map<ModelIndex, number> = new Map();\n\n // Use a loop as we may need to resize multiple items if they drag quickly\n let resizeIndex: number | null =\n this.resizingItems[this.resizingItems.length - 1];\n while (resizeIndex != null) {\n const itemOffset = visibleOffsets.get(resizeIndex);\n const modelIndex = modelIndexes.get(resizeIndex);\n if (itemOffset == null || modelIndex == null) {\n break;\n }\n\n const itemSize = point - margin - itemOffset - this.dragOffset;\n const targetSize = this.targetSizes.get(resizeIndex);\n const isResizingMultiple = this.resizingItems.length > 1;\n const hiddenIndex = this.hiddenItems.indexOf(resizeIndex);\n let calculatedSize = calculatedSizes.get(modelIndex);\n if (calculatedSize != null && resizeIndex === firstIndex) {\n calculatedSize += treePadding;\n }\n let newSize = itemSize;\n if (\n calculatedSize != null &&\n Math.abs(itemSize - calculatedSize) <= theme.headerResizeSnapThreshold\n ) {\n // Snapping behavior to \"natural\" width\n newSize = calculatedSize;\n } else if (\n targetSize !== undefined &&\n itemSize > targetSize &&\n ((isResizingMultiple && hiddenIndex !== 0) || hiddenIndex > 0)\n ) {\n newSize = targetSize;\n } else if (itemSize <= theme.headerResizeHiddenSnapThreshold) {\n // Snapping to hidden item\n newSize = 0;\n }\n\n newSizes.set(modelIndex, newSize);\n\n if (itemSize < -theme.headerResizeSnapThreshold && newSize === 0) {\n if (hiddenIndex >= 0 && isResizingMultiple) {\n this.resizingItems.pop();\n this.removeTargetSize(resizeIndex);\n resizeIndex = this.resizingItems[this.resizingItems.length - 1];\n this.dragOffset -= this.targetSizes.get(resizeIndex) ?? 0;\n } else {\n const nextIndex = this.getNextShownItem(resizeIndex, metrics);\n // Only take on another item if its target size is known, otherwise\n // the drag offset can't be unwound when dragging back the other way\n if (nextIndex !== null && this.addTargetSize(metrics, nextIndex)) {\n this.resizingItems.push(nextIndex);\n resizeIndex = nextIndex;\n } else {\n resizeIndex = null;\n }\n }\n } else if (\n targetSize !== undefined &&\n itemSize > targetSize + theme.headerResizeSnapThreshold &&\n newSize === targetSize\n ) {\n if (hiddenIndex > 0) {\n const nextIndex = this.hiddenItems[hiddenIndex - 1];\n if (this.addTargetSize(metrics, nextIndex)) {\n this.dragOffset += newSize;\n this.resizingItems.push(nextIndex);\n resizeIndex = nextIndex;\n } else {\n resizeIndex = null;\n }\n } else if (isResizingMultiple) {\n this.resizingItems.pop();\n this.removeTargetSize(resizeIndex);\n resizeIndex = this.resizingItems[this.resizingItems.length - 1];\n } else {\n resizeIndex = null;\n }\n } else {\n resizeIndex = null;\n }\n }\n\n newSizes.forEach((newSize, modelIndex) => {\n const defaultSize =\n metricCalculator[this.initialSizesProperty].get(modelIndex) ??\n calculatedSizes.get(modelIndex);\n\n if (newSize === defaultSize) {\n this.resetSize(metricCalculator, modelIndex);\n } else {\n this.setSize(metricCalculator, modelIndex, newSize);\n }\n });\n\n this.updateCursor(metrics, this.draggingIndex);\n\n return true;\n }\n\n onUp(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n if (this.draggingIndex != null) {\n this.draggingIndex = undefined;\n this.resizingItems = [];\n this.hiddenItems = [];\n this.targetSizes.clear();\n\n this.updateSeparator(grid, null);\n }\n\n return false;\n }\n\n onDoubleClick(gridPoint: GridPoint, grid: Grid): EventHandlerResult {\n const { metrics, metricCalculator } = grid;\n const { model } = grid.props;\n const theme = grid.getTheme();\n if (!metrics) throw new Error('metrics not set');\n\n const separator = this.getSeparator(gridPoint, metrics, model, theme);\n\n if (separator != null) {\n const modelIndexes = metrics[this.modelIndexesProperty];\n const modelIndex = getOrThrow(modelIndexes, separator.index);\n\n this.resetSize(metricCalculator, modelIndex);\n\n grid.forceUpdate();\n\n return true;\n }\n return false;\n }\n\n updateCursor(metrics: GridMetrics, itemIndex: VisibleIndex): void {\n const visibleSizes = metrics[this.visibleSizesProperty];\n const itemSize = visibleSizes.get(itemIndex);\n if (itemSize == null) {\n return;\n }\n if (itemSize === 0) {\n this.cursor = this.hiddenCursor;\n } else {\n this.cursor = this.defaultCursor;\n }\n }\n\n /**\n * Record the size the item should snap back to while dragging.\n * @returns False if the item has no metrics to derive a target size from\n */\n addTargetSize(metrics: GridMetrics, itemIndex: VisibleIndex): boolean {\n const modelIndexes = metrics[this.modelIndexesProperty];\n const userSizes = metrics[this.userSizesProperty];\n const calculatedSizes = metrics[this.calculatedSizesProperty];\n const treePadding = itemIndex === 0 ? metrics[this.treePaddingProperty] : 0;\n\n const modelIndex = modelIndexes.get(itemIndex);\n if (modelIndex == null) {\n return false;\n }\n let targetSize = userSizes.get(modelIndex);\n if (targetSize == null || targetSize === 0) {\n targetSize = (calculatedSizes.get(modelIndex) ?? 0) + treePadding;\n }\n this.targetSizes.set(itemIndex, targetSize);\n return true;\n }\n\n removeTargetSize(itemIndex: VisibleIndex): void {\n this.targetSizes.delete(itemIndex);\n }\n}\n\nexport default GridSeparatorMouseHandler;\n"],"mappings":";;;AAAA,SAASA,UAAU,QAAQ,kBAAkB;AAAC,OAOvCC,gBAAgB,gCAIvB;AAkBA;AACA;AACA;AACA;AACA,MAAeC,yBAAyB,SAASD,gBAAgB,CAAC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAChE;IAAAC,eAAA;IAGA;IAAAA,eAAA,wBAC0C,EAAE;IAE5C;IAAAA,eAAA,sBACwC,EAAE;IAE1C;IACA;IAAAA,eAAA,sBACmD,IAAIC,GAAG,CAAC,CAAC;IAAAD,eAAA,qBAErC,CAAC;EAAA,EAExB;EAsDA;;EAEAE,MAAMA,CAACC,SAAoB,EAAEC,IAAU,EAAsB;IAC3D,IAAQC,OAAO,GAAKD,IAAI,CAAhBC,OAAO;IACf,IAAQC,KAAK,GAAKF,IAAI,CAACG,KAAK,CAApBD,KAAK;IACb,IAAME,KAAK,GAAGJ,IAAI,CAACK,QAAQ,CAAC,CAAC;IAC7B,IAAI,CAACJ,OAAO,EAAE,MAAM,IAAIK,KAAK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ACiC,oBAAoB,CAAC;IACvD,IAAM6C,SAAS,GAAG9E,OAAO,CAAC,IAAI,CAAC+E,iBAAiB,CAAC;IACjD,IAAMjD,eAAe,GAAG9B,OAAO,CAAC,IAAI,CAAC+B,uBAAuB,CAAC;IAC7D,IAAMK,WAAW,GAAGoC,SAAS,KAAK,CAAC,GAAGxE,OAAO,CAAC,IAAI,CAACqC,mBAAmB,CAAC,GAAG,CAAC;IAE3E,IAAMM,UAAU,GAAGX,YAAY,CAACU,GAAG,CAAC8B,SAAS,CAAC;IAC9C,IAAI7B,UAAU,IAAI,IAAI,EAAE;MACtB,OAAO,KAAK;IACd;IACA,IAAIE,UAAU,GAAGiC,SAAS,CAACpC,GAAG,CAACC,UAAU,CAAC;IAC1C,IAAIE,UAAU,IAAI,IAAI,IAAIA,UAAU,KAAK,CAAC,EAAE;MAAA,IAAAmC,oBAAA;MAC1CnC,UAAU,GAAG,EAAAmC,oBAAA,GAAClD,eAAe,CAACY,GAAG,CAACC,UAAU,CAAC,cAAAqC,oBAAA,cAAAA,oBAAA,GAAI,CAAC,IAAI5C,WAAW;IACnE;IACA,IAAI,CAACpB,WAAW,CAACwC,GAAG,CAACgB,SAAS,EAAE3B,UAAU,CAAC;IAC3C,OAAO,IAAI;EACb;EAEAc,gBAAgBA,CAACa,SAAuB,EAAQ;IAC9C,IAAI,CAACxD,WAAW,CAACiE,MAAM,CAACT,SAAS,CAAC;EACpC;AACF;AAEA,eAAehF,yBAAyB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/grid",
|
|
3
|
-
"version": "1.30.1
|
|
3
|
+
"version": "1.30.1",
|
|
4
4
|
"description": "Deephaven React grid component",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"*.css"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deephaven/utils": "^1.
|
|
34
|
+
"@deephaven/utils": "^1.29.0",
|
|
35
35
|
"classnames": "^2.3.1",
|
|
36
36
|
"color-convert": "^2.0.1",
|
|
37
37
|
"event-target-shim": "^6.0.2",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "9f01b8714c1b2b7edeba5a231a5d3e84cf73f690"
|
|
47
47
|
}
|