diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c1394600..87746798 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,7 +5,6 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterModule, Routes } from '@angular/router'; import { MatMomentDateModule } from '@angular/material-moment-adapter'; import { MatButtonModule, MatIconModule } from '@angular/material'; -import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; import { TranslateModule } from '@ngx-translate/core'; import 'hammerjs'; @@ -15,35 +14,14 @@ import { FuseSidebarModule, FuseThemeOptionsModule } from '@fuse/components'; import { fuseConfig } from 'app/fuse-config'; -import { FakeDbService } from 'app/fake-db/fake-db.service'; import { AppComponent } from 'app/app.component'; -import { AppStoreModule } from 'app/store/store.module'; import { LayoutModule } from 'app/layout/layout.module'; +import { SampleModule } from 'app/main/sample/sample.module'; const appRoutes: Routes = [ - { - path : 'apps', - loadChildren: './main/apps/apps.module#AppsModule' - }, - { - path : 'pages', - loadChildren: './main/pages/pages.module#PagesModule' - }, - { - path : 'ui', - loadChildren: './main/ui/ui.module#UIModule' - }, - { - path : 'documentation', - loadChildren: './main/documentation/documentation.module#DocumentationModule' - }, - { - path : 'angular-material-elements', - loadChildren: './main/angular-material-elements/angular-material-elements.module#AngularMaterialElementsModule' - }, { path : '**', - redirectTo: 'apps/dashboards/analytics' + redirectTo: 'sample' } ]; @@ -58,10 +36,6 @@ const appRoutes: Routes = [ RouterModule.forRoot(appRoutes), TranslateModule.forRoot(), - InMemoryWebApiModule.forRoot(FakeDbService, { - delay : 0, - passThruUnknownUrl: true - }), // Material moment date module MatMomentDateModule, @@ -78,7 +52,7 @@ const appRoutes: Routes = [ // App modules LayoutModule, - AppStoreModule + SampleModule ], bootstrap : [ AppComponent diff --git a/src/app/layout/components/quick-panel/quick-panel.component.ts b/src/app/layout/components/quick-panel/quick-panel.component.ts index ba235aa4..dcd2d918 100644 --- a/src/app/layout/components/quick-panel/quick-panel.component.ts +++ b/src/app/layout/components/quick-panel/quick-panel.component.ts @@ -1,7 +1,4 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { Component, ViewEncapsulation } from '@angular/core'; @Component({ selector : 'quick-panel', @@ -9,24 +6,17 @@ import { takeUntil } from 'rxjs/operators'; styleUrls : ['./quick-panel.component.scss'], encapsulation: ViewEncapsulation.None }) -export class QuickPanelComponent implements OnInit, OnDestroy +export class QuickPanelComponent { date: Date; events: any[]; notes: any[]; settings: any; - // Private - private _unsubscribeAll: Subject; - /** * Constructor - * - * @param {HttpClient} _httpClient */ - constructor( - private _httpClient: HttpClient - ) + constructor() { // Set the defaults this.date = new Date(); @@ -35,42 +25,5 @@ export class QuickPanelComponent implements OnInit, OnDestroy cloud : false, retro : true }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to the events - this._httpClient.get('api/quick-panel-events') - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((response: any) => { - this.events = response; - }); - - // Subscribe to the notes - this._httpClient.get('api/quick-panel-notes') - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((response: any) => { - this.notes = response; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); } } diff --git a/src/app/main/angular-material-elements/angular-material-elements.component.ts b/src/app/main/angular-material-elements/angular-material-elements.component.ts deleted file mode 100644 index 2db4f309..00000000 --- a/src/app/main/angular-material-elements/angular-material-elements.component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { COMPONENT_MAP } from 'app/main/angular-material-elements/example-components'; - -@Component({ - selector : 'angular-material', - templateUrl: './angular-material-elements.component.html', - styleUrls : ['./angular-material-elements.component.scss'] -}) -export class AngularMaterialElementsComponent implements OnInit, OnDestroy -{ - id: string; - title: string; - examples: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - */ - constructor( - private _activatedRoute: ActivatedRoute - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - /** - * On init - */ - ngOnInit(): void - { - this._activatedRoute.params - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(params => { - this.id = params['id']; - const _title = this.id.replace('-', ' '); - this.title = _title.charAt(0).toUpperCase() + _title.substring(1); - this.examples = COMPONENT_MAP[this.id]; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} - diff --git a/src/app/main/angular-material-elements/angular-material-elements.module.ts b/src/app/main/angular-material-elements/angular-material-elements.module.ts deleted file mode 100644 index d4ac41b4..00000000 --- a/src/app/main/angular-material-elements/angular-material-elements.module.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseHighlightModule } from '@fuse/components/index'; -import { FuseWidgetModule } from '@fuse/components/widget/widget.module'; - -import { MaterialModule } from 'app/main/angular-material-elements/material.module'; -import { EXAMPLE_LIST } from 'app/main/angular-material-elements/example-components'; -import { AngularMaterialElementsComponent } from 'app/main/angular-material-elements/angular-material-elements.component'; -import { ExampleViewerComponent } from 'app/main/angular-material-elements/example-viewer/example-viewer'; - -const routes: Routes = [ - { - path : '', - children: [ - { - path : ':id', - component: AngularMaterialElementsComponent - } - ] - } -]; - -@NgModule({ - declarations : [ - [...EXAMPLE_LIST], - AngularMaterialElementsComponent, - ExampleViewerComponent - ], - imports : [ - RouterModule.forChild(routes), - - MaterialModule, - - FuseSharedModule, - FuseHighlightModule, - FuseWidgetModule - ], - entryComponents: EXAMPLE_LIST, -}) -export class AngularMaterialElementsModule -{ -} - diff --git a/src/app/main/angular-material-elements/example-viewer/example-viewer.ts b/src/app/main/angular-material-elements/example-viewer/example-viewer.ts deleted file mode 100644 index 1f76b447..00000000 --- a/src/app/main/angular-material-elements/example-viewer/example-viewer.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { AfterViewInit, Component, ComponentFactoryResolver, ComponentRef, Input, OnDestroy, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core'; -import { MatSnackBar } from '@angular/material'; -import 'prismjs/components/prism-scss'; -import 'prismjs/components/prism-typescript'; - -import { fuseAnimations } from '@fuse/animations/index'; -import { FuseCopierService } from '@fuse/services/copier.service'; - -import { EXAMPLE_COMPONENTS } from 'app/main/angular-material-elements/example-components'; - -export interface LiveExample -{ - title: string; - component: any; - additionalFiles?: string[]; - selectorName?: string; -} - -@Component({ - selector : 'example-viewer', - templateUrl : './example-viewer.html', - styleUrls : ['./example-viewer.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class ExampleViewerComponent implements AfterViewInit, OnDestroy -{ - _example: string; - exampleData: LiveExample; - showSource: boolean; - previewRef: ComponentRef; - selectedIndex: number; - - @ViewChild('previewContainer', {read: ViewContainerRef}) - private _previewContainer: ViewContainerRef; - - /** - * Constructor - * - * @param {MatSnackBar} _matSnackBar - * @param {FuseCopierService} _fuseCopierService - * @param {ComponentFactoryResolver} _componentFactoryResolver - */ - constructor( - private _matSnackBar: MatSnackBar, - private _fuseCopierService: FuseCopierService, - private _componentFactoryResolver: ComponentFactoryResolver - ) - { - // Set the defaults - this.selectedIndex = 0; - this.showSource = false; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Accessors - // ----------------------------------------------------------------------------------------------------- - - /** - * Container - * - * @param {ViewContainerRef} value - */ - set container(value: ViewContainerRef) - { - this._previewContainer = value; - } - - get container(): ViewContainerRef - { - return this._previewContainer; - } - - /** - * Example - * - * @param {string} example - */ - @Input() - set example(example: string) - { - if ( example && EXAMPLE_COMPONENTS[example] ) - { - this._example = example; - this.exampleData = EXAMPLE_COMPONENTS[example]; - } - else - { - console.log('MISSING EXAMPLE: ', example); - } - } - - get example(): string - { - return this._example; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * After view init - */ - ngAfterViewInit(): void - { - setTimeout(() => { - const cmpFactory = this._componentFactoryResolver.resolveComponentFactory(this.exampleData.component); - this.previewRef = this._previewContainer.createComponent(cmpFactory); - }, 0); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - if ( this.previewRef ) - { - this.previewRef.destroy(); - } - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle source view - */ - toggleSourceView(): void - { - this.showSource = !this.showSource; - } - - /** - * Copy the source - * - * @param {string} text - */ - copySource(text: string): void - { - if ( this._fuseCopierService.copyText(text) ) - { - this._matSnackBar.open('Code copied', '', {duration: 2500}); - } - else - { - this._matSnackBar.open('Copy failed. Please try again!', '', {duration: 2500}); - } - } -} diff --git a/src/app/main/apps/academy/course/course.component.html b/src/app/main/apps/academy/course/course.component.html deleted file mode 100644 index dcde06c5..00000000 --- a/src/app/main/apps/academy/course/course.component.html +++ /dev/null @@ -1,97 +0,0 @@ - diff --git a/src/app/main/apps/academy/course/course.component.ts b/src/app/main/apps/academy/course/course.component.ts deleted file mode 100644 index c9d4af8f..00000000 --- a/src/app/main/apps/academy/course/course.component.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChildren, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -import { AcademyCourseService } from 'app/main/apps/academy/course.service'; - -@Component({ - selector : 'academy-course', - templateUrl : './course.component.html', - styleUrls : ['./course.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class AcademyCourseComponent implements OnInit, OnDestroy, AfterViewInit -{ - animationDirection: 'left' | 'right' | 'none'; - course: any; - courseStepContent: any; - currentStep: number; - - @ViewChildren(FusePerfectScrollbarDirective) - fuseScrollbarDirectives: QueryList; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {AcademyCourseService} _academyCourseService - * @param {ChangeDetectorRef} _changeDetectorRef - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _academyCourseService: AcademyCourseService, - private _changeDetectorRef: ChangeDetectorRef, - private _fuseSidebarService: FuseSidebarService - ) - { - // Set the defaults - this.animationDirection = 'none'; - this.currentStep = 0; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to courses - this._academyCourseService.onCourseChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(course => { - this.course = course; - }); - } - - /** - * After view init - */ - ngAfterViewInit(): void - { - this.courseStepContent = this.fuseScrollbarDirectives.find((fuseScrollbarDirective) => { - return fuseScrollbarDirective.elementRef.nativeElement.id === 'course-step-content'; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Go to step - * - * @param step - */ - gotoStep(step): void - { - // Decide the animation direction - this.animationDirection = this.currentStep < step ? 'left' : 'right'; - - // Run change detection so the change - // in the animation direction registered - this._changeDetectorRef.detectChanges(); - - // Set the current step - this.currentStep = step; - } - - /** - * Go to next step - */ - gotoNextStep(): void - { - if ( this.currentStep === this.course.totalSteps - 1 ) - { - return; - } - - // Set the animation direction - this.animationDirection = 'left'; - - // Run change detection so the change - // in the animation direction registered - this._changeDetectorRef.detectChanges(); - - // Increase the current step - this.currentStep++; - } - - /** - * Go to previous step - */ - gotoPreviousStep(): void - { - if ( this.currentStep === 0 ) - { - return; - } - - // Set the animation direction - this.animationDirection = 'right'; - - // Run change detection so the change - // in the animation direction registered - this._changeDetectorRef.detectChanges(); - - // Decrease the current step - this.currentStep--; - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/apps/academy/courses/courses.component.ts b/src/app/main/apps/academy/courses/courses.component.ts deleted file mode 100644 index defd378d..00000000 --- a/src/app/main/apps/academy/courses/courses.component.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { AcademyCoursesService } from 'app/main/apps/academy/courses.service'; - -@Component({ - selector : 'academy-courses', - templateUrl: './courses.component.html', - styleUrls : ['./courses.component.scss'], - animations : fuseAnimations -}) -export class AcademyCoursesComponent implements OnInit, OnDestroy -{ - categories: any[]; - courses: any[]; - coursesFilteredByCategory: any[]; - filteredCourses: any[]; - currentCategory: string; - searchTerm: string; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {AcademyCoursesService} _academyCoursesService - */ - constructor( - private _academyCoursesService: AcademyCoursesService - ) - { - // Set the defaults - this.currentCategory = 'all'; - this.searchTerm = ''; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to categories - this._academyCoursesService.onCategoriesChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(categories => { - this.categories = categories; - }); - - // Subscribe to courses - this._academyCoursesService.onCoursesChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(courses => { - this.filteredCourses = this.coursesFilteredByCategory = this.courses = courses; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Filter courses by category - */ - filterCoursesByCategory(): void - { - // Filter - if ( this.currentCategory === 'all' ) - { - this.coursesFilteredByCategory = this.courses; - this.filteredCourses = this.courses; - } - else - { - this.coursesFilteredByCategory = this.courses.filter((course) => { - return course.category === this.currentCategory; - }); - - this.filteredCourses = [...this.coursesFilteredByCategory]; - - } - - // Re-filter by search term - this.filterCoursesByTerm(); - } - - /** - * Filter courses by term - */ - filterCoursesByTerm(): void - { - const searchTerm = this.searchTerm.toLowerCase(); - - // Search - if ( searchTerm === '' ) - { - this.filteredCourses = this.coursesFilteredByCategory; - } - else - { - this.filteredCourses = this.coursesFilteredByCategory.filter((course) => { - return course.title.toLowerCase().includes(searchTerm); - }); - } - } -} diff --git a/src/app/main/apps/apps.module.ts b/src/app/main/apps/apps.module.ts deleted file mode 100644 index 37e4ea28..00000000 --- a/src/app/main/apps/apps.module.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { FuseSharedModule } from '@fuse/shared.module'; - -const routes = [ - { - path : 'dashboards/analytics', - loadChildren: './dashboards/analytics/analytics.module#AnalyticsDashboardModule' - }, - { - path : 'dashboards/project', - loadChildren: './dashboards/project/project.module#ProjectDashboardModule' - }, - { - path : 'mail', - loadChildren: './mail/mail.module#MailModule' - }, - { - path : 'mail-ngrx', - loadChildren: './mail-ngrx/mail.module#MailNgrxModule' - }, - { - path : 'chat', - loadChildren: './chat/chat.module#ChatModule' - }, - { - path : 'calendar', - loadChildren: './calendar/calendar.module#CalendarModule' - }, - { - path : 'e-commerce', - loadChildren: './e-commerce/e-commerce.module#EcommerceModule' - }, - { - path : 'academy', - loadChildren: './academy/academy.module#AcademyModule' - }, - { - path : 'todo', - loadChildren: './todo/todo.module#TodoModule' - }, - { - path : 'file-manager', - loadChildren: './file-manager/file-manager.module#FileManagerModule' - }, - { - path : 'contacts', - loadChildren: './contacts/contacts.module#ContactsModule' - }, - { - path : 'scrumboard', - loadChildren: './scrumboard/scrumboard.module#ScrumboardModule' - } -]; - -@NgModule({ - imports : [ - RouterModule.forChild(routes), - FuseSharedModule - ] -}) -export class AppsModule -{ -} diff --git a/src/app/main/apps/chat/chat-start/chat-start.component.html b/src/app/main/apps/chat/chat-start/chat-start.component.html deleted file mode 100644 index 9415f0c2..00000000 --- a/src/app/main/apps/chat/chat-start/chat-start.component.html +++ /dev/null @@ -1,20 +0,0 @@ -
- - - - Chat App - - - Select contact to start the chat!.. - - - - -
diff --git a/src/app/main/apps/chat/chat-view/chat-view.component.ts b/src/app/main/apps/chat/chat-view/chat-view.component.ts deleted file mode 100644 index 4f40e8fe..00000000 --- a/src/app/main/apps/chat/chat-view/chat-view.component.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild, ViewChildren } from '@angular/core'; -import { NgForm } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-view', - templateUrl: './chat-view.component.html', - styleUrls : ['./chat-view.component.scss'] -}) -export class ChatViewComponent implements OnInit, OnDestroy, AfterViewInit -{ - user: any; - chat: any; - dialog: any; - contact: any; - replyInput: any; - selectedChat: any; - - @ViewChild(FusePerfectScrollbarDirective) - directiveScroll: FusePerfectScrollbarDirective; - - @ViewChildren('replyInput') - replyInputField; - - @ViewChild('replyForm') - replyForm: NgForm; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - */ - constructor( - private _chatService: ChatService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.user = this._chatService.user; - this._chatService.onChatSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(chatData => { - if ( chatData ) - { - this.selectedChat = chatData; - this.contact = chatData.contact; - this.dialog = chatData.dialog; - this.readyToReply(); - } - }); - } - - /** - * After view init - */ - ngAfterViewInit(): void - { - this.replyInput = this.replyInputField.first.nativeElement; - this.readyToReply(); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Select contact - */ - selectContact(): void - { - this._chatService.selectContact(this.contact); - } - - /** - * Ready to reply - */ - readyToReply(): void - { - setTimeout(() => { - this.replyForm.reset(); - this.focusReplyInput(); - this.scrollToBottom(); - }); - - } - - /** - * Focus to the reply input - */ - focusReplyInput(): void - { - setTimeout(() => { - this.replyInput.focus(); - }); - } - - /** - * Scroll to the bottom - * - * @param {number} speed - */ - scrollToBottom(speed?: number): void - { - speed = speed || 400; - if ( this.directiveScroll ) - { - this.directiveScroll.update(); - - setTimeout(() => { - this.directiveScroll.scrollToBottom(0, speed); - }); - } - } - - /** - * Reply - */ - reply(): void - { - // Message - const message = { - who : this.user.id, - message: this.replyForm.form.value.message, - time : new Date().toISOString() - }; - - // Add the message to the chat - this.dialog.push(message); - - // Update the server - this._chatService.updateDialog(this.selectedChat.chatId, this.dialog).then(response => { - this.readyToReply(); - }); - } -} diff --git a/src/app/main/apps/chat/chat.component.ts b/src/app/main/apps/chat/chat.component.ts deleted file mode 100644 index fba6d3cb..00000000 --- a/src/app/main/apps/chat/chat.component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat', - templateUrl : './chat.component.html', - styleUrls : ['./chat.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class ChatComponent implements OnInit, OnDestroy -{ - selectedChat: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - */ - constructor( - private _chatService: ChatService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._chatService.onChatSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(chatData => { - this.selectedChat = chatData; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/apps/chat/chat.module.ts b/src/app/main/apps/chat/chat.module.ts deleted file mode 100644 index a54b46e5..00000000 --- a/src/app/main/apps/chat/chat.module.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { MatButtonModule, MatCardModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatRadioModule, MatSidenavModule, MatToolbarModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; -import { ChatComponent } from 'app/main/apps/chat/chat.component'; -import { ChatStartComponent } from 'app/main/apps/chat/chat-start/chat-start.component'; -import { ChatViewComponent } from 'app/main/apps/chat/chat-view/chat-view.component'; -import { ChatChatsSidenavComponent } from 'app/main/apps/chat/sidenavs/left/chats/chats.component'; -import { ChatUserSidenavComponent } from 'app/main/apps/chat/sidenavs/left/user/user.component'; -import { ChatLeftSidenavComponent } from 'app/main/apps/chat/sidenavs/left/left.component'; -import { ChatRightSidenavComponent } from 'app/main/apps/chat/sidenavs/right/right.component'; -import { ChatContactSidenavComponent } from 'app/main/apps/chat/sidenavs/right/contact/contact.component'; - -const routes: Routes = [ - { - path : '**', - component: ChatComponent, - children : [], - resolve : { - chat: ChatService - } - } -]; - -@NgModule({ - declarations: [ - ChatComponent, - ChatViewComponent, - ChatStartComponent, - ChatChatsSidenavComponent, - ChatUserSidenavComponent, - ChatLeftSidenavComponent, - ChatRightSidenavComponent, - ChatContactSidenavComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatCardModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatMenuModule, - MatRadioModule, - MatSidenavModule, - MatToolbarModule, - - FuseSharedModule - ], - providers : [ - ChatService - ] -}) -export class ChatModule -{ -} diff --git a/src/app/main/apps/chat/sidenavs/left/chats/chats.component.ts b/src/app/main/apps/chat/sidenavs/left/chats/chats.component.ts deleted file mode 100644 index 98a8c3a6..00000000 --- a/src/app/main/apps/chat/sidenavs/left/chats/chats.component.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { ObservableMedia } from '@angular/flex-layout'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseMatSidenavHelperService } from '@fuse/directives/fuse-mat-sidenav/fuse-mat-sidenav.service'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-chats-sidenav', - templateUrl: './chats.component.html', - styleUrls : ['./chats.component.scss'], - animations : fuseAnimations -}) -export class ChatChatsSidenavComponent implements OnInit, OnDestroy -{ - chats: any[]; - chatSearch: any; - contacts: any[]; - searchText: string; - user: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - * @param {FuseMatSidenavHelperService} _fuseMatSidenavHelperService - * @param {ObservableMedia} _observableMedia - */ - constructor( - private _chatService: ChatService, - private _fuseMatSidenavHelperService: FuseMatSidenavHelperService, - public _observableMedia: ObservableMedia - ) - { - // Set the defaults - this.chatSearch = { - name: '' - }; - this.searchText = ''; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.user = this._chatService.user; - this.chats = this._chatService.chats; - this.contacts = this._chatService.contacts; - - this._chatService.onChatsUpdated - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(updatedChats => { - this.chats = updatedChats; - }); - - this._chatService.onUserUpdated - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(updatedUser => { - this.user = updatedUser; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Get chat - * - * @param contact - */ - getChat(contact): void - { - this._chatService.getChat(contact); - - if ( !this._observableMedia.isActive('gt-md') ) - { - this._fuseMatSidenavHelperService.getSidenav('chat-left-sidenav').toggle(); - } - } - - /** - * Set user status - * - * @param status - */ - setUserStatus(status): void - { - this._chatService.setUserStatus(status); - } - - /** - * Change left sidenav view - * - * @param view - */ - changeLeftSidenavView(view): void - { - this._chatService.onLeftSidenavViewChanged.next(view); - } - - /** - * Logout - */ - logout(): void - { - console.log('logout triggered'); - } -} diff --git a/src/app/main/apps/chat/sidenavs/left/left.component.html b/src/app/main/apps/chat/sidenavs/left/left.component.html deleted file mode 100644 index 5fdf0436..00000000 --- a/src/app/main/apps/chat/sidenavs/left/left.component.html +++ /dev/null @@ -1,12 +0,0 @@ -
- - - - - -
diff --git a/src/app/main/apps/chat/sidenavs/left/left.component.ts b/src/app/main/apps/chat/sidenavs/left/left.component.ts deleted file mode 100644 index a3f988a3..00000000 --- a/src/app/main/apps/chat/sidenavs/left/left.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-left-sidenav', - templateUrl: './left.component.html', - styleUrls : ['./left.component.scss'], - animations : fuseAnimations -}) -export class ChatLeftSidenavComponent implements OnInit, OnDestroy -{ - view: string; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - */ - constructor( - private _chatService: ChatService - ) - { - // Set the defaults - this.view = 'chats'; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._chatService.onLeftSidenavViewChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(view => { - this.view = view; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/apps/chat/sidenavs/left/user/user.component.ts b/src/app/main/apps/chat/sidenavs/left/user/user.component.ts deleted file mode 100644 index 8cbf54e1..00000000 --- a/src/app/main/apps/chat/sidenavs/left/user/user.component.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-user-sidenav', - templateUrl: './user.component.html', - styleUrls : ['./user.component.scss'] -}) -export class ChatUserSidenavComponent implements OnInit, OnDestroy -{ - user: any; - userForm: FormGroup; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - */ - constructor( - private _chatService: ChatService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.user = this._chatService.user; - - this.userForm = new FormGroup({ - mood : new FormControl(this.user.mood), - status: new FormControl(this.user.status) - }); - - this.userForm.valueChanges - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(500), - distinctUntilChanged() - ) - .subscribe(data => { - this.user.mood = data.mood; - this.user.status = data.status; - this._chatService.updateUserData(this.user); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Change left sidenav view - * - * @param view - */ - changeLeftSidenavView(view): void - { - this._chatService.onLeftSidenavViewChanged.next(view); - } - -} diff --git a/src/app/main/apps/chat/sidenavs/right/contact/contact.component.ts b/src/app/main/apps/chat/sidenavs/right/contact/contact.component.ts deleted file mode 100644 index 85f25438..00000000 --- a/src/app/main/apps/chat/sidenavs/right/contact/contact.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-contact-sidenav', - templateUrl: './contact.component.html', - styleUrls : ['./contact.component.scss'] -}) -export class ChatContactSidenavComponent implements OnInit, OnDestroy -{ - contact: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ChatService} _chatService - */ - constructor( - private _chatService: ChatService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._chatService.onContactSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(contact => { - this.contact = contact; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/apps/chat/sidenavs/right/right.component.html b/src/app/main/apps/chat/sidenavs/right/right.component.html deleted file mode 100644 index e6817050..00000000 --- a/src/app/main/apps/chat/sidenavs/right/right.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
- - - - -
diff --git a/src/app/main/apps/chat/sidenavs/right/right.component.ts b/src/app/main/apps/chat/sidenavs/right/right.component.ts deleted file mode 100644 index cb08c0c6..00000000 --- a/src/app/main/apps/chat/sidenavs/right/right.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ChatService } from 'app/main/apps/chat/chat.service'; - -@Component({ - selector : 'chat-right-sidenav', - templateUrl: './right.component.html', - styleUrls : ['./right.component.scss'], - animations : fuseAnimations -}) -export class ChatRightSidenavComponent implements OnInit, OnDestroy -{ - view: string; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _chatService: ChatService - ) - { - // Set the defaults - this.view = 'contact'; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._chatService.onRightSidenavViewChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(view => { - this.view = view; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - -} diff --git a/src/app/main/apps/contacts/contact-list/contact-list.component.ts b/src/app/main/apps/contacts/contact-list/contact-list.component.ts deleted file mode 100644 index 2443be7a..00000000 --- a/src/app/main/apps/contacts/contact-list/contact-list.component.ts +++ /dev/null @@ -1,242 +0,0 @@ -import { Component, OnDestroy, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { MatDialog, MatDialogRef } from '@angular/material'; -import { DataSource } from '@angular/cdk/collections'; -import { Observable, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; - -import { ContactsService } from 'app/main/apps/contacts/contacts.service'; -import { ContactsContactFormDialogComponent } from 'app/main/apps/contacts/contact-form/contact-form.component'; - -@Component({ - selector : 'contacts-contact-list', - templateUrl : './contact-list.component.html', - styleUrls : ['./contact-list.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class ContactsContactListComponent implements OnInit, OnDestroy -{ - @ViewChild('dialogContent') - dialogContent: TemplateRef; - - contacts: any; - user: any; - dataSource: FilesDataSource | null; - displayedColumns = ['checkbox', 'avatar', 'name', 'email', 'phone', 'jobTitle', 'buttons']; - selectedContacts: any[]; - checkboxes: {}; - dialogRef: any; - confirmDialogRef: MatDialogRef; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ContactsService} _contactsService - * @param {MatDialog} _matDialog - */ - constructor( - private _contactsService: ContactsService, - public _matDialog: MatDialog - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.dataSource = new FilesDataSource(this._contactsService); - - this._contactsService.onContactsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(contacts => { - this.contacts = contacts; - - this.checkboxes = {}; - contacts.map(contact => { - this.checkboxes[contact.id] = false; - }); - }); - - this._contactsService.onSelectedContactsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedContacts => { - for ( const id in this.checkboxes ) - { - if ( !this.checkboxes.hasOwnProperty(id) ) - { - continue; - } - - this.checkboxes[id] = selectedContacts.includes(id); - } - this.selectedContacts = selectedContacts; - }); - - this._contactsService.onUserDataChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(user => { - this.user = user; - }); - - this._contactsService.onFilterChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this._contactsService.deselectContacts(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Edit contact - * - * @param contact - */ - editContact(contact): void - { - this.dialogRef = this._matDialog.open(ContactsContactFormDialogComponent, { - panelClass: 'contact-form-dialog', - data : { - contact: contact, - action : 'edit' - } - }); - - this.dialogRef.afterClosed() - .subscribe(response => { - if ( !response ) - { - return; - } - const actionType: string = response[0]; - const formData: FormGroup = response[1]; - switch ( actionType ) - { - /** - * Save - */ - case 'save': - - this._contactsService.updateContact(formData.getRawValue()); - - break; - /** - * Delete - */ - case 'delete': - - this.deleteContact(contact); - - break; - } - }); - } - - /** - * Delete Contact - */ - deleteContact(contact): void - { - this.confirmDialogRef = this._matDialog.open(FuseConfirmDialogComponent, { - disableClose: false - }); - - this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete?'; - - this.confirmDialogRef.afterClosed().subscribe(result => { - if ( result ) - { - this._contactsService.deleteContact(contact); - } - this.confirmDialogRef = null; - }); - - } - - /** - * On selected change - * - * @param contactId - */ - onSelectedChange(contactId): void - { - this._contactsService.toggleSelectedContact(contactId); - } - - /** - * Toggle star - * - * @param contactId - */ - toggleStar(contactId): void - { - if ( this.user.starred.includes(contactId) ) - { - this.user.starred.splice(this.user.starred.indexOf(contactId), 1); - } - else - { - this.user.starred.push(contactId); - } - - this._contactsService.updateUserData(this.user); - } -} - -export class FilesDataSource extends DataSource -{ - /** - * Constructor - * - * @param {ContactsService} _contactsService - */ - constructor( - private _contactsService: ContactsService - ) - { - super(); - } - - /** - * Connect function called by the table to retrieve one stream containing the data to render. - * @returns {Observable} - */ - connect(): Observable - { - return this._contactsService.onContactsChanged; - } - - /** - * Disconnect - */ - disconnect(): void - { - } -} diff --git a/src/app/main/apps/contacts/contacts.component.scss b/src/app/main/apps/contacts/contacts.component.scss deleted file mode 100644 index cb752a8d..00000000 --- a/src/app/main/apps/contacts/contacts.component.scss +++ /dev/null @@ -1,13 +0,0 @@ -#contacts { - - .content { - overflow: hidden; - - .sidebar { - - &:not(.locked-open) { - background: white; - } - } - } -} \ No newline at end of file diff --git a/src/app/main/apps/contacts/contacts.component.ts b/src/app/main/apps/contacts/contacts.component.ts deleted file mode 100644 index 9315110d..00000000 --- a/src/app/main/apps/contacts/contacts.component.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { FormControl, FormGroup } from '@angular/forms'; -import { MatDialog } from '@angular/material'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -import { ContactsService } from 'app/main/apps/contacts/contacts.service'; -import { ContactsContactFormDialogComponent } from 'app/main/apps/contacts/contact-form/contact-form.component'; - -@Component({ - selector : 'contacts', - templateUrl : './contacts.component.html', - styleUrls : ['./contacts.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class ContactsComponent implements OnInit, OnDestroy -{ - dialogRef: any; - hasSelectedContacts: boolean; - searchInput: FormControl; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ContactsService} _contactsService - * @param {FuseSidebarService} _fuseSidebarService - * @param {MatDialog} _matDialog - */ - constructor( - private _contactsService: ContactsService, - private _fuseSidebarService: FuseSidebarService, - private _matDialog: MatDialog - ) - { - // Set the defaults - this.searchInput = new FormControl(''); - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._contactsService.onSelectedContactsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedContacts => { - this.hasSelectedContacts = selectedContacts.length > 0; - }); - - this.searchInput.valueChanges - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(300), - distinctUntilChanged() - ) - .subscribe(searchText => { - this._contactsService.onSearchTextChanged.next(searchText); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * New contact - */ - newContact(): void - { - this.dialogRef = this._matDialog.open(ContactsContactFormDialogComponent, { - panelClass: 'contact-form-dialog', - data : { - action: 'new' - } - }); - - this.dialogRef.afterClosed() - .subscribe((response: FormGroup) => { - if ( !response ) - { - return; - } - - this._contactsService.updateContact(response.getRawValue()); - }); - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/apps/contacts/contacts.module.ts b/src/app/main/apps/contacts/contacts.module.ts deleted file mode 100644 index 39a71560..00000000 --- a/src/app/main/apps/contacts/contacts.module.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { CdkTableModule } from '@angular/cdk/table'; - -import { MatButtonModule, MatCheckboxModule, MatDatepickerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatTableModule, MatToolbarModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseConfirmDialogModule, FuseSidebarModule } from '@fuse/components'; - -import { ContactsComponent } from 'app/main/apps/contacts/contacts.component'; -import { ContactsService } from 'app/main/apps/contacts/contacts.service'; -import { ContactsContactListComponent } from 'app/main/apps/contacts/contact-list/contact-list.component'; -import { ContactsSelectedBarComponent } from 'app/main/apps/contacts/selected-bar/selected-bar.component'; -import { ContactsMainSidebarComponent } from 'app/main/apps/contacts/sidebars/main/main.component'; -import { ContactsContactFormDialogComponent } from 'app/main/apps/contacts/contact-form/contact-form.component'; - -const routes: Routes = [ - { - path : '**', - component: ContactsComponent, - resolve : { - contacts: ContactsService - } - } -]; - -@NgModule({ - declarations : [ - ContactsComponent, - ContactsContactListComponent, - ContactsSelectedBarComponent, - ContactsMainSidebarComponent, - ContactsContactFormDialogComponent - ], - imports : [ - RouterModule.forChild(routes), - CdkTableModule, - - MatButtonModule, - MatCheckboxModule, - MatDatepickerModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatMenuModule, - MatRippleModule, - MatTableModule, - MatToolbarModule, - - FuseSharedModule, - FuseConfirmDialogModule, - FuseSidebarModule - ], - providers : [ - ContactsService - ], - entryComponents: [ - ContactsContactFormDialogComponent - ] -}) -export class ContactsModule -{ -} diff --git a/src/app/main/apps/contacts/selected-bar/selected-bar.component.ts b/src/app/main/apps/contacts/selected-bar/selected-bar.component.ts deleted file mode 100644 index fa499a69..00000000 --- a/src/app/main/apps/contacts/selected-bar/selected-bar.component.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { MatDialog, MatDialogRef } from '@angular/material'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; - -import { ContactsService } from 'app/main/apps/contacts/contacts.service'; - -@Component({ - selector : 'selected-bar', - templateUrl: './selected-bar.component.html', - styleUrls : ['./selected-bar.component.scss'] -}) -export class ContactsSelectedBarComponent implements OnInit, OnDestroy -{ - confirmDialogRef: MatDialogRef; - hasSelectedContacts: boolean; - isIndeterminate: boolean; - selectedContacts: string[]; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ContactsService} _contactsService - * @param {MatDialog} _matDialog - */ - constructor( - private _contactsService: ContactsService, - public _matDialog: MatDialog - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._contactsService.onSelectedContactsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedContacts => { - this.selectedContacts = selectedContacts; - setTimeout(() => { - this.hasSelectedContacts = selectedContacts.length > 0; - this.isIndeterminate = (selectedContacts.length !== this._contactsService.contacts.length && selectedContacts.length > 0); - }, 0); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Select all - */ - selectAll(): void - { - this._contactsService.selectContacts(); - } - - /** - * Deselect all - */ - deselectAll(): void - { - this._contactsService.deselectContacts(); - } - - /** - * Delete selected contacts - */ - deleteSelectedContacts(): void - { - this.confirmDialogRef = this._matDialog.open(FuseConfirmDialogComponent, { - disableClose: false - }); - - this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete all selected contacts?'; - - this.confirmDialogRef.afterClosed() - .subscribe(result => { - if ( result ) - { - this._contactsService.deleteSelectedContacts(); - } - this.confirmDialogRef = null; - }); - } -} diff --git a/src/app/main/apps/contacts/sidebars/main/main.component.ts b/src/app/main/apps/contacts/sidebars/main/main.component.ts deleted file mode 100644 index d9b69540..00000000 --- a/src/app/main/apps/contacts/sidebars/main/main.component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { ContactsService } from 'app/main/apps/contacts/contacts.service'; - -@Component({ - selector : 'contacts-main-sidebar', - templateUrl: './main.component.html', - styleUrls : ['./main.component.scss'] -}) -export class ContactsMainSidebarComponent implements OnInit, OnDestroy -{ - user: any; - filterBy: string; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ContactsService} _contactsService - */ - constructor( - private _contactsService: ContactsService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.filterBy = this._contactsService.filterBy || 'all'; - - this._contactsService.onUserDataChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(user => { - this.user = user; - }); - } - - /** - * On destroy - */ - ngOnDestroy() - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Change the filter - * - * @param filter - */ - changeFilter(filter): void - { - this.filterBy = filter; - this._contactsService.onFilterChanged.next(this.filterBy); - } -} diff --git a/src/app/main/apps/dashboards/project/project.component.html b/src/app/main/apps/dashboards/project/project.component.html deleted file mode 100644 index 17004ab3..00000000 --- a/src/app/main/apps/dashboards/project/project.component.html +++ /dev/null @@ -1,903 +0,0 @@ - diff --git a/src/app/main/apps/dashboards/project/project.component.scss b/src/app/main/apps/dashboards/project/project.component.scss deleted file mode 100644 index f886160c..00000000 --- a/src/app/main/apps/dashboards/project/project.component.scss +++ /dev/null @@ -1,62 +0,0 @@ -#dashboard-project { - - > .sidebar { - width: 280px; - min-width: 280px; - max-width: 280px; - } - - > .center { - - > .header { - height: 160px; - min-height: 160px; - max-height: 160px; - - .selected-project { - background: rgba(0, 0, 0, 0.12); - color: #FFFFFF; - padding: 8px 16px; - height: 40px; - line-height: 24px; - font-size: 16px; - } - - .project-selector { - margin-left: 1px; - border-radius: 0; - background: rgba(0, 0, 0, 0.12); - - mat-icon { - color: #FFFFFF; - } - } - } - - > .content { - flex: 1; - - mat-tab-group { - height: 100%; - - .mat-tab-body-wrapper { - flex-grow: 1; - } - } - - .mat-tab-label-container { - padding: 0 24px; - } - } - } - - .widget { - - &.widget5 { - - .gridline-path.gridline-path-horizontal { - display: none; - } - } - } -} \ No newline at end of file diff --git a/src/app/main/apps/e-commerce/order/order.component.ts b/src/app/main/apps/e-commerce/order/order.component.ts deleted file mode 100644 index 127598dc..00000000 --- a/src/app/main/apps/e-commerce/order/order.component.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { Subject} from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { orderStatuses } from 'app/main/apps/e-commerce/order/order-statuses'; -import { Order } from 'app/main/apps/e-commerce/order/order.model'; -import { EcommerceOrderService } from 'app/main/apps/e-commerce/order/order.service'; - -@Component({ - selector : 'e-commerce-order', - templateUrl : './order.component.html', - styleUrls : ['./order.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class EcommerceOrderComponent implements OnInit, OnDestroy -{ - order: Order; - orderStatuses: any; - statusForm: FormGroup; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {EcommerceOrderService} _ecommerceOrderService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _ecommerceOrderService: EcommerceOrderService, - private _formBuilder: FormBuilder - ) - { - // Set the defaults - this.order = new Order(); - this.orderStatuses = orderStatuses; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update order on changes - this._ecommerceOrderService.onOrderChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(order => { - this.order = new Order(order); - }); - - this.statusForm = this._formBuilder.group({ - newStatus: [''] - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Update status - */ - updateStatus(): void - { - const newStatusId = Number.parseInt(this.statusForm.get('newStatus').value); - - if ( !newStatusId ) - { - return; - } - - const newStatus = this.orderStatuses.find((status) => { - return status.id === newStatusId; - }); - - newStatus['date'] = new Date().toString(); - - this.order.status.unshift(newStatus); - } -} diff --git a/src/app/main/apps/e-commerce/orders/orders.component.ts b/src/app/main/apps/e-commerce/orders/orders.component.ts deleted file mode 100644 index 5b1582ab..00000000 --- a/src/app/main/apps/e-commerce/orders/orders.component.ts +++ /dev/null @@ -1,242 +0,0 @@ -import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { MatPaginator, MatSort } from '@angular/material'; -import { DataSource } from '@angular/cdk/collections'; -import { merge, Observable, BehaviorSubject, fromEvent, Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseUtils } from '@fuse/utils'; - -import { EcommerceOrdersService } from 'app/main/apps/e-commerce/orders/orders.service'; -import { takeUntil } from 'rxjs/internal/operators'; - -@Component({ - selector : 'e-commerce-orders', - templateUrl: './orders.component.html', - styleUrls : ['./orders.component.scss'], - animations : fuseAnimations -}) -export class EcommerceOrdersComponent implements OnInit, OnDestroy -{ - dataSource: FilesDataSource | null; - displayedColumns = ['id', 'reference', 'customer', 'total', 'payment', 'status', 'date']; - - @ViewChild(MatPaginator) - paginator: MatPaginator; - - @ViewChild('filter') - filter: ElementRef; - - @ViewChild(MatSort) - sort: MatSort; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {EcommerceOrdersService} _ecommerceOrdersService - */ - constructor( - private _ecommerceOrdersService: EcommerceOrdersService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.dataSource = new FilesDataSource(this._ecommerceOrdersService, this.paginator, this.sort); - - fromEvent(this.filter.nativeElement, 'keyup') - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(150), - distinctUntilChanged() - ) - .subscribe(() => { - if ( !this.dataSource ) - { - return; - } - this.dataSource.filter = this.filter.nativeElement.value; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} - -export class FilesDataSource extends DataSource -{ - // Private - private _filterChange = new BehaviorSubject(''); - private _filteredDataChange = new BehaviorSubject(''); - - /** - * Constructor - * - * @param {EcommerceOrdersService} _ecommerceOrdersService - * @param {MatPaginator} _matPaginator - * @param {MatSort} _matSort - */ - constructor( - private _ecommerceOrdersService: EcommerceOrdersService, - private _matPaginator: MatPaginator, - private _matSort: MatSort - ) - { - super(); - - this.filteredData = this._ecommerceOrdersService.orders; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Accessors - // ----------------------------------------------------------------------------------------------------- - - // Filtered data - get filteredData(): any - { - return this._filteredDataChange.value; - } - - set filteredData(value: any) - { - this._filteredDataChange.next(value); - } - - // Filter - get filter(): string - { - return this._filterChange.value; - } - - set filter(filter: string) - { - this._filterChange.next(filter); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Connect function called by the table to retrieve one stream containing the data to render. - * - * @returns {Observable} - */ - connect(): Observable - { - const displayDataChanges = [ - this._ecommerceOrdersService.onOrdersChanged, - this._matPaginator.page, - this._filterChange, - this._matSort.sortChange - ]; - - return merge(...displayDataChanges).pipe(map(() => { - - let data = this._ecommerceOrdersService.orders.slice(); - - data = this.filterData(data); - - this.filteredData = [...data]; - - data = this.sortData(data); - - // Grab the page's slice of data. - const startIndex = this._matPaginator.pageIndex * this._matPaginator.pageSize; - return data.splice(startIndex, this._matPaginator.pageSize); - }) - ); - - } - - /** - * Filter data - * - * @param data - * @returns {any} - */ - filterData(data): any - { - if ( !this.filter ) - { - return data; - } - return FuseUtils.filterArrayByString(data, this.filter); - } - - /** - * Sort data - * - * @param data - * @returns {any[]} - */ - sortData(data): any[] - { - if ( !this._matSort.active || this._matSort.direction === '' ) - { - return data; - } - - return data.sort((a, b) => { - let propertyA: number | string = ''; - let propertyB: number | string = ''; - - switch ( this._matSort.active ) - { - case 'id': - [propertyA, propertyB] = [a.id, b.id]; - break; - case 'reference': - [propertyA, propertyB] = [a.reference, b.reference]; - break; - case 'customer': - [propertyA, propertyB] = [a.customer.firstName, b.customer.firstName]; - break; - case 'total': - [propertyA, propertyB] = [a.total, b.total]; - break; - case 'payment': - [propertyA, propertyB] = [a.payment.method, b.payment.method]; - break; - case 'status': - [propertyA, propertyB] = [a.status[0].name, b.status[0].name]; - break; - case 'date': - [propertyA, propertyB] = [a.date, b.date]; - break; - } - - const valueA = isNaN(+propertyA) ? propertyA : +propertyA; - const valueB = isNaN(+propertyB) ? propertyB : +propertyB; - - return (valueA < valueB ? -1 : 1) * (this._matSort.direction === 'asc' ? 1 : -1); - }); - } - - /** - * Disconnect - */ - disconnect(): void - { - } -} diff --git a/src/app/main/apps/e-commerce/product/product.component.ts b/src/app/main/apps/e-commerce/product/product.component.ts deleted file mode 100644 index 01a9918a..00000000 --- a/src/app/main/apps/e-commerce/product/product.component.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { Location } from '@angular/common'; -import { MatSnackBar } from '@angular/material'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseUtils } from '@fuse/utils'; - -import { Product } from 'app/main/apps/e-commerce/product/product.model'; -import { EcommerceProductService } from 'app/main/apps/e-commerce/product/product.service'; - -@Component({ - selector : 'e-commerce-product', - templateUrl : './product.component.html', - styleUrls : ['./product.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class EcommerceProductComponent implements OnInit, OnDestroy -{ - product: Product; - pageType: string; - productForm: FormGroup; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {EcommerceProductService} _ecommerceProductService - * @param {FormBuilder} _formBuilder - * @param {Location} _location - * @param {MatSnackBar} _matSnackBar - */ - constructor( - private _ecommerceProductService: EcommerceProductService, - private _formBuilder: FormBuilder, - private _location: Location, - private _matSnackBar: MatSnackBar - ) - { - // Set the default - this.product = new Product(); - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update product on changes - this._ecommerceProductService.onProductChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(product => { - - if ( product ) - { - this.product = new Product(product); - this.pageType = 'edit'; - } - else - { - this.pageType = 'new'; - this.product = new Product(); - } - - this.productForm = this.createProductForm(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create product form - * - * @returns {FormGroup} - */ - createProductForm(): FormGroup - { - return this._formBuilder.group({ - id : [this.product.id], - name : [this.product.name], - handle : [this.product.handle], - description : [this.product.description], - categories : [this.product.categories], - tags : [this.product.tags], - images : [this.product.images], - priceTaxExcl : [this.product.priceTaxExcl], - priceTaxIncl : [this.product.priceTaxIncl], - taxRate : [this.product.taxRate], - comparedPrice : [this.product.comparedPrice], - quantity : [this.product.quantity], - sku : [this.product.sku], - width : [this.product.width], - height : [this.product.height], - depth : [this.product.depth], - weight : [this.product.weight], - extraShippingFee: [this.product.extraShippingFee], - active : [this.product.active] - }); - } - - /** - * Save product - */ - saveProduct(): void - { - const data = this.productForm.getRawValue(); - data.handle = FuseUtils.handleize(data.name); - - this._ecommerceProductService.saveProduct(data) - .then(() => { - - // Trigger the subscription with new data - this._ecommerceProductService.onProductChanged.next(data); - - // Show the success message - this._matSnackBar.open('Product saved', 'OK', { - verticalPosition: 'top', - duration : 2000 - }); - }); - } - - /** - * Add product - */ - addProduct(): void - { - const data = this.productForm.getRawValue(); - data.handle = FuseUtils.handleize(data.name); - - this._ecommerceProductService.addProduct(data) - .then(() => { - - // Trigger the subscription with new data - this._ecommerceProductService.onProductChanged.next(data); - - // Show the success message - this._matSnackBar.open('Product added', 'OK', { - verticalPosition: 'top', - duration : 2000 - }); - - // Change the location with new one - this._location.go('apps/e-commerce/products/' + this.product.id + '/' + this.product.handle); - }); - } -} diff --git a/src/app/main/apps/e-commerce/products/products.component.ts b/src/app/main/apps/e-commerce/products/products.component.ts deleted file mode 100644 index 7a3df669..00000000 --- a/src/app/main/apps/e-commerce/products/products.component.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; -import { MatPaginator, MatSort } from '@angular/material'; -import { DataSource } from '@angular/cdk/collections'; -import { merge, Observable, BehaviorSubject, fromEvent, Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, map } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseUtils } from '@fuse/utils'; - -import { EcommerceProductsService } from 'app/main/apps/e-commerce/products/products.service'; -import { takeUntil } from 'rxjs/internal/operators'; - -@Component({ - selector : 'e-commerce-products', - templateUrl: './products.component.html', - styleUrls : ['./products.component.scss'], - animations : fuseAnimations -}) -export class EcommerceProductsComponent implements OnInit -{ - dataSource: FilesDataSource | null; - displayedColumns = ['id', 'image', 'name', 'category', 'price', 'quantity', 'active']; - - @ViewChild(MatPaginator) - paginator: MatPaginator; - - @ViewChild(MatSort) - sort: MatSort; - - @ViewChild('filter') - filter: ElementRef; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _ecommerceProductsService: EcommerceProductsService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.dataSource = new FilesDataSource(this._ecommerceProductsService, this.paginator, this.sort); - - fromEvent(this.filter.nativeElement, 'keyup') - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(150), - distinctUntilChanged() - ) - .subscribe(() => { - if ( !this.dataSource ) - { - return; - } - - this.dataSource.filter = this.filter.nativeElement.value; - }); - } -} - -export class FilesDataSource extends DataSource -{ - private _filterChange = new BehaviorSubject(''); - private _filteredDataChange = new BehaviorSubject(''); - - /** - * Constructor - * - * @param {EcommerceProductsService} _ecommerceProductsService - * @param {MatPaginator} _matPaginator - * @param {MatSort} _matSort - */ - constructor( - private _ecommerceProductsService: EcommerceProductsService, - private _matPaginator: MatPaginator, - private _matSort: MatSort - ) - { - super(); - - this.filteredData = this._ecommerceProductsService.products; - } - - /** - * Connect function called by the table to retrieve one stream containing the data to render. - * - * @returns {Observable} - */ - connect(): Observable - { - const displayDataChanges = [ - this._ecommerceProductsService.onProductsChanged, - this._matPaginator.page, - this._filterChange, - this._matSort.sortChange - ]; - - return merge(...displayDataChanges) - .pipe( - map(() => { - let data = this._ecommerceProductsService.products.slice(); - - data = this.filterData(data); - - this.filteredData = [...data]; - - data = this.sortData(data); - - // Grab the page's slice of data. - const startIndex = this._matPaginator.pageIndex * this._matPaginator.pageSize; - return data.splice(startIndex, this._matPaginator.pageSize); - } - )); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Accessors - // ----------------------------------------------------------------------------------------------------- - - // Filtered data - get filteredData(): any - { - return this._filteredDataChange.value; - } - - set filteredData(value: any) - { - this._filteredDataChange.next(value); - } - - // Filter - get filter(): string - { - return this._filterChange.value; - } - - set filter(filter: string) - { - this._filterChange.next(filter); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Filter data - * - * @param data - * @returns {any} - */ - filterData(data): any - { - if ( !this.filter ) - { - return data; - } - return FuseUtils.filterArrayByString(data, this.filter); - } - - /** - * Sort data - * - * @param data - * @returns {any[]} - */ - sortData(data): any[] - { - if ( !this._matSort.active || this._matSort.direction === '' ) - { - return data; - } - - return data.sort((a, b) => { - let propertyA: number | string = ''; - let propertyB: number | string = ''; - - switch ( this._matSort.active ) - { - case 'id': - [propertyA, propertyB] = [a.id, b.id]; - break; - case 'name': - [propertyA, propertyB] = [a.name, b.name]; - break; - case 'categories': - [propertyA, propertyB] = [a.categories[0], b.categories[0]]; - break; - case 'price': - [propertyA, propertyB] = [a.priceTaxIncl, b.priceTaxIncl]; - break; - case 'quantity': - [propertyA, propertyB] = [a.quantity, b.quantity]; - break; - case 'active': - [propertyA, propertyB] = [a.active, b.active]; - break; - } - - const valueA = isNaN(+propertyA) ? propertyA : +propertyA; - const valueB = isNaN(+propertyB) ? propertyB : +propertyB; - - return (valueA < valueB ? -1 : 1) * (this._matSort.direction === 'asc' ? 1 : -1); - }); - } - - /** - * Disconnect - */ - disconnect(): void - { - } -} diff --git a/src/app/main/apps/file-manager/file-list/file-list.component.ts b/src/app/main/apps/file-manager/file-list/file-list.component.ts deleted file mode 100644 index ca8b4d88..00000000 --- a/src/app/main/apps/file-manager/file-list/file-list.component.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { DataSource } from '@angular/cdk/collections'; -import { Observable, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -import { FileManagerService } from 'app/main/apps/file-manager/file-manager.service'; - -@Component({ - selector : 'file-list', - templateUrl: './file-list.component.html', - styleUrls : ['./file-list.component.scss'], - animations : fuseAnimations -}) -export class FileManagerFileListComponent implements OnInit, OnDestroy -{ - files: any; - dataSource: FilesDataSource | null; - displayedColumns = ['icon', 'name', 'type', 'owner', 'size', 'modified', 'detail-button']; - selected: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FileManagerService} _fileManagerService - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fileManagerService: FileManagerService, - private _fuseSidebarService: FuseSidebarService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.dataSource = new FilesDataSource(this._fileManagerService); - - this._fileManagerService.onFilesChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(files => { - this.files = files; - }); - - this._fileManagerService.onFileSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selected => { - this.selected = selected; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On select - * - * @param selected - */ - onSelect(selected): void - { - this._fileManagerService.onFileSelected.next(selected); - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} - -export class FilesDataSource extends DataSource -{ - /** - * Constructor - * - * @param {FileManagerService} _fileManagerService - */ - constructor( - private _fileManagerService: FileManagerService - ) - { - super(); - } - - /** - * Connect function called by the table to retrieve one stream containing the data to render. - * - * @returns {Observable} - */ - connect(): Observable - { - return this._fileManagerService.onFilesChanged; - } - - /** - * Disconnect - */ - disconnect(): void - { - } -} diff --git a/src/app/main/apps/file-manager/file-manager.component.html b/src/app/main/apps/file-manager/file-manager.component.html deleted file mode 100644 index 72b1b7f6..00000000 --- a/src/app/main/apps/file-manager/file-manager.component.html +++ /dev/null @@ -1,75 +0,0 @@ - diff --git a/src/app/main/apps/file-manager/file-manager.component.scss b/src/app/main/apps/file-manager/file-manager.component.scss deleted file mode 100644 index 0866d229..00000000 --- a/src/app/main/apps/file-manager/file-manager.component.scss +++ /dev/null @@ -1,72 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -#file-manager { - - .sidebar { - width: 320px !important; - min-width: 320px !important; - max-width: 320px !important; - - &.main-sidebar { - } - - &.details-sidebar { - @include media-breakpoint('gt-md') { - z-index: 0; - } - } - } - - .center { - overflow: hidden; - - .header { - position: relative; - height: 160px; - min-height: 160px; - max-height: 160px; - - @include media-breakpoint-down('sm') { - height: 120px; - min-height: 120px; - max-height: 120px; - } - - .add-file-button { - position: absolute; - bottom: -28px; - left: 16px; - z-index: 999; - } - } - - .content { - flex: 1 1 auto; - overflow: auto; - } - } - - .type-icon { - - &.folder { - &:before { - content: 'folder'; - color: #FFB300; - } - } - - &.document { - &:before { - content: 'insert_drive_file'; - color: #1565C0; - } - } - - &.spreadsheet { - &:before { - content: 'insert_chart'; - color: #4CAF50; - } - } - } -} diff --git a/src/app/main/apps/file-manager/file-manager.component.ts b/src/app/main/apps/file-manager/file-manager.component.ts deleted file mode 100644 index a5fee524..00000000 --- a/src/app/main/apps/file-manager/file-manager.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -import { FileManagerService } from 'app/main/apps/file-manager/file-manager.service'; - -@Component({ - selector : 'file-manager', - templateUrl : './file-manager.component.html', - styleUrls : ['./file-manager.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) -export class FileManagerComponent implements OnInit, OnDestroy -{ - selected: any; - pathArr: string[]; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FileManagerService} _fileManagerService - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fileManagerService: FileManagerService, - private _fuseSidebarService: FuseSidebarService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._fileManagerService.onFileSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selected => { - this.selected = selected; - this.pathArr = selected.location.split('>'); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/apps/file-manager/file-manager.module.ts b/src/app/main/apps/file-manager/file-manager.module.ts deleted file mode 100644 index ba57d866..00000000 --- a/src/app/main/apps/file-manager/file-manager.module.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { CdkTableModule } from '@angular/cdk/table'; -import { MatButtonModule, MatIconModule, MatRippleModule, MatSlideToggleModule, MatTableModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseSidebarModule } from '@fuse/components'; - -import { FileManagerService } from 'app/main/apps/file-manager/file-manager.service'; -import { FileManagerComponent } from 'app/main/apps/file-manager/file-manager.component'; -import { FileManagerDetailsSidebarComponent } from 'app/main/apps/file-manager/sidebars/details/details.component'; -import { FileManagerFileListComponent } from 'app/main/apps/file-manager/file-list/file-list.component'; -import { FileManagerMainSidebarComponent } from 'app/main/apps/file-manager/sidebars/main/main.component'; - -const routes: Routes = [ - { - path : '**', - component: FileManagerComponent, - children : [], - resolve : { - files: FileManagerService - } - } -]; - -@NgModule({ - declarations: [ - FileManagerComponent, - FileManagerFileListComponent, - FileManagerMainSidebarComponent, - FileManagerDetailsSidebarComponent - ], - imports : [ - RouterModule.forChild(routes), - - CdkTableModule, - MatButtonModule, - MatIconModule, - MatRippleModule, - MatSlideToggleModule, - MatTableModule, - - FuseSharedModule, - FuseSidebarModule - ], - providers : [ - FileManagerService - ] -}) -export class FileManagerModule -{ -} diff --git a/src/app/main/apps/file-manager/sidebars/details/details.component.ts b/src/app/main/apps/file-manager/sidebars/details/details.component.ts deleted file mode 100644 index 939e18df..00000000 --- a/src/app/main/apps/file-manager/sidebars/details/details.component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { FileManagerService } from 'app/main/apps/file-manager/file-manager.service'; - -@Component({ - selector : 'file-manager-details-sidebar', - templateUrl: './details.component.html', - styleUrls : ['./details.component.scss'], - animations : fuseAnimations -}) -export class FileManagerDetailsSidebarComponent implements OnInit, OnDestroy -{ - selected: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FileManagerService} _fileManagerService - */ - constructor( - private _fileManagerService: FileManagerService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._fileManagerService.onFileSelected - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selected => { - this.selected = selected; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/apps/mail-ngrx/dialogs/compose/compose.component.ts b/src/app/main/apps/mail-ngrx/dialogs/compose/compose.component.ts deleted file mode 100644 index b4f6e742..00000000 --- a/src/app/main/apps/mail-ngrx/dialogs/compose/compose.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Component, Inject, ViewEncapsulation } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; - -@Component({ - selector : 'mail-ngrx-compose', - templateUrl : './compose.component.html', - styleUrls : ['./compose.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class MailNgrxComposeDialogComponent -{ - composeForm: FormGroup; - - /** - * Constructor - * - * @param {MatDialogRef} matDialogRef - * @param _data - * @param {FormBuilder} _formBuilder - */ - constructor( - public matDialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) private _data: any, - private _formBuilder: FormBuilder - ) - { - // Set the defaults - this.composeForm = this.createComposeForm(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create compose form - * - * @returns {FormGroup} - */ - createComposeForm(): FormGroup - { - return this._formBuilder.group({ - from : { - value : ['johndoe@creapond.com'], - disabled: [true] - }, - to : [''], - cc : [''], - bcc : [''], - subject: [''], - message: [''] - }); - - } - -} diff --git a/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts b/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts deleted file mode 100644 index 746424cd..00000000 --- a/src/app/main/apps/mail-ngrx/mail-details/mail-details.component.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; -import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs'; - -import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; -import * as fromStore from 'app/main/apps/mail-ngrx/store'; -import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; - -@Component({ - selector : 'mail-ngrx-details', - templateUrl : './mail-details.component.html', - styleUrls : ['./mail-details.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class MailNgrxDetailsComponent implements OnChanges -{ - @Input('mail') - mailInput: Mail; - - labels$: Observable; - mail: Mail; - showDetails: boolean; - - /** - * Constructor - * - * @param {MailNgrxService} _mailNgrxService - * @param {Store} _store - */ - constructor( - private _mailNgrxService: MailNgrxService, - private _store: Store - ) - { - // Set the defaults - this.labels$ = this._store.select(fromStore.getLabelsArr); - this.showDetails = false; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On changes - */ - ngOnChanges(): void - { - this.updateModel(this.mailInput); - this.markAsRead(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Mark as read - */ - markAsRead(): void - { - if ( this.mail && !this.mail.read ) - { - this.mail.markRead(); - this.updateMail(); - } - } - - /** - * Toggle star - * - * @param event - */ - toggleStar(event): void - { - event.stopPropagation(); - this.mail.toggleStar(); - this.updateMail(); - } - - /** - * Toggle important - * - * @param event - */ - toggleImportant(event): void - { - event.stopPropagation(); - this.mail.toggleImportant(); - this.updateMail(); - } - - /** - * Update model - * - * @param data - */ - updateModel(data): void - { - this.mail = !data ? null : new Mail({...data}); - } - - /** - * Update the mail - */ - updateMail(): void - { - this._store.dispatch(new fromStore.UpdateMail(this.mail)); - this.updateModel(this.mail); - } -} diff --git a/src/app/main/apps/mail-ngrx/mail-list/mail-list.component.ts b/src/app/main/apps/mail-ngrx/mail-list/mail-list.component.ts deleted file mode 100644 index faaef965..00000000 --- a/src/app/main/apps/mail-ngrx/mail-list/mail-list.component.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; -import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; - -@Component({ - selector : 'mail-ngrx-list', - templateUrl : './mail-list.component.html', - styleUrls : ['./mail-list.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class MailNgrxListComponent -{ - @Input() - mails: Mail[]; - - @Input() - currentMail: Mail[]; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - * @param {MailNgrxService} _mailNgrxService - * @param {Router} _router - */ - constructor( - private _activatedRoute: ActivatedRoute, - private _mailNgrxService: MailNgrxService, - private _router: Router - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Read mail - * - * @param mailId - */ - readMail(mailId): void - { - const labelHandle = this._activatedRoute.snapshot.params.labelHandle, - filterHandle = this._activatedRoute.snapshot.params.filterHandle, - folderHandle = this._activatedRoute.snapshot.params.folderHandle; - - if ( labelHandle ) - { - this._router.navigate(['apps/mail-ngrx/label/' + labelHandle + '/' + mailId]); - } - else if ( filterHandle ) - { - this._router.navigate(['apps/mail-ngrx/filter/' + filterHandle + '/' + mailId]); - } - else - { - this._router.navigate(['apps/mail-ngrx/' + folderHandle + '/' + mailId]); - } - } -} diff --git a/src/app/main/apps/mail-ngrx/mail.component.html b/src/app/main/apps/mail-ngrx/mail.component.html deleted file mode 100644 index 6b1ce194..00000000 --- a/src/app/main/apps/mail-ngrx/mail.component.html +++ /dev/null @@ -1,109 +0,0 @@ - diff --git a/src/app/main/apps/mail-ngrx/mail.component.ts b/src/app/main/apps/mail-ngrx/mail.component.ts deleted file mode 100644 index 2b43c7e4..00000000 --- a/src/app/main/apps/mail-ngrx/mail.component.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs'; -import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; -import { FuseTranslationLoaderService } from '@fuse/services/translation-loader.service'; - -import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; -import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; -import * as fromStore from 'app/main/apps/mail-ngrx/store'; - -import { locale as english } from 'app/main/apps/mail-ngrx/i18n/en'; -import { locale as turkish } from 'app/main/apps/mail-ngrx/i18n/tr'; - -@Component({ - selector : 'mail-ngrx', - templateUrl : './mail.component.html', - styleUrls : ['./mail.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class MailNgrxComponent implements OnInit, OnDestroy -{ - hasSelectedMails: boolean; - isIndeterminate: boolean; - searchInput: FormControl; - mails$: Observable; - folders$: Observable; - labels$: Observable; - currentMail$: Observable; - selectedMailIds$: Observable; - searchText$: Observable; - mails: Mail[]; - selectedMailIds: string[]; - - /** - * Constructor - * - * @param {ChangeDetectorRef} _changeDetectorRef - * @param {FuseSidebarService} _fuseSidebarService - * @param {FuseTranslationLoaderService} _fuseTranslationLoaderService - * @param {MailNgrxService} _mailNgrxService - * @param {Store} _store - */ - constructor( - private _changeDetectorRef: ChangeDetectorRef, - private _fuseSidebarService: FuseSidebarService, - private _fuseTranslationLoaderService: FuseTranslationLoaderService, - private _mailNgrxService: MailNgrxService, - private _store: Store - ) - { - // Set the defaults - this.searchInput = new FormControl(''); - this._fuseTranslationLoaderService.loadTranslations(english, turkish); - this.currentMail$ = this._store.select(fromStore.getCurrentMail); - this.mails$ = this._store.select(fromStore.getMailsArr); - this.folders$ = this._store.select(fromStore.getFoldersArr); - this.labels$ = this._store.select(fromStore.getLabelsArr); - this.selectedMailIds$ = this._store.select(fromStore.getSelectedMailIds); - this.searchText$ = this._store.select(fromStore.getSearchText); - this.mails = []; - this.selectedMailIds = []; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.mails$.subscribe(mails => { - this.mails = mails; - }); - - this.selectedMailIds$ - .subscribe(selectedMailIds => { - this.selectedMailIds = selectedMailIds; - this.hasSelectedMails = selectedMailIds.length > 0; - this.isIndeterminate = (selectedMailIds.length !== this.mails.length && selectedMailIds.length > 0); - this.refresh(); - }); - - this.searchText$.subscribe(searchText => { - this.searchInput.setValue(searchText); - }); - - this.searchInput.valueChanges.pipe( - debounceTime(300), - distinctUntilChanged() - ).subscribe(searchText => { - this._store.dispatch(new fromStore.SetSearchText(searchText)); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - this._changeDetectorRef.detach(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle select all - * - * @param ev - */ - toggleSelectAll(ev): void - { - ev.preventDefault(); - - if ( this.selectedMailIds.length && this.selectedMailIds.length > 0 ) - { - this.deselectAllMails(); - } - else - { - this.selectAllMails(); - } - } - - /** - * Select all mails - */ - selectAllMails(): void - { - this._store.dispatch(new fromStore.SelectAllMails()); - } - - /** - * Deselect all mails - */ - deselectAllMails(): void - { - this._store.dispatch(new fromStore.DeselectAllMails()); - } - - /** - * Select mails by parameter - * - * @param parameter - * @param value - */ - selectMailsByParameter(parameter, value): void - { - this._store.dispatch(new fromStore.SelectMailsByParameter({ - parameter, - value - })); - } - - /** - * Toggle label on selected mails - * - * @param labelId - */ - toggleLabelOnSelectedMails(labelId): void - { - this._store.dispatch(new fromStore.AddLabelOnSelectedMails(labelId)); - } - - /** - * Set folder on selected mails - * - * @param folderId - */ - setFolderOnSelectedMails(folderId): void - { - this._store.dispatch(new fromStore.SetFolderOnSelectedMails(folderId)); - } - - /** - * Deselect current mail - */ - deselectCurrentMail(): void - { - this._store.dispatch(new fromStore.SetCurrentMail('')); - } - - /** - * Refresh - */ - refresh(): void - { - this._changeDetectorRef.markForCheck(); - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/apps/mail-ngrx/mail.module.ts b/src/app/main/apps/mail-ngrx/mail.module.ts deleted file mode 100644 index 76474bbc..00000000 --- a/src/app/main/apps/mail-ngrx/mail.module.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatMenuModule, MatRippleModule, MatSelectModule, MatToolbarModule } from '@angular/material'; -import { TranslateModule } from '@ngx-translate/core'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseSidebarModule } from '@fuse/components'; - -import * as fromGuards from 'app/main/apps/mail-ngrx/store/guards/index'; -import { MailNgrxStoreModule } from 'app/main/apps/mail-ngrx/store/store.module'; -import { MailNgrxComponent } from 'app/main/apps/mail-ngrx/mail.component'; -import { MailNgrxListComponent } from 'app/main/apps/mail-ngrx/mail-list/mail-list.component'; -import { MailNgrxListItemComponent } from 'app/main/apps/mail-ngrx/mail-list/mail-list-item/mail-list-item.component'; -import { MailNgrxDetailsComponent } from 'app/main/apps/mail-ngrx/mail-details/mail-details.component'; -import { MailNgrxMainSidebarComponent } from 'app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component'; -import { MailNgrxComposeDialogComponent } from 'app/main/apps/mail-ngrx/dialogs/compose/compose.component'; -import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; - -const routes: Routes = [ - { - path : 'label/:labelHandle', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : 'label/:labelHandle/:mailId', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : 'filter/:filterHandle', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : 'filter/:filterHandle/:mailId', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : ':folderHandle', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : ':folderHandle/:mailId', - component : MailNgrxComponent, - canActivate: [fromGuards.ResolveGuard] - }, - { - path : '**', - redirectTo: 'inbox' - } -]; - -@NgModule({ - declarations : [ - MailNgrxComponent, - MailNgrxListComponent, - MailNgrxListItemComponent, - MailNgrxDetailsComponent, - MailNgrxMainSidebarComponent, - MailNgrxComposeDialogComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatCheckboxModule, - MatDialogModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatMenuModule, - MatRippleModule, - MatSelectModule, - MatToolbarModule, - - TranslateModule, - - FuseSharedModule, - FuseSidebarModule, - - MailNgrxStoreModule - ], - providers : [ - MailNgrxService, - fromGuards.ResolveGuard - ], - entryComponents: [MailNgrxComposeDialogComponent] -}) -export class MailNgrxModule -{ -} diff --git a/src/app/main/apps/mail-ngrx/mail.service.ts b/src/app/main/apps/mail-ngrx/mail.service.ts deleted file mode 100644 index ec1a6aad..00000000 --- a/src/app/main/apps/mail-ngrx/mail.service.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs'; - -import { Mail } from 'app/main/apps/mail-ngrx/mail.model'; -import { MailAppState } from 'app/main/apps/mail-ngrx/store/reducers'; -import { getFiltersArr, getFoldersArr, getLabelsArr, getMailsArr } from 'app/main/apps/mail-ngrx/store/selectors'; - -@Injectable() -export class MailNgrxService -{ - foldersArr: any; - filtersArr: any; - labelsArr: any; - selectedMails: Mail[]; - mails: Mail[]; - - /** - * Constructor - * - * @param {HttpClient} _httpClient - * @param {Store} _store - */ - constructor( - private _httpClient: HttpClient, - private _store: Store - ) - { - this._store.select(getFoldersArr).subscribe(folders => { - this.foldersArr = folders; - }); - - this._store.select(getFiltersArr).subscribe(filters => { - this.filtersArr = filters; - }); - - this._store.select(getLabelsArr).subscribe(labels => { - this.labelsArr = labels; - }); - - this._store.select(getMailsArr).subscribe(mails => { - this.mails = mails; - }); - - this.selectedMails = []; - } - - /** - * Get all mails - * - * @returns {Observable} - */ - getAllMails(): Observable - { - return this._httpClient.get('api/mail-mails'); - } - - /** - * Get folders - * - * @returns {Observable} - */ - getFolders(): Observable - { - return this._httpClient.get('api/mail-folders'); - } - - /** - * Get filters - * - * @returns {Observable} - */ - getFilters(): Observable - { - return this._httpClient.get('api/mail-filters'); - } - - /** - * Get labels - * - * @returns {Observable} - */ - getLabels(): Observable - { - return this._httpClient.get('api/mail-labels'); - } - - /** - * Get mails - * - * @param handle - * @returns {Observable} - */ - getMails(handle): Observable - { - if ( handle.id === 'labelHandle' ) - { - const labelId = this.labelsArr.find(label => label.handle === handle.value).id; - return this._httpClient.get('api/mail-mails?labels=' + labelId); - } - else if ( handle.id === 'filterHandle' ) - { - return this._httpClient.get('api/mail-mails?' + handle.value + '=true'); - } - else // folderHandle - { - const folderId = this.foldersArr.find(folder => folder.handle === handle.value).id; - return this._httpClient.get('api/mail-mails?folder=' + folderId); - } - } - - /** - * Update the mail - * - * @param mail - * @returns {Promise} - */ - updateMail(mail): any - { - return this._httpClient.post('api/mail-mails/' + mail.id, {...mail}); - } -} diff --git a/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts b/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts deleted file mode 100644 index 7231340b..00000000 --- a/src/app/main/apps/mail-ngrx/sidebars/main/main-sidebar.component.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { MatDialog } from '@angular/material'; -import { FormGroup } from '@angular/forms'; -import { Store } from '@ngrx/store'; -import { Observable } from 'rxjs'; - -import { MailNgrxService } from 'app/main/apps/mail-ngrx/mail.service'; -import * as fromStore from 'app/main/apps/mail-ngrx/store'; -import { MailNgrxComposeDialogComponent } from 'app/main/apps/mail-ngrx/dialogs/compose/compose.component'; - -@Component({ - selector : 'mail-ngrx-main-sidebar', - templateUrl : './main-sidebar.component.html', - styleUrls : ['./main-sidebar.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class MailNgrxMainSidebarComponent -{ - labels: any[]; - accounts: object; - selectedAccount: string; - dialogRef: any; - - folders$: Observable; - filters$: Observable; - labels$: Observable; - - /** - * Constructor - * - * @param {MailNgrxService} _mailNgrxService - * @param {MatDialog} _matDialog - * @param {Store} _store - */ - constructor( - private _mailNgrxService: MailNgrxService, - private _matDialog: MatDialog, - private _store: Store - ) - { - // Set the defaults - this.accounts = { - 'creapond' : 'johndoe@creapond.com', - 'withinpixels': 'johndoe@withinpixels.com' - }; - this.selectedAccount = 'creapond'; - this.folders$ = this._store.select(fromStore.getFoldersArr); - this.filters$ = this._store.select(fromStore.getFiltersArr); - this.labels$ = this._store.select(fromStore.getLabelsArr); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Compose dialog - */ - composeDialog(): void - { - this.dialogRef = this._matDialog.open(MailNgrxComposeDialogComponent, { - panelClass: 'mail-ngrx-compose-dialog' - }); - - this.dialogRef.afterClosed() - .subscribe(response => { - if ( !response ) - { - return; - } - const actionType: string = response[0]; - const formData: FormGroup = response[1]; - switch ( actionType ) - { - /** - * Send - */ - case 'send': - console.log('new Mail', formData.getRawValue()); - break; - /** - * Delete - */ - case 'delete': - console.log('delete Mail'); - break; - } - }); - } -} diff --git a/src/app/main/apps/mail/mail-details/mail-details.component.ts b/src/app/main/apps/mail/mail-details/mail-details.component.ts deleted file mode 100644 index a6be0823..00000000 --- a/src/app/main/apps/mail/mail-details/mail-details.component.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { Mail } from 'app/main/apps/mail/mail.model'; -import { MailService } from 'app/main/apps/mail/mail.service'; - -@Component({ - selector : 'mail-details', - templateUrl: './mail-details.component.html', - styleUrls : ['./mail-details.component.scss'], - animations : fuseAnimations -}) -export class MailDetailsComponent implements OnInit, OnDestroy -{ - mail: Mail; - labels: any[]; - showDetails: boolean; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {MailService} _mailService - */ - constructor( - private _mailService: MailService - ) - { - // Set the defaults - this.showDetails = false; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update the current mail - this._mailService.onCurrentMailChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(currentMail => { - this.mail = currentMail; - }); - - // Subscribe to update on label change - this._mailService.onLabelsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(labels => { - this.labels = labels; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle star - * - * @param event - */ - toggleStar(event): void - { - event.stopPropagation(); - - this.mail.toggleStar(); - - this._mailService.updateMail(this.mail); - } - - /** - * Toggle important - * - * @param event - */ - toggleImportant(event): void - { - event.stopPropagation(); - - this.mail.toggleImportant(); - - this._mailService.updateMail(this.mail); - } -} diff --git a/src/app/main/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts b/src/app/main/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts deleted file mode 100644 index 81bee3b0..00000000 --- a/src/app/main/apps/mail/mail-list/mail-list-item/mail-list-item.component.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { Mail } from 'app/main/apps/mail/mail.model'; -import { MailService } from 'app/main/apps/mail/mail.service'; - -@Component({ - selector : 'mail-list-item', - templateUrl: './mail-list-item.component.html', - styleUrls : ['./mail-list-item.component.scss'] -}) -export class MailListItemComponent implements OnInit, OnDestroy -{ - @Input() mail: Mail; - labels: any[]; - - @HostBinding('class.selected') - selected: boolean; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {MailService} _mailService - */ - constructor( - private _mailService: MailService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Set the initial values - this.mail = new Mail(this.mail); - - // Subscribe to update on selected mail change - this._mailService.onSelectedMailsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedMails => { - this.selected = false; - - if ( selectedMails.length > 0 ) - { - for ( const mail of selectedMails ) - { - if ( mail.id === this.mail.id ) - { - this.selected = true; - break; - } - } - } - }); - - // Subscribe to update on label change - this._mailService.onLabelsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(labels => { - this.labels = labels; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On selected change - */ - onSelectedChange(): void - { - this._mailService.toggleSelectedMail(this.mail.id); - } - - /** - * Toggle star - * - * @param event - */ - toggleStar(event): void - { - event.stopPropagation(); - - this.mail.toggleStar(); - - this._mailService.updateMail(this.mail); - } - - /** - * Toggle Important - * - * @param event - */ - toggleImportant(event): void - { - event.stopPropagation(); - - this.mail.toggleImportant(); - - this._mailService.updateMail(this.mail); - } -} diff --git a/src/app/main/apps/mail/mail-list/mail-list.component.html b/src/app/main/apps/mail/mail-list/mail-list.component.html deleted file mode 100644 index 7090440b..00000000 --- a/src/app/main/apps/mail/mail-list/mail-list.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
- {{ 'MAIL.NO_MESSAGES' | translate }} -
- -
- - -
diff --git a/src/app/main/apps/mail/mail-list/mail-list.component.ts b/src/app/main/apps/mail/mail-list/mail-list.component.ts deleted file mode 100644 index b59ec11e..00000000 --- a/src/app/main/apps/mail/mail-list/mail-list.component.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Location } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { Mail } from 'app/main/apps/mail/mail.model'; -import { MailService } from 'app/main/apps/mail/mail.service'; - -@Component({ - selector : 'mail-list', - templateUrl: './mail-list.component.html', - styleUrls : ['./mail-list.component.scss'], - animations : fuseAnimations -}) -export class MailListComponent implements OnInit, OnDestroy -{ - mails: Mail[]; - currentMail: Mail; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - * @param {MailService} _mailService - * @param {Location} _location - */ - constructor( - private _activatedRoute: ActivatedRoute, - private _mailService: MailService, - private _location: Location - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update mails on changes - this._mailService.onMailsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(mails => { - this.mails = mails; - }); - - // Subscribe to update current mail on changes - this._mailService.onCurrentMailChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(currentMail => { - if ( !currentMail ) - { - // Set the current mail id to null to deselect the current mail - this.currentMail = null; - - // Handle the location changes - const labelHandle = this._activatedRoute.snapshot.params.labelHandle, - filterHandle = this._activatedRoute.snapshot.params.filterHandle, - folderHandle = this._activatedRoute.snapshot.params.folderHandle; - - if ( labelHandle ) - { - this._location.go('apps/mail/label/' + labelHandle); - } - else if ( filterHandle ) - { - this._location.go('apps/mail/filter/' + filterHandle); - } - else - { - this._location.go('apps/mail/' + folderHandle); - } - } - else - { - this.currentMail = currentMail; - } - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Read mail - * - * @param mailId - */ - readMail(mailId): void - { - const labelHandle = this._activatedRoute.snapshot.params.labelHandle, - filterHandle = this._activatedRoute.snapshot.params.filterHandle, - folderHandle = this._activatedRoute.snapshot.params.folderHandle; - - if ( labelHandle ) - { - this._location.go('apps/mail/label/' + labelHandle + '/' + mailId); - } - else if ( filterHandle ) - { - this._location.go('apps/mail/filter/' + filterHandle + '/' + mailId); - } - else - { - this._location.go('apps/mail/' + folderHandle + '/' + mailId); - } - - // Set current mail - this._mailService.setCurrentMail(mailId); - } -} diff --git a/src/app/main/apps/mail/mail.component.html b/src/app/main/apps/mail/mail.component.html deleted file mode 100644 index 0a28b1d4..00000000 --- a/src/app/main/apps/mail/mail.component.html +++ /dev/null @@ -1,107 +0,0 @@ - diff --git a/src/app/main/apps/mail/mail.component.ts b/src/app/main/apps/mail/mail.component.ts deleted file mode 100644 index 27ee6841..00000000 --- a/src/app/main/apps/mail/mail.component.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; -import { FuseTranslationLoaderService } from '@fuse/services/translation-loader.service'; - -import { Mail } from 'app/main/apps/mail/mail.model'; -import { MailService } from 'app/main/apps/mail/mail.service'; - -import { locale as english } from 'app/main/apps/mail//i18n/en'; -import { locale as turkish } from 'app/main/apps/mail//i18n/tr'; - -@Component({ - selector : 'mail', - templateUrl: './mail.component.html', - styleUrls : ['./mail.component.scss'] -}) -export class MailComponent implements OnInit, OnDestroy -{ - hasSelectedMails: boolean; - isIndeterminate: boolean; - folders: any[]; - filters: any[]; - labels: any[]; - searchInput: FormControl; - currentMail: Mail; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {MailService} _mailService - * @param {FuseSidebarService} _fuseSidebarService - * @param {FuseTranslationLoaderService} _fuseTranslationLoaderService - */ - constructor( - private _mailService: MailService, - private _fuseSidebarService: FuseSidebarService, - private _fuseTranslationLoaderService: FuseTranslationLoaderService - ) - { - // Load the translations - this._fuseTranslationLoaderService.loadTranslations(english, turkish); - - // Set the defaults - this.searchInput = new FormControl(''); - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._mailService.onSelectedMailsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedMails => { - setTimeout(() => { - this.hasSelectedMails = selectedMails.length > 0; - this.isIndeterminate = (selectedMails.length !== this._mailService.mails.length && selectedMails.length > 0); - }, 0); - }); - - this._mailService.onFoldersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(folders => { - this.folders = this._mailService.folders; - }); - - this._mailService.onFiltersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(folders => { - this.filters = this._mailService.filters; - }); - - this._mailService.onLabelsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(labels => { - this.labels = this._mailService.labels; - }); - - this._mailService.onCurrentMailChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(currentMail => { - if ( !currentMail ) - { - this.currentMail = null; - } - else - { - this.currentMail = currentMail; - } - }); - - this.searchInput.valueChanges.pipe( - takeUntil(this._unsubscribeAll), - debounceTime(300), - distinctUntilChanged() - ) - .subscribe(searchText => { - this._mailService.onSearchTextChanged.next(searchText); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle select all - */ - toggleSelectAll(): void - { - this._mailService.toggleSelectAll(); - } - - /** - * Select mails - * - * @param filterParameter - * @param filterValue - */ - selectMails(filterParameter?, filterValue?): void - { - this._mailService.selectMails(filterParameter, filterValue); - } - - /** - * Deselect mails - */ - deselectMails(): void - { - this._mailService.deselectMails(); - } - - /** - * Deselect current mail - */ - deselectCurrentMail(): void - { - this._mailService.onCurrentMailChanged.next(null); - } - - /** - * Toggle label on selected mails - * - * @param labelId - */ - toggleLabelOnSelectedMails(labelId): void - { - this._mailService.toggleLabelOnSelectedMails(labelId); - } - - /** - * Set folder on selected mails - * - * @param folderId - */ - setFolderOnSelectedMails(folderId): void - { - this._mailService.setFolderOnSelectedMails(folderId); - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/apps/mail/sidebars/main/main-sidebar.component.ts b/src/app/main/apps/mail/sidebars/main/main-sidebar.component.ts deleted file mode 100644 index e2d0ae95..00000000 --- a/src/app/main/apps/mail/sidebars/main/main-sidebar.component.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormGroup } from '@angular/forms'; -import { MatDialog } from '@angular/material'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { MailService } from 'app/main/apps/mail/mail.service'; -import { MailComposeDialogComponent } from 'app/main/apps/mail/dialogs/compose/compose.component'; - -@Component({ - selector : 'mail-main-sidebar', - templateUrl: './main-sidebar.component.html', - styleUrls : ['./main-sidebar.component.scss'], - animations : fuseAnimations -}) -export class MailMainSidebarComponent implements OnInit, OnDestroy -{ - folders: any[]; - filters: any[]; - labels: any[]; - accounts: object; - selectedAccount: string; - dialogRef: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {MailService} _mailService - * @param {MatDialog} _matDialog - */ - constructor( - private _mailService: MailService, - public _matDialog: MatDialog - ) - { - // Set the defaults - this.accounts = { - 'creapond' : 'johndoe@creapond.com', - 'withinpixels': 'johndoe@withinpixels.com' - }; - this.selectedAccount = 'creapond'; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._mailService.onFoldersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(folders => { - this.folders = folders; - }); - - this._mailService.onFiltersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(filters => { - this.filters = filters; - }); - - this._mailService.onLabelsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(labels => { - this.labels = labels; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Compose dialog - */ - composeDialog(): void - { - this.dialogRef = this._matDialog.open(MailComposeDialogComponent, { - panelClass: 'mail-compose-dialog' - }); - this.dialogRef.afterClosed() - .subscribe(response => { - if ( !response ) - { - return; - } - const actionType: string = response[0]; - const formData: FormGroup = response[1]; - switch ( actionType ) - { - /** - * Send - */ - case 'send': - console.log('new Mail', formData.getRawValue()); - break; - /** - * Delete - */ - case 'delete': - console.log('delete Mail'); - break; - } - }); - } -} diff --git a/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts b/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts deleted file mode 100644 index bf74e6b1..00000000 --- a/src/app/main/apps/scrumboard/board/add-list/add-list.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, EventEmitter, Output, ViewChild } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; - -@Component({ - selector : 'scrumboard-board-add-list', - templateUrl: './add-list.component.html', - styleUrls : ['./add-list.component.scss'] -}) -export class ScrumboardBoardAddListComponent -{ - formActive: boolean; - form: FormGroup; - - @Output() - onListAdd: EventEmitter; - - @ViewChild('nameInput') - nameInputField; - - /** - * Constructor - * - * @param {FormBuilder} _formBuilder - */ - constructor( - private _formBuilder: FormBuilder - ) - { - // Set the defaults - this.formActive = false; - this.onListAdd = new EventEmitter(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Open form - */ - openForm(): void - { - this.form = this._formBuilder.group({ - name: [''] - }); - this.formActive = true; - this.focusNameField(); - } - - /** - * Close form - */ - closeForm(): void - { - this.formActive = false; - } - - /** - * Focus to the name field - */ - focusNameField(): void - { - setTimeout(() => { - this.nameInputField.nativeElement.focus(); - }); - } - - /** - * On form submit - */ - onFormSubmit(): void - { - if ( this.form.valid ) - { - this.onListAdd.next(this.form.getRawValue().name); - this.formActive = false; - } - } - -} diff --git a/src/app/main/apps/scrumboard/board/board.component.ts b/src/app/main/apps/scrumboard/board/board.component.ts deleted file mode 100644 index d225089c..00000000 --- a/src/app/main/apps/scrumboard/board/board.component.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Location } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; -import { List } from 'app/main/apps/scrumboard/list.model'; - -@Component({ - selector : 'scrumboard-board', - templateUrl: './board.component.html', - styleUrls : ['./board.component.scss'], - animations : fuseAnimations -}) -export class ScrumboardBoardComponent implements OnInit, OnDestroy -{ - board: any; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _activatedRoute: ActivatedRoute, - private _location: Location, - private _scrumboardService: ScrumboardService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._scrumboardService.onBoardChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(board => { - this.board = board; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On list add - * - * @param newListName - */ - onListAdd(newListName): void - { - if ( newListName === '' ) - { - return; - } - - this._scrumboardService.addList(new List({name: newListName})); - } - - /** - * On board name changed - * - * @param newName - */ - onBoardNameChanged(newName): void - { - this._scrumboardService.updateBoard(); - this._location.go('/apps/scrumboard/boards/' + this.board.id + '/' + this.board.uri); - } - - /** - * On drop - * - * @param ev - */ - onDrop(ev): void - { - this._scrumboardService.updateBoard(); - } -} diff --git a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts b/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts deleted file mode 100644 index 46cb3bca..00000000 --- a/src/app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseUtils } from '@fuse/utils'; - -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; - -@Component({ - selector : 'scrumboard-label-selector', - templateUrl : './label-selector.component.html', - styleUrls : ['./label-selector.component.scss'], - encapsulation: ViewEncapsulation.None, - animations : fuseAnimations -}) - -export class ScrumboardLabelSelectorComponent implements OnInit, OnDestroy -{ - @Input('card') - card: any; - - @Output() - onCardLabelsChange: EventEmitter; - - board: any; - labelsMenuView: string; - selectedLabel: any; - newLabel: any; - toggleInArray: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ScrumboardService} _scrumboardService - */ - constructor( - private _scrumboardService: ScrumboardService - ) - { - // Set the defaults - this.onCardLabelsChange = new EventEmitter(); - this.labelsMenuView = 'labels'; - this.newLabel = { - 'id' : '', - 'name' : '', - 'color': 'mat-blue-400-bg' - }; - this.toggleInArray = FuseUtils.toggleInArray; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._scrumboardService.onBoardChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(board => { - this.board = board; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Card labels changed - */ - cardLabelsChanged(): void - { - this.onCardLabelsChange.next(); - } - - /** - * On label change - */ - onLabelChange(): void - { - this._scrumboardService.updateBoard(); - } - - /** - * Add new label - */ - addNewLabel(): void - { - this.newLabel.id = FuseUtils.generateGUID(); - this.board.labels.push(Object.assign({}, this.newLabel)); - this.newLabel.name = ''; - this.labelsMenuView = 'labels'; - } -} diff --git a/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts b/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts deleted file mode 100644 index 4a2268d3..00000000 --- a/src/app/main/apps/scrumboard/board/list/add-card/add-card.component.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Component, EventEmitter, Output, ViewChild } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; - -@Component({ - selector : 'scrumboard-board-add-card', - templateUrl: './add-card.component.html', - styleUrls : ['./add-card.component.scss'] -}) -export class ScrumboardBoardAddCardComponent -{ - formActive: boolean; - form: FormGroup; - - @Output() - onCardAdd: EventEmitter; - - @ViewChild('nameInput') - nameInputField; - - /** - * Constructor - * - * @param {FormBuilder} _formBuilder - */ - constructor( - private _formBuilder: FormBuilder - ) - { - // Set the defaults - this.formActive = false; - this.onCardAdd = new EventEmitter(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Open the form - */ - openForm(): void - { - this.form = this._formBuilder.group({ - name: '' - }); - this.formActive = true; - this.focusNameField(); - } - - /** - * Close the form - */ - closeForm(): void - { - this.formActive = false; - } - - /** - * Focus to the name field - */ - focusNameField(): void - { - setTimeout(() => { - this.nameInputField.nativeElement.focus(); - }); - } - - /** - * On form submit - */ - onFormSubmit(): void - { - if ( this.form.valid ) - { - const cardName = this.form.getRawValue().name; - this.onCardAdd.next(cardName); - this.formActive = false; - } - } -} - diff --git a/src/app/main/apps/scrumboard/board/list/card/card.component.ts b/src/app/main/apps/scrumboard/board/list/card/card.component.ts deleted file mode 100644 index 0c47bf23..00000000 --- a/src/app/main/apps/scrumboard/board/list/card/card.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import * as moment from 'moment'; - -@Component({ - selector : 'scrumboard-board-card', - templateUrl : './card.component.html', - styleUrls : ['./card.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class ScrumboardBoardCardComponent implements OnInit -{ - @Input() - cardId; - - card: any; - board: any; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - */ - constructor( - private _activatedRoute: ActivatedRoute - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.board = this._activatedRoute.snapshot.data.board; - this.card = this.board.cards.filter((card) => { - return this.cardId === card.id; - })[0]; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Is the card overdue? - * - * @param cardDate - * @returns {boolean} - */ - isOverdue(cardDate): boolean - { - return moment() > moment(new Date(cardDate)); - } -} diff --git a/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts b/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts deleted file mode 100644 index 55cf831d..00000000 --- a/src/app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; - -@Component({ - selector : 'scrumboard-board-edit-list-name', - templateUrl: './edit-list-name.component.html', - styleUrls : ['./edit-list-name.component.scss'] -}) -export class ScrumboardBoardEditListNameComponent -{ - formActive: boolean; - form: FormGroup; - - @Input() - list; - - @Output() - onNameChanged: EventEmitter; - - @ViewChild('nameInput') - nameInputField; - - /** - * Constructor - * - * @param {FormBuilder} _formBuilder - */ - constructor( - private _formBuilder: FormBuilder - ) - { - // Set the defaults - this.formActive = false; - this.onNameChanged = new EventEmitter(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Open the form - */ - openForm(): void - { - this.form = this._formBuilder.group({ - name: [this.list.name] - }); - this.formActive = true; - this.focusNameField(); - } - - /** - * Close the form - */ - closeForm(): void - { - this.formActive = false; - } - - /** - * Focus to the name field - */ - focusNameField(): void - { - setTimeout(() => { - this.nameInputField.nativeElement.focus(); - }); - } - - /** - * On form submit - */ - onFormSubmit(): void - { - if ( this.form.valid ) - { - this.list.name = this.form.getRawValue().name; - this.onNameChanged.next(this.list.name); - this.formActive = false; - } - } -} diff --git a/src/app/main/apps/scrumboard/board/list/list.component.ts b/src/app/main/apps/scrumboard/board/list/list.component.ts deleted file mode 100644 index 15093f75..00000000 --- a/src/app/main/apps/scrumboard/board/list/list.component.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { MatDialog, MatDialogRef } from '@angular/material'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfirmDialogComponent } from '@fuse/components/confirm-dialog/confirm-dialog.component'; -import { FusePerfectScrollbarDirective } from '@fuse/directives/fuse-perfect-scrollbar/fuse-perfect-scrollbar.directive'; - -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; -import { Card } from 'app/main/apps/scrumboard/card.model'; -import { ScrumboardCardDialogComponent } from 'app/main/apps/scrumboard/board/dialogs/card/card.component'; - -@Component({ - selector : 'scrumboard-board-list', - templateUrl : './list.component.html', - styleUrls : ['./list.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class ScrumboardBoardListComponent implements OnInit, OnDestroy -{ - board: any; - dialogRef: any; - - @Input() - list; - - @ViewChild(FusePerfectScrollbarDirective) - listScroll: FusePerfectScrollbarDirective; - - confirmDialogRef: MatDialogRef; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - * @param {ScrumboardService} _scrumboardService - * @param {MatDialog} _matDialog - */ - constructor( - private _activatedRoute: ActivatedRoute, - private _scrumboardService: ScrumboardService, - private _matDialog: MatDialog - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._scrumboardService.onBoardChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(board => { - this.board = board; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On list name changed - * - * @param newListName - */ - onListNameChanged(newListName): void - { - this.list.name = newListName; - } - - /** - * On card added - * - * @param newCardName - */ - onCardAdd(newCardName): void - { - if ( newCardName === '' ) - { - return; - } - - this._scrumboardService.addCard(this.list.id, new Card({name: newCardName})); - - setTimeout(() => { - this.listScroll.scrollToBottom(0, 400); - }); - } - - /** - * Remove list - * - * @param listId - */ - removeList(listId): void - { - this.confirmDialogRef = this._matDialog.open(FuseConfirmDialogComponent, { - disableClose: false - }); - - this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete the list and it\'s all cards?'; - - this.confirmDialogRef.afterClosed().subscribe(result => { - if ( result ) - { - this._scrumboardService.removeList(listId); - } - }); - } - - /** - * Open card dialog - * - * @param cardId - */ - openCardDialog(cardId): void - { - this.dialogRef = this._matDialog.open(ScrumboardCardDialogComponent, { - panelClass: 'scrumboard-card-dialog', - data : { - cardId: cardId, - listId: this.list.id - } - }); - this.dialogRef.afterClosed() - .subscribe(response => { - - }); - } - - /** - * On drop - * - * @param ev - */ - onDrop(ev): void - { - this._scrumboardService.updateBoard(); - } -} diff --git a/src/app/main/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts b/src/app/main/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts deleted file mode 100644 index 239ee075..00000000 --- a/src/app/main/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { MatColors } from '@fuse/mat-colors'; - -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; - -@Component({ - selector : 'scrumboard-board-color-selector', - templateUrl: './board-color-selector.component.html', - styleUrls : ['./board-color-selector.component.scss'] -}) -export class ScrumboardBoardColorSelectorComponent implements OnInit, OnDestroy -{ - colors: any; - board: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ScrumboardService} _scrumboardService - */ - constructor( - private _scrumboardService: ScrumboardService - ) - { - // Set the defaults - this.colors = MatColors.all; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._scrumboardService.onBoardChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(board => { - this.board = board; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Set the color - * - * @param color - */ - setColor(color): void - { - this.board.settings.color = color; - this._scrumboardService.updateBoard(); - } -} diff --git a/src/app/main/apps/scrumboard/board/sidenavs/settings/settings.component.ts b/src/app/main/apps/scrumboard/board/sidenavs/settings/settings.component.ts deleted file mode 100644 index 95d3b273..00000000 --- a/src/app/main/apps/scrumboard/board/sidenavs/settings/settings.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; - -import { fuseAnimations } from '@fuse/animations'; -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector : 'scrumboard-board-settings', - templateUrl: './settings.component.html', - styleUrls : ['./settings.component.scss'], - animations : fuseAnimations -}) -export class ScrumboardBoardSettingsSidenavComponent implements OnInit, OnDestroy -{ - board: any; - view: string; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private scrumboardService: ScrumboardService - ) - { - // Set the defaults - this.view = 'main'; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.scrumboardService.onBoardChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(board => { - this.board = board; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle card cover - */ - toggleCardCover(): void - { - this.board.settings.cardCoverImages = !this.board.settings.cardCoverImages; - this.scrumboardService.updateBoard(); - } - - /** - * Toggle subscription - */ - toggleSubscription(): void - { - this.board.settings.subscribed = !this.board.settings.subscribed; - this.scrumboardService.updateBoard(); - } -} diff --git a/src/app/main/apps/scrumboard/scrumboard.component.ts b/src/app/main/apps/scrumboard/scrumboard.component.ts deleted file mode 100644 index b35fc570..00000000 --- a/src/app/main/apps/scrumboard/scrumboard.component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; -import { Board } from 'app/main/apps/scrumboard/board.model'; - -@Component({ - selector : 'scrumboard', - templateUrl: './scrumboard.component.html', - styleUrls : ['./scrumboard.component.scss'], - animations : fuseAnimations -}) -export class ScrumboardComponent implements OnInit, OnDestroy -{ - boards: any[]; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {Router} _router - * @param {ScrumboardService} _scrumboardService - */ - constructor( - private _router: Router, - private _scrumboardService: ScrumboardService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._scrumboardService.onBoardsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(boards => { - this.boards = boards; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * New board - */ - newBoard(): void - { - const newBoard = new Board({}); - this._scrumboardService.createNewBoard(newBoard).then(() => { - this._router.navigate(['/apps/scrumboard/boards/' + newBoard.id + '/' + newBoard.uri]); - }); - } -} diff --git a/src/app/main/apps/scrumboard/scrumboard.module.ts b/src/app/main/apps/scrumboard/scrumboard.module.ts deleted file mode 100644 index eba8e392..00000000 --- a/src/app/main/apps/scrumboard/scrumboard.module.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatCheckboxModule, MatChipsModule, MatDatepickerModule, MatDialogModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatProgressBarModule, MatRippleModule, MatSidenavModule, MatToolbarModule, MatTooltipModule } from '@angular/material'; -import { NgxDnDModule } from '@swimlane/ngx-dnd'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseConfirmDialogModule, FuseMaterialColorPickerModule } from '@fuse/components'; - -import { BoardResolve, ScrumboardService } from 'app/main/apps/scrumboard/scrumboard.service'; -import { ScrumboardComponent } from 'app/main/apps/scrumboard/scrumboard.component'; -import { ScrumboardBoardComponent } from 'app/main/apps/scrumboard/board/board.component'; -import { ScrumboardBoardListComponent } from 'app/main/apps/scrumboard/board/list/list.component'; -import { ScrumboardBoardCardComponent } from 'app/main/apps/scrumboard/board/list/card/card.component'; -import { ScrumboardBoardEditListNameComponent } from 'app/main/apps/scrumboard/board/list/edit-list-name/edit-list-name.component'; -import { ScrumboardBoardAddCardComponent } from 'app/main/apps/scrumboard/board/list/add-card/add-card.component'; -import { ScrumboardBoardAddListComponent } from 'app/main/apps/scrumboard/board/add-list/add-list.component'; -import { ScrumboardCardDialogComponent } from 'app/main/apps/scrumboard/board/dialogs/card/card.component'; -import { ScrumboardLabelSelectorComponent } from 'app/main/apps/scrumboard/board/dialogs/card/label-selector/label-selector.component'; -import { ScrumboardEditBoardNameComponent } from 'app/main/apps/scrumboard/board/edit-board-name/edit-board-name.component'; -import { ScrumboardBoardSettingsSidenavComponent } from 'app/main/apps/scrumboard/board/sidenavs/settings/settings.component'; -import { ScrumboardBoardColorSelectorComponent } from 'app/main/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component'; - -const routes: Routes = [ - { - path : 'boards', - component: ScrumboardComponent, - resolve : { - scrumboard: ScrumboardService - } - }, - { - path : 'boards/:boardId/:boardUri', - component: ScrumboardBoardComponent, - resolve : { - board: BoardResolve - } - }, - { - path : '**', - redirectTo: 'boards' - } -]; - -@NgModule({ - declarations : [ - ScrumboardComponent, - ScrumboardBoardComponent, - ScrumboardBoardListComponent, - ScrumboardBoardCardComponent, - ScrumboardBoardEditListNameComponent, - ScrumboardBoardAddCardComponent, - ScrumboardBoardAddListComponent, - ScrumboardCardDialogComponent, - ScrumboardLabelSelectorComponent, - ScrumboardEditBoardNameComponent, - ScrumboardBoardSettingsSidenavComponent, - ScrumboardBoardColorSelectorComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatCheckboxModule, - MatChipsModule, - MatDatepickerModule, - MatDialogModule, - MatFormFieldModule, - MatIconModule, - MatInputModule, - MatListModule, - MatMenuModule, - MatProgressBarModule, - MatRippleModule, - MatSidenavModule, - MatToolbarModule, - MatTooltipModule, - - NgxDnDModule, - - FuseSharedModule, - FuseConfirmDialogModule, - FuseMaterialColorPickerModule - ], - providers : [ - ScrumboardService, - BoardResolve - ], - entryComponents: [ScrumboardCardDialogComponent] -}) -export class ScrumboardModule -{ -} diff --git a/src/app/main/apps/todo/sidebars/main/main-sidebar.component.ts b/src/app/main/apps/todo/sidebars/main/main-sidebar.component.ts deleted file mode 100644 index bf636191..00000000 --- a/src/app/main/apps/todo/sidebars/main/main-sidebar.component.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; - -import { TodoService } from 'app/main/apps/todo/todo.service'; - -@Component({ - selector : 'todo-main-sidebar', - templateUrl: './main-sidebar.component.html', - styleUrls : ['./main-sidebar.component.scss'], - animations : fuseAnimations -}) -export class TodoMainSidebarComponent implements OnInit, OnDestroy -{ - folders: any[]; - filters: any[]; - tags: any[]; - accounts: object; - selectedAccount: string; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {TodoService} _todoService - * @param {Router} _router - */ - constructor( - private _todoService: TodoService, - private _router: Router - ) - { - // Set the defaults - this.accounts = { - 'creapond' : 'johndoe@creapond.com', - 'withinpixels': 'johndoe@withinpixels.com' - }; - this.selectedAccount = 'creapond'; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._todoService.onFiltersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(filters => { - this.filters = filters; - }); - - this._todoService.onTagsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(tags => { - this.tags = tags; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * New todo - */ - newTodo(): void - { - this._router.navigate(['/apps/todo/all']).then(() => { - setTimeout(() => { - this._todoService.onNewTodoClicked.next(''); - }); - }); - } -} diff --git a/src/app/main/apps/todo/todo-details/todo-details.component.ts b/src/app/main/apps/todo/todo-details/todo-details.component.ts deleted file mode 100644 index 07f6b6fc..00000000 --- a/src/app/main/apps/todo/todo-details/todo-details.component.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { FuseUtils } from '@fuse/utils'; -import { fuseAnimations } from '@fuse/animations'; - -import { Todo } from 'app/main/apps/todo/todo.model'; -import { TodoService } from 'app/main/apps/todo/todo.service'; - -@Component({ - selector : 'todo-details', - templateUrl: './todo-details.component.html', - styleUrls : ['./todo-details.component.scss'], - animations : fuseAnimations -}) -export class TodoDetailsComponent implements OnInit, OnDestroy -{ - todo: Todo; - tags: any[]; - formType: string; - todoForm: FormGroup; - - @ViewChild('titleInput') - titleInputField; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {TodoService} _todoService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _todoService: TodoService, - private _formBuilder: FormBuilder - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update the current todo - this._todoService.onCurrentTodoChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(([todo, formType]) => { - - if ( todo && formType === 'edit' ) - { - this.formType = 'edit'; - this.todo = todo; - this.todoForm = this.createTodoForm(); - - this.todoForm.valueChanges - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(500), - distinctUntilChanged() - ) - .subscribe(data => { - this._todoService.updateTodo(data); - }); - } - }); - - // Subscribe to update on tag change - this._todoService.onTagsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(labels => { - this.tags = labels; - }); - - // Subscribe to update on tag change - this._todoService.onNewTodoClicked - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.todo = new Todo({}); - this.todo.id = FuseUtils.generateGUID(); - this.formType = 'new'; - this.todoForm = this.createTodoForm(); - this.focusTitleField(); - this._todoService.onCurrentTodoChanged.next([this.todo, 'new']); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Focus title field - */ - focusTitleField(): void - { - setTimeout(() => { - this.titleInputField.nativeElement.focus(); - }); - } - - /** - * Create todo form - * - * @returns {FormGroup} - */ - createTodoForm(): FormGroup - { - return this._formBuilder.group({ - 'id' : [this.todo.id], - 'title' : [this.todo.title], - 'notes' : [this.todo.notes], - 'startDate': [this.todo.startDate], - 'dueDate' : [this.todo.dueDate], - 'completed': [this.todo.completed], - 'starred' : [this.todo.starred], - 'important': [this.todo.important], - 'deleted' : [this.todo.deleted], - 'tags' : [this.todo.tags] - }); - } - - /** - * Toggle star - * - * @param event - */ - toggleStar(event): void - { - event.stopPropagation(); - this.todo.toggleStar(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle important - * - * @param event - */ - toggleImportant(event): void - { - event.stopPropagation(); - this.todo.toggleImportant(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle Completed - * - * @param event - */ - toggleCompleted(event): void - { - event.stopPropagation(); - this.todo.toggleCompleted(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle Deleted - * - * @param event - */ - toggleDeleted(event): void - { - event.stopPropagation(); - this.todo.toggleDeleted(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle tag on todo - * - * @param tagId - */ - toggleTagOnTodo(tagId): void - { - this._todoService.toggleTagOnTodo(tagId, this.todo); - } - - /** - * Has tag? - * - * @param tagId - * @returns {any} - */ - hasTag(tagId): any - { - return this._todoService.hasTag(tagId, this.todo); - } - - /** - * Add todo - */ - addTodo(): void - { - this._todoService.updateTodo(this.todoForm.getRawValue()); - } -} diff --git a/src/app/main/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts b/src/app/main/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts deleted file mode 100644 index 75d9a1ef..00000000 --- a/src/app/main/apps/todo/todo-list/todo-list-item/todo-list-item.component.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { Component, HostBinding, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Subject, Subscription } from 'rxjs'; -import { Todo } from 'app/main/apps/todo/todo.model'; -import { TodoService } from 'app/main/apps/todo/todo.service'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector : 'todo-list-item', - templateUrl : './todo-list-item.component.html', - styleUrls : ['./todo-list-item.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class TodoListItemComponent implements OnInit, OnDestroy -{ - tags: any[]; - - @Input() - todo: Todo; - - @HostBinding('class.selected') - selected: boolean; - - @HostBinding('class.completed') - completed: boolean; - - @HostBinding('class.move-disabled') - moveDisabled: boolean; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {TodoService} _todoService - * @param {ActivatedRoute} _activatedRoute - */ - constructor( - private _todoService: TodoService, - private _activatedRoute: ActivatedRoute - ) - { - // Disable move if path is not /all - if ( _activatedRoute.snapshot.url[0].path !== 'all' ) - { - this.moveDisabled = true; - } - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Set the initial values - this.todo = new Todo(this.todo); - this.completed = this.todo.completed; - - // Subscribe to update on selected todo change - this._todoService.onSelectedTodosChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedTodos => { - this.selected = false; - - if ( selectedTodos.length > 0 ) - { - for ( const todo of selectedTodos ) - { - if ( todo.id === this.todo.id ) - { - this.selected = true; - break; - } - } - } - }); - - // Subscribe to update on tag change - this._todoService.onTagsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(tags => { - this.tags = tags; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On selected change - */ - onSelectedChange(): void - { - this._todoService.toggleSelectedTodo(this.todo.id); - } - - /** - * Toggle star - */ - toggleStar(event): void - { - event.stopPropagation(); - - this.todo.toggleStar(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle Important - */ - toggleImportant(event): void - { - event.stopPropagation(); - - this.todo.toggleImportant(); - this._todoService.updateTodo(this.todo); - } - - /** - * Toggle Completed - */ - toggleCompleted(event): void - { - event.stopPropagation(); - - this.todo.toggleCompleted(); - this._todoService.updateTodo(this.todo); - } -} diff --git a/src/app/main/apps/todo/todo-list/todo-list.component.html b/src/app/main/apps/todo/todo-list/todo-list.component.html deleted file mode 100644 index 8fb8f82a..00000000 --- a/src/app/main/apps/todo/todo-list/todo-list.component.html +++ /dev/null @@ -1,14 +0,0 @@ -
- There are no todos! -
-
- - -
diff --git a/src/app/main/apps/todo/todo-list/todo-list.component.ts b/src/app/main/apps/todo/todo-list/todo-list.component.ts deleted file mode 100644 index 3f006da4..00000000 --- a/src/app/main/apps/todo/todo-list/todo-list.component.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Location } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { Subject } from 'rxjs'; - -import { fuseAnimations } from '@fuse/animations'; - -import { Todo } from 'app/main/apps/todo/todo.model'; -import { TodoService } from 'app/main/apps/todo/todo.service'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector : 'todo-list', - templateUrl: './todo-list.component.html', - styleUrls : ['./todo-list.component.scss'], - animations : fuseAnimations -}) -export class TodoListComponent implements OnInit, OnDestroy -{ - todos: Todo[]; - currentTodo: Todo; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ActivatedRoute} _activatedRoute - * @param {TodoService} _todoService - * @param {Location} _location - */ - constructor( - private _activatedRoute: ActivatedRoute, - private _todoService: TodoService, - private _location: Location - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - // Subscribe to update todos on changes - this._todoService.onTodosChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(todos => { - this.todos = todos; - }); - - // Subscribe to update current todo on changes - this._todoService.onCurrentTodoChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(currentTodo => { - if ( !currentTodo ) - { - // Set the current todo id to null to deselect the current todo - this.currentTodo = null; - - // Handle the location changes - const tagHandle = this._activatedRoute.snapshot.params.tagHandle, - filterHandle = this._activatedRoute.snapshot.params.filterHandle; - - if ( tagHandle ) - { - this._location.go('apps/todo/tag/' + tagHandle); - } - else if ( filterHandle ) - { - this._location.go('apps/todo/filter/' + filterHandle); - } - else - { - this._location.go('apps/todo/all'); - } - } - else - { - this.currentTodo = currentTodo; - } - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Read todo - * - * @param todoId - */ - readTodo(todoId): void - { - // Set current todo - this._todoService.setCurrentTodo(todoId); - } - - /** - * On drop - * - * @param ev - */ - onDrop(ev): void - { - - } -} diff --git a/src/app/main/apps/todo/todo.component.html b/src/app/main/apps/todo/todo.component.html deleted file mode 100644 index bd120432..00000000 --- a/src/app/main/apps/todo/todo.component.html +++ /dev/null @@ -1,93 +0,0 @@ - diff --git a/src/app/main/apps/todo/todo.component.ts b/src/app/main/apps/todo/todo.component.ts deleted file mode 100644 index d3f22a4b..00000000 --- a/src/app/main/apps/todo/todo.component.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -import { Todo } from 'app/main/apps/todo/todo.model'; -import { TodoService } from 'app/main/apps/todo/todo.service'; - -@Component({ - selector : 'todo', - templateUrl: './todo.component.html', - styleUrls : ['./todo.component.scss'], - animations : fuseAnimations -}) -export class TodoComponent implements OnInit, OnDestroy -{ - hasSelectedTodos: boolean; - isIndeterminate: boolean; - filters: any[]; - tags: any[]; - searchInput: FormControl; - currentTodo: Todo; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - * @param {TodoService} _todoService - */ - constructor( - private _fuseSidebarService: FuseSidebarService, - private _todoService: TodoService - ) - { - // Set the defaults - this.searchInput = new FormControl(''); - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._todoService.onSelectedTodosChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(selectedTodos => { - - setTimeout(() => { - this.hasSelectedTodos = selectedTodos.length > 0; - this.isIndeterminate = (selectedTodos.length !== this._todoService.todos.length && selectedTodos.length > 0); - }, 0); - }); - - this._todoService.onFiltersChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(folders => { - this.filters = this._todoService.filters; - }); - - this._todoService.onTagsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(tags => { - this.tags = this._todoService.tags; - }); - - this.searchInput.valueChanges - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(300), - distinctUntilChanged() - ) - .subscribe(searchText => { - this._todoService.onSearchTextChanged.next(searchText); - }); - - this._todoService.onCurrentTodoChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(([currentTodo, formType]) => { - if ( !currentTodo ) - { - this.currentTodo = null; - } - else - { - this.currentTodo = currentTodo; - } - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Deselect current todo - */ - deselectCurrentTodo(): void - { - this._todoService.onCurrentTodoChanged.next([null, null]); - } - - /** - * Toggle select all - */ - toggleSelectAll(): void - { - this._todoService.toggleSelectAll(); - } - - /** - * Select todos - * - * @param filterParameter - * @param filterValue - */ - selectTodos(filterParameter?, filterValue?): void - { - this._todoService.selectTodos(filterParameter, filterValue); - } - - /** - * Deselect todos - */ - deselectTodos(): void - { - this._todoService.deselectTodos(); - } - - /** - * Toggle tag on selected todos - * - * @param tagId - */ - toggleTagOnSelectedTodos(tagId): void - { - this._todoService.toggleTagOnSelectedTodos(tagId); - } - - /** - * Toggle the sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.component.ts b/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.component.ts deleted file mode 100644 index e69c2256..00000000 --- a/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'mail-confirm', - templateUrl: './mail-confirm.component.html', - styleUrls : ['./mail-confirm.component.scss'], - animations : fuseAnimations -}) -export class MailConfirmComponent -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.module.ts b/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.module.ts deleted file mode 100644 index e69c2256..00000000 --- a/src/app/main/content/pages/authentication/mail-confirm/mail-confirm.module.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'mail-confirm', - templateUrl: './mail-confirm.component.html', - styleUrls : ['./mail-confirm.component.scss'], - animations : fuseAnimations -}) -export class MailConfirmComponent -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/content/ui/page-layouts/blank/blank.component.html b/src/app/main/content/ui/page-layouts/blank/blank.component.html deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/documentation/changelog/changelog.component.html b/src/app/main/documentation/changelog/changelog.component.html deleted file mode 100644 index 22803863..00000000 --- a/src/app/main/documentation/changelog/changelog.component.html +++ /dev/null @@ -1,938 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation -
- -
Changelog
- -
- - - -
- -
- - - - -
- -
- v6.1.0 - (2018-06-xx) -
- -
- -
- Breaking Changes -
    -
  • New layout system and layouts
  • -
  • Replaced all mat-sidenav components with fuse-sidebar on apps and pages
  • -
-
- -
- New -
    -
  • Navigation service for easier modifications and for easier swapping
  • -
  • fusePerfectScrollbar now accepts a boolean to control the scrollbar's status
  • -
  • fusePerfectScrollbarOptions for Perfect Scrollbar options
  • -
  • Added an extra Angular Material color theme to the styles.scss file as an example
  • -
-
- -
- Improved -
    -
  • Updated Angular and Angular Material
  • -
  • Updated various other packages
  • -
  • Improved the codebase and added a lot code comments
  • -
  • Improved the documentation and moved them into the Demo app
  • -
  • Changed the fuse-sidebar "align" input to "position"
  • -
  • Improved the page layouts
  • -
  • Navbar toggle button and fold button alignment on right navbar
  • -
-
- -
- Fixed -
    -
  • Set the selected language in toolbar from the translation service
  • -
  • Horizontal nav titles are collapsing on IE11
  • -
  • Angular Material card images not showing correctly
  • -
  • Other small fixes and improvements
  • -
-
- -
- -
- - - - -
- -
- v6.0.1 - (2018-05-10) -
- -
- -
- New -
    -
  • Updated ngRx to 6.0.0-beta.1
  • -
  • Updated various other libraries to Angular 6 compatible versions
  • -
  • Updated demo code to make it compatible with RxJS 6.0.0
  • -
-
- -
- Fixed -
    -
  • Fixed: Scrumboard "Add a list" button is draggable and causing an error
  • -
-
- -
- -
- - - - -
- -
- v6.0.0 - (2018-05-06) -
- -
- -
- New -
    -
  • Updated Angular to 6.0.0
  • -
  • Updated Angular Material to 6.0.0
  • -
  • Updated Angular CLI to 6.0.0
  • -
  • Updated various other packages
  • -
-
- -
- Fixed -
    -
  • Fixed: Material icon button colors are being overwritten by Fuse
  • -
  • Fixed: Contacts app edit dialog issues
  • -
  • Fixed: Navigation sidebar doesn't scroll on mobile devices
  • -
  • Fixed: Horizontal navigation doesn't have 'hidden' and 'custom function' features like - the vertical - navigation -
  • -
  • Fixed: Search bar close icon alignment
  • -
  • Fixed: Profile page header background image doesn't cover the header
  • -
-
- -
- -
- - - - -
- -
- v5.2.10 - (2018-03-10) -
- -
- -
- Fixed -
    -
  • Fixed: Sidebar folded bugs
  • -
-
- -
- -
- - - - -
- -
- v5.2.9 - (2018-03-10) -
- -
- -
- Fixed -
    -
  • Fixed: Sidebar folded doesn't work correctly if activated programmatically
  • -
  • Fixed: Skeleton AoT building issues
  • -
-
- -
- -
- - - - -
- -
- v5.2.8 - (2018-03-08) -
- -
- -
- Breaking changes -
    -
  • - core folder moved into the @fuse allowing project owners to - have their own core folder inside the app directory. Also allows for better separation - in between your app and core Fuse features. -
  • -
  • - Removed Angular Material module that includes all Material components at once and added - imports for all modules separately. From now on, you must include the Material - components that you have used in your components manually in that component's module - file. This was a required changed as it does increase the development performance as - well as decrease the building and the AoT building times. -
  • -
  • - Changed how navigation model works. Now it's just a simple const that being exported - from the navigation.ts file. It allows for easier swapping and editing of - the navigation. -
  • -
  • - New sidebar component. Allows us to move main navigation sidebar logic out of your way. - Check out the Demo app to see the full usage. -
  • -
-
- -
- New -
    -
  • Updated Angular to 5.2.8
  • -
  • Updated Angular Material to 5.2.4
  • -
  • Updated Angular CLI to 1.7.3
  • -
  • Matched the Fuse version number with the Angular
  • -
  • No more Fuse2, the package name update to Fuse since the version number matched to - Angular's. -
  • -
-
- -
- Fixed -
    -
  • Fixed various issues with Fuse Angular Material Color Picker component.
  • -
  • Fixed various other small layout and logic bugs.
  • -
-
- -
- -
- - - - -
- -
- v1.3.6 - (2018-02-06) -
- -
- -
- New -
    -
  • Updated Angular to 5.2.3
  • -
  • Updated Angular Material to 5.1.1
  • -
  • Updated Angular CLI to 1.6.7
  • -
  • New Analytics dashboard design
  • -
  • Added Chart.js examples through the new dashboard
  • -
-
- -
- -
- - - - -
- -
- v1.3.5 - (2018-01-24) -
- -
- -
- New -
    -
  • Updated ngRx to 5.0.0
  • -
  • Updated Angular CLI to 1.6.5 to fix the wrong devkit version issue
  • -
-
- -
- -
- - - - -
- -
- v1.3.4 - (2018-01-18) -
- -
- -
- New -
    -
  • Updated Angular to 5.2.1
  • -
  • Updated Angular Material to 5.1.0
  • -
  • Updated various other packages to latest versions
  • -
-
- -
- Fixed -
    -
  • Quick Panel is too wide for smaller screens
  • -
  • Academy App course step doesn't scroll on mobile
  • -
-
- -
- -
- - - - -
- -
- v1.3.3 - (2018-01-11) -
- -
- -
- New -
    -
  • Updated Angular to 5.2.0
  • -
  • Updated Angular Material to 5.0.4
  • -
  • Updated various other packages to latest versions
  • -
-
- -
- Fixed - -
- -
- -
- - - - -
- -
- v1.3.2 - (2018-01-09) -
- -
- -
- New -
    -
  • Updated Angular to 5.1.3
  • -
  • Updated Angular Material to 5.0.3
  • -
  • Updated various other packages to latest versions
  • -
  • Added new card designs
  • -
  • Added new fuse-highlight component
  • -
  • Added lazy load to various other demo modules to make the demo project faster
  • -
-
- -
- Fixed -
    -
  • BREAKING CHANGE: Cards are moved to custom classes
  • -
  • BREAKING CHANGE: Removed fuse-hljs (Use fuse-highlight instead)
  • -
  • Various other small fixed and enhancements
  • -
-
- -
- -
- - - - -
- -
- v1.3.1 - (2018-01-02) -
- -
- -
- New -
    -
  • Updated Angular to 5.1.2
  • -
  • Updated Angular Material to 5.0.2
  • -
  • Updated various other packages to latest versions
  • -
  • New Academy app
  • -
-
- -
- Fixed -
    -
  • Mail compose dialog responsive issues
  • -
  • Fixed for various other bugs
  • -
-
- -
- -
- - - - -
- -
- v1.3.0 - (2017-12-15) -
- -
- -
- New -
    -
  • Updated Angular to 5.1.0
  • -
  • Updated Angular Material to 5.0.1
  • -
  • Updated various other packages to latest versions
  • -
  • New NgRx Sample app (Mail-NgRx app)
  • -
  • Form stepper examples
  • -
  • Added support for translations in navigation items
  • -
  • Moved the navigation.model.ts into its own folder
  • -
  • Added badge support for collapsable navigation items
  • -
  • Initialize the navigation from app.component rather then navigation.service
  • -
  • Trigger expand/collapse of the navigation on ngOnInit to update the active item
  • -
  • Replaced Calendar images
  • -
  • Added custom validator for password matching in Auth forms
  • -
-
- -
- Fixed -
    -
  • Custom scrollbars are showing in print
  • -
  • Various small issues in Auth pages
  • -
  • ngx-color-picker various style issues
  • -
  • Make sure the nav item has children before trying to get them
  • -
  • Renamed the KnowledgeBase demo module
  • -
-
- -
- -
- - - - -
- -
- v1.2.3 - (2017-11-28) -
- -
- -
- Fixed -
    -
  • Sidenav helper causes issues in mobile media steps
  • -
-
- -
- -
- - - - -
- -
- v1.2.2 - (2017-11-27) -
- -
- -
- New -
    -
  • Updated Angular to 5.0.3
  • -
  • Updated Angular Material to 5.0.0-rc.1
  • -
  • Updated Flex Layout
  • -
-
- -
- Fixed -
    -
  • Contacts app various issues
  • -
  • Duplicate content in Profile page tabs
  • -
  • Folded status of the Navbar shouldn't brake the layout if Horizontal Navbar is active -
  • -
-
- -
- -
- - - - -
- -
- v1.2.1 - (2017-11-13) -
- -
- -
- New -
    -
  • Updated Angular to 5.0.1
  • -
  • Updated Angular Material to 5.0.0-rc0
  • -
-
- -
- Fixed -
    -
  • Compatibility fixed for Angular Material 5.0.0-rc0
  • -
  • Scrumboard label selector not working properly
  • -
  • Todo detail style refinements
  • -
-
- -
- -
- - - - -
- -
- v1.2.0 - (2017-11-06) -
- -
- -
- New -
    -
  • BREAKING CHANGE: Updated Angular to 5.0.0 (clean installation recommended)
  • -
  • Updated Angular Flex Layout to 2.0.0-beta.10
  • -
  • E-Commerce App
  • -
  • File based translation service and its implementation example
  • -
  • Added Material Design cards
  • -
  • New 'Knowledge Base' page design
  • -
  • Added Tabbed versions of the Carded Sidenav layouts
  • -
  • Added an ability to control the folded status of the vertical navigation via - FuseConfig -
  • -
  • - Added 'exactMatch' property to the Navigation Model for more control over the active - item - highlighting -
  • -
-
- -
- Fixed -
    -
  • Angular 5 Compatibility fixed
  • -
  • Various iOS10 scrolling issues
  • -
  • FAQ page header shrinks on small heights
  • -
  • Stagger animation doesn't have 'optional' parameter
  • -
  • Toolbar navigation toggle button doesn't actually toggle the navigation bar
  • -
  • Nav items cannot be put on the root in Horizontal menu
  • -
  • Vertical navbar puts out wrong classes when its toggled
  • -
-
- -
- -
- - - - -
- -
- v1.1.2 - (2017-10-16) -
- -
- -
- New -
    -
  • BREAKING CHANGE: Updated Angular Material to 2.0.0-beta.12
  • -
  • Updated Angular to 4.4.5
  • -
  • New Reset and Forgot password page styles
  • -
  • Added 'agm-map', Google Maps component library.
  • -
  • New pricing page design
  • -
  • New mail confirmation page
  • -
  • New FAQ page design
  • -
  • Added new methods for accessing and updating specific nav items
  • -
  • Added the ability to add custom functions to the nav items
  • -
-
- -
- Fixed -
    -
  • Print styles and page breaks
  • -
  • Inconsistent font sizes across elements
  • -
  • Toolbar search bar button collapses on close
  • -
  • iOS scrolling issues
  • -
  • All 'mat-select' elements wrapped with 'mat-form-field' and fixed related issues
  • -
  • Auth page v2 styles iOS height issues
  • -
  • Chat view is not scrollable on mobile
  • -
  • Terms & Conditions checkbox styling issues on Auth forms
  • -
  • Some page layout header heights not correct on small devices
  • -
  • Lock page layout issues
  • -
  • Calendar & Scrumboard datepicker issues
  • -
-
- -
- -
- - - - -
- -
- v1.1.1 - (2017-09-28) -
- -
- -
- New -
    -
  • Updated Angular Material to 2.0.0-beta.11
  • -
  • Nested grouping in navigation
  • -
  • Added Angular Material elements showcase
  • -
-
- -
- Improved -
    -
  • Replaced Http module with HttpClient
  • -
-
- -
- -
- - - - -
- -
- v1.1.0 - (2017-09-22) -
- -
- -
- New -
    -
  • Updated Angular to 4.4.3
  • -
  • Added HMR config for starting the ng serve with HMR support
  • -
  • Added a way to swap navigation models on the fly
  • -
  • Enhanced animations for all apps and some pages
  • -
  • Custom perfect scrollbar directive
  • -
  • Navigation bar backdrop for closing the navigation easily on mobile
  • -
-
- -
- Improved -
    -
  • BREAKING CHANGE: Completely re-structured the navigation model
  • -
  • Locked dev dependency versions to prevent majority of the npm update errors
  • -
  • Updated perfect scrollbar
  • -
  • Calendar, Mail, ToDo and Chat app visual and structural Improved
  • -
  • Disabled the perfect-scrollbar on mobile completely
  • -
-
- -
- -
- - - - -
- -
- v1.0.5 - (2017-09-12) -
- -
- -
- New -
    -
  • Horizontal Navigation
  • -
  • Boxed Layout
  • -
  • New fade-in-out animation to Animations service
  • -
-
- -
- Improved -
    -
  • Scrumboard & Chat style Improved
  • -
-
- -
- Fixed -
    -
  • Removed unused md2 library from skeleton
  • -
-
- -
- -
- - - - -
- -
- v1.0.4 - (2017-08-31) -
- -
- -
- New -
    -
  • Scrumboard App
  • -
-
- -
- Improved -
    -
  • Responsive Improved, many more will come
  • -
-
- -
- Fixed -
    -
  • Dashboard sidenav not correctly working on some mobile devices
  • -
  • Couple MS Edge issues
  • -
-
- -
- -
- - - - -
- -
- v1.0.3 - (2017-08-30) -
- -
- -
- Fixed -
    -
  • Reverted to Angular 4.3.5 since animations are not correctly working on 4.3.6
  • -
  • Firefox and Edge scroll issues
  • -
-
- -
- -
- - - - -
- -
- v1.0.2 - (2017-08-30) -
- -
- -
- Improved -
    -
  • Angular Material v2.0.0-beta.10 Compatibility
  • -
  • Upgraded to Angular 4.3.6
  • -
  • Shortcuts component now stores the shortcuts in cookies
  • -
  • Added print styles
  • -
-
- -
- -
- - - - -
- -
- v1.0.1 - (2017-08-24) -
- -
- -
- Improved -
    -
  • New router animations
  • -
-
- -
- Fixed -
    -
  • Fixed AoT compiler issues
  • -
-
- -
- -
- - - - -
- -
- v1.0.0 - (2017-08-23) -
- -
- -
- New -
    -
  • Initial Release
  • -
-
- -
- -
- -
- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/changelog/changelog.component.scss b/src/app/main/documentation/changelog/changelog.component.scss deleted file mode 100644 index 6fef4203..00000000 --- a/src/app/main/documentation/changelog/changelog.component.scss +++ /dev/null @@ -1,6 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - - -} diff --git a/src/app/main/documentation/changelog/changelog.component.ts b/src/app/main/documentation/changelog/changelog.component.ts deleted file mode 100644 index 4df00d74..00000000 --- a/src/app/main/documentation/changelog/changelog.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-changelog', - templateUrl: './changelog.component.html', - styleUrls : ['./changelog.component.scss'] -}) -export class DocsChangelogComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.ts b/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.ts deleted file mode 100644 index de775ca4..00000000 --- a/src/app/main/documentation/components-third-party/datatable/ngx-datatable.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector : 'docs-components-third-party-ngx-datatable', - templateUrl: './ngx-datatable.component.html', - styleUrls : ['./ngx-datatable.component.scss'] -}) -export class DocsComponentsThirdPartyNgxDatatableComponent implements OnInit, OnDestroy -{ - rows: any[]; - loadingIndicator: boolean; - reorderable: boolean; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {HttpClient} _httpClient - */ - constructor( - private _httpClient: HttpClient - ) - { - // Set the defaults - this.loadingIndicator = true; - this.reorderable = true; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._httpClient.get('api/contacts-contacts') - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((contacts: any) => { - this.rows = contacts; - this.loadingIndicator = false; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html b/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html deleted file mode 100644 index 5818799f..00000000 --- a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.html +++ /dev/null @@ -1,57 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - 3rd Party Components -
-
Google Maps
-
- - - link - Reference - -
- - - -
-

