@affino/datagrid-orchestration 0.1.0
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/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/src/createDataGridRuntime.d.ts +19 -0
- package/dist/src/createDataGridRuntime.d.ts.map +1 -0
- package/dist/src/createDataGridRuntime.js +33 -0
- package/dist/src/dataGridContextMenuContracts.d.ts +20 -0
- package/dist/src/dataGridContextMenuContracts.d.ts.map +1 -0
- package/dist/src/dataGridContextMenuContracts.js +1 -0
- package/dist/src/dataGridPointerContracts.d.ts +5 -0
- package/dist/src/dataGridPointerContracts.d.ts.map +1 -0
- package/dist/src/dataGridPointerContracts.js +1 -0
- package/dist/src/dataGridRangeMutationKernel.d.ts +27 -0
- package/dist/src/dataGridRangeMutationKernel.d.ts.map +1 -0
- package/dist/src/dataGridRangeMutationKernel.js +46 -0
- package/dist/src/dataGridWritableRef.d.ts +4 -0
- package/dist/src/dataGridWritableRef.d.ts.map +1 -0
- package/dist/src/dataGridWritableRef.js +1 -0
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +76 -0
- package/dist/src/selectionOverlayTransform.d.ts +16 -0
- package/dist/src/selectionOverlayTransform.d.ts.map +1 -0
- package/dist/src/selectionOverlayTransform.js +21 -0
- package/dist/src/useDataGridA11yCellIds.d.ts +16 -0
- package/dist/src/useDataGridA11yCellIds.d.ts.map +1 -0
- package/dist/src/useDataGridA11yCellIds.js +26 -0
- package/dist/src/useDataGridAxisAutoScrollDelta.d.ts +10 -0
- package/dist/src/useDataGridAxisAutoScrollDelta.d.ts.map +1 -0
- package/dist/src/useDataGridAxisAutoScrollDelta.js +20 -0
- package/dist/src/useDataGridCellCoordNormalizer.d.ts +26 -0
- package/dist/src/useDataGridCellCoordNormalizer.d.ts.map +1 -0
- package/dist/src/useDataGridCellCoordNormalizer.js +29 -0
- package/dist/src/useDataGridCellDatasetResolver.d.ts +16 -0
- package/dist/src/useDataGridCellDatasetResolver.d.ts.map +1 -0
- package/dist/src/useDataGridCellDatasetResolver.js +23 -0
- package/dist/src/useDataGridCellNavigation.d.ts +23 -0
- package/dist/src/useDataGridCellNavigation.d.ts.map +1 -0
- package/dist/src/useDataGridCellNavigation.js +111 -0
- package/dist/src/useDataGridCellPointerDownRouter.d.ts +42 -0
- package/dist/src/useDataGridCellPointerDownRouter.d.ts.map +1 -0
- package/dist/src/useDataGridCellPointerDownRouter.js +48 -0
- package/dist/src/useDataGridCellPointerHoverRouter.d.ts +24 -0
- package/dist/src/useDataGridCellPointerHoverRouter.d.ts.map +1 -0
- package/dist/src/useDataGridCellPointerHoverRouter.js +25 -0
- package/dist/src/useDataGridCellRangeHelpers.d.ts +30 -0
- package/dist/src/useDataGridCellRangeHelpers.d.ts.map +1 -0
- package/dist/src/useDataGridCellRangeHelpers.js +89 -0
- package/dist/src/useDataGridCellVisibilityScroller.d.ts +41 -0
- package/dist/src/useDataGridCellVisibilityScroller.d.ts.map +1 -0
- package/dist/src/useDataGridCellVisibilityScroller.js +43 -0
- package/dist/src/useDataGridCellVisualStatePredicates.d.ts +40 -0
- package/dist/src/useDataGridCellVisualStatePredicates.d.ts.map +1 -0
- package/dist/src/useDataGridCellVisualStatePredicates.js +126 -0
- package/dist/src/useDataGridClearSelectionLifecycle.d.ts +27 -0
- package/dist/src/useDataGridClearSelectionLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridClearSelectionLifecycle.js +21 -0
- package/dist/src/useDataGridClipboardBridge.d.ts +31 -0
- package/dist/src/useDataGridClipboardBridge.d.ts.map +1 -0
- package/dist/src/useDataGridClipboardBridge.js +138 -0
- package/dist/src/useDataGridClipboardMutations.d.ts +47 -0
- package/dist/src/useDataGridClipboardMutations.d.ts.map +1 -0
- package/dist/src/useDataGridClipboardMutations.js +216 -0
- package/dist/src/useDataGridClipboardValuePolicy.d.ts +5 -0
- package/dist/src/useDataGridClipboardValuePolicy.d.ts.map +1 -0
- package/dist/src/useDataGridClipboardValuePolicy.js +14 -0
- package/dist/src/useDataGridColumnFilterOrchestration.d.ts +64 -0
- package/dist/src/useDataGridColumnFilterOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridColumnFilterOrchestration.js +359 -0
- package/dist/src/useDataGridColumnLayoutOrchestration.d.ts +59 -0
- package/dist/src/useDataGridColumnLayoutOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridColumnLayoutOrchestration.js +151 -0
- package/dist/src/useDataGridColumnUiPolicy.d.ts +25 -0
- package/dist/src/useDataGridColumnUiPolicy.d.ts.map +1 -0
- package/dist/src/useDataGridColumnUiPolicy.js +55 -0
- package/dist/src/useDataGridContextMenu.d.ts +30 -0
- package/dist/src/useDataGridContextMenu.d.ts.map +1 -0
- package/dist/src/useDataGridContextMenu.js +147 -0
- package/dist/src/useDataGridContextMenuActionRouter.d.ts +19 -0
- package/dist/src/useDataGridContextMenuActionRouter.d.ts.map +1 -0
- package/dist/src/useDataGridContextMenuActionRouter.js +29 -0
- package/dist/src/useDataGridContextMenuAnchor.d.ts +33 -0
- package/dist/src/useDataGridContextMenuAnchor.d.ts.map +1 -0
- package/dist/src/useDataGridContextMenuAnchor.js +60 -0
- package/dist/src/useDataGridCopyRangeHelpers.d.ts +20 -0
- package/dist/src/useDataGridCopyRangeHelpers.d.ts.map +1 -0
- package/dist/src/useDataGridCopyRangeHelpers.js +28 -0
- package/dist/src/useDataGridDragPointerSelection.d.ts +22 -0
- package/dist/src/useDataGridDragPointerSelection.d.ts.map +1 -0
- package/dist/src/useDataGridDragPointerSelection.js +23 -0
- package/dist/src/useDataGridDragSelectionLifecycle.d.ts +18 -0
- package/dist/src/useDataGridDragSelectionLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridDragSelectionLifecycle.js +11 -0
- package/dist/src/useDataGridEditableValuePolicy.d.ts +32 -0
- package/dist/src/useDataGridEditableValuePolicy.d.ts.map +1 -0
- package/dist/src/useDataGridEditableValuePolicy.js +95 -0
- package/dist/src/useDataGridEnumTrigger.d.ts +17 -0
- package/dist/src/useDataGridEnumTrigger.d.ts.map +1 -0
- package/dist/src/useDataGridEnumTrigger.js +28 -0
- package/dist/src/useDataGridFillHandleStart.d.ts +30 -0
- package/dist/src/useDataGridFillHandleStart.d.ts.map +1 -0
- package/dist/src/useDataGridFillHandleStart.js +27 -0
- package/dist/src/useDataGridFillSelectionLifecycle.d.ts +24 -0
- package/dist/src/useDataGridFillSelectionLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridFillSelectionLifecycle.js +15 -0
- package/dist/src/useDataGridGlobalMouseDownContextMenuCloser.d.ts +10 -0
- package/dist/src/useDataGridGlobalMouseDownContextMenuCloser.d.ts.map +1 -0
- package/dist/src/useDataGridGlobalMouseDownContextMenuCloser.js +17 -0
- package/dist/src/useDataGridGlobalPointerLifecycle.d.ts +40 -0
- package/dist/src/useDataGridGlobalPointerLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridGlobalPointerLifecycle.js +153 -0
- package/dist/src/useDataGridGroupBadge.d.ts +13 -0
- package/dist/src/useDataGridGroupBadge.d.ts.map +1 -0
- package/dist/src/useDataGridGroupBadge.js +19 -0
- package/dist/src/useDataGridGroupMetaOrchestration.d.ts +18 -0
- package/dist/src/useDataGridGroupMetaOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridGroupMetaOrchestration.js +43 -0
- package/dist/src/useDataGridGroupValueLabelResolver.d.ts +10 -0
- package/dist/src/useDataGridGroupValueLabelResolver.d.ts.map +1 -0
- package/dist/src/useDataGridGroupValueLabelResolver.js +15 -0
- package/dist/src/useDataGridGroupingSortOrchestration.d.ts +13 -0
- package/dist/src/useDataGridGroupingSortOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridGroupingSortOrchestration.js +22 -0
- package/dist/src/useDataGridHeaderContextActions.d.ts +15 -0
- package/dist/src/useDataGridHeaderContextActions.d.ts.map +1 -0
- package/dist/src/useDataGridHeaderContextActions.js +41 -0
- package/dist/src/useDataGridHeaderInteractionRouter.d.ts +12 -0
- package/dist/src/useDataGridHeaderInteractionRouter.d.ts.map +1 -0
- package/dist/src/useDataGridHeaderInteractionRouter.js +35 -0
- package/dist/src/useDataGridHeaderLayerOrchestration.d.ts +13 -0
- package/dist/src/useDataGridHeaderLayerOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridHeaderLayerOrchestration.js +18 -0
- package/dist/src/useDataGridHeaderResizeOrchestration.d.ts +43 -0
- package/dist/src/useDataGridHeaderResizeOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridHeaderResizeOrchestration.js +180 -0
- package/dist/src/useDataGridHeaderSortOrchestration.d.ts +20 -0
- package/dist/src/useDataGridHeaderSortOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridHeaderSortOrchestration.js +86 -0
- package/dist/src/useDataGridHistoryActionRunner.d.ts +15 -0
- package/dist/src/useDataGridHistoryActionRunner.d.ts.map +1 -0
- package/dist/src/useDataGridHistoryActionRunner.js +35 -0
- package/dist/src/useDataGridInlineEditOrchestration.d.ts +46 -0
- package/dist/src/useDataGridInlineEditOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridInlineEditOrchestration.js +116 -0
- package/dist/src/useDataGridInlineEditorFocus.d.ts +9 -0
- package/dist/src/useDataGridInlineEditorFocus.d.ts.map +1 -0
- package/dist/src/useDataGridInlineEditorFocus.js +37 -0
- package/dist/src/useDataGridInlineEditorKeyRouter.d.ts +12 -0
- package/dist/src/useDataGridInlineEditorKeyRouter.d.ts.map +1 -0
- package/dist/src/useDataGridInlineEditorKeyRouter.js +31 -0
- package/dist/src/useDataGridInlineEditorSchema.d.ts +11 -0
- package/dist/src/useDataGridInlineEditorSchema.d.ts.map +1 -0
- package/dist/src/useDataGridInlineEditorSchema.js +26 -0
- package/dist/src/useDataGridInlineEditorTargetNavigation.d.ts +30 -0
- package/dist/src/useDataGridInlineEditorTargetNavigation.d.ts.map +1 -0
- package/dist/src/useDataGridInlineEditorTargetNavigation.js +66 -0
- package/dist/src/useDataGridIntentHistory.d.ts +25 -0
- package/dist/src/useDataGridIntentHistory.d.ts.map +1 -0
- package/dist/src/useDataGridIntentHistory.js +109 -0
- package/dist/src/useDataGridKeyboardCommandRouter.d.ts +18 -0
- package/dist/src/useDataGridKeyboardCommandRouter.d.ts.map +1 -0
- package/dist/src/useDataGridKeyboardCommandRouter.js +81 -0
- package/dist/src/useDataGridMoveMutationPolicy.d.ts +12 -0
- package/dist/src/useDataGridMoveMutationPolicy.d.ts.map +1 -0
- package/dist/src/useDataGridMoveMutationPolicy.js +81 -0
- package/dist/src/useDataGridMutationSnapshot.d.ts +46 -0
- package/dist/src/useDataGridMutationSnapshot.d.ts.map +1 -0
- package/dist/src/useDataGridMutationSnapshot.js +57 -0
- package/dist/src/useDataGridNavigationPrimitives.d.ts +42 -0
- package/dist/src/useDataGridNavigationPrimitives.d.ts.map +1 -0
- package/dist/src/useDataGridNavigationPrimitives.js +105 -0
- package/dist/src/useDataGridPointerAutoScroll.d.ts +32 -0
- package/dist/src/useDataGridPointerAutoScroll.d.ts.map +1 -0
- package/dist/src/useDataGridPointerAutoScroll.js +85 -0
- package/dist/src/useDataGridPointerCellCoordResolver.d.ts +45 -0
- package/dist/src/useDataGridPointerCellCoordResolver.d.ts.map +1 -0
- package/dist/src/useDataGridPointerCellCoordResolver.js +107 -0
- package/dist/src/useDataGridPointerModifierPolicy.d.ts +5 -0
- package/dist/src/useDataGridPointerModifierPolicy.d.ts.map +1 -0
- package/dist/src/useDataGridPointerModifierPolicy.js +8 -0
- package/dist/src/useDataGridPointerPreviewRouter.d.ts +37 -0
- package/dist/src/useDataGridPointerPreviewRouter.d.ts.map +1 -0
- package/dist/src/useDataGridPointerPreviewRouter.js +55 -0
- package/dist/src/useDataGridQuickFilterActions.d.ts +10 -0
- package/dist/src/useDataGridQuickFilterActions.d.ts.map +1 -0
- package/dist/src/useDataGridQuickFilterActions.js +12 -0
- package/dist/src/useDataGridRangeMoveLifecycle.d.ts +15 -0
- package/dist/src/useDataGridRangeMoveLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridRangeMoveLifecycle.js +21 -0
- package/dist/src/useDataGridRangeMoveStart.d.ts +34 -0
- package/dist/src/useDataGridRangeMoveStart.d.ts.map +1 -0
- package/dist/src/useDataGridRangeMoveStart.js +23 -0
- package/dist/src/useDataGridRangeMutationEngine.d.ts +44 -0
- package/dist/src/useDataGridRangeMutationEngine.d.ts.map +1 -0
- package/dist/src/useDataGridRangeMutationEngine.js +210 -0
- package/dist/src/useDataGridRowSelectionInputHandlers.d.ts +10 -0
- package/dist/src/useDataGridRowSelectionInputHandlers.d.ts.map +1 -0
- package/dist/src/useDataGridRowSelectionInputHandlers.js +12 -0
- package/dist/src/useDataGridRowSelectionOrchestration.d.ts +7 -0
- package/dist/src/useDataGridRowSelectionOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridRowSelectionOrchestration.js +60 -0
- package/dist/src/useDataGridRowsProjection.d.ts +21 -0
- package/dist/src/useDataGridRowsProjection.d.ts.map +1 -0
- package/dist/src/useDataGridRowsProjection.js +69 -0
- package/dist/src/useDataGridRuntimeService.d.ts +33 -0
- package/dist/src/useDataGridRuntimeService.d.ts.map +1 -0
- package/dist/src/useDataGridRuntimeService.js +209 -0
- package/dist/src/useDataGridSelectionComparators.d.ts +16 -0
- package/dist/src/useDataGridSelectionComparators.d.ts.map +1 -0
- package/dist/src/useDataGridSelectionComparators.js +21 -0
- package/dist/src/useDataGridSelectionMoveHandle.d.ts +38 -0
- package/dist/src/useDataGridSelectionMoveHandle.d.ts.map +1 -0
- package/dist/src/useDataGridSelectionMoveHandle.js +49 -0
- package/dist/src/useDataGridSelectionOverlayOrchestration.d.ts +60 -0
- package/dist/src/useDataGridSelectionOverlayOrchestration.d.ts.map +1 -0
- package/dist/src/useDataGridSelectionOverlayOrchestration.js +137 -0
- package/dist/src/useDataGridTabTargetResolver.d.ts +17 -0
- package/dist/src/useDataGridTabTargetResolver.d.ts.map +1 -0
- package/dist/src/useDataGridTabTargetResolver.js +30 -0
- package/dist/src/useDataGridViewportBlurHandler.d.ts +16 -0
- package/dist/src/useDataGridViewportBlurHandler.d.ts.map +1 -0
- package/dist/src/useDataGridViewportBlurHandler.js +62 -0
- package/dist/src/useDataGridViewportContextMenuRouter.d.ts +31 -0
- package/dist/src/useDataGridViewportContextMenuRouter.d.ts.map +1 -0
- package/dist/src/useDataGridViewportContextMenuRouter.js +78 -0
- package/dist/src/useDataGridViewportMeasureScheduler.d.ts +22 -0
- package/dist/src/useDataGridViewportMeasureScheduler.d.ts.map +1 -0
- package/dist/src/useDataGridViewportMeasureScheduler.js +65 -0
- package/dist/src/useDataGridViewportScrollLifecycle.d.ts +16 -0
- package/dist/src/useDataGridViewportScrollLifecycle.d.ts.map +1 -0
- package/dist/src/useDataGridViewportScrollLifecycle.js +28 -0
- package/dist/src/useDataGridVirtualRangeMetrics.d.ts +32 -0
- package/dist/src/useDataGridVirtualRangeMetrics.d.ts.map +1 -0
- package/dist/src/useDataGridVirtualRangeMetrics.js +26 -0
- package/dist/src/useDataGridVisibleRowsSyncScheduler.d.ts +21 -0
- package/dist/src/useDataGridVisibleRowsSyncScheduler.d.ts.map +1 -0
- package/dist/src/useDataGridVisibleRowsSyncScheduler.js +70 -0
- package/dist/tsconfig.public.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function withGroupingSortPriority(model, groupByKey) {
|
|
2
|
+
if (groupByKey === "none") {
|
|
3
|
+
return model;
|
|
4
|
+
}
|
|
5
|
+
const withoutGroupKey = model.filter(entry => entry.key !== groupByKey);
|
|
6
|
+
const groupEntry = model.find(entry => entry.key === groupByKey);
|
|
7
|
+
return [{ key: groupByKey, direction: groupEntry?.direction ?? "asc" }, ...withoutGroupKey];
|
|
8
|
+
}
|
|
9
|
+
export function resolveDataGridSortSummary(model) {
|
|
10
|
+
if (!model.length) {
|
|
11
|
+
return "none";
|
|
12
|
+
}
|
|
13
|
+
return model
|
|
14
|
+
.map((entry, index) => `${index + 1}:${entry.key}:${entry.direction}`)
|
|
15
|
+
.join(" | ");
|
|
16
|
+
}
|
|
17
|
+
export function useDataGridGroupingSortOrchestration(options) {
|
|
18
|
+
return {
|
|
19
|
+
effectiveSortModel: withGroupingSortPriority(options.sortState, options.groupBy),
|
|
20
|
+
sortSummary: resolveDataGridSortSummary(options.sortState),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DataGridContextMenuActionId } from "./dataGridContextMenuContracts";
|
|
2
|
+
export interface UseDataGridHeaderContextActionsOptions {
|
|
3
|
+
isSortableColumn: (columnKey: string) => boolean;
|
|
4
|
+
applyExplicitSort: (columnKey: string, direction: "asc" | "desc" | null) => void;
|
|
5
|
+
openColumnFilter: (columnKey: string) => void;
|
|
6
|
+
estimateColumnAutoWidth: (columnKey: string) => number;
|
|
7
|
+
setColumnWidth: (columnKey: string, width: number) => void;
|
|
8
|
+
closeContextMenu: () => void;
|
|
9
|
+
setLastAction: (message: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface UseDataGridHeaderContextActionsResult {
|
|
12
|
+
runHeaderContextAction: (action: DataGridContextMenuActionId, columnKey: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function useDataGridHeaderContextActions(options: UseDataGridHeaderContextActionsOptions): UseDataGridHeaderContextActionsResult;
|
|
15
|
+
//# sourceMappingURL=useDataGridHeaderContextActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHeaderContextActions.d.ts","sourceRoot":"","sources":["../../src/useDataGridHeaderContextActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAA;AAEjF,MAAM,WAAW,sCAAsC;IACrD,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAChD,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAChF,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,uBAAuB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACtD,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,qCAAqC;IACpD,sBAAsB,EAAE,CAAC,MAAM,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;CAC5F;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,sCAAsC,GAC9C,qCAAqC,CA2CvC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export function useDataGridHeaderContextActions(options) {
|
|
2
|
+
function runHeaderContextAction(action, columnKey) {
|
|
3
|
+
if (!options.isSortableColumn(columnKey) && action !== "auto-size") {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
if (action === "sort-asc") {
|
|
7
|
+
options.applyExplicitSort(columnKey, "asc");
|
|
8
|
+
options.setLastAction(`Sorted ${columnKey} asc`);
|
|
9
|
+
options.closeContextMenu();
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (action === "sort-desc") {
|
|
13
|
+
options.applyExplicitSort(columnKey, "desc");
|
|
14
|
+
options.setLastAction(`Sorted ${columnKey} desc`);
|
|
15
|
+
options.closeContextMenu();
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
if (action === "sort-clear") {
|
|
19
|
+
options.applyExplicitSort(columnKey, null);
|
|
20
|
+
options.setLastAction(`Sort cleared for ${columnKey}`);
|
|
21
|
+
options.closeContextMenu();
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
if (action === "filter") {
|
|
25
|
+
options.openColumnFilter(columnKey);
|
|
26
|
+
options.closeContextMenu();
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (action === "auto-size") {
|
|
30
|
+
const nextWidth = options.estimateColumnAutoWidth(columnKey);
|
|
31
|
+
options.setColumnWidth(columnKey, nextWidth);
|
|
32
|
+
options.setLastAction(`Auto-sized ${columnKey} to ${nextWidth}px`);
|
|
33
|
+
options.closeContextMenu();
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
runHeaderContextAction,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UseDataGridHeaderInteractionRouterOptions {
|
|
2
|
+
isSortableColumn: (columnKey: string) => boolean;
|
|
3
|
+
applySortFromHeader: (columnKey: string, append: boolean) => void;
|
|
4
|
+
openHeaderContextMenu: (x: number, y: number, columnKey: string) => void;
|
|
5
|
+
contextMenuBlockedColumnKey?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface UseDataGridHeaderInteractionRouterResult {
|
|
8
|
+
onHeaderCellClick: (columnKey: string, event: MouseEvent) => void;
|
|
9
|
+
onHeaderCellKeyDown: (columnKey: string, event: KeyboardEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useDataGridHeaderInteractionRouter(options: UseDataGridHeaderInteractionRouterOptions): UseDataGridHeaderInteractionRouterResult;
|
|
12
|
+
//# sourceMappingURL=useDataGridHeaderInteractionRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHeaderInteractionRouter.d.ts","sourceRoot":"","sources":["../../src/useDataGridHeaderInteractionRouter.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yCAAyC;IACxD,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IAChD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACjE,qBAAqB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IACxE,2BAA2B,CAAC,EAAE,MAAM,CAAA;CACrC;AAED,MAAM,WAAW,wCAAwC;IACvD,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IACjE,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;CACvE;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,yCAAyC,GACjD,wCAAwC,CAsC1C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function useDataGridHeaderInteractionRouter(options) {
|
|
2
|
+
const contextMenuBlockedColumnKey = options.contextMenuBlockedColumnKey ?? "select";
|
|
3
|
+
function onHeaderCellClick(columnKey, event) {
|
|
4
|
+
if (!options.isSortableColumn(columnKey)) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
options.applySortFromHeader(columnKey, event.shiftKey);
|
|
8
|
+
}
|
|
9
|
+
function onHeaderCellKeyDown(columnKey, event) {
|
|
10
|
+
if (event.key === "ContextMenu" || (event.shiftKey && event.key === "F10")) {
|
|
11
|
+
if (columnKey === contextMenuBlockedColumnKey) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
event.preventDefault();
|
|
15
|
+
const target = event.currentTarget;
|
|
16
|
+
const rect = target?.getBoundingClientRect();
|
|
17
|
+
const x = rect ? rect.left + Math.min(rect.width - 8, Math.max(8, rect.width * 0.5)) : 24;
|
|
18
|
+
const y = rect ? rect.bottom - 6 : 24;
|
|
19
|
+
options.openHeaderContextMenu(x, y, columnKey);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!options.isSortableColumn(columnKey)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (event.key !== "Enter" && event.key !== " ") {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
options.applySortFromHeader(columnKey, event.shiftKey);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
onHeaderCellClick,
|
|
33
|
+
onHeaderCellKeyDown,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DataGridHeaderLayerViewportGeometryInput {
|
|
2
|
+
headerViewportHeight: number;
|
|
3
|
+
bodyViewportWidth: number;
|
|
4
|
+
bodyViewportHeight: number;
|
|
5
|
+
}
|
|
6
|
+
export interface DataGridHeaderLayerViewportGeometry {
|
|
7
|
+
overlayTop: number;
|
|
8
|
+
overlayWidth: number;
|
|
9
|
+
overlayHeight: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function resolveDataGridHeaderScrollSyncLeft(headerScrollLeft: number, bodyScrollLeft: number): number;
|
|
12
|
+
export declare function resolveDataGridHeaderLayerViewportGeometry(input: DataGridHeaderLayerViewportGeometryInput): DataGridHeaderLayerViewportGeometry;
|
|
13
|
+
//# sourceMappingURL=useDataGridHeaderLayerOrchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHeaderLayerOrchestration.d.ts","sourceRoot":"","sources":["../../src/useDataGridHeaderLayerOrchestration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wCAAwC;IACvD,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,mCAAmC;IAClD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,mCAAmC,CACjD,gBAAgB,EAAE,MAAM,EACxB,cAAc,EAAE,MAAM,GACrB,MAAM,CAOR;AAED,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,wCAAwC,GAC9C,mCAAmC,CASrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function resolveDataGridHeaderScrollSyncLeft(headerScrollLeft, bodyScrollLeft) {
|
|
2
|
+
const resolvedHeader = Number.isFinite(headerScrollLeft) ? headerScrollLeft : 0;
|
|
3
|
+
const resolvedBody = Number.isFinite(bodyScrollLeft) ? bodyScrollLeft : 0;
|
|
4
|
+
if (resolvedHeader === resolvedBody) {
|
|
5
|
+
return resolvedHeader;
|
|
6
|
+
}
|
|
7
|
+
return resolvedBody;
|
|
8
|
+
}
|
|
9
|
+
export function resolveDataGridHeaderLayerViewportGeometry(input) {
|
|
10
|
+
const headerViewportHeight = Math.max(0, Number(input.headerViewportHeight) || 0);
|
|
11
|
+
const bodyViewportWidth = Math.max(0, Number(input.bodyViewportWidth) || 0);
|
|
12
|
+
const bodyViewportHeight = Math.max(0, Number(input.bodyViewportHeight) || 0);
|
|
13
|
+
return {
|
|
14
|
+
overlayTop: headerViewportHeight,
|
|
15
|
+
overlayWidth: bodyViewportWidth,
|
|
16
|
+
overlayHeight: bodyViewportHeight,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface DataGridHeaderResizeState {
|
|
2
|
+
columnKey: string;
|
|
3
|
+
startClientX: number;
|
|
4
|
+
startWidth: number;
|
|
5
|
+
lastWidth: number;
|
|
6
|
+
}
|
|
7
|
+
export type DataGridHeaderResizeApplyMode = "sync" | "raf";
|
|
8
|
+
export interface UseDataGridHeaderResizeOrchestrationOptions<TRow> {
|
|
9
|
+
resolveColumnBaseWidth: (columnKey: string) => number | null | undefined;
|
|
10
|
+
resolveColumnLabel: (columnKey: string) => string | null | undefined;
|
|
11
|
+
resolveRowsForAutoSize: () => readonly TRow[];
|
|
12
|
+
resolveCellText: (row: TRow, columnKey: string) => string;
|
|
13
|
+
resolveColumnWidthOverride: (columnKey: string) => number | null | undefined;
|
|
14
|
+
resolveColumnMinWidth: (columnKey: string) => number;
|
|
15
|
+
applyColumnWidth: (columnKey: string, width: number) => void;
|
|
16
|
+
isColumnResizable: (columnKey: string) => boolean;
|
|
17
|
+
isFillDragging: () => boolean;
|
|
18
|
+
stopFillSelection: (applyPreview: boolean) => void;
|
|
19
|
+
isDragSelecting: () => boolean;
|
|
20
|
+
stopDragSelection: () => void;
|
|
21
|
+
setLastAction: (message: string) => void;
|
|
22
|
+
autoSizeSampleLimit: number;
|
|
23
|
+
autoSizeCharWidth: number;
|
|
24
|
+
autoSizeHorizontalPadding: number;
|
|
25
|
+
autoSizeMaxWidth: number;
|
|
26
|
+
resizeApplyMode?: DataGridHeaderResizeApplyMode;
|
|
27
|
+
requestAnimationFrame?: (callback: FrameRequestCallback) => number;
|
|
28
|
+
cancelAnimationFrame?: (handle: number) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface UseDataGridHeaderResizeOrchestrationResult {
|
|
31
|
+
getActiveColumnResize: () => DataGridHeaderResizeState | null;
|
|
32
|
+
isColumnResizing: () => boolean;
|
|
33
|
+
subscribe: (listener: (state: DataGridHeaderResizeState | null) => void) => () => void;
|
|
34
|
+
setColumnWidth: (columnKey: string, width: number) => void;
|
|
35
|
+
estimateColumnAutoWidth: (columnKey: string) => number;
|
|
36
|
+
onHeaderResizeHandleMouseDown: (columnKey: string, event: MouseEvent) => void;
|
|
37
|
+
onHeaderResizeHandleDoubleClick: (columnKey: string, event: MouseEvent) => void;
|
|
38
|
+
applyColumnResizeFromPointer: (clientX: number) => void;
|
|
39
|
+
stopColumnResize: () => void;
|
|
40
|
+
dispose: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function useDataGridHeaderResizeOrchestration<TRow>(options: UseDataGridHeaderResizeOrchestrationOptions<TRow>): UseDataGridHeaderResizeOrchestrationResult;
|
|
43
|
+
//# sourceMappingURL=useDataGridHeaderResizeOrchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHeaderResizeOrchestration.d.ts","sourceRoot":"","sources":["../../src/useDataGridHeaderResizeOrchestration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,KAAK,CAAA;AAE1D,MAAM,WAAW,2CAA2C,CAAC,IAAI;IAC/D,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACxE,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACpE,sBAAsB,EAAE,MAAM,SAAS,IAAI,EAAE,CAAA;IAC7C,eAAe,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACzD,0BAA0B,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5E,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACpD,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5D,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IACjD,cAAc,EAAE,MAAM,OAAO,CAAA;IAC7B,iBAAiB,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAA;IAClD,eAAe,EAAE,MAAM,OAAO,CAAA;IAC9B,iBAAiB,EAAE,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
|
+
export function useDataGridHeaderResizeOrchestration(options) {
|
|
2
|
+
const resizeApplyMode = options.resizeApplyMode ?? "raf";
|
|
3
|
+
const requestFrame = options.requestAnimationFrame ?? (callback => window.requestAnimationFrame(callback));
|
|
4
|
+
const cancelFrame = options.cancelAnimationFrame ?? (handle => window.cancelAnimationFrame(handle));
|
|
5
|
+
let activeColumnResize = null;
|
|
6
|
+
let pendingResizeClientX = null;
|
|
7
|
+
let pendingResizeFrame = null;
|
|
8
|
+
const listeners = new Set();
|
|
9
|
+
function setActiveColumnResize(state) {
|
|
10
|
+
activeColumnResize = state;
|
|
11
|
+
listeners.forEach(listener => listener(state));
|
|
12
|
+
}
|
|
13
|
+
function subscribe(listener) {
|
|
14
|
+
listeners.add(listener);
|
|
15
|
+
listener(activeColumnResize);
|
|
16
|
+
return () => {
|
|
17
|
+
listeners.delete(listener);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function clampColumnWidth(columnKey, width) {
|
|
21
|
+
const minWidth = options.resolveColumnMinWidth(columnKey);
|
|
22
|
+
const rounded = Math.round(width);
|
|
23
|
+
return Math.max(minWidth, Math.min(options.autoSizeMaxWidth, rounded));
|
|
24
|
+
}
|
|
25
|
+
function resolveColumnCurrentWidth(columnKey) {
|
|
26
|
+
const override = options.resolveColumnWidthOverride(columnKey);
|
|
27
|
+
if (typeof override === "number") {
|
|
28
|
+
return override;
|
|
29
|
+
}
|
|
30
|
+
const baseWidth = options.resolveColumnBaseWidth(columnKey);
|
|
31
|
+
if (typeof baseWidth === "number") {
|
|
32
|
+
return baseWidth;
|
|
33
|
+
}
|
|
34
|
+
return options.resolveColumnMinWidth(columnKey);
|
|
35
|
+
}
|
|
36
|
+
function setColumnWidth(columnKey, width) {
|
|
37
|
+
options.applyColumnWidth(columnKey, clampColumnWidth(columnKey, width));
|
|
38
|
+
}
|
|
39
|
+
function cancelPendingResizeFrame() {
|
|
40
|
+
if (pendingResizeFrame === null) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
cancelFrame(pendingResizeFrame);
|
|
44
|
+
pendingResizeFrame = null;
|
|
45
|
+
}
|
|
46
|
+
function canUseRaf() {
|
|
47
|
+
return resizeApplyMode === "raf" && typeof window !== "undefined";
|
|
48
|
+
}
|
|
49
|
+
function applyResizeFromClientX(clientX) {
|
|
50
|
+
if (!activeColumnResize) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const delta = clientX - activeColumnResize.startClientX;
|
|
54
|
+
const nextWidth = clampColumnWidth(activeColumnResize.columnKey, activeColumnResize.startWidth + delta);
|
|
55
|
+
if (nextWidth === activeColumnResize.lastWidth) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
setColumnWidth(activeColumnResize.columnKey, nextWidth);
|
|
59
|
+
setActiveColumnResize({
|
|
60
|
+
...activeColumnResize,
|
|
61
|
+
lastWidth: nextWidth,
|
|
62
|
+
});
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
function flushPendingResize() {
|
|
66
|
+
if (pendingResizeClientX === null) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const nextClientX = pendingResizeClientX;
|
|
70
|
+
pendingResizeClientX = null;
|
|
71
|
+
return applyResizeFromClientX(nextClientX);
|
|
72
|
+
}
|
|
73
|
+
function schedulePendingResizeFlush() {
|
|
74
|
+
if (!canUseRaf()) {
|
|
75
|
+
flushPendingResize();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (pendingResizeFrame !== null) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
pendingResizeFrame = requestFrame(() => {
|
|
82
|
+
pendingResizeFrame = null;
|
|
83
|
+
flushPendingResize();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function sampleRowsForAutoSize(rows, maxSamples) {
|
|
87
|
+
if (rows.length <= maxSamples) {
|
|
88
|
+
return rows;
|
|
89
|
+
}
|
|
90
|
+
const step = Math.max(1, Math.floor(rows.length / maxSamples));
|
|
91
|
+
const sample = [];
|
|
92
|
+
for (let index = 0; index < rows.length && sample.length < maxSamples; index += step) {
|
|
93
|
+
const row = rows[index];
|
|
94
|
+
if (row) {
|
|
95
|
+
sample.push(row);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return sample;
|
|
99
|
+
}
|
|
100
|
+
function estimateColumnAutoWidth(columnKey) {
|
|
101
|
+
const columnLabel = options.resolveColumnLabel(columnKey) ?? columnKey;
|
|
102
|
+
const rows = sampleRowsForAutoSize(options.resolveRowsForAutoSize(), options.autoSizeSampleLimit);
|
|
103
|
+
let maxTextLength = String(columnLabel).length;
|
|
104
|
+
for (const row of rows) {
|
|
105
|
+
const text = options.resolveCellText(row, columnKey);
|
|
106
|
+
if (text.length > maxTextLength) {
|
|
107
|
+
maxTextLength = text.length;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const estimated = maxTextLength * options.autoSizeCharWidth + options.autoSizeHorizontalPadding;
|
|
111
|
+
return clampColumnWidth(columnKey, estimated);
|
|
112
|
+
}
|
|
113
|
+
function onHeaderResizeHandleMouseDown(columnKey, event) {
|
|
114
|
+
if (event.button !== 0 || !options.isColumnResizable(columnKey)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
if (options.isFillDragging()) {
|
|
120
|
+
options.stopFillSelection(false);
|
|
121
|
+
}
|
|
122
|
+
if (options.isDragSelecting()) {
|
|
123
|
+
options.stopDragSelection();
|
|
124
|
+
}
|
|
125
|
+
cancelPendingResizeFrame();
|
|
126
|
+
pendingResizeClientX = null;
|
|
127
|
+
const startWidth = resolveColumnCurrentWidth(columnKey);
|
|
128
|
+
setActiveColumnResize({
|
|
129
|
+
columnKey,
|
|
130
|
+
startClientX: event.clientX,
|
|
131
|
+
startWidth,
|
|
132
|
+
lastWidth: startWidth,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function onHeaderResizeHandleDoubleClick(columnKey, event) {
|
|
136
|
+
if (!options.isColumnResizable(columnKey)) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
event.stopPropagation();
|
|
141
|
+
const nextWidth = estimateColumnAutoWidth(columnKey);
|
|
142
|
+
setColumnWidth(columnKey, nextWidth);
|
|
143
|
+
options.setLastAction(`Auto-sized ${columnKey} to ${nextWidth}px`);
|
|
144
|
+
}
|
|
145
|
+
function applyColumnResizeFromPointer(clientX) {
|
|
146
|
+
if (!activeColumnResize) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
pendingResizeClientX = clientX;
|
|
150
|
+
schedulePendingResizeFlush();
|
|
151
|
+
}
|
|
152
|
+
function stopColumnResize() {
|
|
153
|
+
if (!activeColumnResize) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
flushPendingResize();
|
|
157
|
+
cancelPendingResizeFrame();
|
|
158
|
+
pendingResizeClientX = null;
|
|
159
|
+
const state = activeColumnResize;
|
|
160
|
+
setActiveColumnResize(null);
|
|
161
|
+
options.setLastAction(`Resized ${state.columnKey} to ${state.lastWidth}px`);
|
|
162
|
+
}
|
|
163
|
+
function dispose() {
|
|
164
|
+
cancelPendingResizeFrame();
|
|
165
|
+
pendingResizeClientX = null;
|
|
166
|
+
setActiveColumnResize(null);
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
getActiveColumnResize: () => activeColumnResize,
|
|
170
|
+
isColumnResizing: () => activeColumnResize !== null,
|
|
171
|
+
subscribe,
|
|
172
|
+
setColumnWidth,
|
|
173
|
+
estimateColumnAutoWidth,
|
|
174
|
+
onHeaderResizeHandleMouseDown,
|
|
175
|
+
onHeaderResizeHandleDoubleClick,
|
|
176
|
+
applyColumnResizeFromPointer,
|
|
177
|
+
stopColumnResize,
|
|
178
|
+
dispose,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DataGridSortState } from "@affino/datagrid-core";
|
|
2
|
+
import type { DataGridWritableRef } from "./dataGridWritableRef";
|
|
3
|
+
export interface UseDataGridHeaderSortOrchestrationOptions {
|
|
4
|
+
sortState: DataGridWritableRef<readonly DataGridSortState[]>;
|
|
5
|
+
isSortableColumn: (columnKey: string) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface DataGridHeaderSortEntry {
|
|
8
|
+
entry: DataGridSortState;
|
|
9
|
+
index: number;
|
|
10
|
+
}
|
|
11
|
+
export interface UseDataGridHeaderSortOrchestrationResult {
|
|
12
|
+
getSortEntry: (columnKey: string) => DataGridHeaderSortEntry | null;
|
|
13
|
+
getHeaderSortDirection: (columnKey: string) => "asc" | "desc" | null;
|
|
14
|
+
getHeaderSortPriority: (columnKey: string) => number | null;
|
|
15
|
+
getHeaderAriaSort: (columnKey: string) => "none" | "ascending" | "descending";
|
|
16
|
+
applySortFromHeader: (columnKey: string, keepExisting: boolean) => void;
|
|
17
|
+
applyExplicitSort: (columnKey: string, direction: "asc" | "desc" | null) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function useDataGridHeaderSortOrchestration(options: UseDataGridHeaderSortOrchestrationOptions): UseDataGridHeaderSortOrchestrationResult;
|
|
20
|
+
//# sourceMappingURL=useDataGridHeaderSortOrchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHeaderSortOrchestration.d.ts","sourceRoot":"","sources":["../../src/useDataGridHeaderSortOrchestration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,WAAW,yCAAyC;IACxD,SAAS,EAAE,mBAAmB,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAA;IAC5D,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;CACjD;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,iBAAiB,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,wCAAwC;IACvD,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,uBAAuB,GAAG,IAAI,CAAA;IACnE,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,IAAI,CAAA;IACpE,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAC3D,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,WAAW,GAAG,YAAY,CAAA;IAC7E,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,KAAK,IAAI,CAAA;IACvE,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;CACjF;AAYD,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,yCAAyC,GACjD,wCAAwC,CAsF1C"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
function cycleDirection(current) {
|
|
2
|
+
if (current === null) {
|
|
3
|
+
return "asc";
|
|
4
|
+
}
|
|
5
|
+
if (current === "asc") {
|
|
6
|
+
return "desc";
|
|
7
|
+
}
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
export function useDataGridHeaderSortOrchestration(options) {
|
|
11
|
+
function getSortEntry(columnKey) {
|
|
12
|
+
const index = options.sortState.value.findIndex(entry => entry.key === columnKey);
|
|
13
|
+
if (index < 0) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const entry = options.sortState.value[index];
|
|
17
|
+
if (!entry) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return { entry, index };
|
|
21
|
+
}
|
|
22
|
+
function getHeaderSortDirection(columnKey) {
|
|
23
|
+
return getSortEntry(columnKey)?.entry.direction ?? null;
|
|
24
|
+
}
|
|
25
|
+
function getHeaderSortPriority(columnKey) {
|
|
26
|
+
const entry = getSortEntry(columnKey);
|
|
27
|
+
if (!entry) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return entry.index + 1;
|
|
31
|
+
}
|
|
32
|
+
function getHeaderAriaSort(columnKey) {
|
|
33
|
+
const direction = getHeaderSortDirection(columnKey);
|
|
34
|
+
if (direction === "asc") {
|
|
35
|
+
return "ascending";
|
|
36
|
+
}
|
|
37
|
+
if (direction === "desc") {
|
|
38
|
+
return "descending";
|
|
39
|
+
}
|
|
40
|
+
return "none";
|
|
41
|
+
}
|
|
42
|
+
function applySortFromHeader(columnKey, keepExisting) {
|
|
43
|
+
if (!options.isSortableColumn(columnKey)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const existing = getSortEntry(columnKey);
|
|
47
|
+
const nextDirection = cycleDirection(existing?.entry.direction ?? null);
|
|
48
|
+
const nextState = keepExisting
|
|
49
|
+
? [...options.sortState.value]
|
|
50
|
+
: [];
|
|
51
|
+
if (existing) {
|
|
52
|
+
nextState.splice(existing.index, 1);
|
|
53
|
+
}
|
|
54
|
+
if (nextDirection !== null) {
|
|
55
|
+
nextState.push({ key: columnKey, direction: nextDirection });
|
|
56
|
+
}
|
|
57
|
+
if (nextState.length === options.sortState.value.length) {
|
|
58
|
+
const same = nextState.every((entry, index) => {
|
|
59
|
+
const previous = options.sortState.value[index];
|
|
60
|
+
return previous?.key === entry.key && previous?.direction === entry.direction;
|
|
61
|
+
});
|
|
62
|
+
if (same) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
options.sortState.value = nextState;
|
|
67
|
+
}
|
|
68
|
+
function applyExplicitSort(columnKey, direction) {
|
|
69
|
+
if (!options.isSortableColumn(columnKey)) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (direction === null) {
|
|
73
|
+
options.sortState.value = options.sortState.value.filter(entry => entry.key !== columnKey);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
options.sortState.value = [{ key: columnKey, direction }];
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
getSortEntry,
|
|
80
|
+
getHeaderSortDirection,
|
|
81
|
+
getHeaderSortPriority,
|
|
82
|
+
getHeaderAriaSort,
|
|
83
|
+
applySortFromHeader,
|
|
84
|
+
applyExplicitSort,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseDataGridHistoryActionRunnerOptions {
|
|
2
|
+
hasInlineEditor: () => boolean;
|
|
3
|
+
commitInlineEdit: () => void;
|
|
4
|
+
closeContextMenu: () => void;
|
|
5
|
+
canUndo: () => boolean;
|
|
6
|
+
canRedo: () => boolean;
|
|
7
|
+
runHistoryAction: (direction: "undo" | "redo") => Promise<string | null>;
|
|
8
|
+
setLastAction: (message: string) => void;
|
|
9
|
+
onError?: (direction: "undo" | "redo", error: unknown) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface UseDataGridHistoryActionRunnerResult {
|
|
12
|
+
runHistoryAction: (direction: "undo" | "redo", trigger: "keyboard" | "control") => Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useDataGridHistoryActionRunner(options: UseDataGridHistoryActionRunnerOptions): UseDataGridHistoryActionRunnerResult;
|
|
15
|
+
//# sourceMappingURL=useDataGridHistoryActionRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridHistoryActionRunner.d.ts","sourceRoot":"","sources":["../../src/useDataGridHistoryActionRunner.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qCAAqC;IACpD,eAAe,EAAE,MAAM,OAAO,CAAA;IAC9B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,OAAO,EAAE,MAAM,OAAO,CAAA;IACtB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACxE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/D;AAED,MAAM,WAAW,oCAAoC;IACnD,gBAAgB,EAAE,CAChB,SAAS,EAAE,MAAM,GAAG,MAAM,EAC1B,OAAO,EAAE,UAAU,GAAG,SAAS,KAC5B,OAAO,CAAC,OAAO,CAAC,CAAA;CACtB;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,qCAAqC,GAC7C,oCAAoC,CAwCtC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function useDataGridHistoryActionRunner(options) {
|
|
2
|
+
async function runHistoryAction(direction, trigger) {
|
|
3
|
+
if (options.hasInlineEditor()) {
|
|
4
|
+
options.commitInlineEdit();
|
|
5
|
+
}
|
|
6
|
+
options.closeContextMenu();
|
|
7
|
+
if (direction === "undo" && !options.canUndo()) {
|
|
8
|
+
options.setLastAction("Nothing to undo");
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
if (direction === "redo" && !options.canRedo()) {
|
|
12
|
+
options.setLastAction("Nothing to redo");
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const committedId = await options.runHistoryAction(direction);
|
|
17
|
+
if (!committedId) {
|
|
18
|
+
options.setLastAction(direction === "undo" ? "Nothing to undo" : "Nothing to redo");
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
options.setLastAction(direction === "undo"
|
|
22
|
+
? `Undo ${committedId} (${trigger})`
|
|
23
|
+
: `Redo ${committedId} (${trigger})`);
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
options.onError?.(direction, error);
|
|
28
|
+
options.setLastAction(direction === "undo" ? "Undo failed" : "Redo failed");
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
runHistoryAction,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export type DataGridInlineEditorMode = "text" | "select";
|
|
2
|
+
export interface DataGridInlineEditorState<TColumnKey extends string> {
|
|
3
|
+
rowId: string;
|
|
4
|
+
columnKey: TColumnKey;
|
|
5
|
+
draft: string;
|
|
6
|
+
mode: DataGridInlineEditorMode;
|
|
7
|
+
}
|
|
8
|
+
export interface DataGridInlineEditTarget<TColumnKey extends string> {
|
|
9
|
+
rowId: string;
|
|
10
|
+
columnKey: TColumnKey;
|
|
11
|
+
}
|
|
12
|
+
export interface UseDataGridInlineEditOrchestrationOptions<TRow, TColumnKey extends string, TRange = unknown, TSnapshot = unknown> {
|
|
13
|
+
sourceRows: () => readonly TRow[];
|
|
14
|
+
setSourceRows: (rows: readonly TRow[]) => void;
|
|
15
|
+
cloneRow: (row: TRow) => TRow;
|
|
16
|
+
resolveRowId: (row: TRow) => string;
|
|
17
|
+
resolveCellValue: (row: TRow, columnKey: string) => unknown;
|
|
18
|
+
isEditableColumn: (columnKey: string) => columnKey is TColumnKey;
|
|
19
|
+
isSelectColumn?: (columnKey: string) => boolean;
|
|
20
|
+
resolveRowLabel?: (row: TRow) => string;
|
|
21
|
+
applyEditedValue: (row: TRow, columnKey: TColumnKey, draft: string) => void;
|
|
22
|
+
finalizeEditedRow?: (row: TRow, columnKey: TColumnKey, draft: string) => void;
|
|
23
|
+
focusInlineEditor?: (rowId: string, columnKey: TColumnKey, mode: DataGridInlineEditorMode, openPicker: boolean) => void | Promise<void>;
|
|
24
|
+
setLastAction?: (message: string) => void;
|
|
25
|
+
captureBeforeSnapshot?: () => TSnapshot;
|
|
26
|
+
resolveAffectedRange?: (target: DataGridInlineEditTarget<TColumnKey>) => TRange | null;
|
|
27
|
+
recordIntentTransaction?: (descriptor: {
|
|
28
|
+
intent: "edit";
|
|
29
|
+
label: string;
|
|
30
|
+
affectedRange: TRange | null;
|
|
31
|
+
}, beforeSnapshot: TSnapshot) => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
export interface UseDataGridInlineEditOrchestrationResult<TRow, TColumnKey extends string> {
|
|
34
|
+
getInlineEditor: () => DataGridInlineEditorState<TColumnKey> | null;
|
|
35
|
+
subscribeInlineEditor: (listener: (editor: DataGridInlineEditorState<TColumnKey> | null) => void) => () => void;
|
|
36
|
+
isEditingCell: (rowId: string, columnKey: string) => boolean;
|
|
37
|
+
isSelectEditorCell: (rowId: string, columnKey: string) => boolean;
|
|
38
|
+
beginInlineEdit: (row: TRow, columnKey: string, mode?: DataGridInlineEditorMode, openPicker?: boolean) => boolean;
|
|
39
|
+
cancelInlineEdit: () => void;
|
|
40
|
+
commitInlineEdit: () => boolean;
|
|
41
|
+
updateEditorDraft: (value: string) => void;
|
|
42
|
+
onEditorInput: (event: Event) => void;
|
|
43
|
+
onEditorSelectChange: (value: string | number) => boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function useDataGridInlineEditOrchestration<TRow, TColumnKey extends string, TRange = unknown, TSnapshot = unknown>(options: UseDataGridInlineEditOrchestrationOptions<TRow, TColumnKey, TRange, TSnapshot>): UseDataGridInlineEditOrchestrationResult<TRow, TColumnKey>;
|
|
46
|
+
//# sourceMappingURL=useDataGridInlineEditOrchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataGridInlineEditOrchestration.d.ts","sourceRoot":"","sources":["../../src/useDataGridInlineEditOrchestration.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,yBAAyB,CAAC,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