Skip to content

Commit

Permalink
Merge pull request #146 from AuScope/AUS-4266
Browse files Browse the repository at this point in the history
AUS 4266 Upgrade to Angular 18
  • Loading branch information
jia020 authored Nov 7, 2024
2 parents 1ac86c3 + 40122db commit 5c40819
Show file tree
Hide file tree
Showing 10 changed files with 4,879 additions and 2,359 deletions.
7,076 changes: 4,801 additions & 2,275 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@auscope/portal-core-ui",
"version": "6.5.4",
"version": "6.5.26",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand All @@ -10,15 +10,15 @@
"e2e": "ng e2e"
},
"dependencies": {
"@angular/animations": "^17.3.6",
"@angular/common": "^17.3.6",
"@angular/compiler": "^17.3.6",
"@angular/core": "^17.3.6",
"@angular/forms": "^17.3.6",
"@angular/platform-browser": "^17.3.6",
"@angular/platform-browser-dynamic": "^17.3.6",
"@angular/router": "^17.3.6",
"@auscope/angular-cesium": "^17.0.0",
"@angular/animations": "^18.2.8",
"@angular/common": "^18.2.8",
"@angular/compiler": "^18.2.8",
"@angular/core": "^18.2.8",
"@angular/forms": "^18.2.8",
"@angular/platform-browser": "^18.2.8",
"@angular/platform-browser-dynamic": "^18.2.8",
"@angular/router": "^18.2.8",
"@auscope/angular-cesium": "^18.0.1",
"@thi.ng/hiccup": "^3.6.22",
"@turf/bbox": "^6.5.0",
"@turf/bbox-polygon": "^6.5.0",
Expand All @@ -29,24 +29,24 @@
"cesium": "1.93.0",
"jquery": "^3.6.1",
"lodash": "^4.17.21",
"ngx-device-detector": "^7.0.0",
"ngx-device-detector": "^8.0.0",
"rxjs": "~6.6.7",
"simplify-ts": "^1.0.2",
"tslib": "^2.4.1",
"when": "~3.7.8",
"zone.js": "^0.14.4"
"zone.js": "^0.14.10"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.6",
"@angular-devkit/core": "^17.3.6",
"@angular-devkit/build-angular": "^18.2.9",
"@angular-devkit/core": "^18.2.9",
"@angular-eslint/builder": "^17.3.0",
"@angular-eslint/eslint-plugin": "^17.3.0",
"@angular-eslint/eslint-plugin-template": "^17.3.0",
"@angular-eslint/schematics": "^17.3.0",
"@angular-eslint/schematics": "^18.4.0",
"@angular-eslint/template-parser": "^17.3.0",
"@angular/cli": "^17.3.6",
"@angular/compiler-cli": "^17.3.6",
"@angular/language-service": "^17.3.6",
"@angular/cli": "^18.2.9",
"@angular/compiler-cli": "^18.2.8",
"@angular/language-service": "^18.2.8",
"@types/jasmine": "~4.3.0",
"@types/jasminewd2": "~2.0.10",
"@types/node": "^17.0.45",
Expand All @@ -60,7 +60,7 @@
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.2",
"karma-jasmine-html-reporter": "^1.7.0",
"ng-packagr": "^17.3.0",
"ng-packagr": "^18.2.1",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"typescript": "~5.4.5"
Expand Down
26 changes: 13 additions & 13 deletions projects/portal-core-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@
},
"homepage": "https://github.com/AuScope/portal-core-ui-app",
"peerDependencies": {
"@angular/animations": "^17.3.6",
"@angular/common": "^17.3.6",
"@angular/compiler": "^17.3.6",
"@angular/core": "^17.3.6",
"@angular/forms": "^17.3.6",
"@angular/platform-browser": "^17.3.6",
"@angular/platform-browser-dynamic": "^17.3.6",
"@angular/router": "^17.3.6",
"@auscope/angular-cesium": "^17.0.0",
"cesium": "1.93.0",
"rxjs": "~6.6.7",
"zone.js": "^0.14.4",
"@angular/animations": "^18.2.8",
"@angular/common": "^18.2.8",
"@angular/compiler": "^18.2.8",
"@angular/core": "^^18.2.8",
"@angular/forms": "^18.2.8",
"@angular/platform-browser": "^18.2.8",
"@angular/platform-browser-dynamic": "^18.2.8",
"@angular/router": "^18.2.8",
"@auscope/angular-cesium": "^18.0.1",
"@thi.ng/hiccup": "^3.6.22",
"@turf/bbox": "^6.5.0",
"@turf/bbox-polygon": "^6.5.0",
"@turf/boolean-point-in-polygon": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/intersect": "^6.5.0",
"@types/jquery": "^3.5.14",
"cesium": "1.93.0",
"jquery": "^3.6.1",
"ngx-device-detector": "^8.0.0",
"rxjs": "~6.6.7",
"when": "~3.7.8",
"ngx-device-detector": "~7.0.0"
"zone.js": "^0.14.4"
},
"dependencies": {
"tslib": "^2.4.1"
Expand Down
72 changes: 32 additions & 40 deletions projects/portal-core-ui/src/lib/portal-core.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule, Optional, SkipSelf, ModuleWithProviders } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';

