Library | angular-16: Merge develop branch into angular-16 and resolve conflicts

pull/14/head
Konstantina Galouni 6 months ago
commit 5948d61a47

@ -390,7 +390,7 @@
<div>
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
<div *ngIf="measure.value" class="cell uk-flex uk-flex-middle uk-margin-xsmall-bottom">
<div class="cell uk-flex uk-flex-middle uk-margin-xsmall-bottom">
<icon [name]="measure.icon" [ratio]="0.8" [flex]="true"></icon>
</div>
</ng-container>
@ -406,7 +406,7 @@
<div>
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
<div *ngIf="measure.value" class="cell uk-margin-xsmall-bottom">
<div class="cell uk-margin-xsmall-bottom">
<a class="uk-text-capitalize">{{measure.name}}</a>
<ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: false}"></ng-container>
</div>
@ -424,14 +424,14 @@
<div class="uk-text-uppercase uk-text-bolder">
<ng-container *ngIf="resultLandingInfo.measure.bip.length">
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip">
<ng-container *ngIf="isNumber(measure)">
<div *ngIf="measure.value" [attr.uk-tooltip]="measure.value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
<ng-container *ngIf="isNumber(measure.value)">
<div [attr.uk-tooltip]="measure.value >= 1000 ? 'cls: uk-active' : 'cls: uk-invisible'"
title="{{measure.value | number}}" class="cell uk-margin-xsmall-bottom">
{{formatNumber(measure.value)}}
</div>
</ng-container>
<ng-container *ngIf="!isNumber(measure)">
<div *ngIf="measure.value" class="cell uk-margin-xsmall-bottom">
<ng-container *ngIf="!isNumber(measure.value)">
<div class="cell uk-margin-xsmall-bottom">
{{measure.value}}
</div>
</ng-container>

@ -90,7 +90,7 @@ export class SearchInputComponent implements OnInit, AfterViewInit {
ngAfterViewInit() {
if(typeof document !== 'undefined') {
this.ratio = Number.parseFloat(getComputedStyle(this.searchInput.nativeElement).getPropertyValue('--search-input-icon-ratio'));
this.cdr.detectChanges()
this.cdr.detectChanges();
}
}

@ -12,6 +12,7 @@ export class FetchResearchResults {
private errorMessages: ErrorMessagesComponent;
public results =[];
public allResults =[]; // in case of paging
public requestComplete: Subject<void>;
@ -88,7 +89,8 @@ export class FetchResearchResults {
this.subscriptions.push(this._searchResearchResultsService.advancedSearchResults(resultType, "", page, size, "resultdateofacceptance,descending", properties, "&type=results&fq=communityid=" + communityId +(contextId?'&fq=categoryid=' + encodeURIComponent(contextId):'')).subscribe(
data => {
this.searchUtils.totalResults = data[0];
this.results = data[1];
this.allResults = data[1];
this.results = data[1].slice(0, 5) ;
this.searchUtils.status = this.errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){

@ -1,4 +1,4 @@
import {Component, Input} from '@angular/core';
import {Component, Input, SimpleChanges} from '@angular/core';
import {EnvProperties} from "../../properties/env-properties";
import {ErrorCodes} from "../../properties/errorCodes";
import {OpenaireEntities} from "../../properties/searchFields";
@ -41,7 +41,7 @@ import {StringUtils} from "../../string-utils.class";
<ng-container *ngIf="fetch.searchUtils.status == errorCodes.DONE">
<search-result [properties]="properties"
[results]="results"
[results]="fetch.results"
[status]="fetch.searchUtils.status"
[type]="resultType" [showEnermaps]="showEnermaps" [prevPath]="prevPath">
</search-result>
@ -67,7 +67,6 @@ export class SearchTabComponent {
@Input() properties: EnvProperties;
@Input() customTitle;
@Input() showEnermaps: boolean;
@Input() currentPage: number = null;
public errorCodes: ErrorCodes = new ErrorCodes();
@ -75,10 +74,6 @@ export class SearchTabComponent {
return StringUtils.getEntityName(entityType, true);
}
get results() {
return this.currentPage ? this.fetch.results.slice((this.currentPage - 1) * this.searchNumber, this.currentPage * this.searchNumber) : this.fetch.results;
}
get paramsForExternalUrl() {
let parameters: string = "";
Object.keys(this.params).forEach(paramKey => {

Loading…
Cancel
Save