diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 7910610..26bd6e8 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -4,7 +4,7 @@ import {MenuItem} from "./openaireLibrary/sharedComponents/menu"; import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component"; import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service"; 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 {Session, User} from "./openaireLibrary/login/utils/helper.class"; import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll"; diff --git a/src/app/national/national.component.ts b/src/app/national/national.component.ts index 2697b04..2b93da4 100644 --- a/src/app/national/national.component.ts +++ b/src/app/national/national.component.ts @@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Meta, Title} from "@angular/platform-browser"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; 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 {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields"; diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 3122057..52d63ec 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 31220578cf9d662fead11e9491b2abd490d035ee +Subproject commit 52d63ece254ac132f6b42f9fe6ac804a651cfa39 diff --git a/src/app/repository/repository.component.ts b/src/app/repository/repository.component.ts index 633292b..e1e14ab 100644 --- a/src/app/repository/repository.component.ts +++ b/src/app/repository/repository.component.ts @@ -6,7 +6,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Meta, Title} from "@angular/platform-browser"; import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder"; 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 {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; diff --git a/src/app/researcher/researcher.component.ts b/src/app/researcher/researcher.component.ts index ad94e53..58ab38f 100644 --- a/src/app/researcher/researcher.component.ts +++ b/src/app/researcher/researcher.component.ts @@ -5,7 +5,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Meta, Title} from "@angular/platform-browser"; 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 {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; import {ResearcherBaseComponent} from "../shared/researcher-base.component"; diff --git a/src/app/rfo/rfo.component.ts b/src/app/rfo/rfo.component.ts index 261c482..c030512 100644 --- a/src/app/rfo/rfo.component.ts +++ b/src/app/rfo/rfo.component.ts @@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Meta, Title} from "@angular/platform-browser"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; 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 {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields"; diff --git a/src/app/rpo/rpo.component.ts b/src/app/rpo/rpo.component.ts index f7f9e19..eab9b7d 100644 --- a/src/app/rpo/rpo.component.ts +++ b/src/app/rpo/rpo.component.ts @@ -7,7 +7,7 @@ import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Meta, Title} from "@angular/platform-browser"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; 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 {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service"; import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields"; diff --git a/src/app/search/searchPages/advanced/searchDataproviders.component.ts b/src/app/search/searchPages/advanced/searchDataproviders.component.ts index f87a381..606b84b 100644 --- a/src/app/search/searchPages/advanced/searchDataproviders.component.ts +++ b/src/app/search/searchPages/advanced/searchDataproviders.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-advanced-search-dataproviders', diff --git a/src/app/search/searchPages/advanced/searchOrganizations.component.ts b/src/app/search/searchPages/advanced/searchOrganizations.component.ts index 04c0952..c69638a 100644 --- a/src/app/search/searchPages/advanced/searchOrganizations.component.ts +++ b/src/app/search/searchPages/advanced/searchOrganizations.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-advanced-search-organizations', diff --git a/src/app/search/searchPages/advanced/searchProjects.component.ts b/src/app/search/searchPages/advanced/searchProjects.component.ts index f1c69bc..4a19fd0 100644 --- a/src/app/search/searchPages/advanced/searchProjects.component.ts +++ b/src/app/search/searchPages/advanced/searchProjects.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-advanced-search-projects', diff --git a/src/app/search/searchPages/advanced/searchResearchResults.component.ts b/src/app/search/searchPages/advanced/searchResearchResults.component.ts index a40bc04..d6f23d7 100644 --- a/src/app/search/searchPages/advanced/searchResearchResults.component.ts +++ b/src/app/search/searchPages/advanced/searchResearchResults.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-advanced-search-results', diff --git a/src/app/search/searchPages/searchBaseComponent.ts b/src/app/search/searchPages/searchBaseComponent.ts index 37f5382..6ed8c46 100644 --- a/src/app/search/searchPages/searchBaseComponent.ts +++ b/src/app/search/searchPages/searchBaseComponent.ts @@ -1,7 +1,7 @@ import {Directive, OnInit} from "@angular/core"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; 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"; @Directive() diff --git a/src/app/search/searchPages/simple/searchDataproviders.component.ts b/src/app/search/searchPages/simple/searchDataproviders.component.ts index 120de0c..31ca830 100644 --- a/src/app/search/searchPages/simple/searchDataproviders.component.ts +++ b/src/app/search/searchPages/simple/searchDataproviders.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-search-dataproviders', diff --git a/src/app/search/searchPages/simple/searchOrganizations.component.ts b/src/app/search/searchPages/simple/searchOrganizations.component.ts index 6fa3ecc..5828b05 100644 --- a/src/app/search/searchPages/simple/searchOrganizations.component.ts +++ b/src/app/search/searchPages/simple/searchOrganizations.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-search-organizations', diff --git a/src/app/search/searchPages/simple/searchProjects.component.ts b/src/app/search/searchPages/simple/searchProjects.component.ts index e21d6dc..243fa92 100644 --- a/src/app/search/searchPages/simple/searchProjects.component.ts +++ b/src/app/search/searchPages/simple/searchProjects.component.ts @@ -1,7 +1,7 @@ import {Component} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; import {SearchBaseComponent} from "../searchBaseComponent"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; @Component({ selector: 'monitor-search-projects', diff --git a/src/app/search/searchPages/simple/searchResearchResults.component.ts b/src/app/search/searchPages/simple/searchResearchResults.component.ts index 1237e7d..e13ed16 100644 --- a/src/app/search/searchPages/simple/searchResearchResults.component.ts +++ b/src/app/search/searchPages/simple/searchResearchResults.component.ts @@ -1,6 +1,6 @@ import {Component} from '@angular/core'; import {ActivatedRoute, Router} from "@angular/router"; -import {CustomFilterService} from "../../../shared/customFilter.service"; +import {CustomFilterService} from "../../../openaireLibrary/shared/customFilter.service"; import {SearchBaseComponent} from "../searchBaseComponent"; import {OpenaireEntities} from "../../../openaireLibrary/utils/properties/searchFields"; diff --git a/src/app/shared/customFilter.service.ts b/src/app/shared/customFilter.service.ts deleted file mode 100644 index c8d0689..0000000 --- a/src/app/shared/customFilter.service.ts +++ /dev/null @@ -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 = null; - private promise: Promise; - private sub; - - constructor(private http: HttpClient) { - this.customFilterSubject = new BehaviorSubject(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 { - return this.customFilterSubject.asObservable(); - } - - setCustomFilter(customFilters: SearchCustomFilter[]) { - this.customFilterSubject.next(customFilters); - } -/* - static getDefaultFilters(){ - let defaultFilters = new Map(); - 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; - }*/ -} diff --git a/src/app/shared/monitor/monitor.component.ts b/src/app/shared/monitor/monitor.component.ts index f8627d8..0c3afad 100644 --- a/src/app/shared/monitor/monitor.component.ts +++ b/src/app/shared/monitor/monitor.component.ts @@ -12,7 +12,7 @@ import {ActivatedRoute, Router} from "@angular/router"; import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service"; import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.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 {Filter} from "../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class";