Skip to content

Commit

Permalink
Update angular core
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Jan 25, 2021
1 parent 781209d commit 7846cb2
Show file tree
Hide file tree
Showing 72 changed files with 490 additions and 582 deletions.
577 changes: 238 additions & 339 deletions ui/package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
},
"private": true,
"dependencies": {
"@angular/animations": "8.2.11",
"@angular/cdk": "^8.2.3",
"@angular/common": "8.2.11",
"@angular/compiler": "8.2.11",
"@angular/core": "8.2.11",
"@angular/forms": "8.2.11",
"@angular/platform-browser": "8.2.11",
"@angular/platform-browser-dynamic": "8.2.11",
"@angular/router": "8.2.11",
"@angular/animations": "11.1.0",
"@angular/cdk": "^11.1.0",
"@angular/common": "11.1.0",
"@angular/compiler": "11.1.0",
"@angular/core": "11.1.0",
"@angular/forms": "11.1.0",
"@angular/platform-browser": "11.1.0",
"@angular/platform-browser-dynamic": "11.1.0",
"@angular/router": "11.1.0",
"@ng-bootstrap/ng-bootstrap": "5.1.1",
"@ngrx/effects": "8.4.0",
"@ngrx/entity": "8.4.0",
Expand All @@ -43,13 +43,13 @@
"rxjs": "^6.5.3",
"xml-formatter": "^1.0.1",
"z-schema": "^3.22.0",
"zone.js": "~0.9.1"
"zone.js": "~0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1101.1",
"@angular/cli": "^8.3.12",
"@angular/compiler-cli": "^8.2.11",
"@angular/language-service": "^8.2.11",
"@angular/compiler-cli": "^11.1.0",
"@angular/language-service": "^11.1.0",
"@types/file-saver": "^1.3.0",
"@types/jasmine": "~3.3.12",
"@types/jasminewd2": "~2.0.6",
Expand All @@ -71,7 +71,7 @@
"path": "^0.12.7",
"ts-node": "~3.2.0",
"tslint": "^5.20.1",
"typescript": "3.5.3",
"typescript": "4.1.3",
"webpack-bundle-analyzer": "^3.3.2"
}
}
6 changes: 3 additions & 3 deletions ui/src/app/admin/component/access-request.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { Store, StoreModule, combineReducers } from '@ngrx/store';
Expand Down Expand Up @@ -27,7 +27,7 @@ describe('Access Request Component', () => {
let instance: TestHostComponent;
let store: Store<fromAdmin.State>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
FormsModule,
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('Access Request Component', () => {
fixture.detectChanges();
}));

it('should compile without error', async(() => {
it('should compile without error', waitForAsync(() => {
expect(app).toBeTruthy();
}));
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';

import { NgbDropdownModule, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
Expand All @@ -22,7 +22,7 @@ describe('Delete Dialog (modal) Component', () => {
let fixture: ComponentFixture<TestHostComponent>;
let instance: TestHostComponent;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgbDropdownModule,
Expand All @@ -49,7 +49,7 @@ describe('Delete Dialog (modal) Component', () => {
fixture.detectChanges();
}));

it('should compile without error', async(() => {
it('should compile without error', waitForAsync(() => {
expect(app).toBeTruthy();
}));
});
6 changes: 3 additions & 3 deletions ui/src/app/admin/component/enable-metadata.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';

import { NgbDropdownModule, NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
Expand Down Expand Up @@ -28,7 +28,7 @@ describe('Enable Metadata (modal) Component', () => {
let instance: TestHostComponent;
let store: Store<fromAdmin.State>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgbDropdownModule,
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('Enable Metadata (modal) Component', () => {
fixture.detectChanges();
}));

it('should compile without error', async(() => {
it('should compile without error', waitForAsync(() => {
expect(app).toBeTruthy();
}));
});
6 changes: 3 additions & 3 deletions ui/src/app/admin/component/user-management.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { Store, StoreModule, combineReducers } from '@ngrx/store';
import { NgbDropdownModule, NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap';
Expand All @@ -26,7 +26,7 @@ describe('User Management Component', () => {
let instance: TestHostComponent;
let store: Store<fromAdmin.State>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
FormsModule,
Expand Down Expand Up @@ -58,7 +58,7 @@ describe('User Management Component', () => {
fixture.detectChanges();
}));

it('should compile without error', async(() => {
it('should compile without error', waitForAsync(() => {
expect(app).toBeTruthy();
}));
});
8 changes: 4 additions & 4 deletions ui/src/app/admin/service/admin.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async, inject } from '@angular/core/testing';
import { TestBed, inject, waitForAsync } from '@angular/core/testing';
import { AdminService } from './admin.service';
import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing';
import { HttpRequest, HttpClientModule } from '@angular/common/http';
Expand Down Expand Up @@ -39,7 +39,7 @@ describe('Admin Service', () => {
});

describe('query', () => {
it(`should send an expected query request`, async(inject([AdminService, HttpTestingController],
it(`should send an expected query request`, waitForAsync(inject([AdminService, HttpTestingController],
(service: AdminService, backend: HttpTestingController) => {
service.query().subscribe();

Expand All @@ -51,7 +51,7 @@ describe('Admin Service', () => {
)));
});
describe('update method', () => {
it(`should send an expected patch request`, async(inject([AdminService, HttpTestingController],
it(`should send an expected patch request`, waitForAsync(inject([AdminService, HttpTestingController],
(service: AdminService, backend: HttpTestingController) => {
service.update({...users[0]}).subscribe();

Expand All @@ -63,7 +63,7 @@ describe('Admin Service', () => {
)));
});
describe('remove method', () => {
it(`should send an expected delete request`, async(inject([AdminService, HttpTestingController],
it(`should send an expected delete request`, waitForAsync(inject([AdminService, HttpTestingController],
(service: AdminService, backend: HttpTestingController) => {
service.remove(users[0].username).subscribe();

Expand Down
8 changes: 4 additions & 4 deletions ui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { StoreModule, Store, combineReducers } from '@ngrx/store';
import { AppComponent } from './app.component';
Expand Down Expand Up @@ -30,7 +30,7 @@ describe('AppComponent', () => {
let app: AppComponent;
let store: Store<fromRoot.State>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
providers: [
{provide: I18nService, useClass: MockI18nService },
Expand Down Expand Up @@ -61,12 +61,12 @@ describe('AppComponent', () => {
fixture.detectChanges();
}));

it('should create the app', async(() => {
it('should create the app', waitForAsync(() => {
expect(app).toBeTruthy();
expect(store.dispatch).toHaveBeenCalledTimes(3);
}));

it(`should have as title 'Shib-UI'`, async(() => {
it(`should have as title 'Shib-UI'`, waitForAsync(() => {
expect(app.title).toEqual('Shib UI');
}));

Expand Down
11 changes: 6 additions & 5 deletions ui/src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const routes: Routes = [

@NgModule({
imports: [RouterModule.forRoot(routes, {
preloadingStrategy: PreloadAllModules,
scrollOffset: [0, 64],
anchorScrolling: 'enabled',
scrollPositionRestoration: 'enabled'
})],
preloadingStrategy: PreloadAllModules,
scrollOffset: [0, 64],
anchorScrolling: 'enabled',
scrollPositionRestoration: 'enabled',
relativeLinkResolution: 'legacy'
})],
exports: [RouterModule]
})
export class AppRoutingModule { }
4 changes: 2 additions & 2 deletions ui/src/app/core/component/page-title.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { StoreModule, Store, combineReducers } from '@ngrx/store';

Expand All @@ -26,7 +26,7 @@ describe('Page Title Component', () => {
let app: PageTitleComponent;
let store: Store<fromWizard.State>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgbDropdownModule,
Expand Down
28 changes: 14 additions & 14 deletions ui/src/app/core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ export const COMPONENTS = [
exports: COMPONENTS,
})
export class CoreModule {
static forRoot() {
return {
ngModule: RootCoreModule,
providers: [
UserService,
FileService,
ModalService,
DifferentialService,
CanDeactivateGuard,
NavigatorService,
NavigationService
]
};
}
static forRoot(): ModuleWithProviders<RootCoreModule> {
return {
ngModule: RootCoreModule,
providers: [
UserService,
FileService,
ModalService,
DifferentialService,
CanDeactivateGuard,
NavigatorService,
NavigationService
]
};
}
}

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/core/service/api-path.interceptor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async, inject } from '@angular/core/testing';
import { TestBed, inject, waitForAsync } from '@angular/core/testing';
import { HTTP_INTERCEPTORS, HttpClientModule, HttpClient, HttpRequest } from '@angular/common/http';
import { HttpTestingController, HttpClientTestingModule } from '@angular/common/http/testing';

Expand Down Expand Up @@ -27,7 +27,7 @@ describe('API Path Interceptor Service', () => {
});

describe('query', () => {
it(`should send an expected query request`, async(inject([HttpClient, HttpTestingController],
it(`should send an expected query request`, waitForAsync(inject([HttpClient, HttpTestingController],
(service: HttpClient, backend: HttpTestingController) => {
service.get('foo').subscribe();

Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/core/service/file.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async, inject } from '@angular/core/testing';
import { TestBed, inject, waitForAsync } from '@angular/core/testing';
import { FileService } from './file.service';

const getFakeFile = (str: string) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/core/service/navigation.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async } from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';

import { NavigationService } from './navigation.service';

Expand Down
16 changes: 8 additions & 8 deletions ui/src/app/i18n/i18n.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ export const PIPES = [
],
})
export class I18nModule {
static forRoot() {
return {
ngModule: RootI18nModule,
providers: [
I18nService
]
};
}
static forRoot(): ModuleWithProviders<RootI18nModule> {
return {
ngModule: RootI18nModule,
providers: [
I18nService
]
};
}
}

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/i18n/service/i18n.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async, inject } from '@angular/core/testing';
import { TestBed, inject, waitForAsync } from '@angular/core/testing';
import { I18nService } from './i18n.service';
import { HttpClientModule, HttpRequest } from '@angular/common/http';
import { NavigatorService } from '../../core/service/navigator.service';
Expand Down Expand Up @@ -36,7 +36,7 @@ describe('i18n Service', () => {
});

describe('get method', () => {
it(`should send an expected GET request`, async(inject([I18nService, HttpTestingController],
it(`should send an expected GET request`, waitForAsync(inject([I18nService, HttpTestingController],
(i18n: I18nService, backend: HttpTestingController) => {
const lang = 'en';
i18n.get(lang).subscribe();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild, Input } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { MetadataConfigurationComponent } from './metadata-configuration.component';

Expand Down Expand Up @@ -40,7 +40,7 @@ describe('Metadata Configuration Component', () => {
let app: MetadataConfigurationComponent;
let router: Router;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
NgbDropdownModule,
Expand All @@ -61,7 +61,7 @@ describe('Metadata Configuration Component', () => {
fixture.detectChanges();
}));

it('should accept a configuration input', async(() => {
it('should accept a configuration input', waitForAsync(() => {
expect(app).toBeTruthy();
}));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core';
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing';
import { MockI18nModule } from '../../../../testing/i18n.stub';
import { MetadataVersion } from '../model/version';
import { MetadataHeaderComponent } from './metadata-header.component';
Expand Down Expand Up @@ -33,7 +33,7 @@ describe('Metadata Header Component', () => {
let instance: TestHostComponent;
let app: MetadataHeaderComponent;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MockI18nModule
Expand All @@ -50,7 +50,7 @@ describe('Metadata Header Component', () => {
fixture.detectChanges();
}));

it('should accept a property input', async(() => {
it('should accept a property input', waitForAsync(() => {
expect(app).toBeTruthy();
}));
});
Loading

0 comments on commit 7846cb2

Please sign in to comment.