Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various browse table fixes #1053

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,14 @@
[nzSortFn]="true">
AID
</th>
<th nzWidth="320px">
Molecular Profile
</th>
<th nzWidth="320px">Molecular Profile</th>
<th
nzWidth="250px"
[nzColumnKey]="sortColumns.DiseaseName"
[nzSortFn]="true">
Disease
</th>
<th
nzWidth="350px"
[nzColumnKey]="sortColumns.TherapyName"
[nzSortFn]="true">
Therapies
</th>
<th nzWidth="350px">Therapies</th>
<th
nzWidth="40px"
nz-tooltip
Expand Down Expand Up @@ -144,7 +137,8 @@
[onInputChanged]="textInputCallback"></cvc-clearable-input-filter>
</th>
<th>
<cvc-clearable-input-filter [(inputModel)]="molecularProfileNameInput"
<cvc-clearable-input-filter
[(inputModel)]="molecularProfileNameInput"
[onInputChanged]="textInputCallback"></cvc-clearable-input-filter>
</th>
<th>
Expand Down Expand Up @@ -333,7 +327,9 @@
<cvc-assertion-tag [assertion]="aid"></cvc-assertion-tag>
</td>
<td>
<cvc-molecular-profile-tag [molecularProfile]="aid.molecularProfile" [truncateLongName]="40"></cvc-molecular-profile-tag>
<cvc-molecular-profile-tag
[molecularProfile]="aid.molecularProfile"
[truncateLongName]="40"></cvc-molecular-profile-tag>
</td>
<td>
<ng-container *ngIf="aid.disease.name; else diseaseElse">
Expand Down Expand Up @@ -379,7 +375,7 @@
style="color: #ac3996"
[nzType]="
aid.therapyInteractionType
| therapyInteractionEnumDisplay : 'icon-name'
| therapyInteractionEnumDisplay: 'icon-name'
"
class="attribute-icon"></i>
</nz-tag>
Expand Down Expand Up @@ -407,31 +403,49 @@
<td
nzAlign="center"
nzRight>
<nz-tag nz-tooltip
<nz-tag
nz-tooltip
nzTooltipPlacement="top"
[nzTooltipTitle]="!isScrolling ? (aid.assertionType | evidenceEnumDisplay) : ''">
<i nz-icon
[nzTooltipTitle]="
!isScrolling ? (aid.assertionType | evidenceEnumDisplay) : ''
">
<i
nz-icon
[nzType]="aid.assertionType | evidenceEnumDisplay: 'icon-name'"
class="attribute-icon"></i>
</nz-tag>
</td>
<td nzAlign="center"
<td
nzAlign="center"
nzRight>
<nz-tag nz-tooltip
<nz-tag
nz-tooltip
nzTooltipPlacement="top"
[nzTooltipTitle]="!isScrolling ? (aid.assertionDirection | evidenceEnumDisplay) : ''">
<i nz-icon
[nzType]="aid.assertionDirection | evidenceEnumDisplay: 'icon-name'"
[nzTooltipTitle]="
!isScrolling
? (aid.assertionDirection | evidenceEnumDisplay)
: ''
">
<i
nz-icon
[nzType]="
aid.assertionDirection | evidenceEnumDisplay: 'icon-name'
"
class="attribute-icon"></i>
</nz-tag>
</td>
<td nzAlign="center"
<td
nzAlign="center"
nzRight>
<nz-tag nz-tooltip
<nz-tag
nz-tooltip
nzTooltipPlacement="top"
[nzTooltipTitle]="!isScrolling ? (aid.significance | evidenceEnumDisplay) : ''">
<i nz-icon
[nzType]="aid.significance| evidenceEnumDisplay: 'icon-name'"
[nzTooltipTitle]="
!isScrolling ? (aid.significance | evidenceEnumDisplay) : ''
">
<i
nz-icon
[nzType]="aid.significance | evidenceEnumDisplay: 'icon-name'"
class="attribute-icon"></i>
</nz-tag>
</td>
Expand All @@ -443,9 +457,9 @@
nz-tooltip
nzTooltipPlacement="top"
[nzTooltipTitle]="
!isScrolling ? (aid.ampLevel | formatAmp : 'verbose') : ''
!isScrolling ? (aid.ampLevel | formatAmp: 'verbose') : ''
">
{{ aid.ampLevel | formatAmp : 'compact' }}
{{ aid.ampLevel | formatAmp: 'compact' }}
</nz-tag>
</td>
<td
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@
[nzSortFn]="true">
Disease
</th>
<th
nzWidth="400px"
[nzColumnKey]="sortColumns.TherapyName"
[nzSortFn]="true">
Therapies
</th>
<th nzWidth="400px">Therapies</th>
<th
nzWidth="40px"
nz-tooltip
Expand Down Expand Up @@ -494,7 +489,7 @@
nz-icon
[nzType]="
eid.therapyInteractionType
| therapyInteractionEnumDisplay : 'icon-name'
| therapyInteractionEnumDisplay: 'icon-name'
"
class="attribute-icon"></i>
</nz-tag>
Expand Down Expand Up @@ -546,7 +541,7 @@
">
<i
nz-icon
[nzType]="eid.evidenceType | evidenceEnumDisplay : 'icon-name'"
[nzType]="eid.evidenceType | evidenceEnumDisplay: 'icon-name'"
class="attribute-icon"></i>
</nz-tag>
</td>
Expand All @@ -564,7 +559,7 @@
<i
nz-icon
[nzType]="
eid.evidenceDirection | evidenceEnumDisplay : 'icon-name'
eid.evidenceDirection | evidenceEnumDisplay: 'icon-name'
"
class="attribute-icon"></i>
</nz-tag>
Expand All @@ -580,7 +575,7 @@
">
<i
nz-icon
[nzType]="eid.significance | evidenceEnumDisplay : 'icon-name'"
[nzType]="eid.significance | evidenceEnumDisplay: 'icon-name'"
class="attribute-icon"></i>
</nz-tag>
</td>
Expand All @@ -595,7 +590,7 @@
">
<i
nz-icon
[nzType]="eid.variantOrigin | evidenceEnumDisplay : 'icon-name'"
[nzType]="eid.variantOrigin | evidenceEnumDisplay: 'icon-name'"
class="attribute-icon"></i>
</nz-tag>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ng-container *ngIf="!col.hidden">
<!-- SELECT HEADER -->
<th
*ngIf="col | guardType : colGuards.isSelectCol as selectCol"
*ngIf="col | guardType: colGuards.isSelectCol as selectCol"
[nzShowCheckbox]="selectCol.checkbox.th.showCheckbox || false"
[nzWidth]="selectCol.width"
[nzAlign]="selectCol.align ?? 'left'"
Expand All @@ -34,14 +34,16 @@

