Update to Angular 16 #2

Merged
konstantina.galouni merged 16 commits from angular-16 into develop 2023-10-31 10:57:23 +01:00
16 changed files with 66 additions and 56 deletions

View File

@ -220,13 +220,16 @@
"main": "server.ts", "main": "server.ts",
"tsConfig": "src/tsconfig.server.json", "tsConfig": "src/tsconfig.server.json",
"sourceMap": true, "sourceMap": true,
"optimization": false "optimization": false,
"buildOptimizer": false
}, },
"configurations": { "configurations": {
"development": { "development": {
"outputHashing": "media", "outputHashing": "media",
"sourceMap": false, "sourceMap": false,
"optimization": true "optimization": true,
"vendorChunk": true,
"buildOptimizer": true
}, },
"beta": { "beta": {
"outputHashing": "media", "outputHashing": "media",
@ -237,7 +240,8 @@
} }
], ],
"sourceMap": false, "sourceMap": false,
"optimization": true "optimization": true,
"buildOptimizer": true
}, },
"production": { "production": {
"outputHashing": "media", "outputHashing": "media",
@ -248,7 +252,8 @@
} }
], ],
"sourceMap": false, "sourceMap": false,
"optimization": true "optimization": true,
"buildOptimizer": true
} }
}, },
"defaultConfiguration": "" "defaultConfiguration": ""
@ -301,7 +306,6 @@
} }
} }
}, },
"defaultProject": "aggregator",
"cli": { "cli": {
"analytics": false "analytics": false
} }

View File

@ -21,40 +21,40 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^14.2.3", "@angular/animations": "^16.1.8",
"@angular/cdk": "^14.2.2", "@angular/cdk": "^16.1.7",
"@angular/common": "^14.2.3", "@angular/common": "^16.1.8",
"@angular/compiler": "^14.2.3", "@angular/compiler": "^16.1.8",
"@angular/core": "^14.2.3", "@angular/core": "^16.1.8",
"@angular/forms": "^14.2.3", "@angular/forms": "^16.1.8",
"@angular/localize": "^14.2.3", "@angular/localize": "^16.1.8",
"@angular/material": "^14.2.2", "@angular/material": "^16.1.7",
"@angular/platform-browser": "^14.2.3", "@angular/platform-browser": "^16.1.8",
"@angular/platform-browser-dynamic": "^14.2.3", "@angular/platform-browser-dynamic": "^16.1.8",
"@angular/platform-server": "^14.2.3", "@angular/platform-server": "^16.1.8",
"@angular/router": "^14.2.3", "@angular/router": "^16.1.8",
"@nguniversal/express-engine": "^14.2.0", "@nguniversal/express-engine": "^16.1.1",
"clipboard": "^1.5.16", "clipboard": "^1.5.16",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"express": "^4.15.2", "express": "^4.15.2",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"ng-recaptcha": "^10.0.0", "ng-recaptcha": "^12.0.2",
"prom-client": "^11.3.0", "prom-client": "^11.3.0",
"rxjs": "^6.5.1", "rxjs": "^6.5.1",
"ts-md5": "^1.2.0", "ts-md5": "^1.2.0",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"uikit": "3.13.10", "uikit": "3.16.14",
"zone.js": "~0.11.4" "zone.js": "~0.13.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^14.2.3", "@angular-devkit/build-angular": "^16.1.7",
"@angular/cli": "^14.2.3", "@angular/cli": "^16.1.7",
"@angular/compiler-cli": "^14.2.3", "@angular/compiler-cli": "^16.1.8",
"@angular/language-service": "^14.2.3", "@angular/language-service": "^16.1.8",
"@nguniversal/builders": "^14.2.0", "@nguniversal/builders": "^16.1.1",
"@types/express": "^4.17.0", "@types/express": "^4.17.0",
"@types/compression": "^1.7.0", "@types/compression": "^1.7.0",
"@types/node": "^12.11.1", "@types/node": "^16.18.50",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0", "codelyzer": "^6.0.0",
@ -67,6 +67,6 @@
"karma-jasmine-html-reporter": "^1.6.0", "karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"typescript": "~4.6.4" "typescript": "~4.9.5"
} }
} }

View File

@ -1,6 +1,6 @@
import {NgModule} from '@angular/core'; import {APP_ID, NgModule} from '@angular/core';
import {SharedModule} from './shared/shared.module'; import {SharedModule} from './shared/shared.module';
import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser'; import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {CommonModule} from '@angular/common'; import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
@ -27,14 +27,14 @@ import {ConfigurationService} from "./openaireLibrary/utils/configuration/config
NavigationBarModule, FeedbackModule, BottomModule, NavigationBarModule, FeedbackModule, BottomModule,
CookieLawModule, CookieLawModule,
BrowserAnimationsModule, BrowserAnimationsModule,
BrowserTransferStateModule, BrowserModule,
BrowserModule.withServerTransition({appId: 'aggregator'}),
AppRoutingModule AppRoutingModule
], ],
declarations: [AppComponent, OpenaireErrorPageComponent], declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent], exports: [AppComponent],
providers: [ providers: [
ConfigurationService, ConfigurationService,
{provide: APP_ID, useValue: 'aggregator'},
{ {
provide: HTTP_INTERCEPTORS, provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService, useClass: HttpInterceptorService,

View File

@ -1,5 +1,5 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server'; import {ServerModule} from '@angular/platform-server';
import { AppModule } from './app.module'; import { AppModule } from './app.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
@ -8,7 +8,6 @@ import { AppComponent } from './app.component';
imports: [ imports: [
AppModule, AppModule,
ServerModule, ServerModule,
ServerTransferStateModule
], ],
bootstrap: [AppComponent], bootstrap: [AppComponent],
}) })

View File

@ -12,7 +12,6 @@ import {DepositFirstPageModule} from "../openaireLibrary/deposit/depositFirstPag
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service"; import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
@NgModule({ @NgModule({
imports: [ imports: [
@ -26,6 +25,6 @@ import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoC
OpenaireDepositComponent, OpenaireDepositComponent,
], ],
providers: [PreviousRouteRecorder, IsRouteEnabled, providers: [PreviousRouteRecorder, IsRouteEnabled,
ZenodoCommunitiesService, CommunityService, SearchZenodoCommunitiesService] ZenodoCommunitiesService, CommunityService]
}) })
export class LibDepositModule { } export class LibDepositModule { }

View File

@ -9,7 +9,6 @@ import {SearchDataprovidersToDepositModule} from '../openaireLibrary/deposit/sea
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'; import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard';
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module'; import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
import {CommunityService} from '../openaireLibrary/connect/community/community.service'; import {CommunityService} from '../openaireLibrary/connect/community/community.service';
@ -18,7 +17,7 @@ import {CommunityService} from '../openaireLibrary/connect/community/community.s
CommonModule, FormsModule, CommonModule, FormsModule,
SearchDataprovidersToDepositModule, SearchDataprovidersToDepositModule,
SearchDataprovidersToDepositRoutingModule, SearchDataprovidersToDepositRoutingModule,
ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule ZenodoCommunitiesServiceModule
], ],
declarations: [ declarations: [
OpenaireSearchDataprovidersToDepositComponent OpenaireSearchDataprovidersToDepositComponent

@ -1 +1 @@
Subproject commit 5af67f738570647ee61fb4d9ccb211bfae2890ae Subproject commit 5184ffad194e23864411f989f9403cd984afb4a3

@ -1 +1 @@
Subproject commit 6bb1e61b059bef1bff3bfb0611b0df46f7840426 Subproject commit d1b2d5e585722751792d12645d17f820cd6a7860

@ -1 +1 @@
Subproject commit 5e8c1addb1ebfa508aac8cb9540a755940c95b79 Subproject commit 2dadcf85926bc0f11fff22ed94dc197ddd8587c6

View File

@ -1,6 +1,7 @@
import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties";
import {common, commonBeta} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = { let props: EnvProperties = {
environment: "beta", environment: "beta",
adminToolsPortalType: "aggregator", adminToolsPortalType: "aggregator",
dashboard: "aggregator", dashboard: "aggregator",
@ -13,8 +14,8 @@ export let properties: EnvProperties = {
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
useNewStatistisTool: true, useNewStatistisTool: true,
claimsAPIURL: "https://beta.services.openaire.eu/claims-new/rest/claimsService/",
bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=",
claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/",
searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/", searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
@ -127,3 +128,7 @@ export let properties: EnvProperties = {
footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452" footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452"
}; };
export let properties: EnvProperties = {
...props, ...common, ...commonBeta
}

View File

@ -1,6 +1,7 @@
import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties";
import {common, commonProd} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = { let props: EnvProperties = {
environment: "production", environment: "production",
adminToolsPortalType: "aggregator", adminToolsPortalType: "aggregator",
dashboard: "aggregator", dashboard: "aggregator",
@ -13,8 +14,8 @@ export let properties: EnvProperties = {
statisticsFrameAPIURL: "https://www.openaire.eu/stats/", statisticsFrameAPIURL: "https://www.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/", statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/",
useNewStatistisTool: true, useNewStatistisTool: true,
claimsAPIURL: "https://beta.services.openaire.eu/claims-new/rest/claimsService/",
bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=", bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=",
claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/",
searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/", searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources", searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
@ -129,3 +130,7 @@ export let properties: EnvProperties = {
footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452" footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452"
}; };
export let properties: EnvProperties = {
...props, ...common, ...commonProd
}

View File

@ -4,8 +4,9 @@
// The list of which env maps to which file can be found in `.angular-cli.json`. // The list of which env maps to which file can be found in `.angular-cli.json`.
import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties";
import {common, commonDev} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = { let props: EnvProperties = {
environment: "development", environment: "development",
adminToolsPortalType: "aggregator", adminToolsPortalType: "aggregator",
dashboard: "aggregator", dashboard: "aggregator",
@ -131,3 +132,7 @@ export let properties: EnvProperties = {
reCaptchaSiteKey: null, reCaptchaSiteKey: null,
footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452" footerGrantText : "This OpenAIRE gateway is part of a project that has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452"
}; };
export let properties: EnvProperties = {
...props, ...common, ...commonDev
}

View File

@ -12,4 +12,4 @@ if (properties.environment !== "development") {
} }
export { AppServerModule } from './app/app.server.module'; export { AppServerModule } from './app/app.server.module';
export { renderModule } from '@angular/platform-server';

View File

@ -7,8 +7,6 @@ import {
platformBrowserDynamicTesting platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing'; } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment( getTestBed().initTestEnvironment(
BrowserDynamicTestingModule, BrowserDynamicTestingModule,
@ -16,7 +14,3 @@ getTestBed().initTestEnvironment(
teardown: { destroyAfterEach: false } teardown: { destroyAfterEach: false }
} }
); );
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -2,7 +2,6 @@
"extends": "./tsconfig.app.json", "extends": "./tsconfig.app.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../out-tsc/app-server", "outDir": "../out-tsc/app-server",
"target": "es2016",
"types": [ "types": [
"node" "node"
] ]

View File

@ -10,13 +10,14 @@
"moduleResolution": "node", "moduleResolution": "node",
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true, "importHelpers": true,
"target": "es2020", "target": "ES2022",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
"lib": [ "lib": [
"es2018", "es2018",
"dom" "dom"
] ],
"useDefineForClassFields": false
} }
} }