import type { ColumnReorderDragOption, DraggableOption, DropzonePillDragOption, MouseWheelOption, ResizableOption } from './models/index.js'; /*** * Interactions, add basic behaviors to any element. * All the packages are written in pure vanilla JS and supports both mouse & touch events. * @module Interactions * @namespace Slick */ /** * Draggable Class, enables dragging functionality for any element for example cell & row selections. * Note that mouse/touch start is on the specified container element but all other events are on the document body. * code refs: * https://betterprogramming.pub/perfecting-drag-and-drop-in-pure-vanilla-javascript-a761184b797a * available optional options: * - containerElement: container DOM element, defaults to "document" * - dragFromClassDetectArr: array of tags and query selectors/ids to match on dragstart, used to determine * drag source element. eg: [ { tag: 'B', id: 'myElement' }, { tag: 'A', cssSelector: 'div.myClass' } ] * - allowDragFrom: when defined, only allow dragging from an element that matches a specific query selector * - allowDragFromClosest: when defined, only allow dragging from an element or its parent matching a specific .closest() query selector * - onDragInit: drag initialized callback * - onDragStart: drag started callback * - onDrag: drag callback * - onDragEnd: drag ended callback * @param {Object} options * @returns - Draggable instance which includes destroy method * @class Draggable */ export declare function Draggable(options: DraggableOption): { destroy: () => void; }; /** * MouseWheel Class, add mousewheel listeners and calculate delta values and return them in the callback function. * available optional options: * - element: optional DOM element to attach mousewheel values, if undefined we'll attach it to the "window" object * - onMouseWheel: mousewheel callback * @param {Object} options * @returns - MouseWheel instance which includes destroy method * @class MouseWheel */ export declare function MouseWheel(options: MouseWheelOption): { destroy: () => void; }; /** * Resizable Class, enables resize functionality for any element * Code mostly comes from these 2 resources: * https://spin.atomicobject.com/2019/11/21/creating-a-resizable-html-element/ * https://htmldom.dev/make-a-resizable-element/ * available optional options: * - resizeableElement: resizable DOM element * - resizeableHandleElement: resizable DOM element * - onResizeStart: resize start callback * - onResize: resizing callback * - onResizeEnd: resize ended callback * @param {Object} options * @returns - Resizable instance which includes destroy method * @class Resizable */ export declare function Resizable(options: ResizableOption): { destroy: () => void; }; /** * Applies a column header drag to a column list: every column listed in `originalIds` hands its index * to the column at the same position in `reorderedIds`, so hidden and non-reorderable columns, and * columns that belong to another header container (docking band), keep their original indices. * When `originalIds` is omitted, the visible reorderable columns in column order are used. * Returns an unchanged copy when both id lists do not hold the same columns. * @param {Array} columns - column definitions before the drag * @param {Array} reorderedIds - reorderable header ids in DOM order after the drag * @param {Array} [originalIds] - reorderable header ids in DOM order before the drag */ export declare function reconcileColumnOrder(columns: T[], reorderedIds: string[], originalIds?: string[]): T[]; /** * Sets up native HTML5 drag-and-drop for column header reordering (replaces the previous SortableJS dependency), * ported from the Slickgrid-Universal implementation of the same feature. * * Handles: * - Making orderable header columns draggable * - Live DOM reordering during dragover (constrained to the column's own header container, * so columns never cross into another container such as a docking band) * - Browser-edge auto-scroll (left / right) during drag * - Firefox+Linux ghost rendering fix via explicit setDragImage, with a mouse-based fallback drag * - Touch-based fallback drag for touch screens (which never fire HTML5 drag events) * - Storing the dragged column's data-id in dataTransfer (for cross-container drops, e.g. draggable grouping) * * @param {Object} options * @returns - setupColumnReorderDrag instance which includes destroy method * @class setupColumnReorderDrag */ export declare function setupColumnReorderDrag(options: ColumnReorderDragOption): { destroy: () => void; }; /** * Sets up drag-and-drop for reordering group pills inside a dropzone (used by SlickDraggableGrouping), * plus accepting column-header drops that create new group pills. * Ported from the Slickgrid-Universal implementation of the same feature. * * All Firefox+Linux detection and mouse-based fallback are handled internally; * callers do not need to know about the browser quirk. Touch screens (which never * fire HTML5 drag events) use the same pointer-based fallback. * * @param {Object} options * @returns - setupDropzonePillDrag instance which includes destroy method * @class setupDropzonePillDrag */ export declare function setupDropzonePillDrag(options: DropzonePillDragOption): { destroy: () => void; }; //# sourceMappingURL=slick.interactions.d.ts.map