Browse Source
Task/widen input types in dialog header tables and benchmark comparator (#8068)
Widen input types
pull/8083/head
Kenrick Tandrian
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
32 additions and
15 deletions
-
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
-
libs/ui/src/lib/accounts-table/accounts-table.component.ts
-
libs/ui/src/lib/benchmark/benchmark-detail-dialog/benchmark-detail-dialog.html
-
libs/ui/src/lib/dialog-header/dialog-header.component.html
-
libs/ui/src/lib/dialog-header/dialog-header.component.ts
-
libs/ui/src/lib/holdings-table/holdings-table.component.ts
|
|
@ -72,7 +72,13 @@ export class GfBenchmarkComparatorComponent implements OnChanges, OnDestroy { |
|
|
public readonly benchmarks = input<Partial<SymbolProfile>[]>(); |
|
|
public readonly benchmarks = input<Partial<SymbolProfile>[]>(); |
|
|
public readonly colorScheme = input<ColorScheme>(); |
|
|
public readonly colorScheme = input<ColorScheme>(); |
|
|
public readonly isLoading = input<boolean>(); |
|
|
public readonly isLoading = input<boolean>(); |
|
|
public readonly locale = input(getLocale()); |
|
|
|
|
|
|
|
|
public readonly locale = input(getLocale(), { |
|
|
|
|
|
transform: (value?: string) => { |
|
|
|
|
|
return value ?? getLocale(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
public readonly performanceDataItems = input.required<LineChartItem[]>(); |
|
|
public readonly performanceDataItems = input.required<LineChartItem[]>(); |
|
|
public readonly user = input<User>(); |
|
|
public readonly user = input<User>(); |
|
|
|
|
|
|
|
|
|
|
|
@ -62,7 +62,13 @@ export class GfAccountsTableComponent { |
|
|
public readonly hasPermissionToDeleteAccount = input<boolean>(); |
|
|
public readonly hasPermissionToDeleteAccount = input<boolean>(); |
|
|
public readonly hasPermissionToOpenDetails = input(true); |
|
|
public readonly hasPermissionToOpenDetails = input(true); |
|
|
public readonly hasPermissionToUpdateAccount = input<boolean>(); |
|
|
public readonly hasPermissionToUpdateAccount = input<boolean>(); |
|
|
public readonly locale = input(getLocale()); |
|
|
|
|
|
|
|
|
public readonly locale = input(getLocale(), { |
|
|
|
|
|
transform: (value?: string) => { |
|
|
|
|
|
return value ?? getLocale(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
public readonly showActions = input<boolean>(); |
|
|
public readonly showActions = input<boolean>(); |
|
|
public readonly showActivitiesCount = input(true); |
|
|
public readonly showActivitiesCount = input(true); |
|
|
public readonly showAllocationInPercentage = input<boolean>(); |
|
|
public readonly showAllocationInPercentage = input<boolean>(); |
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
<gf-dialog-header |
|
|
<gf-dialog-header |
|
|
position="center" |
|
|
position="center" |
|
|
[deviceType]="data.deviceType" |
|
|
[deviceType]="data.deviceType" |
|
|
[title]="assetProfile?.name ?? assetProfile?.symbol ?? ''" |
|
|
[title]="assetProfile?.name ?? assetProfile?.symbol" |
|
|
(closeButtonClicked)="onClose()" |
|
|
(closeButtonClicked)="onClose()" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
@ -1,10 +1,10 @@ |
|
|
<div class="d-flex" mat-dialog-title> |
|
|
<div class="d-flex" mat-dialog-title> |
|
|
<span |
|
|
<span |
|
|
class="flex-grow-1 text-truncate" |
|
|
class="flex-grow-1 text-truncate" |
|
|
[class.text-center]="position === 'center'" |
|
|
[class.text-center]="position() === 'center'" |
|
|
>{{ title }}</span |
|
|
>{{ title() }}</span |
|
|
> |
|
|
> |
|
|
@if (deviceType !== 'mobile') { |
|
|
@if (deviceType() !== 'mobile') { |
|
|
<button class="no-min-width px-0" mat-button (click)="onClickCloseButton()"> |
|
|
<button class="no-min-width px-0" mat-button (click)="onClickCloseButton()"> |
|
|
<ion-icon name="close" size="large" /> |
|
|
<ion-icon name="close" size="large" /> |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
@ -1,9 +1,8 @@ |
|
|
import { |
|
|
import { |
|
|
ChangeDetectionStrategy, |
|
|
ChangeDetectionStrategy, |
|
|
Component, |
|
|
Component, |
|
|
EventEmitter, |
|
|
input, |
|
|
Input, |
|
|
output |
|
|
Output |
|
|
|
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
import { MatDialogModule } from '@angular/material/dialog'; |
|
|
import { MatDialogModule } from '@angular/material/dialog'; |
|
|
@ -20,17 +19,17 @@ import { close } from 'ionicons/icons'; |
|
|
templateUrl: './dialog-header.component.html' |
|
|
templateUrl: './dialog-header.component.html' |
|
|
}) |
|
|
}) |
|
|
export class GfDialogHeaderComponent { |
|
|
export class GfDialogHeaderComponent { |
|
|
@Input() deviceType: string; |
|
|
public readonly deviceType = input<string>(); |
|
|
@Input() position: 'center' | 'left' = 'left'; |
|
|
public readonly position = input<'center' | 'left'>('left'); |
|
|
@Input() title: string; |
|
|
public readonly title = input.required<string | null | undefined>(); |
|
|
|
|
|
|
|
|
@Output() closeButtonClicked = new EventEmitter<void>(); |
|
|
public readonly closeButtonClicked = output<void>(); |
|
|
|
|
|
|
|
|
public constructor() { |
|
|
public constructor() { |
|
|
addIcons({ close }); |
|
|
addIcons({ close }); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onClickCloseButton() { |
|
|
protected onClickCloseButton() { |
|
|
this.closeButtonClicked.emit(); |
|
|
this.closeButtonClicked.emit(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
@ -54,7 +54,13 @@ export class GfHoldingsTableComponent { |
|
|
public readonly hasPermissionToShowQuantities = input(true); |
|
|
public readonly hasPermissionToShowQuantities = input(true); |
|
|
public readonly hasPermissionToShowValues = input(true); |
|
|
public readonly hasPermissionToShowValues = input(true); |
|
|
public readonly holdings = input.required<PortfolioPosition[] | undefined>(); |
|
|
public readonly holdings = input.required<PortfolioPosition[] | undefined>(); |
|
|
public readonly locale = input(getLocale()); |
|
|
|
|
|
|
|
|
public readonly locale = input(getLocale(), { |
|
|
|
|
|
transform: (value?: string) => { |
|
|
|
|
|
return value ?? getLocale(); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
public readonly mode = input<'default' | 'simple'>('default'); |
|
|
public readonly mode = input<'default' | 'simple'>('default'); |
|
|
public readonly pageSize = model(Number.MAX_SAFE_INTEGER); |
|
|
public readonly pageSize = model(Number.MAX_SAFE_INTEGER); |
|
|
|
|
|
|
|
|
|