import React from 'react' ; import { Bootstrap , injectable } from '@cloudbeaver/core-di' ; import { ResultDataFormat } from '@cloudbeaver/core-sdk' ; import { DataValuePanelService } from '../../TableViewer/ValuePanel/DataValuePanelService' ; import { TextValuePresentation } from './TextValuePresentation' ; import { TextValuePresentationService } from './TextValuePresentationService' ; @ injectable ( ) export class TextValuePresentationBootstrap extends Bootstrap { constructor ( private readonly textValuePresentationService , private readonly dataValuePanelService ) { super ( ) ; } register ( ) { this . dataValuePanelService . add ( { key : 'text-presentation' , options : { dataFormat : [ ResultDataFormat . Resultset ] } , name : 'data_viewer_presentation_value_text_title' , order : Number . MAX_SAFE_INTEGER , panel : ( ) => TextValuePresentation , } ) ; this . textValuePresentationService . add ( { key : 'text/plain' , name : 'data_viewer_presentation_value_text_plain_title' , order : Number . MAX_SAFE_INTEGER , panel : ( ) => React . Fragment , } ) ; this . textValuePresentationService . add ( { key : 'text/html' , name : 'data_viewer_presentation_value_text_html_title' , order : Number . MAX_SAFE_INTEGER , panel : ( ) => React . Fragment , } ) ; this . textValuePresentationService . add ( { key : 'text/xml' , name : 'data_viewer_presentation_value_text_xml_title' , order : Number . MAX_SAFE_INTEGER , panel : ( ) => React . Fragment , } ) ; this . textValuePresentationService . add ( { key : 'application/json' , name : 'data_viewer_presentation_value_text_json_title' , order : Number . MAX_SAFE_INTEGER , panel : ( ) => React . Fragment , } ) ; } load ( ) { } }