Compare commits

...

28 Commits

Author SHA1 Message Date
Sercan Yemen
7580176042 Increased the version number 2018-05-09 18:05:55 +03:00
Sercan Yemen
725719317a (Scrumboard) Fix: "Add a list" button is draggable and causing issues 2018-05-09 18:04:32 +03:00
Sercan Yemen
5ce276de8e rxjs 6.0.0 compatibility 2018-05-09 17:55:26 +03:00
Sercan Yemen
d330b42dec Updated @swimlane and couple other packages 2018-05-09 14:58:36 +03:00
Sercan Yemen
6bf2fe0b17 Updated ngrx to 6.0.0-beta.1 2018-05-09 14:50:30 +03:00
Sercan Yemen
a2187e0134 Set the output path 2018-05-06 14:33:17 +03:00
Sercan Yemen
a1cf7dba91 Angular version name 2018-05-06 14:32:10 +03:00
Sercan Yemen
b8039899db Fixed various dialog issues
+ (Shortcuts) Icon colors in shortcuts menu
2018-05-06 14:19:28 +03:00
Sercan Yemen
26e55d7f3d (Navigation) Fixed: Horizontal navigation items don't have 'hidden' and 'custom function' features 2018-05-06 13:44:34 +03:00
Sercan Yemen
1a9229a3ae (Contacts) Fixed: List item cell forces the list item width 2018-05-06 13:38:15 +03:00
Sercan Yemen
ebf865e2c7 Angular and Angular Material 6 compatibility
+ Small adjustments and polishing up in various apps and pages
2018-05-06 13:29:08 +03:00
Sercan Yemen
5fd146b8da Angular and Angular Material 6 compatibility (wip) 2018-05-05 19:54:52 +03:00
Sercan Yemen
3401a67959 intl polyfill is no longer required 2018-05-05 15:31:29 +03:00
Sercan Yemen
10dad46d7c Updated the position attribute of the sidenav
Did some changes on the core styles + forced input font sizes to 16px
2018-05-05 15:28:05 +03:00
Sercan Yemen
1c4983c756 rxjs upgrade 2018-05-05 14:42:18 +03:00
Sercan Yemen
f4636d9a37 Update Angular, Angular Material and Flex Layout to 6
Updated additional project files
Updated Angular Material examples
2018-05-04 19:28:20 +03:00
Sercan Yemen
02df48ab4e Remove the {navigation} import from the ThemeOptions and inject it where we actually use the fuseThemeOptions 2018-04-04 14:41:43 +03:00
Sercan Yemen
831d48f5a3 Remove the {navigation} import from the Shortcuts and inject it from the toolbar where we actually use the fuseShortcuts 2018-04-04 14:36:33 +03:00
Sercan Yemen
ca42f71b0e Added lodash for convenience
+ Removed the default settings from the settings service - this means the user must provide the default settings at all time
2018-04-04 14:30:52 +03:00
Sercan Yemen
ed4a3cb8d7 Move the layout settings reset to the 'NavigationEnd' to make things smoother on lazily loaded components 2018-04-04 14:20:45 +03:00
Sercan Yemen
5c66d95951 Warn the user about the missing sidebars in registry
+ Check if the sidebar exists before trying to close it
2018-04-04 13:37:59 +03:00
Sercan Yemen
44663342f4 Set the correct return type for the 'getSidebar' method
+ Close the navbar on NavigationEnd on mobile devices
2018-04-04 11:36:00 +03:00
Sercan Yemen
4e6207fef5 Fixed: Small issues caused by Flex Layout update
Fixed: Profile page header bg image doesn't correctly cover the header on mobile devices
Fixed: Contacts app form dialog header irregularities
Fixed: Analytics module doesn't import MatButtons
Fixed: Scrumboard card dialog toolbar issues
2018-03-31 13:20:22 +03:00
Sercan Yemen
bd67b660c8 Updated Flex Layout package
+ Fixed: Fuse sidebar doesn't scroll when the custom scrollbars disabled
+ Fixed: Expanded search bar style
2018-03-31 12:03:21 +03:00
Sercan Yemen
174789930d Allow url and function on collapsable nav items
+ Allow url and function to be exist at the same time on collapsable and normal nav items
2018-03-11 18:26:57 +03:00
Sercan Yemen
7af9c57977 Changed the title 2018-03-10 14:35:09 +03:00
Sercan Yemen
874ef26f0b Increase the version number 2018-03-10 14:34:17 +03:00
Sercan Yemen
329fbb5a38 Fix issues with folded navigation 2018-03-10 14:32:37 +03:00
636 changed files with 16352 additions and 12250 deletions

View File

@@ -1,74 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "fuse"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"app/main/content/components/angular-material",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"hmr": "environments/environment.hmr.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": [
"**/node_modules/**",
"**/src/app/fuse-fake-db/**/*",
"**/src/assets/angular-material-examples/**/*"
]
},
{
"project": "src/tsconfig.spec.json",
"exclude": [
"**/node_modules/**",
"**/src/app/fuse-fake-db/**/*",
"**/src/assets/angular-material-examples/**/*"
]
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**",
"**/src/app/fuse-fake-db/**/*",
"**/src/assets/angular-material-examples/**/*"
]
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}

View File

@@ -1,3 +1,4 @@
# Editor configuration, see http://editorconfig.org
root = true root = true
[*] [*]

5
.gitignore vendored
View File

@@ -30,13 +30,10 @@
/coverage /coverage
/libpeerconnection.log /libpeerconnection.log
npm-debug.log npm-debug.log
yarn-error.log
testem.log testem.log
/typings /typings
# e2e
/e2e/*.js
/e2e/*.map
# System Files # System Files
.DS_Store .DS_Store
Thumbs.db Thumbs.db

View File

@@ -1,6 +1,6 @@
# Fuse2 # Fuse2
Material Design Admin Template with Angular 5+ and Angular Material 2 Material Design Admin Template with Angular 6+ and Angular Material 2
## The Community ## The Community
@@ -14,11 +14,11 @@ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app w
## Code scaffolding ## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`. Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build ## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests ## Running unit tests
@@ -27,4 +27,8 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
## Running end-to-end tests ## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

140
angular.json Normal file
View File

@@ -0,0 +1,140 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"fuse": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/app/main/content/components/angular-material"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "fuse:build"
},
"configurations": {
"production": {
"browserTarget": "fuse:build:production"
},
"hmr": {
"hmr": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "fuse:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"styles.scss"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**",
"**/src/app/fuse-fake-db/**/*",
"**/src/assets/angular-material-examples/**/*"
]
}
}
}
},
"fuse-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "fuse:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**",
"**/src/app/fuse-fake-db/**/*",
"**/src/assets/angular-material-examples/**/*"
]
}
}
}
}
},
"defaultProject": "fuse"
}

31
e2e/protractor.conf.js Normal file
View File

@@ -0,0 +1,31 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const {SpecReporter} = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs : [
'./src/**/*.e2e-spec.ts'
],
capabilities : {
'browserName': 'chrome'
},
directConnect : true,
baseUrl : 'http://localhost:4200/',
framework : 'jasmine',
jasmineNodeOpts : {
showColors : true,
defaultTimeoutInterval: 30000,
print : function ()
{
}
},
onPrepare()
{
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
}
};

View File

@@ -9,6 +9,6 @@ describe('Fuse2 App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!'); expect(page.getParagraphText()).toEqual('Welcome to Fuse2!');
}); });
}); });

View File

@@ -1,8 +1,7 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/e2e", "outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es5",
"types": [ "types": [

View File

@@ -1,33 +0,0 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};

14802
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
{ {
"name": "fuse", "name": "fuse",
"version": "5.2.9", "version": "6.0.1",
"license": "https://themeforest.net/licenses/terms/regular", "license": "https://themeforest.net/licenses/terms/regular",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --open", "start": "ng serve --open",
"start-hmr": "ng serve --hmr -e=hmr -sm=false", "start-hmr": "ng serve --configuration hmr -sm=false",
"start-hmr-sourcemaps": "ng serve --hmr -e=hmr", "start-hmr-sourcemaps": "ng serve --hmr -e=hmr",
"build": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev", "build": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev",
"build-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev --stats-json", "build-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --dev --stats-json",
@@ -19,67 +19,70 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"@agm/core": "1.0.0-beta.2", "@agm/core": "1.0.0-beta.2",
"@angular/animations": "5.2.8", "@angular/animations": "6.0.0",
"@angular/cdk": "5.2.4", "@angular/cdk": "6.0.1",
"@angular/common": "5.2.8", "@angular/common": "6.0.0",
"@angular/compiler": "5.2.8", "@angular/compiler": "6.0.0",
"@angular/core": "5.2.8", "@angular/core": "6.0.0",
"@angular/flex-layout": "5.0.0-beta.13", "@angular/flex-layout": "6.0.0-beta.15",
"@angular/forms": "5.2.8", "@angular/forms": "6.0.0",
"@angular/http": "5.2.8", "@angular/http": "6.0.0",
"@angular/material": "5.2.4", "@angular/material": "6.0.1",
"@angular/material-moment-adapter": "5.2.4", "@angular/material-moment-adapter": "6.0.1",
"@angular/platform-browser": "5.2.8", "@angular/platform-browser": "6.0.0",
"@angular/platform-browser-dynamic": "5.2.8", "@angular/platform-browser-dynamic": "6.0.0",
"@angular/router": "5.2.8", "@angular/router": "6.0.0",
"@ngrx/effects": "5.2.0", "@ngrx/effects": "6.0.0-beta.1",
"@ngrx/router-store": "5.2.0", "@ngrx/router-store": "6.0.0-beta.1",
"@ngrx/store": "5.2.0", "@ngrx/store": "6.0.0-beta.1",
"@ngrx/store-devtools": "5.2.0", "@ngrx/store-devtools": "6.0.0-beta.1",
"@ngx-translate/core": "9.1.1", "@ngx-translate/core": "10.0.1",
"@swimlane/ngx-charts": "7.1.1", "@swimlane/ngx-charts": "8.0.0",
"@swimlane/ngx-datatable": "11.2.0", "@swimlane/ngx-datatable": "12.0.0",
"@swimlane/ngx-dnd": "3.1.0", "@swimlane/ngx-dnd": "4.0.0",
"@types/prismjs": "1.9.0", "@types/prismjs": "1.9.0",
"angular-calendar": "0.23.6", "angular-calendar": "0.24.0",
"angular-in-memory-web-api": "0.5.3", "angular-in-memory-web-api": "0.6.0",
"chart.js": "2.7.2", "chart.js": "2.7.2",
"classlist.js": "1.1.20150312", "classlist.js": "1.1.20150312",
"core-js": "2.5.3", "core-js": "2.5.6",
"d3": "4.13.0", "d3": "5.2.0",
"hammerjs": "2.0.8", "hammerjs": "2.0.8",
"intl": "1.2.5", "lodash": "4.17.10",
"moment": "2.21.0", "moment": "2.22.1",
"ng2-charts": "1.6.0", "ng2-charts": "1.6.0",
"ngrx-store-freeze": "0.2.1", "ngrx-store-freeze": "0.2.2",
"ngx-color-picker": "5.3.4", "ngx-color-picker": "6.0.0",
"ngx-cookie-service": "1.0.10", "ngx-cookie-service": "1.0.10",
"perfect-scrollbar": "1.3.0", "perfect-scrollbar": "1.3.0",
"prismjs": "1.11.0", "prismjs": "1.14.0",
"rxjs": "5.5.6", "rxjs": "6.1.0",
"rxjs-compat": "6.1.0",
"web-animations-js": "2.3.1", "web-animations-js": "2.3.1",
"zone.js": "0.8.20" "zone.js": "0.8.26"
}, },
"devDependencies": { "devDependencies": {
"@angular/cli": "1.7.3", "@angular/cli": "6.0.0",
"@angular/compiler-cli": "5.2.8", "@angular/compiler-cli": "6.0.0",
"@angular/language-service": "5.2.8", "@angular/language-service": "6.0.0",
"@angular-devkit/build-angular": "0.6.0",
"@angularclass/hmr": "2.1.3", "@angularclass/hmr": "2.1.3",
"@types/jasmine": "2.8.6", "@types/jasmine": "2.8.7",
"@types/jasminewd2": "2.0.3", "@types/jasminewd2": "2.0.3",
"@types/node": "6.0.101", "@types/lodash": "4.14.108",
"@types/node": "8.9.5",
"codelyzer": "4.2.1", "codelyzer": "4.2.1",
"jasmine-core": "2.8.0", "jasmine-core": "2.99.1",
"jasmine-spec-reporter": "4.2.1", "jasmine-spec-reporter": "4.2.1",
"karma": "2.0.0", "karma": "1.7.1",
"karma-chrome-launcher": "2.2.0", "karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "1.4.2", "karma-coverage-istanbul-reporter": "1.4.2",
"karma-jasmine": "1.1.1", "karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "0.2.2", "karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.1.2", "protractor": "5.3.1",
"ts-node": "4.1.0", "ts-node": "5.0.1",
"tslint": "5.9.1", "tslint": "5.9.1",
"typescript": "2.6.2", "typescript": "2.7.2",
"webpack-bundle-analyzer": "2.11.1" "webpack-bundle-analyzer": "2.11.1"
} }
} }

View File

@@ -1,28 +0,0 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

View File

