97281: Added ItemSearchResultListElementComponent & PublicationSidebarSearchListElementComponent to custom theme

This commit is contained in:
Alexandre Vryghem
2022-12-06 20:42:06 +01:00
parent e8dda89f19
commit b3c65f59a4
6 changed files with 66 additions and 14 deletions

View File

@@ -0,0 +1,24 @@
import { Component } from '@angular/core';
import {
listableObjectComponent
} from '../../../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator';
import { ViewMode } from '../../../../../../../../../app/core/shared/view-mode.model';
import {
ItemSearchResult
} from '../../../../../../../../../app/shared/object-collection/shared/item-search-result.model';
import {
ItemSearchResultListElementComponent as BaseComponent
} from '../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component';
import { Context } from '../../../../../../../../../app/core/shared/context.model';
@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.Any, 'custom')
@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.Any, 'custom')
@Component({
selector: 'ds-item-search-result-list-element',
// styleUrls: ['./item-search-result-list-element.component.scss'],
styleUrls: ['../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.scss'],
// templateUrl: './item-search-result-list-element.component.html',
templateUrl: '../../../../../../../../../app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html',
})
export class ItemSearchResultListElementComponent extends BaseComponent {
}

View File

@@ -0,0 +1,20 @@
import { listableObjectComponent } from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator';
import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model';
import { Component } from '@angular/core';
import { Context } from '../../../../../../../app/core/shared/context.model';
import { ItemSearchResult } from '../../../../../../../app/shared/object-collection/shared/item-search-result.model';
import {
PublicationSidebarSearchListElementComponent as BaseComponent
} from '../../../../../../../app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component';
@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModal, 'custom')
@listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent, 'custom')
@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModal, 'custom')
@listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModalCurrent, 'custom')
@Component({
selector: 'ds-publication-sidebar-search-list-element',
// templateUrl: './publication-sidebar-search-list-element.component.html',
templateUrl: '../../../../../../../app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html',
})
export class PublicationSidebarSearchListElementComponent extends BaseComponent {
}

View File

@@ -45,6 +45,12 @@ import { SharedBrowseByModule } from '../../app/shared/browse-by/shared-browse-b
import { ResultsBackButtonModule } from '../../app/shared/results-back-button/results-back-button.module';
import { StartsWithDateComponent } from './app/shared/starts-with/date/starts-with-date.component';
import { StartsWithTextComponent } from './app/shared/starts-with/text/starts-with-text.component';
import {
PublicationSidebarSearchListElementComponent
} from './app/shared/object-list/sidebar-search-list-element/item-types/publication-sidebar-search-list-element.component';
import {
ItemSearchResultListElementComponent
} from './app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component';
/**
* Add components that use a custom decorator to ENTRY_COMPONENTS as well as DECLARATIONS.
@@ -61,6 +67,8 @@ const ENTRY_COMPONENTS = [
CollectionDropdownComponent,
StartsWithDateComponent,
StartsWithTextComponent,
PublicationSidebarSearchListElementComponent,
ItemSearchResultListElementComponent,
];
const DECLARATIONS = [
@@ -80,20 +88,20 @@ const DECLARATIONS = [
];
@NgModule({
imports: [
CommonModule,
SharedModule,
RootModule,
NavbarModule,
SharedBrowseByModule,
ResultsBackButtonModule,
ItemPageModule,
ItemSharedModule,
],
declarations: DECLARATIONS,
providers: [
...ENTRY_COMPONENTS.map((component) => ({provide: component}))
],
imports: [
CommonModule,
SharedModule,
RootModule,
NavbarModule,
SharedBrowseByModule,
ResultsBackButtonModule,
ItemPageModule,
ItemSharedModule,
],
declarations: DECLARATIONS,
providers: [
...ENTRY_COMPONENTS.map((component) => ({provide: component}))
],
})
/**
* This module is included in the main bundle that gets downloaded at first page load. So it should