forked from dt-bower/dt-angular-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-ui.d.ts
77 lines (66 loc) · 2 KB
/
angular-ui.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
// Type definitions for Angular UI 0.3.0
// Project: http://angular-ui.github.io/
// Definitions by: Mark Rendle <http://github.com/markrendle>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../dt-angular/angular.d.ts" />
///////////////////////////////////////////////////////////////////////////////
// ng.ui module
///////////////////////////////////////////////////////////////////////////////
declare module ng.ui {
interface IDialogOptions {
controller: string;
template?: string;
templateUrl?: string;
backdrop?: bool;
keyboard?: bool;
backdropClick?: bool;
dialogFade?: bool;
backdropFade?: bool;
resolve?: any;
}
interface IMessageBoxButtons {
label: string;
result: string;
cssClass?: string;
}
interface IDialogProvider {
dialog(opts: IDialogOptions): IDialog;
messageBox(title: string, msg: string, btns: IMessageBoxButtons[]): IDialog;
}
interface IDialog {
open(): ng.IPromise;
close(result: any): void;
}
interface IStateConfig {
template?: string;
templateUrl?: string;
templateProvider?: Function;
controller?: any;
url?: string;
parent?: IStateConfig;
resolve?: any;
params?: any[];
views?: any;
abstract?: bool;
onEnter?: Function;
onExit?: Function;
data?: any;
}
interface IStateProvider {
state(name: string, config: IStateConfig): IStateProvider;
}
interface IState {
params: any;
transitionTo(state: string, params?: any, updateLocation?: bool): void;
transitionTo(state: IStateConfig, params?: any, updateLocation?: bool): void;
href(state: IStateConfig, params?: any): string;
href(stateName: string, params?: any): string;
includes(partialStateName: string): bool;
is(stateName: string): bool;
is(state: IStateConfig): bool;
current: IStateConfig;
}
interface IStateParams {
[key: string]: any;
}
}