diff --git a/package.json b/package.json index 26fedb9d..b2920a4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fuse/demo", - "version": "13.0.3", + "version": "13.1.0", "license": "https://themeforest.net/licenses/standard", "private": true, "scripts": { @@ -12,17 +12,17 @@ "e2e": "ng e2e" }, "dependencies": { - "@angular/animations": "12.0.2", - "@angular/cdk": "12.0.2", - "@angular/common": "12.0.2", - "@angular/compiler": "12.0.2", - "@angular/core": "12.0.2", - "@angular/forms": "12.0.2", - "@angular/material": "12.0.2", - "@angular/material-moment-adapter": "12.0.2", - "@angular/platform-browser": "12.0.2", - "@angular/platform-browser-dynamic": "12.0.2", - "@angular/router": "12.0.2", + "@angular/animations": "12.0.4", + "@angular/cdk": "12.0.4", + "@angular/common": "12.0.4", + "@angular/compiler": "12.0.4", + "@angular/core": "12.0.4", + "@angular/forms": "12.0.4", + "@angular/material": "12.0.4", + "@angular/material-moment-adapter": "12.0.4", + "@angular/platform-browser": "12.0.4", + "@angular/platform-browser-dynamic": "12.0.4", + "@angular/router": "12.0.4", "@fullcalendar/angular": "4.4.5-beta", "@fullcalendar/core": "4.4.2", "@fullcalendar/daygrid": "4.4.2", @@ -32,32 +32,32 @@ "@fullcalendar/rrule": "4.4.2", "@fullcalendar/timegrid": "4.4.2", "@ngneat/transloco": "2.21.0", - "apexcharts": "3.26.3", + "apexcharts": "3.27.1", "crypto-js": "3.3.0", - "highlight.js": "11.0.0", + "highlight.js": "11.0.1", "lodash-es": "4.17.21", "moment": "2.29.1", - "ng-apexcharts": "1.5.10", + "ng-apexcharts": "1.5.12", "ngx-markdown": "12.0.1", "ngx-quill": "14.0.0", "perfect-scrollbar": "1.5.1", "quill": "1.3.7", "rrule": "2.6.8", "rxjs": "6.6.7", - "tslib": "2.2.0", + "tslib": "2.3.0", "web-animations-js": "2.3.2", "zone.js": "0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "12.0.2", + "@angular-devkit/build-angular": "12.0.4", "@angular-eslint/builder": "12.1.0", "@angular-eslint/eslint-plugin": "12.1.0", "@angular-eslint/eslint-plugin-template": "12.1.0", "@angular-eslint/schematics": "12.1.0", "@angular-eslint/template-parser": "12.1.0", - "@angular/cli": "12.0.2", - "@angular/compiler-cli": "12.0.2", - "@angular/language-service": "12.0.2", + "@angular/cli": "12.0.4", + "@angular/compiler-cli": "12.0.4", + "@angular/language-service": "12.0.4", "@tailwindcss/aspect-ratio": "0.2.1", "@tailwindcss/line-clamp": "0.2.1", "@tailwindcss/typography": "0.4.1", @@ -67,23 +67,23 @@ "@types/jasmine": "3.6.11", "@types/lodash": "4.14.170", "@types/lodash-es": "4.17.4", - "@types/node": "12.20.14", - "@typescript-eslint/eslint-plugin": "4.26.0", - "@typescript-eslint/parser": "4.26.0", + "@types/node": "12.20.15", + "@typescript-eslint/eslint-plugin": "4.26.1", + "@typescript-eslint/parser": "4.26.1", "autoprefixer": "10.2.6", "chroma-js": "2.1.2", - "eslint": "7.27.0", + "eslint": "7.28.0", "eslint-plugin-import": "2.23.4", - "eslint-plugin-jsdoc": "35.1.2", + "eslint-plugin-jsdoc": "35.2.0", "eslint-plugin-prefer-arrow": "1.2.3", "jasmine-core": "3.7.1", - "karma": "6.3.3", + "karma": "6.3.4", "karma-chrome-launcher": "3.1.0", "karma-coverage": "2.0.3", "karma-jasmine": "4.0.1", "karma-jasmine-html-reporter": "1.6.0", "lodash": "4.17.21", - "postcss": "8.3.0", + "postcss": "8.3.3", "tailwindcss": "2.1.4", "typescript": "4.2.4" } diff --git a/src/@fuse/components/fullscreen/fullscreen.component.html b/src/@fuse/components/fullscreen/fullscreen.component.html index 1dfb3e59..77cb0f1d 100644 --- a/src/@fuse/components/fullscreen/fullscreen.component.html +++ b/src/@fuse/components/fullscreen/fullscreen.component.html @@ -1,7 +1,12 @@ + + + + + diff --git a/src/@fuse/components/fullscreen/fullscreen.component.ts b/src/@fuse/components/fullscreen/fullscreen.component.ts index ff32aa36..38ec191d 100644 --- a/src/@fuse/components/fullscreen/fullscreen.component.ts +++ b/src/@fuse/components/fullscreen/fullscreen.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, Inject, OnInit, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Inject, Input, OnInit, TemplateRef, ViewEncapsulation } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { FSDocument, FSDocumentElement } from '@fuse/components/fullscreen/fullscreen.types'; @@ -11,6 +11,8 @@ import { FSDocument, FSDocumentElement } from '@fuse/components/fullscreen/fulls }) export class FuseFullscreenComponent implements OnInit { + @Input() iconTpl: TemplateRef; + @Input() tooltip: string; private _fsDoc: FSDocument; private _fsDocEl: FSDocumentElement; private _isFullscreen: boolean = false; diff --git a/src/@fuse/components/fullscreen/fullscreen.module.ts b/src/@fuse/components/fullscreen/fullscreen.module.ts index 925dabc9..89e43793 100644 --- a/src/@fuse/components/fullscreen/fullscreen.module.ts +++ b/src/@fuse/components/fullscreen/fullscreen.module.ts @@ -3,15 +3,17 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; import { FuseFullscreenComponent } from '@fuse/components/fullscreen/fullscreen.component'; +import { CommonModule } from '@angular/common'; @NgModule({ declarations: [ FuseFullscreenComponent ], - imports : [ + imports: [ MatButtonModule, MatIconModule, - MatTooltipModule + MatTooltipModule, + CommonModule ], exports : [ FuseFullscreenComponent diff --git a/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html b/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html index 73ca799b..a8ce9002 100644 --- a/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html +++ b/src/@fuse/components/navigation/horizontal/components/basic/basic.component.html @@ -19,7 +19,8 @@ + [href]="item.link" + [target]="item.target || '_self'"> @@ -49,6 +50,7 @@ class="fuse-horizontal-navigation-item" *ngIf="item.link && item.externalLink && item.function && !item.disabled" [href]="item.link" + [target]="item.target || '_self'" (click)="item.function(item)" mat-menu-item> diff --git a/src/@fuse/components/navigation/navigation.types.ts b/src/@fuse/components/navigation/navigation.types.ts index 32b37ae4..c6e2bbdd 100644 --- a/src/@fuse/components/navigation/navigation.types.ts +++ b/src/@fuse/components/navigation/navigation.types.ts @@ -17,6 +17,12 @@ export interface FuseNavigationItem disabled?: boolean; link?: string; externalLink?: boolean; + target?: + | '_blank' + | '_self' + | '_parent' + | '_top' + | string; exactMatch?: boolean; isActiveMatchOptions?: IsActiveMatchOptions; function?: (item: FuseNavigationItem) => void; diff --git a/src/@fuse/components/navigation/vertical/components/basic/basic.component.html b/src/@fuse/components/navigation/vertical/components/basic/basic.component.html index 7eea495e..e6f5cc4d 100644 --- a/src/@fuse/components/navigation/vertical/components/basic/basic.component.html +++ b/src/@fuse/components/navigation/vertical/components/basic/basic.component.html @@ -19,7 +19,8 @@ + [href]="item.link" + [target]="item.target || '_self'"> @@ -49,6 +50,7 @@ class="fuse-vertical-navigation-item" *ngIf="item.link && item.externalLink && item.function && !item.disabled" [href]="item.link" + [target]="item.target || '_self'" (click)="item.function(item)"> diff --git a/src/@fuse/components/navigation/vertical/styles/appearances/default.scss b/src/@fuse/components/navigation/vertical/styles/appearances/default.scss index 9c3580ca..d0f4396e 100644 --- a/src/@fuse/components/navigation/vertical/styles/appearances/default.scss +++ b/src/@fuse/components/navigation/vertical/styles/appearances/default.scss @@ -335,6 +335,7 @@ fuse-vertical-navigation { } > .fuse-vertical-navigation-item-children { + margin-top: 6px; > *:last-child { padding-bottom: 6px; diff --git a/src/@fuse/version/fuse-version.ts b/src/@fuse/version/fuse-version.ts index 5f428b5c..62d9a7dd 100644 --- a/src/@fuse/version/fuse-version.ts +++ b/src/@fuse/version/fuse-version.ts @@ -1,3 +1,3 @@ import { Version } from '@fuse/version/version'; -export const FUSE_VERSION = new Version('13.0.3').full; +export const FUSE_VERSION = new Version('13.1.0').full; diff --git a/src/app/app.resolvers.ts b/src/app/app.resolvers.ts index 8b95e849..800f0fd0 100644 --- a/src/app/app.resolvers.ts +++ b/src/app/app.resolvers.ts @@ -1,9 +1,11 @@ import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; import { forkJoin, Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { InitialData } from 'app/app.types'; +import { MessagesService } from 'app/layout/common/messages/messages.service'; +import { NavigationService } from 'app/core/navigation/navigation.service'; +import { NotificationsService } from 'app/layout/common/notifications/notifications.service'; +import { ShortcutsService } from 'app/layout/common/shortcuts/shortcuts.service'; +import { UserService } from 'app/core/user/user.service'; @Injectable({ providedIn: 'root' @@ -13,7 +15,13 @@ export class InitialDataResolver implements Resolve /** * Constructor */ - constructor(private _httpClient: HttpClient) + constructor( + private _messagesService: MessagesService, + private _navigationService: NavigationService, + private _notificationsService: NotificationsService, + private _shortcutsService: ShortcutsService, + private _userService: UserService + ) { } @@ -27,29 +35,15 @@ export class InitialDataResolver implements Resolve * @param route * @param state */ - resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable + resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { // Fork join multiple API endpoint calls to wait all of them to finish return forkJoin([ - this._httpClient.get('api/common/messages'), - this._httpClient.get('api/common/navigation'), - this._httpClient.get('api/common/notifications'), - this._httpClient.get('api/common/shortcuts'), - this._httpClient.get('api/common/user') - ]).pipe( - map(([messages, navigation, notifications, shortcuts, user]) => ({ - messages, - navigation: { - compact : navigation.compact, - default : navigation.default, - futuristic: navigation.futuristic, - horizontal: navigation.horizontal - }, - notifications, - shortcuts, - user - }) - ) - ); + this._navigationService.get(), + this._messagesService.getAll(), + this._notificationsService.getAll(), + this._shortcutsService.getAll(), + this._userService.get() + ]); } } diff --git a/src/app/app.types.ts b/src/app/app.types.ts deleted file mode 100644 index 10a6fb69..00000000 --- a/src/app/app.types.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { FuseNavigationItem } from '@fuse/components/navigation'; -import { Message } from 'app/layout/common/messages/messages.types'; -import { Notification } from 'app/layout/common/notifications/notifications.types'; -import { Shortcut } from 'app/layout/common/shortcuts/shortcuts.types'; -import { User } from 'app/core/user/user.model'; - -export interface InitialData -{ - messages: Message[]; - navigation: { - compact: FuseNavigationItem[]; - default: FuseNavigationItem[]; - futuristic: FuseNavigationItem[]; - horizontal: FuseNavigationItem[]; - }; - notifications: Notification[]; - shortcuts: Shortcut[]; - user: User; -} diff --git a/src/app/core/navigation/navigation.service.ts b/src/app/core/navigation/navigation.service.ts new file mode 100644 index 00000000..3f5a61b8 --- /dev/null +++ b/src/app/core/navigation/navigation.service.ts @@ -0,0 +1,48 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable, ReplaySubject } from 'rxjs'; +import { tap } from 'rxjs/operators'; +import { Navigation } from 'app/core/navigation/navigation.types'; + +@Injectable({ + providedIn: 'root' +}) +export class NavigationService +{ + private _navigation: ReplaySubject = new ReplaySubject(1); + + /** + * Constructor + */ + constructor(private _httpClient: HttpClient) + { + } + + // ----------------------------------------------------------------------------------------------------- + // @ Accessors + // ----------------------------------------------------------------------------------------------------- + + /** + * Getter for navigation + */ + get navigation$(): Observable + { + return this._navigation.asObservable(); + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + /** + * Get all navigation data + */ + get(): Observable + { + return this._httpClient.get('api/common/navigation').pipe( + tap((navigation) => { + this._navigation.next(navigation); + }) + ); + } +} diff --git a/src/app/core/navigation/navigation.types.ts b/src/app/core/navigation/navigation.types.ts new file mode 100644 index 00000000..5f061d89 --- /dev/null +++ b/src/app/core/navigation/navigation.types.ts @@ -0,0 +1,9 @@ +import { FuseNavigationItem } from '@fuse/components/navigation'; + +export interface Navigation +{ + compact: FuseNavigationItem[]; + default: FuseNavigationItem[]; + futuristic: FuseNavigationItem[]; + horizontal: FuseNavigationItem[]; +} diff --git a/src/app/core/user/user.service.ts b/src/app/core/user/user.service.ts index d2c0a07e..11aab275 100644 --- a/src/app/core/user/user.service.ts +++ b/src/app/core/user/user.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, ReplaySubject } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { User } from 'app/core/user/user.model'; +import { map, tap } from 'rxjs/operators'; +import { User } from 'app/core/user/user.types'; @Injectable({ providedIn: 'root' @@ -42,6 +42,18 @@ export class UserService // @ Public methods // ----------------------------------------------------------------------------------------------------- + /** + * Get the current logged in user data + */ + get(): Observable + { + return this._httpClient.get('api/common/user').pipe( + tap((user) => { + this._user.next(user); + }) + ); + } + /** * Update the user * @@ -51,7 +63,6 @@ export class UserService { return this._httpClient.patch('api/common/user', {user}).pipe( map((response) => { - // Execute the observable this._user.next(response); }) ); diff --git a/src/app/core/user/user.model.ts b/src/app/core/user/user.types.ts similarity index 100% rename from src/app/core/user/user.model.ts rename to src/app/core/user/user.types.ts diff --git a/src/app/layout/common/language/language.component.html b/src/app/layout/common/languages/languages.component.html similarity index 100% rename from src/app/layout/common/language/language.component.html rename to src/app/layout/common/languages/languages.component.html diff --git a/src/app/layout/common/language/language.component.ts b/src/app/layout/common/languages/languages.component.ts similarity index 96% rename from src/app/layout/common/language/language.component.ts rename to src/app/layout/common/languages/languages.component.ts index 24526937..5b44986f 100644 --- a/src/app/layout/common/language/language.component.ts +++ b/src/app/layout/common/languages/languages.component.ts @@ -4,13 +4,13 @@ import { AvailableLangs, TranslocoService } from '@ngneat/transloco'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; @Component({ - selector : 'language', - templateUrl : './language.component.html', + selector : 'languages', + templateUrl : './languages.component.html', encapsulation : ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, - exportAs : 'language' + exportAs : 'languages' }) -export class LanguageComponent implements OnInit, OnDestroy +export class LanguagesComponent implements OnInit, OnDestroy { availableLangs: AvailableLangs; activeLang: string; diff --git a/src/app/layout/common/language/language.module.ts b/src/app/layout/common/languages/languages.module.ts similarity index 73% rename from src/app/layout/common/language/language.module.ts rename to src/app/layout/common/languages/languages.module.ts index 7c0e3fbe..4393a9a8 100644 --- a/src/app/layout/common/language/language.module.ts +++ b/src/app/layout/common/languages/languages.module.ts @@ -2,12 +2,12 @@ import { NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; -import { LanguageComponent } from 'app/layout/common/language/language.component'; +import { LanguagesComponent } from 'app/layout/common/languages/languages.component'; import { SharedModule } from 'app/shared/shared.module'; @NgModule({ declarations: [ - LanguageComponent + LanguagesComponent ], imports : [ MatButtonModule, @@ -16,9 +16,9 @@ import { SharedModule } from 'app/shared/shared.module'; SharedModule ], exports : [ - LanguageComponent + LanguagesComponent ] }) -export class LanguageModule +export class LanguagesModule { } diff --git a/src/app/layout/common/messages/messages.component.ts b/src/app/layout/common/messages/messages.component.ts index 454247b7..fc0af5a9 100644 --- a/src/app/layout/common/messages/messages.component.ts +++ b/src/app/layout/common/messages/messages.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; import { MatButton } from '@angular/material/button'; @@ -14,12 +14,12 @@ import { MessagesService } from 'app/layout/common/messages/messages.service'; changeDetection: ChangeDetectionStrategy.OnPush, exportAs : 'messages' }) -export class MessagesComponent implements OnInit, OnChanges, OnDestroy +export class MessagesComponent implements OnInit, OnDestroy { - @Input() messages: Message[]; @ViewChild('messagesOrigin') private _messagesOrigin: MatButton; @ViewChild('messagesPanel') private _messagesPanel: TemplateRef; + messages: Message[]; unreadCount: number = 0; private _overlayRef: OverlayRef; private _unsubscribeAll: Subject = new Subject(); @@ -40,21 +40,6 @@ export class MessagesComponent implements OnInit, OnChanges, OnDestroy // @ Lifecycle hooks // ----------------------------------------------------------------------------------------------------- - /** - * On changes - * - * @param changes - */ - ngOnChanges(changes: SimpleChanges): void - { - // Messages - if ( 'messages' in changes ) - { - // Store the messages on the service - this._messagesService.store(changes.messages.currentValue); - } - } - /** * On init */ diff --git a/src/app/layout/common/messages/messages.service.ts b/src/app/layout/common/messages/messages.service.ts index 63d7621b..5e125c70 100644 --- a/src/app/layout/common/messages/messages.service.ts +++ b/src/app/layout/common/messages/messages.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, ReplaySubject } from 'rxjs'; import { Message } from 'app/layout/common/messages/messages.types'; -import { map, switchMap, take } from 'rxjs/operators'; +import { map, switchMap, take, tap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' @@ -35,17 +35,15 @@ export class MessagesService // ----------------------------------------------------------------------------------------------------- /** - * Store messages on the service - * - * @param messages + * Get all messages */ - store(messages: Message[]): Observable + getAll(): Observable { - // Load the messages - this._messages.next(messages); - - // Return the messages - return this.messages$; + return this._httpClient.get('api/common/messages').pipe( + tap((messages) => { + this._messages.next(messages); + }) + ); } /** diff --git a/src/app/layout/common/notifications/notifications.component.ts b/src/app/layout/common/notifications/notifications.component.ts index 6682e0de..5a0fc615 100644 --- a/src/app/layout/common/notifications/notifications.component.ts +++ b/src/app/layout/common/notifications/notifications.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; import { MatButton } from '@angular/material/button'; @@ -14,12 +14,12 @@ import { NotificationsService } from 'app/layout/common/notifications/notificati changeDetection: ChangeDetectionStrategy.OnPush, exportAs : 'notifications' }) -export class NotificationsComponent implements OnChanges, OnInit, OnDestroy +export class NotificationsComponent implements OnInit, OnDestroy { - @Input() notifications: Notification[]; @ViewChild('notificationsOrigin') private _notificationsOrigin: MatButton; @ViewChild('notificationsPanel') private _notificationsPanel: TemplateRef; + notifications: Notification[]; unreadCount: number = 0; private _overlayRef: OverlayRef; private _unsubscribeAll: Subject = new Subject(); @@ -40,21 +40,6 @@ export class NotificationsComponent implements OnChanges, OnInit, OnDestroy // @ Lifecycle hooks // ----------------------------------------------------------------------------------------------------- - /** - * On changes - * - * @param changes - */ - ngOnChanges(changes: SimpleChanges): void - { - // Notifications - if ( 'notifications' in changes ) - { - // Store the notifications on the service - this._notificationsService.store(changes.notifications.currentValue); - } - } - /** * On init */ diff --git a/src/app/layout/common/notifications/notifications.service.ts b/src/app/layout/common/notifications/notifications.service.ts index d904197a..5da09dfc 100644 --- a/src/app/layout/common/notifications/notifications.service.ts +++ b/src/app/layout/common/notifications/notifications.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, ReplaySubject } from 'rxjs'; import { Notification } from 'app/layout/common/notifications/notifications.types'; -import { map, switchMap, take } from 'rxjs/operators'; +import { map, switchMap, take, tap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' @@ -35,17 +35,15 @@ export class NotificationsService // ----------------------------------------------------------------------------------------------------- /** - * Store notifications on the service - * - * @param notifications + * Get all notifications */ - store(notifications: Notification[]): Observable + getAll(): Observable { - // Load the notifications - this._notifications.next(notifications); - - // Return the notifications - return this.notifications$; + return this._httpClient.get('api/common/notifications').pipe( + tap((notifications) => { + this._notifications.next(notifications); + }) + ); } /** diff --git a/src/app/layout/common/search/search.component.html b/src/app/layout/common/search/search.component.html index 430ede4e..689f7b88 100644 --- a/src/app/layout/common/search/search.component.html +++ b/src/app/layout/common/search/search.component.html @@ -6,7 +6,6 @@ (click)="open()"> -
+ class="py-0 px-6 text-md pointer-events-none text-secondary bg-transparent" + *ngIf="resultSets && !resultSets.length"> No results found! - - - - + + + {{resultSet.label.toUpperCase()}} + + + + + + + + + + + + + + + + +
+ - - - - - - -
-
Contact
-
- -
-
- - -
+
+
+ +
- - - - -
-
Page
-
- - {{result.link}} -
+
+
- - +
+ + + + +
+
+
+ {{result.link}} +
+
+
+ + + +
+ + + + + + +
+
diff --git a/src/app/layout/common/search/search.component.ts b/src/app/layout/common/search/search.component.ts index 9ea24c6a..212aad60 100644 --- a/src/app/layout/common/search/search.component.ts +++ b/src/app/layout/common/search/search.component.ts @@ -20,7 +20,7 @@ export class SearchComponent implements OnChanges, OnInit, OnDestroy @Output() search: EventEmitter = new EventEmitter(); opened: boolean = false; - results: any[]; + resultSets: any[]; searchControl: FormControl = new FormControl(); private _unsubscribeAll: Subject = new Subject(); @@ -104,12 +104,12 @@ export class SearchComponent implements OnChanges, OnInit, OnDestroy takeUntil(this._unsubscribeAll), map((value) => { - // Set the search results to null if there is no value or + // Set the resultSets to null if there is no value or // the length of the value is smaller than the minLength // so the autocomplete panel can be closed if ( !value || value.length < this.minLength ) { - this.results = null; + this.resultSets = null; } // Continue @@ -121,13 +121,13 @@ export class SearchComponent implements OnChanges, OnInit, OnDestroy ) .subscribe((value) => { this._httpClient.post('api/common/search', {query: value}) - .subscribe((response: any) => { + .subscribe((resultSets: any) => { - // Store the results - this.results = response.results; + // Store the result sets + this.resultSets = resultSets; // Execute the event - this.search.next(this.results); + this.search.next(resultSets); }); }); } diff --git a/src/app/layout/common/shortcuts/shortcuts.component.html b/src/app/layout/common/shortcuts/shortcuts.component.html index b0106838..d4bca407 100644 --- a/src/app/layout/common/shortcuts/shortcuts.component.html +++ b/src/app/layout/common/shortcuts/shortcuts.component.html @@ -21,7 +21,15 @@ [svgIcon]="'heroicons_solid:x'">
-
Shortcuts
+
+ Shortcuts + + + - Add new + - Editing + + +
diff --git a/src/app/layout/common/shortcuts/shortcuts.component.ts b/src/app/layout/common/shortcuts/shortcuts.component.ts index 20598f1d..99237746 100644 --- a/src/app/layout/common/shortcuts/shortcuts.component.ts +++ b/src/app/layout/common/shortcuts/shortcuts.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Overlay, OverlayRef } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; @@ -15,14 +15,14 @@ import { ShortcutsService } from 'app/layout/common/shortcuts/shortcuts.service' changeDetection: ChangeDetectionStrategy.OnPush, exportAs : 'shortcuts' }) -export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy +export class ShortcutsComponent implements OnInit, OnDestroy { - @Input() shortcuts: Shortcut[]; @ViewChild('shortcutsOrigin') private _shortcutsOrigin: MatButton; @ViewChild('shortcutsPanel') private _shortcutsPanel: TemplateRef; mode: 'view' | 'modify' | 'add' | 'edit' = 'view'; shortcutForm: FormGroup; + shortcuts: Shortcut[]; private _overlayRef: OverlayRef; private _unsubscribeAll: Subject = new Subject(); @@ -43,21 +43,6 @@ export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy // @ Lifecycle hooks // ----------------------------------------------------------------------------------------------------- - /** - * On changes - * - * @param changes - */ - ngOnChanges(changes: SimpleChanges): void - { - // Shortcuts - if ( 'shortcuts' in changes ) - { - // Store the shortcuts on the service - this._shortcutsService.store(changes.shortcuts.currentValue); - } - } - /** * On init */ diff --git a/src/app/layout/common/shortcuts/shortcuts.service.ts b/src/app/layout/common/shortcuts/shortcuts.service.ts index 01f128f5..e2b045a0 100644 --- a/src/app/layout/common/shortcuts/shortcuts.service.ts +++ b/src/app/layout/common/shortcuts/shortcuts.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, ReplaySubject } from 'rxjs'; -import { map, switchMap, take } from 'rxjs/operators'; +import { map, switchMap, take, tap } from 'rxjs/operators'; import { Shortcut } from 'app/layout/common/shortcuts/shortcuts.types'; @Injectable({ @@ -35,17 +35,15 @@ export class ShortcutsService // ----------------------------------------------------------------------------------------------------- /** - * Store shortcuts on the service - * - * @param shortcuts + * Get all messages */ - store(shortcuts: Shortcut[]): Observable + getAll(): Observable { - // Load the shortcuts - this._shortcuts.next(shortcuts); - - // Return the shortcuts - return this.shortcuts$; + return this._httpClient.get('api/common/shortcuts').pipe( + tap((shortcuts) => { + this._shortcuts.next(shortcuts); + }) + ); } /** diff --git a/src/app/layout/common/user-menu/user-menu.component.html b/src/app/layout/common/user/user.component.html similarity index 100% rename from src/app/layout/common/user-menu/user-menu.component.html rename to src/app/layout/common/user/user.component.html diff --git a/src/app/layout/common/user-menu/user-menu.component.ts b/src/app/layout/common/user/user.component.ts similarity index 91% rename from src/app/layout/common/user-menu/user-menu.component.ts rename to src/app/layout/common/user/user.component.ts index 45a4bc4b..6fabe8dc 100644 --- a/src/app/layout/common/user-menu/user-menu.component.ts +++ b/src/app/layout/common/user/user.component.ts @@ -3,17 +3,17 @@ import { Router } from '@angular/router'; import { BooleanInput } from '@angular/cdk/coercion'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { User } from 'app/core/user/user.model'; +import { User } from 'app/core/user/user.types'; import { UserService } from 'app/core/user/user.service'; @Component({ - selector : 'user-menu', - templateUrl : './user-menu.component.html', + selector : 'user', + templateUrl : './user.component.html', encapsulation : ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, - exportAs : 'userMenu' + exportAs : 'user' }) -export class UserMenuComponent implements OnInit, OnDestroy +export class UserComponent implements OnInit, OnDestroy { /* eslint-disable @typescript-eslint/naming-convention */ static ngAcceptInputType_showAvatar: BooleanInput; diff --git a/src/app/layout/common/user-menu/user-menu.module.ts b/src/app/layout/common/user/user.module.ts similarity index 76% rename from src/app/layout/common/user-menu/user-menu.module.ts rename to src/app/layout/common/user/user.module.ts index d7ded69a..5cd0d06b 100644 --- a/src/app/layout/common/user-menu/user-menu.module.ts +++ b/src/app/layout/common/user/user.module.ts @@ -3,12 +3,12 @@ import { MatButtonModule } from '@angular/material/button'; import { MatDividerModule } from '@angular/material/divider'; import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; -import { UserMenuComponent } from 'app/layout/common/user-menu/user-menu.component'; +import { UserComponent } from 'app/layout/common/user/user.component'; import { SharedModule } from 'app/shared/shared.module'; @NgModule({ declarations: [ - UserMenuComponent + UserComponent ], imports : [ MatButtonModule, @@ -18,9 +18,9 @@ import { SharedModule } from 'app/shared/shared.module'; SharedModule ], exports : [ - UserMenuComponent + UserComponent ] }) -export class UserMenuModule +export class UserModule { } diff --git a/src/app/layout/layouts/horizontal/centered/centered.component.html b/src/app/layout/layouts/horizontal/centered/centered.component.html index cb5344bc..fcabd73f 100644 --- a/src/app/layout/layouts/horizontal/centered/centered.component.html +++ b/src/app/layout/layouts/horizontal/centered/centered.component.html @@ -6,7 +6,7 @@ class="dark bg-gray-900 print:hidden" [mode]="'over'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="false"> @@ -50,7 +50,7 @@ + [navigation]="navigation.horizontal"> @@ -63,13 +63,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/horizontal/centered/centered.component.ts b/src/app/layout/layouts/horizontal/centered/centered.component.ts index 94b0f5dc..c32f77c6 100644 --- a/src/app/layout/layouts/horizontal/centered/centered.component.ts +++ b/src/app/layout/layouts/horizontal/centered/centered.component.ts @@ -4,7 +4,8 @@ import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'centered-layout', @@ -13,7 +14,7 @@ import { InitialData } from 'app/app.types'; }) export class CenteredLayoutComponent implements OnInit, OnDestroy { - data: InitialData; + navigation: Navigation; isScreenSmall: boolean; private _unsubscribeAll: Subject = new Subject(); @@ -23,6 +24,7 @@ export class CenteredLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class CenteredLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/horizontal/centered/centered.module.ts b/src/app/layout/layouts/horizontal/centered/centered.module.ts index 4a93eefb..b1d952f4 100644 --- a/src/app/layout/layouts/horizontal/centered/centered.module.ts +++ b/src/app/layout/layouts/horizontal/centered/centered.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { CenteredLayoutComponent } from 'app/layout/layouts/horizontal/centered/centered.component'; @@ -29,12 +29,12 @@ import { CenteredLayoutComponent } from 'app/layout/layouts/horizontal/centered/ MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/horizontal/enterprise/enterprise.component.html b/src/app/layout/layouts/horizontal/enterprise/enterprise.component.html index cd2dafc0..1eeef577 100644 --- a/src/app/layout/layouts/horizontal/enterprise/enterprise.component.html +++ b/src/app/layout/layouts/horizontal/enterprise/enterprise.component.html @@ -4,7 +4,7 @@ class="dark bg-gray-900 print:hidden" [mode]="'over'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="false"> @@ -46,13 +46,13 @@
- + - - - - + + + +
@@ -63,7 +63,7 @@ + [navigation]="navigation.horizontal">
diff --git a/src/app/layout/layouts/horizontal/enterprise/enterprise.component.ts b/src/app/layout/layouts/horizontal/enterprise/enterprise.component.ts index 6d5705a7..f28f035c 100644 --- a/src/app/layout/layouts/horizontal/enterprise/enterprise.component.ts +++ b/src/app/layout/layouts/horizontal/enterprise/enterprise.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'enterprise-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class EnterpriseLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class EnterpriseLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class EnterpriseLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/horizontal/enterprise/enterprise.module.ts b/src/app/layout/layouts/horizontal/enterprise/enterprise.module.ts index b930680c..72678fd8 100644 --- a/src/app/layout/layouts/horizontal/enterprise/enterprise.module.ts +++ b/src/app/layout/layouts/horizontal/enterprise/enterprise.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { EnterpriseLayoutComponent } from 'app/layout/layouts/horizontal/enterprise/enterprise.component'; @@ -29,12 +29,12 @@ import { EnterpriseLayoutComponent } from 'app/layout/layouts/horizontal/enterpr MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/horizontal/material/material.component.html b/src/app/layout/layouts/horizontal/material/material.component.html index 95842048..b7126d16 100644 --- a/src/app/layout/layouts/horizontal/material/material.component.html +++ b/src/app/layout/layouts/horizontal/material/material.component.html @@ -4,7 +4,7 @@ class="dark bg-gray-900 print:hidden" [mode]="'over'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="false"> @@ -52,13 +52,13 @@
- + - - - - + + + +
@@ -66,7 +66,7 @@
+ [navigation]="navigation.horizontal">
diff --git a/src/app/layout/layouts/horizontal/material/material.component.ts b/src/app/layout/layouts/horizontal/material/material.component.ts index 71478603..071ffd6b 100644 --- a/src/app/layout/layouts/horizontal/material/material.component.ts +++ b/src/app/layout/layouts/horizontal/material/material.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'material-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class MaterialLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class MaterialLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class MaterialLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/horizontal/material/material.module.ts b/src/app/layout/layouts/horizontal/material/material.module.ts index 778cd49e..65d875f7 100644 --- a/src/app/layout/layouts/horizontal/material/material.module.ts +++ b/src/app/layout/layouts/horizontal/material/material.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { MaterialLayoutComponent } from 'app/layout/layouts/horizontal/material/material.component'; @@ -29,12 +29,12 @@ import { MaterialLayoutComponent } from 'app/layout/layouts/horizontal/material/ MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/horizontal/modern/modern.component.html b/src/app/layout/layouts/horizontal/modern/modern.component.html index 65a7690d..0671c7f6 100644 --- a/src/app/layout/layouts/horizontal/modern/modern.component.html +++ b/src/app/layout/layouts/horizontal/modern/modern.component.html @@ -4,7 +4,7 @@ class="dark bg-gray-900 print:hidden" [mode]="'over'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="false"> @@ -43,7 +43,7 @@ + [navigation]="navigation.horizontal"> @@ -55,13 +55,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/horizontal/modern/modern.component.ts b/src/app/layout/layouts/horizontal/modern/modern.component.ts index d103b7b8..0f2fb2a2 100644 --- a/src/app/layout/layouts/horizontal/modern/modern.component.ts +++ b/src/app/layout/layouts/horizontal/modern/modern.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'modern-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class ModernLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class ModernLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class ModernLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/horizontal/modern/modern.module.ts b/src/app/layout/layouts/horizontal/modern/modern.module.ts index 413ba425..b95a0e2f 100644 --- a/src/app/layout/layouts/horizontal/modern/modern.module.ts +++ b/src/app/layout/layouts/horizontal/modern/modern.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { ModernLayoutComponent } from 'app/layout/layouts/horizontal/modern/modern.component'; @@ -29,12 +29,12 @@ import { ModernLayoutComponent } from 'app/layout/layouts/horizontal/modern/mode MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/classic/classic.component.html b/src/app/layout/layouts/vertical/classic/classic.component.html index ce44ef57..b597b8a6 100644 --- a/src/app/layout/layouts/vertical/classic/classic.component.html +++ b/src/app/layout/layouts/vertical/classic/classic.component.html @@ -3,7 +3,7 @@ class="dark bg-gray-900 print:hidden" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="!isScreenSmall"> @@ -36,13 +36,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/vertical/classic/classic.component.ts b/src/app/layout/layouts/vertical/classic/classic.component.ts index 39687b25..8f9ad2ab 100644 --- a/src/app/layout/layouts/vertical/classic/classic.component.ts +++ b/src/app/layout/layouts/vertical/classic/classic.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'classic-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class ClassicLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class ClassicLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class ClassicLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/classic/classic.module.ts b/src/app/layout/layouts/vertical/classic/classic.module.ts index b982527a..b6aa4064 100644 --- a/src/app/layout/layouts/vertical/classic/classic.module.ts +++ b/src/app/layout/layouts/vertical/classic/classic.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { ClassicLayoutComponent } from 'app/layout/layouts/vertical/classic/classic.component'; @@ -29,12 +29,12 @@ import { ClassicLayoutComponent } from 'app/layout/layouts/vertical/classic/clas MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/classy/classy.component.html b/src/app/layout/layouts/vertical/classy/classy.component.html index 608c966e..02dcc2f5 100644 --- a/src/app/layout/layouts/vertical/classy/classy.component.html +++ b/src/app/layout/layouts/vertical/classy/classy.component.html @@ -3,7 +3,7 @@ class="dark bg-gray-900 print:hidden" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="!isScreenSmall"> @@ -16,8 +16,8 @@
- - + +
@@ -25,20 +25,20 @@
User avatar
- {{data.user.name}} + {{user.name}}
- {{data.user.email}} + {{user.email}}
@@ -66,11 +66,11 @@
- + - - + +
diff --git a/src/app/layout/layouts/vertical/classy/classy.component.ts b/src/app/layout/layouts/vertical/classy/classy.component.ts index 231922ad..63847083 100644 --- a/src/app/layout/layouts/vertical/classy/classy.component.ts +++ b/src/app/layout/layouts/vertical/classy/classy.component.ts @@ -1,10 +1,13 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; +import { User } from 'app/core/user/user.types'; +import { UserService } from 'app/core/user/user.service'; @Component({ selector : 'classy-layout', @@ -13,8 +16,9 @@ import { InitialData } from 'app/app.types'; }) export class ClassyLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; + user: User; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +27,8 @@ export class ClassyLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, + private _userService: UserService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +56,19 @@ export class ClassyLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); + + // Subscribe to the user service + this._userService.user$ + .pipe((takeUntil(this._unsubscribeAll))) + .subscribe((user: User) => { + this.user = user; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/classy/classy.module.ts b/src/app/layout/layouts/vertical/classy/classy.module.ts index 482738ec..f9e35260 100644 --- a/src/app/layout/layouts/vertical/classy/classy.module.ts +++ b/src/app/layout/layouts/vertical/classy/classy.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseNavigationModule } from '@fuse/components/navigation'; import { FuseFullscreenModule } from '@fuse/components/fullscreen/fullscreen.module'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { ClassyLayoutComponent } from 'app/layout/layouts/vertical/classy/classy.component'; @@ -29,12 +29,12 @@ import { ClassyLayoutComponent } from 'app/layout/layouts/vertical/classy/classy MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/compact/compact.component.html b/src/app/layout/layouts/vertical/compact/compact.component.html index e7edd79a..10e7d09a 100644 --- a/src/app/layout/layouts/vertical/compact/compact.component.html +++ b/src/app/layout/layouts/vertical/compact/compact.component.html @@ -4,7 +4,7 @@ [appearance]="'compact'" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.compact" + [navigation]="navigation.compact" [opened]="!isScreenSmall"> @@ -31,13 +31,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/vertical/compact/compact.component.ts b/src/app/layout/layouts/vertical/compact/compact.component.ts index 4616d2f3..7fc6696c 100644 --- a/src/app/layout/layouts/vertical/compact/compact.component.ts +++ b/src/app/layout/layouts/vertical/compact/compact.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'compact-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class CompactLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class CompactLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class CompactLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/compact/compact.module.ts b/src/app/layout/layouts/vertical/compact/compact.module.ts index 54d5560f..6ef0cfeb 100644 --- a/src/app/layout/layouts/vertical/compact/compact.module.ts +++ b/src/app/layout/layouts/vertical/compact/compact.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { CompactLayoutComponent } from 'app/layout/layouts/vertical/compact/compact.component'; @@ -29,12 +29,12 @@ import { CompactLayoutComponent } from 'app/layout/layouts/vertical/compact/comp MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/dense/dense.component.html b/src/app/layout/layouts/vertical/dense/dense.component.html index 1e51760f..efbb19a5 100644 --- a/src/app/layout/layouts/vertical/dense/dense.component.html +++ b/src/app/layout/layouts/vertical/dense/dense.component.html @@ -4,7 +4,7 @@ [appearance]="navigationAppearance" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.default" + [navigation]="navigation.default" [opened]="!isScreenSmall"> @@ -40,13 +40,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/vertical/dense/dense.component.ts b/src/app/layout/layouts/vertical/dense/dense.component.ts index bd0617bb..c2880fb4 100644 --- a/src/app/layout/layouts/vertical/dense/dense.component.ts +++ b/src/app/layout/layouts/vertical/dense/dense.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'dense-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class DenseLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; navigationAppearance: 'default' | 'dense' = 'dense'; private _unsubscribeAll: Subject = new Subject(); @@ -24,6 +25,7 @@ export class DenseLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -51,10 +53,12 @@ export class DenseLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/dense/dense.module.ts b/src/app/layout/layouts/vertical/dense/dense.module.ts index da0ed28f..125d7686 100644 --- a/src/app/layout/layouts/vertical/dense/dense.module.ts +++ b/src/app/layout/layouts/vertical/dense/dense.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { DenseLayoutComponent } from 'app/layout/layouts/vertical/dense/dense.component'; @@ -29,12 +29,12 @@ import { DenseLayoutComponent } from 'app/layout/layouts/vertical/dense/dense.co MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/futuristic/futuristic.component.html b/src/app/layout/layouts/vertical/futuristic/futuristic.component.html index 02f02c50..892cb041 100644 --- a/src/app/layout/layouts/vertical/futuristic/futuristic.component.html +++ b/src/app/layout/layouts/vertical/futuristic/futuristic.component.html @@ -3,7 +3,7 @@ class="dark bg-indigo-800 text-white print:hidden" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.futuristic" + [navigation]="navigation.futuristic" [opened]="!isScreenSmall"> @@ -18,10 +18,10 @@
- +
- {{data.user.name}} + {{user.name}}
brian.hughes@company.com @@ -45,12 +45,12 @@
- + - - - + + +
diff --git a/src/app/layout/layouts/vertical/futuristic/futuristic.component.ts b/src/app/layout/layouts/vertical/futuristic/futuristic.component.ts index a9de60a0..940058f3 100644 --- a/src/app/layout/layouts/vertical/futuristic/futuristic.component.ts +++ b/src/app/layout/layouts/vertical/futuristic/futuristic.component.ts @@ -1,10 +1,13 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; +import { User } from 'app/core/user/user.types'; +import { UserService } from 'app/core/user/user.service'; @Component({ selector : 'futuristic-layout', @@ -13,8 +16,9 @@ import { InitialData } from 'app/app.types'; }) export class FuturisticLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; + user: User; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +27,8 @@ export class FuturisticLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, + private _userService: UserService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +56,19 @@ export class FuturisticLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); + + // Subscribe to the user service + this._userService.user$ + .pipe((takeUntil(this._unsubscribeAll))) + .subscribe((user: User) => { + this.user = user; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/futuristic/futuristic.module.ts b/src/app/layout/layouts/vertical/futuristic/futuristic.module.ts index c6af7139..f1dccc2c 100644 --- a/src/app/layout/layouts/vertical/futuristic/futuristic.module.ts +++ b/src/app/layout/layouts/vertical/futuristic/futuristic.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { FuturisticLayoutComponent } from 'app/layout/layouts/vertical/futuristic/futuristic.component'; @@ -29,12 +29,12 @@ import { FuturisticLayoutComponent } from 'app/layout/layouts/vertical/futuristi MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/layout/layouts/vertical/thin/thin.component.html b/src/app/layout/layouts/vertical/thin/thin.component.html index b870e693..967ceece 100644 --- a/src/app/layout/layouts/vertical/thin/thin.component.html +++ b/src/app/layout/layouts/vertical/thin/thin.component.html @@ -4,7 +4,7 @@ [appearance]="'thin'" [mode]="isScreenSmall ? 'over' : 'side'" [name]="'mainNavigation'" - [navigation]="data.navigation.compact" + [navigation]="navigation.compact" [opened]="!isScreenSmall"> @@ -32,13 +32,13 @@
- + - - - - + + + +
diff --git a/src/app/layout/layouts/vertical/thin/thin.component.ts b/src/app/layout/layouts/vertical/thin/thin.component.ts index a1173d67..02bdc543 100644 --- a/src/app/layout/layouts/vertical/thin/thin.component.ts +++ b/src/app/layout/layouts/vertical/thin/thin.component.ts @@ -1,10 +1,11 @@ import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { FuseMediaWatcherService } from '@fuse/services/media-watcher'; import { FuseNavigationService, FuseVerticalNavigationComponent } from '@fuse/components/navigation'; -import { InitialData } from 'app/app.types'; +import { Navigation } from 'app/core/navigation/navigation.types'; +import { NavigationService } from 'app/core/navigation/navigation.service'; @Component({ selector : 'thin-layout', @@ -13,8 +14,8 @@ import { InitialData } from 'app/app.types'; }) export class ThinLayoutComponent implements OnInit, OnDestroy { - data: InitialData; isScreenSmall: boolean; + navigation: Navigation; private _unsubscribeAll: Subject = new Subject(); /** @@ -23,6 +24,7 @@ export class ThinLayoutComponent implements OnInit, OnDestroy constructor( private _activatedRoute: ActivatedRoute, private _router: Router, + private _navigationService: NavigationService, private _fuseMediaWatcherService: FuseMediaWatcherService, private _fuseNavigationService: FuseNavigationService ) @@ -50,10 +52,12 @@ export class ThinLayoutComponent implements OnInit, OnDestroy */ ngOnInit(): void { - // Subscribe to the resolved route data - this._activatedRoute.data.subscribe((data: Data) => { - this.data = data.initialData; - }); + // Subscribe to navigation data + this._navigationService.navigation$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((navigation: Navigation) => { + this.navigation = navigation; + }); // Subscribe to media changes this._fuseMediaWatcherService.onMediaChange$ diff --git a/src/app/layout/layouts/vertical/thin/thin.module.ts b/src/app/layout/layouts/vertical/thin/thin.module.ts index 347aabf8..3ae44c63 100644 --- a/src/app/layout/layouts/vertical/thin/thin.module.ts +++ b/src/app/layout/layouts/vertical/thin/thin.module.ts @@ -7,12 +7,12 @@ import { MatIconModule } from '@angular/material/icon'; import { MatMenuModule } from '@angular/material/menu'; import { FuseFullscreenModule } from '@fuse/components/fullscreen'; import { FuseNavigationModule } from '@fuse/components/navigation'; -import { LanguageModule } from 'app/layout/common/language/language.module'; +import { LanguagesModule } from 'app/layout/common/languages/languages.module'; import { MessagesModule } from 'app/layout/common/messages/messages.module'; import { NotificationsModule } from 'app/layout/common/notifications/notifications.module'; import { SearchModule } from 'app/layout/common/search/search.module'; import { ShortcutsModule } from 'app/layout/common/shortcuts/shortcuts.module'; -import { UserMenuModule } from 'app/layout/common/user-menu/user-menu.module'; +import { UserModule } from 'app/layout/common/user/user.module'; import { SharedModule } from 'app/shared/shared.module'; import { ThinLayoutComponent } from 'app/layout/layouts/vertical/thin/thin.component'; @@ -29,12 +29,12 @@ import { ThinLayoutComponent } from 'app/layout/layouts/vertical/thin/thin.compo MatMenuModule, FuseFullscreenModule, FuseNavigationModule, - LanguageModule, + LanguagesModule, MessagesModule, NotificationsModule, SearchModule, ShortcutsModule, - UserMenuModule, + UserModule, SharedModule ], exports : [ diff --git a/src/app/mock-api/apps/file-manager/api.ts b/src/app/mock-api/apps/file-manager/api.ts index 95c56045..ff4f7e7a 100644 --- a/src/app/mock-api/apps/file-manager/api.ts +++ b/src/app/mock-api/apps/file-manager/api.ts @@ -33,10 +33,18 @@ export class FileManagerMockApi // ----------------------------------------------------------------------------------------------------- this._fuseMockApiService .onGet('api/apps/file-manager') - .reply(() => { + .reply(({request}) => { // Clone the items - const items = cloneDeep(this._items); + let items = cloneDeep(this._items); + + // See if a folder id exist + const folderId = request.params.get('folderId') ?? null; + + // Filter the items by folder id. If folder id is null, + // that means we want to root items which have folder id + // of null + items = items.filter(item => item.folderId === folderId); // Separate the items by folders and files const folders = items.filter(item => item.type === 'folder'); @@ -46,11 +54,38 @@ export class FileManagerMockApi folders.sort((a, b) => a.name.localeCompare(b.name)); files.sort((a, b) => a.name.localeCompare(b.name)); + // Figure out the path and attach it to the response + // Prepare the empty paths array + const pathItems = cloneDeep(this._items); + const path = []; + + // Prepare the current folder + let currentFolder = null; + + // Get the current folder and add it as the first entry + if ( folderId ) + { + currentFolder = pathItems.find(item => item.id === folderId); + path.push(currentFolder); + } + + // Start traversing and storing the folders as a path array + // until we hit null on the folder id + while ( currentFolder?.folderId ) + { + currentFolder = pathItems.find(item => item.id === currentFolder.folderId); + if ( currentFolder ) + { + path.unshift(currentFolder); + } + } + return [ 200, { folders, - files + files, + path } ]; }); diff --git a/src/app/mock-api/apps/file-manager/data.ts b/src/app/mock-api/apps/file-manager/data.ts index bf4b7ff0..fa6184f6 100644 --- a/src/app/mock-api/apps/file-manager/data.ts +++ b/src/app/mock-api/apps/file-manager/data.ts @@ -2,6 +2,7 @@ export const items = [ { id : 'cd6897cb-acfd-4016-8b53-3f66a5b5fc68', + folderId : null, name : 'Personal', createdBy : 'Brian Hughes', createdAt : 'April 24, 2018', @@ -13,6 +14,7 @@ export const items = [ }, { id : '6da8747f-b474-4c9a-9eba-5ef212285500', + folderId : null, name : 'Photos', createdBy : 'Brian Hughes', createdAt : 'November 01, 2021', @@ -24,6 +26,7 @@ export const items = [ }, { id : 'ed58add1-45a7-41db-887d-3ca7ee7f2719', + folderId : null, name : 'Work', createdBy : 'Brian Hughes', createdAt : 'May 8, 2020', @@ -35,6 +38,7 @@ export const items = [ }, { id : '5cb66e32-d1ac-4b9a-8c34-5991ce25add2', + folderId : null, name : 'Contract #123', createdBy : 'Brian Hughes', createdAt : 'January 14, 2021', @@ -46,6 +50,7 @@ export const items = [ }, { id : '3ffc3d84-8f2d-4929-903a-ef6fc21657a7', + folderId : null, name : 'Estimated budget', createdBy : 'Brian Hughes', createdAt : 'December 14, 2020', @@ -57,6 +62,7 @@ export const items = [ }, { id : '157adb9a-14f8-4559-ac93-8be893c9f80a', + folderId : null, name : 'DMCA notice #42', createdBy : 'Brian Hughes', createdAt : 'May 8, 2021', @@ -68,6 +74,7 @@ export const items = [ }, { id : '4f64597a-df7e-461c-ad60-f33e5f7e0747', + folderId : null, name : 'Invoices', createdBy : 'Brian Hughes', createdAt : 'January 12, 2020', @@ -79,6 +86,7 @@ export const items = [ }, { id : 'e445c445-57b2-4476-8c62-b068e3774b8e', + folderId : null, name : 'Crash logs', createdBy : 'Brian Hughes', createdAt : 'June 8, 2020', @@ -90,6 +98,7 @@ export const items = [ }, { id : 'b482f93e-7847-4614-ad48-b78b78309f81', + folderId : null, name : 'System logs', createdBy : 'Brian Hughes', createdAt : 'June 8, 2020', @@ -101,6 +110,7 @@ export const items = [ }, { id : 'ec07a98d-2e5b-422c-a9b2-b5d1c0e263f5', + folderId : null, name : 'Personal projects', createdBy : 'Brian Hughes', createdAt : 'March 18, 2020', @@ -112,6 +122,7 @@ export const items = [ }, { id : 'ae908d59-07da-4dd8-aba0-124e50289295', + folderId : null, name : 'Biometric portrait', createdBy : 'Brian Hughes', createdAt : 'August 29, 2020', @@ -123,6 +134,7 @@ export const items = [ }, { id : '4038a5b6-5b1a-432d-907c-e037aeb817a8', + folderId : null, name : 'Scanned image 20201012-1', createdBy : 'Brian Hughes', createdAt : 'September 13, 2020', @@ -134,6 +146,7 @@ export const items = [ }, { id : '630d2e9a-d110-47a0-ac03-256073a0f56d', + folderId : null, name : 'Scanned image 20201012-2', createdBy : 'Brian Hughes', createdAt : 'September 14, 2020', @@ -145,6 +158,7 @@ export const items = [ }, { id : '1417d5ed-b616-4cff-bfab-286677b69d79', + folderId : null, name : 'Prices', createdBy : 'Brian Hughes', createdAt : 'April 07, 2020', @@ -156,6 +170,7 @@ export const items = [ }, { id : 'bd2817c7-6751-40dc-b252-b6b5634c0689', + folderId : null, name : 'Shopping list', createdBy : 'Brian Hughes', createdAt : 'March 26, 2021', @@ -167,6 +182,7 @@ export const items = [ }, { id : '14fb47c9-6eeb-4070-919c-07c8133285d1', + folderId : null, name : 'Summer budget', createdBy : 'Brian Hughes', createdAt : 'June 02, 2020', @@ -175,5 +191,67 @@ export const items = [ type : 'XLS', contents : null, description: null + }, + + { + id : '894e8514-03d3-4f5e-bb28-f6c092501fae', + folderId : 'cd6897cb-acfd-4016-8b53-3f66a5b5fc68', + name : 'A personal file', + createdBy : 'Brian Hughes', + createdAt : 'June 02, 2020', + modifiedAt : 'June 02, 2020', + size : '943 KB', + type : 'XLS', + contents : null, + description: null + }, + { + id : '74010810-16cf-441d-a1aa-c9fb620fceea', + folderId : 'cd6897cb-acfd-4016-8b53-3f66a5b5fc68', + name : 'A personal folder', + createdBy : 'Brian Hughes', + createdAt : 'November 01, 2021', + modifiedAt : 'November 01, 2021', + size : '3015 MB', + type : 'folder', + contents : '907 files', + description: 'Personal photos; selfies, family, vacation and etc.' + }, + { + id : 'a8c73e5a-8114-436d-ab54-d900b50b3762', + folderId : '74010810-16cf-441d-a1aa-c9fb620fceea', + name : 'A personal file within the personal folder', + createdBy : 'Brian Hughes', + createdAt : 'June 02, 2020', + modifiedAt : 'June 02, 2020', + size : '943 KB', + type : 'XLS', + contents : null, + description: null + }, + + { + id : '12d851a8-4f60-473e-8a59-abe4b422ea99', + folderId : '6da8747f-b474-4c9a-9eba-5ef212285500', + name : 'Photos file', + createdBy : 'Brian Hughes', + createdAt : 'June 02, 2020', + modifiedAt : 'June 02, 2020', + size : '943 KB', + type : 'XLS', + contents : null, + description: null + }, + { + id : '2836766d-27e1-4f40-a31a-5a8419105e7e', + folderId : 'ed58add1-45a7-41db-887d-3ca7ee7f2719', + name : 'Work file', + createdBy : 'Brian Hughes', + createdAt : 'June 02, 2020', + modifiedAt : 'June 02, 2020', + size : '943 KB', + type : 'XLS', + contents : null, + description: null } ]; diff --git a/src/app/mock-api/common/notifications/data.ts b/src/app/mock-api/common/notifications/data.ts index 373e1c1e..2a08b99c 100644 --- a/src/app/mock-api/common/notifications/data.ts +++ b/src/app/mock-api/common/notifications/data.ts @@ -4,7 +4,7 @@ import * as moment from 'moment'; export const notifications = [ { id : '493190c9-5b61-4912-afe5-78c21f1044d7', - icon : 'heroicons_outline:star', + icon : 'heroicons_solid:star', title : 'Daily challenges', description: 'Your submission has been accepted', time : moment().subtract(25, 'minutes').toISOString(), // 25 minutes ago @@ -21,7 +21,7 @@ export const notifications = [ }, { id : 'b91ccb58-b06c-413b-b389-87010e03a120', - icon : 'heroicons_outline:mail', + icon : 'heroicons_solid:mail', title : 'Mailbox', description: 'You have 15 unread mails across 3 mailboxes', time : moment().subtract(3, 'hours').toISOString(), // 3 hours ago @@ -31,7 +31,7 @@ export const notifications = [ }, { id : '541416c9-84a7-408a-8d74-27a43c38d797', - icon : 'heroicons_outline:refresh', + icon : 'heroicons_solid:refresh', title : 'Cron jobs', description: 'Your Docker container is ready to publish', time : moment().subtract(5, 'hours').toISOString(), // 5 hours ago @@ -59,7 +59,7 @@ export const notifications = [ }, { id : 'b85c2338-cc98-4140-bbf8-c226ce4e395e', - icon : 'heroicons_outline:mail', + icon : 'heroicons_solid:mail', title : 'Mailbox', description: 'You have 3 new mails', time : moment().subtract(1, 'day').toISOString(), // 1 day ago @@ -69,7 +69,7 @@ export const notifications = [ }, { id : '8f8e1bf9-4661-4939-9e43-390957b60f42', - icon : 'heroicons_outline:star', + icon : 'heroicons_solid:star', title : 'Daily challenges', description: 'Your submission has been accepted and you are ready to sign-up for the final assigment which will be ready in 2 days', time : moment().subtract(3, 'days').toISOString(), // 3 days ago @@ -79,7 +79,7 @@ export const notifications = [ }, { id : '30af917b-7a6a-45d1-822f-9e7ad7f8bf69', - icon : 'heroicons_outline:refresh', + icon : 'heroicons_solid:refresh', title : 'Cron jobs', description: 'Your Vagrant container is ready to download', time : moment().subtract(4, 'day').toISOString(), // 4 days ago diff --git a/src/app/mock-api/common/search/api.ts b/src/app/mock-api/common/search/api.ts index f6525d6b..7bec5fc3 100644 --- a/src/app/mock-api/common/search/api.ts +++ b/src/app/mock-api/common/search/api.ts @@ -4,6 +4,7 @@ import { FuseNavigationItem, FuseNavigationService } from '@fuse/components/navi import { FuseMockApiService } from '@fuse/lib/mock-api'; import { defaultNavigation } from 'app/mock-api/common/navigation/data'; import { contacts } from 'app/mock-api/apps/contacts/data'; +import { tasks } from 'app/mock-api/apps/tasks/data'; @Injectable({ providedIn: 'root' @@ -12,6 +13,7 @@ export class SearchMockApi { private readonly _defaultNavigation: FuseNavigationItem[] = defaultNavigation; private readonly _contacts: any[] = contacts; + private readonly _tasks: any[] = tasks; /** * Constructor @@ -54,58 +56,75 @@ export class SearchMockApi return [200, {results: []}]; } - // Filter the navigation - const navigationResults = cloneDeep(flatNavigation).filter(item => (item.title?.toLowerCase().includes(query) || (item.subtitle && item.subtitle.includes(query)))); - // Filter the contacts - const contactsResults = cloneDeep(this._contacts).filter(user => user.name.toLowerCase().includes(query)); + const contactsResults = cloneDeep(this._contacts) + .filter(contact => contact.name.toLowerCase().includes(query)); - // Create the results array + // Filter the navigation + const pagesResults = cloneDeep(flatNavigation) + .filter(page => (page.title?.toLowerCase().includes(query) || (page.subtitle && page.subtitle.includes(query)))); + + // Filter the tasks + const tasksResults = cloneDeep(this._tasks) + .filter(task => task.title.toLowerCase().includes(query)); + + // Prepare the results array const results = []; - // If there are navigation results... - if ( navigationResults.length > 0 ) - { - // Normalize the results while marking the found chars - navigationResults.forEach((result: any) => { - - // Normalize - result['hint'] = result.link; - result['resultType'] = 'page'; - - // Mark the found chars - const re = new RegExp('(' + query.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + ')', 'ig'); - result.title = result.title.replace(re, '$1'); - }); - - // Add the results - results.push(...navigationResults); - } - // If there are contacts results... if ( contactsResults.length > 0 ) { - // Normalize the results while marking the found chars + // Normalize the results contactsResults.forEach((result) => { - // Normalize - result.title = result.name; - result.resultType = 'contact'; - - // Make the found chars bold - const re = new RegExp('(' + query.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + ')', 'ig'); - result.title = result.title.replace(re, '$1'); - // Add a link result.link = '/apps/contacts/' + result.id; }); - // Add the results to the results object - results.push(...contactsResults); + // Add to the results + results.push({ + id : 'contacts', + label : 'Contacts', + results: contactsResults + }); + } + + // If there are page results... + if ( pagesResults.length > 0 ) + { + // Normalize the results + pagesResults.forEach((result: any) => { + + }); + + // Add to the results + results.push({ + id : 'pages', + label : 'Pages', + results: pagesResults + }); + } + + // If there are tasks results... + if ( tasksResults.length > 0 ) + { + // Normalize the results + tasksResults.forEach((result) => { + + // Add a link + result.link = '/apps/tasks/' + result.id; + }); + + // Add to the results + results.push({ + id : 'tasks', + label : 'Tasks', + results: tasksResults + }); } // Return the response - return [200, {results}]; + return [200, results]; }); } } diff --git a/src/app/mock-api/common/shortcuts/data.ts b/src/app/mock-api/common/shortcuts/data.ts index 38acd3d9..fac6fa4b 100644 --- a/src/app/mock-api/common/shortcuts/data.ts +++ b/src/app/mock-api/common/shortcuts/data.ts @@ -3,9 +3,9 @@ export const shortcuts = [ { id : 'a1ae91d3-e2cb-459b-9be9-a184694f548b', label : 'Changelog', - description: 'Latest version: v1.2', + description: 'List of changes', icon : 'heroicons_outline:clipboard-list', - link : '/dashboards/project', + link : '/docs/changelog', useRouter : true }, { @@ -13,7 +13,7 @@ export const shortcuts = [ label : 'Documentation', description: 'Getting started', icon : 'heroicons_outline:book-open', - link : '/dashboards/project', + link : '/docs/guides/getting-started/introduction', useRouter : true }, { @@ -21,7 +21,7 @@ export const shortcuts = [ label : 'Help center', description: 'FAQs and guides', icon : 'heroicons_outline:support', - link : '/pages/help-center', + link : '/apps/help-center', useRouter : true }, { @@ -29,7 +29,7 @@ export const shortcuts = [ label : 'Dashboard', description: 'User analytics', icon : 'heroicons_outline:chart-pie', - link : '/dashboards/project', + link : '/dashboards/analytics', useRouter : true }, { @@ -67,7 +67,7 @@ export const shortcuts = [ { id : '0a240ab8-e19d-4503-bf68-20013030d526', label : 'Reload', - description: 'Restart the app', + description: 'Reload the app', icon : 'heroicons_outline:refresh', link : '/dashboards/project', useRouter : false diff --git a/src/assets/images/ui/angular-material/scenes/autocomplete.scene.png b/src/assets/images/ui/angular-material/scenes/autocomplete.scene.png new file mode 100644 index 00000000..de997b1f Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/autocomplete.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/badge.scene.png b/src/assets/images/ui/angular-material/scenes/badge.scene.png new file mode 100644 index 00000000..e9a79dbe Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/badge.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/bottom-sheet.scene.png b/src/assets/images/ui/angular-material/scenes/bottom-sheet.scene.png new file mode 100644 index 00000000..f23e8644 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/bottom-sheet.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/button-toggle.scene.png b/src/assets/images/ui/angular-material/scenes/button-toggle.scene.png new file mode 100644 index 00000000..5a227fda Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/button-toggle.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/button.scene.png b/src/assets/images/ui/angular-material/scenes/button.scene.png new file mode 100644 index 00000000..74448b3d Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/button.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/card.scene.png b/src/assets/images/ui/angular-material/scenes/card.scene.png new file mode 100644 index 00000000..4f6cac99 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/card.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/checkbox.scene.png b/src/assets/images/ui/angular-material/scenes/checkbox.scene.png new file mode 100644 index 00000000..7b0327a7 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/checkbox.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/chips.scene.png b/src/assets/images/ui/angular-material/scenes/chips.scene.png new file mode 100644 index 00000000..40f6085b Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/chips.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/core.scene.png b/src/assets/images/ui/angular-material/scenes/core.scene.png new file mode 100644 index 00000000..9f70df7d Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/core.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/datepicker.scene.png b/src/assets/images/ui/angular-material/scenes/datepicker.scene.png new file mode 100644 index 00000000..8bfbd872 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/datepicker.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/dialog.scene.png b/src/assets/images/ui/angular-material/scenes/dialog.scene.png new file mode 100644 index 00000000..ff3c3528 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/dialog.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/divider.scene.png b/src/assets/images/ui/angular-material/scenes/divider.scene.png new file mode 100644 index 00000000..ac7749fb Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/divider.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/expansion.scene.png b/src/assets/images/ui/angular-material/scenes/expansion.scene.png new file mode 100644 index 00000000..c95ce30f Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/expansion.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/form-field.scene.png b/src/assets/images/ui/angular-material/scenes/form-field.scene.png new file mode 100644 index 00000000..868454db Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/form-field.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/grid-list.scene.png b/src/assets/images/ui/angular-material/scenes/grid-list.scene.png new file mode 100644 index 00000000..236fe74d Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/grid-list.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/icon.scene.png b/src/assets/images/ui/angular-material/scenes/icon.scene.png new file mode 100644 index 00000000..0e94810d Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/icon.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/input.scene.png b/src/assets/images/ui/angular-material/scenes/input.scene.png new file mode 100644 index 00000000..653478fa Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/input.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/list.scene.png b/src/assets/images/ui/angular-material/scenes/list.scene.png new file mode 100644 index 00000000..575c4fc4 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/list.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/menu.scene.png b/src/assets/images/ui/angular-material/scenes/menu.scene.png new file mode 100644 index 00000000..e9ec270d Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/menu.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/paginator.scene.png b/src/assets/images/ui/angular-material/scenes/paginator.scene.png new file mode 100644 index 00000000..8c393575 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/paginator.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/progress-bar.scene.png b/src/assets/images/ui/angular-material/scenes/progress-bar.scene.png new file mode 100644 index 00000000..296e9dce Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/progress-bar.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/progress-spinner.scene.png b/src/assets/images/ui/angular-material/scenes/progress-spinner.scene.png new file mode 100644 index 00000000..869917c6 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/progress-spinner.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/radio.scene.png b/src/assets/images/ui/angular-material/scenes/radio.scene.png new file mode 100644 index 00000000..ecac3b10 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/radio.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/ripple.scene.png b/src/assets/images/ui/angular-material/scenes/ripple.scene.png new file mode 100644 index 00000000..9d9c93dd Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/ripple.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/select.scene.png b/src/assets/images/ui/angular-material/scenes/select.scene.png new file mode 100644 index 00000000..90b44cc1 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/select.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/sidenav.scene.png b/src/assets/images/ui/angular-material/scenes/sidenav.scene.png new file mode 100644 index 00000000..18ceeac0 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/sidenav.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/slide-toggle.scene.png b/src/assets/images/ui/angular-material/scenes/slide-toggle.scene.png new file mode 100644 index 00000000..15ea8313 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/slide-toggle.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/slider.scene.png b/src/assets/images/ui/angular-material/scenes/slider.scene.png new file mode 100644 index 00000000..8bae38c2 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/slider.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/snack-bar.scene.png b/src/assets/images/ui/angular-material/scenes/snack-bar.scene.png new file mode 100644 index 00000000..d327b5d0 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/snack-bar.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/sort.scene.png b/src/assets/images/ui/angular-material/scenes/sort.scene.png new file mode 100644 index 00000000..8055fe0a Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/sort.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/stepper.scene.png b/src/assets/images/ui/angular-material/scenes/stepper.scene.png new file mode 100644 index 00000000..031aadea Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/stepper.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/table.scene.png b/src/assets/images/ui/angular-material/scenes/table.scene.png new file mode 100644 index 00000000..749a16ae Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/table.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/tabs.scene.png b/src/assets/images/ui/angular-material/scenes/tabs.scene.png new file mode 100644 index 00000000..22d9d20a Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/tabs.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/toolbar.scene.png b/src/assets/images/ui/angular-material/scenes/toolbar.scene.png new file mode 100644 index 00000000..1cf42685 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/toolbar.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/tooltip.scene.png b/src/assets/images/ui/angular-material/scenes/tooltip.scene.png new file mode 100644 index 00000000..6d032805 Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/tooltip.scene.png differ diff --git a/src/assets/images/ui/angular-material/scenes/tree.scene.png b/src/assets/images/ui/angular-material/scenes/tree.scene.png new file mode 100644 index 00000000..d8aec40a Binary files /dev/null and b/src/assets/images/ui/angular-material/scenes/tree.scene.png differ