Browse Source

Merge branch 'main' into feature/upgrade-ionicons-to-version-6.1.2

pull/1676/head
Thomas Kaul 3 years ago
committed by GitHub
parent
commit
dbf8b112c7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      CHANGELOG.md
  2. 2
      Dockerfile
  3. 2
      README.md
  4. 9
      apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
  5. 9
      apps/client/src/app/components/investment-chart/investment-chart.component.ts
  6. 7
      apps/client/src/app/pages/landing/landing-page.component.ts
  7. 2
      libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
  8. 2
      libs/ui/src/lib/line-chart/line-chart.component.ts
  9. 2
      libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
  10. 8
      package.json
  11. 39
      yarn.lock

7
CHANGELOG.md

@ -9,7 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Set the exposed port as an environment variable (`PORT`) in `Dockerfile`
- Upgraded `chart.js` from version `4.0.1` to `4.2.0`
- Upgraded `ionicons` from version `6.0.4` to `6.1.2`
- Upgraded `prettier` from version `2.8.1` to `2.8.4`
### Fixed
- Fixed an issue on the landing page caused by the global heat map of subscribers
## 1.233.0 - 2023-02-09

2
Dockerfile

@ -57,5 +57,5 @@ RUN apt update && apt install -y \
COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps
WORKDIR /ghostfolio/apps/api
EXPOSE 3333
EXPOSE ${PORT:-3333}
CMD [ "yarn", "start:prod" ]

2
README.md

@ -175,7 +175,7 @@ Run `yarn start:server`
### Start Client
Run `yarn start:client`
Run `yarn start:client` and open http://localhost:4200/en in your browser
### Start _Storybook_

9
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts

