diff --git a/package-lock.json b/package-lock.json index a4db9111..74edde97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,11 +4,6 @@ "lockfileVersion": 1, "requires": true, "dependencies": { - "@agm/core": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@agm/core/-/core-1.0.0-beta.5.tgz", - "integrity": "sha512-LVENJqtBZEWpX+uJkGI0zgg+Xkm2KkktQm4ojZozArbeNvQkVL6pqVc04Mme6vvOzwJpD1cET5w4byC8Xaq1QQ==" - }, "@angular-devkit/architect": { "version": "0.900.4", "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.900.4.tgz", diff --git a/package.json b/package.json index 027d62f8..776ab8a3 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "postinstall": "ngcc --properties es2015 es5 browser module main --first-only --create-ivy-entry-points" }, "dependencies": { - "@agm/core": "^1.0.0-beta.5", "@angular/animations": "^9.0.4", "@angular/cdk": "^8.0.0", "@angular/common": "^9.0.4", @@ -60,8 +59,6 @@ "leaflet": "1.2.0", "nebular-icons": "1.1.0", "ng2-ckeditor": "^1.2.2", - "ng2-completer": "3.0.3", - "ng2-smart-table": "1.5.0", "ngx-echarts": "^4.2.2", "node-sass": "^4.12.0", "normalize.css": "6.0.0", diff --git a/src/app/@core/core.module.ts b/src/app/@core/core.module.ts index 012f8097..a4592cce 100644 --- a/src/app/@core/core.module.ts +++ b/src/app/@core/core.module.ts @@ -153,13 +153,16 @@ export const NB_CORE_PROVIDERS = [ NbAuthModule, ], declarations: [], + providers: [ + ...NB_CORE_PROVIDERS + ] }) export class CoreModule { constructor(@Optional() @SkipSelf() parentModule: CoreModule) { throwIfAlreadyLoaded(parentModule, 'CoreModule'); } - static forRoot(): ModuleWithProviders { + static forRoot(): ModuleWithProviders { return { ngModule: CoreModule, providers: [ diff --git a/src/app/@core/mock/mock-data.module.ts b/src/app/@core/mock/mock-data.module.ts index a21c4d30..6f9f2785 100644 --- a/src/app/@core/mock/mock-data.module.ts +++ b/src/app/@core/mock/mock-data.module.ts @@ -54,7 +54,7 @@ const SERVICES = [ ], }) export class MockDataModule { - static forRoot(): ModuleWithProviders { + static forRoot(): ModuleWithProviders { return { ngModule: MockDataModule, providers: [ diff --git a/src/app/@theme/theme.module.ts b/src/app/@theme/theme.module.ts index 5ae45d8c..afacd352 100644 --- a/src/app/@theme/theme.module.ts +++ b/src/app/@theme/theme.module.ts @@ -74,9 +74,17 @@ const PIPES = [ imports: [CommonModule, ...NB_MODULES], exports: [CommonModule, ...PIPES, ...COMPONENTS], declarations: [...COMPONENTS, ...PIPES], + providers: [ + ...NbThemeModule.forRoot( + { + name: 'default', + }, + [ DEFAULT_THEME, COSMIC_THEME, CORPORATE_THEME, DARK_THEME ], + ).providers, + ] }) export class ThemeModule { - static forRoot(): ModuleWithProviders { + static forRoot(): ModuleWithProviders { return { ngModule: ThemeModule, providers: [ diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index e6de7fe2..eb53c65c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -9,10 +9,10 @@ import { NbResetPasswordComponent, } from '@nebular/auth'; -const routes: Routes = [ +export const routes: Routes = [ { path: 'pages', - loadChildren: () => import('app/pages/pages.module') + loadChildren: () => import('./pages/pages.module') .then(m => m.PagesModule), }, { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0616603a..9db704c4 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,9 +28,6 @@ import { BrowserAnimationsModule, HttpClientModule, AppRoutingModule, - - ThemeModule.forRoot(), - NbSidebarModule.forRoot(), NbMenuModule.forRoot(), NbDatepickerModule.forRoot(), @@ -40,7 +37,8 @@ import { NbChatModule.forRoot({ messageGoogleMapKey: 'AIzaSyA_wNuCzia92MAmdLRzmqitRGvCF7wCZPY', }), - CoreModule.forRoot(), + CoreModule, + ThemeModule, ], bootstrap: [AppComponent], }) diff --git a/src/app/pages/maps/gmaps/gmaps.component.ts b/src/app/pages/maps/gmaps/gmaps.component.ts index 9f255e83..2271e76c 100644 --- a/src/app/pages/maps/gmaps/gmaps.component.ts +++ b/src/app/pages/maps/gmaps/gmaps.component.ts @@ -7,9 +7,9 @@ import { Component } from '@angular/core'; Google Maps - + `, diff --git a/src/app/pages/maps/maps.module.ts b/src/app/pages/maps/maps.module.ts index 19c2c0df..c33446e0 100644 --- a/src/app/pages/maps/maps.module.ts +++ b/src/app/pages/maps/maps.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { AgmCoreModule } from '@agm/core'; +// import { AgmCoreModule } from '@agm/core'; import { LeafletModule } from '@asymmetrik/ngx-leaflet'; import { NgxEchartsModule } from 'ngx-echarts'; import { NbCardModule } from '@nebular/theme'; @@ -10,10 +10,10 @@ import { MapsRoutingModule, routedComponents } from './maps-routing.module'; @NgModule({ imports: [ ThemeModule, - AgmCoreModule.forRoot({ - apiKey: 'AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k', - libraries: ['places'], - }), + // AgmCoreModule.forRoot({ + // apiKey: 'AIzaSyCpVhQiwAllg1RAFaxMWSpQruuGARy0Y1k', + // libraries: ['places'], + // }), LeafletModule.forRoot(), MapsRoutingModule, NgxEchartsModule, diff --git a/src/app/pages/maps/search-map/map/map.component.html b/src/app/pages/maps/search-map/map/map.component.html index 1b3e1714..c5f827e6 100644 --- a/src/app/pages/maps/search-map/map/map.component.html +++ b/src/app/pages/maps/search-map/map/map.component.html @@ -1,7 +1,7 @@ - - + --> diff --git a/src/app/pages/maps/search-map/search/search.component.ts b/src/app/pages/maps/search-map/search/search.component.ts index b9816843..dca89a4d 100644 --- a/src/app/pages/maps/search-map/search/search.component.ts +++ b/src/app/pages/maps/search-map/search/search.component.ts @@ -1,5 +1,5 @@ import { Component, ElementRef, EventEmitter, NgZone, OnInit, Output, ViewChild } from '@angular/core'; -import { MapsAPILoader } from '@agm/core'; +// import { MapsAPILoader } from '@agm/core'; import { Location } from '../entity/Location'; @@ -14,31 +14,31 @@ export class SearchComponent implements OnInit { @ViewChild('search', { static: true }) public searchElementRef: ElementRef; - constructor(private mapsAPILoader: MapsAPILoader, + constructor(// private mapsAPILoader: MapsAPILoader, private ngZone: NgZone) { } ngOnInit() { // load Places Autocomplete - this.mapsAPILoader.load().then(() => { - const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef.nativeElement, { - types: ['address'], - }); - autocomplete.addListener('place_changed', () => { - this.ngZone.run(() => { - // get the place result - const place: google.maps.places.PlaceResult = autocomplete.getPlace(); + // this.mapsAPILoader.load().then(() => { + // const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef.nativeElement, { + // types: ['address'], + // }); + // autocomplete.addListener('place_changed', () => { + // this.ngZone.run(() => { + // // get the place result + // const place: google.maps.places.PlaceResult = autocomplete.getPlace(); - // verify result - if (place.geometry === undefined || place.geometry === null) { - return; - } + // // verify result + // if (place.geometry === undefined || place.geometry === null) { + // return; + // } - this.positionChanged.emit( - new Location(place.geometry.location.lat(), - place.geometry.location.lng())); - }); - }); - }); + // this.positionChanged.emit( + // new Location(place.geometry.location.lat(), + // place.geometry.location.lng())); + // }); + // }); + // }); } } diff --git a/src/app/pages/tables/smart-table/smart-table.component.html b/src/app/pages/tables/smart-table/smart-table.component.html index 05cd834c..8522c1b9 100644 --- a/src/app/pages/tables/smart-table/smart-table.component.html +++ b/src/app/pages/tables/smart-table/smart-table.component.html @@ -4,7 +4,7 @@ - - + diff --git a/src/app/pages/tables/smart-table/smart-table.component.ts b/src/app/pages/tables/smart-table/smart-table.component.ts index 89c8ec59..d14f8d17 100644 --- a/src/app/pages/tables/smart-table/smart-table.component.ts +++ b/src/app/pages/tables/smart-table/smart-table.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { LocalDataSource } from 'ng2-smart-table'; +// import { LocalDataSource } from 'ng2-smart-table'; import { SmartTableData } from '../../../@core/data/smart-table'; @@ -53,11 +53,11 @@ export class SmartTableComponent { }, }; - source: LocalDataSource = new LocalDataSource(); + // source: LocalDataSource = new LocalDataSource(); constructor(private service: SmartTableData) { - const data = this.service.getData(); - this.source.load(data); + // const data = this.service.getData(); + // this.source.load(data); } onDeleteConfirm(event): void { diff --git a/src/app/pages/tables/tables-routing.module.ts b/src/app/pages/tables/tables-routing.module.ts index 3271c0a2..dd0725e1 100644 --- a/src/app/pages/tables/tables-routing.module.ts +++ b/src/app/pages/tables/tables-routing.module.ts @@ -2,17 +2,17 @@ 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 { 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: 'smart-table', + // component: SmartTableComponent, + // }, { path: 'tree-grid', component: TreeGridComponent, @@ -28,6 +28,6 @@ export class TablesRoutingModule { } export const routedComponents = [ TablesComponent, - SmartTableComponent, + // SmartTableComponent, TreeGridComponent, ]; diff --git a/src/app/pages/tables/tables.module.ts b/src/app/pages/tables/tables.module.ts index a9074c4f..7c4a5ad8 100644 --- a/src/app/pages/tables/tables.module.ts +++ b/src/app/pages/tables/tables.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { NbCardModule, NbIconModule, NbInputModule, NbTreeGridModule } from '@nebular/theme'; -import { Ng2SmartTableModule } from 'ng2-smart-table'; +// import { Ng2SmartTableModule } from 'ng2-smart-table'; import { ThemeModule } from '../../@theme/theme.module'; import { TablesRoutingModule, routedComponents } from './tables-routing.module'; @@ -14,7 +14,7 @@ import { FsIconComponent } from './tree-grid/tree-grid.component'; NbInputModule, ThemeModule, TablesRoutingModule, - Ng2SmartTableModule, + // Ng2SmartTableModule, ], declarations: [ ...routedComponents, diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 5d3e3649..abcbf3b2 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json @@ -2,15 +2,7 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "baseUrl": "./", - "paths": { - "@angular/*": [ - "../node_modules/@angular/*" - ], - "@nebular/*": [ - "../node_modules/@nebular/*" - ] - } + "baseUrl": "./" }, "exclude": [ "test.ts",