@@ -29,11 +29,17 @@ export default function(): Rule {
2929 '$_square-shape-pagination' ] ;
3030
3131 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' ;
3236 const config = getWorkspace ( host ) ;
3337 const projects = getProjects ( config ) ;
3438
3539 context . logger . info ( `Applying migration for Ignite UI for Angular to version ${ version } ` ) ;
3640
41+ const update = new UpdateChanges ( __dirname , host , context ) ;
42+
3743 if ( config . schematics && config . schematics [ '@schematics/angular:component' ] ) {
3844 // updated projects have global prefix rather than per-project:
3945 globalStyleExt = config . schematics [ '@schematics/angular:component' ] . styleext ;
@@ -56,12 +62,19 @@ export default function(): Rule {
5662 content = content . split ( n ) . join ( newThemes [ i ] ) ;
5763 }
5864 } ) ;
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+ }
5973 host . overwrite ( path , content ) ;
6074 }
6175 } ) ;
6276 }
6377
64- const update = new UpdateChanges ( __dirname , host , context ) ;
6578 update . applyChanges ( ) ;
6679 } ;
6780}
0 commit comments