Compare commits

...

72 Commits

Author SHA1 Message Date
sercan
430fe0c0c1 Fixed: Forgot to change the font families 2018-10-19 10:43:48 +03:00
sercan
8118f94b50 Small tweaks 2018-10-19 10:19:39 +03:00
sercan
83ba318fb7 Updated the main config files 2018-10-19 08:59:46 +03:00
sercan
1dd59db09f Added images for Angular Material examples 2018-10-19 08:59:35 +03:00
sercan
60ab983730 Updated Angular Material elements
Updated the changelog
2018-10-19 00:31:01 +03:00
sercan
6fadc29e4c Updated Angular, Angular Material and various other libraries 2018-10-19 00:30:39 +03:00
sercan
4da339cef1 (FusePerfectScrollbar) Unbind 'keydown' events of the PerfectScrollbar instances. This fixes the Angular Material inputs' high CPU usage.. The real problem is in the Angular Material library but we cannot do anything about it so we have removed the keyboard events of the PerfectScrollbar which resolves this years long issue. 2018-10-12 23:59:03 +03:00
sercan
cbd1c3e21c (Mail) Small tweaks
(Mail-ngrx) Small tweaks
(FAQ) Small tweaks
(KnowledgeBase) Small tweaks
2018-10-11 20:03:57 +03:00
sercan
e67887f379 (Mail-ngrx) Fixed a small issue 2018-10-11 19:28:06 +03:00
sercan
eeed00b30e (E-Commerce) Matched search fields styles to the rest of the apps
(Contacts) Search field doesn't span to the full width of its container
2018-10-11 19:27:38 +03:00
sercan
06c8903f91 (Navigation) Added missing icon for UI/Cards menu 2018-10-10 12:25:01 +03:00
sercan
23b943a765 Modernizations 2018-10-10 12:20:12 +03:00
sercan
8961d75241 (FuseNavigation) Merge the subscriptions
(FuseNavigationDocs) Updated the docs
2018-10-08 19:01:49 +03:00
sercan
ab7bd882a0 (FuseNavigation) Moved the changeDetection strategy to OnPush to improve the performance and allow for huge amounts of navigation items
(FuseNavigation) Use service to update the menu items
(FuseNavigationDocs) Updated the docs
2018-10-08 12:36:15 +03:00
sercan
63bd95ea1e (Coming Soon) Simplified the form error messages 2018-10-04 12:21:46 +03:00
sercan
98297ea787 Fuse Modernization continues... 2018-10-04 12:14:54 +03:00
sercan
5251a6305f Used 'Muli' as the primary font
Increased the font-weight 500s to 600s
Small tweaks
2018-09-24 11:18:07 +03:00
sercan
790549a92d Update Angular, Angular Material and various other packages
Set the Fuse version to 7.0.0
2018-09-21 12:21:58 +03:00
sercan
0643d8c348 (Global) Use 'Nunito' as a primary font
(Global) Use outline Material Icons
(Global) Removed some unnecessary styles and moved some of them to the related places
2018-09-21 12:21:04 +03:00
sercan
c2d5a5a2a5 (Scrumboard) Fixed: Undefined matDialogRef
(Calendar) Fixed: Undefined matDialogRef
(Calendar) Updated angular-calendar
2018-09-21 11:38:11 +03:00
Sercan Yemen
94275c507f Fixed: Extra padding on print layout because of the sidebar 2018-09-03 11:34:02 +03:00
Sercan Yemen
31b4c300f0 Updated the changelog navigation item tag 2018-08-30 11:20:04 +03:00
Sercan Yemen
768d20c481 Updated the changelog 2018-08-30 10:57:23 +03:00
Sercan Yemen
b2a28c36ed Updated the changelog 2018-08-30 10:56:57 +03:00
Sercan Yemen
7dc0892c83 (Toolbar) Fixed: Custom bg color cannot be applied to the toolbar background 2018-08-30 10:56:46 +03:00
Sercan Yemen
ef216718b9 Updated Angular to 6.1.6 2018-08-30 10:51:13 +03:00
Sercan Yemen
f337df17e4 Small tweak in forms page 2018-08-28 08:47:27 +03:00
Sercan Yemen
ed9c024e13 Sidenav helper fixes 2018-08-28 08:38:17 +03:00
Sercan Yemen
94d9118df7 Updated changelog 2018-08-28 08:19:13 +03:00
Sercan Yemen
a5b6e545a7 Added return types 2018-08-28 08:07:28 +03:00
Sercan Yemen
0b2af161f4 (MailNgrx) Fixed depreciated ngrx/rxjs stuff 2018-08-28 08:07:17 +03:00
Sercan Yemen
9630d0154f Updated various packages 2018-08-28 07:56:57 +03:00
Sercan Yemen
62b64cb78c Updated Angular Material element examples 2018-08-28 07:53:09 +03:00
Sercan Yemen
8fc20fef8f Example viewer style tweaks 2018-08-28 07:44:05 +03:00
Sercan Yemen
8b97e6623b (ExampleViewer) Updated style and theming compatibility 2018-08-28 07:15:58 +03:00
Sercan Yemen
a184be1650 Various fixes 2018-08-28 07:03:19 +03:00
Sercan Yemen
09bd4b9fee (Colors) Fixed: primary, accent and warn color classes don't obey the palettes' selected default hue value when used by themselves (without the -hue suffix) 2018-08-27 20:55:36 +03:00
Sercan Yemen
d8782a78d5 (AppComponent) Small tweak for IE11 compatibility 2018-08-27 20:36:27 +03:00
Sercan Yemen
c4e338cda1 (Academy) IE11 fixes 2018-08-27 19:31:30 +03:00
Sercan Yemen
77c05ce4e0 (PageLayouts) IE11 fixes 2018-08-27 15:47:20 +03:00
Sercan Yemen
e92f34b38f (Theming) Color themes 2018-08-27 12:28:57 +03:00
Sercan Yemen
ecbc370064 (FuseConfig) Only reset the layout object on route changes 2018-08-27 12:28:39 +03:00
Sercan Yemen
498b9647e6 (FuseConfig) Only reset the layout object on route changes 2018-08-27 12:28:20 +03:00
Sercan Yemen
962df7fe9a (FuseConfig) Use RoutesRecognized event for better layout resetting especially on lazily loaded routes 2018-08-27 11:50:53 +03:00
Sercan Yemen
763111aae3 (ThemeOptions) Changed the navigation secondary background color 2018-08-27 10:06:47 +03:00
Sercan Yemen
715e77776e No need for body and html modifications in the reset.scss 2018-08-27 10:06:19 +03:00
Sercan Yemen
c8c0b4a609 (Navbar) Correctly delay the update of the perfect scrollbar + Fixed the style-1 color issue 2018-08-27 10:05:48 +03:00
Sercan Yemen
5d62c58725 Added docs for Material theming 2018-08-27 08:23:11 +03:00
Sercan Yemen
34ffe7e53b Updated Angular and Angular Material 2018-08-26 18:30:19 +03:00
Sercan Yemen
6960a2ba26 (Theming) Dark theme + Ability to use multiple themes 2018-08-26 18:30:01 +03:00
Sercan Yemen
27dbbef6e1 (DemoComponent) Updated the demo component for better page layout demos 2018-08-26 18:29:03 +03:00
Sercan Yemen
f7f3a60ff5 (MatchMediaService) Added a debounce so that the layout changes can work a lot more stable on media changes 2018-08-26 10:56:34 +03:00
Sercan Yemen
08e2d5f331 (FuseCountdown) Fixed: Timer doesn't show up immediately 2018-08-20 18:24:57 +03:00
Sercan Yemen
fee608cb44 (AppComponent) Added a note about the Angular Translate module 2018-08-17 13:07:01 +03:00
Sercan Yemen
343d7902fa (ECommerce) Removed e-commerce dashboard as it's very outdated and doesn't really add something 2018-08-11 10:04:29 +03:00
Sercan Yemen
927b4fd322 (Forms) Simplified the form examples 2018-08-11 09:06:03 +03:00
Sercan Yemen
a52b1f7687 (AppComponent) Added a note about the Angular Translate module 2018-08-11 09:02:05 +03:00
Sercan Yemen
0331db4384 (FuseNavigation) Fixed: Collapsable menu items are not working if they are placed in the root (without a group) 2018-07-31 09:36:50 +03:00
Sercan Yemen
0f1048cb3c (FuseMaterialColorPicker) Greatly simplified the color picker, added reactive forms support and improved its design, closes #79 2018-07-26 14:10:35 +03:00
Sercan Yemen
bbd59ab6c3 (FuseProgressBar) Hide the progress bar on NavigationCancel and NavigationError, closes #81 2018-07-26 10:33:23 +03:00
Sercan Yemen
620583f99c (SplashScreen) Improved the codebase of the service 2018-07-26 10:32:02 +03:00
Sercan Yemen
e49771a5e0 (AngularCLI) Turned off the "showCircularDependencies" option 2018-07-26 09:11:03 +03:00
Sercan Yemen
42095bfe26 (Layouts) Removed "transform: translateZ(0)" from styles as they don't need them anymore 2018-07-26 09:10:17 +03:00
Sercan Yemen
0d2b5a9662 (Contacts) Fixed: matDialogRef variable is not correct 2018-07-25 07:11:30 +03:00
Sercan Yemen
1d1ac4b04a (Helpers) Comment styles 2018-07-17 15:14:19 +03:00
Sercan Yemen
6afa55bb0f (QuickPanel) Fixed: Custom scrollbar 2018-07-17 15:06:41 +03:00
Sercan Yemen
8454526ef5 (ThemeOptions) Fixed: Sidepanel settings are not resetting when layout changes 2018-07-17 13:02:11 +03:00
Sercan Yemen
f8292af81e (ECommerce) Fixed: Order page custom scrollbar is not working 2018-07-17 13:01:44 +03:00
Sercan Yemen
46a0ac1aa9 (Docs) Updated fuseConfig docs 2018-07-17 12:30:15 +03:00
Sercan Yemen
37d5e097b5 (QuickPanel) Fixed: Perfect scrollbar is not available 2018-07-17 12:26:16 +03:00
Sercan Yemen
92d7986c8a Increased the Fuse version
Updated the changelog
2018-07-17 12:25:39 +03:00
Sercan Yemen
38177c3d68 Increased the Fuse version
Updated the changelog
2018-07-17 12:25:32 +03:00
761 changed files with 24538 additions and 16873 deletions

16
CREDITS Normal file
View File

@@ -0,0 +1,16 @@
// -----------------------------------------------------------------------------------------------------
// @ Image/Vector/Icon Credits
// -----------------------------------------------------------------------------------------------------
Avatars - https://uifaces.co/
Flag icons - http://www.famfamfam.com/lab/icons/flags/
Frame vector created by Freepik - https://www.freepik.com/free-photos-vectors/frame
A Walk Amongst Friends - Photo by Kristin Ellis on Unsplash - https://unsplash.com/photos/CbZOGbazDWQ
Sunrise at Moraine Lake - Photo by Marlon Martinez on Unsplash - https://unsplash.com/photos/woNYcfrnp9M
Braies Lake - Photo by Luca Nicoletti on Unsplash - https://unsplash.com/photos/dH-L5zPcv3E
Lago di Sorapis - Photo by eberhard grossgasteiger on Unsplash - https://unsplash.com/photos/6uDg_zb20EM
Lago di Braies - Photo by Salmen Bejaoui on Unsplash - https://unsplash.com/photos/uXTozY3CcQg
Reaching - Photo by Justin Novello on Unsplash - https://unsplash.com/photos/Y14TNvIDllM
Yosemite - Photo by Tim Mossholder on Unsplash - https://unsplash.com/photos/ZCrtRSSUpGI
Never Stop Changing - Photo by John Westrock on Unsplash - https://unsplash.com/photos/_GY56uSG70U
Fall glow - Photo by Casey Horner on Unsplash - https://unsplash.com/photos/gz19zOdgN7w
First snow - Photo by eberhard grossgasteiger on Unsplash - https://unsplash.com/photos/LRrGf6dBjA4

View File

@@ -1 +1,2 @@
https://themeforest.net/licenses/terms/regular
This project is protected by Envato's Regular License. For more information,
check the official license page at https://themeforest.net/licenses/terms/regular

View File

@@ -1,6 +1,6 @@
# Fuse - Angular
Material Design Admin Template with Angular 6+ and Angular Material
Material Design Admin Template with Angular 7+ and Angular Material
## The Community

View File

