import { BasePlugin } from '../base'; export declare const PLUGIN_KEY = "dragToScroll"; export declare const PLUGIN_PRIORITY = 100; /** * Represents viewport boundaries used for drag-to-scroll detection. */ interface Boundaries { width?: number; height?: number; left: number; right: number; top: number; bottom: number; } /** * @description * Plugin used to scroll Handsontable by selecting a cell and dragging outside of the visible viewport. * * * @class DragToScroll * @plugin DragToScroll */ export declare class DragToScroll extends BasePlugin { #private; /** * Returns the plugin key used to identify this plugin in Handsontable settings. */ static get PLUGIN_KEY(): string; /** * Returns the priority order used to determine the order in which plugins are initialized. */ static get PLUGIN_PRIORITY(): number; /** * Returns the default settings applied when the plugin is enabled without explicit configuration. */ static get DEFAULT_SETTINGS(): { interval: { min: number; max: number; }; rampDistance: number; }; /** * Size of an element and its position relative to the viewport, * e.g. {bottom: 449, height: 441, left: 8, right: 814, top: 8, width: 806, x: 8, y:8}. * * @type {DOMRect} */ boundaries: Boundaries | null; /** * Callback function. * * @private * @type {Function} */ callback: ((diffX: number, diffY: number) => void) | null; /** * Flag indicates mouseDown/mouseUp. * * @private * @type {boolean} */ listening: boolean; /** * Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit} * hook and if it returns `true` then the {@link DragToScroll#enablePlugin} method is called. * * @returns {boolean} */ isEnabled(): boolean; /** * Enables the plugin functionality for this Handsontable instance. */ enablePlugin(): void; /** * Updates the plugin's state. * * This method is executed when [`updateSettings()`](@/api/core.md#updatesettings) is invoked with any of the following configuration options: * - [`dragToScroll`](@/api/options.md#dragtoscroll) */ updatePlugin(): void; /** * Disables the plugin functionality for this Handsontable instance. */ disablePlugin(): void; /** * Sets the boundaries/dimensions of the scrollable viewport. * * @param {DOMRect|{left: number, right: number, top: number, bottom: number}} [boundaries] An object with * coordinates. Contains the window boundaries by default. The object is compatible with DOMRect. */ setBoundaries(boundaries?: Boundaries): void; /** * Changes callback function. * * @param {Function} callback The callback function. */ setCallback(callback: (diffX: number, diffY: number) => void): void; /** * Checks if the mouse position (X, Y) is outside the viewport and fires a callback with calculated X an Y diffs * between passed boundaries. * * @param {number} x Mouse X coordinate to check. * @param {number} y Mouse Y coordinate to check. */ check(x: number, y: number): void; /** * Enables listening on `mousemove` event. * * @private */ listen(): void; /** * Disables listening on `mousemove` event. * * @private */ unlisten(): void; /** * Returns current state of listening. * * @private * @returns {boolean} */ isListening(): boolean; /** * Registers dom listeners. * * @private */ registerEvents(): void; /** * Unbinds the events used by the plugin. * * @private */ unregisterEvents(): void; /** * Destroys the plugin instance. */ destroy(): void; } export {};