Skip to content

Commit

Permalink
feat: update to angular 8 & other deps
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Update to angular 8. Drop support of Angular 7
Also drop support of rxjs < 6.5.0
  • Loading branch information
Wykks committed Jul 3, 2019
1 parent 1043b4f commit 57f6d6e
Show file tree
Hide file tree
Showing 16 changed files with 1,808 additions and 1,486 deletions.
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,63 +21,63 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^7.2.12",
"@angular/cdk": "^7.3.7",
"@angular/common": "^7.2.12",
"@angular/compiler": "^7.2.12",
"@angular/core": "^7.2.12",
"@angular/forms": "^7.2.12",
"@angular/material": "^7.3.7",
"@angular/platform-browser": "^7.2.12",
"@angular/platform-browser-dynamic": "^7.2.12",
"@angular/router": "^7.2.12",
"@angular/animations": "^8.1.0",
"@angular/cdk": "^8.0.2",
"@angular/common": "^8.1.0",
"@angular/compiler": "^8.1.0",
"@angular/core": "^8.1.0",
"@angular/forms": "^8.1.0",
"@angular/material": "^8.0.2",
"@angular/platform-browser": "^8.1.0",
"@angular/platform-browser-dynamic": "^8.1.0",
"@angular/router": "^8.1.0",
"@mapbox/mapbox-gl-geocoder": "^3.1.6",
"@ngrx/effects": "^7.4.0",
"@ngrx/router-store": "^7.4.0",
"@ngrx/store": "^7.4.0",
"@ngrx/store-devtools": "^7.4.0",
"@ngrx/effects": "^8.0.1",
"@ngrx/router-store": "^8.0.1",
"@ngrx/store": "^8.0.1",
"@ngrx/store-devtools": "^8.0.1",
"@stackblitz/sdk": "^1.3.0",
"@turf/random": "^6.0.2",
"hammerjs": "^2.0.8",
"lodash-es": "^4.17.11",
"mapbox-gl": "1.1.0",
"ngx-md": "^7.1.3",
"rxjs": "^6.4.0",
"ngx-md": "^8.0.0",
"rxjs": "^6.5.2",
"scroll-into-view-if-needed": "^2.2.20",
"zone.js": "^0.9.0"
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.8",
"@angular-devkit/build-ng-packagr": "~0.13.8",
"@angular/cli": "^7.3.8",
"@angular/compiler-cli": "^7.2.12",
"@ngrx/schematics": "^7.4.0",
"@angular-devkit/build-angular": "~0.801.0",
"@angular-devkit/build-ng-packagr": "~0.801.0",
"@angular/cli": "^8.1.0",
"@angular/compiler-cli": "^8.1.0",
"@ngrx/schematics": "^8.0.1",
"@turf/bbox": "^6.0.1",
"@types/jasmine": "^3.3.12",
"@types/jasmine": "^3.3.13",
"@types/jasminewd2": "^2.0.6",
"@types/lodash-es": "^4.17.3",
"@types/mapbox-gl": "^0.51.9",
"@types/node": "^11.13.0",
"@types/node": "^12.0.11",
"@types/supercluster": "^5.0.1",
"codelyzer": "^5.0.0",
"codelyzer": "^5.1.0",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.0.1",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"karma-jasmine-html-reporter": "^1.4.2",
"karma-mocha-reporter": "^2.2.5",
"ng-packagr": "^5.0.1",
"ng-packagr": "^5.3.0",
"pixel-diff": "^1.0.1",
"protractor": "^5.4.2",
"protractor-browser-logs": "^1.0.391",
"standard-version": "^5.0.2",
"ts-node": "^8.0.3",
"tsickle": "^0.34.3",
"tslib": "^1.9.3",
"tslint": "^5.15.0",
"typescript": "~3.2.4",
"typescript-tslint-plugin": "^0.3.1"
"protractor-browser-logs": "^1.0.446",
"standard-version": "^6.0.1",
"ts-node": "^8.3.0",
"tsickle": "^0.35.0",
"tslib": "^1.10.0",
"tslint": "^5.18.0",
"typescript": "~3.4.5",
"typescript-tslint-plugin": "^0.5.3"
}
}
6 changes: 3 additions & 3 deletions projects/ngx-mapbox-gl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
"homepage": "https://github.com/Wykks/ngx-mapbox-gl#readme",
"peerDependencies": {
"@angular/common": ">= 7.2.0 < 9.0.0",
"@angular/core": ">= 7.2.0 < 9.0.0",
"@angular/common": ">= 8.0.0 < 10.0.0",
"@angular/core": ">= 8.0.0 < 10.0.0",
"mapbox-gl": "1.1.0",
"rxjs": "^6.0.0"
"rxjs": "^6.5.0"
},
"dependencies": {
"@mapbox/mapbox-gl-geocoder": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ControlComponent implements OnDestroy, AfterContentInit {
/* Init inputs */
@Input() position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';

@ViewChild('content') content: ElementRef;
@ViewChild('content', { static: true }) content: ElementRef;

control: Control | IControl;

Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mapbox-gl/src/lib/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class MapComponent implements OnChanges, OnDestroy, AfterViewInit, MapEve
return this.MapService.mapInstance;
}

@ViewChild('container') mapContainer: ElementRef;
@ViewChild('container', { static: true }) mapContainer: ElementRef;

constructor(
private MapService: MapService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export class MarkerClusterComponent implements OnChanges, OnDestroy, AfterConten

@Output() load = new EventEmitter<Supercluster<GeoJSON.GeoJsonProperties, GeoJSON.GeoJsonProperties>>();

@ContentChild(PointDirective, { read: TemplateRef }) pointTpl: TemplateRef<any>;
@ContentChild(ClusterPointDirective, { read: TemplateRef }) clusterPointTpl: TemplateRef<any>;
@ContentChild(PointDirective, { read: TemplateRef, static: false }) pointTpl: TemplateRef<any>;
@ContentChild(ClusterPointDirective, { read: TemplateRef, static: false }) clusterPointTpl: TemplateRef<any>;

clusterPoints: GeoJSON.Feature<GeoJSON.Point>[];

Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mapbox-gl/src/lib/marker/marker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class MarkerComponent implements OnChanges, OnDestroy, AfterViewInit, OnI
@Output() drag = new EventEmitter<Marker>();
@Output() dragEnd = new EventEmitter<Marker>();

@ViewChild('content') content: ElementRef;
@ViewChild('content', { static: true }) content: ElementRef;

markerInstance?: Marker;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class MarkersForClustersComponent implements OnDestroy, AfterContentInit
/* Init input */
@Input() source: string;

@ContentChild(PointDirective, { read: TemplateRef }) pointTpl?: TemplateRef<any>;
@ContentChild(ClusterPointDirective, { read: TemplateRef }) clusterPointTpl: TemplateRef<any>;
@ContentChild(PointDirective, { read: TemplateRef, static: false }) pointTpl?: TemplateRef<any>;
@ContentChild(ClusterPointDirective, { read: TemplateRef, static: false }) clusterPointTpl: TemplateRef<any>;

clusterPoints: MapboxGeoJSONFeature[]; // Incorrect typings
layerId = `mgl-markers-for-clusters-${uniqId++}`;
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-mapbox-gl/src/lib/popup/popup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class PopupComponent implements OnChanges, OnDestroy, AfterViewInit, OnIn
@Output() close = new EventEmitter<void>();
@Output() open = new EventEmitter<void>();

@ViewChild('content') content: ElementRef;
@ViewChild('content', { static: true }) content: ElementRef;

popupInstance?: Popup;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { ImageSourceOptions, ImageSource } from 'mapbox-gl';
import { ImageSource, ImageSourceOptions, ImageSourceRaw } from 'mapbox-gl';
import { Subscription } from 'rxjs';
import { MapService } from '../map/map.service';

Expand Down Expand Up @@ -52,11 +52,12 @@ export class ImageSourceComponent implements OnInit, OnDestroy, OnChanges, Image
}

private init() {
this.MapService.addSource(this.id, {
const imageSource: ImageSourceRaw = {
type: 'image',
url: this.url,
coordinates: this.coordinates
});
};
this.MapService.addSource(this.id, imageSource);
this.sourceId = this.id;
}
}
4 changes: 2 additions & 2 deletions projects/showcase/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { MatIconRegistry } from '@angular/material';
import { MatIconRegistry } from '@angular/material/icon';
import { BrowserModule, DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Params, RouterModule, RouterStateSnapshot, Routes } from '@angular/router';
Expand Down Expand Up @@ -54,7 +54,7 @@ export const showcaseRoutes: Routes = [
},
{
path: 'doc',
loadChildren: './doc/doc.module#DocModule'
loadChildren: () => import('./doc/doc.module').then(m => m.DocModule)
},
{ path: '**', redirectTo: '' }
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, Input, OnInit, OnChanges, ViewChild, SimpleChanges } from '@angular/core';
import { MatPaginator, PageEvent } from '@angular/material';
import { MatPaginator, PageEvent } from '@angular/material/paginator';
import { GeoJSONSourceComponent } from 'ngx-mapbox-gl';

