import { BasePlugin } from '../base'; export declare const PLUGIN_KEY = "stretchColumns"; export declare const PLUGIN_PRIORITY = 155; /** * @plugin StretchColumns * @class StretchColumns * * @description * This plugin allows to set column widths based on their widest cells. * * By default, the plugin is declared as `'none'`, which makes it disabled (same as if it was declared as `false`). * * The plugin determines what happens when the declared grid width is different from the calculated sum of all column widths. * * ```js * // fit the grid to the container, by stretching only the last column * stretchH: 'last', * * // fit the grid to the container, by stretching all columns evenly * stretchH: 'all', * ``` * * To configure this plugin see {@link Options#stretchH}. * * @example * * ::: only-for javascript * ```js * const hot = new Handsontable(document.getElementById('example'), { * data: getData(), * stretchH: 'all', * }); * ``` * ::: * * ::: only-for react * ```jsx * const hotRef = useRef(null); * * ... * * // First, let's construct Handsontable * * ``` * ::: * * ::: only-for angular * ```ts * settings = { * data: getData(), * stretchH: "all", * }; * ``` * * ```html * * ``` * ::: */ export declare class StretchColumns 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 whether the plugin handles its own settings keys without a dedicated key list. */ static get SETTING_KEYS(): 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 #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 {@link Core#updateSettings} is invoked. */ updatePlugin(): void; /** * Disables the plugin functionality for this Handsontable instance. */ disablePlugin(): void; /** * Gets the calculated column width based on the stretching * strategy defined by {@link Options#stretchH} option. * * @param {number} columnVisualIndex The visual index of the column. * @returns {number | null} */ getColumnWidth(columnVisualIndex: number): number | null; /** * Destroys the plugin instance. */ destroy(): void; }