hy-vue-gantt
Version:
Evolution of vue-ganttastic package
51 lines • 1.44 kB
TypeScript
import { type Ref } from "vue";
import type { ChartRow } from "../types";
/**
* Type Drop position
*/
type DropPosition = "before" | "after" | "child";
/**
* Target release state
*/
interface DropTarget {
row: ChartRow | null;
position: DropPosition;
}
/**
* Result of the drag and drop operation
*/
interface DragResult {
sourceRow: ChartRow | null;
dropTarget: DropTarget;
dropPosition: DropPosition;
}
/**
* Complete state of the touch drag operation
*/
export interface TouchDragState {
isDragging: boolean;
startY: number;
currentY: number;
draggedRow: ChartRow | null;
dropTarget: DropTarget;
dragElement: HTMLElement | null;
initialTransform: string;
}
/**
* Return type del composable
*/
interface RowTouchDragReturn {
touchState: Ref<TouchDragState>;
handleTouchStart: (event: TouchEvent, row: ChartRow, element: HTMLElement) => void;
handleTouchMove: (event: TouchEvent, targetRow: ChartRow, rowElement: HTMLElement) => void;
handleTouchEnd: (event: TouchEvent) => DragResult | null;
resetTouchState: () => void;
}
/**
* A composable that manages touch-based drag and drop functionality for rows
* Handles touch events, visual feedback, and drop position detection
* @returns Object containing touch state and event handlers
*/
export declare function useRowTouchDrag(): RowTouchDragReturn;
export {};
//# sourceMappingURL=useRowTouchDrag.d.ts.map