diff --git a/src/app/menu.resolver.ts b/src/app/menu.resolver.ts index 4c97d3d1b3..f12079f737 100644 --- a/src/app/menu.resolver.ts +++ b/src/app/menu.resolver.ts @@ -16,24 +16,24 @@ import { filter, find, map, take } from 'rxjs/operators'; import { hasValue } from './shared/empty.util'; import { FeatureID } from './core/data/feature-authorization/feature-id'; import { - CreateCommunityParentSelectorComponent -} from './shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component'; + ThemedCreateCommunityParentSelectorComponent +} from './shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component'; import { OnClickMenuItemModel } from './shared/menu/menu-item/models/onclick.model'; import { - CreateCollectionParentSelectorComponent -} from './shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component'; + ThemedCreateCollectionParentSelectorComponent +} from './shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component'; import { - CreateItemParentSelectorComponent -} from './shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component'; + ThemedCreateItemParentSelectorComponent +} from './shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component'; import { - EditCommunitySelectorComponent -} from './shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component'; + ThemedEditCommunitySelectorComponent +} from './shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component'; import { - EditCollectionSelectorComponent -} from './shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component'; + ThemedEditCollectionSelectorComponent +} from './shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component'; import { - EditItemSelectorComponent -} from './shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component'; + ThemedEditItemSelectorComponent +} from './shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component'; import { ExportMetadataSelectorComponent } from './shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component'; @@ -188,7 +188,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.new_community', function: () => { - this.modalService.open(CreateCommunityParentSelectorComponent); + this.modalService.open(ThemedCreateCommunityParentSelectorComponent); } } as OnClickMenuItemModel, }, @@ -201,7 +201,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.new_collection', function: () => { - this.modalService.open(CreateCollectionParentSelectorComponent); + this.modalService.open(ThemedCreateCollectionParentSelectorComponent); } } as OnClickMenuItemModel, }, @@ -214,7 +214,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.new_item', function: () => { - this.modalService.open(CreateItemParentSelectorComponent); + this.modalService.open(ThemedCreateItemParentSelectorComponent); } } as OnClickMenuItemModel, }, @@ -263,7 +263,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.edit_community', function: () => { - this.modalService.open(EditCommunitySelectorComponent); + this.modalService.open(ThemedEditCommunitySelectorComponent); } } as OnClickMenuItemModel, }, @@ -276,7 +276,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.edit_collection', function: () => { - this.modalService.open(EditCollectionSelectorComponent); + this.modalService.open(ThemedEditCollectionSelectorComponent); } } as OnClickMenuItemModel, }, @@ -289,7 +289,7 @@ export class MenuResolver implements Resolve { type: MenuItemType.ONCLICK, text: 'menu.section.edit_item', function: () => { - this.modalService.open(EditItemSelectorComponent); + this.modalService.open(ThemedEditItemSelectorComponent); } } as OnClickMenuItemModel, }, diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts new file mode 100644 index 0000000000..f6598aec99 --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts @@ -0,0 +1,28 @@ +import {Component} from "@angular/core"; +import {CreateCollectionParentSelectorComponent} from "./create-collection-parent-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for CreateCollectionParentSelectorComponent + */ +@Component({ + selector: 'ds-themed-create-collection-parent-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedCreateCollectionParentSelectorComponent + extends ThemedComponent { + + protected getComponentName(): string { + return 'CreateCollectionParentSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./create-collection-parent-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts new file mode 100644 index 0000000000..92621978b8 --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts @@ -0,0 +1,27 @@ +import {Component} from "@angular/core"; +import {CreateCommunityParentSelectorComponent} from "./create-community-parent-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for CreateCommunityParentSelectorComponent + */ +@Component({ + selector: 'ds-themed-create-community-parent-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedCreateCommunityParentSelectorComponent + extends ThemedComponent { + protected getComponentName(): string { + return 'CreateCommunityParentSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./create-community-parent-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts new file mode 100644 index 0000000000..70ab0d76ee --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts @@ -0,0 +1,31 @@ +import {Component, Input} from "@angular/core"; +import {CreateItemParentSelectorComponent} from "./create-item-parent-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for CreateItemParentSelectorComponent + */ +@Component({ + selector: 'ds-themed-create-item-parent-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedCreateItemParentSelectorComponent + extends ThemedComponent { + @Input() entityType: string; + + protected inAndOutputNames: (keyof CreateItemParentSelectorComponent & keyof this)[] = ['entityType']; + + protected getComponentName(): string { + return 'CreateItemParentSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./create-item-parent-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts new file mode 100644 index 0000000000..4e3191d03b --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts @@ -0,0 +1,27 @@ +import {Component} from "@angular/core"; +import {EditCollectionSelectorComponent} from "./edit-collection-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for EditCollectionSelectorComponent + */ +@Component({ + selector: 'ds-themed-edit-collection-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedEditCollectionSelectorComponent + extends ThemedComponent { + protected getComponentName(): string { + return 'EditCollectionSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./edit-collection-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts new file mode 100644 index 0000000000..d8232abcdb --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts @@ -0,0 +1,27 @@ +import {Component} from "@angular/core"; +import {EditCommunitySelectorComponent} from "./edit-community-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for EditCommunitySelectorComponent + */ +@Component({ + selector: 'ds-themed-edit-community-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedEditCommunitySelectorComponent + extends ThemedComponent { + protected getComponentName(): string { + return 'EditCommunitySelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./edit-community-selector.component'); + } + +} diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts new file mode 100644 index 0000000000..e1377e7fb4 --- /dev/null +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts @@ -0,0 +1,27 @@ +import {Component} from "@angular/core"; +import {EditItemSelectorComponent} from "./edit-item-selector.component"; +import {ThemedComponent} from "src/app/shared/theme-support/themed.component"; + +/** + * Themed wrapper for EditItemSelectorComponent + */ +@Component({ + selector: 'ds-themed-edit-item-selector', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html' +}) +export class ThemedEditItemSelectorComponent + extends ThemedComponent { + protected getComponentName(): string { + return 'EditItemSelectorComponent'; + } + + protected importThemedComponent(themeName: string): Promise { + return import(`../../../../../themes/${themeName}/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component`); + } + + protected importUnthemedComponent(): Promise { + return import('./edit-item-selector.component'); + } + +}