Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
acoffman committed Apr 6, 2023
2 parents 62ffe17 + 03a1b4a commit ffa4fe9
Show file tree
Hide file tree
Showing 25 changed files with 566 additions and 309 deletions.
12 changes: 11 additions & 1 deletion client/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
{}
{
"singleQuote": true,
"tabWidth": 2,
"printWidth": 80,
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"singleAttributePerLine": true,
"bracketSameLine": true,
"htmlWhitespaceSensitivity": "css"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<ng-container [ngSwitch]="cvcEmptyCategory">
<span
*ngSwitchCase="'not-applicable'"
class="empty-symbol not-applicable"
nz-tooltip
nzTooltipTitle="Value is not applicable">
<ng-container [ngSwitch]="cvcDisplayMode">
<ng-container *ngSwitchCase="'small'"> N/A </ng-container>
<ng-container *ngSwitchDefault> Not applicable </ng-container>
</ng-container>
</span>
<span
*ngSwitchCase="'unspecified'"
nz-tooltip
nzTooltipTitle="Unspecified"
class="empty-symbol unspecified"
nz-tooltip
nzTooltipTitle="Value is unspecified">
<ng-container [ngSwitch]="cvcDisplayMode">
<ng-container *ngSwitchCase="'small'">
&ndash;&nbsp;&ndash;
</ng-container>
<ng-container *ngSwitchDefault>Not specified</ng-container>
</ng-container>
</span>
<span
*ngSwitchCase="'invalid'"
nz-tooltip
nzTooltipTitle="INVALID"
class="empty-symbol invalid"
nz-tooltip
nzTooltipTitle="Error: value requires specification">
<ng-container [ngSwitch]="cvcDisplayMode">
<ng-container *ngSwitchCase="'small'">!?</ng-container>
<ng-container *ngSwitchDefault>Unspecified</ng-container>
</ng-container>
</span>
</ng-container>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.empty-symbol {
font-style: oblique;
display: inline-block;
cursor: help;
white-space: no-wrap;
&.not-applicable {
color: #ccc;
font-weight: 500;
}
&.unspecified {
display: inline-block;
color: #ccc;
font-weight: 500;
padding: 0 3px;
}
&.invalid {
display: inline-block;
color: #FF4D4F;
font-weight: 700;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, Input } from '@angular/core'

export type CvcEmptyValueCategory = 'not-applicable' | 'unspecified' | 'invalid'

@Component({
selector: 'cvc-empty-value',
templateUrl: './empty-value.component.html',
styleUrls: ['./empty-value.component.less'],
})
export class EmptyValueComponent {
@Input() cvcEmptyCategory: CvcEmptyValueCategory =
'not-applicable'
@Input() cvcDisplayMode: 'default' | 'small' = 'default'
}
12 changes: 12 additions & 0 deletions client/src/app/components/shared/empty-value/empty-value.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { CommonModule } from '@angular/common'
import { NgModule } from '@angular/core'
import { NzIconModule } from 'ng-zorro-antd/icon'
import { NzToolTipModule } from 'ng-zorro-antd/tooltip'
import { EmptyValueComponent } from './empty-value.component'

@NgModule({
declarations: [EmptyValueComponent],
imports: [CommonModule, NzToolTipModule, NzIconModule],
exports: [EmptyValueComponent],
})
export class CvcEmptyValueModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { CvcAttributeTagModule } from '@app/components/shared/attribute-tag/attr
import { CvcMolecularProfileTagModule } from '@app/components/molecular-profiles/molecular-profile-tag/molecular-profile-tag.module';
import { CvcMolecularProfileTagNameModule } from '@app/components/molecular-profiles/molecular-profile-tag-name/molecular-profile-tag-name.module';
import { CvcTherapyTagModule } from '@app/components/therapies/cvc-therapy-tag/cvc-therapy-tag.module';
import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-value.module';

@NgModule({
declarations: [AssertionsSummaryPage],
Expand All @@ -38,6 +39,7 @@ import { CvcTherapyTagModule } from '@app/components/therapies/cvc-therapy-tag/c
NzIconModule,
NzDescriptionsModule,
NzToolTipModule,
CvcEmptyValueModule,
CvcPipesModule,
CvcStatusTagModule,
CvcUserTagModule,
Expand Down
Loading

0 comments on commit ffa4fe9

Please sign in to comment.