@@ -29,11 +29,17 @@ export default function(): Rule {
29
29
'$_square-shape-pagination' ] ;
30
30
31
31
let globalStyleExt : string ;
32
+ const gridPaginatorComponentImport = '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-component' ;
33
+ const gridPaginatorThemeImport = '~igniteui-angular/lib/core/styles/components/grid-paginator/grid-paginator-theme' ;
34
+ const paginatorComponentImport = '~igniteui-angular/lib/core/styles/components/paginator/paginator-component' ;
35
+ const paginatorThemeImport = '~igniteui-angular/lib/core/styles/components/paginator/paginator-theme' ;
32
36
const config = getWorkspace ( host ) ;
33
37
const projects = getProjects ( config ) ;
34
38
35
39
context . logger . info ( `Applying migration for Ignite UI for Angular to version ${ version } ` ) ;
36
40
41
+ const update = new UpdateChanges ( __dirname , host , context ) ;
42
+
37
43
if ( config . schematics && config . schematics [ '@schematics/angular:component' ] ) {
38
44
// updated projects have global prefix rather than per-project:
39
45
globalStyleExt = config . schematics [ '@schematics/angular:component' ] . styleext ;
@@ -56,12 +62,19 @@ export default function(): Rule {
56
62
content = content . split ( n ) . join ( newThemes [ i ] ) ;
57
63
}
58
64
} ) ;
65
+ if ( content . indexOf ( gridPaginatorComponentImport ) !== - 1 ) {
66
+ content = content . replace ( gridPaginatorComponentImport , paginatorComponentImport ) ;
67
+ host . overwrite ( path , content ) ;
68
+ }
69
+ if ( content . indexOf ( gridPaginatorThemeImport ) !== - 1 ) {
70
+ content = content . replace ( gridPaginatorThemeImport , paginatorThemeImport ) ;
71
+ host . overwrite ( path , content ) ;
72
+ }
59
73
host . overwrite ( path , content ) ;
60
74
}
61
75
} ) ;
62
76
}
63
77
64
- const update = new UpdateChanges ( __dirname , host , context ) ;
65
78
update . applyChanges ( ) ;
66
79
} ;
67
80
}
0 commit comments