Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop
This commit is contained in:
commit
4fe679af7b
|
@ -11,15 +11,17 @@ import {properties} from "../../../../../environments/environment";
|
||||||
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||||
<p class="uk-margin-remove">
|
<p class="uk-margin-remove">
|
||||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||||
|
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||||
|
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}} </span>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</h6>
|
</h6>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
<span *ngIf="project['funderName'] && project['code'] != 'unidentified'" class="uk-margin-small-top">
|
||||||
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||||
</span>
|
</span>
|
||||||
`
|
`
|
||||||
|
|
|
@ -91,6 +91,7 @@ export class CustomizationOptions {
|
||||||
identity: {
|
identity: {
|
||||||
mainColor: string;
|
mainColor: string;
|
||||||
secondaryColor: string;
|
secondaryColor: string;
|
||||||
|
customCss: string;
|
||||||
};
|
};
|
||||||
identityIsCustom: boolean;
|
identityIsCustom: boolean;
|
||||||
backgroundsIsCustom: boolean;
|
backgroundsIsCustom: boolean;
|
||||||
|
@ -119,6 +120,7 @@ export class CustomizationOptions {
|
||||||
this.identity = {
|
this.identity = {
|
||||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||||
|
customCss: ""
|
||||||
};
|
};
|
||||||
this.identityIsCustom = false;
|
this.identityIsCustom = false;
|
||||||
this.backgroundsIsCustom = false;
|
this.backgroundsIsCustom = false;
|
||||||
|
@ -185,6 +187,9 @@ export class CustomizationOptions {
|
||||||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||||
}
|
}
|
||||||
|
if(current.identity && !current.identity.customCss){
|
||||||
|
current.identity.customCss = defaultCO.identity.customCss;
|
||||||
|
}
|
||||||
if (!current.backgrounds) {
|
if (!current.backgrounds) {
|
||||||
current.backgrounds = Object.assign({}, updated.backgrounds);
|
current.backgrounds = Object.assign({}, updated.backgrounds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class CuratorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCurators(properties: EnvProperties, communityId: string): Observable<Curator[]> {
|
public getCurators(properties: EnvProperties, communityId: string): Observable<Curator[]> {
|
||||||
let url: string = properties.adminToolsAPIURL + '/' + communityId + '/curator';
|
let url: string = properties.adminToolsAPIURL + communityId + '/curator';
|
||||||
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form *ngIf="!showLoading" [formGroup]="myForm">
|
<form *ngIf="!showLoading" [formGroup]="myForm">
|
||||||
<div class="uk-grid uk-child-width-1-2">
|
<div class="uk-grid uk-child-width-1-2">
|
||||||
<div *ngIf="placementsOptions.length > 1 && myForm.get('placement').value" input [formInput]="myForm.get('placement')"
|
<div *ngIf="placementsOptions.length > 1" input [formInput]="myForm.get('placement')"
|
||||||
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
||||||
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -149,6 +149,9 @@ export class PageContentFormComponent implements OnInit {
|
||||||
if (page.left) {
|
if (page.left) {
|
||||||
this.placementsOptions.push({label: "left", value: "left"});
|
this.placementsOptions.push({label: "left", value: "left"});
|
||||||
}
|
}
|
||||||
|
if (page.right) {
|
||||||
|
this.placementsOptions.push({label: "right", value: "right"});
|
||||||
|
}
|
||||||
this.orderOptions = [];
|
this.orderOptions = [];
|
||||||
for (let i = 1; i < countContents + 1; i++) {
|
for (let i = 1; i < countContents + 1; i++) {
|
||||||
this.orderOptions.push({label: "" + i, value: i});
|
this.orderOptions.push({label: "" + i, value: i});
|
||||||
|
|
|
@ -89,7 +89,7 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
||||||
</plugin-field-edit>
|
</plugin-field-edit>
|
||||||
Subjects
|
Subjects
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||||
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
||||||
Pages & menus
|
Pages & menus
|
||||||
</div>
|
</div>
|
||||||
|
@ -148,10 +148,10 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall"> If some information is enabled here,
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall"> If some information is enabled here,
|
||||||
but still not visible, please check related <a routerLink="../entities" target="_blank">entity</a> or <a routerLink="../pages" target="_blank">page</a>.
|
but still not visible, please check related <a routerLink="../../entities" target="_blank">entity</a> or <a routerLink="../../pages" target="_blank">page</a>.
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class PluginSearchBar extends PluginBaseInfo{
|
||||||
<entities-selection class="uk-width-1-3" [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity"
|
<entities-selection class="uk-width-1-3" [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity"
|
||||||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
||||||
[onChangeNavigate]="false"></entities-selection>
|
[onChangeNavigate]="false"></entities-selection>
|
||||||
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
<div input #input class="uk-width-expand" placeholder="Scholarly works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||||
</advanced-search-input>
|
</advanced-search-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,7 +30,7 @@ import {PluginSearchBar} from "./plugin-search-bar.component";
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
|
|
@ -33,7 +33,7 @@ import {PluginBaseFormComponent, PluginEditEvent} from "../../utils/base-plugin.
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="selectedIndex > -1">
|
<ng-container *ngIf="selectedIndex > -1">
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {PluginSuggestedRepositories} from "./plugin-suggested-repositories.compo
|
||||||
<plugin-field-edit [value]="pluginObject.description"
|
<plugin-field-edit [value]="pluginObject.description"
|
||||||
type="textarea" field="description" (changed)="valueChanged($event)" [switchToHTMLEditor]="true"></plugin-field-edit>
|
type="textarea" field="description" (changed)="valueChanged($event)" [switchToHTMLEditor]="true"></plugin-field-edit>
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small"> Manage the content providers list in
|
<div class="uk-alert uk-alert-warning uk-text-small"> Manage the content providers list in
|
||||||
<a routerLink="../../../info/content-providers" target="_blank">Community info</a> by adding them in deposit.</div>
|
<a routerLink="../../../config/content-providers" target="_blank">community content config</a> by adding them in deposit.</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
|
||||||
|
|
|
@ -131,7 +131,7 @@ export class PortalsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePortals(data: any) {
|
public confirmedDeletePortals(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL, this.getPortalType()).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePortalsFromArray(this.selectedPortals);
|
this.deletePortalsFromArray(this.selectedPortals);
|
||||||
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
||||||
|
@ -141,7 +141,11 @@ export class PortalsComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error deleting the selected communities', error)
|
error => this.handleUpdateError('System error deleting the selected communities', error)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
getPortalType():string {
|
||||||
|
let portalId = this.selectedPortals[0];
|
||||||
|
let index = this.portals.findIndex(value => value._id === portalId);
|
||||||
|
return this.portals[index].type;
|
||||||
|
}
|
||||||
public editPortal(i: number) {
|
public editPortal(i: number) {
|
||||||
const portal: Portal = this.checkboxes[i].portal;
|
const portal: Portal = this.checkboxes[i].portal;
|
||||||
this.index = this.portals.findIndex(value => value._id === portal._id);
|
this.index = this.portals.findIndex(value => value._id === portal._id);
|
||||||
|
|
|
@ -157,51 +157,54 @@
|
||||||
{{child.id}}
|
{{child.id}}
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
|
<!-- hide L3 & L4 FoS-->
|
||||||
|
<ng-container *ngIf="properties.environment == 'development'">
|
||||||
<!-- class="parent uk-transition-toggle" tabindex="0"-->
|
<!-- class="parent uk-transition-toggle" tabindex="0"-->
|
||||||
<div *ngFor="let subChild of child.children; let i=index" style="margin-bottom: 7px;"
|
<div *ngFor="let subChild of child.children; let i=index" style="margin-bottom: 7px;"
|
||||||
class="uk-flex uk-flex-middle uk-flex-between uk-transition-toggle" tabindex="0">
|
class="uk-flex uk-flex-middle uk-flex-between uk-transition-toggle" tabindex="0">
|
||||||
<!-- <span class="uk-flex uk-flex-between">-->
|
<!-- <span class="uk-flex uk-flex-between">-->
|
||||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||||
class="uk-link-text uk-width-expand">
|
class="uk-link-text uk-width-expand">
|
||||||
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="properties.environment == 'development' && subChild.children?.length > 0" (click)="moreClicked(item, child, subChild)"
|
<span *ngIf="properties.environment == 'development' && subChild.children?.length > 0" (click)="moreClicked(item, child, subChild)"
|
||||||
class="uk-transition-fade uk-width-auto uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">
|
class="uk-transition-fade uk-width-auto uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">
|
||||||
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
|
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
|
||||||
<!-- +{{subChild.children.length}} more-->
|
<!-- +{{subChild.children.length}} more-->
|
||||||
<!--<!– <icon [flex]="true" ratio="1" name="chevron_right"></icon>–>-->
|
<!--<!– <icon [flex]="true" ratio="1" name="chevron_right"></icon>–>-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
|
|
||||||
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
|
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
|
||||||
<a class="uk-link-text uk-text-lowercase">
|
<a class="uk-link-text uk-text-lowercase">
|
||||||
more
|
more
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- <div *ngIf="subChild.children?.length > 0" (click)="selectedParentLevels=[item, child, subChild]"-->
|
<!-- <div *ngIf="subChild.children?.length > 0" (click)="selectedParentLevels=[item, child, subChild]"-->
|
||||||
<!-- class="uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">-->
|
<!-- class="uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">-->
|
||||||
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
|
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
|
||||||
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
|
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- <span *ngIf="subChild?.children?.length > 0" (click)="fosAccordions.set(subChild.id, !fosAccordions.get(subChild.id))" class="uk-accordion-title uk-padding-remove"></span>-->
|
<!-- <span *ngIf="subChild?.children?.length > 0" (click)="fosAccordions.set(subChild.id, !fosAccordions.get(subChild.id))" class="uk-accordion-title uk-padding-remove"></span>-->
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
|
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
|
||||||
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
|
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
|
||||||
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
|
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
|
||||||
<!-- class="label4 uk-text-small uk-text-meta">-->
|
<!-- class="label4 uk-text-small uk-text-meta">-->
|
||||||
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
|
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
|
||||||
<!-- </a>-->
|
<!-- </a>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<!-- uk-transition-slide-top-->
|
<!-- uk-transition-slide-top-->
|
||||||
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
|
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
|
||||||
<!-- <div class="child">-->
|
<!-- <div class="child">-->
|
||||||
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
|
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -223,19 +226,22 @@
|
||||||
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
|
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
|
<!-- hide L3 & L4 FoS-->
|
||||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
<ng-container *ngIf="properties.environment == 'development'">
|
||||||
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
|
||||||
</a>
|
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
||||||
|
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
||||||
|
</a>
|
||||||
|
|
||||||
<ng-container *ngIf="properties.environment == 'development'">
|
<ng-container *ngIf="properties.environment == 'development'">
|
||||||
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
|
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
|
||||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
||||||
class="uk-text-small uk-text-meta uk-margin-xsmall-bottom" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id)">
|
class="uk-text-small uk-text-meta uk-margin-xsmall-bottom" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id)">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -184,7 +184,8 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
if(fos.children) {
|
if(fos.children) {
|
||||||
fos.children.forEach(l2 => {
|
fos.children.forEach(l2 => {
|
||||||
this.fosOptions.push(l2.id);
|
this.fosOptions.push(l2.id);
|
||||||
if(l2.children) {
|
// hide L3 & L4 FoS
|
||||||
|
if(l2.children && properties.environment == "development") {
|
||||||
l2.children.forEach(l3 => {
|
l2.children.forEach(l3 => {
|
||||||
this.fosOptions.push(l3.id);
|
this.fosOptions.push(l3.id);
|
||||||
if(l3.children) {
|
if(l3.children) {
|
||||||
|
@ -212,20 +213,25 @@ export class FosComponent implements OnInit, OnDestroy {
|
||||||
if(item.children?.length && !matchLevel1) {
|
if(item.children?.length && !matchLevel1) {
|
||||||
item.children = item.children.filter(subItem => {
|
item.children = item.children.filter(subItem => {
|
||||||
matchLevel2 = !!subItem.id.includes(value?.toLowerCase());
|
matchLevel2 = !!subItem.id.includes(value?.toLowerCase());
|
||||||
// 3rd level search
|
// hide L3 & L4 FoS
|
||||||
if(subItem.children?.length && !matchLevel2) {
|
if(properties.environment == "development") {
|
||||||
subItem.children = subItem.children.filter(subSubItem => {
|
// 3rd level search
|
||||||
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
|
if(subItem.children?.length && !matchLevel2) {
|
||||||
// 4th level search
|
subItem.children = subItem.children.filter(subSubItem => {
|
||||||
if(subSubItem.children?.length && !matchLevel3) {
|
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
|
||||||
subSubItem.children = subSubItem.children.filter(level4Item => {
|
// 4th level search
|
||||||
return level4Item.id.toLowerCase().includes(value?.toLowerCase())
|
if (subSubItem.children?.length && !matchLevel3) {
|
||||||
});
|
subSubItem.children = subSubItem.children.filter(level4Item => {
|
||||||
}
|
return level4Item.id.toLowerCase().includes(value?.toLowerCase())
|
||||||
return subSubItem.children?.length > 0 || matchLevel3;
|
});
|
||||||
});
|
}
|
||||||
}
|
return subSubItem.children?.length > 0 || matchLevel3;
|
||||||
return subItem.children?.length > 0;
|
});
|
||||||
|
}
|
||||||
|
return subItem.children?.length > 0;
|
||||||
|
} else {
|
||||||
|
return matchLevel2;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return item.children?.length > 0;
|
return item.children?.length > 0;
|
||||||
|
|
|
@ -22,12 +22,13 @@ import {SearchFields} from "../../utils/properties/searchFields";
|
||||||
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
||||||
View all
|
View all
|
||||||
</a>
|
</a>
|
||||||
<!-- <a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a> -->
|
<!-- hide L3 & L4 FoS-->
|
||||||
|
<!-- <a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a> -->
|
||||||
<a *ngIf="properties.adminToolsPortalType != 'eosc' && subjects && subjects.length > threshold && !viewAll"
|
<a *ngIf="properties.adminToolsPortalType != 'eosc' && subjects && subjects.length > threshold && !viewAll"
|
||||||
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
||||||
View all & suggest
|
View all<ng-container *ngIf="properties.environment == 'development'"> & suggest</ng-container>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="properties.adminToolsPortalType != 'eosc' && (subjects && subjects.length <= threshold || viewAll)" class="uk-link uk-link-text uk-text-truncate"
|
<a *ngIf="properties.environment == 'development' && properties.adminToolsPortalType != 'eosc' && (subjects && subjects.length <= threshold || viewAll)" class="uk-link uk-link-text uk-text-truncate"
|
||||||
(click)="suggestClick();">Suggest</a>
|
(click)="suggestClick();">Suggest</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-top">
|
<div class="uk-margin-small-top">
|
||||||
|
|
|
@ -344,9 +344,22 @@ export class ResultLandingService {
|
||||||
if (subjectResults[3]) {
|
if (subjectResults[3]) {
|
||||||
let searchFieldsHelper: SearchFields = new SearchFields();
|
let searchFieldsHelper: SearchFields = new SearchFields();
|
||||||
subjectResults[3].forEach(element => {
|
subjectResults[3].forEach(element => {
|
||||||
this.resultLandingInfo.fos.push(
|
// hide L3 & L4 FoS
|
||||||
{id: element, label: searchFieldsHelper.getFosParameter() == "foslabel" ? element.replace(/^\d+/, '').trim() : element}
|
let add = true;
|
||||||
);
|
if(element) {
|
||||||
|
let id = element.split(" ")[0];
|
||||||
|
if(id.length > 4 && properties.environment != "development") {
|
||||||
|
add = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(add) {
|
||||||
|
this.resultLandingInfo.fos.push(
|
||||||
|
{
|
||||||
|
id: element,
|
||||||
|
label: searchFieldsHelper.getFosParameter() == "foslabel" ? element.replace(/^\d+/, '').trim() : element
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.resultLandingInfo.fos) {
|
if (this.resultLandingInfo.fos) {
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div *ngIf="isEditable" class="tools">
|
<div *ngIf="isEditable" class="tools">
|
||||||
<div class="uk-flex uk-flex-middle">
|
<div class="uk-flex uk-flex-middle">
|
||||||
<a *ngIf="isCurator" [class.uk-disabled]="editing" class="" (click)="createSection(i, 'number')"
|
<a *ngIf="isCurator" [class.uk-disabled]="editing" class=""
|
||||||
|
(click)="createSection(i, 'number')"
|
||||||
uk-tooltip="Create a new section">
|
uk-tooltip="Create a new section">
|
||||||
<icon name="add" [flex]="true"></icon>
|
<icon name="add" [flex]="true"></icon>
|
||||||
</a>
|
</a>
|
||||||
|
@ -20,66 +21,67 @@
|
||||||
<div *ngIf="isEditable" input [formInput]="numberSections.at(i).get('title')"
|
<div *ngIf="isEditable" input [formInput]="numberSections.at(i).get('title')"
|
||||||
(focusEmitter)="saveSection($event, numberSections.at(i), i, 'number')"
|
(focusEmitter)="saveSection($event, numberSections.at(i), i, 'number')"
|
||||||
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
||||||
<h5 *ngIf="!isEditable" class="uk-margin-remove">{{numberSections.at(i).get('title').value}}</h5>
|
<h5 *ngIf="!isEditable"
|
||||||
|
class="uk-margin-remove">{{ numberSections.at(i).get('title').value }}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div [id]="'number-' + number._id" class="uk-grid uk-grid-small uk-grid-match"
|
<div [id]="'number-' + number._id" class="uk-grid uk-grid-small uk-grid-match"
|
||||||
[attr.uk-sortable]="isEditable ? 'group: number': null" uk-grid>
|
[attr.uk-sortable]="isEditable ? 'group: number': null" uk-grid>
|
||||||
<ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index">
|
<div *ngFor="let indicator of number.indicators; let j=index" [id]="indicator._id"
|
||||||
<div *ngIf="indicator" [id]="indicator._id"
|
[ngClass]="getNumberClassBySize(indicator.width)">
|
||||||
[ngClass]="getNumberClassBySize(indicator.width)">
|
<div class="uk-card uk-card-default uk-padding-small number-card uk-position-relative">
|
||||||
<div class="uk-card uk-card-default uk-padding-small number-card uk-position-relative">
|
<div *ngIf="!dragging"
|
||||||
<div *ngIf="!dragging"
|
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||||
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
|
||||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||||
ratio="0.6"></icon>
|
ratio="0.6"></icon>
|
||||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
<a *ngIf="isEditable && (isCurator || showVisibility)"
|
||||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||||
<icon [flex]="true" name="more_vert"></icon>
|
<icon *ngIf="showVisibility" [flex]="true"
|
||||||
</a>
|
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
ratio="0.6"></icon>
|
||||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
<icon [flex]="true" name="more_vert"></icon>
|
||||||
<ul class="uk-nav uk-dropdown-nav">
|
</a>
|
||||||
<ng-container *ngIf="isCurator">
|
<div #element *ngIf="isEditable && (isCurator || showVisibility)"
|
||||||
<li>
|
class="uk-dropdown"
|
||||||
<a (click)="editNumberIndicatorOpen(number, indicator._id); hide(element)">Edit</a>
|
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||||
</li>
|
<ul class="uk-nav uk-dropdown-nav">
|
||||||
</ng-container>
|
<ng-container *ngIf="isCurator">
|
||||||
<ng-container *ngIf="showVisibility">
|
<li>
|
||||||
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
<a (click)="editNumberIndicatorOpen(number, indicator._id); hide(element)">Edit</a>
|
||||||
<ng-template ngFor [ngForOf]="stakeholderUtils.visibilities" let-v>
|
</li>
|
||||||
<li>
|
</ng-container>
|
||||||
<a (click)="changeIndicatorStatus(number._id, indicator, v.value);hide(element)">
|
<ng-container *ngIf="showVisibility">
|
||||||
<div class="uk-flex uk-flex-middle">
|
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
||||||
<icon [flex]="true" [name]="v.icon"
|
<li *ngFor="let v of stakeholderUtils.visibilities">
|
||||||
ratio="0.6"></icon>
|
<a (click)="changeIndicatorStatus(number._id, indicator, v.value);hide(element)">
|
||||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
<div class="uk-flex uk-flex-middle">
|
||||||
<icon *ngIf="indicator.visibility === v.value"
|
<icon [flex]="true" [name]="v.icon"
|
||||||
[flex]="true" name="done"
|
ratio="0.6"></icon>
|
||||||
class="uk-text-secondary" ratio="0.8"></icon>
|
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||||
</div>
|
<icon *ngIf="indicator.visibility === v.value"
|
||||||
</a>
|
[flex]="true" name="done"
|
||||||
</li>
|
class="uk-text-secondary" ratio="0.8"></icon>
|
||||||
</ng-template>
|
</div>
|
||||||
</ng-container>
|
</a>
|
||||||
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
</li>
|
||||||
<li class="uk-nav-divider">
|
</ng-container>
|
||||||
<li>
|
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
||||||
<a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete</a>
|
<li class="uk-nav-divider">
|
||||||
</li>
|
<li>
|
||||||
</ng-container>
|
<a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete</a>
|
||||||
</ul>
|
</li>
|
||||||
</div>
|
</ng-container>
|
||||||
</div>
|
</ul>
|
||||||
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{ indicator.name }}</div>
|
|
||||||
<div class="number uk-text-small uk-text-bold">
|
|
||||||
<span *ngIf="numberResults.get(i + '-' + j + '-' + 0)"
|
|
||||||
[innerHTML]="(indicator.indicatorPaths[0].format == 'NUMBER'?(numberResults.get(i + '-' + j + '-' + 0) | numberRound: 2:1:stakeholder.locale):(numberResults.get(i + '-' + j + '-' + 0) | numberPercentage: stakeholder.locale))"></span>
|
|
||||||
<span *ngIf="!numberResults.get(i + '-' + j + '-' + 0)">--</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{ indicator.name }}</div>
|
||||||
|
<div class="number uk-text-small uk-text-bold">
|
||||||
|
<span *ngIf="numberResults.get(i + '-' + j + '-' + 0)"
|
||||||
|
[innerHTML]="(indicator.indicatorPaths[0].format == 'NUMBER'?(numberResults.get(i + '-' + j + '-' + 0) | numberRound: 2:1:stakeholder.locale):(numberResults.get(i + '-' + j + '-' + 0) | numberPercentage: stakeholder.locale))"></span>
|
||||||
|
<span *ngIf="!numberResults.get(i + '-' + j + '-' + 0)">--</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
||||||
<div class="uk-grid uk-grid-small" uk-grid>
|
<div class="uk-grid uk-grid-small" uk-grid>
|
||||||
|
@ -99,7 +101,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isEditable && isCurator">
|
<div *ngIf="isEditable && isCurator">
|
||||||
<ng-container *ngTemplateOutlet="new_section; context:{type: 'number'}"></ng-container>
|
<div class="section">
|
||||||
|
<div class="uk-flex uk-flex-center" (click)="createSection(-1, 'number')">
|
||||||
|
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
||||||
|
<icon name="add" [flex]="true"></icon>
|
||||||
|
<span class="uk-margin-small-left">New section</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -125,24 +134,30 @@
|
||||||
<div *ngIf="isEditable" input [formInput]="chartSections.at(i).get('title')"
|
<div *ngIf="isEditable" input [formInput]="chartSections.at(i).get('title')"
|
||||||
(focusEmitter)="saveSection($event, chartSections.at(i), i)"
|
(focusEmitter)="saveSection($event, chartSections.at(i), i)"
|
||||||
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
||||||
<h5 *ngIf="!isEditable" class="uk-margin-remove">{{chartSections.at(i).get('title').value}}</h5>
|
<h5 *ngIf="!isEditable"
|
||||||
|
class="uk-margin-remove">{{ chartSections.at(i).get('title').value }}</h5>
|
||||||
</div>
|
</div>
|
||||||
<div [id]="'chart-' + chart._id" class="uk-grid uk-grid-small uk-grid-match"
|
<div [id]="'chart-' + chart._id" class="uk-grid uk-grid-small uk-grid-match"
|
||||||
[attr.uk-sortable]="isEditable ? 'group: chart': null" uk-grid>
|
[attr.uk-sortable]="isEditable ? 'group: chart': null" uk-grid>
|
||||||
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
<div *ngFor="let indicator of chart.indicators; let j=index" [id]="indicator._id"
|
||||||
<div *ngIf="indicator" [id]="indicator._id"
|
[ngClass]="getChartClassBySize(indicator.width)">
|
||||||
[ngClass]="getChartClassBySize(indicator.width)">
|
<div class="uk-card uk-card-default uk-position-relative">
|
||||||
<div class="uk-card uk-card-default uk-card-body uk-position-relative">
|
<div class="uk-card-body uk-margin-small-bottom">
|
||||||
|
<!-- Dropdown -->
|
||||||
<div *ngIf="!dragging"
|
<div *ngIf="!dragging"
|
||||||
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||||
ratio="0.6"></icon>
|
ratio="0.6"></icon>
|
||||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
<a *ngIf="isEditable && (isCurator || showVisibility)"
|
||||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||||
|
<icon *ngIf="showVisibility" [flex]="true"
|
||||||
|
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||||
|
ratio="0.6"></icon>
|
||||||
<icon [flex]="true" name="more_vert"></icon>
|
<icon [flex]="true" name="more_vert"></icon>
|
||||||
</a>
|
</a>
|
||||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
<div #element *ngIf="isEditable && (isCurator || showVisibility)"
|
||||||
|
class="uk-dropdown"
|
||||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||||
<ul class="uk-nav uk-dropdown-nav">
|
<ul class="uk-nav uk-dropdown-nav">
|
||||||
<ng-container *ngIf="isCurator">
|
<ng-container *ngIf="isCurator">
|
||||||
|
@ -152,20 +167,18 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="showVisibility">
|
<ng-container *ngIf="showVisibility">
|
||||||
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
||||||
<ng-template ngFor [ngForOf]="stakeholderUtils.visibilities" let-v>
|
<li *ngFor="let v of stakeholderUtils.visibilities">
|
||||||
<li>
|
<a (click)="changeIndicatorStatus(chart._id, indicator, v.value);">
|
||||||
<a (click)="changeIndicatorStatus(chart._id, indicator, v.value);">
|
<div class="uk-flex uk-flex-middle">
|
||||||
<div class="uk-flex uk-flex-middle">
|
<icon [flex]="true" [name]="v.icon"
|
||||||
<icon [flex]="true" [name]="v.icon"
|
ratio="0.6"></icon>
|
||||||
ratio="0.6"></icon>
|
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
<icon *ngIf="indicator.visibility === v.value"
|
||||||
<icon *ngIf="indicator.visibility === v.value"
|
[flex]="true" name="done"
|
||||||
[flex]="true" name="done"
|
class="uk-text-secondary" ratio="0.8"></icon>
|
||||||
class="uk-text-secondary" ratio="0.8"></icon>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</a>
|
</li>
|
||||||
</li>
|
|
||||||
</ng-template>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
||||||
<li class="uk-nav-divider">
|
<li class="uk-nav-divider">
|
||||||
|
@ -176,41 +189,44 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Main content-->
|
||||||
<div>
|
<div>
|
||||||
<div *ngIf="indicator.name"
|
<h6 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom">
|
||||||
class="uk-text-center uk-text-bold uk-margin-small-bottom">
|
{{ indicator.name + " " }}
|
||||||
{{ indicator.name }}
|
</h6>
|
||||||
</div>
|
|
||||||
<iframe *ngIf="!properties.disableFrameLoad && getActiveIndicatorPath(indicator) && getActiveIndicatorPath(indicator).source !=='image' &&
|
<iframe *ngIf="!properties.disableFrameLoad && getActiveIndicatorPath(indicator) && getActiveIndicatorPath(indicator).source !=='image' &&
|
||||||
safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
||||||
allowfullscreen="true" mozallowfullscreen="true"
|
allowfullscreen="true" mozallowfullscreen="true"
|
||||||
webkitallowfullscreen="true"
|
webkitallowfullscreen="true"
|
||||||
[src]="safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
[src]="safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
||||||
class="uk-width-1-1"
|
class="uk-width-1-1"
|
||||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||||
[class.uk-blend-multiply]="!isFullscreen"></iframe>
|
[class.uk-blend-multiply]="!isFullscreen"></iframe>
|
||||||
<div *ngIf="properties.disableFrameLoad && indicator.indicatorPaths &&
|
<div *ngIf="properties.disableFrameLoad && getActiveIndicatorPath(indicator)?.source !=='image'">
|
||||||
indicator.indicatorPaths.length > 0 && getActiveIndicatorPath(indicator).source !=='image'">
|
|
||||||
<img class="uk-width-1-1 uk-blend-multiply"
|
<img class="uk-width-1-1 uk-blend-multiply"
|
||||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||||
src="assets/chart-placeholder.png">
|
src="assets/chart-placeholder.png">
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="indicator.indicatorPaths && getActiveIndicatorPath(indicator) && getActiveIndicatorPath(indicator).source === 'image'">
|
<div *ngIf="getActiveIndicatorPath(indicator)?.source === 'image'">
|
||||||
<img class="uk-width-1-1 uk-blend-multiply"
|
<img class="uk-width-1-1 uk-blend-multiply"
|
||||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||||
[src]="getActiveIndicatorPath(indicator).url">
|
[src]="getActiveIndicatorPath(indicator).url">
|
||||||
</div>
|
</div>
|
||||||
<slider-tabs *ngIf="indicator.indicatorPaths.length > 1" [type]="'dynamic'" [flexPosition]="'right'" (activeEmitter)="indicator.activePath = $event"
|
|
||||||
tabsClass="uk-subnav uk-subnav-pill uk-subnav-small" containerClass="uk-margin-top uk-margin-bottom" [border]="false">
|
|
||||||
<slider-tab *ngFor="let indicatorPath of indicator.indicatorPaths; let i=index"
|
|
||||||
[tabTitle]="indicatorPath.parameters.tab ? indicatorPath.parameters.tab : indicatorPath.parameters.title"
|
|
||||||
[tabId]="i" [active]="(!indicator.activePath && i == 0) || indicator.activePath == i">
|
|
||||||
</slider-tab>
|
|
||||||
</slider-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Tabs -->
|
||||||
|
<slider-tabs [type]="'dynamic'" [flexPosition]="'right'"
|
||||||
|
(activeEmitter)="indicator.activePath = $event"
|
||||||
|
tabsClass="uk-subnav uk-subnav-pill uk-subnav-small"
|
||||||
|
containerClass="uk-margin-top uk-margin-bottom" [border]="false">
|
||||||
|
<slider-tab *ngFor="let indicatorPath of indicator.indicatorPaths; let i=index"
|
||||||
|
[tabTitle]="indicatorPath.parameters.tab ? indicatorPath.parameters.tab : indicatorPath.parameters.title"
|
||||||
|
[invisible]="indicator.indicatorPaths.length < 2"
|
||||||
|
[tabId]="i" [active]="getActivePathIndex(indicator) == i">
|
||||||
|
</slider-tab>
|
||||||
|
</slider-tabs>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
||||||
<div class="uk-grid uk-grid-small uk-grid-match" uk-grid>
|
<div class="uk-grid uk-grid-small uk-grid-match" uk-grid>
|
||||||
|
@ -235,7 +251,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="isEditable && isCurator">
|
<div *ngIf="isEditable && isCurator">
|
||||||
<ng-container *ngTemplateOutlet="new_section; context:{type: 'chart'}"></ng-container>
|
<div class="section">
|
||||||
|
<div class="uk-flex uk-flex-center" (click)="createSection(-1)">
|
||||||
|
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
||||||
|
<icon name="add" [flex]="true"></icon>
|
||||||
|
<span class="uk-margin-small-left">New section</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -269,68 +292,8 @@
|
||||||
</div>
|
</div>
|
||||||
<hr class="uk-width-1-1">
|
<hr class="uk-width-1-1">
|
||||||
<div *ngIf="numberIndicatorPaths" formArrayName="indicatorPaths">
|
<div *ngIf="numberIndicatorPaths" formArrayName="indicatorPaths">
|
||||||
<div *ngIf="stakeholderUtils.hasMultiNumberIndicatorPaths" class="uk-margin-medium-bottom">
|
|
||||||
<ul #numbersTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
|
||||||
<li *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index"
|
|
||||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
|
||||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
|
||||||
<a (click)="activeNumberIndicatorPath(i)">
|
|
||||||
<span *ngIf="indicatorPath.get('result').valid && indicatorPath.get('result').value !== 0"
|
|
||||||
[innerHTML]="(indicatorPath.get('format').value == 'NUMBER'?(indicatorPath.get('result').value | numberRound: 2:1:stakeholder.locale):(indicatorPath.get('result').value | numberPercentage: stakeholder.locale))">
|
|
||||||
</span>
|
|
||||||
<span *ngIf="!indicatorPath.get('result').valid || indicatorPath.get('result').value === 0">
|
|
||||||
--
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
<span *ngIf="!indicator.defaultId && numberIndicatorPaths.length > 1"
|
|
||||||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
|
||||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
|
||||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
|
||||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
|
||||||
<icon [flex]="true" name="more_vert"></icon>
|
|
||||||
</a>
|
|
||||||
<div #element uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0;">
|
|
||||||
<ul class="uk-nav uk-dropdown-nav">
|
|
||||||
<li *ngIf="i > 0">
|
|
||||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i)">
|
|
||||||
<div class="uk-flex uk-flex-middle">
|
|
||||||
<icon [flex]="true" name="west" ratio="0.6"></icon>
|
|
||||||
<span class="uk-margin-small-left uk-width-expand">Move Left</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li *ngIf="i < numberIndicatorPaths.length - 1">
|
|
||||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i, i + 1)">
|
|
||||||
<div class="uk-flex uk-flex-middle">
|
|
||||||
<icon [flex]="true" name="east" ratio="0.6"></icon>
|
|
||||||
<span class="uk-margin-small-left uk-width-expand">Move Right</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a (click)="removeNumberIndicatorPath(i); hide(element)">
|
|
||||||
<div class="uk-flex uk-flex-middle">
|
|
||||||
<icon [flex]="true" name="delete" ratio="0.6"></icon>
|
|
||||||
<span class="uk-margin-small-left uk-width-expand">Delete</span>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li class="uk-margin-small-top">
|
|
||||||
<a (click)="activeNumberIndicatorPath(numberIndicatorPaths.length); $event.preventDefault()"
|
|
||||||
class="uk-flex uk-flex-middle">
|
|
||||||
<icon name="add" [flex]="true"></icon>
|
|
||||||
<span class="uk-text-uppercase">Add</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index" [formGroupName]="i">
|
<div *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index" [formGroupName]="i">
|
||||||
<div *ngIf="(!indicator.activePath && i == 0) || indicator.activePath === i" class="uk-grid"
|
<div *ngIf="getActivePathIndex() === i" class="uk-grid" uk-grid>
|
||||||
uk-grid>
|
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<div class="uk-grid" uk-grid>
|
<div class="uk-grid" uk-grid>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||||
|
@ -388,8 +351,8 @@
|
||||||
</a>
|
</a>
|
||||||
<span [class.uk-invisible]="getJsonPath(i).disabled || j === (getJsonPath(i).controls.length - 1)"
|
<span [class.uk-invisible]="getJsonPath(i).disabled || j === (getJsonPath(i).controls.length - 1)"
|
||||||
class="uk-text-center uk-margin-small-left">
|
class="uk-text-center uk-margin-small-left">
|
||||||
<icon name="east"></icon>
|
<icon name="east"></icon>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="indicator.defaultId === null">
|
<div *ngIf="indicator.defaultId === null">
|
||||||
<button class="uk-icon-button uk-button-primary" (click)="addJsonPath(i)">
|
<button class="uk-icon-button uk-button-primary" (click)="addJsonPath(i)">
|
||||||
|
@ -471,17 +434,17 @@
|
||||||
[options]="indicatorUtils.indicatorSizes" type="select">
|
[options]="indicatorUtils.indicatorSizes" type="select">
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths" class="uk-width-1-1">
|
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths" class="uk-width-1-1">
|
||||||
<div *ngIf="stakeholderUtils.hasMultiChartIndicatorPaths" class="uk-margin-medium-bottom">
|
<div class="uk-margin-medium-bottom">
|
||||||
<ul #chartsTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
<ul #chartsTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||||
<li *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index"
|
<li *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index"
|
||||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
||||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
[class.uk-active]="getActivePathIndex() === i">
|
||||||
<a (click)="activeChartIndicatorPath(i)">
|
<a (click)="setActiveChartIndicatorPath(i)">
|
||||||
<span>{{ getParameter(i, 'tab')?.get('value')?.value ? getParameter(i, 'tab').get('value').value : 'No title yet' }}</span>
|
<span>{{ getParameter(i, 'tab')?.get('value')?.value ? getParameter(i, 'tab').get('value').value : 'No title yet' }}</span>
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="!indicator.defaultId && chartIndicatorPaths.length > 1"
|
<span *ngIf="!indicator.defaultId && chartIndicatorPaths.length > 1"
|
||||||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
||||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
[class.uk-invisible-hover]="getActivePathIndex()!== i"
|
||||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||||
<icon [flex]="true" name="more_vert"></icon>
|
<icon [flex]="true" name="more_vert"></icon>
|
||||||
|
@ -517,7 +480,7 @@
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="!indicator.defaultId" class="uk-margin-small-top">
|
<li *ngIf="!indicator.defaultId" class="uk-margin-small-top">
|
||||||
<a (click)="activeChartIndicatorPath(chartIndicatorPaths.length); $event.preventDefault()"
|
<a (click)="setActiveChartIndicatorPath(chartIndicatorPaths.length); $event.preventDefault()"
|
||||||
class="uk-flex uk-flex-middle">
|
class="uk-flex uk-flex-middle">
|
||||||
<icon name="add" [flex]="true"></icon>
|
<icon name="add" [flex]="true"></icon>
|
||||||
<span class="uk-text-uppercase">Add</span>
|
<span class="uk-text-uppercase">Add</span>
|
||||||
|
@ -525,10 +488,8 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index;"
|
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index;" [formGroupName]="i">
|
||||||
[formGroupName]="i">
|
<div *ngIf="getActivePathIndex() === i" class="uk-grid" uk-grid>
|
||||||
<div *ngIf="(!indicator.activePath && i == 0) || indicator.activePath === i" class="uk-grid"
|
|
||||||
uk-grid>
|
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||||
<div input class="uk-width-expand"
|
<div input class="uk-width-expand"
|
||||||
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
||||||
|
@ -542,7 +503,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-1" formArrayName="parameters">
|
<div class="uk-width-1-1" formArrayName="parameters">
|
||||||
<div class="uk-grid" uk-grid>
|
<div class="uk-grid" uk-grid>
|
||||||
<div *ngIf="stakeholderUtils.hasMultiChartIndicatorPaths && getParameter(i, 'tab')" input class="uk-width-1-1"
|
<div *ngIf="getParameter(i, 'tab')" input class="uk-width-1-1"
|
||||||
[formInput]="getParameter(i, 'tab').get('value')"
|
[formInput]="getParameter(i, 'tab').get('value')"
|
||||||
placeholder="Tab Title"></div>
|
placeholder="Tab Title"></div>
|
||||||
<div *ngIf="getParameter(i, 'title')" input class="uk-width-1-1"
|
<div *ngIf="getParameter(i, 'title')" input class="uk-width-1-1"
|
||||||
|
@ -566,7 +527,8 @@
|
||||||
[formInput]="getParameter(i, 'yAxisTitle').get('value')"
|
[formInput]="getParameter(i, 'yAxisTitle').get('value')"
|
||||||
placeholder="Y-Axis Title"></div>
|
placeholder="Y-Axis Title"></div>
|
||||||
<ng-container *ngIf="isLegendEnabled(indicator, i)">
|
<ng-container *ngIf="isLegendEnabled(indicator, i)">
|
||||||
<div *ngFor="let dataTitle of dataTitles(i); let j=index" input class="uk-width-1-3@s"
|
<div *ngFor="let dataTitle of dataTitles(i); let j=index" input
|
||||||
|
class="uk-width-1-3@s"
|
||||||
[formInput]="getParameter(i, dataTitle).get('value')"
|
[formInput]="getParameter(i, dataTitle).get('value')"
|
||||||
[placeholder]="'Data Title ' + (j + 1)"></div>
|
[placeholder]="'Data Title ' + (j + 1)"></div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -641,13 +603,3 @@
|
||||||
Are you sure you want to proceed?
|
Are you sure you want to proceed?
|
||||||
</div>
|
</div>
|
||||||
</modal-alert>
|
</modal-alert>
|
||||||
<ng-template #new_section let-type="type">
|
|
||||||
<div class="section">
|
|
||||||
<div class="uk-flex uk-flex-center" (click)="createSection(-1, type)">
|
|
||||||
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
|
||||||
<icon name="add" [flex]="true"></icon>
|
|
||||||
<span class="uk-margin-small-left">New section</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import {
|
||||||
ViewChild
|
ViewChild
|
||||||
} from "@angular/core";
|
} from "@angular/core";
|
||||||
import {
|
import {
|
||||||
Format,
|
Format, ImportIndicators,
|
||||||
Indicator,
|
Indicator, IndicatorImport,
|
||||||
IndicatorPath,
|
IndicatorPath,
|
||||||
IndicatorSize,
|
IndicatorSize,
|
||||||
IndicatorType,
|
IndicatorType,
|
||||||
|
@ -79,7 +79,6 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
* Editable indicator
|
* Editable indicator
|
||||||
*/
|
*/
|
||||||
public section: Section;
|
public section: Section;
|
||||||
public indicator: Indicator;
|
|
||||||
public index: number = -1;
|
public index: number = -1;
|
||||||
public editing: boolean = false;
|
public editing: boolean = false;
|
||||||
public dragging: boolean = false;
|
public dragging: boolean = false;
|
||||||
|
@ -102,7 +101,6 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
@ViewChild('editChartNotify', {static: true}) editChartNotify: NotifyFormComponent;
|
@ViewChild('editChartNotify', {static: true}) editChartNotify: NotifyFormComponent;
|
||||||
@ViewChild('deleteNotify', {static: true}) deleteNotify: NotifyFormComponent;
|
@ViewChild('deleteNotify', {static: true}) deleteNotify: NotifyFormComponent;
|
||||||
/* Transition Groups */
|
/* Transition Groups */
|
||||||
@ViewChild('numbersTransition') numbersTransition: TransitionGroupComponent;
|
|
||||||
@ViewChild('chartsTransition') chartsTransition: TransitionGroupComponent;
|
@ViewChild('chartsTransition') chartsTransition: TransitionGroupComponent;
|
||||||
|
|
||||||
public isFullscreen: boolean = false;
|
public isFullscreen: boolean = false;
|
||||||
|
@ -581,26 +579,14 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeNumberIndicatorPath(index: number) {
|
|
||||||
this.numberIndicatorPaths.removeAt(index);
|
|
||||||
this.indicator.indicatorPaths.splice(index, 1);
|
|
||||||
this.numbersTransition.init();
|
|
||||||
if (this.indicator.activePath === index) {
|
|
||||||
this.activeNumberIndicatorPath(Math.max(0, index - 1));
|
|
||||||
} else if (this.indicator.activePath > index) {
|
|
||||||
this.activeNumberIndicatorPath(this.indicator.activePath - 1);
|
|
||||||
}
|
|
||||||
this.numberIndicatorFb.markAsDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
public removeChartIndicatorPath(index: number) {
|
public removeChartIndicatorPath(index: number) {
|
||||||
this.chartIndicatorPaths.removeAt(index);
|
this.chartIndicatorPaths.removeAt(index);
|
||||||
this.indicator.indicatorPaths.splice(index, 1);
|
this.indicator.indicatorPaths.splice(index, 1);
|
||||||
this.chartsTransition.init();
|
this.chartsTransition.init();
|
||||||
if (this.indicator.activePath === index) {
|
if (this.indicator.activePath === index) {
|
||||||
this.activeChartIndicatorPath(Math.max(0, index - 1));
|
this.setActiveChartIndicatorPath(Math.max(0, index - 1));
|
||||||
} else if (this.indicator.activePath > index) {
|
} else if (this.indicator.activePath > index) {
|
||||||
this.activeChartIndicatorPath(this.indicator.activePath - 1);
|
this.setActiveChartIndicatorPath(this.indicator.activePath - 1);
|
||||||
}
|
}
|
||||||
this.chartIndicatorFb.markAsDirty();
|
this.chartIndicatorFb.markAsDirty();
|
||||||
}
|
}
|
||||||
|
@ -609,9 +595,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
type: 'number' | 'chart', index: number,
|
type: 'number' | 'chart', index: number,
|
||||||
newIndex: number = index - 1) {
|
newIndex: number = index - 1) {
|
||||||
let indicatorPaths = type == 'number'?this.numberIndicatorPaths:this.chartIndicatorPaths;
|
let indicatorPaths = type == 'number'?this.numberIndicatorPaths:this.chartIndicatorPaths;
|
||||||
if(type == 'number') {
|
if(type == 'chart') {
|
||||||
this.numbersTransition.init();
|
|
||||||
} else {
|
|
||||||
this.chartsTransition.init();
|
this.chartsTransition.init();
|
||||||
}
|
}
|
||||||
let a = indicatorPaths.at(index);
|
let a = indicatorPaths.at(index);
|
||||||
|
@ -627,16 +611,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
form.markAsDirty();
|
form.markAsDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public activeNumberIndicatorPath(index: number) {
|
public setActiveChartIndicatorPath(index: number) {
|
||||||
let paths = this.numberIndicatorPaths;
|
|
||||||
if (index == paths.length) {
|
|
||||||
this.addNumberIndicatorPath();
|
|
||||||
this.numbersTransition.init();
|
|
||||||
}
|
|
||||||
this.indicator.activePath = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
public activeChartIndicatorPath(index: number) {
|
|
||||||
let paths = this.chartIndicatorPaths;
|
let paths = this.chartIndicatorPaths;
|
||||||
if (index == paths.length) {
|
if (index == paths.length) {
|
||||||
this.addChartIndicatorPath();
|
this.addChartIndicatorPath();
|
||||||
|
@ -1008,8 +983,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.getSecureUrlByStakeHolder(this.indicator.indicatorPaths[index]).toString();
|
this.getSecureUrlByStakeHolder(this.indicator.indicatorPaths[index]).toString();
|
||||||
} else if (type === 'number') {
|
} else if (type === 'number') {
|
||||||
let indicatorPath = this.numberIndicatorPaths.at(index).value;
|
let indicatorPath = this.numberIndicatorPaths.at(index).value;
|
||||||
indicatorPath.parameters.forEach(parameter => {
|
indicatorPath.parameters.forEach((parameter: { value: any; key: string | number; }) => {
|
||||||
if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
if (!parameter.value && !this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||||
|
return;
|
||||||
|
} else if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||||
hasDifference = true;
|
hasDifference = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1027,6 +1004,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshIndicator(type: IndicatorType = 'chart') {
|
refreshIndicator(type: IndicatorType = 'chart') {
|
||||||
|
let activePath = this.indicator.activePath;
|
||||||
if (type === 'chart') {
|
if (type === 'chart') {
|
||||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, 'chart');
|
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, 'chart');
|
||||||
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
||||||
|
@ -1038,6 +1016,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.validateJsonPath(index);
|
this.validateJsonPath(index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this.indicator.activePath = activePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteIndicatorOpen(section: Section, indicatorId: string, type: string, childrenAction: string = null) {
|
deleteIndicatorOpen(section: Section, indicatorId: string, type: string, childrenAction: string = null) {
|
||||||
|
@ -1276,10 +1255,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
importIndicatorsAndSave(stakeholder: Stakeholder, charts: any[]) {
|
importIndicatorsAndSave(importIndicators: ImportIndicators) {
|
||||||
let sectionsToSave: Section[] = [];
|
let sectionsToSave: Section[] = [];
|
||||||
let countIndicators = 0;
|
let countIndicators = 0;
|
||||||
if (stakeholder.type !== this.stakeholder.type) {
|
if (importIndicators.stakeholder.type !== this.stakeholder.type) {
|
||||||
UIkit.notification("The type of this profile is not the same with the file's one!", {
|
UIkit.notification("The type of this profile is not the same with the file's one!", {
|
||||||
status: 'warning',
|
status: 'warning',
|
||||||
timeout: 6000,
|
timeout: 6000,
|
||||||
|
@ -1290,26 +1269,26 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
}
|
}
|
||||||
// name description additionalDescription, height, width, visibility
|
// name description additionalDescription, height, width, visibility
|
||||||
let duplicates = 0;
|
let duplicates = 0;
|
||||||
for (let chart of charts) {
|
for (let indicator of importIndicators.indicators) {
|
||||||
chart.visibility = this.showVisibility ? chart.visibility : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities);
|
indicator.visibility = this.showVisibility ? indicator.visibility : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities);
|
||||||
if (!sectionsToSave[chart['sectionIndex']]) {
|
if (!sectionsToSave[indicator['sectionIndex']]) {
|
||||||
let sectionToSave = new Section(chart['sectionType'] ? chart['sectionType'] : chart['type'], chart['sectionTitle']);
|
let sectionToSave = new Section(indicator['sectionType'] ? indicator['sectionType'] : indicator['type'], indicator['sectionTitle']);
|
||||||
sectionToSave.indicators = [];
|
sectionToSave.indicators = [];
|
||||||
sectionsToSave[chart['sectionIndex']] = sectionToSave;
|
sectionsToSave[indicator['sectionIndex']] = sectionToSave;
|
||||||
}
|
}
|
||||||
let exists = false;
|
let exists = false;
|
||||||
let indicatorPaths: IndicatorPath[] = [];
|
let indicatorPaths: IndicatorPath[] = [];
|
||||||
// validate indicators' schema from file
|
// validate indicators' schema from file
|
||||||
let invalid_file_message;
|
let invalid_file_message;
|
||||||
if (!chart.type) {
|
if (!indicator.type) {
|
||||||
invalid_file_message = "No indicator type is specified. Type should be chart or number.";
|
invalid_file_message = "No indicator type is specified. Type should be chart or number.";
|
||||||
} else if (chart.type != "chart" && chart.type != "number") {
|
} else if (indicator.type != "chart" && indicator.type != "number") {
|
||||||
invalid_file_message = "Invalid indicator type. Type should be chart or number.";
|
invalid_file_message = "Invalid indicator type. Type should be chart or number.";
|
||||||
} else if (chart.indicatorPaths.length === 0) {
|
} else if (indicator.indicatorPaths.length === 0) {
|
||||||
invalid_file_message = "No indicator paths are specified."
|
invalid_file_message = "No indicator paths are specified."
|
||||||
} else if (chart.type == "number" && chart.indicatorPaths.filter(path => !path.jsonPath).length > 0) {
|
} else if (indicator.type == "number" && indicator.indicatorPaths.filter(path => !path.jsonPath).length > 0) {
|
||||||
invalid_file_message = "No jsonPath is specified for number indicator."
|
invalid_file_message = "No jsonPath is specified for number indicator."
|
||||||
} else if (chart.indicatorPaths.filter(path => !path.url).length > 0) {
|
} else if (indicator.indicatorPaths.filter(path => !path.url).length > 0) {
|
||||||
invalid_file_message = "No indicator url is specified.";
|
invalid_file_message = "No indicator url is specified.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1323,8 +1302,8 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chart.type == "chart") {
|
if (indicator.type == "chart") {
|
||||||
indicatorPaths = chart.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, chart.type, stakeholder, path.tab));
|
indicatorPaths = indicator.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, null, importIndicators.stakeholder, path.tab));
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts.forEach((section: Section) => {
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts.forEach((section: Section) => {
|
||||||
section.indicators.forEach(indicator => {
|
section.indicators.forEach(indicator => {
|
||||||
indicator.indicatorPaths.forEach(path => {
|
indicator.indicatorPaths.forEach(path => {
|
||||||
|
@ -1337,10 +1316,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else if (chart.type == "number") {
|
} else if (indicator.type == "number") {
|
||||||
indicatorPaths = chart.indicatorPaths.map(path =>
|
indicatorPaths = indicator.indicatorPaths.map(path =>
|
||||||
this.indicatorUtils.generateIndicatorByNumberUrl(this.indicatorUtils.getNumberSource(path.url), path.url,
|
this.indicatorUtils.generateIndicatorByNumberUrl(this.indicatorUtils.getNumberSource(path.url), path.url,
|
||||||
stakeholder, path.jsonPath, this.indicatorUtils.numberSources.get(this.indicatorUtils.getNumberSource(path.url))));
|
importIndicators.stakeholder, path.jsonPath, this.indicatorUtils.numberSources.get(this.indicatorUtils.getNumberSource(path.url))));
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers.forEach((section: Section) => {
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers.forEach((section: Section) => {
|
||||||
section.indicators.forEach(indicator => {
|
section.indicators.forEach(indicator => {
|
||||||
indicator.indicatorPaths.forEach(path => {
|
indicator.indicatorPaths.forEach(path => {
|
||||||
|
@ -1355,8 +1334,8 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (indicatorPaths.length > 0) {
|
if (indicatorPaths.length > 0) {
|
||||||
let i: Indicator = new Indicator(chart.name, chart.description, chart.additionalDescription, chart.type, chart.width, chart.height, this.showVisibility ? "RESTRICTED" : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities), indicatorPaths);
|
let i: Indicator = new Indicator(indicator.name, indicator.description, indicator.additionalDescription, indicator.type, indicator.width, indicator.height, this.showVisibility ? "RESTRICTED" : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities), indicatorPaths);
|
||||||
sectionsToSave[chart['sectionIndex']].indicators.push(i);
|
sectionsToSave[indicator['sectionIndex']].indicators.push(i);
|
||||||
countIndicators++;
|
countIndicators++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1498,7 +1477,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
});
|
});
|
||||||
this.finish();
|
this.finish();
|
||||||
} else {
|
} else {
|
||||||
this.importIndicatorsAndSave(json.stakeholder, json.indicators);
|
this.importIndicatorsAndSave(json);
|
||||||
}
|
}
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error("Error importing files", error);
|
console.error("Error importing files", error);
|
||||||
|
|
|
@ -84,8 +84,6 @@ export class StakeholderConfiguration {
|
||||||
{icon: 'incognito', value: "PRIVATE", label: 'Private'},
|
{icon: 'incognito', value: "PRIVATE", label: 'Private'},
|
||||||
];
|
];
|
||||||
public static CACHE_INDICATORS: boolean = true;
|
public static CACHE_INDICATORS: boolean = true;
|
||||||
public static NUMBER_MULTI_INDICATOR_PATHS = false;
|
|
||||||
public static CHART_MULTI_INDICATOR_PATHS = true;
|
|
||||||
public static openAccess: Map<string, OAIndicator> = new Map();
|
public static openAccess: Map<string, OAIndicator> = new Map();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,14 +117,6 @@ export class StakeholderUtils {
|
||||||
return StakeholderConfiguration.CACHE_INDICATORS;
|
return StakeholderConfiguration.CACHE_INDICATORS;
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasMultiNumberIndicatorPaths() {
|
|
||||||
return StakeholderConfiguration.NUMBER_MULTI_INDICATOR_PATHS;
|
|
||||||
}
|
|
||||||
|
|
||||||
get hasMultiChartIndicatorPaths() {
|
|
||||||
return StakeholderConfiguration.CHART_MULTI_INDICATOR_PATHS;
|
|
||||||
}
|
|
||||||
|
|
||||||
get openAccess(): Map<string, OAIndicator> {
|
get openAccess(): Map<string, OAIndicator> {
|
||||||
return StakeholderConfiguration.openAccess;
|
return StakeholderConfiguration.openAccess;
|
||||||
}
|
}
|
||||||
|
@ -744,6 +734,7 @@ export class IndicatorUtils {
|
||||||
} else if ((obj[this.getDescriptionObjectName(obj)]).hasOwnProperty("queries")) {
|
} else if ((obj[this.getDescriptionObjectName(obj)]).hasOwnProperty("queries")) {
|
||||||
return "queries";
|
return "queries";
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDescriptionObjectName(obj) {
|
private getDescriptionObjectName(obj) {
|
||||||
|
@ -756,6 +747,7 @@ export class IndicatorUtils {
|
||||||
} else if (obj.hasOwnProperty("series")) {
|
} else if (obj.hasOwnProperty("series")) {
|
||||||
return "series";
|
return "series";
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private extractType(obj, indicatorPath: IndicatorPath): IndicatorPathType {
|
private extractType(obj, indicatorPath: IndicatorPath): IndicatorPathType {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import {Directive} from "@angular/core";
|
||||||
import {BaseComponent} from "../../sharedComponents/base/base.component";
|
import {BaseComponent} from "../../sharedComponents/base/base.component";
|
||||||
import {IndicatorUtils, StakeholderUtils} from "./indicator-utils";
|
import {IndicatorUtils, StakeholderUtils} from "./indicator-utils";
|
||||||
import {ConnectHelper} from "../../connect/connectHelper";
|
import {ConnectHelper} from "../../connect/connectHelper";
|
||||||
import {IndicatorSize} from "../../monitor/entities/stakeholder";
|
import {Indicator, IndicatorSize} from "../../monitor/entities/stakeholder";
|
||||||
import {statsToolParser} from "./cache-indicators/cache-indicators";
|
import {statsToolParser} from "./cache-indicators/cache-indicators";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
|
@ -53,6 +53,7 @@ export abstract class StakeholderBaseComponent extends BaseComponent {
|
||||||
export abstract class IndicatorStakeholderBaseComponent extends StakeholderBaseComponent {
|
export abstract class IndicatorStakeholderBaseComponent extends StakeholderBaseComponent {
|
||||||
|
|
||||||
indicatorUtils: IndicatorUtils = new IndicatorUtils();
|
indicatorUtils: IndicatorUtils = new IndicatorUtils();
|
||||||
|
indicator: Indicator;
|
||||||
|
|
||||||
public getNumberClassBySize(size: IndicatorSize): string {
|
public getNumberClassBySize(size: IndicatorSize): string {
|
||||||
if (size === 'small') {
|
if (size === 'small') {
|
||||||
|
@ -73,4 +74,15 @@ export abstract class IndicatorStakeholderBaseComponent extends StakeholderBaseC
|
||||||
return 'uk-width-1-1';
|
return 'uk-width-1-1';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getActivePathIndex(indicator: Indicator = this.indicator): number {
|
||||||
|
return indicator?.activePath ? indicator.activePath : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getActiveIndicatorPath(indicator: Indicator = this.indicator) {
|
||||||
|
if(indicator?.indicatorPaths.length > this.getActivePathIndex(indicator)) {
|
||||||
|
return indicator.indicatorPaths[this.getActivePathIndex(indicator)];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,31 @@ export type Format = 'NUMBER' | 'PERCENTAGE';
|
||||||
export type Visibility = 'PUBLIC' | 'PRIVATE' | 'RESTRICTED';
|
export type Visibility = 'PUBLIC' | 'PRIVATE' | 'RESTRICTED';
|
||||||
export type Overlay = 'embed' | 'description' | false;
|
export type Overlay = 'embed' | 'description' | false;
|
||||||
|
|
||||||
|
export interface IndicatorImport {
|
||||||
|
indicatorPaths?: IndicatorPathImport[];
|
||||||
|
type: IndicatorType,
|
||||||
|
name: string,
|
||||||
|
description: string,
|
||||||
|
additionalDescription: string,
|
||||||
|
visibility: Visibility,
|
||||||
|
width: IndicatorSize,
|
||||||
|
height: IndicatorSize,
|
||||||
|
sectionTitle: string,
|
||||||
|
sectionType: IndicatorType,
|
||||||
|
sectionIndex: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IndicatorPathImport {
|
||||||
|
jsonPath?: string[],
|
||||||
|
tab: string,
|
||||||
|
url: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ImportIndicators {
|
||||||
|
stakeholder: Stakeholder,
|
||||||
|
indicators: IndicatorImport[]
|
||||||
|
}
|
||||||
|
|
||||||
export class ManageStakeholders {
|
export class ManageStakeholders {
|
||||||
templates: (Stakeholder & StakeholderInfo)[];
|
templates: (Stakeholder & StakeholderInfo)[];
|
||||||
standalone: (Stakeholder & StakeholderInfo)[];
|
standalone: (Stakeholder & StakeholderInfo)[];
|
||||||
|
|
|
@ -68,7 +68,7 @@ export class ResourcesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public isPagesEnabled() {
|
public isPagesEnabled() {
|
||||||
let url = properties.adminToolsAPIURL + "/monitor/monitor/pages";
|
let url = properties.adminToolsAPIURL + "monitor/monitor/pages";
|
||||||
return this.http.get<Page[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
return this.http.get<Page[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||||
.pipe(map(pages => {
|
.pipe(map(pages => {
|
||||||
let result = this.routes.map(() => false);
|
let result = this.routes.map(() => false);
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class StakeholderService {
|
||||||
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
this.stakeholderSubject.next(stakeholder);
|
this.stakeholderSubject.next(stakeholder);
|
||||||
|
@ -74,7 +74,7 @@ export class StakeholderService {
|
||||||
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
this.stakeholderSubject.next(stakeholder);
|
this.stakeholderSubject.next(stakeholder);
|
||||||
|
@ -91,7 +91,7 @@ export class StakeholderService {
|
||||||
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
stakeholder.index_id = orcid;
|
stakeholder.index_id = orcid;
|
||||||
|
@ -123,19 +123,19 @@ export class StakeholderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getAlias(url: string): Observable<string[]> {
|
getAlias(url: string): Observable<string[]> {
|
||||||
return this.http.get<Stakeholder[]>(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
return this.http.get<Stakeholder[]>(url + 'stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||||
return HelperFunctions.copy(stakeholders);
|
return HelperFunctions.copy(stakeholders);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||||
return this.http.get<Stakeholder[]>(url + '/stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
return this.http.get<Stakeholder[]>(url + 'stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getMyStakeholders(url: string, type: string = null): Observable<ManageStakeholders> {
|
getMyStakeholders(url: string, type: string = null): Observable<ManageStakeholders> {
|
||||||
return this.http.get<ManageStakeholders>(url + '/my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
return this.http.get<ManageStakeholders>(url + 'my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
||||||
return HelperFunctions.copy({
|
return HelperFunctions.copy({
|
||||||
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
|
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
|
||||||
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
|
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
|
||||||
|
@ -155,20 +155,20 @@ export class StakeholderService {
|
||||||
umbrella: umbrella,
|
umbrella: umbrella,
|
||||||
standalone: standalone
|
standalone: standalone
|
||||||
}
|
}
|
||||||
return this.http.post<Stakeholder>(url + '/build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
return this.http.post<Stakeholder>(url + 'build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
|
changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
|
||||||
return this.http.post<Visibility>(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
return this.http.post<Visibility>(url + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
saveElement(url: string, element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
|
saveElement(url: string, element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
|
||||||
if (element.alias && element.alias.startsWith('/')) {
|
if (element.alias && element.alias.startsWith('/')) {
|
||||||
element.alias = element.alias.slice(1);
|
element.alias = element.alias.slice(1);
|
||||||
}
|
}
|
||||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
return this.http.post<any>(url + path.join('/') +
|
||||||
'/save' + (isFull ? '/full' : ''), element, CustomOptions.registryOptions()).pipe(map(element => {
|
'/save' + (isFull ? '/full' : ''), element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
if (path.length === 0) {
|
if (path.length === 0) {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||||
|
@ -179,7 +179,7 @@ export class StakeholderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
|
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
|
||||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
return this.http.post<any>(url + path.join('/') +
|
||||||
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
if (path.length === 0) {
|
if (path.length === 0) {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||||
|
@ -190,7 +190,7 @@ export class StakeholderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
||||||
return this.http.post<Section>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
return this.http.post<Section>(url + path.join('/') +
|
||||||
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
return HelperFunctions.copy(element);
|
return HelperFunctions.copy(element);
|
||||||
}));
|
}));
|
||||||
|
@ -201,27 +201,27 @@ export class StakeholderService {
|
||||||
if (childrenAction) {
|
if (childrenAction) {
|
||||||
params = "?children=" + childrenAction;
|
params = "?children=" + childrenAction;
|
||||||
}
|
}
|
||||||
return this.http.delete<any>(url + '/' + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
|
return this.http.delete<any>(url + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
reorderElements(url: string, path: string[], ids: string[]): Observable<any> {
|
reorderElements(url: string, path: string[], ids: string[]): Observable<any> {
|
||||||
return this.http.post<any>(url + '/' + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
|
return this.http.post<any>(url + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
reorderIndicators(url: string, path: string[], indicators: string[]): Observable<Indicator[]> {
|
reorderIndicators(url: string, path: string[], indicators: string[]): Observable<Indicator[]> {
|
||||||
return this.http.post<Indicator[]>(url + '/' + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
return this.http.post<Indicator[]>(url + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
||||||
return HelperFunctions.copy(indicators);
|
return HelperFunctions.copy(indicators);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
moveIndicator(url: string, path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
|
moveIndicator(url: string, path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
|
||||||
return this.http.post<SubCategory>(url + '/' + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
return this.http.post<SubCategory>(url + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
||||||
return HelperFunctions.copy(subCategory);
|
return HelperFunctions.copy(subCategory);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUmbrella(url: string, id: string, update: UpdateUmbrella): Observable<Umbrella> {
|
updateUmbrella(url: string, id: string, update: UpdateUmbrella): Observable<Umbrella> {
|
||||||
return this.http.post<Umbrella>(url + '/' + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
return this.http.post<Umbrella>(url + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
||||||
return HelperFunctions.copy(umbrella);
|
return HelperFunctions.copy(umbrella);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,6 +367,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Compact results -->
|
||||||
|
<a *ngIf="hasCompactView && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||||
|
class="uk-link-reset custom-view-button active uk-margin-left">
|
||||||
|
<icon *ngIf="!compactView" uk-tooltip="Compact results" (click)="toggleView(true)"
|
||||||
|
name="unfold_less" [flex]="true" visuallyHidden="Compact results"></icon>
|
||||||
|
<icon *ngIf="compactView" uk-tooltip="Expand results" (click)="toggleView(false)"
|
||||||
|
name="unfold_more" [flex]="true" visuallyHidden="Expand results"></icon>
|
||||||
|
</a>
|
||||||
<!-- Download results -->
|
<!-- Download results -->
|
||||||
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||||
class="uk-margin-left uk-flex uk-flex-middle" [class.uk-flex-center]="mobile" [class.uk-margin-medium-top]="mobile">
|
class="uk-margin-left uk-flex uk-flex-middle" [class.uk-flex-center]="mobile" [class.uk-margin-medium-top]="mobile">
|
||||||
|
@ -381,14 +389,6 @@
|
||||||
</a>
|
</a>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<!-- Compact results -->
|
|
||||||
<a *ngIf="hasCompactView && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
|
||||||
class="uk-link-reset custom-view-button active uk-margin-left">
|
|
||||||
<icon *ngIf="!compactView" uk-tooltip="Compact results" (click)="toggleView(true)"
|
|
||||||
name="unfold_less" [flex]="true" visuallyHidden="Compact results"></icon>
|
|
||||||
<icon *ngIf="compactView" uk-tooltip="Expand results" (click)="toggleView(false)"
|
|
||||||
name="unfold_more" [flex]="true" visuallyHidden="Expand results"></icon>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -26,19 +26,19 @@ export class CustomizationService {
|
||||||
|
|
||||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
||||||
CustomizationService.removeNulls(layout);
|
CustomizationService.removeNulls(layout);
|
||||||
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
return this.http.post<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||||
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
deleteLayout(properties: EnvProperties, pid: string, portalType = null): Observable<Layout> {
|
deleteLayout(properties: EnvProperties, pid: string, portalType = null): Observable<Layout> {
|
||||||
return this.http.delete<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
return this.http.delete<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||||
+ pid + '/layout', CustomOptions.getAuthOptionsWithBody());
|
+ pid + '/layout', CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
getLayout(properties: EnvProperties, pid: string): Observable<Layout> {
|
getLayout(properties: EnvProperties, pid: string): Observable<Layout> {
|
||||||
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
return this.http.get<Layout>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'
|
||||||
+ pid + '/layout');
|
+ pid + '/layout');
|
||||||
}
|
}
|
||||||
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
||||||
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
|
return this.http.get<Layout[]>(properties.adminToolsAPIURL + 'community/layouts');
|
||||||
}
|
}
|
||||||
mockLayout(): any {
|
mockLayout(): any {
|
||||||
return this.http.get('./assets/customizationOptions.json') ;
|
return this.http.get('./assets/customizationOptions.json') ;
|
||||||
|
|
|
@ -406,11 +406,10 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteCommunities(ids : string[], helpContentUrl:string) {
|
deleteCommunities(ids : string[], helpContentUrl:string, portalType:string) {
|
||||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||||
// let options = new RequestOptions({headers: headers});
|
// let options = new RequestOptions({headers: headers});
|
||||||
|
return this.http.post(helpContentUrl + '/' + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class PluginsService {
|
||||||
}
|
}
|
||||||
|
|
||||||
countPluginTemplatePerPageForAllPortals(api: string) {
|
countPluginTemplatePerPageForAllPortals(api: string) {
|
||||||
return this.http.get(api + '/pluginTemplate/page/count');
|
return this.http.get(api + 'pluginTemplate/page/count');
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginsByPage(api: string, pid: string, pageId: string) {
|
getPluginsByPage(api: string, pid: string, pageId: string) {
|
||||||
|
@ -66,11 +66,11 @@ export class PluginsService {
|
||||||
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
|
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
getPluginById(api: string, id: string) {
|
getPluginById(api: string, id: string) {
|
||||||
return this.http.get<Plugin>(api + '/plugin/' + id);
|
return this.http.get<Plugin>(api + 'plugin/' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginTemplateById(api: string, id: string) {
|
getPluginTemplateById(api: string, id: string) {
|
||||||
return this.http.get<PluginTemplate>(api + '/pluginTemplates/' + id);
|
return this.http.get<PluginTemplate>(api + 'pluginTemplates/' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@ export class SliderTabComponent {
|
||||||
@Input()
|
@Input()
|
||||||
public disabled: boolean = false;
|
public disabled: boolean = false;
|
||||||
@Input()
|
@Input()
|
||||||
|
public invisible: boolean = false;
|
||||||
|
@Input()
|
||||||
public align: 'left' | 'right' = 'left';
|
public align: 'left' | 'right' = 'left';
|
||||||
@Input()
|
@Input()
|
||||||
public routerLink: any[] | string | null | undefined = null;
|
public routerLink: any[] | string | null | undefined = null;
|
||||||
|
|
|
@ -21,71 +21,71 @@ declare var UIkit;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'slider-tabs',
|
selector: 'slider-tabs',
|
||||||
template: `
|
template: `
|
||||||
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
||||||
[ngClass]="customClass">
|
[ngClass]="customClass">
|
||||||
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
||||||
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
||||||
[class.uk-slider-items]="position === 'horizontal'"
|
[class.uk-slider-items]="position === 'horizontal'"
|
||||||
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
||||||
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
|
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
|
||||||
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
||||||
<ng-container *ngIf="type === 'static'">
|
<ng-container *ngIf="type === 'static'">
|
||||||
<li *ngFor="let tab of leftTabs" [ngStyle]="" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
<li *ngFor="let tab of leftTabs" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
<a>
|
<a [class.uk-disabled]="tab.invisible || tab.disabled">
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
<a [ngClass]="tab.customClass">
|
<a [class.uk-disabled]="tab.invisible || tab.disabled" [ngClass]="tab.customClass">
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="type === 'dynamic'">
|
||||||
|
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-invisible]="tab.invisible" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
||||||
|
<a [class.uk-disabled]="tab.invisible || tab.disabled" [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||||
|
(click)="showActive(i)"
|
||||||
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
||||||
|
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
||||||
|
<a [class.uk-disabled]="tab.invisible || tab.disabled" [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||||
|
(click)="showActive(i)"
|
||||||
|
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="type === 'scrollable'">
|
||||||
|
<li *ngFor="let tab of leftTabs" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||||
|
<a [class.uk-disabled]="tab.invisible || tab.disabled" routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||||
|
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||||
|
[class.uk-active]="tab.active">
|
||||||
|
<a [class.uk-disabled]="tab.invisible || tab.disabled" routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||||
|
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||||
|
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ng-container>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<ng-container *ngIf="!isServer">
|
||||||
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
||||||
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="type === 'dynamic'">
|
|
||||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
|
||||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
|
||||||
(click)="showActive(i)"
|
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
|
||||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
|
||||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
|
||||||
(click)="showActive(i)"
|
|
||||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="type === 'scrollable'">
|
|
||||||
<li *ngFor="let tab of leftTabs" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
|
||||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
|
||||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
|
||||||
[class.uk-active]="tab.active">
|
|
||||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
|
||||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
|
||||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ng-container>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="!isServer">
|
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
|
@ -160,7 +160,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.initTabs();
|
this.initTabs();
|
||||||
this.tabs.changes.subscribe(() => {
|
this.tabs.changes.subscribe(() => {
|
||||||
this.initTabs();
|
this.initTabs();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ export class ConfigurationService {
|
||||||
|
|
||||||
public initPortal(properties: EnvProperties, pid: string) {
|
public initPortal(properties: EnvProperties, pid: string) {
|
||||||
if (pid == null || this.portal?.getValue()?.static) return;
|
if (pid == null || this.portal?.getValue()?.static) return;
|
||||||
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
let url = properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||||
this.promise = new Promise<void>(resolve => {
|
this.promise = new Promise<void>(resolve => {
|
||||||
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
||||||
(portal: Portal) => {
|
(portal: Portal) => {
|
||||||
|
|
|
@ -16,22 +16,22 @@ export class EmailService {
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyManagers(pid: string, role: "manager" | "subscriber", email: Email) {
|
notifyManagers(pid: string, role: "manager" | "subscriber", email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + '/notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
return this.http.post(properties.adminToolsAPIURL + 'notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyNewManager(email: Email) {
|
notifyNewManager(email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + '/notifyNewManager', email, CustomOptions.getAuthOptions())
|
return this.http.post(properties.adminToolsAPIURL + 'notifyNewManager', email, CustomOptions.getAuthOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEmail(properties: EnvProperties, email: Email) {
|
sendEmail(properties: EnvProperties, email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + "/sendMail/", email, CustomOptions.registryOptions());
|
return this.http.post(properties.adminToolsAPIURL + "sendMail/", email, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
contact(properties: EnvProperties, email: Email, recaptcha: string = null):Observable<boolean> {
|
contact(properties: EnvProperties, email: Email, recaptcha: string = null):Observable<boolean> {
|
||||||
const data: EmailRecaptcha = new EmailRecaptcha();
|
const data: EmailRecaptcha = new EmailRecaptcha();
|
||||||
data.email = email;
|
data.email = email;
|
||||||
data.recaptcha = recaptcha;
|
data.recaptcha = recaptcha;
|
||||||
return this.http.post<boolean>(properties.adminToolsAPIURL + '/contact', data);
|
return this.http.post<boolean>(properties.adminToolsAPIURL + 'contact', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ export class HelperService {
|
||||||
|
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
if (div) {
|
if (div) {
|
||||||
url += '/divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
url += 'divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
||||||
} else {
|
} else {
|
||||||
url += '/pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
url += 'pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
||||||
if (before) {
|
if (before) {
|
||||||
url += '&before=' + before;
|
url += '&before=' + before;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export class HelperService {
|
||||||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
url += portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
||||||
((page_route.indexOf("/" + portal + "/") != -1) ? ("/" + page_route.split("/" + portal + "/")[1]) : page_route);
|
((page_route.indexOf("/" + portal + "/") != -1) ? ("/" + page_route.split("/" + portal + "/")[1]) : page_route);
|
||||||
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||||
} else {
|
} else {
|
||||||
|
@ -60,7 +60,7 @@ export class HelperService {
|
||||||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += '/' + properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
url += properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
||||||
((page_route.indexOf("/" + communityId + "/") != -1) ? ("/" + page_route.split("/" + communityId + "/")[1]) : page_route);
|
((page_route.indexOf("/" + communityId + "/") != -1) ? ("/" + page_route.split("/" + communityId + "/")[1]) : page_route);
|
||||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
|
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -116,7 +116,7 @@ export let commonDev: EnvProperties = {
|
||||||
cookieDomain: ".di.uoa.gr",
|
cookieDomain: ".di.uoa.gr",
|
||||||
feedbackmail: "kostis30fylloy@gmail.com",
|
feedbackmail: "kostis30fylloy@gmail.com",
|
||||||
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
||||||
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service",
|
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service/",
|
||||||
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
||||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||||
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
||||||
|
@ -152,7 +152,7 @@ export let commonTest: EnvProperties = {
|
||||||
loginServiceURL: " https://services.openaire.eu/login-service/",
|
loginServiceURL: " https://services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
||||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||||
|
@ -181,7 +181,7 @@ export let commonBeta: EnvProperties = {
|
||||||
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
|
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
|
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service",
|
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service/",
|
||||||
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
|
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
|
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
|
||||||
|
@ -220,7 +220,7 @@ export let commonProd: EnvProperties = {
|
||||||
loginServiceURL: "https://services.openaire.eu/login-service/",
|
loginServiceURL: "https://services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
||||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||||
|
|
|
@ -150,7 +150,8 @@ export class ISVocabulariesService {
|
||||||
value.id = fos.id;//data[i].code;
|
value.id = fos.id;//data[i].code;
|
||||||
value.label = fos.label;
|
value.label = fos.label;
|
||||||
array.push(value);
|
array.push(value);
|
||||||
if(fos.children && fos.children.length > 0) {
|
// hide L3 & L4 FoS
|
||||||
|
if(fos.children && fos.children.length > 0 && (fos.level == 1)) {
|
||||||
for (let i=fos.children.length-1; i>=0; i--) {
|
for (let i=fos.children.length-1; i>=0; i--) {
|
||||||
children.push(fos.children[i]);
|
children.push(fos.children[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue