2022-01-20 10:19:44 +01:00
|
|
|
<div *ngIf="filter.values.length >0">
|
|
|
|
<div class="uk-flex uk-flex-middle uk-margin-bottom">
|
|
|
|
<h6 [title]="filter.title"
|
|
|
|
class="uk-margin-right uk-margin-remove-bottom">{{_formatTitle(filter.title, filter.values.length)}}</h6>
|
|
|
|
<a *ngIf="filter.countSelectedValues>0" class="uk-text-small" (click)="clearFilter()" [class.uk-disabled]="isDisabled">Clear</a>
|
2020-02-17 15:19:14 +01:00
|
|
|
</div>
|
2022-04-06 09:35:10 +02:00
|
|
|
<div>
|
2022-01-20 10:19:44 +01:00
|
|
|
<div *ngFor="let value of getSelectedAndTopValues(filter, filterValuesNum)"
|
|
|
|
class="uk-animation-fade uk-text-small uk-margin-small-bottom">
|
|
|
|
<div [title]="value.name">
|
|
|
|
<ng-container *ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-06 09:35:10 +02:00
|
|
|
<div *ngIf="addShowMore && (filter.values.length) > filterValuesNum">
|
2022-04-17 00:42:10 +02:00
|
|
|
<a *ngIf="filterValuesNum > 0 " [class]="((isDisabled)?'uk-disabled uk-link-muted ':'uk-link') + ' uk-margin-small-top'" (click)="toggle($event)">
|
2022-01-20 10:19:44 +01:00
|
|
|
<span *ngIf="!isOpen">+ View all</span>
|
|
|
|
</a>
|
2022-04-06 09:35:10 +02:00
|
|
|
<div *ngIf="isOpen" class="uk-text-small uk-margin-small-bottom">
|
2022-04-07 17:17:52 +02:00
|
|
|
<div class="uk-margin-small-left">
|
|
|
|
<div class="uk-text-meta">Top 100 values are shown in the filters</div>
|
|
|
|
<div class="uk-flex uk-flex-bottom uk-margin-top">
|
|
|
|
<div input class="uk-width-1-2@m uk-margin-right" [placeholder]="{label: 'Search', static: true}" inputClass="inner x-small" [(value)]="keyword"></div>
|
|
|
|
<div *ngIf="showResultCount === true" input type="select" class="uk-width-expand" placeholder="Sort by" inputClass="border-bottom" [(value)]="sortBy" [options]="sortByOptions"></div>
|
2020-04-27 10:14:05 +02:00
|
|
|
</div>
|
2022-01-20 10:19:44 +01:00
|
|
|
</div>
|
2022-04-07 17:17:52 +02:00
|
|
|
<div class="uk-overflow-auto uk-height-max-small uk-margin-small-left uk-margin-small-right uk-margin-top">
|
2022-03-16 17:54:22 +01:00
|
|
|
<ng-container *ngFor="let value of this.sortedValues">
|
2022-01-20 10:19:44 +01:00
|
|
|
<div *ngIf="filterKeywords(value.name)" title="{{value.name}}"
|
2022-04-07 17:17:52 +02:00
|
|
|
class="uk-animation-fade uk-text-small">
|
2022-01-20 10:19:44 +01:00
|
|
|
<ng-container
|
|
|
|
*ngTemplateOutlet="input_label_wrapper; context: {filter: filter, value: value}"></ng-container>
|
2019-07-15 18:11:07 +02:00
|
|
|
</div>
|
2022-01-20 10:19:44 +01:00
|
|
|
</ng-container>
|
2019-07-15 18:11:07 +02:00
|
|
|
</div>
|
2022-01-20 10:19:44 +01:00
|
|
|
</div>
|
2022-04-17 00:42:10 +02:00
|
|
|
<a *ngIf="filterValuesNum > 0 && filterValuesNum !=0" [class]="(isDisabled)?'uk-disabled uk-link-muted ':'uk-link'" (click)="toggle($event)">
|
2022-01-20 10:19:44 +01:00
|
|
|
<span *ngIf="isOpen">- View less</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2017-12-19 13:53:46 +01:00
|
|
|
</div>
|
2020-02-17 15:19:14 +01:00
|
|
|
</div>
|
2020-07-24 13:21:22 +02:00
|
|
|
<ng-template #input_label let-filter="filter" let-value="value">
|
2022-01-20 10:19:44 +01:00
|
|
|
<span *ngIf="filter.filterType == 'checkbox' || filter.filterType == 'radio'" class="uk-flex uk-flex-middle"
|
|
|
|
[class.uk-disabled]="isDisabled || (showResultCount && value.number === 0)">
|
|
|
|
<span>
|
|
|
|
<input *ngIf="filter.filterType == 'checkbox'" type="checkbox" class="uk-checkbox"
|
|
|
|
[disabled]="isDisabled || (showResultCount && value.number === 0)"
|
|
|
|
[(ngModel)]="value.selected" (ngModelChange)="filterChange(value.selected)"/>
|
|
|
|
<input *ngIf="filter.filterType == 'radio'" type="radio" class="uk-radio"
|
|
|
|
[disabled]="isDisabled || (showResultCount && value.number === 0)"
|
|
|
|
[name]="filter.filterId" [value]="value.id" [(ngModel)]="filter.radioValue"
|
|
|
|
(ngModelChange)="uniqueFilterChange(value)"/>
|
2020-07-24 13:21:22 +02:00
|
|
|
</span>
|
2022-01-20 10:19:44 +01:00
|
|
|
<span class="uk-margin-small-left">
|
|
|
|
{{_formatName(value)}}
|
|
|
|
<span *ngIf="showResultCount">({{value.number|number}})</span>
|
|
|
|
</span>
|
|
|
|
</span>
|
2020-07-24 13:21:22 +02:00
|
|
|
</ng-template>
|
2020-10-20 11:11:15 +02:00
|
|
|
<ng-template #input_label_wrapper let-filter="filter" let-value="value">
|
2022-01-20 10:19:44 +01:00
|
|
|
<a *ngIf="actionRoute" [routerLink]="getRoute()"
|
2022-02-16 17:18:12 +01:00
|
|
|
[queryParams]="getParams(filter,value)" class="uk-link-muted uk-display-inline-block"
|
2022-01-20 10:19:44 +01:00
|
|
|
[class.uk-disabled]="disabled(value.number)" [class.uk-link-text]="!disabled(value.number)">
|
2020-10-20 11:11:15 +02:00
|
|
|
<ng-container *ngTemplateOutlet="input_label; context: {filter: filter, value: value}"></ng-container>
|
|
|
|
</a>
|
|
|
|
<ng-container *ngIf="!actionRoute">
|
|
|
|
<ng-container *ngTemplateOutlet="input_label; context: {filter: filter, value: value}"></ng-container>
|
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|