import { Bootstrap , injectable } from '@cloudbeaver/core-di' ; import { DataPresentationService , DataPresentationType } from '../../DataPresentationService' ; import { DataValuePanelService } from './DataValuePanelService' ; import { ValuePanel } from './ValuePanel' ; @ injectable ( ) export class DataValuePanelBootstrap extends Bootstrap { constructor ( private readonly dataPresentationService , private readonly dataValuePanelService ) { super ( ) ; } register ( ) { this . dataPresentationService . add ( { id : 'value-text-presentation' , type : DataPresentationType . toolsPanel , title : 'data_viewer_presentation_value_title' , icon : 'value-panel' , hidden : ( dataFormat , model , resultIndex ) => this . dataValuePanelService . getDisplayed ( { model , resultIndex , dataFormat } ) . length === 0 , getPresentationComponent : ( ) => ValuePanel , } ) ; } load ( ) { } }