- agm-map is a angular component library for Google Maps. -

- -
Sample
-

- - - -

- -
Usage
-

- - - -

- -
Inputs
- Checkout the component api docs for detail: - AgmMap Api - -
- -
- diff --git a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.ts b/src/app/main/documentation/components-third-party/google-maps/google-maps.component.ts deleted file mode 100644 index 2796c709..00000000 --- a/src/app/main/documentation/components-third-party/google-maps/google-maps.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-components-third-party-google-maps', - templateUrl: './google-maps.component.html', - styleUrls : ['./google-maps.component.scss'] -}) -export class DocsComponentsThirdPartyGoogleMapsComponent -{ - lat: number; - lng: number; - - /** - * Constructor - */ - constructor() - { - // Set the defaults - this.lat = -34.397; - this.lng = 150.644; - } -} diff --git a/src/app/main/documentation/components/cards/cards.component.ts b/src/app/main/documentation/components/cards/cards.component.ts deleted file mode 100644 index becba7c1..00000000 --- a/src/app/main/documentation/components/cards/cards.component.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { Component } from '@angular/core'; -import * as shape from 'd3-shape'; - -import { fuseAnimations } from '@fuse/animations/index'; - -@Component({ - selector : 'docs-components-cards', - templateUrl: './cards.component.html', - styleUrls : ['./cards.component.scss'], - animations : fuseAnimations -}) -export class DocsComponentsCardsComponent -{ - view: string; - card9Expanded: boolean; - card10Expanded: boolean; - card19: any; - card24: any; - card25: any; - card26: any; - - constructor() - { - // Set the defaults - this.view = 'preview'; - - this.card9Expanded = false; - this.card10Expanded = false; - this.card19 = { - scheme: { - domain: ['#5c84f1'] - }, - data : [ - { - 'name' : 'GOOG', - 'series': [ - { - 'name' : 'Jan 1', - 'value': 540.2 - }, - { - 'name' : 'Jan 2', - 'value': 539.4 - }, - { - 'name' : 'Jan 3', - 'value': 538.9 - }, - { - 'name' : 'Jan 4', - 'value': 539.6 - }, - { - 'name' : 'Jan 5', - 'value': 540 - }, - { - 'name' : 'Jan 6', - 'value': 540.2 - }, - { - 'name' : 'Jan 7', - 'value': 540.48 - } - ] - } - ], - curve : shape.curveBasis - }; - - this.card24 = { - scheme : { - domain: ['#4867d2', '#5c84f1', '#89a9f4'] - }, - devices: [ - { - 'name' : 'Desktop', - 'value' : 92.8, - 'change': -0.6 - }, - { - 'name' : 'Mobile', - 'value' : 6.1, - 'change': 0.7 - }, - { - 'name' : 'Tablet', - 'value' : 1.1, - 'change': 0.1 - } - ] - }; - - this.card25 = { - scheme: { - domain: ['#5c84f1'] - }, - data : [ - { - 'name' : 'Monday', - 'value': 221 - }, - { - 'name' : 'Tuesday', - 'value': 428 - }, - { - 'name' : 'Wednesday', - 'value': 492 - }, - { - 'name' : 'Thursday', - 'value': 471 - }, - { - 'name' : 'Friday', - 'value': 413 - }, - { - 'name' : 'Saturday', - 'value': 344 - }, - { - 'name' : 'Sunday', - 'value': 294 - } - ] - }; - - this.card26 = { - scheme: { - domain: ['#5c84f1'] - }, - data : [ - { - 'name' : 'Impressions', - 'series': [ - { - 'name' : 'Jan 1', - 'value': 670000 - }, - { - 'name' : 'Jan 2', - 'value': 540000 - }, - { - 'name' : 'Jan 3', - 'value': 820000 - }, - { - 'name' : 'Jan 4', - 'value': 570000 - }, - { - 'name' : 'Jan 5', - 'value': 720000 - }, - { - 'name' : 'Jan 6', - 'value': 570000 - }, - { - 'name' : 'Jan 7', - 'value': 870000 - }, - { - 'name' : 'Jan 8', - 'value': 720000 - }, - { - 'name' : 'Jan 9', - 'value': 890000 - }, - { - 'name' : 'Jan 10', - 'value': 987000 - }, - { - 'name' : 'Jan 11', - 'value': 1120000 - }, - { - 'name' : 'Jan 12', - 'value': 1360000 - }, - { - 'name' : 'Jan 13', - 'value': 1100000 - }, - { - 'name' : 'Jan 14', - 'value': 1490000 - }, - { - 'name' : 'Jan 15', - 'value': 980000 - } - ] - } - ], - curve : shape.curveBasis - }; - - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle the view - */ - toggleView(): void - { - if ( this.view === 'preview' ) - { - this.view = 'source'; - } - else - { - this.view = 'preview'; - } - } -} diff --git a/src/app/main/documentation/components/components.module.ts b/src/app/main/documentation/components/components.module.ts deleted file mode 100644 index d1d695ab..00000000 --- a/src/app/main/documentation/components/components.module.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { MatButtonModule, MatButtonToggleModule, MatFormFieldModule, MatIconModule, MatListModule, MatMenuModule, MatSelectModule, MatSlideToggleModule, MatTabsModule } from '@angular/material'; -import { NgxChartsModule } from '@swimlane/ngx-charts'; - -import { FuseSharedModule } from '@fuse/shared.module'; - -import { FuseCountdownModule, FuseHighlightModule, FuseMaterialColorPickerModule, FuseWidgetModule } from '@fuse/components'; -import { DocsComponentsCardsComponent } from 'app/main/documentation/components/cards/cards.component'; -import { DocsComponentsCountdownComponent } from 'app/main/documentation/components/countdown/countdown.component'; -import { DocsComponentsHighlightComponent } from 'app/main/documentation/components/highlight/highlight.component'; -import { DocsComponentsMaterialColorPickerComponent } from 'app/main/documentation/components/material-color-picker/material-color-picker.component'; -import { DocsComponentsNavigationComponent } from 'app/main/documentation/components/navigation/navigation.component'; -import { DocsComponentsSearchBarComponent } from 'app/main/documentation/components/search-bar/search-bar.component'; -import { DocsComponentsSidebarComponent } from 'app/main/documentation/components/sidebar/sidebar.component'; -import { DocsComponentsShortcutsComponent } from 'app/main/documentation/components/shortcuts/shortcuts.component'; -import { DocsComponentsWidgetComponent } from 'app/main/documentation/components/widget/widget.component'; - -const routes = [ - { - path : 'cards', - component: DocsComponentsCardsComponent - }, - { - path : 'countdown', - component: DocsComponentsCountdownComponent - }, - { - path : 'highlight', - component: DocsComponentsHighlightComponent - }, - { - path : 'material-color-picker', - component: DocsComponentsMaterialColorPickerComponent - }, - { - path : 'navigation', - component: DocsComponentsNavigationComponent - }, - { - path : 'search-bar', - component: DocsComponentsSearchBarComponent - }, - { - path : 'sidebar', - component: DocsComponentsSidebarComponent - }, - { - path : 'shortcuts', - component: DocsComponentsShortcutsComponent - }, - { - path : 'widget', - component: DocsComponentsWidgetComponent - } -]; - -@NgModule({ - declarations: [ - DocsComponentsCardsComponent, - DocsComponentsCountdownComponent, - DocsComponentsHighlightComponent, - DocsComponentsMaterialColorPickerComponent, - DocsComponentsNavigationComponent, - DocsComponentsSearchBarComponent, - DocsComponentsSidebarComponent, - DocsComponentsShortcutsComponent, - DocsComponentsWidgetComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatButtonToggleModule, - MatFormFieldModule, - MatIconModule, - MatListModule, - MatMenuModule, - MatSelectModule, - MatSlideToggleModule, - MatTabsModule, - - NgxChartsModule, - - FuseSharedModule, - - FuseCountdownModule, - FuseHighlightModule, - FuseMaterialColorPickerModule, - FuseWidgetModule - ] -}) -export class ComponentsModule -{ -} diff --git a/src/app/main/documentation/components/countdown/countdown.component.html b/src/app/main/documentation/components/countdown/countdown.component.html deleted file mode 100644 index c39da508..00000000 --- a/src/app/main/documentation/components/countdown/countdown.component.html +++ /dev/null @@ -1,51 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Components -
-
Countdown
-
-
- - - -
- -

