Browse Source

feat(client): migrate world map chart component to standalone

pull/5443/head
KenTandrian 4 months ago
parent
commit
e0dde7e6af
  1. 9
      apps/client/src/app/components/world-map-chart/world-map-chart.component.ts
  2. 12
      apps/client/src/app/components/world-map-chart/world-map-chart.module.ts
  3. 4
      apps/client/src/app/pages/landing/landing-page.component.ts
  4. 4
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
  5. 4
      apps/client/src/app/pages/public/public-page.module.ts

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

@ -8,16 +8,17 @@ import {
OnChanges,
OnDestroy
} from '@angular/core';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import svgMap from 'svgmap';
@Component({
selector: 'gf-world-map-chart',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './world-map-chart.component.html',
imports: [NgxSkeletonLoaderModule],
selector: 'gf-world-map-chart',
styleUrls: ['./world-map-chart.component.scss'],
standalone: false
templateUrl: './world-map-chart.component.html'
})
export class WorldMapChartComponent implements OnChanges, OnDestroy {
export class GfWorldMapChartComponent implements OnChanges, OnDestroy {
@Input() countries: { [code: string]: { name?: string; value: number } };
@Input() format: string;
@Input() isInPercent = false;

12
apps/client/src/app/components/world-map-chart/world-map-chart.module.ts

@ -1,12 +0,0 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { WorldMapChartComponent } from './world-map-chart.component';
@NgModule({
declarations: [WorldMapChartComponent],
exports: [WorldMapChartComponent],
imports: [CommonModule, NgxSkeletonLoaderModule]
})
export class GfWorldMapChartModule {}

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

@ -1,4 +1,4 @@
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module';
import { GfWorldMapChartComponent } from '@ghostfolio/client/components/world-map-chart/world-map-chart.component';
import { DataService } from '@ghostfolio/client/services/data.service';
import { Statistics } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
@ -30,7 +30,7 @@ import { Subject } from 'rxjs';
GfCarouselComponent,
GfLogoComponent,
GfValueComponent,
GfWorldMapChartModule,
GfWorldMapChartComponent,
IonIcon,
MatButtonModule,
MatCardModule,

4
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

@ -1,6 +1,6 @@
import { AccountDetailDialog } from '@ghostfolio/client/components/account-detail-dialog/account-detail-dialog.component';
import { AccountDetailDialogParams } from '@ghostfolio/client/components/account-detail-dialog/interfaces/interfaces';
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module';
import { GfWorldMapChartComponent } from '@ghostfolio/client/components/world-map-chart/world-map-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';
@ -45,7 +45,7 @@ import { takeUntil } from 'rxjs/operators';
GfPremiumIndicatorComponent,
GfTopHoldingsComponent,
GfValueComponent,
GfWorldMapChartModule,
GfWorldMapChartComponent,
MatCardModule,
MatProgressBarModule,
NgClass

4
apps/client/src/app/pages/public/public-page.module.ts

@ -1,4 +1,4 @@
import { GfWorldMapChartModule } from '@ghostfolio/client/components/world-map-chart/world-map-chart.module';
import { GfWorldMapChartComponent } from '@ghostfolio/client/components/world-map-chart/world-map-chart.component';
import { GfHoldingsTableComponent } from '@ghostfolio/ui/holdings-table';
import { GfPortfolioProportionChartComponent } from '@ghostfolio/ui/portfolio-proportion-chart';
import { GfValueComponent } from '@ghostfolio/ui/value';
@ -18,7 +18,7 @@ import { PublicPageComponent } from './public-page.component';
GfHoldingsTableComponent,
GfPortfolioProportionChartComponent,
GfValueComponent,
GfWorldMapChartModule,
GfWorldMapChartComponent,
MatButtonModule,
MatCardModule,
PublicPageRoutingModule

Loading…
Cancel
Save