forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-agility.d.ts
106 lines (88 loc) · 2.99 KB
/
angular-agility.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Type definitions for AngularAgility
// Project: https://github.com/AngularAgility/AngularAgility
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../angularjs/angular.d.ts' />
declare module aa {
export interface ILabelStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic, labelText:string, isRequired:boolean)=>void;
}
export interface IFieldGroupStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic)=>void;
}
export interface IValMsgPlacementStrategies {
[strategyName: string]: (formFieldElement:ng.IAugmentedJQueryStatic, formName:string, formFieldName:string)=>void;
}
export interface IValidIconStrategy {
validIcon:string;
invalidIcon:string;
getContainer(element:ng.IAugmentedJQueryStatic):void;
}
export interface ISpinnerClickStrategies {
[strategyName: string]: (element:ng.IAugmentedJQueryStatic)=>void;
}
export interface IOnNavigateAwayStrategies {
[strategyName: string]: (rootFormScope:ng.IScope, rootForm:ng.IAugmentedJQueryStatic, $injector:ng.auto.IInjectorService)=>void;
}
export interface IValidationMessages {
[validationKey: string]: string;
}
export interface IGlobalSettings {
[settingName: string]: any;
}
export interface IFormExtensionsProvider extends ng.IServiceProvider {
defaultLabelStrategy:string;
defaultFieldGroupStrategy:string;
defaultValMsgPlacementStrategy:string;
validIconStrategy:IValidIconStrategy;
defaultSpinnerClickStrategy:string;
defaultNotifyTarget:string;
defaultOnNavigateAwayStrategy:string;
validationMessages:IValidationMessages;
valMsgForTemplate:string;
confirmResetStrategy:()=>boolean;
globalSettings:IGlobalSettings;
labelStrategies:ILabelStrategies;
fieldGroupStrategies:IFieldGroupStrategies;
valMsgPlacementStrategies:IValMsgPlacementStrategies;
spinnerClickStrategies:ISpinnerClickStrategies;
onNavigateAwayStrategies:IOnNavigateAwayStrategies;
}
export interface INotifyPredicate {
(message:string, options:any, notifier:any):any;
}
export interface INotifyDefaults {
success: INotifyPredicate;
info: INotifyPredicate;
warning: INotifyPredicate;
danger: INotifyPredicate;
error: INotifyPredicate;
}
export interface INotifyConfig {
name:string;
template?:string;
templateName?:string;
options:INotifyOptions;
namedDefaults:INotifyDefaults;
}
export interface INotifyOptions {
cssClasses?:string;
messageType:string;
allowHtml:boolean;
message:string;
}
export interface INotifyConfigProvider extends ng.IServiceProvider {
notifyConfigs:any;
defaultTargetContainerName:string;
defaultNotifyConfig:string;
addOrUpdateNotifyConfig(name:string, opts:INotifyConfig):void;
optionsTransformer(options:INotifyOptions, $sce:ng.ISCEService):void;
}
export interface IExternalFormValidationConfig {
validations:any;
ignore?:any;
globals?:any;
resolve?:any;
resolveFn?:(modelValue:string)=>string;
}
}