import type CellCoords from '../../3rdparty/walkontable/src/cell/coords'; import type CellRange from '../../3rdparty/walkontable/src/cell/range'; import { BasePlugin } from '../base'; export declare const PLUGIN_KEY = "moveCells"; export declare const PLUGIN_PRIORITY = 25; /** * Ceiling on the number of cells one move or copy may span. `moveCellRange` makes roughly six full * passes over the source and target regions before anything changes (two read-only scans, two * movable-meta collections, the value snapshot, plus the UndoRedo plugin's two region snapshots), * and the undo stack retains two whole value matrices — so an unbounded range freezes the tab. * The drag path cannot produce a range anywhere near this size; the ceiling protects the public * `moveCellRange` API called with a programmatically built range. */ export declare const CELLS_LIMIT = 100000; /** * Provides drag-to-move and programmatic move/copy operations for cell selections. */ export declare class MoveCells extends BasePlugin { #private; /** * The plugin's registration key (the name of the setting that enables it). * * @returns {string} */ static get PLUGIN_KEY(): string; /** * The plugin's initialization priority within the plugin registry. * * @returns {number} */ static get PLUGIN_PRIORITY(): number; /** * The settings whose change through `updateSettings` triggers `updatePlugin`. * * @returns {string[]} */ static get SETTING_KEYS(): string[]; /** * Checks whether the plugin is enabled in the Handsontable settings. * * @returns {boolean} */ isEnabled(): boolean; /** * Enables selection move interactions. */ enablePlugin(): void; /** * Updates the plugin after its setting changes. */ updatePlugin(): void; /** * Disables selection move interactions and cancels an active drag. */ disablePlugin(): void; /** * Destroys the plugin and removes any active drag preview. */ destroy(): void; /** * Checks whether a move drag is currently in progress. Reachable through `getPlugin` because * DragToScroll needs it — it must not start auto-scrolling for a press this plugin rejected — but * internal, not part of the public API. * * @private * @returns {boolean} */ isDragActive(): boolean; /** * Moves or copies a visual cell range. * * @param {CellRange} sourceRange The source range. * @param {CellCoords} targetTopLeft The destination top-left cell. * @param {boolean} [isCopy=false] Whether to keep the source values. * @returns {boolean} Whether the operation completed. Returns `false` when the target equals the * source top-left (a no-op — no hook fires and no undo entry is recorded), when the range spans * more than {@link CELLS_LIMIT} cells, or when any other guard vetoes the operation. */ moveCellRange(sourceRange: CellRange, targetTopLeft: CellCoords, isCopy?: boolean): boolean; }