Fixed SonarCloud complaints

This commit is contained in:
Vito Albano
2024-04-25 13:47:51 +01:00
committed by VitoAlbano
parent 3ccd7794ee
commit f8a1c6ec5c
4 changed files with 14 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
class="adf-search-chip-list-item" class="adf-search-chip-list-item"
matTooltip="{{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.TOOLTIP' | translate }}" matTooltip="{{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.TOOLTIP' | translate }}"
matTooltipPosition="right" matTooltipPosition="right"
(keyup.enter)="facetFiltersService.resetAllSelectedBuckets()"
(click)="facetFiltersService.resetAllSelectedBuckets()"> (click)="facetFiltersService.resetAllSelectedBuckets()">
{{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.LABEL' | translate }} {{ 'SEARCH.FILTER.BUTTONS.CLEAR-ALL.LABEL' | translate }}
</mat-chip-option> </mat-chip-option>

View File

@@ -5,6 +5,7 @@
<ng-container *ngIf="displayCount > 0; else withOutDisplayCount" > <ng-container *ngIf="displayCount > 0; else withOutDisplayCount" >
<mat-chip-option <mat-chip-option
*ngFor="let item of items.slice(0, displayCount)" *ngFor="let item of items.slice(0, displayCount)"
(keyup.enter)="clicked()"
(click)="clicked()" (click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value"> [attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon> <mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
@@ -20,6 +21,7 @@
<ng-template #withOutDisplayCount> <ng-template #withOutDisplayCount>
<mat-chip-option <mat-chip-option
*ngFor="let item of items" *ngFor="let item of items"
(keyup.enter)="clicked()"
(click)="clicked()" (click)="clicked()"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value"> [attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon> <mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
@@ -31,7 +33,7 @@
<mat-card appearance="outlined" class="adf-array-item-more-chip-container"> <mat-card appearance="outlined" class="adf-array-item-more-chip-container">
<mat-card-content> <mat-card-content>
<mat-chip-listbox> <mat-chip-listbox>
<mat-chip-option (click)="clicked()" <mat-chip-option (click)="clicked()" (keyup.enter)="clicked()"
*ngFor="let item of items.slice(displayCount, items.length)" *ngFor="let item of items.slice(displayCount, items.length)"
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value"> [attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon> <mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
@@ -47,6 +49,7 @@
</ng-template> </ng-template>
<button mat-icon-button *ngIf="showClickableIcon" <button mat-icon-button *ngIf="showClickableIcon"
(click)="clicked()" (click)="clicked()"
(keydown.enter)="clicked()"
class="adf-array-item-action" class="adf-array-item-action"
[attr.aria-label]="'CORE.METADATA.ACTIONS.EDIT' | translate" [attr.aria-label]="'CORE.METADATA.ACTIONS.EDIT' | translate"
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate" [attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"

View File

@@ -17,7 +17,8 @@
} }
} }
.adf-container-widget__header-text, .adf-label { .adf-container-widget__header-text,
.adf-label {
font-family: var(--theme-font-family); font-family: var(--theme-font-family);
color: var(--theme-primary-color); color: var(--theme-primary-color);
} }
@@ -89,19 +90,13 @@
} }
} }
#{$mat-form-field} {
width: 100%;
}
mat-form-field {
width: 100%;
}
#{mat-input-placeholder} { #{mat-input-placeholder} {
top: 1.8em !important; top: 1.8em;
} }
#{$mat-form-field} { #{$mat-form-field} {
width: 100%;
label { label {
transform: scaleX(1); transform: scaleX(1);
transition: transform 150ms linear; transition: transform 150ms linear;
@@ -135,7 +130,7 @@
} }
& #{$mat-card-header-text} { & #{$mat-card-header-text} {
margin: 0 !important; margin: 0;
} }
& #{$mat-tab-body-content} { & #{$mat-tab-body-content} {

View File

@@ -55,7 +55,7 @@
<div data-automation-id="adf-attach-widget-readonly-list"> <div data-automation-id="adf-attach-widget-readonly-list">
<mat-list *ngIf="hasFile"> <mat-list *ngIf="hasFile">
<mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value"> <mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value; index as i">
<img matListItemLine class="adf-attach-widget__icon" <img matListItemLine class="adf-attach-widget__icon"
[id]="'file-'+file.id+'-icon'" [id]="'file-'+file.id+'-icon'"
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)" [src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
@@ -64,9 +64,9 @@
(keyup.enter)="onAttachFileClicked(file)" (keyup.enter)="onAttachFileClicked(file)"
role="img" role="img"
[attr.aria-label]="file.name" [attr.aria-label]="file.name"
tabindex="0"/> [tabindex]="i"/>
<span matLine id="{{'file-'+file.id}}" (click)="onAttachFileClicked(file)" [matTooltip]="file.name" (keyup.enter)="onAttachFileClicked(file)" <span matLine id="{{'file-'+file.id}}" (click)="onAttachFileClicked(file)" [matTooltip]="file.name" (keyup.enter)="onAttachFileClicked(file)"
tabindex="0" class="adf-file">{{file.name}}</span> [tabindex]="i" class="adf-file">{{file.name}}</span>
<button id="{{'file-'+file.id+'-option-menu'}}" mat-icon-button [matMenuTriggerFor]="fileActionMenu" <button id="{{'file-'+file.id+'-option-menu'}}" mat-icon-button [matMenuTriggerFor]="fileActionMenu"
[attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate"> [attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate">
<mat-icon>more_vert</mat-icon> <mat-icon>more_vert</mat-icon>