Skip to content

Commit

Permalink
Merged in CST-7695-FE (pull request DSpace#962)
Browse files Browse the repository at this point in the history
[CST-7695] relocate ItemListPreviewComponent and rollback other changes in modules

Approved-by: Giuseppe Digilio
  • Loading branch information
alisaismailati authored and atarix83 committed Oct 27, 2023
2 parents 24c9326 + 93f6916 commit ab53c37
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { ItemSharedModule } from '../../item-page/item-shared.module';
import { ResultsBackButtonModule } from '../../shared/results-back-button/results-back-button.module';
import { DsoPageModule } from '../../shared/dso-page/dso-page.module';
import { ContextMenuModule } from '../../shared/context-menu/context-menu.module';
import { MyDspaceSearchModule } from '../../my-dspace-page/my-dspace-search.module';

const ENTRY_COMPONENTS = [
// put only entry components that use custom decorator
Expand Down Expand Up @@ -78,7 +77,6 @@ const COMPONENTS = [
DsoPageModule,
NgbTooltipModule,
ContextMenuModule.withEntryComponents(),
MyDspaceSearchModule,
],
declarations: [
...COMPONENTS,
Expand Down
2 changes: 1 addition & 1 deletion src/app/my-dspace-page/my-dspace-page.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const DECLARATIONS = [
],
declarations: DECLARATIONS,
providers: [
MyDSpaceConfigurationService,
MyDSpaceGuard,
MyDSpaceConfigurationService
],
exports: DECLARATIONS,
})
Expand Down
12 changes: 2 additions & 10 deletions src/app/my-dspace-page/my-dspace-search.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ import { WorkflowItemSearchResultListElementComponent } from '../shared/object-l
import { PoolSearchResultDetailElementComponent } from '../shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component';
import { ClaimedApprovedSearchResultListElementComponent } from '../shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component';
import { ClaimedDeclinedSearchResultListElementComponent } from '../shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component';
import { ItemCollectionComponent } from '../shared/object-collection/shared/mydspace-item-collection/item-collection.component';
import { ResearchEntitiesModule } from '../entity-groups/research-entities/research-entities.module';
import { ItemDetailPreviewComponent } from '../shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component';
import { ItemDetailPreviewFieldComponent } from '../shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component';
import { ItemListPreviewComponent } from '../shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component';
import { ThemedItemListPreviewComponent } from '../shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component';
import { MyDSpaceItemStatusComponent } from '../shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component';
import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal-entities.module';
import { MyDSpaceActionsModule } from '../shared/mydspace-actions/mydspace-actions.module';
import { ClaimedDeclinedTaskSearchResultListElementComponent } from '../shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component';
import { MyDSpaceConfigurationService } from './my-dspace-configuration.service';

const ENTRY_COMPONENTS = [
WorkspaceItemSearchResultListElementComponent,
Expand All @@ -45,12 +41,8 @@ const ENTRY_COMPONENTS = [

const DECLARATIONS = [
...ENTRY_COMPONENTS,
ItemCollectionComponent,
ItemDetailPreviewComponent,
ItemDetailPreviewFieldComponent,
ItemListPreviewComponent,
ThemedItemListPreviewComponent,
MyDSpaceItemStatusComponent,
];

@NgModule({
Expand All @@ -59,9 +51,9 @@ const DECLARATIONS = [
SharedModule,
MyDspacePageRoutingModule,
MyDSpaceActionsModule,
ResearchEntitiesModule.withEntryComponents(),
JournalEntitiesModule.withEntryComponents(),
],
providers: [MyDSpaceConfigurationService],
declarations: [
...DECLARATIONS,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { DuplicateMatchMetadataDetailConfig } from 'src/app/submission/sections/
templateUrl: '../../../theme-support/themed.component.html'
})
export class ThemedItemListPreviewComponent extends ThemedComponent<ItemListPreviewComponent> {
protected inAndOutputNames: (keyof ItemListPreviewComponent & keyof this)[] = ['item', 'object', 'status', 'showSubmitter', 'workflowItem'];
protected inAndOutputNames: (keyof ItemListPreviewComponent & keyof this)[] = ['item', 'object', 'status', 'showSubmitter', 'workflowItem', 'metadataList'];

@Input() item: Item;

Expand Down
8 changes: 8 additions & 0 deletions src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ import { EntityIconDirective } from './entity-icon/entity-icon.directive';
import {
AdditionalMetadataComponent
} from './object-list/search-result-list-element/additional-metadata/additional-metadata.component';
import { MyDSpaceItemStatusComponent } from './object-collection/shared/mydspace-item-status/my-dspace-item-status.component';
import { ItemCollectionComponent } from './object-collection/shared/mydspace-item-collection/item-collection.component';
import { ThemedItemListPreviewComponent } from './object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component';
import { ItemListPreviewComponent } from './object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component';

const MODULES = [
CommonModule,
Expand Down Expand Up @@ -472,6 +476,10 @@ const COMPONENTS = [
ExportExcelSelectorComponent,
ThemedBrowseMostElementsComponent,
SearchChartBarHorizontalComponent,
ItemListPreviewComponent,
ThemedItemListPreviewComponent,
MyDSpaceItemStatusComponent,
ItemCollectionComponent
];

const ENTRY_COMPONENTS = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ds-item-list-preview
<ds-themed-item-list-preview
[item]="item"
[object]="object"
[metadataList]="metadataList"
></ds-item-list-preview>
></ds-themed-item-list-preview>

<div *ngIf="isWorkFlow" class="mt-2">
<form>
Expand Down

0 comments on commit ab53c37

Please sign in to comment.