blob: e3b4dab95cf39ebc9af1a47e56a96f24ec0c4433 [file] [log] [blame]
<!-------------------------------------------------------------------------------
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
-------------------------------------------------------------------------------->
<input #inputElement
(input)="toggleSelection(!appValue?.isSelected)"
(keydown.enter)="inputElement.click()"
*ngIf="appIsSelectable"
[checked]="appValue?.isSelected"
[id]="appId"
[disabled]="appDisabled"
class="openk-checkbox cursor-pointer"
type="checkbox">
<button (click)="appCancel.emit()"
(pointerdown)="$event.preventDefault();"
*ngIf="appIsCancelable"
[disabled]="appDisabled"
class="openk-button openk-button-rounded"
type="button">
<mat-icon>clear</mat-icon>
</button>
<span class="name">
<label [class.cursor-pointer]="appIsSelectable && !appDisabled"
[class.name--label---line-through]="appIsSelectable && !appValue?.isSelected"
[for]="appIsSelectable ? appId : null"
class="name--label">
{{appValue?.name}}
</label>
<button (click)="appDownloadAttachment.emit(appValue?.id)"
*ngIf="appIsDownloadable"
[disabled]="appDisabled"
class="openk-button openk-button-rounded"
type="button">
<mat-icon>get_app</mat-icon>
</button>
<label [class.cursor-pointer]="appIsSelectable && !appDisabled"
[for]="appIsSelectable ? appId : null"
class="name--label name--label---fill">
</label>
</span>
<ng-container *ngFor="let tag of appTagList">
<button (click)="toggleTag(tag?.id, appValue?.tagIds?.indexOf(tag?.id) > - 1)"
*ngIf="!appHideNotUsedTags || appValue?.tagIds?.length > 0 && appValue.tagIds.indexOf(tag?.id) > -1"
[class.openk-info]="appValue?.tagIds?.length > 0 && appValue.tagIds.indexOf(tag?.id) > -1"
[disabled]="appDisabled"
class="openk-button openk-chip">
{{tag?.label}}
</button>
</ng-container>
<button (click)="appHideNotUsedTags = !appHideNotUsedTags"
*ngIf="appTagList?.length > 0"
[class.tag-toggle---plus]="appHideNotUsedTags"
[disabled]="appDisabled"
class="openk-button openk-button-rounded tag-toggle"
type="button">
<mat-icon>local_offer</mat-icon>
</button>