forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-dialog-service.d.ts
82 lines (72 loc) · 2.45 KB
/
angular-dialog-service.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Type definitions for Angular Dialog Service 5.2.8
// Project: https://github.com/m-e-conroy/angular-dialog-service
// Definitions by: William Comartin <https://github.com/wcomartin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts"/>
/// <reference path="../angular-ui-bootstrap/angular-ui-bootstrap.d.ts"/>
declare namespace angular.dialogservice {
interface IDialogOptions {
/**
* Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
*
* @default false
*/
animation?: boolean;
/**
* controls the presence of a backdrop
* Allowed values:
* - true (default)
* - false (no backdrop)
* - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
*
* @default true
*/
backdrop?: boolean | string;
/**
* indicates whether the dialog should be closable by hitting the ESC key
*
* @default true
*/
keyboard?: boolean;
/**
* additional CSS class(es) to be added to a modal backdrop template
*
* @default 'dialogs-backdrop-default'
*/
backdropClass?: string;
/**
* additional CSS class(es) to be added to a modal window template
*
* @default 'dialogs-default'
*/
windowClass?: string;
/**
* Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
*
* @default 'lg'
*/
size?: string;
}
interface IDialogService {
/**
* Opens a new error modal instance.
*/
error(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new wait modal instance.
*/
wait(header: string, msg: string, progress: number, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new notify modal instance.
*/
notify(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new confirm modal instance.
*/
confirm(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
/**
* Opens a new custom modal instance.
*/
create(url: string, ctrlr: string, data: any, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
}
}