mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
111731: Fixed selected filters not being displayed as labels
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs';
|
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs';
|
||||||
import { distinctUntilChanged, map } from 'rxjs/operators';
|
import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||||
import { Injectable, InjectionToken, EventEmitter } from '@angular/core';
|
import { Injectable, InjectionToken } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
SearchFiltersState,
|
SearchFiltersState,
|
||||||
SearchFilterState
|
SearchFilterState
|
||||||
@@ -21,7 +21,6 @@ import { SortDirection, SortOptions } from '../../cache/models/sort-options.mode
|
|||||||
import { RouteService } from '../../services/route.service';
|
import { RouteService } from '../../services/route.service';
|
||||||
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
import { AppliedFilter } from '../../../shared/search/models/applied-filter.model';
|
|
||||||
import { SearchOptions } from '../../../shared/search/models/search-options.model';
|
import { SearchOptions } from '../../../shared/search/models/search-options.model';
|
||||||
import { getFirstSucceededRemoteData } from '../operators';
|
import { getFirstSucceededRemoteData } from '../operators';
|
||||||
import { FacetValue } from '../../../shared/search/models/facet-value.model';
|
import { FacetValue } from '../../../shared/search/models/facet-value.model';
|
||||||
@@ -37,7 +36,6 @@ const filterStateSelector = (state: SearchFiltersState) => state.searchFilter;
|
|||||||
export const FILTER_CONFIG: InjectionToken<SearchFilterConfig> = new InjectionToken<SearchFilterConfig>('filterConfig');
|
export const FILTER_CONFIG: InjectionToken<SearchFilterConfig> = new InjectionToken<SearchFilterConfig>('filterConfig');
|
||||||
export const IN_PLACE_SEARCH: InjectionToken<boolean> = new InjectionToken<boolean>('inPlaceSearch');
|
export const IN_PLACE_SEARCH: InjectionToken<boolean> = new InjectionToken<boolean>('inPlaceSearch');
|
||||||
export const REFRESH_FILTER: InjectionToken<BehaviorSubject<any>> = new InjectionToken<boolean>('refreshFilters');
|
export const REFRESH_FILTER: InjectionToken<BehaviorSubject<any>> = new InjectionToken<boolean>('refreshFilters');
|
||||||
export const CHANGE_APPLIED_FILTERS: InjectionToken<EventEmitter<AppliedFilter[]>> = new InjectionToken('changeAppliedFilters');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service that performs all actions that have to do with search filters and facets
|
* Service that performs all actions that have to do with search filters and facets
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable max-classes-per-file */
|
/* eslint-disable max-classes-per-file */
|
||||||
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
import { combineLatest as observableCombineLatest, Observable, BehaviorSubject } from 'rxjs';
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
import { map, switchMap, take } from 'rxjs/operators';
|
import { map, switchMap, take, tap } from 'rxjs/operators';
|
||||||
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
||||||
import { ResponseParsingService } from '../../data/parsing.service';
|
import { ResponseParsingService } from '../../data/parsing.service';
|
||||||
import { RemoteData } from '../../data/remote-data';
|
import { RemoteData } from '../../data/remote-data';
|
||||||
@@ -32,6 +32,7 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio
|
|||||||
import { RestRequest } from '../../data/rest-request.model';
|
import { RestRequest } from '../../data/rest-request.model';
|
||||||
import { BaseDataService } from '../../data/base/base-data.service';
|
import { BaseDataService } from '../../data/base/base-data.service';
|
||||||
import { Angulartics2 } from 'angulartics2';
|
import { Angulartics2 } from 'angulartics2';
|
||||||
|
import { AppliedFilter } from '../../../shared/search/models/applied-filter.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A limited data service implementation for the 'discover' endpoint
|
* A limited data service implementation for the 'discover' endpoint
|
||||||
@@ -87,6 +88,8 @@ export class SearchService implements OnDestroy {
|
|||||||
*/
|
*/
|
||||||
private searchDataService: SearchDataService;
|
private searchDataService: SearchDataService;
|
||||||
|
|
||||||
|
public appliedFilters$: BehaviorSubject<AppliedFilter[]> = new BehaviorSubject([]);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private routeService: RouteService,
|
private routeService: RouteService,
|
||||||
protected requestService: RequestService,
|
protected requestService: RequestService,
|
||||||
@@ -293,7 +296,19 @@ export class SearchService implements OnDestroy {
|
|||||||
});
|
});
|
||||||
this.requestService.send(request, useCachedVersionIfAvailable);
|
this.requestService.send(request, useCachedVersionIfAvailable);
|
||||||
|
|
||||||
return this.rdb.buildFromHref(href);
|
return this.rdb.buildFromHref(href).pipe(
|
||||||
|
tap((facetValuesRD: RemoteData<FacetValues>) => {
|
||||||
|
if (facetValuesRD.hasSucceeded) {
|
||||||
|
const appliedFilters: AppliedFilter[] = (facetValuesRD.payload.appliedFilters ?? [])
|
||||||
|
.filter((appliedFilter: AppliedFilter) => hasValue(appliedFilter))
|
||||||
|
// TODO this should ideally be fixed in the backend
|
||||||
|
.map((appliedFilter: AppliedFilter) => Object.assign({}, appliedFilter, {
|
||||||
|
operator: hasValue(appliedFilter.value.match(/\[\s*(\*|\d+)\s*TO\s*(\*|\d+)\s*]/)) ? 'range' : appliedFilter.operator,
|
||||||
|
}));
|
||||||
|
this.appliedFilters$.next(appliedFilters);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -5,7 +5,7 @@ import { SearchFilterConfig } from '../../../models/search-filter-config.model';
|
|||||||
import {
|
import {
|
||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
REFRESH_FILTER, CHANGE_APPLIED_FILTERS
|
REFRESH_FILTER,
|
||||||
} from '../../../../../core/shared/search/search-filter.service';
|
} from '../../../../../core/shared/search/search-filter.service';
|
||||||
import { GenericConstructor } from '../../../../../core/shared/generic-constructor';
|
import { GenericConstructor } from '../../../../../core/shared/generic-constructor';
|
||||||
import { SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
import { SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
||||||
@@ -63,7 +63,6 @@ export class SearchFacetFilterWrapperComponent implements OnInit {
|
|||||||
{ provide: FILTER_CONFIG, useFactory: () => (this.filterConfig), deps: [] },
|
{ provide: FILTER_CONFIG, useFactory: () => (this.filterConfig), deps: [] },
|
||||||
{ provide: IN_PLACE_SEARCH, useFactory: () => (this.inPlaceSearch), deps: [] },
|
{ provide: IN_PLACE_SEARCH, useFactory: () => (this.inPlaceSearch), deps: [] },
|
||||||
{ provide: REFRESH_FILTER, useFactory: () => (this.refreshFilters), deps: [] },
|
{ provide: REFRESH_FILTER, useFactory: () => (this.refreshFilters), deps: [] },
|
||||||
{ provide: CHANGE_APPLIED_FILTERS, useFactory: () => this.changeAppliedFilters },
|
|
||||||
],
|
],
|
||||||
parent: this.injector
|
parent: this.injector
|
||||||
});
|
});
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
import { ChangeDetectionStrategy, EventEmitter, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import {
|
import {
|
||||||
CHANGE_APPLIED_FILTERS,
|
|
||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
REFRESH_FILTER,
|
REFRESH_FILTER,
|
||||||
@@ -88,7 +87,6 @@ describe('SearchFacetFilterComponent', () => {
|
|||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: searchConfigService },
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: searchConfigService },
|
||||||
{ provide: IN_PLACE_SEARCH, useValue: false },
|
{ provide: IN_PLACE_SEARCH, useValue: false },
|
||||||
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
||||||
{ provide: CHANGE_APPLIED_FILTERS, useValue: new EventEmitter() },
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(SearchFacetFilterComponent, {
|
}).overrideComponent(SearchFacetFilterComponent, {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { animate, state, style, transition, trigger } from '@angular/animations';
|
import { animate, state, style, transition, trigger } from '@angular/animations';
|
||||||
import { Component, Inject, OnDestroy, OnInit, EventEmitter } from '@angular/core';
|
import { Component, Inject, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { Router, Params } from '@angular/router';
|
import { Router, Params } from '@angular/router';
|
||||||
|
|
||||||
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
|
import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs';
|
||||||
@@ -10,7 +10,7 @@ import { hasNoValue, hasValue } from '../../../../empty.util';
|
|||||||
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 { FILTER_CONFIG, IN_PLACE_SEARCH, REFRESH_FILTER, SearchFilterService, CHANGE_APPLIED_FILTERS } from '../../../../../core/shared/search/search-filter.service';
|
import { FILTER_CONFIG, IN_PLACE_SEARCH, REFRESH_FILTER, SearchFilterService } from '../../../../../core/shared/search/search-filter.service';
|
||||||
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../../core/shared/search/search-configuration.service';
|
||||||
import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
|
import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators';
|
||||||
import { InputSuggestion } from '../../../../input-suggestions/input-suggestions.model';
|
import { InputSuggestion } from '../../../../input-suggestions/input-suggestions.model';
|
||||||
@@ -90,7 +90,6 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
|||||||
@Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean,
|
@Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean,
|
||||||
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
||||||
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
||||||
@Inject(CHANGE_APPLIED_FILTERS) public changeAppliedFilters: EventEmitter<AppliedFilter[]>,
|
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,7 +258,6 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
|
|||||||
const appliedFilters: AppliedFilter[] = selectedValues.map((value: string) => {
|
const appliedFilters: AppliedFilter[] = selectedValues.map((value: string) => {
|
||||||
return allAppliedFilters.find((appliedFilter: AppliedFilter) => appliedFilter.value === stripOperatorFromFilterValue(value));
|
return allAppliedFilters.find((appliedFilter: AppliedFilter) => appliedFilter.value === stripOperatorFromFilterValue(value));
|
||||||
}).filter((appliedFilter: AppliedFilter) => hasValue(appliedFilter));
|
}).filter((appliedFilter: AppliedFilter) => hasValue(appliedFilter));
|
||||||
this.changeAppliedFilters.emit(appliedFilters);
|
|
||||||
return appliedFilters;
|
return appliedFilters;
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
@@ -20,8 +20,7 @@
|
|||||||
<ds-search-facet-filter-wrapper
|
<ds-search-facet-filter-wrapper
|
||||||
[filterConfig]="filter"
|
[filterConfig]="filter"
|
||||||
[inPlaceSearch]="inPlaceSearch"
|
[inPlaceSearch]="inPlaceSearch"
|
||||||
[refreshFilters]="refreshFilters"
|
[refreshFilters]="refreshFilters">
|
||||||
(changeAppliedFilters)="changeAppliedFilters.emit($event)">
|
|
||||||
</ds-search-facet-filter-wrapper>
|
</ds-search-facet-filter-wrapper>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject, Input, OnInit, Output, EventEmitter } from '@angular/core';
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
|
import { BehaviorSubject, Observable, of as observableOf } from 'rxjs';
|
||||||
import { filter, map, startWith, switchMap, take } from 'rxjs/operators';
|
import { filter, map, startWith, switchMap, take } from 'rxjs/operators';
|
||||||
@@ -11,7 +11,6 @@ import { SearchService } from '../../../../core/shared/search/search.service';
|
|||||||
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component';
|
||||||
import { SequenceService } from '../../../../core/shared/sequence.service';
|
import { SequenceService } from '../../../../core/shared/sequence.service';
|
||||||
import { AppliedFilter } from '../../models/applied-filter.model';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-filter',
|
selector: 'ds-search-filter',
|
||||||
@@ -39,11 +38,6 @@ export class SearchFilterComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
@Input() refreshFilters: BehaviorSubject<boolean>;
|
@Input() refreshFilters: BehaviorSubject<boolean>;
|
||||||
|
|
||||||
/**
|
|
||||||
* Emits the {@link AppliedFilter}s of this search filter
|
|
||||||
*/
|
|
||||||
@Output() changeAppliedFilters: EventEmitter<AppliedFilter[]> = new EventEmitter();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True when the filter is 100% collapsed in the UI
|
* True when the filter is 100% collapsed in the UI
|
||||||
*/
|
*/
|
||||||
|
@@ -13,7 +13,6 @@ import { PageInfo } from '../../../../../core/shared/page-info.model';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { SearchService } from '../../../../../core/shared/search/search.service';
|
import { SearchService } from '../../../../../core/shared/search/search.service';
|
||||||
import {
|
import {
|
||||||
CHANGE_APPLIED_FILTERS,
|
|
||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
SearchFilterService,
|
SearchFilterService,
|
||||||
@@ -77,7 +76,6 @@ describe('SearchHierarchyFilterComponent', () => {
|
|||||||
{ provide: IN_PLACE_SEARCH, useValue: false },
|
{ provide: IN_PLACE_SEARCH, useValue: false },
|
||||||
{ provide: FILTER_CONFIG, useValue: Object.assign(new SearchFilterConfig(), { name: testSearchFilter }) },
|
{ provide: FILTER_CONFIG, useValue: Object.assign(new SearchFilterConfig(), { name: testSearchFilter }) },
|
||||||
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
||||||
{ provide: CHANGE_APPLIED_FILTERS, useValue: new EventEmitter() },
|
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject, OnInit, EventEmitter } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { renderFacetFor } from '../search-filter-type-decorator';
|
import { renderFacetFor } from '../search-filter-type-decorator';
|
||||||
import { FilterType } from '../../../models/filter-type.model';
|
import { FilterType } from '../../../models/filter-type.model';
|
||||||
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
||||||
@@ -10,7 +10,7 @@ import { SearchService } from '../../../../../core/shared/search/search.service'
|
|||||||
import {
|
import {
|
||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
SearchFilterService, REFRESH_FILTER, CHANGE_APPLIED_FILTERS
|
SearchFilterService, REFRESH_FILTER,
|
||||||
} from '../../../../../core/shared/search/search-filter.service';
|
} from '../../../../../core/shared/search/search-filter.service';
|
||||||
import { Params, Router } from '@angular/router';
|
import { Params, Router } from '@angular/router';
|
||||||
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
||||||
@@ -24,7 +24,6 @@ import { PageInfo } from '../../../../../core/shared/page-info.model';
|
|||||||
import { environment } from '../../../../../../environments/environment';
|
import { environment } from '../../../../../../environments/environment';
|
||||||
import { addOperatorToFilterValue } from '../../../search.utils';
|
import { addOperatorToFilterValue } from '../../../search.utils';
|
||||||
import { VocabularyTreeviewModalComponent } from '../../../../form/vocabulary-treeview-modal/vocabulary-treeview-modal.component';
|
import { VocabularyTreeviewModalComponent } from '../../../../form/vocabulary-treeview-modal/vocabulary-treeview-modal.component';
|
||||||
import { AppliedFilter } from '../../../models/applied-filter.model';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-hierarchy-filter',
|
selector: 'ds-search-hierarchy-filter',
|
||||||
@@ -49,9 +48,8 @@ export class SearchHierarchyFilterComponent extends SearchFacetFilterComponent i
|
|||||||
@Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean,
|
@Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean,
|
||||||
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
||||||
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
||||||
@Inject(CHANGE_APPLIED_FILTERS) public changeAppliedFilters: EventEmitter<AppliedFilter[]>,
|
|
||||||
) {
|
) {
|
||||||
super(searchService, filterService, rdbs, router, searchConfigService, inPlaceSearch, filterConfig, refreshFilters, changeAppliedFilters);
|
super(searchService, filterService, rdbs, router, searchConfigService, inPlaceSearch, filterConfig, refreshFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
vocabularyExists$: Observable<boolean>;
|
vocabularyExists$: Observable<boolean>;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { ChangeDetectionStrategy, EventEmitter, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
REFRESH_FILTER,
|
REFRESH_FILTER,
|
||||||
SearchFilterService, CHANGE_APPLIED_FILTERS
|
SearchFilterService,
|
||||||
} from '../../../../../core/shared/search/search-filter.service';
|
} from '../../../../../core/shared/search/search-filter.service';
|
||||||
import { SearchFilterConfig } from '../../../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../../../models/search-filter-config.model';
|
||||||
import { FilterType } from '../../../models/filter-type.model';
|
import { FilterType } from '../../../models/filter-type.model';
|
||||||
@@ -105,7 +105,6 @@ describe('SearchRangeFilterComponent', () => {
|
|||||||
{ provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() },
|
{ provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() },
|
||||||
{ provide: IN_PLACE_SEARCH, useValue: false },
|
{ provide: IN_PLACE_SEARCH, useValue: false },
|
||||||
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
{ provide: REFRESH_FILTER, useValue: new BehaviorSubject<boolean>(false) },
|
||||||
{ provide: CHANGE_APPLIED_FILTERS, useValue: new EventEmitter() },
|
|
||||||
{
|
{
|
||||||
provide: SearchFilterService, useValue: {
|
provide: SearchFilterService, useValue: {
|
||||||
getSelectedValuesForFilter: () => selectedValues,
|
getSelectedValuesForFilter: () => selectedValues,
|
||||||
|
@@ -1,14 +1,13 @@
|
|||||||
import { BehaviorSubject, combineLatest as observableCombineLatest, of as observableOf , Subscription } from 'rxjs';
|
import { BehaviorSubject, combineLatest as observableCombineLatest, of as observableOf , Subscription } from 'rxjs';
|
||||||
import { map, startWith } from 'rxjs/operators';
|
import { map, startWith } from 'rxjs/operators';
|
||||||
import { isPlatformBrowser } from '@angular/common';
|
import { isPlatformBrowser } from '@angular/common';
|
||||||
import { Component, Inject, OnDestroy, OnInit, PLATFORM_ID, EventEmitter } from '@angular/core';
|
import { Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core';
|
||||||
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service';
|
||||||
import { FilterType } from '../../../models/filter-type.model';
|
import { FilterType } from '../../../models/filter-type.model';
|
||||||
import { renderFacetFor } from '../search-filter-type-decorator';
|
import { renderFacetFor } from '../search-filter-type-decorator';
|
||||||
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component';
|
||||||
import { SearchFilterConfig } from '../../../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../../../models/search-filter-config.model';
|
||||||
import {
|
import {
|
||||||
CHANGE_APPLIED_FILTERS,
|
|
||||||
FILTER_CONFIG,
|
FILTER_CONFIG,
|
||||||
IN_PLACE_SEARCH,
|
IN_PLACE_SEARCH,
|
||||||
REFRESH_FILTER,
|
REFRESH_FILTER,
|
||||||
@@ -86,9 +85,8 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
|
|||||||
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
@Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
|
||||||
@Inject(PLATFORM_ID) private platformId: any,
|
@Inject(PLATFORM_ID) private platformId: any,
|
||||||
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
@Inject(REFRESH_FILTER) public refreshFilters: BehaviorSubject<boolean>,
|
||||||
@Inject(CHANGE_APPLIED_FILTERS) public changeAppliedFilters: EventEmitter<AppliedFilter[]>,
|
|
||||||
private route: RouteService) {
|
private route: RouteService) {
|
||||||
super(searchService, filterService, rdbs, router, searchConfigService, inPlaceSearch, filterConfig, refreshFilters, changeAppliedFilters);
|
super(searchService, filterService, rdbs, router, searchConfigService, inPlaceSearch, filterConfig, refreshFilters);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +119,6 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
this.selectedAppliedFilters$ = observableOf(appliedFilters);
|
this.selectedAppliedFilters$ = observableOf(appliedFilters);
|
||||||
this.changeAppliedFilters.emit(appliedFilters);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<h3>{{"search.filters.head" | translate}}</h3>
|
<h3>{{"search.filters.head" | translate}}</h3>
|
||||||
<div *ngIf="(filters | async)?.hasSucceeded">
|
<div *ngIf="(filters | async)?.hasSucceeded">
|
||||||
<div *ngFor="let filter of (filters | async)?.payload; trackBy: trackUpdate">
|
<div *ngFor="let filter of (filters | async)?.payload; trackBy: trackUpdate">
|
||||||
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch" [refreshFilters]="refreshFilters" (changeAppliedFilters)="updateAppliedFilters(filter.name, $event)"></ds-search-filter>
|
<ds-search-filter [filter]="filter" [inPlaceSearch]="inPlaceSearch" [refreshFilters]="refreshFilters"></ds-search-filter>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn btn-primary" [routerLink]="[searchLink]" [queryParams]="clearParams | async" queryParamsHandling="merge" role="button"><i class="fas fa-undo"></i> {{"search.filters.reset" | translate}}</a>
|
<a class="btn btn-primary" [routerLink]="[searchLink]" [queryParams]="clearParams | async" queryParamsHandling="merge" role="button"><i class="fas fa-undo"></i> {{"search.filters.reset" | translate}}</a>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject, Input, OnDestroy, OnInit, Output, EventEmitter } from '@angular/core';
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
@@ -10,7 +10,6 @@ import { SearchFilterConfig } from '../models/search-filter-config.model';
|
|||||||
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
|
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
|
||||||
import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-page.component';
|
import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-page.component';
|
||||||
import { currentPath } from '../../utils/route.utils';
|
import { currentPath } from '../../utils/route.utils';
|
||||||
import { hasValue } from '../../empty.util';
|
|
||||||
import { AppliedFilter } from '../models/applied-filter.model';
|
import { AppliedFilter } from '../models/applied-filter.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -23,7 +22,7 @@ import { AppliedFilter } from '../models/applied-filter.model';
|
|||||||
/**
|
/**
|
||||||
* This component represents the part of the search sidebar that contains filters.
|
* This component represents the part of the search sidebar that contains filters.
|
||||||
*/
|
*/
|
||||||
export class SearchFiltersComponent implements OnInit, OnDestroy {
|
export class SearchFiltersComponent implements OnInit {
|
||||||
/**
|
/**
|
||||||
* An observable containing configuration about which filters are shown and how they are shown
|
* An observable containing configuration about which filters are shown and how they are shown
|
||||||
*/
|
*/
|
||||||
@@ -55,11 +54,6 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
@Input() refreshFilters: BehaviorSubject<boolean>;
|
@Input() refreshFilters: BehaviorSubject<boolean>;
|
||||||
|
|
||||||
/**
|
|
||||||
* Emits the {@link AppliedFilter}s by search filter name
|
|
||||||
*/
|
|
||||||
@Output() changeAppliedFilters: EventEmitter<Map<string, AppliedFilter[]>> = new EventEmitter();
|
|
||||||
|
|
||||||
appliedFilters: Map<string, AppliedFilter[]> = new Map();
|
appliedFilters: Map<string, AppliedFilter[]> = new Map();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,8 +61,6 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
|
|||||||
*/
|
*/
|
||||||
searchLink: string;
|
searchLink: string;
|
||||||
|
|
||||||
subs = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
* @param {SearchService} searchService
|
* @param {SearchService} searchService
|
||||||
@@ -107,22 +99,4 @@ export class SearchFiltersComponent implements OnInit, OnDestroy {
|
|||||||
return config ? config.name : undefined;
|
return config ? config.name : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the map of {@link AppliedFilter}s and emits it to it's parent component
|
|
||||||
*
|
|
||||||
* @param filterName
|
|
||||||
* @param appliedFilters
|
|
||||||
*/
|
|
||||||
updateAppliedFilters(filterName: string, appliedFilters: AppliedFilter[]): void {
|
|
||||||
this.appliedFilters.set(filterName, appliedFilters);
|
|
||||||
this.changeAppliedFilters.emit(this.appliedFilters);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.subs.forEach((sub) => {
|
|
||||||
if (hasValue(sub)) {
|
|
||||||
sub.unsubscribe();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { ThemedComponent } from '../../theme-support/themed.component';
|
import { ThemedComponent } from '../../theme-support/themed.component';
|
||||||
import { SearchFiltersComponent } from './search-filters.component';
|
import { SearchFiltersComponent } from './search-filters.component';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
||||||
import { AppliedFilter } from '../models/applied-filter.model';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Themed wrapper for SearchFiltersComponent
|
* Themed wrapper for SearchFiltersComponent
|
||||||
@@ -20,11 +19,9 @@ export class ThemedSearchFiltersComponent extends ThemedComponent<SearchFiltersC
|
|||||||
@Input() inPlaceSearch: boolean;
|
@Input() inPlaceSearch: boolean;
|
||||||
@Input() refreshFilters: Observable<any>;
|
@Input() refreshFilters: Observable<any>;
|
||||||
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
|
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
|
||||||
@Output() changeAppliedFilters: EventEmitter<Map<string, AppliedFilter[]>> = new EventEmitter();
|
|
||||||
|
|
||||||
protected inAndOutputNames: (keyof SearchFiltersComponent & keyof this)[] = [
|
protected inAndOutputNames: (keyof SearchFiltersComponent & keyof this)[] = [
|
||||||
'filters', 'currentConfiguration', 'currentScope', 'inPlaceSearch', 'refreshFilters',
|
'filters', 'currentConfiguration', 'currentScope', 'inPlaceSearch', 'refreshFilters',
|
||||||
'changeAppliedFilters',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected getComponentName(): string {
|
protected getComponentName(): string {
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
<div class="labels">
|
<div class="labels">
|
||||||
<ng-container *ngFor="let appliedFilters of (appliedFilters | keyvalue)">
|
<ds-search-label-loader *ngFor="let appliedFilter of appliedFilters$ | async"
|
||||||
<ds-search-label-loader *ngFor="let appliedFilter of appliedFilters.value"
|
[appliedFilter]="appliedFilter"
|
||||||
[appliedFilter]="appliedFilter"
|
[inPlaceSearch]="inPlaceSearch">
|
||||||
[inPlaceSearch]="inPlaceSearch">
|
</ds-search-label-loader>
|
||||||
</ds-search-label-loader>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { AppliedFilter } from '../models/applied-filter.model';
|
import { AppliedFilter } from '../models/applied-filter.model';
|
||||||
|
import { SearchService } from '../../../core/shared/search/search.service';
|
||||||
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search-labels',
|
selector: 'ds-search-labels',
|
||||||
@@ -10,16 +12,22 @@ import { AppliedFilter } from '../models/applied-filter.model';
|
|||||||
/**
|
/**
|
||||||
* Component that represents the labels containing the currently active filters
|
* Component that represents the labels containing the currently active filters
|
||||||
*/
|
*/
|
||||||
export class SearchLabelsComponent {
|
export class SearchLabelsComponent implements OnInit {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True when the search component should show results on the current page
|
* True when the search component should show results on the current page
|
||||||
*/
|
*/
|
||||||
@Input() inPlaceSearch: boolean;
|
@Input() inPlaceSearch: boolean;
|
||||||
|
|
||||||
/**
|
appliedFilters$: BehaviorSubject<AppliedFilter[]>;
|
||||||
* The {@link AppliedFilter}s by filter name
|
|
||||||
*/
|
constructor(
|
||||||
@Input() appliedFilters: Map<string, AppliedFilter[]>;
|
protected searchService: SearchService,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.appliedFilters$ = this.searchService.appliedFilters$;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -21,8 +21,7 @@
|
|||||||
[currentConfiguration]="configuration"
|
[currentConfiguration]="configuration"
|
||||||
[filters]="filters"
|
[filters]="filters"
|
||||||
[refreshFilters]="refreshFilters"
|
[refreshFilters]="refreshFilters"
|
||||||
[inPlaceSearch]="inPlaceSearch"
|
[inPlaceSearch]="inPlaceSearch">
|
||||||
(changeAppliedFilters)="changeAppliedFilters.emit($event)">
|
|
||||||
</ds-themed-search-filters>
|
</ds-themed-search-filters>
|
||||||
<ds-advanced-search [configuration]="configuration"
|
<ds-advanced-search [configuration]="configuration"
|
||||||
[filtersConfig]="(filters | async)?.payload">
|
[filtersConfig]="(filters | async)?.payload">
|
||||||
|
@@ -7,7 +7,6 @@ import { SortOptions } from '../../../core/cache/models/sort-options.model';
|
|||||||
import { ViewMode } from '../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../core/shared/view-mode.model';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
||||||
import { AppliedFilter } from '../models/applied-filter.model';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component renders a simple item page.
|
* This component renders a simple item page.
|
||||||
@@ -96,11 +95,6 @@ export class SearchSidebarComponent {
|
|||||||
*/
|
*/
|
||||||
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter<SearchConfigurationOption>();
|
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter<SearchConfigurationOption>();
|
||||||
|
|
||||||
/**
|
|
||||||
* Emits the {@link AppliedFilter}s by search filter name
|
|
||||||
*/
|
|
||||||
@Output() changeAppliedFilters: EventEmitter<Map<string, AppliedFilter[]>> = new EventEmitter();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Emits event when the user select a new view mode
|
* Emits event when the user select a new view mode
|
||||||
*/
|
*/
|
||||||
|
@@ -8,7 +8,6 @@ import { PaginatedSearchOptions } from '../models/paginated-search-options.model
|
|||||||
import { BehaviorSubject, Observable } from 'rxjs';
|
import { BehaviorSubject, Observable } from 'rxjs';
|
||||||
import { RemoteData } from '../../../core/data/remote-data';
|
import { RemoteData } from '../../../core/data/remote-data';
|
||||||
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
import { SearchFilterConfig } from '../models/search-filter-config.model';
|
||||||
import { AppliedFilter } from '../models/applied-filter.model';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Themed wrapper for SearchSidebarComponent
|
* Themed wrapper for SearchSidebarComponent
|
||||||
@@ -33,14 +32,12 @@ export class ThemedSearchSidebarComponent extends ThemedComponent<SearchSidebarC
|
|||||||
@Input() refreshFilters: BehaviorSubject<boolean>;
|
@Input() refreshFilters: BehaviorSubject<boolean>;
|
||||||
@Output() toggleSidebar: EventEmitter<boolean> = new EventEmitter();
|
@Output() toggleSidebar: EventEmitter<boolean> = new EventEmitter();
|
||||||
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter();
|
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter();
|
||||||
@Output() changeAppliedFilters: EventEmitter<Map<string, AppliedFilter[]>> = new EventEmitter();
|
|
||||||
@Output() changeViewMode: EventEmitter<ViewMode> = new EventEmitter();
|
@Output() changeViewMode: EventEmitter<ViewMode> = new EventEmitter();
|
||||||
|
|
||||||
protected inAndOutputNames: (keyof SearchSidebarComponent & keyof this)[] = [
|
protected inAndOutputNames: (keyof SearchSidebarComponent & keyof this)[] = [
|
||||||
'configuration', 'configurationList', 'currentScope', 'currentSortOption',
|
'configuration', 'configurationList', 'currentScope', 'currentSortOption',
|
||||||
'resultCount', 'filters', 'viewModeList', 'showViewModes', 'inPlaceSearch',
|
'resultCount', 'filters', 'viewModeList', 'showViewModes', 'inPlaceSearch',
|
||||||
'searchOptions', 'sortOptionsList', 'refreshFilters', 'toggleSidebar', 'changeConfiguration',
|
'searchOptions', 'sortOptionsList', 'refreshFilters', 'toggleSidebar', 'changeConfiguration',
|
||||||
'changeAppliedFilters',
|
|
||||||
'changeViewMode',
|
'changeViewMode',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -61,7 +61,6 @@
|
|||||||
[viewModeList]="viewModeList"
|
[viewModeList]="viewModeList"
|
||||||
[showViewModes]="showViewModes"
|
[showViewModes]="showViewModes"
|
||||||
(changeConfiguration)="changeContext($event.context)"
|
(changeConfiguration)="changeContext($event.context)"
|
||||||
(changeAppliedFilters)="appliedFilters = $event"
|
|
||||||
(changeViewMode)="changeViewMode()"></ds-themed-search-sidebar>
|
(changeViewMode)="changeViewMode()"></ds-themed-search-sidebar>
|
||||||
<ds-themed-search-sidebar id="search-sidebar-sm" *ngIf="(isXsOrSm$ | async)"
|
<ds-themed-search-sidebar id="search-sidebar-sm" *ngIf="(isXsOrSm$ | async)"
|
||||||
[configurationList]="configurationList"
|
[configurationList]="configurationList"
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
[showViewModes]="showViewModes"
|
[showViewModes]="showViewModes"
|
||||||
(toggleSidebar)="closeSidebar()"
|
(toggleSidebar)="closeSidebar()"
|
||||||
(changeConfiguration)="changeContext($event.context)"
|
(changeConfiguration)="changeContext($event.context)"
|
||||||
(changeAppliedFilters)="appliedFilters = $event"
|
|
||||||
(changeViewMode)="changeViewMode()">
|
(changeViewMode)="changeViewMode()">
|
||||||
</ds-themed-search-sidebar>
|
</ds-themed-search-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@@ -93,7 +91,7 @@
|
|||||||
</ds-themed-search-form>
|
</ds-themed-search-form>
|
||||||
<div class="row mb-3 mb-md-1">
|
<div class="row mb-3 mb-md-1">
|
||||||
<div class="labels col-sm-9">
|
<div class="labels col-sm-9">
|
||||||
<ds-search-labels *ngIf="searchEnabled" [appliedFilters]="appliedFilters" [inPlaceSearch]="inPlaceSearch">
|
<ds-search-labels *ngIf="searchEnabled" [inPlaceSearch]="inPlaceSearch">
|
||||||
</ds-search-labels>
|
</ds-search-labels>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -38,7 +38,6 @@ import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model'
|
|||||||
import { ITEM_MODULE_PATH } from '../../item-page/item-page-routing-paths';
|
import { ITEM_MODULE_PATH } from '../../item-page/item-page-routing-paths';
|
||||||
import { COLLECTION_MODULE_PATH } from '../../collection-page/collection-page-routing-paths';
|
import { COLLECTION_MODULE_PATH } from '../../collection-page/collection-page-routing-paths';
|
||||||
import { COMMUNITY_MODULE_PATH } from '../../community-page/community-page-routing-paths';
|
import { COMMUNITY_MODULE_PATH } from '../../community-page/community-page-routing-paths';
|
||||||
import { AppliedFilter } from './models/applied-filter.model';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-search',
|
selector: 'ds-search',
|
||||||
@@ -269,11 +268,6 @@ export class SearchComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
@Output() selectObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
|
@Output() selectObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
|
||||||
|
|
||||||
/**
|
|
||||||
* The {@link AppliedFilter}s by filter name
|
|
||||||
*/
|
|
||||||
appliedFilters: Map<string, AppliedFilter[]> = new Map();
|
|
||||||
|
|
||||||
constructor(protected service: SearchService,
|
constructor(protected service: SearchService,
|
||||||
protected sidebarService: SidebarService,
|
protected sidebarService: SidebarService,
|
||||||
protected windowService: HostWindowService,
|
protected windowService: HostWindowService,
|
||||||
|
Reference in New Issue
Block a user