diff --git a/src/app/@core/mock/mock-data.module.ts b/src/app/@core/mock/mock-data.module.ts index 6f9f2785..6dadc94d 100644 --- a/src/app/@core/mock/mock-data.module.ts +++ b/src/app/@core/mock/mock-data.module.ts @@ -2,47 +2,9 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CommonModule } from '@angular/common'; import { UserService } from './users.service'; -import { ElectricityService } from './electricity.service'; -import { SmartTableService } from './smart-table.service'; -import { UserActivityService } from './user-activity.service'; -import { OrdersChartService } from './orders-chart.service'; -import { ProfitChartService } from './profit-chart.service'; -import { TrafficListService } from './traffic-list.service'; -import { PeriodsService } from './periods.service'; -import { EarningService } from './earning.service'; -import { OrdersProfitChartService } from './orders-profit-chart.service'; -import { TrafficBarService } from './traffic-bar.service'; -import { ProfitBarAnimationChartService } from './profit-bar-animation-chart.service'; -import { TemperatureHumidityService } from './temperature-humidity.service'; -import { SolarService } from './solar.service'; -import { TrafficChartService } from './traffic-chart.service'; -import { StatsBarService } from './stats-bar.service'; -import { CountryOrderService } from './country-order.service'; -import { StatsProgressBarService } from './stats-progress-bar.service'; -import { VisitorsAnalyticsService } from './visitors-analytics.service'; -import { SecurityCamerasService } from './security-cameras.service'; const SERVICES = [ UserService, - ElectricityService, - SmartTableService, - UserActivityService, - OrdersChartService, - ProfitChartService, - TrafficListService, - PeriodsService, - EarningService, - OrdersProfitChartService, - TrafficBarService, - ProfitBarAnimationChartService, - TemperatureHumidityService, - SolarService, - TrafficChartService, - StatsBarService, - CountryOrderService, - StatsProgressBarService, - VisitorsAnalyticsService, - SecurityCamerasService, ]; @NgModule({ diff --git a/src/app/@theme/theme.module.ts b/src/app/@theme/theme.module.ts index f5731098..2ffc1027 100644 --- a/src/app/@theme/theme.module.ts +++ b/src/app/@theme/theme.module.ts @@ -20,8 +20,9 @@ import { NbSecurityModule } from '@nebular/security'; import { FooterComponent, HeaderComponent, + LayoutDirectionSwitcherComponent, SearchInputComponent, - TinyMCEComponent, + SwitcherComponent, } from './components'; import { CapitalizePipe, @@ -57,10 +58,11 @@ const NB_MODULES = [ NbEvaIconsModule, ]; const COMPONENTS = [ + SwitcherComponent, + LayoutDirectionSwitcherComponent, HeaderComponent, FooterComponent, SearchInputComponent, - TinyMCEComponent, OneColumnLayoutComponent, ThreeColumnsLayoutComponent, TwoColumnsLayoutComponent, diff --git a/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts b/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts deleted file mode 100644 index 7e0639a7..00000000 --- a/src/app/pages/dashboard/rooms/room-selector/room-selector.component.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { Component, EventEmitter, HostBinding, OnDestroy, OnInit, Output } from '@angular/core'; -import { Location, LocationStrategy } from '@angular/common'; -import { NbThemeService } from '@nebular/theme'; -import { map, takeUntil } from 'rxjs/operators'; -import { Subject } from 'rxjs'; - -@Component({ - selector: 'ngx-room-selector', - templateUrl: './room-selector.component.html', - styleUrls: ['./room-selector.component.scss'], -}) -export class RoomSelectorComponent implements OnInit, OnDestroy { - - private destroy$ = new Subject(); - private hideGrid: boolean; - - @Output() select: EventEmitter = new EventEmitter(); - - selectedRoom = null; - sortedRooms = []; - viewBox = '-20 -20 618.88 407.99'; - isIE = !!(navigator.userAgent.match(/Trident/) - || navigator.userAgent.match(/MSIE/) - || navigator.userAgent.match(/Edge/)); - isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') >= 0; - roomSvg = { - borders: [{ - d: 'M186.21,130.05H216.37V160H186.21Z', - }], - stokedAreas: [ - { d: 'M562.71,225V354h-290V319H418.37a6.09,6.09,0,0,0,6.09-6.09V225Z' }, - { d: 'M8.09,130V347.91A6.09,6.09,0,0,0,14.18,354h54V130Z' }, - { d: 'M216.37,49.82H358.8V92.5H216.37Z' }, - ], - rooms: [ - { - id: '0', - name: { text: 'Kitchen', x: 142, y: 240.8 }, - area: { d: 'M68.18,130V359.9A6.09,6.09,0,0,0,74.27,366h136a6.09,6.09,0,0,0,6.09-6.09V160H186.21V130Z' }, - border: { d: 'M96,130H68.18V359.9A6.09,6.09,0,0,0,74.27,366h136a6.09,6.09,0,0,0,6.09-6.09V225 M152.71,' + - '130H186.21V160H218.5' }, - }, - { - id: '1', - name: { text: 'Bedroom', x: 109, y: 66 }, - area: { d: 'M152.71,130h63.66V8.09A6.09,6.09,0,0,0,210.27,2H8.09A6.09,6.09,0,0,0,2,8.09V123.95A6.09,' + - '6.09,0,0,0,8.09,130H96Z' }, - border: { d: 'M152.71,130h63.66V8.09A6.09,6.09,0,0,0,210.27,2H8.09A6.09,6.09,0,0,0,2,8.09V123.95A6.09' + - ',6.09,0,0,0,8.09,130H96' }, - }, - { - id: '2', - name: { text: 'Living Room', x: 468, y: 134 }, - area: { d: 'M358.8,160V49.82a6.09,6.09,0,0,1,6.09-6.09H570.78a6.09,6.09,0,0,1,6.09,6.09V218.9a6.09' + - ',6.09,0,0,1-6.09,6.09h-212Z' }, - border: { d: 'M358.8,160V49.82a6.09,6.09,0,0,1,6.09-6.09H570.78a6.09,6.09,0,0,1,6.09,6.09V218.9a6.09' + - ',6.09,0,0,1-6.09,6.09h-212' }, - }, - { - id: '3', - name: { text: 'Hallway', x: 320, y: 273 }, - area: { d: 'M216.37,354V92.5H358.8V225H424.39V319H272.71V354Z' }, - border: { d: 'M216.37,225V356 M216.21,162V92.5H358.8V160 M358.8,225H424.39V312.91a6.09,' + - '6.09,0,0,1,-6.09,6.09H272.71V356' }, - }, - ], - }; - - @HostBinding('style.background') - get background(): 'none' | null { - return this.hideGrid ? 'none' : null; - } - - constructor( - private location: Location, - private locationStrategy: LocationStrategy, - private themeService: NbThemeService, - ) { - this.selectRoom('2'); - } - - ngOnInit() { - this.hideGrid = this.themeService.currentTheme === 'corporate'; - - this.themeService.onThemeChange() - .pipe( - map(({ name }) => name === 'corporate'), - takeUntil(this.destroy$), - ) - .subscribe((hideGrid: boolean) => this.hideGrid = hideGrid); - } - - ngOnDestroy() { - this.destroy$.next(); - this.destroy$.complete(); - } - - private sortRooms() { - this.sortedRooms = this.roomSvg.rooms.slice(0).sort((a, b) => { - if (a.id === this.selectedRoom) { - return 1; - } - if (b.id === this.selectedRoom) { - return -1; - } - return 0; - }); - } - - selectRoom(roomNumber) { - this.select.emit(roomNumber); - this.selectedRoom = roomNumber; - this.sortRooms(); - } - - getUrlPath(id: string) { - const baseHref = this.locationStrategy.getBaseHref().replace(/\/$/, ''); - const path = this.location.path().replace(/\/$/, ''); - - return `url(${baseHref}${path}${id})`; - } -} diff --git a/src/app/pages/dashboard/rooms/rooms.component.ts b/src/app/pages/dashboard/rooms/rooms.component.ts deleted file mode 100644 index 8235f4d5..00000000 --- a/src/app/pages/dashboard/rooms/rooms.component.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Component, HostBinding, OnDestroy } from '@angular/core'; -import { NbThemeService, NbMediaBreakpoint, NbMediaBreakpointsService } from '@nebular/theme'; -import { map } from 'rxjs/operators'; - -@Component({ - selector: 'ngx-rooms', - styleUrls: ['./rooms.component.scss'], - template: ` - - - - - - - `, -}) -export class RoomsComponent implements OnDestroy { - - @HostBinding('class.expanded') - private expanded: boolean; - private selected: number; - - isDarkTheme: boolean; - - breakpoint: NbMediaBreakpoint; - breakpoints: any; - themeSubscription: any; - themeChangeSubscription: any; - - constructor(private themeService: NbThemeService, - private breakpointService: NbMediaBreakpointsService) { - - this.breakpoints = this.breakpointService.getBreakpointsMap(); - this.themeSubscription = this.themeService.onMediaQueryChange() - .subscribe(([, newValue]) => { - this.breakpoint = newValue; - }); - - this.themeChangeSubscription = this.themeService.onThemeChange() - .pipe(map(({ name }) => name === 'cosmic' || name === 'dark')) - .subscribe((isDark: boolean) => this.isDarkTheme = isDark); - } - - select(roomNumber) { - if (this.isSelected(roomNumber)) { - this.expand(); - } else { - this.collapse(); - } - - this.selected = roomNumber; - } - - expand() { - this.expanded = true; - } - - collapse() { - this.expanded = false; - } - - isCollapsed() { - return !this.expanded; - } - - private isSelected(roomNumber): boolean { - return this.selected === roomNumber; - } - - ngOnDestroy() { - this.themeSubscription.unsubscribe(); - this.themeChangeSubscription.unsubscribe(); - } -} diff --git a/src/app/pages/e-commerce/user-activity/user-activity.component.scss b/src/app/pages/e-commerce/user-activity/user-activity.component.scss deleted file mode 100644 index 52c59a08..00000000 --- a/src/app/pages/e-commerce/user-activity/user-activity.component.scss +++ /dev/null @@ -1,53 +0,0 @@ -@import '../../../@theme/styles/themes'; - -@include nb-install-component() { - nb-card-header { - display: flex; - align-items: center; - justify-content: space-between; - border: none; - padding-top: nb-theme(card-header-with-select-padding-top); - padding-bottom: nb-theme(card-header-with-select-padding-bottom); - } - - nb-list { - overflow-x: hidden; - } - - nb-list-item { - display: flex; - align-items: flex-end; - justify-content: space-between; - margin: 0 -0.25rem; - } - - .visited-date, - .visited-pages-count, - .visited-percentages { - flex: 1 0 auto; - margin: 0 0.25rem; - } - - .value { - margin-top: 0.25rem; - color: nb-theme(color-success-default); - } - - .delta { - display: flex; - align-items: center; - position: relative; - - &.down { - color: nb-theme(color-danger-default); - } - - &.up { - color: nb-theme(color-success-default); - } - - nb-icon ::ng-deep svg { - vertical-align: top; - } - } -} diff --git a/src/app/pages/tables/smart-table/smart-table.component.html b/src/app/pages/tables/smart-table/smart-table.component.html deleted file mode 100644 index 05cd834c..00000000 --- a/src/app/pages/tables/smart-table/smart-table.component.html +++ /dev/null @@ -1,10 +0,0 @@ - - - Smart Table - - - - - - - diff --git a/src/app/pages/tables/smart-table/smart-table.component.ts b/src/app/pages/tables/smart-table/smart-table.component.ts deleted file mode 100644 index 89c8ec59..00000000 --- a/src/app/pages/tables/smart-table/smart-table.component.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Component } from '@angular/core'; -import { LocalDataSource } from 'ng2-smart-table'; - -import { SmartTableData } from '../../../@core/data/smart-table'; - -@Component({ - selector: 'ngx-smart-table', - templateUrl: './smart-table.component.html', - styleUrls: ['./smart-table.component.scss'], -}) -export class SmartTableComponent { - - settings = { - add: { - addButtonContent: '', - createButtonContent: '', - cancelButtonContent: '', - }, - edit: { - editButtonContent: '', - saveButtonContent: '', - cancelButtonContent: '', - }, - delete: { - deleteButtonContent: '', - confirmDelete: true, - }, - columns: { - id: { - title: 'ID', - type: 'number', - }, - firstName: { - title: 'First Name', - type: 'string', - }, - lastName: { - title: 'Last Name', - type: 'string', - }, - username: { - title: 'Username', - type: 'string', - }, - email: { - title: 'E-mail', - type: 'string', - }, - age: { - title: 'Age', - type: 'number', - }, - }, - }; - - source: LocalDataSource = new LocalDataSource(); - - constructor(private service: SmartTableData) { - const data = this.service.getData(); - this.source.load(data); - } - - onDeleteConfirm(event): void { - if (window.confirm('Are you sure you want to delete?')) { - event.confirm.resolve(); - } else { - event.confirm.reject(); - } - } -} diff --git a/src/app/pages/tables/tables-routing.module.ts b/src/app/pages/tables/tables-routing.module.ts deleted file mode 100644 index 3271c0a2..00000000 --- a/src/app/pages/tables/tables-routing.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { TablesComponent } from './tables.component'; -import { SmartTableComponent } from './smart-table/smart-table.component'; -import { TreeGridComponent } from './tree-grid/tree-grid.component'; - -const routes: Routes = [{ - path: '', - component: TablesComponent, - children: [ - { - path: 'smart-table', - component: SmartTableComponent, - }, - { - path: 'tree-grid', - component: TreeGridComponent, - }, - ], -}]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule], -}) -export class TablesRoutingModule { } - -export const routedComponents = [ - TablesComponent, - SmartTableComponent, - TreeGridComponent, -]; diff --git a/src/app/pages/tables/tables.module.ts b/src/app/pages/tables/tables.module.ts deleted file mode 100644 index a9074c4f..00000000 --- a/src/app/pages/tables/tables.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { NbCardModule, NbIconModule, NbInputModule, NbTreeGridModule } from '@nebular/theme'; -import { Ng2SmartTableModule } from 'ng2-smart-table'; - -import { ThemeModule } from '../../@theme/theme.module'; -import { TablesRoutingModule, routedComponents } from './tables-routing.module'; -import { FsIconComponent } from './tree-grid/tree-grid.component'; - -@NgModule({ - imports: [ - NbCardModule, - NbTreeGridModule, - NbIconModule, - NbInputModule, - ThemeModule, - TablesRoutingModule, - Ng2SmartTableModule, - ], - declarations: [ - ...routedComponents, - FsIconComponent, - ], -}) -export class TablesModule { } diff --git a/src/assets/images/kitten-dark.png b/src/assets/images/kitten-dark.png deleted file mode 100644 index 3966612c..00000000 Binary files a/src/assets/images/kitten-dark.png and /dev/null differ