Update to angular 8.2

This commit is contained in:
Willem Dantuma 2019-11-25 14:34:51 +01:00
parent 16db063339
commit 7bd5dada2b
22 changed files with 5929 additions and 4352 deletions

6294
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,14 +11,14 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~7.2.0", "@angular/animations": "~8.2.14",
"@angular/common": "~7.2.0", "@angular/common": "~8.2.14",
"@angular/compiler": "~7.2.0", "@angular/compiler": "~8.2.14",
"@angular/core": "~7.2.0", "@angular/core": "~8.2.14",
"@angular/forms": "~7.2.0", "@angular/forms": "~8.2.14",
"@angular/platform-browser": "~7.2.0", "@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~7.2.0", "@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~7.2.0", "@angular/router": "~8.2.14",
"@aspnet/signalr": "^1.1.4", "@aspnet/signalr": "^1.1.4",
"@farmmaps/common": ">=0.0.1-prerelease.77 <0.0.1", "@farmmaps/common": ">=0.0.1-prerelease.77 <0.0.1",
"@farmmaps/common-map": ">=0.0.1-prerelease.77 <0.0.1", "@farmmaps/common-map": ">=0.0.1-prerelease.77 <0.0.1",
@ -31,20 +31,20 @@
"core-js": "^2.5.4", "core-js": "^2.5.4",
"ngrx-store-localstorage": "^8.0.0", "ngrx-store-localstorage": "^8.0.0",
"resumablejs": "^1.1.0", "resumablejs": "^1.1.0",
"rxjs": "~6.3.3", "rxjs": "~6.5.3",
"tassign": "^1.0.0", "tassign": "^1.0.0",
"zone.js": "~0.8.26" "zone.js": "~0.9.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.13.0", "@angular-devkit/build-angular": "~0.803.19",
"@angular-devkit/build-ng-packagr": "~0.13.0", "@angular-devkit/build-ng-packagr": "~0.803.19",
"@angular/cli": "~7.3.8", "@angular/cli": "~8.3.19",
"@angular/compiler-cli": "~7.2.0", "@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~7.2.0", "@angular/language-service": "~8.2.14",
"@types/node": "~8.9.4", "@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8", "@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0", "codelyzer": "^5.0.1",
"jasmine-core": "~2.99.1", "jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0", "karma": "~4.0.0",
@ -52,12 +52,12 @@
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2", "karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.2.0", "ng-packagr": "^5.4.0",
"protractor": "~5.4.0", "protractor": "~5.4.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"tsickle": ">=0.34.0", "tsickle": "^0.37.0",
"tslib": "^1.9.0", "tslib": "^1.9.0",
"tslint": "~5.11.0", "tslint": "~5.11.0",
"typescript": "~3.2.2" "typescript": "~3.5.3"
} }
} }

View File

