Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

survey-knockout

Package Overview
Dependencies
Maintainers
1
Versions
511
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

survey-knockout - npm Package Compare versions

Comparing version 0.12.12 to 0.12.13

2

package.json
{
"name": "survey-knockout",
"version": "0.12.12",
"version": "0.12.13",
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,7 +5,7 @@ survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.

##Getting started
[![Join the chat at https://gitter.im/andrewtelnov/surveyjs](https://badges.gitter.im/andrewtelnov/surveyjs.svg)](https://gitter.im/andrewtelnov/surveyjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/andrewtelnov/surveyjs](https://badges.gitter.im/andrewtelnov/surveyjs.svg)](https://gitter.im/andrewtelnov/surveyjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
To find our more about the library go
* to the [surveyjs.org site](http://surveyjs.org)
* explore the live [Examples](http://surveyjs.org/examples/)
* to the [surveyjs.org site](http://surveyjs.org)
* explore the live [Examples](http://surveyjs.org/examples/)
* and build a survey JSON using [Visual Editor](http://surveyjs.org/builder/)

@@ -12,0 +12,0 @@

@@ -1,2 +0,2 @@

/*Type definitions for Survey JavaScript library v0.12.12
/*Type definitions for Survey JavaScript library v0.12.13
Project: http://surveyjs.org/

@@ -170,2 +170,82 @@ Definitions by: Devsoft Baltic OÜ <https://github.com/surveyjs/>

export declare var defaultBootstrapMaterialCss: {
root: string;
header: string;
body: string;
footer: string;
navigationButton: string;
navigation: {
complete: string;
prev: string;
next: string;
};
progress: string;
progressBar: string;
pageTitle: string;
row: string;
question: {
root: string;
title: string;
comment: string;
indent: number;
};
error: {
root: string;
icon: string;
item: string;
};
checkbox: {
root: string;
item: string;
other: string;
};
comment: string;
dropdown: {
root: string;
control: string;
};
matrix: {
root: string;
row: string;
label: string;
itemValue: string;
};
matrixdropdown: {
root: string;
itemValue: string;
};
matrixdynamic: {
root: string;
button: string;
};
multipletext: {
root: string;
itemTitle: string;
row: string;
itemValue: string;
};
radiogroup: {
root: string;
item: string;
label: string;
other: string;
};
rating: {
root: string;
item: string;
};
text: string;
window: {
root: string;
body: string;
header: {
root: string;
title: string;
button: string;
buttonExpanded: string;
buttonCollapsed: string;
};
};
};
export declare class Survey extends SurveyModel {

@@ -412,56 +492,71 @@ static cssType: string;

export declare class ValidatorResult {
value: any;
error: SurveyError;
constructor(value: any, error?: SurveyError);
value: any;
error: SurveyError;
constructor(value: any, error?: SurveyError);
}
/**
* Base SurveyJS validator class.
*/
export declare class SurveyValidator extends Base {
text: string;
constructor();
protected getErrorText(name: string): string;
protected getDefaultErrorText(name: string): string;
validate(value: any, name?: string): ValidatorResult;
text: string;
constructor();
protected getErrorText(name: string): string;
protected getDefaultErrorText(name: string): string;
validate(value: any, name?: string): ValidatorResult;
}
export interface IValidatorOwner {
validators: Array<SurveyValidator>;
value: any;
getValidatorTitle(): string;
validators: Array<SurveyValidator>;
value: any;
getValidatorTitle(): string;
}
export declare class ValidatorRunner {
run(owner: IValidatorOwner): SurveyError;
run(owner: IValidatorOwner): SurveyError;
}
/**
* Validate numeric values.
*/
export declare class NumericValidator extends SurveyValidator {
minValue: number;
maxValue: number;
constructor(minValue?: number, maxValue?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
minValue: number;
maxValue: number;
constructor(minValue?: number, maxValue?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
}
/**
* Validate text values
*/
export declare class TextValidator extends SurveyValidator {
minLength: number;
maxLength: number;
constructor(minLength?: number, maxLength?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
minLength: number;
maxLength: number;
constructor(minLength?: number, maxLength?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
}
export declare class AnswerCountValidator extends SurveyValidator {
minCount: number;
maxCount: number;
constructor(minCount?: number, maxCount?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): string;
minCount: number;
maxCount: number;
constructor(minCount?: number, maxCount?: number);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): string;
}
/**
* Use it to validate the text by regular expressions.
*/
export declare class RegexValidator extends SurveyValidator {
regex: string;
constructor(regex?: string);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
regex: string;
constructor(regex?: string);
getType(): string;
validate(value: any, name?: string): ValidatorResult;
}
/**
* Validate e-mail address in the text input
*/
export declare class EmailValidator extends SurveyValidator {
constructor();
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
constructor();
getType(): string;
validate(value: any, name?: string): ValidatorResult;
protected getDefaultErrorText(name: string): any;
}

@@ -531,2 +626,5 @@

}
/**
* The base class for SurveyJS objects.
*/
export declare class Base {

@@ -553,2 +651,7 @@ static isValueEmpty(value: any): boolean;

/**
* 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 {

@@ -576,2 +679,6 @@ static Separator: string;

}
/**
* 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 {

@@ -599,2 +706,6 @@ owner: ILocalizableOwner;

/**
* 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 {

@@ -623,2 +734,3 @@ url: string;

perform(left?: any, right?: any): boolean;
performExplicit(left: any, right: any): boolean;
}

@@ -776,5 +888,2 @@ export declare class ConditionNode {

minWidth: string;
cellType: string;
inputType: string;
choicesOrder: string;
choicesByUrl: ChoicesRestfull;

@@ -785,2 +894,5 @@ colOwner: IMatrixColumnOwner;

getType(): string;
choicesOrder: string;
inputType: string;
cellType: string;
title: string;

@@ -824,2 +936,5 @@ readonly fullTitle: string;

}
/**
* A base class for matrix dropdown and matrix dynamic questions.
*/
export declare class QuestionMatrixDropdownModelBase extends Question implements IMatrixDropdownData {

@@ -879,2 +994,5 @@ name: string;

}
/**
* 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 {

@@ -895,2 +1013,6 @@ name: 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 {

@@ -927,2 +1049,5 @@ name: string;

}
/**
* A Model for a simple matrix question.
*/
export declare class MatrixRowModel extends Base {

@@ -965,3 +1090,3 @@ fullName: string;

isRequired: boolean;
inputType: string;
onValueChangedCallback: (newValue: any) => void;
validators: Array<SurveyValidator>;

@@ -971,2 +1096,3 @@ constructor(name?: any, title?: string);

setData(data: IMultipleTextData): void;
inputType: string;
title: string;

@@ -985,2 +1111,5 @@ readonly locTitle: LocalizableString;

}
/**
* A Model for a multiple text question.
*/
export declare class QuestionMultipleTextModel extends Question implements IMultipleTextData {

@@ -1010,78 +1139,88 @@ name: string;

export declare class QuestionRowModel {
panel: PanelModelBase;
visibilityChangedCallback: () => void;
constructor(panel: PanelModelBase);
elements: Array<IElement>;
readonly questions: Array<IElement>;
visible: boolean;
updateVisible(): void;
addElement(q: IElement): void;
protected onVisibleChanged(): void;
panel: PanelModelBase;
visibilityChangedCallback: () => void;
constructor(panel: PanelModelBase);
elements: Array<IElement>;
readonly questions: Array<IElement>;
visible: boolean;
updateVisible(): void;
addElement(q: IElement): void;
protected onVisibleChanged(): void;
}
/**
* A base class for a Panel and Page objects.
*/
export declare class PanelModelBase extends Base implements IConditionRunner, ILocalizableOwner {
name: string;
parent: PanelModelBase;
visibleIf: string;
rowsChangedCallback: () => void;
visibleIndex: number;
constructor(name?: string);
data: ISurvey;
title: string;
readonly locTitle: LocalizableString;
getLocale(): string;
getMarkdownHtml(text: string): string;
readonly id: string;
readonly isPanel: boolean;
readonly questions: Array<QuestionBase>;
readonly elements: Array<IElement>;
containsElement(element: IElement): boolean;
hasErrors(fireCallback?: boolean, focuseOnFirstError?: boolean): boolean;
addQuestionsToList(list: Array<IQuestion>, visibleOnly?: boolean): void;
readonly rows: Array<QuestionRowModel>;
readonly isActive: boolean;
protected readonly root: PanelModelBase;
protected createRow(): QuestionRowModel;
onSurveyLoad(): void;
protected readonly isLoadingFromJson: boolean;
protected onRowsChanged(): void;
readonly processedTitle: string;
protected getRendredTitle(str: string): string;
visible: boolean;
protected onVisibleChanged(): void;
readonly isVisible: boolean;
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
addElement(element: IElement, index?: number): void;
addQuestion(question: QuestionBase, index?: number): void;
addPanel(panel: PanelModel, index?: number): void;
addNewQuestion(questionType: string, name: string): QuestionBase;
addNewPanel(name: string): PanelModel;
protected createNewPanel(name: string): PanelModel;
removeElement(element: IElement): boolean;
removeQuestion(question: QuestionBase): void;
runCondition(values: HashTable<any>): void;
onLocaleChanged(): void;
name: string;
parent: PanelModelBase;
visibleIf: string;
rowsChangedCallback: () => void;
visibleIndex: number;
constructor(name?: string);
data: ISurvey;
title: string;
readonly locTitle: LocalizableString;
getLocale(): string;
getMarkdownHtml(text: string): string;
readonly id: string;
readonly isPanel: boolean;
readonly questions: Array<QuestionBase>;
readonly elements: Array<IElement>;
containsElement(element: IElement): boolean;
hasErrors(fireCallback?: boolean, focuseOnFirstError?: boolean): boolean;
addQuestionsToList(list: Array<IQuestion>, visibleOnly?: boolean): void;
readonly rows: Array<QuestionRowModel>;
readonly isActive: boolean;
protected readonly root: PanelModelBase;
protected createRow(): QuestionRowModel;
onSurveyLoad(): void;
protected readonly isLoadingFromJson: boolean;
protected onRowsChanged(): void;
readonly processedTitle: string;
protected getRendredTitle(str: string): string;
visible: boolean;
protected onVisibleChanged(): void;
readonly isVisible: boolean;
getIsPageVisible(exceptionQuestion: IQuestion): boolean;
addElement(element: IElement, index?: number): void;
addQuestion(question: QuestionBase, index?: number): void;
addPanel(panel: PanelModel, index?: number): void;
addNewQuestion(questionType: string, name: string): QuestionBase;
addNewPanel(name: string): PanelModel;
protected createNewPanel(name: string): PanelModel;
removeElement(element: IElement): boolean;
removeQuestion(question: QuestionBase): void;
runCondition(values: HashTable<any>): void;
onLocaleChanged(): 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 {
name: string;
width: string;
renderWidthChangedCallback: () => void;
rowVisibilityChangedCallback: () => void;
startWithNewLineChangedCallback: () => void;
constructor(name?: string);
getType(): string;
setData(newValue: ISurveyData): void;
readonly isPanel: boolean;
innerIndent: number;
renderWidth: string;
startWithNewLine: boolean;
rightIndent: number;
protected onVisibleChanged(): void;
name: string;
width: string;
renderWidthChangedCallback: () => void;
rowVisibilityChangedCallback: () => void;
startWithNewLineChangedCallback: () => void;
constructor(name?: string);
getType(): string;
setData(newValue: ISurveyData): void;
readonly isPanel: boolean;
innerIndent: number;
renderWidth: string;
startWithNewLine: boolean;
rightIndent: number;
protected onVisibleChanged(): void;
}
/**
* The page object. It has elements collection, that contains questions and panels.
*/
export declare class PageModel extends PanelModelBase implements IPage {
name: string;
navigationButtonsVisibility: string;
constructor(name?: string);
getType(): string;
num: number;
navigationButtonsVisibility: string;
protected getRendredTitle(str: string): string;

@@ -1095,2 +1234,5 @@ focusFirstQuestion(): void;

/**
* Extends question base class with title, value, errors and other functionality
*/
export declare class Question extends QuestionBase implements IValidatorOwner {

@@ -1153,2 +1295,6 @@ name: string;

/**
* A base class for all questions. QuestionBase doesn't have information about title, values, errors and so on.
* Those properties are defined in the Question class.
*/
export declare class QuestionBase extends Base implements IQuestion, IConditionRunner, ILocalizableOwner {

@@ -1204,43 +1350,52 @@ name: string;

/**
* It is a base class for checkbox, dropdown and radiogroup questions.
*/
export declare class QuestionSelectBase extends Question {
protected cachedValue: any;
choicesByUrl: ChoicesRestfull;
storeOthersAsComment: boolean;
choicesChangedCallback: () => void;
constructor(name: string);
readonly otherItem: ItemValue;
readonly isOtherSelected: boolean;
protected getHasOther(val: any): boolean;
protected createRestfull(): ChoicesRestfull;
protected getComment(): string;
protected setComment(newValue: string): void;
protected setNewValue(newValue: any): void;
protected valueFromData(val: any): any;
protected valueToData(val: any): any;
protected valueFromDataCore(val: any): any;
protected valueToDataCore(val: any): any;
protected hasUnknownValue(val: any): boolean;
choices: Array<any>;
protected hasOtherChanged(): void;
choicesOrder: string;
otherText: string;
otherErrorText: string;
readonly locOtherText: LocalizableString;
readonly locOtherErrorText: LocalizableString;
readonly visibleChoices: Array<ItemValue>;
supportComment(): boolean;
supportOther(): boolean;
protected onCheckForErrors(errors: Array<SurveyError>): void;
onLocaleChanged(): void;
protected getStoreOthersAsComment(): boolean;
onSurveyLoad(): void;
clearUnusedValues(): void;
protected cachedValue: any;
choicesByUrl: ChoicesRestfull;
storeOthersAsComment: boolean;
choicesChangedCallback: () => void;
constructor(name: string);
readonly otherItem: ItemValue;
readonly isOtherSelected: boolean;
protected getHasOther(val: any): boolean;
protected createRestfull(): ChoicesRestfull;
protected getComment(): string;
protected setComment(newValue: string): void;
protected setNewValue(newValue: any): void;
protected valueFromData(val: any): any;
protected valueToData(val: any): any;
protected valueFromDataCore(val: any): any;
protected valueToDataCore(val: any): any;
protected hasUnknownValue(val: any): boolean;
choices: Array<any>;
protected hasOtherChanged(): void;
choicesOrder: string;
otherText: string;
otherErrorText: string;
readonly locOtherText: LocalizableString;
readonly locOtherErrorText: LocalizableString;
readonly visibleChoices: Array<ItemValue>;
supportComment(): boolean;
supportOther(): boolean;
protected onCheckForErrors(errors: Array<SurveyError>): void;
onLocaleChanged(): void;
protected getStoreOthersAsComment(): boolean;
onSurveyLoad(): void;
clearUnusedValues(): void;
}
/**
* A base class for checkbox and radiogroup questions. It introduced a colCount property.
*/
export declare class QuestionCheckboxBase extends QuestionSelectBase {
name: string;
colCountChangedCallback: () => void;
constructor(name: string);
colCount: number;
name: string;
colCountChangedCallback: () => void;
constructor(name: string);
colCount: number;
}
/**
* A Model for a checkbox question
*/
export declare class QuestionCheckboxModel extends QuestionCheckboxBase {

@@ -1256,2 +1411,5 @@ name: string;

/**
* A Model for a comment question
*/
export declare class QuestionCommentModel extends Question {

@@ -1268,2 +1426,5 @@ name: string;

/**
* A Model for a dropdown question
*/
export declare class QuestionDropdownModel extends QuestionSelectBase {

@@ -1297,2 +1458,5 @@ name: string;

/**
* A Model for a file question
*/
export declare class QuestionFileModel extends Question {

@@ -1314,2 +1478,5 @@ name: string;

/**
* A Model for html question. Unlike other questions it doesn't have value and title.
*/
export declare class QuestionHtmlModel extends QuestionBase {

@@ -1324,2 +1491,5 @@ name: string;

/**
* A Model for a radiogroup question.
*/
export declare class QuestionRadiogroupModel extends QuestionCheckboxBase {

@@ -1332,2 +1502,5 @@ name: string;

/**
* A Model for a rating question.
*/
export declare class QuestionRatingModel extends Question {

@@ -1350,8 +1523,11 @@ name: string;

/**
* A Model for an input text question.
*/
export declare class QuestionTextModel extends Question {
name: string;
size: number;
inputType: string;
constructor(name: string);
getType(): string;
inputType: string;
isEmpty(): boolean;

@@ -1366,206 +1542,232 @@ supportGoNextPageAutomatic(): boolean;

/**
* Survey object contains information about the survey. Pages, Questions, flow logic and etc.
*/
* Survey object contains information about the survey. Pages, Questions, flow logic and etc.
*/
export declare class SurveyModel extends Base implements ISurvey, ISurveyTriggerOwner, ILocalizableOwner {
surveyId: string;
surveyPostId: string;
clientId: string;
cookieName: string;
sendResultOnPageNext: boolean;
commentPrefix: string;
focusFirstQuestionAutomatic: boolean;
showNavigationButtons: boolean;
showTitle: boolean;
showPageTitles: boolean;
showCompletedPage: boolean;
requiredText: string;
questionStartIndex: string;
showProgressBar: string;
storeOthersAsComment: boolean;
goNextPageAutomatic: boolean;
pages: Array<PageModel>;
triggers: Array<SurveyTrigger>;
clearInvisibleValues: boolean;
onComplete: Event<(sender: SurveyModel) => any, any>;
onPartialSend: Event<(sender: SurveyModel) => any, any>;
onCurrentPageChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onValueChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onVisibleChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onPageVisibleChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onQuestionAdded: Event<(sender: SurveyModel, options: any) => any, any>;
onQuestionRemoved: Event<(sender: SurveyModel, options: any) => any, any>;
onPanelAdded: Event<(sender: SurveyModel, options: any) => any, any>;
onPanelRemoved: Event<(sender: SurveyModel, options: any) => any, any>;
onValidateQuestion: Event<(sender: SurveyModel, options: any) => any, any>;
onServerValidateQuestions: (sender: SurveyModel, options: any) => any;
onProcessHtml: Event<(sender: SurveyModel, options: any) => any, any>;
onTextMarkdown: Event<(sender: SurveyModel, options: any) => any, any>;
onSendResult: Event<(sender: SurveyModel, options: any) => any, any>;
onGetResult: Event<(sender: SurveyModel, options: any) => any, any>;
onUploadFile: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderSurvey: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderPage: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderQuestion: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderPanel: Event<(sender: SurveyModel, options: any) => any, any>;
jsonErrors: Array<JsonError>;
constructor(jsonObj?: any);
getType(): string;
locale: string;
getLocale(): string;
getMarkdownHtml(text: string): any;
getLocString(str: string): any;
readonly emptySurveyText: string;
title: string;
readonly locTitle: LocalizableString;
completedHtml: string;
readonly locCompletedHtml: LocalizableString;
pagePrevText: string;
readonly locPagePrevText: LocalizableString;
pageNextText: string;
readonly locPageNextText: LocalizableString;
completeText: string;
readonly locCompleteText: LocalizableString;
questionTitleTemplate: string;
getQuestionTitleTemplate(): string;
readonly locQuestionTitleTemplate: LocalizableString;
showPageNumbers: boolean;
showQuestionNumbers: string;
readonly processedTitle: string;
questionTitleLocation: string;
mode: string;
data: any;
protected _setDataValue(data: any, key: string): void;
readonly comments: any;
readonly visiblePages: Array<PageModel>;
readonly isEmpty: boolean;
readonly PageCount: number;
readonly visiblePageCount: number;
currentPage: PageModel;
currentPageNo: number;
focusFirstQuestion(): void;
readonly state: string;
clear(clearData?: boolean, gotoFirstPage?: boolean): void;
protected mergeValues(src: any, dest: any): void;
protected updateCustomWidgets(page: PageModel): void;
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
getProgress(): number;
readonly isNavigationButtonsShowing: boolean;
readonly isEditMode: boolean;
readonly isDisplayMode: boolean;
readonly isDesignMode: boolean;
setDesignMode(value: boolean): void;
readonly hasCookie: boolean;
setCookie(): void;
deleteCookie(): void;
nextPage(): boolean;
readonly isCurrentPageHasErrors: boolean;
prevPage(): boolean;
completeLastPage(): boolean;
readonly isFirstPage: boolean;
readonly isLastPage: boolean;
doComplete(): void;
readonly isValidatingOnServer: boolean;
protected onIsValidatingOnServerChanged(): void;
protected doServerValidation(): boolean;
protected doNextPage(): void;
protected setCompleted(): void;
readonly processedCompletedHtml: string;
readonly processedLoadingHtml: string;
readonly progressText: string;
protected afterRenderSurvey(htmlElement: any): void;
afterRenderPage(htmlElement: any): void;
afterRenderQuestion(question: IQuestion, htmlElement: any): void;
afterRenderPanel(panel: IElement, htmlElement: any): void;
uploadFile(name: string, file: File, storeDataAsText: boolean, uploadingCallback: (status: string) => any): boolean;
protected uploadFileCore(name: string, file: File, uploadingCallback: (status: string) => any): void;
getPage(index: number): PageModel;
addPage(page: PageModel): void;
addNewPage(name: string): PageModel;
removePage(page: PageModel): void;
getQuestionByName(name: string, caseInsensitive?: boolean): IQuestion;
getQuestionsByNames(names: string[], caseInsensitive?: boolean): IQuestion[];
getPageByElement(element: IElement): PageModel;
getPageByQuestion(question: IQuestion): PageModel;
getPageByName(name: string): PageModel;
getPagesByNames(names: string[]): PageModel[];
getAllQuestions(visibleOnly?: boolean): Array<IQuestion>;
protected createNewPage(name: string): PageModel;
protected doSurveyValueChanged(question: IQuestion, newValue: any): void;
sendResult(postId?: string, clientId?: string, isPartialCompleted?: boolean): void;
getResult(resultId: string, name: string): void;
loadSurveyFromService(surveyId?: string): void;
protected onLoadingSurveyFromService(): void;
protected onLoadSurveyFromService(): void;
readonly isLoadingFromJson: boolean;
protected onBeforeCreating(): void;
protected onCreating(): void;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
protected getUnbindValue(value: any): any;
getValue(name: string): any;
setValue(name: string, newValue: any): void;
protected tryGoNextPageAutomatic(name: string): void;
getComment(name: string): string;
setComment(name: string, newValue: string): void;
clearValue(name: string): void;
questionVisibilityChanged(question: IQuestion, newValue: boolean): void;
pageVisibilityChanged(page: IPage, newValue: boolean): void;
questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any): void;
questionRemoved(question: IQuestion): void;
panelAdded(panel: IElement, index: number, parentPanel: any, rootPanel: any): void;
panelRemoved(panel: IElement): void;
validateQuestion(name: string): SurveyError;
processHtml(html: string): string;
processText(text: string): string;
getObjects(pages: string[], questions: string[]): any[];
setTriggerValue(name: string, value: any, isVariable: boolean): void;
surveyId: string;
surveyPostId: string;
clientId: string;
cookieName: string;
sendResultOnPageNext: boolean;
commentPrefix: string;
focusFirstQuestionAutomatic: boolean;
showNavigationButtons: boolean;
showTitle: boolean;
showPageTitles: boolean;
showCompletedPage: boolean;
requiredText: string;
questionStartIndex: string;
storeOthersAsComment: boolean;
goNextPageAutomatic: boolean;
pages: Array<PageModel>;
triggers: Array<SurveyTrigger>;
clearInvisibleValues: boolean;
onComplete: Event<(sender: SurveyModel) => any, any>;
onPartialSend: Event<(sender: SurveyModel) => any, any>;
onCurrentPageChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onValueChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onVisibleChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onPageVisibleChanged: Event<(sender: SurveyModel, options: any) => any, any>;
onQuestionAdded: Event<(sender: SurveyModel, options: any) => any, any>;
onQuestionRemoved: Event<(sender: SurveyModel, options: any) => any, any>;
onPanelAdded: Event<(sender: SurveyModel, options: any) => any, any>;
onPanelRemoved: Event<(sender: SurveyModel, options: any) => any, any>;
onValidateQuestion: Event<(sender: SurveyModel, options: any) => any, any>;
onServerValidateQuestions: (sender: SurveyModel, options: any) => any;
onProcessHtml: Event<(sender: SurveyModel, options: any) => any, any>;
onTextMarkdown: Event<(sender: SurveyModel, options: any) => any, any>;
onSendResult: Event<(sender: SurveyModel, options: any) => any, any>;
onGetResult: Event<(sender: SurveyModel, options: any) => any, any>;
onUploadFile: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderSurvey: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderPage: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderQuestion: Event<(sender: SurveyModel, options: any) => any, any>;
onAfterRenderPanel: Event<(sender: SurveyModel, options: any) => any, any>;
jsonErrors: Array<JsonError>;
constructor(jsonObj?: any);
getType(): string;
locale: string;
getLocale(): string;
getMarkdownHtml(text: string): any;
getLocString(str: string): any;
readonly emptySurveyText: string;
title: string;
readonly locTitle: LocalizableString;
completedHtml: string;
readonly locCompletedHtml: LocalizableString;
pagePrevText: string;
readonly locPagePrevText: LocalizableString;
pageNextText: string;
readonly locPageNextText: LocalizableString;
completeText: string;
readonly locCompleteText: LocalizableString;
questionTitleTemplate: string;
getQuestionTitleTemplate(): string;
readonly locQuestionTitleTemplate: LocalizableString;
showPageNumbers: boolean;
showQuestionNumbers: string;
showProgressBar: string;
readonly processedTitle: string;
questionTitleLocation: string;
mode: string;
data: any;
protected _setDataValue(data: any, key: string): void;
readonly comments: any;
readonly visiblePages: Array<PageModel>;
readonly isEmpty: boolean;
/**
* depricated, misspelling, use pageCount property
*/
readonly PageCount: number;
readonly pageCount: number;
readonly visiblePageCount: number;
currentPage: PageModel;
currentPageNo: number;
focusFirstQuestion(): void;
readonly state: string;
clear(clearData?: boolean, gotoFirstPage?: boolean): void;
protected mergeValues(src: any, dest: any): void;
protected updateCustomWidgets(page: PageModel): void;
protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void;
getProgress(): number;
readonly isNavigationButtonsShowing: boolean;
readonly isEditMode: boolean;
readonly isDisplayMode: boolean;
readonly isDesignMode: boolean;
setDesignMode(value: boolean): void;
readonly hasCookie: boolean;
setCookie(): void;
deleteCookie(): void;
nextPage(): boolean;
readonly isCurrentPageHasErrors: boolean;
prevPage(): boolean;
completeLastPage(): boolean;
readonly isFirstPage: boolean;
readonly isLastPage: boolean;
doComplete(): void;
readonly isValidatingOnServer: boolean;
protected onIsValidatingOnServerChanged(): void;
protected doServerValidation(): boolean;
protected doNextPage(): void;
protected setCompleted(): void;
readonly processedCompletedHtml: string;
readonly processedLoadingHtml: string;
readonly progressText: string;
protected afterRenderSurvey(htmlElement: any): void;
afterRenderPage(htmlElement: any): void;
afterRenderQuestion(question: IQuestion, htmlElement: any): void;
afterRenderPanel(panel: IElement, htmlElement: any): void;
uploadFile(name: string, file: File, storeDataAsText: boolean, uploadingCallback: (status: string) => any): boolean;
protected uploadFileCore(name: string, file: File, uploadingCallback: (status: string) => any): void;
getPage(index: number): PageModel;
addPage(page: PageModel): void;
addNewPage(name: string): PageModel;
removePage(page: PageModel): void;
getQuestionByName(name: string, caseInsensitive?: boolean): IQuestion;
getQuestionsByNames(names: string[], caseInsensitive?: boolean): IQuestion[];
getPageByElement(element: IElement): PageModel;
getPageByQuestion(question: IQuestion): PageModel;
getPageByName(name: string): PageModel;
getPagesByNames(names: string[]): PageModel[];
getAllQuestions(visibleOnly?: boolean): Array<IQuestion>;
protected createNewPage(name: string): PageModel;
protected doSurveyValueChanged(question: IQuestion, newValue: any): void;
sendResult(postId?: string, clientId?: string, isPartialCompleted?: boolean): void;
getResult(resultId: string, name: string): void;
loadSurveyFromService(surveyId?: string): void;
protected onLoadingSurveyFromService(): void;
protected onLoadSurveyFromService(): void;
readonly isLoadingFromJson: boolean;
protected onBeforeCreating(): void;
protected onCreating(): void;
getVariable(name: string): any;
setVariable(name: string, newValue: any): void;
protected getUnbindValue(value: any): any;
getValue(name: string): any;
setValue(name: string, newValue: any): void;
protected tryGoNextPageAutomatic(name: string): void;
getComment(name: string): string;
setComment(name: string, newValue: string): void;
/**
* Remove the value from the survey result.
* @param {string} name The name of the value. Typically it is a question name
*/
clearValue(name: string): void;
questionVisibilityChanged(question: IQuestion, newValue: boolean): void;
pageVisibilityChanged(page: IPage, newValue: boolean): void;
questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any): void;
questionRemoved(question: IQuestion): void;
panelAdded(panel: IElement, index: number, parentPanel: any, rootPanel: any): void;
panelRemoved(panel: IElement): void;
validateQuestion(name: string): SurveyError;
processHtml(html: string): string;
processText(text: string): string;
getObjects(pages: string[], questions: string[]): any[];
setTriggerValue(name: string, value: any, isVariable: boolean): void;
}
/**
* A base class for all triggers.
* A trigger calls a method when the expression change the result: from false to true or from true to false.
* Please note, it runs only one changing the expression result.
*/
export declare class Trigger extends Base {
static operatorsValue: HashTable<Function>;
static readonly operators: HashTable<Function>;
value: any;
constructor();
operator: string;
check(value: any): void;
protected onSuccess(): void;
protected onFailure(): void;
static operatorsValue: HashTable<Function>;
static readonly operators: HashTable<Function>;
value: any;
constructor();
operator: string;
check(value: any): void;
protected onSuccess(): void;
protected onFailure(): void;
}
export interface ISurveyTriggerOwner {
getObjects(pages: string[], questions: string[]): any[];
doComplete(): any;
setTriggerValue(name: string, value: any, isVariable: boolean): any;
getObjects(pages: string[], questions: string[]): any[];
doComplete(): any;
setTriggerValue(name: string, value: any, isVariable: boolean): any;
}
/**
* It extends the Trigger base class and add properties required for SurveyJS classes.
*/
export declare class SurveyTrigger extends Trigger {
name: string;
protected owner: ISurveyTriggerOwner;
constructor();
setOwner(owner: ISurveyTriggerOwner): void;
readonly isOnNextPage: boolean;
name: string;
protected owner: ISurveyTriggerOwner;
constructor();
setOwner(owner: ISurveyTriggerOwner): void;
readonly isOnNextPage: boolean;
}
/**
* If expression returns true, it makes questions/pages visible.
* Ohterwise it makes them invisible.
*/
export declare class SurveyTriggerVisible extends SurveyTrigger {
pages: string[];
questions: string[];
constructor();
getType(): string;
protected onSuccess(): void;
protected onFailure(): void;
protected onItemSuccess(item: any): void;
protected onItemFailure(item: any): void;
pages: string[];
questions: string[];
constructor();
getType(): string;
protected onSuccess(): void;
protected onFailure(): void;
protected onItemSuccess(item: any): void;
protected onItemFailure(item: any): void;
}
/**
* If expression returns true, it completes the survey.
*/
export declare class SurveyTriggerComplete extends SurveyTrigger {
constructor();
getType(): string;
readonly isOnNextPage: boolean;
protected onSuccess(): void;
constructor();
getType(): string;
readonly isOnNextPage: boolean;
protected onSuccess(): void;
}
export declare class SurveyTriggerSetValue extends SurveyTrigger {
setToName: string;
setValue: any;
isVariable: boolean;
constructor();
getType(): string;
protected onSuccess(): void;
setToName: string;
setValue: any;
isVariable: boolean;
constructor();
getType(): string;
protected onSuccess(): void;
}
/**
* A Model for a survey running in the Window.
*/
export declare class SurveyWindowModel extends Base {

@@ -1602,2 +1804,5 @@ static surveyElementName: string;

/**
* The class contains methods to work with www.dxsurvey.com service.
*/
export declare class dxSurveyService {

@@ -1604,0 +1809,0 @@ static serviceUrl: string;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc