mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-09 20:15:07 +00:00
Merge changes from 'master' into 'skeleton'
This commit is contained in:
commit
455e7f6f47
|
@ -1,6 +1,6 @@
|
|||
# Fuse - Angular
|
||||
|
||||
Material Design Admin Template with Angular 7+ and Angular Material
|
||||
Material Design Admin Template with Angular 8 and Angular Material
|
||||
|
||||
## The Community
|
||||
|
||||
|
|
53
angular.json
53
angular.json
|
@ -4,24 +4,24 @@
|
|||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"fuse": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"prefix": "app",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"styleext": "scss"
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist",
|
||||
"outputPath": "dist/fuse",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
|
@ -52,8 +52,8 @@
|
|||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
"maximumWarning": "4mb",
|
||||
"maximumError": "6mb"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -100,37 +100,31 @@
|
|||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
]
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fuse-e2e": {
|
||||
"root": "e2e/",
|
||||
"projectType": "application",
|
||||
"prefix": "",
|
||||
"architect": {
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
|
@ -142,15 +136,6 @@
|
|||
"devServerTarget": "fuse:serve:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": "e2e/tsconfig.e2e.json",
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
16
browserslist
Normal file
16
browserslist
Normal file
|
@ -0,0 +1,16 @@
|
|||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
# Googlebot uses an older version of Chrome
|
||||
# For additional information see: https://developers.google.com/search/docs/guides/rendering
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
Chrome 41 # Support for Googlebot
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
|
@ -17,7 +17,7 @@ module.exports = function (config)
|
|||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir : require('path').join(__dirname, '../coverage'),
|
||||
dir : require('path').join(__dirname, './coverage/fuse'),
|
||||
reports : ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
|
@ -27,6 +27,7 @@ module.exports = function (config)
|
|||
logLevel : config.LOG_INFO,
|
||||
autoWatch : true,
|
||||
browsers : ['Chrome'],
|
||||
singleRun : false
|
||||
singleRun : false,
|
||||
restartOnFileChange : true
|
||||
});
|
||||
};
|
22315
package-lock.json
generated
22315
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
175
package.json
175
package.json
|
@ -1,91 +1,88 @@
|
|||
{
|
||||
"name": "fuse",
|
||||
"version": "7.1.0",
|
||||
"license": "https://themeforest.net/licenses/terms/regular",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --open",
|
||||
"start-hmr": "ng serve --configuration hmr --source-map=false --hmr-warning=false",
|
||||
"start-hmr-sourcemaps": "ng serve --configuration hmr --source-map=true --hmr-warning=false",
|
||||
"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-prod": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod",
|
||||
"build-prod-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod --stats-json",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@agm/core": "1.0.0-beta.5",
|
||||
"@angular/animations": "7.2.1",
|
||||
"@angular/cdk": "7.2.1",
|
||||
"@angular/common": "7.2.1",
|
||||
"@angular/compiler": "7.2.1",
|
||||
"@angular/core": "7.2.1",
|
||||
"@angular/flex-layout": "7.0.0-beta.23",
|
||||
"@angular/forms": "7.2.1",
|
||||
"@angular/http": "7.2.1",
|
||||
"@angular/material": "7.2.1",
|
||||
"@angular/material-moment-adapter": "7.2.1",
|
||||
"@angular/platform-browser": "7.2.1",
|
||||
"@angular/platform-browser-dynamic": "7.2.1",
|
||||
"@angular/router": "7.2.1",
|
||||
"@ngrx/effects": "7.0.0",
|
||||
"@ngrx/router-store": "7.0.0",
|
||||
"@ngrx/store": "7.0.0",
|
||||
"@ngrx/store-devtools": "7.0.0",
|
||||
"@ngx-translate/core": "11.0.1",
|
||||
"@swimlane/dragula": "3.7.3",
|
||||
"@swimlane/ngx-charts": "10.0.0",
|
||||
"@swimlane/ngx-datatable": "14.0.0",
|
||||
"@swimlane/ngx-dnd": "6.0.0",
|
||||
"@types/prismjs": "1.9.0",
|
||||
"angular-calendar": "0.26.4",
|
||||
"angular-in-memory-web-api": "0.8.0",
|
||||
"chart.js": "2.7.3",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"core-js": "2.6.2",
|
||||
"d3": "5.7.0",
|
||||
"date-fns": "1.30.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"lodash": "4.17.11",
|
||||
"moment": "2.23.0",
|
||||
"ng2-charts": "1.6.0",
|
||||
"ngrx-store-freeze": "0.2.4",
|
||||
"ngx-color-picker": "7.3.0",
|
||||
"ngx-cookie-service": "2.1.0",
|
||||
"perfect-scrollbar": "1.4.0",
|
||||
"prismjs": "1.15.0",
|
||||
"rxjs": "6.3.3",
|
||||
"rxjs-compat": "6.3.3",
|
||||
"web-animations-js": "2.3.1",
|
||||
"zone.js": "0.8.28"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "7.2.2",
|
||||
"@angular/compiler-cli": "7.2.1",
|
||||
"@angular/language-service": "7.2.1",
|
||||
"@angular-devkit/build-angular": "0.12.2",
|
||||
"@angularclass/hmr": "2.1.3",
|
||||
"@types/jasmine": "2.8.14",
|
||||
"@types/jasminewd2": "2.0.6",
|
||||
"@types/lodash": "4.14.119",
|
||||
"@types/node": "8.9.5",
|
||||
"codelyzer": "4.5.0",
|
||||
"jasmine-core": "2.99.1",
|
||||
"jasmine-spec-reporter": "4.2.1",
|
||||
"karma": "3.1.4",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "2.0.4",
|
||||
"karma-jasmine": "1.1.2",
|
||||
"karma-jasmine-html-reporter": "0.2.2",
|
||||
"protractor": "5.4.2",
|
||||
"ts-node": "7.0.1",
|
||||
"tslib": "1.9.3",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.2.2",
|
||||
"webpack-bundle-analyzer": "3.0.3"
|
||||
}
|
||||
"name": "fuse",
|
||||
"version": "8.0.0",
|
||||
"license": "https://themeforest.net/licenses/terms/regular",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --open",
|
||||
"start-hmr": "ng serve --configuration hmr --source-map=false --hmr-warning=false",
|
||||
"start-hmr-sourcemaps": "ng serve --configuration hmr --source-map=true --hmr-warning=false",
|
||||
"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-prod": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod",
|
||||
"build-prod-stats": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod --stats-json",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@agm/core": "1.0.0-beta.5",
|
||||
"@angular/animations": "8.0.0",
|
||||
"@angular/cdk": "8.0.0",
|
||||
"@angular/common": "8.0.0",
|
||||
"@angular/compiler": "8.0.0",
|
||||
"@angular/core": "8.0.0",
|
||||
"@angular/flex-layout": "8.0.0-beta.26",
|
||||
"@angular/forms": "8.0.0",
|
||||
"@angular/material": "8.0.0",
|
||||
"@angular/material-moment-adapter": "8.0.0",
|
||||
"@angular/platform-browser": "8.0.0",
|
||||
"@angular/platform-browser-dynamic": "8.0.0",
|
||||
"@angular/router": "8.0.0",
|
||||
"@ngrx/effects": "8.0.0-beta.2",
|
||||
"@ngrx/router-store": "8.0.0-beta.2",
|
||||
"@ngrx/store": "8.0.0-beta.2",
|
||||
"@ngrx/store-devtools": "8.0.0-beta.2",
|
||||
"@ngx-translate/core": "11.0.1",
|
||||
"@swimlane/dragula": "3.8.0",
|
||||
"@swimlane/ngx-charts": "11.1.0",
|
||||
"@swimlane/ngx-datatable": "15.0.0",
|
||||
"@swimlane/ngx-dnd": "7.0.0",
|
||||
"@types/prismjs": "1.16.0",
|
||||
"angular-calendar": "0.27.8",
|
||||
"angular-in-memory-web-api": "0.8.0",
|
||||
"chart.js": "2.8.0",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"d3": "5.9.2",
|
||||
"date-fns": "1.30.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"lodash": "4.17.11",
|
||||
"moment": "2.24.0",
|
||||
"ng2-charts": "2.2.4",
|
||||
"ngrx-store-freeze": "0.2.4",
|
||||
"ngx-color-picker": "7.5.0",
|
||||
"ngx-cookie-service": "2.2.0",
|
||||
"perfect-scrollbar": "1.4.0",
|
||||
"prismjs": "1.16.0",
|
||||
"rxjs": "6.5.2",
|
||||
"web-animations-js": "github:angular/web-animations-js#release_pr208",
|
||||
"zone.js": "0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "8.0.0",
|
||||
"@angular/compiler-cli": "8.0.0",
|
||||
"@angular/language-service": "8.0.0",
|
||||
"@angular-devkit/build-angular": "0.800.0",
|
||||
"@angularclass/hmr": "2.1.3",
|
||||
"@types/jasmine": "3.3.13",
|
||||
"@types/jasminewd2": "2.0.6",
|
||||
"@types/lodash": "4.14.132",
|
||||
"@types/node": "8.9.5",
|
||||
"codelyzer": "5.0.1",
|
||||
"jasmine-core": "3.4.0",
|
||||
"jasmine-spec-reporter": "4.2.1",
|
||||
"karma": "4.1.0",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "2.0.5",
|
||||
"karma-jasmine": "2.0.1",
|
||||
"karma-jasmine-html-reporter": "1.4.2",
|
||||
"protractor": "5.4.2",
|
||||
"ts-node": "7.0.1",
|
||||
"tslib": "1.9.3",
|
||||
"tslint": "5.15.0",
|
||||
"typescript": "3.4.5",
|
||||
"webpack-bundle-analyzer": "3.3.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,26 +51,23 @@ export const fuseAnimations = [
|
|||
]),
|
||||
|
||||
trigger('fadeInOut', [
|
||||
state('0', style({
|
||||
display: 'none',
|
||||
state('0, void', style({
|
||||
opacity: 0
|
||||
})),
|
||||
state('1', style({
|
||||
display: 'block',
|
||||
state('1, *', style({
|
||||
opacity: 1
|
||||
})),
|
||||
transition('1 => 0', animate('300ms ease-out')),
|
||||
transition('0 => 1', animate('300ms ease-in'))
|
||||
transition('0 => 1', animate('300ms ease-in')),
|
||||
transition('void <=> *', animate('300ms ease-in'))
|
||||
]),
|
||||
|
||||
trigger('slideInOut', [
|
||||
state('0', style({
|
||||
height : '0px',
|
||||
display: 'none'
|
||||
height: '0px'
|
||||
})),
|
||||
state('1', style({
|
||||
height : '*',
|
||||
display: 'block'
|
||||
height: '*'
|
||||
})),
|
||||
transition('1 => 0', animate('300ms ease-out')),
|
||||
transition('0 => 1', animate('300ms ease-in'))
|
||||
|
@ -120,17 +117,15 @@ export const fuseAnimations = [
|
|||
})
|
||||
)
|
||||
]
|
||||
),
|
||||
)
|
||||
]),
|
||||
|
||||
trigger('slideInLeft', [
|
||||
state('void', style({
|
||||
transform: 'translateX(-100%)',
|
||||
display : 'none'
|
||||
})),
|
||||
state('*', style({
|
||||
transform: 'translateX(0)',
|
||||
display : 'flex'
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
|
@ -139,11 +134,9 @@ export const fuseAnimations = [
|
|||
trigger('slideInRight', [
|
||||
state('void', style({
|
||||
transform: 'translateX(100%)',
|
||||
display : 'none'
|
||||
})),
|
||||
state('*', style({
|
||||
transform: 'translateX(0)',
|
||||
display : 'flex'
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
|
@ -152,11 +145,9 @@ export const fuseAnimations = [
|
|||
trigger('slideInTop', [
|
||||
state('void', style({
|
||||
transform: 'translateY(-100%)',
|
||||
display : 'none'
|
||||
})),
|
||||
state('*', style({
|
||||
transform: 'translateY(0)',
|
||||
display : 'flex'
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
|
@ -166,11 +157,9 @@ export const fuseAnimations = [
|
|||
state('void',
|
||||
style({
|
||||
transform: 'translateY(100%)',
|
||||
display : 'none'
|
||||
})),
|
||||
state('*', style({
|
||||
transform: 'translateY(0)',
|
||||
display : 'flex'
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-confirm-dialog',
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule, MatDialogModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
|
||||
import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component';
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { MatDividerModule, MatListModule } from '@angular/material';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
|
||||
import { FuseDemoContentComponent } from './demo-content/demo-content.component';
|
||||
import { FuseDemoSidebarComponent } from './demo-sidebar/demo-sidebar.component';
|
||||
|
|
|
@ -13,7 +13,7 @@ import '@fuse/components/highlight/prism-languages';
|
|||
export class FuseHighlightComponent implements OnInit, OnDestroy
|
||||
{
|
||||
// Source
|
||||
@ContentChild('source')
|
||||
@ContentChild('source', {static: true})
|
||||
source: ElementRef;
|
||||
|
||||
// Lang
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MatButtonModule, MatIconModule, MatMenuModule, MatTooltipModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
|
||||
import { FusePipesModule } from '@fuse/pipes/pipes.module';
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MatIconModule, MatRippleModule } from '@angular/material';
|
||||
import { MatRippleModule } from '@angular/material/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ import { NgModule } from '@angular/core';
|
|||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { MatButtonModule, MatIconModule, MatProgressBarModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
|
||||
import { FuseProgressBarComponent } from './progress-bar.component';
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ import { NgModule } from '@angular/core';
|
|||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import { MatButtonModule, MatIconModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
import { FuseSearchBarComponent } from './search-bar.component';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { MediaObserver } from '@angular/flex-layout';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
import { Subject } from 'rxjs';
|
||||
|
@ -12,7 +12,7 @@ import { FuseNavigationService } from '@fuse/components/navigation/navigation.se
|
|||
templateUrl: './shortcuts.component.html',
|
||||
styleUrls : ['./shortcuts.component.scss']
|
||||
})
|
||||
export class FuseShortcutsComponent implements OnInit, OnDestroy
|
||||
export class FuseShortcutsComponent implements OnInit, AfterViewInit, OnDestroy
|
||||
{
|
||||
shortcutItems: any[];
|
||||
navigationItems: any[];
|
||||
|
@ -23,10 +23,10 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
|
|||
@Input()
|
||||
navigation: any;
|
||||
|
||||
@ViewChild('searchInput')
|
||||
@ViewChild('searchInput', {static: false})
|
||||
searchInputField;
|
||||
|
||||
@ViewChild('shortcuts')
|
||||
@ViewChild('shortcuts', {static: false})
|
||||
shortcutsEl: ElementRef;
|
||||
|
||||
// Private
|
||||
|
@ -79,32 +79,36 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
|
|||
// User's shortcut items
|
||||
this.shortcutItems = [
|
||||
{
|
||||
'title': 'Calendar',
|
||||
'type' : 'item',
|
||||
'icon' : 'today',
|
||||
'url' : '/apps/calendar'
|
||||
title: 'Calendar',
|
||||
type : 'item',
|
||||
icon : 'today',
|
||||
url : '/apps/calendar'
|
||||
},
|
||||
{
|
||||
'title': 'Mail',
|
||||
'type' : 'item',
|
||||
'icon' : 'email',
|
||||
'url' : '/apps/mail'
|
||||
title: 'Mail',
|
||||
type : 'item',
|
||||
icon : 'email',
|
||||
url : '/apps/mail'
|
||||
},
|
||||
{
|
||||
'title': 'Contacts',
|
||||
'type' : 'item',
|
||||
'icon' : 'account_box',
|
||||
'url' : '/apps/contacts'
|
||||
title: 'Contacts',
|
||||
type : 'item',
|
||||
icon : 'account_box',
|
||||
url : '/apps/contacts'
|
||||
},
|
||||
{
|
||||
'title': 'To-Do',
|
||||
'type' : 'item',
|
||||
'icon' : 'check_box',
|
||||
'url' : '/apps/todo'
|
||||
title: 'To-Do',
|
||||
type : 'item',
|
||||
icon : 'check_box',
|
||||
url : '/apps/todo'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void
|
||||
{
|
||||
// Subscribe to media changes
|
||||
this._fuseMatchMediaService.onMediaChange
|
||||
.pipe(takeUntil(this._unsubscribeAll))
|
||||
|
|
|
@ -2,7 +2,14 @@ import { NgModule } from '@angular/core';
|
|||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { MatButtonModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatTooltipModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
|
||||
import { FuseShortcutsComponent } from './shortcuts.component';
|
||||
|
|
|
@ -131,17 +131,17 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
|||
|
||||
// Add customize nav item that opens the bar programmatically
|
||||
const customFunctionNavItem = {
|
||||
'id' : 'custom-function',
|
||||
'title' : 'Custom Function',
|
||||
'type' : 'group',
|
||||
'icon' : 'settings',
|
||||
'children': [
|
||||
id : 'custom-function',
|
||||
title : 'Custom Function',
|
||||
type : 'group',
|
||||
icon : 'settings',
|
||||
children: [
|
||||
{
|
||||
'id' : 'customize',
|
||||
'title' : 'Customize',
|
||||
'type' : 'item',
|
||||
'icon' : 'settings',
|
||||
'function': () => {
|
||||
id : 'customize',
|
||||
title : 'Customize',
|
||||
type : 'item',
|
||||
icon : 'settings',
|
||||
function: () => {
|
||||
this.toggleSidebarOpen('themeOptionsPanel');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,15 @@ import { NgModule } from '@angular/core';
|
|||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import {
|
||||
MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule
|
||||
} from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
import { MatOptionModule } from '@angular/material/core';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
|
||||
import { FuseDirectivesModule } from '@fuse/directives/directives';
|
||||
import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core';
|
||||
import { MatSidenav } from '@angular/material';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import { MediaObserver } from '@angular/flex-layout';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
@ -58,7 +58,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
|
|||
// Register the sidenav to the service
|
||||
this._fuseMatSidenavHelperService.setSidenav(this.fuseMatSidenavHelper, this._matSidenav);
|
||||
|
||||
if ( this._mediaObserver.isActive(this.matIsLockedOpen) )
|
||||
if ( this.matIsLockedOpen && this._mediaObserver.isActive(this.matIsLockedOpen) )
|
||||
{
|
||||
this.isLockedOpen = true;
|
||||
this._matSidenav.mode = 'side';
|
||||
|
@ -74,7 +74,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
|
|||
this._fuseMatchMediaService.onMediaChange
|
||||
.pipe(takeUntil(this._unsubscribeAll))
|
||||
.subscribe(() => {
|
||||
if ( this._mediaObserver.isActive(this.matIsLockedOpen) )
|
||||
if ( this.matIsLockedOpen && this._mediaObserver.isActive(this.matIsLockedOpen) )
|
||||
{
|
||||
this.isLockedOpen = true;
|
||||
this._matSidenav.mode = 'side';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { MatSidenav } from '@angular/material';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnDestroy } from '@angular/core';
|
||||
import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { Platform } from '@angular/cdk/platform';
|
||||
import { Subject } from 'rxjs';
|
||||
import { filter, takeUntil } from 'rxjs/operators';
|
||||
import { fromEvent, Subject } from 'rxjs';
|
||||
import { debounceTime, filter, takeUntil } from 'rxjs/operators';
|
||||
import PerfectScrollbar from 'perfect-scrollbar';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { FusePerfectScrollbarGeometry, FusePerfectScrollbarPosition } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.interfaces';
|
||||
import { FuseConfigService } from '@fuse/services/config.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[fusePerfectScrollbar]'
|
||||
})
|
||||
export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
||||
export class FusePerfectScrollbarDirective implements OnInit, AfterViewInit, OnDestroy
|
||||
{
|
||||
isInitialized: boolean;
|
||||
isMobile: boolean;
|
||||
ps: PerfectScrollbar | any;
|
||||
|
||||
// Private
|
||||
private _animation: number | null;
|
||||
private _enabled: boolean | '';
|
||||
private _debouncedUpdate: any;
|
||||
private _options: any;
|
||||
|
@ -43,6 +44,7 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
this.isMobile = false;
|
||||
|
||||
// Set the private defaults
|
||||
this._animation = null;
|
||||
this._enabled = false;
|
||||
this._debouncedUpdate = _.debounce(this.update, 150);
|
||||
this._options = {
|
||||
|
@ -65,6 +67,15 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
{
|
||||
// Merge the options
|
||||
this._options = _.merge({}, this._options, value);
|
||||
|
||||
// Destroy and re-init the PerfectScrollbar to update its options
|
||||
setTimeout(() => {
|
||||
this._destroy();
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
this._init();
|
||||
});
|
||||
}
|
||||
|
||||
get fusePerfectScrollbarOptions(): any
|
||||
|
@ -120,6 +131,24 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
// @ Lifecycle hooks
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* On init
|
||||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to window resize event
|
||||
fromEvent(window, 'resize')
|
||||
.pipe(
|
||||
takeUntil(this._unsubscribeAll),
|
||||
debounceTime(150)
|
||||
)
|
||||
.subscribe(() => {
|
||||
|
||||
// Update the PerfectScrollbar
|
||||
this.update();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* After view init
|
||||
*/
|
||||
|
@ -292,6 +321,71 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
this.ngOnDestroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the geometry of the scrollable element
|
||||
*
|
||||
* @param prefix
|
||||
*/
|
||||
geometry(prefix: string = 'scroll'): FusePerfectScrollbarGeometry
|
||||
{
|
||||
return new FusePerfectScrollbarGeometry(
|
||||
this.elementRef.nativeElement[prefix + 'Left'],
|
||||
this.elementRef.nativeElement[prefix + 'Top'],
|
||||
this.elementRef.nativeElement[prefix + 'Width'],
|
||||
this.elementRef.nativeElement[prefix + 'Height']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the position of the scrollable element
|
||||
*
|
||||
* @param absolute
|
||||
*/
|
||||
position(absolute: boolean = false): FusePerfectScrollbarPosition
|
||||
{
|
||||
if ( !absolute && this.ps )
|
||||
{
|
||||
return new FusePerfectScrollbarPosition(
|
||||
this.ps.reach.x || 0,
|
||||
this.ps.reach.y || 0
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new FusePerfectScrollbarPosition(
|
||||
this.elementRef.nativeElement.scrollLeft,
|
||||
this.elementRef.nativeElement.scrollTop
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scroll to
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
* @param speed
|
||||
*/
|
||||
scrollTo(x: number, y?: number, speed?: number): void
|
||||
{
|
||||
if ( y == null && speed == null )
|
||||
{
|
||||
this.animateScrolling('scrollTop', x, speed);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( x != null )
|
||||
{
|
||||
this.animateScrolling('scrollLeft', x, speed);
|
||||
}
|
||||
|
||||
if ( y != null )
|
||||
{
|
||||
this.animateScrolling('scrollTop', y, speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scroll to X
|
||||
*
|
||||
|
@ -344,9 +438,8 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
*/
|
||||
scrollToRight(offset?: number, speed?: number): void
|
||||
{
|
||||
const width = this.elementRef.nativeElement.scrollWidth;
|
||||
|
||||
this.animateScrolling('scrollLeft', width - (offset || 0), speed);
|
||||
const left = this.elementRef.nativeElement.scrollWidth - this.elementRef.nativeElement.clientWidth;
|
||||
this.animateScrolling('scrollLeft', left - (offset || 0), speed);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -357,27 +450,64 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
*/
|
||||
scrollToBottom(offset?: number, speed?: number): void
|
||||
{
|
||||
const height = this.elementRef.nativeElement.scrollHeight;
|
||||
const top = this.elementRef.nativeElement.scrollHeight - this.elementRef.nativeElement.clientHeight;
|
||||
this.animateScrolling('scrollTop', top - (offset || 0), speed);
|
||||
}
|
||||
|
||||
this.animateScrolling('scrollTop', height - (offset || 0), speed);
|
||||
/**
|
||||
* Scroll to element
|
||||
*
|
||||
* @param qs
|
||||
* @param offset
|
||||
* @param speed
|
||||
*/
|
||||
scrollToElement(qs: string, offset?: number, speed?: number): void
|
||||
{
|
||||
const element = this.elementRef.nativeElement.querySelector(qs);
|
||||
|
||||
if ( !element )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const elementPos = element.getBoundingClientRect();
|
||||
const scrollerPos = this.elementRef.nativeElement.getBoundingClientRect();
|
||||
|
||||
if ( this.elementRef.nativeElement.classList.contains('ps--active-x') )
|
||||
{
|
||||
const currentPos = this.elementRef.nativeElement['scrollLeft'];
|
||||
const position = elementPos.left - scrollerPos.left + currentPos;
|
||||
|
||||
this.animateScrolling('scrollLeft', position + (offset || 0), speed);
|
||||
}
|
||||
|
||||
if ( this.elementRef.nativeElement.classList.contains('ps--active-y') )
|
||||
{
|
||||
const currentPos = this.elementRef.nativeElement['scrollTop'];
|
||||
const position = elementPos.top - scrollerPos.top + currentPos;
|
||||
|
||||
this.animateScrolling('scrollTop', position + (offset || 0), speed);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Animate scrolling
|
||||
*
|
||||
* @param {string} target
|
||||
* @param {number} value
|
||||
* @param {number} speed
|
||||
* @param target
|
||||
* @param value
|
||||
* @param speed
|
||||
*/
|
||||
animateScrolling(target: string, value: number, speed?: number): void
|
||||
{
|
||||
if ( !speed )
|
||||
if ( this._animation )
|
||||
{
|
||||
window.cancelAnimationFrame(this._animation);
|
||||
this._animation = null;
|
||||
}
|
||||
|
||||
if ( !speed || typeof window === 'undefined' )
|
||||
{
|
||||
this.elementRef.nativeElement[target] = value;
|
||||
|
||||
// PS has weird event sending order, this is a workaround for that
|
||||
this.update();
|
||||
this.update();
|
||||
}
|
||||
else if ( value !== this.elementRef.nativeElement[target] )
|
||||
{
|
||||
|
@ -389,9 +519,8 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
|
||||
const cosParameter = (oldValue - value) / 2;
|
||||
|
||||
const step = (newTimestamp) => {
|
||||
const step = (newTimestamp: number) => {
|
||||
scrollCount += Math.PI / (speed / (newTimestamp - oldTimestamp));
|
||||
|
||||
newValue = Math.round(value + cosParameter + cosParameter * Math.cos(scrollCount));
|
||||
|
||||
// Only continue animation if scroll position has not changed
|
||||
|
@ -399,20 +528,17 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
|
|||
{
|
||||
if ( scrollCount >= Math.PI )
|
||||
{
|
||||
this.elementRef.nativeElement[target] = value;
|
||||
|
||||
// PS has weird event sending order, this is a workaround for that
|
||||
this.update();
|
||||
|
||||
this.update();
|
||||
this.animateScrolling(target, value, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.elementRef.nativeElement[target] = oldValue = newValue;
|
||||
this.elementRef.nativeElement[target] = newValue;
|
||||
|
||||
// On a zoomed out page the resulting offset may differ
|
||||
oldValue = this.elementRef.nativeElement[target];
|
||||
oldTimestamp = newTimestamp;
|
||||
|
||||
window.requestAnimationFrame(step);
|
||||
this._animation = window.requestAnimationFrame(step);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
export class FusePerfectScrollbarGeometry
|
||||
{
|
||||
public x: number;
|
||||
public y: number;
|
||||
|
||||
public w: number;
|
||||
public h: number;
|
||||
|
||||
constructor(x: number, y: number, w: number, h: number)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.w = w;
|
||||
this.h = h;
|
||||
}
|
||||
}
|
||||
|
||||
export class FusePerfectScrollbarPosition
|
||||
{
|
||||
public x: number | 'start' | 'end';
|
||||
public y: number | 'start' | 'end';
|
||||
|
||||
constructor(x: number | 'start' | 'end', y: number | 'start' | 'end')
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
}
|
|
@ -47,25 +47,25 @@
|
|||
// @ Material colors map
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
$matPalettes: (
|
||||
red: $mat-red,
|
||||
pink: $mat-pink,
|
||||
purple: $mat-purple,
|
||||
deep-purple: $mat-deep-purple,
|
||||
indigo: $mat-indigo,
|
||||
blue: $mat-blue,
|
||||
light-blue: $mat-light-blue,
|
||||
cyan: $mat-cyan,
|
||||
teal: $mat-teal,
|
||||
green: $mat-green,
|
||||
light-green: $mat-light-green,
|
||||
lime: $mat-lime,
|
||||
yellow: $mat-yellow,
|
||||
amber: $mat-amber,
|
||||
orange: $mat-orange,
|
||||
deep-orange: $mat-deep-orange,
|
||||
brown: $mat-brown,
|
||||
grey: $mat-grey,
|
||||
blue-grey: $mat-blue-grey
|
||||
'red': $mat-red,
|
||||
'pink': $mat-pink,
|
||||
'purple': $mat-purple,
|
||||
'deep-purple': $mat-deep-purple,
|
||||
'indigo': $mat-indigo,
|
||||
'blue': $mat-blue,
|
||||
'light-blue': $mat-light-blue,
|
||||
'cyan': $mat-cyan,
|
||||
'teal': $mat-teal,
|
||||
'green': $mat-green,
|
||||
'light-green': $mat-light-green,
|
||||
'lime': $mat-lime,
|
||||
'yellow': $mat-yellow,
|
||||
'amber': $mat-amber,
|
||||
'orange': $mat-orange,
|
||||
'deep-orange': $mat-deep-orange,
|
||||
'brown': $mat-brown,
|
||||
'grey': $mat-grey,
|
||||
'blue-grey': $mat-blue-grey
|
||||
);
|
||||
|
||||
// Material color hues list
|
||||
|
|
|
@ -173,6 +173,7 @@ $carded-header-height-without-toolbar: $carded-header-height - $carded-toolbar-h
|
|||
|
||||
> .mat-tab-group {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
|
||||
.mat-tab-header {
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@ import { HttpClientModule } from '@angular/common/http';
|
|||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { MatMomentDateModule } from '@angular/material-moment-adapter';
|
||||
import { MatButtonModule, MatIconModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import 'hammerjs';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
target="_blank" mat-button class="pink" fxFlex="0 0 auto" fxLayout="row"
|
||||
fxLayoutAlign="start center">
|
||||
<mat-icon class="s-16 mr-sm-4">shopping_cart</mat-icon>
|
||||
<span>Purchase FUSE (Angular 7+)</span>
|
||||
<span>Purchase FUSE (Angular 8+)</span>
|
||||
</a>
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center" fxHide fxShow.gt-xs>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MatButtonModule, MatIconModule, MatToolbarModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule, MatIconModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
import { FuseNavigationModule } from '@fuse/components';
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
|
|
@ -47,7 +47,7 @@ export class NavbarVerticalStyle1Component implements OnInit, OnDestroy
|
|||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
// Directive
|
||||
@ViewChild(FusePerfectScrollbarDirective)
|
||||
@ViewChild(FusePerfectScrollbarDirective, {static: true})
|
||||
set directive(theDirective: FusePerfectScrollbarDirective)
|
||||
{
|
||||
if ( !theDirective )
|
||||
|
@ -75,16 +75,7 @@ export class NavbarVerticalStyle1Component implements OnInit, OnDestroy
|
|||
)
|
||||
.subscribe(() => {
|
||||
setTimeout(() => {
|
||||
const activeNavItem: any = document.querySelector('navbar .nav-link.active');
|
||||
|
||||
if ( activeNavItem )
|
||||
{
|
||||
const activeItemOffsetTop = activeNavItem.offsetTop,
|
||||
activeItemOffsetParentTop = activeNavItem.offsetParent.offsetTop,
|
||||
scrollDistance = activeItemOffsetTop - activeItemOffsetParentTop - (48 * 3) - 168;
|
||||
|
||||
this._fusePerfectScrollbar.scrollToTop(scrollDistance);
|
||||
}
|
||||
this._fusePerfectScrollbar.scrollToElement('navbar .nav-link.active', -120);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule, MatIconModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
import { FuseNavigationModule } from '@fuse/components';
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
|
|
@ -47,7 +47,7 @@ export class NavbarVerticalStyle2Component implements OnInit, OnDestroy
|
|||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
// Directive
|
||||
@ViewChild(FusePerfectScrollbarDirective)
|
||||
@ViewChild(FusePerfectScrollbarDirective, {static: true})
|
||||
set directive(theDirective: FusePerfectScrollbarDirective)
|
||||
{
|
||||
if ( !theDirective )
|
||||
|
@ -75,16 +75,7 @@ export class NavbarVerticalStyle2Component implements OnInit, OnDestroy
|
|||
)
|
||||
.subscribe(() => {
|
||||
setTimeout(() => {
|
||||
const activeNavItem: any = document.querySelector('navbar .nav-link.active');
|
||||
|
||||
if ( activeNavItem )
|
||||
{
|
||||
const activeItemOffsetTop = activeNavItem.offsetTop,
|
||||
activeItemOffsetParentTop = activeNavItem.offsetParent.offsetTop,
|
||||
scrollDistance = activeItemOffsetTop - activeItemOffsetParentTop - (48 * 3);
|
||||
|
||||
this._fusePerfectScrollbar.scrollToTop(scrollDistance);
|
||||
}
|
||||
this._fusePerfectScrollbar.scrollToElement('navbar .nav-link.active', -120);
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule, MatIconModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
import { FuseNavigationModule } from '@fuse/components';
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatDividerModule, MatListModule, MatSlideToggleModule } from '@angular/material';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
||||
|
|
|
@ -45,29 +45,29 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||
// Set the defaults
|
||||
this.userStatusOptions = [
|
||||
{
|
||||
'title': 'Online',
|
||||
'icon' : 'icon-checkbox-marked-circle',
|
||||
'color': '#4CAF50'
|
||||
title: 'Online',
|
||||
icon : 'icon-checkbox-marked-circle',
|
||||
color: '#4CAF50'
|
||||
},
|
||||
{
|
||||
'title': 'Away',
|
||||
'icon' : 'icon-clock',
|
||||
'color': '#FFC107'
|
||||
title: 'Away',
|
||||
icon : 'icon-clock',
|
||||
color: '#FFC107'
|
||||
},
|
||||
{
|
||||
'title': 'Do not Disturb',
|
||||
'icon' : 'icon-minus-circle',
|
||||
'color': '#F44336'
|
||||
title: 'Do not Disturb',
|
||||
icon : 'icon-minus-circle',
|
||||
color: '#F44336'
|
||||
},
|
||||
{
|
||||
'title': 'Invisible',
|
||||
'icon' : 'icon-checkbox-blank-circle-outline',
|
||||
'color': '#BDBDBD'
|
||||
title: 'Invisible',
|
||||
icon : 'icon-checkbox-blank-circle-outline',
|
||||
color: '#BDBDBD'
|
||||
},
|
||||
{
|
||||
'title': 'Offline',
|
||||
'icon' : 'icon-checkbox-blank-circle-outline',
|
||||
'color': '#616161'
|
||||
title: 'Offline',
|
||||
icon : 'icon-checkbox-blank-circle-outline',
|
||||
color: '#616161'
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -109,7 +109,7 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
|||
});
|
||||
|
||||
// Set the selected language from default languages
|
||||
this.selectedLanguage = _.find(this.languages, {'id': this._translateService.currentLang});
|
||||
this.selectedLanguage = _.find(this.languages, {id: this._translateService.currentLang});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { MatButtonModule, MatIconModule, MatMenuModule, MatToolbarModule } from '@angular/material';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
|
||||
import { FuseSearchBarModule, FuseShortcutsModule } from '@fuse/components';
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { MatSidenavModule } from '@angular/material';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
|
||||
import { FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components';
|
||||
import { FuseSharedModule } from '@fuse/shared.module';
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
#
|
||||
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<head>
|
||||
|
||||
<title>Fuse - Angular 7+ Material Design Admin Template</title>
|
||||
<title>Fuse - Angular 8+ Material Design Admin Template</title>
|
||||
<base href="/">
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
|
|
@ -18,80 +18,48 @@
|
|||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
import 'core-js/es6/symbol';
|
||||
import 'core-js/es6/object';
|
||||
import 'core-js/es6/function';
|
||||
import 'core-js/es6/parse-int';
|
||||
import 'core-js/es6/parse-float';
|
||||
import 'core-js/es6/number';
|
||||
import 'core-js/es6/math';
|
||||
import 'core-js/es6/string';
|
||||
import 'core-js/es6/date';
|
||||
import 'core-js/es6/array';
|
||||
import 'core-js/es6/regexp';
|
||||
import 'core-js/es6/map';
|
||||
import 'core-js/es6/weak-map';
|
||||
import 'core-js/es6/set';
|
||||
|
||||
/**
|
||||
* If the application will be indexed by Google Search, the following is required.
|
||||
* Googlebot uses a renderer based on Chrome 41.
|
||||
* https://developers.google.com/search/docs/guides/rendering
|
||||
**/
|
||||
import 'core-js/es7/array';
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/** IE10 and IE11 requires the following for the Reflect API. */
|
||||
import 'core-js/es6/reflect';
|
||||
|
||||
|
||||
/** Evergreen browsers require these. **/
|
||||
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
||||
import 'core-js/es7/reflect';
|
||||
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
**/
|
||||
*/
|
||||
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags.ts';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
|
||||
/*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*/
|
||||
// (window as any).__Zone_enable_cross_context_check = true;
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
|
||||
// Add global to window, assigning the value of window itself.
|
||||
(window as any).global = window;
|
||||
|
||||
/**
|
||||
* Fix for ngx-chart to work on ie11
|
||||
*/
|
||||
if ( typeof SVGElement.prototype.contains === 'undefined' )
|
||||
{
|
||||
SVGElement.prototype.contains = HTMLDivElement.prototype.contains;
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app"
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"extends": "../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
[
|
||||
"fuse",
|
||||
""
|
||||
],
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
[
|
||||
"fuse",
|
||||
""
|
||||
],
|
||||
[
|
||||
"kebab-case",
|
||||
"camelCase"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
16
tsconfig.app.json
Normal file
16
tsconfig.app.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"src/**/*.spec.ts"
|
||||
]
|
||||
}
|
|
@ -5,23 +5,23 @@
|
|||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"module": "es2015",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"paths": {
|
||||
"@fuse": [
|
||||
"@fuse/"
|
||||
]
|
||||
},
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
],
|
||||
"paths": {
|
||||
"@fuse": [
|
||||
"@fuse/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
18
tsconfig.spec.json
Normal file
18
tsconfig.spec.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
133
tslint.json
133
tslint.json
|
@ -1,35 +1,48 @@
|
|||
{
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
],
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"arrow-return-shorthand": true,
|
||||
"callable-types": true,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"deprecation": {
|
||||
"severity": "warn"
|
||||
},
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"component-class-suffix": true,
|
||||
"contextual-lifecycle": true,
|
||||
"directive-class-suffix": true,
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
[
|
||||
"fuse",
|
||||
""
|
||||
],
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"attribute",
|
||||
[
|
||||
"fuse",
|
||||
""
|
||||
],
|
||||
[
|
||||
"kebab-case",
|
||||
"camelCase"
|
||||
]
|
||||
],
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"import-spacing": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-over-type-literal": true,
|
||||
"label-position": true,
|
||||
"interface-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [
|
||||
true,
|
||||
180
|
||||
{
|
||||
"limit": 180,
|
||||
"ignore-pattern": "^import |^export | implements"
|
||||
}
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
|
@ -43,8 +56,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
|
@ -53,78 +65,51 @@
|
|||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-super": true,
|
||||
"no-empty": false,
|
||||
"no-empty-interface": true,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-misused-new": true,
|
||||
"no-non-null-assertion": true,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": false,
|
||||
"no-string-throw": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": false,
|
||||
"no-unnecessary-initializer": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": false,
|
||||
"no-var-keyword": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-shorthand": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": false,
|
||||
"prefer-const": true,
|
||||
"ordered-imports": false,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef": [
|
||||
true,
|
||||
"call-signature",
|
||||
"property-declaration"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"typeof-compare": true,
|
||||
"unified-signatures": true,
|
||||
"variable-name": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"no-output-on-prefix": true,
|
||||
"use-input-property-decorator": true,
|
||||
"use-output-property-decorator": true,
|
||||
"use-host-property-decorator": true,
|
||||
"trailing-comma": false,
|
||||
"no-conflicting-lifecycle": true,
|
||||
"no-host-metadata-property": true,
|
||||
"no-input-rename": true,
|
||||
"no-inputs-metadata-property": true,
|
||||
"no-output-native": true,
|
||||
"no-output-on-prefix": true,
|
||||
"no-output-rename": true,
|
||||
"use-life-cycle-interface": true,
|
||||
"no-outputs-metadata-property": true,
|
||||
"template-banana-in-box": true,
|
||||
"template-no-negated-async": true,
|
||||
"use-lifecycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true
|
||||
}
|
||||
"variable-name": [
|
||||
true,
|
||||
"ban-keywords",
|
||||
"check-format",
|
||||
"allow-pascal-case",
|
||||
"allow-leading-underscore"
|
||||
]
|
||||
},
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user