100479: Removed the default input values to make it possible to override them in themes

This commit is contained in:
Alexandre Vryghem
2023-03-27 13:09:10 +02:00
parent 7b27251cf2
commit fc7997d8b8
7 changed files with 10 additions and 45 deletions

View File

@@ -19,7 +19,7 @@ export class ThemedMetadataRepresentationListComponent extends ThemedComponent<M
@Input() label: string;
@Input() incrementBy = 10;
@Input() incrementBy: number;
protected getComponentName(): string {
return 'MetadataRepresentationListComponent';

View File

@@ -11,11 +11,11 @@ export class ThemedCollectionDropdownComponent extends ThemedComponent<Collectio
@Input() entityType: string;
@Output() searchComplete = new EventEmitter<any>();
@Output() searchComplete: EventEmitter<any> = new EventEmitter();
@Output() theOnlySelectable = new EventEmitter<CollectionListEntry>();
@Output() theOnlySelectable: EventEmitter<CollectionListEntry> = new EventEmitter();
@Output() selectionChange = new EventEmitter<CollectionListEntry>();
@Output() selectionChange = new EventEmitter();
protected inAndOutputNames: (keyof CollectionDropdownComponent & keyof this)[] = ['entityType', 'searchComplete', 'theOnlySelectable', 'selectionChange'];

View File

@@ -4,27 +4,14 @@ import { RelationshipOptions } from '../../../models/relationship-options.model'
import { ListableObject } from '../../../../../object-collection/shared/listable-object.model';
import { Context } from '../../../../../../core/shared/context.model';
import { Item } from '../../../../../../core/shared/item.model';
import { SEARCH_CONFIG_SERVICE } from '../../../../../../my-dspace-page/my-dspace-page.component';
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
import { Collection } from '../../../../../../core/shared/collection.model';
import { ExternalSource } from '../../../../../../core/shared/external-source.model';
import { DsDynamicLookupRelationExternalSourceTabComponent } from './dynamic-lookup-relation-external-source-tab.component';
import { fadeIn, fadeInOut } from '../../../../../animations/fade';
@Component({
selector: 'ds-themed-dynamic-lookup-relation-external-source-tab',
styleUrls: [],
templateUrl: '../../../../../theme-support/themed.component.html',
providers: [
{
provide: SEARCH_CONFIG_SERVICE,
useClass: SearchConfigurationService
}
],
animations: [
fadeIn,
fadeInOut
]
})
export class ThemedDynamicLookupRelationExternalSourceTabComponent extends ThemedComponent<DsDynamicLookupRelationExternalSourceTabComponent> {
protected inAndOutputNames: (keyof DsDynamicLookupRelationExternalSourceTabComponent & keyof this)[] = ['label', 'listId',
@@ -44,7 +31,7 @@ export class ThemedDynamicLookupRelationExternalSourceTabComponent extends Theme
@Input() repeatable: boolean;
@Output() importedObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
@Output() importedObject: EventEmitter<ListableObject> = new EventEmitter();
@Input() externalSource: ExternalSource;

View File

@@ -10,19 +10,11 @@ import { Item } from '../../../../../../core/shared/item.model';
import { SearchResult } from '../../../../../search/models/search-result.model';
import { SearchObjects } from '../../../../../search/models/search-objects.model';
import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model';
import { SEARCH_CONFIG_SERVICE } from '../../../../../../my-dspace-page/my-dspace-page.component';
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
@Component({
selector: 'ds-themed-dynamic-lookup-relation-search-tab',
styleUrls: [],
templateUrl: '../../../../../theme-support/themed.component.html',
providers: [
{
provide: SEARCH_CONFIG_SERVICE,
useClass: SearchConfigurationService
}
]
})
export class ThemedDynamicLookupRelationSearchTabComponent extends ThemedComponent<DsDynamicLookupRelationSearchTabComponent> {
protected inAndOutputNames: (keyof DsDynamicLookupRelationSearchTabComponent & keyof this)[] = ['relationship', 'listId',
@@ -51,11 +43,11 @@ export class ThemedDynamicLookupRelationSearchTabComponent extends ThemedCompone
@Input() isEditRelationship: boolean;
@Output() deselectObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
@Output() deselectObject: EventEmitter<ListableObject> = new EventEmitter();
@Output() selectObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
@Output() selectObject: EventEmitter<ListableObject> = new EventEmitter();
@Output() resultFound: EventEmitter<SearchObjects<DSpaceObject>> = new EventEmitter<SearchObjects<DSpaceObject>>();
@Output() resultFound: EventEmitter<SearchObjects<DSpaceObject>> = new EventEmitter();
protected getComponentName(): string {
return 'DsDynamicLookupRelationSearchTabComponent';

View File

@@ -1,11 +1,10 @@
import { ChangeDetectorRef, Component, ComponentFactoryResolver, Input } from '@angular/core';
import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../../../theme-support/themed.component';
import { ItemListPreviewComponent } from './item-list-preview.component';
import { Item } from '../../../../core/shared/item.model';
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
import { SearchResult } from '../../../search/models/search-result.model';
import { WorkflowItem } from 'src/app/core/submission/models/workflowitem.model';
import { ThemeService } from 'src/app/shared/theme-support/theme.service';
/**
* Themed wrapper for ItemListPreviewComponent
@@ -28,18 +27,6 @@ export class ThemedItemListPreviewComponent extends ThemedComponent<ItemListPrev
@Input() workflowItem: WorkflowItem;
constructor(
protected resolver: ComponentFactoryResolver,
protected cdr: ChangeDetectorRef,
protected themeService: ThemeService,
) {
super(resolver, cdr, themeService);
}
ngOnInit() {
super.ngOnInit();
}
protected getComponentName(): string {
return 'ItemListPreviewComponent';
}

View File

@@ -1,7 +1,6 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';
import { ObjectListComponent } from './object-list.component';
import { ThemedComponent } from '../theme-support/themed.component';
import {ViewMode} from '../../core/shared/view-mode.model';
import {PaginationComponentOptions} from '../pagination/pagination-component-options.model';
import {SortDirection, SortOptions} from '../../core/cache/models/sort-options.model';
import {CollectionElementLinkType} from '../object-collection/collection-element-link.type';

View File

@@ -29,7 +29,7 @@ export class ThemedSearchResultsComponent extends ThemedComponent<SearchResultsC
@Input() searchConfig: PaginatedSearchOptions;
@Input() showCsvExport = false;
@Input() showCsvExport: boolean;
@Input() sortConfig: SortOptions;