diff --git a/CHANGELOG.md b/CHANGELOG.md index a13d349d6..3c0fa27a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Upgraded `ngx-skeleton-loader` from version `11.3.0` to `12.0.0` +- Upgraded `twitter-api-v2` from version `1.27.0` to `1.29.0` ## 2.237.0 - 2026-02-08 diff --git a/README.md b/README.md index 03566b2dd..3be15e49f 100644 --- a/README.md +++ b/README.md @@ -318,8 +318,8 @@ If you like to support this project, become a [**Sponsor**](https://github.com/s ## Sponsors
- - TestMu AI Logo + + TestMu AI Logo
diff --git a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html index 27df91a17..86f4676f3 100644 --- a/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html +++ b/apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -377,7 +377,6 @@
Browser testing via
@@ -217,9 +217,9 @@ alt="TestMu AI Logo" height="32" [src]=" - user?.settings?.colorScheme === 'LIGHT' - ? '../assets/images/sponsors/logo-testmu-dark.svg' - : '../assets/images/sponsors/logo-testmu-light.svg' + user?.settings?.colorScheme === 'DARK' + ? '../assets/images/sponsors/logo-testmu-light.svg' + : '../assets/images/sponsors/logo-testmu-dark.svg' " /> diff --git a/apps/client/src/app/pages/accounts/accounts-page.html b/apps/client/src/app/pages/accounts/accounts-page.html index 0c6b7b8f3..3d9d7ee5c 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.html +++ b/apps/client/src/app/pages/accounts/accounts-page.html @@ -6,7 +6,6 @@ [accounts]="accounts" [activitiesCount]="activitiesCount" [baseCurrency]="user?.settings?.baseCurrency" - [deviceType]="deviceType" [locale]="user?.settings?.locale" [showActions]=" !hasImpersonationId && diff --git a/libs/ui/src/lib/accounts-table/accounts-table.component.html b/libs/ui/src/lib/accounts-table/accounts-table.component.html index 68ae78474..15f5bb21f 100644 --- a/libs/ui/src/lib/accounts-table/accounts-table.component.html +++ b/libs/ui/src/lib/accounts-table/accounts-table.component.html @@ -1,4 +1,4 @@ -@if (showActions) { +@if (showActions()) {
-@if (isLoading) { +@if (isLoading()) { (); - @Output() accountToUpdate = new EventEmitter(); - @Output() transferBalance = new EventEmitter(); - - @ViewChild(MatSort) sort: MatSort; - - public dataSource = new MatTableDataSource(); - public displayedColumns = []; - public isLoading = true; - public routeQueryParams: Subscription; - - private unsubscribeSubject = new Subject(); - - public constructor( - private notificationService: NotificationService, - private router: Router - ) { - addIcons({ - arrowRedoOutline, - createOutline, - documentTextOutline, - ellipsisHorizontal, - eyeOffOutline, - trashOutline, - walletOutline - }); - } - - public ngOnChanges() { - this.displayedColumns = ['status', 'account', 'platform']; - - if (this.showActivitiesCount) { - this.displayedColumns.push('activitiesCount'); +export class GfAccountsTableComponent { + public readonly accounts = input.required(); + public readonly activitiesCount = input(); + public readonly baseCurrency = input(); + public readonly hasPermissionToOpenDetails = input(true); + public readonly locale = input(getLocale()); + public readonly showActions = input(); + public readonly showActivitiesCount = input(true); + public readonly showAllocationInPercentage = input(); + public readonly showBalance = input(true); + public readonly showFooter = input(true); + public readonly showValue = input(true); + public readonly showValueInBaseCurrency = input(false); + public readonly totalBalanceInBaseCurrency = input(); + public readonly totalValueInBaseCurrency = input(); + + public readonly accountDeleted = output(); + public readonly accountToUpdate = output(); + public readonly transferBalance = output(); + + public readonly sort = viewChild.required(MatSort); + + protected readonly dataSource = new MatTableDataSource([]); + + protected readonly displayedColumns = computed(() => { + const columns = ['status', 'account', 'platform']; + + if (this.showActivitiesCount()) { + columns.push('activitiesCount'); } - if (this.showBalance) { - this.displayedColumns.push('balance'); + if (this.showBalance()) { + columns.push('balance'); } - if (this.showValue) { - this.displayedColumns.push('value'); + if (this.showValue()) { + columns.push('value'); } - this.displayedColumns.push('currency'); + columns.push('currency'); - if (this.showValueInBaseCurrency) { - this.displayedColumns.push('valueInBaseCurrency'); + if (this.showValueInBaseCurrency()) { + columns.push('valueInBaseCurrency'); } - if (this.showAllocationInPercentage) { - this.displayedColumns.push('allocation'); + if (this.showAllocationInPercentage()) { + columns.push('allocation'); } - this.displayedColumns.push('comment'); + columns.push('comment'); - if (this.showActions) { - this.displayedColumns.push('actions'); + if (this.showActions()) { + columns.push('actions'); } - this.isLoading = true; + return columns; + }); + + protected readonly isLoading = computed(() => !this.accounts()); + + private readonly notificationService = inject(NotificationService); + private readonly router = inject(Router); + + public constructor() { + addIcons({ + arrowRedoOutline, + createOutline, + documentTextOutline, + ellipsisHorizontal, + eyeOffOutline, + trashOutline, + walletOutline + }); - this.dataSource = new MatTableDataSource(this.accounts); this.dataSource.sortingDataAccessor = getLowercase; - this.dataSource.sort = this.sort; + // Reactive data update + effect(() => { + this.dataSource.data = this.accounts(); + }); - if (this.accounts) { - this.isLoading = false; - } + // Reactive view connection + effect(() => { + this.dataSource.sort = this.sort(); + }); } - public onDeleteAccount(aId: string) { + protected onDeleteAccount(aId: string) { this.notificationService.confirm({ confirmFn: () => { this.accountDeleted.emit(aId); @@ -151,30 +149,25 @@ export class GfAccountsTableComponent implements OnChanges, OnDestroy { }); } - public onOpenAccountDetailDialog(accountId: string) { - if (this.hasPermissionToOpenDetails) { + protected onOpenAccountDetailDialog(accountId: string) { + if (this.hasPermissionToOpenDetails()) { this.router.navigate([], { queryParams: { accountId, accountDetailDialog: true } }); } } - public onOpenComment(aComment: string) { + protected onOpenComment(aComment: string) { this.notificationService.alert({ title: aComment }); } - public onTransferBalance() { + protected onTransferBalance() { this.transferBalance.emit(); } - public onUpdateAccount(aAccount: Account) { + protected onUpdateAccount(aAccount: Account) { this.accountToUpdate.emit(aAccount); } - - public ngOnDestroy() { - this.unsubscribeSubject.next(); - this.unsubscribeSubject.complete(); - } } diff --git a/libs/ui/src/lib/activities-table/activities-table.component.stories.ts b/libs/ui/src/lib/activities-table/activities-table.component.stories.ts index e7a2ba819..25463e576 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.stories.ts +++ b/libs/ui/src/lib/activities-table/activities-table.component.stories.ts @@ -59,7 +59,7 @@ const activities: Activity[] = [ SymbolProfile: { assetClass: 'EQUITY', assetSubClass: 'ETF', - comment: null, + comment: undefined, countries: [], createdAt: new Date('2021-06-06T16:12:20.982Z'), currency: 'USD', @@ -74,12 +74,12 @@ const activities: Activity[] = [ isin: 'US9220427424', name: 'Vanguard Total World Stock Index Fund ETF Shares', updatedAt: new Date('2025-10-01T20:09:39.500Z'), - scraperConfiguration: null, + scraperConfiguration: undefined, sectors: [], symbol: 'VT', symbolMapping: {}, url: 'https://www.vanguard.com', - userId: null, + userId: undefined, activitiesCount: 267, dateOfFirstActivity: new Date('2018-05-31T16:00:00.000Z') }, @@ -126,7 +126,7 @@ const activities: Activity[] = [ SymbolProfile: { assetClass: 'EQUITY', assetSubClass: 'ETF', - comment: null, + comment: undefined, countries: [], createdAt: new Date('2021-06-06T16:12:20.982Z'), currency: 'USD', @@ -141,12 +141,12 @@ const activities: Activity[] = [ isin: 'US9220427424', name: 'Vanguard Total World Stock Index Fund ETF Shares', updatedAt: new Date('2025-10-01T20:09:39.500Z'), - scraperConfiguration: null, + scraperConfiguration: undefined, sectors: [], symbol: 'VT', symbolMapping: {}, url: 'https://www.vanguard.com', - userId: null, + userId: undefined, activitiesCount: 267, dateOfFirstActivity: new Date('2018-05-31T16:00:00.000Z') }, @@ -193,7 +193,7 @@ const activities: Activity[] = [ SymbolProfile: { assetClass: 'LIQUIDITY', assetSubClass: 'CRYPTOCURRENCY', - comment: null, + comment: undefined, countries: [], createdAt: new Date('2024-03-12T15:15:21.217Z'), currency: 'USD', @@ -208,12 +208,12 @@ const activities: Activity[] = [ isin: 'CA4639181029', name: 'iShares Bitcoin Trust', updatedAt: new Date('2025-09-29T03:14:07.742Z'), - scraperConfiguration: null, + scraperConfiguration: undefined, sectors: [], symbol: 'IBIT', symbolMapping: {}, url: 'https://www.ishares.com', - userId: null, + userId: undefined, activitiesCount: 6, dateOfFirstActivity: new Date('2024-01-01T08:00:00.000Z') }, @@ -280,7 +280,7 @@ const activities: Activity[] = [ symbol: 'BNDW', symbolMapping: {}, url: 'https://vanguard.com', - userId: null, + userId: undefined, activitiesCount: 38, dateOfFirstActivity: new Date('2022-04-13T20:05:48.742Z') }, @@ -327,7 +327,7 @@ const activities: Activity[] = [ SymbolProfile: { assetClass: 'EQUITY', assetSubClass: 'ETF', - comment: null, + comment: undefined, countries: [], createdAt: new Date('2021-06-06T16:12:20.982Z'), currency: 'USD', @@ -342,12 +342,12 @@ const activities: Activity[] = [ isin: 'US9220427424', name: 'Vanguard Total World Stock Index Fund ETF Shares', updatedAt: new Date('2025-10-01T20:09:39.500Z'), - scraperConfiguration: null, + scraperConfiguration: undefined, sectors: [], symbol: 'VT', symbolMapping: {}, url: 'https://www.vanguard.com', - userId: null, + userId: undefined, activitiesCount: 267, dateOfFirstActivity: new Date('2018-05-31T16:00:00.000Z') }, diff --git a/package-lock.json b/package-lock.json index 793c513e5..4c70d88f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,7 +88,7 @@ "stripe": "20.3.0", "svgmap": "2.14.0", "tablemark": "4.1.0", - "twitter-api-v2": "1.27.0", + "twitter-api-v2": "1.29.0", "yahoo-finance2": "3.13.0", "zone.js": "0.16.0" }, @@ -33383,9 +33383,9 @@ } }, "node_modules/twitter-api-v2": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/twitter-api-v2/-/twitter-api-v2-1.27.0.tgz", - "integrity": "sha512-hbIFwzg0NeOcFOdmJqtKMCXjLjc0INff/7NwhnZ2zpnw65oku8i+0eMxo5M0iTc1hs+inD/IpDw3S0Xh2c45QQ==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/twitter-api-v2/-/twitter-api-v2-1.29.0.tgz", + "integrity": "sha512-v473q5bwme4N+DWSg6qY+JCvfg1nSJRWwui3HUALafxfqCvVkKiYmS/5x/pVeJwTmyeBxexMbzHwnzrH4h6oYQ==", "license": "Apache-2.0" }, "node_modules/type-check": { diff --git a/package.json b/package.json index 1374f0482..93ff182b7 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "stripe": "20.3.0", "svgmap": "2.14.0", "tablemark": "4.1.0", - "twitter-api-v2": "1.27.0", + "twitter-api-v2": "1.29.0", "yahoo-finance2": "3.13.0", "zone.js": "0.16.0" },