-
Notifications
You must be signed in to change notification settings - Fork 566
Expand file tree
/
Copy pathsearch-configuration-service.stub.ts
More file actions
81 lines (62 loc) · 1.97 KB
/
Copy pathsearch-configuration-service.stub.ts
File metadata and controls
81 lines (62 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { Params } from '@angular/router';
import {
BehaviorSubject,
Observable,
of,
} from 'rxjs';
import { PaginatedSearchOptions } from '../shared/search/models/paginated-search-options.model';
import { SearchOptions } from '../shared/search/models/search-options.model';
import {
FilterConfig,
SearchConfig,
} from '../shared/search/search-filters/search-config.model';
/**
* Stub class of {@link SearchConfigurationService}
*/
export class SearchConfigurationServiceStub {
public searchInstanceId = 'test-id';
public searchOptions: BehaviorSubject<SearchOptions> = new BehaviorSubject(new SearchOptions({}));
public paginatedSearchOptions: BehaviorSubject<PaginatedSearchOptions> = new BehaviorSubject(new PaginatedSearchOptions({}));
getCurrentFrontendFilters() {
return of([]);
}
getCurrentFilters() {
return of([]);
}
getCurrentSearchInstanceParam(param: string) {
return `${this.searchInstanceId}.${param}`;
}
getCurrentSearchInstanceFilterParam(param: string) {
return `${this.searchInstanceId}.${param}`;
}
getCurrentPageParam() {
return `${this.searchInstanceId}.page`;
}
getCurrentScope(a) {
return of('test-id');
}
getCurrentQuery(a) {
return of(a);
}
getCurrentConfiguration(a) {
return of(a);
}
getConfigurationAdvancedSearchFilters(_configuration: string, _scope?: string): Observable<FilterConfig[]> {
return of([]);
}
getConfig () {
return of({ hasSucceeded: true, payload: [] });
}
getConfigurationSearchConfig(_configuration: string, _scope?: string): Observable<SearchConfig> {
return of(new SearchConfig());
}
getAvailableConfigurationOptions() {
return of([{ value: 'test', label: 'test' }]);
}
unselectAppliedFilterParams(_filterName: string, _value: string, _operator?: string): Observable<Params> {
return of({});
}
selectNewAppliedFilterParams(_filterName: string, _value: string, _operator?: string): Observable<Params> {
return of({});
}
}