Upgraded custom-webpack and typescript.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter (extern) 2021-06-16 09:15:53 +02:00
parent 22209cfaf6
commit 8d3c098f4e
9 changed files with 111 additions and 2078 deletions

2161
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -47,7 +47,7 @@
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-builders/custom-webpack": "~10.0.1",
"@angular-builders/custom-webpack": "^11.1.1",
"@angular-devkit/build-angular": "^0.1102.14",
"@angular/cli": "^11.2.14",
"@angular/compiler-cli": "~11.2.14",
@ -67,6 +67,6 @@
"protractor": "~7.0.0",
"ts-node": "^8.8.1",
"tslint": "~6.1.0",
"typescript": "^4.0.7"
"typescript": "~4.1.0"
}
}

View File

@ -13,7 +13,7 @@ export class GpsLocation implements OnInit,OnChanges{
@Input() enable:boolean;
public instance: Overlay;
@Input() position: Position;
@Input() position: GeolocationPosition;
@Input() location: number[]=[0,0];
@Input() locationTolerance: number = 0;
@Input() showHeading: boolean = false;
@ -61,7 +61,7 @@ export class GpsLocation implements OnInit,OnChanges{
ngOnChanges(changes: SimpleChanges) {
if (changes.position && this.instance) {
var p = changes.position.currentValue as Position;
var p = changes.position.currentValue as GeolocationPosition;
if(p && this.initialized) {
this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
this.locationTolerance = p.coords.accuracy;

View File

@ -14,7 +14,7 @@ export class PanToLocation implements OnInit,OnChanges{
view: View;
map: MapComponent;
@Input() position: Position;
@Input() position: GeolocationPosition;
@Input() mapState: IMapState;
@Input() animate: boolean;

View File

@ -74,7 +74,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public searchMinified$: Observable<boolean> = this.store.select(mapReducers.selectGetSearchMinified);
public menuVisible$: Observable<boolean>;
public query$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQuery);
public position$: Observable<Position> = this.geolocationService.getCurrentPosition();
public position$: Observable<GeolocationPosition> = this.geolocationService.getCurrentPosition();
public compassHeading$: Observable<number> = this.deviceorientationService.getCurrentCompassHeading();
public baseLayersCollapsed:boolean = true;
public overlayLayersCollapsed: boolean = true;

View File

@ -9,14 +9,14 @@ import { Observer, Observable,BehaviorSubject } from 'rxjs';
@Injectable()
export class GeolocationService {
private positionObserver$:BehaviorSubject<Position> = new BehaviorSubject<Position>(null);
private positionObserver$:BehaviorSubject<GeolocationPosition> = new BehaviorSubject<GeolocationPosition>(null);
constructor() {
navigator.geolocation.watchPosition(
(position: Position) => {
(position: GeolocationPosition) => {
this.positionObserver$.next(position);
},
(error: PositionError) => {
(error: GeolocationPositionError) => {
console.debug('Geolocation service: ' + error.message);
},
{
@ -28,7 +28,7 @@ export class GeolocationService {
}
getCurrentPosition(): Observable<Position> {
getCurrentPosition(): Observable<GeolocationPosition> {
return this.positionObserver$;
}
}

View File

@ -65,7 +65,7 @@ export class ItemTypeService {
})
.catch(error => this.itemTypes = null);
} else {
return new Promise((resolve) => {resolve()});
return new Promise<void>((resolve) => {resolve()});
}
};
}

View File

@ -10,7 +10,7 @@ import { IAuthconfigFactory } from './authconfigFactory';
export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthService: OAuthService, authconfigFactory:IAuthconfigFactory,authStorage:OAuthStorage,itemtypeService:ItemTypeService): () => Promise<any> {
return (): Promise<any> => {
return new Promise((resolve,reject) => {
return new Promise<void>((resolve,reject) => {
appConfig.load().then(() => {
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
oauthService.setStorage(authStorage);

View File

@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { RouterModule, UrlSegment } from '@angular/router';
import { RouterModule, UrlSegment, ExtraOptions } from '@angular/router';
import { AuthGuard, FullScreenGuard } from '@farmmaps/common';
//import { MapComponent } from '@farmmaps/common-map';
@ -78,7 +78,7 @@ const routes = [
@NgModule({
imports: [RouterModule.forRoot(routes,
{ initialNavigation: true })], // , enableTracing: true
{ initialNavigation: 'enabledBlocking' })], // , enableTracing: true
exports: [RouterModule]
})
export class AppRoutingModule { }