From 261d40d9f95f6eabbafb83d1aade8d901f332e34 Mon Sep 17 00:00:00 2001 From: Ed Morales Date: Fri, 8 Dec 2017 14:28:28 -0800 Subject: [PATCH] feat(): use secondary entry points for @angular/material and rxjs so we can cherry pick modules (#1019) this is needed so we dont load all the @angular/material packages when we only need a few (same for rxjs) --- scripts/rollup.js | 30 +++++++++++++++++-- src/app/app.component.ts | 2 +- src/app/app.module.ts | 11 +++++-- .../components/chips/chips.component.ts | 2 -- .../components/components.module.ts | 19 ++++++++++-- .../alerts/alerts.component.html | 2 +- .../alerts/alerts.component.ts | 2 +- .../design-patterns/design-patterns.module.ts | 19 ++++++++++-- src/app/components/docs/docs.module.ts | 8 +++-- .../docs/icons/icons.component.html | 2 +- src/app/components/layouts/layouts.module.ts | 6 +++- .../style-guide/style-guide.module.ts | 17 +++++++++-- src/app/components/toolbar/toolbar.module.ts | 5 +++- src/app/documentation-tools/index.ts | 3 +- .../pretty-markdown.component.ts | 2 +- .../readme-loader/readme-loader.component.ts | 2 +- src/app/services/github.service.ts | 3 +- src/app/services/internal-docs.service.ts | 3 +- .../core/chips/chips.component.spec.ts | 2 +- src/platform/core/chips/chips.component.ts | 5 +++- src/platform/core/chips/chips.module.ts | 5 +++- .../data-table/data-table.component.spec.ts | 3 +- .../core/data-table/data-table.module.ts | 5 +++- .../alert-dialog/alert-dialog.component.ts | 2 +- .../confirm-dialog.component.ts | 2 +- src/platform/core/dialogs/dialogs.module.ts | 4 ++- .../prompt-dialog/prompt-dialog.component.ts | 2 +- .../core/dialogs/services/dialog.service.ts | 2 +- .../expansion-panel/expansion-panel.module.ts | 3 +- src/platform/core/file/file.module.ts | 3 +- .../json-formatter/json-formatter.module.ts | 3 +- .../layout-manage-list.component.ts | 2 +- .../layout-nav-list.component.ts | 2 +- .../core/layout/layout-toggle.class.ts | 2 +- src/platform/core/layout/layout.component.ts | 2 +- src/platform/core/layout/layout.module.ts | 7 ++++- src/platform/core/loading/loading.module.ts | 3 +- src/platform/core/menu/menu.module.ts | 3 +- src/platform/core/message/message.module.ts | 2 +- .../notification-count.component.spec.ts | 2 +- .../core/paging/paging-bar.component.spec.ts | 2 +- src/platform/core/paging/paging.module.ts | 3 +- .../search-input/search-input.component.ts | 2 +- src/platform/core/search/search.module.ts | 4 ++- src/platform/core/steps/steps.component.ts | 2 +- src/platform/core/steps/steps.module.ts | 3 +- ...virtual-scroll-container.component.spec.ts | 2 +- .../dynamic-forms/dynamic-forms.module.ts | 9 ++++-- tslint.json | 7 +++++ 49 files changed, 179 insertions(+), 59 deletions(-) diff --git a/scripts/rollup.js b/scripts/rollup.js index 693c4b963a..d0cd2d4deb 100644 --- a/scripts/rollup.js +++ b/scripts/rollup.js @@ -34,7 +34,24 @@ gulp.task('rollup-code', '', function() { '@angular/platform-browser': 'ng.platformBrowser', '@angular/platform-browser/animations': 'ng.platformBrowser.animations', '@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic', + // Material entry points '@angular/material': 'ng.material', + '@angular/material/core': 'ng.material.core', + '@angular/material/input': 'ng.material.input', + '@angular/material/button': 'ng.material.button', + '@angular/material/sidenav': 'ng.material.sidenav', + '@angular/material/autocomplete': 'ng.material.autocomplete', + '@angular/material/toolbar': 'ng.material.toolbar', + '@angular/material/dialog': 'ng.material.dialog', + '@angular/material/icon': 'ng.material.icon', + '@angular/material/chips': 'ng.material.chips', + '@angular/material/slide-toggle': 'ng.material.slideToggle', + '@angular/material/slider': 'ng.material.slider', + '@angular/material/checkbox': 'ng.material.checkbox', + '@angular/material/progress-bar': 'ng.material.progress-bar', + '@angular/material/progress-spinner': 'ng.material.progress-spinner', + '@angular/material/tooltip': 'ng.material.tooltip', + // CDK entry points '@angular/cdk': 'ng.cdk', '@angular/cdk/overlay': 'ng.cdk.overlay', '@angular/cdk/portal': 'ng.cdk.portal', @@ -45,20 +62,29 @@ gulp.task('rollup-code', '', function() { // Rxjs dependencies 'rxjs/Subject': 'Rx', - 'rxjs/BehaviorSubject': 'Rx.BehaviorSubject', + 'rxjs/Subscription': 'Rx', + 'rxjs/Observable': 'Rx', + 'rxjs/BehaviorSubject': 'Rx', + 'rxjs/observable/merge': 'Rx.Observable', 'rxjs/observable/forkJoin': 'Rx.Observable', 'rxjs/observable/of': 'Rx.Observable', 'rxjs/observable/timer': 'Rx.Observable', 'rxjs/observable/fromEvent': 'Rx.Observable', + 'rxjs/operator/toPromise': 'Rx.Observable.prototype', + 'rxjs/operators/pairwise': 'Rx.Observable', 'rxjs/operators/map': 'Rx.Observable', 'rxjs/operators/filter': 'Rx.Observable', 'rxjs/operators/catchError': 'Rx.Observable', 'rxjs/operators/debounceTime': 'Rx.Observable', + 'rxjs/operators/take': 'Rx.Observable', + 'rxjs/operators/tap': 'Rx.Observable', + 'rxjs/operators/switchMap': 'Rx.Observable', + 'rxjs/operators/startWith': 'Rx.Observable', 'rxjs/operators/skip': 'Rx.Observable', - 'rxjs/Observable': 'Rx', + 'rxjs/operators/takeUntil': 'Rx.Observable', // Covalent '@covalent/core': 'td.core', diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 963370ca55..a53c3e606a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,7 +1,7 @@ import { Component, ChangeDetectorRef } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { Dir } from '@angular/cdk/bidi'; -import { MatIconRegistry } from '@angular/material'; +import { MatIconRegistry } from '@angular/material/icon'; import { TdMediaService } from '@covalent/core'; import { TranslateService } from '@ngx-translate/core'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f012bb4fde..75490365a2 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -17,8 +17,15 @@ import { HomeComponent } from './components/home/home.component'; import { TemplatesComponent } from './components/templates/templates.component'; import { appRoutes, appRoutingProviders } from './app.routes'; -import { MatButtonModule, MatListModule, MatIconModule, MatCardModule, MatMenuModule, MatTabsModule, - MatToolbarModule, MatGridListModule, MatTooltipModule } from '@angular/material'; +import { MatButtonModule } from '@angular/material/button'; +import { MatListModule } from '@angular/material/list'; +import { MatIconModule } from '@angular/material/icon'; +import { MatCardModule } from '@angular/material/card'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatGridListModule } from '@angular/material/grid-list'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { CovalentLayoutModule, CovalentExpansionPanelModule, CovalentNotificationsModule, CovalentMenuModule, CovalentMediaModule } from '../platform/core'; diff --git a/src/app/components/components/chips/chips.component.ts b/src/app/components/components/chips/chips.component.ts index dc3924080f..4047dacdc5 100644 --- a/src/app/components/components/chips/chips.component.ts +++ b/src/app/components/components/chips/chips.component.ts @@ -2,8 +2,6 @@ import { Component, HostBinding, OnInit, ChangeDetectionStrategy, ChangeDetector import { slideInDownAnimation } from '../../../app.animations'; -import { MatChip} from '@angular/material'; - @Component({ selector: 'chips-demo', styleUrls: ['./chips.component.scss'], diff --git a/src/app/components/components/components.module.ts b/src/app/components/components/components.module.ts index 44b7a1623a..571851f88e 100644 --- a/src/app/components/components/components.module.ts +++ b/src/app/components/components/components.module.ts @@ -37,9 +37,22 @@ import { NgxTranslateDemoComponent } from './ngx-translate/ngx-translate.compone import { NgxChartsModule } from '@swimlane/ngx-charts'; import { TranslateModule } from '@ngx-translate/core'; -import { MatButtonModule, MatListModule, MatIconModule, MatCardModule, MatMenuModule, MatInputModule, MatButtonToggleModule, MatSlideToggleModule, - MatSelectModule, MatToolbarModule, MatTabsModule, MatTooltipModule, MatAutocompleteModule, - MatProgressBarModule, MatGridListModule, MatRippleModule } from '@angular/material'; +import { MatButtonModule } from '@angular/material/button'; +import { MatListModule } from '@angular/material/list'; +import { MatIconModule } from '@angular/material/icon'; +import { MatCardModule } from '@angular/material/card'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatInputModule } from '@angular/material/input'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatSelectModule } from '@angular/material/select'; +import { MatGridListModule } from '@angular/material/grid-list'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatAutocompleteModule } from '@angular/material/autocomplete'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatButtonToggleModule } from '@angular/material/button-toggle'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatRippleModule } from '@angular/material/core'; import { CovalentCommonModule, CovalentLayoutModule, CovalentMediaModule, CovalentExpansionPanelModule, CovalentFileModule, CovalentStepsModule, CovalentLoadingModule, CovalentDialogsModule, CovalentSearchModule, CovalentPagingModule, diff --git a/src/app/components/design-patterns/alerts/alerts.component.html b/src/app/components/design-patterns/alerts/alerts.component.html index 0ba35ef776..091ddf99f1 100644 --- a/src/app/components/design-patterns/alerts/alerts.component.html +++ b/src/app/components/design-patterns/alerts/alerts.component.html @@ -162,7 +162,7 @@

Solution

Typescript SVG Icons (from Safe URLS) { diff --git a/src/platform/core/data-table/data-table.module.ts b/src/platform/core/data-table/data-table.module.ts index 648d2c91c9..a2ddfd6465 100644 --- a/src/platform/core/data-table/data-table.module.ts +++ b/src/platform/core/data-table/data-table.module.ts @@ -1,6 +1,9 @@ import { NgModule, Type } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatCheckboxModule, MatTooltipModule, MatIconModule, MatPseudoCheckboxModule } from '@angular/material'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatIconModule } from '@angular/material/icon'; +import { MatPseudoCheckboxModule } from '@angular/material/core'; import { TdDataTableComponent } from './data-table.component'; import { TdDataTableColumnComponent } from './data-table-column/data-table-column.component'; diff --git a/src/platform/core/dialogs/alert-dialog/alert-dialog.component.ts b/src/platform/core/dialogs/alert-dialog/alert-dialog.component.ts index 165b9c8266..9bc60dcc3c 100644 --- a/src/platform/core/dialogs/alert-dialog/alert-dialog.component.ts +++ b/src/platform/core/dialogs/alert-dialog/alert-dialog.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { MatDialogRef } from '@angular/material'; +import { MatDialogRef } from '@angular/material/dialog'; @Component({ selector: 'td-alert-dialog', diff --git a/src/platform/core/dialogs/confirm-dialog/confirm-dialog.component.ts b/src/platform/core/dialogs/confirm-dialog/confirm-dialog.component.ts index 3288bb9c36..39ad4ed6b7 100644 --- a/src/platform/core/dialogs/confirm-dialog/confirm-dialog.component.ts +++ b/src/platform/core/dialogs/confirm-dialog/confirm-dialog.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { MatDialogRef } from '@angular/material'; +import { MatDialogRef } from '@angular/material/dialog'; @Component({ selector: 'td-confirm-dialog', diff --git a/src/platform/core/dialogs/dialogs.module.ts b/src/platform/core/dialogs/dialogs.module.ts index a53f064723..87348a5367 100644 --- a/src/platform/core/dialogs/dialogs.module.ts +++ b/src/platform/core/dialogs/dialogs.module.ts @@ -3,7 +3,9 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { MatDialogModule, MatInputModule, MatButtonModule } from '@angular/material'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatInputModule } from '@angular/material/input'; +import { MatButtonModule } from '@angular/material/button'; import { TdDialogComponent, TdDialogTitleDirective, TdDialogActionsDirective, TdDialogContentDirective } from './dialog.component'; diff --git a/src/platform/core/dialogs/prompt-dialog/prompt-dialog.component.ts b/src/platform/core/dialogs/prompt-dialog/prompt-dialog.component.ts index 4b5e18fa60..9690a95853 100644 --- a/src/platform/core/dialogs/prompt-dialog/prompt-dialog.component.ts +++ b/src/platform/core/dialogs/prompt-dialog/prompt-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; -import { MatDialogRef } from '@angular/material'; +import { MatDialogRef } from '@angular/material/dialog'; @Component({ selector: 'td-prompt-dialog', diff --git a/src/platform/core/dialogs/services/dialog.service.ts b/src/platform/core/dialogs/services/dialog.service.ts index 97a25ff4e0..0edcdcb7e3 100644 --- a/src/platform/core/dialogs/services/dialog.service.ts +++ b/src/platform/core/dialogs/services/dialog.service.ts @@ -1,5 +1,5 @@ import { Injectable, ViewContainerRef, Provider, SkipSelf, Optional } from '@angular/core'; -import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material'; +import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog'; import { ComponentType } from '@angular/cdk/portal'; import { TdAlertDialogComponent } from '../alert-dialog/alert-dialog.component'; diff --git a/src/platform/core/expansion-panel/expansion-panel.module.ts b/src/platform/core/expansion-panel/expansion-panel.module.ts index 1d6c32ae0d..b669e9470c 100644 --- a/src/platform/core/expansion-panel/expansion-panel.module.ts +++ b/src/platform/core/expansion-panel/expansion-panel.module.ts @@ -3,7 +3,8 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { PortalModule } from '@angular/cdk/portal'; -import { MatRippleModule, MatIconModule } from '@angular/material'; +import { MatRippleModule } from '@angular/material/core'; +import { MatIconModule } from '@angular/material/icon'; import { TdExpansionPanelComponent, TdExpansionPanelHeaderDirective, TdExpansionPanelLabelDirective, TdExpansionPanelSublabelDirective, TdExpansionPanelSummaryComponent } from './expansion-panel.component'; diff --git a/src/platform/core/file/file.module.ts b/src/platform/core/file/file.module.ts index a904088325..ff47b3784c 100644 --- a/src/platform/core/file/file.module.ts +++ b/src/platform/core/file/file.module.ts @@ -5,7 +5,8 @@ import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { PortalModule } from '@angular/cdk/portal'; -import { MatIconModule, MatButtonModule } from '@angular/material'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; import { TdFileSelectDirective } from './directives/file-select.directive'; import { TdFileDropDirective } from './directives/file-drop.directive'; diff --git a/src/platform/core/json-formatter/json-formatter.module.ts b/src/platform/core/json-formatter/json-formatter.module.ts index 6f8d31c00c..aec197a2bb 100644 --- a/src/platform/core/json-formatter/json-formatter.module.ts +++ b/src/platform/core/json-formatter/json-formatter.module.ts @@ -1,7 +1,8 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatTooltipModule, MatIconModule } from '@angular/material'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatIconModule } from '@angular/material/icon'; import { TdJsonFormatterComponent } from './json-formatter.component'; diff --git a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts index 1d6ca4f427..a36035f075 100644 --- a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts +++ b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts @@ -1,6 +1,6 @@ import { Component, Directive, Input, ViewChild } from '@angular/core'; -import { MatSidenav } from '@angular/material'; +import { MatSidenav } from '@angular/material/sidenav'; import { ILayoutTogglable } from '../layout-toggle.class'; diff --git a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts index 042c74bac0..4883276240 100644 --- a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts +++ b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, ViewChild, Optional } from '@angular/core'; import { Router } from '@angular/router'; -import { MatSidenav } from '@angular/material'; +import { MatSidenav } from '@angular/material/sidenav'; import { ILayoutTogglable } from '../layout-toggle.class'; diff --git a/src/platform/core/layout/layout-toggle.class.ts b/src/platform/core/layout/layout-toggle.class.ts index 7e7384eca3..cc8927d01e 100644 --- a/src/platform/core/layout/layout-toggle.class.ts +++ b/src/platform/core/layout/layout-toggle.class.ts @@ -1,6 +1,6 @@ import { Input, HostBinding, HostListener, Renderer2, ElementRef, AfterViewInit, OnDestroy } from '@angular/core'; -import { MatSidenav } from '@angular/material'; +import { MatSidenav } from '@angular/material/sidenav'; import { Subscription } from 'rxjs/Subscription'; diff --git a/src/platform/core/layout/layout.component.ts b/src/platform/core/layout/layout.component.ts index 5e5d791793..6034d805ac 100644 --- a/src/platform/core/layout/layout.component.ts +++ b/src/platform/core/layout/layout.component.ts @@ -1,6 +1,6 @@ import { Component, Input, ViewChild } from '@angular/core'; -import { MatSidenav } from '@angular/material'; +import { MatSidenav } from '@angular/material/sidenav'; import { ILayoutTogglable } from './layout-toggle.class'; diff --git a/src/platform/core/layout/layout.module.ts b/src/platform/core/layout/layout.module.ts index ca080b8f8d..6eb08eff3b 100644 --- a/src/platform/core/layout/layout.module.ts +++ b/src/platform/core/layout/layout.module.ts @@ -3,7 +3,12 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ScrollDispatchModule } from '@angular/cdk/scrolling'; -import { MatSidenavModule, MatToolbarModule, MatButtonModule, MatIconModule, MatCardModule, MatListModule } from '@angular/material'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatToolbarModule } from '@angular/material/toolbar'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatCardModule } from '@angular/material/card'; +import { MatListModule } from '@angular/material/list'; import { TdLayoutComponent } from './layout.component'; import { TdLayoutToggleDirective, TdLayoutCloseDirective, TdLayoutOpenDirective } from './layout.directives'; diff --git a/src/platform/core/loading/loading.module.ts b/src/platform/core/loading/loading.module.ts index 4e63f543e8..ea18637d77 100644 --- a/src/platform/core/loading/loading.module.ts +++ b/src/platform/core/loading/loading.module.ts @@ -4,7 +4,8 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { PortalModule } from '@angular/cdk/portal'; import { OverlayModule } from '@angular/cdk/overlay'; -import { MatProgressBarModule, MatProgressSpinnerModule } from '@angular/material'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { TdLoadingService, LOADING_PROVIDER } from './services/loading.service'; import { TdLoadingFactory, LOADING_FACTORY_PROVIDER } from './services/loading.factory'; diff --git a/src/platform/core/menu/menu.module.ts b/src/platform/core/menu/menu.module.ts index 36e6fc3f19..2a0a9637f2 100644 --- a/src/platform/core/menu/menu.module.ts +++ b/src/platform/core/menu/menu.module.ts @@ -2,7 +2,8 @@ import { Type } from '@angular/core'; import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatMenuModule, MatListModule } from '@angular/material'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatListModule } from '@angular/material/list'; import { TdMenuComponent } from './menu.component'; diff --git a/src/platform/core/message/message.module.ts b/src/platform/core/message/message.module.ts index 967a67225d..8c97604798 100644 --- a/src/platform/core/message/message.module.ts +++ b/src/platform/core/message/message.module.ts @@ -2,7 +2,7 @@ import { Type } from '@angular/core'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatIconModule } from '@angular/material'; +import { MatIconModule } from '@angular/material/icon'; import { TdMessageComponent, TdMessageContainerDirective } from './message.component'; diff --git a/src/platform/core/notifications/notification-count.component.spec.ts b/src/platform/core/notifications/notification-count.component.spec.ts index b2ea17e1d2..f09f826846 100644 --- a/src/platform/core/notifications/notification-count.component.spec.ts +++ b/src/platform/core/notifications/notification-count.component.spec.ts @@ -5,7 +5,7 @@ import { ComponentFixture, } from '@angular/core/testing'; import { Component } from '@angular/core'; -import { MatIconModule } from '@angular/material'; +import { MatIconModule } from '@angular/material/icon'; import { CovalentNotificationsModule, TdNotificationCountPositionX, TdNotificationCountPositionY } from './notifications.module'; import { By } from '@angular/platform-browser'; diff --git a/src/platform/core/paging/paging-bar.component.spec.ts b/src/platform/core/paging/paging-bar.component.spec.ts index e571a982ad..61de64f839 100644 --- a/src/platform/core/paging/paging-bar.component.spec.ts +++ b/src/platform/core/paging/paging-bar.component.spec.ts @@ -9,7 +9,7 @@ import { Component } from '@angular/core'; import { By } from '@angular/platform-browser'; import { TdPagingBarComponent } from './paging-bar.component'; import { CovalentPagingModule } from './paging.module'; -import { MatInputModule } from '@angular/material'; +import { MatInputModule } from '@angular/material/input'; import { NgModule, DebugElement } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; diff --git a/src/platform/core/paging/paging.module.ts b/src/platform/core/paging/paging.module.ts index 14aeb13adf..a2c6ebfd80 100644 --- a/src/platform/core/paging/paging.module.ts +++ b/src/platform/core/paging/paging.module.ts @@ -2,7 +2,8 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { MatIconModule, MatButtonModule } from '@angular/material'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; import { TdPagingBarComponent } from './paging-bar.component'; diff --git a/src/platform/core/search/search-input/search-input.component.ts b/src/platform/core/search/search-input/search-input.component.ts index 8423e77573..3730807e3e 100644 --- a/src/platform/core/search/search-input/search-input.component.ts +++ b/src/platform/core/search/search-input/search-input.component.ts @@ -2,7 +2,7 @@ import { Component, ViewChild, OnInit, Input, Output, EventEmitter, Optional } f import { trigger, state, style, transition, animate } from '@angular/animations'; import { FormControl } from '@angular/forms'; import { Dir } from '@angular/cdk/bidi'; -import { MatInput } from '@angular/material'; +import { MatInput } from '@angular/material/input'; import { debounceTime } from 'rxjs/operators/debounceTime'; import { skip } from 'rxjs/operators/skip'; diff --git a/src/platform/core/search/search.module.ts b/src/platform/core/search/search.module.ts index 4206893cb8..d18617a0d3 100644 --- a/src/platform/core/search/search.module.ts +++ b/src/platform/core/search/search.module.ts @@ -3,7 +3,9 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; -import { MatInputModule, MatIconModule, MatButtonModule } from '@angular/material'; +import { MatInputModule } from '@angular/material/input'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; import { TdSearchInputComponent } from './search-input/search-input.component'; import { TdSearchBoxComponent } from './search-box/search-box.component'; diff --git a/src/platform/core/steps/steps.component.ts b/src/platform/core/steps/steps.component.ts index ff54e825fb..0b1ce7b0ff 100644 --- a/src/platform/core/steps/steps.component.ts +++ b/src/platform/core/steps/steps.component.ts @@ -1,7 +1,7 @@ import { Component, Input, Output } from '@angular/core'; import { OnDestroy, AfterContentInit } from '@angular/core'; import { EventEmitter, ContentChildren, QueryList } from '@angular/core'; -import { Subscription } from 'rxjs'; +import { Subscription } from 'rxjs/Subscription'; import { TdStepComponent } from './step.component'; diff --git a/src/platform/core/steps/steps.module.ts b/src/platform/core/steps/steps.module.ts index a04917397a..cf25437406 100644 --- a/src/platform/core/steps/steps.module.ts +++ b/src/platform/core/steps/steps.module.ts @@ -5,7 +5,8 @@ import { CommonModule } from '@angular/common'; import { PortalModule } from '@angular/cdk/portal'; import { ScrollDispatchModule } from '@angular/cdk/scrolling'; -import { MatIconModule, MatRippleModule } from '@angular/material'; +import { MatIconModule } from '@angular/material/icon'; +import { MatRippleModule } from '@angular/material/core'; import { CovalentCommonModule } from '../common/common.module'; diff --git a/src/platform/core/virtual-scroll/virtual-scroll-container.component.spec.ts b/src/platform/core/virtual-scroll/virtual-scroll-container.component.spec.ts index fe72d30db8..137c0c0a38 100644 --- a/src/platform/core/virtual-scroll/virtual-scroll-container.component.spec.ts +++ b/src/platform/core/virtual-scroll/virtual-scroll-container.component.spec.ts @@ -9,7 +9,7 @@ import { Component } from '@angular/core'; import { By } from '@angular/platform-browser'; import { TdVirtualScrollContainerComponent } from './virtual-scroll-container.component'; import { CovalentVirtualScrollModule } from './virtual-scroll.module'; -import { MatListModule } from '@angular/material'; +import { MatListModule } from '@angular/material/list'; import { NgModule, DebugElement } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; diff --git a/src/platform/dynamic-forms/dynamic-forms.module.ts b/src/platform/dynamic-forms/dynamic-forms.module.ts index 3e49b1febf..908e4d265f 100644 --- a/src/platform/dynamic-forms/dynamic-forms.module.ts +++ b/src/platform/dynamic-forms/dynamic-forms.module.ts @@ -2,8 +2,13 @@ import { NgModule, Type } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ReactiveFormsModule } from '@angular/forms'; -import { MatInputModule, MatSelectModule, MatCheckboxModule, MatSliderModule, MatSlideToggleModule, MatIconModule, - MatButtonModule } from '@angular/material'; +import { MatInputModule } from '@angular/material/input'; +import { MatSelectModule } from '@angular/material/select'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatSliderModule } from '@angular/material/slider'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; import { CovalentCommonModule } from '../core'; import { CovalentFileModule } from '../core'; diff --git a/tslint.json b/tslint.json index 7ad3e9e18e..44fd20cea3 100644 --- a/tslint.json +++ b/tslint.json @@ -30,6 +30,13 @@ true, "always-prefix" ], + "import-blacklist": [ + true, + "rxjs", + "rxjs/operators", + "@angular/cdk", + "@angular/material" + ], "jsdoc-format": true, "label-position": true, "max-line-length": [true, 150],