Skip to content

Commit 2a5be5d

Browse files
author
Andrea Barbasso
committed
Merge remote-tracking branch 'origin/DSC-1385-add-configuration-name-to-i-18-n-labels-for-facet-search-filters' into DSC-1385-add-configuration-name-to-i-18-n-labels-for-facet-search-filters
2 parents bd5f098 + 4b59dd2 commit 2a5be5d

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/app/shared/metric/metric-altmetric/metric-altmetric.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { AfterViewChecked, Component, OnInit } from '@angular/core';
22
import { BaseEmbeddedMetricComponent } from '../metric-loader/base-embedded-metric.component';
33
import { DomSanitizer } from '@angular/platform-browser';
44
import { hasValue } from '../../empty.util';
@@ -10,7 +10,7 @@ declare let _altmetric_embed_init: any;
1010
templateUrl: './metric-altmetric.component.html',
1111
styleUrls: ['./metric-altmetric.component.scss', '../metric-loader/base-metric.component.scss']
1212
})
13-
export class MetricAltmetricComponent extends BaseEmbeddedMetricComponent implements OnInit {
13+
export class MetricAltmetricComponent extends BaseEmbeddedMetricComponent implements OnInit, AfterViewChecked {
1414
remark: JSON;
1515

1616
constructor(protected sr: DomSanitizer) {

src/app/shared/metric/metric-loader/base-metric.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export abstract class BaseMetricComponent {
1313

1414
@Input() hideLabel = false;
1515

16+
/**
17+
* Whether the badge is shown in the search result list
18+
*/
1619
@Input() isListElement = false;
1720

1821
@Output() hide: EventEmitter<boolean> = new EventEmitter();

src/app/shared/metric/pipes/metric-style-config/metric-style-config.pipe.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export class MetricStyleConfigPipe implements PipeTransform {
1919
if (metric) {
2020
let metricClass = 'alert-warning'; // default style
2121

22-
// check if metric has a preconfiguerd style
22+
// check if metric has a preconfigured style
2323
const metricTypeConfig = this.style.find((x) => isEqual(x.type, metric.metricType));
2424
if (metricTypeConfig) {
2525
metric.icon = metricTypeConfig.icon;
2626
metricClass = metricTypeConfig.class;
2727
}
2828

2929
const classes: any = {};
30-
// classes used to set rules related to metric type behavoir
30+
// classes used to set rules related to metric type behavior
3131
classes[metric.metricType] = true;
3232
const classlist = {
3333
...classes,

0 commit comments

Comments
 (0)