survey-core
Version:
survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.
151 lines (150 loc) • 6.1 kB
TypeScript
import { IAction } from "./actions/action";
import { ActionContainer } from "./actions/container";
import { Base } from "./base";
import { ItemValue } from "./itemvalue";
import { ListModel } from "./list";
import { LocalizableString } from "./localizablestring";
import { PopupModel } from "./popup";
import { Question } from "./question";
export declare class DropdownListModel extends Base {
protected question: Question;
protected onSelectionChanged?: (item: IAction, ...params: any[]) => void;
readonly minPageSize = 25;
readonly loadingItemHeight = 40;
timer: any;
private htmlCleanerElement;
private _markdownMode;
private _popupModel;
private chevronButton;
private clearButton;
private filteredItems;
focused: boolean;
private get focusFirstInputSelector();
protected readonly selectedItemSelector = ".sv-list__item--selected";
protected readonly itemSelector = ".sv-list__item";
protected getFocusFirstInputSelector(): string;
private itemsSettings;
protected listModel: ListModel<ItemValue>;
protected listModelFilterStringChanged: (newValue: string) => void;
editorButtons: ActionContainer;
private resetItemsSettings;
private setItems;
private _loadQuestionChoices;
private setIsChoicesLoading;
private processCustomValue;
private updateQuestionChoices;
private resetTimer;
private updatePopupFocusFirstInputSelector;
private getDropdownMenuOptions;
private checkFocusRemainsWithinComponent;
protected createButtons(): void;
protected createPopup(): void;
private popupVisibilityChanged;
private setFilterStringToListModel;
private setTextWrapEnabled;
protected popupRecalculatePosition(isResetHeight: boolean): void;
protected onHidePopup(): void;
protected getAvailableItems(): Array<ItemValue>;
protected setOnTextSearchCallbackForListModel(listModel: ListModel<ItemValue>): void;
protected createListModel(): ListModel<ItemValue>;
private setQuestionValue;
protected createCustomItem(): ItemValue;
protected updateAfterListModelCreated(model: ListModel<ItemValue>): void;
protected getPopupCssClasses(): string;
updateCssClasses(popupCssClass: string, listCssClasses: any): void;
protected resetFilterString(): void;
clear(): void;
protected onSetFilterString(): void;
get isAllDataLoaded(): boolean;
loadQuestionChoices(callbackAfterItemsLoaded?: () => void): void;
get canShowSelectedItem(): boolean;
get needRenderInput(): boolean;
updateCustomItemValue(): void;
private resetCustomItemValue;
private _customItemValue;
get customItemValue(): ItemValue;
allowCustomChoices: boolean;
customValue: string;
searchEnabled: boolean;
choicesLazyLoadEnabled: boolean;
filterString: string;
inputString: string;
showInputFieldComponent: boolean;
ariaActivedescendant: string;
ariaExpanded: "true" | "false";
private applyInputString;
private cleanHtml;
protected fixInputCase(): void;
protected applyHintString(): void;
get inputStringRendered(): string;
set inputStringRendered(val: string);
inputPlaceholder: string;
get placeholderRendered(): string;
get listElementId(): string;
hasScroll: boolean;
hintString: string;
private get hintStringLC();
private get inputStringLC();
get showHintPrefix(): boolean;
get hintStringPrefix(): string;
get showHintString(): boolean;
get hintStringSuffix(): string;
get hintStringMiddle(): string;
private questionPropertyChangedHandler;
constructor(question: Question, onSelectionChanged?: (item: IAction, ...params: any[]) => void);
get popupModel(): PopupModel;
get clearCaption(): string;
set clearCaption(value: string);
get locClearCaption(): LocalizableString;
get selectCaption(): string;
set selectCaption(value: string);
get locSelectCaption(): LocalizableString;
get inputAvailable(): boolean;
get noTabIndex(): boolean;
get filterReadOnly(): boolean;
get filterStringEnabled(): boolean;
get inputMode(): "none" | "text";
get popupEnabled(): boolean;
get ariaQuestionRole(): string | undefined;
get ariaQuestionRequired(): "true" | "false" | undefined;
get ariaQuestionInvalid(): "true" | "false" | undefined;
get ariaQuestionErrorMessage(): string | undefined;
get ariaQuestionLabel(): string | undefined;
get ariaQuestionLabelledby(): string | undefined;
get ariaQuestionDescribedby(): string | undefined;
get ariaQuestionControls(): string | undefined;
get ariaQuestionExpanded(): "true" | "false";
get ariaQuestionActivedescendant(): string | undefined;
get ariaInputRole(): string;
get ariaInputRequired(): "true" | "false";
get ariaInputInvalid(): "true" | "false";
get ariaInputErrorMessage(): string;
get ariaInputLabel(): string;
get ariaInputLabelledby(): string;
get ariaInputDescribedby(): string;
get ariaInputControls(): string;
get ariaInputExpanded(): "true" | "false";
get ariaInputActivedescendant(): string;
setSearchEnabled(newValue: boolean): void;
setAllowCustomChoices(newValue: boolean): void;
setChoicesLazyLoadEnabled(newValue: boolean): void;
setInputPlaceholder(newValue: string): void;
updateItems(): void;
onClick(event?: any): void;
chevronPointerDown(event: any): void;
protected onPropertyChangedHandler(sender: any, options: any): void;
protected focusItemOnClickAndPopup(): void;
onClear(event?: any): void;
getSelectedAction(): ItemValue;
changeSelectionWithKeyboard(reverse: boolean): void;
protected beforeScrollToFocusedItem(focusedItem: ItemValue): void;
protected afterScrollToFocusedItem(): void;
keyHandler(event: any): void;
protected onEscape(): void;
onScroll(event: Event): void;
onBlur(event: any): void;
onFocus(event: any): void;
setInputStringFromSelectedItem(newValue: any): void;
dispose(): void;
scrollToFocusedItem(): void;
}