@@ -1,6 +1,7 @@
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval'; import { interval } from 'rxjs';
import { map } from 'rxjs/operators';
import * as moment from 'moment'; import * as moment from 'moment';
@@ -31,13 +32,11 @@ export class FuseCountdownComponent implements OnInit
let diff = eventDate.diff(currDate, 'seconds'); let diff = eventDate.diff(currDate, 'seconds');
const countDown = const countDown = interval(1000).pipe(
Observable map(value => {
.interval(1000)
.map(value => {
return diff = diff - 1; return diff = diff - 1;
}) }),
.map(value => { map(value => {
const timeLeft = moment.duration(value, 'seconds'); const timeLeft = moment.duration(value, 'seconds');
return { return {
@@ -46,7 +45,8 @@ export class FuseCountdownComponent implements OnInit
minutes: timeLeft.minutes(), minutes: timeLeft.minutes(),
seconds: timeLeft.seconds() seconds: timeLeft.seconds()
}; };
}); })
);
countDown.subscribe(value => { countDown.subscribe(value => {
this.countdown = value; this.countdown = value;

View File

@@ -5,6 +5,7 @@ import 'prismjs/components/prism-csharp';
import 'prismjs/components/prism-css'; import 'prismjs/components/prism-css';
import 'prismjs/components/prism-diff'; import 'prismjs/components/prism-diff';
import 'prismjs/components/prism-markup'; import 'prismjs/components/prism-markup';
import 'prismjs/components/prism-markup-templating';
import 'prismjs/components/prism-java'; import 'prismjs/components/prism-java';
import 'prismjs/components/prism-javascript'; import 'prismjs/components/prism-javascript';
import 'prismjs/components/prism-json'; import 'prismjs/components/prism-json';

View File

@@ -1,4 +1,30 @@
<a class="nav-link" matRipple> <ng-container *ngIf="!item.hidden">
<!-- normal collapse -->
<a class="nav-link" *ngIf="!item.url && !item.function" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.url -->
<a class="nav-link" *ngIf="item.url && !item.function"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" *ngIf="!item.url && item.function" (click)="item.function()" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && item.function" (click)="item.function()"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
@@ -6,18 +32,21 @@
{{item.badge.title}} {{item.badge.title}}
</span> </span>
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon> <mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
</a> </ng-template>
<div class="children" [ngClass]="{'open': isOpen}"> <div class="children" [ngClass]="{'open': isOpen}">
<div class="{{fuseSettings.colorClasses.navbar}}"> <div class="{{fuseSettings.colorClasses.navbar}}">
<ng-container *ngFor="let item of item.children"> <ng-container *ngFor="let item of item.children">
<fuse-nav-horizontal-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-horizontal-item> <fuse-nav-horizontal-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-horizontal-item>
<fuse-nav-horizontal-collapse *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-horizontal-collapse> <fuse-nav-horizontal-collapse *ngIf="item.type=='collapse'"
[item]="item"></fuse-nav-horizontal-collapse>
<fuse-nav-horizontal-collapse *ngIf="item.type=='group'" [item]="item"></fuse-nav-horizontal-collapse> <fuse-nav-horizontal-collapse *ngIf="item.type=='group'" [item]="item"></fuse-nav-horizontal-collapse>
</ng-container> </ng-container>
</div> </div>
</div> </div>
</ng-container>

View File

@@ -1,7 +1,8 @@
import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core'; import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { fuseAnimations } from '../../../../animations/index'; import { fuseAnimations } from '../../../../animations/index';
import { FuseConfigService } from '../../../../services/config.service'; import { FuseConfigService } from '../../../../services/config.service';
import { Subscription } from 'rxjs/Subscription';
@Component({ @Component({
selector : 'fuse-nav-horizontal-collapse', selector : 'fuse-nav-horizontal-collapse',

View File

@@ -1,18 +1,30 @@
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active" <ng-container *ngIf="!item.hidden">
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</a>
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple> <!-- item.url -->
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && item.function" (click)="item.function()"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{item.badge.title}}
</span> </span>
</span> </ng-template>
</ng-container>

View File

@@ -1,5 +1,5 @@
import { EventEmitter, Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject'; import { Subject } from 'rxjs';
@Injectable() @Injectable()
export class FuseNavigationService export class FuseNavigationService

View File

@@ -1,6 +1,30 @@
<ng-container *ngIf="!item.hidden"> <ng-container *ngIf="!item.hidden">
<a class="nav-link" matRipple (click)="toggleOpen($event)"> <!-- normal collapse -->
<a class="nav-link" *ngIf="!item.url && !item.function" (click)="toggleOpen($event)" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.url -->
<a class="nav-link" *ngIf="item.url && !item.function" (click)="toggleOpen($event)"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" *ngIf="!item.url && item.function" (click)="toggleOpen($event);item.function()" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && item.function" (click)="toggleOpen($event);item.function()"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
@@ -8,7 +32,7 @@
{{item.badge.title}} {{item.badge.title}}
</span> </span>
<mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon> <mat-icon class="collapse-arrow">keyboard_arrow_right</mat-icon>
</a> </ng-template>
<div class="children" [@slideInOut]="isOpen"> <div class="children" [@slideInOut]="isOpen">
<ng-container *ngFor="let item of item.children"> <ng-container *ngFor="let item of item.children">

View File

@@ -1,22 +1,31 @@
<ng-container *ngIf="!item.hidden"> <ng-container *ngIf="!item.hidden">
<a class="nav-link" *ngIf="item.url" [routerLink]="[item.url]" routerLinkActive="active" <!-- item.url -->
<a class="nav-link" *ngIf="item.url && !item.function"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple> [routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <ng-container *ngTemplateOutlet="itemContent"></ng-container>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}}
</span>
</a> </a>
<span class="nav-link" *ngIf="item.function" (click)="item.function()" matRipple> <!-- item.function -->
<span class="nav-link" *ngIf="!item.url && item.function" (click)="item.function()" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && item.function" (click)="item.function()"
[routerLink]="[item.url]" routerLinkActive="active"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<ng-template #itemContent>
<mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon> <mat-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</mat-icon>
<span class="nav-link-title" [translate]="item.translate">{{item.title}}</span> <span class="nav-link-title" [translate]="item.translate">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate" <span class="nav-link-badge" *ngIf="item.badge" [translate]="item.badge.translate"
[ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}"> [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">
{{item.badge.title}} {{item.badge.title}}
</span> </span>
</span> </ng-template>
</ng-container> </ng-container>

View File

@@ -1,5 +1,7 @@
<div class="fuse-search-bar" [ngClass]="{'expanded':!collapsed}" fxFlex="0 1 auto"> <div class="fuse-search-bar" [ngClass]="{'expanded':!collapsed}">
<div [ngClass]="toolbarColor" fxLayout="row" fxLayoutAlign="start center" fxFlex>
<div class="fuse-search-bar-content" [ngClass]="toolbarColor">
<label for="fuse-search-bar-input"> <label for="fuse-search-bar-input">
<button mat-icon-button class="fuse-search-bar-expander" aria-label="Expand Search Bar" (click)="expand()" <button mat-icon-button class="fuse-search-bar-expander" aria-label="Expand Search Bar" (click)="expand()"
*ngIf="collapsed"> *ngIf="collapsed">
@@ -10,12 +12,14 @@
</span>--> </span>-->
</label> </label>
<input id="fuse-search-bar-input" class="ml-24" type="text" placeholder="Search" (input)="search($event)" fxFlex> <input id="fuse-search-bar-input" class="ml-24" type="text" placeholder="Search" (input)="search($event)"
fxFlex>
<button mat-icon-button class="fuse-search-bar-collapser mat-icon-button" (click)="collapse()" <button mat-icon-button class="fuse-search-bar-collapser" (click)="collapse()"
aria-label="Collapse Search Bar"> aria-label="Collapse Search Bar">
<mat-icon class="s-24">close</mat-icon> <mat-icon class="s-24">close</mat-icon>
</button> </button>
</div> </div>
</div> </div>

View File

@@ -3,6 +3,8 @@
:host { :host {
.fuse-search-bar { .fuse-search-bar {
display: flex;
flex: 0 1 auto;
min-width: 64px; min-width: 64px;
height: 64px; height: 64px;
font-size: 13px; font-size: 13px;
@@ -11,6 +13,12 @@
height: 56px; height: 56px;
} }
.fuse-search-bar-content {
display: flex;
flex: 1 1 auto;
align-items: center;
justify-content: flex-start;
.fuse-search-bar-expander, .fuse-search-bar-expander,
.fuse-search-bar-collapser { .fuse-search-bar-collapser {
cursor: pointer; cursor: pointer;
@@ -30,6 +38,7 @@
width: 64px !important; width: 64px !important;
height: 64px !important; height: 64px !important;
line-height: 64px !important; line-height: 64px !important;
@include media-breakpoint-down('sm') { @include media-breakpoint-down('sm') {
height: 56px !important; height: 56px !important;
line-height: 56px !important; line-height: 56px !important;
@@ -42,10 +51,12 @@
#fuse-search-bar-input { #fuse-search-bar-input {
display: none; display: none;
flex: 1 0 auto;
min-height: 64px; min-height: 64px;
background-color: transparent; background-color: transparent;
font-size: 16px; font-size: 16px;
} }
}
&.expanded { &.expanded {
position: absolute; position: absolute;
@@ -55,12 +66,15 @@
left: 0; left: 0;
z-index: 10; z-index: 10;
.fuse-search-bar-content {
#fuse-search-bar-input { #fuse-search-bar-input {
display: block; display: flex;
} }
.fuse-search-bar-collapser { .fuse-search-bar-collapser {
display: block; display: flex;
}
} }
} }
} }

View File

@@ -1,5 +1,5 @@
import { Component, EventEmitter, Output } from '@angular/core'; import { Component, EventEmitter, Output } from '@angular/core';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { FuseConfigService } from '@fuse/services/config.service'; import { FuseConfigService } from '@fuse/services/config.service';

View File

@@ -17,7 +17,7 @@
*ngFor="let shortcutItem of shortcutItems"> *ngFor="let shortcutItem of shortcutItems">
<a mat-icon-button matTooltip="{{shortcutItem.title}}" [routerLink]="shortcutItem.url"> <a mat-icon-button matTooltip="{{shortcutItem.title}}" [routerLink]="shortcutItem.url">
<mat-icon *ngIf="shortcutItem.icon">{{shortcutItem.icon}}</mat-icon> <mat-icon class="secondary-text" *ngIf="shortcutItem.icon">{{shortcutItem.icon}}</mat-icon>
<span *ngIf="!shortcutItem.icon" class="h2 secondary-text text-bold"> <span *ngIf="!shortcutItem.icon" class="h2 secondary-text text-bold">
{{shortcutItem.title.substr(0, 1).toUpperCase()}} {{shortcutItem.title.substr(0, 1).toUpperCase()}}
</span> </span>
@@ -42,46 +42,70 @@
<mat-menu #addMenu="matMenu" class="w-240"> <mat-menu #addMenu="matMenu" class="w-240">
<mat-form-field class="px-16 w-100-p" (click)="$event.stopPropagation()" floatPlaceholder="never"> <mat-form-field class="px-16 w-100-p" (click)="$event.stopPropagation()" floatLabel="never">
<input #searchInput matInput placeholder="Search for an app or a page" (input)="search($event)"> <input #searchInput matInput placeholder="Search for an app or a page" (input)="search($event)">
</mat-form-field> </mat-form-field>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-nav-list *ngIf="!searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar> <mat-nav-list *ngIf="!searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar>
<mat-list-item *ngFor="let shortcutItem of shortcutItems" <mat-list-item *ngFor="let shortcutItem of shortcutItems"
(click)="toggleShortcut($event, shortcutItem)"> (click)="toggleShortcut($event, shortcutItem)">
<div class="w-100-p" fxLayout="row" fxLayoutAlign="start center"> <div class="w-100-p" fxLayout="row" fxLayoutAlign="start center">
<mat-icon mat-list-icon class="mr-8" *ngIf="shortcutItem.icon">{{shortcutItem.icon}}</mat-icon>
<mat-icon mat-list-icon class="mr-8 secondary-text" *ngIf="shortcutItem.icon">
{{shortcutItem.icon}}
</mat-icon>
<span class="h2 w-32 h-32 p-4 mr-8 secondary-text text-bold" fxLayout="row" <span class="h2 w-32 h-32 p-4 mr-8 secondary-text text-bold" fxLayout="row"
fxLayoutAlign="center center" *ngIf="!shortcutItem.icon"> fxLayoutAlign="center center" *ngIf="!shortcutItem.icon">
{{shortcutItem.title.substr(0, 1).toUpperCase()}} {{shortcutItem.title.substr(0, 1).toUpperCase()}}
</span> </span>
<p matLine fxFlex>{{shortcutItem.title}}</p> <p matLine fxFlex>{{shortcutItem.title}}</p>
<mat-icon class="ml-8">star</mat-icon>
<mat-icon class="ml-8 amber-fg">star</mat-icon>
</div> </div>
</mat-list-item> </mat-list-item>
<mat-list-item *ngIf="shortcutItems.length === 0"> <mat-list-item *ngIf="shortcutItems.length === 0">
<p> <p>
<small>No shortcuts yet!</small> <small>No shortcuts yet!</small>
</p> </p>
</mat-list-item> </mat-list-item>
</mat-nav-list> </mat-nav-list>
<mat-nav-list *ngIf="searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar> <mat-nav-list *ngIf="searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar>
<mat-list-item *ngFor="let navigationItem of filteredNavigationItems" <mat-list-item *ngFor="let navigationItem of filteredNavigationItems"
(click)="toggleShortcut($event, navigationItem)"> (click)="toggleShortcut($event, navigationItem)">
<div class="w-100-p" fxLayout="row" fxLayoutAlign="start center"> <div class="w-100-p" fxLayout="row" fxLayoutAlign="start center">
<mat-icon mat-list-icon class="mr-8" *ngIf="navigationItem.icon">{{navigationItem.icon}}</mat-icon>
<mat-icon mat-list-icon class="mr-8 secondary-text" *ngIf="navigationItem.icon">
{{navigationItem.icon}}
</mat-icon>
<span class="h2 w-32 h-32 p-4 mr-8 secondary-text text-bold" fxLayout="row" <span class="h2 w-32 h-32 p-4 mr-8 secondary-text text-bold" fxLayout="row"
fxLayoutAlign="center center" *ngIf="!navigationItem.icon"> fxLayoutAlign="center center" *ngIf="!navigationItem.icon">
{{navigationItem.title.substr(0, 1).toUpperCase()}} {{navigationItem.title.substr(0, 1).toUpperCase()}}
</span> </span>
<p matLine fxFlex>{{navigationItem.title}}</p> <p matLine fxFlex>{{navigationItem.title}}</p>
<mat-icon class="ml-8" *ngIf="isInShortcuts(navigationItem)">star</mat-icon>
<mat-icon class="ml-8 amber-fg" *ngIf="isInShortcuts(navigationItem)">star</mat-icon>
</div> </div>
</mat-list-item> </mat-list-item>
</mat-nav-list> </mat-nav-list>
</mat-menu> </mat-menu>
</div> </div>

View File

@@ -1,14 +1,13 @@
import { Component, ElementRef, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; import { Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { ObservableMedia } from '@angular/flex-layout'; import { ObservableMedia } from '@angular/flex-layout';
import { Subscription } from 'rxjs';
import { CookieService } from 'ngx-cookie-service'; import { CookieService } from 'ngx-cookie-service';
import { FuseMatchMediaService } from '@fuse/services/match-media.service'; import { FuseMatchMediaService } from '@fuse/services/match-media.service';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
import { FuseConfigService } from '@fuse/services/config.service'; import { FuseConfigService } from '@fuse/services/config.service';
import { navigation } from 'app/navigation/navigation';
@Component({ @Component({
selector : 'fuse-shortcuts', selector : 'fuse-shortcuts',
templateUrl: './shortcuts.component.html', templateUrl: './shortcuts.component.html',
@@ -25,6 +24,8 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
matchMediaSubscription: Subscription; matchMediaSubscription: Subscription;
onConfigChanged: Subscription; onConfigChanged: Subscription;
@Input() navigation: any;
@ViewChild('searchInput') searchInputField; @ViewChild('searchInput') searchInputField;
@ViewChild('shortcuts') shortcutsEl: ElementRef; @ViewChild('shortcuts') shortcutsEl: ElementRef;
@@ -37,8 +38,6 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
private cookieService: CookieService private cookieService: CookieService
) )
{ {
this.filteredNavigationItems = this.navigationItems = this.fuseNavigationService.getFlatNavigation(navigation);
this.onConfigChanged = this.onConfigChanged =
this.fuseConfig.onConfigChanged this.fuseConfig.onConfigChanged
.subscribe( .subscribe(
@@ -50,6 +49,9 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
ngOnInit() ngOnInit()
{ {
// Get the navigation items and flatten them
this.filteredNavigationItems = this.navigationItems = this.fuseNavigationService.getFlatNavigation(this.navigation);
const cookieExists = this.cookieService.check('FUSE2.shortcuts'); const cookieExists = this.cookieService.check('FUSE2.shortcuts');
if ( cookieExists ) if ( cookieExists )

View File

@@ -5,7 +5,8 @@ fuse-sidebar {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
overflow: hidden; overflow-x: hidden;
overflow-y: auto;
width: 280px; width: 280px;
min-width: 280px; min-width: 280px;
max-width: 280px; max-width: 280px;

View File

@@ -1,11 +1,11 @@
import { Component, ElementRef, HostBinding, HostListener, Inject, Input, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core'; import { Component, ElementRef, HostBinding, HostListener, Input, OnDestroy, OnInit, Renderer2, 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 { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { FuseSidebarService } from './sidebar.service'; import { FuseSidebarService } from './sidebar.service';
import { FuseMatchMediaService } from '@fuse/services/match-media.service'; import { FuseMatchMediaService } from '@fuse/services/match-media.service';
import { DOCUMENT } from '@angular/common'; import { FuseConfigService } from '@fuse/services/config.service';
@Component({ @Component({
selector : 'fuse-sidebar', selector : 'fuse-sidebar',
@@ -21,7 +21,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Align // Align
@Input() @Input()
align: string; align: 'left' | 'right';
// Open // Open
@HostBinding('class.open') @HostBinding('class.open')
@@ -38,21 +38,57 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Folded // Folded
@HostBinding('class.folded') @HostBinding('class.folded')
@Input() @Input()
set folded(value) set folded(value: boolean)
{ {
// Only work if the sidebar is not closed
if ( !this.opened )
{
return;
}
// Set the folded
this._folded = value; this._folded = value;
if ( value ) // Programmatically add/remove margin to the element
// that comes after or before based on the alignment
let sibling,
styleRule;
const styleValue = '64px';
// Get the sibling and set the style rule
if ( this.align === 'left' )
{ {
this.fold(); sibling = this.elementRef.nativeElement.nextElementSibling;
styleRule = 'marginLeft';
} }
else else
{ {
this.unfold(); sibling = this.elementRef.nativeElement.previousElementSibling;
styleRule = 'marginRight';
}
// If there is no sibling, return...
if ( !sibling )
{
return;
}
// If folded...
if ( value )
{
// Set the style
this.renderer.setStyle(sibling, styleRule, styleValue);
}
// If unfolded...
else
{
// Remove the style
this.renderer.removeStyle(sibling, styleRule);
} }
} }
get folded() get folded(): boolean
{ {
return this._folded; return this._folded;
} }
@@ -62,31 +98,31 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
unfolded: boolean; unfolded: boolean;
// Private // Private
private _folded = false; private _folded: boolean;
private _wasActive: boolean; private _wasActive: boolean;
private _backdrop: HTMLElement | null = null; private _backdrop: HTMLElement | null = null;
private _player: AnimationPlayer; private _player: AnimationPlayer;
private _matchMediaWatcher: Subscription; private _onMediaChangeSubscription: Subscription;
/** /**
* Constructor * Constructor
* *
* @param renderer * @param {Renderer2} renderer
* @param elementRef * @param {ElementRef} elementRef
* @param animationBuilder * @param {AnimationBuilder} animationBuilder
* @param sidebarService * @param {ObservableMedia} observableMedia
* @param matchMedia * @param {FuseConfigService} fuseConfigService
* @param media * @param {FuseSidebarService} fuseSidebarService
* @param document * @param {FuseMatchMediaService} fuseMatchMediaService
*/ */
constructor( constructor(
private renderer: Renderer2, private renderer: Renderer2,
private elementRef: ElementRef, private elementRef: ElementRef,
private animationBuilder: AnimationBuilder, private animationBuilder: AnimationBuilder,
private sidebarService: FuseSidebarService, private observableMedia: ObservableMedia,
private matchMedia: FuseMatchMediaService, private fuseConfigService: FuseConfigService,
private media: ObservableMedia, private fuseSidebarService: FuseSidebarService,
@Inject(DOCUMENT) private document: any private fuseMatchMediaService: FuseMatchMediaService
) )
{ {
// Set the defaults // Set the defaults
@@ -101,7 +137,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
ngOnInit(): void ngOnInit(): void
{ {
// Register the sidebar // Register the sidebar
this.sidebarService.register(this.name, this); this.fuseSidebarService.register(this.name, this);
// Setup alignment // Setup alignment
this._setupAlignment(); this._setupAlignment();
@@ -115,27 +151,35 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
*/ */
ngOnDestroy(): void ngOnDestroy(): void
{ {
// Unregister the sidebar // If the sidebar is folded, unfold it to revert modifications
this.sidebarService.unregister(this.name); if ( this.folded )
{
this.unfold();
}
// Unregister the media watcher // Unregister the sidebar
this._matchMediaWatcher.unsubscribe(); this.fuseSidebarService.unregister(this.name);
// Unsubscribe from the media watcher subscription
this._onMediaChangeSubscription.unsubscribe();
} }
/** /**
* Setup the alignment * Set the sidebar alignment
* *
* @private * @private
*/ */
private _setupAlignment(): void private _setupAlignment(): void
{ {
if ( this.align === 'left' ) // Add the correct class name to the sidebar
// element depending on the align attribute
if ( this.align === 'right' )
{ {
this.renderer.addClass(this.elementRef.nativeElement, 'left-aligned'); this.renderer.addClass(this.elementRef.nativeElement, 'right-aligned');
} }
else else
{ {
this.renderer.addClass(this.elementRef.nativeElement, 'right-aligned'); this.renderer.addClass(this.elementRef.nativeElement, 'left-aligned');
} }
} }
@@ -156,12 +200,12 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
this._wasActive = false; this._wasActive = false;
// Act on every media change // Act on every media change
this._matchMediaWatcher = this._onMediaChangeSubscription =
this.matchMedia.onMediaChange.subscribe(() => { this.fuseMatchMediaService.onMediaChange.subscribe(() => {
// Get the active status // Get the active status
const isActive = this.media.isActive(this.lockedOpen); const isActive = this.observableMedia.isActive(this.lockedOpen);
// If the both status are the same, don't act // If the both status are the same, don't act
if ( this._wasActive === isActive ) if ( this._wasActive === isActive )
@@ -169,14 +213,24 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
return; return;
} }
// Store the new active status
this._wasActive = isActive;
// Activate the lockedOpen // Activate the lockedOpen
if ( isActive ) if ( isActive )
{ {
// Set the lockedOpen status // Set the lockedOpen status
this.isLockedOpen = true; this.isLockedOpen = true;
// Force the the opened status to true
this.opened = true;
// Read the folded setting from the config
// and fold the sidebar if it's true
if ( this.fuseConfigService.config.layout.navigationFolded )
{
this.fold();
}
// Hide the backdrop if any exists
this.hideBackdrop();
} }
// De-Activate the lockedOpen // De-Activate the lockedOpen
else else
@@ -186,7 +240,13 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Unfold the sidebar in case if it was folded // Unfold the sidebar in case if it was folded
this.unfold(); this.unfold();
// Force the the opened status to close
this.opened = false;
} }
// Store the new active status
this._wasActive = isActive;
}); });
} }
@@ -205,9 +265,6 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Set the opened status // Set the opened status
this.opened = true; this.opened = true;
// Add a css class to the body
this.renderer.addClass(this.document.body, 'fuse-sidebar-opened');
} }
/** /**
@@ -215,7 +272,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
*/ */
close(): void close(): void
{ {
if ( !this.opened ) if ( !this.opened || this.isLockedOpen )
{ {
return; return;
} }
@@ -225,9 +282,6 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Set the opened status // Set the opened status
this.opened = false; this.opened = false;
// Remove the css class from the body
this.renderer.removeClass(this.document.body, 'fuse-sidebar-opened');
} }
/** /**
@@ -259,9 +313,6 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Unfold the sidebar temporarily // Unfold the sidebar temporarily
this.unfolded = true; this.unfolded = true;
// Add a css class to the body
this.renderer.addClass(this.document.body, 'fuse-sidebar-folded-unfolded');
} }
/** /**
@@ -278,9 +329,6 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
// Fold the sidebar back // Fold the sidebar back
this.unfolded = false; this.unfolded = false;
// Remove the css class from the body
this.renderer.removeClass(this.document.body, 'fuse-sidebar-folded-unfolded');
} }
/** /**
@@ -288,8 +336,14 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
*/ */
fold(): void fold(): void
{ {
// Add a css class to the body // Only work if the sidebar is not folded
this.renderer.addClass(this.document.body, 'fuse-sidebar-folded'); if ( this.folded )
{
return;
}
// Fold
this.folded = true;
} }
/** /**
@@ -297,8 +351,14 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
*/ */
unfold(): void unfold(): void
{ {
// Remove the css class from the body // Only work if the sidebar is folded
this.renderer.removeClass(this.document.body, 'fuse-sidebar-folded'); if ( !this.folded )
{
return;
}
// Unfold
this.folded = false;
} }
/** /**
@@ -306,7 +366,14 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
*/ */
toggleFold(): void toggleFold(): void
{ {
this.folded = !this.folded; if ( this.folded )
{
this.unfold();
}
else
{
this.fold();
}
} }
/** /**

View File

@@ -46,7 +46,7 @@ export class FuseSidebarService
// Check if the sidebar exists // Check if the sidebar exists
if ( !this._registry[key] ) if ( !this._registry[key] )
{ {
console.error(`The sidebar with the key '${key}' doesn't exist in the registry.`); console.warn(`The sidebar with the key '${key}' doesn't exist in the registry.`);
} }
// Unregister the sidebar // Unregister the sidebar
@@ -57,13 +57,14 @@ export class FuseSidebarService
* Return the sidebar with the given key * Return the sidebar with the given key
* *
* @param key * @param key
* @returns {FuseSidebarComponent}
*/ */
getSidebar(key): any getSidebar(key): FuseSidebarComponent
{ {
// Check if the sidebar exists // Check if the sidebar exists
if ( !this._registry[key] ) if ( !this._registry[key] )
{ {
console.error(`The sidebar with the key '${key}' doesn't exist in the registry.`); console.warn(`The sidebar with the key '${key}' doesn't exist in the registry.`);
return; return;
} }

View File

@@ -1,13 +1,11 @@
import { Component, ElementRef, HostBinding, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core'; import { Component, ElementRef, HostBinding, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations'; import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseConfigService } from '@fuse/services/config.service'; import { FuseConfigService } from '@fuse/services/config.service';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
import { navigation } from 'app/navigation/navigation';
@Component({ @Component({
selector : 'fuse-theme-options', selector : 'fuse-theme-options',
templateUrl: './theme-options.component.html', templateUrl: './theme-options.component.html',
@@ -16,6 +14,7 @@ import { navigation } from 'app/navigation/navigation';
}) })
export class FuseThemeOptionsComponent implements OnInit, OnDestroy export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{ {
@Input() navigation;
@ViewChild('openButton') openButton; @ViewChild('openButton') openButton;
@ViewChild('panel') panel; @ViewChild('panel') panel;
@ViewChild('overlay') overlay: ElementRef; @ViewChild('overlay') overlay: ElementRef;
@@ -43,10 +42,17 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
this.config = newConfig; this.config = newConfig;
} }
); );
}
ngOnInit()
{
this.renderer.listen(this.overlay.nativeElement, 'click', () => {
this.closeBar();
});
// Get the nav model and add customize nav item // Get the nav model and add customize nav item
// that opens the bar programmatically // that opens the bar programmatically
const nav: any = navigation; const nav: any = this.navigation;
nav.push({ nav.push({
'id' : 'custom-function', 'id' : 'custom-function',
@@ -66,13 +72,6 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
}); });
} }
ngOnInit()
{
this.renderer.listen(this.overlay.nativeElement, 'click', () => {
this.closeBar();
});
}
ngOnDestroy() ngOnDestroy()
{ {
this.onConfigChanged.unsubscribe(); this.onConfigChanged.unsubscribe();

View File

@@ -67,16 +67,16 @@ fuse-widget {
&.mat-form-field-type-mat-select { &.mat-form-field-type-mat-select {
.mat-input-wrapper { .mat-form-field-wrapper {
padding: 16px 0; padding: 16px 0;
.mat-input-infix { .mat-form-field-infix {
border: none; border: none;
padding: 0; padding: 0;
} }
} }
.mat-input-underline { .mat-form-field-underline {
display: none; display: none;
} }
} }

View File

@@ -1,7 +1,7 @@
import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core'; import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core';
import { MatSidenav } from '@angular/material'; import { MatSidenav } from '@angular/material';
import { ObservableMedia } from '@angular/flex-layout'; import { ObservableMedia } from '@angular/flex-layout';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { FuseMatchMediaService } from '@fuse/services/match-media.service'; import { FuseMatchMediaService } from '@fuse/services/match-media.service';
import { FuseMatSidenavHelperService } from '@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.service'; import { FuseMatSidenavHelperService } from '@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.service';

View File

@@ -1,6 +1,6 @@
import { AfterViewInit, Directive, ElementRef, HostListener, OnDestroy, OnInit } from '@angular/core'; import { AfterViewInit, Directive, ElementRef, HostListener, OnDestroy, OnInit } from '@angular/core';
import { Platform } from '@angular/cdk/platform'; import { Platform } from '@angular/cdk/platform';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import PerfectScrollbar from 'perfect-scrollbar'; import PerfectScrollbar from 'perfect-scrollbar';

View File

@@ -1,3 +1,6 @@
// This file meant to be imported only once! Use fuse.scss to access
// to the core Fuse and Angular Material mixins
// ngx-datatable // ngx-datatable
@import '~@swimlane/ngx-datatable/release/themes/material'; @import '~@swimlane/ngx-datatable/release/themes/material';
@@ -7,10 +10,13 @@
// Fuse // Fuse
@import "fuse"; @import "fuse";
// Theming // Include core Angular Material styles
@include mat-core(); @include mat-core();
// Include theme styles for core and each component used in your app. // Setup the typography
@include angular-material-typography($typography);
// Create an Angular Material theme from the $theme map
@include angular-material-theme($theme); @include angular-material-theme($theme);
// Partials // Partials

View File

@@ -1,4 +1,5 @@
// Variables // Material theming
@import "variables/theme"; @import "theming";
// Mixins
// Breakpoint mixins
@import "mixins/breakpoints"; @import "mixins/breakpoints";

View File

@@ -7,7 +7,7 @@
} }
// Fix: "Inconsistent font sizes across elements" // Fix: "Inconsistent font sizes across elements"
.mat-input-wrapper { .mat-form-field-wrapper {
font-size: 16px; font-size: 16px;
} }
@@ -34,7 +34,7 @@
&.mat-form-field-type-mat-select { &.mat-form-field-type-mat-select {
.mat-input-infix { .mat-form-field-infix {
display: inline-flex; display: inline-flex;
width: auto; width: auto;
@@ -57,7 +57,7 @@
} }
} }
// Fix: "Stepper icons are broken due to Fuse's icon helpers" // Fix: Stepper icons are broken due to Fuse's icon helpers
mat-horizontal-stepper, mat-horizontal-stepper,
mat-vertical-stepper { mat-vertical-stepper {
@@ -68,7 +68,7 @@ mat-vertical-stepper {
width: 16px !important; width: 16px !important;
min-width: 0 !important; min-width: 0 !important;
min-height: 0 !important; min-height: 0 !important;
color: rgba(255, 255, 255, 0.87) !important; color: inherit !important;
} }
} }
} }
@@ -76,3 +76,12 @@ mat-vertical-stepper {
mat-vertical-stepper { mat-vertical-stepper {
padding: 16px 0; padding: 16px 0;
} }
// Fix: Chip remove icon is broken due to Fuse's icon helpers
mat-chip {
mat-icon {
min-width: 0 !important;
min-height: 0 !important;
}
}

View File

@@ -1,6 +1,6 @@
.secondary-text, .secondary-text,
.mat-icon, .icon,
.icon { i {
color: rgba(0, 0, 0, 0.54); color: rgba(0, 0, 0, 0.54);
} }
@@ -51,7 +51,7 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
// If the base text color is black... // If the base text color is black...
@if (rgba(black, 1) == rgba($baseTextColor, 1)) { @if (rgba(black, 1) == rgba($baseTextColor, 1)) {
.mat-icon, i,
.icon { .icon {
color: rgba(0, 0, 0, 0.54); color: rgba(0, 0, 0, 0.54);
} }
@@ -81,7 +81,7 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
// If the base text color is white... // If the base text color is white...
@else { @else {
.mat-icon, i,
.icon { .icon {
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
} }
@@ -135,11 +135,11 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
} }
// Input // Input
.mat-input-placeholder { .mat-form-field-label {
color: map_get($fuseForeground, hint-text); color: map_get($fuseForeground, hint-text);
} }
.mat-input-underline { .mat-form-field-underline {
background-color: map_get($fuseForeground, divider); background-color: map_get($fuseForeground, divider);
} }

View File

@@ -1,6 +1,5 @@
i, i,
mat-icon { mat-icon {
color: rgba(0, 0, 0, 0.54);
font-size: 24px; font-size: 24px;
width: 24px; width: 24px;
height: 24px; height: 24px;

View File

@@ -28,7 +28,7 @@ html, body {
} }
// Reset non angular-material input's default browser/os styles // Reset non angular-material input's default browser/os styles
*:not(mat-input-container) { *:not(mat-form-field) {
> input { > input {
border: none; border: none;
@@ -55,7 +55,7 @@ html, body {
} }
} }
*:not(mat-input-container) { *:not(mat-form-field) {
> input[type="button"], > input[type="button"],
> button, > button,

View File

@@ -1,5 +1,6 @@
@import '~@angular/material/theming'; @import '~@angular/material/theming';
// Custom color maps
$mat-white: ( $mat-white: (
500: white, 500: white,
contrast: ( contrast: (
@@ -47,13 +48,19 @@ $mat-fusedark: (
) )
); );
// Palettes // Define the Material palettes
$primary: mat-palette($mat-fusedark); $primary: mat-palette($mat-fusedark);
$accent: mat-palette($mat-light-blue, 600, 400, 700); $accent: mat-palette($mat-light-blue, 600, 400, 700);
$warn: mat-palette($mat-red); $warn: mat-palette($mat-red);
// Create the theme object (a Sass map containing all of the palettes). // Create the Material theme object
$theme: mat-light-theme($primary, $accent, $warn); $theme: mat-light-theme($primary, $accent, $warn);
// Store the background and foreground colors for easier access
$background: map-get($theme, background); $background: map-get($theme, background);
$foreground: map-get($theme, foreground); $foreground: map-get($theme, foreground);
// Force the input field font sizes to 16px
$typography: mat-typography-config(
$input: mat-typography-level(16px, 1.125, 400)
)

View File

@@ -1,25 +1,9 @@
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { Inject, Injectable, InjectionToken } from '@angular/core';
import { NavigationStart, Router } from '@angular/router'; import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Platform } from '@angular/cdk/platform'; import { Platform } from '@angular/cdk/platform';
import { BehaviorSubject } from 'rxjs';
// Define the default config import * as _ from 'lodash';
const DEFAULT_CONFIG = {
layout : {
navigation : 'left', // 'right', 'left', 'top', 'none'
navigationFolded: false, // true, false
toolbar : 'below', // 'above', 'below', 'none'
footer : 'below', // 'above', 'below', 'none'
mode : 'fullwidth' // 'boxed', 'fullwidth'
},
colorClasses : {
toolbar: 'mat-white-500-bg',
navbar : 'mat-fuse-dark-700-bg',
footer : 'mat-fuse-dark-900-bg'
},
customScrollbars: true,
routerAnimation : 'fadeIn' // fadeIn, slideUp, slideDown, slideRight, slideLeft, none
};
// Create the injection token for the custom config // Create the injection token for the custom config
export const FUSE_CONFIG = new InjectionToken('fuseCustomConfig'); export const FUSE_CONFIG = new InjectionToken('fuseCustomConfig');
@@ -29,6 +13,7 @@ export class FuseConfigService
{ {
config: any; config: any;
defaultConfig: any; defaultConfig: any;
isSetConfigRan = false;
onConfigChanged: BehaviorSubject<any>; onConfigChanged: BehaviorSubject<any>;
@@ -42,18 +27,11 @@ export class FuseConfigService
constructor( constructor(
private router: Router, private router: Router,
public platform: Platform, public platform: Platform,
@Inject(FUSE_CONFIG) @Optional() config @Inject(FUSE_CONFIG) config
) )
{ {
// Set the default settings from the constant // Set the default config from the user provided one (forRoot)
this.defaultConfig = DEFAULT_CONFIG;
// If custom config provided with forRoot,
// use them as default config...
if ( config )
{
this.defaultConfig = config; this.defaultConfig = config;
}
/** /**
* Disable Custom Scrollbars if Browser is Mobile * Disable Custom Scrollbars if Browser is Mobile
@@ -64,14 +42,25 @@ export class FuseConfigService
} }
// Set the config from the default config // Set the config from the default config
this.config = {...this.defaultConfig}; this.config = _.cloneDeep(this.defaultConfig);
// Reload the default settings for the // Reload the default settings for the
// layout on every navigation start // layout on every navigation start
router.events.subscribe( router.events.subscribe(
(event) => { (event) => {
if ( event instanceof NavigationStart ) if ( event instanceof NavigationStart )
{ {
this.isSetConfigRan = false;
}
if ( event instanceof NavigationEnd )
{
if ( this.isSetConfigRan )
{
return;
}
this.setConfig({ this.setConfig({
layout: this.defaultConfig.layout layout: this.defaultConfig.layout
} }
@@ -91,20 +80,11 @@ export class FuseConfigService
*/ */
setConfig(config): void setConfig(config): void
{ {
// Set the config from the given object // Set the SetConfigRan true
// Ugly, but works for now... this.isSetConfigRan = true;
this.config = {
...this.config, // Merge the config
...config, this.config = _.merge({}, this.config, config);
layout : {
...this.config.layout,
...config.layout,
},
colorClasses: {
...this.config.colorClasses,
...config.colorClasses
}
};
// Trigger the event // Trigger the event
this.onConfigChanged.next(this.config); this.onConfigChanged.next(this.config);

View File

@@ -1,6 +1,6 @@
import { MediaChange, ObservableMedia } from '@angular/flex-layout'; import { MediaChange, ObservableMedia } from '@angular/flex-layout';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { BehaviorSubject } from 'rxjs';
@Injectable() @Injectable()
export class FuseMatchMediaService export class FuseMatchMediaService

View File

@@ -442,13 +442,15 @@ export class MailFakeDb
'id' : 0, 'id' : 0,
'handle': 'starred', 'handle': 'starred',
'title' : 'Starred', 'title' : 'Starred',
'icon' : 'star' 'icon' : 'star',
'color' : 'amber-fg'
}, },
{ {
'id' : 1, 'id' : 1,
'handle': 'important', 'handle': 'important',
'title' : 'Important', 'title' : 'Important',
'icon' : 'label' 'icon' : 'label',
'color' : 'red-fg'
} }
]; ];

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class AcademyCourseService implements Resolve<any> export class AcademyCourseService implements Resolve<any>

View File

@@ -3,7 +3,7 @@
<mat-sidenav-container> <mat-sidenav-container>
<!-- SIDENAV --> <!-- SIDENAV -->
<mat-sidenav class="sidenav" align="start" opened="true" mode="side" <mat-sidenav class="sidenav" position="start" opened="true" mode="side"
fuseMatSidenavHelper="academy-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="academy-left-sidenav" mat-is-locked-open="gt-md">
<div class="sidenav-content" fusePerfectScrollbar> <div class="sidenav-content" fusePerfectScrollbar>
@@ -33,12 +33,12 @@
<!-- HEADER --> <!-- HEADER -->
<div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center"> <div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center">
<button mat-button class="mat-icon-button mr-16 sidenav-toggle" <button mat-icon-button class="mr-16 sidenav-toggle"
fuseMatSidenavToggler="academy-left-sidenav" fxHide.gt-md> fuseMatSidenavToggler="academy-left-sidenav" fxHide.gt-md>
<mat-icon>menu</mat-icon> <mat-icon>menu</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button mr-16" [routerLink]="'/apps/academy/courses'"> <button mat-icon-button class="mr-16" [routerLink]="'/apps/academy/courses'">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>

View File

@@ -1,5 +1,5 @@
import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core'; import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class AcademyCoursesService implements Resolve<any> export class AcademyCoursesService implements Resolve<any>

View File

@@ -33,7 +33,7 @@
<mat-form-field class="category-selector"> <mat-form-field class="category-selector">
<mat-select placeholder="Select Category" [(ngModel)]="currentCategory" <mat-select placeholder="Select Category" [(ngModel)]="currentCategory"
(change)="filterCoursesByCategory()"> (selectionChange)="filterCoursesByCategory()">
<mat-option [value]="'all'"> <mat-option [value]="'all'">
All All
</mat-option> </mat-option>
@@ -46,10 +46,11 @@
</div> </div>
<div class="courses" fxLayout="row wrap" fxLayoutAlign="center"> <div class="courses" fxLayout="row wrap" fxLayoutAlign="center" [@animateStagger]="{value:'50'}"
*fuseIfOnDom>
<div class="course" *ngFor="let course of filteredCourses" fxFlex="100" fxFlex.gt-xs="50" <div class="course" *ngFor="let course of filteredCourses" fxFlex="100" fxFlex.gt-xs="50"
fxFlex.gt-sm="33" [ngClass]="course.category"> fxFlex.gt-sm="33" [ngClass]="course.category" [@animate]="{value:'*',params:{y:'100%'}}">
<div class="course-content" fxLayout="column"> <div class="course-content" fxLayout="column">

View File

@@ -1,12 +1,15 @@
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { AcademyCoursesService } from '../courses.service'; import { AcademyCoursesService } from '../courses.service';
@Component({ @Component({
selector : 'fuse-academy-courses', selector : 'fuse-academy-courses',
templateUrl: './courses.component.html', templateUrl: './courses.component.html',
styleUrls : ['./courses.component.scss'] styleUrls : ['./courses.component.scss'],
animations : fuseAnimations
}) })
export class FuseAcademyCoursesComponent implements OnInit, OnDestroy export class FuseAcademyCoursesComponent implements OnInit, OnDestroy
{ {

View File

@@ -15,31 +15,27 @@
<!-- TOOLBAR --> <!-- TOOLBAR -->
<div class="toolbar" fxLayout="row" fxLayoutAlign="start center"> <div class="toolbar" fxLayout="row" fxLayoutAlign="start center">
<button mat-button class="mat-icon-button" aria-label="Search" matTooltip="Search"> <button mat-icon-button aria-label="Search" matTooltip="Search">
<mat-icon>search</mat-icon> <mat-icon>search</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button" <button mat-icon-button
mwlCalendarToday mwlCalendarToday
[(viewDate)]="viewDate" [(viewDate)]="viewDate"
(viewDateChange)="selectedDay = {date:$event}" (viewDateChange)="selectedDay = {date:$event}"
aria-label="Today" matTooltip="Today"> aria-label="Today" matTooltip="Today">
<!--(click)="selectedDay = viewDate"-->
<mat-icon>today</mat-icon> <mat-icon>today</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button" (click)="view='day'" <button mat-icon-button (click)="view='day'" aria-label="Day" matTooltip="Day">
aria-label="Day" matTooltip="Day">
<mat-icon>view_day</mat-icon> <mat-icon>view_day</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button" (click)="view='week'" <button mat-icon-button (click)="view='week'" aria-label="Week" matTooltip="Week">
aria-label="Week" matTooltip="Week">
<mat-icon>view_week</mat-icon> <mat-icon>view_week</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button" (click)="view='month'" <button mat-icon-button (click)="view='month'" aria-label="Month" matTooltip="Month">
aria-label="Month" matTooltip="Month">
<mat-icon>view_module</mat-icon> <mat-icon>view_module</mat-icon>
</button> </button>
</div> </div>
@@ -50,7 +46,7 @@
<div class="header-bottom" fxLayout="row" fxLayoutAlign="center center" <div class="header-bottom" fxLayout="row" fxLayoutAlign="center center"
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'150ms'}}"> *fuseIfOnDom [@animate]="{value:'*',params:{delay:'150ms'}}">
<button mat-button class="mat-icon-button arrow" <button mat-icon-button class="arrow"
mwlCalendarPreviousView mwlCalendarPreviousView
[view]="view" [view]="view"
[(viewDate)]="viewDate" [(viewDate)]="viewDate"
@@ -63,7 +59,7 @@
{{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }} {{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}
</div> </div>
<button mat-button class="mat-icon-button arrow" <button mat-icon-button class="arrow"
mwlCalendarNextView mwlCalendarNextView
[view]="view" [view]="view"
[(viewDate)]="viewDate" [(viewDate)]="viewDate"

View File

@@ -1,9 +1,8 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { Subject } from 'rxjs/Subject';
import { MatDialog, MatDialogRef } from '@angular/material'; import { MatDialog, MatDialogRef } from '@angular/material';
import { Subject } from 'rxjs';
import { startOfDay, isSameDay, isSameMonth } from 'date-fns'; import { startOfDay, isSameDay, isSameMonth } from 'date-fns';
import { CalendarEvent, CalendarEventAction, CalendarEventTimesChangedEvent, CalendarMonthViewDay } from 'angular-calendar'; import { CalendarEvent, CalendarEventAction, CalendarEventTimesChangedEvent, CalendarMonthViewDay } from 'angular-calendar';
import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component';

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable, Subject } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
@Injectable() @Injectable()
export class CalendarService implements Resolve<any> export class CalendarService implements Resolve<any>

View File

@@ -1,13 +1,11 @@
<div class="dialog-content-wrapper"> <div class="dialog-content-wrapper">
<mat-toolbar matDialogTitle class="mat-accent m-0"> <mat-toolbar class="mat-accent m-0">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<span class="title dialog-title">{{dialogTitle}}</span> <span class="title dialog-title">{{dialogTitle}}</span>
<button mat-button class="mat-icon-button" <button mat-icon-button (click)="dialogRef.close()" aria-label="Close dialog">
(click)="dialogRef.close()"
aria-label="Close dialog">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
</div> </mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
<div mat-dialog-content class="p-24 m-0" fusePerfectScrollbar> <div mat-dialog-content class="p-24 m-0" fusePerfectScrollbar>
@@ -136,8 +134,7 @@
</button> </button>
<button *ngIf="action ==='edit'" <button *ngIf="action ==='edit'"
mat-button mat-icon-button
class="mat-icon-button"
(click)="dialogRef.close(['delete',eventForm])" (click)="dialogRef.close(['delete',eventForm])"
aria-label="Delete" aria-label="Delete"
matTooltip="Delete"> matTooltip="Delete">

View File

@@ -9,11 +9,11 @@
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
<!-- RESPONSIVE CHATS BUTTON--> <!-- RESPONSIVE CHATS BUTTON-->
<div mat-button fxHide.gt-md class="responsive-chats-button mat-icon-button mr-16" <button mat-icon-button fxHide.gt-md class="responsive-chats-button mr-16"
fuseMatSidenavToggler="chat-left-sidenav" fuseMatSidenavToggler="chat-left-sidenav"
aria-label="chats button"> aria-label="chats button">
<mat-icon class="s-36">chat</mat-icon> <mat-icon>chat</mat-icon>
</div> </button>
<!-- / RESPONSIVE CHATS BUTTON--> <!-- / RESPONSIVE CHATS BUTTON-->
<!-- CHAT CONTACT--> <!-- CHAT CONTACT-->
@@ -40,8 +40,7 @@
</div> </div>
<div> <div>
<button mat-button class="mat-icon-button" [matMenuTriggerFor]="contactMenu" <button mat-icon-button [matMenuTriggerFor]="contactMenu" aria-label="more">
aria-label="more">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>
@@ -98,7 +97,7 @@
fxLayout="row" fxLayout="row"
fxLayoutAlign="start center"> fxLayoutAlign="start center">
<mat-form-field class="" fxFlex floatPlaceholder="never"> <mat-form-field class="" fxFlex floatLabel="never">
<textarea matInput #replyInput placeholder="Type and hit enter to send message" <textarea matInput #replyInput placeholder="Type and hit enter to send message"
ngModel name="message"></textarea> ngModel name="message"></textarea>
</mat-form-field> </mat-form-field>

View File

@@ -13,7 +13,7 @@
<mat-sidenav-container> <mat-sidenav-container>
<!-- LEFT SIDENAV --> <!-- LEFT SIDENAV -->
<mat-sidenav class="sidenav" align="start" opened="true" mode="side" <mat-sidenav class="sidenav" position="start" opened="true" mode="side"
fuseMatSidenavHelper="chat-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="chat-left-sidenav" mat-is-locked-open="gt-md">
<fuse-chat-left-sidenav></fuse-chat-left-sidenav> <fuse-chat-left-sidenav></fuse-chat-left-sidenav>
</mat-sidenav> </mat-sidenav>
@@ -26,7 +26,7 @@
<!-- / CONTENT --> <!-- / CONTENT -->
<!-- RIGHT SIDENAV --> <!-- RIGHT SIDENAV -->
<mat-sidenav class="sidenav" align="end" opened="false" mode="over" <mat-sidenav class="sidenav" position="end" opened="false" mode="over"
fuseMatSidenavHelper="chat-right-sidenav"> fuseMatSidenavHelper="chat-right-sidenav">
<fuse-chat-right-sidenav></fuse-chat-right-sidenav> <fuse-chat-right-sidenav></fuse-chat-right-sidenav>
</mat-sidenav> </mat-sidenav>

View File

@@ -1,10 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { FuseUtils } from '@fuse/utils'; import { FuseUtils } from '@fuse/utils';

View File

@@ -56,7 +56,7 @@
<!-- / USER AVATAR --> <!-- / USER AVATAR -->
<div> <div>
<button mat-button class="mat-icon-button" <button mat-icon-button
[matMenuTriggerFor]="userMenu" [matMenuTriggerFor]="userMenu"
aria-label="more"> aria-label="more">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>

View File

@@ -7,7 +7,7 @@
<!-- TOOLBAR TOP --> <!-- TOOLBAR TOP -->
<mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center">
<button mat-button class="mat-icon-button" (click)="changeLeftSidenavView('chats')" aria-label="back"> <button mat-icon-button (click)="changeLeftSidenavView('chats')" aria-label="back">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>

View File

@@ -1,7 +1,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core'; import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms'; import { FormControl, FormGroup } from '@angular/forms';
import 'rxjs/add/operator/debounceTime'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import 'rxjs/add/operator/distinctUntilChanged';
import { ChatService } from '../../../chat.service'; import { ChatService } from '../../../chat.service';
@@ -27,10 +26,10 @@ export class FuseChatUserSidenavComponent implements OnInit, OnDestroy
ngOnInit() ngOnInit()
{ {
this.onFormChange = this.userForm.valueChanges this.onFormChange = this.userForm.valueChanges.pipe(
.debounceTime(500) debounceTime(500),
.distinctUntilChanged() distinctUntilChanged()
.subscribe(data => { ).subscribe(data => {
this.user.mood = data.mood; this.user.mood = data.mood;
this.user.status = data.status; this.user.status = data.status;
this.chatService.updateUserData(this.user); this.chatService.updateUserData(this.user);

View File

@@ -9,7 +9,7 @@
<div>Contact Info</div> <div>Contact Info</div>
<button mat-button class="mat-icon-button" fuseMatSidenavToggler="chat-right-sidenav" aria-label="close"> <button mat-icon-button fuseMatSidenavToggler="chat-right-sidenav" aria-label="close">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
@@ -36,7 +36,7 @@
<!-- CONTACT MOOD --> <!-- CONTACT MOOD -->
<mat-card> <mat-card>
<mat-form-field fxFlex> <mat-form-field class="w-100-p">
<textarea matInput placeholder="Mood" name="mood" <textarea matInput placeholder="Mood" name="mood"
[value]="contact.mood" rows="3" disabled> [value]="contact.mood" rows="3" disabled>
</textarea> </textarea>

View File

@@ -2,17 +2,15 @@
<mat-toolbar matDialogTitle class="mat-accent m-0"> <mat-toolbar matDialogTitle class="mat-accent m-0">
<mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center">
<span class="title dialog-title">{{dialogTitle}}</span> <span class="title dialog-title">{{dialogTitle}}</span>
<button mat-button class="mat-icon-button" <button mat-icon-button (click)="dialogRef.close()" aria-label="Close dialog">
(click)="dialogRef.close()"
aria-label="Close dialog">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
</mat-toolbar-row> </mat-toolbar-row>
<mat-toolbar-row class="toolbar-bottom py-8 py-sm-16" fxLayout="column" fxLayoutAlign="center center"> <mat-toolbar-row class="toolbar-bottom py-16" fxLayout="column" fxLayoutAlign="center center">
<img [src]="contact.avatar" class=" avatar contact-avatar huge" <img [src]="contact.avatar" class="avatar contact-avatar huge m-0"
[alt]="contact.name"/> [alt]="contact.name"/>
<div class="contact-name">{{contact.name}}</div> <div class="contact-name mt-8">{{contact.name}} {{contact.lastName}}</div>
</mat-toolbar-row> </mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
@@ -21,56 +19,57 @@
<form [formGroup]="contactForm"> <form [formGroup]="contactForm">
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">account_circle</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">account_circle</mat-icon>
<input name="name" formControlName="name" placeholder="Name" matInput required> <input name="name" formControlName="name" placeholder="Name" matInput required>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12"></mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">account_circle</mat-icon>
<input name="lastName" formControlName="lastName" placeholder="Lastname" matInput> <input name="lastName" formControlName="lastName" placeholder="Lastname" matInput>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">star</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">star</mat-icon>
<input name="nickname" formControlName="nickname" matInput placeholder="Nickname"> <input name="nickname" formControlName="nickname" matInput placeholder="Nickname">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">phone</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">phone</mat-icon>
<input formControlName="phone" matInput placeholder="Phone number"> <input formControlName="phone" matInput placeholder="Phone number">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">email</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">email</mat-icon>
<input name="email" formControlName="email" matInput type="email" placeholder="Email"> <input name="email" formControlName="email" matInput type="email" placeholder="Email">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">domain</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">domain</mat-icon>
<input name="company" formControlName="company" matInput placeholder="Company"> <input name="company" formControlName="company" matInput placeholder="Company">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">work</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">work</mat-icon>
<input name="jobTitle" formControlName="jobTitle" matInput placeholder="Job title"> <input name="jobTitle" formControlName="jobTitle" matInput placeholder="Job title">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-form-field class="mr-24" fxFlex> <mat-form-field class="mr-24" fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">cake</mat-icon>
<input matInput [matDatepicker]="birthdayDatePicker" placeholder="Birthday"> <input matInput [matDatepicker]="birthdayDatePicker" placeholder="Birthday">
<mat-datepicker-toggle matSuffix [for]="birthdayDatePicker"></mat-datepicker-toggle> <mat-datepicker-toggle matSuffix [for]="birthdayDatePicker"></mat-datepicker-toggle>
<mat-datepicker #birthdayDatePicker></mat-datepicker> <mat-datepicker #birthdayDatePicker></mat-datepicker>
@@ -78,16 +77,16 @@
</div> </div>
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start"> <div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">home</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<mat-icon matPrefix class="mr-12 s-20 secondary-text">home</mat-icon>
<input name="address" formControlName="address" matInput placeholder="Address"> <input name="address" formControlName="address" matInput placeholder="Address">
</mat-form-field> </mat-form-field>
</div> </div>
<div fxLayout="row" class="textarea-wrapper" fxLayoutAlign="start start"> <div fxLayout="row" class="textarea-wrapper" fxLayoutAlign="start start">
<mat-icon class="mr-12 mt-12">note</mat-icon>
<mat-form-field fxFlex> <mat-form-field fxFlex>
<textarea name="notes" formControlName="notes" placeholder="Notes" matInput type="text" max-rows="4"></textarea> <textarea name="notes" formControlName="notes" placeholder="Notes" matInput type="text"
max-rows="4"></textarea>
</mat-form-field> </mat-form-field>
</div> </div>
@@ -116,8 +115,7 @@
</button> </button>
<button *ngIf="action ==='edit'" <button *ngIf="action ==='edit'"
mat-button mat-icon-button
class="mat-icon-button"
(click)="dialogRef.close(['delete',contactForm])" (click)="dialogRef.close(['delete',contactForm])"
aria-label="Delete" aria-label="Delete"
matTooltip="Delete"> matTooltip="Delete">

View File

@@ -12,9 +12,9 @@
.mat-dialog-container { .mat-dialog-container {
padding: 0; padding: 0;
overflow: hidden;
.mat-toolbar { .mat-toolbar {
flex: 1 0 auto;
min-height: initial; min-height: initial;
} }

View File

@@ -73,13 +73,13 @@
<mat-cell *cdkCellDef="let contact"> <mat-cell *cdkCellDef="let contact">
<div fxFlex="row" fxLayoutAlign="end center"> <div fxFlex="row" fxLayoutAlign="end center">
<button mat-icon-button (click)="$event.stopPropagation();toggleStar(contact.id)" aria-label="Toggle star"> <button mat-icon-button (click)="$event.stopPropagation();toggleStar(contact.id)" aria-label="Toggle star">
<mat-icon *ngIf="user.starred.includes(contact.id)">star</mat-icon> <mat-icon class="amber-fg" *ngIf="user.starred.includes(contact.id)">star</mat-icon>
<mat-icon *ngIf="!user.starred.includes(contact.id)">star_outline</mat-icon> <mat-icon class="secondary-text" *ngIf="!user.starred.includes(contact.id)">star_outline</mat-icon>
</button> </button>
<button mat-icon-button [matMenuTriggerFor]="moreMenu" aria-label="More" <button mat-icon-button [matMenuTriggerFor]="moreMenu" aria-label="More"
(click)="$event.stopPropagation();"> (click)="$event.stopPropagation();">
<mat-icon>more_vert</mat-icon> <mat-icon class="secondary-text">more_vert</mat-icon>
</button> </button>
<mat-menu #moreMenu="matMenu"> <mat-menu #moreMenu="matMenu">

View File

@@ -1,18 +1,18 @@
@import "src/@fuse/scss/fuse"; @import "src/@fuse/scss/fuse";
fuse-contacts-contact-list { fuse-contacts-contact-list {
flex: 1; display: flex;
flex: 1 1 auto;
width: 100%;
.mat-table { .mat-table {
width: 100%;
background: transparent; background: transparent;
box-shadow: none; box-shadow: none;
.mat-column-checkbox { .mat-column-checkbox {
flex: 0 1 48px; flex: 0 1 64px;
padding-left: 18px;
.mat-checkbox-ripple {
display: none !important; //fix for broken rendering
}
} }
.mat-column-avatar { .mat-column-avatar {
@@ -26,7 +26,7 @@ fuse-contacts-contact-list {
.mat-row { .mat-row {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
padding: 8px 8px 8px 24px; padding: 8px;
.mat-cell { .mat-cell {
min-width: 0; min-width: 0;
@@ -34,6 +34,7 @@ fuse-contacts-contact-list {
&.mat-column-detail-button { &.mat-column-detail-button {
flex: 0 1 auto; flex: 0 1 auto;
padding: 0 24px 0 0; padding: 0 24px 0 0;
@include media-breakpoint('gt-md') { @include media-breakpoint('gt-md') {
display: none; display: none;
} }

View File

@@ -2,8 +2,7 @@ import { Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation
import { FormGroup } from '@angular/forms'; import { FormGroup } from '@angular/forms';
import { MatDialog, MatDialogRef } from '@angular/material'; import { MatDialog, MatDialogRef } from '@angular/material';
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { Subscription } from 'rxjs/Subscription'; import { Observable, Subscription } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component';
@@ -30,6 +29,7 @@ export class FuseContactsContactListComponent implements OnInit, OnDestroy
checkboxes: {}; checkboxes: {};
onContactsChangedSubscription: Subscription; onContactsChangedSubscription: Subscription;
onFilterChangedSubscription: Subscription;
onSelectedContactsChangedSubscription: Subscription; onSelectedContactsChangedSubscription: Subscription;
onUserDataChangedSubscription: Subscription; onUserDataChangedSubscription: Subscription;
@@ -72,6 +72,10 @@ export class FuseContactsContactListComponent implements OnInit, OnDestroy
this.user = user; this.user = user;
}); });
this.onFilterChangedSubscription =
this.contactsService.onFilterChanged.subscribe(() => {
this.contactsService.deselectContacts();
});
} }
ngOnInit() ngOnInit()
@@ -82,6 +86,7 @@ export class FuseContactsContactListComponent implements OnInit, OnDestroy
ngOnDestroy() ngOnDestroy()
{ {
this.onContactsChangedSubscription.unsubscribe(); this.onContactsChangedSubscription.unsubscribe();
this.onFilterChangedSubscription.unsubscribe();
this.onSelectedContactsChangedSubscription.unsubscribe(); this.onSelectedContactsChangedSubscription.unsubscribe();
this.onUserDataChangedSubscription.unsubscribe(); this.onUserDataChangedSubscription.unsubscribe();
} }

View File

@@ -7,7 +7,7 @@
<!-- APP TITLE --> <!-- APP TITLE -->
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
<button mat-button class="mat-icon-button sidenav-toggle mr-12" <button mat-icon-button class="sidenav-toggle mr-12"
fuseMatSidenavToggler="contacts-main-sidenav" fuseMatSidenavToggler="contacts-main-sidenav"
fxHide.gt-md> fxHide.gt-md>
<mat-icon>menu</mat-icon> <mat-icon>menu</mat-icon>
@@ -26,7 +26,7 @@
<label for="search" class="mr-8"> <label for="search" class="mr-8">
<mat-icon>search</mat-icon> <mat-icon>search</mat-icon>
</label> </label>
<mat-form-field mat-no-float class="m-0" floatPlaceholder="never"> <mat-form-field mat-no-float class="m-0" floatLabel="never">
<input matInput [formControl]="searchInput" id="search" placeholder="Search for anything"> <input matInput [formControl]="searchInput" id="search" placeholder="Search for anything">
</mat-form-field> </mat-form-field>
</div> </div>
@@ -42,7 +42,7 @@
<mat-sidenav-container> <mat-sidenav-container>
<!-- SIDENAV --> <!-- SIDENAV -->
<mat-sidenav class="sidenav" align="start" opened="true" mode="side" <mat-sidenav class="sidenav" position="start" opened="true" mode="side"
fuseMatSidenavHelper="contacts-main-sidenav" mat-is-locked-open="gt-sm"> fuseMatSidenavHelper="contacts-main-sidenav" mat-is-locked-open="gt-sm">
<fuse-contacts-main-sidenav *fuseIfOnDom [@animate]="{value:'*'}"></fuse-contacts-main-sidenav> <fuse-contacts-main-sidenav *fuseIfOnDom [@animate]="{value:'*'}"></fuse-contacts-main-sidenav>

View File

@@ -1,10 +1,10 @@
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms'; import { FormControl, FormGroup } from '@angular/forms';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import { Subscription } from 'rxjs/Subscription';
import { MatDialog } from '@angular/material'; import { MatDialog } from '@angular/material';
import { Subscription } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseContactsContactFormDialogComponent } from './contact-form/contact-form.component'; import { FuseContactsContactFormDialogComponent } from './contact-form/contact-form.component';
@@ -63,8 +63,10 @@ export class FuseContactsComponent implements OnInit, OnDestroy
}); });
this.searchInput.valueChanges this.searchInput.valueChanges
.debounceTime(300) .pipe(
.distinctUntilChanged() debounceTime(300),
distinctUntilChanged()
)
.subscribe(searchText => { .subscribe(searchText => {
this.contactsService.onSearchTextChanged.next(searchText); this.contactsService.onSearchTextChanged.next(searchText);
}); });

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs/Observable'; import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Subject } from 'rxjs/Subject';
import { FuseUtils } from '@fuse/utils'; import { FuseUtils } from '@fuse/utils';
@@ -120,7 +118,7 @@ export class ContactsService implements Resolve<any>
*/ */
toggleSelectedContact(id) toggleSelectedContact(id)
{ {
// First, check if we already have that todo as selected... // First, check if we already have that contact as selected...
if ( this.selectedContacts.length > 0 ) if ( this.selectedContacts.length > 0 )
{ {
const index = this.selectedContacts.indexOf(id); const index = this.selectedContacts.indexOf(id);

View File

@@ -11,7 +11,7 @@
<div> <div>
<span class="selected-contacts-count"> <span class="selected-contacts-count">
<span>{{selectedContacts.length}}</span> <span class="mr-4">{{selectedContacts.length}}</span>
<span>selected</span> <span>selected</span>
</span> </span>

View File

@@ -1,5 +1,5 @@
import { Component, OnDestroy } from '@angular/core'; import { Component, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs/Subscription'; import { Subscription } from 'rxjs';
import { ContactsService } from '../../contacts.service'; import { ContactsService } from '../../contacts.service';

View File

@@ -41,7 +41,7 @@
<div class="content"> <div class="content">
<div class="left mr-32"> <div class="left mr-lg-32">
<div class="pb-24 font-size-18 font-weight-300"> <div class="pb-24 font-size-18 font-weight-300">
How are your active users trending over time? How are your active users trending over time?
@@ -265,7 +265,7 @@
<div fxLayout="row wrap" fxLayout.gt-md="column"> <div fxLayout="row wrap" fxLayout.gt-md="column">
<!-- Widget 7 --> <!-- Widget 7 -->
<div class="mb-48" [ngClass.lt-lg]="'mr-32'"> <div class="mb-48" [ngClass.lt-lg]="'mr-32'" [ngClass.xs]="'mr-0'">
<div class="pb-24 font-size-18 font-weight-300"> <div class="pb-24 font-size-18 font-weight-300">
What are your top devices? What are your top devices?
@@ -337,7 +337,7 @@
<!-- / Widget 7 --> <!-- / Widget 7 -->
<!-- Widget 8 --> <!-- Widget 8 -->
<div class="mb-48" [ngClass.lt-lg]="'mr-32'"> <div class="mb-48" [ngClass.lt-lg]="'mr-32'" [ngClass.xs]="'mr-0'">
<div class="pb-24 font-size-18 font-weight-300"> <div class="pb-24 font-size-18 font-weight-300">
How are your sales? How are your sales?
@@ -439,7 +439,7 @@
<!-- / Widget 8 --> <!-- / Widget 8 -->
<!-- Widget 9 --> <!-- Widget 9 -->
<div class="mb-48" [ngClass.lt-lg]="'mr-32'"> <div class="mb-48" [ngClass.lt-lg]="'mr-32'" [ngClass.xs]="'mr-0'">
<div class="pb-24 font-size-18 font-weight-300" [ngClass.lt-lg]="'pt-0'"> <div class="pb-24 font-size-18 font-weight-300" [ngClass.lt-lg]="'pt-0'">
What are your top campaigns? What are your top campaigns?

View File

@@ -43,6 +43,15 @@
min-width: 0; min-width: 0;
max-width: none; max-width: none;
} }
.fuse-card {
@include media-breakpoint-down('md') {
width: 100%;
min-width: 0;
max-width: none;
}
}
} }
} }

View File

@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { MatFormFieldModule, MatIconModule, MatMenuModule, MatSelectModule, MatTabsModule } from '@angular/material'; import { MatButtonModule, MatFormFieldModule, MatIconModule, MatMenuModule, MatSelectModule, MatTabsModule } from '@angular/material';
import { AgmCoreModule } from '@agm/core'; import { AgmCoreModule } from '@agm/core';
import { ChartsModule } from 'ng2-charts'; import { ChartsModule } from 'ng2-charts';
@@ -31,6 +31,7 @@ const routes: Routes = [
imports : [ imports : [
RouterModule.forChild(routes), RouterModule.forChild(routes),
MatButtonModule,
MatFormFieldModule, MatFormFieldModule,
MatIconModule, MatIconModule,
MatMenuModule, MatMenuModule,

View File

@@ -1,8 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
@Injectable() @Injectable()
export class AnalyticsDashboardService implements Resolve<any> export class AnalyticsDashboardService implements Resolve<any>

View File

@@ -666,8 +666,8 @@
<!-- Avatar Column --> <!-- Avatar Column -->
<ng-container cdkColumnDef="avatar"> <ng-container cdkColumnDef="avatar">
<mat-header-cell fxFlex="64px" *cdkHeaderCellDef></mat-header-cell> <mat-header-cell fxFlex="96px" *cdkHeaderCellDef></mat-header-cell>
<mat-cell fxFlex="64px" *cdkCellDef="let contact"> <mat-cell fxFlex="96px" *cdkCellDef="let contact">
<img class="avatar" *ngIf="contact.avatar" [alt]="contact.name" <img class="avatar" *ngIf="contact.avatar" [alt]="contact.name"
[src]="contact.avatar"/> [src]="contact.avatar"/>
</mat-cell> </mat-cell>
@@ -750,7 +750,7 @@
<!-- / CENTER --> <!-- / CENTER -->
<!-- SIDENAV --> <!-- SIDENAV -->
<mat-sidenav class="sidenav" align="end" mode="side" opened="true" <mat-sidenav class="sidenav" position="end" mode="side" opened="true"
fuseMatSidenavHelper="dashboards-right-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="dashboards-right-sidenav" mat-is-locked-open="gt-md">
<div class="sidenav-content" fusePerfectScrollbar> <div class="sidenav-content" fusePerfectScrollbar>

View File

@@ -1,7 +1,7 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import * as shape from 'd3-shape'; import * as shape from 'd3-shape';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';

View File

@@ -1,8 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
@Injectable() @Injectable()
export class ProjectDashboardService implements Resolve<any> export class ProjectDashboardService implements Resolve<any>

View File

@@ -1,8 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
@Injectable() @Injectable()
export class EcommerceDashboardService implements Resolve<any> export class EcommerceDashboardService implements Resolve<any>

View File

@@ -14,7 +14,7 @@
<!-- APP TITLE --> <!-- APP TITLE -->
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
<button class="mr-16" mat-icon-button [routerLink]="'/apps/e-commerce/orders'"> <button mat-icon-button class="mr-16" [routerLink]="'/apps/e-commerce/orders'">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>
@@ -49,7 +49,7 @@
<div class="section pb-48"> <div class="section pb-48">
<div class="pb-16" fxLayout="row" fxLayoutAlign="start center"> <div class="pb-16" fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="m-0 mr-16">account_circle</mat-icon> <mat-icon class="m-0 mr-16 secondary-text">account_circle</mat-icon>
<div class="h2 secondary-text">Customer</div> <div class="h2 secondary-text">Customer</div>
</div> </div>
@@ -88,7 +88,7 @@
<mat-tab-group class="addresses"> <mat-tab-group class="addresses">
<mat-tab label="Shipping Address"> <mat-tab label="Shipping Address">
<div fxFlex fxLayout="column" *fuseIfOnDom> <div fxFlex fxLayout="column">
<div class="address h4 py-24">{{order.customer.shippingAddress.address}}</div> <div class="address h4 py-24">{{order.customer.shippingAddress.address}}</div>
<agm-map class="w-100-p h-400" [zoom]="15" <agm-map class="w-100-p h-400" [zoom]="15"
[latitude]="order.customer.shippingAddress.lat" [latitude]="order.customer.shippingAddress.lat"
@@ -101,7 +101,7 @@
</mat-tab> </mat-tab>
<mat-tab label="Invoice Address" fxLayout="column"> <mat-tab label="Invoice Address" fxLayout="column">
<div fxFlex fxLayout="column" *fuseIfOnDom> <div fxFlex fxLayout="column">
<div class="address h4 py-24">{{order.customer.invoiceAddress.address}}</div> <div class="address h4 py-24">{{order.customer.invoiceAddress.address}}</div>
<agm-map class="w-100-p h-400" [zoom]="15" <agm-map class="w-100-p h-400" [zoom]="15"
[latitude]="order.customer.invoiceAddress.lat" [latitude]="order.customer.invoiceAddress.lat"
@@ -118,7 +118,7 @@
<div class="section pb-48"> <div class="section pb-48">
<div class="pb-16" fxLayout="row" fxLayoutAlign="start center"> <div class="pb-16" fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="m-0 mr-16">access_time</mat-icon> <mat-icon class="m-0 mr-16 secondary-text">access_time</mat-icon>
<div class="h2 secondary-text">Order Status</div> <div class="h2 secondary-text">Order Status</div>
</div> </div>
@@ -172,7 +172,7 @@
<div class="section pb-48"> <div class="section pb-48">
<div class="pb-16" fxLayout="row" fxLayoutAlign="start center"> <div class="pb-16" fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="m-0 mr-16">attach_money</mat-icon> <mat-icon class="m-0 mr-16 secondary-text">attach_money</mat-icon>
<div class="h2 secondary-text">Payment</div> <div class="h2 secondary-text">Payment</div>
</div> </div>
@@ -216,7 +216,7 @@
<div class="section pb-48"> <div class="section pb-48">
<div class="pb-16" fxLayout="row" fxLayoutAlign="start center"> <div class="pb-16" fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="m-0 mr-16">local_shipping</mat-icon> <mat-icon class="m-0 mr-16 secondary-text">local_shipping</mat-icon>
<div class="h2 secondary-text">Shipping</div> <div class="h2 secondary-text">Shipping</div>
</div> </div>

View File

@@ -1,12 +1,6 @@
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
import 'rxjs/add/operator/startWith'; import { Subscription } from 'rxjs';
import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/observable/fromEvent';
import { Subscription } from 'rxjs/Subscription';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class EcommerceOrderService implements Resolve<any> export class EcommerceOrderService implements Resolve<any>

View File

@@ -21,12 +21,12 @@
<!-- / APP TITLE --> <!-- / APP TITLE -->
<!-- SEARCH --> <!-- SEARCH -->
<div class="search-input-wrapper ml-8 m-sm-0" <div class="search-input-wrapper ml-sm-16"
fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center"> fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
<label for="search" class="mr-8"> <label for="search" class="mr-8">
<mat-icon class="secondary-text">search</mat-icon> <mat-icon class="secondary-text">search</mat-icon>
</label> </label>
<mat-form-field floatPlaceholder="never" fxFlex="1 0 auto"> <mat-form-field floatLabel="never" fxFlex="1 0 auto">
<input id="search" matInput #filter placeholder="Search"> <input id="search" matInput #filter placeholder="Search">
</mat-form-field> </mat-form-field>
</div> </div>

View File

@@ -1,3 +1,5 @@
@import "src/@fuse/scss/fuse";
:host { :host {
.header { .header {
@@ -5,6 +7,13 @@
.search-input-wrapper { .search-input-wrapper {
max-width: 480px; max-width: 480px;
} }
@include media-breakpoint-down(xs) {
margin: 24px 0;
height: 128px !important;
min-height: 128px !important;
max-height: 128px !important;
}
} }
.mat-tab-group, .mat-tab-group,

View File

@@ -1,14 +1,9 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { MatPaginator, MatSort } from '@angular/material'; import { MatPaginator, MatSort } from '@angular/material';
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { merge, Observable, BehaviorSubject, fromEvent } from 'rxjs';
import 'rxjs/add/operator/startWith'; import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';
import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/observable/fromEvent';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseUtils } from '@fuse/utils'; import { FuseUtils } from '@fuse/utils';
@@ -40,10 +35,10 @@ export class FuseEcommerceOrdersComponent implements OnInit
{ {
this.dataSource = new FilesDataSource(this.ordersService, this.paginator, this.sort); this.dataSource = new FilesDataSource(this.ordersService, this.paginator, this.sort);
Observable.fromEvent(this.filter.nativeElement, 'keyup') fromEvent(this.filter.nativeElement, 'keyup').pipe(
.debounceTime(150) debounceTime(150),
.distinctUntilChanged() distinctUntilChanged()
.subscribe(() => { ).subscribe(() => {
if ( !this.dataSource ) if ( !this.dataSource )
{ {
return; return;
@@ -97,7 +92,9 @@ export class FilesDataSource extends DataSource<any>
this._filterChange, this._filterChange,
this._sort.sortChange this._sort.sortChange
]; ];
return Observable.merge(...displayDataChanges).map(() => {
return merge(...displayDataChanges).pipe(map(() => {
let data = this.ordersService.orders.slice(); let data = this.ordersService.orders.slice();
data = this.filterData(data); data = this.filterData(data);
@@ -109,7 +106,8 @@ export class FilesDataSource extends DataSource<any>
// Grab the page's slice of data. // Grab the page's slice of data.
const startIndex = this._paginator.pageIndex * this._paginator.pageSize; const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
return data.splice(startIndex, this._paginator.pageSize); return data.splice(startIndex, this._paginator.pageSize);
}); })
);
} }

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class EcommerceOrdersService implements Resolve<any> export class EcommerceOrdersService implements Resolve<any>

View File

@@ -13,11 +13,12 @@
<!-- APP TITLE --> <!-- APP TITLE -->
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
<button class="mr-0 mr-sm-16" mat-icon-button [routerLink]="'/apps/e-commerce/products'"> <button mat-icon-button class="mr-0 mr-sm-16" [routerLink]="'/apps/e-commerce/products'">
<mat-icon>arrow_back</mat-icon> <mat-icon>arrow_back</mat-icon>
</button> </button>
<div class="product-image mr-8 mr-sm-16" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}"> <div class="product-image mr-8 mr-sm-16" *fuseIfOnDom
[@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">
<img *ngIf="product.images[0]" [src]="product.images[0].url"> <img *ngIf="product.images[0]" [src]="product.images[0].url">
<img *ngIf="!product.images[0]" [src]="'assets/images/ecommerce/product-image-placeholder.png'"> <img *ngIf="!product.images[0]" [src]="'assets/images/ecommerce/product-image-placeholder.png'">
</div> </div>
@@ -38,14 +39,14 @@
<!-- / APP TITLE --> <!-- / APP TITLE -->
<button mat-raised-button <button mat-raised-button
class="save-product-button mat-white-bg mt-16 mt-sm-0" class="save-product-button mat-white-bg"
[disabled]="productForm.invalid" [disabled]="productForm.invalid"
*ngIf="pageType ==='new'" (click)="addProduct()"> *ngIf="pageType ==='new'" (click)="addProduct()">
<span>ADD</span> <span>ADD</span>
</button> </button>
<button mat-raised-button <button mat-raised-button
class="save-product-button mat-white-bg mt-16 mt-sm-0" class="save-product-button mat-white-bg"
[disabled]="productForm.invalid || productForm.pristine" [disabled]="productForm.invalid || productForm.pristine"
*ngIf="pageType ==='edit'" (click)="saveProduct()"> *ngIf="pageType ==='edit'" (click)="saveProduct()">
<span>SAVE</span> <span>SAVE</span>
@@ -64,6 +65,7 @@
<mat-tab-group> <mat-tab-group>
<mat-tab label="Basic Info"> <mat-tab label="Basic Info">
<div class="tab-content p-24" fusePerfectScrollbar> <div class="tab-content p-24" fusePerfectScrollbar>
<mat-form-field class="w-100-p"> <mat-form-field class="w-100-p">
@@ -83,44 +85,46 @@
</textarea> </textarea>
</mat-form-field> </mat-form-field>
<h3 class="mb-0">Categories</h3> <mat-form-field class="w-100-p">
<mat-form-field class="w-100-p" floatPlaceholder="never">
<mat-chip-list matPrefix #categoryList <mat-chip-list #categoryList name="categories" formControlName="categories">
name="categories"
formControlName="categories">
<mat-chip *ngFor="let category of product.categories" <mat-chip *ngFor="let category of product.categories"
removable="true" (removed)="product.removeCategory(category)"> [removable]="true" (removed)="product.removeCategory(category)">
{{category}} {{category}}
<mat-icon matChipRemove>cancel</mat-icon> <mat-icon matChipRemove>cancel</mat-icon>
</mat-chip> </mat-chip>
<input placeholder="Categories"
[matChipInputFor]="categoryList"
[matChipInputAddOnBlur]="true"
(matChipInputTokenEnd)="product.addCategory($event)"/>
</mat-chip-list> </mat-chip-list>
<input matInput
matChipInputAddOnBlur="true"
(matChipInputTokenEnd)="product.addCategory($event)"
placeholder="Add category..."
[matChipInputFor]="categoryList"/>
</mat-form-field> </mat-form-field>
<h3 class="mb-0">Tags</h3> <mat-form-field class="w-100-p">
<mat-form-field class="w-100-p" floatPlaceholder="never">
<mat-chip-list matPrefix #tagList <mat-chip-list #tagList name="tags" formControlName="tags">
name="tags"
formControlName="tags">
<mat-chip *ngFor="let tag of product.tags" <mat-chip *ngFor="let tag of product.tags"
removable="true" (removed)="product.removeTag(tag)"> [removable]="true" (removed)="product.removeTag(tag)">
{{tag}} {{tag}}
<mat-icon matChipRemove>cancel</mat-icon> <mat-icon matChipRemove>cancel</mat-icon>
</mat-chip> </mat-chip>
<input placeholder="Tags"
[matChipInputFor]="tagList"
[matChipInputAddOnBlur]="true"
(matChipInputTokenEnd)="product.addTag($event)"/>
</mat-chip-list> </mat-chip-list>
<input matInput
matChipInputAddOnBlur="true"
(matChipInputTokenEnd)="product.addTag($event)"
placeholder="Add tag..."
[matChipInputFor]="tagList"/>
</mat-form-field> </mat-form-field>
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="Product Images"> <mat-tab label="Product Images">
@@ -129,7 +133,8 @@
<div *ngIf="product.images.length === 0" <div *ngIf="product.images.length === 0"
class="product-image" fxlayout="row" fxLayoutAlign="center center"> class="product-image" fxlayout="row" fxLayoutAlign="center center">
<img class="media" [src]="'assets/images/ecommerce/product-image-placeholder.png'"> <img class="media"
[src]="'assets/images/ecommerce/product-image-placeholder.png'">
</div> </div>
<div *ngFor="let image of product.images"> <div *ngFor="let image of product.images">
@@ -175,7 +180,8 @@
formControlName="comparedPrice" formControlName="comparedPrice"
placeholder="Compared Price" type="number"> placeholder="Compared Price" type="number">
<span matPrefix>$&nbsp;</span> <span matPrefix>$&nbsp;</span>
<mat-hint align="start">Add a compare price to show next to the real price</mat-hint> <mat-hint align="start">Add a compare price to show next to the real price
</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>

View File

@@ -1,14 +1,7 @@
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { FormBuilder, FormGroup } from '@angular/forms';
import { MatSnackBar } from '@angular/material'; import { MatSnackBar } from '@angular/material';
import { Subscription } from 'rxjs';
import 'rxjs/add/operator/startWith';
import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/observable/fromEvent';
import { Subscription } from 'rxjs/Subscription';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseUtils } from '@fuse/utils'; import { FuseUtils } from '@fuse/utils';

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class EcommerceProductService implements Resolve<any> export class EcommerceProductService implements Resolve<any>

View File

@@ -15,18 +15,23 @@
<!-- APP TITLE --> <!-- APP TITLE -->
<div class="logo my-12 m-sm-0" <div class="logo my-12 m-sm-0"
fxLayout="row" fxLayoutAlign="start center"> fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="logo-icon mr-16" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">shopping_basket</mat-icon> <mat-icon class="logo-icon mr-16" *fuseIfOnDom
<span class="logo-text h1" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Products</span> [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">
shopping_basket
</mat-icon>
<span class="logo-text h1" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">
Products
</span>
</div> </div>
<!-- / APP TITLE --> <!-- / APP TITLE -->
<!-- SEARCH --> <!-- SEARCH -->
<div class="search-input-wrapper mx-12 m-md-0" <div class="search-input-wrapper mx-24 m-md-0"
fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center"> fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
<label for="search" class="mr-8"> <label for="search" class="mr-8">
<mat-icon class="secondary-text">search</mat-icon> <mat-icon class="secondary-text">search</mat-icon>
</label> </label>
<mat-form-field floatPlaceholder="never" fxFlex="1 0 auto"> <mat-form-field floatLabel="never" fxFlex="1 0 auto">
<input id="search" matInput #filter placeholder="Search"> <input id="search" matInput #filter placeholder="Search">
</mat-form-field> </mat-form-field>
</div> </div>

View File

@@ -9,9 +9,10 @@
} }
@include media-breakpoint-down(xs) { @include media-breakpoint-down(xs) {
height: 176px !important; margin: 8px 0;
min-height: 176px !important; height: 192px !important;
max-height: 176px !important; min-height: 192px !important;
max-height: 192px !important;
} }
} }

View File

@@ -2,14 +2,8 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { MatPaginator, MatSort } from '@angular/material'; import { MatPaginator, MatSort } from '@angular/material';
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import 'rxjs/add/operator/startWith'; import { merge, Observable, BehaviorSubject, fromEvent } from 'rxjs';
import 'rxjs/add/observable/merge'; import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/observable/fromEvent';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseUtils } from '@fuse/utils'; import { FuseUtils } from '@fuse/utils';
@@ -40,14 +34,16 @@ export class FuseEcommerceProductsComponent implements OnInit
ngOnInit() ngOnInit()
{ {
this.dataSource = new FilesDataSource(this.productsService, this.paginator, this.sort); this.dataSource = new FilesDataSource(this.productsService, this.paginator, this.sort);
Observable.fromEvent(this.filter.nativeElement, 'keyup')
.debounceTime(150) fromEvent(this.filter.nativeElement, 'keyup').pipe(
.distinctUntilChanged() debounceTime(150),
.subscribe(() => { distinctUntilChanged()
).subscribe(() => {
if ( !this.dataSource ) if ( !this.dataSource )
{ {
return; return;
} }
this.dataSource.filter = this.filter.nativeElement.value; this.dataSource.filter = this.filter.nativeElement.value;
}); });
} }
@@ -98,7 +94,8 @@ export class FilesDataSource extends DataSource<any>
this._sort.sortChange this._sort.sortChange
]; ];
return Observable.merge(...displayDataChanges).map(() => { return merge(...displayDataChanges).pipe(map(() => {
let data = this.productsService.products.slice(); let data = this.productsService.products.slice();
data = this.filterData(data); data = this.filterData(data);
@@ -110,7 +107,8 @@ export class FilesDataSource extends DataSource<any>
// Grab the page's slice of data. // Grab the page's slice of data.
const startIndex = this._paginator.pageIndex * this._paginator.pageSize; const startIndex = this._paginator.pageIndex * this._paginator.pageSize;
return data.splice(startIndex, this._paginator.pageSize); return data.splice(startIndex, this._paginator.pageSize);
}); }
));
} }
filterData(data) filterData(data)
@@ -122,7 +120,9 @@ export class FilesDataSource extends DataSource<any>
return FuseUtils.filterArrayByString(data, this.filter); return FuseUtils.filterArrayByString(data, this.filter);
} }
sortData(data): any[] sortData(data)
:
any[]
{ {
if ( !this._sort.active || this._sort.direction === '' ) if ( !this._sort.active || this._sort.direction === '' )
{ {

View File

@@ -1,8 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { BehaviorSubject, Observable } from 'rxjs';
@Injectable() @Injectable()
export class EcommerceProductsService implements Resolve<any> export class EcommerceProductsService implements Resolve<any>

View File

@@ -44,7 +44,7 @@
<mat-cell *cdkCellDef="let row" fxFlex="48px" fxHide.gt-md> <mat-cell *cdkCellDef="let row" fxFlex="48px" fxHide.gt-md>
<button mat-icon-button class="sidenav-toggle" <button mat-icon-button class="sidenav-toggle"
fuseMatSidenavToggler="file-manager-right-sidenav"> fuseMatSidenavToggler="file-manager-right-sidenav">
<mat-icon>info</mat-icon> <mat-icon class="secondary-text">info</mat-icon>
</button> </button>
</mat-cell> </mat-cell>
</ng-container> </ng-container>

View File

@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs';
import { FileManagerService } from '../file-manager.service'; import { FileManagerService } from '../file-manager.service';
import { fuseAnimations } from '@fuse/animations/index'; import { fuseAnimations } from '@fuse/animations/index';

View File

@@ -3,7 +3,7 @@
<mat-sidenav-container> <mat-sidenav-container>
<!-- SIDENAV --> <!-- SIDENAV -->
<mat-sidenav class="sidenav left-sidenav" align="start" opened="false" mode="over" <mat-sidenav class="sidenav left-sidenav" position="start" opened="false" mode="over"
fuseMatSidenavHelper="file-manager-left-sidenav"> fuseMatSidenavHelper="file-manager-left-sidenav">
<fuse-file-manager-main-sidenav></fuse-file-manager-main-sidenav> <fuse-file-manager-main-sidenav></fuse-file-manager-main-sidenav>
</mat-sidenav> </mat-sidenav>
@@ -26,7 +26,7 @@
</div> </div>
<div class="right-side" fxLayout="row"> <div class="right-side" fxLayout="row">
<button mat-button class="mat-icon-button" aria-label="Search" matTooltip="Search"> <button mat-icon-button aria-label="Search" matTooltip="Search">
<mat-icon>search</mat-icon> <mat-icon>search</mat-icon>
</button> </button>
</div> </div>
@@ -69,7 +69,7 @@
<!-- / CENTER --> <!-- / CENTER -->
<!-- SIDENAV --> <!-- SIDENAV -->
<mat-sidenav class="sidenav right-sidenav " align="end" opened="true" mode="side" <mat-sidenav class="sidenav right-sidenav " position="end" opened="true" mode="side"
fuseMatSidenavHelper="file-manager-right-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="file-manager-right-sidenav" mat-is-locked-open="gt-md">
<fuse-file-manager-details-sidenav></fuse-file-manager-details-sidenav> <fuse-file-manager-details-sidenav></fuse-file-manager-details-sidenav>
</mat-sidenav> </mat-sidenav>

View File

@@ -1,9 +1,7 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
import { Observable, BehaviorSubject } from 'rxjs';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable() @Injectable()
export class FileManagerService implements Resolve<any> export class FileManagerService implements Resolve<any>

View File

@@ -3,7 +3,7 @@
<div class="toolbar" fxLayout="row" fxLayoutAlign="end center"> <div class="toolbar" fxLayout="row" fxLayoutAlign="end center">
<button mat-icon-button class="mat-icon-button" matTooltip="Delete"> <button mat-icon-button matTooltip="Delete">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
@@ -11,7 +11,7 @@
<mat-icon>file_download</mat-icon> <mat-icon>file_download</mat-icon>
</button> </button>
<button mat-icon-button class="mat-icon-button" aria-label="More" matTooltip="More"> <button mat-icon-button aria-label="More" matTooltip="More">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>
</div> </div>

View File

@@ -1,13 +1,11 @@
<div class="dialog-content-wrapper"> <div class="dialog-content-wrapper">
<mat-toolbar matDialogTitle class="mat-accent m-0"> <mat-toolbar class="mat-accent m-0">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<span class="title dialog-title">New Message</span> <span class="title dialog-title">New Message</span>
<button mat-button class="mat-icon-button" <button mat-icon-button (click)="dialogRef.close()" aria-label="Close dialog">
(click)="dialogRef.close()"
aria-label="Close dialog">
<mat-icon>close</mat-icon> <mat-icon>close</mat-icon>
</button> </button>
</div> </mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
<div mat-dialog-content class="p-24 m-0" fusePerfectScrollbar> <div mat-dialog-content class="p-24 m-0" fusePerfectScrollbar>
@@ -100,10 +98,7 @@
</button> </button>
</div> </div>
<button mat-button <button mat-icon-button (click)="dialogRef.close(['delete',composeForm])" aria-label="Delete"
class="mat-icon-button"
(click)="dialogRef.close(['delete',composeForm])"
aria-label="Delete"
matTooltip="Delete"> matTooltip="Delete">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>

View File

@@ -1,5 +1,5 @@
<div *ngIf="!mail" fxLayout="column" fxLayoutAlign="center center" fxFlex> <div *ngIf="!mail" fxLayout="column" fxLayoutAlign="center center" fxFlex>
<mat-icon class="s-128 mb-16 select-message-icon"> <mat-icon class="s-128 mb-16 select-message-icon hint-text">
email email
</mat-icon> </mat-icon>
<span class="select-message-text hint-text"> <span class="select-message-text hint-text">
@@ -24,14 +24,14 @@
</div> </div>
<div class="actions" fxLayout="row" fxLayoutAlign="start center"> <div class="actions" fxLayout="row" fxLayoutAlign="start center">
<button mat-button class="mat-icon-button" (click)="toggleStar($event)" aria-label="Toggle star"> <button mat-icon-button (click)="toggleStar($event)" aria-label="Toggle star">
<mat-icon *ngIf="mail.starred">star</mat-icon> <mat-icon class="amber-fg" *ngIf="mail.starred">star</mat-icon>
<mat-icon *ngIf="!mail.starred">star_outline</mat-icon> <mat-icon class="secondary-text" *ngIf="!mail.starred">star_outline</mat-icon>
</button> </button>
<button mat-button class="mat-icon-button" (click)="toggleImportant($event)" aria-label="Toggle important"> <button mat-icon-button (click)="toggleImportant($event)" aria-label="Toggle important">
<mat-icon *ngIf="mail.important">label</mat-icon> <mat-icon class="red-fg" *ngIf="mail.important">label</mat-icon>
<mat-icon *ngIf="!mail.important">label_outline</mat-icon> <mat-icon class="secondary-text" *ngIf="!mail.important">label_outline</mat-icon>
</button> </button>
</div> </div>
</div> </div>
@@ -87,8 +87,7 @@
</div> </div>
</div> </div>
<button mat-button [matMenuTriggerFor]="moreMenu" aria-label="More" class="mat-icon-button" <button mat-icon-button [matMenuTriggerFor]="moreMenu" aria-label="More" (click)="$event.stopPropagation()">
(click)="$event.stopPropagation()">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>
</button> </button>

View File

@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs';
import { Mail } from '../mail.model'; import { Mail } from '../mail.model';
import * as fromStore from '../store'; import * as fromStore from '../store';

Some files were not shown because too many files have changed in this diff Show More