import type CellCoords from '../cell/coords'; import type { Overlay } from '../overlay/_base'; import CoreAbstract from '../core/_base'; /** * This layer cares about backward compatibility. * * @class WalkontableFacade * @augments Walkontable * @inheritDoc */ export default class WalkontableFacade { /** * The underlying Walkontable core instance with backward compatibility support. * * @type {CoreAbstract & Record} */ _wot: CoreAbstract & Record; /** * @param {SettingsPure|Walkontable} settingsOrInstance The Walkontable settings. */ constructor(settingsOrInstance: CoreAbstract | Record); /** * Initializes the facade from a settings object. * * @param {Record} settings - The Walkontable settings configuration. */ _initFromSettings(settings: Record): void; /** * Gets the unique identifier of the Walkontable instance. * * @returns {*} The unique identifier. */ get guid(): string; /** * Gets the root document used by the Walkontable instance. * * @returns {*} The root document. */ get rootDocument(): Document; /** * Gets the root window used by the Walkontable instance. * * @returns {*} The root window. */ get rootWindow(): Window; /** * Gets the settings manager for the Walkontable instance. * * @returns {*} The settings manager. */ get wtSettings(): import("../settings").default; /** * Gets the clone source of the Walkontable instance. * * @returns {*} The clone source. */ get cloneSource(): import("../types").WalkontableInstance; /** * Gets the clone overlay of the Walkontable instance. * * @returns {Overlay} The clone overlay. */ get cloneOverlay(): Overlay; /** * Gets the selection manager of the Walkontable instance. * * @returns {*} The selection manager. */ get selectionManager(): import("../selection").SelectionManager; /** * Gets the viewport manager of the Walkontable instance. * * @returns {*} The viewport manager. */ get wtViewport(): import("../viewport").default; /** * Gets the overlays manager of the Walkontable instance. * * @returns {*} The overlays manager. */ get wtOverlays(): import("../overlays").default; /** * Gets the table manager of the Walkontable instance. * * @returns {*} The table manager. */ get wtTable(): import("../table").default; /** * Gets the event manager of the Walkontable instance. * * @returns {*} The event manager. */ get wtEvent(): import("../event").default; /** * Gets the scroll manager of the Walkontable instance. * * @returns {*} The scroll manager. */ get wtScroll(): import("../scroll").default; /** * Gets whether the Walkontable instance has been drawn. * * @returns {*} True if drawn, false otherwise. */ get drawn(): boolean; /** * Sets whether the Walkontable instance has been drawn. * * @param {*} value - The drawn state. */ set drawn(value: boolean); /** * Gets the name of the active overlay. * * @returns {*} The active overlay name. */ get activeOverlayName(): string; /** * Gets whether drawing has been interrupted. * * @returns {*} True if drawing is interrupted, false otherwise. */ get drawInterrupted(): boolean; /** * Sets whether drawing has been interrupted. * * @param {*} value - The interrupted state. */ set drawInterrupted(value: boolean); /** * Gets the last element that was moused over. * * @returns {HTMLElement | null} The last moused-over element, or null. */ get lastMouseOver(): HTMLElement | null; /** * Sets the last element that was moused over. * * @param {*} value - The element to set. */ set lastMouseOver(value: HTMLElement | null); /** * Gets the momentum scrolling state. * * @returns {{ ongoing?: boolean; _timeout?: ReturnType }} The momentum scrolling state. */ get momentumScrolling(): { ongoing?: boolean; _timeout?: ReturnType; }; /** * Sets the momentum scrolling state. * * @param {*} value - The momentum scrolling state. */ set momentumScrolling(value: { ongoing?: boolean; _timeout?: ReturnType; }); /** * Gets whether touch input has been applied. * * @returns {boolean} True if touch was applied, false otherwise. */ get touchApplied(): boolean; /** * Sets whether touch input has been applied. * * @param {*} value - The touch applied state. */ set touchApplied(value: boolean); /** * Gets the DOM bindings configuration. * * @returns {*} The DOM bindings. */ get domBindings(): import("../types").DomBindings; /** * Gets the list of event listeners. * * @returns {unknown[]} The array of event listeners. */ get eventListeners(): unknown[]; /** * Sets the list of event listeners. * * @param {*} value - The event listeners array. */ set eventListeners(value: unknown[]); /** * Gets the event manager instance. * * @returns {*} The event manager. */ get eventManager(): import("../../../../eventManager").default; /** * Creates a new cell coordinates object. * * @param {number} row - The row index. * @param {number} column - The column index. * @returns {*} The new cell coordinates object. */ createCellCoords(row: number, column: number): CellCoords; /** * Creates a new cell range. * * @param {CellCoords} highlight - The highlighted cell coordinates. * @param {CellCoords} from - The starting cell coordinates. * @param {CellCoords} to - The ending cell coordinates. * @returns {*} The new cell range. */ createCellRange(highlight: CellCoords, from: CellCoords, to: CellCoords): import("..").CellRange; /** * Redraws the table. * * @param {boolean} [fastDraw=false] - Whether to perform a fast draw. * @returns {WalkontableFacade} This instance for method chaining. */ draw(fastDraw?: boolean): this; /** * Gets the DOM cell element at the specified coordinates. * * @param {CellCoords} coords - The cell coordinates. * @param {boolean} [topmost=false] - Whether to get the topmost element. * @returns {*} The DOM cell element. */ getCell(coords: CellCoords, topmost?: boolean): -1 | HTMLElement | -5 | -2 | -3 | -4 | undefined; /** * Scrolls the viewport to the specified cell coordinates. * * @param {CellCoords} coords - The cell coordinates to scroll to. * @param {string} horizontalSnap - The horizontal snap setting. * @param {string} verticalSnap - The vertical snap setting. * @returns {*} The result of the scroll operation. */ scrollViewport(coords: CellCoords, horizontalSnap: string, verticalSnap: string): boolean; /** * Scrolls the viewport horizontally. * * @param {number} column - The column index to scroll to. * @param {string} snapping - The snapping setting. * @returns {*} The result of the scroll operation. */ scrollViewportHorizontally(column: number, snapping: string): boolean; /** * Scrolls the viewport vertically. * * @param {number} row - The row index to scroll to. * @param {string} snapping - The snapping setting. * @returns {*} The result of the scroll operation. */ scrollViewportVertically(row: number, snapping: string): boolean; /** * Gets the current viewport dimensions. * * @returns {*} The viewport dimensions. */ getViewport(): number[]; /** * Gets the name of the currently active overlay. * * @returns {string} The overlay type name, or 'master' if no clone overlay. */ getOverlayName(): string; /** * Gets an overlay by its name. * * @param {string} overlayName - The name of the overlay to retrieve. * @returns {Overlay | null} The overlay, or null if not found. */ getOverlayByName(overlayName: string): Overlay | null; /** * Exports the current settings as CSS class names on the table element. */ exportSettingsAsClassNames(): void; /** * Updates Walkontable settings. * * @param {string | Record} settings - The setting key or settings object. * @param {unknown} value - The value to set (when settings is a string). * @returns {WalkontableFacade} This instance for method chaining. */ update(settings: string | Record, value: unknown): this; /** * Gets a setting value. * * @param {string} key - The setting key. * @param {unknown} param1 - Optional parameter. * @param {unknown} param2 - Optional parameter. * @param {unknown} param3 - Optional parameter. * @param {unknown} param4 - Optional parameter. * @returns {unknown} The setting value. */ getSetting(key: string, param1: unknown, param2: unknown, param3: unknown, param4: unknown): unknown; /** * Checks whether a setting exists. * * @param {string} key - The setting key. * @returns {*} True if the setting exists, false otherwise. */ hasSetting(key: string): boolean; /** * Destroys the Walkontable instance and cleans up resources. */ destroy(): void; }