Add support for dynamic themes

This commit is contained in:
Art Lowel
2021-02-25 15:04:32 +01:00
parent 70dac6bc8f
commit 5a6e4b1278
224 changed files with 3429 additions and 1017 deletions

View File

@@ -6,6 +6,7 @@ import { GenericConstructor } from '../../core/shared/generic-constructor';
import { MetadataRepresentationListElementComponent } from '../object-list/metadata-representation-list-element/metadata-representation-list-element.component';
import { MetadataRepresentationDirective } from './metadata-representation.directive';
import { hasValue } from '../empty.util';
import { ThemeService } from '../theme-support/theme.service';
@Component({
selector: 'ds-metadata-representation-loader',
@@ -42,7 +43,10 @@ export class MetadataRepresentationLoaderComponent implements OnInit {
*/
@ViewChild(MetadataRepresentationDirective, {static: true}) mdRepDirective: MetadataRepresentationDirective;
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
constructor(
private componentFactoryResolver: ComponentFactoryResolver,
private themeService: ThemeService
) {
}
/**
@@ -64,6 +68,6 @@ export class MetadataRepresentationLoaderComponent implements OnInit {
* @returns {string}
*/
private getComponent(): GenericConstructor<MetadataRepresentationListElementComponent> {
return getMetadataRepresentationComponent(this.mdRepresentation.itemType, this.mdRepresentation.representationType, this.context);
return getMetadataRepresentationComponent(this.mdRepresentation.itemType, this.mdRepresentation.representationType, this.context, this.themeService.getThemeName());
}
}