mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
Various fixes
This commit is contained in:
parent
09bd4b9fee
commit
a184be1650
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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<any>;
|
||||
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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] )
|
||||
{
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -53,7 +53,7 @@ export class AnalyticsDashboardComponent implements OnInit
|
|||
private _registerCustomChartJSPlugin(): void
|
||||
{
|
||||
(<any>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)';
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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<any>;
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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<any>;
|
||||
selectedMailIds$: Observable<any>;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param {ChangeDetectorRef} _changeDetectorRef
|
||||
* @param {MailNgrxService} _mailNgrxService
|
||||
* @param {Store} _store
|
||||
*/
|
||||
constructor(
|
||||
private mailService: MailNgrxService,
|
||||
private store: Store<fromStore.MailAppState>,
|
||||
private cd: ChangeDetectorRef
|
||||
private _changeDetectorRef: ChangeDetectorRef,
|
||||
private _mailNgrxService: MailNgrxService,
|
||||
private _store: Store<fromStore.MailAppState>
|
||||
)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<div class="content" fxLayout="row">
|
||||
|
||||
<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>
|
||||
<!-- / CONTENT -->
|
||||
|
|
|
@ -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 = [];
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,19 +27,27 @@ export class MailNgrxService
|
|||
private _store: Store<MailAppState>
|
||||
)
|
||||
{
|
||||
this._store.select(getFoldersArr).subscribe(folders => {
|
||||
this._store
|
||||
.pipe(select(getFoldersArr))
|
||||
.subscribe(folders => {
|
||||
this.foldersArr = folders;
|
||||
});
|
||||
|
||||
this._store.select(getFiltersArr).subscribe(filters => {
|
||||
this._store
|
||||
.pipe(select(getFiltersArr))
|
||||
.subscribe(filters => {
|
||||
this.filtersArr = filters;
|
||||
});
|
||||
|
||||
this._store.select(getLabelsArr).subscribe(labels => {
|
||||
this._store
|
||||
.pipe(select(getLabelsArr))
|
||||
.subscribe(labels => {
|
||||
this.labelsArr = labels;
|
||||
});
|
||||
|
||||
this._store.select(getMailsArr).subscribe(mails => {
|
||||
this._store
|
||||
.pipe(select(getMailsArr))
|
||||
.subscribe(mails => {
|
||||
this.mails = mails;
|
||||
});
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -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<FiltersActions.FiltersActionsAll> =
|
||||
this.actions
|
||||
.ofType<FiltersActions.GetFilters>(FiltersActions.GET_FILTERS)
|
||||
.pipe(
|
||||
ofType<FiltersActions.GetFilters>(FiltersActions.GET_FILTERS),
|
||||
switchMap((action) => {
|
||||
return this.mailService.getFilters()
|
||||
.pipe(
|
||||
|
|
|
@ -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<FoldersActions.FoldersActionsAll> =
|
||||
this.actions
|
||||
.ofType<FoldersActions.GetFolders>(FoldersActions.GET_FOLDERS)
|
||||
.pipe(
|
||||
ofType<FoldersActions.GetFolders>(FoldersActions.GET_FOLDERS),
|
||||
switchMap((action) => {
|
||||
return this.mailService.getFolders()
|
||||
.pipe(
|
||||
|
|
|
@ -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<LabelsActions.LabelsActionsAll> =
|
||||
this.actions
|
||||
.ofType<LabelsActions.GetLabels>(LabelsActions.GET_LABELS)
|
||||
.pipe(
|
||||
ofType<LabelsActions.GetLabels>(LabelsActions.GET_LABELS),
|
||||
switchMap((action) => {
|
||||
return this.mailService.getLabels()
|
||||
.pipe(
|
||||
|
|
|
@ -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<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.GetMails>(MailsActions.GET_MAILS)
|
||||
.pipe(
|
||||
ofType<MailsActions.GetMails>(MailsActions.GET_MAILS),
|
||||
exhaustMap((action) => {
|
||||
|
||||
let handle = {
|
||||
|
@ -80,8 +80,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
updateMail: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.UpdateMail>(MailsActions.UPDATE_MAIL)
|
||||
.pipe(
|
||||
ofType<MailsActions.UpdateMail>(MailsActions.UPDATE_MAIL),
|
||||
exhaustMap((action) => {
|
||||
return this.mailService.updateMail(action.payload).pipe(
|
||||
map(() => {
|
||||
|
@ -98,8 +98,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
updateMails: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.UpdateMails>(MailsActions.UPDATE_MAILS)
|
||||
.pipe(
|
||||
ofType<MailsActions.UpdateMails>(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<Action> =
|
||||
this.actions
|
||||
.ofType<MailsActions.SetCurrentMail>(MailsActions.SET_CURRENT_MAIL)
|
||||
.pipe(
|
||||
ofType<MailsActions.SetCurrentMail>(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<Action> =
|
||||
this.actions
|
||||
.ofType<MailsActions.CheckCurrentMail>(MailsActions.CHECK_CURRENT_MAIL)
|
||||
.pipe(
|
||||
ofType<MailsActions.CheckCurrentMail>(MailsActions.CHECK_CURRENT_MAIL),
|
||||
withLatestFrom(this.store.select(getMailsState)),
|
||||
map(([action, state]) => {
|
||||
|
||||
|
@ -153,8 +153,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
getMailsSuccess: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.GetMailsSuccess>(MailsActions.GET_MAILS_SUCCESS)
|
||||
.pipe(
|
||||
ofType<MailsActions.GetMailsSuccess>(MailsActions.GET_MAILS_SUCCESS),
|
||||
mergeMap(() =>
|
||||
[
|
||||
new MailsActions.CheckCurrentMail()
|
||||
|
@ -167,8 +167,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
updateMailsSuccess: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.UpdateMailsSuccess>(MailsActions.UPDATE_MAILS_SUCCESS)
|
||||
.pipe(
|
||||
ofType<MailsActions.UpdateMailsSuccess>(MailsActions.UPDATE_MAILS_SUCCESS),
|
||||
mergeMap(() =>
|
||||
[
|
||||
new MailsActions.DeselectAllMails(),
|
||||
|
@ -182,8 +182,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
updateMailSuccess: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.UpdateMailSuccess>(MailsActions.UPDATE_MAIL_SUCCESS)
|
||||
.pipe(
|
||||
ofType<MailsActions.UpdateMailSuccess>(MailsActions.UPDATE_MAIL_SUCCESS),
|
||||
debounceTime(500),
|
||||
map(() => {
|
||||
return new MailsActions.GetMails();
|
||||
|
@ -197,8 +197,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
setFolderOnSelectedMails: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.SetFolderOnSelectedMails>(MailsActions.SET_FOLDER_ON_SELECTED_MAILS)
|
||||
.pipe(
|
||||
ofType<MailsActions.SetFolderOnSelectedMails>(MailsActions.SET_FOLDER_ON_SELECTED_MAILS),
|
||||
withLatestFrom(
|
||||
this.store.select(getMailsState)),
|
||||
map(([action, state]) => {
|
||||
|
@ -225,8 +225,8 @@ export class MailsEffect
|
|||
@Effect()
|
||||
addLabelOnSelectedMails: Observable<MailsActions.MailsActionsAll> =
|
||||
this.actions
|
||||
.ofType<MailsActions.AddLabelOnSelectedMails>(MailsActions.ADD_LABEL_ON_SELECTED_MAILS)
|
||||
.pipe(
|
||||
ofType<MailsActions.AddLabelOnSelectedMails>(MailsActions.ADD_LABEL_ON_SELECTED_MAILS),
|
||||
withLatestFrom(this.store.select(getMailsState)),
|
||||
map(([action, state]) => {
|
||||
|
||||
|
|
|
@ -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,7 +25,9 @@ export class ResolveGuard implements CanActivate
|
|||
private _store: Store<MailAppState>
|
||||
)
|
||||
{
|
||||
this._store.select(getRouterState).subscribe(routerState => {
|
||||
this._store
|
||||
.pipe(select(getRouterState))
|
||||
.subscribe(routerState => {
|
||||
if ( routerState )
|
||||
{
|
||||
this.routerState = routerState.state;
|
||||
|
@ -59,8 +61,7 @@ export class ResolveGuard implements CanActivate
|
|||
this.getFolders(),
|
||||
this.getFilters(),
|
||||
this.getLabels()
|
||||
)
|
||||
.pipe(
|
||||
).pipe(
|
||||
filter(([foldersLoaded, filtersLoaded, labelsLoaded]) => !!(foldersLoaded && filtersLoaded && labelsLoaded)),
|
||||
take(1),
|
||||
switchMap(() =>
|
||||
|
@ -78,8 +79,8 @@ export class ResolveGuard implements CanActivate
|
|||
*/
|
||||
getFolders(): any
|
||||
{
|
||||
return this._store.select(getFoldersLoaded)
|
||||
.pipe(
|
||||
return this._store.pipe(
|
||||
select(getFoldersLoaded),
|
||||
tap(loaded => {
|
||||
if ( !loaded )
|
||||
{
|
||||
|
@ -98,8 +99,8 @@ export class ResolveGuard implements CanActivate
|
|||
*/
|
||||
getFilters(): any
|
||||
{
|
||||
return this._store.select(getFiltersLoaded)
|
||||
.pipe(
|
||||
return this._store.pipe(
|
||||
select(getFiltersLoaded),
|
||||
tap(loaded => {
|
||||
if ( !loaded )
|
||||
{
|
||||
|
@ -117,8 +118,8 @@ export class ResolveGuard implements CanActivate
|
|||
*/
|
||||
getLabels(): any
|
||||
{
|
||||
return this._store.select(getLabelsLoaded)
|
||||
.pipe(
|
||||
return this._store.pipe(
|
||||
select(getLabelsLoaded),
|
||||
tap(loaded => {
|
||||
if ( !loaded )
|
||||
{
|
||||
|
@ -137,8 +138,8 @@ export class ResolveGuard implements CanActivate
|
|||
*/
|
||||
getMails(): any
|
||||
{
|
||||
return this._store.select(getMailsLoaded)
|
||||
.pipe(
|
||||
return this._store.pipe(
|
||||
select(getMailsLoaded),
|
||||
tap((loaded: any) => {
|
||||
|
||||
if ( !this.routerState.params[loaded.id] || this.routerState.params[loaded.id] !== loaded.value )
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ScrumboardBoardAddListComponent
|
|||
form: FormGroup;
|
||||
|
||||
@Output()
|
||||
onListAdd: EventEmitter<any>;
|
||||
listAdded: EventEmitter<any>;
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<mat-icon *ngIf="board.settings.subscribed" class="board-subscribe s-16">remove_red_eye</mat-icon>
|
||||
<scrumboard-edit-board-name
|
||||
[board]="board"
|
||||
(onNameChanged)="onBoardNameChanged($event)">
|
||||
(boardNameChanged)="onBoardNameChanged($event)">
|
||||
</scrumboard-edit-board-name>
|
||||
</div>
|
||||
<!-- / BOARD NAME -->
|
||||
|
@ -69,7 +69,7 @@
|
|||
<!-- / LIST -->
|
||||
|
||||
<!-- 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"
|
||||
[@animate]="{value:'*',params:{duration:'350ms',x:'100%'}}">
|
||||
</scrumboard-board-add-list>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<mat-menu #labelsMenu="matMenu" [overlapTrigger]="false" class="scrumboard-labels-menu">
|
||||
|
||||
<scrumboard-label-selector [card]="card"
|
||||
(onCardLabelsChange)="updateCard()"></scrumboard-label-selector>
|
||||
(cardLabelsChanged)="updateCard()"></scrumboard-label-selector>
|
||||
|
||||
</mat-menu>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<mat-checkbox fxFlex fxLayout="row" fxLayoutAlign="start center"
|
||||
[checked]="card.idLabels.indexOf(label.id) > -1"
|
||||
(change)="toggleInArray(label.id, card.idLabels);cardLabelsChanged()">
|
||||
(change)="toggleInArray(label.id, card.idLabels);onCardLabelsChanged()">
|
||||
{{label.name}}
|
||||
</mat-checkbox>
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy
|
|||
card: any;
|
||||
|
||||
@Output()
|
||||
onCardLabelsChange: EventEmitter<any>;
|
||||
cardLabelsChanged: EventEmitter<any>;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@ export class ScrumboardEditBoardNameComponent
|
|||
board;
|
||||
|
||||
@Output()
|
||||
onNameChanged: EventEmitter<any>;
|
||||
boardNameChanged: EventEmitter<any>;
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ScrumboardBoardAddCardComponent
|
|||
form: FormGroup;
|
||||
|
||||
@Output()
|
||||
onCardAdd: EventEmitter<any>;
|
||||
cardAdded: EventEmitter<any>;
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export class ScrumboardBoardEditListNameComponent
|
|||
list;
|
||||
|
||||
@Output()
|
||||
onNameChanged: EventEmitter<any>;
|
||||
listNameChanged: EventEmitter<any>;
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<scrumboard-board-edit-list-name
|
||||
fxFlex="1 0 auto"
|
||||
[list]="list"
|
||||
(onNameChanged)="onListNameChanged($event)">
|
||||
(listNameChanged)="onListNameChanged($event)">
|
||||
</scrumboard-board-edit-list-name>
|
||||
|
||||
<div fxFlex="0 1 auto">
|
||||
|
@ -40,8 +40,7 @@
|
|||
|
||||
<!-- NEW CARD BUTTON-->
|
||||
<div class="list-footer">
|
||||
<scrumboard-board-add-card (onCardAdd)="onCardAdd($event)">
|
||||
</scrumboard-board-add-card>
|
||||
<scrumboard-board-add-card (cardAdded)="onCardAdd($event)"></scrumboard-board-add-card>
|
||||
</div>
|
||||
<!-- / NEW CARD BUTTON-->
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
<li>Updated various other packages</li>
|
||||
<li>Dark color theme</li>
|
||||
<li>Easier way of working multiple Angular Material color themes</li>
|
||||
<li>Various performance optimizations</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -64,7 +65,12 @@
|
|||
happen
|
||||
</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>
|
||||
(FuseConfig) Resetting the config on lazily loaded routes causes the layout items to
|
||||
show/hide before the actual content loads
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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<any>}
|
||||
*/
|
||||
@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<any>}
|
||||
*/
|
||||
@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())
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user