Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/migrate dialog header and footer components to standalone (#5401)
Kenrick Tandrian1112048c45ab
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 757029e199..45a096209e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Changed+- Refactored the dialog footer component to standalone+- Refactored the dialog header component to standalone- Refactored the register page to standalone- Migrated the login with access token dialog from `ngModel` to form control- Upgraded `prisma` from version `6.12.0` to `6.14.0`diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.module.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.module.tsindex 46c4cb40f3..537643ac21 100644--- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.module.ts+++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.module.ts@@ -1,5 +1,5 @@-import { GfDialogFooterModule } from '@ghostfolio/client/components/dialog-footer/dialog-footer.module';-import { GfDialogHeaderModule } from '@ghostfolio/client/components/dialog-header/dialog-header.module';+import { GfDialogFooterComponent } from '@ghostfolio/client/components/dialog-footer/dialog-footer.component';+import { GfDialogHeaderComponent } from '@ghostfolio/client/components/dialog-header/dialog-header.component';import { GfInvestmentChartModule } from '@ghostfolio/client/components/investment-chart/investment-chart.module';import { GfAccountBalancesComponent } from '@ghostfolio/ui/account-balances';import { GfActivitiesTableComponent } from '@ghostfolio/ui/activities-table';@@ -22,8 +22,8 @@ import { AccountDetailDialog } from './account-detail-dialog.component';CommonModule,GfAccountBalancesComponent,GfActivitiesTableComponent,- GfDialogFooterModule,- GfDialogHeaderModule,+ GfDialogFooterComponent,+ GfDialogHeaderComponent,GfHoldingsTableComponent,GfInvestmentChartModule,GfValueComponent,diff --git a/apps/client/src/app/components/dialog-footer/dialog-footer.component.ts b/apps/client/src/app/components/dialog-footer/dialog-footer.component.tsindex 923b153b36..92ffc71b3d 100644--- a/apps/client/src/app/components/dialog-footer/dialog-footer.component.ts+++ b/apps/client/src/app/components/dialog-footer/dialog-footer.component.ts@@ -5,18 +5,20 @@ import {Input,Output} from '@angular/core';+import { MatButtonModule } from '@angular/material/button';+import { IonIcon } from '@ionic/angular/standalone';import { addIcons } from 'ionicons';import { close } from 'ionicons/icons';@Component({+ changeDetection: ChangeDetectionStrategy.OnPush,host: { class: 'justify-content-center' },+ imports: [IonIcon, MatButtonModule],selector: 'gf-dialog-footer',- changeDetection: ChangeDetectionStrategy.OnPush,- templateUrl: './dialog-footer.component.html',styleUrls: ['./dialog-footer.component.scss'],- standalone: false+ templateUrl: './dialog-footer.component.html'})-export class DialogFooterComponent {+export class GfDialogFooterComponent {@Input() deviceType: string;@Output() closeButtonClicked = new EventEmitter<void>();diff --git a/apps/client/src/app/components/dialog-footer/dialog-footer.module.ts b/apps/client/src/app/components/dialog-footer/dialog-footer.module.tsdeleted file mode 100644index 486068f72f..0000000000--- a/apps/client/src/app/components/dialog-footer/dialog-footer.module.ts+++ /dev/null@@ -1,14 +0,0 @@-import { CommonModule } from '@angular/common';-import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';-import { MatButtonModule } from '@angular/material/button';-import { IonIcon } from '@ionic/angular/standalone';--import { DialogFooterComponent } from './dialog-footer.component';--@NgModule({- declarations: [DialogFooterComponent],- exports: [DialogFooterComponent],- imports: [CommonModule, IonIcon, MatButtonModule],- schemas: [CUSTOM_ELEMENTS_SCHEMA]-})-export class GfDialogFooterModule {}diff --git a/apps/client/src/app/components/dialog-header/dialog-header.component.ts b/apps/client/src/app/components/dialog-header/dialog-header.component.tsindex 03a5357b55..0487034e93 100644--- a/apps/client/src/app/components/dialog-header/dialog-header.component.ts+++ b/apps/client/src/app/components/dialog-header/dialog-header.component.ts@@ -1,3 +1,4 @@+import { CommonModule } from '@angular/common';import {ChangeDetectionStrategy,Component,@@ -5,18 +6,20 @@ import {Input,Output} from '@angular/core';+import { MatButtonModule } from '@angular/material/button';+import { IonIcon } from '@ionic/angular/standalone';import { addIcons } from 'ionicons';import { close } from 'ionicons/icons';@Component({+ changeDetection: ChangeDetectionStrategy.OnPush,host: { class: 'justify-content-center' },+ imports: [CommonModule, IonIcon, MatButtonModule],selector: 'gf-dialog-header',- changeDetection: ChangeDetectionStrategy.OnPush,- templateUrl: './dialog-header.component.html',styleUrls: ['./dialog-header.component.scss'],- standalone: false+ templateUrl: './dialog-header.component.html'})-export class DialogHeaderComponent {+export class GfDialogHeaderComponent {@Input() deviceType: string;@Input() position: 'center' | 'left' = 'left';@Input() title: string;diff --git a/apps/client/src/app/components/dialog-header/dialog-header.module.ts b/apps/client/src/app/components/dialog-header/dialog-header.module.tsdeleted file mode 100644index da5c2ec287..0000000000--- a/apps/client/src/app/components/dialog-header/dialog-header.module.ts+++ /dev/null@@ -1,14 +0,0 @@-import { CommonModule } from '@angular/common';-import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';-import { MatButtonModule } from '@angular/material/button';-import { IonIcon } from '@ionic/angular/standalone';--import { DialogHeaderComponent } from './dialog-header.component';--@NgModule({- declarations: [DialogHeaderComponent],- exports: [DialogHeaderComponent],- imports: [CommonModule, IonIcon, MatButtonModule],- schemas: [CUSTOM_ELEMENTS_SCHEMA]-})-export class GfDialogHeaderModule {}diff --git a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.tsindex 203bbb123b..8f66161743 100644--- a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts+++ b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts@@ -1,6 +1,6 @@import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface';-import { GfDialogFooterModule } from '@ghostfolio/client/components/dialog-footer/dialog-footer.module';-import { GfDialogHeaderModule } from '@ghostfolio/client/components/dialog-header/dialog-header.module';+import { GfDialogFooterComponent } from '@ghostfolio/client/components/dialog-footer/dialog-footer.component';+import { GfDialogHeaderComponent } from '@ghostfolio/client/components/dialog-header/dialog-header.component';import { DataService } from '@ghostfolio/client/services/data.service';import { UserService } from '@ghostfolio/client/services/user/user.service';import {@@ -78,8 +78,8 @@ import { HoldingDetailDialogParams } from './interfaces/interfaces';GfAccountsTableComponent,GfActivitiesTableComponent,GfDataProviderCreditsComponent,- GfDialogFooterModule,- GfDialogHeaderModule,+ GfDialogFooterComponent,+ GfDialogHeaderComponent,GfHistoricalMarketDataEditorComponent,GfLineChartComponent,GfPortfolioProportionChartComponent,diff --git a/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.module.ts b/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.module.tsindex fcced81aa4..355ae58f85 100644--- a/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.module.ts+++ b/apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.module.ts@@ -9,14 +9,14 @@ import { MatFormFieldModule } from '@angular/material/form-field';import { MatInputModule } from '@angular/material/input';import { IonIcon } from '@ionic/angular/standalone';-import { GfDialogHeaderModule } from '../dialog-header/dialog-header.module';+import { GfDialogHeaderComponent } from '../dialog-header/dialog-header.component';import { LoginWithAccessTokenDialog } from './login-with-access-token-dialog.component';@NgModule({declarations: [LoginWithAccessTokenDialog],imports: [CommonModule,- GfDialogHeaderModule,+ GfDialogHeaderComponent,IonIcon,MatButtonModule,MatCheckboxModule,diff --git a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.tsindex 41e3662536..8f7130a10f 100644--- a/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts+++ b/apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts@@ -2,8 +2,8 @@ import { CreateTagDto } from '@ghostfolio/api/app/endpoints/tags/create-tag.dto'import { CreateAccountWithBalancesDto } from '@ghostfolio/api/app/import/create-account-with-balances.dto';import { CreateAssetProfileWithMarketDataDto } from '@ghostfolio/api/app/import/create-asset-profile-with-market-data.dto';import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface';-import { GfDialogFooterModule } from '@ghostfolio/client/components/dialog-footer/dialog-footer.module';-import { GfDialogHeaderModule } from '@ghostfolio/client/components/dialog-header/dialog-header.module';+import { GfDialogFooterComponent } from '@ghostfolio/client/components/dialog-footer/dialog-footer.component';+import { GfDialogHeaderComponent } from '@ghostfolio/client/components/dialog-header/dialog-header.component';import { GfFileDropModule } from '@ghostfolio/client/directives/file-drop/file-drop.module';import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module';import { DataService } from '@ghostfolio/client/services/data.service';@@ -58,8 +58,8 @@ import { ImportActivitiesDialogParams } from './interfaces/interfaces';changeDetection: ChangeDetectionStrategy.OnPush,imports: [GfActivitiesTableComponent,- GfDialogFooterModule,- GfDialogHeaderModule,+ GfDialogFooterComponent,+ GfDialogHeaderComponent,GfFileDropModule,GfSymbolModule,IonIcon,diff --git a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.tsindex 45f1163586..8f7d308477 100644--- a/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts+++ b/libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.component.ts@@ -1,5 +1,5 @@-import { GfDialogFooterModule } from '@ghostfolio/client/components/dialog-footer/dialog-footer.module';-import { GfDialogHeaderModule } from '@ghostfolio/client/components/dialog-header/dialog-header.module';+import { GfDialogFooterComponent } from '@ghostfolio/client/components/dialog-footer/dialog-footer.component';+import { GfDialogHeaderComponent } from '@ghostfolio/client/components/dialog-header/dialog-header.component';import { DataService } from '@ghostfolio/client/services/data.service';import { DATE_FORMAT } from '@ghostfolio/common/helper';import {@@ -33,8 +33,8 @@ import { BenchmarkDetailDialogParams } from './interfaces/interfaces';changeDetection: ChangeDetectionStrategy.OnPush,host: { class: 'd-flex flex-column h-100' },imports: [- GfDialogFooterModule,- GfDialogHeaderModule,+ GfDialogFooterComponent,+ GfDialogHeaderComponent,GfLineChartComponent,GfValueComponent,MatDialogModule