From 88782124872f8257c5e62d6f607f70c71ce7f252 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:23:37 +0100 Subject: [PATCH 1/5] Feature/expire snapshot cache on holding tags change (#4277) * Expire snapshot cache on holding tags change * Update changelog --- CHANGELOG.md | 1 + apps/api/src/app/order/order.service.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c531a7c75..ea3614b22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the caching of the portfolio snapshot in the portfolio calculator by expiring cache entries when a user changes tags in the holding detail dialog - Improved the language localization for German (`de`) ## 2.137.1 - 2025-02-01 diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index e80811351..a26099e9d 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -63,14 +63,14 @@ export class OrderService { } }); - return Promise.all( + await Promise.all( orders.map(({ id }) => this.prismaService.order.update({ data: { tags: { // The set operation replaces all existing connections with the provided ones - set: tags.map(({ id }) => { - return { id }; + set: tags.map((tag) => { + return { id: tag.id }; }) } }, @@ -78,6 +78,13 @@ export class OrderService { }) ) ); + + this.eventEmitter.emit( + PortfolioChangedEvent.getName(), + new PortfolioChangedEvent({ + userId + }) + ); } public async createOrder( From f638b102dacf071ef0d180cb7103937027c6171a Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:41:33 +0100 Subject: [PATCH 2/5] Feature/add link to Duck.ai to copy AI prompt action (#4272) * Add link to Duck.ai * Update changelog --- CHANGELOG.md | 1 + .../analysis/analysis-page.component.ts | 33 ++++++++++++------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea3614b22..4de4ab2cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added a link to _Duck.ai_ to the _Copy AI prompt to clipboard_ action on the analysis page (experimental) - Extracted the tags selector to a reusable component used in the create or update activity dialog and holding detail dialog ### Changed 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 7e27a05f9..a9a189d1f 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 @@ -20,6 +20,7 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { SymbolProfile } from '@prisma/client'; import { isNumber, sortBy } from 'lodash'; +import ms from 'ms'; import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -142,17 +143,27 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { } public onCopyPromptToClipboard() { - this.dataService.fetchPrompt().subscribe(({ prompt }) => { - this.clipboard.copy(prompt); - - this.snackBar.open( - '✅ ' + $localize`AI prompt has been copied to the clipboard`, - undefined, - { - duration: 3000 - } - ); - }); + this.dataService + .fetchPrompt() + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe(({ prompt }) => { + this.clipboard.copy(prompt); + + const snackBarRef = this.snackBar.open( + '✅ ' + $localize`AI prompt has been copied to the clipboard`, + $localize`Open Duck.ai` + ' →', + { + duration: ms('7 seconds') + } + ); + + snackBarRef + .onAction() + .pipe(takeUntil(this.unsubscribeSubject)) + .subscribe(() => { + window.open('https://duck.ai', '_blank'); + }); + }); } public ngOnDestroy() { From 06298089db571bf540bed7f5a3f0840cd768dea3 Mon Sep 17 00:00:00 2001 From: Shaunak Das <51281688+shaun-ak@users.noreply.github.com> Date: Wed, 5 Feb 2025 00:28:50 +0530 Subject: [PATCH 3/5] Feature/add regional market cluster risk rule for Europe (#4271) * Add regional market cluster risk rule for Europe * Update changelog --- CHANGELOG.md | 1 + .../src/app/portfolio/portfolio.service.ts | 6 ++ apps/api/src/app/user/user.service.ts | 6 ++ .../regional-market-cluster-risk/europe.ts | 77 +++++++++++++++++++ .../interfaces/rule-settings.interface.ts | 7 ++ .../north-america.ts | 9 +-- .../x-ray-rules-settings.interface.ts | 1 + 7 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 apps/api/src/models/rules/regional-market-cluster-risk/europe.ts create mode 100644 apps/api/src/models/rules/regional-market-cluster-risk/interfaces/rule-settings.interface.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 4de4ab2cc..eb4468a9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added a new static portfolio analysis rule: _Regional Market Cluster Risk_ (Europe) - Added a link to _Duck.ai_ to the _Copy AI prompt to clipboard_ action on the analysis page (experimental) - Extracted the tags selector to a reusable component used in the create or update activity dialog and holding detail dialog diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index a14f97d26..bbe2a6ca5 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -15,6 +15,7 @@ import { EconomicMarketClusterRiskDevelopedMarkets } from '@ghostfolio/api/model import { EconomicMarketClusterRiskEmergingMarkets } from '@ghostfolio/api/models/rules/economic-market-cluster-risk/emerging-markets'; import { EmergencyFundSetup } from '@ghostfolio/api/models/rules/emergency-fund/emergency-fund-setup'; import { FeeRatioInitialInvestment } from '@ghostfolio/api/models/rules/fees/fee-ratio-initial-investment'; +import { RegionalMarketClusterRiskEurope } from '@ghostfolio/api/models/rules/regional-market-cluster-risk/europe'; import { RegionalMarketClusterRiskNorthAmerica } from '@ghostfolio/api/models/rules/regional-market-cluster-risk/north-america'; import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; @@ -1278,6 +1279,11 @@ export class PortfolioService { summary.ordersCount > 0 ? await this.rulesService.evaluate( [ + new RegionalMarketClusterRiskEurope( + this.exchangeRateDataService, + marketsAdvancedTotalInBaseCurrency, + marketsAdvanced.europe.valueInBaseCurrency + ), new RegionalMarketClusterRiskNorthAmerica( this.exchangeRateDataService, marketsAdvancedTotalInBaseCurrency, diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index 415cbc99d..44a29e737 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -13,6 +13,7 @@ import { EconomicMarketClusterRiskDevelopedMarkets } from '@ghostfolio/api/model import { EconomicMarketClusterRiskEmergingMarkets } from '@ghostfolio/api/models/rules/economic-market-cluster-risk/emerging-markets'; import { EmergencyFundSetup } from '@ghostfolio/api/models/rules/emergency-fund/emergency-fund-setup'; import { FeeRatioInitialInvestment } from '@ghostfolio/api/models/rules/fees/fee-ratio-initial-investment'; +import { RegionalMarketClusterRiskEurope } from '@ghostfolio/api/models/rules/regional-market-cluster-risk/europe'; import { RegionalMarketClusterRiskNorthAmerica } from '@ghostfolio/api/models/rules/regional-market-cluster-risk/north-america'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { I18nService } from '@ghostfolio/api/services/i18n/i18n.service'; @@ -270,6 +271,11 @@ export class UserService { undefined, undefined ).getSettings(user.Settings.settings), + RegionalMarketClusterRiskEurope: new RegionalMarketClusterRiskEurope( + undefined, + undefined, + undefined + ).getSettings(user.Settings.settings), RegionalMarketClusterRiskNorthAmerica: new RegionalMarketClusterRiskNorthAmerica( undefined, diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts b/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts new file mode 100644 index 000000000..d33190ceb --- /dev/null +++ b/apps/api/src/models/rules/regional-market-cluster-risk/europe.ts @@ -0,0 +1,77 @@ +import { Rule } from '@ghostfolio/api/models/rule'; +import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; +import { UserSettings } from '@ghostfolio/common/interfaces'; + +import { Settings } from './interfaces/rule-settings.interface'; + +export class RegionalMarketClusterRiskEurope extends Rule { + private currentValueInBaseCurrency: number; + private europeValueInBaseCurrency: number; + + public constructor( + protected exchangeRateDataService: ExchangeRateDataService, + currentValueInBaseCurrency: number, + europeValueInBaseCurrency: number + ) { + super(exchangeRateDataService, { + key: RegionalMarketClusterRiskEurope.name, + name: 'Europe' + }); + + this.currentValueInBaseCurrency = currentValueInBaseCurrency; + this.europeValueInBaseCurrency = europeValueInBaseCurrency; + } + + public evaluate(ruleSettings: Settings) { + const europeMarketValueRatio = this.currentValueInBaseCurrency + ? this.europeValueInBaseCurrency / this.currentValueInBaseCurrency + : 0; + + if (europeMarketValueRatio > ruleSettings.thresholdMax) { + return { + evaluation: `The Europe market contribution of your current investment (${(europeMarketValueRatio * 100).toPrecision(3)}%) exceeds ${( + ruleSettings.thresholdMax * 100 + ).toPrecision(3)}%`, + value: false + }; + } else if (europeMarketValueRatio < ruleSettings.thresholdMin) { + return { + evaluation: `The Europe market contribution of your current investment (${(europeMarketValueRatio * 100).toPrecision(3)}%) is below ${( + ruleSettings.thresholdMin * 100 + ).toPrecision(3)}%`, + value: false + }; + } + + return { + evaluation: `The Europe market contribution of your current investment (${(europeMarketValueRatio * 100).toPrecision(3)}%) is within the range of ${( + ruleSettings.thresholdMin * 100 + ).toPrecision( + 3 + )}% and ${(ruleSettings.thresholdMax * 100).toPrecision(3)}%`, + value: true + }; + } + + public getConfiguration() { + return { + threshold: { + max: 1, + min: 0, + step: 0.01, + unit: '%' + }, + thresholdMax: true, + thresholdMin: true + }; + } + + public getSettings({ baseCurrency, xRayRules }: UserSettings): Settings { + return { + baseCurrency, + isActive: xRayRules?.[this.getKey()]?.isActive ?? true, + thresholdMax: xRayRules?.[this.getKey()]?.thresholdMax ?? 0.15, + thresholdMin: xRayRules?.[this.getKey()]?.thresholdMin ?? 0.11 + }; + } +} diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/interfaces/rule-settings.interface.ts b/apps/api/src/models/rules/regional-market-cluster-risk/interfaces/rule-settings.interface.ts new file mode 100644 index 000000000..8b9fddf3a --- /dev/null +++ b/apps/api/src/models/rules/regional-market-cluster-risk/interfaces/rule-settings.interface.ts @@ -0,0 +1,7 @@ +import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; + +export interface Settings extends RuleSettings { + baseCurrency: string; + thresholdMin: number; + thresholdMax: number; +} diff --git a/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts b/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts index dc3f6d979..4563b7c54 100644 --- a/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts +++ b/apps/api/src/models/rules/regional-market-cluster-risk/north-america.ts @@ -1,8 +1,9 @@ -import { RuleSettings } from '@ghostfolio/api/models/interfaces/rule-settings.interface'; import { Rule } from '@ghostfolio/api/models/rule'; import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; import { UserSettings } from '@ghostfolio/common/interfaces'; +import { Settings } from './interfaces/rule-settings.interface'; + export class RegionalMarketClusterRiskNorthAmerica extends Rule { private currentValueInBaseCurrency: number; private northAmericaValueInBaseCurrency: number; @@ -74,9 +75,3 @@ export class RegionalMarketClusterRiskNorthAmerica extends Rule { }; } } - -interface Settings extends RuleSettings { - baseCurrency: string; - thresholdMin: number; - thresholdMax: number; -} diff --git a/libs/common/src/lib/interfaces/x-ray-rules-settings.interface.ts b/libs/common/src/lib/interfaces/x-ray-rules-settings.interface.ts index 61f79d65f..f1ca5c683 100644 --- a/libs/common/src/lib/interfaces/x-ray-rules-settings.interface.ts +++ b/libs/common/src/lib/interfaces/x-ray-rules-settings.interface.ts @@ -9,6 +9,7 @@ export interface XRayRulesSettings { EconomicMarketClusterRiskEmergingMarkets?: RuleSettings; EmergencyFundSetup?: RuleSettings; FeeRatioInitialInvestment?: RuleSettings; + RegionalMarketClusterRiskEurope?: RuleSettings; RegionalMarketClusterRiskNorthAmerica?: RuleSettings; } From 8cdef05516df063827f7a3290f127a66c352610e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:48:28 +0100 Subject: [PATCH 4/5] Feature/update locales 20250204 (#4283) * Update translations --------- Co-authored-by: github-actions[bot] Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> --- apps/client/src/locales/messages.ca.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.de.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.es.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.fr.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.it.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.nl.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.pl.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.pt.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.tr.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.uk.xlf | 20 ++++++++++++++------ apps/client/src/locales/messages.xlf | 19 +++++++++++++------ apps/client/src/locales/messages.zh.xlf | 20 ++++++++++++++------ 12 files changed, 167 insertions(+), 72 deletions(-) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 18c8288c3..3bee762a2 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -5075,7 +5075,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -5087,11 +5087,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -5103,7 +5103,7 @@ Monthly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -5111,7 +5111,7 @@ Yearly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 5d5287581..9f5fd16f8 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -2806,7 +2806,7 @@ Monatlich apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3326,7 +3326,7 @@ Dividenden apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -3434,7 +3434,7 @@ Jährlich apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Einlage apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ KI-Anweisung wurde in die Zwischenablage kopiert apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Öffne Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 81f347edd..c71d49f5d 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -2835,7 +2835,7 @@ Mensual apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3319,7 +3319,7 @@ Dividendo apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -3435,7 +3435,7 @@ Anual apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6320,11 +6320,11 @@ Inversión apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7642,7 +7642,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7741,6 +7741,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index e657e087c..521cfe6fa 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -2750,7 +2750,7 @@ Dividende apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -2770,7 +2770,7 @@ Mensuel apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3434,7 +3434,7 @@ Annuel apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Investissement apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index dda729b5b..4d428d419 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -2835,7 +2835,7 @@ Mensile apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3319,7 +3319,7 @@ Dividendi apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -3435,7 +3435,7 @@ Annuale apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6320,11 +6320,11 @@ Investimento apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7642,7 +7642,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7741,6 +7741,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 3cd6ec030..a3c6c6d67 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -2834,7 +2834,7 @@ Maandelijks apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3318,7 +3318,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -3434,7 +3434,7 @@ Jaarlijks apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index da00dbd6d..135e5847f 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -4667,7 +4667,7 @@ Dywidenda apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -4687,7 +4687,7 @@ Miesięcznie apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -4695,7 +4695,7 @@ Rocznie apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Inwestycje apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 7fdf42c97..37d4688f7 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -2654,7 +2654,7 @@ Mensalmente apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -3386,7 +3386,7 @@ Dividendos apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -3434,7 +3434,7 @@ Anualmente apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index c1064f538..0c6c72067 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -4151,7 +4151,7 @@ Temettü apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -4171,7 +4171,7 @@ Aylık apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -4179,7 +4179,7 @@ Yıllık apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6319,11 +6319,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7641,7 +7641,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 435102646..235d99bf8 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -5351,7 +5351,7 @@ Дивіденди apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -5363,11 +5363,11 @@ Інвестиції apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -5379,7 +5379,7 @@ Щомісячно apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -5387,7 +5387,7 @@ Щорічно apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -7649,7 +7649,7 @@ Запит AI скопійовано в буфер обміну apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7740,6 +7740,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 0f9c97b57..5a70868dc 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -4294,7 +4294,7 @@ Dividend apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -4312,14 +4312,14 @@ Monthly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 Yearly apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -5772,11 +5772,11 @@ Investment apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -6920,7 +6920,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7000,6 +7000,13 @@ 93 + + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 05cabceee..984c0bed1 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -4684,7 +4684,7 @@ 股息 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 41 + 42 libs/ui/src/lib/i18n.ts @@ -4704,7 +4704,7 @@ 每月 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 54 + 55 @@ -4712,7 +4712,7 @@ 每年 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 55 + 56 @@ -6344,11 +6344,11 @@ 投资 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 46 + 47 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 60 + 61 apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -7642,7 +7642,7 @@ AI prompt has been copied to the clipboard apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts - 149 + 153 @@ -7741,6 +7741,14 @@ 97 + + Open Duck.ai + Open Duck.ai + + apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts + 154 + + From b6c4ef1997d4c5d0f9dd4b63f5e6b0b5d7370b71 Mon Sep 17 00:00:00 2001 From: Ken Tandrian <60643640+KenTandrian@users.noreply.github.com> Date: Wed, 5 Feb 2025 16:31:22 +0700 Subject: [PATCH 5/5] Feature/upgrade svgmap to version 2.12 (#4280) * chore(deps): bump svgmap from 2.6.0 to 2.12.2 * fix(ui): handle error * Update changelog --- CHANGELOG.md | 1 + .../world-map-chart/world-map-chart.component.html | 2 +- package-lock.json | 10 +++++----- package.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4468a9d..f86fccddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the caching of the portfolio snapshot in the portfolio calculator by expiring cache entries when a user changes tags in the holding detail dialog - Improved the language localization for German (`de`) +- Upgraded `svgmap` from version `2.6.0` to `2.12.2` ## 2.137.1 - 2025-02-01 diff --git a/apps/client/src/app/components/world-map-chart/world-map-chart.component.html b/apps/client/src/app/components/world-map-chart/world-map-chart.component.html index 5de7ea9d0..87bc08672 100644 --- a/apps/client/src/app/components/world-map-chart/world-map-chart.component.html +++ b/apps/client/src/app/components/world-map-chart/world-map-chart.component.html @@ -8,4 +8,4 @@ /> } -
+
diff --git a/package-lock.json b/package-lock.json index e821b3f56..e6be20a39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,7 +86,7 @@ "reflect-metadata": "0.2.2", "rxjs": "7.8.1", "stripe": "17.3.0", - "svgmap": "2.6.0", + "svgmap": "2.12.2", "twitter-api-v2": "1.14.2", "uuid": "11.0.5", "yahoo-finance2": "2.11.3", @@ -29788,12 +29788,12 @@ "license": "BSD-2-Clause" }, "node_modules/svgmap": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/svgmap/-/svgmap-2.6.0.tgz", - "integrity": "sha512-MePkVjgYlHwEfCSuGt+wB6WX6Z2fTD6yDtqZO5syzKYH7gamt1Hp9f/Bw5R49OvBtbsF7WCaGR0/GhewZGGA+w==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/svgmap/-/svgmap-2.12.2.tgz", + "integrity": "sha512-SCX1Oys3v1dz3mTEbQha+6lrHGyu3LwXBhcgW0HlTh7waQDMFqNUKD8hADvDaPkPapRvNCLMnXaVD1Pbxbnhow==", "license": "MIT", "dependencies": { - "svg-pan-zoom": "^3.6.1" + "svg-pan-zoom": "^3.6.2" } }, "node_modules/svgo": { diff --git a/package.json b/package.json index 99650e357..115e76bc5 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "reflect-metadata": "0.2.2", "rxjs": "7.8.1", "stripe": "17.3.0", - "svgmap": "2.6.0", + "svgmap": "2.12.2", "twitter-api-v2": "1.14.2", "uuid": "11.0.5", "yahoo-finance2": "2.11.3",