interface SourceHeaderCell { colspan?: number; origColspan?: number; isPlaceholder?: boolean; [key: string]: unknown; } /** * List of properties which are configurable. That properties can be changed using public API. * * @type {string[]} */ export declare const HEADER_CONFIGURABLE_PROPS: string[]; /** * The class manages and normalizes settings passed by the developer * into the nested headers plugin. The SourceSettings class is a * source of truth for tree builder (HeaderTree) module. * * @private * @class SourceSettings */ export default class SourceSettings { #private; /** * Sets columns limit to the source settings will be trimmed. * * @param {number} columnsCount The number of columns to limit to. */ setColumnsLimit(columnsCount: number): void; /** * Sets a new nested header configuration. * * @param {Array[]} [nestedHeadersSettings=[]] The user-defined nested headers settings. */ setData(nestedHeadersSettings?: unknown[][]): void; /** * Gets normalized source settings. * * @returns {Array[]} */ getData(): SourceHeaderCell[][]; /** * Merges settings with current source settings. * * @param {object[]} additionalSettings An array of objects with `row`, `col` and additional * properties to merge with current source settings. */ mergeWith(additionalSettings: { row: number; col: number; [key: string]: unknown; }[]): void; /** * Maps the current state with a callback. * * @param {Function} callback A function that is called for every header settings. */ map(callback: (headerSettings: Record) => unknown): void; /** * Gets source column header settings for a specified header. * * @param {number} headerLevel Header level (0 = most distant to the table). * @param {number} columnIndex A visual column index. * @returns {object|null} */ getHeaderSettings(headerLevel: number, columnIndex: number): SourceHeaderCell | null; /** * Gets source of column headers settings for specified headers. * * @param {number} headerLevel Header level (0 = most distant to the table). * @param {number} columnIndex A visual column index from which the settings will be extracted. * @param {number} [columnsLength=1] The number of columns involved in the extraction of settings. * @returns {object} */ getHeadersSettings(headerLevel: number, columnIndex: number, columnsLength?: number): unknown[]; /** * Inserts `amount` columns into the normalized settings starting at the visual `columnIndex`. * * The behavior mirrors the MergeCells plugin: a column inserted strictly inside a header's span * extends that header (and every ancestor that also spans the point), while a column inserted at a * header's left boundary (or before/after the whole structure) is added as a standalone header. * In the normalized representation "strictly inside a span" is exactly "the cell at the insert * index is a placeholder". * * @param {number} columnIndex A visual column index at which the new columns are inserted. * @param {number} amount The number of columns to insert. */ insertColumns(columnIndex: number, amount: number): void; /** * Removes `amount` columns from the normalized settings starting at the visual `columnIndex`. * * Every header that overlaps the removed range is shrunk by the number of removed columns it * covered. A header that loses all its columns is dropped; a header whose leftmost (labeled) * column is removed but which still has surviving columns is re-anchored to the first surviving * column, keeping its label and configurable properties. * * @param {number} columnIndex A visual column index from which the columns are removed. * @param {number} amount The number of columns to remove. */ removeColumns(columnIndex: number, amount: number): void; /** * Gets a total number of headers levels. * * @returns {number} */ getLayersCount(): number; /** * Gets a total number of columns count. * * @returns {number} */ getColumnsCount(): number; /** * Clears the data. */ clear(): void; } export {};