UNPKG

survey-angular

Version:

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

1,168 lines 1.26 MB
declare module "packages/survey-core/src/global_variables_utils" { export class DomWindowHelper { static isAvailable(): boolean; static isFileReaderAvailable(): boolean; static getLocation(): Location; static getVisualViewport(): VisualViewport | null; static getInnerWidth(): number; static getInnerHeight(): number; static getDevicePixelRatio(): number; static getWindow(): Window; static hasOwn(propertyName: string): boolean; static getSelection(): Selection | null; static requestAnimationFrame(callback: FrameRequestCallback): number; static addEventListener(type: string, listener: (e?: any) => void): void; static removeEventListener(type: string, listener: (e?: any) => void): void; static matchMedia(mediaQueryString: string): { matches: boolean; } | null; } export class DomDocumentHelper { static isAvailable(): boolean; static getBody(): HTMLElement; static getDocumentElement(): HTMLElement; static getDocument(): Document; static getCookie(): string; static setCookie(newCookie: string): void; static activeElementBlur(): Document; static createElement(tagName: string): HTMLElement; static getComputedStyle(elt: Element): CSSStyleDeclaration; static addEventListener(type: string, listener: (e?: any) => void): void; static removeEventListener(type: string, listener: (e?: any) => void): void; } } declare module "packages/survey-core/src/helpers" { export interface HashTable<T = any> { [key: string]: T; } export interface IEqualValuesParameters { ignoreOrder?: boolean; caseSensitive?: boolean; trimStrings?: boolean; doNotConvertNumbers?: boolean; } export function createDate(reason: string, val?: number | string | Date): Date; export class Helpers { /** * A static methods that returns true if a value undefined, null, empty string or empty array. * @param value */ static isValueEmpty(value: any): boolean; static isValueUndefined(value: any): boolean; static isArrayContainsEqual(x: any, y: any): boolean; static checkIfArraysEqual(x: any, y: any, params: IEqualValuesParameters): boolean; static isArraysEqual(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean; static compareStrings(x: string, y: string): number; static checkIfValuesEqual(x: any, y: any, params: IEqualValuesParameters): boolean; static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean; static randomizeArray<T>(array: Array<T>): Array<T>; static getUnbindValue(value: any): any; static createCopy(obj: any): any; static createCopyWithPrefix(obj: any, prefix?: string): any; static isConvertibleToNumber(value: any): boolean; static isValueObject(val: any, excludeArray?: boolean): boolean; static isNumber(value: any): boolean; static getNumber(value: any): number; private static getNumberCore; private static isStringHasOperator; private static prepareStringToNumber; static getMaxLength(maxLength: number, surveyLength: number): any; static getRemainingCharacterCounterText(newValue: string | undefined, maxLength: number | null): string; static getNumberByIndex(index: number, startIndexStr: string, parentIndex?: number): string; static isCharNotLetterAndDigit(ch: string): boolean; static isCharDigit(ch: string): boolean; static isDigitsOnly(str: string): boolean; private static getNumberFromStr; private static countDecimals; static correctAfterPlusMinis(a: number, b: number, res: number): number; static sumAnyValues(a: any, b: any): any; static correctAfterMultiple(a: number, b: number, res: number): number; static convertArrayValueToObject(src: Array<any>, propName: string, dest?: Array<any>): Array<any>; private static findObjByPropValue; static convertArrayObjectToValue(src: Array<any>, propName: string): Array<any>; static convertDateToString(date: Date): string; static convertDateTimeToString(date: Date): string; static convertValToQuestionVal(val: any, inputType?: string): any; static compareVerions(ver1: string, ver2: string): number; static isUrlYoutubeVideo(url: string): boolean; } } declare module "packages/survey-core/src/localization/english" { export var englishStrings: { pagePrevText: string; pageNextText: string; completeText: string; previewText: string; editText: string; startSurveyText: string; otherItemText: string; noneItemText: string; refuseItemText: string; dontKnowItemText: string; selectAllItemText: string; deselectAllItemText: string; progressText: string; indexText: string; panelDynamicProgressText: string; panelDynamicTabTextFormat: string; questionsProgressText: string; emptySurvey: string; completingSurvey: string; completingSurveyBefore: string; loadingSurvey: string; placeholder: string; ratingOptionsCaption: string; value: string; requiredError: string; requiredErrorInPanel: string; requiredInAllRowsError: string; eachRowUniqueError: string; numericError: string; minError: string; maxError: string; textNoDigitsAllow: string; textMinLength: string; textMaxLength: string; textMinMaxLength: string; minRowCountError: string; minSelectError: string; maxSelectError: string; numericMinMax: string; numericMin: string; numericMax: string; invalidEmail: string; invalidExpression: string; urlRequestError: string; urlGetChoicesError: string; exceedMaxSize: string; noUploadFilesHandler: string; otherRequiredError: string; uploadingFile: string; loadingFile: string; chooseFile: string; noFileChosen: string; filePlaceholder: string; confirmDelete: string; keyDuplicationError: string; addColumn: string; addRow: string; removeRow: string; emptyRowsText: string; addPanel: string; removePanel: string; showDetails: string; hideDetails: string; choices_Item: string; matrix_column: string; matrix_row: string; multipletext_itemname: string; savingData: string; savingDataError: string; savingDataSuccess: string; savingExceedSize: string; saveAgainButton: string; timerMin: string; timerSec: string; timerSpentAll: string; timerSpentPage: string; timerSpentSurvey: string; timerLimitAll: string; timerLimitPage: string; timerLimitSurvey: string; clearCaption: string; signaturePlaceHolder: string; signaturePlaceHolderReadOnly: string; chooseFileCaption: string; takePhotoCaption: string; photoPlaceholder: string; fileOrPhotoPlaceholder: string; replaceFileCaption: string; removeFileCaption: string; booleanCheckedLabel: string; booleanUncheckedLabel: string; confirmRemoveFile: string; confirmRemoveAllFiles: string; questionTitlePatternText: string; modalCancelButtonText: string; modalApplyButtonText: string; filterStringPlaceholder: string; emptyMessage: string; noEntriesText: string; noEntriesReadonlyText: string; tabTitlePlaceholder: string; more: string; tagboxDoneButtonCaption: string; selectToRankEmptyRankedAreaText: string; selectToRankEmptyUnrankedAreaText: string; ok: string; cancel: string; }; } declare module "packages/survey-core/src/surveyStrings" { export var surveyLocalization: { currentLocaleValue: string; defaultLocaleValue: string; locales: { [index: string]: any; }; localeNames: { [index: string]: any; }; localeNamesInEnglish: { [index: string]: any; }; localeDirections: { [index: string]: any; }; supportedLocales: any[]; useEnglishNames: boolean; showNamesInEnglish: boolean; setupLocale(localeConfig: { localeCode: string; strings: any; nativeName: string; englishName: string; rtl?: boolean; }): void; currentLocale: string; defaultLocale: string; getCorrectLocaleName(loc: string): string; getLocaleStrings(loc: string): any; getString: (strName: string, locale?: string) => any; getLocaleName(loc: string, inEnglish?: boolean): string; getLocales: (removeDefaultLoc?: boolean) => Array<string>; onGetExternalString: (name: string, locale: string) => string; }; export function getLocaleString(strName: string, locale?: string): string; export function getLocaleStrings(locale: string): any; export function setupLocale(localeConfig: { localeCode: string; strings: any; nativeName: string; englishName: string; rtl?: boolean; }): void; export var surveyStrings: { pagePrevText: string; pageNextText: string; completeText: string; previewText: string; editText: string; startSurveyText: string; otherItemText: string; noneItemText: string; refuseItemText: string; dontKnowItemText: string; selectAllItemText: string; deselectAllItemText: string; progressText: string; indexText: string; panelDynamicProgressText: string; panelDynamicTabTextFormat: string; questionsProgressText: string; emptySurvey: string; completingSurvey: string; completingSurveyBefore: string; loadingSurvey: string; placeholder: string; ratingOptionsCaption: string; value: string; requiredError: string; requiredErrorInPanel: string; requiredInAllRowsError: string; eachRowUniqueError: string; numericError: string; minError: string; maxError: string; textNoDigitsAllow: string; textMinLength: string; textMaxLength: string; textMinMaxLength: string; minRowCountError: string; minSelectError: string; maxSelectError: string; numericMinMax: string; numericMin: string; numericMax: string; invalidEmail: string; invalidExpression: string; urlRequestError: string; urlGetChoicesError: string; exceedMaxSize: string; noUploadFilesHandler: string; otherRequiredError: string; uploadingFile: string; loadingFile: string; chooseFile: string; noFileChosen: string; filePlaceholder: string; confirmDelete: string; keyDuplicationError: string; addColumn: string; addRow: string; removeRow: string; emptyRowsText: string; addPanel: string; removePanel: string; showDetails: string; hideDetails: string; choices_Item: string; matrix_column: string; matrix_row: string; multipletext_itemname: string; savingData: string; savingDataError: string; savingDataSuccess: string; savingExceedSize: string; saveAgainButton: string; timerMin: string; timerSec: string; timerSpentAll: string; timerSpentPage: string; timerSpentSurvey: string; timerLimitAll: string; timerLimitPage: string; timerLimitSurvey: string; clearCaption: string; signaturePlaceHolder: string; signaturePlaceHolderReadOnly: string; chooseFileCaption: string; takePhotoCaption: string; photoPlaceholder: string; fileOrPhotoPlaceholder: string; replaceFileCaption: string; removeFileCaption: string; booleanCheckedLabel: string; booleanUncheckedLabel: string; confirmRemoveFile: string; confirmRemoveAllFiles: string; questionTitlePatternText: string; modalCancelButtonText: string; modalApplyButtonText: string; filterStringPlaceholder: string; emptyMessage: string; noEntriesText: string; noEntriesReadonlyText: string; tabTitlePlaceholder: string; more: string; tagboxDoneButtonCaption: string; selectToRankEmptyRankedAreaText: string; selectToRankEmptyUnrankedAreaText: string; ok: string; cancel: string; }; } declare module "packages/survey-core/src/conditionProcessValue" { import { HashTable } from "packages/survey-core/src/helpers"; export class ProcessValue { values: HashTable<any>; properties: HashTable<any>; asyncValues: HashTable<any>; onCompleteAsyncFunc: (op: any) => void; constructor(); getFirstName(text: string, obj?: any): string; hasValue(text: string, values?: HashTable<any>): boolean; getValue(text: string, values?: HashTable<any>): any; setValue(obj: any, text: string, value: any): void; getValueInfo(valueInfo: any): void; isAnyKeyChanged(keys: any, usedNames: string[]): boolean; private getValueFromPath; private getValueCore; private getQuestionDirectly; private getValueFromSurvey; private getValueFromValues; private getNonNestedObject; private getObjInArray; private getFirstPropertyName; private getObjectValue; private getIntValue; } } declare module "packages/survey-core/src/console-warnings" { export class ConsoleWarnings { static disposedObjectChangedProperty(propName: string, objType: string): void; static inCorrectQuestionValue(questionName: string, val: any): void; static warn(text: string): void; static error(text: string): void; } } declare module "packages/survey-core/src/functionsfactory" { import { HashTable } from "packages/survey-core/src/helpers"; export class FunctionFactory { static Instance: FunctionFactory; private functionHash; private isAsyncHash; register(name: string, func: (params: any[], originalParams?: any[]) => any, isAsync?: boolean): void; unregister(name: string): void; hasFunction(name: string): boolean; isAsyncFunction(name: string): boolean; clear(): void; getAll(): Array<string>; run(name: string, params: any[], properties: HashTable<any>, originalParams: any[]): any; } export var registerFunction: (name: string, func: (params: any[], originalParams?: any[]) => any, isAsync?: boolean) => void; } declare module "packages/survey-core/src/expressions/expressions" { import { HashTable } from "packages/survey-core/src/helpers"; import { ProcessValue } from "packages/survey-core/src/conditionProcessValue"; export interface AsyncFunctionItem { operand?: FunctionOperand; parent?: AsyncFunctionItem; children?: Array<AsyncFunctionItem>; } export abstract class Operand { private static counter; private _id; readonly id: number; toString(func?: (op: Operand) => string): string; abstract getType(): string; abstract evaluate(processValue?: ProcessValue): any; abstract setVariables(variables: Array<string>): any; hasFunction(): boolean; hasAsyncFunction(): boolean; addToAsyncList(list: Array<AsyncFunctionItem>): void; addOperandsToList(list: Array<Operand>): void; isEqual(op: Operand): boolean; protected abstract isContentEqual(op: Operand): boolean; protected areOperatorsEquals(op1: Operand, op2: Operand): boolean; protected addChildrenToList(list: Array<Operand>): void; } export class BinaryOperand extends Operand { private operatorName; private left; private right; private consumer; private isArithmeticValue; constructor(operatorName: string, left?: any, right?: any, isArithmeticOp?: boolean); private readonly requireStrictCompare: any; private getIsOperandRequireStrict; getType(): string; readonly isArithmetic: boolean; readonly isConjunction: boolean; readonly conjunction: string; readonly operator: string; readonly leftOperand: any; readonly rightOperand: any; protected isContentEqual(op: Operand): boolean; private evaluateParam; evaluate(processValue?: ProcessValue): any; toString(func?: (op: Operand) => string): string; setVariables(variables: Array<string>): void; hasFunction(): boolean; protected addChildrenToList(list: Array<Operand>): void; hasAsyncFunction(): boolean; addToAsyncList(list: Array<AsyncFunctionItem>): void; } export class UnaryOperand extends Operand { private expressionValue; private operatorName; private consumer; constructor(expressionValue: Operand, operatorName: string); readonly operator: string; readonly expression: Operand; getType(): string; toString(func?: (op: Operand) => string): string; private readonly isRigtOperator: any; protected isContentEqual(op: Operand): boolean; hasFunction(): boolean; protected addChildrenToList(list: Array<Operand>): void; hasAsyncFunction(): boolean; addToAsyncList(list: Array<AsyncFunctionItem>): void; evaluate(processValue?: ProcessValue): boolean; setVariables(variables: Array<string>): void; } export class ArrayOperand extends Operand { values: Array<Operand>; constructor(values: Array<Operand>); getType(): string; toString(func?: (op: Operand) => string): string; evaluate(processValue?: ProcessValue): Array<any>; setVariables(variables: Array<string>): void; hasFunction(): boolean; protected addChildrenToList(list: Array<Operand>): void; hasAsyncFunction(): boolean; addToAsyncList(list: Array<AsyncFunctionItem>): void; protected isContentEqual(op: Operand): boolean; } export class Const extends Operand { private value; constructor(value: any); getType(): string; toString(func?: (op: Operand) => string): string; readonly correctValue: any; readonly requireStrictCompare: boolean; evaluate(): any; setVariables(variables: Array<string>): void; protected getCorrectValue(value: any): any; protected isContentEqual(op: Operand): boolean; private isQuote; } export class Variable extends Const { private variableName; static DisableConversionChar: string; private valueInfo; private useValueAsItIs; constructor(variableName: string); readonly requireStrictCompare: boolean; getType(): string; toString(func?: (op: Operand) => string): string; readonly variable: string; evaluate(processValue?: ProcessValue): any; setVariables(variables: Array<string>): void; protected getCorrectValue(value: any): any; protected isContentEqual(op: Operand): boolean; } export class FunctionOperand extends Operand { private originalValue; private parameters; constructor(originalValue: string, parameters: ArrayOperand); getType(): string; evaluate(processValue?: ProcessValue): any; private evaluateCore; toString(func?: (op: Operand) => string): string; setVariables(variables: Array<string>): void; isReady(proccessValue: ProcessValue): boolean; private getAsynValue; hasFunction(): boolean; protected addChildrenToList(list: Array<Operand>): void; hasAsyncFunction(): boolean; private isAsyncFunction; addToAsyncList(list: Array<AsyncFunctionItem>): void; protected isContentEqual(op: Operand): boolean; } export class OperandMaker { static throwInvalidOperatorError(op: string): void; static safeToString(operand: Operand, func: (op: Operand) => string): string; static toOperandString(value: string): string; static isBooleanValue(value: string): boolean; static countDecimals(value: number): number; static plusMinus(a: number, b: number, res: number): number; static unaryFunctions: HashTable<Function>; static binaryFunctions: HashTable<Function>; static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean): boolean; static operatorToString(operatorName: string): string; static convertValForDateCompare(val: any, second: any): any; static signs: HashTable<string>; } } declare module "packages/survey-core/src/expressions/expressionParser" { export interface IFilePosition { offset: number; line: number; column: number; } export interface IFileRange { start: IFilePosition; end: IFilePosition; } export interface ILiteralExpectation { type: "literal"; text: string; ignoreCase: boolean; } export interface IClassParts extends Array<string | IClassParts> { } export interface IClassExpectation { type: "class"; parts: IClassParts; inverted: boolean; ignoreCase: boolean; } export interface IAnyExpectation { type: "any"; } export interface IEndExpectation { type: "end"; } export interface IOtherExpectation { type: "other"; description: string; } export type Expectation = ILiteralExpectation | IClassExpectation | IAnyExpectation | IEndExpectation | IOtherExpectation; export class SyntaxError extends Error { static buildMessage(expected: Expectation[], found: string | null): string; message: string; expected: Expectation[]; found: string | null; location: IFileRange; name: string; constructor(message: string, expected: Expectation[], found: string | null, location: IFileRange); } export interface ICached { nextPos: number; result: any; } export interface IParseOptions { filename?: string; startRule?: string; tracer?: any; [key: string]: any; } export type ParseFunction = (input: string, options?: IParseOptions) => any; export const parse: ParseFunction; } declare module "packages/survey-core/src/conditionsParser" { import { Operand } from "packages/survey-core/src/expressions/expressions"; export class ConditionsParserError { at: number; code: string; constructor(at: number, code: string); } export class ConditionsParser { private conditionError; private patchExpression; createCondition(text: string): Operand; parseExpression(text: string): Operand; readonly error: ConditionsParserError; } } declare module "packages/survey-core/src/conditions" { import { HashTable } from "packages/survey-core/src/helpers"; import { Operand } from "packages/survey-core/src/expressions/expressions"; /** * Base interface for expression execution */ export interface IExpresionExecutor { /** * This call back runs on executing expression if there is at least one async function */ onComplete: (res: any, id: number) => void; /** * The expression as string, property with get */ expression: string; /** * Returns true if the expression is valid and can be executed */ canRun(): boolean; /** * Run the expression. Returns the result of execution. * The result can be undefined if there is an asyn function. In this case result will be returned onComplete callback. * @param values has with values names and their results. Normally it is question names and their values * @param properties the list of properties that are available in functions. Commonly it is survey and question, if expression execuited in a question context */ run(values: HashTable<any>, properties: HashTable<any>, id: number): any; /** * Returns the list of variables that used in the expression. They defined as: {variableName} in default parser. */ getVariables(): Array<string>; /** * Returns true if there is a function in the expression */ hasFunction(): boolean; /** * Returns true if there is an async function in the expression */ isAsync: boolean; } export class ExpressionExecutorRunner { private operand; private id; private onComplete; private processValue; private asyncFuncList; constructor(operand: Operand, id: number, onComplete: (res: any, id: number) => void, values: HashTable<any>, properties: HashTable<any>); run(isAsync: boolean): any; private getAsyncItemByOperand; private runAsyncItem; private runAsyncItemCore; private doAsyncFunctionReady; private isAsyncFuncReady; private isAsyncChildrenReady; private runValues; } export class ExpressionExecutor implements IExpresionExecutor { static createExpressionExecutor: (expression: string) => IExpresionExecutor; onComplete: (res: any, id: number) => void; private expressionValue; private operand; private parser; private isAsyncValue; private hasFunctionValue; constructor(expression: string); readonly expression: string; private setExpression; getVariables(): Array<string>; hasFunction(): boolean; readonly isAsync: boolean; canRun(): boolean; run(values: HashTable<any>, properties: HashTable<any>, id: number): any; } export class ExpressionRunnerBase { private expressionExecutor; private variables; private containsFunc; private static IdRunnerCounter; onBeforeAsyncRun: (id: number) => void; onAfterAsyncRun: (id: number) => void; constructor(expression: string); expression: string; getVariables(): Array<string>; hasFunction(): boolean; readonly isAsync: boolean; canRun(): boolean; protected runCore(values: HashTable<any>, properties?: HashTable<any>): any; protected doOnComplete(res: any, id: number): void; } export class ConditionRunner extends ExpressionRunnerBase { onRunComplete: (result: boolean) => void; run(values: HashTable<any>, properties?: HashTable<any>): boolean; protected doOnComplete(res: any, id: number): void; } export class ExpressionRunner extends ExpressionRunnerBase { onRunComplete: (result: any) => void; run(values: HashTable<any>, properties?: HashTable<any>): any; protected doOnComplete(res: any, id: number): void; } } declare module "packages/survey-core/src/utils/cssClassBuilder" { export class CssClassBuilder { private classes; isEmpty(): boolean; append(value: string, condition?: boolean): CssClassBuilder; toString(): string; } } declare module "packages/survey-core/src/utils/taskmanager" { export interface IExecutable { id?: string; execute: () => void; isCompleted: boolean; dispose?: () => void; } export class Task implements IExecutable { private func; private isMultiple; private _isCompleted; constructor(func: () => void, isMultiple?: boolean); execute: () => void; discard(): void; readonly isCompleted: boolean; } export class TaskManger { private interval; private static instance; private static tasks; private constructor(); static Instance(): TaskManger; private tick; static schedule(task: IExecutable): void; } export function debounce<T extends (...args: any) => void>(func: T): { run: T; cancel: () => void; }; } declare module "packages/survey-core/src/utils/animation" { import { EventBase, Base } from "packages/survey-core/src/base"; export interface AnimationOptions { cssClass: string; onBeforeRunAnimation?: (element: HTMLElement) => void; onAfterRunAnimation?: (element: HTMLElement) => void; } export interface IAnimationConsumer<T extends Array<any> = [ ]> { getLeaveOptions?(...args: T): AnimationOptions; getEnterOptions?(...args: T): AnimationOptions; getAnimatedElement(...args: T): HTMLElement; isAnimationEnabled(): boolean; getRerenderEvent(): EventBase<Base>; } interface IGroupAnimationInfo { isReorderingRunning: boolean; isDeletingRunning: boolean; isAddingRunning: boolean; } interface IGroupAnimationCompareInfo<T> { addedItems: Array<T>; deletedItems: Array<T>; reorderedItems: Array<{ item: T; movedForward: boolean; }>; mergedItems: Array<T>; } export interface IAnimationGroupConsumer<T> extends IAnimationConsumer<[ T ]> { getLeaveOptions?(item: T, info?: IGroupAnimationInfo): AnimationOptions; getEnterOptions?(item: T, info?: IGroupAnimationInfo): AnimationOptions; getReorderOptions?(item: T, movedForward: boolean, info?: IGroupAnimationInfo): AnimationOptions; getKey?: (item: T) => any; onCompareArrays?(options: IGroupAnimationCompareInfo<T>): void; allowSyncRemovalAddition?: boolean; } export class AnimationUtils { private getMsFromRule; private reflow; private getAnimationsCount; private getAnimationDuration; private cancelQueue; private addCancelCallback; private removeCancelCallback; protected onAnimationEnd(element: HTMLElement, callback: (isCancel?: boolean) => void, options: AnimationOptions): void; protected afterAnimationRun(element: HTMLElement, options: AnimationOptions | AnimationOptions): void; protected beforeAnimationRun(element: HTMLElement, options: AnimationOptions | AnimationOptions): void; private getCssClasses; protected runAnimation(element: HTMLElement, options: AnimationOptions, callback: (isCancel?: boolean) => void): void; protected clearHtmlElement(element: HTMLElement, options: AnimationOptions): void; protected onNextRender(callback: (isCancel?: boolean) => void, isCancel?: boolean): void; cancel(): void; } export class AnimationPropertyUtils extends AnimationUtils { onEnter(options: IAnimationConsumer): void; onLeave(options: IAnimationConsumer, callback: () => void): void; } export class AnimationGroupUtils<T> extends AnimationUtils { runGroupAnimation(options: IAnimationGroupConsumer<T>, addedItems: Array<T>, removedItems: Array<T>, reorderedItems: Array<{ item: T; movedForward: boolean; }>, callback?: () => void): void; } export abstract class AnimationProperty<T, S extends IAnimationConsumer<any> = IAnimationConsumer> { protected animationOptions: S; protected update: (val: T, isTempUpdate?: boolean) => void; protected getCurrentValue: () => T; constructor(animationOptions: S, update: (val: T, isTempUpdate?: boolean) => void, getCurrentValue: () => T); protected animation: AnimationUtils; protected onNextRender(callback: () => void, onCancel?: () => void): void; protected abstract _sync(newValue: T): void; private _debouncedSync; sync(newValue: T): void; private cancelCallback; cancel(): void; cancelAnimations(): void; } export class AnimationBoolean extends AnimationProperty<boolean> { protected animation: AnimationPropertyUtils; protected _sync(newValue: boolean): void; } export class AnimationGroup<T> extends AnimationProperty<Array<T>, IAnimationGroupConsumer<T>> { protected animation: AnimationGroupUtils<T>; protected _sync(newValue: Array<T>): void; } export class AnimationTab<T> extends AnimationProperty<Array<T>, IAnimationGroupConsumer<T>> { protected mergeValues?: (newValue: Array<T>, oldValue: Array<T>) => Array<T>; protected animation: AnimationGroupUtils<T>; constructor(animationOptions: IAnimationGroupConsumer<T>, update: (val: Array<T>, isTempUpdate?: boolean) => void, getCurrentValue: () => Array<T>, mergeValues?: (newValue: Array<T>, oldValue: Array<T>) => Array<T>); protected _sync(newValue: [ T ]): void; } } declare module "packages/survey-core/src/popup-view-model" { import { Base, EventBase } from "packages/survey-core/src/base"; import { PopupModel } from "packages/survey-core/src/popup"; import { CssClassBuilder } from "packages/survey-core/src/utils/cssClassBuilder"; import { ActionContainer } from "packages/survey-core/src/actions/container"; import { AnimationOptions, IAnimationConsumer } from "packages/survey-core/src/utils/animation"; export const FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])"; export class PopupBaseViewModel extends Base implements IAnimationConsumer { protected popupSelector: string; protected fixedPopupContainer: string; protected containerSelector: string; protected scrollingContentSelector: string; protected prevActiveElement: HTMLElement; protected footerToolbarValue: ActionContainer; top: string; left: string; height: string; width: string; minWidth: string; _isVisible: boolean; locale: string; private updateIsVisible; private updateBeforeShowing; private updateAfterHiding; private visibilityAnimation; getLeaveOptions(): AnimationOptions; getEnterOptions(): AnimationOptions; getAnimatedElement(): HTMLElement; isAnimationEnabled(): boolean; getRerenderEvent(): EventBase<Base>; private getAnimationContainer; isVisible: boolean; onVisibilityChanged: EventBase<PopupBaseViewModel, any>; readonly container: HTMLElement; private containerElement; private createdContainer; getLocale(): string; protected hidePopup(): void; protected getStyleClass(): CssClassBuilder; protected getShowFooter(): boolean; protected getShowHeader(): boolean; protected getPopupHeaderTemplate(): string; protected createFooterActionBar(): void; protected resetDimensionsAndPositionStyleProperties(): void; protected onModelChanging(newModel: PopupModel): void; private onModelIsVisibleChangedCallback; private setupModel; private _model; model: PopupModel; constructor(model: PopupModel); readonly title: string; readonly contentComponentName: string; readonly contentComponentData: any; readonly isModal: boolean; readonly isFocusedContent: boolean; readonly isFocusedContainer: boolean; readonly showFooter: boolean; readonly showHeader: boolean; readonly popupHeaderTemplate: string; readonly isOverlay: boolean; readonly styleClass: string; readonly cancelButtonText: string; readonly footerToolbar: ActionContainer; onKeyDown(event: any): void; private trapFocus; switchFocus(): void; protected _isPositionSetValue: boolean; readonly isPositionSet: boolean; updateOnShowing(): void; updateOnHiding(): void; private focusContainer; private focusFirstInput; clickOutside(event?: Event): void; cancel(): void; dispose(): void; initializePopupContainer(): void; setComponentElement(componentRoot: HTMLElement): void; resetComponentElement(): void; protected preventScrollOuside(event: any, deltaY: number): void; } } declare module "packages/survey-core/src/utils/utils" { import { PopupBaseViewModel } from "packages/survey-core/src/popup-view-model"; function compareVersions(a: any, b: any): number; function confirmAction(message: string): boolean; function confirmActionAsync(options: IConfirmDialogOptions): void; function detectIEBrowser(): boolean; function detectIEOrEdge(): boolean; function loadFileFromBase64(b64Data: string, fileName: string): void; function isMobile(): boolean; const isShadowDOM: (rootElement: Document | ShadowRoot | HTMLElement) => rootElement is ShadowRoot; const getElement: (element: HTMLElement | string) => HTMLElement; function isElementVisible(element: HTMLElement, threshold?: number): boolean; function findScrollableParent(element: HTMLElement): HTMLElement; function activateLazyRenderingChecks(id: string): void; function navigateToUrl(url: string): void; function wrapUrlForBackgroundImage(url: string): string; function isBase64URL(url: string): boolean; const renamedIcons: any; function getIconNameFromProxy(iconName: string): string; export function getNewIconName(iconName: string): string; export function getCustomNewIconNameIfExists(iconName: string): string; function createSvg(size: number | string, width: number, height: number, iconName: string, svgElem: any, title: string): void; export function getSafeUrl(url: string): string; export function unwrap<T>(value: T | (() => T)): T; export function getRenderedSize(val: string | number): number; export function getRenderedStyleSize(val: string | number): string; export interface IAttachKey2clickOptions { processEsc?: boolean; disableTabStop?: boolean; __keyDownReceived?: boolean; } export function doKey2ClickBlur(evt: KeyboardEvent): void; export function doKey2ClickUp(evt: KeyboardEvent, options?: IAttachKey2clickOptions): void; export function doKey2ClickDown(evt: KeyboardEvent, options?: IAttachKey2clickOptions): void; function increaseHeightByContent(element: HTMLElement, getComputedStyle?: (elt: Element) => any): void; function getOriginalEvent(event: any): any; function preventDefaults(event: any): void; function classesToSelector(str: string): string; function getElementWidth(el: HTMLElement): number; function isContainerVisible(el: HTMLElement): boolean; function getFirstVisibleChild(el: HTMLElement): any; function findParentByClassNames(element: HTMLElement, classNames: Array<string>): Element; export function sanitizeEditableContent(element: any, cleanLineBreaks?: boolean): void; function mergeValues(src: any, dest: any): void; function updateListCssValues(res: any, css: any): void; export class Logger { private _result; log(action: string): void; readonly result: string; } export interface IConfirmDialogOptions { message?: string; funcOnYes?: () => void; funcOnNo?: () => void; applyTitle?: string; locale?: string; rootElement?: HTMLElement; cssClass?: string; } export function showConfirmDialog(message: string, callback: (res: boolean) => void, options?: IConfirmDialogOptions): boolean; export function configConfirmDialog(popupViewModel: PopupBaseViewModel): void; function chooseFiles(input: HTMLInputElement, callback: (files: File[]) => void): void; export function compareArrays<T>(oldValue: Array<T>, newValue: Array<T>, getKey: (item: T) => any): { addedItems: Array<T>; deletedItems: Array<T>; reorderedItems: Array<{ item: T; movedForward: boolean; }>; mergedItems: Array<T>; }; interface IVerticalDimensions { paddingTop: string; paddingBottom: string; marginTop: string; marginBottom: string; heightTo: string; borderTopWidth: string; borderBottomWidth: string; heightFrom: string; } export function getVerticalDimensions(el: HTMLElement): IVerticalDimensions; export function setPropertiesOnElementForAnimation(el: HTMLElement, styles: any, prefix?: string): void; export function prepareElementForVerticalAnimation(el: HTMLElement): void; export function cleanHtmlElementAfterAnimation(el: HTMLElement): void; export function floorTo2Decimals(number: number): number; export { mergeValues, updateListCssValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, activateLazyRenderingChecks, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles, isBase64URL, renamedIcons }; } declare module "packages/survey-core/src/actions/container" { import { Base } from "packages/survey-core/src/base"; import { IAction, Action, BaseAction } from "packages/survey-core/src/actions/action"; import { ILocalizableOwner, LocalizableString } from "packages/survey-core/src/localizablestring"; export let defaultActionBarCss: { root: string; defaultSizeMode: string; smallSizeMode: string; item: string; itemWithTitle: string; itemAsIcon: string; itemActive: string; itemPressed: string; itemIcon: string; itemTitle: string; itemTitleWithIcon: string; }; export class ActionContainer<T extends BaseAction = Action> extends Base implements ILocalizableOwner { getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; getLocale(): string; actions: Array<T>; private cssClassesValue; protected getRenderedActions(): Array<T>; updateCallback: (isResetInitialized: boolean) => void; containerCss: string; sizeMode: "default" | "small"; locOwner: ILocalizableOwner; isEmpty: boolean; locStrsChanged(): void; protected raiseUpdate(isResetInitialized: boolean): void; protected onSet(): void; protected onPush(item: T): void; protected onRemove(item: T): void; private setActionCssClasses; readonly hasActions: boolean; readonly renderedActions: Array<T>; readonly visibleActions: Array<T>; getRootCss(): string; protected getDefaultCssClasses(): any; cssClasses: any; private createAction; addAction(val: IAction, sortByVisibleIndex?: boolean): T; setItems(items: Array<IAction>, sortByVisibleIndex?: boolean): void; private sortItems; private hasSetVisibleIndex; private compareByVisibleIndex; private isActionVisible; subItemsShowDelay: number; subItemsHideDelay: number; protected popupAfterShowCallback(itemValue: T): void; mouseOverHandler(itemValue: T): void; initResponsivityManager(container: HTMLDivElement, delayedUpdateFunction?: (callback: () => void) => void): void; resetResponsivityManager(): void; getActionById(id: string): T; dispose(): void; } } declare module "packages/survey-core/src/element-helper" { export class ElementHelper { static focusElement(element: Element): void; static visibility(node: Element): boolean; static getNextElementPreorder(element: Element): Element; static getNextElementPostorder(element: Element): Element; static hasHorizontalScroller(element: HTMLElement): boolean; static hasVerticalScroller(element: HTMLElement): boolean; } } declare module "packages/survey-core/src/list" { import { ActionContainer } from "packages/survey-core/src/actions/container"; import { Action, BaseAction, IAction } from "packages/survey-core/src/actions/action"; import { ILocalizableOwner } from "packages/survey-core/src/localizablestring"; export let defaultListCss: { root: string; item: string; searchClearButtonIcon: string; loadingIndicator: string; itemSelected: string; itemGroup: string; itemGroupSelected: string; itemWithIcon: string; itemDisabled: string; itemFocused: string; itemHovered: string; itemTextWrap: string; itemIcon: string; itemMarkerIcon: string; itemSeparator: string; itemBody: string; itemsContainer: string; itemsContainerFiltering: string; filter: string; filterIcon: string; filterInput: string; emptyContainer: string; emptyText: string; }; export interface IListModel { items: Array<IAction>; onSelectionChanged?: (item: IAction, ...params: any[]) => void; allowSelection?: boolean; searchEnabled?: boolean; selectedItem?: IAction; elementId?: string; locOwner?: ILocalizableOwner; cssClasses?: any; onFilterStringChangedCallback?: (text: string) => void; onTextSearchCallback?: (item: IAction, textToSearch: string) => boolean; } export class ListModel<T extends BaseAction = Action> extends ActionContainer<T> { onSelectionChanged?: (item: T, ...params: any[]) => void; allowSelection?: boolean; elementId?: string; private listContainerHtmlElement; private loadingIndicatorValue; private onFilterStringChangedCallback; private onTextSearchCallback; searchEnabled: boolean; showFilter: boolean; forceShowFilter: boolean; isExpanded: boolean; selectedItem: IAction; focusedItem: T; filterString: string; hasVerticalScroller: boolean; isAllDataLoaded: boolean; showSearchClearButton: boolean; renderElements: boolean; textWrapEnabled: boolean; itemComponent: string; static INDENT: number; static MINELEMENTCOUNT: number; scrollHandler: (e?: any) => void; areSameItemsCallback: (item1: IAction, item2: IAction) => boolean; private hasText; isItemVisible(item: T): boolean; protected getRenderedActions(): Array<T>; readonly visibleItems: Array<T>; private readonly shouldProcessFilter: any; private onFilterStringChanged; private updateIsEmpty; private scrollToItem; constructor(items: Array<IAction> | IListModel, onSelectionChanged?: (item: T, ...params: any[]) => void, allowSelection?: boolean, selectedItem?: IAction, elementId?: string); setOnFilterStringChangedCallback(callback: (text: string) => void): void; setOnTextSearchCallback(callback: (item: T, textToSearch: s