1
+ // Type definitions for AngularAgility
2
+ // Project: https://github.com/AngularAgility/AngularAgility
3
+ // Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
4
+ // Definitions: https://github.com/borisyankov/DefinitelyTyped
5
+
6
+ /// <reference path='../angularjs/angular.d.ts' />
7
+
8
+ declare module aa {
9
+
10
+ export interface ILabelStrategies {
11
+ [ strategyName : string ] : ( element :ng . IAugmentedJQueryStatic , labelText :string , isRequired :boolean ) => void ;
12
+ }
13
+
14
+ export interface IFieldGroupStrategies {
15
+ [ strategyName : string ] : ( element :ng . IAugmentedJQueryStatic ) => void ;
16
+ }
17
+
18
+ export interface IValMsgPlacementStrategies {
19
+ [ strategyName : string ] : ( formFieldElement :ng . IAugmentedJQueryStatic , formName :string , formFieldName :string ) => void ;
20
+ }
21
+
22
+ export interface IValidIconStrategy {
23
+ validIcon :string ;
24
+ invalidIcon :string ;
25
+ getContainer ( element :ng . IAugmentedJQueryStatic ) :void ;
26
+ }
27
+
28
+ export interface ISpinnerClickStrategies {
29
+ [ strategyName : string ] : ( element :ng . IAugmentedJQueryStatic ) => void ;
30
+ }
31
+
32
+ export interface IOnNavigateAwayStrategies {
33
+ [ strategyName : string ] : ( rootFormScope :ng . IScope , rootForm :ng . IAugmentedJQueryStatic , $injector :ng . auto . IInjectorService ) => void ;
34
+ }
35
+
36
+ export interface IValidationMessages {
37
+ [ validationKey : string ] : string ;
38
+ }
39
+
40
+ export interface IGlobalSettings {
41
+ [ settingName : string ] : any ;
42
+ }
43
+
44
+ export interface IFormExtensionsProvider extends ng . auto . IProvider {
45
+ defaultLabelStrategy :string ;
46
+ defaultFieldGroupStrategy :string ;
47
+ defaultValMsgPlacementStrategy :string ;
48
+ validIconStrategy :IValidIconStrategy ;
49
+ defaultSpinnerClickStrategy :string ;
50
+ defaultNotifyTarget :string ;
51
+ defaultOnNavigateAwayStrategy :string ;
52
+ validationMessages :IValidationMessages ;
53
+ valMsgForTemplate :string ;
54
+ confirmResetStrategy :( ) => boolean ;
55
+ globalSettings :IGlobalSettings ;
56
+
57
+ labelStrategies :ILabelStrategies ;
58
+ fieldGroupStrategies :IFieldGroupStrategies ;
59
+ valMsgPlacementStrategies :IValMsgPlacementStrategies ;
60
+ spinnerClickStrategies :ISpinnerClickStrategies ;
61
+ onNavigateAwayStrategies :IOnNavigateAwayStrategies ;
62
+ }
63
+
64
+ export interface INotifyPredicate {
65
+ ( message :string , options :any , notifier :any ) :any ;
66
+ }
67
+
68
+ export interface INotifyDefaults {
69
+ success : INotifyPredicate ;
70
+ info : INotifyPredicate ;
71
+ warning : INotifyPredicate ;
72
+ danger : INotifyPredicate ;
73
+ error : INotifyPredicate ;
74
+ }
75
+
76
+ export interface INotifyConfig {
77
+ name :string ;
78
+ template ?:string ;
79
+ templateName ?:string ;
80
+ options :INotifyOptions ;
81
+ namedDefaults :INotifyDefaults ;
82
+ }
83
+
84
+ export interface INotifyOptions {
85
+ cssClasses ?:string ;
86
+ messageType :string ;
87
+ allowHtml :boolean ;
88
+ message :string ;
89
+ }
90
+
91
+ export interface INotifyConfigProvider extends ng . auto . IProvider {
92
+ notifyConfigs :any ;
93
+ defaultTargetContainerName :string ;
94
+ defaultNotifyConfig :string ;
95
+ addOrUpdateNotifyConfig ( name :string , opts :INotifyConfig ) :void ;
96
+ optionsTransformer ( options :INotifyOptions , $sce :ng . ISCEService ) :void ;
97
+ }
98
+
99
+ export interface IExternalFormValidationConfig {
100
+ validations :any ;
101
+ ignore ?:any ;
102
+ globals ?:any ;
103
+ resolve ?:any ;
104
+ resolveFn ?:( modelValue :string ) => string ;
105
+ }
106
+ }
0 commit comments