@ -23,7 +23,7 @@ export class GpsLocation implements OnInit,OnChanges{
public path: string = ""; public path: string = "";
public rotate: string = ""; public rotate: string = "";
private resolution: number = 0; private resolution: number = 0;
@ViewChild('location') locationElement: ElementRef; @ViewChild('location', { static: true }) locationElement: ElementRef;
constructor(private map: MapComponent) { constructor(private map: MapComponent) {

View File

@ -21,7 +21,7 @@ export class FeatureListContainerComponent {
@Input() features: Array<Feature> @Input() features: Array<Feature>
@Input() queryState: IQueryState; @Input() queryState: IQueryState;
@ViewChild(WidgetHostDirective) widgetHost: WidgetHostDirective; @ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
loadComponent(queryState:IQueryState) { loadComponent(queryState:IQueryState) {
var componentFactory: ComponentFactory<AbstractFeatureListComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListComponent); // default var componentFactory: ComponentFactory<AbstractFeatureListComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListComponent); // default

View File

@ -19,7 +19,7 @@ export class FeatureListFeatureContainerComponent {
@Input() feature: Feature; @Input() feature: Feature;
@ViewChild(WidgetHostDirective) widgetHost: WidgetHostDirective; @ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
loadComponent() { loadComponent() {
var componentFactory: ComponentFactory<AbstractFeatureListFeatureComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListFeatureComponent); // default var componentFactory: ComponentFactory<AbstractFeatureListFeatureComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListFeatureComponent); // default

View File

@ -19,7 +19,7 @@ export class ItemListItemContainerComponent {
@Input() item: IListItem; @Input() item: IListItem;
@ViewChild(WidgetHostDirective) widgetHost: WidgetHostDirective; @ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
loadComponent() { loadComponent() {
var componentFactory: ComponentFactory<AbstractItemListItemComponent> = this.componentFactoryResolver.resolveComponentFactory(ItemListItemComponent); // default var componentFactory: ComponentFactory<AbstractItemListItemComponent> = this.componentFactoryResolver.resolveComponentFactory(ItemListItemComponent); // default

View File

@ -14,7 +14,7 @@ import { tassign } from 'tassign';
}) })
export class MapSearchComponent { export class MapSearchComponent {
@ViewChild('searchText') searchText; @ViewChild('searchText', { static: true }) searchText;
@Input() clearEnabled: boolean @Input() clearEnabled: boolean
@Input() set collapsed(collapsed: boolean) { @Input() set collapsed(collapsed: boolean) {
this.collapsedLocal = collapsed; this.collapsedLocal = collapsed;

View File

@ -72,7 +72,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public baseLayersCollapsed:boolean = true; public baseLayersCollapsed:boolean = true;
public overlayLayersCollapsed: boolean = true; public overlayLayersCollapsed: boolean = true;
public extent: Observable<Extent>; public extent: Observable<Extent>;
@ViewChild('map') map; @ViewChild('map', { static: true }) map;
constructor(private store: Store<mapReducers.State | commonReducers.State>, private route: ActivatedRoute, private router: Router, private uploadService: ResumableFileUploadService, private serializeService: StateSerializerService, public itemTypeService: ItemTypeService, private location: Location, private geolocationService: GeolocationService ) { constructor(private store: Store<mapReducers.State | commonReducers.State>, private route: ActivatedRoute, private router: Router, private uploadService: ResumableFileUploadService, private serializeService: StateSerializerService, public itemTypeService: ItemTypeService, private location: Location, private geolocationService: GeolocationService ) {
} }

View File

@ -18,7 +18,7 @@ export class MetaDataModalComponent {
private modalName: string = 'metaDataModal'; private modalName: string = 'metaDataModal';
private modalRef: NgbModalRef; private modalRef: NgbModalRef;
@ViewChild('content') _templateModal:ElementRef; @ViewChild('content', { static: true }) _templateModal:ElementRef;
@Input() droppedFile: IDroppedFile; @Input() droppedFile: IDroppedFile;
@Input() set modalState(_modalState:any) {; @Input() set modalState(_modalState:any) {;
if(_modalState == this.modalName) { if(_modalState == this.modalName) {

View File

@ -29,7 +29,7 @@ export class SelectPeriodModalComponent {
fromDate: NgbDateStruct; fromDate: NgbDateStruct;
toDate: NgbDateStruct; toDate: NgbDateStruct;
@ViewChild('content') _templateModal:ElementRef; @ViewChild('content', { static: true }) _templateModal:ElementRef;
@Input() set modalState(_modalState:any) {; @Input() set modalState(_modalState:any) {;
if(_modalState == this.modalName) { if(_modalState == this.modalName) {

View File

@ -16,7 +16,7 @@ export class SelectedItemContainerComponent {
@Input() item: IItem; @Input() item: IItem;
@ViewChild(WidgetHostDirective) widgetHost: WidgetHostDirective; @ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
loadComponent() { loadComponent() {
var componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default var componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default

View File

@ -0,0 +1,24 @@
import { Injectable } from '@angular/core';
import { Observer, Observable } from 'rxjs';
@Injectable()
export class DeviceOrientationService {
/**
* Tries HTML5 geolocation.
*
* Wraps the Geolocation API into an observable.
*
* @return An observable of Bearing
*/
getCurrentBearing(): Observable<number> {
return Observable.create((observer: Observer<number>) => {
let sensor = new Magnetometer();
sensor.onreading= (ev:Event) => {
observer.next(Math.atan2(sensor.y, sensor.x) * (180 / Math.PI));
};
});
}
}

View File

@ -1,6 +1,6 @@
import { Component, OnInit, OnDestroy, Inject, ViewEncapsulation, RendererFactory2, PLATFORM_ID, ChangeDetectionStrategy, HostListener } from '@angular/core'; import { Component, OnInit, OnDestroy, Inject, ViewEncapsulation, RendererFactory2, PLATFORM_ID, ChangeDetectionStrategy, HostListener } from '@angular/core';
import { Router, NavigationEnd, RouteConfigLoadStart, RouteConfigLoadEnd, ActivatedRoute, PRIMARY_OUTLET } from '@angular/router'; import { Router, NavigationEnd, RouteConfigLoadStart, RouteConfigLoadEnd, ActivatedRoute, PRIMARY_OUTLET } from '@angular/router';
import { Meta, Title, DOCUMENT, MetaDefinition } from '@angular/platform-browser'; import { Meta, Title, MetaDefinition } from '@angular/platform-browser';import { DOCUMENT } from "@angular/common";
import { Subscription , Observable } from 'rxjs'; import { Subscription , Observable } from 'rxjs';
import { Store, Action } from '@ngrx/store'; import { Store, Action } from '@ngrx/store';

View File

@ -12,7 +12,7 @@ export class SidePanelComponent implements OnChanges {
@Input() public collapsed: boolean; @Input() public collapsed: boolean;
@Input() public collapsable: boolean; @Input() public collapsable: boolean;
@Input() public resizeable: boolean = false; @Input() public resizeable: boolean = false;
@ViewChild("resizeGrip") elementView: ElementRef; @ViewChild("resizeGrip", { static: false }) elementView: ElementRef;
public mobile:boolean = true; public mobile:boolean = true;
private parentHeight:number = 0; private parentHeight:number = 0;
public top = "100%"; public top = "100%";

View File

@ -19,7 +19,7 @@ import { TypeaheadService } from '../../services/typeahead.service';
export class TagInputComponent implements ControlValueAccessor { export class TagInputComponent implements ControlValueAccessor {
@Input() tags: string[] @Input() tags: string[]
@ViewChild('taginput') tagInputElement: ElementRef; @ViewChild('taginput', { static: true }) tagInputElement: ElementRef;
public tag: string; public tag: string;
searching = false; searching = false;
searchFailed = false; searchFailed = false;

View File

@ -34,9 +34,9 @@ export class TimespanComponent implements OnInit, OnChanges {
elementWidth:number; elementWidth:number;
elementHeight:number; elementHeight:number;
lastOffsetInPixels:number=0; lastOffsetInPixels:number=0;
@ViewChild('timeLine') canvasRef; @ViewChild('timeLine', { static: true }) canvasRef;
@ViewChild('popoverStart') public popoverStart:NgbPopover; @ViewChild('popoverStart', { static: true }) public popoverStart:NgbPopover;
@ViewChild('popoverEnd') public popoverEnd:NgbPopover; @ViewChild('popoverEnd', { static: true }) public popoverEnd:NgbPopover;
@Input() collapsed: boolean = true; @Input() collapsed: boolean = true;
@Input() startDate: Date = new Date(2018,1,3); @Input() startDate: Date = new Date(2018,1,3);
@Input() endDate: Date = new Date(2018,1,5); @Input() endDate: Date = new Date(2018,1,5);

View File

@ -43,7 +43,7 @@
* *
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
* *
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge * with the following flag, it will bypass `zone.js` patch for IE/Edge

View File

@ -2,15 +2,16 @@
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"downlevelIteration": true,
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"module": "es2015", "module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"target": "es5", "target": "es2015",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],

View File

@ -62,12 +62,12 @@
], ],
"trailing-comma": false, "trailing-comma": false,
"no-output-on-prefix": true, "no-output-on-prefix": true,
"use-input-property-decorator": true, "no-inputs-metadata-property": true,
"use-output-property-decorator": true, "no-outputs-metadata-property": true,
"use-host-property-decorator": true, "no-host-metadata-property": true,
"no-input-rename": true, "no-input-rename": true,
"no-output-rename": true, "no-output-rename": true,
"use-life-cycle-interface": true, "use-lifecycle-interface": true,
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"component-class-suffix": true, "component-class-suffix": true,
"directive-class-suffix": true "directive-class-suffix": true