import { toolbar } from './annotations' ; import type { widthChanged , labelChanged , metaDataChanged , dirty , dirtyHeader , dirtyValues , rendererTypeChanged , groupRendererChanged , summaryRendererChanged , visibilityChanged , dirtyCaches , } from './Column' ; import type Column from './Column' ; import type { dataLoaded } from './ValueColumn' ; import type ValueColumn from './ValueColumn' ; import type { IDataRow } from './interfaces' ; import MapColumn , { IMapColumnDesc } from './MapColumn' ; import { EAlignment , IStringDesc } from './StringColumn' ; import type { IEventListener } from '../internal' ; import { isMissingValue } from './missing' ; import { integrateDefaults } from './internal' ; export declare type IStringMapColumnDesc = IStringDesc & IMapColumnDesc < string > ; /**
 * a string column with optional alignment
 */ @ toolbar ( 'rename' , 'search' ) export default class StringMapColumn extends MapColumn < string > { readonly alignment : EAlignment ; readonly escape : boolean ; constructor ( id , desc ) { super ( id , integrateDefaults ( desc , { width : 200 , renderer : 'map' , } ) ) ; this . alignment = desc . alignment ?? EAlignment . left ; this . escape = desc . escape !== false ; } on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) { return super . on ( type as any , listener ) ; } getValue ( row ) { const r = this . getMapValue ( row ) ; return r . every ( ( d ) => d . value === '' ) ? null : r ; } getMapValue ( row ) { return super . getMap ( row ) . map ( ( { key , value } ) => ( { key , value : isMissingValue ( value ) ? '' : String ( value ) , } ) ) ; } }