<!-- ENTITY TAG HEADER -->
<th
*ngIf="col | guardType : colGuards.isEntityTagCol as entityTagCol"
*ngIf="col | guardType: colGuards.isEntityTagCol as entityTagCol"
[nzColumnKey]="entityTagCol.key"
[nzAlign]="entityTagCol.align ?? 'left'"
[nzWidth]="entityTagCol.width"
[nzLeft]="entityTagCol.fixedLeft || false"
[nzRight]="entityTagCol.fixedRight || false"
[nzShowSort]="entityTagCol.sort !== undefined"
[nzSortFn]="true"
[nzShowSort]="
entityTagCol.sort !== undefined && !entityTagCol.sort.disabled
"
[nzSortFn]="!entityTagCol.sort.disabled"
[nzSortOrder]="
(entityTagCol.sort!.changes | ngrxPush)?.value || null
"
Expand All @@ -61,7 +63,7 @@

<!-- ENUM TAG HEADER -->
<th
*ngIf="col | guardType : colGuards.isEnumTagCol as enumTagCol"
*ngIf="col | guardType: colGuards.isEnumTagCol as enumTagCol"
[nzColumnKey]="enumTagCol.key"
[nzAlign]="enumTagCol.align ?? 'left'"
[nzWidth]="enumTagCol.width"
Expand All @@ -74,7 +76,7 @@

<!-- TEXT TAG HEADER -->
<th
*ngIf="col | guardType : colGuards.isTextTagCol as textTagCol"
*ngIf="col | guardType: colGuards.isTextTagCol as textTagCol"
[nzColumnKey]="textTagCol.key"
[nzAlign]="textTagCol.align ?? 'left'"
[nzWidth]="textTagCol.width"
Expand All @@ -93,7 +95,7 @@
<ng-container *ngIf="!col.hidden">
<!-- SELECT FILTER -->
<th
*ngIf="col | guardType : colGuards.isSelectCol as selectCol"
*ngIf="col | guardType: colGuards.isSelectCol as selectCol"
[nzColumnKey]="selectCol.key"
[nzAlign]="selectCol.align ?? 'left'"
[nzWidth]="selectCol.width"
Expand All @@ -104,7 +106,7 @@