- fuse-countdown is a custom built Fuse component allows you to create a countdowns. -

- -
Sample
-

- -

- -
Usage
-

- - - -

- -
Inputs
-

- eventDate - - The date of the event. Since fuse-countdown uses moment.js to parse the dates, any moment.js - compatible date string can be used. - -

- -
- -
- diff --git a/src/app/main/documentation/components/highlight/highlight.component.html b/src/app/main/documentation/components/highlight/highlight.component.html deleted file mode 100644 index db234e78..00000000 --- a/src/app/main/documentation/components/highlight/highlight.component.html +++ /dev/null @@ -1,68 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Components -
-
Highlight
-
-
- - - -
- -

- fuse-highlight is a custom built Fuse component allows to show syntax highlighted codes. -

- -
Sample
-

- - - - - -

- -
Usage
-

- - - -

- -
Inputs
-

- lang - - Language of the code to be highlighted. - -

- -
- -
- diff --git a/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html b/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html deleted file mode 100644 index bd4633fa..00000000 --- a/src/app/main/documentation/components/material-color-picker/material-color-picker.component.html +++ /dev/null @@ -1,69 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Components -
-
Material Color Picker
-
-
- - - -
- -

- fuse-material-color-picker is a custom built Fuse component allows you to add a color picker - that allows to choose one of the many Material spec. colors. -

