Browse Source
Merge branch 'main' into feat/7669-angular-service-decorator
pull/7671/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with
20 additions and
17 deletions
-
CHANGELOG.md
-
apps/api/src/services/data-provider/data-enhancer/yahoo-finance/yahoo-finance.service.ts
-
apps/api/src/services/data-provider/yahoo-finance/yahoo-finance.service.ts
-
apps/api/tsconfig.app.json
-
apps/api/tsconfig.spec.json
-
libs/ui/src/lib/account-selector/account-selector.component.html
-
libs/ui/src/lib/account-selector/account-selector.component.ts
|
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Improved the sorting to be case-insensitive in the account selector component |
|
|
|
- Refactored the services to use the `@Service()` decorator of _Angular_ |
|
|
|
|
|
|
|
## 3.55.0 - 2026-08-19 |
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ import { |
|
|
|
} from '@prisma/client'; |
|
|
|
import { isISIN } from 'class-validator'; |
|
|
|
import YahooFinance from 'yahoo-finance2'; |
|
|
|
import type { Price } from 'yahoo-finance2/esm/src/modules/quoteSummary-iface'; |
|
|
|
import type { Price } from 'yahoo-finance2/modules/quoteSummary-iface'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
export class YahooFinanceDataEnhancerService implements DataEnhancerInterface { |
|
|
|
|
|
|
|
@ -25,20 +25,17 @@ import { addDays, format, isSameDay } from 'date-fns'; |
|
|
|
import { ReasonPhrases, StatusCodes } from 'http-status-codes'; |
|
|
|
import { uniqBy } from 'lodash'; |
|
|
|
import YahooFinance from 'yahoo-finance2'; |
|
|
|
import { ChartResultArray } from 'yahoo-finance2/esm/src/modules/chart'; |
|
|
|
import { |
|
|
|
import type { ChartResultArray } from 'yahoo-finance2/modules/chart'; |
|
|
|
import type { |
|
|
|
HistoricalDividendsResult, |
|
|
|
HistoricalHistoryResult |
|
|
|
} from 'yahoo-finance2/esm/src/modules/historical'; |
|
|
|
import { |
|
|
|
Quote, |
|
|
|
QuoteResponseArray |
|
|
|
} from 'yahoo-finance2/esm/src/modules/quote'; |
|
|
|
import { |
|
|
|
} from 'yahoo-finance2/modules/historical'; |
|
|
|
import type { Quote, QuoteResponseArray } from 'yahoo-finance2/modules/quote'; |
|
|
|
import type { |
|
|
|
Price, |
|
|
|
QuoteSummaryResult |
|
|
|
} from 'yahoo-finance2/esm/src/modules/quoteSummary'; |
|
|
|
import { SearchQuoteNonYahoo } from 'yahoo-finance2/esm/src/modules/search'; |
|
|
|
} from 'yahoo-finance2/modules/quoteSummary'; |
|
|
|
import type { SearchQuoteNonYahoo } from 'yahoo-finance2/modules/search'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
export class YahooFinanceService implements DataProviderInterface { |
|
|
|
|
|
|
|
@ -4,10 +4,8 @@ |
|
|
|
"outDir": "../../dist/out-tsc", |
|
|
|
"types": ["node"], |
|
|
|
"emitDecoratorMetadata": true, |
|
|
|
"ignoreDeprecations": "6.0", |
|
|
|
"moduleResolution": "node10", |
|
|
|
"target": "es2021", |
|
|
|
"module": "commonjs" |
|
|
|
"module": "preserve" |
|
|
|
}, |
|
|
|
"exclude": ["**/*.spec.ts", "**/*.test.ts", "jest.config.ts"], |
|
|
|
"include": ["**/*.ts"] |
|
|
|
|
|
|
|
@ -2,8 +2,7 @@ |
|
|
|
"extends": "./tsconfig.json", |
|
|
|
"compilerOptions": { |
|
|
|
"outDir": "../../dist/out-tsc", |
|
|
|
"module": "commonjs", |
|
|
|
"moduleResolution": "node10", |
|
|
|
"module": "preserve", |
|
|
|
"types": ["jest", "node"] |
|
|
|
}, |
|
|
|
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"] |
|
|
|
|
|
|
|
@ -28,7 +28,7 @@ |
|
|
|
<mat-option [value]="null" /> |
|
|
|
} |
|
|
|
|
|
|
|
@for (account of accounts(); track account.id) { |
|
|
|
@for (account of sortedAccounts(); track account.id) { |
|
|
|
<mat-option [value]="account.id"> |
|
|
|
<div class="d-flex"> |
|
|
|
<gf-entity-logo |
|
|
|
|
|
|
|
@ -61,6 +61,14 @@ export class GfAccountSelectorComponent |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
public readonly sortedAccounts = computed(() => { |
|
|
|
return [...this.accounts()].sort((a, b) => { |
|
|
|
return (a.name ?? '') |
|
|
|
.toLowerCase() |
|
|
|
.localeCompare((b.name ?? '').toLowerCase()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
private readonly ngControl = inject(NgControl, { |
|
|
|
optional: true, |
|
|
|
self: true |
|
|
|
|