@nstudio/nativescript-fancyalert
Version:
Fancy alerts for NativeScript.
54 lines (53 loc) • 4.54 kB
TypeScript
import { TNSFancyAlertButton } from './common';
import { IFancyAlertSupportedTypes, IFancyAlertTextOptions, IFancyAlertShowAnimationTypes, IFancyAlertHideAnimationTypes, IFancyAlertBackgroundTypes } from './';
export * from './common';
export declare class TNSFancyAlert {
static SUPPORTED_TYPES: IFancyAlertSupportedTypes;
static shouldDismissOnTapOutside: boolean;
static dismissCallback: () => void;
static textDisplayOptions: IFancyAlertTextOptions;
static hideAnimationType: IFancyAlertHideAnimationTypes;
static HIDE_ANIMATION_TYPES: IFancyAlertHideAnimationTypes;
static showAnimationType: IFancyAlertShowAnimationTypes;
static SHOW_ANIMATION_TYPES: IFancyAlertShowAnimationTypes;
static backgroundType: IFancyAlertBackgroundTypes;
static BACKGROUND_TYPES: IFancyAlertBackgroundTypes;
static customViewColor: string;
static iconTintColor: string;
static titleColor: string;
static bodyTextColor: string;
static tintTopCircle: boolean;
static cornerRadius: number;
static backgroundViewColor: string;
static useLargerIcon: boolean;
static soundURL: string;
static showSuccess(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showError(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showNotice(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showWarning(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showInfo(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showEdit(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showWaiting(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<void>;
static showQuestion(title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): Promise<void>;
static showCustomButtonTimer(buttonIndex: number, reverse?: boolean, imageName?: string, color?: string, title?: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<unknown>;
static showCustomImage(imageName: string, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<unknown>;
static showCustomButtons(buttons: Array<TNSFancyAlertButton>, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<unknown>;
static applyTextDisplayOptions(alert: SCLAlertView): void;
static showCustomTextAttributes(attributionBlock: (p1: string) => NSAttributedString, button: TNSFancyAlertButton, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<void>;
static showTextField(placeholder: string, initialValue: string, button: TNSFancyAlertButton, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<void>;
static showSwitch(switchLabel: string, switchColor: string, button: TNSFancyAlertButton, image: any, color: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<void>;
static showCustomView(customView: any, image?: any, color?: string, title?: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number): Promise<unknown>;
/**
* Base Method
**/
static show(type: string, title: string, subTitle?: string, closeBtnTitle?: string, duration?: number, width?: number, buttons?: Array<TNSFancyAlertButton>): void;
static showCustom(alert: any, image: any, color: string, title?: string, subTitle?: string, closeBtnTitle?: string, duration?: number): void;
/**
* Alert Options
*/
static applyOptions(alert: any): void;
/**
* Alert Creator
**/
static createAlert(width?: number): SCLAlertView;
}