fluid-dnd
Version:
An agnostic drag and drop library to sort all kind of lists. With current support for vue, react and svelte
10 lines (9 loc) • 967 B
TypeScript
import { WindowScroll } from '../../../../index';
import { CoreConfig } from '../..';
import { DRAG_EVENT, START_DRAG_EVENT, START_DROP_EVENT } from '../../utils';
import { DroppableConfig } from '../../config/configHandler';
import HandlerPublisher from '../../HandlerPublisher';
type DraggingEvent = typeof DRAG_EVENT | typeof START_DRAG_EVENT;
type DropEvent = 'drop' | typeof START_DROP_EVENT;
export default function useDragAndDropEvents<T>(currentConfig: CoreConfig<T>, index: number, parent: HTMLElement, droppableGroupClass: string | null, handlerPublisher: HandlerPublisher, endDraggingAction: () => void): readonly [(draggedElement: HTMLElement, event: DraggingEvent, droppable: HTMLElement, config: CoreConfig<T>) => void, (draggedElement: HTMLElement, event: DropEvent, droppableConfig: DroppableConfig<T> | undefined, initialWindowScroll: WindowScroll, positionOnSourceDroppable?: number) => void, (element: Element, force: boolean) => void];
export {};