diff --git a/src/@fuse/components/countdown/countdown.component.ts b/src/@fuse/components/countdown/countdown.component.ts index 6342b804..b00ad897 100644 --- a/src/@fuse/components/countdown/countdown.component.ts +++ b/src/@fuse/components/countdown/countdown.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/interval'; + +import { interval } from 'rxjs'; +import { map } from 'rxjs/operators'; import * as moment from 'moment'; @@ -31,22 +32,21 @@ export class FuseCountdownComponent implements OnInit let diff = eventDate.diff(currDate, 'seconds'); - const countDown = - Observable - .interval(1000) - .map(value => { - return diff = diff - 1; - }) - .map(value => { - const timeLeft = moment.duration(value, 'seconds'); + const countDown = interval(1000).pipe( + map(value => { + return diff = diff - 1; + }), + map(value => { + const timeLeft = moment.duration(value, 'seconds'); - return { - days : timeLeft.asDays().toFixed(0), - hours : timeLeft.hours(), - minutes: timeLeft.minutes(), - seconds: timeLeft.seconds() - }; - }); + return { + days : timeLeft.asDays().toFixed(0), + hours : timeLeft.hours(), + minutes: timeLeft.minutes(), + seconds: timeLeft.seconds() + }; + }) + ); countDown.subscribe(value => { this.countdown = value; diff --git a/src/@fuse/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts b/src/@fuse/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts index c691a1bb..e24976bc 100644 --- a/src/@fuse/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts +++ b/src/@fuse/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts @@ -1,7 +1,8 @@ import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core'; +import { Subscription } from 'rxjs'; + import { fuseAnimations } from '../../../../animations/index'; import { FuseConfigService } from '../../../../services/config.service'; -import { Subscription } from 'rxjs/Subscription'; @Component({ selector : 'fuse-nav-horizontal-collapse', diff --git a/src/@fuse/components/navigation/navigation.service.ts b/src/@fuse/components/navigation/navigation.service.ts index d2e4a319..cbf2e11e 100644 --- a/src/@fuse/components/navigation/navigation.service.ts +++ b/src/@fuse/components/navigation/navigation.service.ts @@ -1,5 +1,5 @@ -import { EventEmitter, Injectable } from '@angular/core'; -import { Subject } from 'rxjs/Subject'; +import { Injectable } from '@angular/core'; +import { Subject } from 'rxjs'; @Injectable() export class FuseNavigationService diff --git a/src/@fuse/components/search-bar/search-bar.component.ts b/src/@fuse/components/search-bar/search-bar.component.ts index 5fa75e44..16fa6ed6 100644 --- a/src/@fuse/components/search-bar/search-bar.component.ts +++ b/src/@fuse/components/search-bar/search-bar.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Output } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { FuseConfigService } from '@fuse/services/config.service'; diff --git a/src/@fuse/components/shortcuts/shortcuts.component.ts b/src/@fuse/components/shortcuts/shortcuts.component.ts index b8eb24ed..0e33d8ef 100644 --- a/src/@fuse/components/shortcuts/shortcuts.component.ts +++ b/src/@fuse/components/shortcuts/shortcuts.component.ts @@ -1,6 +1,7 @@ import { Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; import { ObservableMedia } from '@angular/flex-layout'; + +import { Subscription } from 'rxjs'; import { CookieService } from 'ngx-cookie-service'; import { FuseMatchMediaService } from '@fuse/services/match-media.service'; diff --git a/src/@fuse/components/sidebar/sidebar.component.ts b/src/@fuse/components/sidebar/sidebar.component.ts index 0af20005..16c90880 100644 --- a/src/@fuse/components/sidebar/sidebar.component.ts +++ b/src/@fuse/components/sidebar/sidebar.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, HostBinding, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core'; import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations'; import { ObservableMedia } from '@angular/flex-layout'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { FuseSidebarService } from './sidebar.service'; import { FuseMatchMediaService } from '@fuse/services/match-media.service'; diff --git a/src/@fuse/components/theme-options/theme-options.component.ts b/src/@fuse/components/theme-options/theme-options.component.ts index 84e3c2a2..1e817c91 100644 --- a/src/@fuse/components/theme-options/theme-options.component.ts +++ b/src/@fuse/components/theme-options/theme-options.component.ts @@ -1,6 +1,6 @@ import { Component, ElementRef, HostBinding, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; import { FuseConfigService } from '@fuse/services/config.service'; diff --git a/src/@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.directive.ts b/src/@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.directive.ts index df58a483..52efd771 100644 --- a/src/@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.directive.ts +++ b/src/@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.directive.ts @@ -1,7 +1,7 @@ import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core'; import { MatSidenav } from '@angular/material'; import { ObservableMedia } from '@angular/flex-layout'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { FuseMatchMediaService } from '@fuse/services/match-media.service'; import { FuseMatSidenavHelperService } from '@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.service'; diff --git a/src/@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts b/src/@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts index 3fd4be24..89c3dea2 100644 --- a/src/@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts +++ b/src/@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Directive, ElementRef, HostListener, OnDestroy, OnInit } from '@angular/core'; import { Platform } from '@angular/cdk/platform'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import PerfectScrollbar from 'perfect-scrollbar'; diff --git a/src/@fuse/services/config.service.ts b/src/@fuse/services/config.service.ts index 976ce1b9..385ae3fe 100644 --- a/src/@fuse/services/config.service.ts +++ b/src/@fuse/services/config.service.ts @@ -1,7 +1,8 @@ import { Inject, Injectable, InjectionToken } from '@angular/core'; import { NavigationEnd, NavigationStart, Router } from '@angular/router'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { Platform } from '@angular/cdk/platform'; +import { BehaviorSubject } from 'rxjs'; + import * as _ from 'lodash'; // Create the injection token for the custom config diff --git a/src/@fuse/services/match-media.service.ts b/src/@fuse/services/match-media.service.ts index b37b2aa1..2121e8be 100644 --- a/src/@fuse/services/match-media.service.ts +++ b/src/@fuse/services/match-media.service.ts @@ -1,6 +1,6 @@ import { MediaChange, ObservableMedia } from '@angular/flex-layout'; import { Injectable } from '@angular/core'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject } from 'rxjs'; @Injectable() export class FuseMatchMediaService diff --git a/src/app/main/content/apps/academy/course.service.ts b/src/app/main/content/apps/academy/course.service.ts index a39d9d23..1d007e82 100644 --- a/src/app/main/content/apps/academy/course.service.ts +++ b/src/app/main/content/apps/academy/course.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class AcademyCourseService implements Resolve diff --git a/src/app/main/content/apps/academy/course/course.component.ts b/src/app/main/content/apps/academy/course/course.component.ts index 962ed7b1..ab249eae 100644 --- a/src/app/main/content/apps/academy/course/course.component.ts +++ b/src/app/main/content/apps/academy/course/course.component.ts @@ -1,5 +1,5 @@ import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/academy/courses.service.ts b/src/app/main/content/apps/academy/courses.service.ts index f803c757..59356eca 100644 --- a/src/app/main/content/apps/academy/courses.service.ts +++ b/src/app/main/content/apps/academy/courses.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class AcademyCoursesService implements Resolve diff --git a/src/app/main/content/apps/academy/courses/courses.component.ts b/src/app/main/content/apps/academy/courses/courses.component.ts index c71caf56..58b82cfb 100644 --- a/src/app/main/content/apps/academy/courses/courses.component.ts +++ b/src/app/main/content/apps/academy/courses/courses.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/calendar/calendar.component.ts b/src/app/main/content/apps/calendar/calendar.component.ts index e607fc49..998bab05 100644 --- a/src/app/main/content/apps/calendar/calendar.component.ts +++ b/src/app/main/content/apps/calendar/calendar.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormGroup } from '@angular/forms'; -import { Subject } from 'rxjs/Subject'; import { MatDialog, MatDialogRef } from '@angular/material'; +import { Subject } from 'rxjs'; import { startOfDay, isSameDay, isSameMonth } from 'date-fns'; - import { CalendarEvent, CalendarEventAction, CalendarEventTimesChangedEvent, CalendarMonthViewDay } from 'angular-calendar'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; diff --git a/src/app/main/content/apps/calendar/calendar.service.ts b/src/app/main/content/apps/calendar/calendar.service.ts index d42f03f5..bdd8e4d4 100644 --- a/src/app/main/content/apps/calendar/calendar.service.ts +++ b/src/app/main/content/apps/calendar/calendar.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; +import { Observable, Subject } from 'rxjs'; @Injectable() export class CalendarService implements Resolve diff --git a/src/app/main/content/apps/chat/chat.service.ts b/src/app/main/content/apps/chat/chat.service.ts index bbed4ee5..3a80ec78 100644 --- a/src/app/main/content/apps/chat/chat.service.ts +++ b/src/app/main/content/apps/chat/chat.service.ts @@ -1,10 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { Subject } from 'rxjs/Subject'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable, Subject } from 'rxjs'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts b/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts index 21e2f942..7250c2b8 100644 --- a/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts +++ b/src/app/main/content/apps/chat/sidenavs/left/user/user.component.ts @@ -1,7 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { ChatService } from '../../../chat.service'; @@ -27,14 +26,14 @@ export class FuseChatUserSidenavComponent implements OnInit, OnDestroy ngOnInit() { - this.onFormChange = this.userForm.valueChanges - .debounceTime(500) - .distinctUntilChanged() - .subscribe(data => { - this.user.mood = data.mood; - this.user.status = data.status; - this.chatService.updateUserData(this.user); - }); + this.onFormChange = this.userForm.valueChanges.pipe( + debounceTime(500), + distinctUntilChanged() + ).subscribe(data => { + this.user.mood = data.mood; + this.user.status = data.status; + this.chatService.updateUserData(this.user); + }); } changeLeftSidenavView(view) diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts index ce35ee38..b41d1693 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts @@ -2,8 +2,7 @@ import { Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation import { FormGroup } from '@angular/forms'; import { MatDialog, MatDialogRef } from '@angular/material'; import { DataSource } from '@angular/cdk/collections'; -import { Subscription } from 'rxjs/Subscription'; -import { Observable } from 'rxjs/Observable'; +import { Observable, Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; diff --git a/src/app/main/content/apps/contacts/contacts.component.ts b/src/app/main/content/apps/contacts/contacts.component.ts index c18f2149..da705aad 100644 --- a/src/app/main/content/apps/contacts/contacts.component.ts +++ b/src/app/main/content/apps/contacts/contacts.component.ts @@ -1,10 +1,10 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; -import { Subscription } from 'rxjs/Subscription'; import { MatDialog } from '@angular/material'; +import { Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; + import { fuseAnimations } from '@fuse/animations'; import { FuseContactsContactFormDialogComponent } from './contact-form/contact-form.component'; @@ -63,8 +63,10 @@ export class FuseContactsComponent implements OnInit, OnDestroy }); this.searchInput.valueChanges - .debounceTime(300) - .distinctUntilChanged() + .pipe( + debounceTime(300), + distinctUntilChanged() + ) .subscribe(searchText => { this.contactsService.onSearchTextChanged.next(searchText); }); diff --git a/src/app/main/content/apps/contacts/contacts.service.ts b/src/app/main/content/apps/contacts/contacts.service.ts index f34055ec..66563638 100644 --- a/src/app/main/content/apps/contacts/contacts.service.ts +++ b/src/app/main/content/apps/contacts/contacts.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; -import { Subject } from 'rxjs/Subject'; +import { BehaviorSubject, Observable, Subject } from 'rxjs'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/contacts/sidenavs/main/main.component.ts b/src/app/main/content/apps/contacts/sidenavs/main/main.component.ts index ee1ec293..de4b2275 100644 --- a/src/app/main/content/apps/contacts/sidenavs/main/main.component.ts +++ b/src/app/main/content/apps/contacts/sidenavs/main/main.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { ContactsService } from '../../contacts.service'; diff --git a/src/app/main/content/apps/dashboards/analytics/analytics.service.ts b/src/app/main/content/apps/dashboards/analytics/analytics.service.ts index cceb7cbe..47d3097c 100644 --- a/src/app/main/content/apps/dashboards/analytics/analytics.service.ts +++ b/src/app/main/content/apps/dashboards/analytics/analytics.service.ts @@ -1,8 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; @Injectable() export class AnalyticsDashboardService implements Resolve diff --git a/src/app/main/content/apps/dashboards/project/project.component.ts b/src/app/main/content/apps/dashboards/project/project.component.ts index b6ed6bf6..deeadfff 100644 --- a/src/app/main/content/apps/dashboards/project/project.component.ts +++ b/src/app/main/content/apps/dashboards/project/project.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { DataSource } from '@angular/cdk/collections'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; -import { Observable } from 'rxjs/Observable'; +import { BehaviorSubject, Observable } from 'rxjs'; + import * as shape from 'd3-shape'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/dashboards/project/project.service.ts b/src/app/main/content/apps/dashboards/project/project.service.ts index 05010603..a1ee2128 100644 --- a/src/app/main/content/apps/dashboards/project/project.service.ts +++ b/src/app/main/content/apps/dashboards/project/project.service.ts @@ -1,8 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; @Injectable() export class ProjectDashboardService implements Resolve diff --git a/src/app/main/content/apps/e-commerce/dashboard/dashboard.service.ts b/src/app/main/content/apps/e-commerce/dashboard/dashboard.service.ts index 3011c989..8810da76 100644 --- a/src/app/main/content/apps/e-commerce/dashboard/dashboard.service.ts +++ b/src/app/main/content/apps/e-commerce/dashboard/dashboard.service.ts @@ -1,8 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; @Injectable() export class EcommerceDashboardService implements Resolve diff --git a/src/app/main/content/apps/e-commerce/order/order.component.ts b/src/app/main/content/apps/e-commerce/order/order.component.ts index 9117ab84..be7260a3 100644 --- a/src/app/main/content/apps/e-commerce/order/order.component.ts +++ b/src/app/main/content/apps/e-commerce/order/order.component.ts @@ -1,12 +1,6 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import 'rxjs/add/operator/startWith'; -import 'rxjs/add/observable/merge'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; -import 'rxjs/add/observable/fromEvent'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/e-commerce/order/order.service.ts b/src/app/main/content/apps/e-commerce/order/order.service.ts index 061302dc..b1f74180 100644 --- a/src/app/main/content/apps/e-commerce/order/order.service.ts +++ b/src/app/main/content/apps/e-commerce/order/order.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class EcommerceOrderService implements Resolve diff --git a/src/app/main/content/apps/e-commerce/orders/orders.component.ts b/src/app/main/content/apps/e-commerce/orders/orders.component.ts index a2e23a0b..abc86808 100644 --- a/src/app/main/content/apps/e-commerce/orders/orders.component.ts +++ b/src/app/main/content/apps/e-commerce/orders/orders.component.ts @@ -1,14 +1,9 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { MatPaginator, MatSort } from '@angular/material'; import { DataSource } from '@angular/cdk/collections'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; -import 'rxjs/add/operator/startWith'; -import 'rxjs/add/observable/merge'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; -import 'rxjs/add/observable/fromEvent'; + +import { merge, Observable, BehaviorSubject, fromEvent } from 'rxjs'; +import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'; import { fuseAnimations } from '@fuse/animations'; import { FuseUtils } from '@fuse/utils'; @@ -40,16 +35,16 @@ export class FuseEcommerceOrdersComponent implements OnInit { this.dataSource = new FilesDataSource(this.ordersService, this.paginator, this.sort); - Observable.fromEvent(this.filter.nativeElement, 'keyup') - .debounceTime(150) - .distinctUntilChanged() - .subscribe(() => { - if ( !this.dataSource ) - { - return; - } - this.dataSource.filter = this.filter.nativeElement.value; - }); + fromEvent(this.filter.nativeElement, 'keyup').pipe( + debounceTime(150), + distinctUntilChanged() + ).subscribe(() => { + if ( !this.dataSource ) + { + return; + } + this.dataSource.filter = this.filter.nativeElement.value; + }); } } @@ -97,19 +92,22 @@ export class FilesDataSource extends DataSource this._filterChange, this._sort.sortChange ]; - return Observable.merge(...displayDataChanges).map(() => { - let data = this.ordersService.orders.slice(); - data = this.filterData(data); + return merge(...displayDataChanges).pipe(map(() => { - this.filteredData = [...data]; + let data = this.ordersService.orders.slice(); - data = this.sortData(data); + data = this.filterData(data); - // Grab the page's slice of data. - const startIndex = this._paginator.pageIndex * this._paginator.pageSize; - return data.splice(startIndex, this._paginator.pageSize); - }); + this.filteredData = [...data]; + + data = this.sortData(data); + + // Grab the page's slice of data. + const startIndex = this._paginator.pageIndex * this._paginator.pageSize; + return data.splice(startIndex, this._paginator.pageSize); + }) + ); } diff --git a/src/app/main/content/apps/e-commerce/orders/orders.service.ts b/src/app/main/content/apps/e-commerce/orders/orders.service.ts index 96786444..4ade65c8 100644 --- a/src/app/main/content/apps/e-commerce/orders/orders.service.ts +++ b/src/app/main/content/apps/e-commerce/orders/orders.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class EcommerceOrdersService implements Resolve diff --git a/src/app/main/content/apps/e-commerce/product/product.component.ts b/src/app/main/content/apps/e-commerce/product/product.component.ts index e0049456..76eba648 100644 --- a/src/app/main/content/apps/e-commerce/product/product.component.ts +++ b/src/app/main/content/apps/e-commerce/product/product.component.ts @@ -1,14 +1,7 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; - -import 'rxjs/add/operator/startWith'; -import 'rxjs/add/observable/merge'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; -import 'rxjs/add/observable/fromEvent'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/e-commerce/product/product.service.ts b/src/app/main/content/apps/e-commerce/product/product.service.ts index 8c19b01f..50f4aa73 100644 --- a/src/app/main/content/apps/e-commerce/product/product.service.ts +++ b/src/app/main/content/apps/e-commerce/product/product.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class EcommerceProductService implements Resolve diff --git a/src/app/main/content/apps/e-commerce/products/products.component.ts b/src/app/main/content/apps/e-commerce/products/products.component.ts index a463f200..4b36e25f 100644 --- a/src/app/main/content/apps/e-commerce/products/products.component.ts +++ b/src/app/main/content/apps/e-commerce/products/products.component.ts @@ -2,14 +2,8 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { MatPaginator, MatSort } from '@angular/material'; import { DataSource } from '@angular/cdk/collections'; -import 'rxjs/add/operator/startWith'; -import 'rxjs/add/observable/merge'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; -import 'rxjs/add/observable/fromEvent'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { merge, Observable, BehaviorSubject, fromEvent } from 'rxjs'; +import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'; import { fuseAnimations } from '@fuse/animations'; import { FuseUtils } from '@fuse/utils'; @@ -40,16 +34,18 @@ export class FuseEcommerceProductsComponent implements OnInit ngOnInit() { this.dataSource = new FilesDataSource(this.productsService, this.paginator, this.sort); - Observable.fromEvent(this.filter.nativeElement, 'keyup') - .debounceTime(150) - .distinctUntilChanged() - .subscribe(() => { - if ( !this.dataSource ) - { - return; - } - this.dataSource.filter = this.filter.nativeElement.value; - }); + + fromEvent(this.filter.nativeElement, 'keyup').pipe( + debounceTime(150), + distinctUntilChanged() + ).subscribe(() => { + if ( !this.dataSource ) + { + return; + } + + this.dataSource.filter = this.filter.nativeElement.value; + }); } } @@ -98,19 +94,21 @@ export class FilesDataSource extends DataSource this._sort.sortChange ]; - return Observable.merge(...displayDataChanges).map(() => { - let data = this.productsService.products.slice(); + return merge(...displayDataChanges).pipe(map(() => { - data = this.filterData(data); + let data = this.productsService.products.slice(); - this.filteredData = [...data]; + data = this.filterData(data); - data = this.sortData(data); + this.filteredData = [...data]; - // Grab the page's slice of data. - const startIndex = this._paginator.pageIndex * this._paginator.pageSize; - return data.splice(startIndex, this._paginator.pageSize); - }); + data = this.sortData(data); + + // Grab the page's slice of data. + const startIndex = this._paginator.pageIndex * this._paginator.pageSize; + return data.splice(startIndex, this._paginator.pageSize); + } + )); } filterData(data) @@ -122,7 +120,9 @@ export class FilesDataSource extends DataSource return FuseUtils.filterArrayByString(data, this.filter); } - sortData(data): any[] + sortData(data) + : + any[] { if ( !this._sort.active || this._sort.direction === '' ) { diff --git a/src/app/main/content/apps/e-commerce/products/products.service.ts b/src/app/main/content/apps/e-commerce/products/products.service.ts index 2ce1c44e..7b48839f 100644 --- a/src/app/main/content/apps/e-commerce/products/products.service.ts +++ b/src/app/main/content/apps/e-commerce/products/products.service.ts @@ -1,8 +1,7 @@ import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs/Observable'; import { HttpClient } from '@angular/common/http'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class EcommerceProductsService implements Resolve diff --git a/src/app/main/content/apps/file-manager/file-list/file-list.component.ts b/src/app/main/content/apps/file-manager/file-list/file-list.component.ts index 22643031..e60a133e 100644 --- a/src/app/main/content/apps/file-manager/file-list/file-list.component.ts +++ b/src/app/main/content/apps/file-manager/file-list/file-list.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { DataSource } from '@angular/cdk/collections'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { FileManagerService } from '../file-manager.service'; import { fuseAnimations } from '@fuse/animations/index'; diff --git a/src/app/main/content/apps/file-manager/file-manager.service.ts b/src/app/main/content/apps/file-manager/file-manager.service.ts index d555a06c..0ef8bf8d 100644 --- a/src/app/main/content/apps/file-manager/file-manager.service.ts +++ b/src/app/main/content/apps/file-manager/file-manager.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { Observable, BehaviorSubject } from 'rxjs'; @Injectable() export class FileManagerService implements Resolve diff --git a/src/app/main/content/apps/mail-ngrx/mail-details/mail-details.component.ts b/src/app/main/content/apps/mail-ngrx/mail-details/mail-details.component.ts index e53cfb4a..f3640888 100644 --- a/src/app/main/content/apps/mail-ngrx/mail-details/mail-details.component.ts +++ b/src/app/main/content/apps/mail-ngrx/mail-details/mail-details.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { Mail } from '../mail.model'; import * as fromStore from '../store'; diff --git a/src/app/main/content/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts b/src/app/main/content/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts index a6f3e792..f4a2d719 100644 --- a/src/app/main/content/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts +++ b/src/app/main/content/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Input, OnInit } from '@angular/core'; import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs/Observable'; +import { Observable } from 'rxjs'; import { MailNgrxService } from '../../mail.service'; import { Mail } from '../../mail.model'; diff --git a/src/app/main/content/apps/mail-ngrx/mail.component.ts b/src/app/main/content/apps/mail-ngrx/mail.component.ts index 6a154721..ad1f6952 100644 --- a/src/app/main/content/apps/mail-ngrx/mail.component.ts +++ b/src/app/main/content/apps/mail-ngrx/mail.component.ts @@ -1,9 +1,10 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; + import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; + +import { Observable } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { FuseTranslationLoaderService } from '@fuse/services/translation-loader.service'; import { FuseConfigService } from '@fuse/services/config.service'; @@ -76,12 +77,12 @@ export class FuseMailNgrxComponent implements OnInit, OnDestroy this.searchInput.setValue(searchText); }); - this.searchInput.valueChanges - .debounceTime(300) - .distinctUntilChanged() - .subscribe(searchText => { - this.store.dispatch(new fromStore.SetSearchText(searchText)); - }); + this.searchInput.valueChanges.pipe( + debounceTime(300), + distinctUntilChanged() + ).subscribe(searchText => { + this.store.dispatch(new fromStore.SetSearchText(searchText)); + }); } ngOnDestroy() diff --git a/src/app/main/content/apps/mail-ngrx/mail.service.ts b/src/app/main/content/apps/mail-ngrx/mail.service.ts index e02c78dd..99776059 100644 --- a/src/app/main/content/apps/mail-ngrx/mail.service.ts +++ b/src/app/main/content/apps/mail-ngrx/mail.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; import { HttpClient } from '@angular/common/http'; -import { Mail } from './mail.model'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { Store } from '@ngrx/store'; +import { Observable } from 'rxjs'; + +import { Mail } from './mail.model'; import { MailAppState } from './store/reducers'; import { getFiltersArr, getFoldersArr, getLabelsArr, getMailsArr } from './store/selectors'; diff --git a/src/app/main/content/apps/mail-ngrx/sidenavs/main/main-sidenav.component.ts b/src/app/main/content/apps/mail-ngrx/sidenavs/main/main-sidenav.component.ts index d8cf1fb2..742a497d 100644 --- a/src/app/main/content/apps/mail-ngrx/sidenavs/main/main-sidenav.component.ts +++ b/src/app/main/content/apps/mail-ngrx/sidenavs/main/main-sidenav.component.ts @@ -1,9 +1,8 @@ import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material'; import { FormGroup } from '@angular/forms'; - -import { Observable } from 'rxjs/Observable'; import { Store } from '@ngrx/store'; +import { Observable } from 'rxjs'; import { MailNgrxService } from '../../mail.service'; import * as fromStore from './../../store'; diff --git a/src/app/main/content/apps/mail-ngrx/store/effects/filters.effects.ts b/src/app/main/content/apps/mail-ngrx/store/effects/filters.effects.ts index 2a073f88..6caaa85a 100644 --- a/src/app/main/content/apps/mail-ngrx/store/effects/filters.effects.ts +++ b/src/app/main/content/apps/mail-ngrx/store/effects/filters.effects.ts @@ -1,10 +1,9 @@ import { Injectable } from '@angular/core'; import { Actions, Effect } from '@ngrx/effects'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/delay'; -import 'rxjs/add/operator/map'; -import { of } from 'rxjs/observable/of'; + +import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; + import * as FiltersActions from '../actions/filters.actions'; import { MailNgrxService } from '../../mail.service'; diff --git a/src/app/main/content/apps/mail-ngrx/store/effects/folders.effects.ts b/src/app/main/content/apps/mail-ngrx/store/effects/folders.effects.ts index a89270c2..a3d439b4 100644 --- a/src/app/main/content/apps/mail-ngrx/store/effects/folders.effects.ts +++ b/src/app/main/content/apps/mail-ngrx/store/effects/folders.effects.ts @@ -1,10 +1,9 @@ import { Injectable } from '@angular/core'; import { Actions, Effect } from '@ngrx/effects'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/delay'; -import 'rxjs/add/operator/map'; -import { of } from 'rxjs/observable/of'; + +import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; + import * as FoldersActions from '../actions/folders.actions'; import { MailNgrxService } from '../../mail.service'; diff --git a/src/app/main/content/apps/mail-ngrx/store/effects/labels.effects.ts b/src/app/main/content/apps/mail-ngrx/store/effects/labels.effects.ts index 24d4b3f2..f755b28b 100644 --- a/src/app/main/content/apps/mail-ngrx/store/effects/labels.effects.ts +++ b/src/app/main/content/apps/mail-ngrx/store/effects/labels.effects.ts @@ -1,10 +1,9 @@ import { Injectable } from '@angular/core'; import { Actions, Effect } from '@ngrx/effects'; -import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/operator/delay'; -import 'rxjs/add/operator/map'; -import { of } from 'rxjs/observable/of'; + +import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; + import * as LabelsActions from '../actions/labels.actions'; import { MailNgrxService } from '../../mail.service'; diff --git a/src/app/main/content/apps/mail-ngrx/store/effects/mails.effects.ts b/src/app/main/content/apps/mail-ngrx/store/effects/mails.effects.ts index 2c049c20..beeef436 100644 --- a/src/app/main/content/apps/mail-ngrx/store/effects/mails.effects.ts +++ b/src/app/main/content/apps/mail-ngrx/store/effects/mails.effects.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; import { Action, Store } from '@ngrx/store'; import { Actions, Effect } from '@ngrx/effects'; -import { Observable, of } from 'rxjs'; -import { catchError, map, mergeMap, exhaustMap, withLatestFrom } from 'rxjs/operators'; -import 'rxjs/add/operator/debounceTime'; + +import { Observable, of, forkJoin } from 'rxjs'; +import { catchError, debounceTime, map, mergeMap, exhaustMap, withLatestFrom } from 'rxjs/operators'; import { getRouterState, State } from 'app/store/reducers'; import { getMailsState } from '../selectors'; @@ -83,10 +83,11 @@ export class MailsEffect .ofType(MailsActions.UPDATE_MAIL) .pipe( exhaustMap((action) => { - return this.mailService.updateMail(action.payload) - .map(() => { - return new MailsActions.UpdateMailSuccess(action.payload); - }); + return this.mailService.updateMail(action.payload).pipe( + map(() => { + return new MailsActions.UpdateMailSuccess(action.payload); + }) + ); }) ); @@ -100,7 +101,7 @@ export class MailsEffect .ofType(MailsActions.UPDATE_MAILS) .pipe( exhaustMap((action) => { - return Observable.forkJoin( + return forkJoin( action.payload.map(mail => this.mailService.updateMail(mail)), () => { return new MailsActions.UpdateMailsSuccess(); @@ -182,8 +183,8 @@ export class MailsEffect updateMailSuccess: Observable = this.actions .ofType(MailsActions.UPDATE_MAIL_SUCCESS) - .debounceTime(500) .pipe( + debounceTime(500), map(() => { return new MailsActions.GetMails(); }) diff --git a/src/app/main/content/apps/mail-ngrx/store/guards/resolve.guard.ts b/src/app/main/content/apps/mail-ngrx/store/guards/resolve.guard.ts index 703496df..2102ec33 100644 --- a/src/app/main/content/apps/mail-ngrx/store/guards/resolve.guard.ts +++ b/src/app/main/content/apps/mail-ngrx/store/guards/resolve.guard.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, CanActivate } from '@angular/router'; import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs/Observable'; -import { of } from 'rxjs/observable/of'; + +import { Observable, forkJoin, of } from 'rxjs'; import { map, switchMap, catchError, tap, take, filter } from 'rxjs/operators'; -import 'rxjs/add/observable/forkJoin'; + import { MailAppState } from '../reducers'; import * as fromStore from '../index'; import { getFiltersLoaded, getFoldersLoaded, getLabelsLoaded, getMailsLoaded } from '../selectors'; @@ -38,8 +38,7 @@ export class ResolveGuard implements CanActivate checkStore(): Observable { - return Observable - .forkJoin( + return forkJoin( this.getFolders(), this.getFilters(), this.getLabels() diff --git a/src/app/main/content/apps/mail/mail-details/mail-details.component.ts b/src/app/main/content/apps/mail/mail-details/mail-details.component.ts index a990e496..4f1c4885 100644 --- a/src/app/main/content/apps/mail/mail-details/mail-details.component.ts +++ b/src/app/main/content/apps/mail/mail-details/mail-details.component.ts @@ -1,5 +1,5 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts b/src/app/main/content/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts index 5062a48d..5122fc5c 100644 --- a/src/app/main/content/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts +++ b/src/app/main/content/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts @@ -1,5 +1,5 @@ import { Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { Mail } from '../../mail.model'; import { MailService } from '../../mail.service'; diff --git a/src/app/main/content/apps/mail/mail-list/mail-list.component.ts b/src/app/main/content/apps/mail/mail-list/mail-list.component.ts index d2e7b177..be4341d5 100644 --- a/src/app/main/content/apps/mail/mail-list/mail-list.component.ts +++ b/src/app/main/content/apps/mail/mail-list/mail-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Location } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/mail/mail.component.ts b/src/app/main/content/apps/mail/mail.component.ts index 0a9fa26a..c8bdc84c 100644 --- a/src/app/main/content/apps/mail/mail.component.ts +++ b/src/app/main/content/apps/mail/mail.component.ts @@ -1,8 +1,8 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { Subscription } from 'rxjs/Subscription'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; + +import { Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { FuseTranslationLoaderService } from '@fuse/services/translation-loader.service'; @@ -84,9 +84,10 @@ export class FuseMailComponent implements OnInit, OnDestroy } }); - this.searchInput.valueChanges - .debounceTime(300) - .distinctUntilChanged() + this.searchInput.valueChanges.pipe( + debounceTime(300), + distinctUntilChanged() + ) .subscribe(searchText => { this.mailService.onSearchTextChanged.next(searchText); }); diff --git a/src/app/main/content/apps/mail/mail.service.ts b/src/app/main/content/apps/mail/mail.service.ts index c0504eeb..de0c7d50 100644 --- a/src/app/main/content/apps/mail/mail.service.ts +++ b/src/app/main/content/apps/mail/mail.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.ts b/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.ts index 395c27fc..f086c281 100644 --- a/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.ts +++ b/src/app/main/content/apps/mail/sidenavs/main/main-sidenav.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { MatDialog } from '@angular/material'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/scrumboard/board/board.component.ts b/src/app/main/content/apps/scrumboard/board/board.component.ts index 41b9f463..85ac0bc8 100644 --- a/src/app/main/content/apps/scrumboard/board/board.component.ts +++ b/src/app/main/content/apps/scrumboard/board/board.component.ts @@ -1,7 +1,8 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Location } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts index 95d41eaf..a8c8dff9 100644 --- a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts +++ b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts @@ -1,7 +1,8 @@ import { Component, Inject, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { NgForm } from '@angular/forms/src/forms'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef, MatMenuTrigger } from '@angular/material'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts b/src/app/main/content/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts index 81245553..3008a485 100644 --- a/src/app/main/content/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts +++ b/src/app/main/content/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts @@ -1,5 +1,6 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/apps/scrumboard/board/list/list.component.ts b/src/app/main/content/apps/scrumboard/board/list/list.component.ts index 6d637ab5..d90ecc5e 100644 --- a/src/app/main/content/apps/scrumboard/board/list/list.component.ts +++ b/src/app/main/content/apps/scrumboard/board/list/list.component.ts @@ -1,7 +1,8 @@ import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { MatDialog, MatDialogRef } from '@angular/material'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts index 9f7483ab..f5f0f0f6 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts @@ -1,5 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { MatColors } from '@fuse/mat-colors'; diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.ts b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.ts index 9abc1d1e..f7ead963 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.ts +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.ts @@ -1,5 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/scrumboard/scrumboard.component.ts b/src/app/main/content/apps/scrumboard/scrumboard.component.ts index 6c96c7d4..f06d1b04 100644 --- a/src/app/main/content/apps/scrumboard/scrumboard.component.ts +++ b/src/app/main/content/apps/scrumboard/scrumboard.component.ts @@ -1,6 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/scrumboard/scrumboard.service.ts b/src/app/main/content/apps/scrumboard/scrumboard.service.ts index 89f88803..f541dce1 100644 --- a/src/app/main/content/apps/scrumboard/scrumboard.service.ts +++ b/src/app/main/content/apps/scrumboard/scrumboard.service.ts @@ -2,8 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { Observable, BehaviorSubject } from 'rxjs'; @Injectable() export class ScrumboardService implements Resolve diff --git a/src/app/main/content/apps/todo/sidenavs/main/main-sidenav.component.ts b/src/app/main/content/apps/todo/sidenavs/main/main-sidenav.component.ts index 3026f1fa..6ec21dc7 100644 --- a/src/app/main/content/apps/todo/sidenavs/main/main-sidenav.component.ts +++ b/src/app/main/content/apps/todo/sidenavs/main/main-sidenav.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/todo/todo-details/todo-details.component.ts b/src/app/main/content/apps/todo/todo-details/todo-details.component.ts index 6acf10e5..ca4fe2af 100644 --- a/src/app/main/content/apps/todo/todo-details/todo-details.component.ts +++ b/src/app/main/content/apps/todo/todo-details/todo-details.component.ts @@ -1,8 +1,8 @@ import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { Subscription } from 'rxjs/Subscription'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; + +import { Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { FuseUtils } from '@fuse/utils'; import { fuseAnimations } from '@fuse/animations'; @@ -53,12 +53,12 @@ export class FuseTodoDetailsComponent implements OnInit, OnDestroy this.todoForm = this.createTodoForm(); this.onFormChange = - this.todoForm.valueChanges - .debounceTime(500) - .distinctUntilChanged() - .subscribe(data => { - this.todoService.updateTodo(data); - }); + this.todoForm.valueChanges.pipe( + debounceTime(500), + distinctUntilChanged() + ).subscribe(data => { + this.todoService.updateTodo(data); + }); } }); diff --git a/src/app/main/content/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts b/src/app/main/content/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts index a03c0a23..c5e7caf5 100644 --- a/src/app/main/content/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts +++ b/src/app/main/content/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts @@ -1,6 +1,6 @@ import { Component, HostBinding, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { Todo } from '../../todo.model'; import { TodoService } from '../../todo.service'; diff --git a/src/app/main/content/apps/todo/todo-list/todo-list.component.ts b/src/app/main/content/apps/todo/todo-list/todo-list.component.ts index 825b99cd..57bcccbb 100644 --- a/src/app/main/content/apps/todo/todo-list/todo-list.component.ts +++ b/src/app/main/content/apps/todo/todo-list/todo-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Location } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { fuseAnimations } from '@fuse/animations'; diff --git a/src/app/main/content/apps/todo/todo.component.ts b/src/app/main/content/apps/todo/todo.component.ts index 6e69a48b..72088b7f 100644 --- a/src/app/main/content/apps/todo/todo.component.ts +++ b/src/app/main/content/apps/todo/todo.component.ts @@ -1,8 +1,8 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { Subscription } from 'rxjs/Subscription'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; + +import { Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { fuseAnimations } from '@fuse/animations'; @@ -58,12 +58,12 @@ export class FuseTodoComponent implements OnInit, OnDestroy this.tags = this.todoService.tags; }); - this.searchInput.valueChanges - .debounceTime(300) - .distinctUntilChanged() - .subscribe(searchText => { - this.todoService.onSearchTextChanged.next(searchText); - }); + this.searchInput.valueChanges.pipe( + debounceTime(300), + distinctUntilChanged() + ).subscribe(searchText => { + this.todoService.onSearchTextChanged.next(searchText); + }); this.onCurrentTodoChanged = this.todoService.onCurrentTodoChanged @@ -86,7 +86,7 @@ export class FuseTodoComponent implements OnInit, OnDestroy this.onTagsChanged.unsubscribe(); this.onCurrentTodoChanged.unsubscribe(); } - + deSelectCurrentTodo() { this.todoService.onCurrentTodoChanged.next([null, null]); diff --git a/src/app/main/content/apps/todo/todo.service.ts b/src/app/main/content/apps/todo/todo.service.ts index 5741c08d..198fb484 100644 --- a/src/app/main/content/apps/todo/todo.service.ts +++ b/src/app/main/content/apps/todo/todo.service.ts @@ -2,9 +2,7 @@ import { Injectable } from '@angular/core'; import { Location } from '@angular/common'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; -import { Subject } from 'rxjs/Subject'; +import { BehaviorSubject, Observable, Subject } from 'rxjs'; import { FuseUtils } from '@fuse/utils'; diff --git a/src/app/main/content/components/angular-material/example-viewer/example-viewer.ts b/src/app/main/content/components/angular-material/example-viewer/example-viewer.ts index 4ce317b8..1ba7cda1 100644 --- a/src/app/main/content/components/angular-material/example-viewer/example-viewer.ts +++ b/src/app/main/content/components/angular-material/example-viewer/example-viewer.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Component, ComponentFactoryResolver, ComponentRef, Input, OnDestroy, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; import { MatSnackBar } from '@angular/material'; -import 'rxjs/add/operator/first'; + import 'prismjs/components/prism-scss'; import 'prismjs/components/prism-typescript'; diff --git a/src/app/main/content/content.component.ts b/src/app/main/content/content.component.ts index 7cfca410..1f2aedee 100644 --- a/src/app/main/content/content.component.ts +++ b/src/app/main/content/content.component.ts @@ -1,9 +1,8 @@ import { Component, HostBinding, OnDestroy } from '@angular/core'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; -import 'rxjs/add/operator/filter'; -import 'rxjs/add/operator/map'; +import { Subscription } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; import { fuseAnimations } from '@fuse/animations/index'; import { FuseConfigService } from '@fuse/services/config.service'; @@ -31,29 +30,29 @@ export class FuseContentComponent implements OnDestroy private fuseConfig: FuseConfigService ) { - this.router.events - .filter((event) => event instanceof NavigationEnd) - .map(() => this.activatedRoute) - .subscribe((event) => { - switch ( this.fuseSettings.routerAnimation ) - { - case 'fadeIn': - this.routeAnimationFade = !this.routeAnimationFade; - break; - case 'slideUp': - this.routeAnimationUp = !this.routeAnimationUp; - break; - case 'slideDown': - this.routeAnimationDown = !this.routeAnimationDown; - break; - case 'slideRight': - this.routeAnimationRight = !this.routeAnimationRight; - break; - case 'slideLeft': - this.routeAnimationLeft = !this.routeAnimationLeft; - break; - } - }); + this.router.events.pipe( + filter((event) => event instanceof NavigationEnd), + map(() => this.activatedRoute) + ).subscribe((event) => { + switch ( this.fuseSettings.routerAnimation ) + { + case 'fadeIn': + this.routeAnimationFade = !this.routeAnimationFade; + break; + case 'slideUp': + this.routeAnimationUp = !this.routeAnimationUp; + break; + case 'slideDown': + this.routeAnimationDown = !this.routeAnimationDown; + break; + case 'slideRight': + this.routeAnimationRight = !this.routeAnimationRight; + break; + case 'slideLeft': + this.routeAnimationLeft = !this.routeAnimationLeft; + break; + } + }); this.onConfigChanged = this.fuseConfig.onConfigChanged diff --git a/src/app/main/content/pages/faq/faq.component.ts b/src/app/main/content/pages/faq/faq.component.ts index 81925d2d..8967098b 100644 --- a/src/app/main/content/pages/faq/faq.component.ts +++ b/src/app/main/content/pages/faq/faq.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { Subscription } from 'rxjs/Subscription'; -import 'rxjs/add/operator/debounceTime'; -import 'rxjs/add/operator/distinctUntilChanged'; + +import { Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { FuseUtils } from '@fuse/utils'; @@ -35,12 +35,12 @@ export class FuseFaqComponent implements OnInit, OnDestroy this.faqsFiltered = response; }); - this.searchInput.valueChanges - .debounceTime(300) - .distinctUntilChanged() - .subscribe(searchText => { - this.faqsFiltered = FuseUtils.filterArrayByString(this.faqs, searchText); - }); + this.searchInput.valueChanges.pipe( + debounceTime(300), + distinctUntilChanged() + ).subscribe(searchText => { + this.faqsFiltered = FuseUtils.filterArrayByString(this.faqs, searchText); + }); } ngOnDestroy() diff --git a/src/app/main/content/pages/faq/faq.service.ts b/src/app/main/content/pages/faq/faq.service.ts index 57e22856..4096ce1d 100644 --- a/src/app/main/content/pages/faq/faq.service.ts +++ b/src/app/main/content/pages/faq/faq.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class FaqService implements Resolve diff --git a/src/app/main/content/pages/invoices/invoice.service.ts b/src/app/main/content/pages/invoices/invoice.service.ts index 0a55fcf5..3971bbc6 100644 --- a/src/app/main/content/pages/invoices/invoice.service.ts +++ b/src/app/main/content/pages/invoices/invoice.service.ts @@ -1,9 +1,8 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; +import { BehaviorSubject, Observable } from 'rxjs'; -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; @Injectable() export class InvoiceService implements Resolve diff --git a/src/app/main/content/pages/knowledge-base/knowledge-base.component.ts b/src/app/main/content/pages/knowledge-base/knowledge-base.component.ts index 9828bd6c..8d34064e 100644 --- a/src/app/main/content/pages/knowledge-base/knowledge-base.component.ts +++ b/src/app/main/content/pages/knowledge-base/knowledge-base.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, OnDestroy, ViewEncapsulation} from '@angular/core'; import { MatDialog } from '@angular/material'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { KnowledgeBaseService } from './knowledge-base.service'; import { FuseKnowledgeBaseArticleComponent } from './dialogs/article/article.component'; diff --git a/src/app/main/content/pages/knowledge-base/knowledge-base.service.ts b/src/app/main/content/pages/knowledge-base/knowledge-base.service.ts index 73292010..b935464d 100644 --- a/src/app/main/content/pages/knowledge-base/knowledge-base.service.ts +++ b/src/app/main/content/pages/knowledge-base/knowledge-base.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class KnowledgeBaseService implements Resolve diff --git a/src/app/main/content/pages/profile/profile.service.ts b/src/app/main/content/pages/profile/profile.service.ts index 1c4029b5..da019606 100644 --- a/src/app/main/content/pages/profile/profile.service.ts +++ b/src/app/main/content/pages/profile/profile.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class ProfileService implements Resolve diff --git a/src/app/main/content/pages/search/search.service.ts b/src/app/main/content/pages/search/search.service.ts index 5ca0277a..f328e7c7 100644 --- a/src/app/main/content/pages/search/search.service.ts +++ b/src/app/main/content/pages/search/search.service.ts @@ -1,9 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; - -import { Observable } from 'rxjs/Observable'; -import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class SearchService implements Resolve diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index ff4714b0..add7433a 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, HostBinding, Inject, OnDestroy, Renderer2, ViewEncapsulation } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { Platform } from '@angular/cdk/platform'; -import { Subscription } from 'rxjs/Subscription'; +import { Subscription } from 'rxjs'; import { FuseConfigService } from '@fuse/services/config.service'; diff --git a/src/app/main/navbar/navbar.component.ts b/src/app/main/navbar/navbar.component.ts index 2055e6cc..340ba35d 100644 --- a/src/app/main/navbar/navbar.component.ts +++ b/src/app/main/navbar/navbar.component.ts @@ -1,6 +1,7 @@ import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { NavigationEnd, Router } from '@angular/router'; -import { Subscription } from 'rxjs/Subscription'; + +import { Subscription } from 'rxjs'; import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';