import { TablePlan } from '../../../helpers/dom/table'; export declare const TABLE_CORNER_BUTTON = "editor-table-corner-button-decorator"; export declare const headerClassnames: { HEADER: string; COLUMN_DISPLAY: string; ROW_DISPLAY: string; HEADER_WRAPPER: string; WITH_HEADER: string; }; export declare const TABLE_FULLY_SELECTED = "editor-table-full-selection"; export declare const decoratedCellsClassnames: { BORDERED: string; BORDERED_ROW: string; BORDERED_COLUMN: string; BORDERED_TOP: string; BORDERED_RIGHT: string; BORDERED_BOTTOM: string; BORDERED_LEFT: string; BORDERED_ROUNDED: string; WITH_BUTTON_PANEL: string; }; export declare const buttonPanelClassnames: { PANEL: string; BUTTON: string; COLUMN_DISPLAY: string; ROW_DISPLAY: string; BEFORE_DISPLAY: string; CORNER_BUTTON: string; }; export declare const DEFAULT_BORDER_COLOR = "#c3c4c6"; export declare function isTableWrapper(node: Node): node is Element; export declare function isDecoratedTable(node: Node): node is Element; export declare function isTableCornerButtonDecorator(node: Node): node is Element; export declare function isHeaderDecorator(node: Node): node is Element; export declare function isHeaderDecoratorDecorated(node: Node): node is Element; export declare function isColumnHeaderDecorator(node: Node): node is Element; export declare function isRowHeaderDecorator(node: Node): node is Element; export declare function isButtonPanel(node: Node): node is Element; export declare function isTableFullySelected(node: Node): node is Element; /** * Add headers to each column/row. */ export declare function decorateTableForEdition(table: HTMLTableElement): void; export declare function updateTableHeaders(table: HTMLTableElement): void; export declare function decorateTableHeader(document: Document, table: HTMLTableElement, cell: HTMLTableCellElement, mode: 'row' | 'column', isFirstCell: boolean, isLastCell: boolean): void; /** * Add decorator to selected cells for edition. * @param cells: TablePlan containing each cells that will be decorated. */ export declare function decorateCellsAsSelected(cells: TablePlan, table: HTMLTableElement): void; export declare function decorateCellHeaderAsSelected(cell: HTMLTableCellElement, mode: 'row' | 'column', isOnlyOneSelected?: boolean): void; export declare function undecorateAllTableForEdition(container: Element): void; /** * Clean all decorators that were added to edit the table (inside and around it). */ export declare function undecorateTableForEdition(table: HTMLTableElement): void; /** * Clean all decorators that were added inside the table. */ export declare function undecorateInnerTable(table: HTMLTableElement): void; /** * Remove cells decorators that made them looked as selected. */ export declare function undecorateCellsAsSelected(table: HTMLTableElement): void; export declare function undecorateButtonPanels(table: HTMLTableElement): void; /** * Append button panel for table deletion. * @param cell: cell to which button panel is appended. * @param table: table to which button panel is appended. * @param deleteElement: handler called when clicking on the 'delete' button. */ export declare function appendButtonPanelToDelete(cell: HTMLTableCellElement, table: HTMLTableElement, deleteElement: () => void): void; /** * Append button panel for row/column addition/deletion. * @param cell: cell to which button panel is appended. * @param table: table to which button panel is appended. * @param mode: 'row' or 'column' (for alignment). * @param addBefore: handler called when clicking on the 'add before' button. * @param addAfter: handler called when clicking on the 'add after' button. * @param deleteElement: handler called when clicking on the 'delete' button. */ export declare function appendButtonPanel(cell: HTMLTableCellElement, table: HTMLTableElement, mode: 'row' | 'column', addBefore: () => void, addAfter: () => void, deleteElement: () => void): void;