|
@ -13,42 +13,45 @@ |
|
|
<div *ngIf="+value > 0" class="mr-1 text-success">+</div> |
|
|
<div *ngIf="+value > 0" class="mr-1 text-success">+</div> |
|
|
<div *ngIf="+value < 0" class="mr-1 text-danger">-</div> |
|
|
<div *ngIf="+value < 0" class="mr-1 text-danger">-</div> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<div |
|
|
@if (isPercent) { |
|
|
*ngIf="isPercent" |
|
|
<div |
|
|
class="mb-0 value" |
|
|
class="mb-0 value" |
|
|
[ngClass]="{ |
|
|
[ngClass]="{ |
|
|
'font-weight-bold h2': size === 'large', |
|
|
'font-weight-bold h2': size === 'large', |
|
|
h4: size === 'medium' |
|
|
h4: size === 'medium' |
|
|
}" |
|
|
}" |
|
|
> |
|
|
> |
|
|
@if (value === null) { |
|
|
@if (value === null) { |
|
|
<span class="text-monospace text-muted">*****</span>% |
|
|
<span class="text-monospace text-muted">*****</span>% |
|
|
} @else { |
|
|
} @else { |
|
|
{{ formattedValue }}% |
|
|
{{ formattedValue }}% |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
} @else { |
|
|
*ngIf="!isPercent" |
|
|
<div |
|
|
class="mb-0 value" |
|
|
class="mb-0 value" |
|
|
[ngClass]="{ |
|
|
[ngClass]="{ |
|
|
'font-weight-bold h2': size === 'large', |
|
|
'font-weight-bold h2': size === 'large', |
|
|
h4: size === 'medium' |
|
|
h4: size === 'medium' |
|
|
}" |
|
|
}" |
|
|
> |
|
|
> |
|
|
@if (value === null) { |
|
|
@if (value === null) { |
|
|
<span class="text-monospace text-muted">*****</span> |
|
|
<span class="text-monospace text-muted">*****</span> |
|
|
} @else { |
|
|
} @else { |
|
|
{{ formattedValue }} |
|
|
{{ formattedValue }} |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
<small *ngIf="unit && size === 'medium'" class="ml-1"> |
|
|
} |
|
|
{{ unit }} |
|
|
@if (unit) { |
|
|
</small> |
|
|
<small *ngIf="size === 'medium'" class="ml-1"> |
|
|
<div *ngIf="unit && size !== 'medium'" class="ml-1"> |
|
|
{{ unit }} |
|
|
{{ unit }} |
|
|
</small> |
|
|
</div> |
|
|
<div *ngIf="size !== 'medium'" class="ml-1"> |
|
|
|
|
|
{{ unit }} |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container *ngIf="isString"> |
|
|
@if (isString) { |
|
|
<div |
|
|
<div |
|
|
class="mb-0 text-truncate value" |
|
|
class="mb-0 text-truncate value" |
|
|
[ngClass]="{ |
|
|
[ngClass]="{ |
|
@ -58,19 +61,20 @@ |
|
|
> |
|
|
> |
|
|
{{ formattedValue }} |
|
|
{{ formattedValue }} |
|
|
</div> |
|
|
</div> |
|
|
</ng-container> |
|
|
} |
|
|
</div> |
|
|
</div> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
|
|
|
|
|
|
<ngx-skeleton-loader |
|
|
@if (value === undefined) { |
|
|
*ngIf="value === undefined" |
|
|
<ngx-skeleton-loader |
|
|
animation="pulse" |
|
|
animation="pulse" |
|
|
[theme]="{ |
|
|
[theme]="{ |
|
|
height: |
|
|
height: |
|
|
size === 'large' ? '2rem' : size === 'medium' ? '1.8rem' : '1.5rem', |
|
|
size === 'large' ? '2rem' : size === 'medium' ? '1.8rem' : '1.5rem', |
|
|
width: '5rem' |
|
|
width: '5rem' |
|
|
}" |
|
|
}" |
|
|
/> |
|
|
/> |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
<ng-container> |
|
|
<ng-container> |
|
|
<div *ngIf="size === 'large'" class="text-truncate"> |
|
|
<div *ngIf="size === 'large'" class="text-truncate"> |
|
|