UNPKG

hy-vue-gantt

Version:

Evolution of vue-ganttastic package

31 lines 2.02 kB
import { type ComputedRef, type Ref } from "vue"; import type { GGanttChartConfig, GanttBarObject, ConnectionStartEvent, ConnectionDragEvent, ConnectionCompleteEvent, ConnectionCreationState, ConnectionPointHoverState, ConnectionPoint } from "../types"; import type { UseRowsReturn } from "../composables/useRows"; export interface UseConnectionCreationReturn { connectionState: Ref<ConnectionCreationState>; hoverState: Ref<ConnectionPointHoverState>; startConnectionCreation: (bar: GanttBarObject, point: ConnectionPoint, e: MouseEvent) => void; updateConnectionDrag: (e: MouseEvent) => void; completeConnection: (targetBar: GanttBarObject, targetPoint: ConnectionPoint, e: MouseEvent) => void; cancelConnectionCreation: (e: MouseEvent) => void; handleConnectionPointHover: (barId: string, point: ConnectionPoint | null, isEnter: boolean) => void; canBeConnectionTarget: ComputedRef<(bar: GanttBarObject) => boolean>; } /** * A composable that manages the creation and manipulation of connections between bars in the Gantt chart * Allows users to draw connections between bars through drag-and-drop interactions * Handles validation, visual feedback, and actual connection creation * * @param config - Gantt chart configuration * @param rowManager - Row management utilities * @param emit - Function to emit events * @param reinitializeConnections - Function to reinitialize connections after creation/modification * @returns Object containing connection state and management methods */ export declare function useConnectionCreation(config: GGanttChartConfig, rowManager: UseRowsReturn, emit: { (e: "connection-start", value: ConnectionStartEvent): void; (e: "connection-drag", value: ConnectionDragEvent): void; (e: "connection-complete", value: ConnectionCompleteEvent): void; (e: "connection-cancel", value: ConnectionStartEvent): void; }, reinitializeConnections: () => void): UseConnectionCreationReturn; //# sourceMappingURL=useConnectionCreation.d.ts.map