mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
100479: Removed the default input values to make it possible to override them in themes
This commit is contained in:
@@ -14,8 +14,8 @@ import { ThemeService } from '../theme-support/theme.service';
|
||||
export class ThemedLoadingComponent extends ThemedComponent<LoadingComponent> {
|
||||
|
||||
@Input() message: string;
|
||||
@Input() showMessage = true;
|
||||
@Input() spinner = false;
|
||||
@Input() showMessage: boolean;
|
||||
@Input() spinner: boolean;
|
||||
|
||||
protected inAndOutputNames: (keyof LoadingComponent & keyof this)[] = ['message', 'showMessage', 'spinner'];
|
||||
|
||||
|
@@ -22,7 +22,7 @@ export class ThemedItemListPreviewComponent extends ThemedComponent<ItemListPrev
|
||||
|
||||
@Input() status: MyDspaceItemStatusType;
|
||||
|
||||
@Input() showSubmitter = false;
|
||||
@Input() showSubmitter: boolean;
|
||||
|
||||
|
||||
protected getComponentName(): string {
|
||||
|
@@ -19,10 +19,6 @@ import {ListableObject} from '../object-collection/shared/listable-object.model'
|
||||
templateUrl: '../theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedObjectListComponent extends ThemedComponent<ObjectListComponent> {
|
||||
/**
|
||||
* The view mode of the this component
|
||||
*/
|
||||
viewMode = ViewMode.ListElement;
|
||||
|
||||
/**
|
||||
* The current pagination configuration
|
||||
@@ -37,18 +33,20 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
/**
|
||||
* Whether or not the list elements have a border
|
||||
*/
|
||||
@Input() hasBorder = false;
|
||||
@Input() hasBorder: boolean;
|
||||
|
||||
/**
|
||||
* The whether or not the gear is hidden
|
||||
*/
|
||||
@Input() hideGear = false;
|
||||
@Input() hideGear: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the pager is visible when there is only a single page of results
|
||||
*/
|
||||
@Input() hidePagerWhenSinglePage = true;
|
||||
@Input() selectable = false;
|
||||
@Input() hidePagerWhenSinglePage: boolean;
|
||||
|
||||
@Input() selectable: boolean;
|
||||
|
||||
@Input() selectionConfig: { repeatable: boolean, listId: string };
|
||||
|
||||
/**
|
||||
@@ -64,12 +62,12 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
/**
|
||||
* Option for hiding the pagination detail
|
||||
*/
|
||||
@Input() hidePaginationDetail = false;
|
||||
@Input() hidePaginationDetail: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not to add an import button to the object
|
||||
*/
|
||||
@Input() importable = false;
|
||||
@Input() importable: boolean;
|
||||
|
||||
/**
|
||||
* Config used for the import button
|
||||
@@ -79,42 +77,24 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
/**
|
||||
* Whether or not the pagination should be rendered as simple previous and next buttons instead of the normal pagination
|
||||
*/
|
||||
@Input() showPaginator = true;
|
||||
@Input() showPaginator: boolean;
|
||||
|
||||
/**
|
||||
* Emit when one of the listed object has changed.
|
||||
*/
|
||||
@Output() contentChange = new EventEmitter<any>();
|
||||
@Output() contentChange: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* If showPaginator is set to true, emit when the previous button is clicked
|
||||
*/
|
||||
@Output() prev = new EventEmitter<boolean>();
|
||||
@Output() prev: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* If showPaginator is set to true, emit when the next button is clicked
|
||||
*/
|
||||
@Output() next = new EventEmitter<boolean>();
|
||||
@Output() next: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* The current listable objects
|
||||
*/
|
||||
private _objects: RemoteData<PaginatedList<ListableObject>>;
|
||||
|
||||
/**
|
||||
* Setter for the objects
|
||||
* @param objects The new objects
|
||||
*/
|
||||
@Input() set objects(objects: RemoteData<PaginatedList<ListableObject>>) {
|
||||
this._objects = objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter to return the current objects
|
||||
*/
|
||||
get objects() {
|
||||
return this._objects;
|
||||
}
|
||||
@Input() objects: RemoteData<PaginatedList<ListableObject>>;
|
||||
|
||||
/**
|
||||
* An event fired when the page is changed.
|
||||
@@ -123,48 +103,45 @@ export class ThemedObjectListComponent extends ThemedComponent<ObjectListCompone
|
||||
@Output() change: EventEmitter<{
|
||||
pagination: PaginationComponentOptions,
|
||||
sort: SortOptions
|
||||
}> = new EventEmitter<{
|
||||
pagination: PaginationComponentOptions,
|
||||
sort: SortOptions
|
||||
}>();
|
||||
}> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* An event fired when the page is changed.
|
||||
* Event's payload equals to the newly selected page.
|
||||
*/
|
||||
@Output() pageChange: EventEmitter<number> = new EventEmitter<number>();
|
||||
@Output() pageChange: EventEmitter<number> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* An event fired when the page wsize is changed.
|
||||
* Event's payload equals to the newly selected page size.
|
||||
*/
|
||||
@Output() pageSizeChange: EventEmitter<number> = new EventEmitter<number>();
|
||||
@Output() pageSizeChange: EventEmitter<number> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* An event fired when the sort direction is changed.
|
||||
* Event's payload equals to the newly selected sort direction.
|
||||
*/
|
||||
@Output() sortDirectionChange: EventEmitter<SortDirection> = new EventEmitter<SortDirection>();
|
||||
@Output() sortDirectionChange: EventEmitter<SortDirection> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* An event fired when on of the pagination parameters changes
|
||||
*/
|
||||
@Output() paginationChange: EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() paginationChange: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@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();
|
||||
|
||||
/**
|
||||
* Send an import event to the parent component
|
||||
*/
|
||||
@Output() importObject: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
|
||||
@Output() importObject: EventEmitter<ListableObject> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* An event fired when the sort field is changed.
|
||||
* Event's payload equals to the newly selected sort field.
|
||||
*/
|
||||
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter<string>();
|
||||
@Output() sortFieldChange: EventEmitter<string> = new EventEmitter();
|
||||
|
||||
inAndOutputNames: (keyof ObjectListComponent & keyof this)[] = [
|
||||
'config',
|
||||
|
@@ -35,21 +35,21 @@ export class ThemedSearchResultsComponent extends ThemedComponent<SearchResultsC
|
||||
|
||||
@Input() configuration: string;
|
||||
|
||||
@Input() disableHeader = false;
|
||||
@Input() disableHeader: boolean;
|
||||
|
||||
@Input() selectable = false;
|
||||
@Input() selectable: boolean;
|
||||
|
||||
@Input() context: Context;
|
||||
|
||||
@Input() hidePaginationDetail = false;
|
||||
@Input() hidePaginationDetail: boolean;
|
||||
|
||||
@Input() selectionConfig: SelectionConfig = null;
|
||||
@Input() selectionConfig: SelectionConfig;
|
||||
|
||||
@Output() contentChange: EventEmitter<ListableObject> = new EventEmitter<ListableObject>();
|
||||
@Output() contentChange: EventEmitter<ListableObject> = new EventEmitter();
|
||||
|
||||
@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();
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'SearchResultsComponent';
|
||||
|
@@ -21,49 +21,49 @@ import { ListableObject } from '../object-collection/shared/listable-object.mode
|
||||
export class ThemedSearchComponent extends ThemedComponent<SearchComponent> {
|
||||
protected inAndOutputNames: (keyof SearchComponent & keyof this)[] = ['configurationList', 'context', 'configuration', 'fixedFilterQuery', 'useCachedVersionIfAvailable', 'inPlaceSearch', 'linkType', 'paginationId', 'searchEnabled', 'sideBarWidth', 'searchFormPlaceholder', 'selectable', 'selectionConfig', 'showSidebar', 'showViewModes', 'useUniquePageId', 'viewModeList', 'showScopeSelector', 'resultFound', 'deselectObject', 'selectObject', 'trackStatistics'];
|
||||
|
||||
@Input() configurationList: SearchConfigurationOption[] = [];
|
||||
@Input() configurationList: SearchConfigurationOption[];
|
||||
|
||||
@Input() context: Context = Context.Search;
|
||||
@Input() context: Context;
|
||||
|
||||
@Input() configuration = 'default';
|
||||
@Input() configuration: string;
|
||||
|
||||
@Input() fixedFilterQuery: string;
|
||||
|
||||
@Input() useCachedVersionIfAvailable = true;
|
||||
@Input() useCachedVersionIfAvailable: boolean;
|
||||
|
||||
@Input() inPlaceSearch = true;
|
||||
@Input() inPlaceSearch: boolean;
|
||||
|
||||
@Input() linkType: CollectionElementLinkType;
|
||||
|
||||
@Input() paginationId = 'spc';
|
||||
@Input() paginationId: string;
|
||||
|
||||
@Input() searchEnabled = true;
|
||||
@Input() searchEnabled: boolean;
|
||||
|
||||
@Input() sideBarWidth = 3;
|
||||
@Input() sideBarWidth: number;
|
||||
|
||||
@Input() searchFormPlaceholder = 'search.search-form.placeholder';
|
||||
@Input() searchFormPlaceholder: string;
|
||||
|
||||
@Input() selectable = false;
|
||||
@Input() selectable: boolean;
|
||||
|
||||
@Input() selectionConfig: SelectionConfig;
|
||||
|
||||
@Input() showSidebar = true;
|
||||
@Input() showSidebar: boolean;
|
||||
|
||||
@Input() showViewModes = true;
|
||||
@Input() showViewModes: boolean;
|
||||
|
||||
@Input() useUniquePageId: false;
|
||||
@Input() useUniquePageId: boolean;
|
||||
|
||||
@Input() viewModeList: ViewMode[];
|
||||
|
||||
@Input() showScopeSelector = true;
|
||||
@Input() showScopeSelector: boolean;
|
||||
|
||||
@Input() trackStatistics = false;
|
||||
@Input() trackStatistics: boolean;
|
||||
|
||||
@Output() resultFound: EventEmitter<SearchObjects<DSpaceObject>> = new EventEmitter<SearchObjects<DSpaceObject>>();
|
||||
@Output() resultFound: EventEmitter<SearchObjects<DSpaceObject>> = new EventEmitter();
|
||||
|
||||
@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();
|
||||
|
||||
protected getComponentName(): string {
|
||||
return 'SearchComponent';
|
||||
|
Reference in New Issue
Block a user