6
6
* found in the LICENSE file at https://angular.io/license
7
7
*/
8
8
9
- import { transformChanges } from '../transform-change-data' ;
9
+ import { TargetVersion } from '../../index' ;
10
+ import { VersionChanges } from '../transform-change-data' ;
10
11
11
12
export interface MaterialCssSelectorData {
12
13
/** The CSS selector to replace. */
@@ -24,84 +25,87 @@ export interface MaterialCssSelectorData {
24
25
} ;
25
26
}
26
27
27
- export const cssSelectors = transformChanges < MaterialCssSelectorData > ( [
28
- {
29
- pr : 'https://github.com/angular/material2/pull/10296' ,
30
- changes : [
31
- {
32
- replace : '.mat-form-field-placeholder' ,
33
- replaceWith : '.mat-form-field-label'
34
- } ,
35
- {
36
- replace : '.mat-input-container' ,
37
- replaceWith : '.mat-form-field'
38
- } ,
39
- {
40
- replace : '.mat-input-flex' ,
41
- replaceWith : '.mat-form-field-flex'
42
- } ,
43
- {
44
- replace : '.mat-input-hint-spacer' ,
45
- replaceWith : '.mat-form-field-hint-spacer'
46
- } ,
47
- {
48
- replace : '.mat-input-hint-wrapper' ,
49
- replaceWith : '.mat-form-field-hint-wrapper'
50
- } ,
51
- {
52
- replace : '.mat-input-infix' ,
53
- replaceWith : '.mat-form-field-infix'
54
- } ,
55
- {
56
- replace : '.mat-input-invalid' ,
57
- replaceWith : '.mat-form-field-invalid'
58
- } ,
59
- {
60
- replace : '.mat-input-placeholder' ,
61
- replaceWith : '.mat-form-field-label'
62
- } ,
63
- {
64
- replace : '.mat-input-placeholder-wrapper' ,
65
- replaceWith : '.mat-form-field-label-wrapper'
66
- } ,
67
- {
68
- replace : '.mat-input-prefix' ,
69
- replaceWith : '.mat-form-field-prefix'
70
- } ,
71
- {
72
- replace : '.mat-input-ripple' ,
73
- replaceWith : '.mat-form-field-ripple'
74
- } ,
75
- {
76
- replace : '.mat-input-subscript-wrapper' ,
77
- replaceWith : '.mat-form-field-subscript-wrapper'
78
- } ,
79
- {
80
- replace : '.mat-input-suffix' ,
81
- replaceWith : '.mat-form-field-suffix'
82
- } ,
83
- {
84
- replace : '.mat-input-underline' ,
85
- replaceWith : '.mat-form-field-underline'
86
- } ,
87
- {
88
- replace : '.mat-input-wrapper' ,
89
- replaceWith : '.mat-form-field-wrapper'
90
- }
91
- ]
92
- } ,
28
+ export const cssSelectors : VersionChanges < MaterialCssSelectorData > = {
29
+ [ TargetVersion . V6 ] : [
30
+ {
31
+ pr : 'https://github.com/angular/material2/pull/10296' ,
32
+ changes : [
33
+ {
34
+ replace : '.mat-form-field-placeholder' ,
35
+ replaceWith : '.mat-form-field-label'
36
+ } ,
37
+ {
38
+ replace : '.mat-input-container' ,
39
+ replaceWith : '.mat-form-field'
40
+ } ,
41
+ {
42
+ replace : '.mat-input-flex' ,
43
+ replaceWith : '.mat-form-field-flex'
44
+ } ,
45
+ {
46
+ replace : '.mat-input-hint-spacer' ,
47
+ replaceWith : '.mat-form-field-hint-spacer'
48
+ } ,
49
+ {
50
+ replace : '.mat-input-hint-wrapper' ,
51
+ replaceWith : '.mat-form-field-hint-wrapper'
52
+ } ,
53
+ {
54
+ replace : '.mat-input-infix' ,
55
+ replaceWith : '.mat-form-field-infix'
56
+ } ,
57
+ {
58
+ replace : '.mat-input-invalid' ,
59
+ replaceWith : '.mat-form-field-invalid'
60
+ } ,
61
+ {
62
+ replace : '.mat-input-placeholder' ,
63
+ replaceWith : '.mat-form-field-label'
64
+ } ,
65
+ {
66
+ replace : '.mat-input-placeholder-wrapper' ,
67
+ replaceWith : '.mat-form-field-label-wrapper'
68
+ } ,
69
+ {
70
+ replace : '.mat-input-prefix' ,
71
+ replaceWith : '.mat-form-field-prefix'
72
+ } ,
73
+ {
74
+ replace : '.mat-input-ripple' ,
75
+ replaceWith : '.mat-form-field-ripple'
76
+ } ,
77
+ {
78
+ replace : '.mat-input-subscript-wrapper' ,
79
+ replaceWith : '.mat-form-field-subscript-wrapper'
80
+ } ,
81
+ {
82
+ replace : '.mat-input-suffix' ,
83
+ replaceWith : '.mat-form-field-suffix'
84
+ } ,
85
+ {
86
+ replace : '.mat-input-underline' ,
87
+ replaceWith : '.mat-form-field-underline'
88
+ } ,
89
+ {
90
+ replace : '.mat-input-wrapper' ,
91
+ replaceWith : '.mat-form-field-wrapper'
92
+ }
93
+ ]
94
+ } ,
93
95
94
- // TODO(devversion): this shouldn't be here because it's not a CSS selector. Move into misc rule.
95
- {
96
- pr : 'https://github.com/angular/material2/pull/10430' ,
97
- changes : [
98
- {
99
- replace : '$mat-font-family' ,
100
- replaceWith : "Roboto, 'Helvetica Neue', sans-serif" ,
101
- whitelist : {
102
- stylesheet : true
96
+ // TODO(devversion): this shouldn't be here because it's not a CSS selector. Move into misc
97
+ // rule.
98
+ {
99
+ pr : 'https://github.com/angular/material2/pull/10430' ,
100
+ changes : [
101
+ {
102
+ replace : '$mat-font-family' ,
103
+ replaceWith : "Roboto, 'Helvetica Neue', sans-serif" ,
104
+ whitelist : {
105
+ stylesheet : true
106
+ }
103
107
}
104
- }
105
- ]
106
- }
107
- ] ) ;
108
+ ]
109
+ }
110
+ ]
111
+ } ;
0 commit comments