import type { HotInstance } from '../../core/types'; import { BasePlugin } from '../base'; export declare const PLUGIN_KEY = "manualColumnResize"; export declare const PLUGIN_PRIORITY = 130; /** * @plugin ManualColumnResize * @class ManualColumnResize * * @description * This plugin allows to change columns width. * * The plugin creates additional components to make resizing possibly using user interface: * - handle - the draggable element that sets the desired width of the column. * - guide - the helper guide that shows the desired width as a vertical guide. */ export declare class ManualColumnResize extends BasePlugin { #private; /** * Stores the horizontal pointer position at the start of a column resize drag operation. */ startX: number; /** * 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; /** * Initializes the plugin and applies CSS classes to the resize handle and guide elements. */ constructor(hotInstance: HotInstance); /** * @private * @returns {string} */ get inlineDir(): "right" | "left"; /** * 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 ManualColumnResize#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: * - [`manualColumnResize`](@/api/options.md#manualcolumnresize) */ updatePlugin(): void; /** * Disables the plugin functionality for this Handsontable instance. */ disablePlugin(): void; /** * Deprecated. The `PersistentState` plugin has been removed. This method is a no-op and will be removed in a * future major release. * * @deprecated */ saveManualColumnWidths(): void; /** * Deprecated. The `PersistentState` plugin has been removed. This method is a no-op and will be removed in a * future major release. * * @deprecated * @returns {Array} */ loadManualColumnWidths(): Array; /** * Sets the new width for specified column index. * * @param {number} column Visual column index. * @param {number} width Column width (no less than 20px). * @returns {number} Returns new width. */ setManualSize(column: number, width: number): number; /** * Clears the cache for the specified column index. * * @param {number} column Visual column index. */ clearManualSize(column: number): void; /** * Set the resize handle position. * * @private * @param {HTMLCellElement} TH TH HTML element. */ setupHandlePosition(TH: HTMLTableHeaderCellElement): void; /** * Refresh the resize handle position. * * @private */ refreshHandlePosition(): void; /** * Sets the resize guide position. * * @private */ setupGuidePosition(): void; /** * Refresh the resize guide position. * * @private */ refreshGuidePosition(): void; /** * Hides both the resize handle and resize guide. * * @private */ hideHandleAndGuide(): void; /** * Checks if provided element is considered a column header. * * @private * @param {HTMLElement} element HTML element. * @returns {boolean} */ checkIfColumnHeader(element: HTMLElement): boolean; /** * Gets the TH element from the provided element. * * @private * @param {HTMLElement} element HTML element. * @returns {HTMLElement} */ getClosestTHParent(element: HTMLElement): HTMLElement | null; /** * Auto-size row after doubleclick - callback. * * @private * @fires Hooks#beforeColumnResize * @fires Hooks#afterColumnResize */ afterMouseDownTimeout(): void; /** * Binds the mouse events. * * @private */ bindEvents(): void; /** * Destroys the plugin instance. */ destroy(): void; }