1
|
import {Component, Input, ViewChild} from '@angular/core';
|
2
|
import { ActivatedRoute} from '@angular/router';
|
3
|
import {Location} from '@angular/common';
|
4
|
|
5
|
import { Filter, Value} from '../searchUtils/searchHelperClasses.class';
|
6
|
|
7
|
import {RefineFieldResultsService} from '../../services/refineFieldResults.service';
|
8
|
import {OpenaireProperties, ErrorCodes} from '../../utils/properties/openaireProperties';
|
9
|
import {SearchFields, FieldDetails} from '../../utils/properties/searchFields';
|
10
|
import {SearchPageComponent } from '../searchUtils/searchPage.component';
|
11
|
import {SearchUtilsClass} from '../searchUtils/searchUtils.class';
|
12
|
import {RouterHelper} from '../../utils/routerHelper.class';
|
13
|
@Component({
|
14
|
selector: 'browse-statistic',
|
15
|
templateUrl: 'browseStatistic.component.html'
|
16
|
|
17
|
})
|
18
|
export class BrowseStatisticComponent {
|
19
|
|
20
|
@Input() public baseUrl:string = "";
|
21
|
@Input() public filter:any = "";
|
22
|
private _maxCharacters = 30;
|
23
|
public viewAll = false;
|
24
|
public routerHelper:RouterHelper = new RouterHelper();
|
25
|
constructor () {
|
26
|
|
27
|
}
|
28
|
|
29
|
public ngOnInit() {
|
30
|
|
31
|
|
32
|
}
|
33
|
|
34
|
quote(str:string){
|
35
|
return '"'+str+'"';
|
36
|
}
|
37
|
|
38
|
private _formatName(value){
|
39
|
return value.name+" ";//(((value.name+" ("+value.number+")").length >this._maxCharacters)?(value.name.substring(0,(this._maxCharacters - (" ("+value.number+")").length - ('...').length))+"..."):value.name)
|
40
|
}
|
41
|
|
42
|
}
|