-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ItemSearchResultListElementComponent themeable.
- Loading branch information
1 parent
32bac12
commit ad8e57a
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...app/shared/object-list/item-list-element/item-types/item/item-list-element.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<ds-item-search-result-list-element [showLabel]="showLabel" [object]="{ indexableObject: object, hitHighlights: {} }" [linkType]="linkType"></ds-item-search-result-list-element> | ||
<ds-themed-item-search-result-list-element [showLabel]="showLabel" [object]="{ indexableObject: object, hitHighlights: {} }" [linkType]="linkType"></ds-themed-item-search-result-list-element> |
37 changes: 37 additions & 0 deletions
37
...nt/item-search-result/item-types/item/themed-item-search-result-list-element.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { CollectionElementLinkType } from 'src/app/shared/object-collection/collection-element-link.type'; | ||
import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; | ||
import { ItemSearchResultListElementComponent } from './item-search-result-list-element.component'; | ||
|
||
/* | ||
* Themed wrapper for ItemSearchResultListElementComponent | ||
*/ | ||
|
||
@Component({ | ||
selector: 'ds-themed-item-search-result-list-element', | ||
styleUrls: [], | ||
templateUrl: '../../../../../../../app/shared/theme-support/themed.component.html', | ||
}) | ||
export class ThemedItemSearchResultListElementComponent | ||
extends ThemedComponent<ItemSearchResultListElementComponent> { | ||
@Input() showLabel: boolean; | ||
@Input() object: any; | ||
@Input() linkType: CollectionElementLinkType; | ||
protected inAndOutputNames: (keyof ItemSearchResultListElementComponent & keyof this)[] = [ | ||
'showLabel', | ||
'object', | ||
'linkType', | ||
]; | ||
|
||
protected getComponentName(): string { | ||
return 'ItemSearchResultListElementComponent'; | ||
} | ||
|
||
protected importThemedComponent(themeName: string): Promise<any> { | ||
return import(`../../../../../../../themes/${themeName}/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component`); | ||
} | ||
|
||
protected importUnthemedComponent(): Promise<any> { | ||
return import('./item-search-result-list-element.component'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters