UNPKG

survey-core

Version:

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.

28 lines (27 loc) 1.29 kB
import { Question } from "./question"; import { IElement } from "./base-interfaces"; export declare class QuestionFactory { static Instance: QuestionFactory; static get DefaultChoices(): string[]; static get DefaultColums(): string[]; static get DefaultRows(): string[]; static get DefaultMutlipleTextItems(): string[]; registerQuestion(questionType: string, questionCreator: (name: string) => Question, showInToolbox?: boolean): void; registerCustomQuestion(questionType: string): void; unregisterElement(elementType: string, removeFromSerializer?: boolean): void; clear(): void; getAllTypes(): Array<string>; createQuestion(questionType: string, name: string): Question; } export declare class ElementFactory { static Instance: ElementFactory; private creatorHash; registerElement(elementType: string, elementCreator: (name: string) => IElement, showInToolbox?: boolean): void; registerCustomQuestion: (questionType: string, showInToolbox?: boolean) => void; clear(): void; unregisterElement(elementType: string, removeFromSerializer?: boolean): void; getAllToolboxTypes(): Array<string>; getAllTypes(): Array<string>; createElement(elementType: string, name: string): IElement; private getAllTypesCore; }