Fixed in/outputs that changed for themed components

This commit is contained in:
lotte
2023-01-23 13:48:30 +01:00
parent 7ac4fbc387
commit 4682507b25
2 changed files with 10 additions and 4 deletions

View File

@@ -2,6 +2,8 @@ import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../../theme-support/themed.component';
import { SearchFiltersComponent } from './search-filters.component';
import { Observable } from 'rxjs/internal/Observable';
import { RemoteData } from '../../../core/data/remote-data';
import { SearchFilterConfig } from '../models/search-filter-config.model';
/**
* Themed wrapper for SearchFiltersComponent
@@ -17,9 +19,10 @@ export class ThemedSearchFiltersComponent extends ThemedComponent<SearchFiltersC
@Input() currentScope: string;
@Input() inPlaceSearch;
@Input() refreshFilters: Observable<any>;
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
protected inAndOutputNames: (keyof SearchFiltersComponent & keyof this)[] = [
'currentConfiguration', 'currentScope', 'inPlaceSearch', 'refreshFilters'];
'filters', 'currentConfiguration', 'currentScope', 'inPlaceSearch', 'refreshFilters'];
protected getComponentName(): string {
return 'SearchFiltersComponent';

View File

@@ -5,7 +5,9 @@ import { SearchConfigurationOption } from '../search-switch-configuration/search
import { SortOptions } from '../../../core/cache/models/sort-options.model';
import { ViewMode } from '../../../core/shared/view-mode.model';
import { PaginatedSearchOptions } from '../models/paginated-search-options.model';
import { Observable } from 'rxjs';
import { BehaviorSubject, Observable } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import { SearchFilterConfig } from '../models/search-filter-config.model';
/**
* Themed wrapper for SearchSidebarComponent
@@ -21,20 +23,21 @@ export class ThemedSearchSidebarComponent extends ThemedComponent<SearchSidebarC
@Input() configurationList: SearchConfigurationOption[];
@Input() currentScope: string;
@Input() currentSortOption: SortOptions;
@Input() filters: Observable<RemoteData<SearchFilterConfig[]>>;
@Input() resultCount;
@Input() viewModeList: ViewMode[];
@Input() showViewModes = true;
@Input() inPlaceSearch;
@Input() searchOptions: PaginatedSearchOptions;
@Input() sortOptionsList: SortOptions[];
@Input() refreshFilters: Observable<any>;
@Input() refreshFilters: BehaviorSubject<boolean>;
@Output() toggleSidebar = new EventEmitter<boolean>();
@Output() changeConfiguration: EventEmitter<SearchConfigurationOption> = new EventEmitter<SearchConfigurationOption>();
@Output() changeViewMode: EventEmitter<ViewMode> = new EventEmitter<ViewMode>();
protected inAndOutputNames: (keyof SearchSidebarComponent & keyof this)[] = [
'configuration', 'configurationList', 'currentScope', 'currentSortOption',
'resultCount', 'viewModeList', 'showViewModes', 'inPlaceSearch',
'resultCount', 'filters', 'viewModeList', 'showViewModes', 'inPlaceSearch',
'searchOptions', 'sortOptionsList', 'refreshFilters', 'toggleSidebar', 'changeConfiguration', 'changeViewMode'];
protected getComponentName(): string {