import type { IAbortAblePromise } from 'lineupengine' ; import type { Column , IDataRow , IOrderedGroup , INumberColumn , ICategoricalLikeColumn , IDateColumn , StringColumn , } from '../model' ; import type { IDataProvider } from '../provider' ; import type DialogManager from '../ui/dialogs/DialogManager' ; import type { ISequence , IDateStatistics , ICategoricalStatistics , IAdvancedBoxPlotData , IStatistics , IStringStatistics , } from '../internal' ; export interface IImposer { color ? ( row , valueHint ? ) : string | null ; } export declare type IRenderCallback = ( ctx : CanvasRenderingContext2D ) => void ; /**
 * a cell renderer for rendering a cell of specific column
 */ export interface ICellRenderer { /**
     * template as a basis for the update
     */ readonly template : string ; param node param d param i param group update ( node , d , i , group ) : void | IAbortAblePromise < void > | null ; return render ? ( ctx , d , i , group ) : void | IAbortAblePromise < IRenderCallback > | boolean | null ; } /**
 * a cell renderer for rendering a cell of specific column
 */ export interface IGroupCellRenderer { /**
     * template as a basis for the update
     */ readonly template : string ; param node param group update ( node , group ) : void | IAbortAblePromise < void > | null ; } export interface ISummaryRenderer { /**
     * template as a basis for the update
     */ readonly template : string ; update ( node ) : void | IAbortAblePromise < void > | null ; } export interface IRenderTask < T > { then < U = void > ( onfullfilled ) : U | IAbortAblePromise < U > ; } export interface IRenderTasks { groupRows < T > ( col , group , key , compute ) : IRenderTask < T > ; groupExampleRows < T > ( col , group , key , compute ) : IRenderTask < T > ; groupBoxPlotStats ( col , group , raw ? ) : IRenderTask < { group : IAdvancedBoxPlotData ; summary : IAdvancedBoxPlotData ; data : IAdvancedBoxPlotData ; } > ; groupNumberStats ( col , group , raw ? ) : IRenderTask < { group : IStatistics ; summary : IStatistics ; data : IStatistics ; } > ; groupCategoricalStats ( col , group ) : IRenderTask < { group : ICategoricalStatistics ; summary : ICategoricalStatistics ; data : ICategoricalStatistics ; } > ; groupDateStats ( col , group ) : IRenderTask < { group : IDateStatistics ; summary : IDateStatistics ; data : IDateStatistics ; } > ; groupStringStats ( col , group ) : IRenderTask < { group : IStringStatistics ; summary : IStringStatistics ; data : IStringStatistics ; } > ; summaryBoxPlotStats ( col , raw ? ) : IRenderTask < { summary : IAdvancedBoxPlotData ; data : IAdvancedBoxPlotData ; } > ; summaryNumberStats ( col , raw ? ) : IRenderTask < { summary : IStatistics ; data : IStatistics ; } > ; summaryCategoricalStats ( col ) : IRenderTask < { summary : ICategoricalStatistics ; data : ICategoricalStatistics ; } > ; summaryDateStats ( col ) : IRenderTask < { summary : IDateStatistics ; data : IDateStatistics ; } > ; summaryStringStats ( col ) : IRenderTask < { summary : IStringStatistics ; data : IStringStatistics ; } > ; } /**
 * context for rendering, wrapped as an object for easy extensibility
 */ export interface IRenderContext { readonly tasks : IRenderTasks ; param col renderer ( col , imposer ? ) : ICellRenderer ; param col groupRenderer ( col , imposer ? ) : IGroupCellRenderer ; summaryRenderer ( co , interactive , imposer ? ) : ISummaryRenderer ; /**
     * prefix used for all generated id names
     */ readonly idPrefix : string ; asElement ( html ) : HTMLElement ; sanitize ( text ) : string ; colWidth ( col ) : number ; readonly provider : IDataProvider ; readonly dialogManager : DialogManager ; } export enum ERenderMode { CELL , GROUP , SUMMARY } export interface ICellRendererFactory { readonly title : string ; readonly groupTitle ? : string ; readonly summaryTitle ? : string ; canRender ( col , mode ) : boolean ; create ? ( col , context , imposer ? ) : ICellRenderer ; createGroup ? ( col , context , imposer ? ) : IGroupCellRenderer ; createSummary ? ( col , context , interactive , imposer ? ) : ISummaryRenderer ; }