import type { IDynamicHeight , ITaggleOptions , ILivePreviewOptions } from '../config' ; import type { IGroupData , IGroupItem , Ranking } from '../model' ; import type Column from '../model' ; import type { ICellRendererFactory , ERenderMode } from '../renderer' ; import type { IToolbarAction , IToolbarDialogAddon } from '../ui' ; /**
 * builder for LineUp/Taggle instance
 */ export default class LineUpBuilder { protected readonly options : Partial < ITaggleOptions > = { renderers : { } , toolbarActions : { } , toolbarDialogAddons : { } , flags : { } , } ; default animated ( enable ) { this . options . animated = enable ; return this ; } livePreviews ( options ) { this . options . livePreviews = options ; return this ; } param rotation default labelRotation ( rotation ) { this . options . labelRotation = rotation ; return this ; } param { boolean } enable param { boolean } collapsed sidePanel ( enable , collapsed = false ) { this . options . sidePanel = enable ; this . options . sidePanelCollapsed = collapsed ; return this ; } param { boolean } enable hierarchyIndicator ( enable ) { this . options . hierarchyIndicator = enable ; return this ; } default defaultSlopeGraphMode ( mode ) { this . options . defaultSlopeGraphMode = mode ; return this ; } default summaryHeader ( enable ) { this . options . summaryHeader = enable ; return this ; } default expandLineOnHover ( enable ) { this . options . expandLineOnHover = enable ; return this ; } returns { this } overviewMode ( ) { this . options . overviewMode = true ; return this ; } returns { this } ignoreUnsupportedBrowser ( ) { this . options . ignoreUnsupportedBrowser = true ; return this ; } param id param factory registerRenderer ( id , factory ) { this . options . renderers ! [ id ] = factory ; return this ; } /**
     * custom function whether the given renderer should be allowed to render the give colum in the given mode
     */ canRender ( canRender ) { this . options . canRender = canRender ; return this ; } param id param action registerToolbarAction ( id , action ) { this . options . toolbarActions ! [ id ] = action ; return this ; } param id param addon registerToolbarDialogAddon ( id , addon ) { this . options . toolbarDialogAddons ! [ id ] = addon ; return this ; } default rowHeight ( rowHeight , rowPadding = 2 ) { this . options . rowHeight = rowHeight ; this . options . rowPadding = rowPadding ; return this ; } default groupRowHeight ( groupHeight , groupPadding = 5 ) { this . options . groupHeight = groupHeight ; this . options . groupPadding = groupPadding ; return this ; } param { ( data : ( IGroupItem | IGroupData ) [ ] , ranking : Ranking ) => ( IDynamicHeight | null ) } callback dynamicHeight ( callback ) { this . options . dynamicHeight = callback ; return this ; } /**
     * disables advanced ranking features (sort by, group by, sorting hierarchy, ...)
     */ disableAdvancedRankingFeatures ( ) { this . options . flags ! . advancedRankingFeatures = false ; return this ; } /**
     * disables advanced model features (add combine column, data mapping, edit pattern, ...)
     */ disableAdvancedModelFeatures ( ) { this . options . flags ! . advancedModelFeatures = false ; return this ; } /**
     * disables advanced ui features (change visualization, color mapping)
     */ disableAdvancedUIFeatures ( ) { this . options . flags ! . advancedUIFeatures = false ; return this ; } }