Various fixes

This commit is contained in:
Sercan Yemen 2018-08-28 07:03:19 +03:00
parent 09bd4b9fee
commit a184be1650
37 changed files with 261 additions and 183 deletions

View File

@ -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 { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
import { ObservableMedia } from '@angular/flex-layout'; import { ObservableMedia } from '@angular/flex-layout';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';

View File

@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout'; 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 { FuseDirectivesModule } from '@fuse/directives/directives';
import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module'; import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module';

View File

@ -15,11 +15,11 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
@HostBinding('class.mat-is-locked-open') @HostBinding('class.mat-is-locked-open')
isLockedOpen: boolean; isLockedOpen: boolean;
@Input('fuseMatSidenavHelper') @Input()
id: string; id: string;
@Input('mat-is-locked-open') @Input()
matIsLockedOpenBreakpoint: string; matIsLockedOpen: string;
// Private // Private
private _unsubscribeAll: Subject<any>; private _unsubscribeAll: Subject<any>;
@ -58,7 +58,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
// Register the sidenav to the service // Register the sidenav to the service
this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav); this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav);
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{ {
this.isLockedOpen = true; this.isLockedOpen = true;
this._matSidenav.mode = 'side'; this._matSidenav.mode = 'side';
@ -74,7 +74,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
this._fuseMatchMediaService.onMediaChange this._fuseMatchMediaService.onMediaChange
.pipe(takeUntil(this._unsubscribeAll)) .pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => { .subscribe(() => {
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) ) if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{ {
this.isLockedOpen = true; this.isLockedOpen = true;
this._matSidenav.mode = 'side'; this._matSidenav.mode = 'side';
@ -105,8 +105,8 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
}) })
export class FuseMatSidenavTogglerDirective export class FuseMatSidenavTogglerDirective
{ {
@Input('fuseMatSidenavToggler') @Input()
id; id: string;
/** /**
* Constructor * Constructor
@ -126,7 +126,7 @@ export class FuseMatSidenavTogglerDirective
* On click * On click
*/ */
@HostListener('click') @HostListener('click')
onClick() onClick(): void
{ {
this._fuseMatSidenavHelperService.getSidenav(this.id).toggle(); this._fuseMatSidenavHelperService.getSidenav(this.id).toggle();
} }

View File

@ -687,7 +687,23 @@ const matColors = {
// tslint:disable-next-line // tslint:disable-next-line
const matPresetColors = [ 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 all = matColors;
public static presets = matPresetColors; public static presets = matPresetColors;
public static getColor(colorName) public static getColor(colorName): any
{ {
if ( matColors[colorName] ) if ( matColors[colorName] )
{ {

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { ColorPickerModule } from 'ngx-color-picker';
import { CalendarModule as AngularCalendarModule } from 'angular-calendar'; import { CalendarModule as AngularCalendarModule } from 'angular-calendar';

View File

@ -1,7 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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'; import { FuseSharedModule } from '@fuse/shared.module';
@ -17,10 +19,10 @@ import { ChatContactSidenavComponent } from 'app/main/apps/chat/sidenavs/right/c
const routes: Routes = [ const routes: Routes = [
{ {
path : '**', path: '**',
component: ChatComponent, component: ChatComponent,
children : [], children: [],
resolve : { resolve: {
chat: ChatService chat: ChatService
} }
} }

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { FuseSharedModule } from '@fuse/shared.module';
import { FuseConfirmDialogModule, FuseSidebarModule } from '@fuse/components'; import { FuseConfirmDialogModule, FuseSidebarModule } from '@fuse/components';

View File

@ -53,7 +53,7 @@ export class AnalyticsDashboardComponent implements OnInit
private _registerCustomChartJSPlugin(): void private _registerCustomChartJSPlugin(): void
{ {
(<any>window).Chart.plugins.register({ (<any>window).Chart.plugins.register({
afterDatasetsDraw: function (chart, easing) { afterDatasetsDraw: function (chart, easing): any {
// Only activate the plugin if it's made available // Only activate the plugin if it's made available
// in the options // in the options
if ( if (
@ -67,11 +67,11 @@ export class AnalyticsDashboardComponent implements OnInit
// To only draw at the end of animation, check for easing === 1 // To only draw at the end of animation, check for easing === 1
const ctx = chart.ctx; const ctx = chart.ctx;
chart.data.datasets.forEach(function (dataset, i) { chart.data.datasets.forEach(function (dataset, i): any {
const meta = chart.getDatasetMeta(i); const meta = chart.getDatasetMeta(i);
if ( !meta.hidden ) 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 // Draw the text in black, with the specified font
ctx.fillStyle = 'rgba(255, 255, 255, 0.7)'; ctx.fillStyle = 'rgba(255, 255, 255, 0.7)';

View File

@ -1,6 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { NgxChartsModule } from '@swimlane/ngx-charts';
import { AgmCoreModule } from '@agm/core'; import { AgmCoreModule } from '@agm/core';

View File

@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, ViewEncapsulation } from '@angular/core'; 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 { Observable } from 'rxjs';
import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; 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 export class MailNgrxDetailsComponent implements OnChanges
{ {
@Input('mail') @Input()
mailInput: Mail; currentMail: Mail;
labels$: Observable<any>; labels$: Observable<any>;
mail: Mail; mail: Mail;
@ -34,7 +34,7 @@ export class MailNgrxDetailsComponent implements OnChanges
) )
{ {
// Set the defaults // Set the defaults
this.labels$ = this._store.select(fromStore.getLabelsArr); this.labels$ = this._store.pipe(select(fromStore.getLabelsArr));
this.showDetails = false; this.showDetails = false;
} }
@ -47,7 +47,7 @@ export class MailNgrxDetailsComponent implements OnChanges
*/ */
ngOnChanges(): void ngOnChanges(): void
{ {
this.updateModel(this.mailInput); this.updateModel(this.currentMail);
this.markAsRead(); this.markAsRead();
} }

View File

@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Input, OnInit, ViewEncapsulation } from '@angular/core'; 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 { Observable } from 'rxjs';
import { MailNgrxService } from '../../mail.service'; import { MailNgrxService } from '../../mail.service';
@ -21,18 +21,29 @@ export class MailNgrxListItemComponent implements OnInit
labels$: Observable<any>; labels$: Observable<any>;
selectedMailIds$: Observable<any>; selectedMailIds$: Observable<any>;
/**
* Constructor
*
* @param {ChangeDetectorRef} _changeDetectorRef
* @param {MailNgrxService} _mailNgrxService
* @param {Store} _store
*/
constructor( constructor(
private mailService: MailNgrxService, private _changeDetectorRef: ChangeDetectorRef,
private store: Store<fromStore.MailAppState>, private _mailNgrxService: MailNgrxService,
private cd: ChangeDetectorRef private _store: Store<fromStore.MailAppState>
) )
{ {
this.labels$ = this.store.select(fromStore.getLabelsArr); this.labels$ = this._store.pipe(select(fromStore.getLabelsArr));
this.selectedMailIds$ = this.store.select(fromStore.getSelectedMailIds); this.selectedMailIds$ = this._store.pipe(select(fromStore.getSelectedMailIds));
this.selected = false; this.selected = false;
} }
ngOnInit() // -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
ngOnInit(): void
{ {
// Set the initial values // Set the initial values
this.mail = new Mail(this.mail); 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));
} }
} }

View File

@ -95,7 +95,7 @@
<div class="content" fxLayout="row"> <div class="content" fxLayout="row">
<mail-ngrx-list fusePerfectScrollbar fxFlex [mails]="mails$ | async" [currentMail]="currentMail$ | async"></mail-ngrx-list> <mail-ngrx-list fusePerfectScrollbar fxFlex [mails]="mails$ | async" [currentMail]="currentMail$ | async"></mail-ngrx-list>
<mail-ngrx-details [mail]="currentMail$ | async" fusePerfectScrollbar fxFlex></mail-ngrx-details> <mail-ngrx-details [currentMail]="currentMail$ | async" fusePerfectScrollbar fxFlex></mail-ngrx-details>
</div> </div>
<!-- / CONTENT --> <!-- / CONTENT -->

View File

@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
import { Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@ -55,12 +55,12 @@ export class MailNgrxComponent implements OnInit, OnDestroy
// Set the defaults // Set the defaults
this.searchInput = new FormControl(''); this.searchInput = new FormControl('');
this._fuseTranslationLoaderService.loadTranslations(english, turkish); this._fuseTranslationLoaderService.loadTranslations(english, turkish);
this.currentMail$ = this._store.select(fromStore.getCurrentMail); this.currentMail$ = this._store.pipe(select(fromStore.getCurrentMail));
this.mails$ = this._store.select(fromStore.getMailsArr); this.mails$ = this._store.pipe(select(fromStore.getMailsArr));
this.folders$ = this._store.select(fromStore.getFoldersArr); this.folders$ = this._store.pipe(select(fromStore.getFoldersArr));
this.labels$ = this._store.select(fromStore.getLabelsArr); this.labels$ = this._store.pipe(select(fromStore.getLabelsArr));
this.selectedMailIds$ = this._store.select(fromStore.getSelectedMailIds); this.selectedMailIds$ = this._store.pipe(select(fromStore.getSelectedMailIds));
this.searchText$ = this._store.select(fromStore.getSearchText); this.searchText$ = this._store.pipe(select(fromStore.getSearchText));
this.mails = []; this.mails = [];
this.selectedMailIds = []; this.selectedMailIds = [];
} }

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { TranslateModule } from '@ngx-translate/core';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; import { Mail } from 'app/main/apps/mail-ngrx/mail.model';
@ -27,19 +27,27 @@ export class MailNgrxService
private _store: Store<MailAppState> private _store: Store<MailAppState>
) )
{ {
this._store.select(getFoldersArr).subscribe(folders => { this._store
.pipe(select(getFoldersArr))
.subscribe(folders => {
this.foldersArr = folders; this.foldersArr = folders;
}); });
this._store.select(getFiltersArr).subscribe(filters => { this._store
.pipe(select(getFiltersArr))
.subscribe(filters => {
this.filtersArr = filters; this.filtersArr = filters;
}); });
this._store.select(getLabelsArr).subscribe(labels => { this._store
.pipe(select(getLabelsArr))
.subscribe(labels => {
this.labelsArr = labels; this.labelsArr = labels;
}); });
this._store.select(getMailsArr).subscribe(mails => { this._store
.pipe(select(getMailsArr))
.subscribe(mails => {
this.mails = mails; this.mails = mails;
}); });

View File

@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core'; import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
import { MatDialog } from '@angular/material'; import { MatDialog } from '@angular/material';
import { FormGroup } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { Store } from '@ngrx/store'; import { select, Store } from '@ngrx/store';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service';
@ -45,9 +45,9 @@ export class MailNgrxMainSidebarComponent
'withinpixels': 'johndoe@withinpixels.com' 'withinpixels': 'johndoe@withinpixels.com'
}; };
this.selectedAccount = 'creapond'; this.selectedAccount = 'creapond';
this.folders$ = this._store.select(fromStore.getFoldersArr); this.folders$ = this._store.pipe(select(fromStore.getFoldersArr));
this.filters$ = this._store.select(fromStore.getFiltersArr); this.filters$ = this._store.pipe(select(fromStore.getFiltersArr));
this.labels$ = this._store.select(fromStore.getLabelsArr); this.labels$ = this._store.pipe(select(fromStore.getLabelsArr));
} }
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Actions, Effect } from '@ngrx/effects'; import { Actions, Effect, ofType } from '@ngrx/effects';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, map, switchMap } from 'rxjs/operators'; import { catchError, map, switchMap } from 'rxjs/operators';
@ -24,8 +24,8 @@ export class FiltersEffect
@Effect() @Effect()
getFilters: Observable<FiltersActions.FiltersActionsAll> = getFilters: Observable<FiltersActions.FiltersActionsAll> =
this.actions this.actions
.ofType<FiltersActions.GetFilters>(FiltersActions.GET_FILTERS)
.pipe( .pipe(
ofType<FiltersActions.GetFilters>(FiltersActions.GET_FILTERS),
switchMap((action) => { switchMap((action) => {
return this.mailService.getFilters() return this.mailService.getFilters()
.pipe( .pipe(

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Actions, Effect } from '@ngrx/effects'; import { Actions, Effect, ofType } from '@ngrx/effects';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, map, switchMap } from 'rxjs/operators'; import { catchError, map, switchMap } from 'rxjs/operators';
@ -24,8 +24,8 @@ export class FoldersEffect
@Effect() @Effect()
getFolders: Observable<FoldersActions.FoldersActionsAll> = getFolders: Observable<FoldersActions.FoldersActionsAll> =
this.actions this.actions
.ofType<FoldersActions.GetFolders>(FoldersActions.GET_FOLDERS)
.pipe( .pipe(
ofType<FoldersActions.GetFolders>(FoldersActions.GET_FOLDERS),
switchMap((action) => { switchMap((action) => {
return this.mailService.getFolders() return this.mailService.getFolders()
.pipe( .pipe(

View File

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Actions, Effect } from '@ngrx/effects'; import { Actions, Effect, ofType } from '@ngrx/effects';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { catchError, map, switchMap } from 'rxjs/operators'; import { catchError, map, switchMap } from 'rxjs/operators';
@ -24,8 +24,8 @@ export class LabelsEffect
@Effect() @Effect()
getLabels: Observable<LabelsActions.LabelsActionsAll> = getLabels: Observable<LabelsActions.LabelsActionsAll> =
this.actions this.actions
.ofType<LabelsActions.GetLabels>(LabelsActions.GET_LABELS)
.pipe( .pipe(
ofType<LabelsActions.GetLabels>(LabelsActions.GET_LABELS),
switchMap((action) => { switchMap((action) => {
return this.mailService.getLabels() return this.mailService.getLabels()
.pipe( .pipe(

View File

@ -1,6 +1,6 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Action, Store } from '@ngrx/store'; 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 { Observable, of, forkJoin } from 'rxjs';
import { catchError, debounceTime, map, mergeMap, exhaustMap, withLatestFrom } from 'rxjs/operators'; import { catchError, debounceTime, map, mergeMap, exhaustMap, withLatestFrom } from 'rxjs/operators';
@ -39,8 +39,8 @@ export class MailsEffect
@Effect() @Effect()
getMails: Observable<MailsActions.MailsActionsAll> = getMails: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.GetMails>(MailsActions.GET_MAILS)
.pipe( .pipe(
ofType<MailsActions.GetMails>(MailsActions.GET_MAILS),
exhaustMap((action) => { exhaustMap((action) => {
let handle = { let handle = {
@ -80,8 +80,8 @@ export class MailsEffect
@Effect() @Effect()
updateMail: Observable<MailsActions.MailsActionsAll> = updateMail: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.UpdateMail>(MailsActions.UPDATE_MAIL)
.pipe( .pipe(
ofType<MailsActions.UpdateMail>(MailsActions.UPDATE_MAIL),
exhaustMap((action) => { exhaustMap((action) => {
return this.mailService.updateMail(action.payload).pipe( return this.mailService.updateMail(action.payload).pipe(
map(() => { map(() => {
@ -98,8 +98,8 @@ export class MailsEffect
@Effect() @Effect()
updateMails: Observable<MailsActions.MailsActionsAll> = updateMails: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.UpdateMails>(MailsActions.UPDATE_MAILS)
.pipe( .pipe(
ofType<MailsActions.UpdateMails>(MailsActions.UPDATE_MAILS),
exhaustMap((action) => { exhaustMap((action) => {
return forkJoin( return forkJoin(
action.payload.map(mail => this.mailService.updateMail(mail)), action.payload.map(mail => this.mailService.updateMail(mail)),
@ -116,8 +116,8 @@ export class MailsEffect
@Effect() @Effect()
setCurrentMail: Observable<Action> = setCurrentMail: Observable<Action> =
this.actions this.actions
.ofType<MailsActions.SetCurrentMail>(MailsActions.SET_CURRENT_MAIL)
.pipe( .pipe(
ofType<MailsActions.SetCurrentMail>(MailsActions.SET_CURRENT_MAIL),
withLatestFrom(this.store.select(getMailsState)), withLatestFrom(this.store.select(getMailsState)),
map(([action, state]) => { map(([action, state]) => {
return new MailsActions.SetCurrentMailSuccess(state.entities[action.payload]); return new MailsActions.SetCurrentMailSuccess(state.entities[action.payload]);
@ -133,8 +133,8 @@ export class MailsEffect
@Effect() @Effect()
checkCurrentMail: Observable<Action> = checkCurrentMail: Observable<Action> =
this.actions this.actions
.ofType<MailsActions.CheckCurrentMail>(MailsActions.CHECK_CURRENT_MAIL)
.pipe( .pipe(
ofType<MailsActions.CheckCurrentMail>(MailsActions.CHECK_CURRENT_MAIL),
withLatestFrom(this.store.select(getMailsState)), withLatestFrom(this.store.select(getMailsState)),
map(([action, state]) => { map(([action, state]) => {
@ -153,8 +153,8 @@ export class MailsEffect
@Effect() @Effect()
getMailsSuccess: Observable<MailsActions.MailsActionsAll> = getMailsSuccess: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.GetMailsSuccess>(MailsActions.GET_MAILS_SUCCESS)
.pipe( .pipe(
ofType<MailsActions.GetMailsSuccess>(MailsActions.GET_MAILS_SUCCESS),
mergeMap(() => mergeMap(() =>
[ [
new MailsActions.CheckCurrentMail() new MailsActions.CheckCurrentMail()
@ -167,8 +167,8 @@ export class MailsEffect
@Effect() @Effect()
updateMailsSuccess: Observable<MailsActions.MailsActionsAll> = updateMailsSuccess: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.UpdateMailsSuccess>(MailsActions.UPDATE_MAILS_SUCCESS)
.pipe( .pipe(
ofType<MailsActions.UpdateMailsSuccess>(MailsActions.UPDATE_MAILS_SUCCESS),
mergeMap(() => mergeMap(() =>
[ [
new MailsActions.DeselectAllMails(), new MailsActions.DeselectAllMails(),
@ -182,8 +182,8 @@ export class MailsEffect
@Effect() @Effect()
updateMailSuccess: Observable<MailsActions.MailsActionsAll> = updateMailSuccess: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.UpdateMailSuccess>(MailsActions.UPDATE_MAIL_SUCCESS)
.pipe( .pipe(
ofType<MailsActions.UpdateMailSuccess>(MailsActions.UPDATE_MAIL_SUCCESS),
debounceTime(500), debounceTime(500),
map(() => { map(() => {
return new MailsActions.GetMails(); return new MailsActions.GetMails();
@ -197,8 +197,8 @@ export class MailsEffect
@Effect() @Effect()
setFolderOnSelectedMails: Observable<MailsActions.MailsActionsAll> = setFolderOnSelectedMails: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.SetFolderOnSelectedMails>(MailsActions.SET_FOLDER_ON_SELECTED_MAILS)
.pipe( .pipe(
ofType<MailsActions.SetFolderOnSelectedMails>(MailsActions.SET_FOLDER_ON_SELECTED_MAILS),
withLatestFrom( withLatestFrom(
this.store.select(getMailsState)), this.store.select(getMailsState)),
map(([action, state]) => { map(([action, state]) => {
@ -225,8 +225,8 @@ export class MailsEffect
@Effect() @Effect()
addLabelOnSelectedMails: Observable<MailsActions.MailsActionsAll> = addLabelOnSelectedMails: Observable<MailsActions.MailsActionsAll> =
this.actions this.actions
.ofType<MailsActions.AddLabelOnSelectedMails>(MailsActions.ADD_LABEL_ON_SELECTED_MAILS)
.pipe( .pipe(
ofType<MailsActions.AddLabelOnSelectedMails>(MailsActions.ADD_LABEL_ON_SELECTED_MAILS),
withLatestFrom(this.store.select(getMailsState)), withLatestFrom(this.store.select(getMailsState)),
map(([action, state]) => { map(([action, state]) => {

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate } from '@angular/router'; import { ActivatedRouteSnapshot, CanActivate } from '@angular/router';
import { RouterStateSnapshot } from '@angular/router/src/router_state'; 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 { Observable, forkJoin, of } from 'rxjs';
import { map, switchMap, catchError, tap, take, filter } from 'rxjs/operators'; import { map, switchMap, catchError, tap, take, filter } from 'rxjs/operators';
@ -25,7 +25,9 @@ export class ResolveGuard implements CanActivate
private _store: Store<MailAppState> private _store: Store<MailAppState>
) )
{ {
this._store.select(getRouterState).subscribe(routerState => { this._store
.pipe(select(getRouterState))
.subscribe(routerState => {
if ( routerState ) if ( routerState )
{ {
this.routerState = routerState.state; this.routerState = routerState.state;
@ -59,8 +61,7 @@ export class ResolveGuard implements CanActivate
this.getFolders(), this.getFolders(),
this.getFilters(), this.getFilters(),
this.getLabels() this.getLabels()
) ).pipe(
.pipe(
filter(([foldersLoaded, filtersLoaded, labelsLoaded]) => !!(foldersLoaded && filtersLoaded && labelsLoaded)), filter(([foldersLoaded, filtersLoaded, labelsLoaded]) => !!(foldersLoaded && filtersLoaded && labelsLoaded)),
take(1), take(1),
switchMap(() => switchMap(() =>
@ -78,8 +79,8 @@ export class ResolveGuard implements CanActivate
*/ */
getFolders(): any getFolders(): any
{ {
return this._store.select(getFoldersLoaded) return this._store.pipe(
.pipe( select(getFoldersLoaded),
tap(loaded => { tap(loaded => {
if ( !loaded ) if ( !loaded )
{ {
@ -98,8 +99,8 @@ export class ResolveGuard implements CanActivate
*/ */
getFilters(): any getFilters(): any
{ {
return this._store.select(getFiltersLoaded) return this._store.pipe(
.pipe( select(getFiltersLoaded),
tap(loaded => { tap(loaded => {
if ( !loaded ) if ( !loaded )
{ {
@ -117,8 +118,8 @@ export class ResolveGuard implements CanActivate
*/ */
getLabels(): any getLabels(): any
{ {
return this._store.select(getLabelsLoaded) return this._store.pipe(
.pipe( select(getLabelsLoaded),
tap(loaded => { tap(loaded => {
if ( !loaded ) if ( !loaded )
{ {
@ -137,8 +138,8 @@ export class ResolveGuard implements CanActivate
*/ */
getMails(): any getMails(): any
{ {
return this._store.select(getMailsLoaded) return this._store.pipe(
.pipe( select(getMailsLoaded),
tap((loaded: any) => { tap((loaded: any) => {
if ( !this.routerState.params[loaded.id] || this.routerState.params[loaded.id] !== loaded.value ) if ( !this.routerState.params[loaded.id] || this.routerState.params[loaded.id] !== loaded.value )

View File

@ -49,12 +49,18 @@ export class Mail
this.folder = mail.folder; this.folder = mail.folder;
} }
toggleStar() /**
* Toggle star
*/
toggleStar(): void
{ {
this.starred = !this.starred; this.starred = !this.starred;
} }
toggleImportant() /**
* Toggle important
*/
toggleImportant(): void
{ {
this.important = !this.important; this.important = !this.important;
} }

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { TranslateModule } from '@ngx-translate/core';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';

View File

@ -13,7 +13,7 @@ export class ScrumboardBoardAddListComponent
form: FormGroup; form: FormGroup;
@Output() @Output()
onListAdd: EventEmitter<any>; listAdded: EventEmitter<any>;
@ViewChild('nameInput') @ViewChild('nameInput')
nameInputField; nameInputField;
@ -29,7 +29,7 @@ export class ScrumboardBoardAddListComponent
{ {
// Set the defaults // Set the defaults
this.formActive = false; this.formActive = false;
this.onListAdd = new EventEmitter(); this.listAdded = new EventEmitter();
} }
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -73,7 +73,7 @@ export class ScrumboardBoardAddListComponent
{ {
if ( this.form.valid ) if ( this.form.valid )
{ {
this.onListAdd.next(this.form.getRawValue().name); this.listAdded.next(this.form.getRawValue().name);
this.formActive = false; this.formActive = false;
} }
} }

View File

@ -28,7 +28,7 @@
<mat-icon *ngIf="board.settings.subscribed" class="board-subscribe s-16">remove_red_eye</mat-icon> <mat-icon *ngIf="board.settings.subscribed" class="board-subscribe s-16">remove_red_eye</mat-icon>
<scrumboard-edit-board-name <scrumboard-edit-board-name
[board]="board" [board]="board"
(onNameChanged)="onBoardNameChanged($event)"> (boardNameChanged)="onBoardNameChanged($event)">
</scrumboard-edit-board-name> </scrumboard-edit-board-name>
</div> </div>
<!-- / BOARD NAME --> <!-- / BOARD NAME -->
@ -69,7 +69,7 @@
<!-- / LIST --> <!-- / LIST -->
<!-- NEW LIST BUTTON--> <!-- NEW LIST BUTTON-->
<scrumboard-board-add-list class="new-list-wrapper" (onListAdd)="onListAdd($event)" <scrumboard-board-add-list class="new-list-wrapper" (listAdded)="onListAdd($event)"
ngxDraggable [moves]="false" ngxDraggable [moves]="false"
[@animate]="{value:'*',params:{duration:'350ms',x:'100%'}}"> [@animate]="{value:'*',params:{duration:'350ms',x:'100%'}}">
</scrumboard-board-add-list> </scrumboard-board-add-list>

View File

@ -36,7 +36,7 @@
<mat-menu #labelsMenu="matMenu" [overlapTrigger]="false" class="scrumboard-labels-menu"> <mat-menu #labelsMenu="matMenu" [overlapTrigger]="false" class="scrumboard-labels-menu">
<scrumboard-label-selector [card]="card" <scrumboard-label-selector [card]="card"
(onCardLabelsChange)="updateCard()"></scrumboard-label-selector> (cardLabelsChanged)="updateCard()"></scrumboard-label-selector>
</mat-menu> </mat-menu>
</div> </div>

View File

@ -18,7 +18,7 @@
<mat-checkbox fxFlex fxLayout="row" fxLayoutAlign="start center" <mat-checkbox fxFlex fxLayout="row" fxLayoutAlign="start center"
[checked]="card.idLabels.indexOf(label.id) > -1" [checked]="card.idLabels.indexOf(label.id) > -1"
(change)="toggleInArray(label.id, card.idLabels);cardLabelsChanged()"> (change)="toggleInArray(label.id, card.idLabels);onCardLabelsChanged()">
{{label.name}} {{label.name}}
</mat-checkbox> </mat-checkbox>

View File

@ -21,7 +21,7 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy
card: any; card: any;
@Output() @Output()
onCardLabelsChange: EventEmitter<any>; cardLabelsChanged: EventEmitter<any>;
board: any; board: any;
labelsMenuView: string; labelsMenuView: string;
@ -42,7 +42,7 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy
) )
{ {
// Set the defaults // Set the defaults
this.onCardLabelsChange = new EventEmitter(); this.cardLabelsChanged = new EventEmitter();
this.labelsMenuView = 'labels'; this.labelsMenuView = 'labels';
this.newLabel = { this.newLabel = {
'id' : '', 'id' : '',
@ -88,9 +88,9 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy
/** /**
* Card labels changed * Card labels changed
*/ */
cardLabelsChanged(): void onCardLabelsChanged(): void
{ {
this.onCardLabelsChange.next(); this.cardLabelsChanged.next();
} }
/** /**

View File

@ -16,7 +16,7 @@ export class ScrumboardEditBoardNameComponent
board; board;
@Output() @Output()
onNameChanged: EventEmitter<any>; boardNameChanged: EventEmitter<any>;
@ViewChild('nameInput') @ViewChild('nameInput')
nameInputField; nameInputField;
@ -27,7 +27,7 @@ export class ScrumboardEditBoardNameComponent
{ {
// Set the defaults // Set the defaults
this.formActive = false; 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.name = this.form.getRawValue().name;
this.board.uri = encodeURIComponent(this.board.name).replace(/%20/g, '-').toLowerCase(); 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; this.formActive = false;
} }
} }

View File

@ -13,7 +13,7 @@ export class ScrumboardBoardAddCardComponent
form: FormGroup; form: FormGroup;
@Output() @Output()
onCardAdd: EventEmitter<any>; cardAdded: EventEmitter<any>;
@ViewChild('nameInput') @ViewChild('nameInput')
nameInputField; nameInputField;
@ -29,7 +29,7 @@ export class ScrumboardBoardAddCardComponent
{ {
// Set the defaults // Set the defaults
this.formActive = false; this.formActive = false;
this.onCardAdd = new EventEmitter(); this.cardAdded = new EventEmitter();
} }
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -74,7 +74,7 @@ export class ScrumboardBoardAddCardComponent
if ( this.form.valid ) if ( this.form.valid )
{ {
const cardName = this.form.getRawValue().name; const cardName = this.form.getRawValue().name;
this.onCardAdd.next(cardName); this.cardAdded.next(cardName);
this.formActive = false; this.formActive = false;
} }
} }

View File

@ -16,7 +16,7 @@ export class ScrumboardBoardEditListNameComponent
list; list;
@Output() @Output()
onNameChanged: EventEmitter<any>; listNameChanged: EventEmitter<any>;
@ViewChild('nameInput') @ViewChild('nameInput')
nameInputField; nameInputField;
@ -32,7 +32,7 @@ export class ScrumboardBoardEditListNameComponent
{ {
// Set the defaults // Set the defaults
this.formActive = false; this.formActive = false;
this.onNameChanged = new EventEmitter(); this.listNameChanged = new EventEmitter();
} }
// ----------------------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------------------
@ -77,7 +77,7 @@ export class ScrumboardBoardEditListNameComponent
if ( this.form.valid ) if ( this.form.valid )
{ {
this.list.name = this.form.getRawValue().name; this.list.name = this.form.getRawValue().name;
this.onNameChanged.next(this.list.name); this.listNameChanged.next(this.list.name);
this.formActive = false; this.formActive = false;
} }
} }

View File

@ -6,7 +6,7 @@
<scrumboard-board-edit-list-name <scrumboard-board-edit-list-name
fxFlex="1 0 auto" fxFlex="1 0 auto"
[list]="list" [list]="list"
(onNameChanged)="onListNameChanged($event)"> (listNameChanged)="onListNameChanged($event)">
</scrumboard-board-edit-list-name> </scrumboard-board-edit-list-name>
<div fxFlex="0 1 auto"> <div fxFlex="0 1 auto">
@ -40,8 +40,7 @@
<!-- NEW CARD BUTTON--> <!-- NEW CARD BUTTON-->
<div class="list-footer"> <div class="list-footer">
<scrumboard-board-add-card (onCardAdd)="onCardAdd($event)"> <scrumboard-board-add-card (cardAdded)="onCardAdd($event)"></scrumboard-board-add-card>
</scrumboard-board-add-card>
</div> </div>
<!-- / NEW CARD BUTTON--> <!-- / NEW CARD BUTTON-->

View File

@ -1,6 +1,9 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { NgxDnDModule } from '@swimlane/ngx-dnd';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; 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 { NgxDnDModule } from '@swimlane/ngx-dnd';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';

View File

@ -50,6 +50,7 @@
<li>Updated various other packages</li> <li>Updated various other packages</li>
<li>Dark color theme</li> <li>Dark color theme</li>
<li>Easier way of working multiple Angular Material color themes</li> <li>Easier way of working multiple Angular Material color themes</li>
<li>Various performance optimizations</li>
</ul> </ul>
</div> </div>
@ -64,7 +65,12 @@
happen happen
</li> </li>
<li>(Layouts) "transform: translateZ(0)" causes "position: fixed" to break</li> <li>(Layouts) "transform: translateZ(0)" causes "position: fixed" to break</li>
<li>(Layouts) Some layouts are not working correctly on IE11</li>
<li>(Contacts) _matDialogRef is not defined</li> <li>(Contacts) _matDialogRef is not defined</li>
<li>
(FuseConfig) Resetting the config on lazily loaded routes causes the layout items to
show/hide before the actual content loads
</li>
</ul> </ul>
</div> </div>

View File

@ -1,6 +1,8 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; 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 { NgxChartsModule } from '@swimlane/ngx-charts';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';

View File

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Location } from '@angular/common'; 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 { tap, map } from 'rxjs/operators';
import * as RouterActions from 'app/store/actions/router.action'; import * as RouterActions from 'app/store/actions/router.action';
@ -28,7 +28,8 @@ export class RouterEffects
* Navigate * Navigate
*/ */
@Effect({dispatch: false}) @Effect({dispatch: false})
navigate$ = this.actions$.ofType(RouterActions.GO).pipe( navigate$ = this.actions$.pipe(
ofType(RouterActions.GO),
map((action: RouterActions.Go) => action.payload), map((action: RouterActions.Go) => action.payload),
tap(({path, query: queryParams, extras}) => { tap(({path, query: queryParams, extras}) => {
this.router.navigate(path, {queryParams, ...extras}); this.router.navigate(path, {queryParams, ...extras});
@ -40,16 +41,18 @@ export class RouterEffects
* @type {Observable<any>} * @type {Observable<any>}
*/ */
@Effect({dispatch: false}) @Effect({dispatch: false})
navigateBack$ = this.actions$ navigateBack$ = this.actions$.pipe(
.ofType(RouterActions.BACK) ofType(RouterActions.BACK),
.pipe(tap(() => this.location.back())); tap(() => this.location.back())
);
/** /**
* Navigate forward * Navigate forward
* @type {Observable<any>} * @type {Observable<any>}
*/ */
@Effect({dispatch: false}) @Effect({dispatch: false})
navigateForward$ = this.actions$ navigateForward$ = this.actions$.pipe(
.ofType(RouterActions.FORWARD) ofType(RouterActions.FORWARD),
.pipe(tap(() => this.location.forward())); tap(() => this.location.forward())
);
} }