Expand Down Expand Up @@ -35,45 +35,37 @@ import { ImgLoadingDirective } from './uiutilities/imgloading.directive';
import { StopPropagationDirective } from './utility/utilities.directives';
import { PolygonsEditorService } from '@auscope/angular-cesium';

@NgModule({
declarations: [
ImgLoadingDirective,
StopPropagationDirective
],
imports: [
HttpClientModule,
BrowserModule,
FormsModule
],
exports: [ImgLoadingDirective, StopPropagationDirective,
HttpClientModule, BrowserModule, FormsModule],
providers: [LayerHandlerService,
CsWMSService,
CsIrisService,
CsKMLService,
CsVMFService,
KMLDocService,
CsMapObject,
CsWFSService,
CsWWWService,
DownloadWfsService,
DownloadWcsService,
DownloadIrisService,
GMLParserService,
RenderStatusService,
FilterPanelService,
LegendService,
ImgLoadingDirective,
NotificationService,
QueryWMSService,
QueryWFSService,
ManageStateService,
LayerStatusService,
CsCSWService,
PolygonsEditorService,
SldService
]
})
@NgModule({ declarations: [
ImgLoadingDirective,
StopPropagationDirective
],
exports: [ImgLoadingDirective, StopPropagationDirective,
BrowserModule, FormsModule], imports: [BrowserModule,
FormsModule], providers: [LayerHandlerService,
CsWMSService,
CsIrisService,
CsKMLService,
CsVMFService,
KMLDocService,
CsMapObject,
CsWFSService,
CsWWWService,
DownloadWfsService,
DownloadWcsService,
DownloadIrisService,
GMLParserService,
RenderStatusService,
FilterPanelService,
LegendService,
ImgLoadingDirective,
NotificationService,
QueryWMSService,
QueryWFSService,
ManageStateService,
LayerStatusService,
CsCSWService,
PolygonsEditorService,
SldService, provideHttpClient(withInterceptorsFromDi())] })

export class PortalCoreModule {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import {map} from 'rxjs/operators';
import { Injectable, Inject } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import {throwError as observableThrowError, Observable } from 'rxjs';
import {Injectable, Inject} from '@angular/core';
import {timeoutWith, map, catchError} from 'rxjs/operators';
import {HttpClient, HttpParams, HttpHeaders, HttpResponse} from '@angular/common/http';
import { HttpClient, HttpParams, HttpHeaders, HttpResponse } from '@angular/common/http';

import { Bbox } from '../../../model/data/bbox.model';
import { LayerModel } from '../../../model/data/layer.model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
import { GetCoverageService } from './get-coverage.service';
import { DescribeCoverageResponseSample } from './describeCoverageSample/DescribeCoverageResponseSample';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

describe('GetCoverageService', () => {
let url = "https://gsky.nci.org.au/ows/aster?service=WCS&version=1.0.0&request=DescribeCoverage&coverage=AlOH_Group_Composition";
Expand Down Expand Up @@ -61,9 +62,9 @@ describe('GetCoverageService', () => {

beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [GetCoverageService]
});
imports: [],
providers: [GetCoverageService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
});
httpTestingController = TestBed.inject(HttpTestingController);
service = TestBed.inject(GetCoverageService);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {throwError as observableThrowError, Observable } from 'rxjs';

import {catchError, map} from 'rxjs/operators';
import { Injectable, Inject } from '@angular/core';
import {HttpClient, HttpParams, HttpResponse} from '@angular/common/http';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { OnlineResourceModel } from '../../model/data/onlineresource.model';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { provideHttpClientTesting } from '@angular/common/http/testing';
import { GetCapsService } from './get-caps.service';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

describe('GetCapsService', () => {

beforeEach(() => TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
providers: [GetCapsService]
}));
imports: [],
providers: [GetCapsService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
}));

it('should be created', () => {
const service: GetCapsService = TestBed.inject(GetCapsService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {throwError as observableThrowError, Observable} from 'rxjs';

import {catchError, map} from 'rxjs/operators';
import {Injectable, Inject} from '@angular/core';
import {HttpClient, HttpParams, HttpHeaders, HttpResponse} from '@angular/common/http';
import { HttpClient, HttpParams, HttpHeaders, HttpResponse } from '@angular/common/http';
import {OnlineResourceModel} from '../../model/data/onlineresource.model';
import {CsMapObject} from '../cesium-map/cs-map-object';
import {UtilitiesService} from '../../utility/utilities.service';
Expand Down

0 comments on commit 5c40819

Please sign in to comment.