1 | import '../../';
|
2 |
|
3 | export type DialogCloseFunction = () => void;
|
4 |
|
5 | export interface DialogOptions {
|
6 | bottom?: boolean | undefined;
|
7 | }
|
8 |
|
9 | export interface OpenDialogOptions extends DialogOptions {
|
10 |
|
11 | closeOnEnter?: boolean | undefined;
|
12 |
|
13 | closeOnBlur?: boolean | undefined;
|
14 |
|
15 | onKeyDown?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
16 |
|
17 | onKeyUp?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
18 |
|
19 | onInput?(event: KeyboardEvent, value: string, close: DialogCloseFunction): boolean | undefined;
|
20 |
|
21 | onClose?(instance: HTMLElement): void;
|
22 | }
|
23 |
|
24 | export interface OpenNotificationOptions extends DialogOptions {
|
25 | duration?: number | undefined;
|
26 | }
|
27 |
|
28 | declare module '../../' {
|
29 | interface Editor {
|
30 |
|
31 | openDialog(template: string | Node, callback: (value: string, e: Event) => void, options?: OpenDialogOptions): DialogCloseFunction;
|
32 | openNotification(template: string | Node, options?: OpenNotificationOptions): DialogCloseFunction;
|
33 | openConfirm(template: string | Node, callbacks: ReadonlyArray<(editor: Editor) => void>, options?: DialogOptions): DialogCloseFunction;
|
34 | }
|
35 | }
|