mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'dspace-7_x' into task/dspace-7_x/CST-15595
# Conflicts: # src/assets/i18n/en.json5
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
<a *ngIf="isVisible | async" class="d-flex flex-row"
|
||||||
[tabIndex]="-1"
|
[tabIndex]="-1"
|
||||||
[routerLink]="[searchLink]"
|
[routerLink]="[searchLink]"
|
||||||
[queryParams]="addQueryParams" queryParamsHandling="merge">
|
[queryParams]="addQueryParams" queryParamsHandling="merge"
|
||||||
|
(click)="announceFilter()">
|
||||||
<label class="mb-0 d-flex w-100">
|
<label class="mb-0 d-flex w-100">
|
||||||
<input type="checkbox" [checked]="false" class="my-1 align-self-stretch filter-checkbox"/>
|
<input type="checkbox" [checked]="false" class="my-1 align-self-stretch filter-checkbox"/>
|
||||||
<span class="w-100 pl-1 break-facet">
|
<span class="w-100 pl-1 break-facet">
|
||||||
|
@@ -19,6 +19,7 @@ import { PaginationComponentOptions } from '../../../../../pagination/pagination
|
|||||||
import { PaginationService } from '../../../../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../../../../core/pagination/pagination.service';
|
||||||
import { PaginationServiceStub } from '../../../../../testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../../../../testing/pagination-service.stub';
|
||||||
import { ShortNumberPipe } from '../../../../../utils/short-number.pipe';
|
import { ShortNumberPipe } from '../../../../../utils/short-number.pipe';
|
||||||
|
import { UUIDService } from '../../../../../../core/shared/uuid.service';
|
||||||
|
|
||||||
describe('SearchFacetOptionComponent', () => {
|
describe('SearchFacetOptionComponent', () => {
|
||||||
let comp: SearchFacetOptionComponent;
|
let comp: SearchFacetOptionComponent;
|
||||||
@@ -113,7 +114,8 @@ describe('SearchFacetOptionComponent', () => {
|
|||||||
}
|
}
|
||||||
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{ provide: UUIDService, useClass: UUIDService },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(SearchFacetOptionComponent, {
|
}).overrideComponent(SearchFacetOptionComponent, {
|
||||||
|
@@ -2,10 +2,12 @@ import { combineLatest as observableCombineLatest, Observable, Subscription } fr
|
|||||||
import { map } from 'rxjs/operators';
|
import { map } from 'rxjs/operators';
|
||||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { FacetValue } from '../../../../models/facet-value.model';
|
import { FacetValue } from '../../../../models/facet-value.model';
|
||||||
import { SearchFilterConfig } from '../../../../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../../../../models/search-filter-config.model';
|
||||||
import { SearchService } from '../../../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../../../core/shared/search/search.service';
|
||||||
import { SearchFilterService } from '../../../../../../core/shared/search/search-filter.service';
|
import { SearchFilterService } from '../../../../../../core/shared/search/search-filter.service';
|
||||||
|
import { LiveRegionService } from '../../../../../../shared/live-region/live-region.service';
|
||||||
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
|
||||||
import { hasValue } from '../../../../../empty.util';
|
import { hasValue } from '../../../../../empty.util';
|
||||||
import { currentPath } from '../../../../../utils/route.utils';
|
import { currentPath } from '../../../../../utils/route.utils';
|
||||||
@@ -67,7 +69,9 @@ export class SearchFacetOptionComponent implements OnInit, OnDestroy {
|
|||||||
protected filterService: SearchFilterService,
|
protected filterService: SearchFilterService,
|
||||||
protected searchConfigService: SearchConfigurationService,
|
protected searchConfigService: SearchConfigurationService,
|
||||||
protected router: Router,
|
protected router: Router,
|
||||||
protected paginationService: PaginationService
|
protected paginationService: PaginationService,
|
||||||
|
protected liveRegionService: LiveRegionService,
|
||||||
|
private translateService: TranslateService,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,4 +133,12 @@ export class SearchFacetOptionComponent implements OnInit, OnDestroy {
|
|||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Announces to the screen reader that the page will be reloaded, which filter has been selected
|
||||||
|
*/
|
||||||
|
announceFilter() {
|
||||||
|
const message = this.translateService.instant('search-facet-option.update.announcement', { filter: this.filterValue.value });
|
||||||
|
this.liveRegionService.addMessage(message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -5402,6 +5402,8 @@
|
|||||||
|
|
||||||
"forgot-email.form.aria.label": "Enter your e-mail address",
|
"forgot-email.form.aria.label": "Enter your e-mail address",
|
||||||
|
|
||||||
|
"search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.",
|
||||||
|
|
||||||
"live-region.ordering.instructions": "Press spacebar to reorder {{ itemName }}.",
|
"live-region.ordering.instructions": "Press spacebar to reorder {{ itemName }}.",
|
||||||
|
|
||||||
"live-region.ordering.status": "{{ itemName }}, grabbed. Current position in list: {{ index }} of {{ length }}. Press up and down arrow keys to change position, SpaceBar to drop, Escape to cancel.",
|
"live-region.ordering.status": "{{ itemName }}, grabbed. Current position in list: {{ index }} of {{ length }}. Press up and down arrow keys to change position, SpaceBar to drop, Escape to cancel.",
|
||||||
|
@@ -7839,4 +7839,7 @@
|
|||||||
|
|
||||||
// "forgot-email.form.aria.label": "Enter your e-mail address",
|
// "forgot-email.form.aria.label": "Enter your e-mail address",
|
||||||
"forgot-email.form.aria.label": "Introduzca su dirección de correo electrónico",
|
"forgot-email.form.aria.label": "Introduzca su dirección de correo electrónico",
|
||||||
|
|
||||||
|
// "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.",
|
||||||
|
"search-facet-option.update.announcement": "La página será recargada. Filtro {{ filter }} seleccionado.",
|
||||||
}
|
}
|
||||||
|
@@ -7866,4 +7866,7 @@
|
|||||||
|
|
||||||
// "forgot-email.form.aria.label": "Enter your e-mail address",
|
// "forgot-email.form.aria.label": "Enter your e-mail address",
|
||||||
"forgot-email.form.aria.label": "Digite seu e-mail",
|
"forgot-email.form.aria.label": "Digite seu e-mail",
|
||||||
|
|
||||||
|
// "search-facet-option.update.announcement": "The page will be reloaded. Filter {{ filter }} is selected.",
|
||||||
|
"search-facet-option.update.announcement": "A página será recarregada. O filtro {{ filter }} foi selecionado.",
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user