@ -27,6 +27,7 @@ import { ColorScheme } from '@ghostfolio/common/types';
import { SymbolProfile } from '@prisma/client';
import {
Chart,
ChartData,
LineController,
LineElement,
LinearScale,
@ -57,7 +58,7 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
@ViewChild('chartCanvas') chartCanvas;
public chart: Chart<any>;
public chart: Chart<'line'>;
public constructor() {
Chart.register(
@ -89,14 +90,14 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
}
private initialize() {
const data = {
const data: ChartData<'line'> = {
datasets: [
{
backgroundColor: `rgb(${primaryColorRgb.r}, ${primaryColorRgb.g}, ${primaryColorRgb.b})`,
borderColor: `rgb(${primaryColorRgb.r}, ${primaryColorRgb.g}, ${primaryColorRgb.b})`,
borderWidth: 2,
data: this.performanceDataItems.map(({ date, value }) => {
return { x: parseDate(date), y: value };
return { x: parseDate(date).getTime(), y: value };
}),
label: $localize`Portfolio`
},
@ -105,7 +106,7 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
borderColor: `rgb(${secondaryColorRgb.r}, ${secondaryColorRgb.g}, ${secondaryColorRgb.b})`,
borderWidth: 2,
data: this.benchmarkDataItems.map(({ date, value }) => {
return { x: parseDate(date), y: value };
return { x: parseDate(date).getTime(), y: value };
}),
label: $localize`Benchmark`
}

9
apps/client/src/app/components/investment-chart/investment-chart.component.ts

@ -29,6 +29,7 @@ import {
BarController,
BarElement,
Chart,
ChartData,
LineController,
LineElement,
LinearScale,
@ -62,7 +63,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
@ViewChild('chartCanvas') chartCanvas;
public chart: Chart<any>;
public chart: Chart<'bar' | 'line'>;
private investments: InvestmentItem[];
private values: LineChartItem[];
@ -142,7 +143,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
});
}
const chartData = {
const chartData: ChartData<'line'> = {
labels: this.historicalDataItems.map(({ date }) => {
return parseDate(date);
}),
@ -153,7 +154,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
borderWidth: this.groupBy ? 0 : 1,
data: this.investments.map(({ date, investment }) => {
return {
x: parseDate(date),
x: parseDate(date).getTime(),
y: this.isInPercent ? investment * 100 : investment
};
}),
@ -173,7 +174,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
borderWidth: 2,
data: this.values.map(({ date, value }) => {
return {
x: parseDate(date),
x: parseDate(date).getTime(),
y: this.isInPercent ? value * 100 : value
};
}),

7
apps/client/src/app/pages/landing/landing-page.component.ts

@ -52,8 +52,11 @@ export class LandingPageComponent implements OnDestroy, OnInit {
private dataService: DataService,
private deviceService: DeviceDetectorService
) {
const { countriesOfSubscribers, globalPermissions, statistics } =
this.dataService.fetchInfo();
const {
countriesOfSubscribers = [],
globalPermissions,
statistics
} = this.dataService.fetchInfo();
for (const country of countriesOfSubscribers) {
this.countriesOfSubscribersMap[country] = {

2
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

@ -61,7 +61,7 @@ export class FireCalculatorComponent
principalInvestmentAmount: new FormControl<number>(undefined),
time: new FormControl<number>(undefined)
});
public chart: Chart;
public chart: Chart<'bar'>;
public isLoading = true;
public projectedTotalAmount: number;

2
libs/ui/src/lib/line-chart/line-chart.component.ts

@ -66,7 +66,7 @@ export class LineChartComponent implements AfterViewInit, OnChanges, OnDestroy {
@ViewChild('chartCanvas') chartCanvas;
public chart: Chart;
public chart: Chart<'line'>;
public isLoading = true;
private readonly ANIMATION_DURATION = 1200;

2
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

@ -55,7 +55,7 @@ export class PortfolioProportionChartComponent
@ViewChild('chartCanvas') chartCanvas: ElementRef<HTMLCanvasElement>;
public chart: Chart;
public chart: Chart<'pie'>;
public isLoading = true;
private readonly OTHER_KEY = 'OTHER';

8
package.json

@ -92,9 +92,9 @@
"bull": "4.10.2",
"cache-manager": "3.4.3",
"cache-manager-redis-store": "2.0.0",
"chart.js": "4.0.1",
"chartjs-adapter-date-fns": "2.0.1",
"chartjs-plugin-annotation": "2.1.0",
"chart.js": "4.2.0",
"chartjs-adapter-date-fns": "3.0.0",
"chartjs-plugin-annotation": "2.1.2",
"chartjs-plugin-datalabels": "2.2.0",
"cheerio": "1.0.0-rc.12",
"class-transformer": "0.3.2",
@ -181,7 +181,7 @@
"jest-environment-jsdom": "29.4.1",
"jest-preset-angular": "12.2.3",
"nx": "15.6.3",
"prettier": "2.8.1",
"prettier": "2.8.4",
"prettier-plugin-organize-attributes": "0.0.5",
"replace-in-file": "6.3.5",
"rimraf": "3.0.2",

39
yarn.lock

@ -3511,6 +3511,11 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@kurkle/color@^0.3.0":
version "0.3.1"
resolved "https://registry.yarnpkg.com/@kurkle/color/-/color-0.3.1.tgz#ef72bc8022ccf77cdd2715097f062ee591ec145c"
integrity sha512-hW0GwZj06z/ZFUW2Espl7toVDjghJN+EKqyXzPSV8NV89d5BYp5rRMBJoc+aUN0x5OXDMeRQHazejr2Xmqj2tw==
"@leichtgewicht/ip-codec@^2.0.1":
version "2.0.4"
resolved "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz"
@ -8617,20 +8622,22 @@ chardet@^0.7.0:
resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
chart.js@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-4.0.1.tgz#93d5d50ac222a5b3b6ac7488e82e1553ac031592"
integrity sha512-5/8/9eBivwBZK81mKvmIwTb2Pmw4D/5h1RK9fBWZLLZ8mCJ+kfYNmV9rMrGoa5Hgy2/wVDBMLSUDudul2/9ihA==
chart.js@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-4.2.0.tgz#dd281b2ce890bff32f3e249cf2972a1e74bc032c"
integrity sha512-wbtcV+QKeH0F7gQZaCJEIpsNriFheacouJQTVIjITi3eQA8bTlIBoknz0+dgV79aeKLNMAX+nDslIVE/nJ3rzA==
dependencies:
"@kurkle/color" "^0.3.0"
chartjs-adapter-date-fns@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-2.0.1.tgz#3d007d4985391362fb15c96310fff8376a434bae"
integrity sha512-v3WV9rdnQ05ce3A0ZCjzUekJCAbfm6+3HqSoeY2BIkdMYZoYr/4T+ril1tZyDl869lz6xdNVMXejUFT9YKpw4A==
chartjs-adapter-date-fns@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-3.0.0.tgz#c25f63c7f317c1f96f9a7c44bd45eeedb8a478e5"
integrity sha512-Rs3iEB3Q5pJ973J93OBTpnP7qoGwvq3nUnoMdtxO+9aoJof7UFcRbWcIDteXuYd1fgAvct/32T9qaLyLuZVwCg==
chartjs-plugin-annotation@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/chartjs-plugin-annotation/-/chartjs-plugin-annotation-2.1.0.tgz#c43172d26ec8e7e3bc104932d1a1807bf0c46db7"
integrity sha512-wHxP6mBWrgdldAEbHM5nMaMJ3PuunXgiotVh8natosuZsEqpjU0ZeyvMTBwIkKXLSDncb3faLunl4BI89Vmj/g==
chartjs-plugin-annotation@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/chartjs-plugin-annotation/-/chartjs-plugin-annotation-2.1.2.tgz#8c307c931fda735a1acf1b606ad0e3fd7d96299b"
integrity sha512-kmEp2WtpogwnKKnDPO3iO3mVwvVGtmG5BkZVtAEZm5YzJ9CYxojjYEgk7OTrFbJ5vU098b84UeJRe8kRfNcq5g==
chartjs-plugin-datalabels@2.2.0:
version "2.2.0"
@ -17954,10 +17961,10 @@ prettier-plugin-organize-attributes@0.0.5:
resolved "https://registry.npmjs.org/prettier-plugin-organize-attributes/-/prettier-plugin-organize-attributes-0.0.5.tgz"
integrity sha512-dSts16q8wd+oq8Zwk5mwmYXo1aN3B+ZkEJqx/ar5fedNHdOvx7S4XDMH/pNK7rmBW0bPXkp/kJX5gAANsWzh3A==
prettier@2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc"
integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==
prettier@2.8.4:
version "2.8.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3"
integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==
"prettier@>=2.2.1 <=2.3.0":
version "2.3.0"

Loading…
Cancel
Save