diff --git a/CHANGELOG.md b/CHANGELOG.md index fcbe9f77c..894743919 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -575,6 +575,574 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Deprecated `activities` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` +- Moved the data service to `@ghostfolio/ui/services` +- Refactored the dividend import + +## 2.228.0 - 2026-01-03 + +### Added + +- Extended the portfolio holdings to include performance with currency effects for cash positions + +### Changed + +- Integrated the endpoint to get all platforms (`GET api/v1/platforms`) into the create or update account dialog +- Extracted the scraper configuration to a dedicated tab in the asset profile details dialog of the admin control panel +- Improved the language localization for German (`de`) +- Upgraded `@date-fns/utc` from version `2.1.0` to `2.1.1` + +### Fixed + +- Improved the table headers’ alignment of the accounts table on mobile + +## 2.227.0 - 2026-01-02 + +### Changed + +- Initialized the input properties in the _FIRE_ calculator +- Removed the deprecated public _Stripe_ key +- Upgraded `stripe` from version `18.5.0` to `20.1.0` + +### Fixed + +- Fixed the import of `jsonpath` to support REST APIs (`JSON`) via the scraper configuration + +## 2.226.0 - 2026-01-01 + +### Added + +- Extended the content of the _Self-Hosting_ section by information about additional data providers on the Frequently Asked Questions (FAQ) page + +### Changed + +- Upgraded `class-validator` from version `0.14.2` to `0.14.3` +- Upgraded `yahoo-finance2` from version `3.10.2` to `3.11.2` + +## 2.225.0 - 2025-12-31 + +### Added + +- Added a new endpoint to get all platforms (`GET api/v1/platforms`) +- Added the session url to the endpoint response of the _Stripe_ checkout + +### Changed + +- Improved the routing of the user detail dialog in the users section of the admin control panel +- Lifted the asset profile identifier editing restriction for `MANUAL` data sources in the asset profile details dialog of the admin control panel +- Deprecated the public _Stripe_ key +- Improved the language localization for German (`de`) +- Eliminated `ngx-stripe` +- Upgraded `angular` from version `20.2.4` to `21.0.6` +- Upgraded `marked` from version `15.0.4` to `17.0.1` +- Upgraded `ngx-device-detector` from version `10.1.0` to `11.0.0` +- Upgraded `ng-extract-i18n-merge` from `3.1.0` to `3.2.1` +- Upgraded `ngx-markdown` from version `20.0.0` to `21.0.1` +- Upgraded `Nx` from version `21.5.1` to `22.3.3` +- Upgraded `shx` from version `0.3.4` to `0.4.0` +- Upgraded `storybook` from version `9.1.5` to `10.1.10` +- Upgraded `zone.js` from version `0.15.1` to `0.16.0` + +### Fixed + +- Added the missing currency suffix to the cash balance field in the create or update account dialog +- Fixed the time in market display of the portfolio summary tab on the home page for the impersonation mode +- Fixed the delete button in the asset profile details dialog of the admin control panel by providing the missing `watchedByCount` parameter + +## 2.224.2 - 2025-12-20 + +### Added + +- Included the calendar year boundaries in the portfolio calculations +- Added the ISIN number to the asset profile details dialog of the admin control panel + +### Changed + +- Restored the support for specific calendar year date ranges (`2024`, `2023`, `2022`, etc.) in the assistant (experimental) +- Removed the deprecated _Angular CLI_ decorator (`decorate-angular-cli.js`) +- Refreshed the cryptocurrencies list + +### Fixed + +- Localized date formatting across the _FIRE_ section + +## 2.223.0 - 2025-12-14 + +### Added + +- Included wealth projection data calculated for the retirement date in the _FIRE_ section (experimental) + +### Changed + +- Moved the notification module to `@ghostfolio/ui` +- Improved the language localization for German (`de`) + +### Fixed + +- Fixed a calculation issue that resulted in the incorrect assignment of unknown data in the portfolio proportion chart component + +## 2.222.0 - 2025-12-07 + +### Added + +- Introduced data source transformation support in the import functionality for self-hosted environments +- Added _OpenID Connect_ (`OIDC`) as a new login provider for self-hosted environments (experimental) +- Added an optional 3D hover effect to the membership card component + +### Changed + +- Increased the numerical precision for cryptocurrency quantities in the holding detail dialog +- Upgraded `envalid` from version `8.1.0` to `8.1.1` +- Upgraded `prettier` from version `3.7.3` to `3.7.4` + +## 2.221.0 - 2025-12-01 + +### Changed + +- Refactored the API query parameters in various data provider services +- Extended the _Storybook_ stories of the portfolio proportion chart component by a story using percentage values +- Upgraded `@internationalized/number` from version `3.6.3` to `3.6.5` +- Upgraded `prettier` from version `3.7.2` to `3.7.3` + +### Fixed + +- Improved the country weightings in the _Financial Modeling Prep_ service +- Improved the search functionality by name in the _Financial Modeling Prep_ service +- Resolved an issue in the user endpoint where the list was returning empty in the admin control panel’s users section + +## 2.220.0 - 2025-11-29 + +### Changed + +- Restricted the asset profile data gathering on Sundays to only process outdated asset profiles +- Removed the _Cypress_ testing setup +- Eliminated `uuid` in favor of using `randomUUID` from `node:crypto` +- Upgraded `color` from version `5.0.0` to `5.0.3` +- Upgraded `prettier` from version `3.6.2` to `3.7.2` + +### Fixed + +- Fixed an issue with the exchange rate calculation when converting between derived currencies and their root currencies + +## 2.219.0 - 2025-11-23 + +### Added + +- Extended the user detail dialog of the admin control panel’s users section by the authentication method + +### Changed + +- Disabled the action to delete activities if the activities table is empty +- Improved the validation of the currency management in the admin control panel +- Improved the content of the pricing page +- Resolved the data source of the `GHOSTFOLIO` data provider in the export functionality +- Resolved the data source of the `GHOSTFOLIO` data provider in the import functionality +- Refreshed the cryptocurrencies list +- Improved the language localization for German (`de`) +- Upgraded `yahoo-finance2` from version `3.10.1` to `3.10.2` + +### Fixed + +- Fixed an issue with the edit of future activities (drafts) + +## 2.218.0 - 2025-11-20 + +### Added + +- Extended the accounts table menu with a _View Details_ item +- Extended the portfolio summary tab on the home page by percentage values (experimental) +- Added the _OSS Gallery_ logo to the logo carousel on the landing page + +### Changed + +- Improved the dynamic numerical precision for various values in the portfolio summary tab on the home page +- Upgraded `yahoo-finance2` from version `3.10.0` to `3.10.1` + +## 2.217.1 - 2025-11-16 + +### Added + +- Introduced support for automatically gathering required exchange rates, exposed as an environment variable (`ENABLE_FEATURE_GATHER_NEW_EXCHANGE_RATES`) +- Added a blog post: _Black Weeks 2025_ + +### Changed + +- Refactored the get holding functionality in the portfolio service +- Changed the user data loading in the user detail dialog of the admin control panel’s users section to fetch data on demand +- Exposed the authentication with access token as an environment variable (`ENABLE_FEATURE_AUTH_TOKEN`) +- Improved the search functionality of the _Financial Modeling Prep_ service +- Improved the language localization for German (`de`) +- Upgraded `prisma` from version `6.18.0` to `6.19.0` + +### Todo + +- Rename the environment variable from `ENABLE_FEATURE_SOCIAL_LOGIN` to `ENABLE_FEATURE_AUTH_GOOGLE` + +## 2.216.0 - 2025-11-10 + +### Changed + +- Improved the language localization for Chinese (`zh`) +- Upgraded `chart.js` from version `4.5.0` to `4.5.1` +- Upgraded `svgmap` from version `2.12.2` to `2.14.0` + +## 2.215.0 - 2025-11-06 + +### Added + +- Added the endpoint `GET /api/v1/admin/user/:id` + +### Changed + +- Improved the _Self-Hosting_ section content for the _Compare with..._ concept on the Frequently Asked Questions (FAQ) page +- Improved the _Self-Hosting_ section content for the _Markets_ concept on the Frequently Asked Questions (FAQ) page +- Changed the build executor of the client from `@nx/angular:webpack-browser` to `@nx/angular:browser-esbuild` +- Refactored the app component to standalone +- Improved the language localization for German (`de`) +- Upgraded `@ionic/angular` from version `8.7.3` to `8.7.8` + +### Fixed + +- Fixed the style of the safe withdrawal rate selector in the _FIRE_ section (experimental) +- Assigned the `ADMIN` role to the first user signing up via a social login provider if no administrator existed +- Improved the table headers’ alignment in the platform management of the admin control panel +- Improved the table headers’ alignment in the tag management of the admin control panel + +## 2.214.0 - 2025-11-01 + +### Changed + +- Improved the icon of the _View Holding_ menu item in the activities table +- Ensured atomic data replacement during historical market data gathering +- Removed _Internet Identity_ as a social login provider +- Refreshed the cryptocurrencies list +- Upgraded `countries-list` from version `3.1.1` to `3.2.0` +- Upgraded `ng-extract-i18n-merge` from version `3.0.0` to `3.1.0` +- Upgraded `twitter-api-v2` from version `1.23.0` to `1.27.0` + +## 2.213.0 - 2025-10-30 + +### Added + +- Extended the activities table menu with a _View Holding_ item +- Added the error logging to the symbol lookup in the _Trackinsight_ data enhancer + +### Changed + +- Improved the icon of the holdings tab on the home page +- Improved the icon of the holdings tab on the home page for the _Zen Mode_ +- Improved the icon of the holdings tab in the account detail dialog +- Migrated the tags selector component in the holding detail dialog to form control +- Improved the language localization for German (`de`) +- Upgraded `nestjs` from version `11.1.3` to `11.1.8` + +## 2.212.0 - 2025-10-29 + +### Added + +- Added a close holding button to the holding detail dialog +- Added the _Sponsors_ section to the about page +- Extended the user detail dialog in the users section of the admin control panel + +### Changed + +- Refactored the generation of the holdings table in the _Copy AI prompt to clipboard for analysis_ action on the analysis page (experimental) +- Refactored the generation of the holdings table in the _Copy portfolio data to clipboard for AI prompt_ action on the analysis page (experimental) +- Improved the usability of the user detail dialog in the users section of the admin control panel +- Improved the language localization for German (`de`) + +### Fixed + +- Ensured the locale is available in the settings dialog to customize the rule thresholds of the _X-ray_ page + +## 2.211.0 - 2025-10-25 + +### Added + +- Extended the export functionality by the user account’s performance calculation type +- Added the _SelfhostedHub_ logo to the logo carousel on the landing page +- Added a user detail dialog to the users section of the admin control panel + +### Changed + +- Localized the number formatting in the static portfolio analysis rule: _Liquidity_ (Buying Power) +- Moved the _Prisma Configuration File_ from `prisma.config.ts` to `.config/prisma.ts` +- Improved the language localization for German (`de`) +- Upgraded `prisma` from version `6.17.1` to `6.18.0` +- Upgraded `tablemark` from version `3.1.0` to `4.1.0` + +### Fixed + +- Fixed the style in the footer row of the accounts table +- Fixed the rendering of names and symbols for custom assets in the import activities dialog +- Fixed an issue with the market price in base currency during the portfolio snapshot calculation + +## 2.210.1 - 2025-10-22 + +### Added + +- Added support for data gathering by date range in the asset profile details dialog of the admin control panel + +### Changed + +- Extracted the portfolio filter form of the assistant to a reusable component +- Formatted the holdings table in the _Copy AI prompt to clipboard for analysis_ action on the analysis page (experimental) +- Formatted the holdings table in the _Copy portfolio data to clipboard for AI prompt_ action on the analysis page (experimental) +- Reverted the explicit configuration of the _Redis_ address family in the job queue module +- Improved the language localization for German (`de`) +- Upgraded `ioredis` from version `5.6.1` to `5.8.2` + +### Fixed + +- Fixed the enter key press to submit the form of the login with access token dialog +- Fixed an issue in the database seeding process caused by unresolved environment variables in `DATABASE_URL` + +## 2.209.0 - 2025-10-18 + +### Added + +- Extended the glossary of the resources page by _Stealth Wealth_ +- Extended the content of the pricing page +- Added a _Storybook_ story for the holdings table component + +### Changed + +- Disabled the zoom functionality in the _Progressive Web App_ (PWA) +- Improved the currency validation in the get asset profiles functionality of the data provider service +- Improved the currency validation in the search functionality of the data provider service +- Optimized the get quotes functionality by utilizing the asset profile resolutions in the _Financial Modeling Prep_ service +- Extracted the footer to a component +- Refactored the blog page component to standalone +- Improved the portfolio calculator unit tests to load the user currency from the exported file +- Improved the language localization for German (`de`) + +### Fixed + +- Fixed an issue in the `csv` file import where custom asset profiles failed due to validation errors +- Fixed an issue with the total buy and sell calculation in the summary related to activities in a custom currency +- Respected the include indices flag in the search functionality of the _Financial Modeling Prep_ service +- Fixed an issue where the scroll position was not restored when changing pages +- Fixed the word wrap in the menus of the activities table component +- Fixed the dark mode in the _As seen in_ section on the landing page + +## 2.208.0 - 2025-10-11 + +### Added + +- Added support for configuring the safe withdrawal rate in the _FIRE_ section (experimental) + +### Changed + +- Changed the _As seen in_ section on the landing page to an animated carousel +- Refactored `transactionCount` to `activitiesCount` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol` +- Refactored various components to use self-closing tags +- Removed the deprecated endpoint `GET api/v1/portfolio/position/:dataSource/:symbol` +- Removed the deprecated endpoint `PUT api/v1/portfolio/position/:dataSource/:symbol/tags` +- Improved the language localization for German (`de`) +- Upgraded `prisma` from version `6.16.1` to `6.17.1` + +### Fixed + +- Fixed the server startup message to properly display IPv6 addresses +- Enabled IPv6 connectivity for _Redis_ in the job queue module by setting the address family +- Fixed an issue where importing custom asset profiles failed due to validation errors + +## 2.207.0 - 2025-10-08 + +### Added + +- Added support to edit a granted access (experimental) +- Introduced tabs to the asset profile details dialog in the admin control panel +- Added support for a date range query parameter in the data gathering endpoint +- Added a _Storybook_ story for the activities table component + +### Changed + +- Improved the spacing around the buttons in the holding detail dialog +- Extended the _Storybook_ stories of the accounts table component by a loading state story +- Refactored the auth page to standalone +- Improved the language localization for German (`de`) + +### Fixed + +- Fixed the word wrap in the menu of the access table component +- Fixed the word wrap in the menu of the activities table component +- Fixed the word wrap in the menu of the asset profile details dialog in the admin control panel + +## 2.206.0 - 2025-10-04 + +### Changed + +- Localized the number formatting in the settings dialog to customize the rule thresholds of the _X-ray_ page +- Improved the usability of the assistant by preselecting the first search result +- Improved the usability of the _Cancel_ / _Close_ buttons in the create watchlist item dialog +- Refactored the `fireWealth` from `number` type to a structured object in the summary of the portfolio details endpoint +- Refactored the _Open Startup_ (`/open`) page to standalone +- Refactored the file drop directive to standalone +- Refactored the symbol pipe to standalone + +### Fixed + +- Handled an exception in the get asset profile functionality of the _Financial Modeling Prep_ service +- Added the missing `CommonModule` import in the import activities dialog + +## 2.205.0 - 2025-10-01 + +### Changed + +- Restricted the selection of the retirement date picker in the _FIRE_ calculator to a future date +- Improved the support for mutual funds in the _Financial Modeling Prep_ service (get asset profiles) +- Improved the language localization for German (`de`) +- Upgraded `prisma` from version `6.16.1` to `6.16.3` + +## 2.204.0 - 2025-09-30 + +### Added + +- Added the safe withdrawal rate to the user settings (experimental) + +### Changed + +- Improved the number formatting of the y-axis labels in the investment chart component +- Localized the number formatting of the y-axis labels in the line chart component +- Improved the wording of the 4% rule in the _FIRE_ section +- Improved the usability of the create asset profile dialog in the market data section of the admin control panel +- Improved the language localization for German (`de`) + +### Fixed + +- Improved the table headers’ alignment of the activities table + +## 2.203.0 - 2025-09-27 + +### Added + +- Added support for column sorting to the queue jobs table in the admin control panel +- Added a blog post: _Hacktoberfest 2025_ + +### Changed + +- Removed the deprecated `ITEM` activity type + +## 2.202.0 - 2025-09-26 + +### Added + +- Added `settings` to the `Access` model + +### Changed + +- Extended the tags selector component to support form control +- Changed the deprecated `ITEM` activity type to `VALUABLE` in the create or update activity dialog + +### Fixed + +- Fixed an issue where the save button was not enabled after editing tags in the create or update activity dialog +- Fixed an issue in the investment calculation when selling all units of a holding + +## 2.201.0 - 2025-09-24 + +### Added + +- Added the symbol to the benchmark component +- Added the latest activities to the public page (experimental) +- Added pagination to the activities table of the activities import dialog +- Added an option to configure the account column of the activities table component + +### Changed + +- Hid the account column from the activities table of the account detail dialog to avoid redundant information +- Renamed the show access token dialog component to user account registration dialog component +- Refreshed the cryptocurrencies list +- Improved the language localization for German (`de`) +- Upgraded `countup.js` from version `2.8.2` to `2.9.0` + +### Fixed + +- Fixed an issue with `unitPriceInAssetProfileCurrency` in the value redaction interceptor for the impersonation mode + +## 2.200.0 - 2025-09-17 + +### Changed + +- Refactored the show access token dialog component to standalone +- Upgraded `prisma` from version `6.15.0` to `6.16.1` + +### Fixed + +- Removed a temporary element from the activities table component + +## 2.199.0 - 2025-09-14 + +### Added + +- Extended the content of the performance calculation method by dividends on the Frequently Asked Questions (FAQ) page +- Added a _Storybook_ story for the entity logo image component + +### Changed + +- Improved the search in the _Yahoo Finance_ service +- Moved the holdings table into the holdings section on the public page +- Migrated to the _Prisma Configuration File_ approach (`prisma.config.ts`) +- Refactored the login with access token dialog component to standalone +- Prefixed the `crypto`, `fs` and `path` imports with `node:` +- Upgraded `yahoo-finance2` from version `3.8.0` to `3.10.0` + +### Fixed + +- Fixed a pagination issue in the market data endpoint by adding `id` as a secondary sort criterion to ensure consistent ordering in the admin control panel +- Fixed a pagination issue in the user endpoint by adding `id` as a secondary sort criterion to ensure consistent ordering in the admin control panel + +## 2.198.0 - 2025-09-11 + +### Changed + +- Extended the variations of the interstitials for the subscription +- Renamed the job identifier column in the jobs queue view of the admin control panel +- Refactored the markets page to standalone +- Refactored the fear and greed index component to standalone +- Refactored the header component to standalone +- Refactored the investment chart component to standalone +- Refactored the rule component to standalone +- Refactored the rules component to standalone +- Refactored the subscription interstitial dialog component to standalone +- Removed the `IonIcon` import from the landing page +- Improved the language localization for German (`de`) +- Upgraded `angular` from version `20.1.3` to `20.2.4` +- Upgraded `eslint` dependencies +- Upgraded `Nx` from version `21.3.9` to `21.5.1` +- Upgraded `storybook` from version `9.0.17` to `9.1.5` + +### Fixed + +- Fixed the holdings table on the public page + +## 2.197.0 - 2025-09-07 + +### Added + +- Enabled automatic data gathering for custom currencies added via the currency management in the admin control panel +- Added a _Storybook_ story for the world map chart component + +### Changed + +- Restructured the response of the portfolio report endpoint (_X-ray_) +- Modernized the templates with untagged template literals +- Moved the world map chart component to `@ghostfolio/ui` +- Refactored the create or update access dialog component to standalone +- Improved the language localization for German (`de`) +- Upgraded `envalid` from version `8.0.0` to `8.1.0` +- Upgraded `prisma` from version `6.14.0` to `6.15.0` + +### Fixed + +- Improved the handling of `0` buying power in the static portfolio analysis rule: _Liquidity_ (Buying Power) +- Fixed an issue related to the error handling in the data provider status component + +## 2.196.0 - 2025-09-04 + +### Changed + - Localized the content of the about page - Refactored the public page to standalone - Refactored the dialog footer component diff --git a/apps/api/src/app/import/import.controller.ts b/apps/api/src/app/import/import.controller.ts index 2681444df..81481fd65 100644 --- a/apps/api/src/app/import/import.controller.ts +++ b/apps/api/src/app/import/import.controller.ts @@ -103,6 +103,7 @@ export class ImportController { const activities = await this.importService.getDividends({ dataSource, symbol, + userCurrency: this.request.user.settings.settings.baseCurrency, userId: this.request.user.id }); diff --git a/apps/api/src/app/import/import.module.ts b/apps/api/src/app/import/import.module.ts index 88990af2e..a4a13f941 100644 --- a/apps/api/src/app/import/import.module.ts +++ b/apps/api/src/app/import/import.module.ts @@ -6,6 +6,7 @@ import { PortfolioModule } from '@ghostfolio/api/app/portfolio/portfolio.module' import { RedisCacheModule } from '@ghostfolio/api/app/redis-cache/redis-cache.module'; import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module'; import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module'; +import { ApiModule } from '@ghostfolio/api/services/api/api.module'; import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; import { ExchangeRateDataModule } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.module'; @@ -24,6 +25,7 @@ import { ImportService } from './import.service'; controllers: [ImportController], imports: [ AccountModule, + ApiModule, CacheModule, ConfigurationModule, DataGatheringModule, diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 2deef1c44..3f8bd2cde 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -2,6 +2,7 @@ import { AccountService } from '@ghostfolio/api/app/account/account.service'; import { OrderService } from '@ghostfolio/api/app/order/order.service'; import { PlatformService } from '@ghostfolio/api/app/platform/platform.service'; import { PortfolioService } from '@ghostfolio/api/app/portfolio/portfolio.service'; +import { ApiService } from '@ghostfolio/api/services/api/api.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service'; @@ -25,7 +26,7 @@ import { } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { - AccountWithPlatform, + AccountWithValue, OrderWithAccount, UserWithSettings } from '@ghostfolio/common/types'; @@ -43,6 +44,7 @@ import { ImportDataDto } from './import-data.dto'; export class ImportService { public constructor( private readonly accountService: AccountService, + private readonly apiService: ApiService, private readonly configurationService: ConfigurationService, private readonly dataGatheringService: DataGatheringService, private readonly dataProviderService: DataProviderService, @@ -57,8 +59,12 @@ export class ImportService { public async getDividends({ dataSource, symbol, + userCurrency, userId - }: AssetProfileIdentifier & { userId: string }): Promise { + }: AssetProfileIdentifier & { + userCurrency: string; + userId: string; + }): Promise { try { const holding = await this.portfolioService.getHolding({ dataSource, @@ -71,36 +77,45 @@ export class ImportService { return []; } - const { activities, firstBuyDate, historicalData } = holding; + const filters = this.apiService.buildFiltersFromQueryParams({ + filterByDataSource: dataSource, + filterBySymbol: symbol + }); - const [[assetProfile], dividends] = await Promise.all([ - this.symbolProfileService.getSymbolProfiles([ - { - dataSource, - symbol - } - ]), - await this.dataProviderService.getDividends({ - dataSource, - symbol, - from: parseDate(firstBuyDate), - granularity: 'day', - to: new Date() - }) - ]); + const { firstBuyDate, historicalData } = holding; - const accounts = activities - .filter(({ account }) => { - return !!account; - }) - .map(({ account }) => { - return account; - }); + const [{ accounts }, { activities }, [assetProfile], dividends] = + await Promise.all([ + this.portfolioService.getAccountsWithAggregations({ + filters, + userId, + withExcludedAccounts: true + }), + this.orderService.getOrders({ + filters, + userCurrency, + userId, + startDate: parseDate(firstBuyDate) + }), + this.symbolProfileService.getSymbolProfiles([ + { + dataSource, + symbol + } + ]), + await this.dataProviderService.getDividends({ + dataSource, + symbol, + from: parseDate(firstBuyDate), + granularity: 'day', + to: new Date() + }) + ]); const account = this.isUniqueAccount(accounts) ? accounts[0] : undefined; return await Promise.all( - Object.entries(dividends).map(async ([dateString, { marketPrice }]) => { + Object.entries(dividends).map(([dateString, { marketPrice }]) => { const quantity = historicalData.find((historicalDataItem) => { return historicalDataItem.date === dateString; @@ -695,11 +710,11 @@ export class ImportService { ); } - private isUniqueAccount(accounts: AccountWithPlatform[]) { + private isUniqueAccount(accounts: AccountWithValue[]) { const uniqueAccountIds = new Set(); - for (const account of accounts) { - uniqueAccountIds.add(account.id); + for (const { id } of accounts) { + uniqueAccountIds.add(id); } return uniqueAccountIds.size === 1; diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 27c483cce..3410bc274 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -4,6 +4,7 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { internalRoutes, publicRoutes } from '@ghostfolio/common/routes/routes'; import { ColorScheme } from '@ghostfolio/common/types'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, @@ -36,7 +37,6 @@ import { GfFooterComponent } from './components/footer/footer.component'; import { GfHeaderComponent } from './components/header/header.component'; import { GfHoldingDetailDialogComponent } from './components/holding-detail-dialog/holding-detail-dialog.component'; import { HoldingDetailDialogParams } from './components/holding-detail-dialog/interfaces/interfaces'; -import { DataService } from './services/data.service'; import { ImpersonationStorageService } from './services/impersonation-storage.service'; import { TokenStorageService } from './services/token-storage.service'; import { UserService } from './services/user/user.service'; diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts index d8f08ecc2..b40043cc8 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts @@ -1,5 +1,4 @@ import { GfInvestmentChartComponent } from '@ghostfolio/client/components/investment-chart/investment-chart.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { NUMERICAL_PRECISION_THRESHOLD_6_FIGURES } from '@ghostfolio/common/config'; import { CreateAccountBalanceDto } from '@ghostfolio/common/dtos'; @@ -19,6 +18,7 @@ import { GfActivitiesTableComponent } from '@ghostfolio/ui/activities-table'; import { GfDialogFooterComponent } from '@ghostfolio/ui/dialog-footer'; import { GfDialogHeaderComponent } from '@ghostfolio/ui/dialog-header'; import { GfHoldingsTableComponent } from '@ghostfolio/ui/holdings-table'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index 4f1b60981..ebe35da3c 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -1,5 +1,4 @@ import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { DEFAULT_PAGE_SIZE, @@ -18,6 +17,7 @@ import { GfSymbolPipe } from '@ghostfolio/common/pipes'; import { GfActivitiesFilterComponent } from '@ghostfolio/ui/activities-filter'; import { translate } from '@ghostfolio/ui/i18n'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { SelectionModel } from '@angular/cdk/collections'; diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index 07e060764..67dadc7b5 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -1,6 +1,5 @@ import { AdminMarketDataService } from '@ghostfolio/client/components/admin-market-data/admin-market-data.service'; import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { ASSET_CLASS_MAPPING, @@ -25,6 +24,7 @@ import { translate } from '@ghostfolio/ui/i18n'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart'; +import { DataService } from '@ghostfolio/ui/services'; import { GfSymbolAutocompleteComponent } from '@ghostfolio/ui/symbol-autocomplete'; import { GfValueComponent } from '@ghostfolio/ui/value'; diff --git a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts index 32e1e3309..1087c11a1 100644 --- a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts @@ -1,10 +1,10 @@ import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { DEFAULT_CURRENCY, ghostfolioPrefix, PROPERTY_CURRENCIES } from '@ghostfolio/common/config'; +import { DataService } from '@ghostfolio/ui/services'; import { GfSymbolAutocompleteComponent } from '@ghostfolio/ui/symbol-autocomplete'; import { diff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.ts index e4be7b062..101e60ec0 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts @@ -1,6 +1,5 @@ import { AdminService } from '@ghostfolio/client/services/admin.service'; import { CacheService } from '@ghostfolio/client/services/cache.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { PROPERTY_COUPONS, @@ -20,6 +19,7 @@ import { } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; diff --git a/apps/client/src/app/components/admin-platform/admin-platform.component.ts b/apps/client/src/app/components/admin-platform/admin-platform.component.ts index 832a70503..2843f059a 100644 --- a/apps/client/src/app/components/admin-platform/admin-platform.component.ts +++ b/apps/client/src/app/components/admin-platform/admin-platform.component.ts @@ -1,10 +1,10 @@ import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { CreatePlatformDto, UpdatePlatformDto } from '@ghostfolio/common/dtos'; import { ConfirmationDialogType } from '@ghostfolio/common/enums'; import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/components/admin-settings/admin-settings.component.ts b/apps/client/src/app/components/admin-settings/admin-settings.component.ts index cabf4e589..a4da22402 100644 --- a/apps/client/src/app/components/admin-settings/admin-settings.component.ts +++ b/apps/client/src/app/components/admin-settings/admin-settings.component.ts @@ -2,7 +2,6 @@ import { GfAdminPlatformComponent } from '@ghostfolio/client/components/admin-pl import { GfAdminTagComponent } from '@ghostfolio/client/components/admin-tag/admin-tag.component'; import { GfDataProviderStatusComponent } from '@ghostfolio/client/components/data-provider-status/data-provider-status.component'; import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { PROPERTY_API_KEY_GHOSTFOLIO } from '@ghostfolio/common/config'; import { ConfirmationDialogType } from '@ghostfolio/common/enums'; @@ -16,6 +15,7 @@ import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; diff --git a/apps/client/src/app/components/admin-tag/admin-tag.component.ts b/apps/client/src/app/components/admin-tag/admin-tag.component.ts index 305eb4628..ca7950291 100644 --- a/apps/client/src/app/components/admin-tag/admin-tag.component.ts +++ b/apps/client/src/app/components/admin-tag/admin-tag.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { CreateTagDto, UpdateTagDto } from '@ghostfolio/common/dtos'; import { ConfirmationDialogType } from '@ghostfolio/common/enums'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/components/admin-users/admin-users.component.ts b/apps/client/src/app/components/admin-users/admin-users.component.ts index 1722b498f..affd4d61c 100644 --- a/apps/client/src/app/components/admin-users/admin-users.component.ts +++ b/apps/client/src/app/components/admin-users/admin-users.component.ts @@ -1,7 +1,6 @@ import { UserDetailDialogParams } from '@ghostfolio/client/components/user-detail-dialog/interfaces/interfaces'; import { GfUserDetailDialogComponent } from '@ghostfolio/client/components/user-detail-dialog/user-detail-dialog.component'; import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; @@ -21,6 +20,7 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { internalRoutes } from '@ghostfolio/common/routes/routes'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; diff --git a/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts b/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts index 0f638961c..e44e81be9 100644 --- a/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts +++ b/apps/client/src/app/components/data-provider-status/data-provider-status.component.ts @@ -1,4 +1,4 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index b7bf4cb98..9b003a590 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -1,7 +1,6 @@ import { LoginWithAccessTokenDialogParams } from '@ghostfolio/client/components/login-with-access-token-dialog/interfaces/interfaces'; import { GfLoginWithAccessTokenDialogComponent } from '@ghostfolio/client/components/login-with-access-token-dialog/login-with-access-token-dialog.component'; import { LayoutService } from '@ghostfolio/client/core/layout.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { KEY_STAY_SIGNED_IN, @@ -18,6 +17,7 @@ import { GfAssistantComponent } from '@ghostfolio/ui/assistant/assistant.compone import { GfLogoComponent } from '@ghostfolio/ui/logo'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { 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.ts index 6a7129fec..95c58d35a 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,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { NUMERICAL_PRECISION_THRESHOLD_3_FIGURES, @@ -26,6 +25,7 @@ import { GfHistoricalMarketDataEditorComponent } from '@ghostfolio/ui/historical import { translate } from '@ghostfolio/ui/i18n'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart'; +import { DataService } from '@ghostfolio/ui/services'; import { GfTagsSelectorComponent } from '@ghostfolio/ui/tags-selector'; import { GfValueComponent } from '@ghostfolio/ui/value'; diff --git a/apps/client/src/app/components/home-holdings/home-holdings.component.ts b/apps/client/src/app/components/home-holdings/home-holdings.component.ts index 33d9139ea..dc444977d 100644 --- a/apps/client/src/app/components/home-holdings/home-holdings.component.ts +++ b/apps/client/src/app/components/home-holdings/home-holdings.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -11,6 +10,7 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { internalRoutes } from '@ghostfolio/common/routes/routes'; import { HoldingType, HoldingsViewMode } from '@ghostfolio/common/types'; import { GfHoldingsTableComponent } from '@ghostfolio/ui/holdings-table'; +import { DataService } from '@ghostfolio/ui/services'; import { GfToggleComponent } from '@ghostfolio/ui/toggle'; import { GfTreemapChartComponent } from '@ghostfolio/ui/treemap-chart'; diff --git a/apps/client/src/app/components/home-market/home-market.component.ts b/apps/client/src/app/components/home-market/home-market.component.ts index 32d89f8e0..841c0818a 100644 --- a/apps/client/src/app/components/home-market/home-market.component.ts +++ b/apps/client/src/app/components/home-market/home-market.component.ts @@ -1,5 +1,4 @@ import { GfFearAndGreedIndexComponent } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { ghostfolioFearAndGreedIndexSymbol } from '@ghostfolio/common/config'; import { resetHours } from '@ghostfolio/common/helper'; @@ -12,6 +11,7 @@ import { import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts index 6c9694a19..0d5020904 100644 --- a/apps/client/src/app/components/home-overview/home-overview.component.ts +++ b/apps/client/src/app/components/home-overview/home-overview.component.ts @@ -1,6 +1,5 @@ import { GfPortfolioPerformanceComponent } from '@ghostfolio/client/components/portfolio-performance/portfolio-performance.component'; import { LayoutService } from '@ghostfolio/client/core/layout.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { NUMERICAL_PRECISION_THRESHOLD_6_FIGURES } from '@ghostfolio/common/config'; @@ -13,6 +12,7 @@ import { import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { internalRoutes } from '@ghostfolio/common/routes/routes'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/components/home-summary/home-summary.component.ts b/apps/client/src/app/components/home-summary/home-summary.component.ts index 845d1b448..454d05689 100644 --- a/apps/client/src/app/components/home-summary/home-summary.component.ts +++ b/apps/client/src/app/components/home-summary/home-summary.component.ts @@ -1,5 +1,4 @@ import { GfPortfolioSummaryComponent } from '@ghostfolio/client/components/portfolio-summary/portfolio-summary.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -8,6 +7,7 @@ import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, diff --git a/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts b/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts index ab43e54dd..4adb4e54f 100644 --- a/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts +++ b/apps/client/src/app/components/home-watchlist/home-watchlist.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -9,6 +8,7 @@ import { import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/components/markets/markets.component.ts b/apps/client/src/app/components/markets/markets.component.ts index a7f83216f..4b83e897f 100644 --- a/apps/client/src/app/components/markets/markets.component.ts +++ b/apps/client/src/app/components/markets/markets.component.ts @@ -1,5 +1,4 @@ import { GfFearAndGreedIndexComponent } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { resetHours } from '@ghostfolio/common/helper'; import { @@ -12,6 +11,7 @@ import { import { FearAndGreedIndexMode } from '@ghostfolio/common/types'; import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; +import { DataService } from '@ghostfolio/ui/services'; import { GfToggleComponent } from '@ghostfolio/ui/toggle'; import { diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts index 05c047dc6..5c87b2f63 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts @@ -1,7 +1,7 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { CreateAccessDto, UpdateAccessDto } from '@ghostfolio/common/dtos'; import { validateObjectForForm } from '@ghostfolio/common/utils'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/components/user-account-access/user-account-access.component.ts b/apps/client/src/app/components/user-account-access/user-account-access.component.ts index 11960b8aa..ef78cccff 100644 --- a/apps/client/src/app/components/user-account-access/user-account-access.component.ts +++ b/apps/client/src/app/components/user-account-access/user-account-access.component.ts @@ -1,5 +1,4 @@ import { GfAccessTableComponent } from '@ghostfolio/client/components/access-table/access-table.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { CreateAccessDto } from '@ghostfolio/common/dtos'; @@ -8,6 +7,7 @@ import { Access, User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/components/user-account-membership/user-account-membership.component.ts b/apps/client/src/app/components/user-account-membership/user-account-membership.component.ts index 8eec9c188..92fd0d590 100644 --- a/apps/client/src/app/components/user-account-membership/user-account-membership.component.ts +++ b/apps/client/src/app/components/user-account-membership/user-account-membership.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { ConfirmationDialogType } from '@ghostfolio/common/enums'; import { getDateFormatString } from '@ghostfolio/common/helper'; @@ -8,6 +7,7 @@ import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { GfMembershipCardComponent } from '@ghostfolio/ui/membership-card'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts index e0028bb5c..c72c2a52d 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { KEY_STAY_SIGNED_IN, KEY_TOKEN, @@ -13,6 +12,7 @@ import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { internalRoutes } from '@ghostfolio/common/routes/routes'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/apps/client/src/app/core/auth.guard.ts b/apps/client/src/app/core/auth.guard.ts index c26419031..123a6169a 100644 --- a/apps/client/src/app/core/auth.guard.ts +++ b/apps/client/src/app/core/auth.guard.ts @@ -1,7 +1,7 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { SettingsStorageService } from '@ghostfolio/client/services/settings-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { internalRoutes, publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { Injectable } from '@angular/core'; import { diff --git a/apps/client/src/app/core/http-response.interceptor.ts b/apps/client/src/app/core/http-response.interceptor.ts index c2eef4175..ab99b440f 100644 --- a/apps/client/src/app/core/http-response.interceptor.ts +++ b/apps/client/src/app/core/http-response.interceptor.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service'; import { InfoItem } from '@ghostfolio/common/interfaces'; import { internalRoutes, publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { HTTP_INTERCEPTORS, diff --git a/apps/client/src/app/pages/about/about-page.component.ts b/apps/client/src/app/pages/about/about-page.component.ts index 4fe6a57e3..5ddb6b2e0 100644 --- a/apps/client/src/app/pages/about/about-page.component.ts +++ b/apps/client/src/app/pages/about/about-page.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { TabConfiguration, User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts index d315f2cbd..bea19a1b9 100644 --- a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts +++ b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/pages/accounts/accounts-page.component.ts b/apps/client/src/app/pages/accounts/accounts-page.component.ts index 2b496e4fb..6c8146f77 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.component.ts +++ b/apps/client/src/app/pages/accounts/accounts-page.component.ts @@ -1,6 +1,5 @@ import { GfAccountDetailDialogComponent } from '@ghostfolio/client/components/account-detail-dialog/account-detail-dialog.component'; import { AccountDetailDialogParams } from '@ghostfolio/client/components/account-detail-dialog/interfaces/interfaces'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -12,6 +11,7 @@ import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfAccountsTableComponent } from '@ghostfolio/ui/accounts-table'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts index ceb11a011..f4c68e70f 100644 --- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts +++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { CreateAccountDto, UpdateAccountDto } from '@ghostfolio/common/dtos'; import { validateObjectForForm } from '@ghostfolio/common/utils'; import { GfCurrencySelectorComponent } from '@ghostfolio/ui/currency-selector'; import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule, NgClass } from '@angular/common'; import { diff --git a/apps/client/src/app/pages/blog/blog-page.component.ts b/apps/client/src/app/pages/blog/blog-page.component.ts index 9977e6df4..8a379a7e4 100644 --- a/apps/client/src/app/pages/blog/blog-page.component.ts +++ b/apps/client/src/app/pages/blog/blog-page.component.ts @@ -1,5 +1,5 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; +import { DataService } from '@ghostfolio/ui/services'; import { Component, CUSTOM_ELEMENTS_SCHEMA, OnDestroy } from '@angular/core'; import { MatCardModule } from '@angular/material/card'; diff --git a/apps/client/src/app/pages/demo/demo-page.component.ts b/apps/client/src/app/pages/demo/demo-page.component.ts index 9eba64788..5b94fd541 100644 --- a/apps/client/src/app/pages/demo/demo-page.component.ts +++ b/apps/client/src/app/pages/demo/demo-page.component.ts @@ -1,7 +1,7 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { InfoItem } from '@ghostfolio/common/interfaces'; import { NotificationService } from '@ghostfolio/ui/notifications'; +import { DataService } from '@ghostfolio/ui/services'; import { Component, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; diff --git a/apps/client/src/app/pages/faq/faq-page.component.ts b/apps/client/src/app/pages/faq/faq-page.component.ts index cba9e19f1..caf4217ca 100644 --- a/apps/client/src/app/pages/faq/faq-page.component.ts +++ b/apps/client/src/app/pages/faq/faq-page.component.ts @@ -1,7 +1,7 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { TabConfiguration } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { CUSTOM_ELEMENTS_SCHEMA, diff --git a/apps/client/src/app/pages/features/features-page.component.ts b/apps/client/src/app/pages/features/features-page.component.ts index dc2dfaf42..b9eb91fe2 100644 --- a/apps/client/src/app/pages/features/features-page.component.ts +++ b/apps/client/src/app/pages/features/features-page.component.ts @@ -1,9 +1,9 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { InfoItem, User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, Component, OnDestroy } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; diff --git a/apps/client/src/app/pages/landing/landing-page.component.ts b/apps/client/src/app/pages/landing/landing-page.component.ts index 55f07a798..25fb2d6e7 100644 --- a/apps/client/src/app/pages/landing/landing-page.component.ts +++ b/apps/client/src/app/pages/landing/landing-page.component.ts @@ -1,10 +1,10 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { Statistics } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { GfCarouselComponent } from '@ghostfolio/ui/carousel'; import { GfLogoComponent } from '@ghostfolio/ui/logo'; import { GfLogoCarouselComponent } from '@ghostfolio/ui/logo-carousel'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { GfWorldMapChartComponent } from '@ghostfolio/ui/world-map-chart'; diff --git a/apps/client/src/app/pages/open/open-page.component.ts b/apps/client/src/app/pages/open/open-page.component.ts index 773025769..6284c41f4 100644 --- a/apps/client/src/app/pages/open/open-page.component.ts +++ b/apps/client/src/app/pages/open/open-page.component.ts @@ -1,6 +1,6 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { Statistics, User } from '@ghostfolio/common/interfaces'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { diff --git a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts index 5b5273b65..cf7a41215 100644 --- a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { IcsService } from '@ghostfolio/client/services/ics/ics.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; @@ -12,6 +11,7 @@ import { } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfActivitiesTableComponent } from '@ghostfolio/ui/activities-table'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts index b44e8ee6b..8695f04ed 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts @@ -10,6 +10,7 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { validateObjectForForm } from '@ghostfolio/common/utils'; import { GfEntityLogoComponent } from '@ghostfolio/ui/entity-logo'; import { translate } from '@ghostfolio/ui/i18n'; +import { DataService } from '@ghostfolio/ui/services'; import { GfSymbolAutocompleteComponent } from '@ghostfolio/ui/symbol-autocomplete'; import { GfTagsSelectorComponent } from '@ghostfolio/ui/tags-selector'; import { GfValueComponent } from '@ghostfolio/ui/value'; @@ -48,7 +49,6 @@ import { calendarClearOutline, refreshOutline } from 'ionicons/icons'; import { EMPTY, Subject } from 'rxjs'; import { catchError, delay, takeUntil } from 'rxjs/operators'; -import { DataService } from '../../../../services/data.service'; import { CreateOrUpdateActivityDialogParams } from './interfaces/interfaces'; import { ActivityType } from './types/activity-type.type'; 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.ts index 582ab8e25..1a84e9f31 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 @@ -1,5 +1,4 @@ import { GfFileDropDirective } from '@ghostfolio/client/directives/file-drop/file-drop.directive'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImportActivitiesService } from '@ghostfolio/client/services/import-activities.service'; import { CreateAccountWithBalancesDto, @@ -11,6 +10,7 @@ import { GfSymbolPipe } from '@ghostfolio/common/pipes'; import { GfActivitiesTableComponent } from '@ghostfolio/ui/activities-table'; import { GfDialogFooterComponent } from '@ghostfolio/ui/dialog-footer'; import { GfDialogHeaderComponent } from '@ghostfolio/ui/dialog-header'; +import { DataService } from '@ghostfolio/ui/services'; import { StepperOrientation, diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index b4de51701..70fa09eb1 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -1,6 +1,5 @@ import { GfAccountDetailDialogComponent } from '@ghostfolio/client/components/account-detail-dialog/account-detail-dialog.component'; import { AccountDetailDialogParams } from '@ghostfolio/client/components/account-detail-dialog/interfaces/interfaces'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { MAX_TOP_HOLDINGS, UNKNOWN_KEY } from '@ghostfolio/common/config'; @@ -17,6 +16,7 @@ import { Market, MarketAdvanced } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfTopHoldingsComponent } from '@ghostfolio/ui/top-holdings'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { GfWorldMapChartComponent } from '@ghostfolio/ui/world-map-chart'; diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 63ed3569c..ec872c770 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -1,6 +1,5 @@ import { GfBenchmarkComparatorComponent } from '@ghostfolio/client/components/benchmark-comparator/benchmark-comparator.component'; import { GfInvestmentChartComponent } from '@ghostfolio/client/components/investment-chart/investment-chart.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -16,6 +15,7 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import type { AiPromptMode, GroupBy } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfToggleComponent } from '@ghostfolio/ui/toggle'; import { GfValueComponent } from '@ghostfolio/ui/value'; diff --git a/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts b/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts index da1378d22..27db6c76e 100644 --- a/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts +++ b/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { @@ -9,6 +8,7 @@ import { import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfFireCalculatorComponent } from '@ghostfolio/ui/fire-calculator'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule, NgStyle } from '@angular/common'; diff --git a/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts b/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts index 0bf869238..70b748b10 100644 --- a/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts +++ b/apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts @@ -1,5 +1,4 @@ import { GfRulesComponent } from '@ghostfolio/client/components/rules/rules.component'; -import { DataService } from '@ghostfolio/client/services/data.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { UpdateUserSettingDto } from '@ghostfolio/common/dtos'; @@ -10,6 +9,7 @@ import { import { User } from '@ghostfolio/common/interfaces/user.interface'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { NgClass } from '@angular/common'; import { ChangeDetectorRef, Component } from '@angular/core'; diff --git a/apps/client/src/app/pages/pricing/pricing-page.component.ts b/apps/client/src/app/pages/pricing/pricing-page.component.ts index aaf0c597b..f818e6b11 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.component.ts +++ b/apps/client/src/app/pages/pricing/pricing-page.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; @@ -6,6 +5,7 @@ import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { translate } from '@ghostfolio/ui/i18n'; import { NotificationService } from '@ghostfolio/ui/notifications'; import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/pages/public/public-page.component.ts b/apps/client/src/app/pages/public/public-page.component.ts index 55e2a122a..fe4b295db 100644 --- a/apps/client/src/app/pages/public/public-page.component.ts +++ b/apps/client/src/app/pages/public/public-page.component.ts @@ -1,4 +1,3 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UNKNOWN_KEY } from '@ghostfolio/common/config'; import { prettifySymbol } from '@ghostfolio/common/helper'; import { @@ -11,6 +10,7 @@ import { Market } from '@ghostfolio/common/types'; import { GfActivitiesTableComponent } from '@ghostfolio/ui/activities-table/activities-table.component'; import { GfHoldingsTableComponent } from '@ghostfolio/ui/holdings-table/holdings-table.component'; import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart/portfolio-proportion-chart.component'; +import { DataService } from '@ghostfolio/ui/services'; import { GfValueComponent } from '@ghostfolio/ui/value'; import { GfWorldMapChartComponent } from '@ghostfolio/ui/world-map-chart'; diff --git a/apps/client/src/app/pages/register/register-page.component.ts b/apps/client/src/app/pages/register/register-page.component.ts index d37a91f8e..21b26944e 100644 --- a/apps/client/src/app/pages/register/register-page.component.ts +++ b/apps/client/src/app/pages/register/register-page.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { InfoItem, LineChartItem } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { GfLogoComponent } from '@ghostfolio/ui/logo'; +import { DataService } from '@ghostfolio/ui/services'; import { Component, diff --git a/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts b/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts index 36e1ce710..a7707ad3b 100644 --- a/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts +++ b/apps/client/src/app/pages/register/user-account-registration-dialog/user-account-registration-dialog.component.ts @@ -1,5 +1,5 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { ClipboardModule } from '@angular/cdk/clipboard'; import { TextFieldModule } from '@angular/cdk/text-field'; diff --git a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts index 96958dd70..112619239 100644 --- a/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts +++ b/apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts @@ -1,7 +1,7 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { InfoItem } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; +import { DataService } from '@ghostfolio/ui/services'; import { Component, OnInit } from '@angular/core'; import { RouterModule } from '@angular/router'; diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts index 511cf672d..c8eff35be 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts +++ b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -1,8 +1,8 @@ -import { DataService } from '@ghostfolio/client/services/data.service'; import { Product } from '@ghostfolio/common/interfaces'; import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools'; import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { translate } from '@ghostfolio/ui/i18n'; +import { DataService } from '@ghostfolio/ui/services'; import { Component, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; diff --git a/apps/client/src/app/services/admin.service.ts b/apps/client/src/app/services/admin.service.ts index 10804aac9..a5f2ca24f 100644 --- a/apps/client/src/app/services/admin.service.ts +++ b/apps/client/src/app/services/admin.service.ts @@ -21,6 +21,7 @@ import { Filter } from '@ghostfolio/common/interfaces'; import { DateRange } from '@ghostfolio/common/types'; +import { DataService } from '@ghostfolio/ui/services'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; @@ -29,7 +30,6 @@ import { DataSource, MarketData, Platform } from '@prisma/client'; import { JobStatus } from 'bull'; import { environment } from '../../environments/environment'; -import { DataService } from './data.service'; @Injectable({ providedIn: 'root' diff --git a/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts b/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts index 31f027ee9..4ec42933a 100644 --- a/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts +++ b/libs/common/src/lib/interfaces/responses/portfolio-holding-response.interface.ts @@ -9,7 +9,9 @@ import { import { Tag } from '@prisma/client'; export interface PortfolioHoldingResponse { + /** @deprecated */ activities: Activity[]; + activitiesCount: number; averagePrice: number; dataProviderInfo: DataProviderInfo; diff --git a/libs/ui/src/lib/assistant/assistant.component.ts b/libs/ui/src/lib/assistant/assistant.component.ts index 7bbc3978c..e3d597990 100644 --- a/libs/ui/src/lib/assistant/assistant.component.ts +++ b/libs/ui/src/lib/assistant/assistant.component.ts @@ -1,11 +1,11 @@ /* eslint-disable @nx/enforce-module-boundaries */ 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 { InternalRoute } from '@ghostfolio/common/routes/interfaces/internal-route.interface'; import { internalRoutes } from '@ghostfolio/common/routes/routes'; import { AccountWithPlatform, DateRange } from '@ghostfolio/common/types'; +import { DataService } from '@ghostfolio/ui/services'; import { FocusKeyManager } from '@angular/cdk/a11y'; import { 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.ts index 59c1e6e17..2f4c18288 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,3 @@ -/* eslint-disable @nx/enforce-module-boundaries */ -import { DataService } from '@ghostfolio/client/services/data.service'; import { DATE_FORMAT } from '@ghostfolio/common/helper'; import { AdminMarketDataDetails, @@ -7,6 +5,7 @@ import { } from '@ghostfolio/common/interfaces'; import { GfDialogFooterComponent } from '@ghostfolio/ui/dialog-footer'; import { GfDialogHeaderComponent } from '@ghostfolio/ui/dialog-header'; +import { DataService } from '@ghostfolio/ui/services'; import { CUSTOM_ELEMENTS_SCHEMA, diff --git a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor-dialog/historical-market-data-editor-dialog.component.ts b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor-dialog/historical-market-data-editor-dialog.component.ts index 21202981d..7383c4c9c 100644 --- a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor-dialog/historical-market-data-editor-dialog.component.ts +++ b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor-dialog/historical-market-data-editor-dialog.component.ts @@ -1,6 +1,6 @@ /* eslint-disable @nx/enforce-module-boundaries */ import { AdminService } from '@ghostfolio/client/services/admin.service'; -import { DataService } from '@ghostfolio/client/services/data.service'; +import { DataService } from '@ghostfolio/ui/services'; import { ChangeDetectionStrategy, diff --git a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts index f857e6e53..098f4e295 100644 --- a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts +++ b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts @@ -1,5 +1,3 @@ -/* eslint-disable @nx/enforce-module-boundaries */ -import { DataService } from '@ghostfolio/client/services/data.service'; import { UpdateMarketDataDto } from '@ghostfolio/common/dtos'; import { DATE_FORMAT, @@ -7,6 +5,7 @@ import { getLocale } from '@ghostfolio/common/helper'; import { LineChartItem, User } from '@ghostfolio/common/interfaces'; +import { DataService } from '@ghostfolio/ui/services'; import { CommonModule } from '@angular/common'; import { diff --git a/apps/client/src/app/services/data.service.ts b/libs/ui/src/lib/services/data.service.ts similarity index 100% rename from apps/client/src/app/services/data.service.ts rename to libs/ui/src/lib/services/data.service.ts diff --git a/libs/ui/src/lib/services/index.ts b/libs/ui/src/lib/services/index.ts new file mode 100644 index 000000000..2ba773ede --- /dev/null +++ b/libs/ui/src/lib/services/index.ts @@ -0,0 +1 @@ +export * from './data.service'; diff --git a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts index 05a2c06c3..11d6f09dc 100644 --- a/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts +++ b/libs/ui/src/lib/symbol-autocomplete/symbol-autocomplete.component.ts @@ -1,7 +1,6 @@ -/* eslint-disable @nx/enforce-module-boundaries */ -import { DataService } from '@ghostfolio/client/services/data.service'; import { LookupItem } from '@ghostfolio/common/interfaces'; import { GfSymbolPipe } from '@ghostfolio/common/pipes'; +import { DataService } from '@ghostfolio/ui/services'; import { FocusMonitor } from '@angular/cdk/a11y'; import {