[Library|Trunk]
Monitor: -update stakeholder classes, add visibility, remove isPublic, isActive Icons: add bullet, preview icon COOKIE: add SameSite=Lax offcanvas-white: add h6 git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59674 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
9790eb053a
commit
f775d422c9
|
@ -132,7 +132,7 @@ export class COOKIE{
|
|||
}else if(document.domain.indexOf(".openaire.eu") != -1){
|
||||
domain = ".openaire.eu";
|
||||
}
|
||||
document.cookie = name+'='+value+'; path='+path+'; domain='+domain+';';
|
||||
document.cookie = name+'='+value+'; path='+path+'; domain='+domain+';SameSite=Lax;';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,19 +62,17 @@ export class Topic {
|
|||
name: string;
|
||||
alias: string;
|
||||
description: string;
|
||||
isActive: boolean;
|
||||
isPublic: boolean;
|
||||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
categories: Category[];
|
||||
icon: string;
|
||||
|
||||
constructor(name: string, description: string, alias: string, isActive: boolean, isPublic: boolean, defaultId: string = null, icon: string = null) {
|
||||
constructor(name: string, description: string, alias: string, visibility:Visibility, defaultId: string = null, icon: string = null) {
|
||||
this._id = null;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.alias = alias;
|
||||
this.isActive = isActive;
|
||||
this.isPublic = isPublic;
|
||||
this.visibility = visibility;
|
||||
this.defaultId = defaultId;
|
||||
this.categories = [];
|
||||
this.icon = icon;
|
||||
|
@ -86,18 +84,16 @@ export class Category {
|
|||
name: string;
|
||||
alias: string;
|
||||
description: string;
|
||||
isActive: boolean;
|
||||
isPublic: boolean;
|
||||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
subCategories: SubCategory[];
|
||||
|
||||
constructor(name: string, description: string, alias: string, isActive: boolean, isPublic: boolean, defaultId: string = null) {
|
||||
constructor(name: string, description: string, alias: string, visibility: Visibility, defaultId: string = null) {
|
||||
this._id = null;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.alias = alias;
|
||||
this.isActive = isActive;
|
||||
this.isPublic = isPublic;
|
||||
this.visibility = visibility;
|
||||
this.defaultId = defaultId;
|
||||
this.subCategories = [];
|
||||
}
|
||||
|
@ -108,20 +104,18 @@ export class SubCategory {
|
|||
name: string;
|
||||
alias: string;
|
||||
description: string;
|
||||
isActive: boolean;
|
||||
isPublic: boolean;
|
||||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
charts: Section[];
|
||||
numbers: Section[];
|
||||
recommendedFor: string[];
|
||||
|
||||
constructor(name: string, description: string, alias: string, isActive: boolean, isPublic: boolean, defaultId: string = null) {
|
||||
constructor(name: string, description: string, alias: string, visibility: Visibility, defaultId: string = null) {
|
||||
this._id = null;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.alias = alias;
|
||||
this.isActive = isActive;
|
||||
this.isPublic = isPublic;
|
||||
this.visibility = visibility;
|
||||
this.defaultId = defaultId;
|
||||
this.charts = [];
|
||||
this.numbers = [];
|
||||
|
@ -155,20 +149,18 @@ export class Indicator {
|
|||
type: IndicatorType;
|
||||
width: IndicatorWidth;
|
||||
tags: string[];
|
||||
isActive: boolean;
|
||||
isPublic: boolean;
|
||||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
indicatorPaths: IndicatorPath[];
|
||||
recommendedFor: string[];
|
||||
|
||||
constructor(name: string, description: string, type: IndicatorType, width: IndicatorWidth, isActive: boolean, isPublic: boolean, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||
constructor(name: string, description: string, type: IndicatorType, width: IndicatorWidth, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||
this._id = null;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
this.width = width;
|
||||
this.isActive = isActive;
|
||||
this.isPublic = isPublic;
|
||||
this.visibility = visibility;
|
||||
this.defaultId = defaultId;
|
||||
this.indicatorPaths = indicatorPaths;
|
||||
this.recommendedFor = [];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BehaviorSubject, Observable} from "rxjs";
|
||||
import {Indicator, Section, Stakeholder, StakeholderInfo} from "../entities/stakeholder";
|
||||
import {Indicator, Section, Stakeholder, StakeholderInfo, Visibility} from "../entities/stakeholder";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {map} from "rxjs/operators";
|
||||
|
||||
|
@ -57,7 +57,9 @@ export class StakeholderService {
|
|||
return this.formalize(stakeholder);
|
||||
}));
|
||||
}
|
||||
|
||||
toggleVisibility(url: string, path: string[], visibility:Visibility): Observable<Visibility> {
|
||||
return this.http.post<Visibility>(url + '/' + path.join('/') + '/change-visibility'+'?visibility=' + visibility, null);
|
||||
}
|
||||
toggleStatus(url: string, path: string[]): Observable<boolean> {
|
||||
return this.http.post<boolean>(url + '/' + path.join('/') + '/toggle-status', null);
|
||||
}
|
||||
|
|
|
@ -53,3 +53,12 @@ export const remove: Icon = {
|
|||
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/></svg>'
|
||||
}
|
||||
|
||||
export const preview: Icon = {
|
||||
name: 'preview',
|
||||
data: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>'
|
||||
}
|
||||
export const bullet: Icon = {
|
||||
name: 'bullet',
|
||||
data: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="10"/></svg>'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue