[angular-18 | WIP] upgrade angular core and cli to v18, bring submodules to angular-18 as well

This commit is contained in:
Alex Martzios 2024-07-24 11:26:05 +03:00
parent 9f87f11055
commit 655f0b6203
5 changed files with 94 additions and 112 deletions

View File

@ -17,17 +17,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^17.3.12",
"@angular/animations": "^18.1.1",
"@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/common": "^18.1.1",
"@angular/compiler": "^18.1.1",
"@angular/core": "^18.1.1",
"@angular/forms": "^18.1.1",
"@angular/localize": "^18.1.1",
"@angular/material": "^17.3.10",
"@angular/platform-browser": "^17.3.12",
"@angular/platform-browser-dynamic": "^17.3.12",
"@angular/router": "^17.3.12",
"@angular/platform-browser": "^18.1.1",
"@angular/platform-browser-dynamic": "^18.1.1",
"@angular/router": "^18.1.1",
"clipboard": "^1.5.16",
"core-js": "^2.5.4",
"express": "^4.15.2",
@ -43,10 +43,10 @@
"zone.js": "~0.14.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.8",
"@angular/cli": "^17.3.8",
"@angular/compiler-cli": "^17.3.12",
"@angular/language-service": "^17.3.12",
"@angular-devkit/build-angular": "^18.1.1",
"@angular/cli": "^18.1.1",
"@angular/compiler-cli": "^18.1.1",
"@angular/language-service": "^18.1.1",
"@types/ckeditor": "^4.9.10",
"@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0",
@ -61,6 +61,6 @@
"karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"typescript": "~5.4.0"
"typescript": "~5.5.4"
}
}

View File

@ -1,6 +1,6 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {AppComponent} from './app.component';
import {AppRoutingModule} from './app.routing';
import {ReactiveFormsModule} from '@angular/forms';
@ -23,36 +23,30 @@ import {AdminLoginGuard} from "./openaireLibrary/login/adminLoginGuard.guard";
import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard";
import {InteractiveMiningModule} from 'interactiveminingv3';
@NgModule({
imports: [
AppRoutingModule,
BrowserModule,
HttpClientModule,
ReactiveFormsModule,
BottomModule, NavigationBarModule,
ErrorModule,
SharedModule,
InteractiveMiningModule,
BrowserAnimationsModule, LoadingModule, SideBarModule
],
declarations: [
AppComponent,
AdminErrorPageComponent
],
providers: [
SubscribeService,
ConnectAdminLoginGuard, AdminLoginGuard, LoginGuard,
IsCommunity, ConnectRIGuard, TitleCasePipe,
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptorService,
multi: true
},
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
],
bootstrap: [AppComponent]
})
@NgModule({ declarations: [
AppComponent,
AdminErrorPageComponent
],
bootstrap: [AppComponent], imports: [AppRoutingModule,
BrowserModule,
ReactiveFormsModule,
BottomModule, NavigationBarModule,
ErrorModule,
SharedModule,
InteractiveMiningModule,
BrowserAnimationsModule, LoadingModule, SideBarModule], providers: [
SubscribeService,
ConnectAdminLoginGuard, AdminLoginGuard, LoginGuard,
IsCommunity, ConnectRIGuard, TitleCasePipe,
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptorService,
multi: true
},
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }],
provideHttpClient(withInterceptorsFromDi())
] })
export class AppModule {
}

View File

@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {HttpClientModule} from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
@ -32,38 +32,32 @@ import {MatSlideToggleModule} from "@angular/material/slide-toggle";
import {CKEditorModule} from "ng2-ckeditor";
import {ValidateEnabledPageModule} from "../../utils/validateEnabledPage.module";
@NgModule({
imports: [
CommonModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
RouterModule,
PagingModule, SearchPagingModule,
ErrorMessagesModule,
AlertModalModule,
SearchDataprovidersServiceModule,
PageContentModule,
InputModule,
SearchInputModule,
RouterModule.forChild([
{
path: '', component: ManageContentProvidersComponent
}
]),
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule, CKEditorModule, ReactiveFormsModule, ValidateEnabledPageModule
],
declarations: [
ManageContentProvidersComponent,
RemoveContentProvidersComponent,
AddContentProvidersComponent
],
providers: [
ManageCommunityContentProvidersService,
SearchDataprovidersService
],
exports: [ManageContentProvidersComponent]
})
@NgModule({ declarations: [
ManageContentProvidersComponent,
RemoveContentProvidersComponent,
AddContentProvidersComponent
],
exports: [ManageContentProvidersComponent], imports: [CommonModule,
FormsModule,
ReactiveFormsModule,
RouterModule,
PagingModule, SearchPagingModule,
ErrorMessagesModule,
AlertModalModule,
SearchDataprovidersServiceModule,
PageContentModule,
InputModule,
SearchInputModule,
RouterModule.forChild([
{
path: '', component: ManageContentProvidersComponent
}
]),
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule, CKEditorModule, ReactiveFormsModule, ValidateEnabledPageModule], providers: [
ManageCommunityContentProvidersService,
SearchDataprovidersService,
provideHttpClient(withInterceptorsFromDi())
] })
export class CommunityContentProvidersModule {
constructor(private iconsService: IconsService) {

View File

@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {HttpClientModule} from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {ManageProjectsComponent} from './manage-projects.component';
@ -26,38 +26,32 @@ import {DropdownFilterModule} from "../../openaireLibrary/utils/dropdown-filter/
import {SearchFilterModule} from "../../openaireLibrary/searchPages/searchUtils/searchFilter.module";
import {ValidateEnabledPageModule} from "../../utils/validateEnabledPage.module";
@NgModule({
imports: [
CommonModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
RouterModule,
PagingModule, SearchPagingModule,
ErrorMessagesModule,
AlertModalModule,
SearchProjectsServiceModule,
PageContentModule,
InputModule,
SearchInputModule,
RouterModule.forChild([
{
path: '', component: ManageProjectsComponent
}
]),
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, DropdownFilterModule, SearchFilterModule, ValidateEnabledPageModule
],
declarations: [
ManageProjectsComponent,
RemoveProjectsComponent,
AddProjectsComponent
],
providers: [
ManageCommunityProjectsService,
SearchProjectsService
],
exports: [ManageProjectsComponent]
})
@NgModule({ declarations: [
ManageProjectsComponent,
RemoveProjectsComponent,
AddProjectsComponent
],
exports: [ManageProjectsComponent], imports: [CommonModule,
FormsModule,
ReactiveFormsModule,
RouterModule,
PagingModule, SearchPagingModule,
ErrorMessagesModule,
AlertModalModule,
SearchProjectsServiceModule,
PageContentModule,
InputModule,
SearchInputModule,
RouterModule.forChild([
{
path: '', component: ManageProjectsComponent
}
]),
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, DropdownFilterModule, SearchFilterModule, ValidateEnabledPageModule], providers: [
ManageCommunityProjectsService,
SearchProjectsService,
provideHttpClient(withInterceptorsFromDi())
] })
export class CommunityProjectsModule {
constructor() {}
}

@ -1 +1 @@
Subproject commit ee1a55a529fde844f54761633e59f3be791717e3
Subproject commit eb0051dc347cdaa44476048dea9f6b61200f257f