mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-06 17:44:11 +00:00
120243: ng update @angular/core @angular/cli --force
This commit is contained in:

committed by
Yury Bondarenko

parent
16eb620f4f
commit
5e7b066af1
8862
package-lock.json
generated
8862
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
36
package.json
36
package.json
@@ -11,12 +11,10 @@
|
||||
"start:mirador:prod": "npm run build:mirador && npm run start:prod",
|
||||
"preserve": "npm run base-href",
|
||||
"serve": "ts-node --project ./tsconfig.ts-node.json scripts/serve.ts",
|
||||
"serve:ssr": "node dist/server/main",
|
||||
"analyze": "webpack-bundle-analyzer dist/browser/stats.json",
|
||||
"build": "ng build --configuration development",
|
||||
"build:stats": "ng build --stats-json",
|
||||
"build:prod": "cross-env NODE_ENV=production npm run build:ssr",
|
||||
"build:ssr": "ng build --configuration production && ng run dspace-angular:server:production",
|
||||
"build:lint": "rimraf 'lint/dist/**/*.js' 'lint/dist/**/*.js.map' && tsc -b lint/tsconfig.json",
|
||||
"test": "ng test --source-map=true --watch=false --configuration test",
|
||||
"test:watch": "nodemon --exec \"ng test --source-map=true --watch=true --configuration test\"",
|
||||
@@ -98,19 +96,19 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.3.12",
|
||||
"@angular/animations": "^18.2.12",
|
||||
"@angular/cdk": "^17.3.10",
|
||||
"@angular/common": "^17.3.12",
|
||||
"@angular/compiler": "^17.3.12",
|
||||
"@angular/core": "^17.3.12",
|
||||
"@angular/forms": "^17.3.12",
|
||||
"@angular/localize": "^17.3.12",
|
||||
"@angular/platform-browser": "^17.3.12",
|
||||
"@angular/platform-browser-dynamic": "^17.3.12",
|
||||
"@angular/platform-server": "^17.3.12",
|
||||
"@angular/router": "^17.3.12",
|
||||
"@angular/ssr": "^17.3.11",
|
||||
"@babel/runtime": "7.26.7",
|
||||
"@angular/common": "^18.2.12",
|
||||
"@angular/compiler": "^18.2.12",
|
||||
"@angular/core": "^18.2.12",
|
||||
"@angular/forms": "^18.2.12",
|
||||
"@angular/localize": "^18.2.12",
|
||||
"@angular/platform-browser": "^18.2.12",
|
||||
"@angular/platform-browser-dynamic": "^18.2.12",
|
||||
"@angular/platform-server": "^18.2.12",
|
||||
"@angular/router": "^18.2.12",
|
||||
"@angular/ssr": "^18.2.12",
|
||||
"@babel/runtime": "7.26.0",
|
||||
"@kolkov/ngx-gallery": "^2.0.1",
|
||||
"@ng-bootstrap/ng-bootstrap": "^12.0.0",
|
||||
"@ng-dynamic-forms/core": "^16.0.0",
|
||||
@@ -168,7 +166,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "~17.0.2",
|
||||
"@angular-devkit/build-angular": "^17.3.11",
|
||||
"@angular-devkit/build-angular": "^18.2.12",
|
||||
"@angular-eslint/builder": "^18.4.1",
|
||||
"@angular-eslint/bundled-angular-compiler": "^18.4.1",
|
||||
"@angular-eslint/eslint-plugin": "^18.4.1",
|
||||
@@ -176,9 +174,9 @@
|
||||
"@angular-eslint/schematics": "^18.4.1",
|
||||
"@angular-eslint/template-parser": "^18.4.1",
|
||||
"@angular-eslint/utils": "^18.4.1",
|
||||
"@angular/cli": "^17.3.11",
|
||||
"@angular/compiler-cli": "^17.3.11",
|
||||
"@angular/language-service": "^17.3.12",
|
||||
"@angular/cli": "^18.2.12",
|
||||
"@angular/compiler-cli": "^18.2.12",
|
||||
"@angular/language-service": "^18.2.12",
|
||||
"@cypress/schematic": "^1.5.0",
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
"@ngrx/store-devtools": "^17.1.1",
|
||||
@@ -241,4 +239,4 @@
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import {
|
||||
ComponentFixture,
|
||||
@@ -20,6 +20,7 @@ import { RawRestResponse } from 'src/app/core/dspace-rest/raw-rest-response.mode
|
||||
import { TranslateLoaderMock } from 'src/app/shared/mocks/translate-loader.mock';
|
||||
|
||||
import { FilteredCollectionsComponent } from './filtered-collections.component';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
describe('FiltersComponent', () => {
|
||||
let component: FilteredCollectionsComponent;
|
||||
@@ -39,23 +40,22 @@ describe('FiltersComponent', () => {
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
NgbAccordionModule,
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
imports: [NgbAccordionModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock,
|
||||
},
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useClass: TranslateLoaderMock,
|
||||
},
|
||||
}),
|
||||
HttpClientTestingModule,
|
||||
FilteredCollectionsComponent,
|
||||
],
|
||||
providers: [
|
||||
FilteredCollectionsComponent],
|
||||
providers: [
|
||||
FormBuilder,
|
||||
DspaceRestService,
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
}));
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { Store } from '@ngrx/store';
|
||||
@@ -28,19 +25,21 @@ describe(`AuthInterceptor`, () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [
|
||||
imports: [],
|
||||
providers: [
|
||||
DspaceRestService,
|
||||
{ provide: AuthService, useValue: authServiceStub },
|
||||
{ provide: Router, useClass: RouterStub },
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: AuthInterceptor,
|
||||
multi: true,
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: AuthInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
{ provide: Store, useValue: store },
|
||||
],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
|
||||
service = TestBed.inject(DspaceRestService);
|
||||
httpMock = TestBed.inject(HttpTestingController);
|
||||
|
@@ -1,13 +1,4 @@
|
||||
import {
|
||||
HttpErrorResponse,
|
||||
HttpEvent,
|
||||
HttpHandler,
|
||||
HttpHeaders,
|
||||
HttpInterceptor,
|
||||
HttpRequest,
|
||||
HttpResponse,
|
||||
HttpResponseBase,
|
||||
} from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpHeaders, HttpInterceptor, HttpRequest, HttpResponse, HttpResponseBase } from '@angular/common/http';
|
||||
import {
|
||||
Injectable,
|
||||
Injector,
|
||||
|
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
HttpResponse,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
import {
|
||||
Observable,
|
||||
of as observableOf,
|
||||
|
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
HttpResponse,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
} from '@angular/common/http';
|
||||
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import {
|
||||
|
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs';
|
||||
|
@@ -1,11 +1,5 @@
|
||||
import {
|
||||
HttpErrorResponse,
|
||||
HttpHeaders,
|
||||
} from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HttpErrorResponse, HttpHeaders, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import {
|
||||
inject,
|
||||
TestBed,
|
||||
@@ -33,9 +27,9 @@ describe('DspaceRestService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [DspaceRestService],
|
||||
});
|
||||
imports: [],
|
||||
providers: [DspaceRestService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||
});
|
||||
|
||||
dspaceRestService = TestBed.inject(DspaceRestService);
|
||||
httpMock = TestBed.inject(HttpTestingController);
|
||||
|
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpErrorResponse,
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
HttpResponse,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Observable,
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { REQUEST } from '../../../express.tokens';
|
||||
@@ -21,17 +18,19 @@ describe('ForwardClientIpInterceptor', () => {
|
||||
clientIp = '1.2.3.4';
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [
|
||||
imports: [],
|
||||
providers: [
|
||||
DspaceRestService,
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: ForwardClientIpInterceptor,
|
||||
multi: true,
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: ForwardClientIpInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
{ provide: REQUEST, useValue: { get: () => undefined, connection: { remoteAddress: clientIp } } },
|
||||
],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
|
||||
service = TestBed.inject(DspaceRestService);
|
||||
httpMock = TestBed.inject(HttpTestingController);
|
||||
|
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
HttpEvent,
|
||||
HttpHandler,
|
||||
HttpInterceptor,
|
||||
HttpRequest,
|
||||
} from '@angular/common/http';
|
||||
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
@@ -25,17 +22,19 @@ describe(`LocaleInterceptor`, () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [
|
||||
imports: [],
|
||||
providers: [
|
||||
DspaceRestService,
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: LocaleInterceptor,
|
||||
multi: true,
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: LocaleInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
{ provide: LocaleService, useValue: mockLocaleService },
|
||||
],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
|
||||
service = TestBed.inject(DspaceRestService);
|
||||
httpMock = TestBed.inject(HttpTestingController);
|
||||
|
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
HttpEvent,
|
||||
HttpHandler,
|
||||
HttpInterceptor,
|
||||
HttpRequest,
|
||||
} from '@angular/common/http';
|
||||
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import {
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
@@ -39,24 +36,23 @@ describe('LogInterceptor', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientTestingModule,
|
||||
StoreModule.forRoot(appReducers, storeModuleConfig),
|
||||
],
|
||||
providers: [
|
||||
imports: [StoreModule.forRoot(appReducers, storeModuleConfig)],
|
||||
providers: [
|
||||
DspaceRestService,
|
||||
// LogInterceptor,
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: LogInterceptor,
|
||||
multi: true,
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: LogInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
{ provide: CookieService, useValue: new CookieServiceMock() },
|
||||
{ provide: Router, useValue: router },
|
||||
{ provide: CorrelationIdService, useClass: CorrelationIdService },
|
||||
{ provide: UUIDService, useClass: UUIDService },
|
||||
],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
|
||||
service = TestBed.inject(DspaceRestService);
|
||||
httpMock = TestBed.inject(HttpTestingController);
|
||||
|
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
HttpEvent,
|
||||
HttpHandler,
|
||||
HttpInterceptor,
|
||||
HttpRequest,
|
||||
} from '@angular/common/http';
|
||||
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
} from '@angular/common/http';
|
||||
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ReplaceOperation } from 'fast-json-patch';
|
||||
import { Observable } from 'rxjs';
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { ReplaceOperation } from 'fast-json-patch';
|
||||
import {
|
||||
cold,
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { waitForAsync } from '@angular/core/testing';
|
||||
import { Store } from '@ngrx/store';
|
||||
import {
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs';
|
||||
|
@@ -1,8 +1,5 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RESTURLCombiner } from '../url-combiner/rest-url-combiner';
|
||||
@@ -17,9 +14,9 @@ describe(`BrowserXSRFService`, () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ HttpClientTestingModule ],
|
||||
providers: [ BrowserXSRFService ],
|
||||
});
|
||||
imports: [],
|
||||
providers: [BrowserXSRFService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||
});
|
||||
httpClient = TestBed.inject(HttpClient);
|
||||
httpTestingController = TestBed.inject(HttpTestingController);
|
||||
service = TestBed.inject(BrowserXSRFService);
|
||||
|
@@ -1,12 +1,5 @@
|
||||
import {
|
||||
HTTP_INTERCEPTORS,
|
||||
HttpHeaders,
|
||||
HttpXsrfTokenExtractor,
|
||||
} from '@angular/common/http';
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HTTP_INTERCEPTORS, HttpHeaders, HttpXsrfTokenExtractor, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CookieServiceMock } from '../../shared/mocks/cookie.service.mock';
|
||||
@@ -35,18 +28,20 @@ describe(`XsrfInterceptor`, () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [
|
||||
imports: [],
|
||||
providers: [
|
||||
DspaceRestService,
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: XsrfInterceptor,
|
||||
multi: true,
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: XsrfInterceptor,
|
||||
multi: true,
|
||||
},
|
||||
{ provide: HttpXsrfTokenExtractor, useValue: new HttpXsrfTokenExtractorMock(testToken) },
|
||||
{ provide: CookieService, useValue: new CookieServiceMock() },
|
||||
],
|
||||
});
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
});
|
||||
|
||||
service = TestBed.get(DspaceRestService);
|
||||
httpMock = TestBed.get(HttpTestingController);
|
||||
|
@@ -1,12 +1,4 @@
|
||||
import {
|
||||
HttpErrorResponse,
|
||||
HttpEvent,
|
||||
HttpHandler,
|
||||
HttpInterceptor,
|
||||
HttpRequest,
|
||||
HttpResponse,
|
||||
HttpXsrfTokenExtractor,
|
||||
} from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse, HttpXsrfTokenExtractor } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Observable,
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpClientTestingModule,
|
||||
HttpTestingController,
|
||||
} from '@angular/common/http/testing';
|
||||
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import {
|
||||
DebugElement,
|
||||
NO_ERRORS_SCHEMA,
|
||||
@@ -25,6 +22,7 @@ import {
|
||||
import { LangConfig } from '../../../config/lang-config.interface';
|
||||
import { LocaleService } from '../../core/locale/locale.service';
|
||||
import { LangSwitchComponent } from './lang-switch.component';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
// This test is completely independent from any message catalogs or keys in the codebase
|
||||
// The translation module is instantiated with these bogus messages that we aren't using anyway.
|
||||
@@ -83,15 +81,17 @@ describe('LangSwitchComponent', () => {
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule, TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: CustomLoader },
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
imports: [TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: CustomLoader },
|
||||
}), LangSwitchComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
providers: [
|
||||
TranslateService,
|
||||
{ provide: LocaleService, useValue: getMockLocaleService() },
|
||||
],
|
||||
}).compileComponents()
|
||||
providers: [
|
||||
TranslateService,
|
||||
{ provide: LocaleService, useValue: getMockLocaleService() },
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
}).compileComponents()
|
||||
.then(() => {
|
||||
translate = TestBed.inject(TranslateService);
|
||||
translate.addLangs(mockConfig.languages.filter((langConfig: LangConfig) => langConfig.active === true).map((a) => a.code));
|
||||
@@ -166,15 +166,17 @@ describe('LangSwitchComponent', () => {
|
||||
};
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule, TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: CustomLoader },
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
imports: [TranslateModule.forRoot({
|
||||
loader: { provide: TranslateLoader, useClass: CustomLoader },
|
||||
}), LangSwitchComponent],
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
providers: [
|
||||
TranslateService,
|
||||
{ provide: LocaleService, useValue: getMockLocaleService() },
|
||||
],
|
||||
}).compileComponents();
|
||||
providers: [
|
||||
TranslateService,
|
||||
{ provide: LocaleService, useValue: getMockLocaleService() },
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
]
|
||||
}).compileComponents();
|
||||
translate = TestBed.inject(TranslateService);
|
||||
translate.addLangs(mockConfig.languages.filter((MyLangConfig) => MyLangConfig.active === true).map((a) => a.code));
|
||||
translate.setDefaultLang('en');
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpHeaders,
|
||||
HttpResponse,
|
||||
} from '@angular/common/http';
|
||||
import { HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
||||
import { RestRequestMethod } from '../../../core/data/rest-request-method';
|
||||
|
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
HttpHeaders,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
|
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
HttpClient,
|
||||
provideHttpClient,
|
||||
withInterceptorsFromDi,
|
||||
} from '@angular/common/http';
|
||||
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import {
|
||||
APP_ID,
|
||||
APP_INITIALIZER,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
@@ -203,24 +203,19 @@ const DECLARATIONS = [
|
||||
SearchResultsSkeletonComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RootModule,
|
||||
CommonModule,
|
||||
DragDropModule,
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
NgbModule,
|
||||
RouterModule,
|
||||
ScrollToModule,
|
||||
StoreModule,
|
||||
StoreRouterConnectingModule,
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
NgxGalleryModule,
|
||||
...DECLARATIONS,
|
||||
],
|
||||
})
|
||||
@NgModule({ imports: [RootModule,
|
||||
CommonModule,
|
||||
DragDropModule,
|
||||
FormsModule,
|
||||
NgbModule,
|
||||
RouterModule,
|
||||
ScrollToModule,
|
||||
StoreModule,
|
||||
StoreRouterConnectingModule,
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
NgxGalleryModule,
|
||||
...DECLARATIONS], providers: [provideHttpClient(withInterceptorsFromDi())] })
|
||||
|
||||
/**
|
||||
* This module serves as an index for all the components in this theme.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
@@ -15,23 +15,17 @@ import { RootModule } from '../../app/root.module';
|
||||
const DECLARATIONS = [
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RootModule,
|
||||
CommonModule,
|
||||
DragDropModule,
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
NgbModule,
|
||||
RouterModule,
|
||||
ScrollToModule,
|
||||
StoreModule,
|
||||
StoreRouterConnectingModule,
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
],
|
||||
declarations: DECLARATIONS,
|
||||
})
|
||||
@NgModule({ declarations: DECLARATIONS, imports: [RootModule,
|
||||
CommonModule,
|
||||
DragDropModule,
|
||||
FormsModule,
|
||||
NgbModule,
|
||||
RouterModule,
|
||||
ScrollToModule,
|
||||
StoreModule,
|
||||
StoreRouterConnectingModule,
|
||||
TranslateModule,
|
||||
FormsModule], providers: [provideHttpClient(withInterceptorsFromDi())] })
|
||||
|
||||
/**
|
||||
* This module serves as an index for all the components in this theme.
|
||||
|
@@ -8,8 +8,8 @@
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"module": "es2020",
|
||||
@@ -20,7 +20,6 @@
|
||||
"strictNullChecks": false,
|
||||
"skipDefaultLibCheck": true,
|
||||
"pretty": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2022",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
|
Reference in New Issue
Block a user