import type { EAlignment , ILinkColumnDesc } from '../../model' ; import ColumnBuilder from './ColumnBuilder' ; export default class StringColumnBuilder extends ColumnBuilder < ILinkColumnDesc > { constructor ( column ) { super ( 'string' , column ) ; } /**
     * makes the text editable within a cell and switches to the annotate type
     */ editable ( ) { this . desc . type = 'annotate' ; return this ; } /**
     * changes the alignment of the column
     */ alignment ( align ) { this . desc . alignment = align ; return this ; } /**
     * allow html text as values
     */ html ( ) { this . desc . escape = false ; return this ; } param { string } pattern param { string [ ] } templates pattern ( pattern , templates ? ) { this . desc . type = 'link' ; this . desc . pattern = pattern ; if ( templates ) { this . desc . patternTemplates = templates ; } return this ; } } param { string } column returns { StringColumnBuilder } export function buildStringColumn ( column ) { return new StringColumnBuilder ( column ) ; }