This repository was archived by the owner on Apr 30, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +45
-57
lines changed Expand file tree Collapse file tree 6 files changed +45
-57
lines changed Original file line number Diff line number Diff line change 1
1
export default ngModule => {
2
2
ngModule . config ( addCheckboxType ) ;
3
3
4
- function addCheckboxType ( formlyConfigProvider , formlyBootstrapApiCheck ) {
5
- const c = formlyBootstrapApiCheck ;
4
+ function addCheckboxType ( formlyConfigProvider ) {
6
5
formlyConfigProvider . setType ( {
7
6
name : 'checkbox' ,
8
7
template : require ( './checkbox.html' ) ,
9
8
wrapper : [ 'bootstrapHasError' ] ,
10
- apiCheck : {
11
- templateOptions : c . shape ( {
12
- label : c . string
13
- } )
14
- } ,
15
- apiCheckInstance : c
9
+ apiCheck : check => ( {
10
+ templateOptions : {
11
+ label : check . string
12
+ }
13
+ } )
16
14
} ) ;
17
15
}
18
16
} ;
Original file line number Diff line number Diff line change 1
1
export default ngModule => {
2
2
ngModule . config ( addCheckboxType ) ;
3
3
4
- function addCheckboxType ( formlyConfigProvider , formlyBootstrapApiCheck ) {
5
- const c = formlyBootstrapApiCheck ;
4
+ function addCheckboxType ( formlyConfigProvider ) {
6
5
formlyConfigProvider . setType ( {
7
6
name : 'multiCheckbox' ,
8
7
template : require ( './multiCheckbox.html' ) ,
9
8
wrapper : [ 'bootstrapLabel' , 'bootstrapHasError' ] ,
10
- apiCheck : {
11
- templateOptions : c . shape ( {
12
- options : c . arrayOf ( c . object ) ,
13
- labelProp : c . string . optional ,
14
- valueProp : c . string . optional
15
- } )
16
- } ,
9
+ apiCheck : check => ( {
10
+ templateOptions : {
11
+ options : check . arrayOf ( check . object ) ,
12
+ labelProp : check . string . optional ,
13
+ valueProp : check . string . optional
14
+ }
15
+ } ) ,
17
16
defaultOptions : {
18
17
noFormControl : false ,
19
18
ngModelAttrs : {
@@ -23,7 +22,6 @@ export default ngModule => {
23
22
}
24
23
}
25
24
} ,
26
- apiCheckInstance : c ,
27
25
controller : /* @ngInject */ function ( $scope ) {
28
26
const to = $scope . to ;
29
27
const opts = $scope . options ;
Original file line number Diff line number Diff line change 1
1
export default ngModule => {
2
2
ngModule . config ( addRadioType ) ;
3
3
4
- function addRadioType ( formlyConfigProvider , formlyBootstrapApiCheck ) {
5
- const c = formlyBootstrapApiCheck ;
4
+ function addRadioType ( formlyConfigProvider ) {
6
5
formlyConfigProvider . setType ( {
7
6
name : 'radio' ,
8
7
template : require ( './radio.html' ) ,
9
8
wrapper : [ 'bootstrapLabel' , 'bootstrapHasError' ] ,
10
9
defaultOptions : {
11
10
noFormControl : false
12
11
} ,
13
- apiCheck : {
14
- templateOptions : c . shape ( {
15
- options : c . arrayOf ( c . object ) ,
16
- labelProp : c . string . optional ,
17
- valueProp : c . string . optional
18
- } )
19
- } ,
20
- apiCheckInstance : c
12
+ apiCheck : check => ( {
13
+ templateOptions : {
14
+ options : check . arrayOf ( check . object ) ,
15
+ labelProp : check . string . optional ,
16
+ valueProp : check . string . optional
17
+ }
18
+ } )
21
19
} ) ;
22
20
}
23
21
} ;
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ export default ngModule => {
3
3
4
4
const template = `<select class="form-control" ng-model="model[options.key]"></select>` ;
5
5
6
- function addSelectType ( formlyConfigProvider , formlyBootstrapApiCheck ) {
7
- const c = formlyBootstrapApiCheck ;
6
+ function addSelectType ( formlyConfigProvider ) {
8
7
formlyConfigProvider . setType ( {
9
8
name : 'select' ,
10
9
template,
@@ -20,15 +19,14 @@ export default ngModule => {
20
19
}
21
20
} ;
22
21
} ,
23
- apiCheck : {
24
- templateOptions : c . shape ( {
25
- options : c . arrayOf ( c . object ) ,
26
- labelProp : c . string . optional ,
27
- valueProp : c . string . optional ,
28
- groupProp : c . string . optional
29
- } )
30
- } ,
31
- apiCheckInstance : c
22
+ apiCheck : check => ( {
23
+ templateOptions : {
24
+ options : check . arrayOf ( check . object ) ,
25
+ labelProp : check . string . optional ,
26
+ valueProp : check . string . optional ,
27
+ groupProp : check . string . optional
28
+ }
29
+ } )
32
30
} ) ;
33
31
}
34
32
} ;
Original file line number Diff line number Diff line change 1
1
export default ngModule => {
2
2
ngModule . config ( addTextareaType ) ;
3
3
4
- function addTextareaType ( formlyConfigProvider , formlyBootstrapApiCheck ) {
5
- const c = formlyBootstrapApiCheck ;
4
+ function addTextareaType ( formlyConfigProvider ) {
6
5
formlyConfigProvider . setType ( {
7
6
name : 'textarea' ,
8
7
template : '<textarea class="form-control" ng-model="model[options.key]"></textarea>' ,
@@ -13,13 +12,12 @@ export default ngModule => {
13
12
cols : { attribute : 'cols' }
14
13
}
15
14
} ,
16
- apiCheck : {
17
- templateOptions : c . shape ( {
18
- rows : c . number . optional ,
19
- cols : c . number . optional
20
- } )
21
- } ,
22
- apiCheckInstance : c
15
+ apiCheck : check => ( {
16
+ templateOptions : {
17
+ rows : check . number . optional ,
18
+ cols : check . number . optional
19
+ }
20
+ } )
23
21
} ) ;
24
22
}
25
23
} ;
Original file line number Diff line number Diff line change 1
1
export default ngModule => {
2
2
ngModule . config ( addWrappers ) ;
3
3
4
- function addWrappers ( formlyConfigProvider , formlyBootstrapApiCheck ) {
5
- const c = formlyBootstrapApiCheck ;
4
+ function addWrappers ( formlyConfigProvider ) {
6
5
formlyConfigProvider . setWrapper ( [
7
6
{
8
7
name : 'bootstrapLabel' ,
9
8
template : require ( './label.html' ) ,
10
- apiCheck : {
11
- templateOptions : c . shape ( {
12
- label : c . string ,
13
- required : c . bool . optional
14
- } )
15
- } ,
16
- apiCheckInstance : c
9
+ apiCheck : check => ( {
10
+ templateOptions : {
11
+ label : check . string ,
12
+ required : check . bool . optional
13
+ }
14
+ } )
17
15
} ,
18
16
{ name : 'bootstrapHasError' , template : require ( './has-error.html' ) }
19
17
] ) ;
You can’t perform that action at this time.
0 commit comments