mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-12-24 06:17:07 +00:00
Compare commits
64 Commits
v1.0.4-ske
...
v1.1.1-ske
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d81e37a0f | ||
|
|
83f0ed5ec1 | ||
|
|
f800dc3286 | ||
|
|
e486413872 | ||
|
|
576e167ef1 | ||
|
|
619433f101 | ||
|
|
3e9ae83aae | ||
|
|
9400c3d748 | ||
|
|
5e4940fed9 | ||
|
|
8910e6f5dc | ||
|
|
52c5e6a18b | ||
|
|
3d9ded9a44 | ||
|
|
1be3f0066b | ||
|
|
cf9e9fc209 | ||
|
|
ff0f2933d9 | ||
|
|
21c96c76da | ||
|
|
5e2e2b7d53 | ||
|
|
dcff423943 | ||
|
|
6747610771 | ||
|
|
e6ee5d017e | ||
|
|
cb2b544526 | ||
|
|
5ace09f782 | ||
|
|
678dde8c0e | ||
|
|
236cf1eb06 | ||
|
|
f4efbe07f7 | ||
|
|
671287b55a | ||
|
|
19c85c964b | ||
|
|
e5cf4fdafb | ||
|
|
098dacf2a5 | ||
|
|
2f8539e987 | ||
|
|
f688a58656 | ||
|
|
9cb8c0c96b | ||
|
|
05575d3f82 | ||
|
|
b9198e3717 | ||
|
|
769e67c2f3 | ||
|
|
32960abd7c | ||
|
|
126e32d9e7 | ||
|
|
d6d74cb998 | ||
|
|
6d20c1d62d | ||
|
|
b55bce2de4 | ||
|
|
6f4dc36a3d | ||
|
|
fe7e6d173b | ||
|
|
b377d99c66 | ||
|
|
d4374e6df0 | ||
|
|
c74fad84b6 | ||
|
|
e09ef05e02 | ||
|
|
62467c8ddf | ||
|
|
2c0fc76b8a | ||
|
|
752660f5dc | ||
|
|
024ab15b25 | ||
|
|
01f00121ba | ||
|
|
915ad52863 | ||
|
|
dde2333c8a | ||
|
|
97bfaa9979 | ||
|
|
babf6dc47b | ||
|
|
6ae3e154c3 | ||
|
|
55288bbbd4 | ||
|
|
49b6ff7292 | ||
|
|
903688ab43 | ||
|
|
7297a9b4a4 | ||
|
|
4cbbd3a1d6 | ||
|
|
2f4ce6221e | ||
|
|
44cdadaec9 | ||
|
|
19f822cbab |
@@ -25,6 +25,7 @@
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
"dev": "environments/environment.ts",
|
||||
"hmr": "environments/environment.hmr.ts",
|
||||
"prod": "environments/environment.prod.ts"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Fuse2
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.1.3.
|
||||
Material Design Admin Template with Angular 4+ and Angular Material 2
|
||||
|
||||
## Development server
|
||||
|
||||
@@ -22,7 +22,3 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
|
||||
|
||||
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).
|
||||
|
||||
2140
package-lock.json
generated
2140
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
76
package.json
76
package.json
@@ -1,69 +1,75 @@
|
||||
{
|
||||
"name": "fuse2",
|
||||
"version": "1.0.4",
|
||||
"version": "1.1.1",
|
||||
"license": "",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"start-hmr": "ng serve --hmr -e=hmr -sm=false",
|
||||
"start-hmr-sourcemaps": "ng serve --hmr -e=hmr",
|
||||
"build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build",
|
||||
"build-prod": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "4.3.5",
|
||||
"@angular/cdk": "2.0.0-beta.10",
|
||||
"@angular/common": "4.3.5",
|
||||
"@angular/compiler": "4.3.5",
|
||||
"@angular/core": "4.3.5",
|
||||
"@angular/animations": "4.4.3",
|
||||
"@angular/cdk": "2.0.0-beta.11",
|
||||
"@angular/common": "4.4.3",
|
||||
"@angular/compiler": "4.4.3",
|
||||
"@angular/core": "4.4.3",
|
||||
"@angular/flex-layout": "2.0.0-beta.9",
|
||||
"@angular/forms": "4.3.5",
|
||||
"@angular/http": "4.3.5",
|
||||
"@angular/material": "2.0.0-beta.10",
|
||||
"@angular/platform-browser": "4.3.5",
|
||||
"@angular/platform-browser-dynamic": "4.3.5",
|
||||
"@angular/router": "4.3.5",
|
||||
"@angular/forms": "4.4.3",
|
||||
"@angular/http": "4.4.3",
|
||||
"@angular/material": "2.0.0-beta.11",
|
||||
"@angular/platform-browser": "4.4.3",
|
||||
"@angular/platform-browser-dynamic": "4.4.3",
|
||||
"@angular/router": "4.4.3",
|
||||
"@swimlane/ngx-charts": "6.0.2",
|
||||
"@swimlane/ngx-datatable": "9.3.1",
|
||||
"@swimlane/ngx-dnd": "3.0.0",
|
||||
"angular-calendar": "0.19.0",
|
||||
"angular-in-memory-web-api": "0.3.2",
|
||||
"angular-in-memory-web-api": "0.4.6",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"core-js": "2.5.0",
|
||||
"d3": "4.10.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"highlight.js": "9.12.0",
|
||||
"intl": "1.2.5",
|
||||
"md2": "0.0.28",
|
||||
"moment": "2.18.1",
|
||||
"ngx-color-picker": "4.3.1",
|
||||
"ngx-cookie-service": "1.0.7",
|
||||
"ngx-perfect-scrollbar": "4.5.6",
|
||||
"ngx-perfect-scrollbar": "4.6.2",
|
||||
"perfect-scrollbar": "0.8.1",
|
||||
"rxjs": "5.4.3",
|
||||
"web-animations-js": "2.3.1",
|
||||
"zone.js": "0.8.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "^1.3.2",
|
||||
"@angular/compiler-cli": "4.3.5",
|
||||
"@angular/language-service": "4.3.5",
|
||||
"@ngtools/webpack": "^1.6.2",
|
||||
"@types/jasmine": "^2.5.54",
|
||||
"@types/jasminewd2": "^2.0.2",
|
||||
"@types/node": "^6.0.88",
|
||||
"codelyzer": "~3.0.1",
|
||||
"jasmine-core": "~2.6.2",
|
||||
"jasmine-spec-reporter": "~4.1.0",
|
||||
"@angular/cli": "1.4.2",
|
||||
"@angular/compiler-cli": "4.4.3",
|
||||
"@angular/language-service": "4.4.3",
|
||||
"@angularclass/hmr": "2.1.3",
|
||||
"@ngtools/webpack": "1.7.1",
|
||||
"@types/jasmine": "2.6.0",
|
||||
"@types/jasminewd2": "2.0.2",
|
||||
"@types/node": "6.0.88",
|
||||
"codelyzer": "3.0.1",
|
||||
"jasmine-core": "2.6.2",
|
||||
"jasmine-spec-reporter": "4.1.0",
|
||||
"karma": "1.7.1",
|
||||
"karma-chrome-launcher": "~2.1.1",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "^1.2.1",
|
||||
"karma-jasmine": "~1.1.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"node-sass": "^4.5.3",
|
||||
"protractor": "~5.1.2",
|
||||
"ts-node": "~3.0.4",
|
||||
"tslint": "~5.3.2",
|
||||
"typescript": "~2.3.3"
|
||||
"karma-chrome-launcher": "2.1.1",
|
||||
"karma-cli": "1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "1.2.1",
|
||||
"karma-jasmine": "1.1.0",
|
||||
"karma-jasmine-html-reporter": "0.2.2",
|
||||
"node-sass": "4.5.3",
|
||||
"protractor": "5.1.2",
|
||||
"ts-node": "3.0.4",
|
||||
"tslint": "5.3.2",
|
||||
"typescript": "2.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ import { RouterModule, Routes } from '@angular/router';
|
||||
import 'hammerjs';
|
||||
import { SharedModule } from './core/modules/shared.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
||||
import { FuseMainModule } from './main/main.module';
|
||||
import { FuseSplashScreenService } from './core/services/splash-screen.service';
|
||||
import { FuseConfigService } from './core/services/config.service';
|
||||
import { FuseNavigationService } from './core/components/navigation/navigation.service';
|
||||
import { FuseSampleModule } from './main/content/sample/sample.module';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
@@ -31,13 +31,13 @@ const appRoutes: Routes = [
|
||||
BrowserAnimationsModule,
|
||||
RouterModule.forRoot(appRoutes),
|
||||
SharedModule,
|
||||
PerfectScrollbarModule.forRoot(),
|
||||
FuseMainModule,
|
||||
FuseSampleModule
|
||||
],
|
||||
providers : [
|
||||
FuseSplashScreenService,
|
||||
FuseConfigService
|
||||
FuseConfigService,
|
||||
FuseNavigationService
|
||||
],
|
||||
bootstrap : [
|
||||
AppComponent
|
||||
|
||||
@@ -1,10 +1,69 @@
|
||||
import { sequence, trigger, stagger, animate, style, group, query, transition, keyframes, animateChild, state } from '@angular/animations';
|
||||
import { sequence, trigger, animate, style, group, query, transition, animateChild, state, animation, useAnimation, stagger } from '@angular/animations';
|
||||
|
||||
// const query = (s, a, o = {optional: true}) => q(s, a, o);
|
||||
const customAnimation = animation([
|
||||
style({
|
||||
opacity : '{{opacity}}',
|
||||
transform: 'scale({{scale}}) translate3d({{x}}, {{y}}, {{z}})'
|
||||
}),
|
||||
animate('{{duration}} {{delay}} cubic-bezier(0.0, 0.0, 0.2, 1)', style('*'))
|
||||
], {
|
||||
params: {
|
||||
duration: '200ms',
|
||||
delay : '0ms',
|
||||
opacity : '0',
|
||||
scale : '1',
|
||||
x : '0',
|
||||
y : '0',
|
||||
z : '0'
|
||||
}
|
||||
});
|
||||
|
||||
export class Animations
|
||||
{
|
||||
public static slideInOut = trigger('slideInOut', [
|
||||
export const fuseAnimations = [
|
||||
|
||||
trigger('animate', [transition('void => *', [useAnimation(customAnimation)])]),
|
||||
|
||||
trigger('animateStagger', [
|
||||
state('50', style('*')),
|
||||
state('100', style('*')),
|
||||
state('200', style('*')),
|
||||
|
||||
transition('void => 50',
|
||||
query('@*',
|
||||
[
|
||||
stagger('50ms', [
|
||||
animateChild()
|
||||
])
|
||||
])),
|
||||
transition('void => 100',
|
||||
query('@*',
|
||||
[
|
||||
stagger('100ms', [
|
||||
animateChild()
|
||||
])
|
||||
])),
|
||||
transition('void => 200',
|
||||
query('@*',
|
||||
[
|
||||
stagger('200ms', [
|
||||
animateChild()
|
||||
])
|
||||
]))
|
||||
]),
|
||||
|
||||
trigger('fadeInOut', [
|
||||
state('0', style({
|
||||
display: 'none',
|
||||
opacity: 0
|
||||
})),
|
||||
state('1', style({
|
||||
display: 'block',
|
||||
opacity: 1
|
||||
})),
|
||||
transition('1 => 0', animate('300ms ease-out')),
|
||||
transition('0 => 1', animate('300ms ease-in'))
|
||||
]),
|
||||
|
||||
trigger('slideInOut', [
|
||||
state('0', style({
|
||||
height : '0px',
|
||||
display: 'none'
|
||||
@@ -15,9 +74,9 @@ export class Animations
|
||||
})),
|
||||
transition('1 => 0', animate('300ms ease-out')),
|
||||
transition('0 => 1', animate('300ms ease-in'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static slideInLeft = trigger('slideInLeft', [
|
||||
trigger('slideInLeft', [
|
||||
state('void', style({
|
||||
transform: 'translateX(-100%)',
|
||||
display : 'none'
|
||||
@@ -28,9 +87,9 @@ export class Animations
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static slideInRight = trigger('slideInRight', [
|
||||
trigger('slideInRight', [
|
||||
state('void', style({
|
||||
transform: 'translateX(100%)',
|
||||
display : 'none'
|
||||
@@ -41,9 +100,9 @@ export class Animations
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static slideInTop = trigger('slideInTop', [
|
||||
trigger('slideInTop', [
|
||||
state('void', style({
|
||||
transform: 'translateY(-100%)',
|
||||
display : 'none'
|
||||
@@ -54,9 +113,9 @@ export class Animations
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static slideInBottom = trigger('slideInBottom', [
|
||||
trigger('slideInBottom', [
|
||||
state('void',
|
||||
style({
|
||||
transform: 'translateY(100%)',
|
||||
@@ -68,9 +127,9 @@ export class Animations
|
||||
})),
|
||||
transition('void => *', animate('300ms')),
|
||||
transition('* => void', animate('300ms'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static routerTransitionLeft = trigger('routerTransitionLeft', [
|
||||
trigger('routerTransitionLeft', [
|
||||
|
||||
transition('* => *', [
|
||||
query('fuse-content > :enter, fuse-content > :leave', [
|
||||
@@ -95,7 +154,7 @@ export class Animations
|
||||
transform: 'translateX(0)',
|
||||
opacity : 1
|
||||
}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateX(-100%)',
|
||||
opacity : 0
|
||||
@@ -103,7 +162,7 @@ export class Animations
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({transform: 'translateX(100%)'}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateX(0%)',
|
||||
opacity : 1
|
||||
@@ -114,9 +173,9 @@ export class Animations
|
||||
query('fuse-content > :enter', animateChild(), {optional: true})
|
||||
])
|
||||
])
|
||||
]);
|
||||
]),
|
||||
|
||||
public static routerTransitionRight = trigger('routerTransitionRight', [
|
||||
trigger('routerTransitionRight', [
|
||||
|
||||
transition('* => *', [
|
||||
query('fuse-content > :enter, fuse-content > :leave', [
|
||||
@@ -141,7 +200,7 @@ export class Animations
|
||||
transform: 'translateX(0)',
|
||||
opacity : 1
|
||||
}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateX(100%)',
|
||||
opacity : 0
|
||||
@@ -149,7 +208,7 @@ export class Animations
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({transform: 'translateX(-100%)'}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateX(0%)',
|
||||
opacity : 1
|
||||
@@ -160,9 +219,9 @@ export class Animations
|
||||
query('fuse-content > :enter', animateChild(), {optional: true})
|
||||
])
|
||||
])
|
||||
]);
|
||||
]),
|
||||
|
||||
public static routerTransitionUp = trigger('routerTransitionUp', [
|
||||
trigger('routerTransitionUp', [
|
||||
|
||||
transition('* => *', [
|
||||
query('fuse-content > :enter, fuse-content > :leave', [
|
||||
@@ -180,35 +239,33 @@ export class Animations
|
||||
opacity : 0
|
||||
})
|
||||
], {optional: true}),
|
||||
sequence([
|
||||
group([
|
||||
query('fuse-content > :leave', [
|
||||
group([
|
||||
query('fuse-content > :leave', [
|
||||
style({
|
||||
transform: 'translateY(0)',
|
||||
opacity : 1
|
||||
}),
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateY(0)',
|
||||
transform: 'translateY(-100%)',
|
||||
opacity : 0
|
||||
}))
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({transform: 'translateY(100%)'}),
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateY(0%)',
|
||||
opacity : 1
|
||||
}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
style({
|
||||
transform: 'translateY(-100%)',
|
||||
opacity : 0
|
||||
}))
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({transform: 'translateY(100%)'}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
style({
|
||||
transform: 'translateY(0%)',
|
||||
opacity : 1
|
||||
}))
|
||||
], {optional: true})
|
||||
]),
|
||||
query('fuse-content > :leave', animateChild(), {optional: true}),
|
||||
query('fuse-content > :enter', animateChild(), {optional: true})
|
||||
])
|
||||
}))
|
||||
], {optional: true})
|
||||
]),
|
||||
query('fuse-content > :leave', animateChild(), {optional: true}),
|
||||
query('fuse-content > :enter', animateChild(), {optional: true})
|
||||
])
|
||||
]);
|
||||
]),
|
||||
|
||||
public static routerTransitionDown = trigger('routerTransitionDown', [
|
||||
trigger('routerTransitionDown', [
|
||||
|
||||
transition('* => *', [
|
||||
query('fuse-content > :enter, fuse-content > :leave', [
|
||||
@@ -233,7 +290,7 @@ export class Animations
|
||||
transform: 'translateY(0)',
|
||||
opacity : 1
|
||||
}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateY(100%)',
|
||||
opacity : 0
|
||||
@@ -241,7 +298,7 @@ export class Animations
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({transform: 'translateY(-100%)'}),
|
||||
animate('400ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
animate('600ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
transform: 'translateY(0%)',
|
||||
opacity : 1
|
||||
@@ -252,11 +309,11 @@ export class Animations
|
||||
query('fuse-content > :enter', animateChild(), {optional: true})
|
||||
])
|
||||
])
|
||||
]);
|
||||
]),
|
||||
|
||||
public static routerTransitionFade = trigger('routerTransitionFade', [
|
||||
trigger('routerTransitionFade', [
|
||||
|
||||
transition('* => *', [
|
||||
transition('* => *', group([
|
||||
|
||||
query('fuse-content > :enter, fuse-content > :leave ', [
|
||||
style({
|
||||
@@ -267,33 +324,32 @@ export class Animations
|
||||
right : 0
|
||||
})
|
||||
], {optional: true}),
|
||||
|
||||
query('fuse-content > :enter', [
|
||||
style({
|
||||
opacity: 0
|
||||
})
|
||||
], {optional: true}),
|
||||
// sequence([
|
||||
query('fuse-content > :leave', [
|
||||
style({
|
||||
opacity: 1
|
||||
}),
|
||||
animate('300ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
style({
|
||||
opacity: 0
|
||||
}))
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
query('fuse-content > :leave', [
|
||||
style({
|
||||
opacity: 1
|
||||
}),
|
||||
animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
opacity: 0
|
||||
}),
|
||||
animate('300ms cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
style({
|
||||
opacity: 1
|
||||
}))
|
||||
], {optional: true}),
|
||||
// ]),
|
||||
}))
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', [
|
||||
style({
|
||||
opacity: 0
|
||||
}),
|
||||
animate('300ms cubic-bezier(0.0, 0.0, 0.2, 1)',
|
||||
style({
|
||||
opacity: 1
|
||||
}))
|
||||
], {optional: true}),
|
||||
query('fuse-content > :enter', animateChild(), {optional: true}),
|
||||
query('fuse-content > :leave', animateChild(), {optional: true})
|
||||
])
|
||||
]);
|
||||
}
|
||||
]))
|
||||
])
|
||||
];
|
||||
|
||||
60
src/app/core/components/copier/copier.service.ts
Normal file
60
src/app/core/components/copier/copier.service.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* This class is based on the code in the following projects:
|
||||
*
|
||||
* - https://github.com/zenorocha/select
|
||||
* - https://github.com/zenorocha/clipboard.js/
|
||||
*
|
||||
* Both released under MIT license - © Zeno Rocha
|
||||
*/
|
||||
import {Injectable} from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class CopierService {
|
||||
|
||||
private textarea: HTMLTextAreaElement;
|
||||
|
||||
/** Copy the text value to the clipboard. */
|
||||
copyText(text: string): boolean {
|
||||
this.createTextareaAndSelect(text);
|
||||
|
||||
const copySuccessful = document.execCommand('copy');
|
||||
this.removeFake();
|
||||
|
||||
return copySuccessful;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a hidden textarea element, sets its value from `text` property,
|
||||
* and makes a selection on it.
|
||||
*/
|
||||
private createTextareaAndSelect(text: string) {
|
||||
// Create a fake element to hold the contents to copy
|
||||
this.textarea = document.createElement('textarea');
|
||||
|
||||
// Prevent zooming on iOS
|
||||
this.textarea.style.fontSize = '12pt';
|
||||
|
||||
// Hide the element
|
||||
this.textarea.classList.add('cdk-visually-hidden');
|
||||
|
||||
// Move element to the same position vertically
|
||||
const yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
||||
this.textarea.style.top = yPosition + 'px';
|
||||
|
||||
this.textarea.setAttribute('readonly', '');
|
||||
this.textarea.value = text;
|
||||
|
||||
document.body.appendChild(this.textarea);
|
||||
|
||||
this.textarea.select();
|
||||
this.textarea.setSelectionRange(0, this.textarea.value.length);
|
||||
}
|
||||
|
||||
/** Remove the text area from the DOM. */
|
||||
private removeFake() {
|
||||
if (this.textarea) {
|
||||
document.body.removeChild(this.textarea);
|
||||
this.textarea = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
<div fxLayout="row" fxLayoutWrap
|
||||
fxLayoutAlign="start start"
|
||||
class="colors" perfect-scrollbar>
|
||||
class="colors" fusePerfectScrollbar>
|
||||
<div class="color"
|
||||
[ngClass]="'md-'+color.key+'-bg'"
|
||||
*ngFor="let color of (colors | keys)"
|
||||
@@ -63,7 +63,7 @@
|
||||
[@slideInRight]>
|
||||
<div fxLayout="row" fxLayoutWrap
|
||||
fxLayoutAlign="start start"
|
||||
class="colors" perfect-scrollbar>
|
||||
class="colors" fusePerfectScrollbar>
|
||||
<div class="color"
|
||||
*ngFor="let hue of hues"
|
||||
[fxHide]="selectedPalette === 'white' && hue !== '500'|| selectedPalette === 'black' && hue !== '500'"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||
import { MatColors } from '../../matColors';
|
||||
import { Animations } from '../../animations';
|
||||
import { fuseAnimations } from '../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-material-color-picker',
|
||||
templateUrl : './material-color-picker.component.html',
|
||||
styleUrls : ['./material-color-picker.component.scss'],
|
||||
animations : [Animations.slideInLeft, Animations.slideInRight],
|
||||
animations : fuseAnimations,
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FuseMaterialColorPickerComponent implements OnInit, OnChanges
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<a class="nav-link" md-ripple>
|
||||
<md-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</md-icon>
|
||||
<span class="nav-link-title">{{item.title}}</span>
|
||||
<md-icon class="collapse-arrow">keyboard_arrow_right</md-icon>
|
||||
</a>
|
||||
|
||||
<div class="children" [ngClass]="{'open': isOpen}">
|
||||
|
||||
<div class="{{fuseSettings.colorClasses.navbar}}">
|
||||
|
||||
<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-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>
|
||||
</ng-container>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
:host {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core';
|
||||
import { fuseAnimations } from '../../../../animations';
|
||||
import { FuseConfigService } from '../../../../services/config.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-horizontal-collapse',
|
||||
templateUrl: './nav-horizontal-collapse.component.html',
|
||||
styleUrls : ['./nav-horizontal-collapse.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseNavHorizontalCollapseComponent implements OnDestroy
|
||||
{
|
||||
onSettingsChanged: Subscription;
|
||||
fuseSettings: any;
|
||||
isOpen = false;
|
||||
|
||||
@HostBinding('class') classes = 'nav-item nav-collapse';
|
||||
@Input() item: any;
|
||||
|
||||
@HostListener('mouseenter')
|
||||
open()
|
||||
{
|
||||
this.isOpen = true;
|
||||
}
|
||||
|
||||
@HostListener('mouseleave')
|
||||
close()
|
||||
{
|
||||
this.isOpen = false;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private fuseConfig: FuseConfigService
|
||||
)
|
||||
{
|
||||
this.onSettingsChanged =
|
||||
this.fuseConfig.onSettingsChanged
|
||||
.subscribe(
|
||||
(newSettings) => {
|
||||
this.fuseSettings = newSettings;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
this.onSettingsChanged.unsubscribe();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<a class="nav-link" md-ripple
|
||||
[routerLink]="[item.url]" routerLinkActive="active">
|
||||
<md-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</md-icon>
|
||||
<span class="nav-link-title">{{item.title}}</span>
|
||||
<span class="nav-link-badge" *ngIf="item.badge" [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">{{item.badge.title}}</span>
|
||||
</a>
|
||||
@@ -0,0 +1,3 @@
|
||||
:host {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Component, HostBinding, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-horizontal-item',
|
||||
templateUrl: './nav-horizontal-item.component.html',
|
||||
styleUrls : ['./nav-horizontal-item.component.scss']
|
||||
})
|
||||
export class FuseNavHorizontalItemComponent
|
||||
{
|
||||
@HostBinding('class') classes = 'nav-item';
|
||||
@Input() item: any;
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
import { FuseNavigationService } from '../navigation.service';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { Animations } from '../../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-collapse',
|
||||
templateUrl: './nav-collapse.component.html',
|
||||
styleUrls : ['./nav-collapse.component.scss'],
|
||||
animations : [Animations.slideInOut]
|
||||
})
|
||||
export class FuseNavCollapseComponent implements OnInit
|
||||
{
|
||||
@Input() item: any;
|
||||
@HostBinding('class') classes = 'nav-collapse nav-item';
|
||||
@HostBinding('class.open') public isOpen = false;
|
||||
|
||||
constructor(private navigationService: FuseNavigationService, private router: Router)
|
||||
{
|
||||
/**
|
||||
* When navigation changed
|
||||
*/
|
||||
router.events.subscribe(
|
||||
(event) => {
|
||||
if ( event instanceof NavigationEnd )
|
||||
{
|
||||
/**
|
||||
* Check if the url is child of the collapse
|
||||
*/
|
||||
if ( this.isUrlInChildren(this.item, event.urlAfterRedirects) )
|
||||
{
|
||||
// console.log(this.item);
|
||||
this.expand();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Whenever a navigation collapse item toggled
|
||||
*/
|
||||
this.navigationService.onNavCollapseToggled.subscribe(
|
||||
(clickedItem) => {
|
||||
if ( clickedItem.children )
|
||||
{
|
||||
/**
|
||||
* if clicked collapse is child of this collapse
|
||||
* return
|
||||
*/
|
||||
if ( this.item.children.indexOf(clickedItem) !== -1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* If collapsed item is not related with this collapse
|
||||
* collapse
|
||||
*/
|
||||
if ( this.item !== clickedItem )
|
||||
{
|
||||
this.collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle Collapse
|
||||
* @param ev
|
||||
*/
|
||||
toggleOpen(ev)
|
||||
{
|
||||
ev.preventDefault();
|
||||
this.isOpen = !this.isOpen;
|
||||
this.navigationService.onNavCollapseToggled.emit(this.item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand
|
||||
*/
|
||||
expand()
|
||||
{
|
||||
if ( this.isOpen )
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.isOpen = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapse
|
||||
*/
|
||||
collapse()
|
||||
{
|
||||
if ( !this.isOpen )
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.isOpen = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking the url is in children
|
||||
* @param arr
|
||||
* @param url
|
||||
* @returns {any}
|
||||
*/
|
||||
isUrlInChildren(arr, url)
|
||||
{
|
||||
if ( !arr.children )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( let i = 0; i < arr.children.length; i++ )
|
||||
{
|
||||
if ( arr.children[i].children )
|
||||
{
|
||||
if ( this.isUrlInChildren(arr.children[i], url) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( arr.children[i].url === url )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public isCollapsed(): boolean
|
||||
{
|
||||
return this.isOpen;
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<span class="hint-text">{{ item.title }}</span>
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
:host {
|
||||
|
||||
.folded:not(.folded-open) & {
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
min-width: 1.6rem;
|
||||
border-top: 2px solid;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
> span {
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-subheader',
|
||||
templateUrl: './nav-subheader.component.html',
|
||||
styleUrls : ['./nav-subheader.component.scss']
|
||||
})
|
||||
export class FuseNavSubheaderComponent implements OnInit
|
||||
{
|
||||
@HostBinding('class') classes = 'nav-subheader';
|
||||
@Input() item: any;
|
||||
|
||||
constructor()
|
||||
{
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,32 @@
|
||||
<div id="main-navigation" class="nav">
|
||||
<ng-container *ngFor="let item of navigation">
|
||||
<div id="main-navigation" class="nav"
|
||||
[ngClass]="{'horizontal':layout === 'horizontal', 'vertical':layout === 'vertical'}">
|
||||
|
||||
<fuse-nav-subheader *ngIf="item.type=='subheader'" [item]="item"></fuse-nav-subheader>
|
||||
<!-- Vertical Navigation Layout -->
|
||||
<ng-container *ngIf="layout === 'vertical'">
|
||||
|
||||
<fuse-nav-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-item>
|
||||
<ng-container *ngFor="let item of navigationModel">
|
||||
|
||||
<fuse-nav-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-collapse>
|
||||
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
|
||||
<fuse-nav-vertical-collapse *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-vertical-collapse>
|
||||
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
|
||||
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
<!-- / Vertical Navigation Layout -->
|
||||
|
||||
<!-- Horizontal Navigation Layout -->
|
||||
<ng-container *ngIf="layout === 'horizontal'">
|
||||
|
||||
<ng-container *ngFor="let item of navigationModel">
|
||||
|
||||
<fuse-nav-horizontal-collapse *ngIf="item.type=='group'" [item]="item"></fuse-nav-horizontal-collapse>
|
||||
<fuse-nav-horizontal-collapse *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-horizontal-collapse>
|
||||
<fuse-nav-horizontal-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-horizontal-item>
|
||||
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
<!-- / Horizontal Navigation Layout -->
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';
|
||||
import { FuseNavigationService } from './navigation.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-navigation',
|
||||
@@ -7,13 +8,25 @@ import { FuseNavigationService } from './navigation.service';
|
||||
styleUrls : ['./navigation.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FuseNavigationComponent
|
||||
export class FuseNavigationComponent implements OnDestroy
|
||||
{
|
||||
navigation: any[];
|
||||
navigationModel: any[];
|
||||
navigationModelChangeSubscription: Subscription;
|
||||
|
||||
constructor(private navigationService: FuseNavigationService)
|
||||
@Input('layout') layout = 'vertical';
|
||||
|
||||
constructor(private fuseNavigationService: FuseNavigationService)
|
||||
{
|
||||
this.navigation = navigationService.getNavigation();
|
||||
this.navigationModelChangeSubscription =
|
||||
this.fuseNavigationService.onNavigationModelChange
|
||||
.subscribe((navigationModel) => {
|
||||
this.navigationModel = navigationModel;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
this.navigationModelChangeSubscription.unsubscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { SharedModule } from '../../modules/shared.module';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { FuseNavSubheaderComponent } from './nav-subheader/nav-subheader.component';
|
||||
import { FuseNavigationComponent } from './navigation.component';
|
||||
import { FuseNavItemComponent } from './nav-item/nav-item.component';
|
||||
import { FuseNavCollapseComponent } from './nav-collapse/nav-collapse.component';
|
||||
import { FuseNavVerticalItemComponent } from './vertical/nav-item/nav-vertical-item.component';
|
||||
import { FuseNavVerticalCollapseComponent } from './vertical/nav-collapse/nav-vertical-collapse.component';
|
||||
import { FuseNavVerticalGroupComponent } from './vertical/nav-group/nav-vertical-group.component';
|
||||
import { FuseNavHorizontalItemComponent } from './horizontal/nav-item/nav-horizontal-item.component';
|
||||
import { FuseNavHorizontalCollapseComponent } from './horizontal/nav-collapse/nav-horizontal-collapse.component';
|
||||
|
||||
@NgModule({
|
||||
imports : [
|
||||
@@ -16,9 +18,11 @@ import { FuseNavCollapseComponent } from './nav-collapse/nav-collapse.component'
|
||||
],
|
||||
declarations: [
|
||||
FuseNavigationComponent,
|
||||
FuseNavSubheaderComponent,
|
||||
FuseNavItemComponent,
|
||||
FuseNavCollapseComponent
|
||||
FuseNavVerticalGroupComponent,
|
||||
FuseNavVerticalItemComponent,
|
||||
FuseNavVerticalCollapseComponent,
|
||||
FuseNavHorizontalItemComponent,
|
||||
FuseNavHorizontalCollapseComponent
|
||||
]
|
||||
})
|
||||
export class FuseNavigationModule
|
||||
|
||||
@@ -1,25 +1,44 @@
|
||||
import { EventEmitter, Injectable } from '@angular/core';
|
||||
import { FuseNavigation } from '../../../navigation.model';
|
||||
import { NavigationModel } from '../../../navigation.model';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
|
||||
@Injectable()
|
||||
export class FuseNavigationService
|
||||
{
|
||||
onNavCollapseToggle = new EventEmitter<any>();
|
||||
onNavCollapseToggled = new EventEmitter<any>();
|
||||
navigation: any[];
|
||||
onNavigationModelChange: BehaviorSubject<any> = new BehaviorSubject({});
|
||||
navigationModel: NavigationModel;
|
||||
flatNavigation: any[] = [];
|
||||
|
||||
constructor()
|
||||
{
|
||||
this.navigation = new FuseNavigation().items;
|
||||
this.navigationModel = new NavigationModel();
|
||||
this.onNavigationModelChange.next(this.navigationModel.model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get navigation array
|
||||
* Get navigation model
|
||||
* @returns {any[]}
|
||||
*/
|
||||
getNavigation()
|
||||
getNavigationModel()
|
||||
{
|
||||
return this.navigation;
|
||||
return this.navigationModel.model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the navigation model
|
||||
* @param model
|
||||
*/
|
||||
setNavigationModel(model)
|
||||
{
|
||||
// console.log(model);
|
||||
|
||||
this.navigationModel = model;
|
||||
|
||||
console.log(this.navigationModel);
|
||||
|
||||
this.onNavigationModelChange.next(this.navigationModel.model);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +50,7 @@ export class FuseNavigationService
|
||||
{
|
||||
if ( !navigationItems )
|
||||
{
|
||||
navigationItems = this.navigation;
|
||||
navigationItems = this.navigationModel.model;
|
||||
}
|
||||
|
||||
for ( const navItem of navigationItems )
|
||||
@@ -41,7 +60,7 @@ export class FuseNavigationService
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( navItem.type === 'nav-item' )
|
||||
if ( navItem.type === 'item' )
|
||||
{
|
||||
this.flatNavigation.push({
|
||||
title: navItem.title,
|
||||
@@ -53,7 +72,7 @@ export class FuseNavigationService
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( navItem.type === 'nav-collapse' )
|
||||
if ( navItem.type === 'collapse' || navItem.type === 'group' )
|
||||
{
|
||||
this.getFlatNavigation(navItem.children);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
</a>
|
||||
<div class="children" [@slideInOut]="isOpen">
|
||||
<ng-container *ngFor="let item of item.children">
|
||||
<fuse-nav-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-item>
|
||||
<fuse-nav-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-collapse>
|
||||
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
|
||||
<fuse-nav-vertical-collapse *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-vertical-collapse>
|
||||
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
|
||||
</ng-container>
|
||||
</div>
|
||||
@@ -0,0 +1,182 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
import { FuseNavigationService } from '../../navigation.service';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { fuseAnimations } from '../../../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-vertical-collapse',
|
||||
templateUrl: './nav-vertical-collapse.component.html',
|
||||
styleUrls : ['./nav-vertical-collapse.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
{
|
||||
@Input() item: any;
|
||||
@HostBinding('class') classes = 'nav-collapse nav-item';
|
||||
@HostBinding('class.open') public isOpen = false;
|
||||
|
||||
constructor(
|
||||
private navigationService: FuseNavigationService,
|
||||
private router: Router
|
||||
)
|
||||
{
|
||||
// Listen for route changes
|
||||
router.events.subscribe(
|
||||
(event) => {
|
||||
if ( event instanceof NavigationEnd )
|
||||
{
|
||||
// Check if the url can be found in
|
||||
// one of the children of this item
|
||||
if ( this.isUrlInChildren(this.item, event.urlAfterRedirects) )
|
||||
{
|
||||
this.expand();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Listen for collapsing of any navigation item
|
||||
this.navigationService.onNavCollapseToggled
|
||||
.subscribe(
|
||||
(clickedItem) => {
|
||||
if ( clickedItem && clickedItem.children )
|
||||
{
|
||||
// Check if the clicked item is one
|
||||
// of the children of this item
|
||||
if ( this.isChildrenOf(this.item, clickedItem) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the url can be found in
|
||||
// one of the children of this item
|
||||
if ( this.isUrlInChildren(this.item, this.router.url) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If the clicked item is not this item, collapse...
|
||||
if ( this.item !== clickedItem )
|
||||
{
|
||||
this.collapse();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle collapse
|
||||
*
|
||||
* @param ev
|
||||
*/
|
||||
toggleOpen(ev)
|
||||
{
|
||||
ev.preventDefault();
|
||||
|
||||
this.isOpen = !this.isOpen;
|
||||
|
||||
// Navigation collapse toggled...
|
||||
this.navigationService.onNavCollapseToggled.emit(this.item);
|
||||
this.navigationService.onNavCollapseToggle.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand the collapsable navigation
|
||||
*/
|
||||
expand()
|
||||
{
|
||||
if ( this.isOpen )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.isOpen = true;
|
||||
this.navigationService.onNavCollapseToggle.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapse the collapsable navigation
|
||||
*/
|
||||
collapse()
|
||||
{
|
||||
if ( !this.isOpen )
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.isOpen = false;
|
||||
this.navigationService.onNavCollapseToggle.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given parent has the
|
||||
* given item in one of its children
|
||||
*
|
||||
* @param parent
|
||||
* @param item
|
||||
* @return {any}
|
||||
*/
|
||||
isChildrenOf(parent, item)
|
||||
{
|
||||
if ( !parent.children )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( parent.children.indexOf(item) !== -1 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
for ( const children of parent.children )
|
||||
{
|
||||
if ( children.children )
|
||||
{
|
||||
return this.isChildrenOf(children, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given url can be found
|
||||
* in one of the given parent's children
|
||||
*
|
||||
* @param parent
|
||||
* @param url
|
||||
* @returns {any}
|
||||
*/
|
||||
isUrlInChildren(parent, url)
|
||||
{
|
||||
if ( !parent.children )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( let i = 0; i < parent.children.length; i++ )
|
||||
{
|
||||
if ( parent.children[i].children )
|
||||
{
|
||||
if ( this.isUrlInChildren(parent.children[i], url) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( parent.children[i].url === url )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="group-title">
|
||||
<span class="hint-text">{{ item.title }}</span>
|
||||
</div>
|
||||
<div class="group-items">
|
||||
<ng-container *ngFor="let item of item.children">
|
||||
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
|
||||
<fuse-nav-vertical-collapse *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-vertical-collapse>
|
||||
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
|
||||
</ng-container>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
:host {
|
||||
|
||||
.folded:not(.folded-open) & {
|
||||
|
||||
> .group-title {
|
||||
align-items: center;
|
||||
|
||||
> span {
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
min-width: 1.6rem;
|
||||
border-top: 2px solid;
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-vertical-group',
|
||||
templateUrl: './nav-vertical-group.component.html',
|
||||
styleUrls : ['./nav-vertical-group.component.scss']
|
||||
})
|
||||
export class FuseNavVerticalGroupComponent implements OnInit
|
||||
{
|
||||
@HostBinding('class') classes = 'nav-group nav-item';
|
||||
@Input() item: any;
|
||||
|
||||
constructor()
|
||||
{
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-item',
|
||||
templateUrl: './nav-item.component.html',
|
||||
styleUrls : ['./nav-item.component.scss']
|
||||
selector : 'fuse-nav-vertical-item',
|
||||
templateUrl: './nav-vertical-item.component.html',
|
||||
styleUrls : ['./nav-vertical-item.component.scss']
|
||||
})
|
||||
export class FuseNavItemComponent implements OnInit
|
||||
export class FuseNavVerticalItemComponent implements OnInit
|
||||
{
|
||||
@HostBinding('class') classes = 'nav-item';
|
||||
@Input() item: any;
|
||||
@@ -7,7 +7,7 @@
|
||||
height: 64px;
|
||||
font-size: 13px;
|
||||
|
||||
@include media-breakpoint-down('xs') {
|
||||
@include media-breakpoint-down('sm') {
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
height: 64px !important;
|
||||
line-height: 64px !important;
|
||||
|
||||
@include media-breakpoint-down('xs') {
|
||||
@include media-breakpoint-down('sm') {
|
||||
height: 56px !important;
|
||||
line-height: 56px !important;
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
width: 64px !important;
|
||||
height: 64px !important;
|
||||
line-height: 64px !important;
|
||||
@include media-breakpoint-down('xs') {
|
||||
@include media-breakpoint-down('sm') {
|
||||
height: 56px !important;
|
||||
line-height: 56px !important;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</md-input-container>
|
||||
|
||||
<md-divider></md-divider>
|
||||
<md-nav-list *ngIf="!searching" style="max-height: 312px; overflow: auto" perfect-scrollbar>
|
||||
<md-nav-list *ngIf="!searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar>
|
||||
|
||||
<md-list-item *ngFor="let shortcutItem of shortcutItems"
|
||||
(click)="toggleShortcut($event, shortcutItem)">
|
||||
@@ -68,7 +68,7 @@
|
||||
</md-list-item>
|
||||
</md-nav-list>
|
||||
|
||||
<md-nav-list *ngIf="searching" style="max-height: 312px; overflow: auto" perfect-scrollbar>
|
||||
<md-nav-list *ngIf="searching" style="max-height: 312px; overflow: auto" fusePerfectScrollbar>
|
||||
<md-list-item *ngFor="let navigationItem of filteredNavigationItems"
|
||||
(click)="toggleShortcut($event, navigationItem)">
|
||||
<div class="w-100-p" fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
@@ -2,94 +2,97 @@
|
||||
<md-icon>settings</md-icon>
|
||||
</button>
|
||||
|
||||
<div #panel class="theme-options-panel md-white-bg mat-elevation-z2 pb-16">
|
||||
<div class="theme-options-panel-overlay" #overlay [fxHide]="barClosed" [@fadeInOut]="!barClosed"></div>
|
||||
|
||||
<div #panel class="theme-options-panel md-white-bg mat-elevation-z8">
|
||||
|
||||
<button md-icon-button class="close-button" (click)="closeBar()">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
|
||||
<md-list>
|
||||
<h3 md-subheader>Navigation:</h3>
|
||||
<md-list-item>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.navigation" (ngModelChange)="onSettingsChange()">
|
||||
<md-radio-button class="mr-8" value="left">Left</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="right">Right</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
</md-list-item>
|
||||
<div class="theme-options-panel-inner" fxLayout="column" fxLayoutAlign="start start">
|
||||
|
||||
<h3 md-subheader>Toolbar:</h3>
|
||||
<md-list-item>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.toolbar" (ngModelChange)="onSettingsChange()">
|
||||
<md-radio-button class="mr-8" value="below">Below</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="above">Above</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
</md-list-item>
|
||||
<h3>Navigation:</h3>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.navigation" (ngModelChange)="onSettingsChange()"
|
||||
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
||||
<md-radio-button class="mr-8 mb-8" value="top">Top</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="left">Left</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="right">Right</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
|
||||
<h3 md-subheader>Footer:</h3>
|
||||
<md-list-item>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.footer" (ngModelChange)="onSettingsChange()">
|
||||
<md-radio-button class="mr-8" value="below">Below</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="above">Above</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
</md-list-item>
|
||||
<h3 class="mt-24">Toolbar:</h3>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.toolbar" (ngModelChange)="onSettingsChange()"
|
||||
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
||||
<md-radio-button class="mr-8 mb-8" value="below">Below</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="above">Above</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
|
||||
<h3 class="mt-24">Footer:</h3>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.footer" (ngModelChange)="onSettingsChange()"
|
||||
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
||||
<md-radio-button class="mr-8 mb-8" value="below">Below</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="above">Above</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="none">None</md-radio-button>
|
||||
</md-radio-group>
|
||||
|
||||
<h3 class="mt-24">Layout Mode:</h3>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.mode" (ngModelChange)="onSettingsChange()"
|
||||
fxLayout="column" fxLayout.gt-xs="row" fxLayoutAlign="start start" fxLayoutWrap>
|
||||
<md-radio-button class="mr-8 mb-8" value="boxed">Boxed</md-radio-button>
|
||||
<md-radio-button class="mr-8 mb-8" value="fullwidth">Fullwidth</md-radio-button>
|
||||
</md-radio-group>
|
||||
|
||||
<md-divider></md-divider>
|
||||
|
||||
<h3 md-subheader>Colors:</h3>
|
||||
<h3>Colors:</h3>
|
||||
<div class="colors">
|
||||
|
||||
<md-list-item>
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<h4>Toolbar Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.toolbar" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
<h4 class="mr-8">Toolbar Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.toolbar"
|
||||
(onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
</div>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item>
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<h4>Navigation Bar Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.navbar" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
<h4 class="mr-8">Navigation Bar Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.navbar"
|
||||
(onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
</div>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item>
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<h4>Footer Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.footer" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
<h4 class="mr-8">Footer Color</h4>
|
||||
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.footer"
|
||||
(onValueChange)="onSettingsChange()"></fuse-material-color-picker>
|
||||
</div>
|
||||
</md-list-item>
|
||||
|
||||
</div>
|
||||
|
||||
<md-divider></md-divider>
|
||||
|
||||
<h3 md-subheader>Animation:</h3>
|
||||
<h3>Router Animation:</h3>
|
||||
<md-select class="p-0" [(ngModel)]="fuseSettings.routerAnimation">
|
||||
<md-option value="none">
|
||||
None
|
||||
</md-option>
|
||||
<md-option value="slideUp">
|
||||
Slide up
|
||||
</md-option>
|
||||
<md-option value="slideDown">
|
||||
Slide down
|
||||
</md-option>
|
||||
<md-option value="slideRight">
|
||||
Slide right
|
||||
</md-option>
|
||||
<md-option value="slideLeft">
|
||||
Slide left
|
||||
</md-option>
|
||||
<md-option value="fadeIn">
|
||||
Fade in
|
||||
</md-option>
|
||||
</md-select>
|
||||
|
||||
<md-list-item>
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<h4>Router Animation</h4>
|
||||
<md-select [(ngModel)]="fuseSettings.routerAnimation">
|
||||
<md-option value="none">
|
||||
None
|
||||
</md-option>
|
||||
<md-option value="slideUp">
|
||||
Slide up
|
||||
</md-option>
|
||||
<md-option value="slideDown">
|
||||
Slide down
|
||||
</md-option>
|
||||
<md-option value="slideRight">
|
||||
Slide right
|
||||
</md-option>
|
||||
<md-option value="slideLeft">
|
||||
Slide left
|
||||
</md-option>
|
||||
<md-option value="fadeIn">
|
||||
Fade in
|
||||
</md-option>
|
||||
</md-select>
|
||||
</div>
|
||||
</md-list-item>
|
||||
</div>
|
||||
|
||||
</md-list>
|
||||
</div>
|
||||
|
||||
@@ -15,18 +15,67 @@
|
||||
right: 0;
|
||||
top: 160px;
|
||||
|
||||
&.bar-closed .theme-options-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.theme-options-panel {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 320px;
|
||||
width: 360px;
|
||||
transform: translate3d(100%, 0, 0);
|
||||
z-index: 999;
|
||||
max-height: calc(100vh - 200px);
|
||||
padding: 24px;
|
||||
overflow: auto;
|
||||
|
||||
@include media-breakpoint-down('xs') {
|
||||
top: -120px;
|
||||
max-height: calc(100vh - 100px);
|
||||
width: 90vw;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
}
|
||||
|
||||
.mat-divider{
|
||||
display: block !important;
|
||||
width: 100%;
|
||||
margin: 24px 0 16px 0;
|
||||
}
|
||||
|
||||
.colors {
|
||||
display: block !important;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.theme-options-panel-overlay {
|
||||
position: fixed;
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
|
||||
@include media-breakpoint-down('sm') {
|
||||
background: rgba(0, 0, 0, 0.37);
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +83,10 @@
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.mat-divider {
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.open-button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -1,28 +1,36 @@
|
||||
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, ElementRef, HostBinding, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
|
||||
import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { FuseConfigService } from '../../services/config.service';
|
||||
import { fuseAnimations } from '../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-theme-options',
|
||||
templateUrl: './theme-options.component.html',
|
||||
styleUrls : ['./theme-options.component.scss']
|
||||
styleUrls : ['./theme-options.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
{
|
||||
@ViewChild('openButton') openButton;
|
||||
@ViewChild('panel') panel;
|
||||
@ViewChild('overlay') overlay: ElementRef;
|
||||
|
||||
public player: AnimationPlayer;
|
||||
fuseSettings: any;
|
||||
|
||||
onSettingsChanged: Subscription;
|
||||
|
||||
@HostBinding('class.bar-closed') barClosed: boolean;
|
||||
|
||||
constructor(
|
||||
private animationBuilder: AnimationBuilder,
|
||||
private fuseConfig: FuseConfigService
|
||||
private fuseConfig: FuseConfigService,
|
||||
private renderer: Renderer2
|
||||
)
|
||||
{
|
||||
this.barClosed = true;
|
||||
|
||||
this.onSettingsChanged =
|
||||
this.fuseConfig.onSettingsChanged
|
||||
.subscribe(
|
||||
@@ -34,6 +42,9 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
this.renderer.listen(this.overlay.nativeElement, 'click', () => {
|
||||
this.closeBar();
|
||||
});
|
||||
}
|
||||
|
||||
onSettingsChange()
|
||||
@@ -49,17 +60,25 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
style({transform: 'translate3d(0,0,0)'}),
|
||||
animate('400ms ease', style({transform: 'translate3d(100%,0,0)'}))
|
||||
]).create(this.panel.nativeElement);
|
||||
|
||||
this.player.play();
|
||||
|
||||
this.player.onDone(() => {
|
||||
this.barClosed = true;
|
||||
});
|
||||
}
|
||||
|
||||
openBar()
|
||||
{
|
||||
this.barClosed = false;
|
||||
|
||||
this.player =
|
||||
this.animationBuilder
|
||||
.build([
|
||||
style({transform: 'translate3d(100%,0,0)'}),
|
||||
animate('400ms ease', style({transform: 'translate3d(0,0,0)'}))
|
||||
]).create(this.panel.nativeElement);
|
||||
|
||||
this.player.play();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export class FuseIfOnDomDirective implements AfterContentChecked
|
||||
{
|
||||
setTimeout(() => {
|
||||
this.viewContainer.createEmbeddedView(this.templateRef);
|
||||
}, 0);
|
||||
}, 350);
|
||||
this.isCreated = true;
|
||||
}
|
||||
else if ( this.isCreated && !document.body.contains(this.element.nativeElement) )
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
import { AfterViewInit, Directive, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
|
||||
import * as Ps from 'perfect-scrollbar';
|
||||
import { FuseConfigService } from '../../services/config.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { Platform } from '@angular/cdk/platform';
|
||||
|
||||
@Directive({
|
||||
selector: '[fusePerfectScrollbar]'
|
||||
})
|
||||
export class FusePerfectScrollbarDirective implements OnInit, AfterViewInit, OnDestroy
|
||||
{
|
||||
onSettingsChanged: Subscription;
|
||||
isDisableCustomScrollbars = false;
|
||||
isMobile = false;
|
||||
isInitialized = true;
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
private zone: NgZone,
|
||||
private fuseConfig: FuseConfigService,
|
||||
private platform: Platform
|
||||
)
|
||||
{
|
||||
this.onSettingsChanged =
|
||||
this.fuseConfig.onSettingsChanged
|
||||
.subscribe(
|
||||
(settings) => {
|
||||
this.isDisableCustomScrollbars = !settings.customScrollbars;
|
||||
}
|
||||
);
|
||||
|
||||
if ( this.platform.ANDROID || this.platform.IOS )
|
||||
{
|
||||
this.isMobile = true;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit()
|
||||
{
|
||||
if ( this.isMobile || this.isDisableCustomScrollbars )
|
||||
{
|
||||
this.isInitialized = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.zone.runOutsideAngular(() => {
|
||||
|
||||
// Initialize the perfect-scrollbar
|
||||
Ps.initialize(this.element.nativeElement);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
if ( !this.isInitialized )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.onSettingsChanged.unsubscribe();
|
||||
|
||||
// Destroy the perfect-scrollbar
|
||||
Ps.destroy(this.element.nativeElement);
|
||||
}
|
||||
|
||||
update()
|
||||
{
|
||||
if ( !this.isInitialized )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the perfect-scrollbar
|
||||
Ps.update(this.element.nativeElement);
|
||||
}
|
||||
|
||||
destroy()
|
||||
{
|
||||
this.ngOnDestroy();
|
||||
}
|
||||
|
||||
scrollToX(x: number, speed?: number)
|
||||
{
|
||||
this.animateScrolling('scrollLeft', x, speed);
|
||||
}
|
||||
|
||||
scrollToY(y: number, speed?: number)
|
||||
{
|
||||
this.animateScrolling('scrollTop', y, speed);
|
||||
}
|
||||
|
||||
scrollToTop(offset?: number, speed?: number)
|
||||
{
|
||||
this.animateScrolling('scrollTop', (offset || 0), speed);
|
||||
}
|
||||
|
||||
scrollToLeft(offset?: number, speed?: number)
|
||||
{
|
||||
this.animateScrolling('scrollLeft', (offset || 0), speed);
|
||||
}
|
||||
|
||||
scrollToRight(offset?: number, speed?: number)
|
||||
{
|
||||
const width = this.element.nativeElement.scrollWidth;
|
||||
|
||||
this.animateScrolling('scrollLeft', width - (offset || 0), speed);
|
||||
}
|
||||
|
||||
scrollToBottom(offset?: number, speed?: number)
|
||||
{
|
||||
const height = this.element.nativeElement.scrollHeight;
|
||||
|
||||
this.animateScrolling('scrollTop', height - (offset || 0), speed);
|
||||
}
|
||||
|
||||
animateScrolling(target: string, value: number, speed?: number)
|
||||
{
|
||||
if ( !speed )
|
||||
{
|
||||
this.element.nativeElement[target] = value;
|
||||
|
||||
// PS has weird event sending order, this is a workaround for that
|
||||
this.update();
|
||||
|
||||
this.update();
|
||||
}
|
||||
else if ( value !== this.element.nativeElement[target] )
|
||||
{
|
||||
let newValue = 0;
|
||||
let scrollCount = 0;
|
||||
|
||||
let oldTimestamp = performance.now();
|
||||
let oldValue = this.element.nativeElement[target];
|
||||
|
||||
const cosParameter = (oldValue - value) / 2;
|
||||
|
||||
const step = (newTimestamp) => {
|
||||
scrollCount += Math.PI / (speed / (newTimestamp - oldTimestamp));
|
||||
|
||||
newValue = Math.round(value + cosParameter + cosParameter * Math.cos(scrollCount));
|
||||
|
||||
// Only continue animation if scroll position has not changed
|
||||
if ( this.element.nativeElement[target] === oldValue )
|
||||
{
|
||||
if ( scrollCount >= Math.PI )
|
||||
{
|
||||
this.element.nativeElement[target] = value;
|
||||
|
||||
// PS has weird event sending order, this is a workaround for that
|
||||
this.update();
|
||||
|
||||
this.update();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.element.nativeElement[target] = oldValue = newValue;
|
||||
|
||||
oldTimestamp = newTimestamp;
|
||||
|
||||
window.requestAnimationFrame(step);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.requestAnimationFrame(step);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding, AfterViewInit } from '@angular/core';
|
||||
import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core';
|
||||
import { MdSidenav } from '@angular/material';
|
||||
import { FuseMdSidenavHelperService } from 'app/core/directives/md-sidenav-helper/md-sidenav-helper.service';
|
||||
import { FuseMatchMedia } from '../../services/match-media.service';
|
||||
@@ -8,7 +8,7 @@ import { Subscription } from 'rxjs/Subscription';
|
||||
@Directive({
|
||||
selector: '[fuseMdSidenavHelper]'
|
||||
})
|
||||
export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDestroy
|
||||
export class FuseMdSidenavHelperDirective implements OnInit, OnDestroy
|
||||
{
|
||||
matchMediaSubscription: Subscription;
|
||||
|
||||
@@ -38,6 +38,7 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe
|
||||
this.mdSidenav.mode = 'side';
|
||||
this.mdSidenav.open();
|
||||
});
|
||||
this.stopTransition = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -46,6 +47,10 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe
|
||||
this.mdSidenav.mode = 'over';
|
||||
this.mdSidenav.close();
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
this.stopTransition = false;
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
this.matchMediaSubscription = this.fuseMatchMedia.onMediaChange.subscribe(() => {
|
||||
@@ -69,13 +74,6 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit()
|
||||
{
|
||||
setTimeout(() => {
|
||||
this.stopTransition = false;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
this.matchMediaSubscription.unsubscribe();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export class FuseUtils
|
||||
{
|
||||
|
||||
public static filterArrayByString(mainArr, searchText)
|
||||
{
|
||||
if ( searchText === '' )
|
||||
@@ -17,7 +16,6 @@ export class FuseUtils
|
||||
|
||||
public static searchInObj(itemObj, searchText)
|
||||
{
|
||||
|
||||
for ( const prop in itemObj )
|
||||
{
|
||||
if ( !itemObj.hasOwnProperty(prop) )
|
||||
@@ -29,7 +27,7 @@ export class FuseUtils
|
||||
|
||||
if ( typeof value === 'string' )
|
||||
{
|
||||
if ( this.searchInSting(value, searchText) )
|
||||
if ( this.searchInString(value, searchText) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -41,7 +39,6 @@ export class FuseUtils
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( typeof value === 'object' )
|
||||
@@ -60,7 +57,7 @@ export class FuseUtils
|
||||
{
|
||||
if ( typeof value === 'string' )
|
||||
{
|
||||
if ( this.searchInSting(value, searchText) )
|
||||
if ( this.searchInString(value, searchText) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -76,7 +73,7 @@ export class FuseUtils
|
||||
}
|
||||
}
|
||||
|
||||
public static searchInSting(value, searchText)
|
||||
public static searchInString(value, searchText)
|
||||
{
|
||||
return value.toLowerCase().includes(searchText);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import {
|
||||
MdTooltipModule,
|
||||
MdCardModule,
|
||||
MdChipsModule,
|
||||
MdCoreModule,
|
||||
MdDatepickerModule,
|
||||
MdDialogModule,
|
||||
MdExpansionModule,
|
||||
@@ -28,6 +27,7 @@ import {
|
||||
MdSliderModule,
|
||||
MdSlideToggleModule,
|
||||
MdSnackBarModule,
|
||||
MdStepperModule,
|
||||
MdSortModule,
|
||||
MdTableModule,
|
||||
MdTabsModule
|
||||
@@ -42,7 +42,6 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
MdCardModule,
|
||||
MdCheckboxModule,
|
||||
MdChipsModule,
|
||||
MdCoreModule,
|
||||
MdDatepickerModule,
|
||||
MdDialogModule,
|
||||
MdExpansionModule,
|
||||
@@ -62,6 +61,7 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
MdSliderModule,
|
||||
MdSlideToggleModule,
|
||||
MdSnackBarModule,
|
||||
MdStepperModule,
|
||||
MdSortModule,
|
||||
MdTableModule,
|
||||
MdTabsModule,
|
||||
@@ -76,7 +76,6 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
MdCardModule,
|
||||
MdCheckboxModule,
|
||||
MdChipsModule,
|
||||
MdCoreModule,
|
||||
MdDatepickerModule,
|
||||
MdDialogModule,
|
||||
MdExpansionModule,
|
||||
@@ -96,6 +95,7 @@ import { CdkTableModule } from '@angular/cdk/table';
|
||||
MdSliderModule,
|
||||
MdSlideToggleModule,
|
||||
MdSnackBarModule,
|
||||
MdStepperModule,
|
||||
MdSortModule,
|
||||
MdTableModule,
|
||||
MdTabsModule,
|
||||
|
||||
@@ -4,7 +4,6 @@ import { CommonModule } from '@angular/common';
|
||||
|
||||
import { MaterialModule } from './material.module';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
||||
import { ColorPickerModule } from 'ngx-color-picker';
|
||||
import { NgxDnDModule } from '@swimlane/ngx-dnd';
|
||||
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
|
||||
@@ -13,11 +12,11 @@ import { FuseMdSidenavHelperDirective, FuseMdSidenavTogglerDirective } from '../
|
||||
import { FusePipesModule } from '../pipes/pipes.module';
|
||||
import { FuseConfirmDialogComponent } from '../components/confirm-dialog/confirm-dialog.component';
|
||||
import { FuseCountdownComponent } from '../components/countdown/countdown.component';
|
||||
import { FuseNavigationService } from '../components/navigation/navigation.service';
|
||||
import { FuseMatchMedia } from '../services/match-media.service';
|
||||
import { FuseNavbarService } from '../../main/navbar/navbar.service';
|
||||
import { FuseNavbarVerticalService } from '../../main/navbar/vertical/navbar-vertical.service';
|
||||
import { FuseMdSidenavHelperService } from '../directives/md-sidenav-helper/md-sidenav-helper.service';
|
||||
import { FuseHljsComponent } from '../components/hljs/hljs.component';
|
||||
import { FusePerfectScrollbarDirective } from '../directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive';
|
||||
import { FuseIfOnDomDirective } from '../directives/fuse-if-on-dom/fuse-if-on-dom.directive';
|
||||
import { FuseMaterialColorPickerComponent } from '../components/material-color-picker/material-color-picker.component';
|
||||
import { Md2Module } from 'md2';
|
||||
@@ -31,6 +30,7 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
FuseCountdownComponent,
|
||||
FuseHljsComponent,
|
||||
FuseIfOnDomDirective,
|
||||
FusePerfectScrollbarDirective,
|
||||
FuseMaterialColorPickerComponent
|
||||
],
|
||||
imports : [
|
||||
@@ -39,7 +39,6 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
FusePipesModule,
|
||||
PerfectScrollbarModule,
|
||||
ReactiveFormsModule,
|
||||
ColorPickerModule,
|
||||
NgxDnDModule,
|
||||
@@ -56,7 +55,7 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
FusePipesModule,
|
||||
FuseCountdownComponent,
|
||||
FuseHljsComponent,
|
||||
PerfectScrollbarModule,
|
||||
FusePerfectScrollbarDirective,
|
||||
ReactiveFormsModule,
|
||||
ColorPickerModule,
|
||||
NgxDnDModule,
|
||||
@@ -70,9 +69,8 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
],
|
||||
providers : [
|
||||
CookieService,
|
||||
FuseNavigationService,
|
||||
FuseMatchMedia,
|
||||
FuseNavbarService,
|
||||
FuseNavbarVerticalService,
|
||||
FuseMdSidenavHelperService
|
||||
]
|
||||
})
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
@import '~@swimlane/ngx-datatable/release/index.css';
|
||||
@import '~@swimlane/ngx-datatable/release/themes/material.css';
|
||||
@import '~@swimlane/ngx-datatable/release/assets/icons.css';
|
||||
// Perfect Scrollbar
|
||||
@import "~perfect-scrollbar/src/css/main";
|
||||
// Perfect scrollbar
|
||||
@import '~perfect-scrollbar/dist/css/perfect-scrollbar.min.css';
|
||||
// Fuse
|
||||
@import "fuse";
|
||||
|
||||
|
||||
@@ -4,3 +4,38 @@
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
md-sidenav-container {
|
||||
|
||||
md-sidenav {
|
||||
|
||||
&[md-is-locked-open].md-stop-transition {
|
||||
transition: none !important;
|
||||
transform: translate3d(0, 0, 0) !important;
|
||||
opacity: 0;
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.mat-sidenav-opened {
|
||||
|
||||
&.mat-drawer-side {
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
transition: none !important;
|
||||
transform: translate3d(0, 0, 0) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.mat-drawer-end {
|
||||
}
|
||||
}
|
||||
|
||||
.mat-drawer-content {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,22 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav-group {
|
||||
display: block;
|
||||
|
||||
> .group-title {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 48px;
|
||||
font-weight: 500;
|
||||
padding-left: 24px;
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
|
||||
.nav-link {
|
||||
@@ -88,7 +104,9 @@
|
||||
|
||||
> .nav-item {
|
||||
|
||||
> .nav-link {
|
||||
> .nav-link,
|
||||
&.nav-group > .group-title,
|
||||
&.nav-group > .group-items > .nav-item > .nav-link {
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
@@ -96,7 +114,9 @@
|
||||
|
||||
> .nav-item {
|
||||
|
||||
> .nav-link {
|
||||
> .nav-link,
|
||||
&.nav-group > .group-title,
|
||||
&.nav-group > .group-items > .nav-item > .nav-link {
|
||||
padding-left: 72px;
|
||||
}
|
||||
}
|
||||
@@ -118,4 +138,79 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .nav-group {
|
||||
|
||||
> .group-items {
|
||||
|
||||
> .nav-collapse {
|
||||
background: transparent;
|
||||
transition: background 200ms ease-in-out;
|
||||
|
||||
&.open {
|
||||
background: rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.vertical {
|
||||
|
||||
.nav-group {
|
||||
|
||||
.group-title {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.horizontal {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.nav-item {
|
||||
|
||||
&.nav-collapse {
|
||||
position: relative;
|
||||
|
||||
.children {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
z-index: 999;
|
||||
min-width: 200px;
|
||||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
|
||||
|
||||
&.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding-left: 24px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .nav-item {
|
||||
|
||||
&.nav-collapse {
|
||||
position: relative;
|
||||
|
||||
> .nav-link {
|
||||
height: 56px;
|
||||
|
||||
.collapse-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .children {
|
||||
top: 100%;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,19 +137,10 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
@include mat-elevation(7);
|
||||
|
||||
&.md-is-locked-open {
|
||||
position: relative;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&.md-stop-transition {
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
height: $carded-header-height;
|
||||
min-height: $carded-header-height;
|
||||
@@ -233,7 +224,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
margin-left: 0 !important;
|
||||
|
||||
.center {
|
||||
margin-left: 0;
|
||||
@@ -257,7 +247,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
margin-right: 0 !important;
|
||||
|
||||
.center {
|
||||
margin-right: 0;
|
||||
@@ -284,6 +273,10 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
}
|
||||
|
||||
// Fullwidth
|
||||
&.fullwidth {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
&.fullwidth,
|
||||
&.inner-sidenav {
|
||||
min-height: 100%;
|
||||
@@ -309,10 +302,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
> .mat-drawer-content {
|
||||
flex: 1 0 auto;
|
||||
max-height: none;
|
||||
|
||||
> .center {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,6 +341,7 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
> md-sidenav-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
//flex-direction: row;
|
||||
flex: 1;
|
||||
background: none;
|
||||
z-index: 2;
|
||||
@@ -372,14 +362,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&.md-stop-transition {
|
||||
|
||||
~ .mat-sidenav-content,
|
||||
~ .mat-drawer-content {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
.sidenav-content {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -467,7 +449,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
&.simple {
|
||||
|
||||
&.fullwidth {
|
||||
overflow: visible;
|
||||
|
||||
> .content {
|
||||
flex: 1 0 auto;
|
||||
@@ -483,10 +464,6 @@ $top-bg-image: url('assets/images/backgrounds/header-bg.png');
|
||||
> .mat-sidenav-content,
|
||||
> .mat-drawer-content {
|
||||
flex: 1 0 auto;
|
||||
|
||||
> .center {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
body:not(.is-mobile) {
|
||||
|
||||
::-webkit-scrollbar:hover {
|
||||
background-color: rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border: 2px solid transparent;
|
||||
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.37);
|
||||
border-radius: 24px;
|
||||
}
|
||||
::-webkit-scrollbar:hover {
|
||||
background-color: rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:active {
|
||||
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.54);
|
||||
border-radius: 24px;
|
||||
::-webkit-scrollbar-thumb {
|
||||
border: 2px solid transparent;
|
||||
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.37);
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:active {
|
||||
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.54);
|
||||
border-radius: 24px;
|
||||
}
|
||||
}
|
||||
360
src/app/core/scss/partials/plugins/_ng-pick-datetime.scss
Normal file
360
src/app/core/scss/partials/plugins/_ng-pick-datetime.scss
Normal file
@@ -0,0 +1,360 @@
|
||||
/*@font-face {
|
||||
font-family: 'fontello';
|
||||
src: url('../font/fontello.eot?81091010');
|
||||
src: url('../font/fontello.eot?81091010#iefix') format('embedded-opentype'),
|
||||
url('../font/fontello.woff2?81091010') format('woff2'),
|
||||
url('../font/fontello.woff?81091010') format('woff'),
|
||||
url('../font/fontello.ttf?81091010') format('truetype'),
|
||||
url('../font/fontello.svg?81091010#fontello') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}*/
|
||||
|
||||
owl-date-time {
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-cancel:before {
|
||||
content: 'close';
|
||||
}
|
||||
|
||||
.icon-up-open:before {
|
||||
content: 'keyboard_arrow_up';
|
||||
}
|
||||
|
||||
.icon-down-open:before {
|
||||
content: 'keyboard_arrow_down';
|
||||
}
|
||||
|
||||
.icon-left-open:before {
|
||||
content: 'chevron_left';
|
||||
}
|
||||
|
||||
.icon-right-open:before {
|
||||
content: 'chevron_right';
|
||||
}
|
||||
|
||||
$white: #FFFFFF;
|
||||
$black: #000000;
|
||||
$grey: #DDDDDD;
|
||||
$blue: #0070BA;
|
||||
|
||||
.owl-widget,
|
||||
.owl-widget * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.owl-widget {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.owl-state-focus {
|
||||
|
||||
}
|
||||
|
||||
.owl-corner-all {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.owl-corner-top {
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
}
|
||||
|
||||
.owl-state-default {
|
||||
background: #FFFFFF;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
|
||||
.owl-dateTime-inputWrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
|
||||
.owl-dateTime-input {
|
||||
background: none !important;
|
||||
padding: 0 !important;
|
||||
cursor: pointer;
|
||||
|
||||
.owl-inputtext {
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
background: none !important;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
}
|
||||
|
||||
.owl-dateTime-cancel {
|
||||
position: relative !important;
|
||||
right: 0 !important;
|
||||
top: 0 !important;
|
||||
transform: none !important;
|
||||
font-size: 16px !important;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
min-width: 16px !important;
|
||||
min-height: 16px !important;
|
||||
line-height: 16px !important;
|
||||
color: rgba(0, 0, 0, 0.54) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.owl-dateTime {
|
||||
position: relative;
|
||||
width: 140px;
|
||||
|
||||
&.owl-dateTime-inline {
|
||||
width: auto;
|
||||
|
||||
.owl-dateTime-dialog {
|
||||
position: relative;
|
||||
z-index: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owl-dateTime-dialog {
|
||||
width: 256px;
|
||||
user-select: none;
|
||||
z-index: 99999;
|
||||
top: 24px !important;
|
||||
right: 0 !important;
|
||||
left: auto !important;
|
||||
@include mat-elevation(4);
|
||||
}
|
||||
|
||||
.owl-dateTime-dialogHeader {
|
||||
height: 2.5em;
|
||||
padding: .25em;
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.owl-calendar-wrapper {
|
||||
padding: 16px !important;
|
||||
}
|
||||
|
||||
.owl-calendar-control {
|
||||
|
||||
.owl-calendar-controlNav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.nav-prev,
|
||||
.nav-next {
|
||||
display: flex;
|
||||
|
||||
&:before {
|
||||
font-family: "Material Icons";
|
||||
position: relative !important;
|
||||
right: 0 !important;
|
||||
top: 0 !important;
|
||||
transform: none !important;
|
||||
font-size: 20px !important;
|
||||
width: 20px !important;
|
||||
height: 20px !important;
|
||||
min-width: 20px !important;
|
||||
min-height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
content: "chevron_left";
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
}
|
||||
}
|
||||
|
||||
.nav-next:before {
|
||||
content: "chevron_right";
|
||||
}
|
||||
}
|
||||
|
||||
.owl-calendar-controlContent {
|
||||
|
||||
.month-control,
|
||||
.year-control {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.month-control {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.year-control {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owl-calendar {
|
||||
|
||||
table {
|
||||
border-spacing: 0 !important;
|
||||
}
|
||||
|
||||
tbody td {
|
||||
|
||||
&.owl-calendar-selected {
|
||||
background-color: $blue;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
&.owl-calendar-invalid {
|
||||
color: #ACACAC;
|
||||
}
|
||||
|
||||
&.owl-calendar-outFocus {
|
||||
color: $grey;
|
||||
}
|
||||
|
||||
&.owl-calendar-hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&:not(.owl-calendar-selected):not(.owl-calendar-invalid):hover {
|
||||
background-color: lighten($blue, 50%);
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owl-years,
|
||||
.owl-months {
|
||||
|
||||
td.owl-year,
|
||||
td.owl-month {
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
width: 72px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.owl-calendar-yearArrow {
|
||||
width: 24px !important;
|
||||
height: 24px !important;
|
||||
|
||||
&.left {
|
||||
left: -16px !important;
|
||||
}
|
||||
|
||||
&.right {
|
||||
right: -16px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.owl-weekdays {
|
||||
|
||||
th.owl-weekday {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
color: rgba(0, 0, 0, 0.37);
|
||||
}
|
||||
}
|
||||
|
||||
.owl-days {
|
||||
|
||||
td.owl-day {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
line-height: 32px;
|
||||
cursor: pointer;
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
|
||||
&.owl-day-today:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 2px;
|
||||
border-top: .5em solid lighten($blue, 20%);
|
||||
border-left: .5em solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owl-timer-wrapper {
|
||||
height: 88px;
|
||||
padding: 8px !important;
|
||||
background-color: rgba(0, 0, 0, 0.06);
|
||||
|
||||
.owl-timer-input {
|
||||
background: none;
|
||||
width: 100% !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.owl-timer-text {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 40%;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.owl-meridian-btn {
|
||||
font-size: .8em;
|
||||
color: $blue;
|
||||
background-image: none;
|
||||
background-color: transparent;
|
||||
border-color: $blue;
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
background-color: $blue;
|
||||
border-color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.owl-timer-divider {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 8px;
|
||||
height: 100%;
|
||||
left: -2px;
|
||||
|
||||
.owl-timer-dot {
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.37);
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
border-radius: 100%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
&.dot-top {
|
||||
top: 40%;
|
||||
}
|
||||
|
||||
&.dot-bottom {
|
||||
bottom: 40%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
.ps {
|
||||
position: relative;
|
||||
|
||||
> .ps__scrollbar-y-rail {
|
||||
z-index: 99999;
|
||||
|
||||
@@ -22,14 +22,15 @@ export class FuseConfigService
|
||||
// Set the default settings
|
||||
this.defaultSettings = {
|
||||
layout : {
|
||||
navigation: 'left', // 'right', 'left', 'top', none
|
||||
toolbar : 'below', // 'above', 'below', none
|
||||
footer : 'none' // 'above', 'below', none
|
||||
navigation: 'left', // 'right', 'left', 'top', 'none'
|
||||
toolbar : 'below', // 'above', 'below', 'none'
|
||||
footer : 'below', // 'above', 'below', 'none'
|
||||
mode : 'fullwidth' // 'boxed', 'fullwidth'
|
||||
},
|
||||
colorClasses : {
|
||||
toolbar: 'md-white-500-bg',
|
||||
navbar : 'md-fuse-dark-500-bg',
|
||||
footer : 'md-fuse-dark-800-bg'
|
||||
footer : 'md-fuse-dark-700-bg'
|
||||
},
|
||||
customScrollbars: true,
|
||||
routerAnimation : 'fadeIn'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, HostBinding, OnInit, OnDestroy } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { Animations } from '../../core/animations';
|
||||
import { fuseAnimations } from '../../core/animations';
|
||||
import { FuseConfigService } from '../../core/services/config.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import 'rxjs/add/operator/filter';
|
||||
@@ -10,13 +10,7 @@ import 'rxjs/add/operator/map';
|
||||
selector : 'fuse-content',
|
||||
templateUrl: './content.component.html',
|
||||
styleUrls : ['./content.component.scss'],
|
||||
animations : [
|
||||
Animations.routerTransitionUp,
|
||||
Animations.routerTransitionDown,
|
||||
Animations.routerTransitionRight,
|
||||
Animations.routerTransitionLeft,
|
||||
Animations.routerTransitionFade
|
||||
]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseContentComponent implements OnInit, OnDestroy
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="page-layout blank p-24" perfect-scrollbar>
|
||||
<div class="page-layout blank p-24" fusePerfectScrollbar>
|
||||
|
||||
<h2>Sample Page</h2>
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
<md-toolbar class="mat-elevation-z1">
|
||||
<span>Footer</span>
|
||||
<md-toolbar>
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="center center" fxLayoutAlign.gt-xs="space-between center" fxFlex>
|
||||
|
||||
<a href="http://themeforest.net/item/fuse-angularjs-material-design-admin-template/12931855?ref=srcn"
|
||||
target="_blank" md-button class="md-pink-bg" fxFlex="0 0 auto" fxLayout="row"
|
||||
fxLayoutAlign="start center">
|
||||
<md-icon class="s-16 mr-sm-4">shopping_cart</md-icon>
|
||||
<span>Purchase FUSE (Angular4+)</span>
|
||||
</a>
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center" fxHide fxShow.gt-xs>
|
||||
<a md-button href="http://fusetheme.com/angular/docs" target="_blank">Documentation</a>
|
||||
<span>•</span>
|
||||
<a md-button href="http://fusetheme.com/angular/changelog" target="_blank">Changelog</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</md-toolbar>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
.mat-toolbar {
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
box-shadow: 0px -1px 1px -1px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.14), 0px -1px 3px 0px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
&.above {
|
||||
|
||||
@@ -8,13 +8,22 @@
|
||||
</ng-container>
|
||||
<!-- / TOOLBAR: Above -->
|
||||
|
||||
<!-- NAVBAR: Top -->
|
||||
<fuse-navbar-horizontal class="top-navbar" fxHide fxShow.gt-md
|
||||
[class]="fuseSettings.colorClasses.navbar"
|
||||
*ngIf="fuseSettings.layout.navigation === 'top'">
|
||||
</fuse-navbar-horizontal>
|
||||
<!-- / NAVBAR: Top -->
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<fuse-navbar [folded]="false"
|
||||
class="left-navbar"
|
||||
*ngIf="fuseSettings.layout.navigation === 'left'"
|
||||
[class]="fuseSettings.colorClasses.navbar">
|
||||
</fuse-navbar>
|
||||
<!-- NAVBAR: Left -->
|
||||
<fuse-navbar-vertical [folded]="false"
|
||||
fxShow [fxHide.gt-md]="fuseSettings.layout.navigation === 'top'"
|
||||
class="left-navbar" [class]="fuseSettings.colorClasses.navbar"
|
||||
*ngIf="fuseSettings.layout.navigation === 'left' || fuseSettings.layout.navigation === 'top'">
|
||||
</fuse-navbar-vertical>
|
||||
<!-- / NAVBAR: Left -->
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
@@ -34,7 +43,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
<fuse-navbar [folded]="false" class="md-primary-700-bg right-navbar" *ngIf="fuseSettings.layout.navigation === 'right'"></fuse-navbar>
|
||||
<!-- NAVBAR: Right -->
|
||||
<fuse-navbar-vertical [folded]="false"
|
||||
class="right-navbar"
|
||||
[class]="fuseSettings.colorClasses.navbar"
|
||||
*ngIf="fuseSettings.layout.navigation === 'right'">
|
||||
</fuse-navbar-vertical>
|
||||
<!-- / NAVBAR: Right -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,17 +6,10 @@ fuse-main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&.disable-perfect-scrollbar {
|
||||
|
||||
.ps {
|
||||
-webkit-overflow-scrolling: touch !important;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
.ps__scrollbar-x-rail,
|
||||
.ps__scrollbar-y-rail {
|
||||
display: none !important;
|
||||
}
|
||||
&.boxed {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
@include mat-elevation(8);
|
||||
}
|
||||
|
||||
> .mat-sidenav-container {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Component, ElementRef, HostBinding, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, ElementRef, HostBinding, Inject, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { FuseConfigService } from '../core/services/config.service';
|
||||
import { Platform } from '@angular/cdk/platform';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-main',
|
||||
@@ -12,12 +14,14 @@ export class FuseMainComponent implements OnInit, OnDestroy
|
||||
{
|
||||
onSettingsChanged: Subscription;
|
||||
fuseSettings: any;
|
||||
@HostBinding('class.disable-perfect-scrollbar') disableCustomScrollbars;
|
||||
@HostBinding('class.boxed') boxed;
|
||||
|
||||
constructor(
|
||||
private _renderer: Renderer2,
|
||||
private _elementRef: ElementRef,
|
||||
private fuseConfig: FuseConfigService
|
||||
private fuseConfig: FuseConfigService,
|
||||
private platform: Platform,
|
||||
@Inject(DOCUMENT) private document: any
|
||||
)
|
||||
{
|
||||
this.onSettingsChanged =
|
||||
@@ -25,9 +29,14 @@ export class FuseMainComponent implements OnInit, OnDestroy
|
||||
.subscribe(
|
||||
(newSettings) => {
|
||||
this.fuseSettings = newSettings;
|
||||
this.disableCustomScrollbars = !this.fuseSettings.customScrollbars;
|
||||
this.boxed = this.fuseSettings.layout.mode === 'boxed';
|
||||
}
|
||||
);
|
||||
|
||||
if ( this.platform.ANDROID || this.platform.IOS )
|
||||
{
|
||||
this.document.body.className += ' is-mobile';
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
|
||||
@@ -6,10 +6,11 @@ import { SharedModule } from '../core/modules/shared.module';
|
||||
import { FuseMainComponent } from './main.component';
|
||||
import { FuseContentComponent } from './content/content.component';
|
||||
import { FuseFooterComponent } from './footer/footer.component';
|
||||
import { FuseNavbarComponent } from './navbar/navbar.component';
|
||||
import { FuseNavbarVerticalComponent } from './navbar/vertical/navbar-vertical.component';
|
||||
import { FuseToolbarComponent } from './toolbar/toolbar.component';
|
||||
import { FuseNavigationModule } from '../core/components/navigation/navigation.module';
|
||||
import { FuseNavbarToggleDirective } from './navbar/navbar-toggle.directive';
|
||||
import { FuseNavbarVerticalToggleDirective } from './navbar/vertical/navbar-vertical-toggle.directive';
|
||||
import { FuseNavbarHorizontalComponent } from './navbar/horizontal/navbar-horizontal.component';
|
||||
import { FuseQuickPanelComponent } from './quick-panel/quick-panel.component';
|
||||
import { FuseThemeOptionsComponent } from '../core/components/theme-options/theme-options.component';
|
||||
import { FuseShortcutsModule } from '../core/components/shortcuts/shortcuts.module';
|
||||
@@ -20,9 +21,10 @@ import { FuseSearchBarModule } from '../core/components/search-bar/search-bar.mo
|
||||
FuseContentComponent,
|
||||
FuseFooterComponent,
|
||||
FuseMainComponent,
|
||||
FuseNavbarComponent,
|
||||
FuseNavbarVerticalComponent,
|
||||
FuseNavbarHorizontalComponent,
|
||||
FuseToolbarComponent,
|
||||
FuseNavbarToggleDirective,
|
||||
FuseNavbarVerticalToggleDirective,
|
||||
FuseThemeOptionsComponent,
|
||||
FuseQuickPanelComponent
|
||||
],
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<fuse-navigation layout="horizontal"></fuse-navigation>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-navbar-horizontal',
|
||||
templateUrl : './navbar-horizontal.component.html',
|
||||
styleUrls : ['./navbar-horizontal.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FuseNavbarHorizontalComponent implements OnInit
|
||||
{
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
import { Directive, HostListener, Input } from '@angular/core';
|
||||
import { FuseNavbarService } from './navbar.service';
|
||||
import { FuseNavbarComponent } from './navbar.component';
|
||||
|
||||
@Directive({
|
||||
selector: '[fuseNavbar]'
|
||||
})
|
||||
export class FuseNavbarToggleDirective
|
||||
{
|
||||
@Input() fuseNavbar: string;
|
||||
navbar: FuseNavbarComponent;
|
||||
|
||||
constructor(private navbarService: FuseNavbarService)
|
||||
{
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
onClick()
|
||||
{
|
||||
this.navbar = this.navbarService.getNavBar();
|
||||
|
||||
if ( !this.navbar[this.fuseNavbar] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.navbar[this.fuseNavbar]();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Directive, HostListener, Input } from '@angular/core';
|
||||
import { FuseNavbarVerticalService } from './navbar-vertical.service';
|
||||
import { FuseNavbarVerticalComponent } from './navbar-vertical.component';
|
||||
|
||||
@Directive({
|
||||
selector: '[fuseNavbarVertical]'
|
||||
})
|
||||
export class FuseNavbarVerticalToggleDirective
|
||||
{
|
||||
@Input() fuseNavbarVertical: string;
|
||||
navbar: FuseNavbarVerticalComponent;
|
||||
|
||||
constructor(private navbarService: FuseNavbarVerticalService)
|
||||
{
|
||||
}
|
||||
|
||||
@HostListener('click')
|
||||
onClick()
|
||||
{
|
||||
this.navbar = this.navbarService.getNavBar();
|
||||
|
||||
if ( !this.navbar[this.fuseNavbarVertical] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.navbar[this.fuseNavbarVertical]();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
<div class="navbar-header">
|
||||
|
||||
<div class="logo">
|
||||
<span class="logo-icon">F</span>
|
||||
<img class="logo-icon" src="assets/images/logos/fuse.svg">
|
||||
<span class="logo-text">FUSE</span>
|
||||
</div>
|
||||
|
||||
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="toggleFold" fxHide.lt-lg>
|
||||
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbarVertical="toggleFold" fxHide.lt-lg>
|
||||
<md-icon>menu</md-icon>
|
||||
</button>
|
||||
|
||||
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="closeBar" fxHide.gt-md>
|
||||
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbarVertical="closeBar" fxHide.gt-md>
|
||||
<md-icon>arrow_back</md-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navbar-content" perfect-scrollbar>
|
||||
<fuse-navigation></fuse-navigation>
|
||||
<div class="navbar-content" fusePerfectScrollbar>
|
||||
<fuse-navigation layout="vertical"></fuse-navigation>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "../../core/scss/fuse";
|
||||
@import "../../../core/scss/fuse";
|
||||
|
||||
fuse-main {
|
||||
|
||||
@@ -23,7 +23,7 @@ fuse-main {
|
||||
}
|
||||
}
|
||||
|
||||
fuse-navbar {
|
||||
fuse-navbar-vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 256px;
|
||||
@@ -32,7 +32,7 @@ fuse-navbar {
|
||||
background-color: #FFFFFF;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
z-index: 3;
|
||||
z-index: 4;
|
||||
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
|
||||
transition: all .3s cubic-bezier(.55, 0, .55, .2), width .1s linear, min-width .1s linear, max-width .1s linear;
|
||||
transform: translateX(0);
|
||||
@@ -45,6 +45,7 @@ fuse-navbar {
|
||||
&.left-navbar {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&.right-navbar {
|
||||
right: 0;
|
||||
}
|
||||
@@ -55,40 +56,50 @@ fuse-navbar {
|
||||
max-width: 64px;
|
||||
|
||||
.navbar-header {
|
||||
padding: 0 16px 0 16px;
|
||||
padding: 0 13px;
|
||||
|
||||
.logo {
|
||||
|
||||
.logo-text {
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.folded-open {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&.close {
|
||||
box-shadow: none;
|
||||
|
||||
&.left-navbar {
|
||||
transform: translateX(-100%) !important;
|
||||
}
|
||||
|
||||
&.right-navbar {
|
||||
transform: translateX(100%) !important;
|
||||
}
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@include media-breakpoint('lt-lg') {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
||||
&.left-navbar {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&.right-navbar {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
&:not(.initialized) {
|
||||
|
||||
&.left-navbar {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
&.right-navbar {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
@@ -111,22 +122,14 @@ fuse-navbar {
|
||||
align-items: center;
|
||||
|
||||
.logo-icon {
|
||||
display: block;
|
||||
background: #039BE5;
|
||||
width: 32px;
|
||||
min-width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
border-radius: 2px;
|
||||
width: 38px;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
margin-left: 16px;
|
||||
font-size: 16px;
|
||||
margin-left: 8px;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
letter-spacing: 0.4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,3 +138,14 @@ fuse-navbar {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.fuse-navbar-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -1,45 +1,51 @@
|
||||
import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, ElementRef, HostBinding, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { FuseMatchMedia } from '../../core/services/match-media.service';
|
||||
import { FuseNavbarService } from './navbar.service';
|
||||
import { FuseMatchMedia } from '../../../core/services/match-media.service';
|
||||
import { FuseNavbarVerticalService } from './navbar-vertical.service';
|
||||
import { ObservableMedia } from '@angular/flex-layout';
|
||||
import { FuseMainComponent } from '../main.component';
|
||||
import { FuseMainComponent } from '../../main.component';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||
import { FuseNavigationService } from '../../core/components/navigation/navigation.service';
|
||||
import { FuseNavigationService } from '../../../core/components/navigation/navigation.service';
|
||||
import { FusePerfectScrollbarDirective } from '../../../core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive';
|
||||
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-navbar',
|
||||
templateUrl : './navbar.component.html',
|
||||
styleUrls : ['./navbar.component.scss'],
|
||||
selector : 'fuse-navbar-vertical',
|
||||
templateUrl : './navbar-vertical.component.html',
|
||||
styleUrls : ['./navbar-vertical.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FuseNavbarComponent implements OnInit, OnDestroy
|
||||
export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
|
||||
{
|
||||
private _backdropElement: HTMLElement | null = null;
|
||||
@HostBinding('class.close') isClosed: boolean;
|
||||
@HostBinding('class.folded') isFoldedActive: boolean;
|
||||
@HostBinding('class.folded-open') isFoldedOpen: boolean;
|
||||
@HostBinding('class.initialized') initialized: boolean;
|
||||
@Input('folded') foldedByDefault = false;
|
||||
@ViewChild(PerfectScrollbarDirective) perfectScrollbarDirective;
|
||||
@ViewChild(FusePerfectScrollbarDirective) fusePerfectScrollbarDirective;
|
||||
|
||||
matchMediaWatcher: Subscription;
|
||||
|
||||
player: AnimationPlayer;
|
||||
|
||||
constructor(
|
||||
private fuseMainComponentEl: FuseMainComponent,
|
||||
private fuseMainComponent: FuseMainComponent,
|
||||
private fuseMatchMedia: FuseMatchMedia,
|
||||
private fuseNavigationService: FuseNavigationService,
|
||||
private navBarService: FuseNavbarService,
|
||||
private navBarService: FuseNavbarVerticalService,
|
||||
public media: ObservableMedia,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
private _renderer: Renderer2,
|
||||
private _elementRef: ElementRef,
|
||||
private animationBuilder: AnimationBuilder
|
||||
)
|
||||
{
|
||||
navBarService.setNavBar(this);
|
||||
|
||||
this.fuseNavigationService.onNavCollapseToggled.subscribe(() => {
|
||||
|
||||
this.fuseNavigationService.onNavCollapseToggle.subscribe(() => {
|
||||
setTimeout(() => {
|
||||
this.perfectScrollbarDirective.update();
|
||||
this.fusePerfectScrollbarDirective.update();
|
||||
}, 310);
|
||||
});
|
||||
|
||||
@@ -56,6 +62,7 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
||||
else
|
||||
{
|
||||
this.openBar();
|
||||
this._detachBackdrop();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -109,12 +116,17 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
||||
{
|
||||
this.isClosed = false;
|
||||
this.updateCssClasses();
|
||||
if ( this.media.isActive('lt-lg') )
|
||||
{
|
||||
this._attachBackdrop();
|
||||
}
|
||||
}
|
||||
|
||||
closeBar()
|
||||
{
|
||||
this.isClosed = true;
|
||||
this.updateCssClasses();
|
||||
this._detachBackdrop();
|
||||
}
|
||||
|
||||
toggleBar()
|
||||
@@ -144,14 +156,14 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
||||
activateFolded()
|
||||
{
|
||||
this.isFoldedActive = true;
|
||||
this.fuseMainComponentEl.addClass('fuse-nav-bar-folded');
|
||||
this.fuseMainComponent.addClass('fuse-nav-bar-folded');
|
||||
this.isFoldedOpen = false;
|
||||
}
|
||||
|
||||
deActivateFolded()
|
||||
{
|
||||
this.isFoldedActive = false;
|
||||
this.fuseMainComponentEl.removeClass('fuse-nav-bar-folded');
|
||||
this.fuseMainComponent.removeClass('fuse-nav-bar-folded');
|
||||
this.isFoldedOpen = false;
|
||||
}
|
||||
|
||||
@@ -171,13 +183,56 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
|
||||
{
|
||||
if ( this.isClosed )
|
||||
{
|
||||
this.fuseMainComponentEl.addClass('fuse-nav-bar-opened');
|
||||
this.fuseMainComponentEl.removeClass('fuse-nav-bar-closed');
|
||||
this.fuseMainComponent.addClass('fuse-nav-bar-opened');
|
||||
this.fuseMainComponent.removeClass('fuse-nav-bar-closed');
|
||||
}
|
||||
else
|
||||
{
|
||||
this.fuseMainComponentEl.addClass('fuse-nav-bar-closed');
|
||||
this.fuseMainComponentEl.removeClass('fuse-nav-bar-opened');
|
||||
this.fuseMainComponent.addClass('fuse-nav-bar-closed');
|
||||
this.fuseMainComponent.removeClass('fuse-nav-bar-opened');
|
||||
}
|
||||
}
|
||||
|
||||
private _attachBackdrop()
|
||||
{
|
||||
this._backdropElement = this._renderer.createElement('div');
|
||||
this._backdropElement.classList.add('fuse-navbar-backdrop');
|
||||
|
||||
this._renderer.appendChild(this._elementRef.nativeElement.parentElement, this._backdropElement);
|
||||
|
||||
this.player =
|
||||
this.animationBuilder
|
||||
.build([
|
||||
animate('400ms ease', style({opacity: 1}))
|
||||
]).create(this._backdropElement);
|
||||
|
||||
this.player.play();
|
||||
|
||||
this._backdropElement.addEventListener('click', () => {
|
||||
this.closeBar();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private _detachBackdrop()
|
||||
{
|
||||
if ( this._backdropElement )
|
||||
{
|
||||
this.player =
|
||||
this.animationBuilder
|
||||
.build([
|
||||
animate('400ms cubic-bezier(.25,.8,.25,1)', style({opacity: 0}))
|
||||
]).create(this._backdropElement);
|
||||
|
||||
this.player.play();
|
||||
|
||||
this.player.onDone(() => {
|
||||
if ( this._backdropElement )
|
||||
{
|
||||
this._backdropElement.parentNode.removeChild(this._backdropElement);
|
||||
this._backdropElement = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable()
|
||||
export class FuseNavbarService
|
||||
export class FuseNavbarVerticalService
|
||||
{
|
||||
navBarRef;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<md-list class="date">
|
||||
<md-list class="date" cdk-focus-region-start>
|
||||
|
||||
<h3 md-subheader>
|
||||
<h3 md-subheader cdk-focus-init>
|
||||
<span>Today</span>
|
||||
</h3>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</md-list>
|
||||
|
||||
<md-divider></md-divider>
|
||||
<md-divider cdk-focus-region-end></md-divider>
|
||||
|
||||
<md-list>
|
||||
<h3 md-subheader>
|
||||
@@ -24,19 +24,22 @@
|
||||
</h3>
|
||||
|
||||
<md-list-item>
|
||||
<md-slide-toggle fxFlex class="mat-primary" [(ngModel)]="settings.notify" aria-label="Notifications" labelPosition="before">
|
||||
<md-slide-toggle fxFlex class="mat-primary" [(ngModel)]="settings.notify" aria-label="Notifications"
|
||||
labelPosition="before">
|
||||
<h3>Notifications</h3>
|
||||
</md-slide-toggle>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item>
|
||||
<md-slide-toggle fxFlex class="mat-accent" [(ngModel)]="settings.cloud" aria-label="Cloud" labelPosition="before">
|
||||
<md-slide-toggle fxFlex class="mat-accent" [(ngModel)]="settings.cloud" aria-label="Cloud"
|
||||
labelPosition="before">
|
||||
<h3>Cloud Sync</h3>
|
||||
</md-slide-toggle>
|
||||
</md-list-item>
|
||||
|
||||
<md-list-item>
|
||||
<md-slide-toggle fxFlex class="mat-warn" [(ngModel)]="settings.retro" aria-label="Retro Thrusters" labelPosition="before">
|
||||
<md-slide-toggle fxFlex class="mat-warn" [(ngModel)]="settings.retro" aria-label="Retro Thrusters"
|
||||
labelPosition="before">
|
||||
<h3>Retro Thrusters</h3>
|
||||
</md-slide-toggle>
|
||||
</md-list-item>
|
||||
|
||||
@@ -4,24 +4,23 @@
|
||||
|
||||
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="openBar" fxHide.gt-md>
|
||||
<button md-button class="toggle-button-navbar mat-icon-button"
|
||||
fuseNavbarVertical="openBar" fxHide.gt-md>
|
||||
<md-icon>menu</md-icon>
|
||||
</button>
|
||||
|
||||
<div class="toolbar-separator" fxHide.gt-md></div>
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center" *ngIf="horizontalNav">
|
||||
<div class="logo ml-16">
|
||||
<img class="logo-icon" src="assets/images/logos/fuse.svg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-8 px-md-16">
|
||||
<fuse-shortcuts></fuse-shortcuts>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-separator"></div>
|
||||
|
||||
<a href="http://themeforest.net/item/fuse-angularjs-material-design-admin-template/12931855?ref=srcn"
|
||||
target="_blank" md-raised-button class="ml-8 ml-sm-24 md-pink-bg" fxFlex="0 0 auto" fxLayout="row"
|
||||
fxLayoutAlign="start center" fxHide fxShow.gt-xs>
|
||||
<md-icon class="s-16 mr-sm-4">shopping_cart</md-icon>
|
||||
<span fxHide fxShow.gt-xs>Purchase Fuse template (Angular4+)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="" fxFlex="0 1 auto" fxLayout="row" fxLayoutAlign="start center">
|
||||
@@ -80,7 +79,7 @@
|
||||
</button>
|
||||
</md-menu>
|
||||
|
||||
<div class="toolbar-separator"></div>
|
||||
<div class="toolbar-separator" fxHide fxShow.gt-xs></div>
|
||||
|
||||
<button md-icon-button
|
||||
class="mat-icon-button quick-panel-toggle-button"
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.logo-icon {
|
||||
width: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
import { FuseConfigService } from '../../core/services/config.service';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-toolbar',
|
||||
@@ -13,8 +14,12 @@ export class FuseToolbarComponent
|
||||
languages: any;
|
||||
selectedLanguage: any;
|
||||
showSpinner: boolean;
|
||||
horizontalNav: boolean;
|
||||
|
||||
constructor(private router: Router)
|
||||
constructor(
|
||||
private router: Router,
|
||||
private fuseConfig: FuseConfigService
|
||||
)
|
||||
{
|
||||
this.userStatusOptions = [
|
||||
{
|
||||
@@ -75,6 +80,11 @@ export class FuseToolbarComponent
|
||||
this.showSpinner = false;
|
||||
}
|
||||
});
|
||||
|
||||
this.fuseConfig.onSettingsChanged.subscribe((settings) => {
|
||||
this.horizontalNav = settings.layout.navigation === 'top';
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
search(value)
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
export class FuseNavigation
|
||||
export class NavigationModel
|
||||
{
|
||||
public items: any[];
|
||||
public model: any[];
|
||||
|
||||
constructor()
|
||||
{
|
||||
this.items = [
|
||||
this.model = [
|
||||
{
|
||||
'title': 'APPS',
|
||||
'type' : 'subheader'
|
||||
},
|
||||
{
|
||||
'title': 'Sample',
|
||||
'type' : 'nav-item',
|
||||
'icon' : 'email',
|
||||
'url' : '/sample',
|
||||
'badge': {
|
||||
'title': 25,
|
||||
'bg' : '#F44336',
|
||||
'fg' : '#FFFFFF'
|
||||
}
|
||||
'title': 'Applications',
|
||||
'type' : 'group',
|
||||
'children': [
|
||||
{
|
||||
'title': 'Sample',
|
||||
'type' : 'item',
|
||||
'icon' : 'email',
|
||||
'url' : '/sample',
|
||||
'badge': {
|
||||
'title': 25,
|
||||
'bg' : '#F44336',
|
||||
'fg' : '#FFFFFF'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
1127
src/assets/images/logos/fuse.svg
Normal file
1127
src/assets/images/logos/fuse.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 110 KiB |
4
src/environments/environment.hmr.ts
Normal file
4
src/environments/environment.hmr.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
hmr: true
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
production: true,
|
||||
hmr: false
|
||||
};
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
production: false,
|
||||
hmr: false
|
||||
};
|
||||
|
||||
BIN
src/favicon.ico
BIN
src/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
15
src/hmr.ts
Normal file
15
src/hmr.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { NgModuleRef, ApplicationRef } from '@angular/core';
|
||||
import { createNewHosts } from '@angularclass/hmr';
|
||||
|
||||
export const hmrBootstrap = (module: any, bootstrap: () => Promise<NgModuleRef<any>>) => {
|
||||
let ngModule: NgModuleRef<any>;
|
||||
module.hot.accept();
|
||||
bootstrap().then(mod => ngModule = mod);
|
||||
module.hot.dispose(() => {
|
||||
const appRef: ApplicationRef = ngModule.injector.get(ApplicationRef);
|
||||
const elements = appRef.components.map(c => c.location.nativeElement);
|
||||
const makeVisible = createNewHosts(elements);
|
||||
ngModule.destroy();
|
||||
makeVisible();
|
||||
});
|
||||
};
|
||||
@@ -3,11 +3,14 @@
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>Fuse2</title>
|
||||
<title>Fuse2 - Angular 4+ Material Design Admin Template</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="Material design admin template with pre-built apps and pages">
|
||||
<meta name="keywords" content="HTML,CSS,AngularJS,Angular,Angular 4,Angular 5,Angular 6, Material">
|
||||
<meta name="author" content="Withinpixels">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
@@ -37,17 +40,12 @@
|
||||
}
|
||||
|
||||
#fuse-splash-screen .logo {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
line-height: 96px;
|
||||
width: 128px;
|
||||
margin: 0 auto;
|
||||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
|
||||
font-size: 56px;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
background-color: #039BE5;
|
||||
color: #FFFFFF;
|
||||
box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
#fuse-splash-screen .logo img {
|
||||
filter: drop-shadow(0px 10px 6px rgba(0, 0, 0, 0.2))
|
||||
}
|
||||
|
||||
#fuse-splash-screen .spinner-wrapper {
|
||||
@@ -183,7 +181,7 @@
|
||||
<!-- / FUSE Splash Screen CSS -->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body class="primary-800-bg">
|
||||
|
||||
<!-- FUSE Splash Screen -->
|
||||
<fuse-splash-screen id="fuse-splash-screen">
|
||||
@@ -191,7 +189,7 @@
|
||||
<div class="center">
|
||||
|
||||
<div class="logo">
|
||||
<span>F</span>
|
||||
<img width="128" src="assets/images/logos/fuse.svg">
|
||||
</div>
|
||||
|
||||
<!-- Material Design Spinner -->
|
||||
|
||||
20
src/main.ts
20
src/main.ts
@@ -3,10 +3,28 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
import { hmrBootstrap } from './hmr';
|
||||
|
||||
if ( environment.production )
|
||||
{
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
const bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
if ( environment.hmr )
|
||||
{
|
||||
if ( module['hot'] )
|
||||
{
|
||||
hmrBootstrap(module, bootstrap);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.error('HMR is not enabled for webpack-dev-server!');
|
||||
console.log('Are you using the --hmr flag for ng serve?');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bootstrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user