Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/move asset profile icon component to @ghostfolio/ui (#4858)

Thomas Kaul71d56ad7894d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7e8d3d62d..8cad879d3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Changed
+
+- Moved the asset profile icon component to `@ghostfolio/ui`
+
### Fixed
- Fixed missing `/.well-known/assetlinks.json` for TWA
diff --git a/apps/client/src/app/components/accounts-table/accounts-table.module.ts b/apps/client/src/app/components/accounts-table/accounts-table.module.ts
index 879ca13ea9..da233984be 100644
--- a/apps/client/src/app/components/accounts-table/accounts-table.module.ts
+++ b/apps/client/src/app/components/accounts-table/accounts-table.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfValueComponent } from '@ghostfolio/ui/value';
import { CommonModule } from '@angular/common';
diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.module.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.module.ts
index bef8c198e6..03bd7fcbcc 100644
--- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.module.ts
+++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.module.ts
@@ -1,5 +1,5 @@
import { AdminMarketDataService } from '@ghostfolio/client/components/admin-market-data/admin-market-data.service';
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector';
import { GfHistoricalMarketDataEditorComponent } from '@ghostfolio/ui/historical-market-data-editor';
import { GfLineChartComponent } from '@ghostfolio/ui/line-chart';
diff --git a/apps/client/src/app/components/admin-platform/admin-platform.module.ts b/apps/client/src/app/components/admin-platform/admin-platform.module.ts
index e98d53988e..a7d93f4256 100644
--- a/apps/client/src/app/components/admin-platform/admin-platform.module.ts
+++ b/apps/client/src/app/components/admin-platform/admin-platform.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
diff --git a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.module.ts b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.module.ts
index ac97e57cf1..d8b2bd1280 100644
--- a/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.module.ts
+++ b/apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
diff --git a/apps/client/src/app/components/admin-settings/admin-settings.module.ts b/apps/client/src/app/components/admin-settings/admin-settings.module.ts
index 706f20a87b..eee33461b0 100644
--- a/apps/client/src/app/components/admin-settings/admin-settings.module.ts
+++ b/apps/client/src/app/components/admin-settings/admin-settings.module.ts
@@ -1,6 +1,6 @@
import { GfAdminPlatformModule } from '@ghostfolio/client/components/admin-platform/admin-platform.module';
import { GfAdminTagModule } from '@ghostfolio/client/components/admin-tag/admin-tag.module';
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';
import { CommonModule } from '@angular/common';
diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.module.ts b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.module.ts
index 249715d612..ea2537854f 100644
--- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.module.ts
+++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector';
import { CommonModule } from '@angular/common';
diff --git a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.module.ts b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.module.ts
index b83ccbb9d8..ac9ecf20e4 100644
--- a/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.module.ts
+++ b/apps/client/src/app/pages/accounts/transfer-balance/transfer-balance-dialog.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.module.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.module.ts
index 8fb2c1bed9..0bdbfdf5cb 100644
--- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.module.ts
+++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.module.ts
@@ -1,4 +1,4 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfSymbolAutocompleteComponent } from '@ghostfolio/ui/symbol-autocomplete';
import { GfTagsSelectorComponent } from '@ghostfolio/ui/tags-selector';
import { GfValueComponent } from '@ghostfolio/ui/value';
diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts
index 8e5a44a508..0ed67ac3ec 100644
--- a/libs/ui/src/lib/activities-table/activities-table.component.ts
+++ b/libs/ui/src/lib/activities-table/activities-table.component.ts
@@ -1,5 +1,4 @@
import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface';
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
import { ConfirmationDialogType } from '@ghostfolio/client/core/notification/confirmation-dialog/confirmation-dialog.type';
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service';
import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module';
@@ -8,6 +7,7 @@ import { getDateFormatString, getLocale } from '@ghostfolio/common/helper';
import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces';
import { OrderWithAccount } from '@ghostfolio/common/types';
import { GfActivityTypeComponent } from '@ghostfolio/ui/activity-type';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfNoTransactionsInfoComponent } from '@ghostfolio/ui/no-transactions-info';
import { GfValueComponent } from '@ghostfolio/ui/value';
diff --git a/apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.html b/libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.html
similarity index 100%
rename from apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.html
rename to libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.html
diff --git a/apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.scss b/libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.scss
similarity index 100%
rename from apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.scss
rename to libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.scss
diff --git a/apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.ts b/libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.ts
similarity index 100%
rename from apps/client/src/app/components/asset-profile-icon/asset-profile-icon.component.ts
rename to libs/ui/src/lib/asset-profile-icon/asset-profile-icon.component.ts
diff --git a/libs/ui/src/lib/asset-profile-icon/index.ts b/libs/ui/src/lib/asset-profile-icon/index.ts
new file mode 100644
index 0000000000..9f0cfb3e86
--- /dev/null
+++ b/libs/ui/src/lib/asset-profile-icon/index.ts
@@ -0,0 +1 @@
+export * from './asset-profile-icon.component';
diff --git a/libs/ui/src/lib/assistant/assistant.component.ts b/libs/ui/src/lib/assistant/assistant.component.ts
index d8c3dcc2e8..76529dc879 100644
--- a/libs/ui/src/lib/assistant/assistant.component.ts
+++ b/libs/ui/src/lib/assistant/assistant.component.ts
@@ -1,10 +1,10 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module';
import { AdminService } from '@ghostfolio/client/services/admin.service';
import { DataService } from '@ghostfolio/client/services/data.service';
import { getAssetProfileIdentifier } from '@ghostfolio/common/helper';
import { Filter, PortfolioPosition, User } from '@ghostfolio/common/interfaces';
import { DateRange } from '@ghostfolio/common/types';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { translate } from '@ghostfolio/ui/i18n';
import { FocusKeyManager } from '@angular/cdk/a11y';
diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts
index 802cdc69a7..747ff85816 100644
--- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts
+++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts
@@ -1,10 +1,10 @@
-import { GfAssetProfileIconComponent } from '@ghostfolio/client/components/asset-profile-icon/asset-profile-icon.component';
import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module';
import { getLocale } from '@ghostfolio/common/helper';
import {
AssetProfileIdentifier,
PortfolioPosition
} from '@ghostfolio/common/interfaces';
+import { GfAssetProfileIconComponent } from '@ghostfolio/ui/asset-profile-icon';
import { GfValueComponent } from '@ghostfolio/ui/value';
import { CommonModule } from '@angular/common';