Merge Angular 16 Irish Monitor to develop #33
|
@ -6,6 +6,7 @@ import {StringUtils} from '../utils/string-utils.class';
|
||||||
import{EnvProperties} from '../utils/properties/env-properties';
|
import{EnvProperties} from '../utils/properties/env-properties';
|
||||||
import {map} from "rxjs/operators";
|
import {map} from "rxjs/operators";
|
||||||
import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class";
|
import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class";
|
||||||
|
import {properties} from '../../../environments/environment';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class SearchDataprovidersService {
|
export class SearchDataprovidersService {
|
||||||
|
@ -287,4 +288,11 @@ export class SearchDataprovidersService {
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||||
.pipe(map(res => res['meta']['total']));
|
.pipe(map(res => res['meta']['total']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
searchDataproviderById(id: string):any {
|
||||||
|
let url = properties.searchAPIURLLAst + "datasources/" + id + '?format=json';
|
||||||
|
|
||||||
|
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url)
|
||||||
|
.pipe(map(res => this.parseResults(res)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
<ng-template #resultTitle>
|
||||||
|
<div *ngIf="(result.title) || result.acronym">
|
||||||
|
<span *ngIf="result.acronym">
|
||||||
|
{{result.acronym}}
|
||||||
|
</span>
|
||||||
|
<span *ngIf="result.acronym && (result.title)"> (</span>
|
||||||
|
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
||||||
|
<span *ngIf="result.acronym && result.title">)</span>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!result.title && !result.acronym">
|
||||||
|
[no title available]
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<div *ngIf="result" class="uk-card" [class.uk-card-default]="isMobile">
|
<div *ngIf="result" class="uk-card" [class.uk-card-default]="isMobile">
|
||||||
<div class="uk-padding-small">
|
<div class="uk-padding-small">
|
||||||
<div>
|
<div>
|
||||||
|
@ -35,47 +49,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
<div class="multi-line-ellipsis lines-3 uk-width-expand">
|
||||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
<a *ngIf="!externalUrl && result.id && !customUrl" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
||||||
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand" [class.uk-disabled]="result.id == '-1'">
|
[routerLink]="url" class="uk-link uk-text-decoration-none uk-width-expand" [class.uk-disabled]="result.id == '-1'">
|
||||||
<div *ngIf="(result.title) || result.acronym">
|
<ng-container *ngTemplateOutlet="resultTitle"></ng-container>
|
||||||
<span *ngIf="result.acronym">
|
|
||||||
{{result.acronym}}
|
|
||||||
</span>
|
|
||||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
|
||||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
|
||||||
<span *ngIf="result.acronym && result.title">)</span>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!result.title && !result.acronym">
|
|
||||||
[no title available]
|
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="externalUrl && result.id" (click)="onClick()"
|
<a *ngIf="externalUrl && result.id && !customUrl" (click)="onClick()"
|
||||||
target="_blank" [href]="externalUrl+result.id"
|
target="_blank" [href]="externalUrl+result.id"
|
||||||
class="custom-external uk-link uk-text-decoration-none uk-width-expand">
|
class="custom-external uk-link uk-text-decoration-none uk-width-expand">
|
||||||
<span *ngIf="(result.title) || result.acronym">
|
<ng-container *ngTemplateOutlet="resultTitle"></ng-container>
|
||||||
<span *ngIf="result.acronym">
|
|
||||||
{{result.acronym}}
|
|
||||||
</span>
|
|
||||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
|
||||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
|
||||||
<span *ngIf="result.acronym && result.title">)</span>
|
|
||||||
</span>
|
|
||||||
<span *ngIf="!result.title && !result.acronym">
|
|
||||||
[no title available]
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="!result.id" class="uk-width-expand">
|
<a *ngIf="customUrl" routerLink="./{{customUrl}}"
|
||||||
<div *ngIf="(result.title) || result.acronym">
|
class="uk-link uk-text-decoration-none uk-width-expand">
|
||||||
<span *ngIf="result.acronym">
|
<ng-container *ngTemplateOutlet="resultTitle"></ng-container>
|
||||||
{{result.acronym}}
|
</a>
|
||||||
</span>
|
<div *ngIf="!result.id && !customUrl" class="uk-width-expand">
|
||||||
<span *ngIf="result.acronym && (result.title)"> (</span>
|
<ng-container *ngTemplateOutlet="resultTitle"></ng-container>
|
||||||
<span *ngIf="result.title" [innerHTML]="result.title"></span>
|
|
||||||
<span *ngIf="result.acronym && result.title">)</span>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!result.title && !result.acronym">
|
|
||||||
[no title available]
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
|
@ -185,7 +173,7 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="(result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal"
|
<div *ngIf="((result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal) && showEntityActions"
|
||||||
class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
|
class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
|
||||||
<div uk-grid class="uk-grid uk-grid-small uk-text-xsmall uk-flex-middle uk-margin-xsmall-bottom"
|
<div uk-grid class="uk-grid uk-grid-small uk-text-xsmall uk-flex-middle uk-margin-xsmall-bottom"
|
||||||
[class.uk-flex-between]="(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
[class.uk-flex-between]="(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||||
|
|
|
@ -32,6 +32,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
public urlParam: string;
|
public urlParam: string;
|
||||||
public url: string;
|
public url: string;
|
||||||
|
@Input() customUrl: string;
|
||||||
@Input() externalUrl: string;
|
@Input() externalUrl: string;
|
||||||
@Input() showOrcid: boolean = true;
|
@Input() showOrcid: boolean = true;
|
||||||
@Input() showEnermaps: boolean = false;
|
@Input() showEnermaps: boolean = false;
|
||||||
|
@ -39,6 +40,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
@Input() relationsVocabulary = null;
|
@Input() relationsVocabulary = null;
|
||||||
@Input() showInline: boolean = false; // do not open modal for "view more" when this is true
|
@Input() showInline: boolean = false; // do not open modal for "view more" when this is true
|
||||||
@Input() isDeletedByInferenceModal: boolean = false; // do not show action bar in results when in "Other versions" modal section
|
@Input() isDeletedByInferenceModal: boolean = false; // do not show action bar in results when in "Other versions" modal section
|
||||||
|
@Input() showEntityActions: boolean = true; // we can use this instead of the above as it is more generic
|
||||||
|
|
||||||
/* Metadata */
|
/* Metadata */
|
||||||
public type: string;
|
public type: string;
|
||||||
|
|
Loading…
Reference in New Issue