-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'features' into staging
- Loading branch information
Showing
121 changed files
with
11,105 additions
and
4,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
...olecular-profile-factor-variant-card/molecular-profile-factor-variant-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
@if(variant.__typename == "FactorVariant") { | ||
<nz-card | ||
[nzTitle]="cardTitle" | ||
nzType="inner" | ||
nzSize="small"> | ||
<ng-template #cardTitle> | ||
<i | ||
nz-icon | ||
nzType="civic-variant" | ||
nzTheme="twotone" | ||
[nzTwotoneColor]="'Variant' | entityColor"></i> | ||
{{ variant.name }} | ||
</ng-template> | ||
<nz-row [nzGutter]="[8, 16]"> | ||
<nz-col [nzSpan]="24"> | ||
<nz-row [nzGutter]="[8, 8]"> | ||
<!-- gene attributes block --> | ||
<nz-col nzSpan="24"> | ||
<nz-descriptions | ||
nzLayout="horizontal" | ||
nzSize="small" | ||
[nzColumn]="4" | ||
nzBordered="true"> | ||
<nz-descriptions-item | ||
[nzSpan]="4" | ||
nzTitle="Factor Variant"> | ||
<cvc-feature-variant-tag | ||
[variant]="variant"></cvc-feature-variant-tag> | ||
</nz-descriptions-item> | ||
<!-- aliases --> | ||
<nz-descriptions-item | ||
[nzSpan]="2" | ||
nzTitle="Aliases"> | ||
<ng-container | ||
*ngIf="variant.variantAliases.length > 0; else noAliases"> | ||
<cvc-tag-list> | ||
<nz-tag *ngFor="let alias of variant.variantAliases">{{ | ||
alias | ||
}}</nz-tag> | ||
</cvc-tag-list> | ||
</ng-container> | ||
<ng-template #noAliases> | ||
<span | ||
nz-typography | ||
nzType="secondary" | ||
>None specified</span | ||
> | ||
</ng-template> | ||
</nz-descriptions-item> | ||
|
||
<!-- variant type(s) --> | ||
<nz-descriptions-item | ||
[nzSpan]="2" | ||
[nzTitle]=" | ||
variant.variantTypes.length > 1 | ||
? 'Variant Types' | ||
: 'Variant Type' | ||
"> | ||
<ng-container | ||
*ngIf="variant.variantTypes.length > 0; else noTypes"> | ||
<cvc-tag-list> | ||
<cvc-variant-type-tag | ||
[variantType]="type" | ||
*ngFor="let type of variant.variantTypes"> | ||
</cvc-variant-type-tag> | ||
</cvc-tag-list> | ||
</ng-container> | ||
<ng-template #noTypes> | ||
<span | ||
nz-typography | ||
nzType="secondary" | ||
>None specified</span | ||
> | ||
</ng-template> | ||
</nz-descriptions-item> | ||
|
||
<nz-descriptions-item | ||
[nzSpan]="4" | ||
*ngIf="this.displayMps.length > 0" | ||
nzTitle="Other Molecular Profiles"> | ||
<cvc-tag-list> | ||
<ng-container *ngFor="let mp of this.displayMps"> | ||
<cvc-molecular-profile-tag | ||
[molecularProfile]="mp" | ||
[truncateLongName]="true"></cvc-molecular-profile-tag> | ||
</ng-container> | ||
<ng-container | ||
*ngIf=" | ||
variant.molecularProfiles.totalCount > | ||
this.displayMps.length + 1 | ||
"> | ||
<a routerLink="/variants/{{ variant.id }}/summary"> | ||
+ view | ||
{{ | ||
variant.molecularProfiles.totalCount - | ||
this.displayMps.length | ||
}} | ||
more | ||
</a> | ||
</ng-container> | ||
</cvc-tag-list> | ||
</nz-descriptions-item> | ||
</nz-descriptions> | ||
</nz-col> | ||
</nz-row> | ||
</nz-col> | ||
</nz-row> | ||
</nz-card> | ||
} |
File renamed without changes.
78 changes: 78 additions & 0 deletions
78
.../molecular-profile-factor-variant-card/molecular-profile-factor-variant-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { Component, Input, OnInit } from '@angular/core' | ||
import { VariantMolecularProfileCardFieldsFragment } from '@app/generated/civic.apollo' | ||
import { LinkableMolecularProfile } from '../molecular-profile-tag/molecular-profile-tag.component' | ||
|
||
import { CommonModule } from '@angular/common' | ||
import { CvcVariantTagModule } from '@app/components/variants/variant-tag/variant-tag.module' | ||
import { NzTagModule } from 'ng-zorro-antd/tag' | ||
import { NzIconModule } from 'ng-zorro-antd/icon' | ||
import { NzGridModule } from 'ng-zorro-antd/grid' | ||
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions' | ||
import { NzTypographyModule } from 'ng-zorro-antd/typography' | ||
import { CvcEmptyRevisableModule } from '@app/components/shared/empty-revisable/empty-revisable.module' | ||
import { CvcTagListModule } from '@app/components/shared/tag-list/tag-list.module' | ||
import { CvcVariantTypeTagModule } from '@app/components/variant-types/variant-type-tag/variant-type-tag.module' | ||
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module' | ||
import { NzCardModule } from 'ng-zorro-antd/card' | ||
import { CvcPipesModule } from '@app/core/pipes/pipes.module' | ||
import { CvcMolecularProfileTagModule } from '../molecular-profile-tag/molecular-profile-tag.module' | ||
import { RouterModule } from '@angular/router' | ||
import { NzCollapseModule } from 'ng-zorro-antd/collapse' | ||
import { CvcCoordinatesCardModule } from '@app/components/variants/coordinates-card/coordinates-card.module' | ||
import { NzSpaceModule } from 'ng-zorro-antd/space' | ||
import { CvcFeatureTagModule } from '@app/components/features/feature-tag/feature-tag.module' | ||
import { CvcFeatureVariantTagModule } from '@app/components/shared/feature-variant-tag/feature-variant-tag.module' | ||
|
||
@Component({ | ||
selector: 'cvc-mp-factor-variant-card', | ||
templateUrl: './molecular-profile-factor-variant-card.component.html', | ||
styleUrls: ['./molecular-profile-factor-variant-card.component.less'], | ||
standalone: true, | ||
imports: [ | ||
CommonModule, | ||
RouterModule, | ||
NzTagModule, | ||
NzIconModule, | ||
NzGridModule, | ||
NzDescriptionsModule, | ||
NzTypographyModule, | ||
NzCardModule, | ||
NzCollapseModule, | ||
NzSpaceModule, | ||
CvcPipesModule, | ||
CvcVariantTagModule, | ||
CvcFeatureTagModule, | ||
CvcEmptyRevisableModule, | ||
CvcTagListModule, | ||
CvcVariantTypeTagModule, | ||
CvcLinkTagModule, | ||
CvcTagListModule, | ||
CvcMolecularProfileTagModule, | ||
CvcCoordinatesCardModule, | ||
CvcFeatureVariantTagModule, | ||
], | ||
}) | ||
export class CvcMolecularProfileFactorVariantCardComponent implements OnInit { | ||
@Input() variant!: VariantMolecularProfileCardFieldsFragment | ||
@Input() currentMolecularProfileId!: number | ||
|
||
displayMps: LinkableMolecularProfile[] = [] | ||
|
||
ngOnInit() { | ||
if (this.variant === undefined) { | ||
throw new Error('Must pass a Variant into the MP Variant Card Component') | ||
} | ||
|
||
if (this.currentMolecularProfileId === undefined) { | ||
throw new Error('Must pass a MP ID into the MP Variant Card Component') | ||
} | ||
|
||
if (this.variant.__typename !== 'FactorVariant') { | ||
throw new Error('This card is for FactorVariant variant types only.') | ||
} | ||
|
||
this.displayMps = this.variant.molecularProfiles.nodes.filter( | ||
(mp) => mp.id != this.currentMolecularProfileId | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...es/molecular-profile-gene-variant-card/molecular-profile-gene-variant-card.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.card-title { | ||
font-size: 120%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.