Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
@if (icon) {
<div class="align-self-center me-3">
<ion-icon class="h3 m-0" [name]="icon" />
</div>
}
<div class="d-flex flex-column w-100">
<ng-template #label
><span #labelContent>
<ng-content></ng-content>
</span>
</ng-template>
<ng-template #copyIcon>
@if (enableCopyToClipboardButton) {
<button
class="h-auto ms-1 no-min-width p-1"
mat-button
type="button"
[title]="isCopied ? copiedTitle : copyToClipboardTitle"
(click)="onCopyValueToClipboard()"
(mousedown)="$event.preventDefault()"
>
<ion-icon
class="text-body-secondary"
[name]="isCopied ? 'checkmark-outline' : 'copy-outline'"
/>
</button>
}
</ng-template>
@if (isLoading()) {
<ngx-skeleton-loader
animation="pulse"
[theme]="{
height:
size === 'large' ? '2rem' : size === 'medium' ? '1.8rem' : '1.5rem',
width: '5rem'
}"
/>
} @else if (value || value === 0 || value === null) {
<div
class="align-items-center d-flex"
[class.justify-content-end]="position === 'end'"
>
@if (isNumber || value === null) {
@if (colorizeSign && !useAbsoluteValue && value !== null) {
@if (+value > 0) {
<div class="me-1 text-success">+</div>
}
@if (+value < 0) {
<div class="me-1 text-danger">-</div>
}
}
<div
class="mb-0 value"
[class.fw-bold]="size === 'large'"
[class.h2]="size === 'large'"
[class.h4]="size === 'medium'"
>
@if (value === null) {
<span class="font-monospace text-body-secondary">*****</span>
} @else {
{{ formattedValue }}
}
</div>
@if (isPercent || unit) {
<div class="ms-1">
{{ isPercent ? '%' : unit }}
</div>
}
}
@if (isString) {
<div
class="mb-0 text-truncate value"
[class.fw-bold]="size === 'large'"
[class.h2]="size === 'large'"
[class.h4]="size === 'medium'"
>
{{ formattedValue }}
</div>
}
@if (!hasLabel) {
<ng-container *ngTemplateOutlet="copyIcon" />
}
</div>
}
@if (size === 'large') {
<div class="text-truncate">
<span class="h6"><ng-container *ngTemplateOutlet="label" /></span>
@if (hasLabel) {
<ng-container *ngTemplateOutlet="copyIcon" />
}
@if (subLabel) {
<span class="text-body-secondary"> {{ subLabel }}</span>
}
</div>
} @else {
<small class="d-block text-truncate">
<ng-container *ngTemplateOutlet="label" />
@if (hasLabel) {
<ng-container *ngTemplateOutlet="copyIcon" />
}
</small>
}
</div>