UNPKG

docxml

Version:

TypeScript (component) library for building and parsing a DOCX file

70 lines (69 loc) 2.68 kB
import { Length } from '../utilities/length.js'; import { type ArtBorderType, type Border, type LineBorderType } from './shared-properties.js'; export declare type TableProperties = { /** * Show this table according to the style that is referenced through this style identifier. */ style?: string | null; /** * Sets the width for the entire table, can be either a percent or absolute measurement. */ width?: null | number | '`${number}%' | string | { length: '`${number}%' | string | number; unit: null | 'nil' | 'auto' | 'dxa' | 'pct' | undefined; } | undefined; /** * When set to `true`, the column widths as specified to the {@link Table} component are used * strictly. If not set, or set to `false`, the specified column widths are considered a * preference only, and may change depending on the column contents. */ strictColumnWidths?: boolean | null; /** * The distance with which this table is indented from the left page boundary. */ indentation?: null | Length; /** * The distance between cells. */ cellSpacing?: null | Length; /** * If banding is used, specifies how many rows constitute one banded group. */ rowBandingSize?: null | number; /** * If banding is used, specifies how many columns constitute one banded group. */ columnBandingSize?: null | number; /** * The conditions that will be evaluated for conditional formatting of table parts. * * @todo rename to something more descriptive? */ activeConditions?: null | { firstColumn?: null | boolean; lastColumn?: null | boolean; firstRow?: null | boolean; lastRow?: null | boolean; noHBand?: null | boolean; noVBand?: null | boolean; }; /** * The cell padding, space between its border and its contents, for each side of a cell. */ cellPadding?: null | { top?: null | Length; bottom?: null | Length; start?: null | Length; end?: null | Length; }; borders?: null | { top?: null | Border<LineBorderType | ArtBorderType>; start?: null | Border<LineBorderType | ArtBorderType>; bottom?: null | Border<LineBorderType | ArtBorderType>; end?: null | Border<LineBorderType | ArtBorderType>; insideH?: null | Border<LineBorderType | ArtBorderType>; insideV?: null | Border<LineBorderType | ArtBorderType>; }; }; export declare function tablePropertiesFromNode(node: Node | null): TableProperties; export declare function tablePropertiesToNode(tblpr?: TableProperties): Node;