mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-12-22 16:27:08 +00:00
Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f800dc3286 | ||
|
|
619433f101 | ||
|
|
3e9ae83aae | ||
|
|
9400c3d748 | ||
|
|
5e4940fed9 | ||
|
|
8910e6f5dc | ||
|
|
52c5e6a18b | ||
|
|
3d9ded9a44 | ||
|
|
1be3f0066b | ||
|
|
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 | ||
|
|
2c0fc76b8a | ||
|
|
752660f5dc |
@@ -9,6 +9,7 @@
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"app/main/content/components/angular-material",
|
||||
"favicon.ico"
|
||||
],
|
||||
"index": "index.html",
|
||||
@@ -25,6 +26,7 @@
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
"dev": "environments/environment.ts",
|
||||
"hmr": "environments/environment.hmr.ts",
|
||||
"prod": "environments/environment.prod.ts"
|
||||
}
|
||||
}
|
||||
|
||||
2135
package-lock.json
generated
2135
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
76
package.json
76
package.json
@@ -1,34 +1,38 @@
|
||||
{
|
||||
"name": "fuse2",
|
||||
"version": "1.0.5",
|
||||
"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",
|
||||
"angular2-markdown": "1.6.0",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"core-js": "2.5.0",
|
||||
"d3": "4.10.0",
|
||||
@@ -39,32 +43,34 @@
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'hammerjs';
|
||||
import { SharedModule } from './core/modules/shared.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { ProjectModule } from './main/content/apps/dashboards/project/project.module';
|
||||
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
||||
import { FuseFakeDbService } from './fuse-fake-db/fuse-fake-db.service';
|
||||
import { FuseMainModule } from './main/main.module';
|
||||
import { PagesModule } from './main/content/pages/pages.module';
|
||||
@@ -17,8 +16,11 @@ import { UIModule } from './main/content/ui/ui.module';
|
||||
import { ComponentsModule } from './main/content/components/components.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 { ComponentsThirdPartyModule } from './main/content/components-third-party/components-third-party.module';
|
||||
import { ServicesModule } from './main/content/services/services.module';
|
||||
import { FuseAngularMaterialModule } from './main/content/components/angular-material/angular-material.module';
|
||||
import { MarkdownModule } from 'angular2-markdown';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
@@ -66,10 +68,12 @@ const appRoutes: Routes = [
|
||||
BrowserAnimationsModule,
|
||||
RouterModule.forRoot(appRoutes),
|
||||
SharedModule,
|
||||
MarkdownModule.forRoot(),
|
||||
|
||||
InMemoryWebApiModule.forRoot(FuseFakeDbService, {delay: 0}),
|
||||
|
||||
PerfectScrollbarModule.forRoot(),
|
||||
InMemoryWebApiModule.forRoot(FuseFakeDbService, {
|
||||
delay : 0,
|
||||
passThruUnknownUrl: true
|
||||
}),
|
||||
|
||||
FuseMainModule,
|
||||
|
||||
@@ -79,11 +83,13 @@ const appRoutes: Routes = [
|
||||
UIModule,
|
||||
ServicesModule,
|
||||
ComponentsModule,
|
||||
FuseAngularMaterialModule,
|
||||
ComponentsThirdPartyModule
|
||||
],
|
||||
providers : [
|
||||
FuseSplashScreenService,
|
||||
FuseConfigService
|
||||
FuseConfigService,
|
||||
FuseNavigationService
|
||||
],
|
||||
bootstrap : [
|
||||
AppComponent
|
||||
|
||||
@@ -1,10 +1,56 @@
|
||||
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 fadeInOut = trigger('fadeInOut', [
|
||||
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
|
||||
@@ -15,9 +61,9 @@ export class Animations
|
||||
})),
|
||||
transition('1 => 0', animate('300ms ease-out')),
|
||||
transition('0 => 1', animate('300ms ease-in'))
|
||||
]);
|
||||
]),
|
||||
|
||||
public static slideInOut = trigger('slideInOut', [
|
||||
trigger('slideInOut', [
|
||||
state('0', style({
|
||||
height : '0px',
|
||||
display: 'none'
|
||||
@@ -28,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'
|
||||
@@ -41,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'
|
||||
@@ -54,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'
|
||||
@@ -67,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%)',
|
||||
@@ -81,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', [
|
||||
@@ -108,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
|
||||
@@ -116,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
|
||||
@@ -127,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', [
|
||||
@@ -154,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
|
||||
@@ -162,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
|
||||
@@ -173,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', [
|
||||
@@ -193,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', [
|
||||
@@ -246,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
|
||||
@@ -254,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
|
||||
@@ -265,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({
|
||||
@@ -280,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
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
<div class="{{fuseSettings.colorClasses.navbar}}">
|
||||
|
||||
<ng-container *ngFor="let item of item.children">
|
||||
<fuse-nav-horizontal-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-horizontal-item>
|
||||
<fuse-nav-horizontal-collapse *ngIf="item.type=='nav-collapse'"
|
||||
[item]="item"></fuse-nav-horizontal-collapse>
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core';
|
||||
import { Animations } from '../../../../animations';
|
||||
import { fuseAnimations } from '../../../../animations';
|
||||
import { FuseConfigService } from '../../../../services/config.service';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Subscription } from 'rxjs/Subscription';
|
||||
selector : 'fuse-nav-horizontal-collapse',
|
||||
templateUrl: './nav-horizontal-collapse.component.html',
|
||||
styleUrls : ['./nav-horizontal-collapse.component.scss'],
|
||||
animations : [Animations.slideInOut]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseNavHorizontalCollapseComponent implements OnDestroy
|
||||
{
|
||||
|
||||
@@ -1,27 +1,32 @@
|
||||
<div id="main-navigation" class="nav" [ngClass]="{'horizontal':layout === 'horizontal'}">
|
||||
<div id="main-navigation" class="nav"
|
||||
[ngClass]="{'horizontal':layout === 'horizontal', 'vertical':layout === 'vertical'}">
|
||||
|
||||
<!-- Vertical Navigation Layout -->
|
||||
<ng-container *ngIf="layout === 'vertical'">
|
||||
|
||||
<ng-container *ngFor="let item of verticalNavigation">
|
||||
<ng-container *ngFor="let item of navigationModel">
|
||||
|
||||
<fuse-nav-vertical-subheader *ngIf="item.type=='subheader'" [item]="item"></fuse-nav-vertical-subheader>
|
||||
<fuse-nav-vertical-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-vertical-item>
|
||||
<fuse-nav-vertical-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-vertical-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 horizontalNavigation">
|
||||
<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>
|
||||
<fuse-nav-horizontal-collapse *ngIf="item.type=='nav-collapse'"
|
||||
[item]="item"></fuse-nav-horizontal-collapse>
|
||||
|
||||
</ng-container>
|
||||
|
||||
</ng-container>
|
||||
<!-- / Horizontal Navigation Layout -->
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Component, Input, 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,17 +8,25 @@ import { FuseNavigationService } from './navigation.service';
|
||||
styleUrls : ['./navigation.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class FuseNavigationComponent
|
||||
export class FuseNavigationComponent implements OnDestroy
|
||||
{
|
||||
verticalNavigation: any[];
|
||||
horizontalNavigation: any[];
|
||||
navigationModel: any[];
|
||||
navigationModelChangeSubscription: Subscription;
|
||||
|
||||
@Input('layout') layout = 'vertical';
|
||||
|
||||
constructor(private navigationService: FuseNavigationService)
|
||||
constructor(private fuseNavigationService: FuseNavigationService)
|
||||
{
|
||||
this.verticalNavigation = navigationService.getNavigation('verticalNavItems');
|
||||
this.horizontalNavigation = navigationService.getNavigation('horizontalNavItems');
|
||||
this.navigationModelChangeSubscription =
|
||||
this.fuseNavigationService.onNavigationModelChange
|
||||
.subscribe((navigationModel) => {
|
||||
this.navigationModel = navigationModel;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy()
|
||||
{
|
||||
this.navigationModelChangeSubscription.unsubscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { RouterModule } from '@angular/router';
|
||||
import { FuseNavigationComponent } from './navigation.component';
|
||||
import { FuseNavVerticalItemComponent } from './vertical/nav-item/nav-vertical-item.component';
|
||||
import { FuseNavVerticalCollapseComponent } from './vertical/nav-collapse/nav-vertical-collapse.component';
|
||||
import { FuseNavVerticalSubheaderComponent } from './vertical/nav-subheader/nav-vertical-subheader.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';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { FuseNavHorizontalCollapseComponent } from './horizontal/nav-collapse/na
|
||||
],
|
||||
declarations: [
|
||||
FuseNavigationComponent,
|
||||
FuseNavVerticalSubheaderComponent,
|
||||
FuseNavVerticalGroupComponent,
|
||||
FuseNavVerticalItemComponent,
|
||||
FuseNavVerticalCollapseComponent,
|
||||
FuseNavHorizontalItemComponent,
|
||||
|
||||
@@ -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: FuseNavigation;
|
||||
onNavigationModelChange: BehaviorSubject<any> = new BehaviorSubject({});
|
||||
navigationModel: NavigationModel;
|
||||
flatNavigation: any[] = [];
|
||||
|
||||
constructor()
|
||||
{
|
||||
this.navigation = new FuseNavigation();
|
||||
this.navigationModel = new NavigationModel();
|
||||
this.onNavigationModelChange.next(this.navigationModel.model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get navigation array
|
||||
* Get navigation model
|
||||
* @returns {any[]}
|
||||
*/
|
||||
getNavigation(item)
|
||||
getNavigationModel()
|
||||
{
|
||||
return this.navigation[item];
|
||||
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-vertical-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-vertical-item>
|
||||
<fuse-nav-vertical-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-vertical-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>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { Component, HostBinding, Input, OnInit } from '@angular/core';
|
||||
import { FuseNavigationService } from '../../navigation.service';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { Animations } from '../../../../animations';
|
||||
import { fuseAnimations } from '../../../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-nav-vertical-collapse',
|
||||
templateUrl: './nav-vertical-collapse.component.html',
|
||||
styleUrls : ['./nav-vertical-collapse.component.scss'],
|
||||
animations : [Animations.slideInOut]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
{
|
||||
@@ -15,21 +15,20 @@ export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
@HostBinding('class') classes = 'nav-collapse nav-item';
|
||||
@HostBinding('class.open') public isOpen = false;
|
||||
|
||||
constructor(private navigationService: FuseNavigationService, private router: Router)
|
||||
constructor(
|
||||
private navigationService: FuseNavigationService,
|
||||
private router: Router
|
||||
)
|
||||
{
|
||||
/**
|
||||
* When navigation changed
|
||||
*/
|
||||
// Listen for route changes
|
||||
router.events.subscribe(
|
||||
(event) => {
|
||||
if ( event instanceof NavigationEnd )
|
||||
{
|
||||
/**
|
||||
* Check if the url is child of the collapse
|
||||
*/
|
||||
// Check if the url can be found in
|
||||
// one of the children of this item
|
||||
if ( this.isUrlInChildren(this.item, event.urlAfterRedirects) )
|
||||
{
|
||||
// console.log(this.item);
|
||||
this.expand();
|
||||
}
|
||||
else
|
||||
@@ -40,47 +39,54 @@ export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 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 )
|
||||
// Listen for collapsing of any navigation item
|
||||
this.navigationService.onNavCollapseToggled
|
||||
.subscribe(
|
||||
(clickedItem) => {
|
||||
if ( clickedItem && clickedItem.children )
|
||||
{
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* If collapsed item is not related with this collapse
|
||||
* collapse
|
||||
*/
|
||||
if ( this.item !== clickedItem )
|
||||
{
|
||||
this.collapse();
|
||||
// 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
|
||||
* 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
|
||||
* Expand the collapsable navigation
|
||||
*/
|
||||
expand()
|
||||
{
|
||||
@@ -88,11 +94,13 @@ export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.isOpen = true;
|
||||
this.navigationService.onNavCollapseToggle.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapse
|
||||
* Collapse the collapsable navigation
|
||||
*/
|
||||
collapse()
|
||||
{
|
||||
@@ -101,32 +109,64 @@ export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
return;
|
||||
}
|
||||
this.isOpen = false;
|
||||
this.navigationService.onNavCollapseToggle.emit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking the url is in children
|
||||
* @param arr
|
||||
* @param url
|
||||
* @returns {any}
|
||||
* Check if the given parent has the
|
||||
* given item in one of its children
|
||||
*
|
||||
* @param parent
|
||||
* @param item
|
||||
* @return {any}
|
||||
*/
|
||||
isUrlInChildren(arr, url)
|
||||
isChildrenOf(parent, item)
|
||||
{
|
||||
if ( !arr.children )
|
||||
if ( !parent.children )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( let i = 0; i < arr.children.length; i++ )
|
||||
if ( parent.children.indexOf(item) !== -1 )
|
||||
{
|
||||
if ( arr.children[i].children )
|
||||
return true;
|
||||
}
|
||||
|
||||
for ( const children of parent.children )
|
||||
{
|
||||
if ( children.children )
|
||||
{
|
||||
if ( this.isUrlInChildren(arr.children[i], url) )
|
||||
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 ( arr.children[i].url === url )
|
||||
if ( parent.children[i].url === url )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -135,11 +175,6 @@ export class FuseNavVerticalCollapseComponent implements OnInit
|
||||
return false;
|
||||
}
|
||||
|
||||
public isCollapsed(): boolean
|
||||
{
|
||||
return this.isOpen;
|
||||
}
|
||||
|
||||
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 +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-vertical-subheader',
|
||||
templateUrl: './nav-vertical-subheader.component.html',
|
||||
styleUrls : ['./nav-vertical-subheader.component.scss']
|
||||
})
|
||||
export class FuseNavVerticalSubheaderComponent implements OnInit
|
||||
{
|
||||
@HostBinding('class') classes = 'nav-subheader';
|
||||
@Input() item: any;
|
||||
|
||||
constructor()
|
||||
{
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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">
|
||||
|
||||
@@ -4,103 +4,95 @@
|
||||
|
||||
<div class="theme-options-panel-overlay" #overlay [fxHide]="barClosed" [@fadeInOut]="!barClosed"></div>
|
||||
|
||||
<div #panel class="theme-options-panel md-white-bg mat-elevation-z8 p-16">
|
||||
<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="top">Top</md-radio-button>
|
||||
<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 md-subheader>Layout Mode:</h3>
|
||||
<md-list-item>
|
||||
<md-radio-group [(ngModel)]="fuseSettings.layout.mode" (ngModelChange)="onSettingsChange()">
|
||||
<md-radio-button class="mr-8" value="boxed">Boxed</md-radio-button>
|
||||
<md-radio-button class="mr-8" value="fullwidth">Fullwidth</md-radio-button>
|
||||
</md-radio-group>
|
||||
</md-list-item>
|
||||
<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 class="mb-8">
|
||||
<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 class="mb-8">
|
||||
<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 class="mb-8">
|
||||
<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 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>
|
||||
</div>
|
||||
</md-list-item>
|
||||
</div>
|
||||
|
||||
</md-list>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
right: 0;
|
||||
top: 160px;
|
||||
|
||||
&.bar-closed .theme-options-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.theme-options-panel {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@@ -22,12 +26,38 @@
|
||||
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: 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 {
|
||||
@@ -40,6 +70,10 @@
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
|
||||
@include media-breakpoint-down('sm') {
|
||||
background: rgba(0, 0, 0, 0.37);
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Component, ElementRef, OnDestroy, OnInit, Renderer2, 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 { Animations } from '../../animations';
|
||||
import { fuseAnimations } from '../../animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-theme-options',
|
||||
templateUrl: './theme-options.component.html',
|
||||
styleUrls : ['./theme-options.component.scss'],
|
||||
animations : [Animations.fadeInOut]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
{
|
||||
@@ -18,10 +18,11 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
|
||||
public player: AnimationPlayer;
|
||||
fuseSettings: any;
|
||||
barClosed: boolean;
|
||||
|
||||
onSettingsChanged: Subscription;
|
||||
|
||||
@HostBinding('class.bar-closed') barClosed: boolean;
|
||||
|
||||
constructor(
|
||||
private animationBuilder: AnimationBuilder,
|
||||
private fuseConfig: FuseConfigService,
|
||||
@@ -53,8 +54,6 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
|
||||
closeBar()
|
||||
{
|
||||
this.barClosed = true;
|
||||
|
||||
this.player =
|
||||
this.animationBuilder
|
||||
.build([
|
||||
@@ -63,6 +62,10 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
|
||||
]).create(this.panel.nativeElement);
|
||||
|
||||
this.player.play();
|
||||
|
||||
this.player.onDone(() => {
|
||||
this.barClosed = true;
|
||||
});
|
||||
}
|
||||
|
||||
openBar()
|
||||
|
||||
@@ -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,15 +12,16 @@ 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 { 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';
|
||||
import { CookieService } from 'ngx-cookie-service';
|
||||
import { MarkdownModule } from 'angular2-markdown';
|
||||
|
||||
@NgModule({
|
||||
declarations : [
|
||||
@@ -31,6 +31,7 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
FuseCountdownComponent,
|
||||
FuseHljsComponent,
|
||||
FuseIfOnDomDirective,
|
||||
FusePerfectScrollbarDirective,
|
||||
FuseMaterialColorPickerComponent
|
||||
],
|
||||
imports : [
|
||||
@@ -39,12 +40,12 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
FusePipesModule,
|
||||
PerfectScrollbarModule,
|
||||
ReactiveFormsModule,
|
||||
ColorPickerModule,
|
||||
NgxDnDModule,
|
||||
NgxDatatableModule,
|
||||
Md2Module
|
||||
Md2Module,
|
||||
MarkdownModule
|
||||
],
|
||||
exports : [
|
||||
FlexLayoutModule,
|
||||
@@ -56,21 +57,21 @@ import { CookieService } from 'ngx-cookie-service';
|
||||
FusePipesModule,
|
||||
FuseCountdownComponent,
|
||||
FuseHljsComponent,
|
||||
PerfectScrollbarModule,
|
||||
FusePerfectScrollbarDirective,
|
||||
ReactiveFormsModule,
|
||||
ColorPickerModule,
|
||||
NgxDnDModule,
|
||||
NgxDatatableModule,
|
||||
FuseIfOnDomDirective,
|
||||
FuseMaterialColorPickerComponent,
|
||||
Md2Module
|
||||
Md2Module,
|
||||
MarkdownModule
|
||||
],
|
||||
entryComponents: [
|
||||
FuseConfirmDialogComponent
|
||||
],
|
||||
providers : [
|
||||
CookieService,
|
||||
FuseNavigationService,
|
||||
FuseMatchMedia,
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -119,6 +139,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
> .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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
.ps {
|
||||
position: relative;
|
||||
|
||||
> .ps__scrollbar-y-rail {
|
||||
z-index: 99999;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@import "highlight";
|
||||
@import "prism";
|
||||
@import "perfect-scrollbar";
|
||||
@import "ngx-datatable";
|
||||
@import "ngx-color-picker";
|
||||
|
||||
269
src/app/core/scss/partials/plugins/_prism.scss
Normal file
269
src/app/core/scss/partials/plugins/_prism.scss
Normal file
@@ -0,0 +1,269 @@
|
||||
// Edit the sixteen color-value variables, and create your own syntax highlighter colorscheme
|
||||
|
||||
$base00: #263238;
|
||||
$base01: #2C393F;
|
||||
$base02: #37474F;
|
||||
$base03: #707880;
|
||||
$base04: #C9CCD3;
|
||||
$base05: #CDD3DE;
|
||||
$base06: #D5DBE5;
|
||||
$base07: #FFFFFF;
|
||||
$base08: #EC5F67;
|
||||
$base09: #EA9560;
|
||||
$base0A: #FFCC00;
|
||||
$base0B: #8BD649;
|
||||
$base0C: #80CBC4;
|
||||
$base0D: #89DDFF;
|
||||
$base0E: #82AAFF;
|
||||
$base0F: #EC5F67;
|
||||
|
||||
$red: $base08;
|
||||
$orange: $base09;
|
||||
$yellow: $base0A;
|
||||
$green: $base0B;
|
||||
$cyan: $base0C;
|
||||
$blue: $base0D;
|
||||
$violet: $base0E;
|
||||
$magenta: $base0F;
|
||||
|
||||
$code-font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
$code-font-size: 14px;
|
||||
$code-line-height: 1.6;
|
||||
$code-background: $base00;
|
||||
$code-color: $base05;
|
||||
$code-color-fade: $base05;
|
||||
// $code-text-shadow: none;
|
||||
$code-color-comment: $base02;
|
||||
$code-color-keyword: $base0B;
|
||||
$code-color-value: $base0C;
|
||||
$code-color-attr-name: $base09;
|
||||
$code-color-string: $base0C;
|
||||
$code-color-name: $base0A;
|
||||
$code-color-number: $base09;
|
||||
$code-color-variable: $base0D;
|
||||
$code-color-selector: $base0E;
|
||||
$code-color-property: $base0A;
|
||||
$code-color-important: $base08;
|
||||
$code-color-tag: $base0D;
|
||||
$code-color-atrule: $base0C;
|
||||
|
||||
// @import "../partials/prism";
|
||||
/**
|
||||
* Prism base code highlighter theme using Sass
|
||||
*
|
||||
* @author @MoOx
|
||||
* https://github.com/MoOx/sass-prism-theme-base/blob/master/_prism.scss
|
||||
* slightly adapted by me, Bram de Haan
|
||||
*/
|
||||
|
||||
// prism selector
|
||||
$code-selector: "code[class*=\"language-\"], pre[class*=\"language-\"]";
|
||||
$code-selector-block: "pre[class*=\"language-\"]";
|
||||
$code-selector-inline: ":not(pre) > code[class*=\"language-\"]";
|
||||
|
||||
// generic stuff
|
||||
$code-font-family: Menlo, Monaco, "Courier New", monospace !default;
|
||||
$code-font-size: 14px !default;
|
||||
$code-line-height: 1.6 !default;
|
||||
|
||||
$code-tab-size: 4 !default;
|
||||
$code-hyphens: none !default;
|
||||
|
||||
$code-block-padding: 12px !default;
|
||||
$code-inline-padding: 2px 6px !default;
|
||||
$code-border-radius: 0 !default;
|
||||
|
||||
$code-border: none !default;
|
||||
$code-background: #2A2A2A !default;
|
||||
$code-color: #FFF !default;
|
||||
$code-color-fade: #BEBEC5 !default;
|
||||
// $code-text-shadow: 0 1px 0 #000 !default;
|
||||
$code-box-shadow: none !default;
|
||||
$code-color-property: #B58900 !default;
|
||||
$code-color-important: #CB4B16 !default;
|
||||
$code-color-tag: #268BD2 !default;
|
||||
$code-color-atrule: #2AA198 !default;
|
||||
$code-color-attr-name: #B65611 !default;
|
||||
|
||||
// $code-linenums-padding: 7px !default;
|
||||
// $code-linenums-width: 40px !default;
|
||||
// $code-linenums-background: #444 !default;
|
||||
// $code-linenums-border-color: #555 !default;
|
||||
// $code-linenums-border-width: 1px !default;
|
||||
|
||||
@if $code-selector != null {
|
||||
#{$code-selector} {
|
||||
-moz-tab-size: $code-tab-size;
|
||||
-o-tab-size: $code-tab-size;
|
||||
tab-size: $code-tab-size;
|
||||
|
||||
-webkit-hyphens: $code-hyphens;
|
||||
-moz-hyphens: $code-hyphens;
|
||||
-ms-hyphens: $code-hyphens;
|
||||
hyphens: $code-hyphens;
|
||||
|
||||
// whitespace management
|
||||
white-space: pre; // fallback
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
|
||||
font-family: $code-font-family;
|
||||
font-size: $code-font-size;
|
||||
line-height: $code-line-height;
|
||||
|
||||
color: $code-color;
|
||||
// text-shadow: $code-text-shadow;
|
||||
background: $code-background;
|
||||
}
|
||||
}
|
||||
|
||||
%code-background {
|
||||
border-radius: $code-border-radius;
|
||||
border: $code-border;
|
||||
box-shadow: $code-box-shadow;
|
||||
}
|
||||
|
||||
@if $code-selector-block != null {
|
||||
#{$code-selector-block} {
|
||||
@extend %code-background;
|
||||
padding: $code-block-padding;
|
||||
}
|
||||
}
|
||||
|
||||
@if $code-selector-inline != null {
|
||||
#{$code-selector-inline} {
|
||||
@extend %code-background;
|
||||
padding: $code-inline-padding;
|
||||
}
|
||||
}
|
||||
|
||||
// pre[class*="language-"],
|
||||
// :not(pre) > code[class*="language-"] {
|
||||
// background: $code-background;
|
||||
// }
|
||||
|
||||
// prism tokens
|
||||
//
|
||||
$code-color-comment: null !default;
|
||||
$code-color-keyword: null !default;
|
||||
$code-color-value: null !default;
|
||||
$code-color-string: null !default;
|
||||
$code-color-name: null !default;
|
||||
$code-color-number: null !default;
|
||||
$code-color-variable: null !default;
|
||||
$code-color-selector: null !default;
|
||||
$code-color-punctuation: $code-color-fade !default;
|
||||
|
||||
#{$code-selector} {
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token {
|
||||
&.comment,
|
||||
&.prolog,
|
||||
&.doctype,
|
||||
&.cdata {
|
||||
color: $code-color-comment;
|
||||
}
|
||||
|
||||
&.null,
|
||||
&.operator,
|
||||
&.boolean,
|
||||
&.number {
|
||||
color: $code-color-number;
|
||||
}
|
||||
|
||||
&.string {
|
||||
color: $code-color-string;
|
||||
}
|
||||
&.attr-name {
|
||||
color: $code-color-attr-name;
|
||||
}
|
||||
|
||||
&.entity,
|
||||
&.url,
|
||||
.language-css &.string,
|
||||
.style &.string {
|
||||
color: $code-color-string;
|
||||
}
|
||||
|
||||
&.selector {
|
||||
color: $code-color-selector;
|
||||
}
|
||||
|
||||
&.attr-value,
|
||||
&.keyword,
|
||||
&.control,
|
||||
&.directive,
|
||||
&.unit {
|
||||
color: $code-color-keyword;
|
||||
}
|
||||
&.important {
|
||||
color: $code-color-important;
|
||||
}
|
||||
&.atrule {
|
||||
color: $code-color-atrule;
|
||||
}
|
||||
|
||||
&.regex,
|
||||
&.statement {
|
||||
color: $code-color-value;
|
||||
}
|
||||
|
||||
&.placeholder,
|
||||
&.variable {
|
||||
color: $code-color-variable;
|
||||
}
|
||||
|
||||
&.property,
|
||||
&.tag {
|
||||
// font-style: italic;
|
||||
}
|
||||
|
||||
&.property {
|
||||
color: $code-color-property;
|
||||
}
|
||||
&.tag {
|
||||
color: $code-color-tag;
|
||||
}
|
||||
|
||||
&.important,
|
||||
&.statement {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
// todo ?
|
||||
// &.mixin
|
||||
// &.gradient
|
||||
// &.abslength
|
||||
// &.easing
|
||||
// &.time
|
||||
// &.angle
|
||||
// &.fontfamily
|
||||
|
||||
// ruby/vim https://github.com/LeaVerou/prism/pull/18
|
||||
// &.inst-var
|
||||
// &.builtin
|
||||
// &.const
|
||||
// &.symbol
|
||||
//
|
||||
// php https://github.com/LeaVerou/prism/pull/20
|
||||
// &.deliminator
|
||||
// &.function
|
||||
|
||||
&.punctuation {
|
||||
color: $code-color-punctuation;
|
||||
}
|
||||
|
||||
&.entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
// for dev :)
|
||||
&.debug {
|
||||
color: red
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ export class FuseConfigService
|
||||
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,7 +1,7 @@
|
||||
<div id="calendar" class="page-layout simple fullwidth" perfect-scrollbar>
|
||||
<div id="calendar" class="page-layout simple fullwidth" fusePerfectScrollbar>
|
||||
|
||||
<!-- HEADER -->
|
||||
<div class="header" [ngClass]="viewDate | date:'MMM'">
|
||||
<div class="header p-16 p-sm-24" [ngClass]="viewDate | date:'MMM'">
|
||||
|
||||
<div class="header-content" fxLayout="column" fxLayoutAlign="space-between">
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
<div class="logo mb-16 mb-sm-0" fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<md-icon class="logo-icon">today</md-icon>
|
||||
<md-icon class="logo-icon" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">today</md-icon>
|
||||
|
||||
<span class="logo-text">Calendar</span>
|
||||
<span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Calendar</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,8 @@
|
||||
<!-- / TOOLBAR -->
|
||||
|
||||
<!-- HEADER BOTTOM -->
|
||||
<div class="header-bottom" fxLayout="row" fxLayoutAlign="center center">
|
||||
<div class="header-bottom" fxLayout="row" fxLayoutAlign="center center"
|
||||
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'150ms'}}">
|
||||
|
||||
<button md-button class="mat-icon-button arrow"
|
||||
mwlCalendarPreviousView
|
||||
@@ -78,7 +79,8 @@
|
||||
</div>
|
||||
|
||||
<!-- ADD EVENT BUTTON -->
|
||||
<button md-fab class="add-event-button mat-warn" (click)="addEvent()" aria-label="Add event">
|
||||
<button md-fab class="add-event-button mat-warn" (click)="addEvent()" aria-label="Add event"
|
||||
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'300ms',scale:'0.2'}}">
|
||||
<md-icon>add</md-icon>
|
||||
</button>
|
||||
<!-- / ADD EVENT BUTTON -->
|
||||
@@ -86,7 +88,7 @@
|
||||
<!-- / HEADER -->
|
||||
|
||||
<!-- CONTENT -->
|
||||
<div class="content" perfect-scrollbar>
|
||||
<div class="content" fusePerfectScrollbar *fuseIfOnDom [@animate]="{value:'*',params:{delay:'200ms',y:'50px'}}">
|
||||
<div [ngSwitch]="view">
|
||||
<mwl-calendar-month-view
|
||||
*ngSwitchCase="'month'"
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
}
|
||||
|
||||
.cal-open-day-events {
|
||||
background: whitesmoke;
|
||||
box-shadow: inset 0 0 15px 0 rgba(0, 0, 0, 0.13);
|
||||
background: #455A64;
|
||||
box-shadow: inset 0 0 12px 0 rgba(0, 0, 0, 0.54);
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -44,11 +44,11 @@
|
||||
transition: box-shadow 300ms ease;
|
||||
|
||||
&:first-of-type {
|
||||
margin-top: 24px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@@ -184,12 +184,13 @@
|
||||
|
||||
#calendar {
|
||||
background: #FFFFFF;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
.header {
|
||||
height: 200px;
|
||||
min-height: 200px;
|
||||
max-height: 200px;
|
||||
padding: 24px;
|
||||
position: relative;
|
||||
background-size: 100% auto;
|
||||
background-position: 0 50%;
|
||||
@@ -197,6 +198,12 @@
|
||||
background-color: #FAFAFA;
|
||||
color: #FFFFFF;
|
||||
|
||||
@include media-breakpoint(xs) {
|
||||
height: 164px;
|
||||
min-height: 164px;
|
||||
max-height: 164px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { startOfDay, endOfDay, subDays, addDays, endOfMonth, isSameDay, isSameMonth, addHours } from 'date-fns';
|
||||
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { MdDialog, MdDialogRef } from '@angular/material';
|
||||
import { FuseCalendarEventFormDialogComponent } from './event-form/event-form.component';
|
||||
@@ -13,13 +13,14 @@ import {
|
||||
CalendarMonthViewDay
|
||||
} from 'angular-calendar';
|
||||
import { FuseConfirmDialogComponent } from '../../../../core/components/confirm-dialog/confirm-dialog.component';
|
||||
import { fuseAnimations } from '../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-calendar',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
templateUrl : './calendar.component.html',
|
||||
styleUrls : ['./calendar.component.scss'],
|
||||
encapsulation : ViewEncapsulation.None
|
||||
selector : 'fuse-calendar',
|
||||
templateUrl : './calendar.component.html',
|
||||
styleUrls : ['./calendar.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseCalendarComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Injectable()
|
||||
export class CalendarService implements Resolve<any>
|
||||
@@ -10,7 +10,7 @@ export class CalendarService implements Resolve<any>
|
||||
events: any;
|
||||
onEventsUpdated = new Subject<any>();
|
||||
|
||||
constructor(private http: Http)
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -34,8 +34,8 @@ export class CalendarService implements Resolve<any>
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
this.http.get('api/calendar/events')
|
||||
.subscribe(response => {
|
||||
this.events = response.json().data.data;
|
||||
.subscribe((response: any) => {
|
||||
this.events = response.data.data;
|
||||
this.onEventsUpdated.next(this.events);
|
||||
resolve(this.events);
|
||||
}, reject);
|
||||
@@ -49,7 +49,7 @@ export class CalendarService implements Resolve<any>
|
||||
id : 'events',
|
||||
data: [...events]
|
||||
})
|
||||
.subscribe(response => {
|
||||
.subscribe((response: any) => {
|
||||
this.getEvents();
|
||||
}, reject);
|
||||
});
|
||||
|
||||
@@ -1,95 +1,98 @@
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">{{dialogTitle}}</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
|
||||
<div md-dialog-content class="p-24 m-0" perfect-scrollbar>
|
||||
|
||||
<form name="eventForm" [formGroup]="eventForm" class="event-form" fxLayout="column" fxFlex>
|
||||
|
||||
<md-input-container>
|
||||
<input mdInput
|
||||
name="title"
|
||||
formControlName="title"
|
||||
placeholder="Title"
|
||||
required>
|
||||
</md-input-container>
|
||||
|
||||
<div class="py-16" fxFlex="1 0 auto" fxLayout="row">
|
||||
<md-slide-toggle
|
||||
name="allDay"
|
||||
formControlName="allDay"
|
||||
class="mr-24"
|
||||
aria-label="All day">
|
||||
All Day
|
||||
</md-slide-toggle>
|
||||
<div class="dialog-content-wrapper">
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">{{dialogTitle}}</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
|
||||
<div class="py-16" fxFlex="1 0 auto" fxLayout="row" formGroupName="color">
|
||||
<md-input-container class="mr-24">
|
||||
<div md-dialog-content class="p-24 m-0" fusePerfectScrollbar>
|
||||
|
||||
<form name="eventForm" [formGroup]="eventForm" class="event-form w-100-p" fxLayout="column" fxFlex>
|
||||
|
||||
<md-input-container class="w-100-p">
|
||||
<input mdInput
|
||||
name="primary color"
|
||||
formControlName="primary"
|
||||
placeholder="Primary color"
|
||||
[(colorPicker)]="event.color.primary"
|
||||
cpWidth="290px"
|
||||
[cpPresetColors]="presetColors"
|
||||
[style.background]="event.color.primary"
|
||||
(colorPickerChange)="event.color.primary = $event; eventForm.patchValue({color:{primary:$event}})"/>
|
||||
name="title"
|
||||
formControlName="title"
|
||||
placeholder="Title"
|
||||
required>
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
|
||||
<div class="py-16" fxFlex="1 0 auto" fxLayout="row">
|
||||
<md-slide-toggle
|
||||
name="allDay"
|
||||
formControlName="allDay"
|
||||
class="mr-24"
|
||||
aria-label="All day">
|
||||
All Day
|
||||
</md-slide-toggle>
|
||||
</div>
|
||||
|
||||
<div class="py-16" fxFlex="1 0 auto" fxLayout="row" formGroupName="color">
|
||||
<md-input-container class="mr-24" fxFlex>
|
||||
<input mdInput
|
||||
name="primary color"
|
||||
formControlName="primary"
|
||||
placeholder="Primary color"
|
||||
[(colorPicker)]="event.color.primary"
|
||||
cpWidth="290px"
|
||||
[cpPresetColors]="presetColors"
|
||||
[style.background]="event.color.primary"
|
||||
(colorPickerChange)="event.color.primary = $event; eventForm.patchValue({color:{primary:$event}})"/>
|
||||
</md-input-container>
|
||||
<md-input-container fxFlex>
|
||||
<input mdInput
|
||||
name="secondary color"
|
||||
formControlName="secondary"
|
||||
placeholder="Secondary color"
|
||||
[(colorPicker)]="event.color.secondary"
|
||||
cpWidth="290px"
|
||||
[cpPresetColors]="presetColors"
|
||||
[style.background]="event.color.secondary"
|
||||
(colorPickerChange)="event.color.secondary = $event; eventForm.patchValue({color:{secondary:$event}})"/>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div fxFlex="1 0 auto" fxLayout="row">
|
||||
|
||||
<md-form-field class="mr-24" fxFlex>
|
||||
<input mdInput [mdDatepicker]="startDatePicker" placeholder="Start Date">
|
||||
<md-datepicker-toggle mdSuffix [for]="startDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #startDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
|
||||
<md-input-container class="no-errors-spacer" fxFlex md-no-float>
|
||||
<input mdInput placeholder="Start Time">
|
||||
</md-input-container>
|
||||
|
||||
</div>
|
||||
|
||||
<div fxFlex="1 0 auto" fxLayout="row">
|
||||
|
||||
<md-form-field class="mr-24" fxFlex>
|
||||
<input mdInput [mdDatepicker]="endDatePicker" placeholder="End Date">
|
||||
<md-datepicker-toggle mdSuffix [for]="endDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #endDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
|
||||
<md-input-container class="no-errors-spacer" fxFlex md-no-float>
|
||||
<input mdInput placeholder="End Time">
|
||||
</md-input-container>
|
||||
|
||||
</div>
|
||||
|
||||
<md-input-container formGroupName="meta" class="w-100-p">
|
||||
<input mdInput
|
||||
name="secondary color"
|
||||
formControlName="secondary"
|
||||
placeholder="Secondary color"
|
||||
[(colorPicker)]="event.color.secondary"
|
||||
cpWidth="290px"
|
||||
[cpPresetColors]="presetColors"
|
||||
[style.background]="event.color.secondary"
|
||||
(colorPickerChange)="event.color.secondary = $event; eventForm.patchValue({color:{secondary:$event}})"/>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div fxFlex="1 0 auto" fxLayout="row">
|
||||
|
||||
<md-form-field class="mr-24">
|
||||
<input mdInput [mdDatepicker]="startDatePicker" placeholder="Start Date">
|
||||
<md-datepicker-toggle mdSuffix [for]="startDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #startDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
|
||||
<md-datepicker #startDatePicker></md-datepicker>
|
||||
|
||||
</div>
|
||||
|
||||
<div fxFlex="1 0 auto" fxLayout="row">
|
||||
|
||||
<md-form-field class="mr-24">
|
||||
<input mdInput [mdDatepicker]="endDatePicker" placeholder="End Date">
|
||||
<md-datepicker-toggle mdSuffix [for]="endDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #endDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
|
||||
<md-input-container class="no-errors-spacer" flex md-no-float>
|
||||
<input mdInput ng-model="calendarEvent.endTime" placeholder="End Time">
|
||||
name="location"
|
||||
formControlName="location"
|
||||
placeholder="Location">
|
||||
</md-input-container>
|
||||
|
||||
</div>
|
||||
|
||||
<md-input-container formGroupName="meta">
|
||||
<input mdInput
|
||||
name="location"
|
||||
formControlName="location"
|
||||
placeholder="Location">
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container formGroupName="meta">
|
||||
<md-input-container formGroupName="meta" class="w-100-p">
|
||||
|
||||
<textarea mdInput
|
||||
formControlName="notes"
|
||||
@@ -97,39 +100,39 @@
|
||||
md-maxlength="250"
|
||||
max-rows="4">
|
||||
</textarea>
|
||||
</md-input-container>
|
||||
</md-input-container>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
|
||||
<button *ngIf="action !=='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(eventForm)"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="eventForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(['save',eventForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="eventForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',eventForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
|
||||
<button *ngIf="action !=='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(eventForm)"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="eventForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(['save',eventForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="eventForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',eventForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
.mat-dialog-container {
|
||||
padding: 0;
|
||||
width: 720px;
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.dialog-content-wrapper {
|
||||
max-height: 85vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<div fxFlex fxLayout="column" fxLayoutAlign="center center">
|
||||
|
||||
<div class="big-circle mat-elevation-z1" fxLayout="column" fxLayoutAlign="center center">
|
||||
<div class="big-circle mat-elevation-z1 app-logo" fxLayout="column" fxLayoutAlign="center center"
|
||||
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">
|
||||
|
||||
<md-icon class="s-64 s-md-128">chat</md-icon>
|
||||
|
||||
</div>
|
||||
|
||||
<span class="app-title my-24">Chat App</span>
|
||||
<span class="app-title my-24" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',y:'25px'}}">Chat App</span>
|
||||
|
||||
<span fxHide fxShow.gt-md class="app-message">Select contact to start the chat!..</span>
|
||||
<span fxHide fxShow.gt-md class="app-message" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'200ms',y:'50px'}}">Select contact to start the chat!..</span>
|
||||
|
||||
<button md-raised-button fxHide.gt-md class="" fuseMdSidenavToggler="chat-left-sidenav">
|
||||
Select contact to start the chat!..
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat-start',
|
||||
templateUrl: './chat-start.component.html',
|
||||
styleUrls : ['./chat-start.component.scss']
|
||||
styleUrls : ['./chat-start.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseChatStartComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<!-- / CHAT TOOLBAR -->
|
||||
|
||||
<!-- CHAT CONTENT -->
|
||||
<div id="chat-content" fxFlex perfect-scrollbar>
|
||||
<div id="chat-content" fxFlex fusePerfectScrollbar>
|
||||
|
||||
<!-- CHAT MESSAGES -->
|
||||
<div class="chat-messages">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AfterViewInit, Component, OnInit, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { ChatService } from '../chat.service';
|
||||
import { NgForm } from '@angular/forms';
|
||||
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
|
||||
import { FusePerfectScrollbarDirective } from '../../../../../core/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat-view',
|
||||
@@ -16,7 +16,7 @@ export class FuseChatViewComponent implements OnInit, AfterViewInit
|
||||
contact: any;
|
||||
replyInput: any;
|
||||
selectedChat: any;
|
||||
@ViewChild(PerfectScrollbarDirective) directiveScroll: PerfectScrollbarDirective;
|
||||
@ViewChild(FusePerfectScrollbarDirective) directiveScroll: FusePerfectScrollbarDirective;
|
||||
@ViewChildren('replyInput') replyInputField;
|
||||
@ViewChild('replyForm') replyForm: NgForm;
|
||||
|
||||
@@ -72,11 +72,12 @@ export class FuseChatViewComponent implements OnInit, AfterViewInit
|
||||
speed = speed || 400;
|
||||
if ( this.directiveScroll )
|
||||
{
|
||||
this.directiveScroll.update();
|
||||
|
||||
setTimeout(() => {
|
||||
this.directiveScroll.scrollToBottom(0, speed);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
reply(event)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
> .mat-sidenav-content,
|
||||
> .mat-drawer-content {
|
||||
display: flex;
|
||||
flex: 1 0 auto;
|
||||
flex: 1 1 auto;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ChatService } from './chat.service';
|
||||
import { fuseAnimations } from '../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat',
|
||||
templateUrl : './chat.component.html',
|
||||
styleUrls : ['./chat.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseChatComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Subject } from 'rxjs/Subject';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { FuseUtils } from '../../../../core/fuseUtils';
|
||||
@@ -19,7 +19,7 @@ export class ChatService implements Resolve<any>
|
||||
onLeftSidenavViewChanged = new Subject<any>();
|
||||
onRightSidenavViewChanged = new Subject<any>();
|
||||
|
||||
constructor(private http: Http)
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ export class ChatService implements Resolve<any>
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/chat-chats/' + chatItem.id)
|
||||
.subscribe(response => {
|
||||
const chat = response.json().data;
|
||||
.subscribe((response: any) => {
|
||||
const chat = response.data;
|
||||
|
||||
const chatContact = this.contacts.find((contact) => {
|
||||
return contact.id === contactId;
|
||||
@@ -105,7 +105,7 @@ export class ChatService implements Resolve<any>
|
||||
* Post the created chat
|
||||
*/
|
||||
this.http.post('api/chat-chats', {...chat})
|
||||
.subscribe(response => {
|
||||
.subscribe((response: any) => {
|
||||
|
||||
/**
|
||||
* Post the new the user data
|
||||
@@ -150,7 +150,7 @@ export class ChatService implements Resolve<any>
|
||||
updateUserData(userData)
|
||||
{
|
||||
this.http.post('api/chat-user/' + this.user.id, userData)
|
||||
.subscribe(response => {
|
||||
.subscribe((response: any) => {
|
||||
this.user = userData;
|
||||
}
|
||||
);
|
||||
@@ -211,8 +211,8 @@ export class ChatService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/chat-contacts')
|
||||
.subscribe(response => {
|
||||
resolve(response.json().data);
|
||||
.subscribe((response: any) => {
|
||||
resolve(response.data);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
@@ -225,8 +225,8 @@ export class ChatService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/chat-chats')
|
||||
.subscribe(response => {
|
||||
resolve(response.json().data);
|
||||
.subscribe((response: any) => {
|
||||
resolve(response.data);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
@@ -239,8 +239,8 @@ export class ChatService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/chat-user')
|
||||
.subscribe(response => {
|
||||
resolve(response.json().data[0]);
|
||||
.subscribe((response: any) => {
|
||||
resolve(response.data[0]);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -98,10 +98,10 @@
|
||||
<!-- / SIDENAV HEADER -->
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="sidenav-content" perfect-scrollbar fxFlex>
|
||||
<div class="sidenav-content" fusePerfectScrollbar fxFlex>
|
||||
|
||||
<!-- CHATS CONTENT -->
|
||||
<div>
|
||||
<div *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- CHATS LIST-->
|
||||
<div class="chat-list" fxLayout="column">
|
||||
@@ -112,7 +112,8 @@
|
||||
|
||||
<button md-button class="contact"
|
||||
*ngFor="let chat of user.chatList | filter: searchText"
|
||||
(click)="getChat(chat.contactId)" ngClass="{'unread':contact.unread}">
|
||||
(click)="getChat(chat.contactId)" ngClass="{'unread':contact.unread}"
|
||||
[@animate]="{value:'*',params:{y:'100%'}}">
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
@@ -150,9 +151,9 @@
|
||||
</div>
|
||||
|
||||
<button md-button class="contact"
|
||||
ng-show="chatSearch"
|
||||
*ngFor="let contact of contacts| filter: searchText"
|
||||
(click)="getChat(contact.id)">
|
||||
(click)="getChat(contact.id)"
|
||||
[@animate]="{value:'*',params:{y:'100%'}}">
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center">
|
||||
<div class="avatar-wrapper" fxFlex="0 1 auto">
|
||||
|
||||
@@ -2,11 +2,13 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { ChatService } from '../../../chat.service';
|
||||
import { FuseMdSidenavHelperService } from '../../../../../../../core/directives/md-sidenav-helper/md-sidenav-helper.service';
|
||||
import { ObservableMedia } from '@angular/flex-layout';
|
||||
import { fuseAnimations } from '../../../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat-chats-sidenav',
|
||||
templateUrl: './chats.component.html',
|
||||
styleUrls : ['./chats.component.scss']
|
||||
styleUrls : ['./chats.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseChatChatsSidenavComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Animations } from '../../../../../../core/animations';
|
||||
import { fuseAnimations } from '../../../../../../core/animations';
|
||||
import { ChatService } from '../../chat.service';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat-left-sidenav',
|
||||
templateUrl: './left.component.html',
|
||||
styleUrls : ['./left.component.scss'],
|
||||
animations : [Animations.slideInLeft, Animations.slideInRight]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseChatLeftSidenavComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="sidenav-content p-16" perfect-scrollbar fxFlex>
|
||||
<div class="sidenav-content p-16" fusePerfectScrollbar fxFlex>
|
||||
|
||||
<!-- USER MOOD -->
|
||||
<md-card>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="sidenav-content p-16" perfect-scrollbar fxFlex *ngIf="contact">
|
||||
<div class="sidenav-content p-16" fusePerfectScrollbar fxFlex *ngIf="contact">
|
||||
|
||||
<!-- CONTACT MOOD -->
|
||||
<md-card>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Animations } from '../../../../../../core/animations';
|
||||
import { fuseAnimations } from '../../../../../../core/animations';
|
||||
import { ChatService } from '../../chat.service';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-chat-right-sidenav',
|
||||
templateUrl: './right.component.html',
|
||||
styleUrls : ['./right.component.scss'],
|
||||
animations : [Animations.slideInLeft, Animations.slideInRight]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseChatRightSidenavComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -1,126 +1,128 @@
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">{{dialogTitle}}</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
<div class="dialog-content-wrapper">
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">{{dialogTitle}}</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<md-toolbar-row class="toolbar-bottom py-8 py-sm-16" fxLayout="column" fxLayoutAlign="center center">
|
||||
<img [src]="contact.avatar" class=" avatar contact-avatar huge"
|
||||
[alt]="contact.name"/>
|
||||
<div class="contact-name">{{contact.name}}</div>
|
||||
</md-toolbar-row>
|
||||
</md-toolbar>
|
||||
|
||||
<div md-dialog-content class="p-24 m-0" fusePerfectScrollbar>
|
||||
|
||||
<form [formGroup]="contactForm">
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">account_circle</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="name" formControlName="name" placeholder="Name" mdInput required>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12"></md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="lastName" formControlName="lastName" placeholder="Lastname" mdInput>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">star</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="nickname" formControlName="nickname" mdInput placeholder="Nickname">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">phone</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input formControlName="phone" mdInput placeholder="Phone number">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">email</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="email" formControlName="email" mdInput type="email" placeholder="Email">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">domain</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="company" formControlName="company" mdInput placeholder="Company">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">work</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="jobTitle" formControlName="jobTitle" mdInput placeholder="Job title">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-form-field class="mr-24" fxFlex>
|
||||
<input mdInput [mdDatepicker]="birthdayDatePicker" placeholder="Birthday">
|
||||
<md-datepicker-toggle mdSuffix [for]="birthdayDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #birthdayDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">home</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="address" formControlName="address" mdInput placeholder="Address">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" class="textarea-wrapper" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">note</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<textarea name="notes" formControlName="notes" placeholder="Notes" mdInput type="text" max-rows="4"></textarea>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<md-toolbar-row class="toolbar-bottom" fxLayout="column" fxLayoutAlign="center center">
|
||||
<img [src]="contact.avatar" class=" avatar contact-avatar huge"
|
||||
[alt]="contact.name"/>
|
||||
<div class="contact-name">{{contact.name}}</div>
|
||||
</md-toolbar-row>
|
||||
</md-toolbar>
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
|
||||
<div md-dialog-content class="p-24 m-0" perfect-scrollbar>
|
||||
<button *ngIf="action !=='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(contactForm)"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="contactForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<form [formGroup]="contactForm">
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(['save',contactForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="contactForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">account_circle</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="name" formControlName="name" placeholder="Name" mdInput required>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12"></md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="lastName" formControlName="lastName" placeholder="Lastname" mdInput>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">star</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="nickname" formControlName="nickname" mdInput placeholder="Nickname">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">phone</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input formControlName="phone" mdInput placeholder="Phone number">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">email</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="email" formControlName="email" mdInput type="email" placeholder="Email">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">domain</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="company" formControlName="company" mdInput placeholder="Company">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">work</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="jobTitle" formControlName="jobTitle" mdInput placeholder="Job title">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-form-field class="mr-24" fxFlex>
|
||||
<input mdInput [mdDatepicker]="birthdayDatePicker" placeholder="Birthday">
|
||||
<md-datepicker-toggle mdSuffix [for]="birthdayDatePicker"></md-datepicker-toggle>
|
||||
<md-datepicker #birthdayDatePicker></md-datepicker>
|
||||
</md-form-field>
|
||||
</div>
|
||||
|
||||
<div class="mb-24" fxLayout="row" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">home</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<input name="address" formControlName="address" mdInput placeholder="Address">
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" class="textarea-wrapper" fxLayoutAlign="start start">
|
||||
<md-icon class="mr-12 mt-12">note</md-icon>
|
||||
<md-input-container fxFlex>
|
||||
<textarea name="notes" formControlName="notes" placeholder="Notes" mdInput type="text" max-rows="4"></textarea>
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
|
||||
<button *ngIf="action !=='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(contactForm)"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="contactForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-raised-button
|
||||
(click)="dialogRef.close(['save',contactForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="contactForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SAVE
|
||||
</button>
|
||||
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',contactForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
<button *ngIf="action ==='edit'"
|
||||
md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',contactForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,14 +3,20 @@
|
||||
.mat-dialog-container {
|
||||
padding: 0;
|
||||
width: 400px;
|
||||
overflow: hidden;
|
||||
|
||||
.mat-toolbar {
|
||||
min-height: initial;
|
||||
}
|
||||
|
||||
.toolbar-bottom {
|
||||
height: 200px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.dialog-content-wrapper {
|
||||
max-height: 85vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<md-table #table [dataSource]="dataSource">
|
||||
|
||||
<md-table #table [dataSource]="dataSource"
|
||||
[@animateStagger]="{value:'50'}">
|
||||
<!-- Checkbox Column -->
|
||||
<ng-container cdkColumnDef="checkbox">
|
||||
<md-header-cell *cdkHeaderCellDef></md-header-cell>
|
||||
@@ -95,15 +95,12 @@
|
||||
|
||||
<md-header-row *cdkHeaderRowDef="displayedColumns"></md-header-row>
|
||||
<md-row *cdkRowDef="let contact; columns: displayedColumns;"
|
||||
class="contact"
|
||||
(click)="editContact(contact)"
|
||||
[ngClass]="{'md-light-blue-50-bg':checkboxes[contact.id]}"
|
||||
md-ripple>
|
||||
md-ripple
|
||||
[@animate]="{value:'*',params:{y:'100%'}}">
|
||||
</md-row>
|
||||
</md-table>
|
||||
|
||||
|
||||
<!-- ADD CONTACT BUTTON -->
|
||||
<button md-fab class="md-accent-bg" id="add-contact-button" (click)="newContact()" aria-label="add contact">
|
||||
<md-icon>person_add</md-icon>
|
||||
</button>
|
||||
<!-- / ADD CONTACT BUTTON -->
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
box-shadow: none;
|
||||
|
||||
.mat-column-checkbox {
|
||||
flex: 0 1 64px;
|
||||
flex: 0 1 48px;
|
||||
}
|
||||
|
||||
.mat-column-avatar {
|
||||
@@ -22,6 +22,7 @@
|
||||
.mat-row {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding-right: 8px;
|
||||
|
||||
.mat-cell {
|
||||
min-width: 0;
|
||||
|
||||
@@ -6,11 +6,13 @@ import { MdDialog, MdDialogRef } from '@angular/material';
|
||||
import { FuseConfirmDialogComponent } from '../../../../../core/components/confirm-dialog/confirm-dialog.component';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { DataSource } from '@angular/cdk/collections';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-contacts-contact-list',
|
||||
templateUrl: './contact-list.component.html',
|
||||
styleUrls : ['./contact-list.component.scss']
|
||||
styleUrls : ['./contact-list.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseContactsContactListComponent implements OnInit
|
||||
{
|
||||
@@ -61,28 +63,6 @@ export class FuseContactsContactListComponent implements OnInit
|
||||
this.dataSource = new FilesDataSource(this.contactsService);
|
||||
}
|
||||
|
||||
newContact()
|
||||
{
|
||||
this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, {
|
||||
panelClass: 'contact-form-dialog',
|
||||
data : {
|
||||
action: 'new'
|
||||
}
|
||||
});
|
||||
|
||||
this.dialogRef.afterClosed()
|
||||
.subscribe((response: FormGroup) => {
|
||||
if ( !response )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.contactsService.updateContact(response.getRawValue());
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
editContact(contact)
|
||||
{
|
||||
this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div id="contacts" class="page-layout simple left-sidenav inner-sidenav" perfect-scrollbar>
|
||||
<div id="contacts" class="page-layout simple left-sidenav inner-sidenav">
|
||||
|
||||
<!-- HEADER -->
|
||||
<div class="header md-accent-bg p-24" fxLayout="column" fxLayoutAlign="start start"
|
||||
<div class="header md-accent-bg p-16 p-sm-24" fxLayout="column" fxLayoutAlign="start start"
|
||||
fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="space-between center">
|
||||
|
||||
<!-- APP TITLE -->
|
||||
@@ -14,8 +14,8 @@
|
||||
</button>
|
||||
|
||||
<div class="logo" fxLayout="row" fxLayoutAlign="start center">
|
||||
<md-icon class="logo-icon mr-16">account_box</md-icon>
|
||||
<span class="logo-text h1">Contacts</span>
|
||||
<md-icon class="logo-icon mr-16" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">account_box</md-icon>
|
||||
<span class="logo-text h1" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Contacts</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -43,15 +43,15 @@
|
||||
|
||||
<!-- SIDENAV -->
|
||||
<md-sidenav class="sidenav mat-sidenav-opened" align="start" opened="true" mode="side"
|
||||
fuseMdSidenavHelper="contacts-main-sidenav" md-is-locked-open="gt-md">
|
||||
fuseMdSidenavHelper="contacts-main-sidenav" md-is-locked-open="gt-sm">
|
||||
|
||||
<fuse-contacts-main-sidenav></fuse-contacts-main-sidenav>
|
||||
<fuse-contacts-main-sidenav *fuseIfOnDom [@animate]="{value:'*'}"></fuse-contacts-main-sidenav>
|
||||
|
||||
</md-sidenav>
|
||||
<!-- / SIDENAV -->
|
||||
|
||||
<!-- CENTER -->
|
||||
<div class="center p-24 pr-sm-92" perfect-scrollbar>
|
||||
<div class="center p-24 pb-56 pr-sm-92" fusePerfectScrollbar>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<div class="content md-white-bg mat-elevation-z4">
|
||||
@@ -67,3 +67,10 @@
|
||||
</md-sidenav-container>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ADD CONTACT BUTTON -->
|
||||
<button md-fab class="md-accent-bg" id="add-contact-button" (click)="newContact()" aria-label="add contact"
|
||||
*fuseIfOnDom [@animate]="{value:'*', params:{delay:'300ms',scale:'.2'}}">
|
||||
<md-icon>person_add</md-icon>
|
||||
</button>
|
||||
<!-- / ADD CONTACT BUTTON -->
|
||||
|
||||
@@ -4,3 +4,10 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
#add-contact-button {
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
right: 12px;
|
||||
padding: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
@@ -1,25 +1,53 @@
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { ContactsService } from './contacts.service';
|
||||
import { Animations } from '../../../../core/animations';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { fuseAnimations } from '../../../../core/animations';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { FuseContactsContactFormDialogComponent } from './contact-form/contact-form.component';
|
||||
import { MdDialog } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-contacts',
|
||||
templateUrl : './contacts.component.html',
|
||||
styleUrls : ['./contacts.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations : [Animations.slideInTop]
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseContactsComponent implements OnInit
|
||||
{
|
||||
hasSelectedContacts: boolean;
|
||||
searchInput: FormControl;
|
||||
dialogRef: any;
|
||||
|
||||
constructor(private contactsService: ContactsService)
|
||||
constructor(
|
||||
private contactsService: ContactsService,
|
||||
public dialog: MdDialog
|
||||
)
|
||||
{
|
||||
this.searchInput = new FormControl('');
|
||||
}
|
||||
|
||||
newContact()
|
||||
{
|
||||
this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, {
|
||||
panelClass: 'contact-form-dialog',
|
||||
data : {
|
||||
action: 'new'
|
||||
}
|
||||
});
|
||||
|
||||
this.dialogRef.afterClosed()
|
||||
.subscribe((response: FormGroup) => {
|
||||
if ( !response )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.contactsService.updateContact(response.getRawValue());
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
{
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { Contact } from './contact.model';
|
||||
import { FuseUtils } from '../../../../core/fuseUtils';
|
||||
@@ -23,7 +23,7 @@ export class ContactsService implements Resolve<any>
|
||||
searchText: string;
|
||||
filterBy: string;
|
||||
|
||||
constructor(private http: Http)
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,9 +65,9 @@ export class ContactsService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/contacts-contacts')
|
||||
.subscribe(response => {
|
||||
.subscribe((response: any) => {
|
||||
|
||||
this.contacts = response.json().data;
|
||||
this.contacts = response.data;
|
||||
|
||||
if ( this.filterBy === 'starred' )
|
||||
{
|
||||
@@ -103,8 +103,8 @@ export class ContactsService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/contacts-user/5725a6802d10e277a0f35724')
|
||||
.subscribe(response => {
|
||||
this.user = response.json().data;
|
||||
.subscribe((response: any) => {
|
||||
this.user = response.data;
|
||||
this.onUserDataChanged.next(this.user);
|
||||
resolve(this.user);
|
||||
}, reject);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="start center" class="p-24">
|
||||
|
||||
<div class="close-button-wrapper" fxFlex="220px" (click)="deselectAll()">
|
||||
<div class="close-button-wrapper" fxFlex="0 1 auto" fxFlex.gt-sm="220px" (click)="deselectAll()">
|
||||
<button class="p-8" md-button fxLayout="row" fxLayoutAlign="start center">
|
||||
<md-icon class="mr-8">arrow_back</md-icon>
|
||||
<span class="text-uppercase">Back</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="end center" fxLayoutAlign.gt-sm="space-between center">
|
||||
|
||||
<div>
|
||||
<span class="selected-contacts-count">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<!-- / SIDENAV HEADER -->
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="content py-16" perfect-scrollbar>
|
||||
<div class="content py-16" fusePerfectScrollbar>
|
||||
|
||||
<div class="nav">
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
|
||||
@include media-breakpoint(gt-md) {
|
||||
@include media-breakpoint(gt-sm) {
|
||||
padding: 24px 4px 24px 24px;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
flex: 0 1 auto;
|
||||
padding: 0;
|
||||
|
||||
@include media-breakpoint(gt-md) {
|
||||
@include media-breakpoint(gt-sm) {
|
||||
@include mat-elevation(4);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<div id="dashboard-project" class="page-layout simple right-sidenav" fxLayout="row" perfect-scrollbar>
|
||||
<div id="dashboard-project" class="page-layout simple right-sidenav" fxLayout="row">
|
||||
|
||||
<md-sidenav-container>
|
||||
|
||||
<!-- CENTER -->
|
||||
<div class="center" fxFlex perfect-scrollbar>
|
||||
<div class="center" fxFlex fusePerfectScrollbar>
|
||||
|
||||
<!-- HEADER -->
|
||||
<div class="header md-accent-bg p-24 pb-0" fxLayout="column" fxLayoutAlign="space-between">
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="space-between start">
|
||||
|
||||
<span class="mat-display-1 mb-0">Welcome back, John!</span>
|
||||
<span class="mat-display-1 mb-0 welcome-message" *fuseIfOnDom [@animate]="{value:'*',params:{x:'50px'}}">Welcome back, John!</span>
|
||||
|
||||
<button md-icon-button fuseMdSidenavToggler="dashboards-right-sidenav" fxHide.gt-md>
|
||||
<md-icon>menu</md-icon>
|
||||
@@ -41,10 +41,10 @@
|
||||
|
||||
<md-tab label="Home">
|
||||
|
||||
<div class="widget-group p-12" fxLayout="row" fxFlex="100" fxLayoutWrap>
|
||||
<div class="widget-group p-12" fxLayout="row" fxFlex="100" fxLayoutWrap *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- WIDGET 1 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -79,7 +79,8 @@
|
||||
|
||||
<!-- Back -->
|
||||
<div class="fuse-widget-back p-16 pt-32 md-white-bg mat-elevation-z2">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button" ng-click="flipWidget()" aria-label="Flip widget">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button"
|
||||
aria-label="Flip widget">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
|
||||
@@ -93,7 +94,7 @@
|
||||
<!-- / WIDGET 1 -->
|
||||
|
||||
<!-- WIDGET 2 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -121,7 +122,8 @@
|
||||
|
||||
<!-- Back -->
|
||||
<div class="fuse-widget-back p-16 pt-32 md-white-bg mat-elevation-z2">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button" ng-click="flipWidget()" aria-label="Flip widget">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button"
|
||||
aria-label="Flip widget">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
|
||||
@@ -135,7 +137,7 @@
|
||||
<!-- / WIDGET 2 -->
|
||||
|
||||
<!-- WIDGET 3 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -163,7 +165,8 @@
|
||||
|
||||
<!-- Back -->
|
||||
<div class="fuse-widget-back p-16 pt-32 md-white-bg mat-elevation-z2">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button" ng-click="flipWidget()" aria-label="Flip widget">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button"
|
||||
aria-label="Flip widget">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
|
||||
@@ -177,7 +180,7 @@
|
||||
<!-- / WIDGET 3 -->
|
||||
|
||||
<!-- WIDGET 4 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-md="25">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -204,7 +207,8 @@
|
||||
|
||||
<!-- Back -->
|
||||
<div class="fuse-widget-back p-16 pt-32 md-white-bg mat-elevation-z2">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button" ng-click="flipWidget()" aria-label="Flip widget">
|
||||
<button md-icon-button fuseWidgetToggle class="fuse-widget-flip-button"
|
||||
aria-label="Flip widget">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
|
||||
@@ -219,7 +223,7 @@
|
||||
|
||||
|
||||
<!-- WIDGET 5 -->
|
||||
<fuse-widget class="" fxLayout="row" fxFlex="100">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="row" fxFlex="100">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -282,7 +286,6 @@
|
||||
[xAxisLabel]="widget5.supporting.xAxisLabel"
|
||||
[yAxisLabel]="widget5.supporting.yAxisLabel"
|
||||
[curve]="widget5.supporting.curve">
|
||||
>
|
||||
</ngx-charts-area-chart>
|
||||
</div>
|
||||
</div>
|
||||
@@ -296,7 +299,7 @@
|
||||
|
||||
|
||||
<!-- WIDGET 6 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -346,7 +349,7 @@
|
||||
<!-- / WIDGET 6 -->
|
||||
|
||||
<!-- WIDGET 7 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -395,10 +398,10 @@
|
||||
<md-tab label="Budget Summary">
|
||||
|
||||
<!-- WIDGET GROUP -->
|
||||
<div class="widget-group" fxLayout="row" fxFlex="100" fxLayoutWrap>
|
||||
<div class="widget-group" fxLayout="row" fxFlex="100" fxLayoutWrap *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- WIDGET 8 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -429,7 +432,7 @@
|
||||
<!-- / WIDGET 8 -->
|
||||
|
||||
<!-- WIDGET 9 -->
|
||||
<fuse-widget class="" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="column" fxFlex="100" fxFlex.gt-sm="50">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -543,7 +546,7 @@
|
||||
<!-- / WIDGET 9 -->
|
||||
|
||||
<!-- WIDGET 10 -->
|
||||
<fuse-widget class="" fxLayout="row" fxFlex="100">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="row" fxFlex="100">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -590,10 +593,10 @@
|
||||
<md-tab label="Team Members">
|
||||
|
||||
<!-- WIDGET GROUP -->
|
||||
<div class="widget-group" fxLayout="row" fxFlex="100" fxLayoutWrap>
|
||||
<div class="widget-group" fxLayout="row" fxFlex="100" fxLayoutWrap *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- WIDGET 11 -->
|
||||
<fuse-widget class="" fxLayout="row" fxFlex="100">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="widget" fxLayout="row" fxFlex="100">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front md-white-bg mat-elevation-z2">
|
||||
@@ -688,14 +691,15 @@
|
||||
<!-- / CENTER -->
|
||||
|
||||
<!-- SIDENAV -->
|
||||
<md-sidenav class="sidenav mat-sidenav-opened" align="end" mode="side" fuseMdSidenavHelper="dashboards-right-sidenav" md-is-locked-open="gt-md">
|
||||
<md-sidenav class="sidenav mat-sidenav-opened" align="end" mode="side" opened="true" fuseMdSidenavHelper="dashboards-right-sidenav" md-is-locked-open="gt-md">
|
||||
|
||||
<div class="sidenav-content" fusePerfectScrollbar>
|
||||
|
||||
<div class="sidenav-content" perfect-scrollbar>
|
||||
<!-- WIDGET GROUP -->
|
||||
<div class="widget-group" fxLayout="column" fxFlex="100">
|
||||
<div class="widget-group" fxLayout="column" fxFlex="100" *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- NOW WIDGET -->
|
||||
<fuse-widget class="sidenav-widget p-0">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="sidenav-widget p-0">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front">
|
||||
@@ -738,9 +742,8 @@
|
||||
</fuse-widget>
|
||||
<!-- / NOW WIDGET -->
|
||||
|
||||
|
||||
<!-- WEATHER WIDGET -->
|
||||
<fuse-widget class="sidenav-widget p-0">
|
||||
<fuse-widget [@animate]="{value:'*',params:{y:'100%'}}" class="sidenav-widget p-0">
|
||||
|
||||
<!-- Front -->
|
||||
<div class="fuse-widget-front">
|
||||
|
||||
@@ -30,6 +30,15 @@
|
||||
}
|
||||
|
||||
> .content {
|
||||
flex: 1;
|
||||
|
||||
md-tab-group {
|
||||
height: 100%;
|
||||
|
||||
.mat-tab-body-wrapper {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-tab-label-container {
|
||||
padding: 0 24px;
|
||||
|
||||
@@ -4,12 +4,14 @@ import * as shape from 'd3-shape';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { DataSource } from '@angular/cdk/collections';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-project',
|
||||
templateUrl : './project.component.html',
|
||||
styleUrls : ['./project.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseProjectComponent implements OnInit, OnDestroy
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Injectable()
|
||||
export class ProjectsDashboardService implements Resolve<any>
|
||||
@@ -10,7 +10,7 @@ export class ProjectsDashboardService implements Resolve<any>
|
||||
widgets: any[];
|
||||
|
||||
constructor(
|
||||
private http: Http
|
||||
private http: HttpClient
|
||||
)
|
||||
{
|
||||
}
|
||||
@@ -42,9 +42,9 @@ export class ProjectsDashboardService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/projects-dashboard-projects')
|
||||
.subscribe(response => {
|
||||
this.projects = response.json().data;
|
||||
resolve(response.json().data);
|
||||
.subscribe((response: any) => {
|
||||
this.projects = response.data;
|
||||
resolve(response.data);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
@@ -53,9 +53,9 @@ export class ProjectsDashboardService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/projects-dashboard-widgets')
|
||||
.subscribe(response => {
|
||||
this.widgets = response.json().data;
|
||||
resolve(response.json().data);
|
||||
.subscribe((response: any) => {
|
||||
this.widgets = response.data;
|
||||
resolve(response.data);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<md-table #table [dataSource]="dataSource">
|
||||
<md-table #table [dataSource]="dataSource" *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- Type Column -->
|
||||
<ng-container cdkColumnDef="icon">
|
||||
@@ -53,6 +53,8 @@
|
||||
<md-row *cdkRowDef="let row; columns: displayedColumns;"
|
||||
(click)="onSelect(row)"
|
||||
[ngClass]="{'md-light-blue-50-bg':row == selected}"
|
||||
md-ripple>
|
||||
md-ripple
|
||||
[@animate]="{value:'*',params:{y:'100%'}}"
|
||||
>
|
||||
</md-row>
|
||||
</md-table>
|
||||
|
||||
@@ -2,11 +2,13 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { FileManagerService } from '../file-manager.service';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { DataSource } from '@angular/cdk/collections';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-file-list',
|
||||
templateUrl: './file-list.component.html',
|
||||
styleUrls : ['./file-list.component.scss']
|
||||
styleUrls : ['./file-list.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseFileManagerFileListComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div id="file-manager" class="page-layout simple right-sidenav" perfect-scrollbar>
|
||||
<div id="file-manager" class="page-layout simple right-sidenav" fusePerfectScrollbar>
|
||||
|
||||
<md-sidenav-container>
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
<!-- / TOOLBAR -->
|
||||
|
||||
<!-- BREADCRUMB -->
|
||||
<div class="breadcrumb text-truncate h1 pl-72" fxLayout="row" fxLayoutAlign="start center">
|
||||
<div class="breadcrumb text-truncate h1 pl-72" fxLayout="row" fxLayoutAlign="start center"
|
||||
*fuseIfOnDom [@animate]="{value:'*',params:{x:'50px'}}">
|
||||
<div *ngFor="let path of pathArr; last as isLast" fxLayout="row" fxLayoutAlign="start center">
|
||||
<span>{{path}}</span>
|
||||
<md-icon *ngIf="!isLast" class="separator">chevron_right</md-icon>
|
||||
@@ -48,7 +49,8 @@
|
||||
<button md-fab
|
||||
class="add-file-button mat-warn"
|
||||
(click)="fileInput.click()"
|
||||
aria-label="Add file">
|
||||
aria-label="Add file"
|
||||
*fuseIfOnDom [@animate]="{value:'*', params:{delay:'300ms',scale:'0.2'}}">
|
||||
<md-icon>add</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
@@ -58,7 +60,7 @@
|
||||
<!-- / HEADER -->
|
||||
|
||||
<!-- CONTENT -->
|
||||
<div class="content md-white-bg" perfect-scrollbar>
|
||||
<div class="content md-white-bg" fusePerfectScrollbar>
|
||||
<fuse-file-list></fuse-file-list>
|
||||
</div>
|
||||
<!-- / CONTENT -->
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { FileManagerService } from './file-manager.service';
|
||||
import { fuseAnimations } from '../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-file-manager',
|
||||
templateUrl : './file-manager.component.html',
|
||||
styleUrls : ['./file-manager.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseFileManagerComponent implements OnInit
|
||||
{
|
||||
@@ -15,7 +17,6 @@ export class FuseFileManagerComponent implements OnInit
|
||||
|
||||
constructor(private fileManagerService: FileManagerService)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ngOnInit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
|
||||
@Injectable()
|
||||
@@ -10,7 +10,7 @@ export class FileManagerService implements Resolve<any>
|
||||
onFilesChanged: BehaviorSubject<any> = new BehaviorSubject({});
|
||||
onFileSelected: BehaviorSubject<any> = new BehaviorSubject({});
|
||||
|
||||
constructor(private http: Http)
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ export class FileManagerService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/file-manager')
|
||||
.subscribe(response => {
|
||||
this.onFilesChanged.next(response.json().data);
|
||||
this.onFileSelected.next(response.json().data[0]);
|
||||
resolve(response.json().data);
|
||||
.subscribe((response: any) => {
|
||||
this.onFilesChanged.next(response.data);
|
||||
this.onFileSelected.next(response.data[0]);
|
||||
resolve(response.data);
|
||||
}, reject);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
<!-- / SIDENAV HEADER -->
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="content p-24 md-white-bg" perfect-scrollbar>
|
||||
<div class="content p-24 md-white-bg" fusePerfectScrollbar>
|
||||
|
||||
<div class="file-details">
|
||||
<div class="file-details"
|
||||
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'200ms'}}">
|
||||
|
||||
<div class="preview file-icon" fxLayout="row" fxLayoutAlign="center center">
|
||||
<md-icon class="type-icon s-48" [class]="selected.type"></md-icon>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FileManagerService } from '../../file-manager.service';
|
||||
import { fuseAnimations } from '../../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-file-manager-details-sidenav',
|
||||
templateUrl: './details.component.html',
|
||||
styleUrls : ['./details.component.scss']
|
||||
styleUrls : ['./details.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseFileManagerDetailsSidenavComponent implements OnInit
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- / SIDENAV HEADER -->
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="content py-16" perfect-scrollbar>
|
||||
<div class="content py-16" fusePerfectScrollbar>
|
||||
|
||||
<div class="nav">
|
||||
|
||||
|
||||
@@ -1,109 +1,111 @@
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">New Message</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
<div class="dialog-content-wrapper">
|
||||
<md-toolbar md-dialog-title class="mat-accent m-0">
|
||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<span class="title dialog-title">New Message</span>
|
||||
<button md-button class="mat-icon-button"
|
||||
(click)="dialogRef.close()"
|
||||
aria-label="Close dialog">
|
||||
<md-icon>close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</md-toolbar>
|
||||
|
||||
<div md-dialog-content class="p-24 m-0" perfect-scrollbar>
|
||||
<div md-dialog-content class="p-24 m-0" fusePerfectScrollbar>
|
||||
|
||||
<form name="composeForm" [formGroup]="composeForm" class="compose-form" fxLayout="column" fxFlex>
|
||||
<form name="composeForm" [formGroup]="composeForm" class="compose-form" fxLayout="column" fxFlex>
|
||||
|
||||
<md-input-container>
|
||||
<input mdInput name="from"
|
||||
placeholder="From"
|
||||
formControlName="from"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
<input mdInput name="from"
|
||||
placeholder="From"
|
||||
formControlName="from"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container ng-class="{'hidden-cc': vm.hiddenCC, 'hidden-bcc': vm.hiddenBCC}">
|
||||
<input mdInput name="to"
|
||||
placeholder="To"
|
||||
formControlName="to"
|
||||
type="email" required>
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
<input mdInput name="to"
|
||||
placeholder="To"
|
||||
formControlName="to"
|
||||
type="email" required>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
<input mdInput
|
||||
name="cc"
|
||||
placeholder="Cc"
|
||||
formControlName="cc"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
<input mdInput
|
||||
name="cc"
|
||||
placeholder="Cc"
|
||||
formControlName="cc"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
<input mdInput
|
||||
name="bcc"
|
||||
placeholder="Bcc"
|
||||
formControlName="bcc"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
<input mdInput
|
||||
name="bcc"
|
||||
placeholder="Bcc"
|
||||
formControlName="bcc"
|
||||
type="email">
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
<input mdInput name="subject"
|
||||
placeholder="Subject"
|
||||
formControlName="subject">
|
||||
</md-input-container>
|
||||
<md-input-container>
|
||||
<input mdInput name="subject"
|
||||
placeholder="Subject"
|
||||
formControlName="subject">
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container>
|
||||
<md-input-container>
|
||||
<textarea mdInput name="message"
|
||||
placeholder="Message"
|
||||
formControlName="message"
|
||||
rows="6">
|
||||
</textarea>
|
||||
</md-input-container>
|
||||
</md-input-container>
|
||||
|
||||
<div class="attachment-list">
|
||||
<div class="attachment-list">
|
||||
|
||||
<div class="attachment" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<span class="filename">attachment-2.doc</span>
|
||||
<span class="size">(12 Kb)</span>
|
||||
<div class="attachment" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<span class="filename">attachment-2.doc</span>
|
||||
<span class="size">(12 Kb)</span>
|
||||
</div>
|
||||
|
||||
<button md-icon-button aria-label="Delete attachment">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button md-icon-button aria-label="Delete attachment">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="attachment" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<span class="filename">attachment-1.jpg</span>
|
||||
<span class="size">(350 Kb)</span>
|
||||
</div>
|
||||
|
||||
<div class="attachment" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<span class="filename">attachment-1.jpg</span>
|
||||
<span class="size">(350 Kb)</span>
|
||||
<button md-icon-button aria-label="Delete attachment">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button md-icon-button aria-label="Delete attachment">
|
||||
<md-icon class="s-16">close</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<button md-raised-button
|
||||
(click)="dialogRef.close(['send',composeForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="composeForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SEND
|
||||
</button>
|
||||
|
||||
<button md-icon-button md-tooltip="Attach a file">
|
||||
<md-icon>attach_file</md-icon>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<button md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',composeForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
<div md-dialog-actions class="m-0 p-16" fxLayout="row" fxLayoutAlign="space-between center">
|
||||
<div>
|
||||
<button md-raised-button
|
||||
(click)="dialogRef.close(['send',composeForm])"
|
||||
class="save-button mat-accent"
|
||||
[disabled]="composeForm.invalid"
|
||||
aria-label="SAVE">
|
||||
SEND
|
||||
</button>
|
||||
|
||||
<button md-icon-button md-tooltip="Attach a file">
|
||||
<md-icon>attach_file</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button md-button
|
||||
class="mat-icon-button"
|
||||
(click)="dialogRef.close(['delete',composeForm])"
|
||||
aria-label="Delete"
|
||||
md-tooltip="Delete">
|
||||
<md-icon>delete</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.mail-compose-dialog {
|
||||
.mat-dialog-container {
|
||||
padding: 0;
|
||||
width: 720px;
|
||||
|
||||
.compose-form {
|
||||
|
||||
|
||||
.mat-input-container {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -36,4 +31,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-content-wrapper {
|
||||
max-height: 85vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div *ngIf="!mail" fxLayout="column" fxLayoutAlign="center center" fxFlex>
|
||||
<md-icon class="s-128 mb-16">email</md-icon>
|
||||
<span class="select-message-text hint-text">Select a message to read</span>
|
||||
<md-icon class="s-128 mb-16 select-message-icon" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'300ms',scale:'0.2'}}">email</md-icon>
|
||||
<span class="select-message-text hint-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'400ms'}}">Select a message to read</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="mail">
|
||||
@@ -85,7 +85,7 @@
|
||||
</div>
|
||||
|
||||
<button md-button [mdMenuTriggerFor]="moreMenu" aria-label="More" class="mat-icon-button"
|
||||
ng-click="$mdOpenMenu($event)">
|
||||
(click)="$event.stopPropagation()">
|
||||
<md-icon>more_vert</md-icon>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { MailService } from '../mail.service';
|
||||
import { Mail } from '../mail.model';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-mail-details',
|
||||
templateUrl: './mail-details.component.html',
|
||||
styleUrls : ['./mail-details.component.scss']
|
||||
styleUrls : ['./mail-details.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseMailDetailsComponent implements OnInit, OnDestroy
|
||||
{
|
||||
|
||||
@@ -1,52 +1,67 @@
|
||||
<div fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<md-checkbox [(ngModel)]="selected" (ngModelChange)="onSelectedChange()" (click)="$event.stopPropagation();"></md-checkbox>
|
||||
<md-checkbox [(ngModel)]="selected" (ngModelChange)="onSelectedChange()"
|
||||
(click)="$event.stopPropagation();"></md-checkbox>
|
||||
|
||||
<div class="info" fxFlex FlexLayout="column">
|
||||
|
||||
<div class="name" fxLayout="row" fxLayoutAlign="start center">
|
||||
<div class="row-1" fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/>
|
||||
|
||||
<div class="avatar" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div>
|
||||
|
||||
<span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span>
|
||||
|
||||
<md-icon *ngIf="mail.hasAttachments">attachment</md-icon>
|
||||
</div>
|
||||
|
||||
<div class="subject text-truncate">
|
||||
{{mail.subject}}
|
||||
</div>
|
||||
|
||||
<div class="message text-truncate" *ngIf="mail?.message">
|
||||
|
||||
{{mail.message | htmlToPlaintext | slice:0:180}}{{mail.message.length > 180 ? '...' : ''}}
|
||||
</div>
|
||||
|
||||
<div class="labels" fxLayout="row" fxLayoutWrap>
|
||||
<div class="label" *ngFor="let labelId of mail.labels"
|
||||
fxLayout="row" fxLayoutAlign="start center">
|
||||
<div class="label-color" [ngStyle]="{'background-color': labels | getById:labelId:'color'}"></div>
|
||||
<div class="label-title">{{labels | getById:labelId:'title'}}</div>
|
||||
<div class="name" fxLayout="row" fxLayoutAlign="start center" fxFlex>
|
||||
<img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/>
|
||||
<div class="avatar" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div>
|
||||
<span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span>
|
||||
<md-icon *ngIf="mail.hasAttachments">attachment</md-icon>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<div class="time">{{mail.time}}</div>
|
||||
|
||||
<!--<div class="actions" fxLayout="row" fxLayoutAlign="start center" fxHide fxShow.gt-sm>
|
||||
|
||||
<button md-button class="mat-icon-button" (click)="toggleStar($event)" aria-label="Toggle star">
|
||||
<md-icon *ngIf="mail.starred">star</md-icon>
|
||||
<md-icon *ngIf="!mail.starred">star_outline</md-icon>
|
||||
</button>
|
||||
|
||||
<button md-button class="mat-icon-button" (click)="toggleImportant($event)"
|
||||
aria-label="Toggle important">
|
||||
<md-icon *ngIf="mail.important">label</md-icon>
|
||||
<md-icon *ngIf="!mail.important">label_outline</md-icon>
|
||||
</button>
|
||||
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row-2" fxLayout="row" fxLayoutAlign="start center">
|
||||
|
||||
<div fxLayout="column" fxLayoutAlign="start start">
|
||||
|
||||
<div class="subject text-truncate">
|
||||
{{mail.subject}}
|
||||
</div>
|
||||
|
||||
<div class="message text-truncate" *ngIf="mail?.message">
|
||||
{{mail.message | htmlToPlaintext | slice:0:180}}{{mail.message.length > 180 ? '...' : ''}}
|
||||
</div>
|
||||
|
||||
<div class="labels" fxLayout="row" fxLayoutWrap fxHide fxShow.gt-sm>
|
||||
<div class="label" *ngFor="let labelId of mail.labels"
|
||||
fxLayout="row" fxLayoutAlign="start center">
|
||||
<div class="label-color"
|
||||
[ngStyle]="{'background-color': labels | getById:labelId:'color'}"></div>
|
||||
<div class="label-title">{{labels | getById:labelId:'title'}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div fxLayout="column" fxLayoutAlign="space-between end">
|
||||
|
||||
<div class="time">{{mail.time}}</div>
|
||||
|
||||
<div class="actions" fxLayout="row" fxLayoutAlign="start center">
|
||||
<button md-button class="mat-icon-button" (click)="toggleStar($event)" aria-label="Toggle star">
|
||||
<md-icon *ngIf="mail.starred">star</md-icon>
|
||||
<md-icon *ngIf="!mail.starred">star_outline</md-icon>
|
||||
</button>
|
||||
|
||||
<button md-button class="mat-icon-button" (click)="toggleImportant($event)" aria-label="Toggle important">
|
||||
<md-icon *ngIf="mail.important">label</md-icon>
|
||||
<md-icon *ngIf="!mail.important">label_outline</md-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,16 +12,19 @@
|
||||
|
||||
.info {
|
||||
|
||||
.name,
|
||||
.subject {
|
||||
.name {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.message {
|
||||
}
|
||||
.row-2 {
|
||||
|
||||
.labels {
|
||||
background: #FFFFFF;
|
||||
.subject {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.labels {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,12 +34,11 @@
|
||||
|
||||
.info {
|
||||
|
||||
.message {
|
||||
.row-2 {
|
||||
|
||||
}
|
||||
|
||||
.labels {
|
||||
background: #FFF8E1;
|
||||
.labels {
|
||||
background: #FFF8E1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,10 +48,11 @@
|
||||
|
||||
.info {
|
||||
|
||||
.message {
|
||||
}
|
||||
.labels {
|
||||
background: #E3F2FD;
|
||||
.row-2 {
|
||||
|
||||
.labels {
|
||||
background: #E3F2FD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,68 +60,70 @@
|
||||
.info {
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
margin: 0 16px;
|
||||
margin-left: 16px;
|
||||
position: relative;
|
||||
|
||||
.name {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
padding-bottom: 8px;
|
||||
.row-1 {
|
||||
margin-bottom: 8px;
|
||||
|
||||
.avatar {
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background-color: mat-color($accent);
|
||||
.name {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
|
||||
.avatar {
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
background-color: mat-color($accent);
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
margin-left: 4px;
|
||||
|
||||
.mat-icon-button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.subject {
|
||||
.row-2 {
|
||||
|
||||
}
|
||||
.subject,
|
||||
.message {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.message {
|
||||
position: relative;
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
}
|
||||
.message {
|
||||
position: relative;
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
}
|
||||
|
||||
.labels {
|
||||
position: absolute;
|
||||
background: #FAFAFA;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding-left: 6px;
|
||||
.labels {
|
||||
position: absolute;
|
||||
background: #FFFFFF;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding-left: 6px;
|
||||
|
||||
.label {
|
||||
font-size: 11px;
|
||||
border-radius: 2px;
|
||||
margin: 0 4px 0 0;
|
||||
padding: 3px 8px;
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
.label {
|
||||
font-size: 11px;
|
||||
border-radius: 2px;
|
||||
margin: 0 4px 0 0;
|
||||
padding: 3px 8px;
|
||||
background-color: rgba(0, 0, 0, 0.08);
|
||||
|
||||
.label-color {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin-right: 8px;
|
||||
border-radius: 50%;
|
||||
.label-color {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin-right: 8px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
margin: 0 8px 6px 8px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
|
||||
.md-icon-button {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<span class="no-messages-text hint-text">There are no messages!</span>
|
||||
</div>
|
||||
|
||||
<fuse-mail-list-item md-ripple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)"
|
||||
[ngClass]="{'current-mail':mail?.id == currentMail?.id}">
|
||||
</fuse-mail-list-item>
|
||||
<div class="mail-list" *fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
<fuse-mail-list-item md-ripple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)"
|
||||
[ngClass]="{'current-mail':mail?.id == currentMail?.id}"
|
||||
[@animate]="{value:'*',params:{y:'100%'}}">
|
||||
</fuse-mail-list-item>
|
||||
</div>
|
||||
|
||||
@@ -11,4 +11,11 @@
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.mail-list {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,13 @@ import { ActivatedRoute } from '@angular/router';
|
||||
import { MailService } from '../mail.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { fuseAnimations } from '../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-mail-list',
|
||||
templateUrl: './mail-list.component.html',
|
||||
styleUrls : ['./mail-list.component.scss']
|
||||
styleUrls : ['./mail-list.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseMailListComponent implements OnInit, OnDestroy
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div id="mail" class="page-layout carded left-sidenav" perfect-scrollbar>
|
||||
<div id="mail" class="page-layout carded left-sidenav" fusePerfectScrollbar>
|
||||
|
||||
<!-- TOP BACKGROUND -->
|
||||
<div class="top-bg md-accent-bg"></div>
|
||||
@@ -42,7 +42,7 @@
|
||||
<!-- CONTENT TOOLBAR -->
|
||||
<div class="toolbar px-24 py-8">
|
||||
|
||||
<div fxFlex="row" fxLayoutAlign="start center">
|
||||
<div class="mail-selection" fxFlex="row" fxLayoutAlign="start center">
|
||||
<md-checkbox (click)="toggleSelectAll()" [checked]="hasSelectedMails"
|
||||
[indeterminate]="isIndeterminate"></md-checkbox>
|
||||
|
||||
@@ -96,9 +96,9 @@
|
||||
<!-- CONTENT -->
|
||||
<div class="content" fxLayoutAlign="row">
|
||||
|
||||
<fuse-mail-list perfect-scrollbar fxFlex></fuse-mail-list>
|
||||
<fuse-mail-list fusePerfectScrollbar fxFlex></fuse-mail-list>
|
||||
|
||||
<fuse-mail-details perfect-scrollbar fxFlex></fuse-mail-details>
|
||||
<fuse-mail-details fusePerfectScrollbar fxFlex></fuse-mail-details>
|
||||
|
||||
</div>
|
||||
<!-- / CONTENT -->
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
|
||||
@include media-breakpoint(xs) {
|
||||
|
||||
fuse-mail-list {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
fuse-mail-list,
|
||||
fuse-mail-details {
|
||||
flex: 1 0 100%;
|
||||
@@ -51,6 +55,14 @@
|
||||
|
||||
&.current-mail-selected {
|
||||
|
||||
.toolbar {
|
||||
padding-left: 16px !important;
|
||||
|
||||
.mail-selection {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
fuse-mail-list {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { Http } from '@angular/http';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Mail } from './mail.model';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { FuseUtils } from 'app/core/fuseUtils';
|
||||
@@ -28,7 +28,7 @@ export class MailService implements Resolve<any>
|
||||
onLabelsChanged: BehaviorSubject<any> = new BehaviorSubject([]);
|
||||
onSearchTextChanged: BehaviorSubject<any> = new BehaviorSubject('');
|
||||
|
||||
constructor(private http: Http)
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
this.selectedMails = [];
|
||||
}
|
||||
@@ -88,8 +88,8 @@ export class MailService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/mail-folders')
|
||||
.subscribe(response => {
|
||||
this.folders = response.json().data;
|
||||
.subscribe((response: any) => {
|
||||
this.folders = response.data;
|
||||
this.onFoldersChanged.next(this.folders);
|
||||
resolve(this.folders);
|
||||
}, reject);
|
||||
@@ -104,8 +104,8 @@ export class MailService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/mail-filters')
|
||||
.subscribe(response => {
|
||||
this.filters = response.json().data;
|
||||
.subscribe((response: any) => {
|
||||
this.filters = response.data;
|
||||
this.onFiltersChanged.next(this.filters);
|
||||
resolve(this.filters);
|
||||
}, reject);
|
||||
@@ -120,8 +120,8 @@ export class MailService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/mail-labels')
|
||||
.subscribe(response => {
|
||||
this.labels = response.json().data;
|
||||
.subscribe((response: any) => {
|
||||
this.labels = response.data;
|
||||
this.onLabelsChanged.next(this.labels);
|
||||
resolve(this.labels);
|
||||
}, reject);
|
||||
@@ -157,14 +157,14 @@ export class MailService implements Resolve<any>
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
this.http.get('api/mail-folders?handle=' + handle)
|
||||
.subscribe(folders => {
|
||||
.subscribe((folders: any) => {
|
||||
|
||||
const folderId = folders.json().data[0].id;
|
||||
const folderId = folders.data[0].id;
|
||||
|
||||
this.http.get('api/mail-mails?folder=' + folderId)
|
||||
.subscribe(mails => {
|
||||
.subscribe((mails: any) => {
|
||||
|
||||
this.mails = mails.json().data.map(mail => {
|
||||
this.mails = mails.data.map(mail => {
|
||||
return new Mail(mail);
|
||||
});
|
||||
|
||||
@@ -189,9 +189,9 @@ export class MailService implements Resolve<any>
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
this.http.get('api/mail-mails?' + handle + '=true')
|
||||
.subscribe(mails => {
|
||||
.subscribe((mails: any) => {
|
||||
|
||||
this.mails = mails.json().data.map(mail => {
|
||||
this.mails = mails.data.map(mail => {
|
||||
return new Mail(mail);
|
||||
});
|
||||
|
||||
@@ -214,14 +214,14 @@ export class MailService implements Resolve<any>
|
||||
{
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http.get('api/mail-labels?handle=' + handle)
|
||||
.subscribe(labels => {
|
||||
.subscribe((labels: any) => {
|
||||
|
||||
const labelId = labels.json().data[0].id;
|
||||
const labelId = labels.data[0].id;
|
||||
|
||||
this.http.get('api/mail-mails?labels=' + labelId)
|
||||
.subscribe(mails => {
|
||||
.subscribe((mails: any) => {
|
||||
|
||||
this.mails = mails.json().data.map(mail => {
|
||||
this.mails = mails.data.map(mail => {
|
||||
return new Mail(mail);
|
||||
});
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<div fxLayout="column" fxLayoutAlign="space-between start"
|
||||
class="header p-24 md-accent-bg" class.gt-md="header p-24 white-fg">
|
||||
<div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center">
|
||||
<md-icon class="logo-icon s-32">mail</md-icon>
|
||||
<span class="logo-text">Mailbox</span>
|
||||
<md-icon class="logo-icon s-32" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">mail</md-icon>
|
||||
<span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Mailbox</span>
|
||||
</div>
|
||||
|
||||
<div class="account" fxLayout="column">
|
||||
<div class="account" fxLayout="column" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'300ms'}}">
|
||||
<div class="title">John Doe</div>
|
||||
<md-select class="account-selection" placeholder="Mail Selection"
|
||||
floatPlaceholder="never"
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- / SIDENAV HEADER -->
|
||||
|
||||
<!-- SIDENAV CONTENT -->
|
||||
<div class="content" perfect-scrollbar>
|
||||
<div class="content" fusePerfectScrollbar *fuseIfOnDom [@animate]="{value:'*',params:{y:'50px'}}">
|
||||
|
||||
<div class="p-24">
|
||||
<button md-raised-button fxFlex
|
||||
|
||||
@@ -4,11 +4,13 @@ import { Subscription } from 'rxjs/Subscription';
|
||||
import { FuseMailComposeDialogComponent } from '../../dialogs/compose/compose.component';
|
||||
import { MdDialog } from '@angular/material';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { fuseAnimations } from '../../../../../../core/animations';
|
||||
|
||||
@Component({
|
||||
selector : 'fuse-mail-main-sidenav',
|
||||
templateUrl: './main-sidenav.component.html',
|
||||
styleUrls : ['./main-sidenav.component.scss']
|
||||
styleUrls : ['./main-sidenav.component.scss'],
|
||||
animations : fuseAnimations
|
||||
})
|
||||
export class FuseMailMainSidenavComponent implements OnInit, OnDestroy
|
||||
{
|
||||
|
||||
@@ -50,11 +50,12 @@
|
||||
</div>
|
||||
<!-- / HEADER -->
|
||||
|
||||
<div fxFlex class="board-content-wrapper p-16 p-md-24">
|
||||
<div fxFlex class="board-content-wrapper p-16 p-md-24" [class]="board.settings.color+'-100-bg'">
|
||||
|
||||
<!-- BOARD -->
|
||||
<div class="board-content ngx-dnd-container p-16 p-md-24" [class]="board.settings.color+'-100-bg'" fxLayout="row"
|
||||
ngxDroppable="list" [model]="board.lists" (out)="onDrop($event)">
|
||||
<div class="board-content ngx-dnd-container p-16 p-md-24" fxLayout="row"
|
||||
ngxDroppable="list" [model]="board.lists" (out)="onDrop($event)"
|
||||
*fuseIfOnDom [@animateStagger]="{value:'50'}">
|
||||
|
||||
<!-- LIST -->
|
||||
<fuse-scrumboard-board-list
|
||||
@@ -62,12 +63,15 @@
|
||||
ngxDraggable
|
||||
*ngFor="let list of board.lists"
|
||||
[model]="list"
|
||||
[list]="list">
|
||||
[list]="list"
|
||||
[@animate]="{value:'*',params:{duration:'350ms',x:'100%'}}">
|
||||
</fuse-scrumboard-board-list>
|
||||
<!-- / LIST -->
|
||||
|
||||
<!-- NEW LIST BUTTON-->
|
||||
<fuse-scrumboard-board-add-list class="new-list-wrapper" (onlistAdd)="onListAdd($event)"></fuse-scrumboard-board-add-list>
|
||||
<fuse-scrumboard-board-add-list class="new-list-wrapper" (onlistAdd)="onListAdd($event)"
|
||||
[@animate]="{value:'*',params:{duration:'350ms',x:'100%'}}">
|
||||
</fuse-scrumboard-board-add-list>
|
||||
<!-- / NEW LIST BUTTON-->
|
||||
|
||||
</div>
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
|
||||
.board-content-wrapper {
|
||||
position: relative;
|
||||
background: #E5E7E8;
|
||||
|
||||
.board-content {
|
||||
position: absolute;
|
||||
@@ -108,7 +109,6 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
background: #E5E7E8;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user