export type RowDragEndEvent = { row: TData; toIndex: number; sameGrid: boolean; fromGridId: number; toGridId: number; }; export declare function createRowDrag(ctx: any): { onRowDragStart: (e: DragEvent, rowIndex: number) => void; onRowDragOver: (e: DragEvent, rowIndex: number) => void; onRowDragLeave: (rowIndex: number) => void; onRowDrop: (e: DragEvent, rowIndex: number) => void; onRowsContainerDragOver: (e: DragEvent) => void; onRowsContainerDrop: (e: DragEvent) => void; onRowDragEnd: () => void; rowDragGridId: number; /** * Clear any managed drag this grid currently owns. Call on unmount so an * interrupted drag (route change / `{#if}` toggle mid-drag) doesn't leave a * stale module-level `bus` that fires `removeFromSource` against a destroyed * grid's data on the next grid instance (#68). Guarded by `gridId` so it * never disturbs a concurrent drag owned by another grid. */ destroyRowDrag(): void; }; /** Options for the {@link rowDropZone} action. */ export type RowDropZoneOptions = { /** * Only accept rows dragged from a grid with this `rowDragGroup`. Omit to * accept a managed row drag from any grid. */ group?: string; /** * Called when a managed row is dropped on the element. The row has already * been removed from its source grid; add it to your own list/state here. */ onDrop: (payload: { row: TData; fromGridId: number; }) => void; /** Class toggled on the element while a matching row is dragged over it. */ overClass?: string; }; /** * Svelte action turning ANY element into an external drop target for managed * row dragging - a trash can, an "assign to" bucket, a second pane. Attach with * `use:rowDropZone={{ group, onDrop }}`. On drop the dragged row is removed from * its source grid and handed to `onDrop`. * * ```svelte *
archive(e.row) }}>Archive
* ``` */ export declare function rowDropZone(node: HTMLElement, options: RowDropZoneOptions): { update(next: RowDropZoneOptions): void; destroy(): void; };