mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'use-applied-filter-to-display-label-on-search_contribute-7.6' into use-applied-filter-to-display-label-on-search_contribute-main
This commit is contained in:
@@ -1,28 +1,31 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input, Output, EventEmitter } 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
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-themed-search-filters',
|
selector: 'ds-themed-search-filters',
|
||||||
styleUrls: [],
|
|
||||||
templateUrl: '../../theme-support/themed.component.html',
|
templateUrl: '../../theme-support/themed.component.html',
|
||||||
})
|
})
|
||||||
export class ThemedSearchFiltersComponent extends ThemedComponent<SearchFiltersComponent> {
|
export class ThemedSearchFiltersComponent extends ThemedComponent<SearchFiltersComponent> {
|
||||||
|
|
||||||
@Input() currentConfiguration;
|
@Input() currentConfiguration: string;
|
||||||
@Input() currentScope: string;
|
@Input() currentScope: string;
|
||||||
@Input() inPlaceSearch;
|
@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 {
|
||||||
return 'SearchFiltersComponent';
|
return 'SearchFiltersComponent';
|
||||||
|
@@ -29,7 +29,7 @@ export class SearchSidebarComponent {
|
|||||||
/**
|
/**
|
||||||
* The configuration to use for the search options
|
* The configuration to use for the search options
|
||||||
*/
|
*/
|
||||||
@Input() configuration;
|
@Input() configuration: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of available configuration options
|
* The list of available configuration options
|
||||||
@@ -54,7 +54,7 @@ export class SearchSidebarComponent {
|
|||||||
/**
|
/**
|
||||||
* The total amount of results
|
* The total amount of results
|
||||||
*/
|
*/
|
||||||
@Input() resultCount;
|
@Input() resultCount: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The list of available view mode options
|
* The list of available view mode options
|
||||||
@@ -69,7 +69,7 @@ export class SearchSidebarComponent {
|
|||||||
/**
|
/**
|
||||||
* 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;
|
@Input() inPlaceSearch: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The configuration for the current paginated search results
|
* The configuration for the current paginated search results
|
||||||
|
@@ -8,37 +8,41 @@ 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
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-themed-search-sidebar',
|
selector: 'ds-themed-search-sidebar',
|
||||||
styleUrls: [],
|
|
||||||
templateUrl: '../../theme-support/themed.component.html',
|
templateUrl: '../../theme-support/themed.component.html',
|
||||||
})
|
})
|
||||||
export class ThemedSearchSidebarComponent extends ThemedComponent<SearchSidebarComponent> {
|
export class ThemedSearchSidebarComponent extends ThemedComponent<SearchSidebarComponent> {
|
||||||
|
|
||||||
@Input() configuration;
|
@Input() configuration: string;
|
||||||
@Input() configurationList: SearchConfigurationOption[];
|
@Input() configurationList: SearchConfigurationOption[];
|
||||||
@Input() currentScope: string;
|
@Input() currentScope: string;
|
||||||
@Input() currentSortOption: SortOptions;
|
@Input() currentSortOption: SortOptions;
|
||||||
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
|
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
|
||||||
@Input() resultCount;
|
@Input() resultCount: number;
|
||||||
@Input() viewModeList: ViewMode[];
|
@Input() viewModeList: ViewMode[];
|
||||||
@Input() showViewModes = true;
|
@Input() showViewModes: boolean;
|
||||||
@Input() inPlaceSearch;
|
@Input() inPlaceSearch: boolean;
|
||||||
@Input() searchOptions: PaginatedSearchOptions;
|
@Input() searchOptions: PaginatedSearchOptions;
|
||||||
@Input() sortOptionsList: SortOptions[];
|
@Input() sortOptionsList: SortOptions[];
|
||||||
@Input() refreshFilters: BehaviorSubject<boolean>;
|
@Input() refreshFilters: BehaviorSubject<boolean>;
|
||||||
@Output() toggleSidebar = new EventEmitter<boolean>();
|
@Output() toggleSidebar: EventEmitter<boolean> = new EventEmitter();
|
||||||
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter<SearchConfigurationOption>();
|
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter();
|
||||||
@Output() changeViewMode: EventEmitter<ViewMode> = new EventEmitter<ViewMode>();
|
@Output() changeAppliedFilters: EventEmitter<Map<string, AppliedFilter[]>> = 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', 'changeViewMode'];
|
'searchOptions', 'sortOptionsList', 'refreshFilters', 'toggleSidebar', 'changeConfiguration',
|
||||||
|
'changeAppliedFilters',
|
||||||
|
'changeViewMode',
|
||||||
|
];
|
||||||
|
|
||||||
protected getComponentName(): string {
|
protected getComponentName(): string {
|
||||||
return 'SearchSidebarComponent';
|
return 'SearchSidebarComponent';
|
||||||
|
Reference in New Issue
Block a user