- -
Sample
-

- -

- -
Usage
-

- - - -

- -
Two-way bindings
-

- selectedClass - - The name of the Fuse color class to select, e.g. mat-red-500-bg - -

-

- selectedBg - - The hex code of the color to be selected. It will be only selected if the hex code of the color - matches one of the material colors. - -

- -
Outputs
-

- onValueChange - - Event that triggered when a color selected. Returns an object that holds palette, hue, class name, - background and foreground colors. - -

- -
- -
- diff --git a/src/app/main/documentation/components/navigation/navigation.component.html b/src/app/main/documentation/components/navigation/navigation.component.html deleted file mode 100644 index 76d6f1a9..00000000 --- a/src/app/main/documentation/components/navigation/navigation.component.html +++ /dev/null @@ -1,381 +0,0 @@ - - diff --git a/src/app/main/documentation/components/navigation/navigation.component.ts b/src/app/main/documentation/components/navigation/navigation.component.ts deleted file mode 100644 index 8b58a1ea..00000000 --- a/src/app/main/documentation/components/navigation/navigation.component.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseNavigationService } from '@fuse/components/navigation/navigation.service'; - -@Component({ - selector : 'docs-components-navigation', - templateUrl: './navigation.component.html', - styleUrls : ['./navigation.component.scss'] -}) -export class DocsComponentsNavigationComponent -{ - navigation: any; - hidden: boolean; - - /** - * Constructor - */ - constructor( - private _fuseNavigationService: FuseNavigationService - ) - { - // Set the defaults - this.hidden = false; - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Show/hide calendar menu item - */ - showHideCalendarMenuItem(): void - { - // Get the calendar item from the navigation - const calendarNavItem = this._fuseNavigationService.getNavigationItem('calendar'); - - // Toggle the visibility - this.hidden = !this.hidden; - calendarNavItem.hidden = this.hidden; - } - - /** - * Update mail badge - */ - updateMailBadge(): void - { - // Get the mail nav item - const mailNavItem = this._fuseNavigationService.getNavigationItem('mail'); - - // Update the badge title - mailNavItem.badge.title = 35; - } - - /** - * Add subitem to the calendar - */ - addSubitemToCalendar(): void - { - // Prepare the new nav item - const newNavItem = { - id : 'sub-item', - title: 'Sub Item', - type : 'item', - url : '/apps/calendar' - }; - - // Get the calendar item from the navigation - const calendarNavItem = this._fuseNavigationService.getNavigationItem('calendar'); - - // Make the calendar navigation item collapsable - calendarNavItem.type = 'collapsable'; - - // Add the navigation item - this._fuseNavigationService.addNavigationItem(newNavItem, 'calendar'); - } - - /** - * Add a nav item with custom function - */ - addNavItemWithCustomFunction(): void - { - // Prepare the new nav item - const newNavItem = { - id : 'custom-item', - title : 'Custom Item', - type : 'item', - function: () => { - alert('Custom function!'); - } - }; - - // Add the new nav item at the beginning of the navigation - this._fuseNavigationService.addNavigationItem(newNavItem, 'start'); - } - - /** - * Remove the dashboard menu item - */ - removeDashboards(): void - { - this._fuseNavigationService.removeNavigationItem('dashboards'); - } - - /** - * Register a new navigation and toggle to it - */ - registerNewNavigationAndToggle(): void - { - const adminNav = [ - { - id : 'admin', - title : 'Admin', - type : 'group', - icon : 'apps', - children: [ - { - id : 'users', - title: 'Users', - type : 'item', - icon : 'person', - url : '/apps/dashboards/analytics' - }, - { - id : 'payments', - title: 'Payments', - type : 'item', - icon : 'attach_money', - url : '/apps/academy' - } - ] - }, - { - id : 'control-panel', - title : 'Control Panel', - type : 'group', - icon : 'apps', - children: [ - { - id : 'cron-jobs', - title: 'Cron Jobs', - type : 'item', - icon : 'settings', - url : '/apps/file-manager' - }, - { - id : 'maintenance-mode', - title: 'Maintenance Mode', - type : 'item', - icon : 'build', - url : '/apps/todo' - } - ] - } - ]; - - // Register the new navigation - this._fuseNavigationService.register('admin-nav', adminNav); - - // Set the current navigation - this._fuseNavigationService.setCurrentNavigation('admin-nav'); - } -} diff --git a/src/app/main/documentation/components/search-bar/search-bar.component.html b/src/app/main/documentation/components/search-bar/search-bar.component.html deleted file mode 100644 index 84de7f24..00000000 --- a/src/app/main/documentation/components/search-bar/search-bar.component.html +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/src/app/main/documentation/components/shortcuts/shortcuts.component.html b/src/app/main/documentation/components/shortcuts/shortcuts.component.html deleted file mode 100644 index 8efc4f01..00000000 --- a/src/app/main/documentation/components/shortcuts/shortcuts.component.html +++ /dev/null @@ -1,45 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Components -
-
Shortcuts
-
-
- - - -
- -

- fuse-shortcuts is a custom built Fuse component allows you to create and save shortcuts from - the navigation model. -

- -
Usage
-

- - - -

- -
Model
-

- <fuse-shortcuts></fuse-shortcuts> uses the same service with navigation - component to populate the shortcuts. It can search the navigation items as well as pin and unpin them as - shortcuts. It uses browser cookies to store the shortcuts. -

- -
- -
- diff --git a/src/app/main/documentation/components/widget/widget.component.html b/src/app/main/documentation/components/widget/widget.component.html deleted file mode 100644 index 6d684372..00000000 --- a/src/app/main/documentation/components/widget/widget.component.html +++ /dev/null @@ -1,108 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Components -
-
Widget
-
-
- - - -
- -

- fuse-widget is a custom built Fuse component allows to create flippable widget boxes. -

- -
Sample
-
- - - -
-
-
Widget title
- - -
- -
- Widget Content -
-
- - - -
- - -
- More widget info -
-
- - -
-
- -
Usage
-

- - - - - -

- -
- -
- diff --git a/src/app/main/documentation/directives/directives.module.ts b/src/app/main/documentation/directives/directives.module.ts deleted file mode 100644 index 77946060..00000000 --- a/src/app/main/documentation/directives/directives.module.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { MatButtonModule, MatIconModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseHighlightModule } from '@fuse/components'; - -import { DocsDirectivesFuseIfOnDomComponent } from 'app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component'; -import { DocsDirectivesFuseInnerScrollComponent } from 'app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component'; -import { DocsDirectivesFuseMatSidenavComponent } from 'app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component'; -import { DocsDirectivesFusePerfectScrollbarComponent } from 'app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component'; - -const routes = [ - { - path : 'fuse-if-on-dom', - component: DocsDirectivesFuseIfOnDomComponent - }, - { - path : 'fuse-inner-scroll', - component: DocsDirectivesFuseInnerScrollComponent - }, - { - path : 'fuse-mat-sidenav', - component: DocsDirectivesFuseMatSidenavComponent - }, - { - path : 'fuse-perfect-scrollbar', - component: DocsDirectivesFusePerfectScrollbarComponent - } -]; - -@NgModule({ - declarations: [ - DocsDirectivesFuseIfOnDomComponent, - DocsDirectivesFuseInnerScrollComponent, - DocsDirectivesFuseMatSidenavComponent, - DocsDirectivesFusePerfectScrollbarComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatIconModule, - - FuseSharedModule, - FuseHighlightModule - ] -}) -export class DirectivesModule -{ -} diff --git a/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.html b/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.html deleted file mode 100644 index 73ab0ebf..00000000 --- a/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.html +++ /dev/null @@ -1,40 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Directives -
- -
fuseIfOnDom
- -
- - - -
- -

- *fuseIfOnDom is a helper directive that detaches and re-attaches the given element if it's - currently in the DOM. This will help in various cases such as charts that don't resize properly or - animations that don't wait to route to be loaded completely. -

- -
Usage
-

- - - -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.ts b/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.ts deleted file mode 100644 index 387cd5e5..00000000 --- a/src/app/main/documentation/directives/fuseIfOnDom/fuse-if-on-dom.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-directives-fuse-if-on-dom', - templateUrl: './fuse-if-on-dom.component.html', - styleUrls : ['./fuse-if-on-dom.component.scss'] -}) -export class DocsDirectivesFuseIfOnDomComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.html b/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.html deleted file mode 100644 index f9256d22..00000000 --- a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.html +++ /dev/null @@ -1,43 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Directives -
- -
fuseInnerScroll
- -
- - - -
- -

- fuseInnerScroll is a class directive that can be used in page layouts. It will lock the - container's scroll allowing for individual scroll such as sidebar and the content itself. -

- -

- This directive will only work with Fuse's pre-built page layouts and it's a class directive. -

- -
Usage
-

- - - -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.scss b/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.ts b/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.ts deleted file mode 100644 index 8bef2049..00000000 --- a/src/app/main/documentation/directives/fuseInnerScroll/fuse-inner-scroll.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-directives-fuse-inner-scroll', - templateUrl: './fuse-inner-scroll.component.html', - styleUrls : ['./fuse-inner-scroll.component.scss'] -}) -export class DocsDirectivesFuseInnerScrollComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.html b/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.html deleted file mode 100644 index 272b5513..00000000 --- a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.html +++ /dev/null @@ -1,72 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Directives -
- -
fuseMatSidenav
- -
- - - -
- -

- fuseMatSidenav is a helper directive that enhances the Angular Material's sidenav. It modifies - the sidenav so it will function like the Angular Material 1.x sidenav. It also has a service which you can - register a sidenav in order to access and control its status from anywhere. -

- -
Usage
-

- - - -

- -
Inputs
-

- fuseMatSidenavHelper - - A unique name for the sidenav. - -

-

- mat-is-locked-open - - Adds a locked open functionality just like Angular Material 1.x sidenav. Works with the media step - aliases of the FlexLayout library. - -

- -
Accessing to the sidebav methods from anywhere
-

- - - -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.scss b/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.scss deleted file mode 100644 index a6486575..00000000 --- a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.scss +++ /dev/null @@ -1,8 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - - code { - white-space: nowrap; - } -} diff --git a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.ts b/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.ts deleted file mode 100644 index 05b13b9e..00000000 --- a/src/app/main/documentation/directives/fuseMatSidenav/fuse-mat-sidenav.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-directives-fuse-mat-sidenav', - templateUrl: './fuse-mat-sidenav.component.html', - styleUrls : ['./fuse-mat-sidenav.component.scss'] -}) -export class DocsDirectivesFuseMatSidenavComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.html b/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.html deleted file mode 100644 index 900fd2a4..00000000 --- a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.html +++ /dev/null @@ -1,65 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Directives -
- -
fusePerfectScrollbar
- -
- - - -
- -

- fusePerfectScrollbar is an Angular directive for the Perfect Scrollbar library. -

- -
Usage
-

- - - -

- -

- - - -

- -
Inputs
-

- fusePerfectScrollbar - - Accepts an optional boolean which you can control the Perfect Scrollbar. If provided false, Perfect - Scrollbar will be destroyed or won't be initialized. - -

-

- fusePerfectScrollbarOptions - - Accepts the Perfect - Scrollbar options. In addition to those options, there is also a custom updateOnRouteChange - option which updates the scrollbar on route changes. That's useful if your scrollbar wraps a - router-outlet. - -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.scss b/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.ts b/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.ts deleted file mode 100644 index 66cc507e..00000000 --- a/src/app/main/documentation/directives/fusePerfectScrollbar/fuse-perfect-scrollbar.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-directives-fuse-perfect-scrollbar', - templateUrl: './fuse-perfect-scrollbar.component.html', - styleUrls : ['./fuse-perfect-scrollbar.component.scss'] -}) -export class DocsDirectivesFusePerfectScrollbarComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/documentation.module.ts b/src/app/main/documentation/documentation.module.ts deleted file mode 100644 index 8175f6c0..00000000 --- a/src/app/main/documentation/documentation.module.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { MatIconModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; - -import { DocsChangelogComponent } from 'app/main/documentation/changelog/changelog.component'; - -const routes: Routes = [ - { - path : 'changelog', - component: DocsChangelogComponent - }, - { - path : 'getting-started', - loadChildren: './getting-started/getting-started.module#GettingStartedModule' - }, - { - path : 'working-with-fuse', - loadChildren: './working-with-fuse/working-with-fuse.module#WorkingWithFuseModule' - }, - { - path : 'components', - loadChildren: './components/components.module#ComponentsModule' - }, - { - path : 'components-third-party', - loadChildren: './components-third-party/components-third-party.module#ComponentsThirdPartyModule' - }, - { - path : 'directives', - loadChildren: './directives/directives.module#DirectivesModule' - }, - { - path : 'services', - loadChildren: './services/services.module#ServicesModule' - } -]; - -@NgModule({ - declarations: [ - DocsChangelogComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatIconModule, - - FuseSharedModule - ] -}) -export class DocumentationModule -{ -} diff --git a/src/app/main/documentation/getting-started/getting-started.module.ts b/src/app/main/documentation/getting-started/getting-started.module.ts deleted file mode 100644 index 468df5f7..00000000 --- a/src/app/main/documentation/getting-started/getting-started.module.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { MatIconModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseHighlightModule } from '@fuse/components'; - -import { DocsGettingStartedIntroductionComponent } from 'app/main/documentation/getting-started/introduction/introduction.component'; -import { DocsGettingStartedInstallationComponent } from 'app/main/documentation/getting-started/installation/installation.component'; - -const routes = [ - { - path : 'introduction', - component: DocsGettingStartedIntroductionComponent - }, - { - path : 'installation', - component: DocsGettingStartedInstallationComponent - } -]; - -@NgModule({ - declarations: [ - DocsGettingStartedIntroductionComponent, - DocsGettingStartedInstallationComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatIconModule, - - FuseSharedModule, - FuseHighlightModule - ] -}) -export class GettingStartedModule -{ -} diff --git a/src/app/main/documentation/getting-started/installation/installation.component.html b/src/app/main/documentation/getting-started/installation/installation.component.html deleted file mode 100644 index af428a68..00000000 --- a/src/app/main/documentation/getting-started/installation/installation.component.html +++ /dev/null @@ -1,150 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Getting Started -
- -
Installation
- -
- - - -
- -
Prerequisites
- -

- This section will give you some information about what tools you will need. You can skip to the - Installation section to start installing the template. We already mentioned all the prerequisites and - how to install them in the Installation section. -

- - -
Angular CLI
-

- Fuse uses Angular CLI for quickly - bootstrapping the application. You can check out the link for - more detailed information. -

- -

- Simply, Angular CLI is a tool to initialize, develop, scaffold and maintain Angular - applications -

- - - -
Node.js
-

- To install and use Fuse, you will need Node.js - installed to your computer. We won't get into too much detail about Node.js as it's out of the scope - of this documentation. Also you won't need to actually use Node.js, it's only required for the - development process. -

- - - -
Git
-

- To be able to install and use Fuse, you will also need - Git installed to your computer. Git is required for - npm to work correctly. -

- - - -
Npm - Package Manager
-

- Fuse uses npm package manager to install and manage 3rd - party components and libraries. -

- - -
Installation
- - -
A. Installing Prerequisites
-
    -
  1. - Download and install the latest Node.js from - its web site. -
  2. - -
  3. - Download and install the latest Git from its web - site. -
  4. - -
  5. - To install the Angular CLI: - - Open your favorite console application (Terminal, Command Prompt etc.), run the following command - and wait for it to finish: - -
    - - - -
    -
  6. -
-

- Now you are ready to install the Fuse. -

- - - -
B. Installing Fuse
-
    -
  1. - Unzip the zip file that you have downloaded from Themeforest. Inside the zip file, you will find the - Skeleton Project (Fuse-x.x.x-skeleton.zip) along with the Demo Project (Fuse-x.x.x-demo.zip), - PSD designs and a readme file. -
  2. -
  3. - For this documentation, we will be using the Skeleton Project which is the exact same template minus - the demo content so you don't have to clean up the demo content. -
  4. -
  5. - Extract the contents of the zip file (Fuse-x.x.x-skeleton.zip) into a folder that you will - work within. For this documentation, we will refer that as "your work folder". -
  6. -
  7. - Open your favorite console application (Terminal, Command Prompt etc.), navigate into your work - folder, run the following command and wait for it to finish: - -
    - - - -
    - -

    - This command will install all the required Node.js modules into the node_modules - directory inside your work folder. -

    -
  8. - -

    - And now, you are ready to run the Fuse for the first time. Please continue to the - Working with Fuse section. -

    -
- - -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/getting-started/installation/installation.component.scss b/src/app/main/documentation/getting-started/installation/installation.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/getting-started/installation/installation.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/getting-started/installation/installation.component.ts b/src/app/main/documentation/getting-started/installation/installation.component.ts deleted file mode 100644 index 198c03d4..00000000 --- a/src/app/main/documentation/getting-started/installation/installation.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-installation', - templateUrl: './installation.component.html', - styleUrls : ['./installation.component.scss'] -}) -export class DocsGettingStartedInstallationComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/getting-started/introduction/introduction.component.html b/src/app/main/documentation/getting-started/introduction/introduction.component.html deleted file mode 100644 index 79244474..00000000 --- a/src/app/main/documentation/getting-started/introduction/introduction.component.html +++ /dev/null @@ -1,71 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Getting Started -
- -
Introduction
- -
- - - -
- -

- This version of Fuse is NOT a traditional admin template, it's an Angular app written entirely - with Typescript and has no jQuery dependency. -

-

- While Fuse is a great tool and source for learning Angular, it also requires at least an entry level of - Angular knowledge so you can find your way within the source code. -

-

- Here you can find a list of core libraries, design specifications and coding standards that we use in Fuse: -

- - -
Google's Material Design
-

- All libraries and custom made components are following Google's Material Design Specifications. -

- - - -
Angular
-

- Angular is the core of Fuse. -

- - - -
Angular Material
-

- Angular Material is the primary UI - library of the Fuse. It's a set of Angular components, directives and services that implements Material - Design Specifications and it's in active development by Google. -

- - - -
CLI tool for Angular
-

- The Angular CLI is a tool to initialize, develop, scaffold and maintain Angular applications. - You can find more information about at: - angular-cli -

- - -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/getting-started/introduction/introduction.component.scss b/src/app/main/documentation/getting-started/introduction/introduction.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/getting-started/introduction/introduction.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/getting-started/introduction/introduction.component.ts b/src/app/main/documentation/getting-started/introduction/introduction.component.ts deleted file mode 100644 index c23d2cc3..00000000 --- a/src/app/main/documentation/getting-started/introduction/introduction.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-introduction', - templateUrl: './introduction.component.html', - styleUrls : ['./introduction.component.scss'] -}) -export class DocsGettingStartedIntroductionComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/services/config/config.component.html b/src/app/main/documentation/services/config/config.component.html deleted file mode 100644 index ed9f752d..00000000 --- a/src/app/main/documentation/services/config/config.component.html +++ /dev/null @@ -1,84 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Services -
-
Config
-
-
- - - -
- -

- Config is a custom built Fuse service allows to have a granular control over the Fuse. It can - be used for changing theme options (layout, color etc.) by component basis. -

- -
Usage
-

- - - - - -

- -
- -
- diff --git a/src/app/main/documentation/services/splash-screen/splash-screen.component.html b/src/app/main/documentation/services/splash-screen/splash-screen.component.html deleted file mode 100644 index f35a2e70..00000000 --- a/src/app/main/documentation/services/splash-screen/splash-screen.component.html +++ /dev/null @@ -1,55 +0,0 @@ -
- - -
-
-
- home - chevron_right - Documentation - chevron_right - Services -
-
Splash Screen
-
-
- - - -
- -

- Splash screen is a custom Fuse service that allows to have a control on the splash screen. -

- -
Usage
-

- - - - - -

- -
- -
- diff --git a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.html b/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.html deleted file mode 100644 index 13e43310..00000000 --- a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.html +++ /dev/null @@ -1,76 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Directory Structure
- -
- - - -
- -

- Fuse has a fairly simple directory structure. All source code that you will need stays inside the - /src folder. -

- -

- Once you build your app, a /dist folder will appear at the root which will contain the built app. You - can simply upload the contents of it to your server to start running your app. -

- -
Source directory (/src)
- -

- The source folder has the general Angular CLI project structure along with an additional folder called - /@fuse which contains the core elements of the Fuse. -

- -

- We recommend you not to touch /@fuse directory to easily update Fuse in the future. -

- -
/app
- -

- This folder contains the AppComponent along with the following directories. Everything that being - contained inside these folders are belong to your app and you can edit them however you like while - building your app: -

- -
    -
  • - /fake-db: The fake database data files for Fuse apps. -
  • -
  • - /fuse-config: The main config file for configuring the Fuse template. -
  • -
  • - /layout: Contains the template layout components. -
  • -
  • - /main: Example Fuse apps and ready to use pages and page layouts. -
  • -
  • - /navigation: The main navigation data. -
  • -
  • - /store: Ngrx-Mail app related store files. -
  • - -
- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.scss b/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.ts b/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.ts deleted file mode 100644 index 2c9bc53b..00000000 --- a/src/app/main/documentation/working-with-fuse/directory-structure/directory-structure.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-directory-structure', - templateUrl: './directory-structure.component.html', - styleUrls : ['./directory-structure.component.scss'] -}) -export class DocsWorkingWithFuseDirectoryStructureComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.html b/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.html deleted file mode 100644 index 85e34985..00000000 --- a/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.html +++ /dev/null @@ -1,129 +0,0 @@ -
- - -
-
-
- home - chevron_right - Components -
-
Multi Language
-
-
- - - -
- -

- Fuse uses ngx-translate - module and supports multiple languages and translations. -

- -

- Since not everybody need multi-language setup for their apps, we decided NOT to put translations everywhere. - If you want to see the translations in action, visit - Mail app and then change the language from the Toolbar. -

- Mail app is the only app that has translations for demonstration purposes. You can look at its source code - to see the usage. -

- -
Usage
-

In order to use the translations, create your translation file within the module you want to use - the translations. For example, for the Mail app, create i18n/en.ts file inside the - apps/mail folder. -

-

- The structure of the translation file is important and it must define the language id along with the - translation data: -

- -

- - - -

- -

- After you create your translation files, open the *.component.ts file for the module you - want to have translations, and register your translation file. For this example, we will use the - mail.component.ts file: -

- - - - - -
Changing the language
- -

- Changing the current language can happen instantly. Simply call the use method from the - translate service: -

- - - - - -

- More detailed usage of the translation service can be found in the toolbar.component.ts - file. -

- -
- -
diff --git a/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.scss b/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.scss deleted file mode 100644 index 32c65c8c..00000000 --- a/src/app/main/documentation/working-with-fuse/multi-language/multi-language.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.html b/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.html deleted file mode 100644 index 0a1197ac..00000000 --- a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.html +++ /dev/null @@ -1,62 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Page Layouts
- -
- - - -
- -

- One of the strong sides of the Fuse is its Page layouts. Every single app, pre-built page and even this - documentation pages uses the Fuse's page layouts. -

- -

- Simply, page layouts are pre-built layouts with a demo content which you can simply copy/paste and start - building your own page or app based on it. Because page layouts, it's very easy to replicate any page style - that you can find in Fuse, without needing to remove all the demo functionality from them. -

- -
Identifying a Page Layout
- -

- You can easily identify the layout that particular page or app using by simply looking at its main html - file. The very top wrapper div will tell you everything you need to know: -

- - - - - -

- The above example is using the carded style page with a left sidebar setup which can be found - in /ui/page-layouts/carded/left-sidebar-1 directory. -

- -

- The numbers in the folder names represents the scrolling style of that particular page layout. For example, - left-sidebar-1 has the exact same layout with left-sidebar-2 but the former one uses - a single scrollbar while the latter one uses separate scrollbars for its content and its sidebar. -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.scss b/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.ts b/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.ts deleted file mode 100644 index 070eb224..00000000 --- a/src/app/main/documentation/working-with-fuse/page-layouts/page-layouts.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-page-layouts', - templateUrl: './page-layouts.component.html', - styleUrls : ['./page-layouts.component.scss'] -}) -export class DocsWorkingWithFusePageLayoutsComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/production/production.component.html b/src/app/main/documentation/working-with-fuse/production/production.component.html deleted file mode 100644 index bca476a4..00000000 --- a/src/app/main/documentation/working-with-fuse/production/production.component.html +++ /dev/null @@ -1,143 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Production
- -
- - - -
- - -
Build
- -

- The following command builds the application into an output directory -

- -
- - - -
- -

- The build artifacts will be stored in the /dist directory. All commands that build or serve your - project, will delete the output directory. -

- -
Bundling & Tree-Shaking (AoT)
- -

- To build your app with AoT (Ahead of Time) compiler, use the following command: -

-
- - - -
-

- or if you want to serve with AoT, use the following: -

-
- - - -
-

- This will make use of uglifying and tree-shaking functionality while serving the app from - the memory. -

- -
Alternative AoT compiler
- -

- If you happen to stumble upon an error while running the -

-
- - - -
-

- command, there is an alternative one that you can use. The following command will run the ng build - --prod command with an increased memory size so your app can be built: -

-
- - - -
- - - -
Running unit tests
- -
- - - -
-

- Tests will execute after a build is executed via - Karma, and it will automatically - watch your files for changes. -

-

- You can run tests a single time via - --watch=false - or - --single-run -

- - - -
Running end-to-end tests
-
- - - -
-

- Before running the tests make sure you are serving the app via - ng serve. - - End-to-end tests are run via Protractor. -

- - -

- For more information about angular-cli commands, check the angular-cli. -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/production/production.component.scss b/src/app/main/documentation/working-with-fuse/production/production.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/production/production.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/production/production.component.ts b/src/app/main/documentation/working-with-fuse/production/production.component.ts deleted file mode 100644 index 26254ab8..00000000 --- a/src/app/main/documentation/working-with-fuse/production/production.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-production', - templateUrl: './production.component.html', - styleUrls : ['./production.component.scss'] -}) -export class DocsWorkingWithFuseProductionComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/server/server.component.html b/src/app/main/documentation/working-with-fuse/server/server.component.html deleted file mode 100644 index 081ee2c4..00000000 --- a/src/app/main/documentation/working-with-fuse/server/server.component.html +++ /dev/null @@ -1,79 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Server
- -
- - - -
- - -
Server
-

- While still in your work folder, run the following command in the console application: -

- -
- - - -
- -

- And that's it. Angular CLI will take care everything and start the Fuse. -

- -

- You can check out your console application to get further information about the server. By default, it - will run on http://localhost:4200 but it might change depending on your setup. -

- -

- Also, there are other commands available in Fuse which may help you in your development. To see the complete - list of available npm commands, check the - package.json - file. -

- - - -
Reloading the Server
-

- The - ng serve - command will watch your files and reload the page for you as you make changes. - But for some reason, if you need to manually restart the server, you can do it by pressing Ctrl + - C on your keyboard while in the console application and then run the following command once again: -

-
- - - -
- - -

- For more information about angular-cli commands, check the - angular-cli. -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/server/server.component.scss b/src/app/main/documentation/working-with-fuse/server/server.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/server/server.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/server/server.component.ts b/src/app/main/documentation/working-with-fuse/server/server.component.ts deleted file mode 100644 index 494254a0..00000000 --- a/src/app/main/documentation/working-with-fuse/server/server.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-server', - templateUrl: './server.component.html', - styleUrls : ['./server.component.scss'] -}) -export class DocsWorkingWithFuseServerComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.html b/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.html deleted file mode 100644 index ddc128f0..00000000 --- a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.html +++ /dev/null @@ -1,72 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Theme Layouts
- -
- - - -
- -

- Fuse comes with variety of different Theme Layouts which you can see and try them from the configuration - sidebar (Click on the animated, spinning cog button from the right side of your screen). These layouts are - accessible from /src/app/layouts directory and you can modify them however you like. -

- -

- Each layout has its own options. Those options allow you to configure the layout elements such as Toolbar, - Footer and Navbar. -

- -
Directory Structure
- -

- Inside the /layouts directory, you will find the following structure: -

- -
    -
  • - /components: Contains the layout elements such as Toolbar, Footer and Navbar. -
  • -
  • - /vertical: Contains the layout styles with vertical navigation option. -
  • -
  • - /horizontal: Contains the layout styles with horizontal navigation option. -
  • -
- -

- Each layout loads the layout elements from /components directory. That means, any modifications - you will make to those elements, will be avilable acrosss the layouts. -

- -
Configuring the Layout
- -

- Fuse has a powerful layout system which allows you to configure and use a different layout per route. Each - route can have its own layout configuration meaning that it's very easy to have pages like login page where - there isn't any toolbar or navbar showing, without leaving the Fuse. -

- -

- You can get more information about the Fuse Config Service and its usage from - Config documantation page. -

- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.scss b/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.ts b/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.ts deleted file mode 100644 index d71fc742..00000000 --- a/src/app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-theme-layouts', - templateUrl: './theme-layouts.component.html', - styleUrls : ['./theme-layouts.component.scss'] -}) -export class DocsWorkingWithFuseThemeLayoutsComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.html b/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.html deleted file mode 100644 index 2fa9c61c..00000000 --- a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.html +++ /dev/null @@ -1,52 +0,0 @@ -
- - -
- -
- home - chevron_right - Documentation - chevron_right - Working with Fuse -
- -
Updating Fuse
- -
- - - -
- -

- Due to the nature of apps, we cannot give any set instructions for updating Fuse. It heavily depends on your - project and it's up to you to update your code. However, there are couple points that we want to put forward - which might help you to keep Fuse updated. -

- -
    -
  • - The most important one is not to touch the /@fuse directory but sometimes that is going to be - inevitable and in those cases, try to keep the modifications minimal. -
  • - -
  • - Usually Angular and Angular Material libraries do some breaking changes and force our hands to change - things. In those cases, it's always good to check their official Changelogs to see what they did. - Usually they provide clear instructions and even helper tools to update your code. -
  • - -
  • - Before starting your new project, join our Github repo, fork it and build your - app on top of that fork. This way, in the future, you can easily merge the changes from the main repo - onto your fork. This will require merging a lot of changes manually, but it's the best way to keep the - Fuse updated. -
  • -
- -
- - -
\ No newline at end of file diff --git a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.scss b/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.ts b/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.ts deleted file mode 100644 index 7afffa00..00000000 --- a/src/app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'docs-working-with-fuse-updating-fuse', - templateUrl: './updating-fuse.component.html', - styleUrls : ['./updating-fuse.component.scss'] -}) -export class DocsWorkingWithFuseUpdatingFuseComponent -{ - constructor() - { - } -} diff --git a/src/app/main/documentation/working-with-fuse/working-with-fuse.module.ts b/src/app/main/documentation/working-with-fuse/working-with-fuse.module.ts deleted file mode 100644 index 394a3563..00000000 --- a/src/app/main/documentation/working-with-fuse/working-with-fuse.module.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; -import { MatButtonModule, MatIconModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseHighlightModule } from '@fuse/components'; - -import { DocsWorkingWithFuseServerComponent } from 'app/main/documentation/working-with-fuse/server/server.component'; -import { DocsWorkingWithFuseProductionComponent } from 'app/main/documentation/working-with-fuse/production/production.component'; -import { DocsWorkingWithFuseDirectoryStructureComponent } from 'app/main/documentation/working-with-fuse/directory-structure/directory-structure.component'; -import { DocsWorkingWithFuseUpdatingFuseComponent } from 'app/main/documentation/working-with-fuse/updating-fuse/updating-fuse.component'; -import { DocsWorkingWithFuseMultiLanguageComponent } from 'app/main/documentation/working-with-fuse/multi-language/multi-language.component'; -import { DocsWorkingWithFuseThemeLayoutsComponent } from 'app/main/documentation/working-with-fuse/theme-layouts/theme-layouts.component'; -import { DocsWorkingWithFusePageLayoutsComponent } from 'app/main/documentation/working-with-fuse/page-layouts/page-layouts.component'; - -const routes = [ - { - path : 'server', - component: DocsWorkingWithFuseServerComponent - }, - { - path : 'production', - component: DocsWorkingWithFuseProductionComponent - }, - { - path : 'directory-structure', - component: DocsWorkingWithFuseDirectoryStructureComponent - }, - { - path : 'updating-fuse', - component: DocsWorkingWithFuseUpdatingFuseComponent - }, - { - path : 'multi-language', - component: DocsWorkingWithFuseMultiLanguageComponent - }, - { - path : 'theme-layouts', - component: DocsWorkingWithFuseThemeLayoutsComponent - }, - { - path : 'page-layouts', - component: DocsWorkingWithFusePageLayoutsComponent - } -]; - -@NgModule({ - declarations: [ - DocsWorkingWithFuseServerComponent, - DocsWorkingWithFuseProductionComponent, - DocsWorkingWithFuseDirectoryStructureComponent, - DocsWorkingWithFuseUpdatingFuseComponent, - DocsWorkingWithFuseMultiLanguageComponent, - DocsWorkingWithFuseThemeLayoutsComponent, - DocsWorkingWithFusePageLayoutsComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatIconModule, - - FuseSharedModule, - FuseHighlightModule - ] -}) -export class WorkingWithFuseModule -{ -} diff --git a/src/app/main/pages/authentication/forgot-password-2/forgot-password-2.component.ts b/src/app/main/pages/authentication/forgot-password-2/forgot-password-2.component.ts deleted file mode 100644 index 5a2a75d1..00000000 --- a/src/app/main/pages/authentication/forgot-password-2/forgot-password-2.component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'forgot-password-2', - templateUrl: './forgot-password-2.component.html', - styleUrls : ['./forgot-password-2.component.scss'], - animations : fuseAnimations -}) -export class ForgotPassword2Component implements OnInit, OnDestroy -{ - forgotPasswordForm: FormGroup; - forgotPasswordFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.forgotPasswordFormErrors = { - email: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.forgotPasswordForm = this._formBuilder.group({ - email: ['', [Validators.required, Validators.email]] - }); - - this.forgotPasswordForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onForgotPasswordFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onForgotPasswordFormValuesChanged(): void - { - for ( const field in this.forgotPasswordFormErrors ) - { - if ( !this.forgotPasswordFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.forgotPasswordFormErrors[field] = {}; - - // Get the control - const control = this.forgotPasswordForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.forgotPasswordFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/authentication/forgot-password/forgot-password.component.ts b/src/app/main/pages/authentication/forgot-password/forgot-password.component.ts deleted file mode 100644 index e59477b7..00000000 --- a/src/app/main/pages/authentication/forgot-password/forgot-password.component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'forgot-password', - templateUrl: './forgot-password.component.html', - styleUrls : ['./forgot-password.component.scss'], - animations : fuseAnimations -}) -export class ForgotPasswordComponent implements OnInit, OnDestroy -{ - forgotPasswordForm: FormGroup; - forgotPasswordFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.forgotPasswordFormErrors = { - email: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.forgotPasswordForm = this._formBuilder.group({ - email: ['', [Validators.required, Validators.email]] - }); - - this.forgotPasswordForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onForgotPasswordFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onForgotPasswordFormValuesChanged(): void - { - for ( const field in this.forgotPasswordFormErrors ) - { - if ( !this.forgotPasswordFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.forgotPasswordFormErrors[field] = {}; - - // Get the control - const control = this.forgotPasswordForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.forgotPasswordFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/authentication/lock/lock.component.ts b/src/app/main/pages/authentication/lock/lock.component.ts deleted file mode 100644 index b0399f8b..00000000 --- a/src/app/main/pages/authentication/lock/lock.component.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'lock', - templateUrl: './lock.component.html', - styleUrls : ['./lock.component.scss'], - animations : fuseAnimations -}) -export class LockComponent implements OnInit, OnDestroy -{ - lockForm: FormGroup; - lockFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.lockFormErrors = { - username: {}, - password: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.lockForm = this._formBuilder.group({ - username: [ - { - value : 'Katherine', - disabled: true - }, Validators.required - ], - password: ['', Validators.required] - }); - - this.lockForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onLockFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onLockFormValuesChanged(): void - { - for ( const field in this.lockFormErrors ) - { - if ( !this.lockFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.lockFormErrors[field] = {}; - - // Get the control - const control = this.lockForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.lockFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/authentication/login-2/login-2.component.ts b/src/app/main/pages/authentication/login-2/login-2.component.ts deleted file mode 100644 index f9da1110..00000000 --- a/src/app/main/pages/authentication/login-2/login-2.component.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'login-2', - templateUrl: './login-2.component.html', - styleUrls : ['./login-2.component.scss'], - animations : fuseAnimations -}) -export class Login2Component implements OnInit, OnDestroy -{ - loginForm: FormGroup; - loginFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.loginFormErrors = { - email : {}, - password: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.loginForm = this._formBuilder.group({ - email : ['', [Validators.required, Validators.email]], - password: ['', Validators.required] - }); - - this.loginForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onLoginFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onLoginFormValuesChanged(): void - { - for ( const field in this.loginFormErrors ) - { - if ( !this.loginFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.loginFormErrors[field] = {}; - - // Get the control - const control = this.loginForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.loginFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/authentication/login/login.component.ts b/src/app/main/pages/authentication/login/login.component.ts deleted file mode 100644 index cd3a83b7..00000000 --- a/src/app/main/pages/authentication/login/login.component.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'login', - templateUrl: './login.component.html', - styleUrls : ['./login.component.scss'], - animations : fuseAnimations -}) -export class LoginComponent implements OnInit, OnDestroy -{ - loginForm: FormGroup; - loginFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.loginFormErrors = { - email : {}, - password: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.loginForm = this._formBuilder.group({ - email : ['', [Validators.required, Validators.email]], - password: ['', Validators.required] - }); - - this.loginForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onLoginFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onLoginFormValuesChanged(): void - { - for ( const field in this.loginFormErrors ) - { - if ( !this.loginFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.loginFormErrors[field] = {}; - - // Get the control - const control = this.loginForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.loginFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/authentication/mail-confirm/mail-confirm.component.ts b/src/app/main/pages/authentication/mail-confirm/mail-confirm.component.ts deleted file mode 100644 index e69c2256..00000000 --- a/src/app/main/pages/authentication/mail-confirm/mail-confirm.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'mail-confirm', - templateUrl: './mail-confirm.component.html', - styleUrls : ['./mail-confirm.component.scss'], - animations : fuseAnimations -}) -export class MailConfirmComponent -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/pages/authentication/register-2/register-2.component.ts b/src/app/main/pages/authentication/register-2/register-2.component.ts deleted file mode 100644 index 5ef53f56..00000000 --- a/src/app/main/pages/authentication/register-2/register-2.component.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'register-2', - templateUrl: './register-2.component.html', - styleUrls : ['./register-2.component.scss'], - animations : fuseAnimations -}) -export class Register2Component implements OnInit, OnDestroy -{ - registerForm: FormGroup; - registerFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.registerFormErrors = { - name : {}, - email : {}, - password : {}, - passwordConfirm: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.registerForm = this._formBuilder.group({ - name : ['', Validators.required], - email : ['', [Validators.required, Validators.email]], - password : ['', Validators.required], - passwordConfirm: ['', [Validators.required, confirmPassword]] - }); - - this.registerForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onRegisterFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onRegisterFormValuesChanged(): void - { - for ( const field in this.registerFormErrors ) - { - if ( !this.registerFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.registerFormErrors[field] = {}; - - // Get the control - const control = this.registerForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.registerFormErrors[field] = control.errors; - } - } - } -} - -/** - * Confirm password - * - * @param {AbstractControl} control - * @returns {{passwordsNotMatch: boolean}} - */ -function confirmPassword(control: AbstractControl): any -{ - if ( !control.parent || !control ) - { - return; - } - - const password = control.parent.get('password'); - const passwordConfirm = control.parent.get('passwordConfirm'); - - if ( !password || !passwordConfirm ) - { - return; - } - - if ( passwordConfirm.value === '' ) - { - return; - } - - if ( password.value !== passwordConfirm.value ) - { - return { - passwordsNotMatch: true - }; - } -} diff --git a/src/app/main/pages/authentication/register/register.component.ts b/src/app/main/pages/authentication/register/register.component.ts deleted file mode 100644 index aebc79a0..00000000 --- a/src/app/main/pages/authentication/register/register.component.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/internal/operators'; - -@Component({ - selector : 'register', - templateUrl: './register.component.html', - styleUrls : ['./register.component.scss'], - animations : fuseAnimations -}) -export class RegisterComponent implements OnInit, OnDestroy -{ - registerForm: FormGroup; - registerFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.registerFormErrors = { - name : {}, - email : {}, - password : {}, - passwordConfirm: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.registerForm = this._formBuilder.group({ - name : ['', Validators.required], - email : ['', [Validators.required, Validators.email]], - password : ['', Validators.required], - passwordConfirm: ['', [Validators.required, confirmPassword]] - }); - - this.registerForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onRegisterFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onRegisterFormValuesChanged(): void - { - for ( const field in this.registerFormErrors ) - { - if ( !this.registerFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.registerFormErrors[field] = {}; - - // Get the control - const control = this.registerForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.registerFormErrors[field] = control.errors; - } - } - } -} - -/** - * Confirm password - * - * @param {AbstractControl} control - * @returns {{passwordsNotMatch: boolean}} - */ -function confirmPassword(control: AbstractControl): any -{ - if ( !control.parent || !control ) - { - return; - } - - const password = control.parent.get('password'); - const passwordConfirm = control.parent.get('passwordConfirm'); - - if ( !password || !passwordConfirm ) - { - return; - } - - if ( passwordConfirm.value === '' ) - { - return; - } - - if ( password.value !== passwordConfirm.value ) - { - return { - passwordsNotMatch: true - }; - } -} diff --git a/src/app/main/pages/authentication/reset-password-2/reset-password-2.component.ts b/src/app/main/pages/authentication/reset-password-2/reset-password-2.component.ts deleted file mode 100644 index 052beba7..00000000 --- a/src/app/main/pages/authentication/reset-password-2/reset-password-2.component.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/internal/operators'; - -@Component({ - selector : 'reset-password-2', - templateUrl: './reset-password-2.component.html', - styleUrls : ['./reset-password-2.component.scss'], - animations : fuseAnimations -}) -export class ResetPassword2Component implements OnInit, OnDestroy -{ - resetPasswordForm: FormGroup; - resetPasswordFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.resetPasswordFormErrors = { - email : {}, - password : {}, - passwordConfirm: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.resetPasswordForm = this._formBuilder.group({ - email : ['', [Validators.required, Validators.email]], - password : ['', Validators.required], - passwordConfirm: ['', [Validators.required, confirmPassword]] - }); - - this.resetPasswordForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onResetPasswordFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onResetPasswordFormValuesChanged(): void - { - for ( const field in this.resetPasswordFormErrors ) - { - if ( !this.resetPasswordFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.resetPasswordFormErrors[field] = {}; - - // Get the control - const control = this.resetPasswordForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.resetPasswordFormErrors[field] = control.errors; - } - } - } -} - -/** - * Confirm password - * - * @param {AbstractControl} control - * @returns {{passwordsNotMatch: boolean}} - */ -function confirmPassword(control: AbstractControl): any -{ - if ( !control.parent || !control ) - { - return; - } - - const password = control.parent.get('password'); - const passwordConfirm = control.parent.get('passwordConfirm'); - - if ( !password || !passwordConfirm ) - { - return; - } - - if ( passwordConfirm.value === '' ) - { - return; - } - - if ( password.value !== passwordConfirm.value ) - { - return { - passwordsNotMatch: true - }; - } -} diff --git a/src/app/main/pages/authentication/reset-password/reset-password.component.ts b/src/app/main/pages/authentication/reset-password/reset-password.component.ts deleted file mode 100644 index d231c341..00000000 --- a/src/app/main/pages/authentication/reset-password/reset-password.component.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'reset-password', - templateUrl: './reset-password.component.html', - styleUrls : ['./reset-password.component.scss'], - animations : fuseAnimations -}) -export class ResetPasswordComponent implements OnInit, OnDestroy -{ - resetPasswordForm: FormGroup; - resetPasswordFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.resetPasswordFormErrors = { - email : {}, - password : {}, - passwordConfirm: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.resetPasswordForm = this._formBuilder.group({ - email : ['', [Validators.required, Validators.email]], - password : ['', Validators.required], - passwordConfirm: ['', [Validators.required, confirmPassword]] - }); - - this.resetPasswordForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onResetPasswordFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onResetPasswordFormValuesChanged(): void - { - for ( const field in this.resetPasswordFormErrors ) - { - if ( !this.resetPasswordFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.resetPasswordFormErrors[field] = {}; - - // Get the control - const control = this.resetPasswordForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.resetPasswordFormErrors[field] = control.errors; - } - } - } -} - -/** - * Confirm password - * - * @param {AbstractControl} control - * @returns {{passwordsNotMatch: boolean}} - */ -function confirmPassword(control: AbstractControl): any -{ - if ( !control.parent || !control ) - { - return; - } - - const password = control.parent.get('password'); - const passwordConfirm = control.parent.get('passwordConfirm'); - - if ( !password || !passwordConfirm ) - { - return; - } - - if ( passwordConfirm.value === '' ) - { - return; - } - - if ( password.value !== passwordConfirm.value ) - { - return { - passwordsNotMatch: true - }; - } -} diff --git a/src/app/main/pages/coming-soon/coming-soon.component.ts b/src/app/main/pages/coming-soon/coming-soon.component.ts deleted file mode 100644 index 39cbe734..00000000 --- a/src/app/main/pages/coming-soon/coming-soon.component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'coming-soon', - templateUrl: './coming-soon.component.html', - styleUrls : ['./coming-soon.component.scss'], - animations : fuseAnimations -}) -export class ComingSoonComponent implements OnInit, OnDestroy -{ - comingSoonForm: FormGroup; - comingSoonFormErrors: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - * @param {FormBuilder} _formBuilder - */ - constructor( - private _fuseConfigService: FuseConfigService, - private _formBuilder: FormBuilder - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - - // Set the defaults - this.comingSoonFormErrors = { - email: {} - }; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.comingSoonForm = this._formBuilder.group({ - email: ['', [Validators.required, Validators.email]] - }); - - this.comingSoonForm.valueChanges - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - this.onRegisterFormValuesChanged(); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * On form values changed - */ - onRegisterFormValuesChanged(): void - { - for ( const field in this.comingSoonFormErrors ) - { - if ( !this.comingSoonFormErrors.hasOwnProperty(field) ) - { - continue; - } - - // Clear previous errors - this.comingSoonFormErrors[field] = {}; - - // Get the control - const control = this.comingSoonForm.get(field); - - if ( control && control.dirty && !control.valid ) - { - this.comingSoonFormErrors[field] = control.errors; - } - } - } -} diff --git a/src/app/main/pages/errors/404/error-404.component.ts b/src/app/main/pages/errors/404/error-404.component.ts deleted file mode 100644 index 2f8a6986..00000000 --- a/src/app/main/pages/errors/404/error-404.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; - -@Component({ - selector : 'error-404', - templateUrl: './error-404.component.html', - styleUrls : ['./error-404.component.scss'] -}) -export class Error404Component -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/pages/errors/500/error-500.component.ts b/src/app/main/pages/errors/500/error-500.component.ts deleted file mode 100644 index f68e94e3..00000000 --- a/src/app/main/pages/errors/500/error-500.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; - -@Component({ - selector : 'error-500', - templateUrl: './error-500.component.html', - styleUrls : ['./error-500.component.scss'] -}) -export class Error500Component -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/pages/faq/faq.component.ts b/src/app/main/pages/faq/faq.component.ts deleted file mode 100644 index 749aaa3a..00000000 --- a/src/app/main/pages/faq/faq.component.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { FormControl } from '@angular/forms'; -import { Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'; - -import { FuseUtils } from '@fuse/utils'; - -import { FaqService } from 'app/main/pages/faq/faq.service'; - -@Component({ - selector : 'faq', - templateUrl: './faq.component.html', - styleUrls : ['./faq.component.scss'] -}) -export class FaqComponent implements OnInit, OnDestroy -{ - faqs: any; - faqsFiltered: any; - step: number; - searchInput: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {FaqService} _faqService - */ - constructor( - private _faqService: FaqService - ) - { - // Set the defaults - this.searchInput = new FormControl(''); - this.step = 0; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._faqService.onFaqsChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(response => { - this.faqs = response; - this.faqsFiltered = response; - }); - - this.searchInput.valueChanges - .pipe( - takeUntil(this._unsubscribeAll), - debounceTime(300), - distinctUntilChanged() - ) - .subscribe(searchText => { - this.faqsFiltered = FuseUtils.filterArrayByString(this.faqs, searchText); - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Set step - * - * @param {number} index - */ - setStep(index: number): void - { - this.step = index; - } - - /** - * Next step - */ - nextStep(): void - { - this.step++; - } - - /** - * Previous step - */ - prevStep(): void - { - this.step--; - } -} diff --git a/src/app/main/pages/invoices/compact/compact.component.ts b/src/app/main/pages/invoices/compact/compact.component.ts deleted file mode 100644 index 46e5366b..00000000 --- a/src/app/main/pages/invoices/compact/compact.component.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { InvoiceService } from 'app/main/pages/invoices/invoice.service'; - -@Component({ - selector : 'invoice-compact', - templateUrl: './compact.component.html', - styleUrls : ['./compact.component.scss'] -}) -export class InvoiceCompactComponent implements OnInit, OnDestroy -{ - invoice: any; - - // Private - private _unsubscribeAll: Subject; - - constructor( - private _invoiceService: InvoiceService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._invoiceService.invoiceOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((invoice) => { - this.invoice = invoice; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/invoices/modern/modern.component.ts b/src/app/main/pages/invoices/modern/modern.component.ts deleted file mode 100644 index 9757bec2..00000000 --- a/src/app/main/pages/invoices/modern/modern.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { InvoiceService } from 'app/main/pages/invoices/invoice.service'; - -@Component({ - selector : 'invoice-modern', - templateUrl: './modern.component.html', - styleUrls : ['./modern.component.scss'] -}) -export class InvoiceModernComponent implements OnInit, OnDestroy -{ - invoice: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {InvoiceService} _invoiceService - */ - constructor( - private _invoiceService: InvoiceService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._invoiceService.invoiceOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((invoice) => { - this.invoice = invoice; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/knowledge-base/dialogs/article/article.component.ts b/src/app/main/pages/knowledge-base/dialogs/article/article.component.ts deleted file mode 100644 index 60f674c4..00000000 --- a/src/app/main/pages/knowledge-base/dialogs/article/article.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, ViewEncapsulation, Inject } from '@angular/core'; -import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; - -@Component({ - selector : 'knowledge-base-article', - templateUrl : './article.component.html', - styleUrls : ['./article.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class KnowledgeBaseArticleComponent -{ - /** - * Constructor - * - * @param {MatDialogRef} matDialogRef - * @param _data - */ - constructor( - public matDialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public _data: any - ) - { - } -} diff --git a/src/app/main/pages/knowledge-base/knowledge-base.component.ts b/src/app/main/pages/knowledge-base/knowledge-base.component.ts deleted file mode 100644 index 2f0040da..00000000 --- a/src/app/main/pages/knowledge-base/knowledge-base.component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core'; -import { MatDialog } from '@angular/material'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { KnowledgeBaseService } from 'app/main/pages/knowledge-base/knowledge-base.service'; -import { KnowledgeBaseArticleComponent } from 'app/main/pages/knowledge-base/dialogs/article/article.component'; - -@Component({ - selector : 'knowledge-base', - templateUrl : './knowledge-base.component.html', - styleUrls : ['./knowledge-base.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class KnowledgeBaseComponent implements OnInit, OnDestroy -{ - knowledgeBase: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {KnowledgeBaseService} _knowledgeBaseService - * @param {MatDialog} _matDialog - */ - constructor( - private _knowledgeBaseService: KnowledgeBaseService, - private _matDialog: MatDialog - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._knowledgeBaseService.onKnowledgeBaseChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(response => { - this.knowledgeBase = response; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Read article - * - * @param article - */ - readArticle(article): void - { - this._matDialog.open(KnowledgeBaseArticleComponent, { - panelClass: 'knowledgebase-article-dialog', - data : {article: article} - }); - } -} diff --git a/src/app/main/pages/maintenance/maintenance.component.ts b/src/app/main/pages/maintenance/maintenance.component.ts deleted file mode 100644 index 4e86c78e..00000000 --- a/src/app/main/pages/maintenance/maintenance.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseConfigService } from '@fuse/services/config.service'; -import { fuseAnimations } from '@fuse/animations'; - -@Component({ - selector : 'maintenance', - templateUrl: './maintenance.component.html', - styleUrls : ['./maintenance.component.scss'], - animations : fuseAnimations -}) -export class MaintenanceComponent -{ - /** - * Constructor - * - * @param {FuseConfigService} _fuseConfigService - */ - constructor( - private _fuseConfigService: FuseConfigService - ) - { - // Configure the layout - this._fuseConfigService.config = { - layout: { - navbar : { - hidden: true - }, - toolbar: { - hidden: true - }, - footer : { - hidden: true - } - } - }; - } -} diff --git a/src/app/main/pages/pages.module.ts b/src/app/main/pages/pages.module.ts deleted file mode 100644 index 8cef2f0e..00000000 --- a/src/app/main/pages/pages.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { LoginModule } from 'app/main/pages/authentication/login/login.module'; -import { Login2Module } from 'app/main/pages/authentication/login-2/login-2.module'; -import { RegisterModule } from 'app/main/pages/authentication/register/register.module'; -import { Register2Module } from 'app/main/pages/authentication/register-2/register-2.module'; -import { ForgotPasswordModule } from 'app/main/pages/authentication/forgot-password/forgot-password.module'; -import { ForgotPassword2Module } from 'app/main/pages/authentication/forgot-password-2/forgot-password-2.module'; -import { ResetPasswordModule } from 'app/main/pages/authentication/reset-password/reset-password.module'; -import { ResetPassword2Module } from 'app/main/pages/authentication/reset-password-2/reset-password-2.module'; -import { LockModule } from 'app/main/pages/authentication/lock/lock.module'; -import { MailConfirmModule } from 'app/main/pages/authentication/mail-confirm/mail-confirm.module'; -import { ComingSoonModule } from 'app/main/pages/coming-soon/coming-soon.module'; -import { Error404Module } from 'app/main/pages/errors/404/error-404.module'; -import { Error500Module } from 'app/main/pages/errors/500/error-500.module'; -import { InvoiceModernModule } from 'app/main/pages/invoices/modern/modern.module'; -import { InvoiceCompactModule } from 'app/main/pages/invoices/compact/compact.module'; -import { MaintenanceModule } from 'app/main/pages/maintenance/maintenence.module'; -import { PricingModule } from 'app/main/pages/pricing/pricing.module'; -import { ProfileModule } from 'app/main/pages/profile/profile.module'; -import { SearchModule } from 'app/main/pages/search/search.module'; -import { FaqModule } from 'app/main/pages/faq/faq.module'; -import { KnowledgeBaseModule } from 'app/main/pages/knowledge-base/knowledge-base.module'; - -@NgModule({ - imports: [ - // Authentication - LoginModule, - Login2Module, - RegisterModule, - Register2Module, - ForgotPasswordModule, - ForgotPassword2Module, - ResetPasswordModule, - ResetPassword2Module, - LockModule, - MailConfirmModule, - - // Coming-soon - ComingSoonModule, - - // Errors - Error404Module, - Error500Module, - - // Invoices - InvoiceModernModule, - InvoiceCompactModule, - - // Maintenance - MaintenanceModule, - - // Pricing - PricingModule, - - // Profile - ProfileModule, - - // Search - SearchModule, - - // Faq - FaqModule, - - // Knowledge base - KnowledgeBaseModule - ] -}) -export class PagesModule -{ - -} diff --git a/src/app/main/pages/profile/tabs/about/about.component.ts b/src/app/main/pages/profile/tabs/about/about.component.ts deleted file mode 100644 index f0f2c414..00000000 --- a/src/app/main/pages/profile/tabs/about/about.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { fuseAnimations } from '@fuse/animations'; -import { ProfileService } from 'app/main/pages/profile/profile.service'; - -@Component({ - selector : 'profile-about', - templateUrl: './about.component.html', - styleUrls : ['./about.component.scss'], - animations : fuseAnimations -}) -export class ProfileAboutComponent implements OnInit, OnDestroy -{ - about: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ProfileService} _profileService - */ - constructor( - private _profileService: ProfileService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._profileService.aboutOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(about => { - this.about = about; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/profile/tabs/photos-videos/photos-videos.component.ts b/src/app/main/pages/profile/tabs/photos-videos/photos-videos.component.ts deleted file mode 100644 index c6a62320..00000000 --- a/src/app/main/pages/profile/tabs/photos-videos/photos-videos.component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ProfileService } from 'app/main/pages/profile/profile.service'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; - -@Component({ - selector : 'profile-photos-videos', - templateUrl: './photos-videos.component.html', - styleUrls : ['./photos-videos.component.scss'], - animations : fuseAnimations -}) -export class ProfilePhotosVideosComponent implements OnInit, OnDestroy -{ - photosVideos: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ProfileService} _profileService - */ - constructor( - private _profileService: ProfileService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._profileService.photosVideosOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(photosVideos => { - this.photosVideos = photosVideos; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/profile/tabs/timeline/timeline.component.ts b/src/app/main/pages/profile/tabs/timeline/timeline.component.ts deleted file mode 100644 index 9c905b66..00000000 --- a/src/app/main/pages/profile/tabs/timeline/timeline.component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; - -import { fuseAnimations } from '@fuse/animations'; - -import { ProfileService } from '../../profile.service'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector : 'profile-timeline', - templateUrl: './timeline.component.html', - styleUrls : ['./timeline.component.scss'], - animations : fuseAnimations -}) -export class ProfileTimelineComponent implements OnInit, OnDestroy -{ - timeline: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {ProfileService} _profileService - */ - constructor( - private _profileService: ProfileService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._profileService.timelineOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(timeline => { - this.timeline = timeline; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/search/tabs/classic/classic.component.ts b/src/app/main/pages/search/tabs/classic/classic.component.ts deleted file mode 100644 index eab6fdaf..00000000 --- a/src/app/main/pages/search/tabs/classic/classic.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; - -import { SearchService } from 'app/main/pages/search/search.service'; - -@Component({ - selector : 'search-classic', - templateUrl: './classic.component.html', - styleUrls : ['./classic.component.scss'] -}) -export class SearchClassicComponent implements OnInit, OnDestroy -{ - classic: any; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {SearchService} _searchService - */ - constructor( - private _searchService: SearchService - ) - { - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._searchService.classicOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(classic => { - this.classic = classic; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} diff --git a/src/app/main/pages/search/tabs/table/table.component.scss b/src/app/main/pages/search/tabs/table/table.component.scss deleted file mode 100644 index ca2a0c07..00000000 --- a/src/app/main/pages/search/tabs/table/table.component.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import "src/@fuse/scss/fuse"; - -:host { - -} diff --git a/src/app/main/pages/search/tabs/table/table.component.ts b/src/app/main/pages/search/tabs/table/table.component.ts deleted file mode 100644 index 30207d1d..00000000 --- a/src/app/main/pages/search/tabs/table/table.component.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { DataSource } from '@angular/cdk/collections'; -import { takeUntil } from 'rxjs/operators'; -import { BehaviorSubject, Subject } from 'rxjs'; - -import { SearchService } from 'app/main/pages/search/search.service'; - -@Component({ - selector : 'search-table', - templateUrl: './table.component.html', - styleUrls : ['./table.component.scss'] -}) -export class SearchTableComponent implements OnInit, OnDestroy -{ - table: any; - dataSource: SearchTableDataSource; - displayedColumns: string[]; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {SearchService} _searchService - */ - constructor( - private _searchService: SearchService - ) - { - // Set the defaults - this.displayedColumns = ['name', 'position', 'office', 'salary']; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this.dataSource = new SearchTableDataSource(this._searchService); - - this._searchService.tableOnChanged - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(table => { - this.table = table; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } -} - -export class SearchTableDataSource extends DataSource -{ - /** - * Constructor - * - * @param {SearchService} _searchService - */ - constructor( - private _searchService: SearchService - ) - { - super(); - } - - /** - * Connect - * - * @returns {BehaviorSubject} - */ - connect(): BehaviorSubject - { - return this._searchService.tableOnChanged; - } - - /** - * Disconnect - */ - disconnect(): void - { - - } -} diff --git a/src/app/main/quick-panel/quick-panel.component.ts b/src/app/main/quick-panel/quick-panel.component.ts deleted file mode 100644 index 4b7884d6..00000000 --- a/src/app/main/quick-panel/quick-panel.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit, ViewEncapsulation } from '@angular/core'; - -@Component({ - selector : 'fuse-quick-panel', - templateUrl : './quick-panel.component.html', - styleUrls : ['./quick-panel.component.scss'], - encapsulation: ViewEncapsulation.None -}) -export class FuseQuickPanelComponent implements OnInit -{ - date: Date; - settings: any; - notes = []; - events = []; - - constructor() - { - this.date = new Date(); - this.settings = { - notify: true, - cloud : false, - retro : true - }; - } - - ngOnInit() - { - - } - -} diff --git a/src/app/main/content/sample/i18n/en.ts b/src/app/main/sample/i18n/en.ts similarity index 100% rename from src/app/main/content/sample/i18n/en.ts rename to src/app/main/sample/i18n/en.ts diff --git a/src/app/main/content/sample/i18n/tr.ts b/src/app/main/sample/i18n/tr.ts similarity index 100% rename from src/app/main/content/sample/i18n/tr.ts rename to src/app/main/sample/i18n/tr.ts diff --git a/src/app/main/content/sample/sample.component.html b/src/app/main/sample/sample.component.html similarity index 100% rename from src/app/main/content/sample/sample.component.html rename to src/app/main/sample/sample.component.html diff --git a/src/app/main/content/sample/sample.component.scss b/src/app/main/sample/sample.component.scss similarity index 100% rename from src/app/main/content/sample/sample.component.scss rename to src/app/main/sample/sample.component.scss diff --git a/src/app/main/content/sample/sample.component.ts b/src/app/main/sample/sample.component.ts similarity index 50% rename from src/app/main/content/sample/sample.component.ts rename to src/app/main/sample/sample.component.ts index f074a7be..6ecf1fc5 100644 --- a/src/app/main/content/sample/sample.component.ts +++ b/src/app/main/sample/sample.component.ts @@ -6,14 +6,21 @@ import { locale as english } from './i18n/en'; import { locale as turkish } from './i18n/tr'; @Component({ - selector : 'fuse-sample', + selector : 'sample', templateUrl: './sample.component.html', styleUrls : ['./sample.component.scss'] }) -export class FuseSampleComponent +export class SampleComponent { - constructor(private fuseTranslationLoader: FuseTranslationLoaderService) + /** + * Constructor + * + * @param {FuseTranslationLoaderService} _fuseTranslationLoaderService + */ + constructor( + private _fuseTranslationLoaderService: FuseTranslationLoaderService + ) { - this.fuseTranslationLoader.loadTranslations(english, turkish); + this._fuseTranslationLoaderService.loadTranslations(english, turkish); } } diff --git a/src/app/main/content/sample/sample.module.ts b/src/app/main/sample/sample.module.ts similarity index 71% rename from src/app/main/content/sample/sample.module.ts rename to src/app/main/sample/sample.module.ts index bbebbc28..cb8bf06c 100644 --- a/src/app/main/content/sample/sample.module.ts +++ b/src/app/main/sample/sample.module.ts @@ -1,22 +1,21 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; - import { TranslateModule } from '@ngx-translate/core'; import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseSampleComponent } from './sample.component'; +import { SampleComponent } from './sample.component'; const routes = [ { path : 'sample', - component: FuseSampleComponent + component: SampleComponent } ]; @NgModule({ declarations: [ - FuseSampleComponent + SampleComponent ], imports : [ RouterModule.forChild(routes), @@ -26,10 +25,10 @@ const routes = [ FuseSharedModule ], exports : [ - FuseSampleComponent + SampleComponent ] }) -export class FuseSampleModule +export class SampleModule { } diff --git a/src/app/main/ui/colors/colors.component.ts b/src/app/main/ui/colors/colors.component.ts deleted file mode 100644 index f336f69d..00000000 --- a/src/app/main/ui/colors/colors.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { MatColors } from '@fuse/mat-colors'; - -@Component({ - selector : 'colors', - templateUrl: './colors.component.html', - styleUrls : ['./colors.component.scss'] -}) -export class ColorsComponent -{ - colors: {}; - selectedColor: string; - selectedColorDefaultValue: string; - - /** - * Constructor - */ - constructor() - { - // Set the defaults - this.colors = MatColors.all; - this._updateSelectedColor('primary'); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Select color - * - * @param selected - */ - selectColor(selected): void - { - this._updateSelectedColor(selected.tab.textLabel); - } - - /** - * Update selected color - * - * @param colorName - * @private - */ - private _updateSelectedColor(colorName): void - { - this.selectedColor = colorName; - this.selectedColorDefaultValue = MatColors.getColor(this.selectedColor)[500]; - } -} diff --git a/src/app/main/ui/icons/icons.component.ts b/src/app/main/ui/icons/icons.component.ts deleted file mode 100644 index e289964a..00000000 --- a/src/app/main/ui/icons/icons.component.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; - -@Component({ - selector : 'icons', - templateUrl: './icons.component.html', - styleUrls : ['./icons.component.scss'] -}) -export class IconsComponent implements OnInit, OnDestroy -{ - icons: string[]; - filteredIcons: string[]; - loading: boolean; - - // Private - private _unsubscribeAll: Subject; - - /** - * Constructor - * - * @param {HttpClient} _httpClient - */ - constructor( - private _httpClient: HttpClient - ) - { - // Set the defaults - this.loading = true; - - // Set the private defaults - this._unsubscribeAll = new Subject(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void - { - this._httpClient.get('api/icons') - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((icons: any) => { - this.icons = icons; - this.filteredIcons = this.icons; - this.loading = false; - }); - } - - /** - * On destroy - */ - ngOnDestroy(): void - { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Filter icons - * - * @param event - */ - filterIcons(event): void - { - const value = event.target.value; - - this.filteredIcons = this.icons.filter(icon => { - return icon.includes(value); - }); - } -} diff --git a/src/app/main/ui/page-layouts/blank/blank.component.scss b/src/app/main/ui/page-layouts/blank/blank.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/full-width-1/full-width-1.component.scss b/src/app/main/ui/page-layouts/carded/full-width-1/full-width-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/full-width-1/full-width-1.component.ts b/src/app/main/ui/page-layouts/carded/full-width-1/full-width-1.component.ts deleted file mode 100644 index 5a3e0daf..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-1/full-width-1.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'carded-fullwidth-1', - templateUrl: './full-width-1.component.html', - styleUrls : ['./full-width-1.component.scss'] -}) -export class CardedFullWidth1Component -{ - /** - * Constructor - */ - constructor() - { - } -} diff --git a/src/app/main/ui/page-layouts/carded/full-width-2/full-width-2.component.scss b/src/app/main/ui/page-layouts/carded/full-width-2/full-width-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/full-width-2/full-width-2.component.ts b/src/app/main/ui/page-layouts/carded/full-width-2/full-width-2.component.ts deleted file mode 100644 index fa38a5db..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-2/full-width-2.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'carded-fullwidth-2', - templateUrl: './full-width-2.component.html', - styleUrls : ['./full-width-2.component.scss'] -}) -export class CardedFullWidth2Component -{ - /** - * Constructor - */ - constructor() - { - } -} diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.html b/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.html deleted file mode 100644 index 7b494058..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.html +++ /dev/null @@ -1,115 +0,0 @@ -
- - -
- - - -
- - -
-

Full width with tabs and content scroll

-
- - - -
- - -
- - - - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- -
- -
- - -
- - -
- - -
diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.scss b/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.ts b/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.ts deleted file mode 100644 index 2da39a05..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'carded-fullwidth-tabbed-1', - templateUrl: './full-width-tabbed-1.component.html', - styleUrls : ['./full-width-tabbed-1.component.scss'] -}) -export class CardedFullWidthTabbed1Component -{ - /** - * Constructor - */ - constructor() - { - } -} diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.html b/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.html deleted file mode 100644 index 573e0e63..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.html +++ /dev/null @@ -1,115 +0,0 @@ -
- - -
- - - -
- - -
-

Full width with tabs and inner scroll

-
- - - -
- - -
- - - - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- - -
- - - -
-
- -
- -
- - -
- - -
- - -
diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.scss b/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.ts b/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.ts deleted file mode 100644 index dc746bb4..00000000 --- a/src/app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'carded-fullwidth-tabbed-2', - templateUrl: './full-width-tabbed-2.component.html', - styleUrls : ['./full-width-tabbed-2.component.scss'] -}) -export class CardedFullWidthTabbed2Component -{ - /** - * Constructor - */ - constructor() - { - } -} diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.html b/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.html deleted file mode 100644 index 9a21b456..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.html +++ /dev/null @@ -1,62 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.scss b/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.ts b/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.ts deleted file mode 100644 index a803f877..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-left-sidebar-1', - templateUrl: './left-sidebar-1.component.html', - styleUrls : ['./left-sidebar-1.component.scss'] -}) -export class CardedLeftSidebar1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.html b/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.html deleted file mode 100644 index c046980f..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.html +++ /dev/null @@ -1,62 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.scss b/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.ts b/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.ts deleted file mode 100644 index 1dac72ce..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-left-sidebar-2', - templateUrl: './left-sidebar-2.component.html', - styleUrls : ['./left-sidebar-2.component.scss'] -}) -export class CardedLeftSidebar2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.html b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.html deleted file mode 100644 index 671c54a6..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.html +++ /dev/null @@ -1,144 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.scss b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.ts b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.ts deleted file mode 100644 index db5902c6..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-left-sidebar-tabbed-1', - templateUrl: './left-sidebar-tabbed-1.component.html', - styleUrls : ['./left-sidebar-tabbed-1.component.scss'] -}) -export class CardedLeftSidebarTabbed1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.html b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.html deleted file mode 100644 index 5c138941..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.html +++ /dev/null @@ -1,144 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.scss b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.ts b/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.ts deleted file mode 100644 index 8d4d7c2c..00000000 --- a/src/app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-left-sidebar-tabbed-2', - templateUrl: './left-sidebar-tabbed-2.component.html', - styleUrls : ['./left-sidebar-tabbed-2.component.scss'] -}) -export class CardedLeftSidebarTabbed2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.html b/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.html deleted file mode 100644 index 4cb2b652..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.html +++ /dev/null @@ -1,62 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.scss b/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.ts b/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.ts deleted file mode 100644 index c3b9e890..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-right-sidebar-1', - templateUrl: './right-sidebar-1.component.html', - styleUrls : ['./right-sidebar-1.component.scss'] -}) -export class CardedRightSidebar1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.html b/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.html deleted file mode 100644 index 57fbf33d..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.html +++ /dev/null @@ -1,62 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.scss b/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.ts b/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.ts deleted file mode 100644 index c41c15f2..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-right-sidebar-2', - templateUrl: './right-sidebar-2.component.html', - styleUrls : ['./right-sidebar-2.component.scss'] -}) -export class CardedRightSidebar2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.html b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.html deleted file mode 100644 index 3c67bed4..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.html +++ /dev/null @@ -1,144 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.scss b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.ts b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.ts deleted file mode 100644 index 2cb92bd5..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-right-sidebar-tabbed-1', - templateUrl: './right-sidebar-tabbed-1.component.html', - styleUrls : ['./right-sidebar-tabbed-1.component.scss'] -}) -export class CardedRightSidebarTabbed1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.html b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.html deleted file mode 100644 index 9de17b71..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.html +++ /dev/null @@ -1,144 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.scss b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.ts b/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.ts deleted file mode 100644 index e564e4e8..00000000 --- a/src/app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'carded-right-sidebar-tabbed-2', - templateUrl: './right-sidebar-tabbed-2.component.html', - styleUrls : ['./right-sidebar-tabbed-2.component.scss'] -}) -export class CardedRightSidebarTabbed2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/page-layouts.module.ts b/src/app/main/ui/page-layouts/page-layouts.module.ts deleted file mode 100644 index 9c21e745..00000000 --- a/src/app/main/ui/page-layouts/page-layouts.module.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { MatButtonModule, MatIconModule, MatTabsModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseDemoModule } from '@fuse/components/demo/demo.module'; - -import { CardedFullWidth1Component } from 'app/main/ui/page-layouts/carded/full-width-1/full-width-1.component'; -import { CardedFullWidth2Component } from 'app/main/ui/page-layouts/carded/full-width-2/full-width-2.component'; -import { CardedFullWidthTabbed1Component } from 'app/main/ui/page-layouts/carded/full-width-tabbed-1/full-width-tabbed-1.component'; -import { CardedFullWidthTabbed2Component } from 'app/main/ui/page-layouts/carded/full-width-tabbed-2/full-width-tabbed-2.component'; -import { CardedLeftSidebar1Component } from 'app/main/ui/page-layouts/carded/left-sidebar-1/left-sidebar-1.component'; -import { CardedLeftSidebar2Component } from 'app/main/ui/page-layouts/carded/left-sidebar-2/left-sidebar-2.component'; -import { CardedLeftSidebarTabbed1Component } from 'app/main/ui/page-layouts/carded/left-sidebar-tabbed-1/left-sidebar-tabbed-1.component'; -import { CardedLeftSidebarTabbed2Component } from 'app/main/ui/page-layouts/carded/left-sidebar-tabbed-2/left-sidebar-tabbed-2.component'; -import { CardedRightSidebar1Component } from 'app/main/ui/page-layouts/carded/right-sidebar-1/right-sidebar-1.component'; -import { CardedRightSidebar2Component } from 'app/main/ui/page-layouts/carded/right-sidebar-2/right-sidebar-2.component'; -import { CardedRightSidebarTabbed1Component } from 'app/main/ui/page-layouts/carded/right-sidebar-tabbed-1/right-sidebar-tabbed-1.component'; -import { CardedRightSidebarTabbed2Component } from 'app/main/ui/page-layouts/carded/right-sidebar-tabbed-2/right-sidebar-tabbed-2.component'; -import { SimpleFullWidth1Component } from 'app/main/ui/page-layouts/simple/full-width-1/full-width-1.component'; -import { SimpleFullWidthTabbed1Component } from 'app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component'; -import { SimpleLeftSidebar1Component } from 'app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component'; -import { SimpleLeftSidebar2Component } from 'app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component'; -import { SimpleLeftSidebar3Component } from 'app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component'; -import { SimpleLeftSidebar4Component } from 'app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component'; -import { SimpleRightSidebar1Component } from 'app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component'; -import { SimpleRightSidebar2Component } from 'app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component'; -import { SimpleRightSidebar3Component } from 'app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component'; -import { SimpleRightSidebar4Component } from 'app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component'; -import { BlankComponent } from 'app/main/ui/page-layouts/blank/blank.component'; - -import { FuseSidebarModule } from '@fuse/components'; - -const routes: Routes = [ - // Carded - { - path : 'page-layouts/carded/full-width-1', - component: CardedFullWidth1Component - }, - { - path : 'page-layouts/carded/full-width-2', - component: CardedFullWidth2Component - }, - { - path : 'page-layouts/carded/full-width-tabbed-1', - component: CardedFullWidthTabbed1Component - }, - { - path : 'page-layouts/carded/full-width-tabbed-2', - component: CardedFullWidthTabbed2Component - }, - { - path : 'page-layouts/carded/left-sidebar-1', - component: CardedLeftSidebar1Component - }, - { - path : 'page-layouts/carded/left-sidebar-tabbed-1', - component: CardedLeftSidebarTabbed1Component - }, - { - path : 'page-layouts/carded/left-sidebar-2', - component: CardedLeftSidebar2Component - }, - { - path : 'page-layouts/carded/left-sidebar-tabbed-2', - component: CardedLeftSidebarTabbed2Component - }, - { - path : 'page-layouts/carded/right-sidebar-1', - component: CardedRightSidebar1Component - }, - { - path : 'page-layouts/carded/right-sidebar-tabbed-1', - component: CardedRightSidebarTabbed1Component - }, - { - path : 'page-layouts/carded/right-sidebar-2', - component: CardedRightSidebar2Component - }, - { - path : 'page-layouts/carded/right-sidebar-tabbed-2', - component: CardedRightSidebarTabbed2Component - }, - // Simple - { - path : 'page-layouts/simple/full-width-1', - component: SimpleFullWidth1Component - }, - { - path : 'page-layouts/simple/full-width-tabbed-1', - component: SimpleFullWidthTabbed1Component - }, - { - path : 'page-layouts/simple/left-sidebar-1', - component: SimpleLeftSidebar1Component - }, - { - path : 'page-layouts/simple/left-sidebar-2', - component: SimpleLeftSidebar2Component - }, - { - path : 'page-layouts/simple/left-sidebar-3', - component: SimpleLeftSidebar3Component - }, - { - path : 'page-layouts/simple/left-sidebar-4', - component: SimpleLeftSidebar4Component - }, - { - path : 'page-layouts/simple/right-sidebar-1', - component: SimpleRightSidebar1Component - }, - { - path : 'page-layouts/simple/right-sidebar-2', - component: SimpleRightSidebar2Component - }, - { - path : 'page-layouts/simple/right-sidebar-3', - component: SimpleRightSidebar3Component - }, - { - path : 'page-layouts/simple/right-sidebar-4', - component: SimpleRightSidebar4Component - }, - // Blank - { - path : 'page-layouts/blank', - component: BlankComponent - } -]; - -@NgModule({ - declarations: [ - CardedFullWidth1Component, - CardedFullWidth2Component, - CardedFullWidthTabbed1Component, - CardedFullWidthTabbed2Component, - CardedLeftSidebar1Component, - CardedLeftSidebar2Component, - CardedLeftSidebarTabbed1Component, - CardedLeftSidebarTabbed2Component, - CardedRightSidebar1Component, - CardedRightSidebar2Component, - CardedRightSidebarTabbed1Component, - CardedRightSidebarTabbed2Component, - SimpleFullWidth1Component, - SimpleFullWidthTabbed1Component, - SimpleLeftSidebar1Component, - SimpleLeftSidebar2Component, - SimpleLeftSidebar3Component, - SimpleLeftSidebar4Component, - SimpleRightSidebar1Component, - SimpleRightSidebar2Component, - SimpleRightSidebar3Component, - SimpleRightSidebar4Component, - BlankComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatButtonModule, - MatIconModule, - MatTabsModule, - - FuseSidebarModule, - FuseSharedModule, - FuseDemoModule - ] -}) -export class UIPageLayoutsModule -{ -} diff --git a/src/app/main/ui/page-layouts/simple/full-width-1/full-width-1.component.scss b/src/app/main/ui/page-layouts/simple/full-width-1/full-width-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/full-width-1/full-width-1.component.ts b/src/app/main/ui/page-layouts/simple/full-width-1/full-width-1.component.ts deleted file mode 100644 index 74e45bb1..00000000 --- a/src/app/main/ui/page-layouts/simple/full-width-1/full-width-1.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'simple-fullwidth-1', - templateUrl: './full-width-1.component.html', - styleUrls : ['./full-width-1.component.scss'] -}) -export class SimpleFullWidth1Component -{ - /** - * Constructor - */ - constructor() - { - } -} diff --git a/src/app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component.scss b/src/app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component.ts b/src/app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component.ts deleted file mode 100644 index 929abb3e..00000000 --- a/src/app/main/ui/page-layouts/simple/full-width-tabbed-1/full-width-tabbed-1.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'simple-full-width-tabbed-1', - templateUrl: './full-width-tabbed-1.component.html', - styleUrls : ['./full-width-tabbed-1.component.scss'] -}) -export class SimpleFullWidthTabbed1Component -{ - /** - * Constructor - */ - constructor() - { - } - -} diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.html b/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.html deleted file mode 100644 index df67aba7..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.scss b/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.ts b/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.ts deleted file mode 100644 index 72b8a444..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-1/left-sidebar-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-left-sidebar-1', - templateUrl: './left-sidebar-1.component.html', - styleUrls : ['./left-sidebar-1.component.scss'] -}) -export class SimpleLeftSidebar1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.html b/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.html deleted file mode 100644 index 976cd2f9..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.scss b/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.ts b/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.ts deleted file mode 100644 index 30b30671..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-2/left-sidebar-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-left-sidebar-2', - templateUrl: './left-sidebar-2.component.html', - styleUrls : ['./left-sidebar-2.component.scss'] -}) -export class SimpleLeftSidebar2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.html b/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.html deleted file mode 100644 index ba0b8580..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.html +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.scss b/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.ts b/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.ts deleted file mode 100644 index 145c341a..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-3/left-sidebar-3.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-left-sidebar-4', - templateUrl: './left-sidebar-3.component.html', - styleUrls : ['./left-sidebar-3.component.scss'] -}) -export class SimpleLeftSidebar3Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.html b/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.html deleted file mode 100644 index 52596e3e..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.html +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.scss b/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.ts b/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.ts deleted file mode 100644 index 4fb5f4b3..00000000 --- a/src/app/main/ui/page-layouts/simple/left-sidebar-4/left-sidebar-4.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-left-sidebar-4', - templateUrl: './left-sidebar-4.component.html', - styleUrls : ['./left-sidebar-4.component.scss'] -}) -export class SimpleLeftSidebar4Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.html b/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.html deleted file mode 100644 index 25f385bc..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.scss b/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.ts b/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.ts deleted file mode 100644 index 0d129ac2..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-1/right-sidebar-1.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-right-sidebar-1', - templateUrl: './right-sidebar-1.component.html', - styleUrls : ['./right-sidebar-1.component.scss'] -}) -export class SimpleRightSidebar1Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.html b/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.html deleted file mode 100644 index aa027714..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.html +++ /dev/null @@ -1,40 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.scss b/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.ts b/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.ts deleted file mode 100644 index a5969ad8..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-2/right-sidebar-2.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-right-sidebar-2', - templateUrl: './right-sidebar-2.component.html', - styleUrls : ['./right-sidebar-2.component.scss'] -}) -export class SimpleRightSidebar2Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.html b/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.html deleted file mode 100644 index 9a2aa27d..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.html +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.scss b/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.ts b/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.ts deleted file mode 100644 index bece4802..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-3/right-sidebar-3.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-right-sidebar-4', - templateUrl: './right-sidebar-3.component.html', - styleUrls : ['./right-sidebar-3.component.scss'] -}) -export class SimpleRightSidebar3Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.html b/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.html deleted file mode 100644 index 75b0c8b2..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.html +++ /dev/null @@ -1,48 +0,0 @@ - diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.scss b/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.ts b/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.ts deleted file mode 100644 index 3d9e9ee3..00000000 --- a/src/app/main/ui/page-layouts/simple/right-sidebar-4/right-sidebar-4.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component } from '@angular/core'; - -import { FuseSidebarService } from '@fuse/components/sidebar/sidebar.service'; - -@Component({ - selector : 'simple-right-sidebar-4', - templateUrl: './right-sidebar-4.component.html', - styleUrls : ['./right-sidebar-4.component.scss'] -}) -export class SimpleRightSidebar4Component -{ - /** - * Constructor - * - * @param {FuseSidebarService} _fuseSidebarService - */ - constructor( - private _fuseSidebarService: FuseSidebarService - ) - { - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Toggle sidebar - * - * @param name - */ - toggleSidebar(name): void - { - this._fuseSidebarService.getSidebar(name).toggleOpen(); - } -} diff --git a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.html b/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.html deleted file mode 100644 index e3a27221..00000000 --- a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.html +++ /dev/null @@ -1,105 +0,0 @@ -
- -
Message Boxes
- -
- -
- -
-
- This is a standard message box -
-
- - - - - -
- -
- -
-
- This is an alert message box! -
-
- - - - - -
- -
- -
-
- This is a warning message box -
-
- - - - - -
- -
- -
-
- This is a success message box -
-
- - - - - -
- -
- -
-
- This is a info message box -
-
- - - - - -
- - -
- -
\ No newline at end of file diff --git a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.scss b/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.scss deleted file mode 100644 index 04a80218..00000000 --- a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.scss +++ /dev/null @@ -1,31 +0,0 @@ -:host { - - #typography-message-boxes { - - .source-code { - position: relative; - margin-bottom: 24px; - min-height: 180px; - max-height: 500px; - - code { - background: none !important; - } - } - - .preview { - font-size: 16px; - padding: 16px; - margin-bottom: 24px; - min-height: 180px; - - &:last-child { - margin-bottom: 0; - } - - .mat-caption { - margin-bottom: 16px; - } - } - } -} \ No newline at end of file diff --git a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.ts b/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.ts deleted file mode 100644 index 9949aee7..00000000 --- a/src/app/main/ui/typography/tabs/message-boxes/message-boxes.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector : 'typography-message-boxes', - templateUrl: './message-boxes.component.html', - styleUrls : ['./message-boxes.component.scss'] -}) -export class TypographyMessageBoxesComponent -{ - /** - * Constructor - */ - constructor() - { - - } -} diff --git a/src/app/main/ui/typography/typography.module.ts b/src/app/main/ui/typography/typography.module.ts deleted file mode 100644 index 38aa6db0..00000000 --- a/src/app/main/ui/typography/typography.module.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { MatIconModule, MatTabsModule } from '@angular/material'; - -import { FuseSharedModule } from '@fuse/shared.module'; -import { FuseHighlightModule } from '@fuse/components'; - -import { TypographyComponent } from 'app/main/ui/typography/typography.component'; -import { TypographyHeadingsComponent } from 'app/main/ui/typography/tabs/headings/headings.component'; -import { TypographyInlineTextElementsComponent } from 'app/main/ui/typography/tabs/inline-text-elements/inline-text-elements.component'; -import { TypographyBlockquotesListsComponent } from 'app/main/ui/typography/tabs/blockquotes-lists/blockquotes-lists.component'; -import { TypographyMessageBoxesComponent } from 'app/main/ui/typography/tabs/message-boxes/message-boxes.component'; -import { TypographyHelpersComponent } from 'app/main/ui/typography/tabs/helpers/helpers.component'; - -const routes: Routes = [ - { - path : 'typography', - component: TypographyComponent - } -]; - -@NgModule({ - declarations: [ - TypographyComponent, - TypographyHeadingsComponent, - TypographyInlineTextElementsComponent, - TypographyBlockquotesListsComponent, - TypographyMessageBoxesComponent, - TypographyHelpersComponent - ], - imports : [ - RouterModule.forChild(routes), - - MatIconModule, - MatTabsModule, - - FuseSharedModule, - FuseHighlightModule - ] -}) -export class UITypographyModule -{ -} diff --git a/src/app/main/ui/ui.module.ts b/src/app/main/ui/ui.module.ts deleted file mode 100644 index 1d594101..00000000 --- a/src/app/main/ui/ui.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { UIFormsModule } from 'app/main/ui/forms/forms.module'; -import { UIIconsModule } from 'app/main/ui/icons/icons.module'; -import { UITypographyModule } from 'app/main/ui/typography/typography.module'; -import { UIHelperClassesModule } from 'app/main/ui/helper-classes/helper-classes.module'; -import { UIPageLayoutsModule } from 'app/main/ui/page-layouts/page-layouts.module'; -import { UIColorsModule } from 'app/main/ui/colors/colors.module'; - -@NgModule({ - imports: [ - UIFormsModule, - UIIconsModule, - UITypographyModule, - UIHelperClassesModule, - UIPageLayoutsModule, - UIColorsModule - ] -}) -export class UIModule -{ -} diff --git a/src/app/navigation/navigation.ts b/src/app/navigation/navigation.ts index 5c5740db..b6dea9ef 100644 --- a/src/app/navigation/navigation.ts +++ b/src/app/navigation/navigation.ts @@ -1,22 +1,24 @@ -export const navigation = [ +import { FuseNavigation } from '@fuse/types'; + +export const navigation: FuseNavigation[] = [ { - 'id' : 'applications', - 'title' : 'Applications', - 'translate': 'NAV.APPLICATIONS', - 'type' : 'group', - 'children': [ + id : 'applications', + title : 'Applications', + translate: 'NAV.APPLICATIONS', + type : 'group', + children : [ { - 'id' : 'sample', - 'title': 'Sample', - 'translate': 'NAV.SAMPLE.TITLE', - 'type' : 'item', - 'icon' : 'email', - 'url' : '/sample', - 'badge': { - 'title': 25, - 'translate': 'NAV.SAMPLE.BADGE', - 'bg' : '#F44336', - 'fg' : '#FFFFFF' + id : 'sample', + title : 'Sample', + translate: 'NAV.SAMPLE.TITLE', + type : 'item', + icon : 'email', + url : '/sample', + badge : { + title : '25', + translate: 'NAV.SAMPLE.BADGE', + bg : '#F44336', + fg : '#FFFFFF' } } ]