import { TableLayout } from "https://deno.land/x/cliffy@v0.17.0/table/layout.ts";
Table layout renderer.
Constructors
new
TableLayout(table: Table, options: ITableSettings)Table layout constructor.
Methods
protected
createCell(cell: ICell | null, row: Row): CellCreate a new cell from existing cell or cell value.
protected
createLayout(): IRenderSettingsGenerates table layout including row and col span, converts all none Cell/Row values to Cell's and Row's and returns the layout rendering settings.
protected
renderBorderCell(colIndex: number,
rowSpan: number[],
opts: IRenderSettings,
Render border cell.
protected
renderBorderRow(rowSpan: number[],
opts: IRenderSettings,
Render border row.
protected
renderCell(colIndex: number,
rowSpan: number[],
opts: IRenderSettings,
noBorder?: boolean,
Render cell.
protected
renderCellValue(cell: Cell, maxLength: number): { current: string; next: Cell; }Render specified length of cell. Returns the rendered value and a new cell with the rest value.
protected
renderRow(rowSpan: number[],
rowIndex: number,
opts: IRenderSettings,
isMultiline?: boolean,
Render row.
protected
renderRows(opts: IRenderSettings): stringRender table layout.
Fills rows and cols by specified row/col span with a reference of the original cell.
toString(): string
Generate table string.