Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular: update to Angular v19 #28114

Merged
merged 16 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions generators/angular/resources/package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"dependencies": {
"@angular/common": "18.2.12",
"@fortawesome/angular-fontawesome": "0.15.0",
"@angular/common": "19.0.3",
"@fortawesome/angular-fontawesome": "1.0.0",
"@fortawesome/fontawesome-svg-core": "6.7.1",
"@fortawesome/free-solid-svg-icons": "6.7.1",
"@ng-bootstrap/ng-bootstrap": "17.0.1",
"@ng-bootstrap/ng-bootstrap": "18.0.0-rc.0",
"@ngx-translate/core": "16.0.3",
"@ngx-translate/http-loader": "16.0.0",
"@popperjs/core": "2.11.8",
"@stomp/rx-stomp": "2.0.0",
"bootstrap": "5.3.3",
"bootswatch": "5.3.3",
"ngx-cookie-service": "18.0.0",
"ngx-infinite-scroll": "18.0.0",
"ngx-cookie-service": "19.0.0",
"ngx-infinite-scroll": "19.0.0",
"rxjs": "7.8.1",
"sockjs-client": "1.6.1",
"tslib": "2.8.1",
"zone.js": "0.14.10"
"zone.js": "0.15.0"
},
"devDependencies": {
"@angular-architects/module-federation": "18.0.6",
"@angular-architects/module-federation-runtime": "18.0.6",
"@angular-builders/custom-esbuild": "18.0.0",
"@angular-builders/custom-webpack": "18.0.0",
"@angular-builders/jest": "18.0.0",
"@angular/cli": "18.2.12",
"@angular-builders/custom-esbuild": "19.0.0-beta.0",
"@angular-builders/custom-webpack": "19.0.0-beta.0",
"@angular-builders/jest": "19.0.0-beta.0",
"@angular/cli": "19.0.4",
"@eslint/js": "9.16.0",
"@types/jest": "29.5.14",
"@types/node": "20.11.25",
"@types/sockjs-client": "1.5.4",
"angular-eslint": "18.4.2",
"angular-eslint": "19.0.2",
"browser-sync": "3.0.3",
"browser-sync-webpack-plugin": "2.3.0",
"buffer": "6.0.3",
Expand All @@ -51,7 +51,7 @@
"postcss-rtlcss": "5.5.1",
"rimraf": "5.0.8",
"ts-jest": "29.2.5",
"typescript": "5.5.4",
"typescript": "5.6.3",
"typescript-eslint": "8.18.0",
"webpack": "5.97.1",
"webpack-bundle-analyzer": "4.10.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import SharedModule from 'app/shared/shared.module';
import { ActivateService } from './activate.service';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-activate',
imports: [SharedModule, RouterModule],
templateUrl: './activate.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import SharedModule from 'app/shared/shared.module';
import { PasswordResetFinishService } from './password-reset-finish.service';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-password-reset-finish',
imports: [SharedModule, RouterModule, FormsModule, ReactiveFormsModule, PasswordStrengthBarComponent],
templateUrl: './password-reset-finish.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import SharedModule from 'app/shared/shared.module';
import { PasswordResetInitService } from './password-reset-init.service';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-password-reset-init',
imports: [SharedModule, FormsModule, ReactiveFormsModule],
templateUrl: './password-reset-init.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { Component, ElementRef, inject, Input, Renderer2 } from '@angular/core';
import SharedModule from 'app/shared/shared.module';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-password-strength-bar',
imports: [SharedModule],
templateUrl: './password-strength-bar.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { PasswordService } from './password.service';
import PasswordStrengthBarComponent from './password-strength-bar/password-strength-bar.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-password',
imports: [SharedModule, FormsModule, ReactiveFormsModule, PasswordStrengthBarComponent],
templateUrl: './password.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import SharedModule from 'app/shared/shared.module';
import PasswordStrengthBarComponent from '../password/password-strength-bar/password-strength-bar.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-register',
imports: [SharedModule, RouterModule, FormsModule, ReactiveFormsModule, PasswordStrengthBarComponent],
templateUrl: './register.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { SessionsService } from './sessions.service';
import { Account } from 'app/core/auth/account.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-sessions',
imports: [SharedModule],
templateUrl: './sessions.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { LANGUAGES } from 'app/config/language.constants';
const initialAccount: Account = {} as Account;

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-settings',
imports: [SharedModule, FormsModule, ReactiveFormsModule],
templateUrl: './settings.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { ConfigurationService } from './configuration.service';
import { Bean, PropertySource } from './configuration.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-configuration',
templateUrl: './configuration.component.html',
imports: [SharedModule, FormsModule, SortDirective, SortByDirective],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import { Component } from '@angular/core';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-docs',
templateUrl: './docs.component.html',
styleUrl: './docs.component.scss',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { GatewayRoutesService } from './gateway-routes.service';
import { GatewayRoute } from './gateway-route.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-gateway',
templateUrl: './gateway.component.html',
providers: [GatewayRoutesService],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ import { Health, HealthDetails, HealthStatus } from './health.model';
import HealthModalComponent from './modal/health-modal.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-health',
templateUrl: './health.component.html',
imports: [SharedModule, HealthModalComponent],
imports: [SharedModule],
})
export default class HealthComponent implements OnInit {
health?: Health;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import SharedModule from 'app/shared/shared.module';
import { HealthKey, HealthDetails } from '../health.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-health-modal',
templateUrl: './health-modal.component.html',
imports: [SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { GatewayRoutesService } from '../gateway/gateway-routes.service';
<%_ } _%>

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-logs',
templateUrl: './logs.component.html',
<%_ if (applicationTypeGateway && gatewayServicesApiAvailable) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import SharedModule from 'app/shared/shared.module';
import { JvmMetrics } from 'app/admin/metrics/metrics.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-jvm-memory',
templateUrl: './jvm-memory.component.html',
imports: [SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { Thread, ThreadState } from 'app/admin/metrics/metrics.model';
import { MetricsModalThreadsComponent } from '../metrics-modal-threads/metrics-modal-threads.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-jvm-threads',
templateUrl: './jvm-threads.component.html',
imports: [SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { CacheMetrics } from 'app/admin/metrics/metrics.model';
import { filterNaN } from 'app/core/util/operators';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-cache',
templateUrl: './metrics-cache.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { Databases } from 'app/admin/metrics/metrics.model';
import { filterNaN } from 'app/core/util/operators';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-datasource',
templateUrl: './metrics-datasource.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import SharedModule from 'app/shared/shared.module';
import { Services } from 'app/admin/metrics/metrics.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-endpoints-requests',
templateUrl: './metrics-endpoints-requests.component.html',
imports: [SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import SharedModule from 'app/shared/shared.module';
import { GarbageCollector } from 'app/admin/metrics/metrics.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-garbagecollector',
templateUrl: './metrics-garbagecollector.component.html',
imports: [SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import SharedModule from 'app/shared/shared.module';
import { Thread, ThreadState } from 'app/admin/metrics/metrics.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-thread-modal',
templateUrl: './metrics-modal-threads.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { HttpServerRequests } from 'app/admin/metrics/metrics.model';
import { filterNaN } from 'app/core/util/operators';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-request',
templateUrl: './metrics-request.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import SharedModule from 'app/shared/shared.module';
import { ProcessMetrics } from 'app/admin/metrics/metrics.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics-system',
templateUrl: './metrics-system.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ import { MetricsCacheComponent } from './blocks/metrics-cache/metrics-cache.comp
import { MetricsDatasourceComponent } from './blocks/metrics-datasource/metrics-datasource.component';
import { MetricsEndpointsRequestsComponent } from './blocks/metrics-endpoints-requests/metrics-endpoints-requests.component';
import { MetricsGarbageCollectorComponent } from './blocks/metrics-garbagecollector/metrics-garbagecollector.component';
import { MetricsModalThreadsComponent } from './blocks/metrics-modal-threads/metrics-modal-threads.component';
import { MetricsRequestComponent } from './blocks/metrics-request/metrics-request.component';
import { MetricsSystemComponent } from './blocks/metrics-system/metrics-system.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-metrics',
templateUrl: './metrics.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -45,7 +43,6 @@ import { MetricsSystemComponent } from './blocks/metrics-system/metrics-system.c
MetricsDatasourceComponent,
MetricsEndpointsRequestsComponent,
MetricsGarbageCollectorComponent,
MetricsModalThreadsComponent,
MetricsRequestComponent,
MetricsSystemComponent,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { TrackerActivity } from 'app/core/tracker/tracker-activity.model';
import SharedModule from 'app/shared/shared.module';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-tracker',
imports: [SharedModule],
templateUrl: './tracker.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { User } from '../user-management.model';
import { UserManagementService } from '../service/user-management.service';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-user-mgmt-delete-dialog',
templateUrl: './user-management-delete-dialog.component.html',
imports: [SharedModule, FormsModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import SharedModule from 'app/shared/shared.module';
import { User } from '../user-management.model';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-user-mgmt-detail',
templateUrl: './user-management-detail.component.html',
imports: [RouterModule, SharedModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ import { User } from '../user-management.model';
import UserManagementDeleteDialogComponent from '../delete/user-management-delete-dialog.component';

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-user-mgmt',
templateUrl: './user-management.component.html',
imports: [
RouterModule,
SharedModule,
UserManagementDeleteDialogComponent,
<%_ if (!databaseTypeCassandra) { _%>
SortDirective,
SortByDirective,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const newUser: IUser = {
} as IUser;

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-user-mgmt-update',
templateUrl: './user-management-update.component.html',
imports: [SharedModule, FormsModule, ReactiveFormsModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import { TrackerService } from './core/tracker/tracker.service';
<%_ } _%>

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-app',
template: '<<%= jhiPrefixDashed %>-main></<%= jhiPrefixDashed %>-main>',
imports: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { <%= entityAngularName %>Service } from '../service/<%= entityFileName %
import { ITEM_DELETED_EVENT } from 'app/config/navigation.constants';

@Component({
standalone: true,
templateUrl: './<%= entityFileName %>-delete-dialog.component.html',
imports: [SharedModule, FormsModule],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ _%>
<%_ } else if (field.fieldTypeBinary && field.blobContentTypeImage) { _%>
@if (<%= entityInstance %>Ref.<%= fieldName %>) {
<div>
<a (click)="openFile(<%= entityInstance %>Ref.<%= fieldName %> ?? '', <%= entityInstance %>Ref.<%= fieldName %>ContentType)">
<a (click)="openFile(<%= entityInstance %>Ref.<%= fieldName %><% if (!field.fieldValidationRequired) { %> ?? ''<% } %>, <%= entityInstance %>Ref.<%= fieldName %>ContentType)">
<img [src]="'data:' + <%= entityInstance %>Ref.<%= fieldName %>ContentType + ';base64,' + <%= entityInstance %>Ref.<%= fieldName %>" style="max-width: 100%;" alt="<%= entityInstance %>"/>
</a>
{{ <%= entityInstance %>Ref.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>Ref.<%= fieldName %> ?? '') }}
{{ <%= entityInstance %>Ref.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>Ref.<%= fieldName %><% if (!field.fieldValidationRequired) { %> ?? ''<% } %>) }}
</div>
}
<%_ } else if (field.fieldTypeBinary && field.blobContentTypeAny) { _%>
@if (<%= entityInstance %>Ref.<%= fieldName %>) {
<div>
<a (click)="openFile(<%= entityInstance %>Ref.<%= fieldName %> ?? '', <%= entityInstance %>Ref.<%= fieldName %>ContentType)">__jhiTranslateTag__('entity.action.open')</a>
{{ <%= entityInstance %>Ref.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>Ref.<%= fieldName %> ?? '') }}
<a (click)="openFile(<%= entityInstance %>Ref.<%= fieldName %><% if (!field.fieldValidationRequired) { %> ?? ''<% } %>, <%= entityInstance %>Ref.<%= fieldName %>ContentType)">__jhiTranslateTag__('entity.action.open')</a>
{{ <%= entityInstance %>Ref.<%= fieldName %>ContentType }}, {{ byteSize(<%= entityInstance %>Ref.<%= fieldName %><% if (!field.fieldValidationRequired) { %> ?? ''<% } %>) }}
</div>
}
<%_ } else if (field.fieldTypeDuration) { _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,21 @@ import { DataUtils } from 'app/core/util/data-util.service';
<%_ } _%>

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-<%= entityFileName %>-detail',
templateUrl: './<%= entityFileName %>-detail.component.html',
imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
imports: [
SharedModule,
RouterModule,
<%_ if (anyFieldIsDuration) { _%>
DurationPipe,
<%_ } _%>
<%_ if (anyFieldIsTimeDerived) { _%>
FormatMediumDatetimePipe,
<%_ } _%>
<%_ if (anyFieldIsLocalDate) { _%>
FormatMediumDatePipe,
<%_ } _%>
],
})
export class <%= entityAngularName %>DetailComponent {
<%= entityInstance %> = input<I<%= entityAngularName %> | null>(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
<%_ } _%>

@Component({
standalone: true,
selector: '<%= jhiPrefixDashed %>-<%= entityFileName %>',
templateUrl: './<%= entityFileName %>.component.html',
imports: [
Expand All @@ -96,9 +95,15 @@ import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
SharedModule,
SortDirective,
SortByDirective,
<%_ if (anyFieldIsDuration) { _%>
DurationPipe,
<%_ } _%>
<%_ if (anyFieldIsTimeDerived) { _%>
FormatMediumDatetimePipe,
<%_ } _%>
<%_ if (anyFieldIsLocalDate) { _%>
FormatMediumDatePipe,
<%_ } _%>
<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>
FilterComponent,
<%_ } _%>
Expand Down
Loading
Loading