<!-- ENTITY TAG FILTER -->
<th
*ngIf="col | guardType : colGuards.isEntityTagCol as entityTagCol"
*ngIf="col | guardType: colGuards.isEntityTagCol as entityTagCol"
[nzColumnKey]="entityTagCol.key"
[nzWidth]="entityTagCol.width"
[nzAlign]="entityTagCol.align ?? 'left'"
Expand All @@ -116,25 +118,31 @@
[cvcPlaceholder]="entityTagCol.filter.options[0].key"
[cvcModel]="entityTagCol.filter.options[0].value"
(cvcModelChange)="
filter.transform ?
filter.changes!.next({ key: entityTagCol.key, value: filter.transform($event) }) :
filter.changes!.next({ key: entityTagCol.key, value: $event })
filter.transform
? filter.changes!.next({
key: entityTagCol.key,
value: filter.transform($event)
})
: filter.changes!.next({
key: entityTagCol.key,
value: $event
})
">
</cvc-table-filter-input>
</th>

<!-- ENUM TAG FILTER -->
<th
#enumTableFilter
*ngIf="col | guardType : colGuards.isEnumTagCol as enumTagCol"
*ngIf="col | guardType: colGuards.isEnumTagCol as enumTagCol"
[nzColumnKey]="enumTagCol.key"
class="attribute-filter"
[nzWidth]="enumTagCol.width"
[nzAlign]="enumTagCol.align ?? 'left'"
[nzLeft]="enumTagCol.fixedLeft || false"
[nzRight]="enumTagCol.fixedRight || false"
[nzShowSort]="true"
[nzSortFn]="true"
[nzShowSort]="!enumTagCol.sort.disabled"
[nzSortFn]="!enumTagCol.sort.disabled"
[nzSortOrder]="
(enumTagCol.sort!.changes | ngrxPush)?.value || null
"
Expand Down Expand Up @@ -174,7 +182,7 @@
<!-- TEXT TAG FILTER -->
<th
#enumTableFilter
*ngIf="col | guardType : colGuards.isTextTagCol as textTagCol"
*ngIf="col | guardType: colGuards.isTextTagCol as textTagCol"
[nzColumnKey]="textTagCol.key"
class="attribute-filter"
[nzWidth]="textTagCol.width"
Expand Down Expand Up @@ -223,7 +231,7 @@
<ng-container *ngIf="!col.hidden">
<!-- SELECT CELL -->
<td
*ngIf="col | guardType : colGuards.isSelectCol as selectCol"
*ngIf="col | guardType: colGuards.isSelectCol as selectCol"
[nzChecked]="row.selected"
(nzCheckedChange)="
onRowSelected$.next({ id: row.id, selected: $event })
Expand All @@ -235,7 +243,7 @@
<!-- ENTITY TAG CELL -->
<td
*ngIf="
col | guardType : colGuards.isEntityTagCol as entityTagCol
col | guardType: colGuards.isEntityTagCol as entityTagCol
"
[nzAlign]="entityTagCol.align ?? 'left'"
[nzLeft]="entityTagCol.fixedLeft || false"
Expand Down Expand Up @@ -267,7 +275,6 @@
let-emphasize="emphasize">
<ng-container
*ngIf="data.length > 0; else emptyEntityTagCell">

<!-- display full size tags up to maxTags length -->
<cvc-entity-tag-list
[cvcTagTemplate]="entityTag"
Expand Down Expand Up @@ -332,7 +339,7 @@

<!-- ENUM TAG CELL -->
<td
*ngIf="col | guardType : colGuards.isEnumTagCol as enumTagCol"
*ngIf="col | guardType: colGuards.isEnumTagCol as enumTagCol"
[nzAlign]="enumTagCol.align ?? 'left'"
[nzLeft]="enumTagCol.fixedLeft || false"
[nzRight]="enumTagCol.fixedRight || false">
Expand All @@ -356,7 +363,7 @@

<!-- TEXT TAG CELL -->
<td
*ngIf="col | guardType : colGuards.isTextTagCol as textTagCol"
*ngIf="col | guardType: colGuards.isTextTagCol as textTagCol"
[nzAlign]="textTagCol.align ?? 'left'"
[nzLeft]="textTagCol.fixedLeft || false"
[nzRight]="textTagCol.fixedRight || false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const columnKeyToSortColumnMap: EvidenceManagerColSortMap = {
id: EvidenceSortColumns.Id,
significance: EvidenceSortColumns.Significance,
status: EvidenceSortColumns.Status,
therapies: EvidenceSortColumns.TherapyName,
variantOrigin: EvidenceSortColumns.VariantOrigin,
}

Expand Down Expand Up @@ -115,7 +114,7 @@ export class EvidenceManagerConfig {
} else {
return null
}
}
},
},
},
{
Expand Down Expand Up @@ -163,7 +162,9 @@ export class EvidenceManagerConfig {
label: 'Therapies',
type: 'entity-tag',
width: '275px',
sort: {},
sort: {
disabled: true,
},
tag: {
maxTags: 2,
truncateLabel: '150px',
Expand Down
Loading
Loading