-
Notifications
You must be signed in to change notification settings - Fork 543
Expand file tree
/
Copy paththemed-search-form.component.ts
More file actions
68 lines (50 loc) · 1.47 KB
/
themed-search-form.component.ts
File metadata and controls
68 lines (50 loc) · 1.47 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
import {
Component,
EventEmitter,
Input,
Output,
} from '@angular/core';
import { ThemedComponent } from '../theme-support/themed.component';
import { SearchFormComponent } from './search-form.component';
/**
* Themed wrapper for {@link SearchFormComponent}
*/
@Component({
selector: 'ds-search-form',
templateUrl: '../../shared/theme-support/themed.component.html',
})
export class ThemedSearchFormComponent extends ThemedComponent<SearchFormComponent> {
@Input() query: string;
@Input() expert: boolean;
@Input() inPlaceSearch: boolean;
@Input() scope: string;
@Input() hideScopeInUrl: boolean;
@Input() currentUrl: string;
@Input() large: boolean;
@Input() brandColor: string;
@Input() searchPlaceholder: string;
@Input() showScopeSelector: boolean;
@Output() submitSearch: EventEmitter<any> = new EventEmitter();
protected inAndOutputNames: (keyof SearchFormComponent & keyof this)[] = [
'query',
'expert',
'inPlaceSearch',
'scope',
'hideScopeInUrl',
'currentUrl',
'large',
'brandColor',
'searchPlaceholder',
'showScopeSelector',
'submitSearch',
];
protected getComponentName(): string {
return 'SearchFormComponent';
}
protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/shared/search-form/search-form.component`);
}
protected importUnthemedComponent(): Promise<any> {
return import('./search-form.component');
}
}