UNPKG

survey-analytics

Version:

SurveyJS Dashboard is a UI component for visualizing and analyzing survey data. It interprets the form JSON schema to identify question types and renders collected responses using interactive charts and tables.

105 lines (104 loc) 5.22 kB
import { ItemValue, MatrixRowModel, Question, QuestionCheckboxModel, QuestionCompositeModel, QuestionCustomModel, QuestionDropdownModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixDynamicModel, QuestionMatrixModel, QuestionPanelDynamicModel, QuestionRadiogroupModel, QuestionSelectBase, QuestionTagboxModel } from "survey-core"; import { ICellData, IColumn, ColumnDataType, QuestionLocation, IColumnData } from "./config"; import { ITableOptions, Table } from "./table"; export declare class BaseColumn<T extends Question = Question> implements IColumn { protected question: T; protected table: Table; dataType: ColumnDataType; isVisible: boolean; isPublic: boolean; location: QuestionLocation; width?: string | number; visibleIndex?: number; isComment?: boolean; private nameValue; private displayNameValue?; constructor(question: T, table: Table); protected updateWhenQuestionIsReady(question: Question, table: Table): void; get name(): string; set name(val: string); get displayName(): string; set displayName(val: string); protected getDisplayName(): string; protected getName(): string; protected getDataType(): ColumnDataType; protected getDisplayValueCore(data: any): any; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; private formatDisplayValue; getCellData(table: Table, data: any): ICellData; toJSON(): IColumnData; fromJSON(data: IColumnData): void; } export declare class DefaultColumn extends BaseColumn { protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; } export declare class SelectBaseColumn<T extends QuestionSelectBase> extends BaseColumn<T> { protected get isOtherInSeparateColumn(): boolean; protected getItemDisplayText(item: ItemValue, options: ITableOptions): string; protected getDisplayValue(data: any, table: Table, options: ITableOptions): string; } export declare class CheckboxColumn extends SelectBaseColumn<QuestionCheckboxModel | QuestionTagboxModel> { protected getDisplayValue(data: any, table: Table, options: ITableOptions): string; } export declare class FlattenedCheckboxColumn extends BaseColumn<QuestionCheckboxModel | QuestionTagboxModel> { private choiceValue; private choiceText; constructor(question: QuestionCheckboxModel | QuestionTagboxModel, choiceValue: any, choiceText: string, table: Table); protected getDataType(): ColumnDataType; protected getName(): string; protected getDisplayName(): string; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; } export declare class SingleChoiceColumn extends SelectBaseColumn<QuestionDropdownModel | QuestionRadiogroupModel> { protected getDisplayValue(data: any, table: Table, options: ITableOptions): string; } export declare class CommentColumn<T extends Question = Question> extends BaseColumn<T> { protected getName(): string; protected getDisplayName(): string; protected getDisplayValue(data: any, table: Table, options: ITableOptions): string; } export declare class OtherColumn extends CommentColumn<QuestionSelectBase> { protected getDisplayName(): string; } export declare class MatrixColumn extends BaseColumn<QuestionMatrixModel> { private row; private valueName; private valuePath; constructor(question: QuestionMatrixModel, row: MatrixRowModel, table: Table); protected getName(): string; protected getDisplayName(): string; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; } export declare class ImageColumn extends BaseColumn { protected getDataType(): ColumnDataType; } export declare class FileColumn extends BaseColumn<QuestionFileModel> { protected getDataType(): ColumnDataType; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; } export declare class MatrixDropdownColumn extends BaseColumn<QuestionMatrixDropdownModel> { protected row: any; protected col: any; private rowValue; private colName; constructor(question: QuestionMatrixDropdownModel, row: any, col: any, table: Table); protected getName(): string; protected getDisplayName(): string; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; } export declare class CustomQuestionColumn extends BaseColumn<QuestionCustomModel> { constructor(question: QuestionCustomModel, table: Table); } export declare class CompositeQuestionColumn extends BaseColumn<QuestionCompositeModel> { constructor(question: QuestionCompositeModel, table: Table); } export declare class MatrixDynamicColumn extends BaseColumn<QuestionMatrixDynamicModel> { protected getDataType(): ColumnDataType; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; getCellData(table: Table, data: any): ICellData; } export declare class PanelDynamicColumn extends BaseColumn<QuestionPanelDynamicModel> { protected getDataType(): ColumnDataType; protected getDisplayValue(data: any, table: Table, options: ITableOptions): any; getCellData(table: Table, data: any): ICellData; }