@@ -30,7 +30,8 @@
"styles": [
"src/styles.scss"
],
"scripts": []
"scripts": [],
"showCircularDependencies": false
},
"configurations": {
"production": {
@@ -48,7 +49,14 @@
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"ec": {
"sourceMap": true,
@@ -96,7 +104,7 @@
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"styles.scss"
"src/styles.scss"
],
"scripts": [],
"assets": [
@@ -124,12 +132,18 @@
"fuse-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "fuse:serve"
},
"configurations": {
"production": {
"devServerTarget": "fuse:serve:production"
}
}
},
"lint": {

View File

@@ -1,14 +1,14 @@
import { Fuse2Page } from './app.po';
import { FusePage } from './app.po';
describe('Fuse2 App', () => {
let page: Fuse2Page;
describe('Fuse App', () => {
let page: FusePage;
beforeEach(() => {
page = new Fuse2Page();
page = new FusePage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to Fuse2!');
expect(page.getParagraphText()).toEqual('Welcome to Fuse!');
});
});

View File

@@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor';
export class Fuse2Page {
navigateTo() {
export class FusePage {
navigateTo(): any {
return browser.get('/');
}
getParagraphText() {
return element(by.css('app-root h1')).getText();
getParagraphText(): any {
return element(by.css('app #main')).getText();
}
}

9737
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "fuse",
"version": "6.2.4",
"version": "7.0.0",
"license": "https://themeforest.net/licenses/terms/regular",
"scripts": {
"ng": "ng",
@@ -18,71 +18,73 @@
},
"private": true,
"dependencies": {
"@agm/core": "1.0.0-beta.3",
"@angular/animations": "6.0.9",
"@angular/cdk": "6.3.3",
"@angular/common": "6.0.9",
"@angular/compiler": "6.0.9",
"@angular/core": "6.0.9",
"@angular/flex-layout": "6.0.0-beta.16",
"@angular/forms": "6.0.9",
"@angular/http": "6.0.9",
"@angular/material": "6.3.3",
"@angular/material-moment-adapter": "6.3.3",
"@angular/platform-browser": "6.0.9",
"@angular/platform-browser-dynamic": "6.0.9",
"@angular/router": "6.0.9",
"@ngrx/effects": "6.0.1",
"@ngrx/router-store": "6.0.1",
"@ngrx/store": "6.0.1",
"@ngrx/store-devtools": "6.0.1",
"@agm/core": "1.0.0-beta.5",
"@angular/animations": "7.0.0",
"@angular/cdk": "7.0.0",
"@angular/common": "7.0.0",
"@angular/compiler": "7.0.0",
"@angular/core": "7.0.0",
"@angular/flex-layout": "7.0.0-beta.19",
"@angular/forms": "7.0.0",
"@angular/http": "7.0.0",
"@angular/material": "7.0.0",
"@angular/material-moment-adapter": "7.0.0",
"@angular/platform-browser": "7.0.0",
"@angular/platform-browser-dynamic": "7.0.0",
"@angular/router": "7.0.0",
"@ngrx/effects": "6.1.0",
"@ngrx/router-store": "6.1.0",
"@ngrx/store": "6.1.0",
"@ngrx/store-devtools": "6.1.0",
"@ngx-translate/core": "10.0.2",
"@swimlane/ngx-charts": "8.1.0",
"@swimlane/ngx-datatable": "13.0.1",
"@swimlane/ngx-dnd": "4.0.0",
"@swimlane/dragula": "3.7.3",
"@swimlane/ngx-charts": "9.0.0",
"@swimlane/ngx-datatable": "13.1.0",
"@swimlane/ngx-dnd": "5.1.0",
"@types/prismjs": "1.9.0",
"angular-calendar": "0.25.2",
"angular-in-memory-web-api": "0.6.0",
"chart.js": "2.7.2",
"angular-calendar": "0.26.3",
"angular-in-memory-web-api": "0.6.1",
"chart.js": "2.7.3",
"classlist.js": "1.1.20150312",
"core-js": "2.5.7",
"d3": "5.5.0",
"d3": "5.7.0",
"date-fns": "1.29.0",
"hammerjs": "2.0.8",
"lodash": "4.17.10",
"lodash": "4.17.11",
"moment": "2.22.2",
"ng2-charts": "1.6.0",
"ngrx-store-freeze": "0.2.4",
"ngx-color-picker": "6.5.0",
"ngx-color-picker": "6.7.0",
"ngx-cookie-service": "1.0.10",
"perfect-scrollbar": "1.4.0",
"prismjs": "1.15.0",
"rxjs": "6.2.1",
"rxjs-compat": "6.2.1",
"rxjs": "6.3.3",
"rxjs-compat": "6.3.3",
"web-animations-js": "2.3.1",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "6.0.8",
"@angular/compiler-cli": "6.0.9",
"@angular/language-service": "6.0.9",
"@angular-devkit/build-angular": "0.6.8",
"@angular/cli": "7.0.1",
"@angular/compiler-cli": "7.0.0",
"@angular/language-service": "7.0.0",
"@angular-devkit/build-angular": "0.10.1",
"@angularclass/hmr": "2.1.3",
"@types/jasmine": "2.8.8",
"@types/jasminewd2": "2.0.3",
"@types/lodash": "4.14.111",
"@types/jasmine": "2.8.9",
"@types/jasminewd2": "2.0.5",
"@types/lodash": "4.14.117",
"@types/node": "8.9.5",
"codelyzer": "4.2.1",
"codelyzer": "4.5.0",
"jasmine-core": "2.99.1",
"jasmine-spec-reporter": "4.2.1",
"karma": "1.7.1",
"karma": "3.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.1",
"karma-coverage-istanbul-reporter": "2.0.4",
"karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.3.2",
"ts-node": "5.0.1",
"tslint": "5.9.1",
"typescript": "2.7.2",
"webpack-bundle-analyzer": "2.13.1"
"protractor": "5.4.1",
"ts-node": "7.0.1",
"tslint": "5.11.0",
"typescript": "3.1.3",
"webpack-bundle-analyzer": "3.0.3"
}
}

View File

@@ -1,4 +1,4 @@
:host {
fuse-countdown {
display: flex;
flex-direction: row;
align-items: center;

View File

@@ -1,4 +1,4 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { Component, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { interval, Subject } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import * as moment from 'moment';
@@ -6,7 +6,8 @@ import * as moment from 'moment';
@Component({
selector : 'fuse-countdown',
templateUrl: './countdown.component.html',
styleUrls : ['./countdown.component.scss']
styleUrls : ['./countdown.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class FuseCountdownComponent implements OnInit, OnDestroy
{
@@ -48,9 +49,13 @@ export class FuseCountdownComponent implements OnInit, OnDestroy
const currDate = moment();
const eventDate = moment(this.eventDate);
// Get the difference in between the current date and event date
// Get the difference in between the current date and event date in seconds
let diff = eventDate.diff(currDate, 'seconds');
// Calculate the remaining time for the first time so there will be no
// delay on the countdown
this.countdown = this._secondsToRemaining(diff);
// Create a subscribable interval
const countDown = interval(1000)
.pipe(
@@ -58,14 +63,7 @@ export class FuseCountdownComponent implements OnInit, OnDestroy
return diff = diff - 1;
}),
map(value => {
const timeLeft = moment.duration(value, 'seconds');
return {
days : timeLeft.asDays().toFixed(0),
hours : timeLeft.hours(),
minutes: timeLeft.minutes(),
seconds: timeLeft.seconds()
};
return this._secondsToRemaining(value);
})
);
@@ -86,4 +84,27 @@ export class FuseCountdownComponent implements OnInit, OnDestroy
this._unsubscribeAll.next();
this._unsubscribeAll.complete();
}
// -----------------------------------------------------------------------------------------------------
// @ Private methods
// -----------------------------------------------------------------------------------------------------
/**
* Converts given seconds to a remaining time
*
* @param seconds
* @private
*/
private _secondsToRemaining(seconds): any
{
const timeLeft = moment.duration(seconds, 'seconds');
return {
days : timeLeft.asDays().toFixed(0),
hours : timeLeft.hours(),
minutes: timeLeft.minutes(),
seconds: timeLeft.seconds()
};
}
}

View File

@@ -0,0 +1,17 @@
@mixin fuse-countdown-theme($theme) {
$foreground: map-get($theme, foreground);
fuse-countdown {
.fuse-countdown {
.time {
.title {
color: map-get($foreground, secondary-text);
}
}
}
}
}

View File

@@ -1,10 +1,8 @@
<!-- DEMO CONTENT -->
<div class="demo-content">
<div class="demo-content line-height-1.75">
<img src="assets/images/beach.jpg" alt="beach" style="max-width: 640px; width: 100%;">
<h1>Early Sunrise</h1>
<h4 class="secondary-text">Demo Content</h4>
<h1 class="m-0">Early Sunrise in Winter</h1>
<h4 class="mt-0 secondary-text">Demo Content</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tortor nibh, convallis sed purus nec,
@@ -12,7 +10,7 @@
vestibulum. Suspendisse euismod in urna eu posuere.
</p>
<blockquote>
<blockquote class="my-24">
<p>
Nunc vel lacinia lorem. Nullam tincidunt sed purus eu placerat. Donec id dictum erat. Etiam enim ex, dapibus
et tortor id, posuere pretium est. Maecenas fringilla ipsum vitae neque elementum, at eleifend ante
@@ -24,16 +22,12 @@
</blockquote>
<p>
Ut ornare sit amet velit vel congue. Ut nec tristique eros. Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Vivamus sed lorem quis nibh porta iaculis. Vestibulum ut eleifend ante, at semper mi. Nam imperdiet est
nisi, quis hendrerit tellus convallis et. Morbi in luctus neque. Curabitur elementum ut est et gravida. In hac
habitasse platea dictumst.
</p>
<p>
In et placerat eros, eu tempor turpis. Curabitur ac felis finibus, elementum lectus vitae, venenatis est.
Integer mollis nisl a eros scelerisque varius. Etiam venenatis lectus vel erat condimentum tristique vel vel mi.
Nulla id euismod mi, et mollis tellus.
Ut ornare sit amet velit vel congue. Ut nec tristique eros. Lorem ipsum dolor sit amet, consectetur
<b>adipiscing elit</b>. Vivamus sed lorem quis nibh porta iaculis. Vestibulum ut eleifend ante, at semper mi.
Nam imperdiet est nisi, quis hendrerit tellus convallis et. Morbi in luctus neque. Curabitur elementum ut est et
gravida. In hac habitasse platea dictumst. In et placerat eros, eu tempor turpis. Curabitur ac felis finibus,
elementum lectus vitae, venenatis est. Integer mollis nisl a eros scelerisque varius. Etiam venenatis lectus vel
erat condimentum tristique vel vel mi. Nulla id euismod mi, et mollis tellus.
</p>
<p>
@@ -43,6 +37,12 @@
velit.
</p>
<img class="mt-24 w-100-p" src="assets/images/demo-content/morain-lake.jpg" style="max-width: 640px">
<p class="mt-8 mb-24 secondary-text">
<em>Nullam tincidunt sed purus eu placerat. Donec id dictum erat. Etiam enim ex, dapibus et tortor id.</em>
</p>
<p>
Quisque sit amet risus enim. Aliquam sit amet interdum justo, at ultricies sapien. Suspendisse et semper urna,
in gravida eros. Quisque id nibh iaculis, euismod urna sed, egestas nisi. Donec eros metus, congue a imperdiet
@@ -52,10 +52,18 @@
<p>
Ut auctor, metus sed dapibus tempus, urna diam auctor odio, in malesuada odio risus vitae nisi. Etiam blandit
ante urna, vitae placerat massa mollis in. Duis nec urna ac purus semper dictum ut eget justo. Aenean non
sagittis augue. Sed venenatis rhoncus enim eget ornare. Donec viverra sed felis at venenatis. Mauris aliquam
fringilla nulla, sit amet congue felis dignissim at.
sagittis augue. Sed venenatis rhoncus enim eget ornare. <a href="#">Donec viverra sed felis at venenatis.</a>
Mauris aliquam fringilla nulla, sit amet congue felis dignissim at.
</p>
<ul>
<li>Orci varius</li>
<li>Magnis dis</li>
<li>Conubia nostra</li>
<li>Semper urna</li>
<li>Donec viverra</li>
</ul>
<p>
Quisque accumsan augue tempor ante mollis, sed placerat diam porttitor. Vestibulum dignissim sem vel velit
eleifend, non pellentesque quam convallis. Pellentesque est dolor, dignissim ac tortor tristique, hendrerit
@@ -69,7 +77,7 @@
Etiam blandit nunc arcu, et consectetur orci blandit a. Aliquam condimentum pharetra quam at ultricies. Nunc vel
lacinia lorem. Nullam tincidunt sed purus eu placerat. Donec id dictum erat. Etiam enim ex, dapibus et tortor
id, posuere pretium est. Maecenas fringilla ipsum vitae neque elementum, at eleifend ante sollicitudin. Donec
viverra augue dolor, a venenatis tellus consectetur sit amet...
viverra augue dolor, a venenatis tellus consectetur sit amet.
</p>
</div>
<!-- / DEMO CONTENT -->

View File

@@ -1,5 +1,6 @@
:host {
display: block;
width: 100%;
padding: 8px;
background: #263238;
cursor: text;

View File

@@ -1,20 +1,20 @@
<button mat-icon-button
type="button"
class="mat-elevation-z1"
[matMenuTriggerFor]="colorMenu"
(menuOpened)="onMenuOpen()"
[ngClass]="'mat-'+selectedPalette+'-'+selectedHue+'-bg'">
[ngClass]="selectedPalette + '-' + selectedHue">
<mat-icon>palette</mat-icon>
</button>
<mat-menu #colorMenu="matMenu" class="fuse-material-color-picker-menu">
<mat-menu #colorMenu="matMenu" class="fuse-material-color-picker-menu mat-elevation-z8">
<header [ngClass]="selectedColor?.class || 'mat-accent-bg'" class="mat-elevation-z4"
<header [ngClass]="selectedColor?.class || 'accent'" class="mat-elevation-z4"
fxLayout="row" fxLayoutAlign="space-between center">
<button mat-icon-button
[style.visibility]="view==='hues'?'visible':'hidden'"
(click)="$event.stopPropagation();backToPaletteSelection()" aria-label="Palette">
class="secondary-text"
[style.visibility]="view === 'hues' ? 'visible' : 'hidden'"
(click)="goToPalettesView($event)" aria-label="Palette">
<mat-icon class="s-20">arrow_back</mat-icon>
</button>
@@ -23,45 +23,40 @@
</span>
<span *ngIf="!selectedColor?.palette">
Select Color
Select a Color
</span>
<button mat-icon-button
class="remove-color-button"
(click)="$event.stopPropagation();removeColor()"
aria-label="Remove Color">
class="remove-color-button secondary-text"
(click)="removeColor($event)"
aria-label="Remove color"
matTooltip="Remove color">
<mat-icon class="s-20">delete</mat-icon>
</button>
</header>
<div [ngSwitch]="view" class="views">
<div class="view" *ngSwitchCase="'palettes'">
<div fxLayout="row wrap" fxLayoutAlign="start start" class="colors" fusePerfectScrollbar>
<div class="color"
[ngClass]="'mat-'+color.key+'-bg'"
<div class="color" fxLayout="row" fxLayoutAlign="center center"
*ngFor="let color of (colors | keys)"
(click)="$event.stopPropagation();selectPalette(color.key)"
fxLayout="row" fxLayoutAlign="start end" mat-ink-ripple>
<span class="label">
{{color.key}}
</span>
[ngClass]="color.key"
[class.selected]="selectedPalette === color.key"
(click)="selectPalette($event, color.key)">
</div>
</div>
</div>
<div class="view" *ngSwitchCase="'hues'" >
<div class="view" *ngSwitchCase="'hues'">
<div fxLayout="row wrap" fxLayoutAlign="start start" class="colors" fusePerfectScrollbar>
<div class="color" *ngFor="let hue of hues"
[fxHide]="selectedPalette === 'white' && hue !== '500'|| selectedPalette === 'black' && hue !== '500'"
[ngClass]="'mat-'+selectedPalette+'-'+hue+'-bg'"
(click)="selectHue(hue)" fxLayout="row" fxLayoutAlign="start end" mat-ink-ripple>
<span class="label">
{{hue}}
</span>
<mat-icon *ngIf="selectedHue === hue" class="s-16">check</mat-icon>
<div class="color" fxLayout="row" fxLayoutAlign="center center"
*ngFor="let hue of hues"
[fxHide]="selectedPalette === 'fuse-white' && hue !== '500' || selectedPalette === 'fuse-black' && hue !== '500'"
[ngClass]="selectedPalette + '-' + hue"
[class.selected]="selectedHue === hue"
(click)="selectHue($event, hue)">
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
.fuse-material-color-picker-menu {
width: 208px;
width: 245px;
.mat-menu-content {
padding: 0;
@@ -7,44 +7,29 @@
.views {
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
min-height: 258px;
height: 308px;
background-color: #F7F7F7;
min-height: 165px;
.view {
position: absolute;
width: 208px;
height: 100%;
bottom: 0;
left: 0;
right: 0;
top: 0;
overflow: hidden;
.colors {
position: relative;
padding: 4px;
padding: 1px 0 0 0;
margin-left: -1px;
.color {
position: relative;
width: 46px;
height: 46px;
margin: 2px;
width: 40px;
height: 40px;
margin: 0 0 1px 1px;
border-radius: 0;
cursor: pointer;
transition: border-radius .4s cubic-bezier(.25, .8, .25, 1);
.label {
padding: 2px;
font-size: 10px;
&:hover {
border-radius: 20%;
}
mat-icon {
position: absolute;
top: 2px;
right: 2px;
font-size: 16px;
opacity: 0.7;
&.selected {
border-radius: 50% !important;
}
}
}

View File

@@ -1,55 +1,40 @@
import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation } from '@angular/core';
import { fuseAnimations } from '@fuse/animations';
import { MatColors } from '@fuse/mat-colors';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
export const FUSE_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR: any = {
provide : NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => FuseMaterialColorPickerComponent),
multi : true
};
@Component({
selector : 'fuse-material-color-picker',
templateUrl : './material-color-picker.component.html',
styleUrls : ['./material-color-picker.component.scss'],
animations : fuseAnimations,
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
providers : [FUSE_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR]
})
export class FuseMaterialColorPickerComponent implements OnChanges
export class FuseMaterialColorPickerComponent implements ControlValueAccessor
{
colors: any;
hues: string[];
selectedColor: any;
view: string;
@Input()
selectedColor: any;
selectedPalette: string;
@Input()
selectedHue: string;
@Input()
selectedFg: string;
@Input()
value: any;
// Color changed
@Output()
onValueChange: EventEmitter<any>;
@Output()
selectedPaletteChange: EventEmitter<any>;
@Output()
selectedHueChange: EventEmitter<any>;
@Output()
selectedClassChange: EventEmitter<any>;
@Output()
selectedBgChange: EventEmitter<any>;
@Output()
selectedFgChange: EventEmitter<any>;
colorChanged: EventEmitter<any>;
// Private
_selectedClass: string;
_selectedBg: string;
private _color: string;
private _modelChange: (value: any) => void;
private _modelTouched: (value: any) => void;
/**
* Constructor
@@ -57,23 +42,18 @@ export class FuseMaterialColorPickerComponent implements OnChanges
constructor()
{
// Set the defaults
this.colorChanged = new EventEmitter();
this.colors = MatColors.all;
this.hues = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'A100', 'A200', 'A400', 'A700'];
this.selectedFg = '';
this.selectedHue = '';
this.selectedPalette = '';
this.selectedHue = '500';
this.view = 'palettes';
this.onValueChange = new EventEmitter();
this.selectedPaletteChange = new EventEmitter();
this.selectedHueChange = new EventEmitter();
this.selectedClassChange = new EventEmitter();
this.selectedBgChange = new EventEmitter();
this.selectedFgChange = new EventEmitter();
// Set the private defaults
this._selectedClass = '';
this._selectedBg = '';
this._color = '';
this._modelChange = () => {
};
this._modelTouched = () => {
};
}
// -----------------------------------------------------------------------------------------------------
@@ -86,88 +66,76 @@ export class FuseMaterialColorPickerComponent implements OnChanges
* @param value
*/
@Input()
set selectedClass(value)
set color(value)
{
if ( value && value !== '' && this._selectedClass !== value )
if ( !value || value === '' || this._color === value )
{
const color = value.split('-');
if ( color.length >= 5 )
{
this.selectedPalette = color[1] + '-' + color[2];
this.selectedHue = color[3];
}
else
{
this.selectedPalette = color[1];
this.selectedHue = color[2];
}
}
this._selectedClass = value;
}
get selectedClass(): string
{
return this._selectedClass;
}
/**
* Selected bg
*
* @param value
*/
@Input()
set selectedBg(value)
{
if ( value && value !== '' && this._selectedBg !== value )
{
for ( const palette in this.colors )
{
if ( !this.colors.hasOwnProperty(palette) )
{
continue;
}
for ( const hue of this.hues )
{
if ( this.colors[palette][hue] === value )
{
this.selectedPalette = palette;
this.selectedHue = hue;
break;
}
}
}
}
this._selectedBg = value;
}
get selectedBg(): string
{
return this._selectedBg;
}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On changes
*
* @param changes
*/
ngOnChanges(changes: any): void
{
if ( changes.selectedBg && changes.selectedBg.currentValue === '' ||
changes.selectedClass && changes.selectedClass.currentValue === '' ||
changes.selectedPalette && changes.selectedPalette.currentValue === '' )
{
this.removeColor();
return;
}
if ( changes.selectedPalette || changes.selectedHue || changes.selectedClass || changes.selectedBg )
// Split the color value (red-400, blue-500, fuse-navy-700 etc.)
const colorParts = value.split('-');
// Take the very last part as the selected hue value
this.selectedHue = colorParts[colorParts.length - 1];
// Remove the last part
colorParts.pop();
// Rejoin the remaining parts as the selected palette name
this.selectedPalette = colorParts.join('-');
// Store the color value
this._color = value;
}
get color(): string
{
return this._color;
}
// -----------------------------------------------------------------------------------------------------
// @ Control Value Accessor implementation
// -----------------------------------------------------------------------------------------------------
/**
* Register on change function
*
* @param fn
*/
registerOnChange(fn: any): void
{
this._modelChange = fn;
}
/**
* Register on touched function
*
* @param fn
*/
registerOnTouched(fn: any): void
{
this._modelTouched = fn;
}
/**
* Write value to the view from model
*
* @param color
*/
writeValue(color: any): void
{
// Return if null
if ( !color )
{
this.updateSelectedColor();
return;
}
// Set the color
this.color = color;
// Update the selected color
this.updateSelectedColor();
}
// -----------------------------------------------------------------------------------------------------
@@ -177,35 +145,61 @@ export class FuseMaterialColorPickerComponent implements OnChanges
/**
* Select palette
*
* @param event
* @param palette
*/
selectPalette(palette): void
selectPalette(event, palette): void
{
this.selectedPalette = palette;
this.updateSelectedColor();
// Stop propagation
event.stopPropagation();
// Go to 'hues' view
this.view = 'hues';
// Update the selected palette
this.selectedPalette = palette;
// Update the selected color
this.updateSelectedColor();
}
/**
* Select hue
*
* @param event
* @param hue
*/
selectHue(hue): void
selectHue(event, hue): void
{
// Stop propagation
event.stopPropagation();
// Update the selected huse
this.selectedHue = hue;
// Update the selected color
this.updateSelectedColor();
}
/**
* Remove color
*
* @param event
*/
removeColor(): void
removeColor(event): void
{
// Stop propagation
event.stopPropagation();
// Return to the 'palettes' view
this.view = 'palettes';
// Clear the selected palette and hue
this.selectedPalette = '';
this.selectedHue = '';
// Update the selected color
this.updateSelectedColor();
this.view = 'palettes';
}
/**
@@ -213,49 +207,40 @@ export class FuseMaterialColorPickerComponent implements OnChanges
*/
updateSelectedColor(): void
{
setTimeout(() => {
if ( this.selectedColor && this.selectedColor.palette === this.selectedPalette && this.selectedColor.hue === this.selectedHue )
{
return;
}
if ( this.selectedColor && this.selectedPalette === this.selectedColor.palette && this.selectedHue === this.selectedColor.hue )
{
return;
}
// Set the selected color object
this.selectedColor = {
palette: this.selectedPalette,
hue : this.selectedHue,
class : this.selectedPalette + '-' + this.selectedHue,
bg : this.selectedPalette === '' ? '' : MatColors.getColor(this.selectedPalette)[this.selectedHue],
fg : this.selectedPalette === '' ? '' : MatColors.getColor(this.selectedPalette).contrast[this.selectedHue]
};
if ( this.selectedPalette !== '' && this.selectedHue !== '' )
{
this.selectedBg = MatColors.getColor(this.selectedPalette)[this.selectedHue];
this.selectedFg = MatColors.getColor(this.selectedPalette).contrast[this.selectedHue];
this.selectedClass = 'mat-' + this.selectedPalette + '-' + this.selectedHue + '-bg';
}
else
{
this.selectedBg = '';
this.selectedFg = '';
}
// Emit the color changed event
this.colorChanged.emit(this.selectedColor);
this.selectedColor = {
palette: this.selectedPalette,
hue : this.selectedHue,
class : this.selectedClass,
bg : this.selectedBg,
fg : this.selectedFg
};
// Mark the model as touched
this._modelTouched(this.selectedColor.class);
this.selectedPaletteChange.emit(this.selectedPalette);
this.selectedHueChange.emit(this.selectedHue);
this.selectedClassChange.emit(this.selectedClass);
this.selectedBgChange.emit(this.selectedBg);
this.selectedFgChange.emit(this.selectedFg);
this.value = this.selectedColor;
this.onValueChange.emit(this.selectedColor);
});
// Update the model
this._modelChange(this.selectedColor.class);
}
/**
* Go back to palette selection
* Go to palettes view
*
* @param event
*/
backToPaletteSelection(): void
goToPalettesView(event): void
{
// Stop propagation
event.stopPropagation();
this.view = 'palettes';
}

View File

@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule, MatIconModule, MatMenuModule, MatRippleModule } from '@angular/material';
import { MatButtonModule, MatIconModule, MatMenuModule, MatTooltipModule } from '@angular/material';
import { FusePipesModule } from '@fuse/pipes/pipes.module';
@@ -19,7 +19,7 @@ import { FuseMaterialColorPickerComponent } from '@fuse/components/material-colo
MatButtonModule,
MatIconModule,
MatMenuModule,
MatRippleModule,
MatTooltipModule,
FusePipesModule
],

View File

@@ -0,0 +1,14 @@
@mixin fuse-material-color-picker-theme($theme) {
$background: map-get($theme, background);
.fuse-material-color-picker-menu {
.mat-menu-content {
.views {
background: #303030;
}
}
}
}

View File

@@ -1,42 +1,42 @@
<ng-container *ngIf="!item.hidden">
<!-- normal collapse -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && !item.function" matRipple>
<a class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && !item.function">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.url -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && !item.function"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && !item.function"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && item.function"
(click)="item.function()" matRipple>
(click)="item.function()">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && item.function"
(click)="item.function()"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && item.function"
(click)="item.function()"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
@@ -52,7 +52,7 @@
<div class="children" [ngClass]="{'open': isOpen}">
<div class="{{fuseConfig.layout.navbar.background}}">
<div class="{{fuseConfig.layout.navbar.primaryBackground}}">
<ng-container *ngFor="let item of item.children">
<fuse-nav-horizontal-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-horizontal-item>

View File

@@ -2,37 +2,37 @@
<!-- item.url -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && !item.function"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && !item.function"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && item.function"
(click)="item.function()" matRipple>
(click)="item.function()">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && item.function"
(click)="item.function()"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && item.function"
(click)="item.function()"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>

View File

@@ -6,7 +6,8 @@
<ng-container *ngFor="let item of navigation">
<fuse-nav-vertical-group *ngIf="item.type=='group'" [item]="item"></fuse-nav-vertical-group>
<fuse-nav-vertical-collapsable *ngIf="item.type=='collapse'" [item]="item"></fuse-nav-vertical-collapsable>
<fuse-nav-vertical-collapsable *ngIf="item.type=='collapsable'"
[item]="item"></fuse-nav-vertical-collapsable>
<fuse-nav-vertical-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-vertical-item>
</ng-container>
@@ -20,7 +21,7 @@
<ng-container *ngFor="let item of navigation">
<fuse-nav-horizontal-collapsable *ngIf="item.type=='group'" [item]="item"></fuse-nav-horizontal-collapsable>
<fuse-nav-horizontal-collapsable *ngIf="item.type=='collapse'"
<fuse-nav-horizontal-collapsable *ngIf="item.type=='collapsable'"
[item]="item"></fuse-nav-horizontal-collapsable>
<fuse-nav-horizontal-item *ngIf="item.type=='item'" [item]="item"></fuse-nav-horizontal-item>

View File

@@ -1,14 +1,15 @@
import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { Subject } from 'rxjs';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, ViewEncapsulation } from '@angular/core';
import { merge, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
@Component({
selector : 'fuse-navigation',
templateUrl : './navigation.component.html',
styleUrls : ['./navigation.component.scss'],
encapsulation: ViewEncapsulation.None
selector : 'fuse-navigation',
templateUrl : './navigation.component.html',
styleUrls : ['./navigation.component.scss'],
encapsulation : ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class FuseNavigationComponent implements OnInit
{
@@ -22,9 +23,12 @@ export class FuseNavigationComponent implements OnInit
private _unsubscribeAll: Subject<any>;
/**
* Constructor
*
* @param {ChangeDetectorRef} _changeDetectorRef
* @param {FuseNavigationService} _fuseNavigationService
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseNavigationService: FuseNavigationService
)
{
@@ -48,7 +52,24 @@ export class FuseNavigationComponent implements OnInit
this._fuseNavigationService.onNavigationChanged
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Load the navigation
this.navigation = this._fuseNavigationService.getCurrentNavigation();
// Mark for check
this._changeDetectorRef.markForCheck();
});
// Subscribe to navigation item
merge(
this._fuseNavigationService.onNavigationItemAdded,
this._fuseNavigationService.onNavigationItemUpdated,
this._fuseNavigationService.onNavigationItemRemoved
).pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
}

View File

@@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import * as _ from 'lodash';
import { FuseNavigationItem } from '@fuse/types';
@@ -15,6 +16,9 @@ export class FuseNavigationService
private _onNavigationChanged: BehaviorSubject<any>;
private _onNavigationRegistered: BehaviorSubject<any>;
private _onNavigationUnregistered: BehaviorSubject<any>;
private _onNavigationItemAdded: BehaviorSubject<any>;
private _onNavigationItemUpdated: BehaviorSubject<any>;
private _onNavigationItemRemoved: BehaviorSubject<any>;
private _currentNavigationKey: string;
private _registry: { [key: string]: any } = {};
@@ -33,6 +37,9 @@ export class FuseNavigationService
this._onNavigationChanged = new BehaviorSubject(null);
this._onNavigationRegistered = new BehaviorSubject(null);
this._onNavigationUnregistered = new BehaviorSubject(null);
this._onNavigationItemAdded = new BehaviorSubject(null);
this._onNavigationItemUpdated = new BehaviorSubject(null);
this._onNavigationItemRemoved = new BehaviorSubject(null);
}
// -----------------------------------------------------------------------------------------------------
@@ -69,6 +76,36 @@ export class FuseNavigationService
return this._onNavigationUnregistered.asObservable();
}
/**
* Get onNavigationItemAdded
*
* @returns {Observable<any>}
*/
get onNavigationItemAdded(): Observable<any>
{
return this._onNavigationItemAdded.asObservable();
}
/**
* Get onNavigationItemUpdated
*
* @returns {Observable<any>}
*/
get onNavigationItemUpdated(): Observable<any>
{
return this._onNavigationItemUpdated.asObservable();
}
/**
* Get onNavigationItemRemoved
*
* @returns {Observable<any>}
*/
get onNavigationItemRemoved(): Observable<any>
{
return this._onNavigationItemRemoved.asObservable();
}
// -----------------------------------------------------------------------------------------------------
// @ Public methods
// -----------------------------------------------------------------------------------------------------
@@ -319,6 +356,33 @@ export class FuseNavigationService
// Add the item
parent.children.push(item);
}
// Trigger the observable
this._onNavigationItemAdded.next(true);
}
/**
* Update navigation item with the given id
*
* @param id
* @param properties
*/
updateNavigationItem(id, properties): void
{
// Get the navigation item
const navigationItem = this.getNavigationItem(id);
// If there is no navigation with the give id, return
if ( !navigationItem )
{
return;
}
// Merge the navigation properties
_.merge(navigationItem, properties);
// Trigger the observable
this._onNavigationItemUpdated.next(true);
}
/**
@@ -346,5 +410,8 @@ export class FuseNavigationService
// Remove the item
parent.splice(parent.indexOf(item), 1);
// Trigger the observable
this._onNavigationItemRemoved.next(true);
}
}

View File

@@ -1,45 +1,45 @@
<ng-container *ngIf="!item.hidden">
<!-- normal collapse -->
<!-- normal collapsable -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && !item.function"
(click)="toggleOpen($event)" matRipple>
(click)="toggleOpen($event)">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.url -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && !item.function"
(click)="toggleOpen($event)"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && !item.function"
(click)="toggleOpen($event)"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && item.function"
(click)="toggleOpen($event);item.function()" matRipple>
(click)="toggleOpen($event);item.function()">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && item.function"
(click)="toggleOpen($event);item.function()"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && item.function"
(click)="toggleOpen($event);item.function()"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>

View File

@@ -1,6 +1,6 @@
import { Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { Subject } from 'rxjs';
import { merge, Subject } from 'rxjs';
import { filter, takeUntil } from 'rxjs/operators';
import { FuseNavigationItem } from '@fuse/types';
@@ -30,10 +30,12 @@ export class FuseNavVerticalCollapsableComponent implements OnInit, OnDestroy
/**
* Constructor
*
* @param {ChangeDetectorRef} _changeDetectorRef
* @param {FuseNavigationService} _fuseNavigationService
* @param {Router} _router
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseNavigationService: FuseNavigationService,
private _router: Router
)
@@ -111,6 +113,18 @@ export class FuseNavVerticalCollapsableComponent implements OnInit, OnDestroy
{
this.collapse();
}
// Subscribe to navigation item
merge(
this._fuseNavigationService.onNavigationItemAdded,
this._fuseNavigationService.onNavigationItemUpdated,
this._fuseNavigationService.onNavigationItemRemoved
).pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
/**
@@ -154,6 +168,10 @@ export class FuseNavVerticalCollapsableComponent implements OnInit, OnDestroy
}
this.isOpen = true;
// Mark for check
this._changeDetectorRef.markForCheck();
this._fuseNavigationService.onItemCollapseToggled.next();
}
@@ -168,6 +186,10 @@ export class FuseNavVerticalCollapsableComponent implements OnInit, OnDestroy
}
this.isOpen = false;
// Mark for check
this._changeDetectorRef.markForCheck();
this._fuseNavigationService.onItemCollapseToggled.next();
}

View File

@@ -1,13 +1,16 @@
import { Component, HostBinding, Input } from '@angular/core';
import { ChangeDetectorRef, Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';
import { merge, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { FuseNavigationItem } from '@fuse/types';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
@Component({
selector : 'fuse-nav-vertical-group',
templateUrl: './group.component.html',
styleUrls : ['./group.component.scss']
})
export class FuseNavVerticalGroupComponent
export class FuseNavVerticalGroupComponent implements OnInit, OnDestroy
{
@HostBinding('class')
classes = 'nav-group nav-item';
@@ -15,11 +18,57 @@ export class FuseNavVerticalGroupComponent
@Input()
item: FuseNavigationItem;
// Private
private _unsubscribeAll: Subject<any>;
/**
* Constructor
*/
constructor()
/**
*
* @param {ChangeDetectorRef} _changeDetectorRef
* @param {FuseNavigationService} _fuseNavigationService
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseNavigationService: FuseNavigationService
)
{
// Set the private defaults
this._unsubscribeAll = new Subject();
}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void
{
// Subscribe to navigation item
merge(
this._fuseNavigationService.onNavigationItemAdded,
this._fuseNavigationService.onNavigationItemUpdated,
this._fuseNavigationService.onNavigationItemRemoved
).pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
/**
* On destroy
*/
ngOnDestroy(): void
{
// Unsubscribe from all subscriptions
this._unsubscribeAll.next();
this._unsubscribeAll.complete();
}
}

View File

@@ -2,37 +2,37 @@
<!-- item.url -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && !item.function"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && !item.function"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.function -->
<span class="nav-link" [ngClass]="item.classes" *ngIf="!item.url && item.function"
(click)="item.function()" matRipple>
(click)="item.function()">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</span>
<!-- item.url && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && !item.externalUrl && item.function"
(click)="item.function()"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLink]="[item.url]" [routerLinkActive]="['active', 'accent']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>
<!-- item.externalUrl && item.function -->
<a class="nav-link" [ngClass]="item.classes" *ngIf="item.url && item.externalUrl && item.function"
(click)="item.function()"
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
[href]="item.url" [target]="item.openInNewTab ? '_blank' : '_self'">
<ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a>

View File

@@ -1,13 +1,16 @@
import { Component, HostBinding, Input } from '@angular/core';
import { ChangeDetectorRef, Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';
import { merge, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { FuseNavigationItem } from '@fuse/types';
import { FuseNavigationService } from '@fuse/components/navigation/navigation.service';
@Component({
selector : 'fuse-nav-vertical-item',
templateUrl: './item.component.html',
styleUrls : ['./item.component.scss']
})
export class FuseNavVerticalItemComponent
export class FuseNavVerticalItemComponent implements OnInit, OnDestroy
{
@HostBinding('class')
classes = 'nav-item';
@@ -15,10 +18,56 @@ export class FuseNavVerticalItemComponent
@Input()
item: FuseNavigationItem;
// Private
private _unsubscribeAll: Subject<any>;
/**
* Constructor
*/
constructor()
/**
*
* @param {ChangeDetectorRef} _changeDetectorRef
* @param {FuseNavigationService} _fuseNavigationService
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseNavigationService: FuseNavigationService
)
{
// Set the private defaults
this._unsubscribeAll = new Subject();
}
// -----------------------------------------------------------------------------------------------------
// @ Lifecycle hooks
// -----------------------------------------------------------------------------------------------------
/**
* On init
*/
ngOnInit(): void
{
// Subscribe to navigation item
merge(
this._fuseNavigationService.onNavigationItemAdded,
this._fuseNavigationService.onNavigationItemUpdated,
this._fuseNavigationService.onNavigationItemRemoved
).pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
/**
* On destroy
*/
ngOnDestroy(): void
{
// Unsubscribe from all subscriptions
this._unsubscribeAll.next();
this._unsubscribeAll.complete();
}
}

View File

@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router';
import { BehaviorSubject, Observable } from 'rxjs';
import { filter } from 'rxjs/operators';
@@ -103,7 +103,7 @@ export class FuseProgressBarService
});
this._router.events
.pipe(filter((event) => event instanceof NavigationEnd))
.pipe(filter((event) => event instanceof NavigationEnd || event instanceof NavigationError || event instanceof NavigationCancel))
.subscribe(() => {
this.hide();
});

View File

@@ -1,15 +1,12 @@
<div class="fuse-search-bar" [ngClass]="{'expanded':!collapsed}">
<div class="fuse-search-bar-content" [ngClass]="fuseConfig.layout.toolbar.background">
<div class="fuse-search-bar-content">
<label for="fuse-search-bar-input">
<button mat-icon-button class="fuse-search-bar-expander" aria-label="Expand Search Bar" (click)="expand()"
*ngIf="collapsed">
<mat-icon class="s-24 secondary-text">search</mat-icon>
</button>
<!--<span class="fuse-search-bar-loader" fxLayout="row" fxLayoutAlign="center center" *ngIf="!collapsed">
<mat-progress-spinner color="mat-accent" mode="indeterminate"></mat-progress-spinner>
</span>-->
</label>
<input id="fuse-search-bar-input" class="ml-24" type="text" placeholder="Search" (input)="search($event)"

View File

@@ -9,7 +9,7 @@
height: 64px;
font-size: 13px;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
height: 56px;
}
@@ -28,7 +28,7 @@
height: 64px !important;
line-height: 64px !important;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
height: 56px !important;
line-height: 56px !important;
}
@@ -39,7 +39,7 @@
height: 64px !important;
line-height: 64px !important;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
height: 56px !important;
line-height: 56px !important;
}
@@ -53,8 +53,9 @@
display: none;
flex: 1 0 auto;
min-height: 64px;
background-color: transparent;
font-size: 16px;
background-color: transparent;
color: currentColor;
}
}

View File

@@ -0,0 +1,11 @@
@mixin fuse-search-bar-theme($theme) {
$background: map-get($theme, background);
.fuse-search-bar {
&.expanded {
background-color: map-get($background, background);
}
}
}

View File

@@ -7,7 +7,7 @@
</button>
</div>
<div class="shortcuts" fxHide fxShow.gt-sm>
<div class="shortcuts" fxLayout="row" fxHide fxShow.gt-sm>
<div fxLayout="row" fxLayoutAlign="space-between center" fxFlex="0 1 auto">

View File

@@ -2,7 +2,7 @@
:host {
@include media-breakpoint-down('sm') {
@include media-breakpoint('lt-md') {
#fuse-shortcuts {
@@ -19,6 +19,10 @@
display: flex !important;
flex: 1;
height: 100%;
> div {
flex: 1 1 auto !important;
}
}
}
}

View File

@@ -70,9 +70,7 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
// Get the navigation items and flatten them
this.filteredNavigationItems = this.navigationItems = this._fuseNavigationService.getFlatNavigation(this.navigation);
const cookieExists = this._cookieService.check('FUSE2.shortcuts');
if ( cookieExists )
if ( this._cookieService.check('FUSE2.shortcuts') )
{
this.shortcutItems = JSON.parse(this._cookieService.get('FUSE2.shortcuts'));
}
@@ -107,6 +105,7 @@ export class FuseShortcutsComponent implements OnInit, OnDestroy
];
}
// Subscribe to media changes
this._fuseMatchMediaService.onMediaChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {

View File

@@ -0,0 +1,11 @@
@mixin fuse-shortcuts-theme($theme) {
$background: map-get($theme, background);
#fuse-shortcuts {
&.show-mobile-panel {
background-color: map-get($background, background);
}
}
}

View File

@@ -15,9 +15,8 @@ fuse-sidebar {
max-width: 280px;
z-index: 1000;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.35);
background: white;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
min-width: 0 !important;
max-width: 80vw !important;
width: 80vw !important;
@@ -62,10 +61,5 @@ fuse-sidebar {
left: 0;
right: 0;
z-index: 999;
background-color: rgba(0, 0, 0, 0.6);
opacity: 0;
&.fuse-sidebar-overlay-invisible {
background-color: transparent;
}
}

View File

@@ -1,4 +1,6 @@
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, RendererStyleFlags2, ViewEncapsulation } from '@angular/core';
import {
ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, OnInit, Output, Renderer2, ViewEncapsulation
} from '@angular/core';
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
import { ObservableMedia } from '@angular/flex-layout';
import { Subject } from 'rxjs';
@@ -172,7 +174,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
this._renderer.setStyle(this._elementRef.nativeElement, 'max-width', styleValue);
// Set the style and class
this._renderer.setStyle(sibling, styleRule, styleValue, RendererStyleFlags2.Important + RendererStyleFlags2.DashCase);
this._renderer.setStyle(sibling, styleRule, styleValue);
this._renderer.addClass(this._elementRef.nativeElement, 'folded');
}
// If unfolded...
@@ -433,7 +435,7 @@ export class FuseSidebarComponent implements OnInit, OnDestroy
this._renderer.setStyle(this._elementRef.nativeElement, 'max-width', styleValue);
// Set the style and class
this._renderer.setStyle(sibling, styleRule, styleValue, RendererStyleFlags2.Important + RendererStyleFlags2.DashCase);
this._renderer.setStyle(sibling, styleRule, styleValue);
this._renderer.addClass(this._elementRef.nativeElement, 'folded');
}

View File

@@ -0,0 +1,16 @@
@mixin fuse-sidebar-theme($theme) {
$background: map-get($theme, background);
fuse-sidebar {
background: map-get($background, background);
}
.fuse-sidebar-overlay {
background-color: rgba(0, 0, 0, 0.6);
&.fuse-sidebar-overlay-invisible {
background-color: transparent;
}
}
}

View File

@@ -12,6 +12,20 @@
<form [formGroup]="form">
<!-- COLOR THEME -->
<div class="group">
<h2>Color themes</h2>
<mat-radio-group fxLayout="column" fxLayoutAlign="start start" formControlName="colorTheme">
<mat-radio-button class="mb-12" value="theme-default">Default Light</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-yellow-light">Yellow Light</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-blue-gray-dark">Blue-Gray Dark</mat-radio-button>
<mat-radio-button class="mb-12" value="theme-pink-dark">Pink Dark</mat-radio-button>
</mat-radio-group>
</div>
<!-- LAYOUT STYLES -->
<div class="group" formGroupName="layout">
@@ -79,10 +93,13 @@
<mat-radio-button class="mb-16" value="vertical-style-2">Style 2</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<h3 class="mt-16 mb-8">Primary background:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.navbar.background">
</fuse-material-color-picker>
formControlName="primaryBackground"></fuse-material-color-picker>
<h3 class="mt-16 mb-8">Secondary background:</h3>
<fuse-material-color-picker class="mb-16"
formControlName="secondaryBackground"></fuse-material-color-picker>
</div>
@@ -102,10 +119,13 @@
<mat-radio-button class="mb-12" value="below-fixed">Below Fixed</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.toolbar.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -125,10 +145,13 @@
<mat-radio-button class="mb-12" value="below-fixed">Below Fixed</mat-radio-button>
</mat-radio-group>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.footer.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -190,10 +213,13 @@
<mat-radio-button class="mb-16" value="vertical-style-2">Style 2</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<h3 class="mt-16 mb-8">Primary background:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.navbar.background">
</fuse-material-color-picker>
formControlName="primaryBackground"></fuse-material-color-picker>
<h3 class="mt-16 mb-8">Secondary background:</h3>
<fuse-material-color-picker class="mb-16"
formControlName="secondaryBackground"></fuse-material-color-picker>
</div>
@@ -213,10 +239,13 @@
<mat-radio-button class="mb-12" value="below">Below</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.toolbar.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -236,10 +265,13 @@
<mat-radio-button class="mb-12" value="below">Below</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.footer.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -301,10 +333,13 @@
<mat-radio-button class="mb-16" value="vertical-style-2">Style 2</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<h3 class="mt-16 mb-8">Primary background:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.navbar.background">
</fuse-material-color-picker>
formControlName="primaryBackground"></fuse-material-color-picker>
<h3 class="mt-16 mb-8">Secondary background:</h3>
<fuse-material-color-picker class="mb-16"
formControlName="secondaryBackground"></fuse-material-color-picker>
</div>
@@ -323,10 +358,13 @@
<mat-radio-button class="mb-12" value="above-fixed">Above Fixed</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.toolbar.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -345,10 +383,13 @@
<mat-radio-button class="mb-12" value="above-fixed">Above Fixed</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.footer.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -405,9 +446,14 @@
<mat-radio-button class="mb-16" value="vertical-style-2">Style 2</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<h3 class="mt-16 mb-8">Primary background:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.navbar.background">
formControlName="primaryBackground">
</fuse-material-color-picker>
<h3 class="mt-16 mb-8">Secondary background (Vertical):</h3>
<fuse-material-color-picker class="mb-16"
formControlName="secondaryBackground">
</fuse-material-color-picker>
</div>
@@ -427,10 +473,13 @@
<mat-radio-button class="mb-12" value="below">Below</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.toolbar.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>
@@ -449,10 +498,13 @@
<mat-radio-button class="mb-12" value="above-static">Above Static</mat-radio-button>
</mat-radio-group>
<h3 class="mt-24 mb-8">Color:</h3>
<mat-checkbox class="mt-24" formControlName="customBackgroundColor">
Use custom background color
</mat-checkbox>
<h3 class="mt-24 mb-8">Background color:</h3>
<fuse-material-color-picker class="mb-16"
[(selectedClass)]="fuseConfig.layout.footer.background">
</fuse-material-color-picker>
formControlName="background"></fuse-material-color-picker>
</div>

View File

@@ -9,7 +9,7 @@
}
}
:host {
fuse-theme-options {
display: flex;
overflow: hidden;
@@ -30,7 +30,7 @@
.title {
font-size: 20px;
font-weight: 500;
font-weight: 600;
padding-left: 4px;
}
}
@@ -45,7 +45,6 @@
flex: 1 0 auto;
flex-direction: column;
position: relative;
border: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 2px;
padding: 28px 16px 8px 16px;
margin: 16px 0;
@@ -57,15 +56,12 @@
margin: 0;
padding: 0 8px;
font-size: 16px;
font-weight: 500;
background: white;
color: rgba(0, 0, 0, 0.54);
font-weight: 600;
}
h3 {
font-size: 14px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
font-weight: 600;
margin: 24px 0 16px 0;
padding: 0;

View File

@@ -1,5 +1,6 @@
import { Component, HostBinding, OnDestroy, OnInit, Renderer2 } from '@angular/core';
import { Component, HostBinding, Inject, OnDestroy, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
import { DOCUMENT } from '@angular/common';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@@ -9,10 +10,11 @@ import { FuseNavigationService } from '@fuse/components/navigation/navigation.se
import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service';
@Component({
selector : 'fuse-theme-options',
templateUrl: './theme-options.component.html',
styleUrls : ['./theme-options.component.scss'],
animations : fuseAnimations
selector : 'fuse-theme-options',
templateUrl : './theme-options.component.html',
styleUrls : ['./theme-options.component.scss'],
encapsulation: ViewEncapsulation.None,
animations : fuseAnimations
})
export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
@@ -28,6 +30,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
/**
* Constructor
*
* @param {DOCUMENT} document
* @param {FormBuilder} _formBuilder
* @param {FuseConfigService} _fuseConfigService
* @param {FuseNavigationService} _fuseNavigationService
@@ -35,6 +38,7 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
* @param {Renderer2} _renderer
*/
constructor(
@Inject(DOCUMENT) private document: any,
private _formBuilder: FormBuilder,
private _fuseConfigService: FuseConfigService,
private _fuseNavigationService: FuseNavigationService,
@@ -61,32 +65,36 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
// Build the config form
// noinspection TypeScriptValidateTypes
this.form = this._formBuilder.group({
colorTheme : new FormControl(),
customScrollbars: new FormControl(),
layout : this._formBuilder.group({
style : new FormControl(),
width : new FormControl(),
navbar : this._formBuilder.group({
background: new FormControl(),
folded : new FormControl(),
hidden : new FormControl(),
position : new FormControl(),
variant : new FormControl()
primaryBackground : new FormControl(),
secondaryBackground: new FormControl(),
folded : new FormControl(),
hidden : new FormControl(),
position : new FormControl(),
variant : new FormControl()
}),
toolbar : this._formBuilder.group({
background: new FormControl(),
hidden : new FormControl(),
position : new FormControl()
background : new FormControl(),
customBackgroundColor: new FormControl(),
hidden : new FormControl(),
position : new FormControl()
}),
footer : this._formBuilder.group({
background: new FormControl(),
hidden : new FormControl(),
position : new FormControl()
background : new FormControl(),
customBackgroundColor: new FormControl(),
hidden : new FormControl(),
position : new FormControl()
}),
sidepanel: this._formBuilder.group({
hidden: new FormControl(),
position : new FormControl()
hidden : new FormControl(),
position: new FormControl()
})
}),
customScrollbars: new FormControl()
})
});
// Subscribe to the config changes
@@ -110,7 +118,6 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
// Reset the form values based on the
// selected layout style
this._resetFormValues(value);
});
// Subscribe to the form value changes
@@ -177,23 +184,30 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
this.form.patchValue({
layout: {
width : 'fullwidth',
navbar : {
background: 'mat-fuse-dark-700-bg',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
width : 'fullwidth',
navbar : {
primaryBackground : 'fuse-navy-700',
secondaryBackground: 'fuse-navy-900',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
},
toolbar: {
background: 'mat-white-500-bg',
hidden : false,
position : 'below-static'
toolbar : {
background : 'fuse-white-500',
customBackgroundColor: false,
hidden : false,
position : 'below-static'
},
footer : {
background: 'mat-fuse-dark-900-bg',
hidden : false,
position : 'below-static'
footer : {
background : 'fuse-navy-900',
customBackgroundColor: true,
hidden : false,
position : 'below-static'
},
sidepanel: {
hidden : false,
position: 'right'
}
}
});
@@ -206,23 +220,30 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
this.form.patchValue({
layout: {
width : 'fullwidth',
navbar : {
background: 'mat-fuse-dark-700-bg',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
width : 'fullwidth',
navbar : {
primaryBackground : 'fuse-navy-700',
secondaryBackground: 'fuse-navy-900',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
},
toolbar: {
background: 'mat-white-500-bg',
hidden : false,
position : 'below'
toolbar : {
background : 'fuse-white-500',
customBackgroundColor: false,
hidden : false,
position : 'below'
},
footer : {
background: 'mat-fuse-dark-900-bg',
hidden : false,
position : 'below'
footer : {
background : 'fuse-navy-900',
customBackgroundColor: true,
hidden : false,
position : 'below'
},
sidepanel: {
hidden : false,
position: 'right'
}
}
});
@@ -235,23 +256,30 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
this.form.patchValue({
layout: {
width : 'fullwidth',
navbar : {
background: 'mat-fuse-dark-700-bg',
folded : false,
hidden : false,
position : 'left',
layout : 'vertical-style-1'
width : 'fullwidth',
navbar : {
primaryBackground : 'fuse-navy-700',
secondaryBackground: 'fuse-navy-900',
folded : false,
hidden : false,
position : 'left',
layout : 'vertical-style-1'
},
toolbar: {
background: 'mat-white-500-bg',
hidden : false,
position : 'above-static'
toolbar : {
background : 'fuse-white-500',
customBackgroundColor: false,
hidden : false,
position : 'above-static'
},
footer : {
background: 'mat-fuse-dark-900-bg',
hidden : false,
position : 'above-static'
footer : {
background : 'fuse-navy-900',
customBackgroundColor: true,
hidden : false,
position : 'above-static'
},
sidepanel: {
hidden : false,
position: 'right'
}
}
});
@@ -264,23 +292,30 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
this.form.patchValue({
layout: {
width : 'fullwidth',
navbar : {
background: 'mat-fuse-dark-700-bg',
folded : false,
hidden : false,
position : 'top',
variant : 'vertical-style-1'
width : 'fullwidth',
navbar : {
primaryBackground : 'fuse-navy-700',
secondaryBackground: 'fuse-navy-900',
folded : false,
hidden : false,
position : 'top',
variant : 'vertical-style-1'
},
toolbar: {
background: 'mat-white-500-bg',
hidden : false,
position : 'above'
toolbar : {
background : 'fuse-white-500',
customBackgroundColor: false,
hidden : false,
position : 'above'
},
footer : {
background: 'mat-fuse-dark-900-bg',
hidden : false,
position : 'above-fixed'
footer : {
background : 'fuse-navy-900',
customBackgroundColor: true,
hidden : false,
position : 'above-fixed'
},
sidepanel: {
hidden : false,
position: 'right'
}
}
});
@@ -303,5 +338,4 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
this._fuseSidebarService.getSidebar(key).toggleOpen();
}
}

View File

@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule } from '@angular/material';
import {
MatButtonModule, MatCheckboxModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatOptionModule, MatRadioModule, MatSelectModule, MatSlideToggleModule
} from '@angular/material';
import { FuseDirectivesModule } from '@fuse/directives/directives';
import { FuseSidebarModule } from '@fuse/components/sidebar/sidebar.module';
import { FuseMaterialColorPickerModule } from '@fuse/components/material-color-picker/material-color-picker.module';
import { FuseSidebarModule } from '@fuse/components/sidebar/sidebar.module';
import { FuseThemeOptionsComponent } from '@fuse/components/theme-options/theme-options.component';
@@ -22,6 +24,7 @@ import { FuseThemeOptionsComponent } from '@fuse/components/theme-options/theme-
FlexLayoutModule,
MatButtonModule,
MatCheckboxModule,
MatDividerModule,
MatFormFieldModule,
MatIconModule,

View File

@@ -0,0 +1,27 @@
@mixin fuse-theme-options-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
fuse-theme-options {
.theme-options-panel {
form {
.group {
border: 1px solid map-get($foreground, divider);
h2 {
background: map-get($background, background);
color: map-get($foreground, secondary-text);
}
h3 {
color: map-get($foreground, secondary-text);
}
}
}
}
}
}

View File

@@ -20,11 +20,13 @@ fuse-widget {
width: 100%;
opacity: 1;
z-index: 10;
border-radius: 2px;
border-radius: 8px;
transition: transform 0.5s ease-out 0s, visibility 0s ease-in 0.2s, opacity 0s ease-in 0.2s;
transform: rotateY(0deg);
backface-visibility: hidden;
border: 1px solid;
}
> .fuse-widget-back {
display: block;
position: absolute;
@@ -36,9 +38,11 @@ fuse-widget {
visibility: hidden;
opacity: 0;
z-index: 10;
border-radius: 8px;
transition: transform 0.5s ease-out 0s, visibility 0s ease-in 0.2s, opacity 0s ease-in 0.2s;
transform: rotateY(180deg);
backface-visibility: hidden;
border: 1px solid;
[fuseWidgetToggle] {
position: absolute;

View File

@@ -0,0 +1,14 @@
@mixin fuse-widget-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
fuse-widget {
> .fuse-widget-front,
> .fuse-widget-back {
background: map-get($background, card);
border-color: map-get($foreground, divider);
}
}
}

View File

@@ -15,11 +15,11 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
@HostBinding('class.mat-is-locked-open')
isLockedOpen: boolean;
@Input('fuseMatSidenavHelper')
id: string;
@Input()
fuseMatSidenavHelper: string;
@Input('mat-is-locked-open')
matIsLockedOpenBreakpoint: string;
@Input()
matIsLockedOpen: string;
// Private
private _unsubscribeAll: Subject<any>;
@@ -56,9 +56,9 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
ngOnInit(): void
{
// Register the sidenav to the service
this._fuseMatSidenavHelperService.setSidenav(this.id, this._matSidenav);
this._fuseMatSidenavHelperService.setSidenav(this.fuseMatSidenavHelper, this._matSidenav);
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) )
if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{
this.isLockedOpen = true;
this._matSidenav.mode = 'side';
@@ -74,7 +74,7 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
this._fuseMatchMediaService.onMediaChange
.pipe(takeUntil(this._unsubscribeAll))
.subscribe(() => {
if ( this._observableMedia.isActive(this.matIsLockedOpenBreakpoint) )
if ( this._observableMedia.isActive(this.matIsLockedOpen) )
{
this.isLockedOpen = true;
this._matSidenav.mode = 'side';
@@ -105,8 +105,8 @@ export class FuseMatSidenavHelperDirective implements OnInit, OnDestroy
})
export class FuseMatSidenavTogglerDirective
{
@Input('fuseMatSidenavToggler')
id;
@Input()
fuseMatSidenavToggler: string;
/**
* Constructor
@@ -126,8 +126,8 @@ export class FuseMatSidenavTogglerDirective
* On click
*/
@HostListener('click')
onClick()
onClick(): void
{
this._fuseMatSidenavHelperService.getSidenav(this.id).toggle();
this._fuseMatSidenavHelperService.getSidenav(this.fuseMatSidenavToggler).toggle();
}
}

View File

@@ -15,7 +15,7 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
{
isInitialized: boolean;
isMobile: boolean;
ps: PerfectScrollbar;
ps: PerfectScrollbar | any;
// Private
private _enabled: boolean | '';
@@ -200,6 +200,19 @@ export class FusePerfectScrollbarDirective implements AfterViewInit, OnDestroy
this.ps = new PerfectScrollbar(this.elementRef.nativeElement, {
...this.fusePerfectScrollbarOptions
});
// Unbind 'keydown' events of PerfectScrollbar since it causes an extremely
// high CPU usage on Angular Material inputs.
// Loop through all the event elements of this PerfectScrollbar instance
this.ps.event.eventElements.forEach((eventElement) => {
// If we hit to the element with a 'keydown' event...
if ( typeof eventElement.handlers['keydown'] !== 'undefined' )
{
// Unbind it
eventElement.element.removeEventListener('keydown', eventElement.handlers['keydown'][0]);
}
});
}
/**

View File

@@ -4,6 +4,7 @@ const black12 = 'rgba(black, 0.12)';
const white12 = 'rgba(white, 0.12)';
const black6 = 'rgba(black, 0.06)';
const white6 = 'rgba(white, 0.06)';
const matColors = {
'red': {
50 : '#ffebee',
@@ -635,7 +636,8 @@ const matColors = {
A700: white87
}
},
'fuse-dark': {
'fuse-navy': {
50 : '#ECECEE',
100 : '#C5C6CB',
200 : '#9EA1A9',
@@ -667,13 +669,15 @@ const matColors = {
A700: white87
}
},
white : {
'fuse-white': {
500 : 'white',
contrast: {
500: black87
}
},
black : {
'fuse-black': {
500 : 'black',
contrast: {
500: 'white'
@@ -683,7 +687,23 @@ const matColors = {
// tslint:disable-next-line
const matPresetColors = [
'#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0', '#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8', '#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7', '#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f', '#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1', '#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff', '#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4', '#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9', '#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581', '#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39', '#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d', '#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00', '#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40', '#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00', '#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5', '#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae', '#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64'
'#ffebee', '#ffcdd2', '#ef9a9a', '#e57373', '#ef5350', '#f44336', '#e53935', '#d32f2f', '#c62828', '#b71c1c', '#ff8a80', '#ff5252', '#ff1744', '#d50000', '#fce4ec', '#f8bbd0',
'#f48fb1', '#f06292', '#ec407a', '#e91e63', '#d81b60', '#c2185b', '#ad1457', '#880e4f', '#ff80ab', '#ff4081', '#f50057', '#c51162', '#f3e5f5', '#e1bee7', '#ce93d8', '#ba68c8',
'#ab47bc', '#9c27b0', '#8e24aa', '#7b1fa2', '#6a1b9a', '#4a148c', '#ea80fc', '#e040fb', '#d500f9', '#aa00ff', '#ede7f6', '#d1c4e9', '#b39ddb', '#9575cd', '#7e57c2', '#673ab7',
'#5e35b1', '#512da8', '#4527a0', '#311b92', '#b388ff', '#7c4dff', '#651fff', '#6200ea', '#e8eaf6', '#c5cae9', '#9fa8da', '#7986cb', '#5c6bc0', '#3f51b5', '#3949ab', '#303f9f',
'#283593', '#1a237e', '#8c9eff', '#536dfe', '#3d5afe', '#304ffe', '#e3f2fd', '#bbdefb', '#90caf9', '#64b5f6', '#42a5f5', '#2196f3', '#1e88e5', '#1976d2', '#1565c0', '#0d47a1',
'#82b1ff', '#448aff', '#2979ff', '#2962ff', '#e1f5fe', '#b3e5fc', '#81d4fa', '#4fc3f7', '#29b6f6', '#03a9f4', '#039be5', '#0288d1', '#0277bd', '#01579b', '#80d8ff', '#40c4ff',
'#00b0ff', '#0091ea', '#e0f7fa', '#b2ebf2', '#80deea', '#4dd0e1', '#26c6da', '#00bcd4', '#00acc1', '#0097a7', '#00838f', '#006064', '#84ffff', '#18ffff', '#00e5ff', '#00b8d4',
'#e0f2f1', '#b2dfdb', '#80cbc4', '#4db6ac', '#26a69a', '#009688', '#00897b', '#00796b', '#00695c', '#004d40', '#a7ffeb', '#64ffda', '#1de9b6', '#00bfa5', '#e8f5e9', '#c8e6c9',
'#a5d6a7', '#81c784', '#66bb6a', '#4caf50', '#43a047', '#388e3c', '#2e7d32', '#1b5e20', '#b9f6ca', '#69f0ae', '#00e676', '#00c853', '#f1f8e9', '#dcedc8', '#c5e1a5', '#aed581',
'#9ccc65', '#8bc34a', '#7cb342', '#689f38', '#558b2f', '#33691e', '#ccff90', '#b2ff59', '#76ff03', '#64dd17', '#f9fbe7', '#f0f4c3', '#e6ee9c', '#dce775', '#d4e157', '#cddc39',
'#c0ca33', '#afb42b', '#9e9d24', '#827717', '#f4ff81', '#eeff41', '#c6ff00', '#aeea00', '#fffde7', '#fff9c4', '#fff59d', '#fff176', '#ffee58', '#ffeb3b', '#fdd835', '#fbc02d',
'#f9a825', '#f57f17', '#ffff8d', '#ffff00', '#ffea00', '#ffd600', '#fff8e1', '#ffecb3', '#ffe082', '#ffd54f', '#ffca28', '#ffc107', '#ffb300', '#ffa000', '#ff8f00', '#ff6f00',
'#ffe57f', '#ffd740', '#ffc400', '#ffab00', '#fff3e0', '#ffe0b2', '#ffcc80', '#ffb74d', '#ffa726', '#ff9800', '#fb8c00', '#f57c00', '#ef6c00', '#e65100', '#ffd180', '#ffab40',
'#ff9100', '#ff6d00', '#fbe9e7', '#ffccbc', '#ffab91', '#ff8a65', '#ff7043', '#ff5722', '#f4511e', '#e64a19', '#d84315', '#bf360c', '#ff9e80', '#ff6e40', '#ff3d00', '#dd2c00',
'#efebe9', '#d7ccc8', '#bcaaa4', '#a1887f', '#8d6e63', '#795548', '#6d4c41', '#5d4037', '#4e342e', '#3e2723', '#d7ccc8', '#bcaaa4', '#8d6e63', '#5d4037', '#fafafa', '#f5f5f5',
'#eeeeee', '#e0e0e0', '#bdbdbd', '#9e9e9e', '#757575', '#616161', '#424242', '#212121', '#ffffff', '#eeeeee', '#bdbdbd', '#616161', '#eceff1', '#cfd8dc', '#b0bec5', '#90a4ae',
'#78909c', '#607d8b', '#546e7a', '#455a64', '#37474f', '#263238', '#cfd8dc', '#b0bec5', '#78909c', '#455a64'
];
/**
@@ -693,15 +713,15 @@ const matPresetColors = [
export class MatColors
{
public static all = matColors;
public static presets = matPresetColors;
public static getColor(colorName)
public static getColor(colorName): any
{
if ( matColors[colorName] )
{
return matColors[colorName];
}
return false;
}
}

View File

@@ -10,21 +10,17 @@
// Fuse
@import "fuse";
// Theme
@import "theme";
// Include core Angular Material styles
@include mat-core();
// Setup the typography
@include angular-material-typography($typography);
// Create an Angular Material theme from the $theme map
@include angular-material-theme($theme);
// Partials
@import "partials/reset";
@import "partials/normalize";
@import "partials/scrollbars";
@import "partials/helpers";
@import "partials/global";
@import "partials/general";
@import "partials/icons";
@import "partials/colors";
@import "partials/material";
@@ -35,7 +31,6 @@
@import "partials/cards";
@import "partials/navigation";
@import "partials/forms";
@import "partials/toolbar";
@import "partials/print";
// Plugins

View File

@@ -1,5 +1,5 @@
// Material theming
@import "theming";
// Material theming tools
@import '~@angular/material/theming';
// Breakpoint mixins
@import "mixins/breakpoints";
@import "partials/breakpoints";

View File

@@ -1,126 +0,0 @@
// Media step breakpoint mixin based on Angular Material lib
$breakpoints: (
xs: 'screen and (max-width: 599px)',
sm: 'screen and (min-width: 600px) and (max-width: 959px)',
md: 'screen and (min-width: 960px) and (max-width: 1279px)',
lg: 'screen and (min-width: 1280px) and (max-width: 1919px)',
xl: 'screen and (min-width: 1920px) and (max-width: 5000px)',
lt-sm: 'screen and (max-width: 599px)',
lt-md: 'screen and (max-width: 959px)',
lt-lg: 'screen and (max-width: 1279px)',
lt-xl: 'screen and (max-width: 1919px)',
gt-xs: 'screen and (min-width: 600px)',
gt-sm: 'screen and (min-width: 960px)',
gt-md: 'screen and (min-width: 1280px)',
gt-lg: 'screen and (min-width: 1920px)'
) !default;
$grid-breakpoints: (
xs: 0,
sm: 600px,
md: 960px,
lg: 1280px,
xl: 1920px
) !default;
@mixin media-breakpoint($breakpointName) {
$mediaQuery: map_get($breakpoints, $breakpointName);
@if ($mediaQuery != null) {
@media #{$mediaQuery} {
@content
}
}
}
// >> breakpoint-next(sm)
// md
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// md
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
// md
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
$n: index($breakpoint-names, $name);
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
//
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// 576px
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
$min: map-get($breakpoints, $name);
@return if($min != 0, $min, null);
}
// Maximum breakpoint width. Null for the largest (last) breakpoint.
// The maximum value is calculated as the minimum of the next one less 0.1.
//
// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// 767px
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
$next: breakpoint-next($name, $breakpoints);
@return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
}
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
// Useful for making responsive utilities.
//
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// "" (Returns a blank string)
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// "-sm"
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
}
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
// Makes the @content apply to the given breakpoint and wider.
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($name, $breakpoints);
@if $min {
@media (min-width: $min) {
@content;
}
} @else {
@content;
}
}
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
// Makes the @content apply to the given breakpoint and narrower.
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
$max: breakpoint-max($name, $breakpoints);
@if $max {
@media (max-width: $max) {
@content;
}
} @else {
@content;
}
}
// Media that spans multiple breakpoint widths.
// Makes the @content apply between the min and max breakpoints
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
$min: breakpoint-max($lower, $breakpoints);
$max: breakpoint-max($upper, $breakpoints);
@media (min-width: $min) and (max-width: $max) {
@content;
}
}
// Media between the breakpoint's minimum and maximum widths.
// No minimum for the smallest breakpoint, and no maximum for the largest one.
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($name, $breakpoints);
$max: breakpoint-max($name, $breakpoints);
@media (min-width: $min) and (max-width: $max) {
@content;
}
}

View File

@@ -1,3 +1,31 @@
// Fix: "Remove the cdk-global-scrollblock effects from the HTML"
// Fuse already blocks the body scroll so it doesn't need this feature. We are disabling it
// because on Windows, it causes a scrollbar to show up.
html {
&.cdk-global-scrollblock {
position: relative !important;
overflow: hidden !important;
}
}
// Fix: "Inconsistent button heights due to inconsistent line heights"
button {
.mat-button-wrapper {
line-height: normal;
}
}
.mat-icon {
// Fix: "Font-weight config affecting the icons"
font-weight: 400 !important;
// Fix: "Inconsistent positioning on custom font icons"
line-height: 1;
}
// Fix: "Icon button ripple radius is not correct on Edge & Safari"
.mat-icon-button {
@@ -12,10 +40,6 @@
}
// Fix: "Inconsistent font sizes across elements"
.mat-form-field-wrapper {
font-size: 16px;
}
.mat-checkbox {
font-size: 16px;
}
@@ -34,9 +58,9 @@
background-color: rgba(0, 0, 0, 0.12);
}
// Fix: "Some idiots using table-cell and inline-table in mat-select"
.mat-form-field {
// Fix: "Table-cell and inline-table in mat-select"
&.mat-form-field-type-mat-select {
.mat-form-field-infix {

View File

@@ -0,0 +1,38 @@
// Media step breakpoint mixin based on Angular Material lib
$breakpoints: (
xs: 'screen and (max-width: 599px)',
sm: 'screen and (min-width: 600px) and (max-width: 959px)',
md: 'screen and (min-width: 960px) and (max-width: 1279px)',
lg: 'screen and (min-width: 1280px) and (max-width: 1919px)',
xl: 'screen and (min-width: 1920px) and (max-width: 5000px)',
lt-sm: 'screen and (max-width: 599px)',
lt-md: 'screen and (max-width: 959px)',
lt-lg: 'screen and (max-width: 1279px)',
lt-xl: 'screen and (max-width: 1919px)',
gt-xs: 'screen and (min-width: 600px)',
gt-sm: 'screen and (min-width: 960px)',
gt-md: 'screen and (min-width: 1280px)',
gt-lg: 'screen and (min-width: 1920px)'
) !default;
// Re-map the breakpoints for the helper classes
$helper-breakpoints: (
xs: null,
sm: 'gt-xs',
md: 'gt-sm',
lg: 'gt-md',
xl: 'gt-lg'
);
@mixin media-breakpoint($breakpointName) {
$mediaQuery: map-get($breakpoints, $breakpointName);
@if ($mediaQuery == null) {
@content
} @else {
@media #{$mediaQuery} {
@content
}
}
}

View File

@@ -1,9 +1,29 @@
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin cards-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
.fuse-card {
background: map-get($background, card);
border-color: map-get($foreground, divider);
.card-divider {
border-top: 1px solid map-get($foreground, divider);
}
}
}
// -----------------------------------------------------------------------------------------------------
// @ Cards
// -----------------------------------------------------------------------------------------------------
.fuse-card {
max-width: 320px;
min-width: 320px;
background: white;
border-radius: 2px;
@include mat-elevation(2);
border-radius: 8px;
border: 1px solid;
&.variable-width {
min-width: 0;
@@ -37,13 +57,8 @@
// Divider
.card-divider {
border-top: 1px solid rgba(0, 0, 0, 0.12);
margin: 16px;
&.light {
border-top-color: rgba(255, 255, 255, 0.12);
}
&.full-width {
margin: 0;
}

View File

@@ -1,23 +1,52 @@
.secondary-text,
.icon,
i {
color: rgba(0, 0, 0, 0.54);
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin colors-theme($theme) {
$is-dark: map-get($theme, is-dark);
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
// Base colors
& {
color: map-get($foreground, text);
// If it's a light theme, use a darker background
// color other than the default #fafafa
@if ($is-dark) {
background: map-get($background, background);
} @else {
background: #F5F5F5;
}
}
.secondary-text {
color: map-get($foreground, secondary-text);
}
.icon,
i {
color: map-get($foreground, icon);
}
.hint-text {
color: map-get($foreground, hint-text);
}
.disabled-text {
color: map-get($foreground, disabled-text);
}
.fade-text,
.divider {
color: map-get($foreground, divider);
}
}
.hint-text,
.disabled-text {
color: rgba(0, 0, 0, 0.38);
}
.divider {
color: rgba(0, 0, 0, 0.12);
}
// Material colors map
// -----------------------------------------------------------------------------------------------------
// @ Material colors map
// -----------------------------------------------------------------------------------------------------
$matPalettes: (
primary: $primary,
accent: $accent,
warn: $warn,
red: $mat-red,
pink: $mat-pink,
purple: $mat-purple,
@@ -36,17 +65,16 @@ $matPalettes: (
deep-orange: $mat-deep-orange,
brown: $mat-brown,
grey: $mat-grey,
blue-grey: $mat-blue-grey,
white: $mat-white,
black: $mat-black,
fuse-dark: $mat-fusedark
blue-grey: $mat-blue-grey
);
// Material color hues list
$matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A700;
// Text color levels generator mixin
@mixin generateTextColorLevels($classes, $contrast) {
// -----------------------------------------------------------------------------------------------------
// @ Text color levels generator
// -----------------------------------------------------------------------------------------------------
@mixin generate-text-color-levels($classes, $contrast) {
// If the contrast is dark...
@if ($contrast == 'dark') {
@@ -125,7 +153,10 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
}
}
@mixin generateMaterialElementColors($classes, $contrast) {
// -----------------------------------------------------------------------------------------------------
// @ Material element colors generator
// -----------------------------------------------------------------------------------------------------
@mixin generate-material-element-colors($classes, $contrast) {
// If the contrast color is light...
$fuseForeground: (
@@ -150,53 +181,55 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
// Native Input
input[type="text"] {
color: map_get($fuseForeground, base);
color: map-get($fuseForeground, base);
}
// Input
.mat-form-field-label {
color: map_get($fuseForeground, hint-text);
color: map-get($fuseForeground, hint-text);
}
.mat-form-field-underline {
background-color: map_get($fuseForeground, divider);
background-color: map-get($fuseForeground, divider);
}
// Select
.mat-select-trigger,
.mat-select-arrow {
color: map_get($fuseForeground, hint-text);
color: map-get($fuseForeground, hint-text);
}
.mat-select-underline {
background-color: map_get($fuseForeground, divider);
background-color: map-get($fuseForeground, divider);
}
.mat-select-disabled .mat-select-value,
.mat-select-arrow,
.mat-select-trigger {
color: map_get($fuseForeground, hint-text);
color: map-get($fuseForeground, hint-text);
}
.mat-select-content,
.mat-select-panel-done-animating {
background: map_get($background, card);
//background: map-get($background, card);
}
.mat-select-value {
color: map_get($fuseForeground, text);
color: map-get($fuseForeground, text);
}
}
}
// Color classes generator mixin
@mixin generateColorClasses($colorName, $color, $contrastColor, $hue) {
// -----------------------------------------------------------------------------------------------------
// @ Color classes generator
// -----------------------------------------------------------------------------------------------------
@mixin generate-color-classes($colorName, $color, $contrastColor, $hue) {
.#{$colorName}#{$hue}-bg {
background-color: $color !important;
}
.mat-#{$colorName}#{$hue}-bg {
.#{$colorName}#{$hue} {
background-color: $color !important;
color: $contrastColor !important;
@@ -231,13 +264,10 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
}
}
@mixin generateFuseColorClasses($primary, $accent, $warn) {
$palettes: (
primary: $primary,
accent: $accent,
warn: $warn
);
// -----------------------------------------------------------------------------------------------------
// @ Fuse color classes
// -----------------------------------------------------------------------------------------------------
@mixin fuse-color-classes($palettes) {
// Define contrast lists
$light-contrasting-classes: ();
@@ -258,101 +288,74 @@ $matHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400, A70
@if ($color != null and $contrast != null) {
// Generate color classes
@include generateColorClasses($paletteName, $color, $contrast, '-#{$hue}');
@include generate-color-classes($paletteName, $color, $contrast, '-#{$hue}');
// If the contrast color is dark
@if (rgba(black, 1) == rgba($contrast, 1)) {
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.mat-#{$paletteName}-#{$hue}-bg'), 'comma');
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.#{$paletteName}-#{$hue}'), 'comma');
}
// if the contrast color is light
@else {
$light-contrasting-classes: append($light-contrasting-classes, unquote('.mat-#{$paletteName}-#{$hue}-bg'), 'comma');
$light-contrasting-classes: append($light-contrasting-classes, unquote('.#{$paletteName}-#{$hue}'), 'comma');
}
// Run the generator one more time for default values (500)
@if ($hue == 500) {
// if we are not working with primary, accent or warn palettes
@if ($hue == 500 and $paletteName != 'primary' and $paletteName != 'accent' and $paletteName != 'warn') {
// Generate color classes
@include generateColorClasses($paletteName, $color, $contrast, '');
@include generate-color-classes($paletteName, $color, $contrast, '');
// Add color to the correct list depending on the contrasting color
// If the contrast color is dark
@if (rgba(black, 1) == rgba($contrast, 1)) {
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.mat-#{$paletteName}-bg'), 'comma');
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
// if the contrast color is light
@else {
$light-contrasting-classes: append($light-contrasting-classes, unquote('.mat-#{$paletteName}-bg'), 'comma');
$light-contrasting-classes: append($light-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
}
}
}
}
// Generate contrasting colors
@include generateTextColorLevels($dark-contrasting-classes, 'dark');
@include generateTextColorLevels($light-contrasting-classes, 'light');
@include generateMaterialElementColors($dark-contrasting-classes, 'dark');
@include generateMaterialElementColors($light-contrasting-classes, 'light');
}
// Run the generator again for the selected default hue values for
// primary, accent and warn palettes
//
// We are doing this because the default hue value can be changed
// by the user when the Material theme being generated.
@if ($paletteName == 'primary' or $paletteName == 'accent' or $paletteName == 'warn') {
// Generate the color classes...
// Define contrast lists
$light-contrasting-classes: ();
$dark-contrasting-classes: ();
@each $paletteName, $palette in $matPalettes {
// Get the contrasts map
$contrasts: map-get($palette, 'contrast');
@each $hue in $matHues {
// Get the color and the contrasting color
$color: map-get($palette, $hue);
$contrast: map-get($contrasts, $hue);
@if ($color != null and $contrast != null) {
// Get the color and the contrasting color for the selected
// default hue
$color: map-get($palette, 'default');
$contrast: map-get($palette, 'default-contrast');
// Generate color classes
@include generateColorClasses($paletteName, $color, $contrast, '-#{$hue}');
@include generate-color-classes($paletteName, $color, $contrast, '');
// Add color to the correct list depending on the contrasting color
// If the contrast color is dark
@if (rgba(black, 1) == rgba($contrast, 1)) {
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.mat-#{$paletteName}-#{$hue}-bg'), 'comma');
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
// if the contrast color is light
@else {
$light-contrasting-classes: append($light-contrasting-classes, unquote('.mat-#{$paletteName}-#{$hue}-bg'), 'comma');
}
// Run the generator one more time for default values (500)
@if ($hue == 500) {
// Generate color classes
@include generateColorClasses($paletteName, $color, $contrast, '');
// Add color to the correct list depending on the contrasting color
// If the contrast color is dark
@if (rgba(black, 1) == rgba($contrast, 1)) {
$dark-contrasting-classes: append($dark-contrasting-classes, unquote('.mat-#{$paletteName}-bg'), 'comma');
}
// if the contrast color is light
@else {
$light-contrasting-classes: append($light-contrasting-classes, unquote('.mat-#{$paletteName}-bg'), 'comma');
}
$light-contrasting-classes: append($light-contrasting-classes, unquote('.#{$paletteName}'), 'comma');
}
}
}
// Generate contrasting colors
@include generate-text-color-levels($dark-contrasting-classes, 'dark');
@include generate-text-color-levels($light-contrasting-classes, 'light');
@include generate-material-element-colors($dark-contrasting-classes, 'dark');
@include generate-material-element-colors($light-contrasting-classes, 'light');
}
// Generate contrasting colors
@include generateTextColorLevels($dark-contrasting-classes, 'dark');
@include generateTextColorLevels($light-contrasting-classes, 'light');
@include generateMaterialElementColors($dark-contrasting-classes, 'dark');
@include generateMaterialElementColors($light-contrasting-classes, 'light');
// -----------------------------------------------------------------------------------------------------
// @ Generate Fuse color classes for default Material palettes
// -----------------------------------------------------------------------------------------------------
@include fuse-color-classes($matPalettes);

View File

@@ -0,0 +1,70 @@
// -----------------------------------------------------------------------------------------------------
// @ Body scroll lock
// -----------------------------------------------------------------------------------------------------
html,
body {
display: flex;
flex: 1 0 auto;
width: 100%;
height: 100%;
max-height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
// -----------------------------------------------------------------------------------------------------
// @ Boxed body
// -----------------------------------------------------------------------------------------------------
body {
// Boxed
&.boxed {
max-width: 1200px;
margin: 0 auto;
@include mat-elevation(8);
}
}
/*----------------------------------------------------------------*/
/* @ Text rendering & box sizing
/*----------------------------------------------------------------*/
* {
text-rendering: optimizeLegibility;
-o-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
-webkit-text-rendering: optimizeLegibility;
-webkit-tap-highlight-color: transparent;
box-sizing: border-box;
&:before, &:after {
box-sizing: border-box;
}
// Remove focus outline
&:focus {
outline: none;
}
}
// -----------------------------------------------------------------------------------------------------
// @ Responsive images
// -----------------------------------------------------------------------------------------------------
img {
max-width: 100%;
height: auto;
vertical-align: top;
border: none;
}
// -----------------------------------------------------------------------------------------------------
// @ Input
// -----------------------------------------------------------------------------------------------------
input {
border: none;
padding: 0 16px;
}

View File

@@ -1,24 +0,0 @@
html,
body {
display: flex;
flex: 1 0 auto;
width: 100%;
height: 100%;
max-height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background: #F5F5F5;
}
body {
// Boxed
&.boxed {
max-width: 1200px;
margin: 0 auto;
@include mat-elevation(8);
}
}

View File

@@ -1,11 +1,11 @@
// ######################
// POSITION HELPERS
// ######################
@each $breakpoint in map-keys($grid-breakpoints) {
// -----------------------------------------------------------------------------------------------------
// @ Position helpers
// -----------------------------------------------------------------------------------------------------
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
@include media-breakpoint-up($breakpoint) {
@include media-breakpoint($materialBreakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
$infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
.position#{$infix}-relative {
position: relative;
@@ -21,14 +21,14 @@
}
}
// ####################################
// ABSOLUTE POSITION ALIGNMENT HELPERS
// ####################################
@each $breakpoint in map-keys($grid-breakpoints) {
// -----------------------------------------------------------------------------------------------------
// @ Absolute position alignment helpers
// -----------------------------------------------------------------------------------------------------
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
@include media-breakpoint-up($breakpoint) {
@include media-breakpoint($materialBreakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
$infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
.align#{$infix}-top {
top: 0;
@@ -48,9 +48,9 @@
}
}
// ######################
// SIZE HELPERS
// ######################
// -----------------------------------------------------------------------------------------------------
// @ Size helpers
// -----------------------------------------------------------------------------------------------------
@each $prop, $abbrev in (height: h, width: w) {
@for $index from 0 through 180 {
@@ -75,14 +75,14 @@
}
}
// ######################
// SPACING HELPERS
// ######################
@each $breakpoint in map-keys($grid-breakpoints) {
// -----------------------------------------------------------------------------------------------------
// @ Spacing helpers
// -----------------------------------------------------------------------------------------------------
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
@include media-breakpoint-up($breakpoint) {
@include media-breakpoint($materialBreakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
$infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
@each $prop, $abbrev in (margin: m, padding: p) {
@@ -168,9 +168,9 @@
}
}
// ######################
// BORDER HELPERS
// ######################
// -----------------------------------------------------------------------------------------------------
// @ Border helpers
// -----------------------------------------------------------------------------------------------------
$border-style: 1px solid rgba(0, 0, 0, 0.12);
.border,
@@ -199,7 +199,7 @@ $border-style: 1px solid rgba(0, 0, 0, 0.12);
}
.border-horizontal,
.b-x {
.bx {
border-left: $border-style;
border-right: $border-style;
}
@@ -210,9 +210,9 @@ $border-style: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: $border-style;
}
// ######################
// BORDER RADIUS HELPERS
// ######################
// -----------------------------------------------------------------------------------------------------
// @ Border radius helpers
// -----------------------------------------------------------------------------------------------------
.border-radius-100 {
border-radius: 100%;
}
@@ -233,9 +233,9 @@ $border-style: 1px solid rgba(0, 0, 0, 0.12);
border-radius: 16px;
}
// ######################
// CURSOR HELPERS
// ######################
// -----------------------------------------------------------------------------------------------------
// @ Cursor helpers
// -----------------------------------------------------------------------------------------------------
.cursor-pointer {
cursor: pointer;
}

View File

@@ -7,11 +7,11 @@ mat-icon {
min-height: 24px;
line-height: 24px;
@each $breakpoint in map-keys($grid-breakpoints) {
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
@include media-breakpoint-up($breakpoint) {
@include media-breakpoint($materialBreakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
$infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
@for $size from 2 through 128 {

View File

@@ -1,6 +1,169 @@
/*----------------------------------------------------------------*/
/* Avatars
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin material-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
// -----------------------------------------------------------------------------------------------------
// @ Avatar
// -----------------------------------------------------------------------------------------------------
.avatar {
color: map-get($foreground, text);
}
// -----------------------------------------------------------------------------------------------------
// @ Forms
// -----------------------------------------------------------------------------------------------------
.form-wrapper {
background-color: map-get($background, card);
}
// -----------------------------------------------------------------------------------------------------
// @ Navigation - Simple
// -----------------------------------------------------------------------------------------------------
.navigation-simple {
.item {
&.selected {
background-color: map-get($background, hover);
}
}
.subheader {
border-top: 1px solid map-get($foreground, divider);
}
}
// -----------------------------------------------------------------------------------------------------
// @ Pagination - Simple
// -----------------------------------------------------------------------------------------------------
.simple-pagination {
background: map-get($background, card);
.pagination-item {
color: map-get($foreground, secondary-text);
&:hover {
color: map-get($foreground, text);
}
&.disabled {
color: map-get($foreground, disabled-text);
}
}
}
// -----------------------------------------------------------------------------------------------------
// @ Price tables
// -----------------------------------------------------------------------------------------------------
.price-tables {
.price-table {
background: map-get($background, card);
&.style-1 {
.price {
.currency {
color: map-get($foreground, secondary-text);
}
.period {
color: map-get($foreground, secondary-text);
}
}
}
&.style-2 {
.price {
.currency {
color: map-get($foreground, secondary-text);
}
}
.period {
color: map-get($foreground, secondary-text);
}
}
&.style-3 {
.package-type {
.subtitle {
color: map-get($foreground, secondary-text);
}
}
.terms {
color: map-get($foreground, secondary-text);
}
.note {
color: map-get($foreground, secondary-text);
}
}
}
}
// -------------------------------------------------------------------------------------------------
// @ Table - Simple
// -------------------------------------------------------------------------------------------------
.simple-table-container {
background: map-get($background, card);
}
table {
&.simple {
thead {
tr {
th {
color: map-get($foreground, secondary-text);
border-bottom: 1px solid map-get($foreground, divider);
}
}
}
tbody {
tr {
td {
border-bottom: 1px solid map-get($foreground, divider);
}
}
}
&.clickable {
tbody {
tr {
&:hover {
background-color: map-get($background, hover);
}
}
}
}
}
}
}
// -----------------------------------------------------------------------------------------------------
// @ Avatar
// -----------------------------------------------------------------------------------------------------
.avatar {
width: 40px;
min-width: 40px;
@@ -9,9 +172,8 @@
margin: 0 8px 0 0;
border-radius: 50%;
font-size: 17px;
font-weight: 500;
font-weight: 600;
text-align: center;
color: #FFFFFF;
&.square {
border-radius: 0;
@@ -58,6 +220,7 @@ mat-icon.status {
&.online {
color: #4CAF50;
&:before {
content: "check_circle";
}
@@ -65,14 +228,15 @@ mat-icon.status {
&.do-not-disturb {
color: #F44336;
&:before {
content: "do_not_disturb_on";
content: "remove_circle_outline";
}
}
&.away {
background-color: #FFC107;
color: #FFFFFF;
color: #FFC107;
&:before {
content: "access_time";
}
@@ -80,18 +244,17 @@ mat-icon.status {
&.offline {
color: #646464;
background-color: #FFFFFF;
&:before {
content: "not_interested";
}
}
}
/*----------------------------------------------------------------*/
/* Forms
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Forms
// -----------------------------------------------------------------------------------------------------
.form-wrapper {
background: #FFFFFF;
padding: 16px;
.form-title {
@@ -100,9 +263,9 @@ mat-icon.status {
}
}
/*----------------------------------------------------------------*/
/* Navigation - Simple
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Navigation - Simple
// -----------------------------------------------------------------------------------------------------
.navigation-simple {
.item {
@@ -122,24 +285,15 @@ mat-icon.status {
.title {
font-size: 13px;
font-weight: 500;
font-weight: 600;
line-height: 1;
}
&.selected {
background-color: rgba(0, 0, 0, 0.06);
}
}
.subheader {
font-size: 13px;
border-top: 1px solid rgba(0, 0, 0, 0.12);
font-weight: 500;
font-weight: 600;
margin-top: 8px;
&.light {
border-top: 1px solid rgba(255, 255, 255, 0.12);
}
}
mat-divider {
@@ -147,16 +301,16 @@ mat-icon.status {
}
}
/*----------------------------------------------------------------*/
/* Pagination
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Pagination - Simple
// -----------------------------------------------------------------------------------------------------
.simple-pagination {
position: relative;
display: inline-flex;
flex-direction: row;
@include mat-elevation(1);
background-color: #FFFFFF;
padding: 0 8px;
border-radius: 4px;
@include mat-elevation(1);
.pagination-item {
display: flex;
@@ -168,32 +322,24 @@ mat-icon.status {
border-radius: 0;
margin: 0;
font-weight: normal;
color: rgba(0, 0, 0, 0.54);
&:hover {
color: rgba(0, 0, 0, 0.87);
}
&.active {
cursor: default;
color: rgba(0, 0, 0, 0.87);
}
&.disabled {
cursor: default;
color: rgba(0, 0, 0, 0.26);
}
}
}
/*----------------------------------------------------------------*/
/* Price Tables
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Price tables
// -----------------------------------------------------------------------------------------------------
.price-tables {
.price-table {
position: relative;
background-color: #FFFFFF;
width: 280px;
border-radius: 2px;
margin: 12px;
@@ -217,8 +363,7 @@ mat-icon.status {
.currency {
padding-right: 4px;
font-size: 24px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
font-weight: 600;
}
.value {
@@ -230,7 +375,6 @@ mat-icon.status {
.period {
padding: 0 0 5px 4px;
font-size: 17px;
color: rgba(0, 0, 0, 0.54);
}
}
@@ -261,14 +405,14 @@ mat-icon.status {
left: 50%;
transform: translateX(-50%);
font-size: 11px;
font-weight: 500;
font-weight: 600;
padding: 6px 8px;
}
.package-type {
padding: 48px 32px 24px 32px;
font-size: 20px;
font-weight: 500;
font-weight: 600;
text-align: center;
}
@@ -278,8 +422,7 @@ mat-icon.status {
.currency {
padding-right: 4px;
font-size: 24px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
font-weight: 600;
}
.value {
@@ -292,8 +435,7 @@ mat-icon.status {
.period {
padding: 0 32px;
font-size: 15px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
font-weight: 600;
text-align: center;
}
@@ -328,8 +470,7 @@ mat-icon.status {
.subtitle {
font-size: 17px;
color: rgba(0, 0, 0, 0.54);
font-weight: 500;
font-weight: 600;
}
}
@@ -339,7 +480,7 @@ mat-icon.status {
.currency {
padding-right: 4px;
font-size: 15px;
font-weight: 500;
font-weight: 600;
}
.value {
@@ -357,7 +498,6 @@ mat-icon.status {
.terms {
margin: 32px;
font-size: 15px;
color: rgba(0, 0, 0, 0.54);
.term {
padding-bottom: 16px;
@@ -375,17 +515,15 @@ mat-icon.status {
.note {
padding: 8px 32px 16px 32px;
text-align: center;
color: rgba(0, 0, 0, 0.54);
}
}
}
}
/*----------------------------------------------------------------*/
/* Table - Simple
/*----------------------------------------------------------------*/
// -----------------------------------------------------------------------------------------------------
// @ Table - Simple
// -----------------------------------------------------------------------------------------------------
.simple-table-container {
background: #FFFFFF;
.table-title {
font-size: 20px;
@@ -407,9 +545,7 @@ table {
th {
padding: 16px 8px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
font-weight: 600;
white-space: nowrap;
&:first-child {
@@ -429,7 +565,6 @@ table {
td {
padding: 16px 8px;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
&:first-child {
padding-left: 24px;
@@ -455,12 +590,8 @@ table {
tr {
cursor: pointer;
&:hover {
background: rgba(0, 0, 0, 0.03);
}
}
}
}
}
}
}

View File

@@ -4,7 +4,7 @@
display: flex;
align-items: center;
height: 48px;
font-weight: 500;
font-weight: 600;
padding-left: 24px;
margin-top: 8px;
font-size: 12px;
@@ -19,7 +19,7 @@
display: flex;
align-items: center;
height: 48px;
font-weight: 500;
font-weight: 600;
padding-left: 24px;
margin-top: 8px;
font-size: 12px;
@@ -53,7 +53,7 @@
height: 20px;
padding: 0 7px;
font-size: 11px;
font-weight: 500;
font-weight: 600;
border-radius: 20px;
transition: opacity 0.2s ease-in-out 0.1s;
margin-left: 8px;
@@ -64,11 +64,11 @@
}
&:hover {
background-color: map-get($background, hover);
background-color: rgba(0, 0, 0, 0.04);
}
.mat-ripple-element {
background-color: map-get($background, hover);
background-color: rgba(0, 0, 0, 0.04);
}
&.active {
@@ -85,7 +85,6 @@
.nav-link-icon {
margin-right: 16px;
opacity: 0.7;
}
.nav-link-icon,
@@ -220,24 +219,27 @@
}
}
// Material style
&.material {
// Material 2 style
&.material2,
.material2 & {
.nav-subheader {
border-top: 1px solid rgba(0, 0, 0, 0.12);
&:first-child {
border-top: none;
}
height: 40px;
}
.nav-group {
> .group-title {
height: 40px;
}
}
.nav-item {
.nav-link {
height: 40px;
padding: 0 16px;
margin: 4px 8px;
border-radius: 4px;
padding: 0 12px 0 24px;
border-radius: 0 20px 20px 0;
margin-right: 16px;
}
}
}

View File

@@ -1,14 +1,91 @@
// Page Layouts
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin page-layouts-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
.page-layout {
// Carded layout
&.carded {
// Fullwidth
&.fullwidth {
> .center {
> .content-card {
background: map-get($background, card);
border-radius: 8px 8px 0 0;
> .toolbar {
border-bottom-color: map-get($foreground, divider);
}
}
}
}
// Left / Right sidebar
&.left-sidebar,
&.right-sidebar {
> .center {
> .content-card {
background: map-get($background, card);
border-radius: 8px 8px 0 0;
> .toolbar {
border-bottom-color: map-get($foreground, divider);
}
}
}
}
}
// Simple layout
&.simple {
// Left / Right sidebar
&.left-sidebar,
&.right-sidebar {
> .center {
> .content {
background: map-get($background, card);
}
}
// Inner sidebar
&.inner-sidebar {
> .content {
> .center {
> .content {
background: map-get($background, card);
}
}
}
}
}
}
}
}
// -----------------------------------------------------------------------------------------------------
// @ Page Layouts
// -----------------------------------------------------------------------------------------------------
$carded-header-height: 200px !default;
$carded-header-height-sm: 160px !default;
$carded-toolbar-height: 64px !default;
$header-height: 120px !default;
$header-height-sm: 100px !default;
// Calculate toolbarless header height
// Calculate toolbar-less carded header height
$carded-header-height-without-toolbar: $carded-header-height - $carded-toolbar-height;
$carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-toolbar-height;
.page-layout {
position: relative;
@@ -30,10 +107,6 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
right: 0;
left: 0;
height: $carded-header-height;
@include media-breakpoint-down('sm') {
height: $carded-header-height-sm;
}
}
// Fullwidth
@@ -50,18 +123,13 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
width: 100%;
min-width: 0;
max-width: 100%;
height: 100%;
max-height: 100%;
> .header {
height: $carded-header-height-without-toolbar !important;
min-height: $carded-header-height-without-toolbar !important;
max-height: $carded-header-height-without-toolbar !important;
@include media-breakpoint-down('sm') {
height: $carded-header-height-without-toolbar-sm !important;
min-height: $carded-header-height-without-toolbar-sm !important;
max-height: $carded-header-height-without-toolbar-sm !important;
}
}
> .content-card {
@@ -69,13 +137,13 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
flex-direction: column;
flex: 1 0 auto;
overflow: hidden;
@include mat-elevation(7);
@include mat-elevation(1);
> .toolbar {
display: flex;
justify-content: flex-start;
align-items: center;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: 1px solid;
height: $carded-toolbar-height;
min-height: $carded-toolbar-height;
max-height: $carded-toolbar-height;
@@ -223,12 +291,6 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
height: $carded-header-height;
min-height: $carded-header-height;
max-height: $carded-header-height;
@include media-breakpoint-down('sm') {
height: $carded-header-height-sm;
min-height: $carded-header-height-sm;
max-height: $carded-header-height-sm;
}
}
.content {
@@ -246,6 +308,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
z-index: 3;
margin-left: 32px;
margin-right: 32px;
width: 100%;
min-width: 0;
> .header {
@@ -253,12 +316,6 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
height: $carded-header-height-without-toolbar;
min-height: $carded-header-height-without-toolbar;
max-height: $carded-header-height-without-toolbar;
@include media-breakpoint-down('sm') {
height: $carded-header-height-without-toolbar-sm;
min-height: $carded-header-height-without-toolbar-sm;
max-height: $carded-header-height-without-toolbar-sm;
}
}
> .content-card {
@@ -266,14 +323,14 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
flex-direction: column;
flex: 1 1 auto;
overflow: hidden;
@include mat-elevation(7);
@include mat-elevation(1);
> .toolbar {
display: flex;
justify-content: flex-start;
align-items: center;
flex: 1 1 auto;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: 1px solid;
height: $carded-toolbar-height;
min-height: $carded-toolbar-height;
max-height: $carded-toolbar-height;
@@ -298,7 +355,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
width: calc(100% - 32px);
min-width: 0;
@include media-breakpoint-down('md') {
@include media-breakpoint('lt-lg') {
width: calc(100% - 64px);
}
@@ -484,7 +541,8 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
flex: 1 1 auto;
z-index: 3;
min-width: 0;
@include mat-elevation(7);
width: 100%;
@include mat-elevation(1);
> .header {
height: $header-height;
@@ -516,7 +574,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
}
}
// Inner Sidebar
// Inner sidebar
&.inner-sidebar {
flex-direction: column;
overflow: hidden;
@@ -543,6 +601,11 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
flex: 1 1 auto;
overflow: auto;
-webkit-overflow-scrolling: touch;
> .content {
border-radius: 8px;
@include mat-elevation(1);
}
}
}
}
@@ -603,7 +666,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too
min-height: 100%;
}
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
// Smaller margins
&.carded {

View File

@@ -9,7 +9,6 @@
.page-break-before {
display: none;
}
}
@media print {
@@ -47,6 +46,13 @@
display: none !important;
}
#main,
#container-1,
#container-2,
#container-3 {
padding: 0 !important;
}
.ps {
overflow: visible !important;
}

View File

@@ -1,83 +0,0 @@
/*----------------------------------------------------------------*/
/* Reset
/*----------------------------------------------------------------*/
* {
text-rendering: optimizeLegibility;
-o-text-rendering: optimizeLegibility;
-ms-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
-webkit-text-rendering: optimizeLegibility;
-webkit-tap-highlight-color: transparent;
box-sizing: border-box;
&:before, &:after {
box-sizing: border-box;
}
// Remove focus outline
&:focus {
outline: none;
}
}
html, body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
// Reset non angular-material input's default browser/os styles
*:not(mat-form-field) {
> input {
border: none;
border-radius: 0;
padding: 0;
margin: 0;
}
> input[type="text"],
> input[type="tel"],
> input[type="email"],
> input[type="search"],
> input[type="password"],
> input[type="button"],
> button,
> input[type="submit"],
> input[type="image"],
> textarea {
appearance: none;
border: none;
border-radius: 0;
padding: 0;
margin: 0;
}
}
*:not(mat-form-field) {
> input[type="button"],
> button,
> input[type="submit"] {
background: none;
}
}
button {
border-radius: 0;
font-family: inherit;
font-size: inherit;
padding: 0;
margin: 0;
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
}
img {
max-width: 100%;
height: auto;
vertical-align: top;
border: none;
}

View File

@@ -12,12 +12,12 @@ body:not(.is-mobile) {
::-webkit-scrollbar-thumb {
border: 2px solid transparent;
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.37);
border-radius: 24px;
box-shadow: inset 0 0 0 12px rgba(0, 0, 0, 0.37);
border-radius: 12px;
}
::-webkit-scrollbar-thumb:active {
box-shadow: inset 0 0 0 24px rgba(0, 0, 0, 0.54);
border-radius: 24px;
box-shadow: inset 0 0 0 12px rgba(0, 0, 0, 0.54);
border-radius: 12px;
}
}

View File

@@ -1,9 +0,0 @@
.toolbar {
.toolbar-separator {
height: 48px;
width: 1px;
border-right: 1px solid rgba(0, 0, 0, 0.12);
margin: 0 12px;
}
}

View File

@@ -1,6 +1,47 @@
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin typography-theme($theme) {
$background: map-get($theme, background);
$accent: map-get($theme, accent);
$is-dark: map-get($theme, is-dark);
a {
color: map-get($accent, default);
}
code {
&:not(.highlight) {
background-color: map-get($background, app-bar);
}
}
.changelog {
.entry {
background-color: map-get($background, card);
}
}
.text-boxed {
@if ($is-dark) {
background-color: rgba(255, 255, 255, 0.12);
color: rgba(255, 255, 255, 0.54);
} @else {
background-color: rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.54);
}
}
}
// -----------------------------------------------------------------------------------------------------
// @ Typography
// -----------------------------------------------------------------------------------------------------
html {
font-size: 62.5%;
font-family: 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
font-family: 'Muli', 'Helvetica Neue', 'Arial', sans-serif;
line-height: 1.4 !important;
letter-spacing: -0.1px !important;
}
@@ -46,10 +87,9 @@ h6, .h6 {
// Links
a {
color: mat-color($accent);
text-decoration: none;
&:not(.mat-button):not(.mat-raised-button):not(.mat-icon-button) {
&:not(.mat-button):not(.mat-raised-button):not(.mat-flat-button):not(.mat-stroked-button):not(.mat-icon-button):not(.mat-fab):not(.mat-mini-fab) {
&:hover, &:active {
text-decoration: underline;
@@ -103,11 +143,10 @@ code {
font-family: 'Monaco', 'Menlo', 'Consolas', 'Ubuntu Mono', monospace;;
&:not(.highlight) {
background: rgba(0, 0, 0, 0.065);
color: #106CC8;
margin: 0 1px;
padding: 2px 3px;
border-radius: 2px;
line-height: 1.7;
}
}
@@ -237,6 +276,7 @@ strong {
line-height: 1.25;
}
.line-height-1\.5,
.line-height-1\.50 {
line-height: 1.5;
}
@@ -245,24 +285,29 @@ strong {
line-height: 1.75;
}
// Letter spacing helpers
.letter-spacing-condensed {
letter-spacing: -0.02em;
}
.letter-spacing-normal {
letter-spacing: normal;
}
.letter-spacing-relaxed {
letter-spacing: 0.02em;
}
// Boxed text
.text-boxed {
border-radius: 2px;
padding: 4px 8px;
margin: 0 8px;
font-size: 11px;
font-weight: 500;
color: rgba(0, 0, 0, 0.54);
background-color: rgba(0, 0, 0, 0.12);
font-weight: 600;
white-space: nowrap;
}
// Boxed text light
.text-boxed-light {
@extend .text-boxed;
background-color: rgba(255, 255, 255, 0.7);
}
// Truncate
.text-truncate {
display: block;
@@ -280,7 +325,6 @@ strong {
.changelog {
.entry {
background: white;
margin-bottom: 24px;
padding: 24px 32px;
@include mat-elevation(2);
@@ -355,6 +399,10 @@ strong {
li {
margin-bottom: 6px;
letter-spacing: 0.015em;
ul {
margin-top: 6px;
}
}
}
}
@@ -389,4 +437,4 @@ strong {
border-left-color: #03A9F4;
color: rgba(0, 0, 0, 0.87);
}
}
}

View File

@@ -1,361 +0,0 @@
/*@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?81091010');
src: url('../font/fontello.eot?81091010#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?81091010') format('woff2'),
url('../font/fontello.woff?81091010') format('woff'),
url('../font/fontello.ttf?81091010') format('truetype'),
url('../font/fontello.svg?81091010#fontello') format('svg');
font-weight: normal;
font-style: normal;
}*/
owl-date-time {
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "Material Icons";
font-style: normal;
font-weight: normal;
speak: none;
display: flex;
align-items: center;
justify-content: center;
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-cancel:before {
content: 'close';
}
.icon-up-open:before {
content: 'keyboard_arrow_up';
}
.icon-down-open:before {
content: 'keyboard_arrow_down';
}
.icon-left-open:before {
content: 'chevron_left';
}
.icon-right-open:before {
content: 'chevron_right';
}
$white: #FFFFFF;
$black: #000000;
$grey: #DDDDDD;
$blue: #0070BA;
.owl-widget,
.owl-widget * {
box-sizing: border-box;
}
.owl-widget {
font-size: 1em;
}
.owl-state-focus {
}
.owl-corner-all {
border-radius: 2px;
}
.owl-corner-top {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.owl-state-default {
background: #FFFFFF;
color: rgba(0, 0, 0, 0.87);
}
.owl-dateTime-inputWrapper {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.owl-dateTime-input {
background: none !important;
padding: 0 !important;
cursor: pointer;
.owl-inputtext {
margin: 0;
padding: 8px;
background: none !important;
color: rgba(0, 0, 0, 0.87);
}
}
.owl-dateTime-cancel {
position: relative !important;
right: 0 !important;
top: 0 !important;
transform: none !important;
font-size: 16px !important;
width: 16px !important;
height: 16px !important;
min-width: 16px !important;
min-height: 16px !important;
line-height: 16px !important;
color: rgba(0, 0, 0, 0.54) !important;
}
}
.owl-dateTime {
position: relative;
width: 140px;
&.owl-dateTime-inline {
width: auto;
.owl-dateTime-dialog {
position: relative;
z-index: auto;
}
}
}
.owl-dateTime-dialog {
width: 256px;
user-select: none;
z-index: 99999;
top: 24px !important;
right: 0 !important;
left: auto !important;
@include mat-elevation(4);
}
.owl-dateTime-dialogHeader {
height: 2.5em;
padding: .25em;
background-color: rgba(0, 0, 0, .1);
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.owl-calendar-wrapper {
padding: 16px !important;
}
.owl-calendar-control {
.owl-calendar-controlNav {
display: flex;
align-items: center;
justify-content: center;
.nav-prev,
.nav-next {
display: flex;
&:before {
font-family: "Material Icons";
position: relative !important;
right: 0 !important;
top: 0 !important;
transform: none !important;
font-size: 20px !important;
width: 20px !important;
height: 20px !important;
min-width: 20px !important;
min-height: 20px !important;
line-height: 20px !important;
content: "chevron_left";
color: rgba(0, 0, 0, 0.54);
}
}
.nav-next:before {
content: "chevron_right";
}
}
.owl-calendar-controlContent {
.month-control,
.year-control {
font-size: 14px;
font-weight: 500;
cursor: pointer;
}
.month-control {
margin-right: 8px;
}
.year-control {
}
}
}
.owl-calendar {
table {
border-spacing: 0 !important;
}
tbody td {
&.owl-calendar-selected {
background-color: $blue;
color: $white;
}
&.owl-calendar-invalid {
color: #ACACAC;
}
&.owl-calendar-outFocus {
color: $grey;
}
&.owl-calendar-hidden {
visibility: hidden;
}
&:not(.owl-calendar-selected):not(.owl-calendar-invalid):hover {
background-color: lighten($blue, 50%);
color: $black;
}
}
}
.owl-years,
.owl-months {
td.owl-year,
td.owl-month {
padding: 0;
font-size: 16px;
width: 72px;
height: 48px;
line-height: 48px;
cursor: pointer;
}
}
.owl-calendar-yearArrow {
width: 24px !important;
height: 24px !important;
&.left {
left: -16px !important;
}
&.right {
right: -16px !important;
}
}
.owl-weekdays {
th.owl-weekday {
height: 32px;
line-height: 32px;
text-align: center;
font-size: 12px;
padding: 0;
color: rgba(0, 0, 0, 0.37);
}
}
.owl-days {
td.owl-day {
height: 32px;
width: 32px;
line-height: 32px;
cursor: pointer;
border-radius: 100%;
padding: 0;
&.owl-day-today:before {
content: '';
display: block;
position: absolute;
right: 2px;
top: 2px;
border-top: .5em solid lighten($blue, 20%);
border-left: .5em solid transparent;
}
}
}
.owl-timer-wrapper {
height: 88px;
padding: 8px !important;
background-color: rgba(0, 0, 0, 0.06);
.owl-timer-input {
background: none;
width: 100% !important;
text-align: center;
}
.owl-timer-text {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 40%;
font-size: 20px;
}
.owl-meridian-btn {
font-size: .8em;
color: $blue;
background-image: none;
background-color: transparent;
border-color: $blue;
&:hover {
color: $white;
background-color: $blue;
border-color: $blue;
}
}
}
.owl-timer-divider {
display: inline-block;
position: absolute;
width: 8px;
height: 100%;
left: -2px;
.owl-timer-dot {
display: block;
background: rgba(0, 0, 0, 0.37);
width: 3px;
height: 3px;
position: absolute;
left: 50%;
border-radius: 100%;
transform: translateX(-50%);
&.dot-top {
top: 40%;
}
&.dot-bottom {
bottom: 40%;
}
}
}
}

View File

@@ -1,3 +1,76 @@
// -----------------------------------------------------------------------------------------------------
// @ Theming
// -----------------------------------------------------------------------------------------------------
@mixin ngx-datatable-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
ngx-datatable {
&.material {
background: map-get($background, card);
color: map-get($foreground, text);
.datatable-header {
.datatable-header-cell {
color: map-get($foreground, secondary-text);
}
}
.datatable-body {
.datatable-row-wrapper {
border-bottom-color: map-get($foreground, divider);
&:first-child {
border-top-color: map-get($foreground, divider);
}
.datatable-body-row {
.datatable-body-cell {
color: map-get($foreground, text);
}
}
}
}
.datatable-footer {
color: map-get($foreground, secondary-text);
.datatable-pager {
a {
color: map-get($foreground, secondary-text);
}
}
}
&:not(.cell-selection) {
.datatable-body {
.datatable-row-wrapper {
.datatable-body-row {
&:hover {
background-color: map-get($background, hover);
.datatable-row-group {
background-color: map-get($background, hover);
}
}
}
}
}
}
}
}
}
.ngx-datatable {
&.material {
@@ -42,12 +115,11 @@
}
.datatable-row-wrapper {
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: 1px solid;
&:first-child {
border-top: 1px solid rgba(0, 0, 0, 0.12);
border-top: 1px solid;
}
.datatable-body-cell {
display: inline-flex;
align-items: center;
@@ -118,48 +190,63 @@
.datatable-icon-filter:before {
content: "filter_list";
}
.datatable-icon-collapse:before {
content: "unfold_less";
}
.datatable-icon-expand:before {
content: "unfold_more";
}
.datatable-icon-close:before {
content: "close";
}
.datatable-icon-up:before {
content: "keyboard_arrow_up";
}
.datatable-icon-down:before {
content: "keyboard_arrow_down";
}
.datatable-icon-sort:before {
content: "sort";
}
.datatable-icon-done:before {
content: "done";
}
.datatable-icon-done-all:before {
content: "done_all";
}
.datatable-icon-search:before {
content: "search";
}
.datatable-icon-pin:before {
content: "lock";
}
.datatable-icon-add:before {
content: "add";
}
.datatable-icon-left:before {
content: "chevron_left";
}
.datatable-icon-right:before {
content: "chevron_right";
}
.datatable-icon-skip:before {
content: "skip_next";
}
.datatable-icon-prev:before {
content: "skip_previous";
}

30
src/@fuse/scss/theme.scss Normal file
View File

@@ -0,0 +1,30 @@
@import "src/@fuse/components/countdown/countdown.theme";
@import "src/@fuse/components/material-color-picker/material-color-picker.theme";
@import "src/@fuse/components/search-bar/search-bar.theme";
@import "src/@fuse/components/shortcuts/shortcuts.theme";
@import "src/@fuse/components/sidebar/sidebar.theme";
@import "src/@fuse/components/theme-options/theme-options.theme";
@import "src/@fuse/components/widget/widget.theme";
@mixin fuse-core-theme($theme) {
// Theming for Fuse core styles
@include colors-theme($theme);
@include cards-theme($theme);
@include material-theme($theme);
@include page-layouts-theme($theme);
@include typography-theme($theme);
// Theming for Fuse components
@include fuse-countdown-theme($theme);
@include fuse-search-bar-theme($theme);
@include fuse-shortcuts-theme($theme);
@include fuse-sidebar-theme($theme);
@include fuse-theme-options-theme($theme);
@include fuse-material-color-picker-theme($theme);
@include fuse-widget-theme($theme);
// Theming for 3rd party components
@include ngx-datatable-theme($theme);
}

View File

@@ -1,66 +0,0 @@
@import '~@angular/material/theming';
// Custom color maps
$mat-white: (
500: white,
contrast: (
500: $black-87-opacity
)
);
$mat-black: (
500: black,
contrast: (
500: white,
)
);
$mat-fusedark: (
50: #ECECEE,
100: #C5C6CB,
200: #9EA1A9,
300: #7D818C,
400: #5C616F,
500: #3C4252,
600: #353A48,
700: #2D323E,
800: #262933,
900: #1E2129,
A100: #C5C6CB,
A200: #9EA1A9,
A400: #5C616F,
A700: #2D323E,
contrast: (
50: $black-87-opacity,
100: $black-87-opacity,
200: $black-87-opacity,
300: white,
400: white,
500: $white-87-opacity,
600: $white-87-opacity,
700: $white-87-opacity,
800: $white-87-opacity,
900: $white-87-opacity,
A100: $black-87-opacity,
A200: $white-87-opacity,
A400: $white-87-opacity,
A700: $white-87-opacity,
)
);
// Define the Material palettes
$primary: mat-palette($mat-fusedark);
$accent: mat-palette($mat-light-blue, 600, 400, 700);
$warn: mat-palette($mat-red);
// Create the Material theme object
$theme: mat-light-theme($primary, $accent, $warn);
// Store the background and foreground colors for easier access
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);
// Force the input field font sizes to 16px
$typography: mat-typography-config(
$input: mat-typography-level(16px, 1.125, 400)
)

View File

@@ -1,5 +1,5 @@
import { Inject, Injectable, InjectionToken } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { Router, RoutesRecognized } from '@angular/router';
import { Platform } from '@angular/cdk/platform';
import { BehaviorSubject, Observable } from 'rxjs';
import { filter } from 'rxjs/operators';
@@ -93,15 +93,18 @@ export class FuseConfigService
// Set the config from the default config
this._configSubject = new BehaviorSubject(_.cloneDeep(this._defaultConfig));
// Reload the default config on every navigation start if
// the current config is different from the default one
// Reload the default layout config on every RoutesRecognized event
// if the current layout config is different from the default one
this._router.events
.pipe(filter(event => event instanceof NavigationStart))
.pipe(filter(event => event instanceof RoutesRecognized))
.subscribe(() => {
if ( !_.isEqual(this._configSubject.getValue(), this._defaultConfig) )
if ( !_.isEqual(this._configSubject.getValue().layout, this._defaultConfig.layout) )
{
// Clone the default config
const config = _.cloneDeep(this._defaultConfig);
// Clone the current config
const config = _.cloneDeep(this._configSubject.getValue());
// Reset the layout from the default config
config.layout = _.cloneDeep(this._defaultConfig.layout);
// Set the config
this._configSubject.next(config);

View File

@@ -1,6 +1,7 @@
import { MediaChange, ObservableMedia } from '@angular/flex-layout';
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
@@ -38,7 +39,11 @@ export class FuseMatchMediaService
*/
private _init(): void
{
this._observableMedia
this._observableMedia.asObservable()
.pipe(
debounceTime(500),
distinctUntilChanged()
)
.subscribe((change: MediaChange) => {
if ( this.activeMediaQuery !== change.mqAlias )
{

View File

@@ -3,6 +3,8 @@ import { DOCUMENT } from '@angular/common';
import { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';
import { NavigationEnd, Router } from '@angular/router';
import { filter, take } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
@@ -46,19 +48,16 @@ export class FuseSplashScreenService
if ( this.splashScreenEl )
{
// Hide it on the first NavigationEnd event
const hideOnLoad = this._router.events.subscribe((event) => {
if ( event instanceof NavigationEnd )
{
setTimeout(() => {
this.hide();
// Unsubscribe from this event so it
// won't get triggered again
hideOnLoad.unsubscribe();
}, 0);
}
}
);
this._router.events
.pipe(
filter((event => event instanceof NavigationEnd)),
take(1)
)
.subscribe(() => {
setTimeout(() => {
this.hide();
});
});
}
}

View File

@@ -1,21 +1,26 @@
export interface FuseConfig
{
colorTheme: string;
customScrollbars: boolean;
layout: {
style: string,
width: 'fullwidth' | 'boxed',
navbar: {
background: string,
primaryBackground: string,
secondaryBackground: string,
hidden: boolean,
folded: boolean,
position: 'left' | 'right' | 'top',
variant: string
},
toolbar: {
customBackgroundColor: boolean,
background: string,
hidden: boolean,
position: 'above' | 'above-static' | 'above-fixed' | 'below' | 'below-static' | 'below-fixed'
}
footer: {
customBackgroundColor: boolean,
background: string,
hidden: boolean,
position: 'above' | 'above-static' | 'above-fixed' | 'below' | 'below-static' | 'below-fixed'
@@ -25,5 +30,4 @@ export interface FuseConfig
position: 'left' | 'right'
}
};
customScrollbars: boolean;
}

View File

@@ -27,7 +27,7 @@
<!-- / HORIZONTAL LAYOUT 1 -->
<!-- THEME OPTIONS PANEL -->
<button mat-icon-button class="mat-primary-bg mat-elevation-z2 theme-options-button"
<button mat-icon-button class="warn mat-elevation-z2 theme-options-button"
[ngClass]="{'right-side-panel': fuseConfig.layout.sidepanel.position === 'right',
'side-panel-hidden': fuseConfig.layout.sidepanel.hidden === true}"
(click)="toggleSidebarOpen('themeOptionsPanel')">
@@ -37,4 +37,4 @@
<fuse-sidebar name="themeOptionsPanel" class="theme-options-sidebar" position="right" [invisibleOverlay]="true">
<fuse-theme-options></fuse-theme-options>
</fuse-sidebar>
<!-- / THEME OPTIONS PANEL -->
<!-- / THEME OPTIONS PANEL -->

View File

@@ -25,7 +25,7 @@
&.right-side-panel {
@include media-breakpoint-up('lg') {
@include media-breakpoint('gt-md') {
right: 70px;
}
}

View File

@@ -72,6 +72,39 @@ export class AppComponent implements OnInit, OnDestroy
// Use a language
this._translateService.use('en');
/**
* ----------------------------------------------------------------------------------------------------
* ngxTranslate Fix Start
* ----------------------------------------------------------------------------------------------------
*/
/**
* If you are using a language other than the default one, i.e. Turkish in this case,
* you may encounter an issue where some of the components are not actually being
* translated when your app first initialized.
*
* This is related to ngxTranslate module and below there is a temporary fix while we
* are moving the multi language implementation over to the Angular's core language
* service.
**/
// Set the default language to 'en' and then back to 'tr'.
// '.use' cannot be used here as ngxTranslate won't switch to a language that's already
// been selected and there is no way to force it, so we overcome the issue by switching
// the default language back and forth.
/**
setTimeout(() => {
this._translateService.setDefaultLang('en');
this._translateService.setDefaultLang('tr');
});
*/
/**
* ----------------------------------------------------------------------------------------------------
* ngxTranslate Fix End
* ----------------------------------------------------------------------------------------------------
*/
// Add is-mobile class to the body if the platform is mobile
if ( this._platform.ANDROID || this._platform.IOS )
{
@@ -95,8 +128,10 @@ export class AppComponent implements OnInit, OnDestroy
this._fuseConfigService.config
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((config) => {
this.fuseConfig = config;
// Boxed
if ( this.fuseConfig.layout.width === 'boxed' )
{
this.document.body.classList.add('boxed');
@@ -105,6 +140,19 @@ export class AppComponent implements OnInit, OnDestroy
{
this.document.body.classList.remove('boxed');
}
// Color theme - Use normal for loop for IE11 compatibility
for ( let i = 0; i < this.document.body.classList.length; i++ )
{
const className = this.document.body.classList[i];
if ( className.startsWith('theme-') )
{
this.document.body.classList.remove(className);
}
}
this.document.body.classList.add(this.fuseConfig.colorTheme);
});
}

318
src/app/app.theme.scss Normal file
View File

@@ -0,0 +1,318 @@
// -----------------------------------------------------------------------------------------------------
// @ Custom color maps for Fuse
// -----------------------------------------------------------------------------------------------------
$fuse-white: (
500: white,
contrast: (
500: $dark-primary-text
)
);
$fuse-black: (
500: black,
contrast: (
500: $light-primary-text,
)
);
$fuse-navy: (
50: #ECECEE,
100: #C5C6CB,
200: #9EA1A9,
300: #7D818C,
400: #5C616F,
500: #3C4252,
600: #353A48,
700: #2D323E,
800: #262933,
900: #1E2129,
A100: #C5C6CB,
A200: #9EA1A9,
A400: #5C616F,
A700: #2D323E,
contrast: (
50: $dark-primary-text,
100: $dark-primary-text,
200: $dark-primary-text,
300: $light-primary-text,
400: $light-primary-text,
500: $light-primary-text,
600: $light-primary-text,
700: $light-primary-text,
800: $light-primary-text,
900: $light-primary-text,
A100: $dark-primary-text,
A200: $light-primary-text,
A400: $light-primary-text,
A700: $light-primary-text,
)
);
// Generate Fuse color classes for custom palettes
$custom_palettes: (
fuse-white: $fuse-white,
fuse-black: $fuse-black,
fuse-navy: $fuse-navy
);
@include fuse-color-classes($custom_palettes);
// -----------------------------------------------------------------------------------------------------
// @ Typography
// -----------------------------------------------------------------------------------------------------
// Force the input field font sizes to 16px
$typography: mat-typography-config(
$font-family: 'Muli, Helvetica Neue, Arial, sans-serif',
$title: mat-typography-level(20px, 32px, 600),
$body-2: mat-typography-level(14px, 24px, 600),
$button: mat-typography-level(14px, 14px, 600),
$input: mat-typography-level(16px, 1.125, 400) // line-height must be unitless !!!
);
// Setup the typography
@include angular-material-typography($typography);
// -----------------------------------------------------------------------------------------------------
// @ Component theming
// -----------------------------------------------------------------------------------------------------
// Import app and page component themes here to enable theming for them
@import "src/app/layout/components/chat-panel/chat-panel.theme";
@import "src/app/layout/components/toolbar/toolbar.theme";
@import "src/app/main/apps/academy/academy.theme";
@import "src/app/main/apps/calendar/calendar.theme";
@import "src/app/main/apps/chat/chat.theme";
@import "src/app/main/apps/contacts/contacts.theme";
@import "src/app/main/apps/dashboards/project/project.theme";
@import "src/app/main/apps/e-commerce/orders/orders.theme";
@import "src/app/main/apps/e-commerce/products/products.theme";
@import "src/app/main/apps/file-manager/file-manager.theme";
@import "src/app/main/apps/mail/mail.theme";
@import "src/app/main/apps/mail-ngrx/mail.theme";
@import "src/app/main/apps/scrumboard/scrumboard.theme";
@import "src/app/main/apps/todo/todo.theme";
@import "src/app/main/pages/authentication/login/login.theme";
@import "src/app/main/pages/authentication/login-2/login-2.theme";
@import "src/app/main/pages/authentication/register/register.theme";
@import "src/app/main/pages/authentication/register-2/register-2.theme";
@import "src/app/main/pages/authentication/reset-password/reset-password.theme";
@import "src/app/main/pages/authentication/reset-password-2/reset-password-2.theme";
@import "src/app/main/pages/authentication/forgot-password/forgot-password.theme";
@import "src/app/main/pages/authentication/forgot-password-2/forgot-password-2.theme";
@import "src/app/main/pages/authentication/lock/lock.theme";
@import "src/app/main/pages/authentication/mail-confirm/mail-confirm.theme";
@import "src/app/main/pages/coming-soon/coming-soon.theme";
@import "src/app/main/pages/errors/404/error-404.theme";
@import "src/app/main/pages/errors/500/error-500.theme";
@import "src/app/main/pages/maintenance/maintenance.theme";
@import "src/app/main/pages/pricing/style-1/style-1.theme";
@import "src/app/main/pages/pricing/style-2/style-2.theme";
@import "src/app/main/pages/pricing/style-3/style-3.theme";
@import "src/app/main/pages/profile/tabs/about/about.theme";
@import "src/app/main/pages/profile/tabs/photos-videos/photos-videos.theme";
@import "src/app/main/pages/profile/tabs/timeline/timeline.theme";
@import "src/app/main/pages/search/classic/search-classic.theme";
@import "src/app/main/pages/search/modern/search-modern.theme";
@import "src/app/main/pages/faq/faq.theme";
@import "src/app/main/pages/knowledge-base/knowledge-base.theme";
@import "src/app/main/ui/cards/cards.theme";
@import "src/app/main/angular-material-elements/example-viewer/example-viewer.theme";
// Define a mixin for easier access
@mixin components-theme($theme) {
// Layout components
@include chat-panel-theme($theme);
@include toolbar-theme($theme);
// Apps
@include academy-theme($theme);
@include calendar-theme($theme);
@include chat-theme($theme);
@include contacts-theme($theme);
@include dashboards-project-theme($theme);
@include e-commerce-orders-theme($theme);
@include e-commerce-products-theme($theme);
@include file-manager-theme($theme);
@include mail-theme($theme);
@include mail-ngrx-theme($theme);
@include scrumboard-theme($theme);
@include todo-theme($theme);
// Pages
@include login-theme($theme);
@include login-2-theme($theme);
@include register-theme($theme);
@include register-2-theme($theme);
@include reset-password-theme($theme);
@include reset-password-2-theme($theme);
@include forgot-password-theme($theme);
@include forgot-password-2-theme($theme);
@include lock-theme($theme);
@include mail-confirm-theme($theme);
@include coming-soon-theme($theme);
@include error-404-theme($theme);
@include error-500-theme($theme);
@include maintenance-theme($theme);
@include pricing-style-1-theme($theme);
@include pricing-style-2-theme($theme);
@include pricing-style-3-theme($theme);
@include profile-about-theme($theme);
@include profile-photos-videos-theme($theme);
@include profile-timeline-theme($theme);
@include search-classic-theme($theme);
@include search-modern-theme($theme);
@include faq-theme($theme);
@include knowledge-base-theme($theme);
// UI
@include ui-cards-theme($theme);
// Example Viewer
@include example-viewer-theme($theme);
}
// -----------------------------------------------------------------------------------------------------
// @ Define the default theme
// -----------------------------------------------------------------------------------------------------
// Define the primary, accent and warn palettes
$default-primary-palette: mat-palette($fuse-navy);
$default-accent-palette: mat-palette($mat-light-blue, 600, 400, 700);
$default-warn-palette: mat-palette($mat-red);
// Create the Material theme object
$theme: mat-light-theme($default-primary-palette, $default-accent-palette, $default-warn-palette);
// Add ".theme-default" class to the body to activate this theme.
// Class name must start with "theme-" !!!
body.theme-default {
// Create an Angular Material theme from the $theme map
@include angular-material-theme($theme);
// Apply the theme to the Fuse Core
@include fuse-core-theme($theme);
// Apply the theme to the user components
@include components-theme($theme);
// Generate Fuse color classes for primary, accent and warn colors
$palettes: (
primary: $default-primary-palette,
accent: $default-accent-palette,
warn: $default-warn-palette
);
@include fuse-color-classes($palettes);
}
// -----------------------------------------------------------------------------------------------------
// @ Define a yellow light theme
// -----------------------------------------------------------------------------------------------------
// Define the primary, accent and warn palettes
$yellow-light-theme-primary-palette: mat-palette($fuse-navy, 600, 400, 700);
$yellow-light-theme-accent-palette: mat-palette($mat-yellow, 600, 400, 700);
$yellow-light-theme-warn-palette: mat-palette($mat-red);
// Create the Material theme object
$yellow-light-theme: mat-light-theme($yellow-light-theme-primary-palette, $yellow-light-theme-accent-palette, $yellow-light-theme-warn-palette);
// Add ".theme-yellow-light" class to the body to activate this theme.
// Class name must start with "theme-" !!!
body.theme-yellow-light {
// Generate the Angular Material theme
@include angular-material-theme($yellow-light-theme);
// Apply the theme to the Fuse Core
@include fuse-core-theme($yellow-light-theme);
// Apply the theme to the user components
@include components-theme($yellow-light-theme);
// Generate Fuse color classes for primary, accent and warn colors
$palettes: (
primary: $yellow-light-theme-primary-palette,
accent: $yellow-light-theme-accent-palette,
warn: $yellow-light-theme-warn-palette
);
@include fuse-color-classes($palettes);
}
// -----------------------------------------------------------------------------------------------------
// @ Define a blue-gray dark theme
// -----------------------------------------------------------------------------------------------------
// Define the primary, accent and warn palettes
$blue-gray-dark-theme-primary-palette: mat-palette($mat-blue);
$blue-gray-dark-theme-accent-palette: mat-palette($mat-blue-gray);
$blue-gray-dark-theme-warn-palette: mat-palette($mat-red);
// Create the Material theme object
$blue-gray-dark-theme: mat-dark-theme($blue-gray-dark-theme-primary-palette, $blue-gray-dark-theme-accent-palette, $blue-gray-dark-theme-warn-palette);
// Add ".theme-blue-gray-dark" class to the body to activate this theme.
// Class name must start with "theme-" !!!
body.theme-blue-gray-dark {
// Generate the Angular Material theme
@include angular-material-theme($blue-gray-dark-theme);
// Apply the theme to the Fuse Core
@include fuse-core-theme($blue-gray-dark-theme);
// Apply the theme to the user components
@include components-theme($blue-gray-dark-theme);
// Generate Fuse color classes for primary, accent and warn colors
$palettes: (
primary: $blue-gray-dark-theme-primary-palette,
accent: $blue-gray-dark-theme-accent-palette,
warn: $blue-gray-dark-theme-warn-palette
);
@include fuse-color-classes($palettes);
}
// -----------------------------------------------------------------------------------------------------
// @ Define a pink dark theme
// -----------------------------------------------------------------------------------------------------
// Define the primary, accent and warn palettes
$pink-dark-theme-primary-palette: mat-palette($mat-pink);
$pink-dark-theme-accent-palette: mat-palette($mat-pink);
$pink-dark-theme-warn-palette: mat-palette($mat-red);
// Create the Material theme object
$pink-dark-theme: mat-dark-theme($pink-dark-theme-primary-palette, $pink-dark-theme-accent-palette, $pink-dark-theme-warn-palette);
// Add ".theme-pink-dark" class to the body to activate this theme.
// Class name must start with "theme-" !!!
body.theme-pink-dark {
// Generate the Angular Material theme
@include angular-material-theme($pink-dark-theme);
// Apply the theme to the Fuse Core
@include fuse-core-theme($pink-dark-theme);
// Apply the theme to the user components
@include components-theme($pink-dark-theme);
// Generate Fuse color classes for primary, accent and warn colors
$palettes: (
primary: $pink-dark-theme-primary-palette,
accent: $pink-dark-theme-accent-palette,
warn: $pink-dark-theme-warn-palette
);
@include fuse-color-classes($palettes);
}

View File

@@ -20,10 +20,10 @@ export class CalendarFakeDb
start : subDays(startOfDay(new Date()), 1),
end : addDays(new Date(), 1),
title : 'A 3 day event',
allDay : false,
allDay : true,
color : {
primary : '#ad2121',
secondary: '#FAE3E3'
primary : '#F44336',
secondary: '#FFCDD2'
},
resizable: {
beforeStart: true,
@@ -40,8 +40,8 @@ export class CalendarFakeDb
title : 'An event with no end date',
allDay : false,
color : {
primary : '#e3bc08',
secondary: '#FDF1BA'
primary : '#FF9800',
secondary: '#FFE0B2'
},
resizable: {
beforeStart: true,
@@ -59,7 +59,7 @@ export class CalendarFakeDb
title : 'A long event that spans 2 months',
allDay : false,
color : {
primary : '#1e90ff',
primary : '#1E90FF',
secondary: '#D1E8FF'
},
resizable: {
@@ -78,8 +78,8 @@ export class CalendarFakeDb
title : 'A draggable and resizable event',
allDay : false,
color : {
primary : '#e3bc08',
secondary: '#FDF1BA'
primary : '#673AB7',
secondary: '#D1C4E9'
},
resizable: {
beforeStart: true,

View File

@@ -6,21 +6,21 @@ export class ChatFakeDb
'name' : 'Alice Freeman',
'avatar': 'assets/images/avatars/alice.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680606588342058356d',
'name' : 'Arnold',
'avatar': 'assets/images/avatars/Arnold.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a68009e20d0a9e9acf2a',
'name' : 'Barrera',
'avatar': 'assets/images/avatars/Barrera.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
'unread': null
},
{
@@ -28,7 +28,7 @@ export class ChatFakeDb
'name' : 'Blair',
'avatar': 'assets/images/avatars/Blair.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
'unread': 3
},
{
@@ -36,112 +36,112 @@ export class ChatFakeDb
'name' : 'Boyle',
'avatar': 'assets/images/avatars/Boyle.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a68031fdbb1db2c1af47',
'name' : 'Christy',
'avatar': 'assets/images/avatars/Christy.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680bc670af746c435e2',
'name' : 'Copeland',
'avatar': 'assets/images/avatars/Copeland.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680e7eb988a58ddf303',
'name' : 'Estes',
'avatar': 'assets/images/avatars/Estes.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680dcb077889f758961',
'name' : 'Harper',
'avatar': 'assets/images/avatars/Harper.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6806acf030f9341e925',
'name' : 'Helen',
'avatar': 'assets/images/avatars/Helen.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680ae1ae9a3c960d487',
'name' : 'Henderson',
'avatar': 'assets/images/avatars/Henderson.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680b8d240c011dd224b',
'name' : 'Josefina',
'avatar': 'assets/images/avatars/Josefina.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a68034cb3968e1f79eac',
'name' : 'Katina',
'avatar': 'assets/images/avatars/Katina.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6801146cce777df2a08',
'name' : 'Lily',
'avatar': 'assets/images/avatars/Lily.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6808a178bfd034d6ecf',
'name' : 'Mai',
'avatar': 'assets/images/avatars/Mai.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680653c265f5c79b5a9',
'name' : 'Nancy',
'avatar': 'assets/images/avatars/Nancy.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680bbcec3cc32a8488a',
'name' : 'Nora',
'avatar': 'assets/images/avatars/Nora.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6803d87f1b77e17b62b',
'name' : 'Odessa',
'avatar': 'assets/images/avatars/Odessa.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680e87cb319bd9bd673',
'name' : 'Reyna',
'avatar': 'assets/images/avatars/Reyna.jpg',
'status': 'offline',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6802d10e277a0f35775',
'name' : 'Shauna',
'avatar': 'assets/images/avatars/Shauna.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
'unread': null
},
{
@@ -149,7 +149,7 @@ export class ChatFakeDb
'name' : 'Shepard',
'avatar': 'assets/images/avatars/Shepard.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a680cd7efa56a45aea5d',
@@ -163,21 +163,21 @@ export class ChatFakeDb
'name' : 'Trevino',
'avatar': 'assets/images/avatars/Trevino.jpg',
'status': 'away',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a68018c663044be49cbf',
'name' : 'Tyson',
'avatar': 'assets/images/avatars/Tyson.jpg',
'status': 'do-not-disturb',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
},
{
'id' : '5725a6809413bf8a0a5272b1',
'name' : 'Velazquez',
'avatar': 'assets/images/avatars/Velazquez.jpg',
'status': 'online',
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
'mood' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
}
];
@@ -302,6 +302,7 @@ export class ChatFakeDb
'contactId' : '5725a680b3249760ea21de52',
'name' : 'Alice Freeman',
'unread' : 4,
'lastMessage' : 'You are the worst!',
'lastMessageTime': '2017-06-12T02:10:18.931Z'
},
{
@@ -309,6 +310,7 @@ export class ChatFakeDb
'contactId' : '5725a680b8d240c011dd224b',
'name' : 'Josefina',
'unread' : null,
'lastMessage' : 'We are losing money! Quick!',
'lastMessageTime': '2017-02-18T10:30:18.931Z'
},
{
@@ -316,6 +318,7 @@ export class ChatFakeDb
'contactId' : '5725a6809413bf8a0a5272b1',
'name' : 'Velazquez',
'unread' : 2,
'lastMessage' : 'Quickly come to the meeting room 1B, we have a big server issue',
'lastMessageTime': '2017-03-18T12:30:18.931Z'
}
]

View File

@@ -12,7 +12,7 @@ export class ContactsFakeDb
'email' : 'abbott@withinpixels.com',
'phone' : '+1-202-555-0175',
'address' : '933 8th Street Stamford, CT 06902',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -26,7 +26,7 @@ export class ContactsFakeDb
'email' : 'arnold@withinpixels.com',
'phone' : '+1-202-555-0141',
'address' : '906 Valley Road Michigan City, IN 46360',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -40,7 +40,7 @@ export class ContactsFakeDb
'email' : 'barrera@withinpixels.com',
'phone' : '+1-202-555-0196',
'address' : '183 River Street Passaic, NJ 07055',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -54,7 +54,7 @@ export class ContactsFakeDb
'email' : 'blair@withinpixels.com',
'phone' : '+1-202-555-0118',
'address' : '143 Jones Street Eau Claire, WI 54701',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -68,7 +68,7 @@ export class ContactsFakeDb
'email' : 'boyle@withinpixels.com',
'phone' : '+1-202-555-0177',
'address' : '218 Pearl Street Brandon, FL 33510',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -82,7 +82,7 @@ export class ContactsFakeDb
'email' : 'christy@withinpixels.com',
'phone' : '+1-202-555-0136',
'address' : '329 Bridge Street Desoto, TX 75115',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -96,7 +96,7 @@ export class ContactsFakeDb
'email' : 'copeland@withinpixels.com',
'phone' : '+1-202-555-0107',
'address' : '956 6th Avenue North Bergen, NJ 0704',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -110,7 +110,7 @@ export class ContactsFakeDb
'email' : 'estes@withinpixels.com',
'phone' : '+1-202-555-0113',
'address' : '664 York Street Cambridge, MA 02138',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -124,7 +124,7 @@ export class ContactsFakeDb
'email' : 'harper@withinpixels.com',
'phone' : '+1-202-555-0173',
'address' : '738 Route 11 Cornelius, NC 28031',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -138,7 +138,7 @@ export class ContactsFakeDb
'email' : 'helen@withinpixels.com',
'phone' : '+1-202-555-0163',
'address' : '194 Washington Avenue Saint Petersburg, FL 33702',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -152,7 +152,7 @@ export class ContactsFakeDb
'email' : 'henderson@withinpixels.com',
'phone' : '+1-202-555-0151',
'address' : '686 Roosevelt Avenue Oviedo, FL 32765',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -166,7 +166,7 @@ export class ContactsFakeDb
'email' : 'josefina@withinpixels.com',
'phone' : '+1-202-555-0160',
'address' : '202 Hartford Road Lynchburg, VA 24502',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -180,7 +180,7 @@ export class ContactsFakeDb
'email' : 'katina@withinpixels.com',
'phone' : '+1-202-555-0186',
'address' : '219 Woodland Road Valrico, FL 33594',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -194,7 +194,7 @@ export class ContactsFakeDb
'email' : 'lily@withinpixels.com',
'phone' : '+1-202-555-0115',
'address' : '305 Willow Drive Superior, WI 54880',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -208,7 +208,7 @@ export class ContactsFakeDb
'email' : 'mai@withinpixels.com',
'phone' : '+1-202-555-0199',
'address' : '148 Heather Lane Mcminnville, TN 37110',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -222,7 +222,7 @@ export class ContactsFakeDb
'email' : 'nancy@withinpixels.com',
'phone' : '+1-202-555-0120',
'address' : '345 Laurel Lane Union City, NJ 07087',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -236,7 +236,7 @@ export class ContactsFakeDb
'email' : 'nora@withinpixels.com',
'phone' : '+1-202-555-0172',
'address' : '572 Rose Street Summerfield, FL 34491',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -250,7 +250,7 @@ export class ContactsFakeDb
'email' : 'odessa@withinpixels.com',
'phone' : '+1-202-555-0190',
'address' : '527 Jefferson Court Conyers, GA 30012',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -264,7 +264,7 @@ export class ContactsFakeDb
'email' : 'reyna@withinpixels.com',
'phone' : '+1-202-555-0116',
'address' : '297 Strawberry Lane Faribault, MN 55021',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -278,7 +278,7 @@ export class ContactsFakeDb
'email' : 'shauna@withinpixels.com',
'phone' : '+1-202-555-0159',
'address' : '928 Canterbury Court Pittsburgh, PA 15206',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -292,7 +292,7 @@ export class ContactsFakeDb
'email' : 'shepard@withinpixels.com',
'phone' : '+1-202-555-0173',
'address' : '904 Ridge Road Pickerington, OH 43147',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -306,7 +306,7 @@ export class ContactsFakeDb
'email' : 'tillman@withinpixels.com',
'phone' : '+1-202-555-0183',
'address' : '447 Charles Street Dorchester, MA 02125',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -320,7 +320,7 @@ export class ContactsFakeDb
'email' : 'trevino@withinpixels.com',
'phone' : '+1-202-555-0138',
'address' : '84 Valley View Road Norman, OK 73072',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -334,7 +334,7 @@ export class ContactsFakeDb
'email' : 'tyson@withinpixels.com',
'phone' : '+1-202-555-0146',
'address' : '204 Clark Street Monsey, NY 10952',
'birthday': null,
'birthday': '',
'notes' : ''
},
{
@@ -348,7 +348,7 @@ export class ContactsFakeDb
'email' : 'velezquez@withinpixels.com',
'phone' : '+1-202-555-0146',
'address' : '261 Cleveland Street Riverside, NJ 08075',
'birthday': null,
'birthday': '',
'notes' : ''
}
];

View File

@@ -4,7 +4,7 @@ export class AnalyticsDashboardDb
widget1: {
chartType: 'line',
datasets : {
'2015': [
'2016': [
{
label: 'Sales',
data : [1.9, 3, 3.4, 2.2, 2.9, 3.9, 2.5, 3.8, 4.1, 3.8, 3.2, 2.9],
@@ -12,7 +12,7 @@ export class AnalyticsDashboardDb
}
],
'2016': [
'2017': [
{
label: 'Sales',
data : [2.2, 2.9, 3.9, 2.5, 3.8, 3.2, 2.9, 1.9, 3, 3.4, 4.1, 3.8],
@@ -20,7 +20,7 @@ export class AnalyticsDashboardDb
}
],
'2017': [
'2018': [
{
label: 'Sales',
data : [3.9, 2.5, 3.8, 4.1, 1.9, 3, 3.8, 3.2, 2.9, 3.4, 2.2, 2.9],

View File

@@ -1622,7 +1622,7 @@ export class ProjectDashboardDb
[
{
'value' : 'Wireframing',
'classes': 'mat-primary-bg',
'classes': 'primary',
'icon' : ''
},
{
@@ -1654,7 +1654,7 @@ export class ProjectDashboardDb
[
{
'value' : 'Design',
'classes': 'mat-green-bg',
'classes': 'green',
'icon' : ''
},
{
@@ -1686,7 +1686,7 @@ export class ProjectDashboardDb
[
{
'value' : 'Coding',
'classes': 'mat-red-bg',
'classes': 'red',
'icon' : ''
},
{
@@ -1718,7 +1718,7 @@ export class ProjectDashboardDb
[
{
'value' : 'Marketing',
'classes': 'mat-accent-bg',
'classes': 'accent',
'icon' : ''
},
{
@@ -1750,7 +1750,7 @@ export class ProjectDashboardDb
[
{
'value' : 'Extra',
'classes': 'mat-orange-bg',
'classes': 'orange',
'icon' : ''
},
{

File diff suppressed because it is too large Load Diff

View File

@@ -34,7 +34,6 @@ export class FakeDbService implements InMemoryDbService
'calendar': CalendarFakeDb.data,
// E-Commerce
'e-commerce-dashboard': ECommerceFakeDb.dashboard,
'e-commerce-products' : ECommerceFakeDb.products,
'e-commerce-orders' : ECommerceFakeDb.orders,
@@ -78,8 +77,7 @@ export class FakeDbService implements InMemoryDbService
'profile-about' : ProfileFakeDb.about,
// Search
'search-classic': SearchFakeDb.classic,
'search-table' : SearchFakeDb.table,
'search': SearchFakeDb.search,
// FAQ
'faq': FaqFakeDb.data,

View File

@@ -48,7 +48,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Shopping list',
@@ -61,7 +61,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Invoices',
@@ -74,7 +74,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Crash logs',
@@ -87,7 +87,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'System logs',
@@ -100,7 +100,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Prices',
@@ -113,7 +113,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Anabelle Manual',
@@ -126,7 +126,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
},
{
'name' : 'Steam summer sale budget',
@@ -139,7 +139,7 @@ export class FileManagerFakeDb
'extention': '',
'location' : 'My Files > Documents',
'offline' : true,
'preview' : 'assets/images/etc/sample-file-preview.jpg'
'preview' : 'assets/images/file-manager/sample-file-preview.jpg'
}
];

File diff suppressed because it is too large Load Diff

View File

@@ -15,8 +15,8 @@ export class InvoiceFakeDb
'email' : 'johndoe@mail.com'
},
'number' : 'P9-0004',
'date' : 'Jul 19, 2015',
'dueDate' : 'Aug 24, 2015',
'date' : 'Jul 19, 2018',
'dueDate' : 'Aug 24, 2018',
'services': [
{
'title' : 'Prototype & Design',

View File

@@ -25,23 +25,22 @@ export class MailFakeDb
{
'type' : 'image',
'fileName': 'flowers',
'preview' : 'assets/images/etc/flowers-thumb.jpg',
'preview' : 'assets/images/mail/attachment-1.jpg',
'url' : '',
'size' : '1.1Mb'
},
{
'type' : 'image',
'fileName': 'snow',
'preview' : 'assets/images/etc/snow-thumb.jpg',
'preview' : 'assets/images/mail/attachment-2.jpg',
'url' : '',
'size' : '380kb'
},
{
'type' : 'image',
'fileName': 'sunrise',
'preview' : 'assets/images/etc/sunrise-thumb.jpg',
'url' : 'assets/images/etc/early-sunrise.jpg',
'size' : '17Mb'
'preview' : 'assets/images/mail/attachment-3.jpg',
'size': '17Mb'
}
],
'labels' : [

View File

@@ -16,7 +16,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/andrew.jpg'
},
'message': 'sent you a message.',
'time' : 'June 10,2015'
'time' : 'June 10,2018'
},
{
'user' : {
@@ -24,7 +24,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/garry.jpg'
},
'message': 'shared a public post with your group.',
'time' : 'June 9,2015'
'time' : 'June 9,2018'
},
{
'user' : {
@@ -32,7 +32,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/carl.jpg'
},
'message': 'wants to play Fallout Shelter with you.',
'time' : 'June 8,2015'
'time' : 'June 8,2018'
},
{
'user' : {
@@ -40,7 +40,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/jane.jpg'
},
'message': 'started following you.',
'time' : 'June 7,2015'
'time' : 'June 7,2018'
},
{
'user' : {
@@ -48,7 +48,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/james.jpg'
},
'message': 'sent you a message.',
'time' : 'June 6,2015'
'time' : 'June 6,2018'
},
{
'user' : {
@@ -56,7 +56,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/joyce.jpg'
},
'message': 'shared a photo with you.',
'time' : 'June 5,2015'
'time' : 'June 5,2018'
},
{
'user' : {
@@ -64,7 +64,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/vincent.jpg'
},
'message': 'shared a photo with you.',
'time' : 'June 4,2015'
'time' : 'June 4,2018'
}
],
posts : [
@@ -80,7 +80,7 @@ export class ProfileFakeDb
'share' : 21,
'media' : {
'type' : 'image',
'preview': 'assets/images/etc/early-sunrise.jpg'
'preview': 'assets/images/profile/morain-lake.jpg'
},
'comments': [
{
@@ -88,7 +88,7 @@ export class ProfileFakeDb
'name' : 'Alice Freeman',
'avatar': 'assets/images/avatars/alice.jpg'
},
'time' : 'June 10, 2015',
'time' : 'June 10, 2018',
'message': 'Thats a wonderful place. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et eleifend ligula. Fusce posuere in sapien ac facilisis. Etiam sit amet justo non felis ornare feugiat.'
}
]
@@ -99,17 +99,17 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/andrew.jpg'
},
'message' : 'Hey, man! Check this, its pretty awesome!',
'time' : 'June 12, 2015',
'time' : 'June 12, 2018',
'type' : 'article',
'like' : 98,
'share' : 6,
'article' : {
'title' : 'The Fallout 4 Pip-Boy Edition Is Back In Stock Now',
'subtitle': 'Kotaku',
'excerpt' : 'The Fallout 4 Pip-Boy edition is back in stock at Gamestop, for all 3 platforms. Additionally, Walmart also has it in stock for the PS4 and Xbox One as of this writing, as does Best Buy.',
'title' : 'Never stop changing!',
'subtitle': 'John Westrock',
'excerpt' : 'John Westrock\'s new photo album called \'Never stop changing\' is published! It features more than 200 photos that will take you right in.',
'media' : {
'type' : 'image',
'preview': 'assets/images/etc/fallout.jpg'
'preview': 'assets/images/profile/never-stop-changing.jpg'
}
},
'comments': [
@@ -118,7 +118,7 @@ export class ProfileFakeDb
'name' : 'Alice Freeman',
'avatar': 'assets/images/avatars/alice.jpg'
},
'time' : 'June 10, 2015',
'time' : 'June 10, 2018',
'message': 'Thats a wonderful place. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et eleifend ligula. Fusce posuere in sapien ac facilisis. Etiam sit amet justo non felis ornare feugiat.'
}
]
@@ -129,7 +129,7 @@ export class ProfileFakeDb
'avatar': 'assets/images/avatars/carl.jpg'
},
'message': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et eleifend ligula. Fusce posuere in sapien ac facilisis. Etiam sit amet justo non felis ornare feugiat. Aenean lorem ex, ultrices sit amet ligula sed...',
'time' : 'June 10, 2015',
'time' : 'June 10, 2018',
'type' : 'something',
'like' : 4,
'share' : 1
@@ -139,130 +139,130 @@ export class ProfileFakeDb
public static photosVideos = [
{
'name' : 'June 2015',
'name' : 'June 2018',
'info' : '5 Photos',
'media': [
{
'type' : 'photo',
'title' : 'Mountain Sunset',
'preview': 'assets/images/etc/mountain-sunset.jpg'
'title' : 'A Walk Amongst Friends',
'preview': 'assets/images/profile/a-walk-amongst-friends-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Lake',
'preview': 'assets/images/etc/mountain-lake.jpg'
'title' : 'Braies Lake',
'preview': 'assets/images/profile/braies-lake-small.jpg'
},
{
'type' : 'photo',
'title' : 'Hot air balloons',
'preview': 'assets/images/etc/air-balloons.jpg'
'title' : 'Fall Glow',
'preview': 'assets/images/profile/fall-glow-small.jpg'
},
{
'type' : 'photo',
'title' : 'Cactus',
'preview': 'assets/images/etc/cactus.jpg'
'title' : 'First Snow',
'preview': 'assets/images/profile/first-snow-small.jpg'
},
{
'type' : 'photo',
'title' : 'Road Trip',
'preview': 'assets/images/etc/road-trip.jpg'
'title' : 'Lago di Braies',
'preview': 'assets/images/profile/lago-di-braies-small.jpg'
}
]
},
{
'name' : 'May 2015',
'name' : 'May 2018',
'info' : '7 Photos, 3 Videos',
'media': [
{
'type' : 'photo',
'title' : 'Mountain Sunset',
'preview': 'assets/images/etc/mountain-sunset.jpg'
'title' : 'Lago di Sorapis',
'preview': 'assets/images/profile/lago-di-sorapis-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Lake',
'preview': 'assets/images/etc/mountain-lake.jpg'
'title' : 'Morain Lake',
'preview': 'assets/images/profile/morain-lake-small.jpg'
},
{
'type' : 'photo',
'title' : 'Hot air balloons',
'preview': 'assets/images/etc/air-balloons.jpg'
'title' : 'Never Stop Changing',
'preview': 'assets/images/profile/never-stop-changing-small.jpg'
},
{
'type' : 'photo',
'title' : 'Cactus',
'preview': 'assets/images/etc/cactus.jpg'
'title' : 'Reaching',
'preview': 'assets/images/profile/reaching-small.jpg'
},
{
'type' : 'photo',
'title' : 'Road Trip',
'preview': 'assets/images/etc/road-trip.jpg'
'title' : 'Yosemite',
'preview': 'assets/images/profile/yosemite-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Sunset',
'preview': 'assets/images/etc/mountain-sunset.jpg'
'title' : 'A Walk Amongst Friends',
'preview': 'assets/images/profile/a-walk-amongst-friends-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Lake',
'preview': 'assets/images/etc/mountain-lake.jpg'
'title' : 'Braies Lake',
'preview': 'assets/images/profile/braies-lake-small.jpg'
},
{
'type' : 'photo',
'title' : 'Hot air balloons',
'preview': 'assets/images/etc/air-balloons.jpg'
'title' : 'Fall Glow',
'preview': 'assets/images/profile/fall-glow-small.jpg'
},
{
'type' : 'photo',
'title' : 'Cactus',
'preview': 'assets/images/etc/cactus.jpg'
'title' : 'First Snow',
'preview': 'assets/images/profile/first-snow-small.jpg'
},
{
'type' : 'photo',
'title' : 'Road Trip',
'preview': 'assets/images/etc/road-trip.jpg'
'title' : 'Lago di Braies',
'preview': 'assets/images/profile/lago-di-braies-small.jpg'
}
]
},
{
'name' : 'April 2015',
'info' : '5 Photos',
'name' : 'April 2018',
'info' : '7 Photos',
'media': [
{
'type' : 'photo',
'title' : 'Mountain Sunset',
'preview': 'assets/images/etc/mountain-sunset.jpg'
'title' : 'Lago di Sorapis',
'preview': 'assets/images/profile/lago-di-sorapis-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Lake',
'preview': 'assets/images/etc/mountain-lake.jpg'
'title' : 'Morain Lake',
'preview': 'assets/images/profile/morain-lake-small.jpg'
},
{
'type' : 'photo',
'title' : 'Hot air balloons',
'preview': 'assets/images/etc/air-balloons.jpg'
'title' : 'Never Stop Changing',
'preview': 'assets/images/profile/never-stop-changing-small.jpg'
},
{
'type' : 'photo',
'title' : 'Cactus',
'preview': 'assets/images/etc/cactus.jpg'
'title' : 'Reaching',
'preview': 'assets/images/profile/reaching-small.jpg'
},
{
'type' : 'photo',
'title' : 'Road Trip',
'preview': 'assets/images/etc/road-trip.jpg'
'title' : 'Yosemite',
'preview': 'assets/images/profile/yosemite-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Sunset',
'preview': 'assets/images/etc/mountain-sunset.jpg'
'title' : 'A Walk Amongst Friends',
'preview': 'assets/images/profile/a-walk-amongst-friends-small.jpg'
},
{
'type' : 'photo',
'title' : 'Mountain Lake',
'preview': 'assets/images/etc/mountain-lake.jpg'
'title' : 'Braies Lake',
'preview': 'assets/images/profile/braies-lake-small.jpg'
}
]
}
@@ -270,10 +270,10 @@ export class ProfileFakeDb
public static about = {
'general': {
'gender' : 'Female',
'birthday' : 'May 8th, 1988',
'gender' : 'Male',
'birthday' : 'February 30th, 1974',
'locations': [
'Istanbul, Turkey',
'London, UK',
'New York, USA'
],
'about' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget pharetra felis, sed ullamcorper dui. Sed et elementum neque. Vestibulum pellente viverra ultrices. Etiam justo augue, vehicula ac gravida a, interdum sit amet nisl. Integer vitae nisi id nibh dictum mollis in vitae tortor.'
@@ -308,19 +308,16 @@ export class ProfileFakeDb
},
'groups' : [
{
'logo' : 'assets/images/logos/android.png',
'name' : 'Android',
'category': 'Technology',
'members' : '1.856.546'
},
{
'logo' : 'assets/images/logos/google.png',
'name' : 'Google',
'category': 'Web',
'members' : '1.226.121'
},
{
'logo' : 'assets/images/logos/fallout.png',
'name' : 'Fallout',
'category': 'Games',
'members' : '526.142'

View File

@@ -3,11 +3,11 @@ export class QuickPanelFakeDb
public static notes = [
{
'title' : 'Best songs to listen while working',
'detail': 'Last edit: May 8th, 2015'
'detail': 'Last edit: May 8th, 2018'
},
{
'title' : 'Useful subreddits',
'detail': 'Last edit: January 12th, 2015'
'detail': 'Last edit: January 12th, 2018'
}
];

View File

@@ -94,14 +94,14 @@ export class ScrumboardFakeDb
'id' : '67027cahbe3b52ecf2dc631c',
'name': 'mail.jpg',
'src' : 'assets/images/scrumboard/mail.jpg',
'time': 'Added Nov 3 at 15:22AM',
'time': 'Nov 3 at 15:22AM',
'type': 'image'
},
{
'id' : '56027cfcbe1b72ecf1fc452a',
'name': 'calendar.jpg',
'src' : 'assets/images/scrumboard/calendar.jpg',
'time': 'Added Nov 1 at 12:34PM',
'time': 'Nov 1 at 12:34PM',
'type': 'image'
}
],
@@ -274,7 +274,7 @@ export class ScrumboardFakeDb
}
],
'activities' : [],
'due' : '2018-09-07T12:00:00.000Z'
'due' : '2020-09-07T12:00:00.000Z'
},
{
'id' : 'f6b9d7a9247e5d794a081927',
@@ -383,14 +383,14 @@ export class ScrumboardFakeDb
'id' : '12027cafbe3b52ecf2ef632c',
'name': 'header-.jpg',
'src' : 'assets/images/scrumboard/header-1.jpg',
'time': 'Added Nov 3 at 15:22AM',
'time': 'Nov 3 at 15:22AM',
'type': 'image'
},
{
'id' : '55027ced1e1a12ecf1fced2a',
'name': 'header-2.jpg',
'src' : 'assets/images/scrumboard/header-2.jpg',
'time': 'Added Nov 1 at 12:34PM',
'time': 'Nov 1 at 12:34PM',
'type': 'image'
}
],
@@ -565,22 +565,22 @@ export class ScrumboardFakeDb
{
'id' : '26022e4129ad3a5sc28b36cd',
'name' : 'High Priority',
'color': 'mat-red-500-bg'
'color': 'red-500'
},
{
'id' : '56027e4119ad3a5dc28b36cd',
'name' : 'Design',
'color': 'mat-orange-400-bg'
'color': 'orange-400'
},
{
'id' : '5640635e19ad3a5dc21416b2',
'name' : 'App',
'color': 'mat-blue-600-bg'
'color': 'blue-600'
},
{
'id' : '6540635g19ad3s5dc31412b2',
'name' : 'Feature',
'color': 'mat-green-400-bg'
'color': 'green-400'
}
]
},
@@ -628,13 +628,13 @@ export class ScrumboardFakeDb
'id' : '56027cfcbe1b72ecf1fc452a',
'name': 'calendar-app-design.jpg',
'src' : 'assets/images/scrumboard/calendar.jpg',
'time': 'Added Nov 1 at 12:34PM',
'time': 'Nov 1 at 12:34PM',
'type': 'image'
},
{
'id' : '67027cahbe3b52ecf2dc631c',
'url' : 'assets/images/scrumboard/calendar.jpg',
'time': 'Added Nov 3 at 15:22AM',
'time': 'Nov 3 at 15:22AM',
'type': 'link'
}
],
@@ -730,7 +730,7 @@ export class ScrumboardFakeDb
'id' : '5603a2ae2bbd55bb2db57478',
'name': 'mail-app-design.jpg',
'src' : 'assets/images/scrumboard/mail.jpg',
'time': 'Added Nov 1 at 12:34PM',
'time': 'Nov 1 at 12:34PM',
'type': 'image'
}
],
@@ -769,17 +769,17 @@ export class ScrumboardFakeDb
{
'id' : '56027e4119ad3a5dc28b36cd',
'name' : 'Design',
'color': 'mat-red-500-bg'
'color': 'red-500'
},
{
'id' : '5640635e19ad3a5dc21416b2',
'name' : 'App',
'color': 'mat-blue-500-bg'
'color': 'blue-500'
},
{
'id' : '6540635g19ad3s5dc31412b2',
'name' : 'Feature',
'color': 'mat-green-400-bg'
'color': 'green-400'
}
]
}

View File

@@ -1,6 +1,6 @@
export class SearchFakeDb
{
public static classic = [
public static search = [
{
'title' : 'Dynamically Procrastinate B2C',
'url' : 'ourwebaddress.com/articles/procrastinate',
@@ -43,97 +43,4 @@ export class SearchFakeDb
}
];
public static table = [
{
'name' : 'Airi Satou',
'position' : 'Accountant',
'office' : 'Tokyo',
'age' : '33',
'startDate': '2008/11/28',
'salary' : '162700',
'email' : 'a.satou@mail.com'
},
{
'name' : 'Angellica Ramos',
'position' : 'Chief Executive Officer (CEO)',
'office' : 'London',
'age' : '47',
'startDate': '2009/10/09',
'salary' : '1200000',
'email' : 'a.ramos@mail.com'
},
{
'name' : 'Ashton Cox',
'position' : 'Hunior Technical Author',
'office' : 'San Fransisco',
'age' : '66',
'startDate': '2009/01/12',
'salary' : '86000',
'email' : 'a.cox@mail.com'
},
{
'name' : 'Bradley Greer',
'position' : 'Software Engineer',
'office' : 'London',
'age' : '41',
'startDate': '2012/10/13',
'salary' : '132000',
'email' : 'b.greer@mail.com'
},
{
'name' : 'Brenden Wagner',
'position' : 'Software Engineer',
'office' : 'San Fransisco',
'age' : '28',
'startDate': '2011/06/07',
'salary' : '206850',
'email' : 'b.wagner@mail.com'
},
{
'name' : 'Brielle Williamson',
'position' : 'Integration Specialist',
'office' : 'New York',
'age' : '61',
'startDate': '2012/12/02',
'salary' : '372000',
'email' : 'b.williamson@mail.com'
},
{
'name' : 'Bruno Nash',
'position' : 'Software Engineer',
'office' : 'London',
'age' : '38',
'startDate': '2011/05/03',
'salary' : '163500',
'email' : 'b.nash@mail.com'
},
{
'name' : 'Caesar Vance',
'position' : 'Pre-Sales Support',
'office' : 'New York',
'age' : '21',
'startDate': '2011/12/12',
'salary' : '106450',
'email' : 'c.vance@mail.com'
},
{
'name' : 'Cara Stevens',
'position' : 'Sales Assistant',
'office' : 'New York',
'age' : '46',
'startDate': '2011/12/06',
'salary' : '145600',
'email' : 'c.stevens@mail.com'
},
{
'name' : 'Cedric Kelly',
'position' : 'Senior Javascript Developer',
'office' : 'Edinburg',
'age' : '22',
'startDate': '2012/03/29',
'salary' : '433060',
'email' : 'c.kelly@mail.com'
}
];
}

View File

@@ -5,7 +5,7 @@ export class TodoFakeDb
'id' : '561551bd7fe2ff461101c192',
'title' : 'Proident tempor est nulla irure ad est',
'notes' : 'Id nulla nulla proident deserunt deserunt proident in quis. Cillum reprehenderit labore id anim laborum.',
'startDate': 'Wednesday, January 29, 2014 3:17 PM',
'startDate': 'Wednesday, January 29, 2017 3:17 PM',
'dueDate' : null,
'completed': false,
'starred' : false,
@@ -17,8 +17,8 @@ export class TodoFakeDb
'id' : '561551bd4ac1e7eb77a3a750',
'title' : 'Magna quis irure quis ea pariatur laborum',
'notes' : '',
'startDate': 'Sunday, February 1, 2015 1:30 PM',
'dueDate' : 'Friday, December 30, 2016 10:07 AM',
'startDate': 'Sunday, February 1, 2018 1:30 PM',
'dueDate' : 'Friday, December 30, 2019 10:07 AM',
'completed': false,
'starred' : false,
'important': true,
@@ -29,7 +29,7 @@ export class TodoFakeDb
'id' : '561551bd917bfec2ddef2d49',
'title' : 'Ullamco duis commodo sint ad aliqua aute',
'notes' : 'Sunt laborum enim nostrud ea fugiat cillum mollit aliqua exercitation ad elit.',
'startDate': 'Friday, April 11, 2014 3:43 AM',
'startDate': 'Friday, April 11, 2017 3:43 AM',
'dueDate' : 'Wednesday, July 26, 2017 11:14 AM',
'completed': false,
'starred' : true,
@@ -41,7 +41,7 @@ export class TodoFakeDb
'id' : '561551bdeeb2fd6877e18c29',
'title' : 'Eiusmod non occaecat pariatur Lorem in ex',
'notes' : 'Nostrud anim mollit incididunt qui qui sit commodo duis. Anim amet irure aliquip duis nostrud sit quis fugiat ullamco non dolor labore. Lorem sunt voluptate laboris culpa proident. Aute eiusmod aliqua exercitation irure exercitation qui laboris mollit occaecat eu occaecat fugiat.',
'startDate': 'Wednesday, May 7, 2014 4:14 AM',
'startDate': 'Wednesday, May 7, 2017 4:14 AM',
'dueDate' : 'Friday, December 15, 2017 4:01 AM',
'completed': true,
'starred' : true,
@@ -53,8 +53,8 @@ export class TodoFakeDb
'id' : '561551bdf38eae0134ae43d4',
'title' : 'Lorem magna cillum consequat consequat mollit',
'notes' : 'Velit ipsum proident ea incididunt et. Consectetur eiusmod laborum voluptate duis occaecat ullamco sint enim proident.',
'startDate': 'Sunday, August 23, 2015 11:19 PM',
'dueDate' : 'Friday, July 8, 2016 10:49 AM',
'startDate': 'Sunday, August 23, 2018 11:19 PM',
'dueDate' : 'Friday, July 8, 2019 10:49 AM',
'completed': false,
'starred' : false,
'important': false,
@@ -65,7 +65,7 @@ export class TodoFakeDb
'id' : '561551bd32f1588c814a0ccd',
'title' : 'Quis irure cupidatat ad consequat reprehenderit excepteur',
'notes' : 'Esse nisi mollit aliquip mollit aute consequat adipisicing. Do excepteur dolore proident cupidatat pariatur irure consequat incididunt.',
'startDate': 'Sunday, June 7, 2015 10:49 AM',
'startDate': 'Sunday, June 7, 2018 10:49 AM',
'dueDate' : 'Monday, January 9, 2017 8:34 AM',
'completed': false,
'starred' : true,
@@ -77,8 +77,8 @@ export class TodoFakeDb
'id' : '561551bd0bb4b08ca77038ef',
'title' : 'Officia voluptate tempor ut mollit ea cillum',
'notes' : 'Deserunt veniam reprehenderit do elit magna ut.',
'startDate': 'Saturday, October 18, 2014 4:25 AM',
'dueDate' : 'Sunday, August 21, 2016 10:48 PM',
'startDate': 'Saturday, October 18, 2017 4:25 AM',
'dueDate' : 'Sunday, August 21, 2019 10:48 PM',
'completed': true,
'starred' : false,
'important': false,
@@ -89,8 +89,8 @@ export class TodoFakeDb
'id' : '561551bdf84eec913835ebe5',
'title' : 'Sit exercitation cupidatat minim est ipsum excepteur',
'notes' : '',
'startDate': 'Friday, August 8, 2014 5:45 AM',
'dueDate' : 'Wednesday, June 15, 2016 1:53 PM',
'startDate': 'Friday, August 8, 2017 5:45 AM',
'dueDate' : 'Wednesday, June 15, 2019 1:53 PM',
'completed': true,
'starred' : false,
'important': true,
@@ -101,8 +101,8 @@ export class TodoFakeDb
'id' : '561551bd2047cc709af0f670',
'title' : 'Sunt fugiat officia nisi minim sunt duis',
'notes' : 'Eiusmod eiusmod sint aliquip exercitation cillum. Magna nulla officia ex consectetur ea ad excepteur in qui.',
'startDate': 'Monday, July 13, 2015 1:55 PM',
'dueDate' : 'Thursday, March 3, 2016 2:26 PM',
'startDate': 'Monday, July 13, 2018 1:55 PM',
'dueDate' : 'Thursday, March 3, 2019 2:26 PM',
'completed': false,
'starred' : false,
'important': false,
@@ -120,8 +120,8 @@ export class TodoFakeDb
'id' : '561551bd73d1a627e97005ce',
'title' : 'Non cupidatat enim quis aliquip minim laborum',
'notes' : 'Qui cillum eiusmod nostrud sunt dolore velit nostrud labore voluptate ad dolore. Eu Lorem anim pariatur aliqua. Ullamco ut dolor velit esse occaecat dolore eu cillum commodo qui. Nulla dolor consequat voluptate magna ut commodo magna consectetur non aute proident.',
'startDate': 'Tuesday, November 11, 2014 6:36 PM',
'dueDate' : 'Tuesday, August 9, 2016 7:18 AM',
'startDate': 'Tuesday, November 11, 2017 6:36 PM',
'dueDate' : 'Tuesday, August 9, 2019 7:18 AM',
'completed': false,
'starred' : false,
'important': false,
@@ -132,8 +132,8 @@ export class TodoFakeDb
'id' : '561551bd8f7d793ded0a2353',
'title' : 'Dolor ex occaecat magna labore laboris qui',
'notes' : 'Incididunt qui excepteur eiusmod elit cillum occaecat voluptate cillum nostrud. Dolor ullamco ullamco eiusmod do sunt adipisicing pariatur. In esse esse labore id reprehenderit sint do. Pariatur culpa dolor tempor qui excepteur duis do anim minim ipsum.',
'startDate': 'Monday, June 9, 2014 3:15 PM',
'dueDate' : 'Wednesday, October 19, 2016 3:38 PM',
'startDate': 'Monday, June 9, 2017 3:15 PM',
'dueDate' : 'Wednesday, October 19, 2019 3:38 PM',
'completed': false,
'starred' : false,
'important': true,
@@ -144,7 +144,7 @@ export class TodoFakeDb
'id' : '561551bdaa586f72d0be02cc',
'title' : 'Ex nisi amet id dolore nostrud esse',
'notes' : '',
'startDate': 'Thursday, January 15, 2015 6:11 PM',
'startDate': 'Thursday, January 15, 2018 6:11 PM',
'dueDate' : 'Sunday, August 20, 2017 10:02 AM',
'completed': false,
'starred' : true,
@@ -156,7 +156,7 @@ export class TodoFakeDb
'id' : '561551bd9f1c2de5b27f537b',
'title' : 'In dolor velit labore dolore ex eiusmod',
'notes' : '',
'startDate': 'Monday, March 10, 2014 12:50 AM',
'startDate': 'Monday, March 10, 2017 12:50 AM',
'dueDate' : 'Thursday, January 26, 2017 3:10 PM',
'completed': false,
'starred' : false,
@@ -168,7 +168,7 @@ export class TodoFakeDb
'id' : '561551bd26e21bb5e85b35cb',
'title' : 'Sunt voluptate aliquip exercitation minim magna sit',
'notes' : '',
'startDate': 'Tuesday, March 24, 2015 10:54 PM',
'startDate': 'Tuesday, March 24, 2018 10:54 PM',
'dueDate' : 'Wednesday, August 23, 2017 5:35 PM',
'completed': false,
'starred' : false,
@@ -180,7 +180,7 @@ export class TodoFakeDb
'id' : '561551bd719860cf0ad2011a',
'title' : 'Nisi et ullamco minim ea proident tempor',
'notes' : 'Dolor veniam dolor cillum Lorem magna nisi in occaecat nulla dolor ea eiusmod.',
'startDate': 'Friday, February 14, 2014 10:03 AM',
'startDate': 'Friday, February 14, 2017 10:03 AM',
'dueDate' : 'Saturday, July 8, 2017 11:54 PM',
'completed': false,
'starred' : true,
@@ -192,8 +192,8 @@ export class TodoFakeDb
'id' : '561551bd49d800c243264a91',
'title' : 'Sit ipsum mollit cupidatat adipisicing officia aliquip',
'notes' : '',
'startDate': 'Wednesday, December 10, 2014 9:25 AM',
'dueDate' : 'Friday, March 25, 2016 12:29 AM',
'startDate': 'Wednesday, December 10, 2017 9:25 AM',
'dueDate' : 'Friday, March 25, 2019 12:29 AM',
'completed': true,
'starred' : false,
'important': false,
@@ -204,8 +204,8 @@ export class TodoFakeDb
'id' : '561551bd061990eaf40fb64f',
'title' : 'Amet sunt et quis amet commodo quis',
'notes' : 'Nulla dolore consequat aliqua sint consequat elit qui occaecat et.',
'startDate': 'Saturday, March 1, 2014 3:59 PM',
'dueDate' : 'Saturday, November 7, 2015 2:00 PM',
'startDate': 'Saturday, March 1, 2017 3:59 PM',
'dueDate' : 'Saturday, November 7, 2018 2:00 PM',
'completed': false,
'starred' : false,
'important': true,
@@ -216,7 +216,7 @@ export class TodoFakeDb
'id' : '561551be81d05fa94711e7f3',
'title' : 'Ut eiusmod ex ea eiusmod culpa incididunt',
'notes' : 'Fugiat non incididunt officia ex incididunt occaecat. Voluptate nostrud culpa aliquip mollit incididunt non dolore.',
'startDate': 'Monday, February 2, 2015 3:07 PM',
'startDate': 'Monday, February 2, 2018 3:07 PM',
'dueDate' : 'Saturday, October 14, 2017 6:57 AM',
'completed': false,
'starred' : false,
@@ -228,8 +228,8 @@ export class TodoFakeDb
'id' : '561551be05c093a80e0c8d05',
'title' : 'Proident reprehenderit laboris pariatur ut et nisi',
'notes' : 'Reprehenderit proident ut ad cillum quis velit quis aliqua ut aliquip tempor ullamco.',
'startDate': 'Sunday, June 14, 2015 4:40 AM',
'dueDate' : 'Wednesday, February 10, 2016 10:47 AM',
'startDate': 'Sunday, June 14, 2018 4:40 AM',
'dueDate' : 'Wednesday, February 10, 2019 10:47 AM',
'completed': true,
'starred' : true,
'important': true,
@@ -240,8 +240,8 @@ export class TodoFakeDb
'id' : '561551be3bb43a5bd431c2fc',
'title' : 'Aliqua aliquip aliquip aliquip et exercitation aute',
'notes' : 'Adipisicing Lorem tempor ex anim. Labore tempor laboris nostrud dolore voluptate ullamco. Fugiat ex deserunt anim minim esse velit laboris aute ea duis incididunt. Elit irure id Lorem incididunt laborum aliquip consectetur est irure sunt. Ut labore anim nisi aliqua tempor laborum nulla cillum. Duis irure consequat cillum magna cillum eiusmod ut. Et exercitation voluptate quis deserunt elit quis dolor deserunt ex ex esse ex.',
'startDate': 'Saturday, May 3, 2014 1:32 AM',
'dueDate' : 'Monday, September 12, 2016 9:16 PM',
'startDate': 'Saturday, May 3, 2017 1:32 AM',
'dueDate' : 'Monday, September 12, 2019 9:16 PM',
'completed': true,
'starred' : false,
'important': true,

View File

@@ -3,36 +3,41 @@ import { FuseConfig } from '@fuse/types';
/**
* Default Fuse Configuration
*
* You can edit these options to change the default options. All these options also can be changed per component
* basis. See `app/main/pages/authentication/login/login.component.ts` constructor method to learn more
* about changing these options per component basis.
* You can edit these options to change the default options. All these options also can be
* changed per component basis. See `app/main/pages/authentication/login/login.component.ts`
* constructor method to learn more about changing these options per component basis.
*/
export const fuseConfig: FuseConfig = {
// Color themes can be defined in src/app/app.theme.scss
colorTheme : 'theme-default',
customScrollbars: true,
layout : {
style : 'vertical-layout-1',
width : 'fullwidth',
navbar : {
background: 'mat-fuse-dark-700-bg',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
primaryBackground : 'fuse-navy-700',
secondaryBackground: 'fuse-navy-900',
folded : false,
hidden : false,
position : 'left',
variant : 'vertical-style-1'
},
toolbar : {
background: 'mat-white-500-bg',
hidden : false,
position : 'below-static'
customBackgroundColor: false,
background : 'fuse-white-500',
hidden : false,
position : 'below-static'
},
footer : {
background: 'mat-fuse-dark-900-bg',
hidden : false,
position : 'below-fixed'
customBackgroundColor: true,
background : 'fuse-navy-900',
hidden : false,
position : 'below-fixed'
},
sidepanel: {
hidden : false,
position: 'right'
}
},
customScrollbars: true
}
};

View File

@@ -1,10 +1,10 @@
<div class="header mat-elevation-z4 mat-primary-bg" fxLayout="row" fxLayoutAlign="space-between center">
<div class="header mat-elevation-z4 primary" fxLayout="row" fxLayoutAlign="space-between center">
<ng-container *ngIf="selectedContact === null">
<div class="title ml-16" fxLayout="row" fxLayoutAlign="start center"
(click)="unfoldSidebarTemporarily()">
<mat-icon class="s-32 white-fg">chat</mat-icon>
<mat-icon class="s-32 fuse-white-fg">chat</mat-icon>
<h3 class="ml-12">Team Chat</h3>
</div>
@@ -84,7 +84,7 @@
<ng-container *ngIf="selectedContact && chat && chat.dialog && chat.dialog.length === 0">
<div class="no-messages-icon">
<mat-icon class="s-128">chat</mat-icon>
<mat-icon class="s-128 fade-text">chat</mat-icon>
</div>
<div class="no-messages secondary-text">
@@ -98,7 +98,7 @@
<div class="no-contact-selected">
<div class="no-contact-icon">
<mat-icon class="s-128">chat</mat-icon>
<mat-icon class="s-128 fade-text">chat</mat-icon>
</div>
<div class="no-contact secondary-text">
@@ -117,9 +117,7 @@
<form #replyForm="ngForm"
(ngSubmit)="reply($event)"
(keydown.enter)="reply($event)"
fxFlex
fxLayout="row"
fxLayoutAlign="start center">
fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-form-field class="message-text" fxFlex floatLabel="never" appearance="standard">
<textarea matInput #replyInput ngModel name="message" placeholder="Type your message"

View File

@@ -10,7 +10,7 @@ chat-panel {
z-index: 99;
overflow: hidden;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
max-width: none !important;
width: 100% !important;
}
@@ -49,7 +49,6 @@ chat-panel {
width: 72px;
min-width: 72px;
max-width: 72px;
background-color: #F9F9F9;
overflow: auto;
-webkit-overflow-scrolling: touch;
@@ -73,11 +72,6 @@ chat-panel {
&.active {
position: relative;
background-color: mat-color(mat-palette($mat-indigo, 50));
.status-icon {
border-color: mat-color(mat-palette($mat-indigo, 50));
}
&:after {
position: absolute;
@@ -88,7 +82,6 @@ chat-panel {
width: 4px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
background-color: mat-color(mat-palette($mat-indigo));
}
}
@@ -116,6 +109,9 @@ chat-panel {
.unread-count {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
top: 8px;
@@ -124,11 +120,6 @@ chat-panel {
padding: 0 5px;
font-size: 11px;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
background-color: mat-color(mat-palette($mat-indigo));
color: white;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.35);
}
@@ -138,7 +129,7 @@ chat-panel {
height: 12px;
bottom: 10px;
left: 44px;
border: 2px solid #F9F9F9;
border: 2px solid;
border-radius: 50%;
&.online {
@@ -164,7 +155,6 @@ chat-panel {
position: relative;
z-index: 7;
flex: 1 1 100%;
background-color: white;
box-shadow: -1px 0 2px 0 rgba(0, 0, 0, 0.25);
.messages {
@@ -208,7 +198,6 @@ chat-panel {
margin-top: 8px;
top: 100%;
left: 0;
color: $black-87-opacity;
white-space: nowrap;
}
}
@@ -216,9 +205,6 @@ chat-panel {
&.contact {
.bubble {
background-color: mat-color(mat-palette($mat-indigo));
color: white;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
@@ -255,8 +241,6 @@ chat-panel {
.bubble {
margin-left: auto;
background-color: #E0E0E0;
color: $black-87-opacity;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
@@ -321,10 +305,6 @@ chat-panel {
padding: 0 24px;
margin-top: -64px;
text-align: center;
mat-icon {
color: rgba(0, 0, 0, 0.06);
}
}
.no-messages {
@@ -345,13 +325,6 @@ chat-panel {
padding: 0 24px;
text-align: center;
.no-contact-icon {
mat-icon {
color: rgba(0, 0, 0, 0.06);
}
}
.no-contact {
margin-top: 24px;
}
@@ -362,8 +335,8 @@ chat-panel {
position: relative;
.message-text {
background-color: #E0E0E0;
padding: 16px 8px;
border-top: 1px solid;
.mat-form-field-wrapper {
padding: 0;
@@ -374,7 +347,6 @@ chat-panel {
.mat-form-field-infix {
padding: 0;
border: none;
background: white;
border-radius: 20px;
@include mat-elevation(2);
@@ -409,7 +381,7 @@ fuse-sidebar {
min-width: 360px;
max-width: 360px;
@include media-breakpoint-down('xs') {
@include media-breakpoint('xs') {
min-width: 0 !important;
max-width: 100vw !important;
width: 100vw !important;

View File

@@ -120,9 +120,6 @@ export class ChatPanelComponent implements OnInit, AfterViewInit, OnDestroy
{
setTimeout(() => {
// Reset the reply form
this._replyForm.reset();
// Focus to the reply input
// this._replyInput.nativeElement.focus();
@@ -276,6 +273,9 @@ export class ChatPanelComponent implements OnInit, AfterViewInit, OnDestroy
// Add the message to the chat
this.chat.dialog.push(message);
// Reset the reply form
this._replyForm.reset();
// Update the server
this._chatPanelService.updateChat(this.chat.id, this.chat.dialog).then(response => {

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