import type { WalkontableInstance } from '../types'; import type Selection from './selection'; /** * Minimal interface for the selections container passed to SelectionManager. * The full implementation is in src/selection/highlight/highlight.ts. */ interface SelectionsContainer { getFocus(): Selection | null; createLayeredArea(): Selection | null; options?: { cellAttributes?: Array<[string, string | number | boolean]>; headerAttributes?: Array<[string, string | number | boolean]>; }; [Symbol.iterator](): Iterator; } import Border from './border/border'; /** * Module responsible for rendering selections (CSS classes) and borders based on the * collection of the Selection instances provided throughout the `selections` Walkontable * setting. * * @private */ export declare class SelectionManager { #private; /** * Creates a new SelectionManager instance. * * @param {SelectionsContainer | null} selections The Highlight instance that holds Selection instances. */ constructor(selections: SelectionsContainer | null); /** * Sets the active Walkontable instance. * * @param {Walkontable} activeWot The overlays or master Walkontable instance. * @returns {SelectionManager} */ setActiveOverlay(activeWot: WalkontableInstance): this; /** * Gets the Selection instance of the "focus" type. * * @returns {Selection|null} */ getFocusSelection(): Selection | null; /** * Gets the Selection instance of the "area" type. * * @returns {Selection|null} */ getAreaSelection(): Selection | null; /** * Gets the Border instance associated with Selection instance. * * @param {Selection} selection The selection instance. * @returns {Border|null} Returns the Border instance (new for each overlay Walkontable instance). */ getBorderInstance(selection: Selection): Border | null | undefined; /** * Gets all Border instances associated with Selection instance for all overlays. * * @param {Selection} selection The selection instance. * @returns {Border[]} */ getBorderInstances(selection: Selection): Border[]; /** * Destroys the Border instance associated with Selection instance. * * @param {Selection} selection The selection instance. */ destroyBorders(selection: Selection): void; /** * Refreshes the multiple selector handle styles on all border instances after a theme change. */ refreshAllBorderHandleStyles(): void; /** * Renders all the selections (add CSS classes to cells and draw borders). * * @param {boolean} fastDraw Indicates the render cycle type (fast/slow). */ render(fastDraw: boolean): void; } export {};