[master] update imports for customFilter.service.ts file (now moved to openaireLibrary/shared)
This commit is contained in:
parent
a581ea6a11
commit
7711f319fa
|
@ -4,7 +4,7 @@ import {MenuItem} from "./openaireLibrary/sharedComponents/menu";
|
||||||
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
|
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
|
||||||
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
|
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
|
||||||
import {Irish} from "./shared/irish";
|
import {Irish} from "./shared/irish";
|
||||||
import {CustomFilterService} from "./shared/customFilter.service";
|
import {CustomFilterService} from "./openaireLibrary/shared/customFilter.service";
|
||||||
import {UserManagementService} from "./openaireLibrary/services/user-management.service";
|
import {UserManagementService} from "./openaireLibrary/services/user-management.service";
|
||||||
import {Session, User} from "./openaireLibrary/login/utils/helper.class";
|
import {Session, User} from "./openaireLibrary/login/utils/helper.class";
|
||||||
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
|
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||||
import {LinksResolver} from "../search/links-resolver";
|
import {LinksResolver} from "../search/links-resolver";
|
||||||
import {CustomFilterService} from "../shared/customFilter.service";
|
import {CustomFilterService} from "../openaireLibrary/shared/customFilter.service";
|
||||||
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
||||||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 31220578cf9d662fead11e9491b2abd490d035ee
|
Subproject commit 52d63ece254ac132f6b42f9fe6ac804a651cfa39
|
|
@ -6,7 +6,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
|
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
|
||||||
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
|
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
|
||||||
import {CustomFilterService} from "../shared/customFilter.service";
|
import {CustomFilterService} from "../openaireLibrary/shared/customFilter.service";
|
||||||
import {LinksResolver} from "../search/links-resolver";
|
import {LinksResolver} from "../search/links-resolver";
|
||||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {SearchOrcidService} from "../openaireLibrary/claims/claim-utils/service/searchOrcid.service";
|
import {SearchOrcidService} from "../openaireLibrary/claims/claim-utils/service/searchOrcid.service";
|
||||||
|
|
||||||
import {CustomFilterService} from "../shared/customFilter.service";
|
import {CustomFilterService} from "../openaireLibrary/shared/customFilter.service";
|
||||||
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
|
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
|
||||||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {ResearcherBaseComponent} from "../shared/researcher-base.component";
|
import {ResearcherBaseComponent} from "../shared/researcher-base.component";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||||
import {LinksResolver} from "../search/links-resolver";
|
import {LinksResolver} from "../search/links-resolver";
|
||||||
import {CustomFilterService} from "../shared/customFilter.service";
|
import {CustomFilterService} from "../openaireLibrary/shared/customFilter.service";
|
||||||
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
||||||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {Meta, Title} from "@angular/platform-browser";
|
import {Meta, Title} from "@angular/platform-browser";
|
||||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||||
import {LinksResolver} from "../search/links-resolver";
|
import {LinksResolver} from "../search/links-resolver";
|
||||||
import {CustomFilterService} from "../shared/customFilter.service";
|
import {CustomFilterService} from "../openaireLibrary/shared/customFilter.service";
|
||||||
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/stakeholder-base.component";
|
||||||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-advanced-search-dataproviders',
|
selector: 'monitor-advanced-search-dataproviders',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-advanced-search-organizations',
|
selector: 'monitor-advanced-search-organizations',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-advanced-search-projects',
|
selector: 'monitor-advanced-search-projects',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-advanced-search-results',
|
selector: 'monitor-advanced-search-results',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Directive, OnInit} from "@angular/core";
|
import {Directive, OnInit} from "@angular/core";
|
||||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||||
import {BaseComponent} from "../../openaireLibrary/sharedComponents/base/base.component";
|
import {BaseComponent} from "../../openaireLibrary/sharedComponents/base/base.component";
|
||||||
import {CustomFilterService} from "../../shared/customFilter.service";
|
import {CustomFilterService} from "../../openaireLibrary/shared/customFilter.service";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-search-dataproviders',
|
selector: 'monitor-search-dataproviders',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-search-organizations',
|
selector: 'monitor-search-organizations',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'monitor-search-projects',
|
selector: 'monitor-search-projects',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {CustomFilterService} from "../../../shared/customFilter.service";
|
import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service";
|
||||||
import {SearchBaseComponent} from "../searchBaseComponent";
|
import {SearchBaseComponent} from "../searchBaseComponent";
|
||||||
import {OpenaireEntities} from "../../../openaireLibrary/utils/properties/searchFields";
|
import {OpenaireEntities} from "../../../openaireLibrary/utils/properties/searchFields";
|
||||||
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
import {Injectable} from "@angular/core";
|
|
||||||
import {HttpClient} from "@angular/common/http";
|
|
||||||
import {BehaviorSubject, from, Observable, Subscriber} from "rxjs";
|
|
||||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
|
||||||
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: "root"
|
|
||||||
})
|
|
||||||
export class CustomFilterService {
|
|
||||||
|
|
||||||
private customFilterSubject: BehaviorSubject<SearchCustomFilter[]> = null;
|
|
||||||
private promise: Promise<void>;
|
|
||||||
private sub;
|
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
|
||||||
this.customFilterSubject = new BehaviorSubject<SearchCustomFilter[]>(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.clearSubscriptions();
|
|
||||||
}
|
|
||||||
|
|
||||||
clearSubscriptions() {
|
|
||||||
if (this.sub instanceof Subscriber) {
|
|
||||||
this.sub.unsubscribe();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async getCustomFilterAsync() {
|
|
||||||
if (this.promise) {
|
|
||||||
await this.promise;
|
|
||||||
this.promise = null;
|
|
||||||
}
|
|
||||||
this.clearSubscriptions();
|
|
||||||
return this.customFilterSubject.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
getCustomFilterAsObservable(): Observable<SearchCustomFilter[]> {
|
|
||||||
return this.customFilterSubject.asObservable();
|
|
||||||
}
|
|
||||||
|
|
||||||
setCustomFilter(customFilters: SearchCustomFilter[]) {
|
|
||||||
this.customFilterSubject.next(customFilters);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
static getDefaultFilters(){
|
|
||||||
let defaultFilters = new Map<string, SearchCustomFilter[]>();
|
|
||||||
defaultFilters.set("result",[new SearchCustomFilter("National", "country", "IE", "Irish National Monitor")]);
|
|
||||||
defaultFilters.set("project",[new SearchCustomFilter("National", "country", "IE", "Irish National Monitor")]);
|
|
||||||
defaultFilters.set("organization",[new SearchCustomFilter("National", "country", "IE", "Irish National Monitor")]);
|
|
||||||
defaultFilters.set("datasource",[new SearchCustomFilter("National", "country", "IE", "Irish National Monitor")]);
|
|
||||||
return defaultFilters;
|
|
||||||
}*/
|
|
||||||
}
|
|
|
@ -12,7 +12,7 @@ import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
|
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
|
||||||
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
|
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||||
import {SearchResearchResultsService} from "../../openaireLibrary/services/searchResearchResults.service";
|
import {SearchResearchResultsService} from "../../openaireLibrary/services/searchResearchResults.service";
|
||||||
import {CustomFilterService} from "../customFilter.service";
|
import {CustomFilterService} from "../../openaireLibrary/shared/customFilter.service";
|
||||||
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
||||||
import {Filter} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
|
import {Filter} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue