/*Type definitions for Survey JavaScript library v1.8.32
Copyright (c) 2015-2020 Devsoft Baltic OÜ - http://surveyjs.io/
Definitions by: Devsoft Baltic OÜ
*/
import "./chunks/localization";
import "../../main.scss";
import "../../modern.scss";
export let Version: string;
export var __assign: any;
export function __extends(thisClass: any, baseClass: any): void;
export var __decorate: (decorators: any, target: any, key: any, desc: any) => any;
export var __spreadArrays: () => any[];
export declare var surveyCss: any;
export declare var defaultStandardCss: {
root: string;
container: string;
header: string;
body: string;
bodyEmpty: string;
footer: string;
title: string;
description: string;
logo: string;
logoImage: string;
headerText: string;
navigationButton: string;
completedPage: string;
navigation: {
complete: string;
prev: string;
next: string;
start: string;
preview: string;
edit: string;
};
progress: string;
progressBar: string;
progressTextInBar: string;
progressButtonsContainerCenter: string;
progressButtonsContainer: string;
progressButtonsImageButtonLeft: string;
progressButtonsImageButtonRight: string;
progressButtonsImageButtonHidden: string;
progressButtonsListContainer: string;
progressButtonsList: string;
progressButtonsListElementPassed: string;
progressButtonsListElementCurrent: string;
progressButtonsListElementNonClickable: string;
progressButtonsPageTitle: string;
progressButtonsPageDescription: string;
page: {
root: string;
title: string;
description: string;
};
pageTitle: string;
pageDescription: string;
row: string;
question: {
mainRoot: string;
flowRoot: string;
header: string;
headerLeft: string;
content: string;
contentLeft: string;
titleLeftRoot: string;
requiredText: string;
title: string;
titleExpandable: string;
number: string;
description: string;
comment: string;
required: string;
titleRequired: string;
hasError: string;
indent: number;
footer: string;
formGroup: string;
asCell: string;
icon: string;
iconExpanded: string;
};
panel: {
title: string;
titleExpandable: string;
titleOnError: string;
icon: string;
iconExpanded: string;
description: string;
container: string;
footer: string;
number: string;
requiredText: string;
};
error: {
root: string;
icon: string;
item: string;
locationTop: string;
locationBottom: string;
};
boolean: {
root: string;
item: string;
control: string;
itemChecked: string;
itemIndeterminate: string;
itemDisabled: string;
switch: string;
slider: string;
label: string;
disabledLabel: string;
materialDecorator: string;
itemDecorator: string;
checkedPath: string;
uncheckedPath: string;
indeterminatePath: string;
};
checkbox: {
root: string;
item: string;
itemSelectAll: string;
itemNone: string;
itemChecked: string;
itemInline: string;
label: string;
labelChecked: string;
itemControl: string;
itemDecorator: string;
controlLabel: string;
materialDecorator: string;
other: string;
column: string;
};
ranking: {
root: string;
rootMobileMod: string;
rootDragMod: string;
item: string;
itemContent: string;
itemIndex: string;
itemText: string;
itemGhostNode: string;
itemIconContainer: string;
itemIcon: string;
itemIconHoverMod: string;
itemIconFocusMod: string;
itemGhostMod: string;
itemDragMod: string;
};
comment: string;
dropdown: {
root: string;
control: string;
selectWrapper: string;
other: string;
};
html: {
root: string;
};
image: {
root: string;
image: string;
};
matrix: {
root: string;
label: string;
itemChecked: string;
itemDecorator: string;
cellText: string;
cellTextSelected: string;
cellLabel: string;
};
matrixdropdown: {
root: string;
cell: string;
headerCell: string;
row: string;
detailRow: string;
detailRowText: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
};
matrixdynamic: {
root: string;
button: string;
buttonAdd: string;
buttonRemove: string;
iconAdd: string;
iconRemove: string;
cell: string;
headerCell: string;
row: string;
detailRow: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
emptyRowsSection: string;
emptyRowsText: string;
emptyRowsButton: string;
};
paneldynamic: {
root: string;
title: string;
button: string;
buttonAdd: string;
buttonRemove: string;
buttonPrev: string;
buttonNext: string;
progressContainer: string;
progress: string;
progressBar: string;
progressText: string;
};
multipletext: {
root: string;
itemTitle: string;
row: string;
itemValue: string;
};
radiogroup: {
root: string;
item: string;
itemChecked: string;
itemInline: string;
itemDecorator: string;
label: string;
labelChecked: string;
itemControl: string;
controlLabel: string;
materialDecorator: string;
other: string;
clearButton: string;
column: string;
};
imagepicker: {
root: string;
item: string;
itemChecked: string;
label: string;
itemControl: string;
image: string;
itemInline: string;
itemText: string;
clearButton: string;
};
rating: {
root: string;
item: string;
selected: string;
minText: string;
itemText: string;
maxText: string;
disabled: string;
};
text: string;
expression: string;
file: {
root: string;
placeholderInput: string;
preview: string;
removeButton: string;
fileInput: string;
removeFile: string;
removeFileSvg: string;
fileDecorator: string;
fileSignBottom: string;
removeButtonBottom: string;
chooseFile: string;
noFileChosen: string;
};
signaturepad: {
root: string;
controls: string;
clearButton: string;
};
saveData: {
root: string;
saving: string;
error: string;
success: string;
saveAgainButton: string;
};
window: {
root: string;
body: string;
header: {
root: string;
title: string;
button: string;
buttonExpanded: string;
buttonCollapsed: string;
};
};
};
export declare var defaultBootstrapCss: {
root: string;
container: string;
header: string;
body: string;
bodyEmpty: string;
footer: string;
title: string;
description: string;
logo: string;
logoImage: string;
headerText: string;
navigationButton: string;
completedPage: string;
navigation: {
complete: string;
prev: string;
next: string;
start: string;
preview: string;
edit: string;
};
progress: string;
progressBar: string;
progressTextUnderBar: string;
progressButtonsContainerCenter: string;
progressButtonsContainer: string;
progressButtonsImageButtonLeft: string;
progressButtonsImageButtonRight: string;
progressButtonsImageButtonHidden: string;
progressButtonsListContainer: string;
progressButtonsList: string;
progressButtonsListElementPassed: string;
progressButtonsListElementCurrent: string;
progressButtonsListElementNonClickable: string;
progressButtonsPageTitle: string;
progressButtonsPageDescription: string;
page: {
root: string;
title: string;
description: string;
};
pageTitle: string;
pageDescription: string;
row: string;
question: {
mainRoot: string;
flowRoot: string;
header: string;
headerLeft: string;
content: string;
contentLeft: string;
titleLeftRoot: string;
title: string;
titleExpandable: string;
number: string;
description: string;
descriptionUnderInput: string;
requiredText: string;
comment: string;
required: string;
titleRequired: string;
hasError: string;
indent: number;
formGroup: string;
};
panel: {
title: string;
titleExpandable: string;
titleOnError: string;
icon: string;
iconExpanded: string;
description: string;
container: string;
footer: string;
number: string;
requiredText: string;
};
error: {
root: string;
icon: string;
item: string;
locationTop: string;
locationBottom: string;
};
boolean: {
root: string;
item: string;
control: string;
itemChecked: string;
itemIndeterminate: string;
itemDisabled: string;
switch: string;
slider: string;
label: string;
disabledLabel: string;
materialDecorator: string;
itemDecorator: string;
checkedPath: string;
uncheckedPath: string;
indeterminatePath: string;
};
checkbox: {
root: string;
item: string;
itemChecked: string;
itemSelectAll: string;
itemNone: string;
itemInline: string;
itemControl: string;
itemDecorator: string;
label: string;
labelChecked: string;
controlLabel: string;
materialDecorator: string;
other: string;
column: string;
};
ranking: {
root: string;
rootMobileMod: string;
rootDragMod: string;
item: string;
itemContent: string;
itemIndex: string;
itemText: string;
itemGhostNode: string;
itemIconContainer: string;
itemIcon: string;
itemIconHoverMod: string;
itemIconFocusMod: string;
itemGhostMod: string;
itemDragMod: string;
};
comment: string;
dropdown: {
root: string;
control: string;
other: string;
};
html: {
root: string;
};
image: {
root: string;
image: string;
};
matrix: {
root: string;
label: string;
itemChecked: string;
itemDecorator: string;
cellText: string;
cellTextSelected: string;
cellLabel: string;
};
matrixdropdown: {
root: string;
cell: string;
headerCell: string;
row: string;
detailRow: string;
detailRowText: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
};
matrixdynamic: {
root: string;
button: string;
buttonAdd: string;
buttonRemove: string;
iconAdd: string;
iconRemove: string;
headerCell: string;
row: string;
detailRow: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
emptyRowsSection: string;
emptyRowsText: string;
emptyRowsButton: string;
};
paneldynamic: {
root: string;
navigation: string;
progressTop: string;
progressBottom: string;
title: string;
button: string;
buttonAdd: string;
buttonRemove: string;
buttonPrev: string;
buttonNext: string;
progressContainer: string;
progress: string;
progressBar: string;
progressText: string;
};
multipletext: {
root: string;
itemTitle: string;
itemValue: string;
};
radiogroup: {
root: string;
item: string;
itemChecked: string;
itemInline: string;
label: string;
labelChecked: string;
itemControl: string;
itemDecorator: string;
controlLabel: string;
materialDecorator: string;
other: string;
clearButton: string;
column: string;
};
imagepicker: {
root: string;
item: string;
itemChecked: string;
itemInline: string;
label: string;
itemControl: string;
image: string;
itemText: string;
clearButton: string;
};
rating: {
root: string;
item: string;
selected: string;
minText: string;
itemText: string;
maxText: string;
disabled: string;
};
text: string;
expression: string;
file: {
root: string;
placeholderInput: string;
preview: string;
removeButton: string;
fileInput: string;
removeFile: string;
removeFileSvg: string;
fileDecorator: string;
fileSignBottom: string;
removeButtonBottom: string;
};
signaturepad: {
root: string;
controls: string;
clearButton: string;
};
saveData: {
root: string;
saving: string;
error: string;
success: string;
saveAgainButton: string;
};
window: {
root: string;
body: string;
header: {
root: string;
title: string;
button: string;
buttonExpanded: string;
buttonCollapsed: string;
};
};
};
export declare var defaultBootstrapMaterialCss: {
root: string;
container: string;
header: string;
body: string;
bodyEmpty: string;
footer: string;
title: string;
description: string;
logo: string;
logoImage: string;
headerText: string;
navigationButton: string;
completedPage: string;
navigation: {
complete: string;
prev: string;
next: string;
start: string;
preview: string;
edit: string;
};
progress: string;
progressBar: string;
progressTextUnderBar: string;
progressButtonsContainerCenter: string;
progressButtonsContainer: string;
progressButtonsImageButtonLeft: string;
progressButtonsImageButtonRight: string;
progressButtonsImageButtonHidden: string;
progressButtonsListContainer: string;
progressButtonsList: string;
progressButtonsListElementPassed: string;
progressButtonsListElementCurrent: string;
progressButtonsListElementNonClickable: string;
progressButtonsPageTitle: string;
progressButtonsPageDescription: string;
page: {
root: string;
title: string;
description: string;
};
pageTitle: string;
pageDescription: string;
row: string;
question: {
mainRoot: string;
flowRoot: string;
header: string;
headerLeft: string;
content: string;
contentLeft: string;
titleLeftRoot: string;
requiredText: string;
title: string;
titleExpandable: string;
number: string;
description: string;
descriptionUnderInput: string;
comment: string;
required: string;
titleRequired: string;
hasError: string;
indent: number;
formGroup: string;
};
panel: {
title: string;
titleExpandable: string;
titleOnError: string;
icon: string;
iconExpanded: string;
description: string;
container: string;
footer: string;
number: string;
requiredText: string;
};
error: {
root: string;
icon: string;
item: string;
locationTop: string;
locationBottom: string;
};
boolean: {
root: string;
item: string;
control: string;
itemChecked: string;
itemIndeterminate: string;
itemDisabled: string;
switch: string;
slider: string;
label: string;
disabledLabel: string;
materialDecorator: string;
itemDecorator: string;
checkedPath: string;
uncheckedPath: string;
indeterminatePath: string;
};
checkbox: {
root: string;
item: string;
itemChecked: string;
itemSelectAll: string;
itemNone: string;
itemInline: string;
itemDecorator: string;
itemControl: string;
label: string;
labelChecked: string;
controlLabel: string;
materialDecorator: string;
other: string;
column: string;
};
ranking: {
root: string;
rootMobileMod: string;
rootDragMod: string;
item: string;
itemContent: string;
itemIndex: string;
itemText: string;
itemGhostNode: string;
itemIconContainer: string;
itemIcon: string;
itemIconHoverMod: string;
itemIconFocusMod: string;
itemGhostMod: string;
itemDragMod: string;
};
comment: string;
dropdown: {
root: string;
control: string;
other: string;
};
html: {
root: string;
};
image: {
root: string;
image: string;
};
matrix: {
root: string;
row: string;
label: string;
cellText: string;
cellTextSelected: string;
cellLabel: string;
itemValue: string;
itemChecked: string;
itemDecorator: string;
materialDecorator: string;
};
matrixdropdown: {
root: string;
itemValue: string;
headerCell: string;
row: string;
detailRow: string;
detailRowText: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
};
matrixdynamic: {
mainRoot: string;
flowRoot: string;
root: string;
button: string;
itemValue: string;
buttonAdd: string;
buttonRemove: string;
iconAdd: string;
iconRemove: string;
headerCell: string;
row: string;
detailRow: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
emptyRowsSection: string;
emptyRowsText: string;
emptyRowsButton: string;
};
paneldynamic: {
root: string;
navigation: string;
progressTop: string;
progressBottom: string;
title: string;
button: string;
buttonAdd: string;
buttonRemove: string;
buttonPrev: string;
buttonNext: string;
progressContainer: string;
progress: string;
progressBar: string;
progressText: string;
};
multipletext: {
root: string;
itemTitle: string;
row: string;
itemValue: string;
};
radiogroup: {
root: string;
item: string;
itemChecked: string;
itemInline: string;
itemDecorator: string;
label: string;
labelChecked: string;
itemControl: string;
controlLabel: string;
materialDecorator: string;
other: string;
clearButton: string;
column: string;
};
imagepicker: {
root: string;
item: string;
itemChecked: string;
itemInline: string;
label: string;
itemControl: string;
image: string;
itemText: string;
clearButton: string;
};
rating: {
root: string;
item: string;
selected: string;
minText: string;
itemText: string;
maxText: string;
disabled: string;
};
text: string;
expression: string;
file: {
root: string;
placeholderInput: string;
preview: string;
removeButton: string;
fileInput: string;
removeFile: string;
removeFileSvg: string;
fileDecorator: string;
fileSignBottom: string;
removeButtonBottom: string;
};
signaturepad: {
root: string;
controls: string;
clearButton: string;
};
saveData: {
root: string;
saving: string;
error: string;
success: string;
saveAgainButton: string;
};
window: {
root: string;
body: string;
header: {
root: string;
title: string;
button: string;
buttonExpanded: string;
buttonCollapsed: string;
};
};
};
export declare var modernCss: {
root: string;
container: string;
header: string;
body: string;
bodyEmpty: string;
footer: string;
title: string;
description: string;
logo: string;
logoImage: string;
headerText: string;
navigationButton: string;
completedPage: string;
navigation: {
complete: string;
prev: string;
next: string;
start: string;
preview: string;
edit: string;
};
panel: {
title: string;
titleExpandable: string;
titleOnError: string;
description: string;
container: string;
content: string;
icon: string;
iconExpanded: string;
footer: string;
requiredText: string;
number: string;
};
paneldynamic: {
root: string;
navigation: string;
title: string;
button: string;
buttonRemove: string;
buttonAdd: string;
progressTop: string;
progressBottom: string;
buttonPrev: string;
buttonNext: string;
progressContainer: string;
progress: string;
progressBar: string;
progressText: string;
separator: string;
};
progress: string;
progressBar: string;
progressText: string;
progressTextInBar: string;
progressButtonsContainerCenter: string;
progressButtonsContainer: string;
progressButtonsImageButtonLeft: string;
progressButtonsImageButtonRight: string;
progressButtonsImageButtonHidden: string;
progressButtonsListContainer: string;
progressButtonsList: string;
progressButtonsListElementPassed: string;
progressButtonsListElementCurrent: string;
progressButtonsListElementNonClickable: string;
progressButtonsPageTitle: string;
progressButtonsPageDescription: string;
page: {
root: string;
title: string;
description: string;
};
pageTitle: string;
pageDescription: string;
row: string;
question: {
mainRoot: string;
flowRoot: string;
asCell: string;
header: string;
headerLeft: string;
headerTop: string;
headerBottom: string;
content: string;
contentLeft: string;
titleLeftRoot: string;
titleOnAnswer: string;
titleOnError: string;
title: string;
titleExpandable: string;
icon: string;
iconExpanded: string;
requiredText: string;
number: string;
description: string;
descriptionUnderInput: string;
comment: string;
required: string;
titleRequired: string;
indent: number;
footer: string;
formGroup: string;
hasError: string;
disabled: string;
};
image: {
root: string;
image: string;
};
error: {
root: string;
icon: string;
item: string;
locationTop: string;
locationBottom: string;
};
checkbox: {
root: string;
item: string;
itemSelectAll: string;
itemNone: string;
itemDisabled: string;
itemChecked: string;
itemHover: string;
itemInline: string;
label: string;
labelChecked: string;
itemControl: string;
itemDecorator: string;
controlLabel: string;
materialDecorator: string;
other: string;
column: string;
};
ranking: {
root: string;
rootMobileMod: string;
rootDragMod: string;
item: string;
itemContent: string;
itemIndex: string;
itemText: string;
itemGhostNode: string;
itemIconContainer: string;
itemIcon: string;
itemIconHoverMod: string;
itemIconFocusMod: string;
itemGhostMod: string;
itemDragMod: string;
};
radiogroup: {
root: string;
item: string;
itemInline: string;
label: string;
labelChecked: string;
itemDisabled: string;
itemChecked: string;
itemHover: string;
itemControl: string;
itemDecorator: string;
controlLabel: string;
materialDecorator: string;
other: string;
clearButton: string;
column: string;
};
boolean: {
root: string;
small: string;
item: string;
control: string;
itemChecked: string;
itemIndeterminate: string;
itemDisabled: string;
switch: string;
slider: string;
label: string;
disabledLabel: string;
materialDecorator: string;
itemDecorator: string;
checkedPath: string;
uncheckedPath: string;
indeterminatePath: string;
};
text: {
root: string;
small: string;
onError: string;
};
multipletext: {
root: string;
item: string;
itemTitle: string;
row: string;
cell: string;
};
dropdown: {
root: string;
small: string;
control: string;
selectWrapper: string;
other: string;
onError: string;
};
imagepicker: {
root: string;
item: string;
itemInline: string;
itemChecked: string;
itemDisabled: string;
itemHover: string;
label: string;
itemControl: string;
image: string;
itemText: string;
clearButton: string;
other: string;
};
matrix: {
tableWrapper: string;
root: string;
rowError: string;
cell: string;
headerCell: string;
label: string;
itemValue: string;
itemChecked: string;
itemDisabled: string;
itemHover: string;
materialDecorator: string;
itemDecorator: string;
cellText: string;
cellTextSelected: string;
cellTextDisabled: string;
};
matrixdropdown: {
root: string;
cell: string;
headerCell: string;
row: string;
detailRow: string;
detailRowText: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
};
matrixdynamic: {
root: string;
cell: string;
headerCell: string;
button: string;
buttonAdd: string;
buttonRemove: string;
iconAdd: string;
iconRemove: string;
row: string;
detailRow: string;
detailCell: string;
detailButton: string;
detailButtonExpanded: string;
detailIcon: string;
detailIconExpanded: string;
detailPanelCell: string;
emptyRowsSection: string;
emptyRowsText: string;
emptyRowsButton: string;
};
rating: {
root: string;
item: string;
selected: string;
minText: string;
itemText: string;
maxText: string;
disabled: string;
};
comment: {
root: string;
small: string;
};
expression: string;
file: {
root: string;
other: string;
placeholderInput: string;
preview: string;
fileSign: string;
fileSignBottom: string;
fileDecorator: string;
fileInput: string;
noFileChosen: string;
chooseFile: string;
disabled: string;
removeButton: string;
removeButtonBottom: string;
removeFile: string;
removeFileSvg: string;
wrapper: string;
};
signaturepad: {
root: string;
small: string;
controls: string;
clearButton: string;
};
saveData: {
root: string;
saving: string;
error: string;
success: string;
saveAgainButton: string;
};
window: {
root: string;
body: string;
header: {
root: string;
title: string;
button: string;
buttonExpanded: string;
buttonCollapsed: string;
};
};
};
export declare class Survey extends SurveyModel {
static get cssType(): string;
static set cssType(value: string);
koCurrentPage: any;
koIsFirstPage: any;
koIsLastPage: any;
dummyObservable: any;
koState: any;
koAfterRenderPage: any;
koAfterRenderHeader: any;
koCompletedState: any;
koCompletedStateText: any;
koCompletedStateCss: any;
koTimerInfoText: any;
koTitleTemplate: any;
getDataValueCore(valuesHash: any, key: string): any;
setDataValueCore(valuesHash: any, key: string, value: any): void;
deleteDataValueCore(valuesHash: any, key: string): void;
constructor(jsonObj?: any, renderedElement?: any, css?: any);
protected onBaseCreating(): void;
nextPageUIClick(): void;
nextPageMouseDown(): boolean;
render(element?: any): void;
clear(clearData?: boolean, gotoFirstPage?: boolean): void;
protected onLocaleChanged(): void;
koEventAfterRender(element: any, survey: any): void;
loadSurveyFromService(surveyId?: string, clientId?: string, renderedElement?: any): void;
setCompleted(): void;
start(): boolean;
createNewPage(name: string): PageModel;
protected getHtmlTemplate(): string;
protected onBeforeCreating(): void;
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
pageVisibilityChanged(page: IPage, newValue: boolean): void;
protected onLoadSurveyFromService(): void;
protected onLoadingSurveyFromService(): void;
protected setCompletedState(value: string, text: string): void;
protected doTimer(): void;
updateSurvey(newProps: any, oldProps?: any): void;
dispose(): void;
}
export declare var registerTemplateEngine: (ko: any, platform: string) => void;
export declare class ImplementorBase {
element: Base;
readonly implementedMark = "__surveyImplementedKo";
constructor(element: Base);
dispose(): void;
}
export declare class QuestionRow extends QuestionRowModel {
panel: PanelModelBase;
koGetType: any;
koElementAfterRender: any;
constructor(panel: PanelModelBase);
getElementType(el: any): "survey-panel" | "survey-question";
koAfterRender(el: any, con: any): void;
rowAfterRender(elements: HTMLElement[], model: QuestionRow): void;
}
export declare class PanelImplementorBase extends ImplementorBase {
panel: PanelModelBase;
constructor(panel: PanelModelBase);
}
export declare class Panel extends PanelModel {
koElementType: any;
koCss: any;
koIsExpanded: any;
koIsCollapsed: any;
koErrorClass: any;
toggleStateByKeyUp: any;
constructor(name?: string);
protected onBaseCreating(): void;
protected createRow(): QuestionRowModel;
protected onCreating(): void;
protected onNumChanged(value: number): void;
getTitleStyle(): any;
endLoadingFromJson(): void;
dispose(): void;
}
export declare class Page extends PageModel {
constructor(name?: string);
get renderTitleActions(): boolean;
protected onBaseCreating(): void;
protected createRow(): QuestionRowModel;
protected createNewPanel(name: string): PanelModel;
protected onCreating(): void;
protected onNumChanged(value: number): void;
dispose(): void;
}
export declare class FlowPanel extends FlowPanelModel {
koElementType: any;
koElementAfterRender: any;
placeHolder: string;
constructor(name?: string);
protected onCreating(): void;
protected getHtmlForQuestion(question: Question): string;
}
export declare class QuestionImplementor extends ImplementorBase {
question: Question;
koTemplateName: any;
koElementType: any;
toggleStateByClick: any;
toggleStateByKeyUp: any;
constructor(question: Question);
protected getKoValue(): any;
protected updateQuestion(): void;
protected onVisibleIndexChanged(): void;
protected onSurveyLoad(): void;
protected getQuestionTemplate(): string;
protected getNo(): string;
protected updateKoDummy(): void;
protected koQuestionAfterRender(elements: any, con: any): void;
dispose(): void;
}
export declare class QuestionSelectBaseImplementor extends QuestionImplementor {
protected onCreated(): void;
constructor(question: Question);
protected get isOtherSelected(): boolean;
}
export declare class QuestionCheckboxBaseImplementor extends QuestionSelectBaseImplementor {
constructor(question: Question);
}
export declare class QuestionCheckboxImplementor extends QuestionCheckboxBaseImplementor {
constructor(question: Question);
protected getKoValue(): any;
}
export declare class QuestionCheckbox extends QuestionCheckboxModel {
koAllSelected: any;
constructor(name: string);
protected onBaseCreating(): void;
onSurveyValueChanged(newValue: any): void;
protected onVisibleChoicesChanged(): void;
protected updateAllSelected(): void;
}
export declare class QuestionRanking extends QuestionRankingModel {
protected onBaseCreating(): void;
}
export declare class QuestionComment extends QuestionCommentModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionDropdown extends QuestionDropdownModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionFile extends QuestionFileModel {
koState: any;
koHasValue: any;
koData: any;
koInputTitle: any;
koChooseFileClass: any;
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionHtml extends QuestionHtmlModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionMatrix extends QuestionMatrixModel {
koVisibleRows: any;
koVisibleColumns: any;
constructor(name: string);
protected onBaseCreating(): void;
protected onColumnsChanged(): void;
protected onRowsChanged(): void;
onSurveyLoad(): void;
protected onMatrixRowCreated(row: MatrixRowModel): void;
protected getVisibleRows(): Array;
}
export declare class QuestionMatrixBaseImplementor extends QuestionImplementor {
koCellAfterRender: any;
koCellQuestionAfterRender: any;
koRecalc: any;
koAddRowClick: any;
koRemoveRowClick: any;
koTable: any;
constructor(question: Question);
protected getQuestionTemplate(): string;
protected isAddRowTop(): boolean;
protected isAddRowBottom(): boolean;
protected canRemoveRows(): boolean;
protected addRow(): void;
protected removeRow(row: MatrixDropdownRowModelBase): void;
dispose(): void;
}
export declare class QuestionMatrixDropdown extends QuestionMatrixDropdownModel {
constructor(name: string);
protected onBaseCreating(): void;
protected createNewDetailPanel(): PanelModel;
dispose(): void;
}
export declare class QuestionMatrixDynamicImplementor extends QuestionMatrixBaseImplementor {
constructor(question: Question);
protected canRemoveRows(): boolean;
protected addRow(): void;
protected removeRow(row: MatrixDynamicRowModel): void;
getKoPopupIsVisible(row: MatrixDropdownRowModelBase): any;
}
export declare class QuestionMatrixDynamic extends QuestionMatrixDynamicModel {
constructor(name: string);
protected onBaseCreating(): void;
protected createNewDetailPanel(): PanelModel;
}
export declare class QuestionPanelDynamicImplementor extends QuestionImplementor {
koRecalc: any;
koAddPanelClick: any;
koRemovePanelClick: any;
koButtonAddCss: any;
koButtonPrevCss: any;
koButtonNextCss: any;
koPrevPanelClick: any;
koNextPanelClick: any;
koCanAddPanel: any;
koCanRemovePanel: any;
koProgressText: any;
koProgress: any;
koPanel: any;
koIsList: any;
koIsProgressTop: any;
koIsProgressBottom: any;
koIsNextButton: any;
koIsPrevButton: any;
koIsRange: any;
koRangeValue: any;
koRangeMax: any;
constructor(question: Question);
protected onPanelCountChanged(): void;
protected onRenderModeChanged(): void;
protected onCurrentIndexChanged(): void;
protected addPanel(): void;
protected removePanel(val: any): void;
protected get buttonAddCss(): string;
protected get buttonPrevCss(): any;
protected get buttonNextCss(): any;
protected get progress(): string;
}
export declare class QuestionPanelDynamic extends QuestionPanelDynamicModel {
constructor(name: string);
protected onBaseCreating(): void;
protected createNewPanelObject(): PanelModel;
}
export declare class MultipleTextItem extends MultipleTextItemModel {
constructor(name?: any, title?: string);
protected createEditor(name: string): QuestionTextModel;
}
export declare class QuestionMultipleText extends QuestionMultipleTextModel {
koRows: any;
constructor(name: string);
protected onBaseCreating(): void;
protected onColCountChanged(): void;
protected createTextItem(name: string, title: string): MultipleTextItemModel;
}
export declare class QuestionRadiogroup extends QuestionRadiogroupModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionRating extends QuestionRatingModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionText extends QuestionTextModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionBoolean extends QuestionBooleanModel {
constructor(name: string);
protected onBaseCreating(): void;
getItemCss(row: any, column: any): any;
getCheckedLabelCss(): string;
getUncheckedLabelCss(): string;
onSwitchClick(data: any, event: any): boolean;
onTrueLabelClick(data: any, event: any): boolean;
onFalseLabelClick(data: any, event: any): boolean;
}
export declare class QuestionEmpty extends QuestionEmptyModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionExpressionImplementor extends QuestionImplementor {
question: Question;
constructor(question: Question);
}
export declare class QuestionExpression extends QuestionExpressionModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionImagePicker extends QuestionImagePickerModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class SurveyWindow extends SurveyWindowModel {
koExpanded: any;
koExpandedCss: any;
doExpand: any;
constructor(jsonObj?: any, initialModel?: SurveyModel);
protected createSurvey(jsonObj: any): SurveyModel;
protected closeWindowOnComplete(): void;
protected get template(): string;
protected set template(value: string);
protected doShowingChanged(): void;
protected getDefaultTemplate(): string;
get css(): any;
}
export declare var koTemplate: any;
export declare class SurveyTemplateText {
constructor();
addText(newText: string, id: string, name: string): void;
replaceText(replaceText: string, id: string, questionType?: string): void;
protected getId(id: string, questionType: string): string;
protected get text(): string;
protected set text(value: string);
}
export declare class QuestionImage extends QuestionImageModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionSignaturePad extends QuestionSignaturePadModel {
constructor(name: string);
protected onBaseCreating(): void;
}
export declare class QuestionCustom extends QuestionCustomModel {
constructor(name: string, questionJSON: ComponentQuestionJSON);
protected onBaseCreating(): void;
}
export declare class QuestionComposite extends QuestionCompositeModel {
constructor(name: string, questionJSON: ComponentQuestionJSON);
protected onBaseCreating(): void;
}
export declare class ActionBarViewModel extends AdaptiveElement {
itemsSubscription: any;
constructor(_items: Array);
dispose(): void;
}
export declare class AdaptiveElementImplementor extends ImplementorBase {
constructor(model: AdaptiveElement);
}
export declare var CheckboxViewModel: any;
export declare class DefaultTitleViewModel {
element: Question | Panel;
constructor(element: Question | Panel);
getIconClass(): string;
}
export declare class PanelViewModel {
question: PanelModel;
targetElement: HTMLElement;
constructor(question: PanelModel, targetElement: HTMLElement);
}
export declare function showModal(componentName: string, data: any, onApply: () => void, onCancel?: () => void): void;
export declare class ProgressButtonsViewModel {
constructor(model: SurveyModel, element: any);
isListElementClickable(index: any): boolean;
getListElementCss(index: any): string;
clickListElement(index: any): void;
getScrollButtonCss(isLeftScroll: boolean): any;
clickScrollButton(listContainerElement: Element, isLeftScroll: boolean): void;
dispose(): void;
}
export declare var progressProgressViewModel: any;
export declare var TitleActionViewModel: any;
export declare class StringEditorViewModel {
constructor(params: any);
get koHasHtml(): any;
get editValue(): any;
set editValue(value: any);
onInput(sender: StringEditorViewModel, event: any): void;
onClick(sender: StringEditorViewModel, event: any): void;
}
export declare var StringViewerViewModel: any;
export declare var ListViewComponent: any;
export declare var SvgIconViewModel: any;
export declare class ResponsibilityManager {
protected container: HTMLDivElement;
getItemSizes: () => Array;
constructor(container: HTMLDivElement, model: AdaptiveElement, dotsItemSize?: number);
getComputedStyle: any;
protected getAvailableSpace(): number;
protected getDimensions(element: HTMLElement): {
scrollDimension: number;
offsetDimension: number;
};
get itemSizes(): number[];
process(): void;
}
export declare class VerticalResponsibilityManager extends ResponsibilityManager {
constructor(container: HTMLDivElement, model: AdaptiveElement, dotsItemSize?: number);
protected getAvailableSpace(): number;
protected getDimensions(): {
scrollDimension: number;
offsetDimension: number;
};
}
declare function compareVersions(a: any, b: any): number;
declare function confirmAction(message: string): boolean;
declare function detectIEBrowser(): boolean;
declare function detectIEOrEdge(): any;
declare function loadFileFromBase64(b64Data: string, fileName: string): void;
declare function isMobile(): boolean;
declare function isElementVisible(element: HTMLElement, threshold?: number): boolean;
declare function findScrollableParent(element: HTMLElement): HTMLElement;
declare function createSvg(size: number, width: number, height: number, iconName: string, svgElem: any): void;
export declare function unwrap(value: T | (() => T)): T;
export { compareVersions, confirmAction, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isElementVisible, findScrollableParent, createSvg, };
export declare class RendererFactory {
static Instance: RendererFactory;
unregisterRenderer(questionType: string, rendererAs: string): void;
registerRenderer(questionType: string, renderAs: string, renderer: any): void;
getRenderer(questionType: string, renderAs: string): any;
getRendererByQuestion(question: Question): any;
}
/**
* Global survey settings
*/
export declare var settings: {
/**
* The prefix that uses to store the question comment, as {questionName} + {commentPrefix}.
* The default
*/
commentPrefix: string;
/**
* Encode parameter on calling restfull web API
*/
webserviceEncodeParameters: boolean;
/**
* Cache the result for choices getting from web services. Set this property to false, to disable the caching.
*/
useCachingForChoicesRestfull: boolean;
/**
* SurveyJS web service API url
*/
surveyServiceUrl: string;
/**
* separator that can allow to set value and text of ItemValue object in one string as: "value|text"
*/
itemValueSeparator: string;
/**
* default locale name for localizable strings that uses during serialization, {"default": "My text", "de": "Mein Text"}
*/
defaultLocaleName: string;
/**
* Default row name for matrix (single choice)
*/
matrixDefaultRowName: string;
/**
* Default cell type for dropdown and dynamic matrices
*/
matrixDefaultCellType: string;
/**
* Total value postfix for dropdown and dynamic matrices. The total value stores as: {matrixName} + {postfix}
*/
matrixTotalValuePostFix: string;
/**
* Maximum row count in dynamic matrix
*/
matrixMaximumRowCount: number;
/**
* Maximum rowCount that returns in addConditionObjectsByContext function
*/
matrixMaxRowCountInCondition: number;
/**
* Maximum panel count in dynamic panel
*/
panelMaximumPanelCount: number;
/**
* Maximum rate value count in rating question
*/
ratingMaximumRateValueCount: number;
/**
* Disable the question while choices are getting from the web service
*/
disableOnGettingChoicesFromWeb: boolean;
/**
* Set to true to always serialize the localization string as object even if there is only one value for default locale. Instead of string "MyStr" serialize as {default: "MyStr"}
*/
serializeLocalizableStringAsObject: boolean;
/**
* Set to false to hide empty page title and description in design mode
*/
allowShowEmptyTitleInDesignMode: boolean;
/**
* Set to false to hide empty page description in design mode
*/
allowShowEmptyDescriptionInDesignMode: boolean;
/**
* Set this property to true to execute the complete trigger on value change instead of on next page.
*/
executeCompleteTriggerOnValueChanged: boolean;
/**
* Set this property to false to execute the skip trigger on next page instead of on value change.
*/
executeSkipTriggerOnValueChanged: boolean;
/**
* Set this property to change readOnlyCommentRenderMode: "textarea" (default) or (div)
*/
readOnlyCommentRenderMode: string;
/**
* Override this function, set your function, if you want to show your own dialog confirm window instead of standard browser window.
* @param message
*/
confirmActionFunc: (message: string) => boolean;
/**
* Set this property to change the default value of the minWidth constraint
*/
minWidth: string;
/**
* Set this property to change the default value of the minWidth constraint
*/
maxWidth: string;
/**
* This property tells how many times survey re-run expressions on value changes during condition running. We need it to avoid recursions in the expressions
*/
maximumConditionRunCountOnValueChanged: number;
/**
* By default visibleIndex for question with titleLocation = "hidden" is -1, and survey doesn't count these questions when set questions numbers.
* Set it true, and a question next to a question with hidden title will increase it's number.
*/
setQuestionVisibleIndexForHiddenTitle: boolean;
/**
* By default visibleIndex for question with hideNumber = true is -1, and survey doesn't count these questions when set questions numbers.
* Set it true, and a question next to a question with hidden title number will increase it's number.
*/
setQuestionVisibleIndexForHiddenNumber: boolean;
/**
* By default all rows are rendered no matters whwther they are visible.
* Set it true, and survey markup rows will be rendered only if they are visible in viewport.
* This feature is experimantal and might do not support all the use cases.
*/
lazyRowsRendering: boolean;
/**
* By default checkbox and radiogroup items are ordered in rows.
* Set it "column", and items will be ordered in columns.
*/
showItemsInOrder: string;
/**
* Supported validators by question types. You can modify this variable to add validators for new question types or add/remove for existing question types.
*/
supportedValidators: {
question: string[];
comment: string[];
text: string[];
checkbox: string[];
};
/**
* Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that less than this value
*/
minDate: string;
/**
* Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that greater than this value
*/
maxDate: string;
showModal: (componentName: string, data: any, onApply: () => void, onCancel?: () => void) => void;
};
export interface HashTable {
[key: string]: T;
}
export declare class Helpers {
/**
* A static methods that returns true if a value underfined, null, empty string or empty array.
* @param value
*/
static isValueEmpty(value: any): boolean;
static isArrayContainsEqual(x: any, y: any): boolean;
static isArraysEqual(x: any, y: any, ignoreOrder?: boolean): boolean;
static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean): boolean;
static randomizeArray(array: Array): Array;
static getUnbindValue(value: any): any;
static createCopy(obj: any): any;
static isConvertibleToNumber(value: any): boolean;
static isNumber(value: any): boolean;
static getMaxLength(maxLength: number, surveyLength: number): any;
static getNumberByIndex(index: number, startIndexStr: string): string;
static isCharNotLetterAndDigit(ch: string): boolean;
static isCharDigit(ch: string): boolean;
}
export declare class ValidatorResult {
value: any;
error: SurveyError;
constructor(value: any, error?: SurveyError);
}
/**
* Base SurveyJS validator class.
*/
export declare class SurveyValidator extends Base {
errorOwner: ISurveyErrorOwner;
onAsyncCompleted: (result: ValidatorResult) => void;
constructor();
getSurvey(): ISurvey;
get text(): string;
set text(value: string);
get isValidateAllValues(): boolean;
get locText(): LocalizableString;
protected getErrorText(name: string): string;
protected getDefaultErrorText(name: string): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
get isRunning(): boolean;
get isAsync(): boolean;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
protected createCustomError(name: string): SurveyError;
toString(): string;
}
export interface IValidatorOwner {
getValidators(): Array;
validatedValue: any;
getValidatorTitle(): string;
getDataFilteredValues(): any;
getDataFilteredProperties(): any;
}
export declare class ValidatorRunner {
onAsyncCompleted: (errors: Array) => void;
run(owner: IValidatorOwner): Array;
}
/**
* Validate numeric values.
*/
export declare class NumericValidator extends SurveyValidator {
constructor(minValue?: number, maxValue?: number);
getType(): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
protected getDefaultErrorText(name: string): any;
/**
* The minValue property.
*/
get minValue(): number;
set minValue(val: number);
/**
* The maxValue property.
*/
get maxValue(): number;
set maxValue(val: number);
}
/**
* Validate text values.
*/
export declare class TextValidator extends SurveyValidator {
constructor(minLength?: number, maxLength?: number, allowDigits?: boolean);
getType(): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
protected getDefaultErrorText(name: string): any;
/**
* The minLength property.
*/
get minLength(): number;
set minLength(val: number);
/**
* The maxLength property.
*/
get maxLength(): number;
set maxLength(val: number);
/**
* The allowDigits property.
*/
get allowDigits(): boolean;
set allowDigits(val: boolean);
}
export declare class AnswerCountValidator extends SurveyValidator {
constructor(minCount?: number, maxCount?: number);
getType(): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
protected getDefaultErrorText(name: string): string;
/**
* The minCount property.
*/
get minCount(): number;
set minCount(val: number);
/**
* The maxCount property.
*/
get maxCount(): number;
set maxCount(val: number);
}
/**
* Use it to validate the text by regular expressions.
*/
export declare class RegexValidator extends SurveyValidator {
constructor(regex?: string);
getType(): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
/**
* The regex property.
*/
get regex(): string;
set regex(val: string);
}
/**
* Validate e-mail address in the text input
*/
export declare class EmailValidator extends SurveyValidator {
constructor();
getType(): string;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
protected getDefaultErrorText(name: string): any;
}
/**
* Show error if expression returns false
*/
export declare class ExpressionValidator extends SurveyValidator {
constructor(expression?: string);
getType(): string;
get isValidateAllValues(): boolean;
get isAsync(): boolean;
get isRunning(): boolean;
validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult;
protected generateError(res: boolean, value: any, name: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
protected ensureConditionRunner(): boolean;
/**
* The expression property.
*/
get expression(): string;
set expression(val: string);
}
/**
* Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows.
* It has two main properties: value and text. If text is empty, value is used for displaying.
* The text property is localizable and support markdown.
*/
export declare class ItemValue extends Base {
protected typeName: string;
[index: string]: any;
static get Separator(): string;
static set Separator(val: string);
static createArray(locOwner: ILocalizableOwner): Array;
static setupArray(items: Array, locOwner: ILocalizableOwner): void;
static setData(items: Array, values: Array): void;
static getData(items: Array): any;
static getItemByValue(items: Array, val: any): ItemValue;
static getTextOrHtmlByValue(items: Array, val: any): string;
static locStrsChanged(items: Array): void;
static runConditionsForItems(items: Array, filteredItems: Array, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean): boolean;
static runEnabledConditionsForItems(items: Array, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: (item: ItemValue) => boolean): boolean;
ownerPropertyName: string;
constructor(value: any, text?: string, typeName?: string);
onCreating(): any;
getType(): string;
getSurvey(): ISurvey;
getLocale(): string;
get locText(): LocalizableString;
setLocText(locText: LocalizableString): void;
get locOwner(): ILocalizableOwner;
set locOwner(value: ILocalizableOwner);
get value(): any;
set value(newValue: any);
get hasText(): boolean;
get pureText(): string;
set pureText(val: string);
get text(): string;
set text(newText: string);
get calculatedText(): string;
getData(): any;
toJSON(): any;
setData(value: any): void;
get visibleIf(): string;
set visibleIf(val: string);
get enableIf(): string;
set enableIf(val: string);
get isVisible(): boolean;
setIsVisible(val: boolean): void;
get isEnabled(): any;
setIsEnabled(val: boolean): void;
addUsedLocales(locales: Array): void;
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
protected getConditionRunner(isVisible: boolean): ConditionRunner;
originalItem: any;
}
export interface ISurveyData {
getValue(name: string): any;
setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
getComment(name: string): string;
setComment(name: string, newValue: string, locNotification: any): any;
getAllValues(): any;
getFilteredValues(): any;
getFilteredProperties(): any;
}
export interface ITextProcessor {
processText(text: string, returnDisplayValue: boolean): string;
processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any;
}
export interface ISurveyErrorOwner extends ILocalizableOwner {
getErrorCustomText(text: string, error: SurveyError): string;
}
export interface ISurvey extends ITextProcessor, ISurveyErrorOwner {
currentPage: IPage;
pages: Array;
getCss(): any;
isPageStarted(page: IPage): boolean;
getQuestionByName(name: string): IQuestion;
pageVisibilityChanged(page: IPage, newValue: boolean): any;
panelVisibilityChanged(panel: IPanel, newValue: boolean): any;
questionVisibilityChanged(question: IQuestion, newValue: boolean): any;
isEditingSurveyElement: boolean;
isClearValueOnHidden: boolean;
isClearValueOnHiddenContainer: boolean;
questionsOrder: string;
questionCreated(question: IQuestion): any;
questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any): any;
panelAdded(panel: IElement, index: number, parentPanel: any, rootPanel: any): any;
questionRemoved(question: IQuestion): any;
panelRemoved(panel: IElement): any;
questionRenamed(question: IQuestion, oldName: string, oldValueName: string): any;
validateQuestion(question: IQuestion): SurveyError;
validatePanel(panel: IPanel): SurveyError;
hasVisibleQuestionByValueName(valueName: string): boolean;
questionCountByValueName(valueName: string): number;
processHtml(html: string): string;
getSurveyMarkdownHtml(element: Base, text: string, name: string): string;
getRendererForString(element: Base, name: string): string;
isDisplayMode: boolean;
isDesignMode: boolean;
areInvisibleElementsShowing: boolean;
areEmptyElementsHidden: boolean;
isLoadingFromJson: boolean;
isUpdateValueTextOnTyping: boolean;
state: string;
cancelPreviewByPage(panel: IPanel): any;
requiredText: string;
beforeSettingQuestionErrors(question: IQuestion, errors: Array): void;
questionTitlePattern: string;
getUpdatedQuestionTitle(question: IQuestion, title: string): string;
getUpdatedQuestionNo(question: IQuestion, no: string): string;
getUpdatedQuestionTitleActions(question: IQuestion, titleActions: Array): Array;
getUpdatedPanelTitleActions(question: IPanel, titleActions: Array): Array;
getUpdatedPageTitleActions(question: IPage, titleActions: Array): Array;
questionStartIndex: string;
questionTitleLocation: string;
questionDescriptionLocation: string;
questionErrorLocation: string;
storeOthersAsComment: boolean;
maxTextLength: number;
maxOthersLength: number;
clearValueOnDisableItems: boolean;
uploadFiles(question: IQuestion, name: string, files: File[], uploadingCallback: (status: string, data: any) => any): any;
downloadFile(name: string, content: string, callback: (status: string, data: any) => any): any;
clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: (status: string, data: any) => any): any;
updateChoicesFromServer(question: IQuestion, choices: Array, serverResult: any): Array;
updateQuestionCssClasses(question: IQuestion, cssClasses: any): any;
updatePanelCssClasses(panel: IPanel, cssClasses: any): any;
updatePageCssClasses(panel: IPanel, cssClasses: any): any;
afterRenderQuestion(question: IQuestion, htmlElement: HTMLElement): any;
afterRenderQuestionInput(question: IQuestion, htmlElement: HTMLElement): any;
afterRenderPanel(panel: IElement, htmlElement: HTMLElement): any;
afterRenderPage(htmlElement: HTMLElement): any;
getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion;
matrixRowAdded(question: IQuestion, row: any): any;
matrixBeforeRowAdded(options: {
question: IQuestion;
canAddRow: boolean;
}): any;
matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): any;
matrixAllowRemoveRow(question: IQuestion, rowIndex: number, row: any): boolean;
matrixCellCreated(question: IQuestion, options: any): any;
matrixAfterCellRender(question: IQuestion, options: any): any;
matrixCellValueChanged(question: IQuestion, options: any): any;
matrixCellValueChanging(question: IQuestion, options: any): any;
isValidateOnValueChanging: boolean;
matrixCellValidate(question: IQuestion, options: any): SurveyError;
dynamicPanelAdded(question: IQuestion): any;
dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): any;
dynamicPanelItemValueChanged(question: IQuestion, options: any): any;
dragAndDropAllow(options: any): boolean;
scrollElementToTop(element: ISurveyElement, question: IQuestion, page: IPage, id: string): any;
runExpression(expression: string): any;
renderTitleActions(element: ISurveyElement): boolean;
elementContentVisibilityChanged(element: ISurveyElement): void;
}
export interface ISurveyImpl {
getSurveyData(): ISurveyData;
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
}
export interface IConditionRunner {
runCondition(values: HashTable, properties: HashTable): any;
}
export interface ISurveyElement {
name: string;
isVisible: boolean;
isReadOnly: boolean;
isPage: boolean;
isPanel: boolean;
containsErrors: boolean;
setSurveyImpl(value: ISurveyImpl): any;
onSurveyLoad(): any;
onFirstRendering(): any;
getType(): string;
setVisibleIndex(value: number): number;
locStrsChanged(): any;
delete(): any;
toggleState(): void;
stateChangedCallback(): void;
getTitleActions(): Array;
}
export interface IElement extends IConditionRunner, ISurveyElement {
visible: boolean;
parent: IPanel;
renderWidth: string;
width: string;
minWidth?: string;
maxWidth?: string;
isExpanded: boolean;
isCollapsed: boolean;
rightIndent: number;
startWithNewLine: boolean;
registerFunctionOnPropertyValueChanged(name: string, func: any, key: string): void;
unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void;
getPanel(): IPanel;
getLayoutType(): string;
isLayoutTypeSupported(layoutType: string): boolean;
removeElement(el: IElement): boolean;
onAnyValueChanged(name: string): any;
updateCustomWidgets(): any;
clearIncorrectValues(): any;
clearErrors(): any;
dispose(): void;
}
export interface IQuestion extends IElement, ISurveyErrorOwner {
hasTitle: boolean;
isEmpty(): boolean;
onSurveyValueChanged(newValue: any): any;
updateValueFromSurvey(newValue: any): any;
updateCommentFromSurvey(newValue: any): any;
supportGoNextPageAutomatic(): boolean;
clearUnusedValues(): any;
getDisplayValue(keysAsText: boolean, value: any): any;
getValueName(): string;
clearValue(): any;
clearValueIfInvisible(): any;
isAnswerCorrect(): boolean;
updateValueWithDefaults(): any;
getQuestionFromArray(name: string, index: number): IQuestion;
value: any;
survey: any;
}
export interface IParentElement {
addElement(element: IElement, index: number): any;
removeElement(element: IElement): boolean;
isReadOnly: boolean;
}
export interface IPanel extends ISurveyElement, IParentElement {
getChildrenLayoutType(): string;
getQuestionTitleLocation(): string;
getQuestionStartIndex(): string;
parent: IPanel;
elementWidthChanged(el: IElement): any;
indexOf(el: IElement): number;
elements: Array;
ensureRowsVisibility(): void;
}
export interface IPage extends IPanel, IConditionRunner {
isStarted: boolean;
}
export interface ITitleOwner {
name: string;
no: string;
requiredText: string;
isRequireTextOnStart: boolean;
isRequireTextBeforeTitle: boolean;
isRequireTextAfterTitle: boolean;
locTitle: LocalizableString;
}
export interface IProgressInfo {
questionCount: number;
answeredQuestionCount: number;
requiredQuestionCount: number;
requiredAnsweredQuestionCount: number;
}
export declare class Bindings {
constructor(obj: Base);
getType(): string;
getNames(): Array;
getProperties(): Array;
setBinding(propertyName: string, valueName: string): void;
clearBinding(propertyName: string): void;
isEmpty(): boolean;
getValueNameByPropertyName(propertyName: string): string;
getPropertiesByValueName(valueName: string): Array;
getJson(): any;
setJson(value: any): void;
}
/**
* The base class for SurveyJS objects.
*/
export declare class Base {
static isSurveyElement(val: any): boolean;
static get commentPrefix(): string;
static set commentPrefix(val: string);
static createItemValue: (item: any, type?: string) => any;
static itemValueLocStrChanged: (arr: Array) => void;
/**
* A static methods that returns true if a value underfined, null, empty string or empty array.
* @param value
*/
isValueEmpty(value: any): boolean;
protected IsPropertyEmpty(value: any): boolean;
protected isLoadingFromJsonValue: boolean;
loadingOwner: Base;
/**
* Event that raise on property change of the sender object
* sender - the object that owns the property
* options.name - the property name that has been changed
* options.oldValue - old value. Please note, it equals to options.newValue if property is an array
* options.newValue - new value.
*/
onPropertyChanged: Event<(sender: Base, options: any) => any, any>;
/**
* Event that raised on changing property of the ItemValue object.
* sender - the object that owns the property
* options.propertyName - the property name to which ItemValue array is belong. It can be "choices" for dropdown question
* options.obj - the instance of ItemValue object which property has been changed
* options.name - the property of ItemObject that has been changed
* options.oldValue - old value
* options.newValue - new value
*/
onItemValuePropertyChanged: Event<(sender: Base, options: any) => any, any>;
getPropertyValueCoreHandler: (propertiesHash: any, name: string) => any;
setPropertyValueCoreHandler: (propertiesHash: any, name: string, val: any) => void;
createArrayCoreHandler: (propertiesHash: any, name: string) => Array;
constructor();
protected onBaseCreating(): void;
/**
* Returns the type of the object as a string as it represents in the json. It should be in lowcase.
*/
getType(): string;
getSurvey(): ISurvey;
get bindings(): Bindings;
checkBindings(valueName: string, value: any): void;
protected updateBindings(propertyName: string, value: any): void;
protected updateBindingValue(valueName: string, value: any): void;
/**
* Returns the element template name without prefix. Typically it equals to getType().
* @see getType
*/
getTemplate(): string;
/**
* Returns true if the object is loading from Json at the current moment.
*/
get isLoadingFromJson(): boolean;
protected getIsLoadingFromJson(): boolean;
startLoadingFromJson(): void;
endLoadingFromJson(): void;
/**
* Deserialized the current object into JSON
* @see fromJSON
*/
toJSON(): any;
/**
* Load object properties and elements. It doesn't reset properties that was changed before and they are not defined in the json parameter.
* @param json the object JSON definition
* @see toJSON
*/
fromJSON(json: any): void;
/**
* Make a clone of the existing object. Create a new object of the same type and load all properties into it.
*/
clone(): Base;
getProgressInfo(): IProgressInfo;
locStrsChanged(): void;
/**
* Returns the property value by name
* @param name property name
*/
getPropertyValue(name: string, defaultValue?: any): any;
protected getPropertyValueCore(propertiesHash: any, name: string): any;
geValueFromHash(): any;
protected setPropertyValueCore(propertiesHash: any, name: string, val: any): void;
iteratePropertiesHash(func: (hash: any, key: any) => void): void;
/**
* set property value
* @param name property name
* @param val new property value
*/
setPropertyValue(name: string, val: any): void;
protected clearPropertyValue(name: string): void;
onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void;
itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void;
protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void;
protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void;
protected get isInternal(): boolean;
/**
* Register a function that will be called on a property value changed.
* @param name the property name
* @param func the function with no parameters that will be called on property changed.
* @param key an optional parameter. If there is already a registered function for this property with the same key, it will be overwritten.
*/
registerFunctionOnPropertyValueChanged(name: string, func: any, key?: string): void;
/**
* Register a function that will be called on a property value changed from the names list.
* @param names the list of properties names
* @param func the function with no parameters that will be called on property changed.
* @param key an optional parameter. If there is already a registered function for this property with the same key, it will be overwritten.
*/
registerFunctionOnPropertiesValueChanged(names: Array, func: any, key?: string): void;
/**
* Unregister notification on property value changed
* @param name the property name
* @param key the key with which you have registered the notification for this property. It can be null.
*/
unRegisterFunctionOnPropertyValueChanged(name: string, key?: string): void;
/**
* Unregister notification on property value changed for all properties in the names list.
* @param names the list of properties names
* @param key the key with which you have registered the notification for this property. It can be null.
*/
unRegisterFunctionOnPropertiesValueChanged(names: Array, key?: string): void;
createCustomLocalizableObj(name: string): void;
protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean): LocalizableString;
getLocalizableString(name: string): LocalizableString;
getLocalizableStringText(name: string, defaultStr?: string): string;
setLocalizableStringText(name: string, value: string): void;
addUsedLocales(locales: Array): void;
protected AddLocStringToUsedLocales(locStr: LocalizableString, locales: Array): void;
protected createItemValues(name: string): Array;
protected createNewArrayCore(name: string): Array;
protected ensureArray(name: string, onPush?: any, onRemove?: any): any[];
protected createNewArray(name: string, onPush?: any, onRemove?: any): Array;
protected getItemValueType(): string;
protected setArray(name: string, src: any[], dest: any[], isItemValues: boolean, onPush: any): void;
protected isTwoValueEquals(x: any, y: any, caseInSensitive?: boolean): boolean;
protected copyCssClasses(dest: any, source: any): void;
}
export declare class ArrayChanges {
index: number;
deleteCount: number;
itemsToAdd: any[];
deletedItems: any[];
constructor(index: number, deleteCount: number, itemsToAdd: any[], deletedItems: any[]);
}
export declare class SurveyError {
text: string;
protected errorOwner: ISurveyErrorOwner;
visible: boolean;
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
get locText(): LocalizableString;
getText(): string;
getErrorType(): string;
protected getDefaultText(): string;
}
/**
* Base class of SurveyJS Elements.
*/
export declare class SurveyElement extends Base implements ISurveyElement {
protected titleActions: any[];
stateChangedCallback: () => void;
static createProgressInfo(): IProgressInfo;
static getProgressInfoByElements(children: Array, isRequired: boolean): IProgressInfo;
readOnlyChangedCallback: () => void;
static ScrollElementToTop(elementId: string): boolean;
static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any;
static FocusElement(elementId: string): boolean;
static CreateDisabledDesignElements: boolean;
disableDesignActions: boolean;
constructor(name: string);
/**
* Set this property to "collapsed" to render only Panel title and expanded button and to "expanded" to render the collapsed button in the Panel caption
*/
get state(): string;
set state(val: string);
/**
* Returns true if the Element is in the collapsed state
* @see state
* @see collapse
* @see isExpanded
*/
get isCollapsed(): boolean;
/**
* Returns true if the Element is in the expanded state
* @see state
* @see expand
* @see isCollapsed
*/
get isExpanded(): boolean;
/**
* Collapse the Element
* @see state
*/
collapse(): void;
/**
* Expand the Element
* @see state
*/
expand(): void;
/**
* Toggle element's state
* @see state
*/
toggleState(): void;
getTitleActions(): Array;
getTitleComponentName(): string;
setSurveyImpl(value: ISurveyImpl): void;
protected get surveyImpl(): ISurveyImpl;
get data(): ISurveyData;
/**
* Returns the survey object.
*/
get survey(): ISurvey;
getSurvey(): ISurvey;
/**
* Returns true if the question in design mode right now.
*/
get isDesignMode(): boolean;
isContentElement: boolean;
protected get isInternal(): boolean;
get areInvisibleElementsShowing(): boolean;
get isVisible(): boolean;
get isReadOnly(): boolean;
/**
* Set it to true to make an element question/panel/page readonly.
* Please note, this property is hidden for question without input, for example html question.
* @see enableIf
* @see isReadOnly
*/
get readOnly(): boolean;
set readOnly(val: boolean);
protected onReadOnlyChanged(): void;
updateElementCss(): void;
protected getIsLoadingFromJson(): boolean;
/**
* This is the identifier of a survey element - question or panel.
* @see valueName
*/
get name(): string;
set name(val: string);
protected getValidName(name: string): string;
protected onNameChanged(oldValue: string): void;
protected updateBindingValue(valueName: string, value: any): void;
/**
* The list of errors. It is created by callig hasErrors functions
* @see hasErrors
*/
get errors(): Array;
set errors(val: Array);
/**
* Returns true if a question or a container (panel/page) or their chidren have an error.
* The value can be out of date. hasErrors function should be called to get the correct value.
*/
get containsErrors(): boolean;
updateContainsErrors(): void;
protected getContainsErrors(): boolean;
getElementsInDesign(includeHidden?: boolean): Array;
get selectedElementInDesign(): SurveyElement;
set selectedElementInDesign(val: SurveyElement);
updateCustomWidgets(): void;
onSurveyLoad(): void;
onFirstRendering(): void;
endLoadingFromJson(): void;
setVisibleIndex(index: number): number;
get isPage(): boolean;
/**
* Return false if it is not panel.
*/
get isPanel(): boolean;
delete(): void;
protected removeSelfFromList(list: Array): void;
protected get textProcessor(): ITextProcessor;
protected getProcessedHtml(html: string): string;
protected onSetData(): void;
protected getPage(parent: IPanel): IPage;
protected moveToBase(parent: IPanel, container: IPanel, insertBefore?: any): boolean;
protected setPage(parent: IPanel, val: IPage): void;
}
export declare class Event {
onCallbacksChanged: () => void;
protected callbacks: Array;
get isEmpty(): boolean;
fire(sender: any, options: Options): void;
clear(): void;
add(func: T): void;
remove(func: T): void;
hasFunc(func: T): boolean;
}
/**
* The calculated value is a way to define the variable in Survey Creator.
* It has two main properties: name and expression. Based on expression the value read-only property is automatically calculated.
* The name property should be unique though all calculated values.
* It uses survey.getVariable/seruvey.setVariable functions to get/set its value. The class do not store its value internally.
* You may set includeIntoResult property to true to store this calculated value into survey result.
*/
export declare class CalculatedValue extends Base {
constructor(name?: string, expression?: string);
setOwner(data: ISurveyData): void;
getType(): string;
getSurvey(): ISurvey;
get owner(): ISurveyData;
/**
* The calculated value name. It should be non empty and unique.
*/
get name(): string;
set name(val: string);
/**
* Set this property to true to include the non-empty calculated value into survey result, survey.data property.
*/
get includeIntoResult(): boolean;
set includeIntoResult(val: boolean);
/**
* The Expression that used to calculate the value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}.
*
Example: "({quantity} * {price}) * (100 - {discount}) / 100"
*/
get expression(): string;
set expression(val: string);
locCalculation(): void;
unlocCalculation(): void;
resetCalculation(): void;
doCalculation(calculatedValues: Array, values: HashTable, properties: HashTable): void;
runExpression(values: HashTable, properties: HashTable): void;
get value(): any;
protected setValue(val: any): void;
}
export declare class AnswerRequiredError extends SurveyError {
text: string;
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class OneAnswerRequiredError extends SurveyError {
text: string;
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class RequreNumericError extends SurveyError {
text: string;
constructor(text?: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class ExceedSizeError extends SurveyError {
constructor(maxSize: number, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
getDefaultText(): string;
}
export declare class WebRequestError extends SurveyError {
status: string;
response: string;
constructor(status: string, response: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class WebRequestEmptyError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class OtherEmptyError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class UploadingFileError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class RequiredInAllRowsError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class MinRowCountError extends SurveyError {
minRowCount: number;
constructor(minRowCount: number, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class KeyDuplicationError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
protected getDefaultText(): string;
}
export declare class CustomError extends SurveyError {
text: string;
constructor(text: string, errorOwner?: ISurveyErrorOwner);
getErrorType(): string;
}
export interface ILocalizableOwner {
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getProcessedText(text: string): string;
getRenderer(name: string): string;
}
export interface ILocalizableString {
getLocaleText(loc: string): string;
setLocaleText(loc: string, newValue: string): any;
getLocales(): Array;
}
/**
* The class represents the string that supports multi-languages and markdown.
* It uses in all objects where support for multi-languages and markdown is required.
*/
export declare class LocalizableString implements ILocalizableString {
owner: ILocalizableOwner;
useMarkdown: boolean;
name?: string;
static SerializeAsObject: boolean;
static get defaultLocale(): string;
static set defaultLocale(val: string);
static defaultRenderer: string;
static editableRenderer: string;
onGetTextCallback: (str: string) => string;
onStrChanged: () => void;
sharedData: LocalizableString;
constructor(owner: ILocalizableOwner, useMarkdown?: boolean, name?: string);
get locale(): string;
strChanged(): void;
get text(): string;
get calculatedText(): string;
get pureText(): string;
get hasHtml(): boolean;
get html(): string;
get isEmpty(): boolean;
get textOrHtml(): string;
get renderedHtml(): string;
set text(value: string);
getLocaleText(loc: string): string;
setLocaleText(loc: string, value: string): void;
hasNonDefaultText(): boolean;
getLocales(): Array;
getJson(): any;
setJson(value: any): void;
get renderAs(): string;
equals(obj: any): boolean;
onChanged(): void;
protected onCreating(): void;
}
/**
* The class represents the list of strings that supports multi-languages.
*/
export declare class LocalizableStrings implements ILocalizableString {
owner: ILocalizableOwner;
constructor(owner: ILocalizableOwner);
get locale(): string;
get value(): Array;
set value(val: Array);
get text(): string;
set text(val: string);
getLocaleText(loc: string): string;
setLocaleText(loc: string, newValue: string): any;
getValue(loc: string): Array;
setValue(loc: string, val: Array): void;
get isEmpty(): boolean;
getLocales(): Array;
getJson(): any;
setJson(value: any): void;
}
export declare class ExpressionItem extends Base implements ILocalizableOwner {
locOwner: ILocalizableOwner;
constructor(expression?: string);
getType(): string;
runCondition(values: any, properties: any): boolean;
/**
* The expression property. If this expression returns true, then survey will use html property to show on complete page.
*/
get expression(): string;
set expression(val: string);
get locHtml(): LocalizableString;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
}
/**
* A class that contains expression and html propeties. It uses in survey.completedHtmlOnCondition array.
* If the expression returns true then html of this item uses instead of survey.completedHtml property
* @see SurveyModel.completedHtmlOnCondition
* @see SurveyModel.completedHtml
*/
export declare class HtmlConditionItem extends ExpressionItem {
constructor(expression?: string, html?: string);
getType(): string;
/**
* The html that shows on completed ('Thank you') page. The expression should return true
* @see expression
*/
get html(): string;
set html(value: string);
get locHtml(): LocalizableString;
}
/**
* A class that contains expression and url propeties. It uses in survey.navigateToUrlOnCondition array.
* If the expression returns true then url of this item uses instead of survey.navigateToUrl property
* @see SurveyModel.navigateToUrl
*/
export declare class UrlConditionItem extends ExpressionItem {
constructor(expression?: string, url?: string);
getType(): string;
/**
* The url that survey navigates to on completing the survey. The expression should return true
* @see expression
*/
get url(): string;
set url(value: string);
get locUrl(): LocalizableString;
}
/**
* A definition for filling choices for checkbox, dropdown and radiogroup questions from resfull services.
* The run method call a restfull service and results can be get on getResultCallback.
*/
export declare class ChoicesRestfull extends Base {
static get EncodeParameters(): boolean;
static set EncodeParameters(val: boolean);
static clearCache(): void;
static onBeforeSendRequest: (sender: ChoicesRestfull, options: {
request: XMLHttpRequest;
}) => void;
protected processedUrl: string;
protected processedPath: string;
onProcessedUrlCallback: (url: string, path: string) => void;
getResultCallback: (items: Array) => void;
beforeSendRequestCallback: () => void;
updateResultCallback: (items: Array, serverResult: any) => Array;
getItemValueCallback: (item: any) => any;
error: SurveyError;
owner: IQuestion;
constructor();
getSurvey(): ISurvey;
run(textProcessor?: ITextProcessor): void;
get isUsingCache(): boolean;
get isRunning(): boolean;
get isWaitingForParameters(): boolean;
protected useChangedItemsResults(): boolean;
protected parseResponse(response: any): any;
protected sendRequest(): void;
getType(): string;
get isEmpty(): boolean;
getCustomPropertiesNames(): Array;
setData(json: any): void;
getData(): any;
get url(): string;
set url(val: string);
get path(): string;
set path(val: string);
get valueName(): string;
set valueName(val: string);
get titleName(): string;
set titleName(val: string);
get imageLinkName(): string;
set imageLinkName(val: string);
get allowEmptyResponse(): boolean;
set allowEmptyResponse(val: boolean);
get attachOriginalItems(): boolean;
set attachOriginalItems(val: boolean);
get itemValueType(): string;
clear(): void;
protected beforeSendRequest(): void;
protected onLoad(result: any, loadingObjHash?: string): void;
protected callResultCallback(items: Array, loadingObjHash: string): void;
}
export declare class FunctionFactory {
static Instance: FunctionFactory;
register(name: string, func: (params: any[]) => any, isAsync?: boolean): void;
unregister(name: string): void;
hasFunction(name: string): boolean;
isAsyncFunction(name: string): boolean;
clear(): void;
getAll(): Array;
run(name: string, params: any[], properties?: HashTable): any;
}
export declare var registerFunction: (name: string, func: (params: any[]) => any, isAsync?: boolean) => void;
export declare class ExpressionRunnerBase {
constructor(expression: string);
get expression(): string;
set expression(value: string);
getVariables(): Array;
hasFunction(): boolean;
get isAsync(): boolean;
canRun(): boolean;
protected runCore(values: HashTable, properties?: HashTable): any;
protected doOnComplete(res: any): void;
}
export declare class ConditionRunner extends ExpressionRunnerBase {
onRunComplete: (result: boolean) => void;
run(values: HashTable, properties?: HashTable): boolean;
protected doOnComplete(res: any): void;
}
export declare class ExpressionRunner extends ExpressionRunnerBase {
onRunComplete: (result: any) => void;
run(values: HashTable, properties?: HashTable): any;
protected doOnComplete(res: any): void;
}
export declare abstract class Operand {
toString(func?: (op: Operand) => string): string;
abstract getType(): string;
abstract evaluate(processValue?: ProcessValue): any;
abstract setVariables(variables: Array): any;
hasFunction(): boolean;
hasAsyncFunction(): boolean;
addToAsyncList(list: Array): void;
}
export declare class BinaryOperand extends Operand {
constructor(operatorName: string, left?: any, right?: any, isArithmeticOp?: boolean);
getType(): string;
get isArithmetic(): boolean;
get isConjunction(): boolean;
get conjunction(): string;
get operator(): string;
get leftOperand(): any;
get rightOperand(): any;
evaluate(processValue?: ProcessValue): any;
toString(func?: (op: Operand) => string): string;
setVariables(variables: Array): void;
hasFunction(): boolean;
hasAsyncFunction(): boolean;
addToAsyncList(list: Array): void;
}
export declare class UnaryOperand extends Operand {
constructor(expressionValue: Operand, operatorName: string);
get operator(): string;
get expression(): Operand;
getType(): string;
toString(func?: (op: Operand) => string): string;
evaluate(processValue?: ProcessValue): boolean;
setVariables(variables: Array): void;
}
export declare class ArrayOperand extends Operand {
values: Array;
constructor(values: Array);
getType(): string;
toString(func?: (op: Operand) => string): string;
evaluate(processValue?: ProcessValue): Array;
setVariables(variables: Array): void;
hasFunction(): boolean;
hasAsyncFunction(): boolean;
addToAsyncList(list: Array): void;
}
export declare class Const extends Operand {
constructor(value: any);
getType(): string;
toString(func?: (op: Operand) => string): string;
get correctValue(): any;
evaluate(): any;
setVariables(variables: Array): void;
protected getCorrectValue(value: any): any;
}
export declare class Variable extends Const {
static DisableConversionChar: string;
constructor(variableName: string);
getType(): string;
toString(func?: (op: Operand) => string): string;
get variable(): string;
evaluate(processValue?: ProcessValue): any;
setVariables(variables: Array): void;
protected getCorrectValue(value: any): any;
}
export declare class FunctionOperand extends Operand {
onAsyncReady: () => void;
constructor(origionalValue: string, parameters: ArrayOperand);
getType(): string;
evaluateAsync(processValue: ProcessValue): void;
evaluate(processValue?: ProcessValue): any;
toString(func?: (op: Operand) => string): string;
setVariables(variables: Array): void;
get isReady(): boolean;
hasFunction(): boolean;
hasAsyncFunction(): boolean;
addToAsyncList(list: Array): void;
}
export declare class OperandMaker {
static throwInvalidOperatorError(op: string): void;
static safeToString(operand: Operand, func: (op: Operand) => string): string;
static toOperandString(value: string): string;
static isSpaceString(str: string): boolean;
static isNumeric(value: string): boolean;
static isBooleanValue(value: string): boolean;
static unaryFunctions: HashTable;
static binaryFunctions: HashTable;
static isTwoValueEquals(x: any, y: any): boolean;
static operatorToString(operatorName: string): string;
static signs: HashTable;
}
export declare class ConditionsParserError {
at: number;
code: string;
constructor(at: number, code: string);
}
export declare class ConditionsParser {
createCondition(text: string): Operand;
parseExpression(text: string): Operand;
get error(): ConditionsParserError;
}
export declare class ProcessValue {
values: HashTable;
properties: HashTable;
constructor();
getFirstName(text: string, obj?: any): string;
hasValue(text: string, values?: HashTable): boolean;
getValue(text: string, values?: HashTable): any;
setValue(obj: any, text: string, value: any): void;
getValueInfo(valueInfo: any): void;
}
export interface IPropertyDecoratorOptions {
defaultValue?: any;
defaultSource?: string;
localizable?: {
name: string;
onGetTextCallback?: (str: string) => string;
} | boolean;
onSet?: (val: any, target: any) => void;
}
export declare function property(options?: IPropertyDecoratorOptions): (target: any, key: string) => void;
export interface IArrayPropertyDecoratorOptions {
onPush?: any;
onRemove?: any;
onSet?: (val: any, target: any) => void;
}
export declare function propertyArray(options?: IArrayPropertyDecoratorOptions): (target: any, key: string) => void;
export interface IObject {
[key: string]: any;
}
/**
* Contains information about a property of a survey element (page, panel, questions, and etc).
* @see addProperty
* @see removeProperty
* @see [Add Properties](https://surveyjs.io/Documentation/Survey-Creator#addproperties)
* @see [Remove Properties](https://surveyjs.io/Documentation/Survey-Creator#removeproperties)
*/
export declare class JsonObjectProperty implements IObject {
name: string;
static getItemValuesDefaultValue: (val: any) => any;
[key: string]: any;
isSerializable: boolean;
isLightSerializable: boolean;
isCustom: boolean;
isDynamicChoices: boolean;
isBindable: boolean;
className: string;
alternativeName: string;
classNamePart: string;
baseClassName: string;
defaultValueValue: any;
serializationProperty: string;
displayName: string;
category: string;
categoryIndex: number;
visibleIndex: number;
nextToProperty: string;
showMode: string;
maxLength: number;
maxValue: any;
minValue: any;
layout: string;
onGetValue: (obj: any) => any;
onSetValue: (obj: any, value: any, jsonConv: JsonObject) => any;
visibleIf: (obj: any) => boolean;
onPropertyEditorUpdate: (obj: any, propEditor: any) => any;
constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean);
get id(): number;
get classInfo(): JsonMetadataClass;
get type(): string;
set type(value: string);
isArray: boolean;
get isRequired(): boolean;
set isRequired(val: boolean);
get isUnique(): boolean;
set isUnique(val: boolean);
get hasToUseGetValue(): string | ((obj: any) => any);
get defaultValue(): any;
set defaultValue(newValue: any);
isDefaultValue(value: any): boolean;
getValue(obj: any): any;
getPropertyValue(obj: any): any;
get hasToUseSetValue(): string | ((obj: any, value: any, jsonConv: JsonObject) => any);
setValue(obj: any, value: any, jsonConv: JsonObject): void;
getObjType(objType: string): string;
getClassName(className: string): string;
/**
* Depricated, please use getChoices
*/
get choices(): Array;
get hasChoices(): boolean;
getChoices(obj: any, choicesCallback?: any): Array;
setChoices(value: Array, valueFunc?: (obj: any) => Array): void;
getBaseValue(): string;
setBaseValue(val: any): void;
get readOnly(): boolean;
set readOnly(val: boolean);
isVisible(layout: string, obj?: any): boolean;
get visible(): boolean;
set visible(val: boolean);
get isLocalizable(): boolean;
set isLocalizable(val: boolean);
get dataList(): Array;
set dataList(val: Array);
mergeWith(prop: JsonObjectProperty): void;
addDependedProperty(name: string): void;
getDependedProperties(): Array;
schemaType(): string;
}
export declare class CustomPropertiesCollection {
static addProperty(className: string, property: any): void;
static removeProperty(className: string, propertyName: string): void;
static addClass(className: string, parentClassName: string): void;
static getProperties(className: string): Array;
static createProperties(obj: any): void;
}
export declare class JsonMetadataClass {
name: string;
creator: (json?: any) => any;
parentName: string;
static requiredSymbol: string;
static typeSymbol: string;
properties: Array;
constructor(name: string, properties: Array, creator?: (json?: any) => any, parentName?: string);
find(name: string): JsonObjectProperty;
createProperty(propInfo: any): JsonObjectProperty;
}
/**
* The metadata object. It contains object properties' runtime information and allows you to modify it.
*/
export declare class JsonMetadata {
addClass(name: string, properties: Array, creator?: (json?: any) => any, parentName?: string): JsonMetadataClass;
removeClass(name: string): void;
overrideClassCreatore(name: string, creator: () => any): void;
overrideClassCreator(name: string, creator: () => any): void;
getProperties(className: string): Array;
getPropertiesByObj(obj: any): Array;
getDynamicPropertiesByObj(obj: any, dynamicType?: string): Array;
findProperty(className: string, propertyName: string): JsonObjectProperty;
findProperties(className: string, propertyNames: Array): Array;
getAllPropertiesByName(propertyName: string): Array;
getAllClasses(): Array;
createClass(name: string, json?: any): any;
getChildrenClasses(name: string, canBeCreated?: boolean): Array;
getRequiredProperties(name: string): Array;
addProperties(className: string, propertiesInfos: Array): void;
addProperty(className: string, propertyInfo: any): JsonObjectProperty;
removeProperty(className: string, propertyName: string): boolean;
findClass(name: string): JsonMetadataClass;
isDescendantOf(className: string, ancestorClassName: string): boolean;
addAlterNativeClassName(name: string, alternativeName: string): void;
generateSchema(className?: string): any;
}
export declare class JsonError {
type: string;
message: string;
description: string;
at: Number;
constructor(type: string, message: string);
getFullDescription(): string;
}
export declare class JsonUnknownPropertyError extends JsonError {
propertyName: string;
className: string;
constructor(propertyName: string, className: string);
}
export declare class JsonMissingTypeErrorBase extends JsonError {
baseClassName: string;
type: string;
message: string;
constructor(baseClassName: string, type: string, message: string);
}
export declare class JsonMissingTypeError extends JsonMissingTypeErrorBase {
propertyName: string;
baseClassName: string;
constructor(propertyName: string, baseClassName: string);
}
export declare class JsonIncorrectTypeError extends JsonMissingTypeErrorBase {
propertyName: string;
baseClassName: string;
constructor(propertyName: string, baseClassName: string);
}
export declare class JsonRequiredPropertyError extends JsonError {
propertyName: string;
className: string;
constructor(propertyName: string, className: string);
}
export declare class JsonObject {
static get metaData(): JsonMetadata;
errors: JsonError[];
lightSerializing: boolean;
toJsonObject(obj: any, storeDefaults?: boolean): any;
toObject(jsonObj: any, obj: any): void;
toObjectCore(jsonObj: any, obj: any): void;
toJsonObjectCore(obj: any, property: JsonObjectProperty, storeDefaults?: boolean): any;
valueToJson(obj: any, result: any, property: JsonObjectProperty, storeDefaults?: boolean): void;
valueToObj(value: any, obj: any, property: JsonObjectProperty): void;
}
/**
* An alias for the metadata object. It contains object properties' runtime information and allows you to modify it.
* @see JsonMetadata
*/
export declare var Serializer: JsonMetadata;
export interface IMatrixDropdownData {
value: any;
onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any;
isValidateOnValueChanging: boolean;
getRowIndex(row: MatrixDropdownRowModelBase): number;
getRowValue(rowIndex: number): any;
checkIfValueInRowDuplicated(checkedRow: MatrixDropdownRowModelBase, cellQuestion: Question): boolean;
hasDetailPanel(row: MatrixDropdownRowModelBase): boolean;
getIsDetailPanelShowing(row: MatrixDropdownRowModelBase): boolean;
setIsDetailPanelShowing(row: MatrixDropdownRowModelBase, val: boolean): void;
createRowDetailPanel(row: MatrixDropdownRowModelBase): PanelModel;
validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError;
columns: Array;
createQuestion(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question;
onTotalValueChanged(): any;
getSurvey(): ISurvey;
}
export interface IMatrixColumnOwner extends ILocalizableOwner {
getRequiredText(): string;
onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void;
onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void;
getCellType(): string;
onColumnCellTypeChanged(column: MatrixDropdownColumn): void;
}
export declare var matrixDropdownColumnTypes: {
dropdown: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
checkbox: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
radiogroup: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
text: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
comment: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
boolean: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
expression: {
properties: string[];
onCellQuestionUpdate: (cellQuestion: any, column: any, question: any, data: any) => void;
};
rating: {
properties: string[];
};
};
export declare class MatrixDropdownColumn extends Base implements ILocalizableOwner {
static getColumnTypes(): Array;
constructor(name: string, title?: string);
getSurvey(): ISurvey;
endLoadingFromJson(): void;
getDynamicPropertyName(): string;
getDynamicType(): string;
get colOwner(): IMatrixColumnOwner;
set colOwner(value: IMatrixColumnOwner);
locStrsChanged(): void;
addUsedLocales(locales: Array): void;
get index(): number;
setIndex(val: number): void;
getType(): string;
get cellType(): string;
set cellType(val: string);
get templateQuestion(): Question;
get value(): string;
get isVisible(): boolean;
setIsVisible(newVal: boolean): void;
get hasVisibleCell(): boolean;
set hasVisibleCell(newVal: boolean);
get name(): string;
set name(val: string);
get title(): string;
set title(val: string);
get locTitle(): LocalizableString;
get fullTitle(): string;
get isRequired(): boolean;
set isRequired(val: boolean);
get requiredText(): string;
get requiredErrorText(): string;
set requiredErrorText(val: string);
get locRequiredErrorText(): LocalizableString;
get readOnly(): boolean;
set readOnly(val: boolean);
get hasOther(): boolean;
set hasOther(val: boolean);
get visibleIf(): string;
set visibleIf(val: string);
get enableIf(): string;
set enableIf(val: string);
get requiredIf(): string;
set requiredIf(val: string);
get isUnique(): boolean;
set isUnique(val: boolean);
get showInMultipleColumns(): boolean;
set showInMultipleColumns(val: boolean);
get isSupportMultipleColumns(): boolean;
get isShowInMultipleColumns(): boolean;
get validators(): Array;
set validators(val: Array);
get totalType(): string;
set totalType(val: string);
get totalExpression(): string;
set totalExpression(val: string);
get hasTotal(): boolean;
get totalFormat(): string;
set totalFormat(val: string);
get locTotalFormat(): LocalizableString;
get renderAs(): string;
set renderAs(val: string);
get totalMaximumFractionDigits(): number;
set totalMaximumFractionDigits(val: number);
get totalMinimumFractionDigits(): number;
set totalMinimumFractionDigits(val: number);
get totalDisplayStyle(): string;
set totalDisplayStyle(val: string);
get totalCurrency(): string;
set totalCurrency(val: string);
get minWidth(): string;
set minWidth(val: string);
get width(): string;
set width(val: string);
get colCount(): number;
set colCount(val: number);
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
createCellQuestion(data: any): Question;
updateCellQuestion(cellQuestion: Question, data: any, onUpdateJson?: (json: any) => any): void;
defaultCellTypeChanged(): void;
protected calcCellQuestionType(): string;
protected updateTemplateQuestion(): void;
protected createNewQuestion(cellType: string): Question;
protected setQuestionProperties(question: Question, onUpdateJson?: (json: any) => any): void;
protected propertyValueChanged(name: string, oldValue: any, newValue: any): void;
}
export declare class MatrixDropdownCell {
column: MatrixDropdownColumn;
row: MatrixDropdownRowModelBase;
data: IMatrixDropdownData;
constructor(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData);
locStrsChanged(): void;
protected createQuestion(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData): Question;
get question(): Question;
get value(): any;
set value(value: any);
runCondition(values: HashTable, properties: HashTable): void;
}
export declare class MatrixDropdownTotalCell extends MatrixDropdownCell {
column: MatrixDropdownColumn;
row: MatrixDropdownRowModelBase;
data: IMatrixDropdownData;
constructor(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData);
protected createQuestion(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData): Question;
locStrsChanged(): void;
updateCellQuestion(): void;
getTotalExpression(): string;
}
export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyImpl, ILocalizableOwner {
static RowVariableName: string;
static OwnerVariableName: string;
static IndexVariableName: string;
static RowValueVariableName: string;
protected data: IMatrixDropdownData;
protected isSettingValue: boolean;
cells: Array;
showHideDetailPanelClick: any;
constructor(data: IMatrixDropdownData, value: any);
get id(): string;
get rowName(): any;
get value(): any;
get locText(): LocalizableString;
get hasPanel(): boolean;
get detailPanel(): PanelModel;
get detailPanelId(): string;
get isDetailPanelShowing(): boolean;
showDetailPanel(): void;
hideDetailPanel(destroyPanel?: boolean): void;
getAllValues(): any;
getFilteredValues(): any;
getFilteredProperties(): any;
runCondition(values: HashTable, properties: HashTable): void;
set value(value: any);
onAnyValueChanged(name: string): void;
getDataValueCore(valuesHash: any, key: string): any;
getValue(name: string): any;
setValue(name: string, newColumnValue: any): void;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
getComment(name: string): string;
setComment(name: string, newValue: string, locNotification: any): void;
get isEmpty(): boolean;
getQuestionByColumn(column: MatrixDropdownColumn): Question;
getQuestionByColumnName(columnName: string): Question;
get questions(): Array;
getQuestionByName(name: string): Question;
getQuestionsByName(name: string): Array;
protected getSharedQuestionByName(columnName: string): Question;
clearIncorrectValues(val: any): void;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
locStrsChanged(): void;
updateCellQuestionOnColumnChanged(column: MatrixDropdownColumn, name: string, newValue: any): void;
onQuestionReadOnlyChanged(parentIsReadOnly: boolean): void;
hasErrors(fireCallback: boolean, rec: any, raiseOnCompletedAsyncValidators: () => void): boolean;
protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void;
protected buildCells(value: any): void;
protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell;
getSurveyData(): ISurveyData;
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
get rowIndex(): number;
get editingObj(): Base;
dispose(): void;
}
export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelBase {
constructor(data: IMatrixDropdownData);
protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell;
setValue(name: string, newValue: any): void;
runCondition(values: HashTable, properties: HashTable): void;
protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void;
}
export declare class QuestionMatrixDropdownRenderedCell {
minWidth: string;
width: string;
locTitle: LocalizableString;
cell: MatrixDropdownCell;
row: MatrixDropdownRowModelBase;
question: Question;
isRemoveRow: boolean;
choiceIndex: number;
matrix: QuestionMatrixDropdownModelBase;
requiredText: string;
isEmpty: boolean;
colSpans: number;
panel: PanelModel;
isShowHideDetail: boolean;
className: string;
constructor();
get hasQuestion(): boolean;
get hasTitle(): boolean;
get hasPanel(): boolean;
get id(): number;
get showErrorOnTop(): boolean;
get showErrorOnBottom(): boolean;
get item(): ItemValue;
set item(val: ItemValue);
get isChoice(): boolean;
get choiceValue(): any;
get isCheckbox(): boolean;
get isFirstChoice(): boolean;
}
export declare class QuestionMatrixDropdownRenderedRow {
isDetailRow: boolean;
row: MatrixDropdownRowModelBase;
cells: Array;
className: string;
constructor();
get id(): number;
}
export declare class QuestionMatrixDropdownRenderedTable extends Base {
matrix: QuestionMatrixDropdownModelBase;
constructor(matrix: QuestionMatrixDropdownModelBase);
get showTable(): boolean;
get showHeader(): boolean;
get showAddRowOnTop(): boolean;
get showAddRowOnBottom(): boolean;
get showFooter(): boolean;
get hasFooter(): boolean;
get hasRemoveRows(): boolean;
isRequireReset(): boolean;
get headerRow(): QuestionMatrixDropdownRenderedRow;
get footerRow(): QuestionMatrixDropdownRenderedRow;
get rows(): Array;
protected build(): void;
updateShowTableAndAddRow(): void;
onAddedRow(): void;
onRemovedRow(row: MatrixDropdownRowModelBase): void;
onDetailPanelChangeVisibility(row: MatrixDropdownRowModelBase, isShowing: boolean): void;
protected buildHeader(): void;
protected buildFooter(): void;
protected buildRows(): void;
}
/**
* A base class for matrix dropdown and matrix dynamic questions.
*/
export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseModel implements IMatrixDropdownData {
static get defaultCellType(): string;
static set defaultCellType(val: string);
static addDefaultColumns(matrix: QuestionMatrixDropdownModelBase): void;
protected isRowChanging: boolean;
columnsChangedCallback: () => void;
updateCellsCallback: () => void;
onRenderedTableResetCallback: () => void;
onRenderedTableCreatedCallback: (table: QuestionMatrixDropdownRenderedTable) => void;
onCellCreatedCallback: (options: any) => void;
onCellValueChangedCallback: (options: any) => void;
onHasDetailPanelCallback: (row: MatrixDropdownRowModelBase) => boolean;
onCreateDetailPanelCallback: (row: MatrixDropdownRowModelBase, panel: PanelModel) => void;
protected createColumnValues(): any[];
constructor(name: string);
getType(): string;
get hasSingleInput(): boolean;
get isRowsDynamic(): boolean;
/**
* Set columnLayout to 'vertical' to place columns vertically and rows horizontally. It makes sense when we have many columns and few rows.
* @see columns
* @see rowCount
*/
get columnLayout(): string;
set columnLayout(val: string);
get columnsLocation(): string;
set columnsLocation(val: string);
/**
* Returns true if columns are located horizontally
* @see columnLayout
*/
get isColumnLayoutHorizontal(): boolean;
/**
* Set the value to "underRow" to show the detailPanel under the row.
*/
get detailPanelMode(): string;
set detailPanelMode(val: string);
/**
* The detail template Panel. This panel is used as a template on creating detail panel for a row.
* @see detailElements
* @see detailPanelMode
*/
get detailPanel(): PanelModel;
getPanel(): IPanel;
/**
* The template Panel elements, questions and panels.
* @see detailPanel
* @see detailPanelMode
*/
get detailElements(): Array;
protected createNewDetailPanel(): PanelModel;
get hasRowText(): boolean;
getFooterText(): LocalizableString;
get canAddRow(): boolean;
get canRemoveRows(): boolean;
canRemoveRow(row: MatrixDropdownRowModelBase): boolean;
protected onRowsChanged(): void;
protected onStartRowAddingRemoving(): void;
protected onEndRowAdding(): void;
protected onEndRowRemoving(row: MatrixDropdownRowModelBase): void;
protected resetRenderedTable(): void;
protected clearGeneratedRows(): void;
get renderedTable(): QuestionMatrixDropdownRenderedTable;
protected createRenderedTable(): QuestionMatrixDropdownRenderedTable;
protected onMatrixRowCreated(row: MatrixDropdownRowModelBase): void;
/**
* Use this property to change the default cell type.
*/
get cellType(): string;
set cellType(val: string);
/**
* The default column count for radiogroup and checkbox cell types.
*/
get columnColCount(): number;
set columnColCount(value: number);
/**
* Use this property to set the minimum column width.
*/
get columnMinWidth(): string;
set columnMinWidth(val: string);
/**
* Set this property to true to show the horizontal scroll.
*/
get horizontalScroll(): boolean;
set horizontalScroll(val: boolean);
getRequiredText(): string;
onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void;
onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void;
onColumnCellTypeChanged(column: MatrixDropdownColumn): void;
getRowTitleWidth(): string;
get hasFooter(): boolean;
getAddRowLocation(): string;
getShowColumnsIfEmpty(): boolean;
protected setShowColumnsIfEmpty(): void;
protected updateHasFooter(): void;
get hasTotal(): boolean;
getCellType(): string;
getConditionJson(operator?: string, path?: string): any;
clearIncorrectValues(): void;
clearErrors(): void;
runCondition(values: HashTable, properties: HashTable): void;
protected shouldRunColumnExpression(): boolean;
protected runCellsCondition(values: HashTable, properties: HashTable): void;
protected runTotalsCondition(values: HashTable, properties: HashTable): void;
locStrsChanged(): void;
/**
* Returns the column by it's name. Returns null if a column with this name doesn't exist.
* @param column
*/
getColumnByName(columnName: string): MatrixDropdownColumn;
getColumnName(columnName: string): MatrixDropdownColumn;
/**
* Returns the column width.
* @param column
*/
getColumnWidth(column: MatrixDropdownColumn): string;
/**
* The default choices for dropdown, checkbox and radiogroup cell types.
*/
get choices(): Array;
set choices(val: Array);
/**
* The default options caption for dropdown cell type.
*/
get optionsCaption(): string;
set optionsCaption(val: string);
get locOptionsCaption(): LocalizableString;
/**
* The duplication value error text. Set it to show the text different from the default.
* @see MatrixDropdownColumn.isUnique
*/
get keyDuplicationError(): string;
set keyDuplicationError(val: string);
get locKeyDuplicationError(): LocalizableString;
get storeOthersAsComment(): boolean;
addColumn(name: string, title?: string): MatrixDropdownColumn;
protected getVisibleRows(): Array;
get totalValue(): any;
protected getVisibleTotalRow(): MatrixDropdownRowModelBase;
get visibleTotalRow(): MatrixDropdownRowModelBase;
onSurveyLoad(): void;
/**
* Returns the row value. If the row value is empty, the object is empty: {}.
* @param rowIndex row index from 0 to visible row count - 1.
*/
getRowValue(rowIndex: number): any;
checkIfValueInRowDuplicated(checkedRow: MatrixDropdownRowModelBase, cellQuestion: Question): boolean;
/**
* Set the row value.
* @param rowIndex row index from 0 to visible row count - 1.
* @param rowValue an object {"column name": columnValue,... }
*/
setRowValue(rowIndex: number, rowValue: any): any;
protected generateRows(): Array;
protected generateTotalRow(): MatrixDropdownRowModelBase;
protected createNewValue(nullOnEmpty?: boolean): any;
protected getRowValueCore(row: MatrixDropdownRowModelBase, questionValue: any, create?: boolean): any;
protected getRowObj(row: MatrixDropdownRowModelBase): any;
protected getRowDisplayValue(row: MatrixDropdownRowModelBase, rowValue: any): any;
getPlainData(options?: {
includeEmpty?: boolean;
calculations?: Array<{
propertyName: string;
}>;
}): any;
getProgressInfo(): IProgressInfo;
protected onBeforeValueChanged(val: any): void;
protected setQuestionValue(newValue: any): void;
supportGoNextPageAutomatic(): boolean;
protected getContainsErrors(): boolean;
protected getIsAnswered(): boolean;
hasErrors(fireCallback?: boolean, rec?: any): boolean;
protected getIsRunningValidators(): boolean;
getAllErrors(): Array;
protected getUniqueColumns(): Array;
protected getFirstInputElementId(): string;
protected getFirstErrorInputElementId(): string;
protected getFirstCellQuestion(onError: boolean): Question;
protected onReadOnlyChanged(): void;
createQuestion(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question;
protected createQuestionCore(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question;
protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
onAnyValueChanged(name: string): void;
protected isObject(value: any): boolean;
protected onCellValueChanged(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): void;
validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError;
get isValidateOnValueChanging(): boolean;
onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any;
onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void;
getRowIndex(row: MatrixDropdownRowModelBase): number;
getElementsInDesign(includeHidden?: boolean): Array;
hasDetailPanel(row: MatrixDropdownRowModelBase): boolean;
getIsDetailPanelShowing(row: MatrixDropdownRowModelBase): boolean;
setIsDetailPanelShowing(row: MatrixDropdownRowModelBase, val: boolean): void;
getDetailPanelButtonCss(row: MatrixDropdownRowModelBase): string;
getDetailPanelIconCss(row: MatrixDropdownRowModelBase): string;
createRowDetailPanel(row: MatrixDropdownRowModelBase): PanelModel;
getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question;
onTotalValueChanged(): any;
getQuestionFromArray(name: string, index: number): IQuestion;
}
export declare class MatrixDropdownRowModel extends MatrixDropdownRowModelBase {
name: string;
constructor(name: string, item: ItemValue, data: IMatrixDropdownData, value: any);
get rowName(): string;
get text(): string;
get locText(): LocalizableString;
}
/**
* A Model for a matrix dropdown question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors.
*/
export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData {
constructor(name: string);
getType(): string;
/**
* Set this property to show it on the first column for the total row.
*/
get totalText(): string;
set totalText(val: string);
get locTotalText(): LocalizableString;
getFooterText(): LocalizableString;
/**
* The column width for the first column, row title column.
*/
get rowTitleWidth(): string;
set rowTitleWidth(val: string);
getRowTitleWidth(): string;
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
addConditionObjectsByContext(objects: Array, context: any): void;
clearIncorrectValues(): void;
clearValueIfInvisible(): void;
protected generateRows(): Array;
protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel;
}
export declare class MatrixDynamicRowModel extends MatrixDropdownRowModelBase {
index: number;
constructor(index: number, data: IMatrixDropdownData, value: any);
get rowName(): string;
}
/**
* A Model for a matrix dymanic question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors.
* An end-user may dynamically add/remove rows, unlike in matrix dropdown question.
*/
export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData {
onGetValueForNewRowCallBack: (sender: QuestionMatrixDynamicModel) => any;
constructor(name: string);
getType(): string;
get isRowsDynamic(): boolean;
/**
* Set it to true, to show a confirmation dialog on removing a row
* @see ConfirmDeleteText
*/
get confirmDelete(): boolean;
set confirmDelete(val: boolean);
/**
* Set it to a column name and the library shows duplication error, if there are same values in different rows in the column.
* @see keyDuplicationError
*/
get keyName(): string;
set keyName(val: string);
/**
* If it is not empty, then this value is set to every new row, including rows created initially, unless the defaultValue is not empty
* @see defaultValue
* @see defaultValueFromLastRow
*/
get defaultRowValue(): any;
set defaultRowValue(val: any);
/**
* Set it to true to copy the value into new added row from the last row. If defaultRowValue is set and this property equals to true,
* then the value for new added row is merging.
* @see defaultValue
* @see defaultRowValue
*/
get defaultValueFromLastRow(): boolean;
set defaultValueFromLastRow(val: boolean);
protected isDefaultValueEmpty(): boolean;
protected valueFromData(val: any): any;
protected setDefaultValue(): void;
protected isEditingSurveyElement(value: any): boolean;
/**
* The number of rows in the matrix.
* @see minRowCount
* @see maxRowCount
*/
get rowCount(): number;
set rowCount(val: number);
/**
* The minimum row count. A user could not delete a row if the rowCount equals to minRowCount
* @see rowCount
* @see maxRowCount
* @see allowAddRows
*/
get minRowCount(): number;
set minRowCount(val: number);
/**
* The maximum row count. A user could not add a row if the rowCount equals to maxRowCount
* @see rowCount
* @see minRowCount
* @see allowAddRows
*/
get maxRowCount(): number;
set maxRowCount(val: number);
/**
* Set this property to false to disable ability to add new rows. "Add new Row" button becomes invsible in UI
* @see canAddRow
* @see allowRemoveRows
*/
get allowAddRows(): boolean;
set allowAddRows(val: boolean);
/**
* Set this property to false to disable ability to remove rows. "Remove" row buttons become invsible in UI
* @see canRemoveRows
* @see allowAddRows
*/
get allowRemoveRows(): boolean;
set allowRemoveRows(val: boolean);
/**
* Returns true, if a new row can be added.
* @see allowAddRows
* @see maxRowCount
* @see canRemoveRows
* @see rowCount
*/
get canAddRow(): boolean;
/**
* Returns true, if row can be removed.
* @see minRowCount
* @see canAddRow
* @see rowCount
*/
get canRemoveRows(): boolean;
canRemoveRow(row: MatrixDropdownRowModelBase): boolean;
/**
* Creates and add a new row.
*/
addRow(): void;
protected hasRowsAsItems(): boolean;
unbindValue(): void;
/**
* Removes a row by it's index. If confirmDelete is true, show a confirmation dialog
* @param index a row index, from 0 to rowCount - 1
* @see removeRow
* @see confirmDelete
*/
removeRowUI(value: any): void;
isRequireConfirmOnRowDelete(index: number): boolean;
/**
* Removes a row by it's index.
* @param index a row index, from 0 to rowCount - 1
*/
removeRow(index: number): void;
/**
* Use this property to change the default text showing in the confirmation delete dialog on removing a row.
*/
get confirmDeleteText(): string;
set confirmDeleteText(val: string);
get locConfirmDeleteText(): LocalizableString;
/**
* Use this property to change the default value of add row button text.
*/
get addRowText(): string;
set addRowText(val: string);
get locAddRowText(): LocalizableString;
/**
* By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical.
* You may set it to "top", "bottom" or "topBottom" (to show on top and bottom).
* @see columnLayout
*/
get addRowLocation(): string;
set addRowLocation(val: string);
getAddRowLocation(): string;
/**
* Set this property to true to hide matrix columns when there is no any row.
*/
get hideColumnsIfEmpty(): boolean;
set hideColumnsIfEmpty(val: boolean);
getShowColumnsIfEmpty(): boolean;
/**
* Use this property to change the default value of remove row button text.
*/
get removeRowText(): string;
set removeRowText(val: string);
get locRemoveRowText(): LocalizableString;
/**
* Use this property to change the default value of remove row button text.
*/
get emptyRowsText(): string;
set emptyRowsText(val: string);
get locEmptyRowsText(): LocalizableString;
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
addConditionObjectsByContext(objects: Array, context: any): void;
supportGoNextPageAutomatic(): boolean;
get hasRowText(): boolean;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
protected getUniqueColumns(): Array;
protected generateRows(): Array;
protected createMatrixRow(value: any): MatrixDynamicRowModel;
protected onBeforeValueChanged(val: any): void;
protected createNewValue(): any;
protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any;
protected getRowValueCore(row: MatrixDropdownRowModelBase, questionValue: any, create?: boolean): any;
}
export interface IMatrixData {
onMatrixRowChanged(row: MatrixRowModel): void;
getCorrectedRowValue(value: any): any;
}
export declare class MatrixRowModel extends Base {
fullName: string;
cellClick: any;
constructor(item: ItemValue, fullName: string, data: IMatrixData, value: any);
get name(): string;
get text(): string;
get locText(): LocalizableString;
get value(): any;
set value(newValue: any);
get rowClasses(): string;
}
export interface IMatrixCellsOwner extends ILocalizableOwner {
getRows(): Array;
getColumns(): Array;
}
export declare class MartrixCells {
cellsOwner: IMatrixCellsOwner;
constructor(cellsOwner: IMatrixCellsOwner);
get isEmpty(): boolean;
setCellText(row: any, column: any, val: string): void;
setDefaultCellText(column: any, val: string): void;
getCellLocText(row: any, column: any): LocalizableString;
getDefaultCellLocText(column: any, val: string): LocalizableString;
getCellDisplayLocText(row: any, column: any): LocalizableString;
getCellText(row: any, column: any): string;
getDefaultCellText(column: any): string;
getCellDisplayText(row: any, column: any): string;
get rows(): Array;
get columns(): Array;
getJson(): any;
setJson(value: any): void;
protected createString(): LocalizableString;
}
/**
* A Model for a simple matrix question.
*/
export declare class QuestionMatrixModel extends QuestionMatrixBaseModel implements IMatrixData, IMatrixCellsOwner {
constructor(name: string);
getType(): string;
get hasSingleInput(): boolean;
/**
* Set this property to true, if you want a user to answer all rows.
*/
get isAllRowRequired(): boolean;
set isAllRowRequired(val: boolean);
/**
* Returns true, if there is at least one row.
*/
get hasRows(): boolean;
/**
* Use this property to render items in a specific order: "random" or "initial". Default is "initial".
*/
get rowsOrder(): string;
set rowsOrder(val: string);
/**
* Set this property to true to hide the question if there is no visible rows in the matrix.
*/
get hideIfRowsEmpty(): boolean;
set hideIfRowsEmpty(val: boolean);
getRows(): Array;
getColumns(): Array;
getItemClass(row: any, column: any): string;
protected getQuizQuestionCount(): number;
protected getCorrectAnswerCount(): number;
protected getVisibleRows(): Array;
protected sortVisibleRows(array: Array): Array;
endLoadingFromJson(): void;
protected processRowsOnSet(newRows: Array): MatrixRowModel[];
/**
* Returns the list of visible rows as model objects.
* @see rowsVisibleIf
*/
get visibleRows(): Array;
get cells(): MartrixCells;
set cells(value: MartrixCells);
get hasCellText(): boolean;
setCellText(row: any, column: any, val: string): void;
getCellText(row: any, column: any): string;
setDefaultCellText(column: any, val: string): void;
getDefaultCellText(column: any): string;
getCellDisplayText(row: any, column: any): string;
getCellDisplayLocText(row: any, column: any): LocalizableString;
supportGoNextPageAutomatic(): boolean;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
protected getIsAnswered(): boolean;
protected onMatrixRowCreated(row: MatrixRowModel): void;
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
getPlainData(options?: {
includeEmpty?: boolean;
calculations?: Array<{
propertyName: string;
}>;
}): any;
addConditionObjectsByContext(objects: Array, context: any): void;
getConditionJson(operator?: string, path?: string): any;
clearValueIfInvisible(): void;
protected getFirstInputElementId(): string;
protected onRowsChanged(): void;
onMatrixRowChanged(row: MatrixRowModel): void;
getCorrectedRowValue(value: any): any;
}
export interface IMultipleTextData extends ILocalizableOwner, IPanel {
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
getAllValues(): any;
getMultipleTextValue(name: string): any;
setMultipleTextValue(name: string, value: any): any;
getItemDefaultValue(name: string): any;
getIsRequiredText(): string;
}
export declare class MultipleTextItemModel extends Base implements IValidatorOwner, ISurveyData, ISurveyImpl {
valueChangedCallback: (newValue: any) => void;
constructor(name?: any, title?: string);
getType(): string;
get id(): string;
/**
* The item name.
*/
get name(): string;
set name(val: string);
get question(): Question;
get editor(): QuestionTextModel;
protected createEditor(name: string): QuestionTextModel;
addUsedLocales(locales: Array): void;
locStrsChanged(): void;
setData(data: IMultipleTextData): void;
/**
* Set this property to true, to make the item a required. If a user doesn't fill the item then a validation error will be generated.
*/
get isRequired(): boolean;
set isRequired(val: boolean);
/**
* Use this property to change the default input type.
*/
get inputType(): string;
set inputType(val: string);
/**
* Item title. If it is empty, the item name is rendered as title. This property supports markdown.
* @see name
*/
get title(): string;
set title(val: string);
get locTitle(): LocalizableString;
/**
* Returns the text or html for rendering the title.
*/
get fullTitle(): string;
/**
* The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
* If it is 0, then the value is unlimited
* @see SurveyModel.maxTextLength
*/
get maxLength(): number;
set maxLength(val: number);
getMaxLength(): any;
/**
* The input place holder.
*/
get placeHolder(): string;
set placeHolder(val: string);
get locPlaceHolder(): LocalizableString;
/**
* The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
*/
get requiredErrorText(): string;
set requiredErrorText(val: string);
get locRequiredErrorText(): LocalizableString;
/**
* The list of question validators.
*/
get validators(): Array;
set validators(val: Array);
getValidators(): Array;
/**
* The item value.
*/
get value(): any;
set value(value: any);
isEmpty(): boolean;
onValueChanged(newValue: any): void;
getSurveyData(): ISurveyData;
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
getValue(name: string): any;
setValue(name: string, value: any): void;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
getComment(name: string): string;
setComment(name: string, newValue: string): void;
getAllValues(): any;
getFilteredValues(): any;
getFilteredProperties(): any;
getValidatorTitle(): string;
get validatedValue(): any;
set validatedValue(val: any);
getDataFilteredValues(): any;
getDataFilteredProperties(): any;
}
/**
* A Model for a multiple text question.
*/
export declare class QuestionMultipleTextModel extends Question implements IMultipleTextData, IPanel {
colCountChangedCallback: () => void;
constructor(name: string);
getType(): string;
setSurveyImpl(value: ISurveyImpl): void;
get isAllowTitleLeft(): boolean;
get hasSingleInput(): boolean;
onSurveyLoad(): void;
setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
onSurveyValueChanged(newValue: any): void;
/**
* The list of input items.
*/
get items(): Array;
set items(val: Array);
/**
* Add a new text item.
* @param name a item name
* @param title a item title (optional)
*/
addItem(name: string, title?: string): MultipleTextItemModel;
getItemByName(name: string): MultipleTextItemModel;
addConditionObjectsByContext(objects: Array, context: any): void;
getConditionJson(operator?: string, path?: string): any;
locStrsChanged(): void;
supportGoNextPageAutomatic(): boolean;
/**
* The number of columns. Items are rendred in one line if the value is 0.
*/
get colCount(): number;
set colCount(val: number);
/**
* The default text input size.
*/
get itemSize(): number;
set itemSize(val: number);
/**
* Returns the list of rendered rows.
*/
getRows(): Array;
protected onValueChanged(): void;
protected createTextItem(name: string, title: string): MultipleTextItemModel;
protected onItemValueChanged(): void;
protected getIsRunningValidators(): boolean;
hasErrors(fireCallback?: boolean, rec?: any): boolean;
getAllErrors(): Array;
clearErrors(): void;
protected getContainsErrors(): boolean;
protected getIsAnswered(): boolean;
getProgressInfo(): IProgressInfo;
getMultipleTextValue(name: string): any;
setMultipleTextValue(name: string, value: any): void;
getItemDefaultValue(name: string): any;
getTextProcessor(): ITextProcessor;
getAllValues(): any;
getIsRequiredText(): string;
addElement(element: IElement, index: number): void;
removeElement(element: IElement): boolean;
getQuestionTitleLocation(): string;
getQuestionStartIndex(): string;
getChildrenLayoutType(): string;
elementWidthChanged(el: IElement): void;
get elements(): Array;
indexOf(el: IElement): number;
ensureRowsVisibility(): void;
}
export declare class DragDropInfo {
source: IElement;
target: IElement;
nestedPanelDepth: number;
constructor(source: IElement, target: IElement, nestedPanelDepth?: number);
destination: ISurveyElement;
isBottom: boolean;
isEdge: boolean;
}
export declare class QuestionRowModel extends Base {
panel: PanelModelBase;
protected _scrollableParent: any;
protected _updateVisibility: any;
startLazyRendering(rowContainerDiv: HTMLElement, findScrollableContainer?: typeof findScrollableParent): void;
ensureVisibility(): void;
stopLazyRendering(): void;
constructor(panel: PanelModelBase);
get id(): string;
get elements(): Array;
get visible(): boolean;
set visible(val: boolean);
get isNeedRender(): boolean;
set isNeedRender(val: boolean);
get visibleElements(): Array;
updateVisible(): void;
addElement(q: IElement): void;
get index(): number;
setElementMaxMinWidth(el: IElement): void;
}
/**
* A base class for a Panel and Page objects.
*/
export declare class PanelModelBase extends SurveyElement implements IPanel, IConditionRunner, ILocalizableOwner, ISurveyErrorOwner {
addElementCallback: (element: IElement) => void;
removeElementCallback: (element: IElement) => void;
onGetQuestionTitleLocation: () => string;
constructor(name?: string);
getType(): string;
setSurveyImpl(value: ISurveyImpl): void;
endLoadingFromJson(): void;
/**
* PanelModel or PageModel title property.
* @description
*/
get title(): string;
set title(val: string);
get locTitle(): LocalizableString;
get _showTitle(): boolean;
getTitleActions(): Array;
get _showDescription(): boolean;
/**
* PanelModel or PageModel description property. It renders under title by using smaller font. Unlike the title, description can be empty.
* @see title
*/
get description(): string;
set description(val: string);
get locDescription(): LocalizableString;
locStrsChanged(): void;
/**
* Returns the char/string for a required panel.
* @see SurveyModel.requiredText
*/
get requiredText(): string;
protected get titlePattern(): string;
get isRequireTextOnStart(): boolean;
get isRequireTextBeforeTitle(): boolean;
get isRequireTextAfterTitle(): boolean;
/**
* The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
*/
get requiredErrorText(): string;
set requiredErrorText(val: string);
get locRequiredErrorText(): LocalizableString;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
/**
* A parent element. It is always null for the Page object and always not null for the Panel object. Panel object may contain Questions and other Panels.
*/
get parent(): PanelModelBase;
set parent(val: PanelModelBase);
get depth(): number;
/**
* An expression that returns true or false. If it returns true the Panel becomes visible and if it returns false the Panel becomes invisible. The library runs the expression on survey start and on changing a question value. If the property is empty then visible property is used.
* @see visible
*/
get visibleIf(): string;
set visibleIf(val: string);
get cssClasses(): any;
protected get css(): any;
/**
* A unique element identificator. It is generated automatically.
*/
get id(): string;
set id(val: string);
/**
* Returns true if the current object is Panel. Returns false if the current object is Page (a root Panel).
*/
get isPanel(): boolean;
getPanel(): IPanel;
getLayoutType(): string;
isLayoutTypeSupported(layoutType: string): boolean;
/**
* Returns the list of all questions located in the Panel/Page, including in the nested Panels.
* @see Question
* @see elements
*/
get questions(): Array;
protected getValidName(name: string): string;
/**
* Returns the question by its name
* @param name the question name
*/
getQuestionByName(name: string): Question;
/**
* Returns the element by its name. It works recursively.
* @param name the element name
*/
getElementByName(name: string): IElement;
getQuestionByValueName(valueName: string): Question;
/**
* Returns question values on the current page
*/
getValue(): any;
/**
* Returns question comments on the current page
*/
getComments(): any;
/**
* Call this function to remove all question values from the current page/panel, that end-user will not be able to enter.
* For example the value that doesn't exists in a radigroup/dropdown/checkbox choices or matrix rows/columns.
* Please note, this function doesn't clear values for invisible questions or values that doesn't associated with questions.
* @see Question.clearIncorrectValues
*/
clearIncorrectValues(): void;
/**
* Call this function to clear all errors in the panel / page and all its child elements (panels and questions)
*/
clearErrors(): void;
/**
* Returns the list of the elements in the object, Panel/Page. Elements can be questions or panels. The function doesn't return elements in the nested Panels.
*/
get elements(): Array;
getElementsInDesign(includeHidden?: boolean): Array;
/**
* Returns true if the current element belongs to the Panel/Page. It looks in nested Panels as well.
* @param element
* @see PanelModel
*/
containsElement(element: IElement): boolean;
/**
* Set this property to true, to require the answer at least in one question in the panel.
*/
get isRequired(): boolean;
set isRequired(val: boolean);
/**
* An expression that returns true or false. If it returns true the Panel/Page becomes required.
* The library runs the expression on survey start and on changing a question value. If the property is empty then isRequired property is used.
* @see isRequired
*/
get requiredIf(): string;
set requiredIf(val: string);
/**
* Returns true, if there is an error on this Page or inside the current Panel
* @param fireCallback set it to true, to show errors in UI
* @param focusOnFirstError set it to true to focus on the first question that doesn't pass the validation
*/
hasErrors(fireCallback?: boolean, focusOnFirstError?: boolean, rec?: any): boolean;
getErrorCustomText(text: string, error: SurveyError): string;
protected hasErrorsCore(rec: any): void;
protected getContainsErrors(): boolean;
updateElementVisibility(): void;
getFirstQuestionToFocus(withError?: boolean): Question;
/**
* Call it to focus the input on the first question
*/
focusFirstQuestion(): void;
/**
* Call it to focus the input of the first question that has an error.
*/
focusFirstErrorQuestion(): void;
/**
* Fill list array with the questions.
* @param list
* @param visibleOnly set it to true to get visible questions only
*/
addQuestionsToList(list: Array, visibleOnly?: boolean, includingDesignTime?: boolean): void;
/**
* Fill list array with the panels.
* @param list
*/
addPanelsIntoList(list: Array, visibleOnly?: boolean, includingDesignTime?: boolean): void;
/**
* Returns true if the current object is Page and it is the current page.
*/
get isActive(): boolean;
updateCustomWidgets(): void;
/**
* Set this property different from "default" to set the specific question title location for this panel/page.
* @see SurveyModel.questionTitleLocation
*/
get questionTitleLocation(): string;
set questionTitleLocation(value: string);
getQuestionTitleLocation(): string;
protected getStartIndex(): string;
getQuestionStartIndex(): string;
getChildrenLayoutType(): string;
getProgressInfo(): IProgressInfo;
protected get root(): PanelModelBase;
protected childVisibilityChanged(): void;
protected createRow(): QuestionRowModel;
onSurveyLoad(): void;
onFirstRendering(): void;
get rows(): Array;
ensureRowsVisibility(): void;
protected onRowsChanged(): void;
protected onAddElement(element: IElement, index: number): void;
protected onRemoveElement(element: IElement): void;
protected updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void;
elementWidthChanged(el: IElement): void;
/**
* Returns rendered title text or html.
*/
get processedTitle(): string;
protected getRenderedTitle(str: string): string;
/**
* Use it to get/set the object visibility.
* @see visibleIf
*/
get visible(): boolean;
set visible(value: boolean);
protected onVisibleChanged(): void;
/**
* Returns true if object is visible or survey is in design mode right now.
*/
get isVisible(): boolean;
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
setVisibleIndex(index: number): number;
protected beforeSetVisibleIndex(index: number): number;
protected getPanelStartIndex(index: number): number;
protected isContinueNumbering(): boolean;
/**
* Returns true if readOnly property is true or survey is in display mode or parent panel/page is readOnly.
* @see SurveyModel.model
* @see readOnly
*/
get isReadOnly(): boolean;
protected onReadOnlyChanged(): void;
updateElementCss(): void;
/**
* An expression that returns true or false. If it returns false the Panel/Page becomes read only and an end-user will not able to answer on qustions inside it.
* The library runs the expression on survey start and on changing a question value. If the property is empty then readOnly property is used.
* @see readOnly
* @see isReadOnly
*/
get enableIf(): string;
set enableIf(val: string);
/**
* Add an element into Panel or Page. Returns true if the element added successfully. Otherwise returns false.
* @param element
* @param index element index in the elements array
*/
addElement(element: IElement, index?: number): boolean;
protected canAddElement(element: IElement): boolean;
/**
* Add a question into Panel or Page. Returns true if the question added successfully. Otherwise returns false.
* @param question
* @param index element index in the elements array
*/
addQuestion(question: Question, index?: number): boolean;
/**
* Add a panel into Panel or Page. Returns true if the panel added successfully. Otherwise returns false.
* @param panel
* @param index element index in the elements array
*/
addPanel(panel: PanelModel, index?: number): boolean;
/**
* Creates a new question and adds it at location of index, by default the end of the elements list. Returns null, if the question could not be created or could not be added into page or panel.
* @param questionType the possible values are: "text", "checkbox", "dropdown", "matrix", "html", "matrixdynamic", "matrixdropdown" and so on.
* @param name a question name
* @param index element index in the elements array
*/
addNewQuestion(questionType: string, name?: string, index?: number): Question;
/**
* Creates a new panel and adds it into the end of the elements list. Returns null, if the panel could not be created or could not be added into page or panel.
* @param name a panel name
*/
addNewPanel(name?: string): PanelModel;
/**
* Returns the index of element parameter in the elements list.
* @param element question or panel
*/
indexOf(element: IElement): number;
protected createNewPanel(name: string): PanelModel;
/**
* Remove an element (Panel or Question) from the elements list.
* @param element
* @see elements
*/
removeElement(element: IElement): boolean;
/**
* Remove question from the elements list.
* @param question
* @see elements
* @see removeElement
*/
removeQuestion(question: Question): void;
runCondition(values: HashTable, properties: HashTable): void;
onAnyValueChanged(name: string): void;
checkBindings(valueName: string, value: any): void;
protected dragDropAddTarget(dragDropInfo: DragDropInfo): void;
protected dragDropFindRow(findElement: ISurveyElement): QuestionRowModel;
dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
dispose(): void;
}
/**
* A container element, similar to the Page objects. However, unlike the Page, Panel can't be a root.
* It may contain questions and other panels.
*/
export declare class PanelModel extends PanelModelBase implements IElement, ITitleOwner {
minWidth?: string;
maxWidth?: string;
constructor(name?: string);
getType(): string;
get contentId(): string;
onSurveyLoad(): void;
get isPanel(): boolean;
/**
* Get/set the page where the panel is located.
*/
get page(): IPage;
set page(val: IPage);
delete(): void;
/**
* Move panel to a new container Page/Panel. Add as a last element if insertBefore parameter is not used or inserted into the given index,
* if insert parameter is number, or before the given element, if the insertBefore parameter is a question or panel
* @param container Page or Panel to where a question is relocated.
* @param insertBefore Use it if you want to set the panel to a specific position. You may use a number (use 0 to insert int the beginning) or element, if you want to insert before this element.
*/
moveTo(container: IPanel, insertBefore?: any): boolean;
/**
* Returns the visible index of the panel in the survey. Commonly it is -1 and it doesn't show.
* You have to set showNumber to true to show index/numbering for the Panel
* @see showNumber
*/
get visibleIndex(): number;
/**
* Set showNumber to true to start showing the number for this panel.
* @see visibleIndex
*/
get showNumber(): boolean;
set showNumber(val: boolean);
/**
* Gets or sets a value that specifies how the elements numbers inside panel are displayed.
*
* The following options are available:
*
* - `default` - display questions numbers as defined in parent panel or survey
* - `onpanel` - display questions numbers, start numbering from beginning of this page
* - `off` - turn off the numbering for questions titles
* @see showNumber
*/
get showQuestionNumbers(): string;
set showQuestionNumbers(value: string);
/**
* Gets or sets the first question index for elements inside the panel. The first question index is '1.' by default and it is taken from survey.questionStartIndex property.
* You may start it from '100' or from 'A', by setting '100' or 'A' to this property.
* You can set the start index to "(1)" or "# A)" or "a)" to render question number as (1), # A) and a) accordingly.
* @see survey.questionStartIndex
*/
get questionStartIndex(): string;
set questionStartIndex(val: string);
getQuestionStartIndex(): string;
/**
* The property returns the question number. If question is invisible then it returns empty string.
* If visibleIndex is 1, then no is 2, or 'B' if survey.questionStartIndex is 'A'.
* @see SurveyModel.questionStartIndex
*/
get no(): string;
protected setNo(visibleIndex: number): void;
protected beforeSetVisibleIndex(index: number): number;
protected getPanelStartIndex(index: number): number;
protected isContinueNumbering(): boolean;
protected hasErrorsCore(rec: any): void;
protected getRenderedTitle(str: string): string;
/**
* The Panel width.
*/
get width(): string;
set width(val: string);
/**
* The left indent. Set this property to increase the panel left indent.
*/
get indent(): number;
set indent(val: number);
/**
* The inner indent. Set this property to increase the panel content margin.
*/
get innerIndent(): number;
set innerIndent(val: number);
get renderWidth(): string;
set renderWidth(val: string);
/**
* The Panel renders on the new line if the property is true. If the property is false, the panel tries to render on the same line/row with a previous question/panel.
*/
get startWithNewLine(): boolean;
set startWithNewLine(value: boolean);
/**
* The right indent of the Panel.
*/
get rightIndent(): number;
set rightIndent(val: number);
get paddingLeft(): string;
set paddingLeft(val: string);
get innerPaddingLeft(): string;
set innerPaddingLeft(val: string);
get paddingRight(): string;
set paddingRight(val: string);
clearOnDeletingContainer(): void;
get hasEditButton(): boolean;
cancelPreview(): void;
protected onVisibleChanged(): void;
}
/**
* The flow panel object. It is a container with flow layout where you can mix questions with markdown text.
*
*/
export declare class FlowPanelModel extends PanelModel {
static contentElementNamePrefix: string;
contentChangedCallback: () => void;
onGetHtmlForQuestion: (question: Question) => string;
onCustomHtmlProducing: () => string;
constructor(name?: string);
getType(): string;
getChildrenLayoutType(): string;
onSurveyLoad(): any;
get content(): string;
set content(val: string);
get locContent(): LocalizableString;
get html(): string;
set html(val: string);
protected onContentChanged(): any;
produceHtml(): string;
getQuestionFromText(str: string): Question;
protected getHtmlForQuestion(question: Question): string;
protected getQuestionHtmlId(question: Question): string;
protected onAddElement(element: IElement, index: number): void;
protected onRemoveElement(element: IElement): void;
dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void;
getElementContentText(element: IElement): string;
}
/**
* The page object. It has elements collection, that contains questions and panels.
*/
export declare class PageModel extends PanelModelBase implements IPage {
constructor(name?: string);
getType(): string;
toString(): string;
get isPage(): boolean;
get navigationTitle(): string;
set navigationTitle(val: string);
get locNavigationTitle(): LocalizableString;
get navigationDescription(): string;
set navigationDescription(val: string);
get locNavigationDescription(): LocalizableString;
get passed(): boolean;
set passed(val: boolean);
delete(): void;
onFirstRendering(): void;
/**
* The visible index of the page. It has values from 0 to visible page count - 1.
* @see SurveyModel.visiblePages
* @see SurveyModel.pages
*/
get visibleIndex(): number;
set visibleIndex(val: number);
/**
* Returns true, if the page is started page in the survey. It can be shown on the start only and the end-user could not comeback to it after it passed it.
*/
get isStarted(): boolean;
get cssClasses(): any;
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
get num(): number;
set num(val: number);
/**
* Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false.
* @see SurveyMode.showNavigationButtons
*/
get navigationButtonsVisibility(): string;
set navigationButtonsVisibility(val: string);
/**
* The property returns true, if the page has been shown to the end-user.
*/
get wasShown(): boolean;
get hasShown(): boolean;
setWasShown(val: boolean): void;
/**
* The property returns true, if the elements are randomized on the page
* @see hasShown
* @see questionsOrder
* @see SurveyModel.questionsOrder
*/
get areQuestionsRandomized(): boolean;
/**
* Use this property to randomize questions. Set it to 'random' to randomize questions, 'initial' to keep them in the same order or 'default' to use the Survey questionsOrder property
* @see SurveyModel.questionsOrder
* @see areQuestionsRandomized
*/
get questionsOrder(): string;
set questionsOrder(val: string);
/**
* Call it to scroll to the page top.
*/
scrollToTop(): void;
/**
* Time in seconds end-user spent on this page
*/
timeSpent: number;
/**
* Returns the list of all panels in the page
*/
getPanels(visibleOnly?: boolean, includingDesignTime?: boolean): Array;
/**
* The maximum time in seconds that end-user has to complete the page. If the value is 0 or less, the end-user has unlimited number of time to finish the page.
* @see startTimer
* @see SurveyModel.maxTimeToFinishPage
*/
get maxTimeToFinish(): number;
set maxTimeToFinish(val: number);
protected onNumChanged(value: number): void;
protected onVisibleChanged(): void;
dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void;
dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean;
getTitleActions(): Array;
dragDropFinish(isCancel?: boolean): IElement;
ensureRowsVisibility(): void;
}
export interface IConditionObject {
name: string;
text: string;
question: Question;
}
/**
* A base class for all questions.
*/
export declare class Question extends SurveyElement implements IQuestion, IConditionRunner, ILocalizableOwner, IValidatorOwner, ITitleOwner {
[index: string]: any;
customWidgetData: {
isNeedRender: boolean;
};
focusCallback: () => void;
surveyLoadCallback: () => void;
valueChangedCallback: () => void;
commentChangedCallback: () => void;
validateValueCallback: () => SurveyError;
questionTitleTemplateCallback: () => string;
afterRenderQuestionCallback: (question: Question, element: any) => any;
valueFromDataCallback: (val: any) => any;
valueToDataCallback: (val: any) => any;
onGetSurvey: () => ISurvey;
protected isReadyValue: boolean;
/**
* The event is fired when isReady property of question is changed.
*
options.question - the question
*
options.isReady - current value of isReady
*
options.oldIsReady - old value of isReady
*/
onReadyChanged: Event<(sender: Question, options: any) => any, any>;
isReadOnlyRenderDiv(): boolean;
constructor(name: string);
getSurvey(): ISurvey;
getValueName(): string;
/**
* Use this property if you want to store the question result in the name different from the question name.
* Question name should be unique in the survey and valueName could be not unique. It allows to share data between several questions with the same valueName.
* The library set the value automatically if the question.name property is not valid. For example, if it contains the period '.' symbol.
* In this case if you set the question.name property to 'x.y' then the valueName becomes 'x y'.
* Please note, this property is hidden for questions without input, for example html question.
* @see name
*/
get valueName(): string;
set valueName(val: string);
protected onValueNameChanged(oldValue: string): void;
protected onNameChanged(oldValue: string): void;
get isReady(): boolean;
/**
* Get is question ready to use
*/
choicesLoaded(): void;
/**
* Get/set the page where the question is located.
*/
get page(): IPage;
set page(val: IPage);
getPanel(): IPanel;
delete(): void;
get isFlowLayout(): boolean;
getLayoutType(): string;
isLayoutTypeSupported(layoutType: string): boolean;
/**
* Use it to get/set the question visibility.
* @see visibleIf
*/
get visible(): boolean;
set visible(val: boolean);
protected onVisibleChanged(): void;
/**
* Use it to choose how other question values will be rendered in title if referenced in {}.
* Please note, this property is hidden for question without input, for example html question.
*/
get useDisplayValuesInTitle(): boolean;
set useDisplayValuesInTitle(val: boolean);
/**
* An expression that returns true or false. If it returns true the Question becomes visible and if it returns false the Question becomes invisible. The library runs the expression on survey start and on changing a question value. If the property is empty then visible property is used.
* @see visible
*/
get visibleIf(): string;
set visibleIf(val: string);
/**
* Returns true if the question is visible or survey is in design mode right now.
*/
get isVisible(): boolean;
/**
* Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1
* The visibleIndex is -1 if the title is 'hidden' or hideNumber is true
* @see titleLocation
* @see hideNumber
*/
get visibleIndex(): number;
/**
* Set hideNumber to true to stop showing the number for this question. The question will not be counter
* @see visibleIndex
* @see titleLocation
*/
get hideNumber(): boolean;
set hideNumber(val: boolean);
/**
* Returns true if the question may have a title located on the left
*/
get isAllowTitleLeft(): boolean;
/**
* Returns the type of the object as a string as it represents in the json.
*/
getType(): string;
/**
* Move question to a new container Page/Panel. Add as a last element if insertBefore parameter is not used or inserted into the given index,
* if insert parameter is number, or before the given element, if the insertBefore parameter is a question or panel
* @param container Page or Panel to where a question is relocated.
* @param insertBefore Use it if you want to set the question to a specific position. You may use a number (use 0 to insert int the beginning) or element, if you want to insert before this element.
*/
moveTo(container: IPanel, insertBefore?: any): boolean;
getProgressInfo(): IProgressInfo;
setSurveyImpl(value: ISurveyImpl): void;
getDataFilteredValues(): any;
getDataFilteredProperties(): any;
/**
* A parent element. It can be panel or page.
*/
get parent(): IPanel;
set parent(val: IPanel);
/**
* A parent question. It can be a dynamic panel or dynamic/dropdown matrices. If the value is a matrix, it means that question is a cell question.
* This property is null for a stand alone question.
*/
get parentQuestion(): Question;
setParentQuestion(val: Question): void;
protected onParentChanged(): void;
/**
* Returns false if the question doesn't have a title property, for example: QuestionHtmlModel, or titleLocation property equals to "hidden"
* @see titleLocation
*/
get hasTitle(): boolean;
/**
* Set this property different from "default" to set the specific question title location for this panel/page.
* Please note, this property is hidden for questions without input, for example html question.
* @see SurveyModel.questionTitleLocation
*/
get titleLocation(): string;
set titleLocation(value: string);
/**
* Return the title location based on question titleLocation property and QuestionTitleLocation of it's parents
* @see titleLocation
* @see PanelModelBase.QuestionTitleLocation
* @see SurveyModel.QuestionTitleLocation
*/
getTitleLocation(): string;
protected getTitleLocationCore(): string;
get hasTitleOnLeft(): boolean;
get hasTitleOnTop(): boolean;
get hasTitleOnBottom(): boolean;
get hasTitleOnLeftTop(): boolean;
get errorLocation(): string;
/**
* Returns false if the question doesn't have an input element, for example: QuestionHtmlModel
* @see hasSingleInput
*/
get hasInput(): boolean;
/**
* Returns false if the question doesn't have an input element or have multiple inputs: matrices or panel dynamic
* @see hasInput
*/
get hasSingleInput(): boolean;
get inputId(): string;
/**
* Question title. Use survey questionTitleTemplate property to change the title question is rendered. If it is empty, then question name property is used.
* @see SurveyModel.questionTitleTemplate
*/
get title(): string;
set title(val: string);
get locTitle(): LocalizableString;
/**
* Question description. It renders under question title by using smaller font. Unlike the title, description can be empty.
* Please note, this property is hidden for questions without input, for example html question.
* @see title
*/
description: string;
/**
* Question description location. By default, value is "default" and it depends on survey questionDescriptionLocation property
* You may change it to "underInput" to render it under question input or "underTitle" to rendered it under title.
* @see description
* @see Survey.questionDescriptionLocation
*/
get descriptionLocation(): string;
set descriptionLocation(val: string);
get hasDescriptionUnderTitle(): boolean;
get hasDescriptionUnderInput(): boolean;
get clickTitleFunction(): any;
/**
* The custom text that will be shown on required error. Use this property, if you do not want to show the default text.
* Please note, this property is hidden for question without input, for example html question.
*/
get requiredErrorText(): string;
set requiredErrorText(val: string);
get locRequiredErrorText(): LocalizableString;
/**
* Use it to get or set the comment value.
*/
get commentText(): string;
set commentText(val: string);
get locCommentText(): LocalizableString;
/**
* Returns a copy of question errors survey. For some questions like matrix and panel dynamic it includes the errors of nested questions.
*/
getAllErrors(): Array;
getErrorByType(errorType: string): SurveyError;
/**
* The link to the custom widget.
*/
get customWidget(): QuestionCustomWidget;
updateCustomWidget(): void;
get isCompositeQuestion(): boolean;
afterRenderQuestionElement(el: HTMLElement): void;
afterRender(el: HTMLElement): void;
beforeDestroyQuestionElement(el: HTMLElement): void;
/**
* Returns the rendred question title.
*/
get processedTitle(): string;
/**
* Returns the title after processing the question template.
* @see SurveyModel.questionTitleTemplate
*/
get fullTitle(): string;
protected get titlePattern(): string;
get isRequireTextOnStart(): boolean;
get isRequireTextBeforeTitle(): boolean;
get isRequireTextAfterTitle(): boolean;
/**
* The Question renders on the new line if the property is true. If the property is false, the question tries to render on the same line/row with a previous question/panel.
*/
get startWithNewLine(): boolean;
set startWithNewLine(val: boolean);
/**
* Returns all css classes that used for rendering the question. You may use survey.updateQuestionCssClasses event to override css classes for a question.
* @see SurveyModel.updateQuestionCssClasses
*/
get cssClasses(): any;
get cssRoot(): string;
protected setCssRoot(val: string): void;
protected getCssRoot(cssClasses: any): string;
get cssHeader(): string;
protected setCssHeader(val: string): void;
protected getCssHeader(cssClasses: any): string;
get cssContent(): string;
protected setCssContent(val: string): void;
protected getCssContent(cssClasses: any): string;
get cssTitle(): string;
protected setCssTitle(val: string): void;
protected getCssTitle(cssClasses: any): string;
get cssError(): string;
protected setCssError(val: string): void;
protected getCssError(cssClasses: any): string;
updateElementCss(): void;
protected updateElementCssCore(cssClasses: any): void;
protected updateCssClasses(res: any, css: any): void;
protected getCssType(): string;
/**
* Use it to set the specific width to the question like css style (%, px, em etc).
*/
get width(): string;
set width(val: string);
/**
* Use it to set the specific minWidth constraint to the question like css style (%, px, em etc).
*/
get minWidth(): string;
set minWidth(val: string);
/**
* Use it to set the specific maxWidth constraint to the question like css style (%, px, em etc).
*/
get maxWidth(): string;
set maxWidth(val: string);
/**
* The rendered width of the question.
*/
get renderWidth(): string;
set renderWidth(val: string);
/**
* Set it different from 0 to increase the left padding.
*/
get indent(): number;
set indent(val: number);
/**
* Set it different from 0 to increase the right padding.
*/
get rightIndent(): number;
set rightIndent(val: number);
get paddingLeft(): string;
set paddingLeft(val: string);
get paddingRight(): string;
set paddingRight(val: string);
/**
* Move the focus to the input of this question.
* @param onError set this parameter to true, to focus the input with the first error, other wise the first input will be focused.
*/
focus(onError?: boolean): void;
protected fireCallback(callback: () => void): void;
getOthersMaxLength(): any;
protected onCreating(): void;
protected getFirstInputElementId(): string;
protected getFirstErrorInputElementId(): string;
protected getProcessedTextValue(textValue: TextPreProcessorValue): void;
supportComment(): boolean;
supportOther(): boolean;
/**
* Set this property to true, to make the question a required. If a user doesn't answer the question then a validation error will be generated.
* Please note, this property is hidden for question without input, for example html question.
*/
get isRequired(): boolean;
set isRequired(val: boolean);
/**
* An expression that returns true or false. If it returns true the Question becomes required and an end-user has to answer it.
* If it returns false the Question then an end-user may not answer it the Question maybe empty.
* The library runs the expression on survey start and on changing a question value. If the property is empty then isRequired property is used.
* Please note, this property is hidden for question without input, for example html question.
* @see isRequired
*/
get requiredIf(): string;
set requiredIf(val: string);
/**
* Set it to true, to add a comment for the question.
*/
get hasComment(): boolean;
set hasComment(val: boolean);
/**
* The unique identificator. It is generated automatically.
*/
get id(): string;
set id(val: string);
get ariaTitleId(): string;
get ariaRole(): string;
get hasOther(): boolean;
set hasOther(val: boolean);
protected hasOtherChanged(): void;
get requireUpdateCommentValue(): boolean;
/**
* Returns true if readOnly property is true or survey is in display mode or parent panel/page is readOnly.
* @see SurveyModel.model
* @see readOnly
*/
get isReadOnly(): boolean;
/**
* An expression that returns true or false. If it returns false the Question becomes read only and an end-user will not able to answer on the qustion. The library runs the expression on survey start and on changing a question value. If the property is empty then readOnly property is used.
* Please note, this property is hidden for question without input, for example html question.
* @see readOnly
* @see isReadOnly
*/
get enableIf(): string;
set enableIf(val: string);
/**
* Run visibleIf and enableIf expressions. If visibleIf or/and enabledIf are not empty, then the results of performing the expression (true or false) set to the visible/readOnly properties.
* @param values Typically survey results
* @see visible
* @see visibleIf
* @see readOnly
* @see enableIf
*/
runCondition(values: HashTable, properties: HashTable): void;
/**
* The property returns the question number. If question is invisible then it returns empty string.
* If visibleIndex is 1, then no is 2, or 'B' if survey.questionStartIndex is 'A'.
* @see SurveyModel.questionStartIndex
*/
get no(): string;
protected getStartIndex(): string;
onSurveyLoad(): void;
protected onSetData(): void;
protected initDataFromSurvey(): void;
protected initCommentFromSurvey(): void;
protected runExpression(expression: string): any;
/**
* Get/Set the question value.
* @see SurveyMode.setValue
* @see SurveyMode.getValue
*/
get value(): any;
set value(newValue: any);
get valueForSurvey(): any;
/**
* Clear the question value. It clears the question comment as well.
*/
clearValue(): void;
unbindValue(): void;
createValueCopy(): any;
protected isEditingSurveyElement(value: any): boolean;
protected getUnbindValue(value: any): any;
clearValueIfInvisible(): void;
get displayValue(): any;
protected updateDisplayValue(): any;
/**
* Return the question value as a display text. For example, for dropdown, it would return the item text instead of item value.
* @param keysAsText Set this value to true, to return key (in matrices questions) as display text as well.
* @param value use this parameter, if you want to get display value for this value and not question.value. It is undefined by default.
*/
getDisplayValue(keysAsText: boolean, value?: any): any;
protected getDisplayValueCore(keyAsText: boolean, value: any): any;
/**
* Set the default value to the question. It will be assign to the question on loading the survey from JSON or adding a question to the survey or on setting this property of the value is empty.
* Please note, this property is hidden for question without input, for example html question.
*/
get defaultValue(): any;
set defaultValue(val: any);
get defaultValueExpression(): any;
set defaultValueExpression(val: any);
/**
* Returns question answer data as a plain object: with question title, name, value and displayValue.
* For complex questions (like matrix, etc.) isNode flag is set to true and data contains array of nested objects (rows)
* set options.includeEmpty to false if you want to skip empty answers
*/
getPlainData(options?: {
includeEmpty?: boolean;
includeQuestionTypes?: boolean;
calculations?: Array<{
propertyName: string;
}>;
}): any;
/**
* The correct answer on the question. Set this value if you are doing a quiz.
* Please note, this property is hidden for question without input, for example html question.
* @see SurveyModel.correctAnswers
* @see SurveyModel.inCorrectAnswers
*/
get correctAnswer(): any;
set correctAnswer(val: any);
protected convertDefaultValue(val: any): any;
/**
* Returns questions count: 1 for the non-matrix questions and all inner visible questions that has input(s) widgets for question of matrix types.
* @see getQuizQuestions
*/
get quizQuestionCount(): number;
get correctAnswerCount(): number;
protected getQuizQuestionCount(): number;
protected getCorrectAnswerCount(): number;
isAnswerCorrect(): boolean;
updateValueWithDefaults(): void;
getQuestionFromArray(name: string, index: number): IQuestion;
getDefaultValue(): any;
protected isDefaultValueEmpty(): boolean;
protected setDefaultValue(): void;
protected isValueExpression(val: any): boolean;
protected setValueAndRunExpression(expression: string, defaultValue: any, setFunc: (val: any) => void, values?: HashTable, properties?: HashTable): void;
/**
* The question comment value.
*/
get comment(): string;
set comment(newValue: string);
protected getQuestionComment(): string;
protected setQuestionComment(newValue: string): void;
/**
* Returns true if the question value is empty
*/
isEmpty(): boolean;
get isAnswered(): boolean;
set isAnswered(val: boolean);
protected updateIsAnswered(): void;
protected getIsAnswered(): boolean;
/**
* The list of question validators.
* Please note, this property is hidden for question without input, for example html question.
*/
get validators(): Array;
set validators(val: Array);
getValidators(): Array;
getSupportedValidators(): Array;
addConditionObjectsByContext(objects: Array, context: any): void;
getConditionJson(operator?: string, path?: string): any;
/**
* Returns true if there is a validation error(s) in the question.
* @param fireCallback set it to true to show an error in UI.
*/
hasErrors(fireCallback?: boolean, rec?: any): boolean;
/**
* Returns the validation errors count.
*/
get currentErrorCount(): number;
/**
* Returns the char/string for a required question.
* @see SurveyModel.requiredText
*/
get requiredText(): string;
/**
* Add error into the question error list.
* @param error
*/
addError(error: SurveyError | string): void;
/**
* Remove a particular error from the question error list.
* @param error
*/
removeError(error: SurveyError): void;
protected canRunValidators(isOnValueChanged: boolean): boolean;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
protected hasRequiredError(): boolean;
onCompletedAsyncValidators: (hasErrors: boolean) => void;
get isRunningValidators(): boolean;
protected getIsRunningValidators(): boolean;
protected runValidators(): Array;
protected raiseOnCompletedAsyncValidators(): void;
protected allowNotifyValueChanged: boolean;
protected setNewValue(newValue: any): void;
protected isTextValue(): boolean;
get isSurveyInputTextUpdate(): boolean;
get isInputTextUpdate(): boolean;
protected setNewValueInData(newValue: any): void;
protected getValueCore(): any;
protected setValueCore(newValue: any): void;
protected canSetValueToSurvey(): boolean;
protected valueFromData(val: any): any;
protected valueToData(val: any): any;
protected onValueChanged(): void;
protected setNewComment(newValue: string): void;
protected getValidName(name: string): string;
updateValueFromSurvey(newValue: any): void;
updateCommentFromSurvey(newValue: any): any;
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
onSurveyValueChanged(newValue: any): void;
setVisibleIndex(val: number): number;
removeElement(element: IElement): boolean;
supportGoNextPageAutomatic(): boolean;
supportGoNextPageError(): boolean;
/**
* Call this function to remove values from the current question, that end-user will not be able to enter.
* For example the value that doesn't exists in a radigroup/dropdown/checkbox choices or matrix rows/columns.
*/
clearIncorrectValues(): void;
clearOnDeletingContainer(): void;
/**
* Call this function to clear all errors in the question
*/
clearErrors(): void;
clearUnusedValues(): void;
onAnyValueChanged(name: string): void;
checkBindings(valueName: string, value: any): void;
locOwner: ILocalizableOwner;
/**
* Returns the current survey locale
* @see SurveyModel.locale
*/
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
getComponentName(): string;
getTitleActions(): Array;
isDefaultRendering(): boolean;
renderAs: string;
getErrorCustomText(text: string, error: SurveyError): string;
getValidatorTitle(): string;
get validatedValue(): any;
set validatedValue(val: any);
getAllValues(): any;
dispose(): void;
}
/**
* A Model for non value question. This question doesn't add any new functionality. It hides some properties, including the value.
*/
export declare class QuestionNonValue extends Question {
constructor(name: string);
getType(): string;
get hasInput(): boolean;
get hasTitle(): boolean;
getTitleLocation(): string;
get hasComment(): boolean;
hasErrors(fireCallback?: boolean, rec?: any): boolean;
getAllErrors(): Array;
supportGoNextPageAutomatic(): boolean;
addConditionObjectsByContext(objects: Array, context: any): void;
getConditionJson(operator?: string, path?: string): any;
}
/**
* A Model for an question that renders empty "div" tag. It used as a base class for some custom widgets
*/
export declare class QuestionEmptyModel extends Question {
constructor(name: string);
getType(): string;
}
/**
* It is a base class for checkbox, dropdown and radiogroup questions.
*/
export declare class QuestionSelectBase extends Question {
visibleChoicesChangedCallback: () => void;
constructor(name: string);
getType(): string;
dispose(): void;
supportGoNextPageError(): boolean;
isLayoutTypeSupported(layoutType: string): boolean;
/**
* Returns the other item. By using this property, you may change programmatically it's value and text.
* @see hasOther
*/
get otherItem(): ItemValue;
/**
* Returns true if a user select the 'other' item.
*/
get isOtherSelected(): boolean;
/**
* An expression that returns true or false. It runs against each choices item and if for this item it returns true, then the item is visible otherwise the item becomes invisible. Please use {item} to get the current item value in the expression.
* @see visibleIf
* @see choicesEnableIf
*/
get choicesVisibleIf(): string;
set choicesVisibleIf(val: string);
/**
* An expression that returns true or false. It runs against each choices item and if for this item it returns true, then the item is enabled otherwise the item becomes disabled. Please use {item} to get the current item value in the expression.
* @see choicesVisibleIf
*/
get choicesEnableIf(): string;
set choicesEnableIf(val: string);
runCondition(values: HashTable, properties: HashTable): void;
protected isTextValue(): boolean;
protected setDefaultValue(): void;
protected getIsMultipleValue(): boolean;
protected convertDefaultValue(val: any): any;
protected filterItems(): boolean;
protected runItemsCondition(values: HashTable, properties: HashTable): boolean;
protected runItemsEnableCondition(values: HashTable, properties: HashTable): any;
protected onAfterRunItemsEnableCondition(): void;
protected onEnableItemCallBack(item: ItemValue): boolean;
protected getHasOther(val: any): boolean;
get validatedValue(): any;
protected createRestfull(): ChoicesRestfull;
protected getQuestionComment(): string;
protected setQuestionComment(newValue: string): void;
get renderedValue(): any;
set renderedValue(val: any);
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
protected setNewValue(newValue: any): void;
protected valueFromData(val: any): any;
protected rendredValueFromData(val: any): any;
protected rendredValueToData(val: any): any;
protected renderedValueFromDataCore(val: any): any;
protected rendredValueToDataCore(val: any): any;
protected hasUnknownValue(val: any, includeOther?: boolean): boolean;
protected isValueDisabled(val: any): boolean;
/**
* If the clearIncorrectValuesCallback is set, it is used to clear incorrect values instead of default behaviour.
*/
clearIncorrectValuesCallback: () => void;
/**
* Use this property to fill the choices from a restful service.
* @see choices
*/
get choicesByUrl(): ChoicesRestfull;
/**
* The list of items. Every item has value and text. If text is empty, the value is rendered. The item text supports markdown.
* @see choicesByUrl
* @see choicesFromQuestion
*/
get choices(): Array;
set choices(newValue: Array);
/**
* Set this property to get choices from the specified question instead of defining them in the current question. This avoids duplication of choices declaration in your survey definition.
* By setting this property, the "choices", "choicesVisibleIf", "choicesEnableIf" and "choicesOrder" properties become invisible, because these question characteristics depend on actions in another (specified) question.
* Use the `choicesFromQuestionMode` property to filter choices obtained from the specified question.
* @see choices
* @see choicesFromQuestionMode
*/
get choicesFromQuestion(): string;
set choicesFromQuestion(val: string);
/**
* This property becomes visible when the `choicesFromQuestion` property is selected. The default value is "all" (all visible choices from another question are displayed as they are).
* You can set this property to "selected" or "unselected" to display only selected or unselected choices from the specified question.
* @see choicesFromQuestion
*/
get choicesFromQuestionMode(): string;
set choicesFromQuestionMode(val: string);
/**
* Set this property to true to hide the question if there is no visible choices.
*/
get hideIfChoicesEmpty(): boolean;
set hideIfChoicesEmpty(val: boolean);
get keepIncorrectValues(): boolean;
set keepIncorrectValues(val: boolean);
/**
* Please use survey.storeOthersAsComment to change the behavior on the survey level. This property is depricated and invisible in Survey Creator.
* By default the entered text in the others input in the checkbox/radiogroup/dropdown are stored as "question name " + "-Comment". The value itself is "question name": "others". Set this property to false, to store the entered text directly in the "question name" key.
* Possible values are: "default", true, false
* @see SurveyModel.storeOthersAsComment
*/
get storeOthersAsComment(): any;
set storeOthersAsComment(val: any);
protected hasOtherChanged(): void;
/**
* Use this property to render items in a specific order: "asc", "desc", "random". Default value is "none".
*/
get choicesOrder(): string;
set choicesOrder(val: string);
/**
* Use this property to set the different text for other item.
*/
get otherText(): string;
set otherText(val: string);
get locOtherText(): LocalizableString;
/**
* Use this property to set the place holder text for other or comment field .
*/
get otherPlaceHolder(): string;
set otherPlaceHolder(val: string);
get locOtherPlaceHolder(): LocalizableString;
/**
* The text that shows when the other item is choosed by the other input is empty.
*/
get otherErrorText(): string;
set otherErrorText(val: string);
get locOtherErrorText(): LocalizableString;
/**
* The list of items as they will be rendered. If needed items are sorted and the other item is added.
* @see hasOther
* @see choicesOrder
* @see enabledChoices
*/
get visibleChoices(): Array;
/**
* The list of enabled items as they will be rendered. The disabled items are not included
* @see hasOther
* @see choicesOrder
* @see visibleChoices
*/
get enabledChoices(): Array;
protected updateVisibleChoices(): void;
protected canUseFilteredChoices(): boolean;
protected addToVisibleChoices(items: Array): void;
getPlainData(options?: {
includeEmpty?: boolean;
includeQuestionTypes?: boolean;
calculations?: Array<{
propertyName: string;
}>;
}): any;
/**
* Returns the text for the current value. If the value is null then returns empty string. If 'other' is selected then returns the text for other value.
*/
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
protected getChoicesDisplayValue(items: ItemValue[], val: any): any;
protected get activeChoices(): Array;
protected getChoicesFromQuestion(question: QuestionSelectBase): Array;
protected getChoices(): Array;
supportComment(): boolean;
supportOther(): boolean;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
setSurveyImpl(value: ISurveyImpl): void;
protected getStoreOthersAsComment(): boolean;
onSurveyLoad(): void;
onAnyValueChanged(name: string): void;
updateValueFromSurvey(newValue: any): void;
protected getCommentFromValue(newValue: any): string;
protected setOtherValueIntoValue(newValue: any): any;
protected onBeforeSendRequest(): void;
protected onLoadChoicesFromUrl(array: Array): void;
protected updateChoicesDependedQuestions(): void;
onSurveyValueChanged(newValue: any): void;
protected onVisibleChoicesChanged(): void;
clearIncorrectValues(): void;
clearValueIfInvisible(): void;
/**
* Returns true if item is selected
* @param item checkbox or radio item value
*/
isItemSelected(item: ItemValue): boolean;
protected clearIncorrectValuesCore(): void;
protected canClearValueAnUnknow(val: any): boolean;
protected clearDisabledValuesCore(): void;
clearUnusedValues(): void;
getColumnClass(): any;
getLabelClass(item: ItemValue): any;
getControlLabelClass(item: ItemValue): any;
get columns(): ItemValue[][];
get hasColumns(): boolean;
choicesLoaded(): void;
}
/**
* A base class for checkbox and radiogroup questions. It introduced a colCount property.
*/
export declare class QuestionCheckboxBase extends QuestionSelectBase {
colCountChangedCallback: () => void;
constructor(name: string);
/**
* The number of columns for radiogroup and checkbox questions. Items are rendred in one line if the value is 0.
*/
get colCount(): number;
set colCount(value: number);
getItemIndex(item: any): number;
protected onParentChanged(): void;
}
/**
* A Model for a checkbox question
*/
export declare class QuestionCheckboxModel extends QuestionCheckboxBase {
constructor(name: string);
get ariaRole(): string;
getType(): string;
protected onCreating(): void;
protected getFirstInputElementId(): string;
/**
* Returns the select all item. By using this property, you may change programmatically it's value and text.
* @see hasSelectAll
*/
get selectAllItem(): ItemValue;
/**
* Returns the none item. By using this property, you may change programmatically it's value and text.
* @see hasNone
*/
get noneItem(): ItemValue;
/**
* Use this property to set the different text for none item.
*/
get noneText(): string;
set noneText(val: string);
get locNoneText(): LocalizableString;
/**
* Use this property to set the different text for Select All item.
*/
get selectAllText(): string;
set selectAllText(val: string);
get locSelectAllText(): LocalizableString;
/**
* Set this property to true, to show the "Select All" item on the top. If end-user checks this item, then all items are checked.
*/
get hasSelectAll(): boolean;
set hasSelectAll(val: boolean);
/**
* Returns true if all items are selected
* @see toggleSelectAll
*/
get isAllSelected(): boolean;
set isAllSelected(val: boolean);
/**
* It will select all items, except other and none. If all items have been already selected then it will clear the value
* @see isAllSelected
* @see selectAll
*/
toggleSelectAll(): void;
/**
* Select all items, except other and none.
*/
selectAll(): void;
/**
* Set this property to true, to show the "None" item on the bottom. If end-user checks this item, all other items would be unchecked.
*/
get hasNone(): boolean;
set hasNone(val: boolean);
/**
* Returns true if item is checked
* @param item checkbox item value
*/
isItemSelected(item: ItemValue): boolean;
/**
* Set this property different to 0 to limit the number of selected choices in the checkbox.
*/
get maxSelectedChoices(): number;
set maxSelectedChoices(val: number);
protected onEnableItemCallBack(item: ItemValue): boolean;
protected onAfterRunItemsEnableCondition(): void;
getItemClass(item: any): any;
protected setNewValue(newValue: any): void;
protected getIsMultipleValue(): boolean;
protected getCommentFromValue(newValue: any): string;
protected setOtherValueIntoValue(newValue: any): any;
protected canUseFilteredChoices(): boolean;
protected addToVisibleChoices(items: Array): void;
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
protected clearIncorrectValuesCore(): void;
protected clearDisabledValuesCore(): void;
getConditionJson(operator?: string, path?: string): any;
isAnswerCorrect(): boolean;
protected setDefaultValueWithOthers(): void;
protected getHasOther(val: any): boolean;
protected valueFromData(val: any): any;
protected renderedValueFromDataCore(val: any): any;
protected rendredValueToDataCore(val: any): any;
protected hasUnknownValue(val: any, includeOther?: boolean): boolean;
}
/**
* A Model for a ranking question
*/
export declare class QuestionRankingModel extends QuestionCheckboxModel {
constructor(name: string);
getType(): string;
get isIndeterminate(): boolean;
get rootClass(): any;
getNumberByIndex(index: number): string;
get rankingChoices(): ItemValue[];
afterRenderQuestionElement(el: HTMLElement): void;
beforeDestroyQuestionElement(el: HTMLElement): void;
handleKeydown: (event: any) => void;
protected onVisibleChoicesChanged(): void;
}
/**
* A Model for a comment question
*/
export declare class QuestionCommentModel extends Question {
constructor(name: string);
protected isTextValue(): boolean;
/**
* The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
* If it is 0, then the value is unlimited
* @see SurveyModel.maxTextLength
*/
get maxLength(): number;
set maxLength(val: number);
getMaxLength(): any;
/**
* Use this property to set the input place holder.
*/
get placeHolder(): string;
set placeHolder(val: string);
get locPlaceHolder(): LocalizableString;
/**
* The html rows attribute.
*/
get rows(): number;
set rows(val: number);
/**
* The html cols attribute.
*/
get cols(): number;
set cols(val: number);
getType(): string;
isEmpty(): boolean;
/**
* Gets or sets a value that specifies how the question updates it's value.
*
* The following options are available:
* - `default` - get the value from survey.textUpdateMode
* - `onBlur` - the value is updated after an input loses the focus.
* - `onTyping` - update the value of text questions, "text" and "comment", on every key press.
*
* Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey.
* @see survey.textUpdateMode
*/
get textUpdateMode(): string;
set textUpdateMode(val: string);
get isSurveyInputTextUpdate(): boolean;
}
/**
* A Model for a dropdown question
*/
export declare class QuestionDropdownModel extends QuestionSelectBase {
constructor(name: string);
/**
* This flag controls whether to show options caption item ('Choose...').
*/
get showOptionsCaption(): boolean;
set showOptionsCaption(val: boolean);
/**
* Use this property to set the options caption different from the default value. The default value is taken from localization strings.
*/
get optionsCaption(): string;
set optionsCaption(val: string);
get locOptionsCaption(): LocalizableString;
getType(): string;
get selectedItem(): ItemValue;
supportGoNextPageAutomatic(): boolean;
protected getChoices(): Array;
/**
* Use this and choicesMax property to automatically add choices. For example choicesMin = 1 and choicesMax = 10 will generate ten additional choices from 1 to 10.
* @see choicesMax
* @see choicesStep
*/
get choicesMin(): number;
set choicesMin(val: number);
/**
* Use this and choicesMax property to automatically add choices. For example choicesMin = 1 and choicesMax = 10 will generate ten additional choices from 1 to 10.
* @see choicesMin
* @see choicesStep
*/
get choicesMax(): number;
set choicesMax(val: number);
/**
* The default value is 1. It tells the value of the iterator between choicesMin and choicesMax properties.
* If choicesMin = 10, choicesMax = 30 and choicesStep = 10 then you will have only three additional choices: [10, 20, 30].
* @see choicesMin
* @see choicesMax
*/
get choicesStep(): number;
set choicesStep(val: number);
}
export declare class QuestionFactory {
static Instance: QuestionFactory;
static get DefaultChoices(): string[];
static get DefaultColums(): string[];
static get DefaultRows(): string[];
registerQuestion(questionType: string, questionCreator: (name: string) => Question): void;
unregisterElement(elementType: string): void;
clear(): void;
getAllTypes(): Array;
createQuestion(questionType: string, name: string): Question;
}
export declare class ElementFactory {
static Instance: ElementFactory;
registerElement(elementType: string, elementCreator: (name: string) => IElement): void;
clear(): void;
unregisterElement(elementType: string, removeFromSerializer?: boolean): void;
getAllTypes(): Array;
createElement(elementType: string, name: string): IElement;
}
/**
* A Model for a file question
*/
export declare class QuestionFileModel extends Question {
/**
* The event is fired after question state has been changed.
*
sender the question object that fires the event
*
options.state new question state value.
*/
onStateChanged: Event<(sender: QuestionFileModel, options: any) => any, any>;
previewValue: any[];
currentState: string;
constructor(name: string);
getType(): string;
clearOnDeletingContainer(): void;
/**
* Set it to true, to show the preview for the image files.
*/
get showPreview(): boolean;
set showPreview(val: boolean);
/**
* Set it to true, to allow select multiple files.
*/
get allowMultiple(): boolean;
set allowMultiple(val: boolean);
/**
* The image height.
*/
get imageHeight(): string;
set imageHeight(val: string);
/**
* The image width.
*/
get imageWidth(): string;
set imageWidth(val: string);
/**
* Accepted file types. Passed to the 'accept' attribute of the file input tag. See https://www.w3schools.com/tags/att_input_accept.asp for more details.
*/
get acceptedTypes(): string;
set acceptedTypes(val: string);
/**
* Set it to false if you do not want to serialize file content as text in the survey.data.
* In this case, you have to write the code onUploadFiles event to store the file content.
* @see SurveyModel.onUploadFiles
*/
get storeDataAsText(): boolean;
set storeDataAsText(val: boolean);
/**
* Set it to true if you want to wait until files will be uploaded to your server.
*/
get waitForUpload(): boolean;
set waitForUpload(val: boolean);
/**
* Set it to false if you want to disable images preview.
*/
get allowImagesPreview(): boolean;
set allowImagesPreview(val: boolean);
/**
* Use this property to setup the maximum allowed file size.
*/
get maxSize(): number;
set maxSize(val: number);
/**
* Use this property to setup confirmation to remove file.
*/
get needConfirmRemoveFile(): boolean;
set needConfirmRemoveFile(val: boolean);
/**
* The remove file confirmation message.
*/
getConfirmRemoveMessage(fileName: string): string;
/**
* The remove all files confirmation message.
*/
get confirmRemoveAllMessage(): string;
/**
* The no file chosen caption for modern theme.
*/
get noFileChosenCaption(): string;
/**
* The choose files button caption for modern theme.
*/
get chooseButtonCaption(): string;
/**
* The clean files button caption.
*/
get cleanButtonCaption(): string;
/**
* The remove file button caption.
*/
get removeFileCaption(): string;
/**
* The input title value.
*/
get inputTitle(): string;
/**
* Clear value programmatically.
*/
clear(doneCallback?: () => void): void;
/**
* Remove file item programmatically.
*/
removeFile(content: {
name: string;
}): void;
/**
* Load multiple files programmatically.
* @param files
*/
loadFiles(files: File[]): void;
canPreviewImage(fileItem: any): boolean;
protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
protected stateChanged(state: string): void;
getPlainData(options?: {
includeEmpty?: boolean;
calculations?: Array<{
propertyName: string;
}>;
}): any;
supportComment(): boolean;
}
/**
* A Model for html question. Unlike other questions it doesn't have value and title.
*/
export declare class QuestionHtmlModel extends QuestionNonValue {
constructor(name: string);
getType(): string;
get isCompositeQuestion(): boolean;
/**
* Set html to display it
*/
get html(): string;
set html(val: string);
get locHtml(): LocalizableString;
get processedHtml(): string;
}
/**
* A Model for a radiogroup question.
*/
export declare class QuestionRadiogroupModel extends QuestionCheckboxBase {
constructor(name: string);
getType(): string;
protected getFirstInputElementId(): string;
get selectedItem(): ItemValue;
/**
* Show "clear button" flag.
*/
get showClearButton(): boolean;
set showClearButton(val: boolean);
get canShowClearButton(): boolean;
get clearButtonCaption(): any;
supportGoNextPageAutomatic(): boolean;
getItemClass(item: any): any;
}
/**
* A Model for a rating question.
*/
export declare class QuestionRatingModel extends Question {
rateValuesChangedCallback: () => void;
constructor(name: string);
onSurveyLoad(): void;
/**
* The list of rate items. Every item has value and text. If text is empty, the value is rendered. The item text supports markdown. If it is empty the array is generated by using rateMin, rateMax and rateStep properties.
* @see rateMin
* @see rateMax
* @see rateStep
*/
get rateValues(): Array;
set rateValues(val: Array);
/**
* This property is used to generate rate values if rateValues array is empty. It is the first value in the rating. The default value is 1.
* @see rateValues
* @see rateMax
* @see rateStep
*/
get rateMin(): number;
set rateMin(val: number);
/**
* This property is used to generate rate values if rateValues array is empty. It is the last value in the rating. The default value is 5.
* @see rateValues
* @see rateMin
* @see rateStep
*/
get rateMax(): number;
set rateMax(val: number);
/**
* This property is used to generate rate values if rateValues array is empty. It is the step value. The number of rate values are (rateMax - rateMin) / rateStep. The default value is 1.
* @see rateValues
* @see rateMin
* @see rateMax
*/
get rateStep(): number;
set rateStep(val: number);
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
get visibleRateValues(): ItemValue[];
getType(): string;
protected getFirstInputElementId(): string;
supportGoNextPageAutomatic(): boolean;
supportComment(): boolean;
supportOther(): boolean;
/**
* The description of minimum (first) item.
*/
get minRateDescription(): string;
set minRateDescription(val: string);
get locMinRateDescription(): LocalizableString;
/**
* The description of maximum (last) item.
*/
get maxRateDescription(): string;
set maxRateDescription(val: string);
get locMaxRateDescription(): LocalizableString;
protected valueToData(val: any): any;
}
/**
* A Model for expression question. It is a read-only question. It calculates value based on epxression property.
*/
export declare class QuestionExpressionModel extends Question {
constructor(name: string);
getType(): string;
get hasInput(): boolean;
/**
* Use this property to display the value in your own format. Make sure you have "{0}" substring in your string, to display the actual value.
*/
get format(): string;
set format(val: string);
get locFormat(): LocalizableString;
/**
* The Expression that used to calculate the question value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}.
*
Example: "({quantity} * {price}) * (100 - {discount}) / 100"
*/
get expression(): string;
set expression(val: string);
locCalculation(): void;
unlocCalculation(): void;
runCondition(values: HashTable, properties: HashTable): void;
hasErrors(fireCallback?: boolean, rec?: any): boolean;
getAllErrors(): Array;
/**
* The maximum number of fraction digits to use if displayStyle is not "none". Possible values are from 0 to 20. The default value is -1 and it means that this property is not used.
*/
get maximumFractionDigits(): number;
set maximumFractionDigits(val: number);
/**
* The minimum number of fraction digits to use if displayStyle is not "none". Possible values are from 0 to 20. The default value is -1 and it means that this property is not used.
*/
get minimumFractionDigits(): number;
set minimumFractionDigits(val: number);
protected getDisplayValueCore(keysAsText: boolean, value: any): any;
/**
* You may set this property to "decimal", "currency", "percent" or "date". If you set it to "currency", you may use the currency property to display the value in currency different from USD.
* @see currency
*/
get displayStyle(): string;
set displayStyle(val: string);
/**
* Use it to display the value in the currency differen from USD. The displayStype should be set to "currency".
* @see displayStyle
*/
get currency(): string;
set currency(val: string);
/**
* Determines whether to display grouping separators. The default value is true.
*/
get useGrouping(): boolean;
set useGrouping(val: boolean);
protected getValueAsStr(val: any): string;
}
export declare function getCurrecyCodes(): Array;
/**
* A Model for an input text question.
*/
export declare class QuestionTextModel extends Question {
constructor(name: string);
protected isTextValue(): boolean;
getType(): string;
onSurveyLoad(): void;
/**
* Use this property to change the default input type.
*/
get inputType(): string;
set inputType(val: string);
runCondition(values: HashTable, properties: HashTable): void;
/**
* Gets or sets a value that specifies how the question updates it's value.
*
* The following options are available:
* - `default` - get the value from survey.textUpdateMode
* - `onBlur` - the value is updated after an input loses the focus.
* - `onTyping` - update the value of text questions, "text" and "comment", on every key press.
*
* Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey.
* @see survey.textUpdateMode
*/
get textUpdateMode(): string;
set textUpdateMode(val: string);
get isSurveyInputTextUpdate(): boolean;
getValidators(): Array;
isLayoutTypeSupported(layoutType: string): boolean;
/**
* The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used.
* If it is 0, then the value is unlimited
* @see SurveyModel.maxTextLength
*/
get maxLength(): number;
set maxLength(val: number);
getMaxLength(): any;
/**
* The text input size
*/
get size(): number;
set size(val: number);
get autoComplete(): string;
set autoComplete(val: string);
/**
* The minimum value
*/
get min(): string;
set min(val: string);
/**
* The maximum value
*/
get max(): string;
set max(val: string);
/**
* The minimum value that you can setup as expression, for example today(-1) = yesterday;
*/
get minValueExpression(): string;
set minValueExpression(val: string);
/**
* The maximum value that you can setup as expression, for example today(1) = tomorrow;
*/
get maxValueExpression(): string;
set maxValueExpression(val: string);
get renderedMin(): any;
get renderedMax(): any;
/**
* The text that shows when value is less than min property.
* @see min
* @see maxErrorText
*/
get minErrorText(): string;
set minErrorText(val: string);
get locMinErrorText(): LocalizableString;
/**
* The text that shows when value is greater than man property.
* @see max
* @see minErrorText
*/
get maxErrorText(): string;
set maxErrorText(val: string);
get locMaxErrorText(): LocalizableString;
/**
* Readonly property that returns true if the current inputType allows to set min and max properties
* @see inputType
* @see min
* @see max
*/
get isMinMaxType(): boolean;
protected onCheckForErrors(errors: Array, isOnValueChanged: boolean): void;
protected canSetValueToSurvey(): boolean;
/**
* The step value
*/
get step(): string;
set step(val: string);
get renderedStep(): string;
isEmpty(): boolean;
supportGoNextPageAutomatic(): boolean;
supportGoNextPageError(): boolean;
/**
* The input place holder.
*/
get placeHolder(): string;
set placeHolder(val: string);
get locPlaceHolder(): LocalizableString;
/**
* The list of recommended options available to choose.
*/
get dataList(): Array;
set dataList(val: Array);
get locDataList(): LocalizableStrings;
get dataListId(): string;
protected canRunValidators(isOnValueChanged: boolean): boolean;
protected setNewValue(newValue: any): void;
protected correctValueType(newValue: any): any;
}
/**
* A Model for a boolean question.
*/
export declare class QuestionBooleanModel extends Question {
constructor(name: string);
getType(): string;
isLayoutTypeSupported(layoutType: string): boolean;
/**
* Returns true if the question check will be rendered in indeterminate mode. value is empty.
*/
get isIndeterminate(): boolean;
get hasTitle(): boolean;
/**
* Get/set question value in 3 modes: indeterminate (value is empty), true (check is set) and false (check is unset).
* @see valueTrue
* @see valueFalse
*/
get checkedValue(): any;
set checkedValue(val: any);
/**
* Set the default state of the check: "indeterminate" - default (value is empty/null), "true" - value equals valueTrue or true, "false" - value equals valueFalse or false.
*/
get defaultValue(): any;
set defaultValue(val: any);
getDefaultValue(): any;
get locTitle(): LocalizableString;
/**
* The checkbox label. If it is empty and showTitle is false then title is rendered
* @see showTitle
* @see title
*/
label: string;
get locDisplayLabel(): LocalizableString;
/**
* Set this property, if you want to have a different label for state when check is set.
*/
get labelTrue(): any;
set labelTrue(val: any);
get locLabelTrue(): LocalizableString;
/**
* Set this property, if you want to have a different label for state when check is unset.
*/
get labelFalse(): any;
set labelFalse(val: any);
get locLabelFalse(): LocalizableString;
/**
* Set this property to true to show the question title. It is hidden by default.
*/
showTitle: boolean;
/**
* Set this property, if you want to have a different value from true when check is set.
*/
valueTrue: any;
/**
* Set this property, if you want to have a different value from false when check is unset.
*/
valueFalse: any;
protected setDefaultValue(): void;
}
export declare class ImageItemValue extends ItemValue implements ILocalizableOwner {
protected typeName: string;
constructor(value: any, text?: string, typeName?: string);
getType(): string;
/**
* The image or video link property.
*/
get imageLink(): string;
set imageLink(val: string);
get locImageLink(): LocalizableString;
getLocale(): string;
getMarkdownHtml(text: string, name: string): string;
getRenderer(name: string): string;
getProcessedText(text: string): string;
}
/**
* A Model for a select image question.
*/
export declare class QuestionImagePickerModel extends QuestionCheckboxBase {
constructor(name: string);
getType(): string;
supportGoNextPageAutomatic(): boolean;
get hasSingleInput(): boolean;
protected getItemValueType(): string;
get isCompositeQuestion(): boolean;
supportOther(): boolean;
/**
* Multi select option. If set to true, then allows to select multiple images.
*/
get multiSelect(): boolean;
set multiSelect(newValue: boolean);
/**
* Returns true if item is checked
* @param item image picker item value
*/
isItemSelected(item: ItemValue): boolean;
clearIncorrectValues(): void;
/**
* Show label under the image.
*/
get showLabel(): boolean;
set showLabel(newValue: boolean);
endLoadingFromJson(): void;
protected getValueCore(): any;
protected renderedValueFromDataCore(val: any): any;
protected rendredValueToDataCore(val: any): any;
/**
* The image height.
*/
get imageHeight(): string;
set imageHeight(val: string);
/**
* The image width.
*/
get imageWidth(): string;
set imageWidth(val: string);
/**
* The image fit mode.
*/
get imageFit(): string;
set imageFit(val: string);
/**
* The content mode.
*/
get contentMode(): string;
set contentMode(val: string);
getItemClass(item: any): string;
protected convertDefaultValue(val: any): any;
}
/**
* A Model for image question. This question hasn't any functionality and can be used to improve the appearance of the survey.
*/
export declare class QuestionImageModel extends QuestionNonValue {
constructor(name: string);
getType(): string;
get isCompositeQuestion(): boolean;
/**
* The image URL.
*/
get imageLink(): string;
set imageLink(val: string);
get locImageLink(): LocalizableString;
/**
* The image alt text.
*/
get text(): string;
set text(val: string);
get locText(): LocalizableString;
/**
* The image height.
*/
get imageHeight(): string;
set imageHeight(val: string);
/**
* The image width.
*/
get imageWidth(): string;
set imageWidth(val: string);
/**
* The image fit mode.
*/
get imageFit(): string;
set imageFit(val: string);
/**
* The content mode.
*/
get contentMode(): string;
set contentMode(val: string);
}
/**
* A Model for signature pad question.
*/
export declare class QuestionSignaturePadModel extends Question {
protected getCssRoot(cssClasses: any): string;
protected updateValue(): void;
constructor(name: string);
getType(): string;
afterRenderQuestionElement(el: HTMLElement): void;
beforeDestroyQuestionElement(el: HTMLElement): void;
initSignaturePad(el: HTMLElement): void;
destroySignaturePad(el: HTMLElement): void;
/**
* Use it to set the specific dataFormat for the signature pad image data.
* formats: "" (default) - png, "image/jpeg" - jpeg, "image/svg+xml" - svg
*/
get dataFormat(): string;
set dataFormat(val: string);
/**
* Use it to set the specific width for the signature pad.
*/
get width(): string;
set width(val: string);
/**
* Use it to set the specific height for the signature pad.
*/
get height(): string;
set height(val: string);
/**
* Use it to clear content of the signature pad.
*/
get allowClear(): boolean;
set allowClear(val: boolean);
/**
* Use it to set pen color for the signature pad.
*/
get penColor(): string;
set penColor(val: string);
/**
* The clear signature button caption.
*/
get clearButtonCaption(): string;
}
export interface IQuestionPanelDynamicData {
getItemIndex(item: ISurveyData): number;
getPanelItemData(item: ISurveyData): any;
setPanelItemData(item: ISurveyData, name: string, val: any): any;
getSharedQuestionFromArray(name: string, panelIndex: number): Question;
getSurvey(): ISurvey;
getRootData(): ISurveyData;
}
export declare class QuestionPanelDynamicItem implements ISurveyData, ISurveyImpl {
static ItemVariableName: string;
static ParentItemVariableName: string;
static IndexVariableName: string;
constructor(data: IQuestionPanelDynamicData, panel: PanelModel);
get panel(): PanelModel;
setSurveyImpl(): void;
getValue(name: string): any;
setValue(name: string, newValue: any): void;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
getComment(name: string): string;
setComment(name: string, newValue: string, locNotification: any): void;
getAllValues(): any;
getFilteredValues(): any;
getFilteredProperties(): any;
getSurveyData(): ISurveyData;
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
}
export declare class QuestionPanelDynamicTemplateSurveyImpl implements ISurveyImpl {
data: IQuestionPanelDynamicData;
constructor(data: IQuestionPanelDynamicData);
getSurveyData(): ISurveyData;
getSurvey(): ISurvey;
getTextProcessor(): ITextProcessor;
}
/**
* A Model for a panel dymanic question. You setup the template panel, but adding elements (any question or a panel) and assign a text to it's title, and this panel will be used as a template on creating dynamic panels. The number of panels is defined by panelCount property.
* An end-user may dynamically add/remove panels, unless you forbidden this.
*/
export declare class QuestionPanelDynamicModel extends Question implements IQuestionPanelDynamicData {
renderModeChangedCallback: () => void;
panelCountChangedCallback: () => void;
currentIndexChangedCallback: () => void;
constructor(name: string);
get hasSingleInput(): boolean;
setSurveyImpl(value: ISurveyImpl): void;
getType(): string;
get isCompositeQuestion(): boolean;
clearOnDeletingContainer(): void;
get isAllowTitleLeft(): boolean;
removeElement(element: IElement): boolean;
/**
* The template Panel. This panel is used as a template on creatign dynamic panels
* @see templateElements
* @see templateTitle
* @see panelCount
*/
get template(): PanelModel;
getPanel(): IPanel;
/**
* The template Panel elements, questions and panels.
* @see templateElements
* @see template
* @see panelCount
*/
get templateElements(): Array;
/**
* The template Panel title property.
* @see templateElements
* @see template
* @see panelCount
*/
get templateTitle(): string;
set templateTitle(newValue: string);
get locTemplateTitle(): LocalizableString;
/**
* The template Panel description property.
* @see templateElements
* @see template
* @see panelCount
* @see templateTitle
*/
get templateDescription(): string;
set templateDescription(newValue: string);
get locTemplateDescription(): LocalizableString;
protected get items(): Array;
/**
* The array of dynamic panels created based on panel template
* @see template
* @see panelCount
*/
get panels(): Array;
/**
* The index of current active dynamical panel when the renderMode is not "list". If there is no dymamic panel (panelCount = 0) or renderMode equals "list" it returns -1, otherwise it returns a value from 0 to panelCount - 1.
* @see currentPanel
* @see panels
* @see panelCount
* @see renderMode
*/
get currentIndex(): number;
set currentIndex(val: number);
/**
* The current active dynamical panel when the renderMode is not "list". If there is no dymamic panel (panelCount = 0) or renderMode equals "list" it returns null.
* @see currenIndex
* @see panels
* @see panelCount
* @see renderMode
*/
get currentPanel(): PanelModel;
/**
* Set it to true, to show a confirmation dialog on removing a panel
* @see ConfirmDeleteText
*/
get confirmDelete(): boolean;
set confirmDelete(val: boolean);
/**
* Set it to a question name used in the template panel and the library shows duplication error, if there are same values in different panels of this question.
* @see keyDuplicationError
*/
get keyName(): string;
set keyName(val: string);
/**
* Use this property to change the default text showing in the confirmation delete dialog on removing a panel.
*/
get confirmDeleteText(): string;
set confirmDeleteText(val: string);
get locConfirmDeleteText(): LocalizableString;
/**
* The duplication value error text. Set it to show the text different from the default.
* @see keyName
*/
get keyDuplicationError(): string;
set keyDuplicationError(val: string);
get locKeyDuplicationError(): LocalizableString;
/**
* Use this property to change the default previous button text. Previous button shows the previous panel, change the currentPanel, when the renderMode doesn't equal to "list".
* @see currentPanel
* @see currentIndex
* @see renderMode
*/
get panelPrevText(): string;
set panelPrevText(val: string);
get locPanelPrevText(): LocalizableString;
/**
* Use this property to change the default next button text. Next button shows the next panel, change the currentPanel, when the renderMode doesn't equal to "list".
* @see currentPanel
* @see currentIndex
* @see renderMode
*/
get panelNextText(): string;
set panelNextText(val: string);
get locPanelNextText(): LocalizableString;
/**
* Use this property to change the default value of add panel button text.
*/
get panelAddText(): string;
set panelAddText(value: string);
get locPanelAddText(): LocalizableString;
/**
* Use this property to change the default value of remove panel button text.
*/
get panelRemoveText(): string;
set panelRemoveText(val: string);
get locPanelRemoveText(): LocalizableString;
/**
* Returns true when the renderMode equals to "progressTop" or "progressTopBottom"
*/
get isProgressTopShowing(): boolean;
/**
* Returns true when the renderMode equals to "progressBottom" or "progressTopBottom"
*/
get isProgressBottomShowing(): boolean;
/**
* Returns true when currentIndex is more than 0.
* @see currenIndex
* @see currenPanel
*/
get isPrevButtonShowing(): boolean;
/**
* Returns true when currentIndex is more than or equal 0 and less than panelCount - 1.
* @see currenIndex
* @see currenPanel
* @see panelCount
*/
get isNextButtonShowing(): boolean;
/**
* Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2.
*/
get isRangeShowing(): boolean;
getElementsInDesign(includeHidden?: boolean): Array;
protected getValueCore(): any;
protected setValueCore(newValue: any): void;
/**
* Use this property to get/set the number of dynamic panels.
* @see template
* @see minPanelCount
* @see maxPanelCount
* @see addPanel
* @see removePanel
* @see removePanelUI
*/
get panelCount(): number;
set panelCount(val: number);
/**
* Use this property to allow the end-user to collapse/expand the panels. It works only if the renderMode property equals to "list" and templateTitle property is not empty. The following values are available:
*
default - the default value. User can't collapse/expand panels
*
expanded - User can collapse/expand panels and all panels are expanded by default
*
collapsed - User can collapse/expand panels and all panels are collapsed by default
*
firstExpanded - User can collapse/expand panels. The first panel is expanded and others are collapsed
* @see renderMode
* @see templateTitle
*/
get panelsState(): string;
set panelsState(val: string);
/**
* The minimum panel count. A user could not delete a panel if the panelCount equals to minPanelCount
* @see panelCount
* @see maxPanelCount
*/
get minPanelCount(): number;
set minPanelCount(val: number);
/**
* The maximum panel count. A user could not add a panel if the panelCount equals to maxPanelCount
* @see panelCount
* @see minPanelCount
*/
get maxPanelCount(): number;
set maxPanelCount(val: number);
/**
* Set this property to false to hide the 'Add New' button
* @see allowRemovePanel
*/
get allowAddPanel(): boolean;
set allowAddPanel(val: boolean);
/**
* Set this property to false to hide the 'Remove' button
* @see allowAddPanel
*/
get allowRemovePanel(): boolean;
set allowRemovePanel(val: boolean);
/**
* Set this property different from "default" to set the specific question title location for the template questions.
* @see SurveyModel.questionTitleLocation
* @see PanelModelBase.questionTitleLocation
*/
get templateTitleLocation(): string;
set templateTitleLocation(value: string);
/**
* Use this property to show/hide the numbers in titles in questions inside a dynamic panel.
* By default the value is "off". You may set it to "onPanel" and the first question inside a dynamic panel will start with 1 or "onSurvey" to include nested questions in dymamic panels into global survey question numbering.
*/
get showQuestionNumbers(): string;
set showQuestionNumbers(val: string);
/**
* Shows the range from 1 to panelCount when renderMode doesn't equal to "list". Set to false to hide this element.
* @see panelCount
* @see renderMode
*/
get showRangeInProgress(): boolean;
set showRangeInProgress(val: boolean);
/**
* By default the property equals to "list" and all dynamic panels are rendered one by one on the page. You may change it to: "progressTop", "progressBottom" or "progressTopBottom" to render only one dynamic panel at once. The progress and navigation elements can be rendred on top, bottom or both.
*/
get renderMode(): string;
set renderMode(val: string);
/**
* Returns true when renderMode equals to "list".
* @see renderMode
*/
get isRenderModeList(): boolean;
setVisibleIndex(value: number): number;
/**
* Returns true when an end user may add a new panel. The question is not read only and panelCount less than maxPanelCount
* @see isReadOnly
* @see panelCount
* @see maxPanelCount
*/
get canAddPanel(): boolean;
/**
* Returns true when an end user may remove a panel. The question is not read only and panelCount is more than minPanelCount
* @see isReadOnly
* @see panelCount
* @see minPanelCount
*/
get canRemovePanel(): boolean;
protected rebuildPanels(): void;
/**
* If it is not empty, then this value is set to every new panel, including panels created initially, unless the defaultValue is not empty
* @see defaultValue
* @see defaultValueFromLastRow
*/
get defaultPanelValue(): any;
set defaultPanelValue(val: any);
/**
* Set it to true to copy the value into new added panel from the last panel. If defaultPanelValue is set and this property equals to true,
* then the value for new added panel is merging.
* @see defaultValue
* @see defaultPanelValue
*/
get defaultValueFromLastPanel(): boolean;
set defaultValueFromLastPanel(val: boolean);
protected isDefaultValueEmpty(): boolean;
protected setDefaultValue(): void;
isEmpty(): boolean;
getProgressInfo(): IProgressInfo;
/**
* Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method.
* @see template
* @see panelCount
* @see panels
* @see canAddPanel
*/
addPanelUI(): PanelModel;
/**
* Add a new dynamic panel based on the template Panel.
* @see template
* @see panelCount
* @see panels
*/
addPanel(): PanelModel;
/**
* Call removePanel function. Do nothing is canRemovePanel returns false. If confirmDelete set to true, it shows the confirmation dialog first.
* @param value a panel or panel index
* @see removePanel
* @see confirmDelete
* @see confirmDeleteText
* @see canRemovePanel
*
*/
removePanelUI(value: any): void;
/**
* Goes to the next panel in the PanelDynamic
*
*/
goToNextPanel(): void;
/**
* Goes to the previous panel in the PanelDynamic
*
*/
goToPrevPanel(): void;
/**
* Removes a dynamic panel from the panels array.
* @param value a panel or panel index
* @see panels
* @see template
*/
removePanel(value: any): void;
locStrsChanged(): void;
clearIncorrectValues(): void;
clearErrors(): void;
getQuestionFromArray(name: string, index: number): IQuestion;
getSharedQuestionFromArray(name: string, panelIndex: number): Question;
addConditionObjectsByContext(objects: Array, context: any): void;
getConditionJson(operator?: string, path?: string): any;
protected onReadOnlyChanged(): void;
onSurveyLoad(): void;
onFirstRendering(): void;
runCondition(values: HashTable, properties: HashTable): void;
protected runPanelsCondition(values: HashTable