import { TemplateRef } from '@angular/core'; /** * Column config for CustomTable */ export interface CustomColumnConfig { /** * Identifier for table column. * If we want to use #defaultTemplate of CustomTable, id must be kept same as row object's propertyName. */ id: string; /** * Title of the column. It will be the column's name. */ title: string; /** * Template representing column's cells. * [Default - #defaultTemplate of CustomTable, but for this to work, column-id must be kept same as row object's propertyName.] */ template?: TemplateRef; /** * It can be used to control column-width. See all available options in CustomTable's css file. * [Default - see CustomTableComponent.defaultColWidthCss] */ colWidthCss?: string; } /** * Sort config for Customtable. Each config represents a sort option being provided to user. */ export interface CustomTableSortConfig { /** * Sort label name to be shown on UI. */ label: string; /** * Row object's propertyName on which sort will be applied. */ property: string; /** * Order of sort. */ dir: boolean | 'asc' | 'desc'; }