diff --git a/src/app/shared/dso-selector/dso-selector/themed-dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/themed-dso-selector.component.ts new file mode 100644 index 00000000000..7fe5c44624f --- /dev/null +++ b/src/app/shared/dso-selector/dso-selector/themed-dso-selector.component.ts @@ -0,0 +1,44 @@ +import { Component, Input, Output, EventEmitter } from '@angular/core'; +import { ThemedComponent } from '../../theme-support/themed.component'; +import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; +import { SortOptions } from '../../../core/cache/models/sort-options.model'; +import { DSpaceObject } from '../../../core/shared/dspace-object.model'; +import { DSOSelectorComponent } from './dso-selector.component'; + +/** + * Themed wrapper for {@link DSOSelectorComponent} + */ +@Component({ + selector: 'ds-themed-dso-selector', + templateUrl: '../../theme-support/themed.component.html', +}) +export class ThemedDSOSelectorComponent extends ThemedComponent { + + @Input() currentDSOId: string; + + @Input() types: DSpaceObjectType[]; + + @Input() sort: SortOptions; + + @Output() onSelect: EventEmitter = new EventEmitter(); + + protected inAndOutputNames: (keyof DSOSelectorComponent & keyof this)[] = [ + 'currentDSOId', + 'types', + 'sort', + 'onSelect', + ]; + + protected getComponentName(): string { + return 'DSOSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../themes/${themeName}/app/shared/dso-selector/dso-selector/dso-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./dso-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html index a13be638803..6281f0056a3 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html @@ -14,6 +14,6 @@

{{'dso-selector.create.community.sub-level' | translate}}
- + diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html index 54044f5d796..5e84228eb60 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html @@ -6,6 +6,6 @@ diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html index 85d8797e660..4a617d9545e 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html index 013274320b2..e191292c56d 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.html @@ -14,6 +14,6 @@

{{'dso-selector.' + action + '.' + objectType.toString().toLowerCase() + '.input-header' | translate}}
- + diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index e9fa707b508..2a5eb04a2c5 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -101,6 +101,7 @@ import { AutoFocusDirective } from './utils/auto-focus.directive'; import { StartsWithDateComponent } from './starts-with/date/starts-with-date.component'; import { StartsWithTextComponent } from './starts-with/text/starts-with-text.component'; import { DSOSelectorComponent } from './dso-selector/dso-selector/dso-selector.component'; +import { ThemedDSOSelectorComponent } from './dso-selector/dso-selector/themed-dso-selector.component'; import { CreateCommunityParentSelectorComponent } from './dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component'; @@ -366,6 +367,7 @@ const COMPONENTS = [ ValidationSuggestionsComponent, DsoInputSuggestionsComponent, DSOSelectorComponent, + ThemedDSOSelectorComponent, SearchExportCsvComponent, PageSizeSelectorComponent, ListableObjectComponentLoaderComponent, diff --git a/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.html b/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.scss b/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.scss new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.ts new file mode 100644 index 00000000000..91a02a1d8fb --- /dev/null +++ b/src/themes/custom/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { DSOSelectorComponent as BaseComponent } from '../../../../../../app/shared/dso-selector/dso-selector/dso-selector.component'; + +@Component({ + selector: 'ds-dso-selector', + // styleUrls: ['./dso-selector.component.scss'], + styleUrls: ['../../../../../../app/shared/dso-selector/dso-selector/dso-selector.component.scss'], + // templateUrl: './dso-selector.component.html', + templateUrl: '../../../../../../app/shared/dso-selector/dso-selector/dso-selector.component.html', +}) +export class DSOSelectorComponent extends BaseComponent { +} diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html index 54044f5d796..5e84228eb60 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html index a13be638803..6281f0056a3 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.html @@ -14,6 +14,6 @@

{{'dso-selector.create.community.sub-level' | translate}}
- + diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html index 54044f5d796..5e84228eb60 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html index 54044f5d796..5e84228eb60 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html index 85d8797e660..4a617d9545e 100644 --- a/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html +++ b/src/themes/custom/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.html @@ -6,6 +6,6 @@ diff --git a/src/themes/custom/lazy-theme.module.ts b/src/themes/custom/lazy-theme.module.ts index af4a6c78270..0c9824d8338 100644 --- a/src/themes/custom/lazy-theme.module.ts +++ b/src/themes/custom/lazy-theme.module.ts @@ -159,6 +159,7 @@ import { RequestCopyModule } from 'src/app/request-copy/request-copy.module'; import { AuthorizedCollectionSelectorComponent } from './app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component'; +import { DSOSelectorComponent } from './app/shared/dso-selector/dso-selector/dso-selector.component'; const DECLARATIONS = [ FileSectionComponent, @@ -243,6 +244,7 @@ const DECLARATIONS = [ ItemStatusComponent, EditBitstreamPageComponent, AuthorizedCollectionSelectorComponent, + DSOSelectorComponent, ]; @NgModule({