diff --git a/src/@fuse/components/sidebar/sidebar.component.ts b/src/@fuse/components/sidebar/sidebar.component.ts index 66c55c55..dccd90e1 100644 --- a/src/@fuse/components/sidebar/sidebar.component.ts +++ b/src/@fuse/components/sidebar/sidebar.component.ts @@ -1,4 +1,6 @@ -import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, RendererStyleFlags2, ViewEncapsulation } from '@angular/core'; +import { + ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, RendererStyleFlags2, ViewEncapsulation +} from '@angular/core'; import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations'; import { ObservableMedia } from '@angular/flex-layout'; import { Subject } from 'rxjs'; diff --git a/src/@fuse/components/theme-options/theme-options.module.ts b/src/@fuse/components/theme-options/theme-options.module.ts index f9e6b043..68683798 100644 --- a/src/@fuse/components/theme-options/theme-options.module.ts +++ b/src/@fuse/components/theme-options/theme-options.module.ts @@ -2,7 +2,9 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FlexLayoutModule } from '@angular/flex-layout'; -import { MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule +} from '@angular/material'; import { FuseDirectivesModule } from '@fuse/directives/directives'; import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module'; 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 7b79144c..5e4f189d 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 @@ -15,11 +15,11 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy @HostBinding('class.mat-is-locked-open') isLockedOpen: boolean; - @Input('fuseMatSidenavHelper') + @Input() id: string; - @Input('mat-is-locked-open') - matIsLockedOpenBreakpoint: string; + @Input() + matIsLockedOpen: string; // Private private _unsubscribeAll: Subject; @@ -58,7 +58,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy // Register the sidenav to the service this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav); - if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) + if ( this._observableMedia.isActive(this.matIsLockedOpen) ) { this.isLockedOpen = true; this._matSidenav.mode = 'side'; @@ -74,7 +74,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy this._fuseMatchMediaService.onMediaChange .pipe(takeUntil(this._unsubscribeAll)) .subscribe(() => { - if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) + if ( this._observableMedia.isActive(this.matIsLockedOpen) ) { this.isLockedOpen = true; this._matSidenav.mode = 'side'; @@ -105,8 +105,8 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy }) export class FuseMatSidenavTogglerDirective { - @Input('fuseMatSidenavToggler') - id; + @Input() + id: string; /** * Constructor @@ -126,7 +126,7 @@ export class FuseMatSidenavTogglerDirective * On click */ @HostListener('click') - onClick() + onClick(): void { this._fuseMatSidenavHelperService.getSidenav(this.id).toggle(); } diff --git a/src/@fuse/mat-colors/index.ts b/src/@fuse/mat-colors/index.ts index e2fd17e2..504a3669 100644 --- a/src/@fuse/mat-colors/index.ts +++ b/src/@fuse/mat-colors/index.ts @@ -687,7 +687,23 @@ const matColors = { // tslint:disable-next-line const matPresetColors = [ - '#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0', '#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8', '#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7', '#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f', '#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1', '#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff', '#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4', '#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9', '#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581', '#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39', '#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d', '#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00', '#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40', '#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00', '#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5', '#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae', '#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64' + '#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0', + '#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8', + '#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7', + '#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f', + '#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1', + '#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff', + '#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4', + '#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9', + '#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581', + '#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39', + '#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d', + '#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00', + '#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40', + '#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00', + '#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5', + '#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae', + '#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64' ]; /** @@ -699,7 +715,7 @@ export class MatColors public static all = matColors; public static presets = matPresetColors; - public static getColor(colorName) + public static getColor(colorName): any { if ( matColors[colorName] ) { diff --git a/src/app/main/apps/calendar/calendar.module.ts b/src/app/main/apps/calendar/calendar.module.ts index 1e79e452..87be314e 100644 --- a/src/app/main/apps/calendar/calendar.module.ts +++ b/src/app/main/apps/calendar/calendar.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSlideToggleModule, MatToolbarModule, MatTooltipModule } from '@angular/material'; +import { + MatButtonModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatSlideToggleModule, MatToolbarModule, MatTooltipModule +} from '@angular/material'; import { ColorPickerModule } from 'ngx-color-picker'; import { CalendarModule as AngularCalendarModule } from 'angular-calendar'; diff --git a/src/app/main/apps/chat/chat.module.ts b/src/app/main/apps/chat/chat.module.ts index a54b46e5..b503003b 100644 --- a/src/app/main/apps/chat/chat.module.ts +++ b/src/app/main/apps/chat/chat.module.ts @@ -1,7 +1,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCardModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatRadioModule, MatSidenavModule, MatToolbarModule } from '@angular/material'; +import { + MatButtonModule, MatCardModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatRadioModule, MatSidenavModule, MatToolbarModule +} from '@angular/material'; import { FuseSharedModule } from '@fuse/shared.module'; @@ -17,10 +19,10 @@ import { ChatContactSidenavComponent } from 'app/main/apps/chat/sidenavs/right/c const routes: Routes = [ { - path : '**', + path: '**', component: ChatComponent, - children : [], - resolve : { + children: [], + resolve: { chat: ChatService } } diff --git a/src/app/main/apps/contacts/contacts.module.ts b/src/app/main/apps/contacts/contacts.module.ts index 1f4d3062..2a7be771 100644 --- a/src/app/main/apps/contacts/contacts.module.ts +++ b/src/app/main/apps/contacts/contacts.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatTableModule, MatToolbarModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatTableModule, MatToolbarModule +} from '@angular/material'; import { FuseSharedModule } from '@fuse/shared.module'; import { FuseConfirmDialogModule, FuseSidebarModule } from '@fuse/components'; diff --git a/src/app/main/apps/dashboards/analytics/analytics.component.ts b/src/app/main/apps/dashboards/analytics/analytics.component.ts index 41829f65..274f9ac0 100644 --- a/src/app/main/apps/dashboards/analytics/analytics.component.ts +++ b/src/app/main/apps/dashboards/analytics/analytics.component.ts @@ -53,7 +53,7 @@ export class AnalyticsDashboardComponent implements OnInit private _registerCustomChartJSPlugin(): void { (window).Chart.plugins.register({ - afterDatasetsDraw: function (chart, easing) { + afterDatasetsDraw: function (chart, easing): any { // Only activate the plugin if it's made available // in the options if ( @@ -67,11 +67,11 @@ export class AnalyticsDashboardComponent implements OnInit // To only draw at the end of animation, check for easing === 1 const ctx = chart.ctx; - chart.data.datasets.forEach(function (dataset, i) { + chart.data.datasets.forEach(function (dataset, i): any { const meta = chart.getDatasetMeta(i); if ( !meta.hidden ) { - meta.data.forEach(function (element, index) { + meta.data.forEach(function (element, index): any { // Draw the text in black, with the specified font ctx.fillStyle = 'rgba(255, 255, 255, 0.7)'; diff --git a/src/app/main/apps/e-commerce/e-commerce.module.ts b/src/app/main/apps/e-commerce/e-commerce.module.ts index d02ec632..8bb0f524 100644 --- a/src/app/main/apps/e-commerce/e-commerce.module.ts +++ b/src/app/main/apps/e-commerce/e-commerce.module.ts @@ -1,6 +1,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatChipsModule, MatFormFieldModule, MatIconModule, MatInputModule, MatPaginatorModule, MatRippleModule, MatSelectModule, MatSnackBarModule, MatSortModule, MatTableModule, MatTabsModule } from '@angular/material'; +import { + MatButtonModule, MatChipsModule, MatFormFieldModule, MatIconModule, MatInputModule, MatPaginatorModule, MatRippleModule, MatSelectModule, MatSnackBarModule, MatSortModule, + MatTableModule, MatTabsModule +} from '@angular/material'; import { NgxChartsModule } from '@swimlane/ngx-charts'; import { AgmCoreModule } from '@agm/core'; diff --git a/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts b/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts index f1ba2b2d..e07c1884 100644 --- a/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts +++ b/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges, ViewEncapsulation } from '@angular/core'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; @@ -15,8 +15,8 @@ import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; }) export class MailNgrxDetailsComponent implements OnChanges { - @Input('mail') - mailInput: Mail; + @Input() + currentMail: Mail; labels$: Observable; mail: Mail; @@ -34,7 +34,7 @@ export class MailNgrxDetailsComponent implements OnChanges ) { // Set the defaults - this.labels$ = this._store.select(fromStore.getLabelsArr); + this.labels$ = this._store.pipe(select(fromStore.getLabelsArr)); this.showDetails = false; } @@ -47,7 +47,7 @@ export class MailNgrxDetailsComponent implements OnChanges */ ngOnChanges(): void { - this.updateModel(this.mailInput); + this.updateModel(this.currentMail); this.markAsRead(); } diff --git a/src/app/main/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts b/src/app/main/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts index 219f3a00..dc1e7fd6 100644 --- a/src/app/main/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts +++ b/src/app/main/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Input, OnInit, ViewEncapsulation } from '@angular/core'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { MailNgrxService } from '../../mail.service'; @@ -21,18 +21,29 @@ export class MailNgrxListItemComponent implements OnInit labels$: Observable; selectedMailIds$: Observable; + /** + * Constructor + * + * @param {ChangeDetectorRef} _changeDetectorRef + * @param {MailNgrxService} _mailNgrxService + * @param {Store} _store + */ constructor( - private mailService: MailNgrxService, - private store: Store, - private cd: ChangeDetectorRef + private _changeDetectorRef: ChangeDetectorRef, + private _mailNgrxService: MailNgrxService, + private _store: Store ) { - this.labels$ = this.store.select(fromStore.getLabelsArr); - this.selectedMailIds$ = this.store.select(fromStore.getSelectedMailIds); + this.labels$ = this._store.pipe(select(fromStore.getLabelsArr)); + this.selectedMailIds$ = this._store.pipe(select(fromStore.getSelectedMailIds)); this.selected = false; } - ngOnInit() + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + ngOnInit(): void { // Set the initial values this.mail = new Mail(this.mail); @@ -44,13 +55,17 @@ export class MailNgrxListItemComponent implements OnInit }); } - refresh() + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + refresh(): void { - this.cd.markForCheck(); + this._changeDetectorRef.markForCheck(); } - onSelectedChange() + onSelectedChange(): void { - this.store.dispatch(new fromStore.ToggleInSelectedMails(this.mail.id)); + this._store.dispatch(new fromStore.ToggleInSelectedMails(this.mail.id)); } } diff --git a/src/app/main/apps/mail-ngrx/mail.component.html b/src/app/main/apps/mail-ngrx/mail.component.html index edb747a1..9b1fd4dd 100644 --- a/src/app/main/apps/mail-ngrx/mail.component.html +++ b/src/app/main/apps/mail-ngrx/mail.component.html @@ -95,7 +95,7 @@
- +
diff --git a/src/app/main/apps/mail-ngrx/mail.component.ts b/src/app/main/apps/mail-ngrx/mail.component.ts index 31debdae..9a8e078a 100644 --- a/src/app/main/apps/mail-ngrx/mail.component.ts +++ b/src/app/main/apps/mail-ngrx/mail.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { FormControl } from '@angular/forms'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; @@ -55,12 +55,12 @@ export class MailNgrxComponent implements OnInit, OnDestroy // Set the defaults this.searchInput = new FormControl(''); this._fuseTranslationLoaderService.loadTranslations(english, turkish); - this.currentMail$ = this._store.select(fromStore.getCurrentMail); - this.mails$ = this._store.select(fromStore.getMailsArr); - this.folders$ = this._store.select(fromStore.getFoldersArr); - this.labels$ = this._store.select(fromStore.getLabelsArr); - this.selectedMailIds$ = this._store.select(fromStore.getSelectedMailIds); - this.searchText$ = this._store.select(fromStore.getSearchText); + this.currentMail$ = this._store.pipe(select(fromStore.getCurrentMail)); + this.mails$ = this._store.pipe(select(fromStore.getMailsArr)); + this.folders$ = this._store.pipe(select(fromStore.getFoldersArr)); + this.labels$ = this._store.pipe(select(fromStore.getLabelsArr)); + this.selectedMailIds$ = this._store.pipe(select(fromStore.getSelectedMailIds)); + this.searchText$ = this._store.pipe(select(fromStore.getSearchText)); this.mails = []; this.selectedMailIds = []; } diff --git a/src/app/main/apps/mail-ngrx/mail.module.ts b/src/app/main/apps/mail-ngrx/mail.module.ts index 76474bbc..f713451c 100644 --- a/src/app/main/apps/mail-ngrx/mail.module.ts +++ b/src/app/main/apps/mail-ngrx/mail.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule, MatToolbarModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule, MatToolbarModule +} from '@angular/material'; import { TranslateModule } from '@ngx-translate/core'; import { FuseSharedModule } from '@fuse/shared.module'; diff --git a/src/app/main/apps/mail-ngrx/mail.service.ts b/src/app/main/apps/mail-ngrx/mail.service.ts index ec1a6aad..ec366c8b 100644 --- a/src/app/main/apps/mail-ngrx/mail.service.ts +++ b/src/app/main/apps/mail-ngrx/mail.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; @@ -27,21 +27,29 @@ export class MailNgrxService private _store: Store ) { - this._store.select(getFoldersArr).subscribe(folders => { - this.foldersArr = folders; - }); + this._store + .pipe(select(getFoldersArr)) + .subscribe(folders => { + this.foldersArr = folders; + }); - this._store.select(getFiltersArr).subscribe(filters => { - this.filtersArr = filters; - }); + this._store + .pipe(select(getFiltersArr)) + .subscribe(filters => { + this.filtersArr = filters; + }); - this._store.select(getLabelsArr).subscribe(labels => { - this.labelsArr = labels; - }); + this._store + .pipe(select(getLabelsArr)) + .subscribe(labels => { + this.labelsArr = labels; + }); - this._store.select(getMailsArr).subscribe(mails => { - this.mails = mails; - }); + this._store + .pipe(select(getMailsArr)) + .subscribe(mails => { + this.mails = mails; + }); this.selectedMails = []; } diff --git a/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts b/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts index d5a79929..d74bee68 100644 --- a/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts +++ b/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; import { MatDialog } from '@angular/material'; import { FormGroup } from '@angular/forms'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; @@ -45,9 +45,9 @@ export class MailNgrxMainSidebarComponent 'withinpixels': 'johndoe@withinpixels.com' }; this.selectedAccount = 'creapond'; - this.folders$ = this._store.select(fromStore.getFoldersArr); - this.filters$ = this._store.select(fromStore.getFiltersArr); - this.labels$ = this._store.select(fromStore.getLabelsArr); + this.folders$ = this._store.pipe(select(fromStore.getFoldersArr)); + this.filters$ = this._store.pipe(select(fromStore.getFiltersArr)); + this.labels$ = this._store.pipe(select(fromStore.getLabelsArr)); } // ----------------------------------------------------------------------------------------------------- diff --git a/src/app/main/apps/mail-ngrx/store/effects/filters.effects.ts b/src/app/main/apps/mail-ngrx/store/effects/filters.effects.ts index 2d3832b4..44f699d7 100644 --- a/src/app/main/apps/mail-ngrx/store/effects/filters.effects.ts +++ b/src/app/main/apps/mail-ngrx/store/effects/filters.effects.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Actions, Effect } from '@ngrx/effects'; +import { Actions, Effect, ofType } from '@ngrx/effects'; import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; @@ -24,8 +24,8 @@ export class FiltersEffect @Effect() getFilters: Observable = this.actions - .ofType(FiltersActions.GET_FILTERS) .pipe( + ofType(FiltersActions.GET_FILTERS), switchMap((action) => { return this.mailService.getFilters() .pipe( diff --git a/src/app/main/apps/mail-ngrx/store/effects/folders.effects.ts b/src/app/main/apps/mail-ngrx/store/effects/folders.effects.ts index aad0cdf1..c3234b6f 100644 --- a/src/app/main/apps/mail-ngrx/store/effects/folders.effects.ts +++ b/src/app/main/apps/mail-ngrx/store/effects/folders.effects.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Actions, Effect } from '@ngrx/effects'; +import { Actions, Effect, ofType } from '@ngrx/effects'; import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; @@ -24,8 +24,8 @@ export class FoldersEffect @Effect() getFolders: Observable = this.actions - .ofType(FoldersActions.GET_FOLDERS) .pipe( + ofType(FoldersActions.GET_FOLDERS), switchMap((action) => { return this.mailService.getFolders() .pipe( diff --git a/src/app/main/apps/mail-ngrx/store/effects/labels.effects.ts b/src/app/main/apps/mail-ngrx/store/effects/labels.effects.ts index 7f12bf28..4ae88e11 100644 --- a/src/app/main/apps/mail-ngrx/store/effects/labels.effects.ts +++ b/src/app/main/apps/mail-ngrx/store/effects/labels.effects.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Actions, Effect } from '@ngrx/effects'; +import { Actions, Effect, ofType } from '@ngrx/effects'; import { Observable, of } from 'rxjs'; import { catchError, map, switchMap } from 'rxjs/operators'; @@ -24,8 +24,8 @@ export class LabelsEffect @Effect() getLabels: Observable = this.actions - .ofType(LabelsActions.GET_LABELS) .pipe( + ofType(LabelsActions.GET_LABELS), switchMap((action) => { return this.mailService.getLabels() .pipe( diff --git a/src/app/main/apps/mail-ngrx/store/effects/mails.effects.ts b/src/app/main/apps/mail-ngrx/store/effects/mails.effects.ts index 66c9ccc1..e062e17f 100644 --- a/src/app/main/apps/mail-ngrx/store/effects/mails.effects.ts +++ b/src/app/main/apps/mail-ngrx/store/effects/mails.effects.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { Action, Store } from '@ngrx/store'; -import { Actions, Effect } from '@ngrx/effects'; +import { Actions, Effect, ofType } from '@ngrx/effects'; import { Observable, of, forkJoin } from 'rxjs'; import { catchError, debounceTime, map, mergeMap, exhaustMap, withLatestFrom } from 'rxjs/operators'; @@ -39,8 +39,8 @@ export class MailsEffect @Effect() getMails: Observable = this.actions - .ofType(MailsActions.GET_MAILS) .pipe( + ofType(MailsActions.GET_MAILS), exhaustMap((action) => { let handle = { @@ -80,8 +80,8 @@ export class MailsEffect @Effect() updateMail: Observable = this.actions - .ofType(MailsActions.UPDATE_MAIL) .pipe( + ofType(MailsActions.UPDATE_MAIL), exhaustMap((action) => { return this.mailService.updateMail(action.payload).pipe( map(() => { @@ -98,8 +98,8 @@ export class MailsEffect @Effect() updateMails: Observable = this.actions - .ofType(MailsActions.UPDATE_MAILS) .pipe( + ofType(MailsActions.UPDATE_MAILS), exhaustMap((action) => { return forkJoin( action.payload.map(mail => this.mailService.updateMail(mail)), @@ -116,8 +116,8 @@ export class MailsEffect @Effect() setCurrentMail: Observable = this.actions - .ofType(MailsActions.SET_CURRENT_MAIL) .pipe( + ofType(MailsActions.SET_CURRENT_MAIL), withLatestFrom(this.store.select(getMailsState)), map(([action, state]) => { return new MailsActions.SetCurrentMailSuccess(state.entities[action.payload]); @@ -133,8 +133,8 @@ export class MailsEffect @Effect() checkCurrentMail: Observable = this.actions - .ofType(MailsActions.CHECK_CURRENT_MAIL) .pipe( + ofType(MailsActions.CHECK_CURRENT_MAIL), withLatestFrom(this.store.select(getMailsState)), map(([action, state]) => { @@ -153,8 +153,8 @@ export class MailsEffect @Effect() getMailsSuccess: Observable = this.actions - .ofType(MailsActions.GET_MAILS_SUCCESS) .pipe( + ofType(MailsActions.GET_MAILS_SUCCESS), mergeMap(() => [ new MailsActions.CheckCurrentMail() @@ -167,8 +167,8 @@ export class MailsEffect @Effect() updateMailsSuccess: Observable = this.actions - .ofType(MailsActions.UPDATE_MAILS_SUCCESS) .pipe( + ofType(MailsActions.UPDATE_MAILS_SUCCESS), mergeMap(() => [ new MailsActions.DeselectAllMails(), @@ -182,8 +182,8 @@ export class MailsEffect @Effect() updateMailSuccess: Observable = this.actions - .ofType(MailsActions.UPDATE_MAIL_SUCCESS) .pipe( + ofType(MailsActions.UPDATE_MAIL_SUCCESS), debounceTime(500), map(() => { return new MailsActions.GetMails(); @@ -197,8 +197,8 @@ export class MailsEffect @Effect() setFolderOnSelectedMails: Observable = this.actions - .ofType(MailsActions.SET_FOLDER_ON_SELECTED_MAILS) .pipe( + ofType(MailsActions.SET_FOLDER_ON_SELECTED_MAILS), withLatestFrom( this.store.select(getMailsState)), map(([action, state]) => { @@ -225,8 +225,8 @@ export class MailsEffect @Effect() addLabelOnSelectedMails: Observable = this.actions - .ofType(MailsActions.ADD_LABEL_ON_SELECTED_MAILS) .pipe( + ofType(MailsActions.ADD_LABEL_ON_SELECTED_MAILS), withLatestFrom(this.store.select(getMailsState)), map(([action, state]) => { diff --git a/src/app/main/apps/mail-ngrx/store/guards/resolve.guard.ts b/src/app/main/apps/mail-ngrx/store/guards/resolve.guard.ts index a563cd62..5677a600 100644 --- a/src/app/main/apps/mail-ngrx/store/guards/resolve.guard.ts +++ b/src/app/main/apps/mail-ngrx/store/guards/resolve.guard.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, CanActivate } from '@angular/router'; import { RouterStateSnapshot } from '@angular/router/src/router_state'; -import { Store } from '@ngrx/store'; +import { select, Store } from '@ngrx/store'; import { Observable, forkJoin, of } from 'rxjs'; import { map, switchMap, catchError, tap, take, filter } from 'rxjs/operators'; @@ -25,12 +25,14 @@ export class ResolveGuard implements CanActivate private _store: Store ) { - this._store.select(getRouterState).subscribe(routerState => { - if ( routerState ) - { - this.routerState = routerState.state; - } - }); + this._store + .pipe(select(getRouterState)) + .subscribe(routerState => { + if ( routerState ) + { + this.routerState = routerState.state; + } + }); } /** @@ -59,16 +61,15 @@ export class ResolveGuard implements CanActivate this.getFolders(), this.getFilters(), this.getLabels() - ) - .pipe( - filter(([foldersLoaded, filtersLoaded, labelsLoaded]) => !!(foldersLoaded && filtersLoaded && labelsLoaded)), - take(1), - switchMap(() => - this.getMails() - ), - take(1), - map(() => this._store.dispatch(new fromStore.SetCurrentMail(this.routerState.params.mailId))) - ); + ).pipe( + filter(([foldersLoaded, filtersLoaded, labelsLoaded]) => !!(foldersLoaded && filtersLoaded && labelsLoaded)), + take(1), + switchMap(() => + this.getMails() + ), + take(1), + map(() => this._store.dispatch(new fromStore.SetCurrentMail(this.routerState.params.mailId))) + ); } /** @@ -78,17 +79,17 @@ export class ResolveGuard implements CanActivate */ getFolders(): any { - return this._store.select(getFoldersLoaded) - .pipe( - tap(loaded => { - if ( !loaded ) - { - this._store.dispatch(new fromStore.GetFolders([])); - } - }), - filter(loaded => loaded), - take(1) - ); + return this._store.pipe( + select(getFoldersLoaded), + tap(loaded => { + if ( !loaded ) + { + this._store.dispatch(new fromStore.GetFolders([])); + } + }), + filter(loaded => loaded), + take(1) + ); } /** @@ -98,17 +99,17 @@ export class ResolveGuard implements CanActivate */ getFilters(): any { - return this._store.select(getFiltersLoaded) - .pipe( - tap(loaded => { - if ( !loaded ) - { - this._store.dispatch(new fromStore.GetFilters([])); - } - }), - filter(loaded => loaded), - take(1) - ); + return this._store.pipe( + select(getFiltersLoaded), + tap(loaded => { + if ( !loaded ) + { + this._store.dispatch(new fromStore.GetFilters([])); + } + }), + filter(loaded => loaded), + take(1) + ); } /** @@ -117,17 +118,17 @@ export class ResolveGuard implements CanActivate */ getLabels(): any { - return this._store.select(getLabelsLoaded) - .pipe( - tap(loaded => { - if ( !loaded ) - { - this._store.dispatch(new fromStore.GetLabels([])); - } - }), - filter(loaded => loaded), - take(1) - ); + return this._store.pipe( + select(getLabelsLoaded), + tap(loaded => { + if ( !loaded ) + { + this._store.dispatch(new fromStore.GetLabels([])); + } + }), + filter(loaded => loaded), + take(1) + ); } /** @@ -137,21 +138,21 @@ export class ResolveGuard implements CanActivate */ getMails(): any { - return this._store.select(getMailsLoaded) - .pipe( - tap((loaded: any) => { + return this._store.pipe( + select(getMailsLoaded), + tap((loaded: any) => { - if ( !this.routerState.params[loaded.id] || this.routerState.params[loaded.id] !== loaded.value ) - { - this._store.dispatch(new fromStore.GetMails()); - this._store.dispatch(new fromStore.SetSearchText('')); - this._store.dispatch(new fromStore.DeselectAllMails()); - } - }), - filter((loaded: any) => { - return this.routerState.params[loaded.id] && this.routerState.params[loaded.id] === loaded.value; - }), - take(1) - ); + if ( !this.routerState.params[loaded.id] || this.routerState.params[loaded.id] !== loaded.value ) + { + this._store.dispatch(new fromStore.GetMails()); + this._store.dispatch(new fromStore.SetSearchText('')); + this._store.dispatch(new fromStore.DeselectAllMails()); + } + }), + filter((loaded: any) => { + return this.routerState.params[loaded.id] && this.routerState.params[loaded.id] === loaded.value; + }), + take(1) + ); } } diff --git a/src/app/main/apps/mail/mail.model.ts b/src/app/main/apps/mail/mail.model.ts index 7b36a600..6e254ad4 100644 --- a/src/app/main/apps/mail/mail.model.ts +++ b/src/app/main/apps/mail/mail.model.ts @@ -49,12 +49,18 @@ export class Mail this.folder = mail.folder; } - toggleStar() + /** + * Toggle star + */ + toggleStar(): void { this.starred = !this.starred; } - toggleImportant() + /** + * Toggle important + */ + toggleImportant(): void { this.important = !this.important; } diff --git a/src/app/main/apps/mail/mail.module.ts b/src/app/main/apps/mail/mail.module.ts index cc387f73..44fec742 100644 --- a/src/app/main/apps/mail/mail.module.ts +++ b/src/app/main/apps/mail/mail.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule, MatToolbarModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule, MatToolbarModule +} from '@angular/material'; import { TranslateModule } from '@ngx-translate/core'; import { FuseSharedModule } from '@fuse/shared.module'; diff --git a/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts b/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts index 791cbd19..bc1ef62e 100644 --- a/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts +++ b/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts @@ -13,7 +13,7 @@ export class ScrumboardBoardAddListComponent form: FormGroup; @Output() - onListAdd: EventEmitter; + listAdded: EventEmitter; @ViewChild('nameInput') nameInputField; @@ -29,7 +29,7 @@ export class ScrumboardBoardAddListComponent { // Set the defaults this.formActive = false; - this.onListAdd = new EventEmitter(); + this.listAdded = new EventEmitter(); } // ----------------------------------------------------------------------------------------------------- @@ -73,7 +73,7 @@ export class ScrumboardBoardAddListComponent { if ( this.form.valid ) { - this.onListAdd.next(this.form.getRawValue().name); + this.listAdded.next(this.form.getRawValue().name); this.formActive = false; } } diff --git a/src/app/main/apps/scrumboard/board/board.component.html b/src/app/main/apps/scrumboard/board/board.component.html index cd9824e3..7ba54507 100644 --- a/src/app/main/apps/scrumboard/board/board.component.html +++ b/src/app/main/apps/scrumboard/board/board.component.html @@ -28,7 +28,7 @@ remove_red_eye + (boardNameChanged)="onBoardNameChanged($event)"> @@ -69,7 +69,7 @@ - diff --git a/src/app/main/apps/scrumboard/board/dialogs/card/card.component.html b/src/app/main/apps/scrumboard/board/dialogs/card/card.component.html index 2a0c4a1c..709be403 100644 --- a/src/app/main/apps/scrumboard/board/dialogs/card/card.component.html +++ b/src/app/main/apps/scrumboard/board/dialogs/card/card.component.html @@ -36,7 +36,7 @@ + (cardLabelsChanged)="updateCard()"> diff --git a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.html b/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.html index 5ce19f9f..44dc23b1 100644 --- a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.html +++ b/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.html @@ -18,7 +18,7 @@ + (change)="toggleInArray(label.id, card.idLabels);onCardLabelsChanged()"> {{label.name}} diff --git a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts b/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts index 946e0404..f09d1eae 100644 --- a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts +++ b/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts @@ -21,7 +21,7 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy card: any; @Output() - onCardLabelsChange: EventEmitter; + cardLabelsChanged: EventEmitter; board: any; labelsMenuView: string; @@ -42,7 +42,7 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy ) { // Set the defaults - this.onCardLabelsChange = new EventEmitter(); + this.cardLabelsChanged = new EventEmitter(); this.labelsMenuView = 'labels'; this.newLabel = { 'id' : '', @@ -88,9 +88,9 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy /** * Card labels changed */ - cardLabelsChanged(): void + onCardLabelsChanged(): void { - this.onCardLabelsChange.next(); + this.cardLabelsChanged.next(); } /** diff --git a/src/app/main/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts b/src/app/main/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts index e781594f..c19be935 100644 --- a/src/app/main/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts +++ b/src/app/main/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts @@ -16,7 +16,7 @@ export class ScrumboardEditBoardNameComponent board; @Output() - onNameChanged: EventEmitter; + boardNameChanged: EventEmitter; @ViewChild('nameInput') nameInputField; @@ -27,7 +27,7 @@ export class ScrumboardEditBoardNameComponent { // Set the defaults this.formActive = false; - this.onNameChanged = new EventEmitter(); + this.boardNameChanged = new EventEmitter(); } // ----------------------------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ export class ScrumboardEditBoardNameComponent this.board.name = this.form.getRawValue().name; this.board.uri = encodeURIComponent(this.board.name).replace(/%20/g, '-').toLowerCase(); - this.onNameChanged.next(this.board.name); + this.boardNameChanged.next(this.board.name); this.formActive = false; } } diff --git a/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts b/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts index 8196bddb..7983b31d 100644 --- a/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts +++ b/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts @@ -13,7 +13,7 @@ export class ScrumboardBoardAddCardComponent form: FormGroup; @Output() - onCardAdd: EventEmitter; + cardAdded: EventEmitter; @ViewChild('nameInput') nameInputField; @@ -29,7 +29,7 @@ export class ScrumboardBoardAddCardComponent { // Set the defaults this.formActive = false; - this.onCardAdd = new EventEmitter(); + this.cardAdded = new EventEmitter(); } // ----------------------------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ export class ScrumboardBoardAddCardComponent if ( this.form.valid ) { const cardName = this.form.getRawValue().name; - this.onCardAdd.next(cardName); + this.cardAdded.next(cardName); this.formActive = false; } } diff --git a/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts b/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts index 136945ef..85bf9d74 100644 --- a/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts +++ b/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts @@ -16,7 +16,7 @@ export class ScrumboardBoardEditListNameComponent list; @Output() - onNameChanged: EventEmitter; + listNameChanged: EventEmitter; @ViewChild('nameInput') nameInputField; @@ -32,7 +32,7 @@ export class ScrumboardBoardEditListNameComponent { // Set the defaults this.formActive = false; - this.onNameChanged = new EventEmitter(); + this.listNameChanged = new EventEmitter(); } // ----------------------------------------------------------------------------------------------------- @@ -77,7 +77,7 @@ export class ScrumboardBoardEditListNameComponent if ( this.form.valid ) { this.list.name = this.form.getRawValue().name; - this.onNameChanged.next(this.list.name); + this.listNameChanged.next(this.list.name); this.formActive = false; } } diff --git a/src/app/main/apps/scrumboard/board/list/list.component.html b/src/app/main/apps/scrumboard/board/list/list.component.html index 33324778..733e9789 100644 --- a/src/app/main/apps/scrumboard/board/list/list.component.html +++ b/src/app/main/apps/scrumboard/board/list/list.component.html @@ -6,7 +6,7 @@ + (listNameChanged)="onListNameChanged($event)">
@@ -40,8 +40,7 @@ diff --git a/src/app/main/apps/scrumboard/scrumboard.module.ts b/src/app/main/apps/scrumboard/scrumboard.module.ts index eba8e392..7cf57e28 100644 --- a/src/app/main/apps/scrumboard/scrumboard.module.ts +++ b/src/app/main/apps/scrumboard/scrumboard.module.ts @@ -1,6 +1,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatRippleModule, MatSidenavModule, MatToolbarModule, MatTooltipModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, + MatProgressBarModule, MatRippleModule, MatSidenavModule, MatToolbarModule, MatTooltipModule +} from '@angular/material'; import { NgxDnDModule } from '@swimlane/ngx-dnd'; import { FuseSharedModule } from '@fuse/shared.module'; diff --git a/src/app/main/apps/todo/todo.module.ts b/src/app/main/apps/todo/todo.module.ts index 6930fa7e..e21a9fcf 100644 --- a/src/app/main/apps/todo/todo.module.ts +++ b/src/app/main/apps/todo/todo.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule } from '@angular/material'; +import { + MatButtonModule, MatCheckboxModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule +} from '@angular/material'; import { NgxDnDModule } from '@swimlane/ngx-dnd'; import { FuseSharedModule } from '@fuse/shared.module'; diff --git a/src/app/main/documentation/changelog/changelog.component.html b/src/app/main/documentation/changelog/changelog.component.html index ed16334b..ed01b22b 100644 --- a/src/app/main/documentation/changelog/changelog.component.html +++ b/src/app/main/documentation/changelog/changelog.component.html @@ -50,6 +50,7 @@
  • Updated various other packages
  • Dark color theme
  • Easier way of working multiple Angular Material color themes
  • +
  • Various performance optimizations
  • @@ -64,7 +65,12 @@ happen
  • (Layouts) "transform: translateZ(0)" causes "position: fixed" to break
  • +
  • (Layouts) Some layouts are not working correctly on IE11
  • (Contacts) _matDialogRef is not defined
  • +
  • + (FuseConfig) Resetting the config on lazily loaded routes causes the layout items to + show/hide before the actual content loads +
  • diff --git a/src/app/main/documentation/components/components.module.ts b/src/app/main/documentation/components/components.module.ts index 2c6c03e8..50b9bef8 100644 --- a/src/app/main/documentation/components/components.module.ts +++ b/src/app/main/documentation/components/components.module.ts @@ -1,6 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { MatButtonModule, MatButtonToggleModule, MatFormFieldModule, MatIconModule, MatListModule, MatMenuModule, MatSelectModule, MatSlideToggleModule, MatTabsModule } from '@angular/material'; +import { + MatButtonModule, MatButtonToggleModule, MatFormFieldModule, MatIconModule, MatListModule, MatMenuModule, MatSelectModule, MatSlideToggleModule, MatTabsModule +} from '@angular/material'; import { NgxChartsModule } from '@swimlane/ngx-charts'; import { FuseSharedModule } from '@fuse/shared.module'; diff --git a/src/app/store/effects/router.effect.ts b/src/app/store/effects/router.effect.ts index a9cbf25e..ad3d9546 100644 --- a/src/app/store/effects/router.effect.ts +++ b/src/app/store/effects/router.effect.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { Location } from '@angular/common'; -import { Effect, Actions } from '@ngrx/effects'; +import { Effect, Actions, ofType } from '@ngrx/effects'; import { tap, map } from 'rxjs/operators'; import * as RouterActions from 'app/store/actions/router.action'; @@ -28,7 +28,8 @@ export class RouterEffects * Navigate */ @Effect({dispatch: false}) - navigate$ = this.actions$.ofType(RouterActions.GO).pipe( + navigate$ = this.actions$.pipe( + ofType(RouterActions.GO), map((action: RouterActions.Go) => action.payload), tap(({path, query: queryParams, extras}) => { this.router.navigate(path, {queryParams, ...extras}); @@ -40,16 +41,18 @@ export class RouterEffects * @type {Observable} */ @Effect({dispatch: false}) - navigateBack$ = this.actions$ - .ofType(RouterActions.BACK) - .pipe(tap(() => this.location.back())); + navigateBack$ = this.actions$.pipe( + ofType(RouterActions.BACK), + tap(() => this.location.back()) + ); /** * Navigate forward * @type {Observable} */ @Effect({dispatch: false}) - navigateForward$ = this.actions$ - .ofType(RouterActions.FORWARD) - .pipe(tap(() => this.location.forward())); + navigateForward$ = this.actions$.pipe( + ofType(RouterActions.FORWARD), + tap(() => this.location.forward()) + ); }