55 OnInit ,
66} from '@angular/core' ;
77import {
8- CrisRefConfig ,
9- CrisRefEntityStyleConfig ,
8+ AuthorityRefConfig ,
9+ AuthorityRefEntityStyleConfig ,
1010} from '@dspace/config/layout-config.interfaces' ;
1111import {
1212 isEmpty ,
@@ -46,9 +46,9 @@ export class EntityIconDirective implements OnInit {
4646 @Input ( ) iconPosition = 'after' ;
4747
4848 /**
49- * A configuration representing crisRef values
49+ * A configuration representing authorityRef values
5050 */
51- confValue = environment . crisLayout . crisRef ;
51+ confValue = environment . layout . authorityRef ;
5252
5353 /**
5454 * Initialize instance variables
@@ -62,23 +62,23 @@ export class EntityIconDirective implements OnInit {
6262 * Adding icon to element oninit
6363 */
6464 ngOnInit ( ) {
65- const crisRefConfig : CrisRefConfig = this . getCrisRefConfigByType ( this . entityType ) ;
65+ const crisRefConfig : AuthorityRefConfig = this . getCrisRefConfigByType ( this . entityType ) ;
6666 if ( isNotEmpty ( crisRefConfig ) ) {
67- const crisStyle : CrisRefEntityStyleConfig = this . getCrisRefEntityStyleConfig ( crisRefConfig , this . entityStyle ) ;
67+ const crisStyle : AuthorityRefEntityStyleConfig = this . getCrisRefEntityStyleConfig ( crisRefConfig , this . entityStyle ) ;
6868 if ( isNotEmpty ( crisStyle ) ) {
6969 this . addIcon ( crisStyle ) ;
7070 }
7171 }
7272 }
7373
7474 /**
75- * Return the CrisRefConfig by the given type
75+ * Return the AuthorityRefConfig by the given type
7676 *
7777 * @param type
7878 * @private
7979 */
80- private getCrisRefConfigByType ( type : string ) : CrisRefConfig {
81- let filteredConf : CrisRefConfig = this . confValue . find ( ( config ) => config . entityType . toUpperCase ( ) === type . toUpperCase ( ) ) ;
80+ private getCrisRefConfigByType ( type : string ) : AuthorityRefConfig {
81+ let filteredConf : AuthorityRefConfig = this . confValue . find ( ( config ) => config . entityType . toUpperCase ( ) === type . toUpperCase ( ) ) ;
8282 if ( isEmpty ( filteredConf ) && this . fallbackOnDefault ) {
8383 filteredConf = this . confValue . find ( ( config ) => config . entityType . toUpperCase ( ) === 'DEFAULT' ) ;
8484 }
@@ -87,14 +87,14 @@ export class EntityIconDirective implements OnInit {
8787 }
8888
8989 /**
90- * Return the CrisRefEntityStyleConfig by the given style
90+ * Return the AuthorityRefEntityStyleConfig by the given style
9191 *
9292 * @param crisConfig
9393 * @param styles
9494 * @private
9595 */
96- private getCrisRefEntityStyleConfig ( crisConfig : CrisRefConfig , styles : string | string [ ] ) : CrisRefEntityStyleConfig {
97- let filteredConf : CrisRefEntityStyleConfig ;
96+ private getCrisRefEntityStyleConfig ( crisConfig : AuthorityRefConfig , styles : string | string [ ] ) : AuthorityRefEntityStyleConfig {
97+ let filteredConf : AuthorityRefEntityStyleConfig ;
9898 if ( Array . isArray ( styles ) ) {
9999 styles . forEach ( ( style ) => {
100100 if ( Object . keys ( crisConfig . entityStyle ) . includes ( style ) ) {
@@ -118,8 +118,8 @@ export class EntityIconDirective implements OnInit {
118118 * @param crisStyle
119119 * @private
120120 */
121- private addIcon ( crisStyle : CrisRefEntityStyleConfig ) : void {
122- const iconElement = `<i class="${ crisStyle . icon } ${ crisStyle . style } "></i>` ;
121+ private addIcon ( entityStyle : AuthorityRefEntityStyleConfig ) : void {
122+ const iconElement = `<i class="${ entityStyle . icon } ${ entityStyle . style } "></i>` ;
123123 if ( this . iconPosition === 'after' ) {
124124 this . elem . nativeElement . insertAdjacentHTML ( 'afterend' , ' ' + iconElement ) ;
125125 } else {
0 commit comments