import * as ez from "./index"; export declare class Messager { /** * Show an alert window. * Default icon is warning */ alert(params: { msg: string; icon?: "warning" | "info" | "error" | "question" | "none"; title?: string; width?: number; height?: number; id?: string; } | any, options?: { checkboxMessage?: string; checkboxInitValue?: boolean; }): Promise; /** * Show a confirmation message window with Ok and Cancel buttons. * change default focus button to cancel */ confirm(params: { msg: string; title?: string; width?: number; height?: number; icon?: string; id?: string; }, options?: { checkboxMessage?: string; checkboxInitValue?: boolean; breakAll?: boolean; }): Promise; /** * @param closeConfirmValue close confirm will trigger this value * if button.onClick return false, the dialog box is not closed and no resolve/reject **/ confirmWithButtons(params: { msg: string; title?: string; width?: number; height?: number; defaultValue: number; breakAll?: boolean; icon?: string; buttons: { iconCls?: string; text?: string; id?: string; value: number; title?: string; onClick?: () => Promise; }[]; checkboxMessage?: string; checkboxInitValue?: boolean; }): Promise<{ rst: number; checked?: boolean; }>; confirmWithTrueAndFalse(params: { msg: string; title?: string; width?: number; icon?: string; height?: number; }, options?: { checkboxMessage?: string; checkboxInitValue?: boolean; }): Promise; private _cancel; private _yes; private _no; confirmWithYesNoCancel(params: { msg: string; title?: string; width?: number; }): Promise; private getKeyCode(char); private createConfirmDialog(params, options?); private getCheckboxValue($dialog); private appendCheckbox($dialog, checkboxMessage?, checkboxInitValue?); private transformMessagerIcon($container); /** * Show a message window with Ok and Cancel buttons prompting user to enter some text. * Custom function: * 1) Add default value to the textbox in the messager * 2) Add custom "OK" buttons to the messager, it will remove the default "OK" button, * the resloved value is an Object{id:custom button's id,result:the text user typed} * not recommended to use too many buttons, this will break the layout, use dialog instead * if this button set to primary, enter on text will trigger this button's click function, only first primary setted button will be triggered * If the button.onClick return false, the dialog will not be close. * 3) custom width for the dialog, at lease greater than 288(the default width of the dialog) */ prompt(params: { msg: string; title?: string; width?: number; height?: number; id?: string; }, options?: { defaultValue?: string; buttons?: { id: string; text: string; iconCls?: string; title?: string; primary?: boolean; onClick?: () => Promise; }[]; canBeEmptyValue?: boolean; inputType?: string; checkbox?: { message: string; initValue?: boolean; }; }): Promise; /** * Show a progress message window. */ progress(options?: { title?: string; msg?: string; text?: string; interval?: number; }): void; /** * close all progress message window * This function is easy warp of $messager.progress('close'); */ closeProgress(): void; /** * Show a message window on right bottom of screen. * This function is for showing notifications, recommended use electron's instead */ show(options: ez.IEasyuiMessagerOptions, customOptions?: { forceCloseWhenTimeout?: boolean; }): void; alertError(msg: string): Promise; alertWithAutoClose(message: string, options?: ez.IEasyuiMessagerOptions, customOptions?: { forceCloseWhenTimeout?: boolean; }): void; } export declare var messager: Messager;