UNPKG

survey-core

Version:

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

70 lines (69 loc) 2.57 kB
import { Base, EventBase } from "./base"; import { IAction } from "./actions/action"; import { VerticalPosition, HorizontalPosition, PositionMode } from "./utils/popup"; type DisplayPopupMode = "modal-popup" | "modal-overlay" | "menu-overlay" | "menu-popup-overlay" | "menu-popup"; export interface IPopupOptionsBase { onHide?: () => void; onShow?: () => void; onCancel?: () => void; onDispose?: () => void; getTargetCallback?: (container: HTMLElement) => HTMLElement; getAreaCallback?: (container: HTMLElement) => HTMLElement; cssClass?: string; title?: string; verticalPosition?: VerticalPosition; horizontalPosition?: HorizontalPosition; showPointer?: boolean; isModal?: boolean; canShrink?: boolean; displayMode?: "popup" | "overlay"; } export interface IDialogOptions extends IPopupOptionsBase { componentName: string; data: any; onApply: () => boolean; isFocusedContent?: boolean; } export declare class PopupModel<T = any> extends Base implements IPopupOptionsBase { setWidthByTarget: boolean; focusFirstInputSelector: string; locale: string; onCancel: () => void; onApply: () => boolean; onHide: () => void; onShow: () => void; onDispose: () => void; getTargetCallback?: (container: HTMLElement) => HTMLElement; getAreaCallback?: (container: HTMLElement) => HTMLElement; contentComponentName: string; contentComponentData: T; verticalPosition: VerticalPosition; horizontalPosition: HorizontalPosition; showPointer: boolean; isModal: boolean; canShrink: boolean; isFocusedContent: boolean; isFocusedContainer: boolean; cssClass: string; title: string; overlayDisplayMode: "auto" | "tablet-dropdown-overlay" | "dropdown-overlay" | "plain"; displayMode: "popup" | "overlay"; positionMode: PositionMode; onVisibilityChanged: EventBase<PopupModel>; onFooterActionsCreated: EventBase<Base>; onRecalculatePosition: EventBase<Base>; private refreshInnerModel; constructor(contentComponentName: string, contentComponentData: T, options?: IPopupOptionsBase); get isVisible(): boolean; set isVisible(value: boolean); toggleVisibility(): void; show(): void; hide(): void; recalculatePosition(isResetHeight: boolean): void; updateFooterActions(footerActions: Array<IAction>): Array<IAction>; getDisplayMode(): DisplayPopupMode; updateDisplayMode(menuType: "dropdown" | "popup" | "overlay"): void; onHiding(): void; dispose(): void; } export {};