Merge remote-tracking branch 'origin/develop' into plugins-functionality
This commit is contained in:
commit
50051f2de8
|
@ -56,25 +56,44 @@
|
||||||
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
<div>No links found</div>
|
<div>No links found</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="uk-margin-small-top uk-list uk-list-xlarge">
|
<ng-container *ngIf="claims && claims.length > 0">
|
||||||
<li *ngFor="let claim of claims; let i=index" class="uk-card uk-card-default">
|
|
||||||
<div class="uk-card-body">
|
<div class="uk-flex uk-flex-middle uk-margin-top uk-margin-small-bottom uk-padding-small uk-padding-remove-horizontal">
|
||||||
<div class="uk-grid uk-grid-small" uk-grid>
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
<label>
|
||||||
|
<input id="checkAll" type="checkbox" (click)="selectAll($event)" class="uk-checkbox" title="Select All"
|
||||||
|
[ngModel]="selected.length == claims.length"/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button class="uk-button uk-button-link" [class.uk-disabled]="selected.length == 0" [disabled]="selected.length == 0"
|
||||||
|
(click)="deleteOpen()">
|
||||||
|
<span>Delete ({{selected.length}})</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="uk-margin-small-top uk-list uk-list-striped">
|
||||||
|
<li *ngFor="let claim of claims; let i=index" class="uk-flex uk-flex-middle uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
<input type="checkbox" class="uk-checkbox"
|
||||||
|
[id]="claim.id" (click)="selectClaim(claim, $event)" [ngModel]="isSelectedClaim(claim.id)">
|
||||||
|
</div>
|
||||||
<div class="uk-width-expand">
|
<div class="uk-width-expand">
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-grid uk-grid-small uk-flex-middle" uk-grid>
|
||||||
|
<div class="uk-width-expand">
|
||||||
|
<div class="uk-margin-small-bottom">
|
||||||
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
||||||
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
|
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-small uk-label-success"
|
||||||
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
||||||
<ng-template #notAvailable>
|
<ng-template #notAvailable>
|
||||||
<span class="uk-label uk-label-danger"
|
<span class="uk-label uk-label-small uk-label-danger"
|
||||||
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-small">
|
<div class="uk-text-small">
|
||||||
<div *ngIf="showUserEmail" class="uk-margin-small-bottom">
|
<div *ngIf="showUserEmail" class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Claimed by:</span>
|
<span class="uk-text-meta">Claimed by:</span>
|
||||||
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,16 +108,15 @@
|
||||||
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-column uk-flex-center">
|
<div class="uk-width-1-2@m uk-width-1-1">
|
||||||
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
||||||
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-card-footer uk-flex uk-flex-right">
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
||||||
<icon name="delete" [flex]="true"></icon>
|
<icon name="delete" [flex]="true"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Delete</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -107,6 +125,7 @@
|
||||||
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||||
(pageChange)="pageChange($event)"></paging-no-load>
|
(pageChange)="pageChange($event)"></paging-no-load>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,14 +4,4 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 50%;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
border-left: @global-border-width solid @global-border;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
lastIndexDate = null;
|
lastIndexDate = null;
|
||||||
public filterForm: FormGroup;
|
public filterForm: FormGroup;
|
||||||
public entities: string[] = [];
|
public entities: string[] = [];
|
||||||
|
selected = [];
|
||||||
|
|
||||||
allOptions: Option[] = [
|
allOptions: Option[] = [
|
||||||
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
|
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
|
||||||
|
@ -310,23 +311,34 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
isSelected(value: string) {
|
isSelected(value: string) {
|
||||||
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value)
|
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteOpen(index: number) {
|
deleteOpen(index: number = null) {
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.deleteModal.alertTitle = 'Delete Confirmation';
|
this.deleteModal.alertTitle = 'Delete Confirmation';
|
||||||
this.deleteModal.message = 'Are you sure you want to delete this link?';
|
this.deleteModal.message = 'Are you sure you want to delete ' + (this.index != null ? '1' : this.selected.length) + ' link(s)?';
|
||||||
this.deleteModal.okButtonText = 'Yes';
|
this.deleteModal.okButtonText = 'Yes';
|
||||||
this.deleteModal.open();
|
this.deleteModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
this.subscriptions.push(this._claimService.deleteBulk([this.claims[this.index].id], this.properties.claimsAPIURL).subscribe(
|
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
|
||||||
|
console.log(claimsToBeDeleted);
|
||||||
|
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
|
||||||
res => {
|
res => {
|
||||||
|
if (this.index != null) {
|
||||||
this.claims.splice(this.index, 1);
|
this.claims.splice(this.index, 1);
|
||||||
this.resultsNum = this.resultsNum - 1;
|
this.resultsNum = this.resultsNum - 1;
|
||||||
NotificationHandler.rise('Link has been deleted successfully');
|
NotificationHandler.rise('Link has been deleted successfully');
|
||||||
|
} else {
|
||||||
|
claimsToBeDeleted.forEach(claimId => {
|
||||||
|
this.claims.splice(this.claims.findIndex((id) => id == claimId), 1);
|
||||||
|
});
|
||||||
|
this.resultsNum = this.resultsNum - claimsToBeDeleted.length;
|
||||||
|
NotificationHandler.rise(claimsToBeDeleted.length + ' links have been deleted successfully');
|
||||||
|
}
|
||||||
|
this.selected = [];
|
||||||
let goToPage = this.page;
|
let goToPage = this.page;
|
||||||
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
|
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
|
||||||
goToPage = this.page - 1;
|
goToPage = this.page - 1;
|
||||||
|
@ -334,7 +346,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
this.goTo(goToPage);
|
this.goTo(goToPage);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
|
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
|
||||||
}));
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
pageChange($event) {
|
pageChange($event) {
|
||||||
|
@ -363,6 +376,43 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
return totalPages;
|
return totalPages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectClaim(item: any, event) {
|
||||||
|
let value = event.currentTarget.checked;
|
||||||
|
if (value) {
|
||||||
|
this.selected.push(item);
|
||||||
|
} else {
|
||||||
|
for (var _i = 0; _i < this.selected.length; _i++) {
|
||||||
|
let claim = this.selected[_i];
|
||||||
|
if (claim['id'] == item.id) {
|
||||||
|
this.selected.splice(_i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
selectAll(event) {
|
||||||
|
let value = event.currentTarget.checked;
|
||||||
|
if (value) {
|
||||||
|
this.selected = [];
|
||||||
|
for (let _i = 0; _i < this.claims.length; _i++) {
|
||||||
|
let claim = this.claims[_i];
|
||||||
|
this.selected.push(claim);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.selected = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isSelectedClaim(id: string) {
|
||||||
|
for (let _i = 0; _i < this.selected.length; _i++) {
|
||||||
|
let claim = this.selected[_i];
|
||||||
|
if (claim['id'] == id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
|
|
|
@ -15,21 +15,22 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
||||||
<div *ngIf="source" class="uk-text-small">
|
<div *ngIf="source" class="uk-text-small">
|
||||||
{{getEntityName(type)}}
|
{{getEntityName(type)}}
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-flex">
|
<div>
|
||||||
<span *ngIf="!source" class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
<span *ngIf="!source" class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
<publication-title [entity]="entity" param="id"
|
<publication-title [entity]="entity" param="id"
|
||||||
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
|
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)"
|
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)">
|
||||||
class="uk-flex">
|
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
<span class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
|
||||||
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
|
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
|
||||||
[externalPortalUrl]=externalPortalUrl></project-title>
|
[externalPortalUrl]=externalPortalUrl></project-title>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="type == 'context'" class="uk-flex uk-text-large">
|
<div *ngIf="type == 'context'">
|
||||||
<span class="uk-text-meta uk-margin-small-right uk-text-nowrap">Link to:</span>
|
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
|
<h6 class="uk-h6 uk-margin-remove">
|
||||||
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {properties} from "../../../../../environments/environment";
|
||||||
</h6>
|
</h6>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
||||||
<span class="uk-text-muted">Funder: </span>{{project['funderName']}}
|
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||||
</span>
|
</span>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,10 +23,11 @@ export class MenuItem {
|
||||||
isFeatured: boolean;
|
isFeatured: boolean;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
target: string = "_blank";
|
target: string = "_blank";
|
||||||
|
badge?: string = ""; // used only for RDGraph portal (FAIRCORE4EOSC)
|
||||||
|
|
||||||
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[],
|
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[],
|
||||||
routeRequired: string[], params, icon: Icon = null, fragment = null, customClass = null, routeActive = null,
|
routeRequired: string[], params, icon: Icon = null, fragment = null, customClass = null, routeActive = null,
|
||||||
target: string = "_blank", type: string = "internal", isFeatured: boolean = false, items: MenuItem[] = []) {
|
target: string = "_blank", type: string = "internal", isFeatured: boolean = false, items: MenuItem[] = [], badge: string = "") {
|
||||||
this._id = id;
|
this._id = id;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
@ -43,6 +44,7 @@ export class MenuItem {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.isFeatured = isFeatured;
|
this.isFeatured = isFeatured;
|
||||||
|
this.badge = badge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isTheActiveMenu(menu: MenuItem, currentRoute: any, activeMenuItem: string = ""): boolean {
|
public static isTheActiveMenu(menu: MenuItem, currentRoute: any, activeMenuItem: string = ""): boolean {
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
<a *ngIf="!menu.url" [routerLink]="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired) && menu.items.length === 0?menu.route:null"
|
<a *ngIf="!menu.url" [routerLink]="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired) && menu.items.length === 0?menu.route:null"
|
||||||
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||||
[queryParams]="menu.params"
|
[queryParams]="menu.params"
|
||||||
[fragment]="menu.fragment">{{menu.title}}<span *ngIf="menu.items.length > 0" class="uk-nav-parent-icon"></span></a>
|
[fragment]="menu.fragment">
|
||||||
|
<span *ngIf="menu.badge" style="position: relative"><span class="badge-mobile">{{menu.badge}}</span></span>
|
||||||
|
{{menu.title}}<span *ngIf="menu.items.length > 0" class="uk-nav-parent-icon"></span></a>
|
||||||
<a *ngIf="menu.url"
|
<a *ngIf="menu.url"
|
||||||
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||||
[href]="menu.items.length === 0?menu.url:null"
|
[href]="menu.items.length === 0?menu.url:null"
|
||||||
|
@ -215,7 +217,9 @@
|
||||||
<a *ngIf="menu.route.length == 0 && menu.url.length > 0"
|
<a *ngIf="menu.route.length == 0 && menu.url.length > 0"
|
||||||
href="{{menu.url}}" target="{{menu.target}}"
|
href="{{menu.url}}" target="{{menu.target}}"
|
||||||
[class.custom-external]="menu.target != '_self'">{{menu.title}}</a>
|
[class.custom-external]="menu.target != '_self'">{{menu.title}}</a>
|
||||||
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">{{menu.title}}</a>
|
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">
|
||||||
|
<span *ngIf="menu.badge" class="badge">{{menu.badge}}</span>
|
||||||
|
{{menu.title}}</a>
|
||||||
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
||||||
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -6,11 +6,14 @@ import {
|
||||||
ElementRef, EventEmitter,
|
ElementRef, EventEmitter,
|
||||||
Input, OnDestroy, Output,
|
Input, OnDestroy, Output,
|
||||||
QueryList,
|
QueryList,
|
||||||
ViewChild
|
ViewChild,
|
||||||
|
Inject,
|
||||||
|
PLATFORM_ID
|
||||||
} from "@angular/core";
|
} from "@angular/core";
|
||||||
import {SliderTabComponent} from "./slider-tab.component";
|
import {SliderTabComponent} from "./slider-tab.component";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
|
import {isPlatformServer} from "@angular/common";
|
||||||
import Timeout = NodeJS.Timeout;
|
import Timeout = NodeJS.Timeout;
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
@ -20,7 +23,7 @@ declare var UIkit;
|
||||||
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'">
|
<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'"
|
||||||
|
@ -78,8 +81,10 @@ declare var UIkit;
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<ng-container *ngIf="!isServer">
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
@ -112,6 +117,11 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
* */
|
* */
|
||||||
@Input()
|
@Input()
|
||||||
public flexPosition: 'center' | 'left' | 'right' = 'left';
|
public flexPosition: 'center' | 'left' | 'right' = 'left';
|
||||||
|
/**
|
||||||
|
* Set a class for the container
|
||||||
|
* */
|
||||||
|
@Input()
|
||||||
|
public containerClass: string;
|
||||||
/**
|
/**
|
||||||
* Set a class above tabs
|
* Set a class above tabs
|
||||||
* */
|
* */
|
||||||
|
@ -138,10 +148,13 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
private observer: IntersectionObserver;
|
private observer: IntersectionObserver;
|
||||||
private timeout: Timeout;
|
private timeout: Timeout;
|
||||||
|
isServer: boolean;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private cdr: ChangeDetectorRef) {
|
private cdr: ChangeDetectorRef,
|
||||||
|
@Inject(PLATFORM_ID) private platform: any) {
|
||||||
|
this.isServer = isPlatformServer(this.platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
@ -164,7 +177,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.type === 'static') {
|
if (this.type === 'static') {
|
||||||
let tabs = UIkit.tab(this.tabsElement.nativeElement, {connect: this.connect});
|
let tabs = UIkit.switcher(this.tabsElement.nativeElement, {connect: this.connect});
|
||||||
tabs.show(this.activeIndex);
|
tabs.show(this.activeIndex);
|
||||||
if (this.connect.includes('#')) {
|
if (this.connect.includes('#')) {
|
||||||
this.scrollToStart();
|
this.scrollToStart();
|
||||||
|
|
|
@ -341,6 +341,14 @@ export class SearchFieldsBase {
|
||||||
operator: "pf",
|
operator: "pf",
|
||||||
equalityOperator: " = ",
|
equalityOperator: " = ",
|
||||||
filterType: "triplet"
|
filterType: "triplet"
|
||||||
|
},
|
||||||
|
["haslicense"]: {
|
||||||
|
name: "License",
|
||||||
|
type: "triplet",
|
||||||
|
param: "haslicense",
|
||||||
|
operator: "hl",
|
||||||
|
equalityOperator: " = ",
|
||||||
|
filterType: "triplet"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -377,6 +385,11 @@ export class SearchFieldsBase {
|
||||||
{ name: "All", id: "", count: "0" },
|
{ name: "All", id: "", count: "0" },
|
||||||
{ name: "Yes", id: "true", count: "0" },
|
{ name: "Yes", id: "true", count: "0" },
|
||||||
{ name: "No", id: "false", count: "0" }
|
{ name: "No", id: "false", count: "0" }
|
||||||
|
],
|
||||||
|
["haslicense"]: [
|
||||||
|
{ name: "All", id: "", count: "0" },
|
||||||
|
{ name: "Yes", id: "true", count: "0" },
|
||||||
|
{ name: "No", id: "false", count: "0" }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue