import Column , { widthChanged , labelChanged , metaDataChanged , dirty , dirtyHeader , dirtyValues , rendererTypeChanged , groupRendererChanged , summaryRendererChanged , visibilityChanged , dirtyCaches , } from './Column' ; import type { IDataRow , ITypeFactory } from './interfaces' ; import StringColumn from './StringColumn' ; import type { IEventListener } from '../internal' ; import type { dataLoaded } from './ValueColumn' ; import type ValueColumn from './ValueColumn' ; asMemberOf event export declare function filterChanged_AC ( previous , current ) ; asMemberOf event export declare function groupingChanged_AC ( previous , current ) ; asMemberOf event export declare function valueChanged ( dataIndex , previous , current ) ; /**
 * a string column in which the values can be edited locally
 */ export default class AnnotateColumn extends StringColumn { static readonly EVENT_VALUE_CHANGED = 'valueChanged' ; private readonly annotations = new Map < number , string > ( ) ; protected createEventList ( ) { return super . createEventList ( ) . concat ( [ AnnotateColumn . EVENT_VALUE_CHANGED ] ) ; } 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 ) ; on ( type , listener ) ; on ( type , listener ) ; on ( type , listener ) { return super . on ( type as any , listener ) ; } getValue ( row ) { if ( this . annotations . has ( row . i ) ) { return this . annotations . get ( row . i ) ! ; } return super . getValue ( row ) ; } dump ( toDescRef ) { const r = super . dump ( toDescRef ) ; r . annotations = { } ; this . annotations . forEach ( ( v , k ) => { r . annotations [ k ] = v ; } ) ; return r ; } restore ( dump , factory ) { super . restore ( dump , factory ) ; if ( ! dump . annotations ) { return ; } Object . keys ( dump . annotations ) . forEach ( ( k ) => { this . annotations . set ( Number ( k ) , dump . annotations [ k ] ) ; } ) ; } setValue ( row , value ) { const old = this . getValue ( row ) ; if ( old === value ) { return true ; } if ( value === '' || value == null ) { this . annotations . delete ( row . i ) ; } else { this . annotations . set ( row . i , value ) ; } this . fire ( [ AnnotateColumn . EVENT_VALUE_CHANGED , Column . EVENT_DIRTY_VALUES , Column . EVENT_DIRTY_CACHES , Column . EVENT_DIRTY ] , row . i , old , value ) ; return true ; } }