/**
Expand Down Expand Up @@ -96,7 +96,7 @@ export class ClusterPopupComponent implements OnChanges {
@Input() selectedCluster: { geometry: GeoJSON.Point, properties: any };
@Input() clusterComponent: GeoJSONSourceComponent;

@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;

leaves: GeoJSON.Feature<GeoJSON.Geometry>[];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { DemoFileLoaderService } from '../demo-file-loader.service';
changeDetection: ChangeDetectionStrategy.OnPush
})
export class StackblitzEditComponent implements AfterViewInit, OnDestroy {
@ViewChild('container') stackblitzContainer: ElementRef;
@ViewChild('container', { static: true }) stackblitzContainer: ElementRef;

loading: boolean;

Expand Down
26 changes: 12 additions & 14 deletions projects/showcase/src/app/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import {
MatButtonModule,
MatButtonToggleModule,
MatCardModule,
MatIconModule,
MatInputModule,
MatListModule,
MatPaginatorModule,
MatProgressSpinnerModule,
MatRadioModule,
MatSidenavModule,
MatSlideToggleModule,
MatToolbarModule
} from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import { MatListModule } from '@angular/material/list';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { MatRadioModule } from '@angular/material/radio';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { MatToolbarModule } from '@angular/material/toolbar';
import { NgxMapboxGLModule } from 'ngx-mapbox-gl';

const Modules = [
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
Expand All @@ -12,7 +13,7 @@
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"no-output-on-prefix": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
Expand Down
Loading

0 comments on commit 57f6d6e

Please sign in to comment.