Compare commits

...

740 Commits

Author SHA1 Message Date
Konstantina Galouni b57c46d969 Merge pull request 'Production release June 2024 [EXPLORE]' (#41) from develop into master
Reviewed-on: #41
2024-06-04 16:34:02 +02:00
Konstantinos Triantafyllou 9ae1ee928a [develop]: Add ration in Icon class and use it in sidebar. 2024-06-04 12:55:36 +03:00
Konstantinos Triantafyllou 35276059f1 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-06-04 12:23:39 +03:00
Konstantinos Triantafyllou b0a2ed1865 [develop]: Add loading in directLinking and add different ratio for svg icons in sidebar. 2024-06-04 12:23:32 +03:00
Konstantina Galouni ca6f1fd751 [develop | DONE | FIXED]: result-preview.component.html: Added check, not to show acronym & title when they are the same. 2024-06-04 11:48:54 +03:00
Konstantinos Triantafyllou d0a6af2745 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-06-04 11:46:28 +03:00
Konstantinos Triantafyllou 2bfe25103b [develop]: Comment console logs 2024-06-04 11:46:21 +03:00
Konstantinos Triantafyllou 3a6b01ebe8 [develop | DONE]: Add isBottomIntersecting in layoutService and use is when it is needed. Add capitalize all in order to capitalize all words with whitespace separator. 2024-06-03 17:12:52 +03:00
Konstantinos Triantafyllou 3ab0983c89 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-06-03 15:59:32 +03:00
Konstantinos Triantafyllou f8186cb2ea [develop]: Fix check in belongsTo class. 2024-06-03 15:59:25 +03:00
Konstantinos Triantafyllou 0736d42385 [develop]: fix typeAsLabel in browse-stakeholder. 2024-06-03 13:43:14 +03:00
Konstantinos Triantafyllou 2d9141d5c1 [master]: Update development monitor service. 2024-06-03 13:28:28 +03:00
Konstantinos Triantafyllou 2b2aaed2b8 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-05-31 13:59:35 +03:00
Konstantinos Triantafyllou df2516f8f7 [develop | DONE]: Add belongs to all entities and add message in html. 2024-05-31 13:59:23 +03:00
Konstantinos Triantafyllou 41b46b754e [develop | FIXED]: Add condition to add indicator path only if defaultId is null. 2024-05-31 11:36:57 +03:00
Konstantina Galouni 5db039ea0d [develop | DONE | FIXED]: [BUG] When selecting a filter value which is not in top 7, filters were not properly set - get 100 top values of filters with at least one selected value.
1. searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: Check selected filter values from URL and query top 100 values for selected facets and top 7 for others.
2. newSearchPage.component.ts: In method "getRefineFieldsQuery()" added optional parameter fields: string[] = null, to not always get the full list of fields, but the ones provided (selected filters or not).
2024-05-30 16:33:43 +03:00
Konstantinos Triantafyllou ea5275da2d Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-05-30 13:59:14 +03:00
Konstantinos Triantafyllou 5197f88ade Add slider tabs in indicators multi chart. 2024-05-30 13:59:07 +03:00
Konstantinos Triantafyllou e9eb05de64 [develop]: Remove console log from input component 2024-05-29 19:39:08 +03:00
Konstantinos Triantafyllou 65a60ddad1 [Develop | ADDED]: Add belongsTo configuration for all entities and initialize it in results. 2024-05-29 13:05:04 +03:00
Konstantina Galouni 59fc73bf4d [develop | DONE | FIXED]: In search results, only 1000 relations are fetched and shown - show messages.
1. result-preview.component.html: Added input parameter "resultTitle" to <entity-metadata>.
2. entity-metadata.component.ts: Added @Input() resultTitle: string = null; | When more than 1000 projects or organizations, show +more projects/partners and in modal, show message "Only 1000 Projects/ Partners of {result title} are shown here."
2024-05-28 16:34:16 +03:00
Konstantina Galouni cc6b5aeffe [develop | DONE | CHANGED]: Excluded (filter out) unidentified projects from search.
1. searchProjects.service.ts: Added filter &fq=(projectcode<>"unidentified") in methods "getProjectsforDataProvider()", "advancedSearchProjects()", "getProjectsForOrganizations()", "numOfSearchProjects2()".
2. organization.component.ts: In method call "searchProjectsService.getProjectsForOrganizations()" updated parameter for funder to be in fq instead of keyword query.
3. projects-in-modal.component.ts: In method "updateFilters()", format filterQuery to be in fq instead of keyword query.
4. entitySearch.service.ts: In method "search()", for type "project", added in the query &fq=(projectcode<>"unidentified").
2024-05-28 15:27:33 +03:00
Konstantinos Triantafyllou 1ac4365e05 [develop | DONE]: Add Role Utils with naming variables for roles 2024-05-28 12:21:37 +03:00
argirok 5af682b1b6 [develop | DONE | CHANGED ] Claim funding: allow search for projects with no funder selected, exclde unidentified, give more space to form 2024-05-28 12:09:21 +03:00
Konstantina Galouni 9722024643 [develop | DONE | FIXED]: relatedDatasourcesTab.component.ts: Show "top 100" message only if results are more than 90 & [BUG FIX] Use "collectedFromName" input and not a predefined static data source name. 2024-05-27 11:20:24 +03:00
argirok 9fb155d95f [develop | DONE | FIXED ] Claims: remove unused import 2024-05-24 10:08:57 +03:00
Konstantina Galouni d1392adc2d Merge pull request 'Production release May 2024 [EXPLORE]' (#40) from develop into master
Reviewed-on: #40
2024-05-23 18:26:50 +02:00
Konstantina Galouni 43990dc582 [develop | DONE | FIXED]: [BUG FIX] showAuthors.component.ts: Remove non existing field from the condition. 2024-05-23 18:16:07 +03:00
Konstantina Galouni 632d11c82c [develop | DONE | FIXED]: showAuthors.component.ts: On destroy of component, delete all elements with "orcid-dropdown" class from "modal-container". 2024-05-22 16:50:58 +03:00
argirok 7a517e49ed [develop | DONE | CHANGED ] Claims: add 2 steps in Projects form,step 1 to select funder, step 2 search by keyword 2024-05-22 14:48:13 +03:00
argirok 79b723e75c [develop | DONE | ADDED ] add coins icon 2024-05-22 14:40:42 +03:00
Konstantinos Triantafyllou 5a912f02b7 [Develop]: Advanced search input add on changes reinitialize input style 2024-05-22 12:42:21 +03:00
Konstantinos Triantafyllou dede290a52 [develop | DONE | MOVED]: Add browse-stakeholder-base component implemented in Irish. 2024-05-21 13:36:12 +03:00
Konstantina Galouni d6a2ba004a Merge pull request 'Merge on-push-strategy branch into develop (on push strategy in result-preview component, i.e. search result cards)' (#39) from on-push-strategy into develop
Reviewed-on: #39
2024-05-21 12:14:59 +02:00
Konstantina Galouni 633f3250ac Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-05-21 13:10:36 +03:00
Konstantina Galouni 2a28cd8ad5 [develop | DONE | CHANGED]: #9764 - searchOrganizations.service.ts: Parse and display organization legalname and legalshortname. 2024-05-20 15:59:32 +03:00
Konstantina Galouni 8bcafd3026 [develop | DONE | FIXED]: smooth-scroll.ts: Accidental error by mistyping. 2024-05-20 15:24:04 +03:00
Konstantina Galouni d3746b28d0 [develop | DONE | CHANGED]: organization.service.ts & searchOrganizations.service.ts: Removed environment check for parsing organization pid. 2024-05-20 15:18:54 +03:00
Konstantina Galouni 019530c222 [develop | DONE | FIXED]: parsingFunctions.class.ts: In "parseEoscSubjects()" method, initialize subjects if needed. 2024-05-20 15:17:26 +03:00
Konstantina Galouni 1f4c0566c7 [develop | DONE | FIXED]: availableOn.component.ts: Removed environment check in <hr> shown in mobile under fulltext. 2024-05-20 15:16:00 +03:00
Konstantina Galouni f595ec5035 [develop | WIP | ADDED]: [DEVELOPMENT ONLY] Added level4 in browse Fields of Science (FoS)
1. smooth-scroll.ts: Get behavior from current navigation > extras > state.
2. fos.component: Display level 4 FoS and handle url fragments and page scrolling accordingly.
2024-05-20 15:04:56 +03:00
argirok c1a8151184 [develop | DONE | FIXED] linking disable link to unidentified for manage claims page 2024-05-10 11:34:17 +03:00
argirok c00403a24c [develop | DONE | FIXED] linking initialize properly claims properties when there are not pass as input 2024-05-10 11:33:42 +03:00
argirok 8a8b58eeaa [develop | DONE ADDED] add direct linking for organizations 2024-05-09 16:44:54 +03:00
Konstantinos Triantafyllou 6e96974364 Revert transition disable function 2024-05-01 15:59:48 +03:00
Alex Martzios c4b57e91ab [develop | DONE | CHANGED] move CustomRouteReuseStrategy to openaireLibrary 2024-05-01 11:25:12 +03:00
Konstantinos Triantafyllou b054a823da [develop]: Move OAIndicator in indicatorUtils file. 2024-04-30 17:15:15 +03:00
Konstantinos Triantafyllou b41357c4b8 [develop]: Add compose mail for develop personal-info 2024-04-30 17:09:23 +03:00
Konstantinos Triantafyllou fb34dd415e Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-30 15:38:39 +03:00
Konstantinos Triantafyllou bc2dd7d285 [develop]: Add open Access map in order to add configure open access indicator. 2024-04-30 15:38:31 +03:00
Konstantina Galouni cdfced0dd8 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-30 14:46:22 +03:00
Konstantina Galouni 2127bfdf16 [develop | DONE | CHANGED]: Updated color of selected search filter labels (not purple, but portal color).
1. newSearchPage.component.html: Replaced class "uk-label-search-filter" with "uk-label-secondary" on selected search filter labels.
2. color.less: Removed color variable @search-filter-color: #B41FD0;
3. label.less: Removed custom color variables and class "uk-label-search-filter" | Updated class "uk-label-secondary".
4. explore-custom.less: Override @uk-label-secondary: @explore-color;
2024-04-30 13:08:54 +03:00
Konstantinos Triantafyllou 4231b65880 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-25 15:11:13 +03:00
Konstantinos Triantafyllou 9b79d0c1e0 [develop]: Fix role users, role-verification type mapping. 2024-04-25 15:11:04 +03:00
Konstantina Galouni 01f54d788d Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-24 16:35:47 +03:00
Konstantina Galouni ac46ecb997 [develop | WIP | FIXED]: parsingFunctions.class.ts: Added check if there are no classifiedSubjects. 2024-04-24 16:35:13 +03:00
Konstantina Galouni 786f4c9864 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-24 16:07:14 +03:00
Konstantina Galouni c5bd710621 [develop | WIP | CHANGED]: [BETA] parsingFunctions.class.ts: Show all subjects as keywords - updated method "parseAllSubjects()" to add classified subjects (by vocabulary) to the end of the keyword subjects list. 2024-04-24 16:06:45 +03:00
Konstantinos Triantafyllou 267944103f [develop]: update link to develop in bottom. 2024-04-24 09:39:27 +03:00
Konstantina Galouni aedc2e1f6f Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-23 16:59:13 +03:00
Konstantina Galouni 2cd8059794 [develop | WIP | FIXED]: showAuthors.component.ts: In uk-dropdown set [attr.container]="'#modal-container'" to always be on top of every other part of the page. 2024-04-23 16:58:48 +03:00
Konstantina Galouni 353ff67ea5 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-23 16:03:00 +03:00
Konstantina Galouni e74dc1b58f [develop | DONE | FIXED]: showAuthors.component.ts: In uk-dropdown set "pos: bottom-right" and [attr.container]="modal ? '#modal-container' : false" - copy to clipboard is not fully functional. 2024-04-23 16:01:47 +03:00
Konstantina Galouni 22d0498f8a Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-22 17:19:46 +03:00
Konstantina Galouni ce87f0690d [develop | DONE | FIXED]: BUG fixes in orcid author modal | BUG fixes in search filters column.
1. mobile-dropdown.component.ts: Added makrForCheck() method call in "open()".
2. deletedByInference.component.ts: Added @Input() isMobile: boolean = false; & In <result-preview> set parameter [isMobile]="isMobile".
3. resultLanding.component.html: In mobile view, in <deletedByInference> set parameters [isMobile]="isMobile" and [modal]="alertModalDeletedByInferenceFS".
4. showAuthors.component.ts:
5. searchOrganizations.component.ts: [BUG FIX] In <new-search-page> set parameter [showRefine]="refineFields?.length > 0" to display filters or not.
6. newSearchPage.component.html: [BUG FIX] Updated checks for displaying refine filters column or not.
2024-04-22 17:14:46 +03:00
argirok 68125b3577 [develop | DONE | CHANGED] Claims: keep both shortname and funderName, in cards show fundername. For unidentified, hide code and link 2024-04-19 12:09:00 +03:00
argirok 474a73e2f7 [develop | DONE | CHANGED] indicator utils: user date range overrides the default range a chart may have 2024-04-18 15:08:17 +03:00
argirok afdf6bf964 [develop | DONE | CHANGED] in filters use "publication", "software", "dataset", "other" table instead of the result one 2024-04-18 11:08:41 +03:00
Konstantina Galouni 5f8988eac1 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-16 16:19:21 +03:00
Konstantinos Triantafyllou 9e9332f1a3 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-16 16:08:13 +03:00
Konstantinos Triantafyllou a2b1bb8f70 [develop | FIXED | DONE]: Multi indicators paths fix dropdowns 2024-04-16 16:08:05 +03:00
Konstantina Galouni 559220c77c [develop | DONE | CHANGED]: landing.module.ts: Removed TabPagingComponent from declarations and exports | deletedByInference.module.ts: Removed LandingModule from imports | resultLanding.module.ts: Import SearchTabModule | Deleted tabPaging.component.ts. 2024-04-16 13:25:54 +03:00
Konstantina Galouni 4d80f6f39c Merge remote-tracking branch 'origin/develop' into develop 2024-04-16 12:28:23 +03:00
Konstantina Galouni cc43504306 [develop | DONE | ADDED]: Added method get calcCurrentMonth() to calculate and display current month of the project life, if status is on going (project has started and not yet ended). 2024-04-16 12:28:14 +03:00
Konstantinos Triantafyllou b729341199 [develop]: Fix visibility condition in Indicaotrs page 2024-04-16 12:21:02 +03:00
Konstantina Galouni eeb63a2de9 [develop | DONE | CHANGED]: In search projects results, show funder name by default, and if not available, show funder short name.
1. searchResult.ts: Added field funderName: string; in class SearchResult.
2. result-preview.ts: Added field funderName: string; in class ResultPreview & in method "searchResultConvert()" set resultPreview.funderName = result.funderName;
3. searchProjects.service.ts: Added parsing of funderName.
4. result-preview.component.html: Show funderName and if not available, show funderShortname.
5. entity-metadata.component.ts: Added check for funders display.
2024-04-16 11:47:12 +03:00
Konstantina Galouni 4b3e805d31 [develop | DONE | REVERTED]: searchProjects.service.ts: Revert parsing funder name if funder shortname is not available. 2024-04-16 11:36:45 +03:00
Konstantina Galouni 1613916dfd [on-push-strategy | DONE | CHANGED]: result-preview.component.ts: Set changeDetection: ChangeDetectionStrategy.OnPush | searchResult.component.ts & result-preview.component.html: Redraw html when needed with onPush strategy. 2024-04-16 10:23:07 +03:00
Konstantina Galouni c219c8370b [develop | DONE | REVERTED]: searchResult.component.ts & result-preview.component.html & result-preview.component.ts: Reverted changes regarding changeDetection: ChangeDetectionStrategy.OnPush - should be first introduced in another branch. 2024-04-16 10:07:31 +03:00
Konstantina Galouni 6886df2caa [develop | DONE | CHANGED]: Alt attribute on images | Set changeDetection: ChangeDetectionStrategy.OnPush on result-preview.component.ts.
1. deletedByInference.service.ts: [Bug fix] Fixed author check.
2. sdg.component.html & quick-contact.component.html & fos.component.html: Added alt attribute on images.
3. result-preview.component.ts: Set changeDetection: ChangeDetectionStrategy.OnPush | Added get countDots().
4. result-preview.component.html: Changed how number of access routes dots is passed into a class (countDots) - needed for ChangeDetectionStrategy.OnPush.
5. orcid-work.component.ts: Added alt attribute on images | Added ChangeDetectorRef and call this.cdr.markForCheck(); on "getPutCode()", "saveWork()" and "deleteWorks()" - needed for ChangeDetectionStrategy.OnPush.
6. searchResult.component.ts: Rebuild previewResults object after getting orcidPutCodes to draw html again - needed for ChangeDetectionStrategy.OnPush.
7. newSearchPage.component.html: Removed uk-flex-wrap for number of results and uk-margin-medium-left from desktop sorting.
2024-04-15 17:11:38 +03:00
Alex Martzios 9b04260a60 [develop | DONE | FIXED] showAuthors: fix z-index bug for ocrid dropdown inside modal 2024-04-15 12:09:35 +03:00
Alex Martzios 6d9d118d57 [develop | DONE | ADDED] topics/indicators: add condition to hide all "edit" actions when stakeholder is NOT a copy 2024-04-12 13:57:56 +03:00
Konstantina Galouni c7817731f0 Merge remote-tracking branch 'origin/develop' into develop 2024-04-12 11:19:33 +03:00
Konstantina Galouni 438075f8df [develop | DONE | FIXED]: Fixes on search projects for claims.
1. searchProjects.service.ts: Parse funder name if funder shortname is not available.
2. claimProjectSearchForm.component.ts:
   a. [BUG FIX] Set filter.countAllValues = filter.values.length; to show filter values without extra "view all" call
   b. [BUG FIX] Call projectService.advancedSearchProjects instead of projectService.searchProjects to get projects (/resources2 instead of /projects) to get 100 first values by default in facets.
2024-04-12 11:19:17 +03:00
Konstantinos Triantafyllou 8f4e653d50 [develop | WIP]: Introduce copy field in stakeholder 2024-04-12 11:14:26 +03:00
Alex Martzios c4180c7aa2 [develop | DONE | CHANGED] search page: change the color or customFilter pills as well 2024-04-11 16:46:58 +03:00
Alex Martzios 31e61d55a0 [develop | DONE | CHANGED] search page: change the coloring of the selected filter pills, based on the new design mocks 2024-04-11 16:34:13 +03:00
argirok 609f09cc9f [develop | DONE | CHANGED] Claims pass idSuffix for generating openAIRE id 2024-04-10 13:07:35 +03:00
argirok 275b94dec3 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-10 12:27:12 +03:00
Konstantinos Triantafyllou 4f9f2f2505 [develop]: Add stats profile in form of an indicator even if it is null 2024-04-08 18:57:49 +03:00
Konstantinos Triantafyllou 0111ea6681 [develop]: Role verification reload page instead of removing params. 2024-04-08 17:14:00 +03:00
Konstantinos Triantafyllou c69d1cd94d [develop]: Role verification improve redirect. 2024-04-08 16:44:47 +03:00
Konstantinos Triantafyllou 901f9f769d [develop]: Fix an error while inviting a person that it is already a member or manager. Remove message while accepting the member role. 2024-04-08 15:17:53 +03:00
Konstantinos Triantafyllou e6d03d324f Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-08 14:14:18 +03:00
Konstantinos Triantafyllou 69cdb2cec2 [develop]: Add roles in stakeholder configuration to handle naming of roles in different services. 2024-04-08 14:14:09 +03:00
Konstantinos Triantafyllou 4f10c5c5f4 [develop]: Align import/export indicators with multi indicator paths. 2024-04-06 03:10:51 +03:00
Konstantinos Triantafyllou e91830f2f8 [develop]: Monitor base component delete chartsActiveType 2024-04-05 20:31:29 +03:00
Konstantinos Triantafyllou 0fb20de588 Merge remote-tracking branch 'origin/new-reorder' into develop 2024-04-05 20:13:24 +03:00
Konstantinos Triantafyllou b71bdfa559 [new-reorder]: Add multi charts in admin indicators (works now only for charts in UI). Deprecated transition-group disable/enable method. 2024-04-05 20:13:05 +03:00
Konstantina Galouni dc1679c565 [develop | DONE | CHANGED]: newSearchPage.component.html: Restored number of results and keyword display & added uk-text-capitalize on selected filter labels. 2024-04-05 11:09:16 +03:00
Konstantinos Triantafyllou d63092cd9e [new-order | DONE]: Add new move indicator method when an indicator moved to another section 2024-04-05 10:57:39 +03:00
Konstantina Galouni c351349f8e [develop | DONE | FIXED] newSearchPage.component.html: Added checks, not to show "Filters" column in the search pages, when there are no filters. 2024-04-04 17:13:56 +03:00
Konstantina Galouni dcfc6b0b6a [develop | DONE | CHANGED]: searchFields.base.ts: Replace in ORGANIZATION_REFINE_FIELDS and ORGANIZATION_ADVANCED_FIELDS field "country" with "countrynojurisdiction". 2024-04-04 16:10:08 +03:00
Konstantina Galouni 07569f24e1 [develop | DONE | FIXED]: resultLanding.component.html & searchResult.component.ts: Added checks for ORCID also for properties.dashboard == "irish". 2024-04-03 16:16:09 +03:00
Konstantina Galouni 18791ec9d2 [develop | DONE | ADDED]: searchFields.base.ts: Added "pid" field in ORGANIZATION_ADVANCED_FIELDS. 2024-04-02 13:33:23 +03:00
Konstantina Galouni 78d262dd3b [develop | DONE | ADDED]: Added search organizations by PID (ror, isni, wikidata, fundRef).
1. string-utils.class.ts: Added methods "isValidRor()", "isValidIsni()", "isValidWikidata()", "isValidFundRef()" and cases for these new identifiers.
2. newSearchPage.component.ts: In method "createKeywordQuery()", check for PIDs also for organizations entity.
3. environment.ts: Updated property "fundRefURL" to "https://data.crossref.org/fundingdata/funder/" (old: https://api.crossref.org/funders/).
2024-04-02 10:59:33 +03:00
Konstantinos Triantafyllou 44e821b1f1 Merge pull request 'Production release March 2024 [Monitor Dashboard]' (#38) from develop into master
Reviewed-on: #38
2024-04-01 18:02:04 +02:00
Konstantinos Triantafyllou 828dfc0671 [develop]: Remove topics from exported file in export indicators. 2024-04-01 18:56:26 +03:00
Konstantinos Triantafyllou b34f42326c [develop | ADDED]: Add loading in import indicators in order to avoid any actions during this process 2024-04-01 18:16:21 +03:00
Konstantinos Triantafyllou e8ec49a69b Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-01 01:16:39 +03:00
Konstantinos Triantafyllou 0c75394621 [develop | FIXED | CHANGED]: Add stakeholder in export indicators file and import base on this stakeholder. 2024-04-01 01:16:31 +03:00
Alex Martzios 894667955c [develop | DONE | ADDED] slider-tabs component: add condition to disable slider-arrows if isServer is true 2024-03-28 13:22:21 +02:00
Alex Martzios cafe0e4926 [develop | DONE | ADDED] displayClaims: add bulk delete functionality for claims, change the claims cards to a more compact claims list 2024-03-28 13:07:11 +02:00
Konstantina Galouni b6cda48e2f [develop | DONE | ADDED]: searchFields.base.ts: Added static "triplet" refine (facet) field "haslicense". 2024-03-27 16:30:38 +02:00
argirok d6b924bcaa [develop | DONE | FIXED] linking update check to decide if claim is pending and show the link to landing 2024-03-21 09:47:02 +02:00
argirok 95097beaae [develop | DONE | FIXED] linking update parsing of the datacite API 2024-03-21 09:46:11 +02:00
Alex Martzios 6c4a4d9721 [develop | DONE | ADDED] add new custom classes fo slider-tabs container 2024-03-19 12:55:39 +02:00
Konstantina Galouni ca8b732a64 [develop | DONE | ADDED]: menu.ts: In MenuItem class added field "badge?: string", which is used only in FAIRCORE4EOSC | navigationBar.component.html: Added <span> in menu item (only in no-link parent), to show a badge in FAIRCORE4EOSC. 2024-03-15 15:43:58 +02:00
argirok c64df20405 [develop | DONE | ADDED] add orcid-core module, without the routing - use it in other components instead of orcid module 2024-03-14 09:28:33 +02:00
argirok 6b907fe97d [develop | DONE | ADDED] add method for grouped count queries that goes through the cache 2024-03-13 12:04:23 +02:00
Konstantinos Triantafyllou 622459c26c [develop]: Helper class: Remove group from mapType. 2024-03-12 19:24:50 +02:00
Alex Martzios b0c69be6ef [develop | DONE | ADDED] irish-monitor: add new BehaviorSubject for enabling/disabling help-pop-up component on admin and non-admin pages 2024-03-08 12:50:55 +02:00
Konstantinos Triantafyllou c33af181bb [develop]: Role-verification: Add relatve to route parameter. 2024-03-07 10:27:30 +02:00
Konstantina Galouni 6ab50b04cc Merge pull request 'Production release March 2024 [EXPLORE]' (#35) from develop into master
Reviewed-on: #35
2024-03-04 17:44:23 +01:00
Konstantina Galouni e0de892998 Merge remote-tracking branch 'origin/develop' into develop 2024-03-04 17:03:08 +02:00
Konstantina Galouni da3c2fccf2 [develop | DONE | FIXED]: Moved RoutingModule as first imported module with possible routing (advanced search projects & organizations were loading orcid routing instead of their own). 2024-03-04 17:02:33 +02:00
Konstantinos Triantafyllou c630b29247 [develop]: Remove index variables from parameters of indicator path. 2024-03-04 15:47:57 +02:00
Konstantina Galouni 6a41954109 [develop | DONE | CHANGED & ADDED]: env-properties.ts & environment.ts: Added properties "rorURL", "isniURL", "wikiDataURL", "fundRefURL" | organizationInfo.ts: Added identifiers | searchOrganizations.service.ts & organization.service.ts: Parse identifiers (pid) [BETA ONLY] | organization.module.ts: Import ResultLandingUtilsModule (to call <showIdentifiers> | organization.component: Removed old unused code & Added <showIdentifiers> & In mobile added country and website url | parsingFunctions.class.ts: Added parsing for organization pids | showIdentifiers.component.ts: Added cases for organization pids & check if pid value is a url, do not add prefix. 2024-03-04 13:14:09 +02:00
Konstantina Galouni 00a5150042 [develop | DONE | FIXED]: [BUG FIX] resultLanding.component.ts: Get type of entity from route.snapshot.data.type. 2024-03-04 11:17:50 +02:00
Konstantina Galouni da4a5f3321 [develop | DONE | FIXED]: [BUG FIX] fundedBy.component.ts: Provenance should always get the label from the respective vocabulary - calculate everything in ngOnInit. 2024-03-04 11:15:40 +02:00
Alex Martzios ec57ba0dcc [develop | DONE | FIXED] search page: add a limit of 35 characters and atooltip for displayed selected filters 2024-03-04 10:39:01 +02:00
Alex Martzios 3e8ed4f504 [develop | DONE | CHANGED] remove tooltips from search page, add labels for entity metadata 2024-02-29 11:33:17 +02:00
Alex Martzios 69d6feb665 [develop | DONE | CHANGED] search page: remove top paging, remove results per page, remove total number of results, put selected filter, sorting and download on the same row, change to smaller labels for selected filters 2024-02-29 09:25:26 +02:00
Konstantina Galouni edf49c4019 [develop | DONE | CHANGED]: sdg-fos-suggest.component.ts: Added field "isOpen: boolean = false;" and check if isOpen to show modal content | resultLanding.component: Removed old unused code and old comments, updated and added more checks e.g. not load content of modals if they are not open. 2024-02-28 17:42:58 +02:00
Konstantina Galouni efa0f72cc3 [develop | DONE | CHANGED]: isRouteEnabled.guard.ts, freeGuard.guard.ts: Added @Injectable({providedIn: 'root'}) | Removed from providers PreviousRouteRecorderm, isRouteEnabled, LoginGuard AdminLoginGuard, PiwikService & removed from imports PiwikServiceModule. 2024-02-28 16:45:23 +02:00
Konstantinos Triantafyllou 9ef3f71ea6 [develop]: Delete console log from stats profile of an indicator 2024-02-28 15:10:27 +02:00
Konstantina Galouni 17e237c179 [develop | DONE | CHANGED]: Added routing modules (in library files) in Landing pages and in ORCID pages - imported the routing.module.ts in module.ts. 2024-02-28 14:33:44 +02:00
Konstantina Galouni 49cd8a6232 [develop | DONE | FIXED]: [BUG FIX] searchAll.component.ts: Tabs did not change if changed entity via menu & queryparams changes emit before params change - used combineLatest and debounceTime(0) as a workaround. 2024-02-27 19:15:39 +02:00
Konstantinos Triantafyllou f43025b21c [develop | ADDED | FIXED]: Add missing searchLinkToStakeholders property in library common properties 2024-02-27 11:21:33 +02:00
Konstantina Galouni f6654f7b93 [develop | DONE | CHANGED]: result-preview.component.html: Open Access Routes, Impact-based indicators (bip) and Usage counts drops on click, not hover. 2024-02-27 10:41:15 +02:00
Konstantina Galouni 43b1882956 [develop | DONE | FIXED]: [BUG FIX] searchDataProviders.component.ts & searchOrganizations.component.ts & searchProjects.component.ts: In method "filterRequestedAll()" (when clicking on view all of a search filter) get filters from the 3rd position of response, not the 2nd. 2024-02-27 01:42:15 +02:00
Konstantinos Triantafyllou 110c2ab4b3 [develop | FIXED | DONE]: 1. Fixed prefix of roles. 2. Disable filtering in manage stakeholders while loading. 2024-02-26 15:54:50 +02:00
Konstantinos Triantafyllou 79d39db833 [develop]: Remove currentYear from monitor base component 2024-02-26 09:46:52 +02:00
argirok abbe118035 [ develop | DONE | REMOVED] TimeoutInterceptor: remove properties.searchAPIURLLAst from timeout whitelist 2024-02-23 14:20:19 +02:00
argirok 7c3c082fc0 [develop | DONE | CHANGED] add min/max year variables with default values max: current and min: current -20 2024-02-23 10:12:32 +02:00
argirok f5ca757771 [develop | DONE | CHANGED] Range filters set placeholder/ validator based on min/max year from input 2024-02-23 10:11:00 +02:00
Konstantinos Triantafyllou e71aa35b98 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-22 15:12:40 +02:00
Konstantinos Triantafyllou ba87ad69d3 [develop]: Manage stakeholders: Add select type in all monitor dashboards 2024-02-22 15:12:33 +02:00
Konstantina Galouni 590bdaf2e3 [develop | DONE | FIXED]: [BUG FIX] bulkClaim.component.ts: In method "fetchResult()", if call to Crossref returns 404, query Datacite | environment.ts: Update url of "searchDataciteAPIURL" property to call endpoint "/dois" instead of "/works" (/works is the version 1 - old - while the current is version 2). 2024-02-22 13:57:27 +02:00
Konstantinos Triantafyllou a45122565a [develop | ADDED]: Add statsProfile in indicatorPath parameters and in form in order to override stakeholder's one. 2024-02-22 09:41:57 +02:00
Konstantinos Triantafyllou fbf7e9f527 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-21 14:32:21 +02:00
Konstantinos Triantafyllou 45a9737d84 [develop]: Add statsProfile in indicatorPath. 2024-02-21 14:32:14 +02:00
Konstantina Galouni 51dba6da3a [develop | DONE | CHANGED]: quick-contact.component: Added field "quickContactClicked" initially set to false and when help button is clicked, it is set to true and card is displayed (--> recaptcha is loaded only if the users clicks on the button). 2024-02-21 14:22:44 +02:00
Konstantina Galouni 50244801d6 [develop | DONE | CHANGED]: availableOn.component.ts: Removed environment check from fulltext links (display them also in production). 2024-02-21 13:54:53 +02:00
Alex Martzios af6174c5de [develop | DONE | CHANGED] change footer text 2024-02-20 13:38:31 +02:00
Konstantinos Triantafyllou 35323bd744 [develop | FIXED | CHANGED]: Move formalize methods of stakehodlers in stakeholder.ts. Fix empty chart and number section in monitorbase component. 2024-02-20 10:58:47 +02:00
Konstantina Galouni e30672043b Merge pull request 'Production release February 2024 [CONNECT]' (#34) from develop into master
Reviewed-on: #34
2024-02-15 11:04:19 +01:00
Konstantinos Triantafyllou 368ef1aba4 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-14 15:43:34 +02:00
Konstantinos Triantafyllou 3204ba18ff [develop]: Fix showAuthors in modal. 2024-02-14 15:43:27 +02:00
argirok 9b9f817e62 [develop | DONE | FIXED] ContextsService: revert last change for coomunity hidden status 2024-02-14 12:14:32 +02:00
argirok c50c3e2ad6 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-14 10:46:29 +02:00
argirok cf0ebe0fb0 [develop | DONE | FIXED ] community status checks 2024-02-14 10:46:15 +02:00
argirok 9c8a67e612 [develop | DONE | FIXED] Search pages: extra fixes for custom filter 2024-02-14 10:28:54 +02:00
Konstantina Galouni 56faf6f6a4 [develop | DONE | FIXED]: orcid-work.component.ts: [Bug fix] Show tooltip when button is disabled & When in beta environment, do not call query to get put codes, always disable buttons and show tooltip about not available feature on beta. 2024-02-13 17:33:26 +02:00
argirok 6c9c477c24 [develop | DONE | FIXED] PortalSearchResultComponent: Communities proper check, after updating the status values 2024-02-13 16:15:59 +02:00
argirok cdddec6925 [develop | DONE | FIXED] Search page: extra fixes for custom filter 2024-02-13 16:07:43 +02:00
Konstantinos Triantafyllou c803674ceb Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-13 14:38:10 +02:00
Konstantinos Triantafyllou 7562210daa [develop]: Fix getURlwithFilters that double encoding the variables. 2024-02-13 14:38:04 +02:00
Konstantinos Triantafyllou 5195306ee6 [develop]: Add userInfoUrl variable in user management service. 2024-02-13 11:57:46 +02:00
Konstantinos Triantafyllou 14cd46bdb4 Merge pull request 'Merge Angular 16 Irish Monitor to develop' (#33) from angular-16-irish-monitor into develop
Reviewed-on: #33
2024-02-13 09:32:39 +01:00
Konstantinos Triantafyllou 6e2cf28aee [angular-16-irish-monitor]: Merge from develop 2024-02-12 14:53:07 +02:00
Konstantinos Triantafyllou 1cfe22f406 [develop]: Remove deposit class from deposit first page. 2024-02-12 14:46:06 +02:00
Konstantinos Triantafyllou 3d08ffeb52 [angular-16-irish-monitor]: Fix cancel invitation method of a user. Set rootClass only if it is changed.
(cherry picked from commit ba1a3b9e62)
2024-02-12 12:15:36 +02:00
Konstantinos Triantafyllou 0fe358c781 [angular-16-irish-monitor]: Add rootClass subject in layout service.
(cherry picked from commit 246cafa43f)
2024-02-12 12:15:27 +02:00
Konstantinos Triantafyllou 87fb820421 [angular-16-irish-monitor | WIP]: Add role group before type of an entity.
(cherry picked from commit 65f8676a08)
2024-02-12 12:15:04 +02:00
Konstantina Galouni c3cb2d56ca Merge pull request 'Production release February 2024' (#31) from develop into master
Reviewed-on: #31
2024-02-08 18:03:26 +01:00
Konstantina Galouni a7294685fb [develop | DONE | CHANGED]: refineFieldResults.service.ts & searchDataproviders.service.ts & searchOrganizations.service.ts & searchProjects.service.ts & searchResearchResults.service.ts: Set cache for default refine queries (without keywords or filters) - not in deposit and datasource specific pages. 2024-02-08 18:05:27 +02:00
Konstantina Galouni f55107b8d5 [develop | DONE | FIXED]: numbers.component.ts: [BUG FIX] Call "groupedRequestsService.home()" when no refineParams, otherwise (e.g. in aggregator), zip multiple queries. 2024-02-08 18:00:40 +02:00
Konstantinos Triantafyllou d2aa28225a Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-02-08 17:48:08 +02:00
Konstantinos Triantafyllou c43e7caeea [angular-16-irish-monitor | ADDED]: Add url in base component 2024-02-08 17:48:01 +02:00
Konstantina Galouni b89278af70 [develop | DONE | CHANGED]: Do not request page help contents (helptexts) in EXPLORE. (FILES: displayClaims.component.ts & linkingGeneric.component.ts & dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts & newSearchPage.component.ts) 2024-02-08 14:19:26 +02:00
Konstantina Galouni fbe514b740 [grouped-queries | DONE | CHANGED] Added groupedRequests.service.ts & groupedRequestsService.module.ts to call endpoints for grouped queries of each page | numbers.component.ts: Replaced queries of numbers (in Home page) with grouped query for home page of EXPLORE | searchAll.component.ts: Replaced count queries of each entity (in Search page) with grouped query for Search page of EXPLORE 2024-02-07 22:50:13 +02:00
Konstantina Galouni 0757b7a98f Merge pull request 'Production release February 2024' (#30) from develop into master
Reviewed-on: #30
2024-02-07 21:37:50 +01:00
Konstantina Galouni 83de7adc09 Merging branch develop into angular-16-irish-monitor 2024-02-07 22:32:42 +02:00
Konstantina Galouni 137278522e [develop | DONE | CHANGED]: indexInfo.service.ts: Added "lastIndexDateSubject" BehaviorSubject | newSearchPage.component.ts: In ngOninit, call "indexInfoService.lastIndexDate" get method instead of "indexInfoService.getLastIndexDate()", to get last index date from subject value. 2024-02-07 21:36:47 +02:00
Konstantina Galouni b357ff2ae2 [develop | DONE | CHANGED]: Remove preselected "Open Access" filter from search.
1. home.component.ts: Set field "resultsQuickFilter" to null.
2. searchAll.component.ts: Set field "quickFilter" to null | In method "entityChanged()" do not set parameter "resultbestaccessright" | [BUG FIX] Clear subscriptions from fetchOrps.
3. searchResearchResults.component.ts: Set field "quickFilter" to null.
4. navigationBar.component.ts: Set field "resultsQuickFilter" to null.
5. app.component.ts: Remove "resultbestaccessright" parameter from menu items of Search research products.
2024-02-07 21:28:45 +02:00
Konstantina Galouni 09960fda9e [develop | DONE | FIXED]: availableOn.component.ts: Added field "@Input() inModal: boolean = false;" and display download sources when in modal - e.g. versions. | result-preview.component.html: Display download sources (<availableOn>) in versions (isDeletedByInferenceModal). 2024-02-07 21:12:43 +02:00
Konstantina Galouni 92f43c280e [develop | DONE | FIXED]: [BUG FIΧ] open-aire-jsonld-converter.service.ts: Fixed how description is set in methods "convertProject()", "convertDatasource()", "getDescription()" (called for research products). 2024-02-07 17:47:42 +02:00
Konstantina Galouni aba199e10d [develop | DONE | FIXED]: [BUG FIX] resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Moved <schema2jsonld> outside any parent html tag - was missing from mobile screens. 2024-02-07 16:56:16 +02:00
Konstantina Galouni f45598b190 [develop | DONE | FIXED]: [BUG FIX] Moved checks for filtering out filter values in parsing phase.
1. refineResults.class.ts:
   a. Updated method "includeValue()" and include "null" (as a string) check | Call method "includeValue()" when creating filters.
   b. Set filter.countUnfilteredValues to the length of values returned by the service before filtering them out.
   c. Check if filters returned by service before trying to parse anything.
2. searchHelperClasses.class.ts: Added in Filter structure the field "public countUnfilteredValues?: number = 0;", to check if there are more values to be queried (show "view all" link or not).
3. searchFilter.component.ts: Updated check of hasMoreValues to show or not the "view all" link - check filter.countUnfilteredValues | Comment filtering out of filter values - moved to refineResults.class.ts.
2024-02-07 15:55:56 +02:00
Konstantina Galouni 514e92b177 [develop | DONE | FIXED]: [BUG FIX] searchResearchResults.component.ts: In method "filterRequestedAll()", call "this.searchPage.filterFilterValues(this.filters);", to filter out from funding filters, values not related to the selected funder. 2024-02-07 15:45:58 +02:00
Konstantina Galouni ffedfc0618 [develop | DONE | FIXED]: [BUG FIX] fetchProjects.class.ts: In method "getResultsForOrganizations()" set "this.filters[i].countAllValues = this.filters[i].values.length;", because filters were loading forever. 2024-02-07 11:57:55 +02:00
Konstantina Galouni 76a72c175d [develop | DONE | FIXED]: [BUG FIX] claimResultSearchForm.component.ts: In method "checkSelectedFilters()" set "filter.countAllValues = filter.values.length;", because filters were loading forever. 2024-02-07 10:31:42 +02:00
Konstantina Galouni 75ecd0da5e Merge develop into angular-16-irish-monitor branch 2024-02-06 14:19:27 +02:00
Konstantina Galouni b12877df2a [develop | DONE | CHANGED]: searchAll.component.html: Changed pipe from "| number" to " | numberRound" to round number of results in slider tabs | searchAll.module.ts: Imported NumberRoundModule. 2024-02-05 11:52:57 +02:00
Konstantina Galouni d9465d5d05 Merge remote-tracking branch 'origin/develop' 2024-02-01 21:50:22 +02:00
Konstantina Galouni f63e7d72cc [develop | DONE | CHANGED]: availableOn.component.ts: Restored checks, not to display full-text link in production environment - reverted commit fa216cbc07. 2024-02-01 21:35:36 +02:00
Konstantina Galouni 7b8ca9ca66 Merge pull request 'Production release January 2024' (#29) from develop into master
Reviewed-on: #29
2024-02-01 20:07:59 +01:00
Konstantina Galouni 243e736362 [develop | DONE | CHANGED]: Moved predefined query checks to "fq" field instead of "query" | Updated cachingRequests | Temporary bug fix in refine fields dependent to static refine fields.
1. searchOrganizations.service.ts: In method "numOfSearchOrganizations2()" and in method "advancedSearchOrganizations()" moved predefined query checks to "fq" field instead of "query".
2. entitySearch.service.ts: Mark method "searchByDepositType()" as @deprecated since it is not used anymore.
3. searchDataProviders.component.ts: In methods "_getFilters()" and "getResults()" updated parameters to set predefined query checks to "fq" field instead of "query" for repositories, journals, entity registries, but keep in "query" field for deposit search.
4. cache-interceptor.service.ts: Updated urls in cachingRequests table and checks in "checkForCachedRequests()" method.
5. searchFields.base.ts: [Bug fix] Temporarily removed from HIDDEN_FIELDS and "DEPENDENT_FIELDS" the "instancetypename" field - there is a bug with static refine fields, until the "angular-16-irish-monitor" branch is merged.
2024-02-01 19:46:34 +02:00
argirok bedb7f013b [master | DONE | CHANGED] Monitor - Indicators: minor update subtitle when there are filters applied, add title and clear all in selected filters above indicators 2024-01-31 10:38:20 +02:00
argirok a6ea10fd90 [master | DONE | ADDED] Monitor - Indicators: update subtitle when there are filters applied 2024-01-30 12:27:40 +02:00
argirok 4662a3a185 [master | DONE | CHANGED] Monitor - Indicators: update fields mapping for filtering to work better for FOS filters - replace previously wrong field 2024-01-30 11:42:21 +02:00
argirok 3e96a5f889 [master | DONE | CHANGED] Monitor - Indicators: update fields mapping for filtering to work better for FOS filters 2024-01-30 11:29:31 +02:00
Konstantina Galouni 6b5b7df8be [develop | DONE | DELETED]: Deleted legacy unused files mailPrefs.component.html, mailPrefs.component.ts, mailPrefs.module.ts, htmlProjectReport.component.ts, htmlProjectReport.module.ts. 2024-01-29 19:55:26 +02:00
Konstantina Galouni 5a23f6437d [develop | DONE | FIXED]: project.component.ts: In method "closeLoading()" added setTimeout of 300ms - too fast open and close of the loading modal and it couldn't close eventually. 2024-01-29 19:53:11 +02:00
argirok 0c85072ac3 [angular-16-irish-monitor | DONE | CHANGED] My orcid links: add option for custom link in discover more links, add property 2024-01-29 17:57:44 +02:00
argirok 70b7e30b70 [angular-16-irish-monitor | DONE | CHANGED] Custom filters: add checks, add custom query 2024-01-29 17:56:10 +02:00
Konstantinos Triantafyllou 4c55fb252c [angular-16-irish-monitor | CHANGED | DONE]: Change OA Color filter to Publisher Access. 2024-01-29 15:55:34 +02:00
Konstantina Galouni fa216cbc07 [develop | DONE | CHANGED]: availableOn.component.ts: Removed environment check from fulltext links (display them also in production). 2024-01-25 12:33:50 +02:00
Konstantina Galouni 1e41013e06 [develop | DONE | CHANGED]: showSubjects.components.ts: Removed subjects by Vocabulary for BETA & DEV environments & Updated how EOSC subjects are displayed | resultLanding.component: Added get method "hasSubjects" and updated checks to show subjects depending on environment. 2024-01-25 12:31:14 +02:00
Konstantinos Triantafyllou 340dd96dc2 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-24 20:13:13 +02:00
Konstantinos Triantafyllou a40f1431ed [angular-16-irish-monitor]: Fix overlay in indicators. Fix admin calls for managers/ivnitations. 2024-01-24 20:13:05 +02:00
Konstantina Galouni e3fe71a623 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html & result-preview.component.html: Renamed OA Routes to Access Routes. 2024-01-24 17:10:45 +02:00
Konstantina Galouni 134ab8240e Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-24 17:05:14 +02:00
Konstantina Galouni 0a47193bf3 [develop | DONE | FIXED]: searchResearchResults.service.ts & resultLanding.service.ts & deletedByInference.service.ts: #9425 - When an author (same name & rank) has 2 instances on the same record, keep orcid information if exists in at least one instance. 2024-01-24 17:03:15 +02:00
Konstantinos Triantafyllou bbcfa595da [angular-16-irish-monitor | MERGE]: Merge from develop 2024-01-24 16:25:17 +02:00
Konstantinos Triantafyllou 2b9953503a Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-01-24 14:36:20 +02:00
Konstantinos Triantafyllou e176169afd [develop]: Fix some properties values 2024-01-24 14:36:12 +02:00
argirok 43ceb9f266 [develop | DONE | CHANGED] claims: disable result link when status is pending 2024-01-24 12:14:40 +02:00
Konstantinos Triantafyllou b83101fd74 [angular-16-irish-monitor | FIXED]: Manage stakeholders less fix border if color is none. 2024-01-24 10:36:40 +02:00
Konstantinos Triantafyllou 017b54f57c [angular-16-irish-monitor | CHANGED]: Add .hostedby in datasource indicators generator. 2024-01-19 13:44:02 +02:00
Konstantinos Triantafyllou e1f6549e89 [anuglar-16-irish-monitor]: AdminDashboardGuard make services protected 2024-01-18 09:58:28 +02:00
argirok 6034bcfe77 [angular-16-irish-monitor | DONE | CHANGED] Indicators Filters changed the way filters applied, add publiclyFunded Filter 2024-01-17 15:43:43 +02:00
argirok 93ae0db4dd [angular-16-irish-monitor | DONE | CHANGED] Stakeholder service : change charts limit to 7 results 2024-01-17 15:42:32 +02:00
Alex Martzios 5699aed599 [develop | DONE | FIXED] linking: stack elements on mobile to avoid page breaking 2024-01-17 11:16:06 +02:00
Konstantina Galouni c06d020cdc [develop | DONE | CHANGED]: ISVocabularies.service.ts: Updated method "parseFOS()" to parse all Fields of Science by visiting hierarchy from fos.json using an iterative DFS (Depth First Search), instead of looping each level - this does not depend on the number of levels specified in the vocabulary file. 2024-01-12 13:59:58 +02:00
Konstantinos Triantafyllou f629a9c715 [angular-16-irish-monitor]: Fix ireland composer subject. 2024-01-12 13:44:12 +02:00
Konstantinos Triantafyllou d0aa12ab4d [angular-16-irish-monitor]: Fix wrong visibility on import. 2024-01-12 11:39:26 +02:00
argirok adb4c86d2f [angular-16-irish-monitor | DONE | CHANGED] user management service: better clean up reload urls 2024-01-12 11:26:16 +02:00
Konstantinos Triantafyllou f07d1778c5 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-12 10:16:31 +02:00
Konstantinos Triantafyllou ba1a3b9e62 [angular-16-irish-monitor]: Fix cancel invitation method of a user. Set rootClass only if it is changed. 2024-01-12 09:15:04 +02:00
argirok ced24dc2af [angular-16-irish-monitor | DONE | ADDED] add getResearcherStakeholder method in stakeholder service, to get researcher profile and set the proper values based on current author 2024-01-11 18:28:02 +02:00
Alex Martzios c2312e297e [develop | DONE | FIXED] remove b2note (annotation component) and all its references 2024-01-11 12:49:57 +02:00
Konstantinos Triantafyllou 037c32c545 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-10 14:21:19 +02:00
Konstantinos Triantafyllou c5759235e4 [angular-16-irish-monitor]: Fix name of export file of indicators. Fix manageStakeholders if an error is occurred. 2024-01-10 14:21:12 +02:00
argirok 9a96851e70 [angular-16-irish-monitor | DONE | ADDED] indicator utils, add researcher as stakeholder type and extract researcher parameters 2024-01-10 12:34:03 +02:00
argirok 0a01288a46 direct linking for orps: fix checks, use type 'other' instead of 'orp' 2024-01-10 00:03:47 +02:00
Konstantinos Triantafyllou ae4b3b7b95 [angular-16-irish-monitor]: Fix badge in production 2024-01-09 17:57:42 +02:00
Konstantina Galouni 9bcc1bb4d5 [angular-16-irish-monitor | DONE | CHANGED]: searchFields.base.ts: Changed label of facet field "isindiamondjournal" to "In a Diamond OA journal". 2024-01-09 17:03:47 +02:00
Konstantina Galouni 88b5e06aa8 [master | DONE | CHANGED]: admin.component.ts & sidebar-base.component.ts: Added admin menu sidebar in super admin pages for help texts | admin.module.ts: In manage profiles page set hasAdminMenu: true, hasSidebar: false & removed path: 'irish/admin-tools' - :stakeholder will be called instead. 2024-01-09 14:16:35 +02:00
Konstantinos Triantafyllou 8c5990133f [angular-16-irish-monitor]: Update irish dashboard email composer 2024-01-09 13:19:42 +02:00
Konstantina Galouni bef191edba [angular-16-irish-monitor | DONE | ADDED]: stakeholder-base.component.ts: Added method "setProperties()" to set adminToolsPortalType and init portal. 2024-01-09 11:50:05 +02:00
Konstantina Galouni c202b7671b [angular-16-irish-monitor | WIP | CHANGED]: Changed checks for irish portal (use properties.dashboard - properties.adminToolsPortalType will be "country")
1. env-properties.ts: Added in Dashboard "irish" type and changed "irish" to "country" in PortalType.
2. connectHelper.ts & resultLanding.service.ts & manageStakeholders.component.html & indicators.component.ts & orcid-work.component.ts & entitiesSelection.component.ts & result-preview.component.ts: Updated check to properties.dashboard != "irish".
3. portalHelper.ts: Added "country" option in portalTypes.
2024-01-09 11:33:46 +02:00
Konstantinos Triantafyllou 070ae45480 [angular-16-irish-monitor]: Add composer for irish dashboard. 2024-01-09 11:12:07 +02:00
Konstantinos Triantafyllou d6d3c7bab9 [angular-16-irish-monitor]: Add condition for notification. Fix infinite loop with user-info. 2024-01-09 10:51:03 +02:00
argirok bc259c7c3c [angular-16-irish-monitor | DONE | CHANGED] make session redirect urls an array, allow double redirect to fix page and then to current page (when redirected to login) 2024-01-09 10:07:04 +02:00
Konstantinos Triantafyllou 54a7ad165e [angular-16-irish-montitor | CHANGED]: admin dashboard chech data first before params for stakeholder. 2024-01-08 17:40:05 +02:00
Konstantinos Triantafyllou d61a70cc5a Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-08 16:59:39 +02:00
Konstantinos Triantafyllou b52ef07306 [angular-16-irish-monitor | ADDED]: Add environment badge in header of navbar 2024-01-08 16:59:32 +02:00
Konstantina Galouni ab0ae376b9 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-08 15:37:20 +02:00
Konstantina Galouni 6f13ab475a [develop | DONE | CHANGED]: Show code in Fields of Science (FoS) when fos field is queried in filters, or not, when foslabel field is queried.
1. searchFields.base.ts: Added method "getFosParameter()" to check if "fos" or "foslabel" is in RESULT_REFINE_FIELDS | Removed environment check for fos in RESULT_REFINE_FIELDS and RESULT_FIELDS_ORDERED.
2. resultLanding.service.ts & landing-utils/fos.component.ts & fos/fos.component: Include code in fos labels when fos field is queried, otherwise (foslabel) not.
2024-01-08 15:36:27 +02:00
argirok 0f52dcbdca [angular-16-irish-monitor | DONE | CHANGED] hide shema enhancements message for irish case 2024-01-08 14:29:54 +02:00
argirok 010709202b [angular-16-irish-monitor | DONE | CHANGED] replace value of a field only if it matches with one of the profile index values, if not ignore it 2024-01-08 14:29:16 +02:00
Konstantina Galouni 4f0c8ae5e9 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-08 14:07:42 +02:00
Konstantina Galouni 18325323d0 [develop | DONE | CHANGED]: fos/fos.component.html & landing-utils/fos.component.ts & searchFields.base.ts: Removed "BETA" indication from Fields of Science. 2024-01-08 14:04:18 +02:00
argirok 69a9512d14 Merge remote-tracking branch 'origin/angular-16-irish-monitor' into angular-16-irish-monitor 2024-01-08 13:51:40 +02:00
argirok 9013db4b6b [angular-16-irish-monitor | DONE | ADDED] add property for matomo logs 2024-01-08 13:50:05 +02:00
Alex Martzios 1157c0f4a7 [angular-16-irish-monitor | FIXED | DONE] admin: filter stakeholders after creating/deleting new profile 2024-01-08 10:50:44 +02:00
Konstantinos Triantafyllou f81f5d7bfb [angular-16-irish-monitor | ADDED]: Add originalId to datasources results in order to use it for provide. 2024-01-07 13:20:17 +02:00
Konstantinos Triantafyllou bc4e30c3f2 [angular-16-irish-monitor | CHANGED | DONE]: Remove loginURL, logoutURL and userInfoURL properties and add loginServiceURL. 2024-01-07 01:41:59 +02:00
Konstantinos Triantafyllou 367bdc3092 Merge pull request 'Merge Changes from Develop' (#28) from develop into angular-16-irish-monitor
Reviewed-on: #28
2024-01-05 10:32:32 +01:00
Konstantinos Triantafyllou 9709062383 [angular-16-irish-monitor | ADDED]: Add recaptcha key to commonDev 2024-01-04 13:51:49 +02:00
Alex Martzios abaa7764b9 [angular-16-irish-monitor | FIXED | DONE]: remove email subject from body 2024-01-04 13:36:30 +02:00
Alex Martzios 5d7e72eb3d [angular-16-irish-monitor] add new composer for irish monitor 2024-01-04 13:19:24 +02:00
Konstantinos Triantafyllou 21f49bbc6c [angular-16-irish-monitor | FIXED | DONE]: Manage stakeholders retrieve types from configuration. 2024-01-03 11:00:11 +02:00
Konstantina Galouni 84c2451521 [develop | DONE | CHANGED]: dataProvider.component.html & project.component.html & resultLanding.component.html: Changed uk-flex-middle to uk-flex-top for .landing-metrics-card, after min-height was introduced. 2023-12-28 16:34:43 +02:00
Konstantina Galouni 7ccd9c625b [develop | DONE | FIXED]: searchAll.component.ts: Updated entitytype parameter to method "NewSearchPageComponent.createKeywordQuery()" for querying number of datasurces and services also by pid. 2023-12-28 15:41:17 +02:00
Alex Martzios cba56ca4c0 [angular-16-irish-monitor] admin - manage stakeholders: add paging and filter by 'type' for stakeholders and defaultStakeholders 2023-12-28 13:28:39 +02:00
Konstantina Galouni 03b61d1fc6 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html: Added OA Routes in mobile (small screens) | base.component.ts: Added method "quote()" and init routerHelper. 2023-12-22 16:20:15 +02:00
Konstantinos Triantafyllou 9fc6d0c0a0 Merge pull request 'Production release December 2023' (#27) from develop into master
Reviewed-on: #27
2023-12-21 13:46:37 +01:00
Konstantinos Triantafyllou 617489a565 [angular-16-irish-monitor | CHANGED | DONE]: Add class in access-route-badge of result preview base on the required dots. 2023-12-21 13:21:11 +02:00
Konstantina Galouni 60d4bb914f [angular-16-irish-monitor | DONE | ADDED]: searchFields.base.ts: New fields "peerreviewed", "isgreen", "openaccesscolor", "isindiamondjournal", "publiclyfunded"
1. Added in RESULT_FIELDS "peerreviewed", "isgreen", "openaccesscolor", "isindiamondjournal", "publiclyfunded"
2. Added in RESULT_STATIC_FIELD_VALUES "peerreviewed", "isgreen", "isindiamondjournal", "publiclyfunded"
3. Added in HIDDEN FIELDS "isgreen", "openaccesscolor", "isindiamondjournal", "peerreviewed"
4. Added structure DEPENDENT_FIELDS_AND_VALUES.
2023-12-21 11:02:16 +02:00
Konstantina Galouni 59bd3918e8 [angular-16-irish-monitor | DONE | ADDED]: New type of filter (triplet) added - use of <mat-button-toggle-group> | Grouping of filters added | Fixed checks for dependent filters and added new checks for dependent to filter values.
1. newSearchPage.component.html: Added display of grouped filters | Added checks for triplet typed filters.
2. newSearchPage.component.ts: Fixed checks for dependent filters and added new checks for dependent to filter values.
3. searchFilter.component.html: New "triplet" type of filter | Grouping of filters - smaller titles.
4. searchFilter.component.ts: Added field "@Input() grouped: boolean = false" | Added check for triplet filter | Added method "tripletFilterChange()".
5. searchFilter.module.ts: Import MatButtonToggleModule.
6. searchResearchResults.component.ts: Fixed how groupedFilters are initialized - TODO: Add this fix in other search pages too.
2023-12-21 10:57:14 +02:00
Konstantina Galouni 0870766720 [angular-16-irish-monitor | DONE | ADDED]: resultLanding.component.html & result-preview.component.html: Added display of OA Routes (green, oa color, diamond journal). 2023-12-21 10:36:05 +02:00
argirok 0707914088 [angular-16-irish-monitor | DONE | ADDED] Indicator utils: add method extractDatasource 2023-12-21 10:30:07 +02:00
Konstantina Galouni 1853b1cf57 [angular-16-irish-monitor | DONE | CHANGED]: searchHelperClasses.class.ts: In Filter class renamed field "isOpen" to "isViewAllOpen" | searchResearchResults.component.ts * searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts & searchFilter.component: Use renamed filter field (isViewAllOpen) | searchFilter.component.html: Capitalize value names of filters. 2023-12-21 00:06:32 +02:00
Konstantina Galouni 51dbad03d7 [angular-16-irish-monitor | DONE | ADDED]: Added parsing of peer-reviewed (refereed on instances), publicly funded and OA Routes (green, oa color, diamond journal) | Display peer-reviewed on instances and publicly funded (and projects) in metadata line (entity-metadata).
1. feedback.component.html & resultLanding.component.html: In <landing-header> added parameters publiclyFunded and projects.
2. landing-header.component.ts & result-preview.component.html: In <entity-metadata> added parameters publiclyFunded and projects | Added field @Input() publiclyFunded.
3. availableOn.component.ts: Display peer-reviewed.
4. entity-metadata.component.ts: Display publicly funded | Added field @Input() publiclyFunded: boolean.
5. parsingFunctions.class.ts: Added parsing of peer-reviewed (instance.refereed).
6. resultLanding.service.ts & searchResearchResults.service.ts: Added parsing of publicly funded and OA Routes (green, oa color, diamond journal).
7. resultLandingInfo.ts & searchResult.ts: In ResultLandingInfo and in SearchResult added fields oaRoutes: OARoutes; and publiclyFunded: boolean;
8. result-preview.ts: In HostedByCollectedFrom added field peerReviewed?: boolean; | Set interface OARoutes | In ResultPreview added fields oaRoutes: OARoutes; and publiclyFunded: boolean; | In methods "searchResultConvert()" and "resultLandingInfoConvert()" set oaRoutes and publiclyFunded.
2023-12-20 23:55:00 +02:00
Konstantina Galouni bbe1ced87a [angular-16-irish-monitor | DONE | FIXED]: [missing from previous commit] landing-header.module.ts: Fixed imports - Removed import ShowPublisherModule and added import EntityMetadataModule. 2023-12-20 23:32:38 +02:00
Konstantina Galouni 9a7a14ea87 [angular-16-irish-monitor | DONE | FIXED]: Fixed imports - entity-metadata.module.ts: Imported ShowPublisherModule | resultLandingUtils.module.ts: Removed export ShowPublisherComponent and import EntityMetadataModule. 2023-12-20 23:29:07 +02:00
Konstantina Galouni c225d81c16 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.service.ts: Added check, not to parse SDGs in irish portal. 2023-12-20 23:19:34 +02:00
argirok fe0860d41a [angular-16-irish-monitor | DONE | CHANGED] Indicator utils: update the way we extract indicator index fields and add the parameters 2023-12-20 13:27:52 +02:00
argirok c6dd26dcee [angular-16-irish-monitor | DONE | CHANGED] UserProfile service: update initialize method - not initialize in constructor 2023-12-19 17:20:01 +02:00
argirok 8f009f3fee [angular-16-irish-monitor | DONE | ADDED] Orcid work: add check for consent in case of irish 2023-12-19 11:54:31 +02:00
argirok 677372a332 [angular-16-irish-monitor | DONE | ADDED] User profile service 2023-12-19 11:53:34 +02:00
argirok 2a64a0c951 [angular-16-irish-monitor | DONE | CHANGED] Entity Actions: show Orcid for the case of irish 2023-12-19 11:52:53 +02:00
argirok 4922906bcd [angular-16-irish-monitor | DONE | CHANGED] Entity Actions: show Action in case the enabled route path (e.g /participate) uses loadChildren to load the rest of the path (e.g /direct-claim) 2023-12-19 11:52:27 +02:00
argirok e900c28318 [angular-16-irish-monitor | DONE | CHANGED] Orcid-work: change deprecated Session isLoggedIn method 2023-12-19 11:07:55 +02:00
Konstantinos Triantafyllou 48ce09e400 [angular-16-irish-monitor]: LoginURL property now suppors mutible URLs. 2023-12-18 17:35:36 +02:00
Alex Martzios 52d63ece25 [angular-16-irish-monitor] move customFilter.service.ts file to openaireLibrary/shared folder 2023-12-18 13:27:00 +02:00
Alex Martzios 31220578cf [angular-16-irish-monitor] embed charts on indicators 2023-12-18 12:37:35 +02:00
Konstantinos Triantafyllou 3c7b330167 [angular-16-irish-monitor | CHANGED | DONE]: Remove role prefix from role name functions and added only in creation of a role. 2023-12-15 16:59:38 +02:00
argirok d804da4dd8 Merge branch 'develop' into angular-16-irish-monitor 2023-12-15 16:46:43 +02:00
argirok cfc6a07f7c [angular-16-irish-monitor | DONE | ADDED] add openorgs url in properties 2023-12-15 16:04:41 +02:00
argirok c977bb0898 [angular-16-irish-monitor | DONE | FIXED] cookie: set properly cookie when cookie name is not default 2023-12-15 11:26:28 +02:00
Konstantina Galouni 41adaa308d Merge pull request 'Merge develop-filters into develop branch' (#25) from develop-filters into develop
Reviewed-on: #25
2023-12-15 09:08:00 +01:00
Konstantina Galouni afcbb07a24 [develop-filters | DONE | ADDED]: Added structures for grouping and ordering search filters.
1. searchFields.base.ts: Added RESULT_FIELDS_ORDERED and PROJECT_FIELDS_ORDERED.
2. searchResearchResults.component.ts: Set and initialize orderedFields and orderedFilters and pass them to <new-search-page>.
3. newSearchPage.component.html: If there are orderedFilters, show filters from this structure.
2023-12-14 18:23:28 +02:00
Konstantina Galouni d9c7d35e57 [develop-filters | DONE | CHANGED]: Get 7 top values for each filter (minRef) and on view all click, query for top 100 for a specific filter.
1. searchResearchResults.service.ts & searchProjects.service.ts & searchOrganizations.service.ts & searchDataproviders.service.ts: In advanced search method added parameter minRef: boolean = false and if true, add in request url "&minRef=true" to query for top 7 values.
2. searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: By default query filters with minRef=true | Added method "filterRequestedAll()" to be called on view all click of a filter.
3. searchHelperClasses.class.ts: Added in Filter public countAllValues?: number = -1; (-1: all filters not yet requested, 0: request failed) and public isOpen?: boolean = false; (checks if view all filter is clicked).
4. searchFilter.module.ts: Imported LoadingModule.
5. searchFilter.component.ts & searchFilter.component.html: Updated process on view all click.
6. newSearchPage.component.ts: Added method "filterToggled()".
7. newSearchPage.component.html: Bind filterToggled method to <search-filter> output.
2023-12-14 18:14:57 +02:00
Konstantina Galouni 0768248bde [develop | DONE | CHANGED]: refineResults.class.ts: Missing change from pre-previous commit for static filters. 2023-12-14 17:35:53 +02:00
Konstantina Galouni d15ce5522e [develop-filters | DONE | CHANGED]: refineFieldResults.service.ts: In method "getAllRefineFieldResultsByFieldName()", added size=0 in request url. 2023-12-14 17:32:42 +02:00
Konstantina Galouni b0a67be290 [develop-filters | WIP | CHANGED]: Added static refine fields.
1. searchFields.base.ts: Added RESULT_STATIC_FIELDS/ DATASOURCE_STATIC_FIELDS and RESULT_STATIC_FIELD_VALUES/ DATASOURCE_STATIC_FIELD_VALUE and updated in RESULT_FIELDS type to static for resultbestaccessright, and added type and in DATASOURCE_FIELDS added eosctype.
2. staticAutoComplete.component.ts: Added @Input() public fieldValues; and added check not to query for values when static (fieldValues exists).
3. searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: Added parameters for static fields in <new-search-page> and initialized them properly.
4. advancedSearchForm.component.html: Added parameter fieldValues to <static-autocomplete>.
5. advancedSearchForm.component.ts: Added method "public getFieldValuesForId(id: string)".
6. newSearchPage.component.html: Added parameter fieldValues to <advanced-search-form> and show static filters view case.
7. newSearchPage.component.ts: Added static filters - initialize them properly and make code for static filters more dynamic.
2023-12-14 17:30:29 +02:00
Konstantina Galouni d587aaefe2 [develop-filters | DONE | CHANGED]: refineResults.class.ts: Removed check includeValue (for unidentified and Undetermined values) from "parse()" method | searchFilter.component.ts: In "ngOnChanges()" method updated check for filtering out filter values - check for unidentified, Undetermined, unknown (lowercase), not available (lowercase) 2023-12-14 14:24:03 +02:00
Konstantina Galouni 01eabb74f3 [develop-filters | DONE | CHANGED]: searchFilter.component.ts: In method "_formatTitle()", remove number of filter values from filter name. 2023-12-14 14:16:46 +02:00
argirok 5060151e09 [angular-16-irish-monitor | DONE | CHANGED] update log Service, add log actions in claims and orcid links 2023-12-14 14:01:06 +02:00
argirok e4ae0ca35c [angular-16-irish-monitor | DONE | ADDED] add property for myclaims route 2023-12-14 14:00:24 +02:00
argirok f4fc3eddf6 [angular-16-irish-monitor | DONE | CHANGED] Edit stakeholder: shortname not required 2023-12-14 13:58:47 +02:00
argirok 6b062dc2fb [angular-16-irish-monitor | DONE | CHANGED] Import indicators: allow for stakeholder type country to not having parameters for the current stakeholder 2023-12-14 13:57:39 +02:00
argirok 837e121684 [angular-16-irish-monitor | DONE | ADDED] log service add get logs method 2023-12-13 17:38:25 +02:00
argirok 941db7102a [angular-16-irish-monitor | DONE | CHANGED] monitor dashboard: make require login for filters optional 2023-12-13 15:58:22 +02:00
argirok 704f52c969 [angular-16-irish-monitor | DONE | ADDED] Add fos lvl1 &lvl2 filters 2023-12-12 16:39:59 +02:00
Konstantina Galouni c12cadf0f1 Merge pull request 'Production release (for EOSC EXPLORE) December 2023' (#24) from develop into master
Reviewed-on: #24
2023-12-12 11:43:47 +01:00
Konstantina Galouni 84bf8cdebe [develop | DONE | FIXED] parsingFunctions.class.ts: Updated urls for eoscSubjects (eoscif guidelines). 2023-12-12 11:59:25 +02:00
Konstantinos Triantafyllou a4bb94daa7 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-12 10:11:41 +02:00
Konstantinos Triantafyllou 7b2b3c6cc4 [develop | FIXED | DONE]: Fix copy indicator to clipboard. 2023-12-12 10:10:22 +02:00
Konstantinos Triantafyllou 684c9ac4c0 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-08 15:34:00 +02:00
Konstantinos Triantafyllou 7d97f05e6e Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-12-08 15:33:50 +02:00
Konstantinos Triantafyllou 3e02680f5e [angular-16-irish-monitor]: Add orcid in user class. Fix orcid button text. Remove capitalize from buttons in download and data dump. 2023-12-08 15:33:44 +02:00
Alex Martzios 7e007c9511 entity-metadata.component: move the "margin-right" class inside the icons 2023-12-08 14:37:25 +02:00
argirok 49c0569ff8 [develop | DONE | FIXED] : Claims: fix check about status when there is a direct index insertion job 2023-12-08 14:36:42 +02:00
argirok faf0598e10 [develop | DONE | FIXED] : remove final / from zenodoCommunities url 2023-12-08 14:35:27 +02:00
Alex Martzios 2e336b93a8 create entity-metadata.module so that we can use the component independently 2023-12-08 13:18:24 +02:00
argirok 38b8865be0 [angular-16-irish-monitor | DONE | ADDED] Add title prefix for research outcomes 2023-12-07 12:09:52 +02:00
argirok f3c7ddec93 [angular-16-irish-monitor | DONE | ADDED] add zenodo dump url 2023-12-07 11:38:27 +02:00
argirok 76003bf6d9 [angular-16-irish-monitor | DONE | CHANGED] Search ORCID: change request to get the list of institutions 2023-12-06 16:05:15 +02:00
argirok 8c5c4923d3 [angular-16-irish-monitor | DONE | CHANGED] cookie banner: parameterize cookie name 2023-12-06 15:13:59 +02:00
Konstantinos Triantafyllou 736546c0eb Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-06 13:54:08 +02:00
Konstantina Galouni 9913da1f43 [develop | DONE | FIXED]: refineResults.class.ts: Removed unused import FieldDetails. 2023-12-06 13:53:06 +02:00
Konstantina Galouni 3bda71b818 [develop | DONE | CHANGED]: Added file searchFields.base.ts to be extended by existing SearchFields class (searchFields.ts file) - searchFields.ts will be replaced by custom file if needed in angular.json. 2023-12-06 13:50:11 +02:00
argirok 0b90448e01 [angular-16-irish-monitor | DONE | CHANGED] entities selection add check for irish monitor dashboards 2023-12-04 13:26:34 +02:00
Konstantinos Triantafyllou a2706af35d Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-01 19:31:04 +02:00
Konstantinos Triantafyllou 1a2a5f81d6 [develop]: Merge changes from develop 2023-12-01 19:30:48 +02:00
argirok 6daf729374 [develop | DONE | CHANGED] : String utils - urlPrefix add check in case url is null 2023-12-01 17:13:16 +02:00
argirok f537920702 [ DONE | ADDED] String utils - Identifiers: consider valid ORCID the full url, add getRawORCID method 2023-12-01 16:16:25 +02:00
Konstantinos Triantafyllou 7b79146f12 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-30 23:04:07 +02:00
Konstantinos Triantafyllou 5eed3ce431 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-30 23:03:46 +02:00
Konstantinos Triantafyllou ab4d715454 [develop]: Result preview add modifier class and hover behaviour. 2023-11-30 23:03:39 +02:00
Konstantinos Triantafyllou 65f8676a08 [angular-16-irish-monitor | WIP]: Add role group before type of an entity. 2023-11-30 14:20:00 +02:00
argirok f853d96ed4 [angular-16-irish-monitor | WIP] logService: rename property 2023-11-28 18:49:42 +02:00
argirok f27b8e11f7 [angular-16-irish-monitor | WIP] logService and properties 2023-11-28 18:42:21 +02:00
argirok 550c27a464 [angular-16-irish-monitor | DONE | CHANGED ] fetchByDOIs: add filter query to the request 2023-11-28 11:04:04 +02:00
Konstantinos Triantafyllou 1a7624eed1 Merge pull request 'Production release November 2023 v3' (#23) from develop into master
Reviewed-on: #23
2023-11-28 09:45:06 +01:00
Konstantina Galouni c7c1aec26e [develop | DONE | CHANGED]: Updated parsing and display for usage counts per data source to show datasource names.
1. resultLandingInfo.ts: Added field datasourceName: string in interface MetricPerDatasource.
2. parsingFunctions.class.ts: In method "parseMeasures()", updated parsing for usage counts per data source (countsPerDatasource) to parse datasourceId and datasourceName from datasource field of response (split by ||).
3. resultLanding.component.html: On display of countsPerDatasource in table, show datasource names.
2023-11-27 18:10:37 +02:00
Alex Martzios 6f214cb08a [angular-16-irish-monitor | WIP]: browse repository monitors - query for datasource stakeholders, display them in page 2023-11-27 14:01:14 +02:00
Konstantina Galouni fa61b8bef4 [develop | DONE | CHANGED]: numbers.component.ts: Added in Numbers field "mergedFundersSize", and on init method call refine query for research products (results), to merge refine queries of research products and projects and set the mergedFundersSize (all funders that have research products, or have >1 project). 2023-11-24 16:59:55 +02:00
Konstantina Galouni 7cd9516493 [develop | DONE | CHANGED]: refineFieldResults.service.ts: In method "getRefineFieldResultsByFieldName()" added in keys "funder", to get (refine query) all funders for research products and projects in autocomplete (advanced) search. 2023-11-24 16:57:35 +02:00
Konstantina Galouni 54e0181560 [develop | DONE | FIXED] numbers.component.ts: Updated method called in refine query to get funders of projects from "getRefineFieldsResultsByEntityName()" to "getAllRefineFieldResultsByFieldName()" to be able to get more than 100 funders each time. 2023-11-24 13:18:22 +02:00
Konstantina Galouni ff34511a9c [develop | DONE | CHANGED]: refineFieldResults.service.ts: Added method "getAllRefineFieldResultsByFieldName()" to get all values of a specific refine field (not just first 100) | In method "getRefineFieldResultsByFieldName()" changed key:string to keys:string[] to be able to define multiple fields to query for all their values - creted helper method "fieldIncludesAnyOfTheKeywords()". 2023-11-24 11:44:23 +02:00
Konstantinos Triantafyllou 205b97487c Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-24 10:52:50 +02:00
Konstantinos Triantafyllou 246cafa43f [angular-16-irish-monitor]: Add rootClass subject in layout service. 2023-11-24 10:51:22 +02:00
Konstantina Galouni 1f872d2beb [develop | DONE | ADDED]: searchSorting.component.ts: Added sorting options by impact-based indicatos in PRODUCTION as well. 2023-11-23 09:42:38 +02:00
Konstantina Galouni 4155027e87 [develop | DONE | FIXED]: alert.ts: Fixed margins and paddings in buttons of uk-modal-footer. 2023-11-21 12:59:17 +02:00
Konstantinos Triantafyllou 3c1b72e7e4 [angular-16-irish-monitor | ADDED]: Add configuration for caching indicators. 2023-11-16 16:44:27 +02:00
Konstantinos Triantafyllou 79d49c80e3 [angular-irish-16 | DONE]: Add datasource in Entities. Add logo in sidebar. 2023-11-16 14:36:44 +02:00
Konstantinos Triantafyllou 752baad8de [angular-16-irish-monitor]: Merge from develop(2) 2023-11-16 11:52:46 +02:00
Konstantinos Triantafyllou 552f1ed43a [angular-16-irish-monitor]: Merge from develop 2023-11-16 11:47:50 +02:00
Konstantinos Triantafyllou fc58721e2a [angular-16-irish-monitor]: Add method to get the label of an option in stakeholder-base component 2023-11-16 11:45:07 +02:00
Konstantinos Triantafyllou 054d7ff51e Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-16 11:36:51 +02:00
Konstantinos Triantafyllou 58274c537b [develop | DONE]: Move indicators.less into common assets 2023-11-16 11:36:41 +02:00
argirok 5b0c207150 [develop | DONE | FIXED] : re-add properties for services 2023-11-15 17:39:03 +02:00
argirok f0c37512c3 [develop | DONE | FIXED] : show again enermaps tab in result landing 2023-11-15 17:34:15 +02:00
Konstantinos Triantafyllou 16b6a34d25 [angular-16-irish-monitor]: Fix input reset value on changes 2023-11-15 16:13:45 +02:00
Konstantinos Triantafyllou b8162fa1e3 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-15 10:35:52 +02:00
Konstantinos Triantafyllou 920f3a454a [angular-16-irish-monitor | WIP]: Add optional extend-theme variables import in all component less files. Add relativeTo in slider tabs 2023-11-15 10:35:44 +02:00
argirok a5265ab98d [angular-16-irish-dashboard | DONE | CHANGED] Entities selection: add portal config for irish 2023-11-15 10:32:23 +02:00
Konstantinos Triantafyllou a8c91dc04c [angular-16-irish-monitor | DONE]: Change dev upload to mpagasas. 2023-11-14 16:10:55 +02:00
argirok 5480de5812 [angular-16-irish-monitor | WIP | CHANGED] Orcid search author: parse institutions 2023-11-14 15:08:50 +02:00
Konstantinos Triantafyllou edda550b63 [angular-16-irish-monitor]: Add monitor-indicator-stakeholder-base-component 2023-11-14 10:17:18 +02:00
Konstantina Galouni 51bd7efcbe [develop | DONE | FIXED] entitiesSelection.component.ts: Added faircore4eosc in adminToolsPortalType check to include entities according to the configuration. 2023-11-13 20:22:01 +02:00
Konstantinos Triantafyllou e80f73f9a9 [angular-16-irish-monitor | WIP]: Add base components for stakeholder, indicators and sidebar. Deprecated StakeholderEntities. 2023-11-13 15:00:05 +02:00
argirok 1ff833ed8a [angular-16-irish-monitor | DONE | CHANGED ] Search pages (projects, organizations, datasources ) Custom Filter accept single or an array of Custom filters 2023-11-13 13:46:42 +02:00
argirok 293be5e1d2 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-13 13:34:48 +02:00
argirok 62d4ab1a36 [angular-16-irish-monitor | DONE | UPDATED] Custom Filter accept single or an array of Custom filters 2023-11-13 11:18:00 +02:00
argirok ffec391448 [angular-16-irish-monitor | DONE | UPDATED] SearchResearch results - fetchByDOIs: use the search service API from properties 2023-11-13 11:16:47 +02:00
Konstantina Galouni 7f9117eccb [develop | DONE | CHANGED]: data sources landing: Get and parse number of collected fulltexts from a new stats api.
1. env-properties.ts: Added property pdfStatisticsAPIURL?: string;
2. environment.ts: Added pdfStatisticsAPIURL property in all environments.
3. dataProvider.service.ts: Uncomment method "getCollectedFulltexts()".
4. dataProvider.component.ts: Call method "getCollectedFulltexts()" instead of "getDataProviderAggregationStatus()".
2023-11-10 19:44:15 +02:00
Konstantina Galouni e8ed5da8ba Merge pull request 'Production release November 2023 v2' (#21) from develop into master
Reviewed-on: #21
2023-11-10 18:27:47 +01:00
argirok ce8b104c20 [angular-16-irish-monitor | DONE | REMOVED] SearchCustomFilter: remove promptToAddFilter field, and code to add and remove filter 2023-11-09 16:11:12 +02:00
Konstantinos Triantafyllou a773cd8d1d Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-09 14:35:10 +02:00
Konstantina Galouni 68c352d3d2 [develop | DONE | CHANGED]: In deposit page, move "Go to repository" button to top, aligned with the title when possible.
1. searchResultsForOrcid.component.html & searchMyOrcidResults.component.html: Removed [promoteWebsiteURL]="true", since this should be true only in deposit cards.
2. searchResultsInDeposit.component.ts: Added @Input() isMobile: boolean = false;
3. searchResultsInDeposit.component.html: Set parameter [isMobile]="isMobile" to <result-preview>.
4. newSearchPage.component.html: Set parameter [isMobile]="mobile" to <deposit-result>.
5. result-preview.component.html: In deposit cards align on the right of the title the "Go to repository" button and in mobile screens show it on the top right of the card.
2023-11-08 22:40:04 +02:00
Konstantina Galouni 32a34d5a12 [develop | DONE | ADDED]: Added parsing and display for usage counts per data source.
1. resultLandingInfo.ts:
   a. Commented out deprecated fields from interface Measure.
   b. Added interface MetricPerDatasource.
   c. Added in interface Measure, countsPerDatasource?: MetricPerDatasource[];
2. parsingFunctions.class.ts: In method "parseMeasures()", added parsing for usage counts per data source (countsPerDatasource).
3. resultLanding.component.html: Display countsPerDatasource in table (metrics tab > usage tab) if there is any.
2023-11-08 16:57:56 +02:00
Konstantinos Triantafyllou 50a8d53221 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-08 15:17:52 +02:00
Konstantina Galouni 0d75307c76 [develop | DONE | CHANGED]: parsingFunctions.class.ts: Remove old schema parsing for impact based indicators (old was A, B, C - new is C1-C5). 2023-11-08 14:12:50 +02:00
Konstantina Galouni e63d61b469 Merge remote-tracking branch 'origin/develop' 2023-11-07 13:34:30 +02:00
Konstantina Galouni 3aff9ee76e [develop | DONE | ADDED] openaireLibrary - environment.ts: Added common properties searchLinkToService, searchLinkToServices, searchLinkToAdvancedServices. 2023-11-07 13:32:05 +02:00
Argiro Kokogiannaki f42d160308 Merge pull request 'Production release November 2023' (#20) from develop into master
Reviewed-on: #20
2023-11-07 09:48:31 +01:00
Konstantinos Triantafyllou 06a2ae16ee [develop | DONE]: Set header-height to 0px instead of 0 in layout service 2023-11-03 16:52:52 +02:00
Konstantinos Triantafyllou 5cd1e29871 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-02 16:39:23 +02:00
Konstantinos Triantafyllou ba6dcf3b1c [angular-16-irish-monitor | WIP]: Add route params resolver in base component. Change metadata in manage stakeholders. 2023-11-02 16:39:14 +02:00
argirok c1e58e76a0 [angular-16-irish-monitor | WIP] piwik Service: make public trackEvent method 2023-11-02 14:53:42 +02:00
argirok c168416e3e Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-02 12:10:33 +02:00
Konstantinos Triantafyllou 6492211dc3 Merge pull request 'Move manage stakeholders into admin' (#19) from develop into angular-16-irish-monitor
Reviewed-on: #19
2023-11-02 10:37:01 +01:00
Konstantinos Triantafyllou 87e3c903a8 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-02 11:31:09 +02:00
Konstantinos Triantafyllou e38a772bf3 [develop | DONE]: Move manage stakeholders to library 2023-11-02 11:30:59 +02:00
Konstantinos Triantafyllou 106cb5dcf8 Merge pull request 'develop' (#18) from develop into angular-16-irish-monitor
Reviewed-on: #18
2023-11-02 09:42:04 +01:00
argirok 3e656de39c [develop | WIP] : Properties: add again clientManagementUrl property 2023-11-02 09:19:24 +02:00
argirok 0c0ef48b49 [develop | WIP] : Properties: remove wrong import, add more properties related to admin portal 2023-11-01 17:49:01 +02:00
argirok 79aa405507 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-01 17:20:37 +02:00
argirok 59d64b74e7 [develop | WIP] :update common properties - add connect related ones + claims api url 2023-11-01 16:35:46 +02:00
argirok 7399cd9ea6 [develop | WIP] add common properties in library file, delete unused properties 2023-11-01 14:27:54 +02:00
argirok 6ce2b75ee6 [develop | WIP | UPDATED] add common properties in library file, delete unused properties 2023-11-01 14:26:09 +02:00
Konstantinos Triantafyllou be84e2d986 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-10-31 15:15:01 +02:00
Konstantinos Triantafyllou 5af67f7385 [develop | FIXED]: Fixed width of indicators page in admin. 2023-10-30 17:58:54 +02:00
argirok 9eee47f0d2 [angular-16-irish-monitor | WIP] Search researcher: update fetch by dois method 2023-10-30 17:12:43 +02:00
argirok cdb5f1ecd0 [WIP] Search researcher: work on the page layout - add banner, basic component functionalities 2023-10-30 17:09:59 +02:00
Konstantinos Triantafyllou aaf970fae4 Merge pull request 'Update to Angular 16' (#16) from angular-16 into develop
Reviewed-on: #16
2023-10-30 10:57:25 +01:00
Konstantina Galouni 5184ffad19 [angular-16 | DONE | ADDED] env-properties.ts: Added "faircore4eosc" in type Dashboard and type PortalType. 2023-10-30 11:22:20 +02:00
Konstantina Galouni 35b893e05e [angular-16 | DONE | FIXED]: In queries of results by pid, do not include pidtype restriction (some handle pids are resolved by doi regex, but no results returned for pidtype exact "doi"). 2023-10-30 10:53:19 +02:00
Konstantinos Triantafyllou 67547421b6 Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-27 17:50:06 +03:00
Konstantinos Triantafyllou 9af2fac9a0 [angular-16 | DONE | FIXED]: Create group was hidden for curators because of new dynamic types. 2023-10-27 17:49:31 +03:00
Konstantinos Triantafyllou 9213755662 Add new types of stakeholder for Irish 2023-10-27 15:52:55 +03:00
Konstantinos Triantafyllou c4ecc8fcae Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-27 09:25:12 +03:00
Konstantinos Triantafyllou 115ba0c49e [angular-16-irish-monitor | WIP]: Create base component with metadata initilization 2023-10-27 09:25:01 +03:00
Konstantinos Triantafyllou 64e8919925 Merge pull request 'angular-16-community-projects-availableSince' (#15) from angular-16-community-projects-availableSince into angular-16
Reviewed-on: #15
2023-10-26 15:47:34 +02:00
argirok fcc130b530 [angular-16-community-projects-availableSince | DONE | UPDATE] : don't show router link and result actions (for the community projects case where the id is set to '-1') 2023-10-26 16:29:05 +03:00
Konstantinos Triantafyllou 0478fe5670 Merge pull request '[angular-16-update-zenodo-api | DONE] : update zenodo community API and parsing' (#14) from angular-16-update-zenodo-api into angular-16
Reviewed-on: #14
2023-10-26 14:24:28 +02:00
argirok 065d73bb3e [angular-16-community-projects-availableSince | DONE | UPDATE] : add method to get last date that db is loaded 2023-10-26 09:48:11 +03:00
argirok 60a3e552b4 [angular-16-irish-monitor | WIP] Search results service: add new method to get results by dois 2023-10-25 17:41:13 +03:00
Konstantinos Triantafyllou 2348b6adcf Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-25 15:31:43 +03:00
Konstantinos Triantafyllou 660387b8da Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-25 15:16:22 +03:00
Konstantinos Triantafyllou a953195dc8 [angular-16 | DONE | CHANGED]: Make dashboard-sidebar sticky instead of fixed. 2023-10-25 15:16:13 +03:00
Konstantina Galouni 4e20a39578 [angular-16 | DONE | CHANGED]: parsingFunctions.class.ts: In bip indicators parsing, parse citations from measure with id 'influence_alt' (old) or 'citation_count' (renamed). 2023-10-25 11:51:44 +03:00
Konstantinos Triantafyllou 89ba510256 Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-25 10:42:32 +03:00
Konstantinos Triantafyllou aebcb81c7b Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-25 10:37:50 +03:00
Konstantinos Triantafyllou 54bff7cd4a [angular-16 | DONE | CHANGED]: Change email composer for Develop project (Add name, surname, email in mail body). 2023-10-25 10:37:39 +03:00
argirok 33b763ca38 [angular-16-irish-monitor | WIP]: Piwik service: add new methods to test events 2023-10-24 12:47:28 +03:00
argirok 606df73c74 [angular-16-irish-monitor | WIP]: Search orcid service: add new methods, add module 2023-10-24 12:46:38 +03:00
Konstantinos Triantafyllou 8647136803 Merge remote-tracking branch 'origin/monitor-admin-library' into angular-16 2023-10-24 11:57:24 +03:00
Konstantinos Triantafyllou b67c242fe7 [monitor-admin-library | DONE | CHANGED]: Make stakeholder types dynamic for Session methods. 2023-10-24 11:51:55 +03:00
argirok 6355a73146 [angular-16-update-zenodo-api | DONE] : update zenodo community API and parsing 2023-10-23 14:32:46 +03:00
Alex Martzios b69e19fa17 [Ang16 | WIP] add new email composer for Develop project 2023-10-23 12:40:55 +03:00
Konstantinos Triantafyllou 1710819fb9 [monitor-admin-library | DONE | CHANGED]: Move general in library 2023-10-20 19:07:33 +03:00
Konstantinos Triantafyllou d54ecec5e6 Merge branch 'monitor-admin-library' of code-repo.d4science.org:MaDgIK/openaire-library into monitor-admin-library 2023-10-20 19:05:42 +03:00
Konstantinos Triantafyllou cf30ab6581 [monitor-admin-library | DONE | CHANGED]: Move topics and cache indicators in library. 2023-10-20 19:02:19 +03:00
Konstantinos Triantafyllou de3fbe8d69 Move topics and cache indicators in library. 2023-10-19 16:33:04 +03:00
Konstantina Galouni f6e927f4c2 [angular-16 | WIP | REMOVED] Removed files environment.all.ts, environment.beta.ts, environment.prod.ts, environment.test.ts and define and export all properties from environment.ts. 2023-10-19 14:49:14 +03:00
Konstantina Galouni 717de55f6e [Library | angular-16]: [Bug fix] Name of bip metrics accidentally removed in branches merge. 2023-10-18 14:18:04 +03:00
Konstantinos Triantafyllou 8d6522270c Slider container: Fix error about observer 2023-10-16 14:34:48 +03:00
Konstantina Galouni b06e41c9a3 Merge pull request 'Merging develop branch into master for PROD Explore October 2023 release' (#10) from develop into master
Reviewed-on: #10
2023-10-16 12:38:55 +02:00
Konstantina Galouni 5948d61a47 Library | angular-16: Merge develop branch into angular-16 and resolve conflicts 2023-10-16 13:06:14 +03:00
Konstantina Galouni fce848008a [Library | develop]: resultLanding.component.html: [Bug fix] Fix check isNumber for bip measures & remove check if value (show citation score also when it is 0). 2023-10-16 12:53:40 +03:00
argirok 953c11a3b2 Merge remote-tracking branch 'origin/develop' into develop 2023-10-16 12:21:35 +03:00
argirok aa0ec0b06f search tab: show all results / don't slice the array
Fetch research results: keep all results in allResults field (for community results case)
2023-10-16 12:11:47 +03:00
Konstantina Galouni f0a48cd2e1 [Library | develop]: search-input.component.ts: [Bug fix] Added cdr.detectChanges() call on ngAfterViewInit, to solve expressionChangedAfterItHasBeenChecked error. 2023-10-16 11:44:18 +03:00
Konstantinos Triantafyllou dbbd7ec541 Input: Make error text-small 2023-10-12 13:10:02 +03:00
argirok 1bfff3b05c update footer links to webinars and blogs 2023-10-12 12:17:09 +03:00
Konstantinos Triantafyllou 0c21afdd7f Import Session in claimContextSearchForm deleted in Develop branch. 2023-10-11 16:40:24 +03:00
Konstantinos Triantafyllou 8581af9404 Merge remote-tracking branch 'origin/new-claims-api' into angular-16 2023-10-11 16:33:50 +03:00
Konstantinos Triantafyllou cfb321f93f Merge from develop 2023-10-11 16:33:33 +03:00
argirok 3f64332a8f Merge branch 'develop' into new-claims-api 2023-10-11 15:46:21 +03:00
Konstantina Galouni 9226a5975d [Library | develop]: Added Full-Text in research products actions when available.
1. availableOn.component.ts: Added Full-Text before Data sources, as a separate action and as information for each instance.
2. parsingFunctions.class.ts: Added parsing for fulltext and updated method "compareHostedByCollectedFrom()" to sort by both access and existence of fulltext.
3. resultLanding.component.html: Removed classes for <availableOn> in mobile actions.
4. entity-actions.component.ts: Updated uk-text-bolder class for all actions.
5. result-preview.ts: Added "fulltext?: string;" in HostedByCollectedFrom.
2023-10-11 12:46:10 +03:00
Konstantinos Triantafyllou 69bbccd009 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 22:47:06 +03:00
Konstantinos Triantafyllou ff4411d695 Fix role verification for community members. Modify isPrivate in communityHelper to include membership. 2023-10-10 22:40:01 +03:00
Konstantina Galouni c29488545e [Library & Explore | develop]: Added in openaireLibrary environment files for common properties (environment.all.ts: Common properties among all portals, regardless environment, environment.-/test/beta/prod.ts: Common properties per environment among all portals) | environments/: Build and export properties by merging local properties and common properties. 2023-10-10 17:42:40 +03:00
Konstantinos Triantafyllou 2a51657e58 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 17:20:24 +03:00
Konstantinos Triantafyllou a30ec46a89 Delete wrong imports 2023-10-10 17:20:03 +03:00
Konstantinos Triantafyllou 22366f5813 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 17:12:58 +03:00
Konstantinos Triantafyllou 196c186731 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-10 17:12:46 +03:00
Konstantinos Triantafyllou dce6e17ea1 Remove animtation from slider and fix active for nav items on resize. 2023-10-10 17:12:37 +03:00
Konstantinos Triantafyllou 3134ef32b3 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-10 14:55:44 +03:00
Konstantinos Triantafyllou c129165832 CommunityInfo: Add isOpen method. Email Composer: Add role in community dashboard invitation. 2023-10-10 12:25:03 +03:00
Konstantinos Triantafyllou 4686ebe5f4 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-09 17:05:02 +03:00
Konstantinos Triantafyllou 9f22bec5cf Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-06 19:49:24 +03:00
Konstantinos Triantafyllou f4d7582764 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-06 19:48:06 +03:00
argirok 1a030e2a0d Merge branch 'develop' 2023-10-06 17:55:08 +03:00
argirok 5e4aaab04f Merge branch 'develop' into new-api 2023-10-06 16:38:01 +03:00
Konstantinos Triantafyllou 5a9237399e Fix slider in tablet 2023-10-06 14:49:04 +03:00
Konstantina Galouni 445441572d [Library & Explore | develop]: Added software heritage as pid for research products.
1. environments/: Added in all environments, property: swhURL: "https://archive.softwareheritage.org/".
2. env-properties.ts: Added property swhURL?: string;
3. string-utils.class.ts: Added method "isValidSwhId()" and swhid in checks and definitions.
4. resultLandingInfo.ts: Added swhid in accepted types of interface Id.
5. resultLanding.component.ts: Added check for swhid in "getReferenceIdName()" and "getReferenceUrl()".
6. parsingFunctions.class.ts: Added pid[i].classid == "swhid" check in "parseIdentifiers()".
7. showIdentifiers.component.ts: Added "swhid" in display of pids.
2023-10-06 12:22:00 +03:00
Konstantinos Triantafyllou cfdd7b2e55 Add slider-components in slider-utils 2023-10-05 16:59:41 +03:00
argirok 1c5a0b22a8 restrict links to user roles management to portal Admins 2023-10-05 14:31:37 +03:00
argirok 3a9a5df12e Merge branch 'new-api' of code-repo.d4science.org:MaDgIK/openaire-library into new-api 2023-10-04 16:05:55 +03:00
argirok 5e7d10b96b Community projects: add filtering and sorting 2023-10-04 16:04:42 +03:00
argirok d2248f4b84 fix return in SearchCommunityProjectsService 2023-10-02 15:11:35 +03:00
argirok 3cf65ef134 Merge branch 'develop' into new-api 2023-10-02 14:05:22 +03:00
Konstantina Galouni edf8ae835c [Library | develop] fos/fos.component.ts & landing-utilts/fos.component.ts & searchFields.ts: Restored checks for environment to use fos or foslabel field - foslabel not yet introduced in current prod index. 2023-10-02 13:13:22 +03:00
Alex Martzios af95b395bd search page: add view more option for partners, projects, match styling for authors as well 2023-10-02 12:18:29 +03:00
Konstantinos Triantafyllou 6d7f6eca72 Merge from origin/develop 2023-09-26 11:50:07 +03:00
Konstantinos Triantafyllou d10df32853 Result Preview: Fix space betwwen ngIf and class. 2023-09-26 11:38:09 +03:00
Konstantina Galouni 0d22ba8a3b [Library | develop]: searchSorting.component.ts: Do not add new sorting options in production yet. 2023-09-20 14:13:34 +03:00
Konstantina Galouni 966dedde45 [Library | develop]: searchSorting.component.ts: Added sorting options (generalOptions), "citation_count,descending", "popularity,descending", "influence,descending", "impulse,descending" | searchResearchResults.component.ts: Added the new sorting options in the checks. 2023-09-20 10:48:20 +03:00
Konstantina Galouni bc514b62d1 [Library | develop]: result-preview.component.ts: Added method "isNumber()" | resultLanding.component.html: [Bug fix] Updated view of bip indicators - format the numbers correctly. 2023-09-19 16:48:08 +03:00
Konstantina Galouni 46a8928a20 [Library | develop]: project.component.ts: [Bug fix] In method "getProjectInfo()", added this.projectInfo.id = this.projectId; - direct link action button was not working, id was missing. 2023-09-19 16:45:17 +03:00
Konstantina Galouni be187c3fed [Library | develop]: citation.class.ts: Updated bibtex to include case for type="software" - add @software instead of @misc. 2023-09-19 16:40:56 +03:00
Konstantina Galouni adae1f0749 [Library | develop]: searchProjects.service.ts: Added more checks if startdate and enddate properties exist in the response | entity-metadata.component.ts: Added "From" or "Until" before startYear and endYear respectively when only one of them exists in data. 2023-09-19 16:38:16 +03:00
argirok 82348a8a3b update manage projects page to use paging and search through new communities API 2023-09-19 15:59:37 +03:00
argirok 6958a8ef9b fix parameter for grant openaire access to Orcid 2023-09-18 12:23:33 +03:00
Konstantinos Triantafyllou a2f52cf40e Merge remote-tracking branch 'origin/develop' into angular-16 2023-09-15 15:18:49 +03:00
argirok fa2b14e9b4 fix status checks to avoid show list of errors when the job is still processing 2023-09-13 10:00:13 +03:00
Konstantinos Triantafyllou 11d0be4ffd Theme preview: Add inputs as fragment. Delete material icons from icons services 2023-09-12 18:41:22 +03:00
Konstantina Galouni 9b2524c1c7 Merge remote-tracking branch 'origin/develop' 2023-09-11 18:18:09 +03:00
Konstantina Galouni f679385725 [Library | develop]: transferData.component.ts: Keep data transfer modal open after transfer action, to show status of the transfer. 2023-09-11 18:08:34 +03:00
Konstantinos Triantafyllou 821c4242be Icon component: Add icon input in order to support Icon configuration. Extend Icon with type and preserveColor (optional). Add material-icons.ts with material icons metadata (icons per category). 2023-09-07 19:13:59 +03:00
argirok 741a70fa1c register the icons book, cog, database, earth in ResultLandingUtilsModule 2023-09-07 14:57:07 +03:00
argirok 6cd2e583c5 Merge branch 'develop' into new-claims-api 2023-09-07 11:37:50 +03:00
Konstantina Galouni 1a960061b6 [Library | develop]: landing-utils/fos.component.ts & fos/fos.component.ts: Removed environment check and always use foslabel parameter for search. 2023-09-06 14:55:29 +03:00
Konstantina Galouni 7709352f68 [Library | develop]: [Bug fix] searchDataproviders.service.ts: Added check if "datasourcetype" field exists in record. 2023-09-06 14:38:28 +03:00
Konstantinos Triantafyllou 31f42cfc71 Merge remote-tracking branch 'origin/develop' 2023-09-05 13:24:11 +03:00
Konstantina Galouni 35d287511b Merge remote-tracking branch 'origin/develop' into develop 2023-09-04 15:45:29 +03:00
Konstantina Galouni e6bdbb2c81 [Library | develop]: searchFields.ts: In RESULT_REFINE_FIELDS, query "foslabel" (instead of fos) field in all environments. 2023-09-04 15:45:06 +03:00
Konstantinos Triantafyllou 7650857186 Convert div - uk-toggle to a - uk-toggle for new Uikit. 2023-09-04 15:15:26 +03:00
Konstantina Galouni bad855089c [Library | develop]: resultLanding.component.html: Added check for message of non eosc results - do not show it in production environment until we get approval. 2023-09-04 14:46:25 +03:00
Konstantina Galouni fc2c58e3b9 [Library | develop]: fos.component.ts: [Bug fix] when on eosc explore, link of fos subjects to search page is external. 2023-09-04 14:38:51 +03:00
Konstantina Galouni 37208d82b6 [Library | develop]: transferData.component.ts: Set "overwrite": false & in method "validatePath()", removed regex and check only if path starts with / | transferData.component.html: Updated checks for path validation | resultLanding.component.ts: Added field public belongsInEOSC: boolean = false; and initialize it | resultLanding.component.html: Added message above title "This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud" when in EOSC portal, but result has no EOSC context. 2023-09-04 12:48:17 +03:00
Konstantinos Triantafyllou 2102dfb0d7 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-08-30 16:45:05 +03:00
Konstantinos Triantafyllou 6470331207 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-30 16:44:39 +03:00
Konstantinos Triantafyllou c292215ada Merge pull request 'Connect Admin release 30th August 2023' (#8) from develop into master
Reviewed-on: #8
2023-08-30 12:47:45 +02:00
Konstantinos Triantafyllou f2a2c52d43 Add default parameter in close canvas 2023-08-30 12:28:02 +03:00
Konstantinos Triantafyllou 1be082c2f3 Add hasStickyHeaderOnMobile in layoutService 2023-08-30 11:11:23 +03:00
Konstantinos Triantafyllou 55a995a348 Input: Date add calendar in mobile dropdown 2023-08-29 10:53:51 +03:00
Konstantina Galouni 1b989441db [Library | develop]: resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: In main action bar for mobile (landing-action-bar-mobile), replaced uk-background-default with uk-tile-default uk-blur-background. 2023-08-25 15:56:53 +03:00
Konstantina Galouni 2e33c470e9 [Library | develop]: [Bug fix] landing-utils/fos.component.ts & fos/fos.component.ts & fos/fos.component.html: Added methods "buildFosQueryParam()" and "buildFosHrefParam()" to build and set in fos links, search param "fos" for production and "foslabel" for beta or dev environments. 2023-08-24 18:31:04 +03:00
Konstantina Galouni 13d0430109 [Library | develop]: alert.ts & full-screen-modal.component.ts: Updated (h6 from h4 or h5) header font size and ratio of icons (make them smaller) - in angular 16 branch, paddings have also changed. 2023-08-24 18:20:49 +03:00
Konstantinos Triantafyllou 40ef950715 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-23 16:52:36 +03:00
Konstantinos Triantafyllou c658f6b63f Fix dropdown-filter where the mobile dropdown opens in Desktop too. 2023-08-23 16:52:21 +03:00
Konstantinos Triantafyllou 7906b056c9 Fix drops and dropdowns in avalableOn, result-preview and showAuthors 2023-08-23 16:42:52 +03:00
Konstantinos Triantafyllou befbfd071b Add xsmall padding in graph_elements instread of margins because of uikit upgrade 2023-08-23 11:43:07 +03:00
Konstantinos Triantafyllou c0d4fd8ae7 Fix uk-sticky parameters in terminology and search 2023-08-23 10:40:05 +03:00
Konstantinos Triantafyllou d9a8283630 Update to Uikit 3.16.24 2023-08-22 17:08:46 +03:00
Konstantina Galouni 587297a1c8 [Library & common-assets | develop]: Minor updates in mobile screens in icons/ paddings in landing pages.
1. resultLanding.component.html & project.component.html & dataProvider.component.html & organization.component.html: In mobile (small) screens, change ratio of icons in bottom action bar from 2 to 1.4.
2. showIdentifiers.component.ts: In mobile (small) screens, added in fs-modal classTitle="uk-tile-default uk-border-bottom".
3. landing.less: Added variable @landing-action-bar-mobile-border: @global-border; to use it in border-top of landing-action-bar-mobile > div | Changed padding of landing-action-bar-mobile > div to 8px in top and bottom.
2023-08-21 13:59:20 +03:00
Konstantinos Triantafyllou f34a501046 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-21 11:13:57 +03:00
argirok 36a2f54193 comment out test orcid works 2023-08-09 11:53:31 +03:00
argirok 038adf352a change the way my orcid links are shown. Group together multiple results from the index, add update button to each one of them 2023-08-09 11:52:30 +03:00
Konstantinos Triantafyllou 758f2f10ff Import transferState from angular/core 2023-08-04 14:45:41 +03:00
argirok f160aaa000 replace session.isLoggedIn() method 2023-08-03 13:02:59 +03:00
argirok 5c345d8ff7 show status also for direct index records job
on reload keep job ids and continue show progres until they finish
change get auth options method
2023-08-03 12:45:39 +03:00
Konstantinos Triantafyllou e7429881ca Delete a > in advanced form 2023-08-02 14:08:04 +03:00
Konstantinos Triantafyllou 51e3980179 Update angular to version 16 2023-08-01 14:29:27 +03:00
argirok 116ead698b Linking: check the claim field for its community before add it in the list of the communities that can be claimed. Allow all for connect and claim curators 2023-08-01 12:25:46 +03:00
Konstantinos Triantafyllou 3b6822c71f Update material to version 15 2023-08-01 11:40:55 +03:00
Konstantina Galouni a53c4e90d0 [Library | develop]: resultLanding.component.ts: Added ContextsService and call to get public communities, and then filter out contexts (related to communities) of resultLandingInfo if they are hidden. 2023-07-28 16:04:14 +03:00
argirok 8310eddd92 update check in portal search results 2023-07-28 13:15:46 +03:00
argirok 21c70d6d62 updated claims api: submit job and get status 2023-07-28 12:15:54 +03:00
argirok 4e3df67f7e Loading modal component: click on background not close the modal, fix mobile version conflicting with ng-content 2023-07-28 11:16:30 +03:00
Konstantina Galouni 682444a25b [Library | develop]: #8909 Added FAIRsharing in DEPOSIT about OpenAIRE compliant repositories. 2023-07-27 15:33:28 +03:00
Konstantina Galouni 6b2864ad02 [Library | develop]: entity-actions.component.ts & transferData.component.html & orcid-work.component.ts & resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Added "tooltips/messages" under the landing actions in mobile-small screens. 2023-07-27 15:28:40 +03:00
Konstantinos Triantafyllou 0a56d1fae6 Remove mobile-dropdown when navigation start from container. 2023-07-27 10:38:41 +03:00
Konstantinos Triantafyllou 056faac88f Add mobile-dropown in dropdown-filter. Fix input autocomplete in mobile. Fix icon alignment in fundedBy. Add scroll to top in fs-modal and on change tab in landing mobile bar. 2023-07-26 11:49:50 +03:00
Konstantinos Triantafyllou 0a79d2a17e MetricsService provided in root 2023-07-25 19:14:57 +03:00
Konstantinos Triantafyllou 86ba54c7d0 Fix mobile-dropdown open-close. Fix input in mobile. Add mobile-dropdown in availableOn, fundedBy, showAuthors. 2023-07-25 19:09:09 +03:00
Konstantina Galouni 6ecde003af [Library | develop]: [Bug fix from previous commit] string-utils.class.ts: Closing brackets correctly in getPIDFromIdentifiers method. 2023-07-25 13:31:26 +03:00
Konstantina Galouni 52fc9ce22a [Library | develop]: helper.class.ts: Added return false in method "isCurator()" as fallback | stakeholder.ts: Added return "" in methods "getFilter()", "getResultFilter()", "getProjectFilter()", "getOrganizationFilter()", "getCountryFilter()" as fallback | string-utils.class.ts: Added return null in method "getPIDFromIdentifiers()" as fallback. 2023-07-25 13:24:24 +03:00
Konstantina Galouni 27f644aad1 [Aggregator | develop]: In search bars, set in placeholder the portal name according to the configuration name.
1. home.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName.
2. portal.ts: Added parameter "name: string" in method "getMockCommunityInfo()" and set communityInfo.name = name;
3. aggregators.ts: In method "getCommunityInfoByMenuId()", added "name" parameter in Portal.getMockCommunityInfo() | Updated titles in PortalAggregators>AggregatorInfo.
2023-07-24 19:56:51 +03:00
Konstantina Galouni 901855daa9 [Library | develop]: In search bars, set in placeholder the portal name according to the configuration name.
1. home.component & navigationBar.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName.
2. searchAll.component.ts: Set default value of "formPlaceholderText" to "Search".
3. advancedSearchForm.component.html: Set placeholder of input (when there is also the <entities-selection>) to [placeholder]="formPlaceholderText".
2023-07-24 16:25:20 +03:00
Konstantinos Triantafyllou 914e2a22bb Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-21 16:33:37 +03:00
Konstantinos Triantafyllou 8c2cb847e9 Advanced Search: Don't clear value on field changed if the field type is keyword 2023-07-21 16:33:29 +03:00
Konstantina Galouni b18cfcf533 [Library | develop]: resultLanding.component.html & resultLanding.component.ts & transferData.component.html & transferData.component.ts: In desktop view, reverted data transfer modal to normal instead of full screen & small fixes for action icon and modal view | aligned "Go to search" back button with the rest of the page contents. 2023-07-20 17:06:46 +03:00
Alex Martzios 73d6a9f32f landing mobile: view all modal for FoS & SDGs. update how they appear 2023-07-20 11:50:10 +03:00
Konstantinos Triantafyllou d6cc4d4e42 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-19 19:52:05 +03:00
Konstantinos Triantafyllou f7d8490e43 Stakeholder: Add projectUpdateDate. Input: Add date type. 2023-07-19 19:51:54 +03:00
Konstantina Galouni a7e32a2a65 [Library | develop]: searchDataproviders.service.ts: In method "getDataproviderType()", add check for datasourcetype field. 2023-07-19 17:38:19 +03:00
argirok ff49c02a52 add fields claim and membership 2023-07-19 14:25:23 +03:00
Konstantinos Triantafyllou f9dcdd81cc Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-19 14:09:43 +03:00
Konstantinos Triantafyllou 584f1d22f8 Slider tabs: Fix initialization. 2023-07-19 14:09:10 +03:00
argirok c8c5e2d925 use methods isPublic, isRestricted, isPrivate instead of using the previous checks and add validateStatus method 2023-07-19 12:57:28 +03:00
Alex Martzios 39876e4ce6 landing & search: match top row info between the 2 as much as possible 2023-07-19 12:20:49 +03:00
Konstantinos Triantafyllou 2b7c5da3d7 Input: Add * for required fields with type array. Scroll to top in open of a modal. 2023-07-18 15:27:02 +03:00
argirok 7354d0ad55 update status field values with PUBLIC, RESTRICTED, PRIVATE
add methods isPublic, isRestricted, isPrivate instead of using the previous checks
2023-07-18 14:26:12 +03:00
Konstantinos Triantafyllou 9855f5c179 Slider-tabs: Add template in slider-tab instead of title. Change tabs in search-all with slider-tabs. 2023-07-18 13:20:04 +03:00
Konstantinos Triantafyllou 4700cc82c8 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-17 12:40:40 +03:00
Konstantinos Triantafyllou 3e12962add Fix intersaction Observer in fos-selections. 2023-07-17 12:40:30 +03:00
Konstantinos Triantafyllou 55a0454330 Input: Fix errors when searchInput doesn't exists. 2023-07-14 18:27:16 +03:00
argirok 1355f2cdb5 remove get communities services - available in community profile
update search in projects size and fix count query
2023-07-14 13:57:31 +03:00
argirok 3ee4129c7e apply initial changes to library bases on new community API 2023-07-14 11:40:38 +03:00
Konstantinos Triantafyllou 5645deec97 Change portal client-management to developers 2023-07-13 18:39:26 +03:00
Konstantinos Triantafyllou 2f98910712 Mock portal: Enable services. 2023-07-13 14:18:17 +03:00
Konstantinos Triantafyllou 8b57fae585 Add static configuration in configuration service 2023-07-13 13:44:19 +03:00
Konstantinos Triantafyllou 46b3e937bf Configuration service: init null if doesn't exist. 2023-07-13 12:21:35 +03:00
Konstantinos Triantafyllou 2312c5356b Remove a --> from search form. 2023-07-13 11:47:55 +03:00
Konstantinos Triantafyllou 78f87e61bb Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-07-13 10:41:00 +03:00
Konstantina Galouni 870ce71897 [Library & common-assets | develop]: [WIP] dataProvider.component.html & project.component.html & resultLanding.component.html: Removed "uk-card uk-card-secondary" classes from metrics box and commented badge icon | metrics-badge.svg: Changed badge color to white (used to be orange - Explore specific) | landing.less: Updated class ".landing-metrics-card" to use background-blend-mode: color-dodge for svgs in landing metrics box. 2023-07-12 17:22:45 +03:00
Konstantinos Triantafyllou 5d6fa99a73 Piwik service: Change map to switchMap in order to return the observable. 2023-07-12 16:24:23 +03:00
Konstantinos Triantafyllou 37b7423e7f Simplify piwik logic: All work is done in piwik.service. 2023-07-12 15:05:25 +03:00
Konstantinos Triantafyllou 50422c0ab3 Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-07-12 13:56:18 +03:00
Konstantinos Triantafyllou 1785da3c45 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-11 16:03:14 +03:00
Konstantinos Triantafyllou 9760ebab2e Create mobile-dropdown component and use it in Inputs. Change height to min-height in full-screen-modal and in cite-this. 2023-07-11 16:03:08 +03:00
Konstantina Galouni 5f980c01bb [Aggregator | develop]: search.component.ts: Added in <search-all> input [openAccess]="false" | searchAll.component.ts: Added @Input() openAccess: boolean = true; and add "resultbestaccessright" parameter in queries if this is true | home.module.ts: Imported SearchInputModule | home.component: In search bar, remove 2 steps, go to search all page and add advanced search link. 2023-07-11 15:11:37 +03:00
Alex Martzios ae68622fb6 landing & search: add label for authors row 2023-07-11 12:59:43 +03:00
Konstantina Galouni 110c854523 [Monitor Dashboard & Library | develop]: search.module.ts: Set in landing routes data: {hasMenuSearchBar: true} to show search bar in menu. | navigationBar.component.ts: If properties.searchLinkToAll is undefined, navigate to properties.searchLinkToAll from menu search bar. 2023-07-07 10:53:10 +03:00
Konstantinos Triantafyllou 3aee0bcca2 Contact us: Change class of inputs to flat 2023-07-06 20:01:27 +03:00
Konstantinos Triantafyllou 87e75bca00 Navigation Bar: Remove link and routes from parent items in mobile-menu. Add search-input in mobile menu. 2023-07-06 16:57:40 +03:00
Konstantinos Triantafyllou 2c7e3794c5 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-06 16:29:25 +03:00
Konstantinos Triantafyllou 201792b0e3 Landing tabs: Add border-left and radius-left, reduce gutter between sections and align section content with Tab name. 2023-07-06 16:29:17 +03:00
Konstantina Galouni 8b14aaf325 [Monitor & Library | develop]: [Bug fix] Refactor code for showing help button or not.
1. quick-contact.service.ts: Initialize display to true (assume it is not intersecting, otherwise in pages without this section, it can't be initialized correctly).
2. home.component.ts: Removed field "showQuickContact" | In constructor set quickContactService.setDisplay(false) | Refactor intersectionObserver.
3. app-routing.module.ts: In "contact-us" route, set data: {hasQuickContact: false}.
4. app.component.ts: Updated checks for <quick-contact> | Added public showQuickContact: boolean; to be initialized by layoutService.hasQuickContact.
2023-07-06 15:28:53 +03:00
Konstantinos Triantafyllou 76cb586ebd Add foslabel in searchFiles only for beta, dev. Change eoscifguidelines to refine. Input fix double icon in select with many values. 2023-07-06 12:53:37 +03:00
Konstantina Galouni ea1b054b63 Merge pull request 'Merging explore-redesign branch into develop for Explore July release' (#7) from explore-redesign into develop
Reviewed-on: #7
2023-07-05 11:11:52 +02:00
Konstantina Galouni 13b7f90707 Forgot to add in previous commit composer.ts file - bug fix in imports 2023-07-05 11:41:42 +03:00
Konstantina Galouni a6dee41979 Merging 'develop' branch into explore-redesign. 2023-07-05 11:40:43 +03:00
Konstantina Galouni 8029aafb36 [Library & common-assets | explore-redesign]: addThis.component.ts: Replaced addthis external library with addtoany - addthis is no longer supported | general.less: css for addtoany social icons (classes .fully_rounded .a2a_svg). 2023-07-04 19:12:34 +03:00
Konstantina Galouni 2fa4c9e810 [Library | explore-redesign]: dataProvider.service.ts & dataProvider.component.ts: Added method "getCollectedFulltexts()" in service and component to get and parse number of collected fulltexts from a new stats api - commented/ API is still in dev. 2023-07-04 19:10:15 +03:00
Konstantinos Triantafyllou 4bec610237 Resource Service: Add target for links in resources. 2023-07-04 14:20:50 +03:00
Konstantinos Triantafyllou e9a62e1f61 Add ResizeObserver disconnect in terminology page. 2023-07-04 12:02:54 +03:00
Konstantinos Triantafyllou aa10b35f7a Fix ResizeObserver condition in landings and fs-modal 2023-07-04 11:53:08 +03:00
Konstantinos Triantafyllou 0b79af31e0 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-07-04 11:08:47 +03:00
Konstantinos Triantafyllou 18b5ce2201 Fix bodyHeight in full screen modal. 2023-07-04 11:08:39 +03:00
Alex Martzios 7e5317e920 redesign linking results (cards) to match the new style, fix a css selector for SDG page 2023-07-04 10:16:08 +03:00
Konstantinos Triantafyllou e82bbf7968 Merge from develop 2023-06-30 14:58:10 +03:00
Konstantinos Triantafyllou aabd28d1f1 Fix disabled color for labels 2023-06-30 14:54:25 +03:00
Konstantinos Triantafyllou 94957fff61 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-30 14:40:06 +03:00
Konstantinos Triantafyllou 715069eabc Remove logs from reload. Add url variable in order to handle error from guards with the connect path. 2023-06-30 14:39:48 +03:00
Konstantinos Triantafyllou c1b1d2e4ec Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-29 13:27:59 +03:00
Konstantinos Triantafyllou e3d26f138d Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-29 10:20:39 +03:00
Konstantinos Triantafyllou 4b845dd0bd Customization: Fix checkForObsoleteVersion to return null for connect. 2023-06-29 10:20:29 +03:00
Konstantinos Triantafyllou 5dfdbdc164 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-28 15:27:15 +03:00
Konstantinos Triantafyllou 1ec8477053 FOS: Change OpenAIRE Research Graph to OpenAIRE Graph. 2023-06-28 14:39:31 +03:00
Konstantinos Triantafyllou 21fde9cbac Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-28 11:18:23 +03:00
Konstantinos Triantafyllou 2ef5d069dd Merge remote-tracking branch 'origin/master' into develop 2023-06-27 13:04:23 +03:00
Konstantinos Triantafyllou d80820fb52 Update wrong URL for helpdesk in footer 2023-06-27 13:04:08 +03:00
Konstantinos Triantafyllou 8d8eda416b Update New Manager message base on #8687 2023-06-27 12:08:58 +03:00
Konstantinos Triantafyllou 23a47cc5da Merge develop into stats-profile 2023-06-26 15:25:47 +03:00
Konstantinos Triantafyllou 0face4b57f Fix an undefined error in searchInput of Input component. Add multi emails in invitation of manager and members and optimize subscriber invite. 2023-06-26 15:09:37 +03:00
Konstantinos Triantafyllou 7d2eb68914 Add refreshToken and accessToken in userInfo. Add property for clientManagementAPI. Create jsonValidator 2023-06-26 11:31:22 +03:00
Konstantinos Triantafyllou 690226b031 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-23 15:57:10 +03:00
Konstantinos Triantafyllou 56428d0dae Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-23 15:25:24 +03:00
Konstantinos Triantafyllou 633716b832 Add progress circle as example in theme component 2023-06-23 15:25:17 +03:00
Konstantina Galouni 558357b03e [Library | develop]: full-screen-modal.component.ts: [Bug fix] Removed uk-invisible class from ok and cancel buttons section (wrong check and buttons never appeared) & Added uk-disabled class in back link. 2023-06-22 16:48:10 +03:00
argirok db55273b68 Merge remote-tracking branch 'origin/develop' into develop 2023-06-19 11:24:39 +03:00
argirok 38bc33251f update checks for fontsDarkMode 2023-06-19 11:04:26 +03:00
Konstantina Galouni 58b45d9595 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-19 11:03:15 +03:00
Konstantina Galouni 1307b4d290 [Library | develop]: transferData.component: Removed "demo" label from data transfer. 2023-06-19 11:02:23 +03:00
Konstantinos Triantafyllou 074fd93ea0 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-16 10:03:07 +03:00
Konstantinos Triantafyllou 8a22f2a8ad Add sources of number indicators in timeout_whitelist in order to avoid timeout error in these requests. 2023-06-14 15:10:49 +03:00
Konstantina Galouni c2db5e77ee Merge pull request 'data-transfer-v2' (#6) from data-transfer-v2 into develop
Reviewed-on: #6
2023-06-13 16:20:04 +02:00
Konstantinos Triantafyllou b6ead8d7e2 Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-06-09 21:02:12 +03:00
Konstantinos Triantafyllou f81f6d051e Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-09 20:52:40 +03:00
Konstantinos Triantafyllou aa54090c5a Add locale in number pipes and stakeholder. 2023-06-09 20:52:10 +03:00
Konstantinos Triantafyllou a37662cd7e Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-06-08 11:31:27 +03:00
Alex Martzios 1d31c7b234 landing pages: add check if landingInfo is initialized 2023-06-08 10:55:12 +03:00
Konstantinos Triantafyllou 0f265f435b Add emal composer for cache indicators report. Move parse userinfo from user-management service to helper. 2023-06-07 14:22:14 +03:00
Alex Martzios 8f492223d0 search page - results: add mobile actions, display authors and pids (but not in "other versions" section 2023-06-07 11:09:43 +03:00
Konstantinos Triantafyllou 4e91d169e0 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-29 15:25:23 +03:00
Konstantina Galouni 412ed213fe [Library | explore-redesign]: Bug fixes in what is executed when tabs of search all are clicked - formPlaceholderText and simpleKeywordChanged().
1. searchAll.component.ts: [Bug fix] From previous commit - Set formPlaceholderText outside if condition.
2. advancedSearchForm.component.ts: [Bug fix] In method "simpleKeywordChanged()", do not check for selectedEntity when !this.entitiesSelection (selectedEntity is changed only when exists <entities-selection>.
2023-05-19 19:09:37 +03:00
Konstantina Galouni a296f091bb [Library | explore-redesign]: Bug fix in sticky tabs of search all | Updated formPlaceholderText of search form in search all - different for each entity | Search form not sticky in advanced search page.
1. searchAll.component.ts:
   a. [Bug fix] Subscribe to layoutService.isMobile and calculate there the "offset" (for sticky tabs).
   b. Updated "formPlaceholderText" - different for each entity.
2. newSearchPage.component.html: Added check, so that search form is not sticky in advanced search pages.
2023-05-19 17:49:38 +03:00
Konstantina Galouni 9856805621 [Library | explore-redesign]: Fixes in usage counts iframes, bip iframe, orcid buttons in search results, filters button in small screens and fos/sdgs vocabulary calls.
1. dataProvider.component.html & project.component.html & resultLanding.component.html: [Bug fix] Updated checks for usage counts iframes and changed the order they appear (first views, then downloads).
2. dataProvider.component.ts & project.component.ts:
   a. [Bug fix] Added fields public hasViews: boolean = false; and public hasDownloads: boolean = false; - used in checks for displaying usage counts iframes.
   b. [Bug fix] Updated parsing of dataProviderInfo.measure.counts when querying external usage counts api.
3. resultLanding.component.ts:
   a. [Bug fix] Added fields public hasViews: boolean = false; and public hasDownloads: boolean = false; - used in checks for displaying usage counts iframes.
   b. [Bug fix] In bipFrameUrl, when environment == "beta", add "&src=beta" parameter.
4. orcid-work.component.ts:
   a. [Bug fix] Updated disabled class checks, to enable orcid buttons in search too when there are identifiers.
   b. When loading - action is in progress, show loading icon next to the label.
   c. In my orcid links page: renamed "Add to ORCID" to "Claim" and "Delete from ORCID" to "Remove".
5. newSearchPage.component.html: [Bug fix] Updated checks for "filters" floating button in mobile/ small screens.
6. Added method "detectChanges()" to be called by html.
7. navigationBar.component.html: Updated placeholder of search-input to align with the generic search form (Home page).
8. ISVocabularies.service.ts: [Bug fix] In methods getFos() and getSDGs(), removed check and call to cache - these files are always local.
2023-05-19 14:37:23 +03:00
Alex Martzios 6a009aa76e organization landing: fix for when there are no other versions, the grid divider appeared 2023-05-19 11:32:02 +03:00
Konstantina Galouni 2d0f29d040 [Library | explore-redesign]: Hide numbers of entity tabs on mobile screens | Bug fix in search filters.
1. searchFilter.component.ts: [Bug fix] In method "filterKeywords()", set hasMatch and call detectChanges(), only if !hasMatch.
2. searchAll.component.html: Hide numbers of entity tabs on mobile screens.
2023-05-16 14:29:31 +03:00
Konstantinos Triantafyllou 2ca9f0bdd4 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-16 13:17:56 +03:00
Konstantina Galouni bda90f2c38 [Library | explore-redesign]: Bug fixes in range filter, advanced search link of search all page, search results "cards" in mobile screens.
1. rangeFilter.component: [Bug fix] Removed from method get disabled() check of isDisabled and added this check for class "disabled" in action/button (error on enter, because isDisabled was already true before triggering the action of yearChanged).
2. search-input.component.ts: [Bug fix] Added check for client side in ngAfterViewInit(), before calling "getComputedStyle".
3. searchAll.component:
   a. Set "advancedSearchLink" properly and pass it to each search entity page in "simpleSearchLink" parameter.
   b. In <advanced-search-form>, pass parameters [entityType]="activeEntity" and [advancedSearchLink]="advancedSearchLink" [advancedSearchLinkParameters]="parameters".
4. advancedSearchForm.component.html: Removed check this.entityType == this.selectedEntity from advanced search link.
5. searchFilter.component.ts: In filterKeywords() method, added cdr.detectChanges().
6. searchResult.component.html: [Bug fix] Reverted [isMobile] parameter to <result-preview" (removed by mistake in a previous merge).
2023-05-16 12:28:35 +03:00
Konstantinos Triantafyllou 53d3afefd1 Merge remote-tracking branch 'origin/develop' into explore-redesign 2023-05-16 11:12:28 +03:00
Konstantina Galouni 98cae9dcb8 [Library & Explore | explore-redesign]: Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph" | Fixed duplicate queries in search all | Updated paper in FoS page | Improvements in sticky tabs (search all & landing).
1. Deleted assers/explore-assets/home/graph.svg - Replaced by assets/common-assets/common/graph-nodes.svg.
2. home.component.html:
   a. Updated graph image.
   b. Added in <div search-input>: [searchInputClass]="'inner background'".
   c. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
3. claimResultSearchForm.component.html & searchDataprovidersToDeposit.component.ts: Added in <div search-input>: [searchInputClass]="'inner background'".
4. searchAll.component.html:
   a. Updated margins/paddings for sticky tabs.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
5. searchAll.component.ts:
   a. [Bug fix] In method ngOnInit(), moved loadAll() call inside check - avoid duplicate calls to search for each tab with count query.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
6. fos.component.html:
   a. Updated paper of SciNoBo - replaced the old one with the newest.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
7. fos.component.ts: Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
8. resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: [Improvement] Updated check and class for <landing-header> when sticky - make it invisible, when not sticky - solved flickering and change of content position.
9. showTitle.component.ts: Added @Input() isSticky: boolean = false; and when sticky, show only 1 line of the title (class lines-1).
10. landing-header.component.ts: Show only title when sticky and pass isSticky to <showTitle>.
2023-05-15 17:28:33 +03:00
Alex Martzios 402e61324a roject & datasource landing: if the API call does not include usagecount measures, use old metrics service call 2023-05-15 13:09:45 +03:00
Konstantina Galouni e07891e4fa [Library | explore-redesign]: Moved <quick-selections> to the left as filter and re-arranged the order of the filters.
1. searchFields.ts:
   a. Added in HIDDEN_FIELDS, "instancetypename" (refine filter for research products).
   b. In DEPENDENT_FIELDS, set ["instancetypename"]: "type"
2. quick-selections.component.ts: Added again (as in the past), @Input() vertical: boolean=false and show types using <search-filter> if vertical is true.
3. searchAll.component.html: Changed medium top and bottom margins to uk-margin-top uk-margin-bottom.
4. newSearchPage.component.ts:
   a. In method "getFields()", check for HIDDEN_FIELDS, also dependencies to resultTypes.
   b. Added method "getFilterById()".
5. newSearchPage.component.html:
   a. Moved <quick-selections> to the left as filter (removed "include" line).
   b. Added <ng-template #search_filter> and re-arranged the order of the filters
2023-05-12 18:52:13 +03:00
Konstantinos Triantafyllou 5e4477c946 Range-filter: Add background modifier in input 2023-05-12 18:06:10 +03:00
Konstantinos Triantafyllou bfd1bc3f0b Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-05-12 17:25:20 +03:00
Konstantinos Triantafyllou 416a15e3d0 Add background modifier in search-input in order to add background in search-icon. 2023-05-12 17:25:14 +03:00
Konstantinos Triantafyllou 123f355344 Input: Extend enter - before unfocus. Range-Filder: Add on enter method, in order to change year range on search. 2023-05-12 17:24:27 +03:00
Alex Martzios 29723188bc resultLanding: in versions modal, expand authors instead of opening them in a new modal 2023-05-12 15:55:22 +03:00
Alex Martzios 53d8440171 fix bug in landing: when navigating from result to result, if they all have "Related Research" tab and selection input, options of the selection are not re-initialized 2023-05-12 14:00:34 +03:00
Konstantina Galouni 10178c5adb [Library | explore-redesign]: linkingGeneric.component: For direct linking, updated back button - trigger browser's back, not landing, since we can reach this page via search results too. 2023-05-11 22:46:28 +03:00
Konstantina Galouni aef1a25a82 [Library & openaire-theme & Explore | explore-redesign]: Added search form in menu (navbar) in landing pages.
1. search.less: Added css for modifier .small-vertical for .input-wrapper of <search-input>.
2. layout.service.ts: Added hasMenuSearchBarSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false), parsing and getter/setter methods.
3. navigationBar.module.ts: Imported SearchInputModule.
4. navigationBar.component.ts:
   a. Added searchMode: boolean = false; and hasSearchBar: boolean = false; (and other helpful fields)
   b. Subscribe to queryParams to hide search bar and reset keyword | Subscribe to layoutService.hasMenuSearchBar to check if search should be included in navbar or not.
   c. Added methods "openSearch()" to show the search form and "goTo()" to trigger the search action and navigate to the search page.
5. navigationBar.component.html: Added <div search-input> and search-icon button to show search bar | Added checks if searchMode is enabled (search form visible) or not.
6. app-routing.module.ts: In routes for landing pages added in data: hasMenuSearchBar: true.
2023-05-11 17:17:16 +03:00
Alex Martzios cf42f3a122 search page: make tabs (entities) sticky on scroll 2023-05-11 12:42:28 +03:00
Alex Martzios aca0de0fc1 search page: delete 'active' param 2023-05-11 10:56:45 +03:00
Alex Martzios a9e8a5c25a change regex for redirecting old paths to the new ones 2023-05-10 16:35:20 +03:00
Alex Martzios 619dd3c9fa search page: remove all various search pages and keep only 'search all' - TODO: redirect old ?active=<entity> to the new path 2023-05-10 15:10:00 +03:00
Konstantinos Triantafyllou 389179540d Merge remote-tracking branch 'origin/develop' into explore-redesign 2023-05-10 11:54:09 +03:00
Konstantinos Triantafyllou 1af14e068d Change range-filter with new year-range input and add messages in the validators. 2023-05-10 11:51:59 +03:00
Konstantina Galouni 128c03c671 Merged develop branch into explore-redesign 2023-05-09 19:04:06 +03:00
Konstantina Galouni ef742be1b2 [Library | explore-redesign]: Added/ updated how filters appear in mobile screens | Updated search forms.
1. general.less: Added fixed position for .filters-toggle-button.
2. newSearchPage.component.html: Added floating button for filters in mobile screens.
3. advancedSearchForm.component.html: Re-introduced commented out <entities-selection> inside <advanced-search-input> | Removed iconPosition and commented button for filters inside search form.
4. home.module.ts: Imported SearchInputModule.
5. home.component.html: Replaced <advanced-search-input> with <div search-input>
6. searchDataProviders.component.ts: Set entitiesSelection to false for <new-search-page>
7. newSearchPage.component.ts & searchAll.component.html: Set entitiesSelection to false for <advanced-search-form>
2023-05-08 17:10:51 +03:00
Konstantina Galouni 2963589359 [Library | explore-redesign]: availableOn.component.ts & resultLanding.component & result-preview.component: [Bug fix] Added method "getAccessLabel()" to create label from accessRight. 2023-05-08 16:41:42 +03:00
Konstantina Galouni e8d57386f3 [Library | explore-redesign]: Updated icon for "not available" access of sources on research products.
1. icons.ts: Added custom icon "unknown_access", when access is not available (locker with questionmark inside).
2. parsingFunctions.class.ts: Set "accessRightIcon" of each source to "unknown_access" icon, when access is not available.
3. resultLandingUtils.module.ts: Added "unknown_access" icon in iconsService.registerIcons.
4. resultLanding.component.html: Mobile view: Updated tooltip of access - added "access" word in the end.
5. availableOn.component.ts: Updated tooltip of access - added "access" word in the end.
6. result-preview.component.html: In mobile view, show access on the top right, next to the title.
7. searchResearchResults.service.ts: [Bug fix] Call parsingFunctions.addPublisherToHostedBy_collectedFrom after parsing journal, publisher and identifiers.
2023-05-08 10:53:38 +03:00
Konstantina Galouni e4ca050d80 [Library | explore-redesign]: showAuthors.component.ts: Added class "uk-text-italic" when displaying authors (not in modal) to make them more obvious among other info of the result. 2023-05-08 10:32:45 +03:00
Konstantinos Triantafyllou 2d01e7f945 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-05 17:07:11 +03:00
Alex Martzios 87c91e23fb project & dataProvider landing: use ngFor loop on the measure.counts arrays to display the correct measures 2023-05-04 15:15:47 +03:00
Alex Martzios b500fcb957 resultLanding: use common structure for metrics (measure) 2023-05-04 11:58:11 +03:00
Konstantinos Triantafyllou 3b45f2ccb5 Merge branch 'develop' into stats-profile 2023-05-02 18:08:58 +03:00
Konstantinos Triantafyllou 52efae94e7 Delete console log 2023-05-02 14:24:08 +03:00
Alex Martzios 8a8a7e4152 fix an error for results without FoS 2023-05-02 12:47:49 +03:00
Alex Martzios 84bd4b24b8 search page: advanced-search > remove number of rules applied in search bar and moved them above the results 2023-05-02 12:11:25 +03:00
Alex Martzios beb43ed1b7 project & data landing/search page: get usage counts from index (measure field) 2023-05-02 12:00:40 +03:00
Konstantinos Triantafyllou e168143375 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-04-27 16:28:48 +03:00
Konstantinos Triantafyllou 49e2edfe84 Change piwik service methods in order to get the piwik from portal configuration 2023-04-26 14:10:45 +03:00
Alex Martzios 2d8be41146 search page: group time filters (e.g projects -> startdate, enddate, activewithin) 2023-04-26 12:28:37 +03:00
Konstantinos Triantafyllou d9d69031c8 Delete Stats Profile. Fix input autocoplete reset value on search. 2023-04-25 15:20:33 +03:00
Alex Martzios d69b0d0bb5 resultLanding: remove numbers from FoS
FoS page: remove numbers from 3rd level only
2023-04-25 13:02:33 +03:00
Konstantinos Triantafyllou f00607f8d3 Merge branch 'develop' into stats-profile 2023-04-24 12:45:31 +03:00
Alex Martzios 7ef9869629 search page: cite this > parse missing information (to match landing page) 2023-04-21 13:37:19 +03:00
Konstantinos Triantafyllou aa86ee0fe3 Add entity-actions in all landing pages 2023-04-21 12:49:14 +03:00
Alex Martzios dd6f18db52 search page: simplify search bar - remove 2 steps 2023-04-21 11:04:43 +03:00
Konstantinos Triantafyllou a49970aca6 Add number percentage pipe. Add format field in indicatorPath 2023-04-18 15:26:41 +03:00
Konstantinos Triantafyllou e88bb206dc Add statsProfile field in stakeholder 2023-04-12 17:59:04 +03:00
Konstantinos Triantafyllou 6a2ac8cc4e Add stats profile entity class. Add stats profiles in admin tabs 2023-04-11 01:28:53 +03:00
Alex Martzios 51d50cf331 landing page: fix the check when there is nothing to show in the right column 2023-04-10 14:06:37 +03:00
Alex Martzios f641624b32 search page: show the search term in the title, above results 2023-04-10 11:51:18 +03:00
Alex Martzios d6edc17fee add subjects as a new tab in resultLanding 2023-04-06 12:46:50 +03:00
Konstantina Galouni e1b5f4a46d Library | explore-redesign: Merging develop branch into explore-redesign 2023-04-06 12:06:12 +03:00
Alex Martzios 5bfc4d8f22 fix z-index problem with tooltip in metrics box, add message for no match in filter-search, removed access mode 'not available' question-mark icon from search page and landing 2023-03-31 13:28:35 +03:00
Alex Martzios 6679e6bac0 restrict result title in 3 rows for search page and 5 rows for landing page (included tooltip for landing) 2023-03-28 11:37:44 +03:00
Alex Martzios a356a08d67 create new tooltips for metrics in metrics cards and tabs - landing pages 2023-03-27 16:32:41 +03:00
Alex Martzios 932aaff111 changes for tooltips between landing and search pages, set a maximum height for 'download-from' dropdown, fix in fos-selection component 2023-03-27 13:03:07 +03:00
Konstantina Galouni 2ccde6fba4 [Library | explore-redesign]: result-preview.component.html: [Bug fix] Added [relationName]="relationName" [provenanceAction]="provenanceAction" in <entity-metadata> to expose these info in Related Research in Result landing pages. 2023-03-16 13:57:33 +02:00
Konstantinos Triantafyllou 31bf756092 Delete fos and sdgs deprecated folders 2023-03-02 16:22:18 +02:00
Konstantinos Triantafyllou 88157b943e Merge branch 'master' into explore-redesign 2023-03-02 16:21:14 +02:00
Konstantinos Triantafyllou 00081e2d1b Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-03-02 16:18:39 +02:00
Konstantinos Triantafyllou 187c22eb9d Rename fos and sds selections to deprecated 2023-03-02 16:17:00 +02:00
Alex Martzios 8096c20e2d fix for displaying countries in results landings, fix for journal init in dataProviders landing, redesign mobile view for dataProviders landing 2023-03-01 16:49:42 +02:00
Konstantina Galouni 2edeb788e3 [Library | explore-redesign]: Fixes in direct linking - back button link | Added back button link to the landing page for projects.
1. linkingGeneric.component.html: [Bug fix] Updated checks for back to result landing page button link | Added back to project landing page button link.
2. directLinking.component.ts: In "createClaimEntity()" method, set value of entity.project.url.
3. ClaimEntityTitle.component.ts: Added "uk-flex" class to middle align icon to the name.
4. claimHelper.class.ts: Commented a console.log.
2023-03-01 11:59:48 +02:00
Alex Martzios 67714f6ac4 redesign project landing for mobile view, add embed tooltip for entity-actions component and project landing, minor fix for resultLanding metrics tab 2023-02-23 13:09:42 +02:00
Konstantina Galouni 44825c5985 [Library | explore-redesign]: In small screens (mobile) open full screen modal when viewing all authors or all identifiers.
1. showAuthors.module.ts: Imported FullScreenModalModule.
2. showAuthors.component.ts & showIdentifiers.component.ts: Added @Input() isMobile: boolean = false; | Added <fs-modal> for view all authors, to trigger it when isMobile.
3. landing-header.component.ts: Added @Input() isMobile: boolean = false; | Pass input param isMobile to <showAuthors>.
4. resultLanding.component.html: Pass input param isMobile to <showSubjects>, <showIdentifiers>, <landing-header>.
2023-02-22 23:13:46 +02:00
Konstantinos Triantafyllou 3b9d585da1 Fix pageing and downloads alignemnt in mobile 2023-02-22 16:43:51 +02:00
Konstantinos Triantafyllou fb55c9483d Remove width class from link to tooltip, added by mistake in entity-actions 2023-02-22 14:55:19 +02:00
Konstantinos Triantafyllou 63b466fdaf 1. Fix uk-drop in available on. 2. Entity metadata: Add bullet with css in order to avoid empty content. 3. Add Deposit and embed in actions of entity-actions. 2023-02-22 14:43:31 +02:00
Konstantina Galouni f0f1874039 [Library | explore-redesign]: resultLanding.component.html: Small fixes on how impact and usage metrics (inside tab) appear in mobile | dataProvider.component.ts: Updated checks in hasMetrics() - do not show metrics until we get the response for views and downloads. 2023-02-22 02:23:10 +02:00
Konstantina Galouni 4aa350ff2b [Library | explore-redesign]: Mobile redesign for organization landing complete and functional.
1. loadingModal.module.ts: Imported LoadingModule.
2. loading.component.ts:
   a. [Bug fix] loading icon (spinner) was not visible.
   b. Added inputs title: string, @Input() isMobile: boolean = false, @Input() classTitle: string = "uk-background-primary uk-light".
   c. Added html for small screens (mobile) when isMobile.
3. search-tab.component.ts: Added @Input() public isMobile: boolean = false and [class.uk-flex-column]="isMobile" to not show title and view all link in the same row when isMobile.
4. organization.module.ts: Imported FullScreenModalModule.
5. organization.component.ts & organization.component.html: Mobile redesign complete and functional.
2023-02-22 00:09:12 +02:00
Alex Martzios be1a0ac7fa update tooltips for metrics and action-bar items 2023-02-21 19:13:15 +02:00
Konstantina Galouni 44e521cc8e [Library | explore-redesign]: Mobile redesign minor fixes for actions icons.
1. availableOn.component.ts: Make "arrow_right" and access right icons bigger in for mobile.
2. resultLanding.component.html: Set same ratio in all actions icons.
3. orcid-work.component.ts: Add margin small (not xsmall) when isMobile and landing.
2023-02-21 17:07:23 +02:00
Konstantina Galouni f9ff62f188 [Library | explore-redesign]: Mobile redesign for the 3 buttons at the bottom (main info, metrics, actions) and their contents.
1. availableOn.component.ts: Mobile redesign - open in full screen modal instead of drop | icons updated.
2. fos.component.ts: In mobile show {{title}} instead of hardcoded title.
3. resultLandingUtils.module.ts: Imported FullScreenModalModule.
4. deletedByInference.component.ts: Removed class "uk-list-divider" for <result-preview> - after redesign each result has its own bottom border.
5. orcid.module.ts: Imported FullScreenModalModule.
6. orcid-work.component.ts: Mobile redesign - Added full screen modals propagationFsModal and grantFsModal.
7. resultLanding.component.ts: Added citeFsModal, addThisFsModal, alertModalDeletedByInferenceFS and property public mobileContent: "info" | "metrics" | "actions" = "info".
8. resultLanding.component.html: Mobile redesign for the 3 buttons at the bottom (main info, metrics, actions).
2023-02-21 16:10:21 +02:00
Konstantinos Triantafyllou 256f8162e6 Full screen modal: Change title and icons size on mobile 2023-02-21 15:14:25 +02:00
Alex Martzios 3b962dc0e5 create mobile view structure for organization landing, add @media rules for project and dataProvider landing, change size of result title 2023-02-21 15:06:28 +02:00
Konstantina Galouni 2806515d31 Merge remote-tracking branch 'origin/explore-redesign' into explore-redesign 2023-02-21 03:01:47 +02:00
Konstantina Galouni 3a18403a0e [Library | explore-redesign]: fundedBy.component.ts & relatedTo.component.ts: In view more/less links added class "uk-link-text". 2023-02-21 03:01:21 +02:00
Konstantina Galouni d970153d41 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-02-21 02:49:19 +02:00
Konstantina Galouni 6a34caf096 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-02-21 02:48:19 +02:00
Konstantinos Triantafyllou fc9e77b887 [Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields.
1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename.
2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked).
3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label.
4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe.
5. fos.component.ts: In title, updated FOS to FoS.
6. sdg-fos-suggest.module.ts: Imported LoadingModule.
7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked).
8. fos-selection.component.ts:
   a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment.
   b. [Bug fix] Set this.loading = false; inside subscribe.
   c. Call this.setObserver(); both in ngOnInit and when keyword changes.
   d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible).
   e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly.
9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs.
10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-21 02:47:23 +02:00
Konstantinos Triantafyllou 9a258d8197 Reduce number of projects, organizations and subjects shown in entity-metadata to 3. 2023-02-20 20:54:26 +02:00
Alex Martzios f17b25d66f create tooltips for all landing page metrics card (BIP and UsageCounts) 2023-02-20 19:29:21 +02:00
Konstantinos Triantafyllou 3d296f3234 Add organizations in entity-metadata 2023-02-20 18:17:30 +02:00
Konstantina Galouni 6947890c20 [Library | explore-redesign]: Result landing redesign for small screens (mobile) - main info & tabs of main info.
1. fos.component.ts & sdg.component.ts: Added Beta badge and "View all" link.
2. fundedBy.component.ts: Added @Input isMobile and relative checks in html | Updated how projects appear in mobile | Added ng-template for #funder and #dropInfo.
3. relatedTo.component.ts: Added @Input isMobile and relative checks in html | Added uk-margin-small-bottom between communities in mobile.
4. showSubjects.component.ts:
   a. Added @Input isMobile and relative checks in html.
   b. Added @Input() viewAllSubjects: boolean = false, @Input() viewAllClassifiedSubjects: boolean = false, @Output() viewAllClicked  = new EventEmitter(); and methods "viewAllSubjectsClicked()", "viewAllSubjectsByVocabularyClicked()" to show subjects properly in mobile.
5. full-screen-modal.component.ts: Added method "backClicked()" and field public stayOpenInBack: boolean = false.
6. resultLanding.module.ts: Imported FullScreenModalModule.
7. resultLanding.component.ts & resultLanding.component.html: Redesign for small screens (mobile) for main info and its tabs (Summary, References, etc..).
2023-02-20 17:56:02 +02:00
Konstantinos Triantafyllou 9715de74d2 Create entity-actions and add all result actions in it. Add filters-toggle in advanced search for mobile. Add funders and subjects in entity-metadata. Change authors view less 2023-02-20 16:59:07 +02:00
Alex Martzios 23bfc3af3d changes for sdg/fos selection and suggest components 2023-02-20 16:34:12 +02:00
Konstantina Galouni 10ea930d8a [Library | explore-redesign]: availableOn.component.ts: [Bug fix] Added check if availableOn.length > 0. 2023-02-18 10:53:40 +02:00
Konstantina Galouni 1ca647f56e [Explore & Library | explore-redesign]: Updated component for suggest SDGs or FoS.
1. alert.ts: Added previous button option.
2. composer.ts: Set feedback values in body | Make method "composeEmailForSdgsSuggestion()" generic to send feedback for either SDGs or FoS. - TODO: Rename method.
3. sdg-selection.component: Added some checks | Added method "getSelectedSubjects()".
4. sdg-fos-suggest.component: Updated component for suggestion | Send suggested subjects to composer | Add modal here | Make file generic for FoS or SDGs suggestion.
5. resultLanding.component: Updated how <sdg-fos-suggest> is called | Moved SDGs / FoS suggest modal inside <sdg-fos-suggest>.
2023-02-18 10:52:24 +02:00
Konstantina Galouni 79bcf402d6 [Explore & Library | explore-redesign]: searchResult.component.ts & searchResearchResults.service.ts: Remove logs from search | resultLanding.component.html: [Bug fix] Add check if resultLandingInfo.measure | Remove from <result-preview> modal input that does not exist anymore. 2023-02-18 10:41:34 +02:00
Konstantina Galouni a4c9c63311 [Explore & Library | explore-redesign]: searchResearchResults.service.ts: [Bug fix] Fix parsing of hostedBy_collectedFrom (download from/source) - initialize, add journal and sort outside the loop. 2023-02-18 03:44:30 +02:00
Konstantinos Triantafyllou 332a32a4e4 Add entityMetadataComponent in export of the module 2023-02-17 19:47:47 +02:00
Konstantinos Triantafyllou 238aafd552 Change results preview. Add hosted by, metrics in search results. Create entity-metadata for entity medata. 2023-02-17 19:40:05 +02:00
Alex Martzios 75ad00db3f create new component for handling SDG suggestions 2023-02-17 19:08:44 +02:00
Konstantinos Triantafyllou 4858e9f22d Add condition for measures existance in parseMeasures 2023-02-16 16:37:40 +02:00
Konstantinos Triantafyllou 0a1e0fbd8a Add measures and hosteby collected from in search result objects 2023-02-16 16:33:40 +02:00
Alex Martzios 1093027ca1 general fixes for all landing page types, create new fos/sdg selection components for user feedback 2023-02-16 12:59:18 +02:00
Konstantina Galouni 38a8802d7e [Explore & Library | explore-redesign]: First update for direct linking according to redesign.
1. claimContextSearchForm.component.ts & claimProjectSearchForm.component.ts & claimResultSearchForm.component.ts: Added "@Input() public centerAlign: boolean = false".
2. claimContextSearchForm.component.html & claimProjectSearchForm.component.html & claimResultSearchForm.component.html: align search form to the center if centerAlign is true (in direct linking).
3. linkingGeneric.component.ts:
   a. Scroll to top smoothly when changing step.
   b. Added method "getEntityName()" to resolve entity name from entity type.
4. linkingGeneric.component.html: Redesign in direct linking:
   a. Hidden stepper.
   b. Title before search form
   c. Back button instead of breadcrumb.
   d. Search form aligned to the center.
   e. In basket, no tabs, but source on top of link source to.
   f. Button to Step 3 renamed to "Summarise".
5. HelperFunctions.class.ts: In methods "scroll()" and "scrollTo()" added parameter "smooth: boolean = false" for smooth scroll.
6. tsconfig.json: Commented "angularCompilerOptions": { "strictTemplates": true}.
2023-02-15 23:56:16 +02:00
Konstantinos Triantafyllou 4cf5f44000 Merge branch 'angular-14' into explore-redesign 2023-02-15 11:53:55 +02:00
Konstantinos Triantafyllou 88a35d4814 Merge remote-tracking branch 'origin/angular-14' into explore-redesign 2023-02-14 12:15:42 +02:00
Alex Martzios 5c9470a959 fix for 'collected from' link that was not working, coloring of new access icons and bip/usage icons, metrics tabs and charts - all landing pages 2023-02-13 15:51:15 +02:00
Alex Martzios 6551fc73d3 Merge branch 'angular-14' into explore-redesign 2023-02-08 11:42:22 +02:00
Alex Martzios beebd6c6d7 progress for landing pages redesign 2023-02-08 11:21:16 +02:00
Konstantinos Triantafyllou 57eac1b08b Change my-tabs with new class landing-tab 2023-01-27 14:42:09 +02:00
Konstantinos Triantafyllou 97426aabfe Merge remote-tracking branch 'origin/angular-14' into explore-redesign 2023-01-27 10:21:10 +02:00
Konstantinos Triantafyllou 03b28d57d5 Merge from angular-14 2023-01-25 11:53:32 +02:00
Alex Martzios 0a519c667a start on result landing mobile redesign 2023-01-24 15:32:58 +02:00
Alex Martzios c58bc15a74 progress on all landing page types 2023-01-23 16:19:00 +02:00
Alex Martzios 95de86e767 progress in result landing page 2023-01-13 15:57:26 +02:00
Alex Martzios c1fa0889ee progress in landing page (new metrics, tweaks for new action-bar) 2023-01-13 08:32:16 +02:00
Alex Martzios 871c45c480 progress on result-landing page and used components within it 2023-01-09 18:35:28 +02:00
Alex Martzios 9ead7fee7d progress on explore landing page 2022-12-20 15:27:18 +02:00
375 changed files with 23579 additions and 10468 deletions

View File

@ -1,6 +1,5 @@
import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import {Injectable, Inject, PLATFORM_ID, TransferState} from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
import { TransferState } from '@angular/platform-browser';
import { properties } from "../../environments/environment";
@Injectable({
@ -9,29 +8,39 @@ import { properties } from "../../environments/environment";
export class CacheInterceptorService implements HttpInterceptor {
cachingRequests = [
// Remove 2 following lines when bug with hidden refine filters is solved.
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&fields=country&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=fundinglevel0_id&fields=projectstartyear&fields=projectendyear&fields=projectoamandatepublications&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&fields=country&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&fq=relfunder%20exact%20%22ec__________%3A%3AEC%7C%7CEuropean%20Commission%7C%7CEC%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&fq=relfunder%20exact%20%22ec__________%3A%3AEC%7C%7CEuropean%20Commission%7C%7CEC%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=publications&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=datasets&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=software&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=other&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=publications&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=datasets&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=software&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=other&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=instancetypename&fields=fos&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=projectstartyear&fields=projectendyear&fields=projectoamandatepublications&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=projectoamandatepublications&fields=projectstartyear&fields=projectendyear&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=eoscdatasourcetype&fields=datasourceodlanguages&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&fields=country&fields=collectedfromname&fields=datasourcethematic&fields=datasourcejurisdiction&&type=datasources&page=0&size=0",
"/resources2/?format=json&query= ( (reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*) ) &refine=true&fields=country&&type=organizations&page=0&size=0",
// "/resources2/?format=json&query= ( (reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*) ) &refine=true&fields=country&&type=organizations&page=0&size=0",
"/resources2/?format=json&refine=true&fields=country&&type=organizations&fq=(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)&page=0&size=0&minRef=true",
"/projects/?format=json&refine=true&page=1&size=0&fields=funder",
"/resources2/?format=json&size=0&type=organizations&fq=(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)",
// "/projects/?format=json&refine=true&page=1&size=0&fields=funder",
"/projects/?fields=funder&sf=funder&format=json&size=0",
"/results/?fields=relfunder&sf=relfunder&format=json&size=0",
"/resources/?format=json&query=( oaftype exact datasource and (eoscdatasourcetype exact \"Journal Archive\" or eoscdatasourcetype exact \"Repository\"))&refine=true&fields=datasourcetypename&fields=country&fields=datasourceodsubjects&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&fields=datasourcethematic&fields=datasourcejurisdiction&&type=datasources&page=0&size=0",
"/search/v2/api/datasources/count?format=json", "/search/v2/api/publications/count?format=json", "/search/v2/api/datasets/count?format=json", "/search/v2/api/software/count?format=json", "/search/v2/api/other/count?format=json",
"relresulttype%3Dpublication"
"relresulttype%3Dpublication",
"/resources2/?format=json&size=0&type=projects",
"/resources2/?format=json&size=0&type=datasources",
"/resources2/?format=json&size=0&type=results",
"/resources2/?format=json&size=0&type=results&fq=resultbestaccessright%20exact%20%22Open%20Access%22"
];
@ -49,7 +58,13 @@ export class CacheInterceptorService implements HttpInterceptor {
}
public checkForCachedRequests(url){
if(url.indexOf("refine=true") !== -1 || url.indexOf("/count?format=json") !== -1 || url.indexOf("relresulttype%3Dpublication") !== -1) {
// Do not call cache when it is not enabled at all.
// This property is not correctly used here. A new property should be introduced. For now it is ok.
if (!properties.useLongCache) {
return false;
}
if(url.indexOf("sf=") !== -1 || url.indexOf("refine=true") !== -1 || url.indexOf("/count?format=json") !== -1 || url.indexOf("relresulttype%3Dpublication") !== -1 ||
(url.indexOf("?format=json&size=0&type=") !== -1 && url.indexOf("query=") == -1)) {
return this.cachingRequests.some(partUrl => (url.indexOf(partUrl) !== -1));
}
return false;

View File

@ -1,5 +1,5 @@
<div>
<div class="uk-width-xlarge@l uk-width-large">
<div class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input>
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>

View File

@ -2,13 +2,12 @@ import {Component, Input, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {ContextsService} from './service/contexts.service';
import {ClaimEntity, ShowOptions} from './claimHelper.class';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {EnvProperties} from '../../utils/properties/env-properties';
import {Subscriber} from "rxjs";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {CommunityService} from "../../connect/community/community.service";
import {CommunitiesService} from "../../connect/communities/communities.service";
import {UserManagementService} from "../../services/user-management.service";
import {Session} from "../../login/utils/helper.class";
declare var UIkit: any;
@ -18,6 +17,7 @@ declare var UIkit: any;
})
export class ClaimContextSearchFormComponent {
@Input() public centerAlign: boolean = false;
@Input() public results:ClaimEntity[];
@Input() public sources;
@Input() public properties: EnvProperties;
@ -48,9 +48,14 @@ export class ClaimContextSearchFormComponent {
keyword = "";
subscriptions = [];
communityLogos = {};
communityIds = [];
user = null;
ngOnInit() {
this.entitiesSelectOptions = this.showOptions.selectOptions;
//get community logos
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
this.subscriptions.push(this._communitiesService.getCommunities(this.properties, this.properties.communityAPI+"/communities/").subscribe(
communitiesResults => {
if(communitiesResults!=null) {
@ -60,6 +65,13 @@ export class ClaimContextSearchFormComponent {
this.communityLogos[community.communityId] = community;
}
}
this.communityIds = communitiesResults.filter(community => {
return community.claim == "all" ||
Session.isCommunityCurator(this.user) ||
Session.isClaimsCurator(this.user) ||
(community.claim == "membersOnly" && Session.isSubscribedTo("community", community.communityId,this.user)) ||
(community.claim == "managersOnly" && Session.isManager("community", community.communityId,this.user))
}).map(community => community.communityId);
this.getCommunities();
}
},
@ -67,6 +79,10 @@ export class ClaimContextSearchFormComponent {
this.getCommunities();
}
));
}, error => {
}));
}
ngOnDestroy() {
@ -76,7 +92,7 @@ export class ClaimContextSearchFormComponent {
}
});
}
constructor(private _contextService: ContextsService, private router: Router, private _communitiesService: CommunitiesService) {
constructor(private _contextService: ContextsService, private router: Router, private _communitiesService: CommunitiesService, private userManagementService: UserManagementService,) {
}
@ -113,7 +129,7 @@ export class ClaimContextSearchFormComponent {
}
select(communityId, communityLabel) {
console.log("SELECT", communityId)
// console.log("SELECT", communityId)
this.selectedCommunityId = communityId;
this.selectedCommunityLabel = communityLabel;
this.getCategories();
@ -166,20 +182,17 @@ export class ClaimContextSearchFormComponent {
}
getCommunities() {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
this.loading = true;
this.subscriptions.push(this._contextService.getPublicCommunitiesByState().subscribe(
this.subscriptions.push(this._contextService.getCommunitiesByState().subscribe(
data => {
this.communities = data;
console.log(this.communities)
this.communities = data.filter(community => {
return this.communityIds.indexOf(community.id) != -1
});
if (this.communities.length > 0) {
this.communities.sort((n1, n2) => n1.label > n2.label);
this.communities.sort((n1, n2) => n1.title > n2.title);
}
this.loading = false;
if (this.communityId != null) {
if (this.communityId != null && this.communityIds.indexOf(this.communityId) != -1) {
//preselect community
this.selectedCommunityId = this.communityId;
for (let i = 0; i < this.communities.length; i++) {
@ -202,18 +215,14 @@ export class ClaimContextSearchFormComponent {
this.error = true;
}
));
}
}
getCategories() {
this.loading = true;
// this.categories=[];
if (this.selectedCommunityId != '0') {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
if (this.categories[this.selectedCommunityId]) {
this.loading = false;
if(this.categories[this.selectedCommunityId].length > 0){
@ -241,7 +250,7 @@ export class ClaimContextSearchFormComponent {
}
));
}
}
}
displaySubcategory(id) {
@ -254,9 +263,6 @@ export class ClaimContextSearchFormComponent {
}
browseConcepts(categoryId) {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
if (this.conceptsClass[categoryId] != null) {
this.conceptsClassDisplay[categoryId] = !this.conceptsClassDisplay[categoryId];
return;
@ -284,8 +290,6 @@ export class ClaimContextSearchFormComponent {
this.conceptsCategoryLoading[categoryId] = false;
}
));
}
}
browseSubConcepts(categoryId, conceptId) {
@ -307,24 +311,6 @@ export class ClaimContextSearchFormComponent {
}
saveStateAndRedirectLogin() {
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
}
});
}
private static handleError(message: string, error) {
console.error("Claim context search form (component): " + message, error);
}

View File

@ -1,39 +0,0 @@
import {Component, Input, ViewChild} from '@angular/core';
import {ShowOptions} from './claimHelper.class';
import {MatSelect} from "@angular/material/select";
import {OpenaireEntities} from "../../utils/properties/searchFields";
@Component({
selector: 'claim-enities-selection',
template:`
<span *ngIf="showOptions && showOptions.linkToEntities && showOptions.linkToEntities.length > 0"
class=" entitiesSelection portal-box uk-text-small clickable" style=""
(click)="open()">
<mat-select [(value)]="showOptions.show"
[disableOptionCentering]="true" >
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1" value="result">{{openaireEntities.RESULTS}}</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1" value="project">{{openaireEntities.PROJECTS}}</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1" value="context">{{openaireEntities.COMMUNITIES}}</mat-option>
</mat-select>
</span>
`,
})
export class ClaimEntitiesSelectionComponent{
@ViewChild(MatSelect) matSelect: MatSelect;
@Input() showOptions:ShowOptions = new ShowOptions();
public openaireEntities = OpenaireEntities;
open() {
if (this.matSelect && !this.matSelect.focused) {
this.matSelect.open();
}
}
}

View File

@ -1,6 +1,7 @@
//Classes used in linking / inlinelinking when selecting an entity
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {ClaimsProperties} from "./claims.properties";
export class ClaimResult {
public source: string;
@ -28,6 +29,7 @@ export class ClaimResult {
export class ClaimProject {
public funderId: string;
public funderShortname: string;
public funderName: string;
public acronym: string;
public startDate: string;
@ -37,6 +39,12 @@ export class ClaimProject {
public fundingLevel0: string;
public url: string;
}
export class ClaimOrganization {
public name: string;
// public shortName: string;
public url: string;
// public country: string;
}
export class ClaimContext {
public community: string;
@ -71,6 +79,7 @@ export class ClaimEntity {
result: ClaimResult;
project: ClaimProject;
context: ClaimContext;
organization: ClaimOrganization;
constructor() {
this.warningMessages = [];
@ -92,6 +101,7 @@ export class ClaimRecord2Insert {
targetAccessRights: string;
targetEmbargoEndDate: string;
claimedInDashboard: string;
idSuffix:string;
constructor() {
@ -115,7 +125,12 @@ export class ClaimDBContext {
title: string;
openaireId: string;
}
export class ClaimDBOrganization {
openaireId: string;
name: string;
shortName: string;
country: string;
}
export class ClaimDBProject {
openaireId: string;
name: string;
@ -168,24 +183,25 @@ export class ShowOptions {
this.basketShowSources = false;
}
showLinkTo() {
console.log(this.linkTo, "showLinkTo")
// console.log(this.linkTo, "showLinkTo")
this.show = this.linkTo;
this.basketswitchToLinkTo();
HelperFunctions.scroll();
}
initSelectOptions(){
initSelectOptions(claimProperties:ClaimsProperties){
let options =[];
if(this.linkToEntities.indexOf('result')!=-1){
options.push({value: 'result',label: OpenaireEntities.RESULTS})
}
if(this.linkToEntities.indexOf('project')!=-1){
options.push({value: 'project',label: OpenaireEntities.PROJECTS})
options.push({value: 'project',label: claimProperties.SELECT_ENTITIES.projects})
}
if(this.linkToEntities.indexOf('context')!=-1){
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
}
this.selectOptions = options;
// console.log(options, claimProperties.SELECT_ENTITIES.projects)
}
}

View File

@ -1,69 +1,25 @@
<div class="uk-width-xlarge@l uk-width-large">
<div class="uk-width-expand" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input (searchEmitter)="search(page,size)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
[hint]="'Search for ' + openaireEntities.PROJECTS + '...'" tooltip="true"></div>
[options]="showOptions.selectOptions" class="uk-width-medium@xl uk-width-auto"></div>
<div *ngIf="funderOptions && funderOptions.length > 0" input type="select" [(value)]="selectedFunder" placeholder="Funder" hint="Select Funder..."
[options]="funderOptions" class="uk-width-expand" (valueChange)="funderChanged($event)"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Projects to link"
[hint]="'Search for ' + openaireEntities.PROJECTS + '...'" tooltip="true" [disabled]="isNoProjectFunder"></div>
</advanced-search-input>
</div>
<div *ngIf="!showResults">
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && !isNoProjectFunder && this.selectedFunder && openaireResults.length == 0">
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">No {{openaireEntities.PROJECT.toLowerCase()}} results yet... <br>Start
searching for {{openaireEntities.PROJECTS.toLowerCase()}} to add them in the Basket
</div>
</div>
<div *ngIf="showResults" class="uk-margin-top">
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && this.funderOptions.length > 1 && !this.selectedFunder">
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">Select funder or search for projects to proceed
</div>
</div>
<div class="uk-margin-top">
<div class="uk-grid" uk-grid>
<div class="search-filters uk-width-1-1">
<!--<div *ngIf="countFilters()>0 && openaireResultsNum > 0" class="uk-grid uk-flex uk-flex-bottom">
<div class="uk-grid">
<h6 class="uk-text-bold">Filters</h6>
<a *ngIf="countFilters()>1" (click)="clearFilters()"
[class]="((openaireResultsStatus ==
errorCodes.LOADING)?'uk-disabled uk-link-muted':'')+' portal-link '">
Clear All
</a>
</div>
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-small-top " uk-grid>
<ng-container *ngFor="let filter of rangeFilters " >
<ng-container *ngIf = "filter.selectedFromAndToValues">
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
</a>
</span>
</span>
</ng-container>
</ng-container>
<ng-container *ngFor="let filter of filters " >
<ng-container *ngIf = "filter.countSelectedValues > 0">
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
&lt;!&ndash; if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span &ndash;&gt;
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
</a>
</span>
</span>
</ng-container>
</ng-container>
</div>
</div>-->
<!-- <ng-container *ngIf="openaireResultsNum > 0">-->
<div *ngIf="!isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING && openaireResultsNum > 1 " class="search-filters uk-width-1-1">
<div class="uk-grid uk-grid-small" uk-grid>
<ng-container *ngFor="let filter of rangeFilters">
<div>
@ -104,9 +60,12 @@
role="alert">Service not available
</div>
<div *ngIf="openaireResultsStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert">
<loading></loading>
</div>
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
<div *ngIf="isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING " class="uk-alert uk-alert-default">No projects for funder <span class=" uk-text-bold">{{selectedFunder.name}}</span>. </div>
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0 && openaireResultsStatus != errorCodes.LOADING " class="uk-flex uk-flex-center ">
<paging-no-load [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, EventEmitter, Input, Output} from '@angular/core';
import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core';
import {SearchProjectsService} from '../../services/searchProjects.service';
import {ProjectService} from '../../landingPages/project/project.service';
import {ClaimEntity, ClaimProject} from './claimHelper.class';
@ -10,6 +10,7 @@ import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.clas
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
import {Subscriber} from "rxjs";
import { properties } from 'src/environments/environment';
declare var UIkit:any;
@ -21,16 +22,16 @@ declare var UIkit:any;
})
export class ClaimProjectsSearchFormComponent {
public query = '';
@Input() public centerAlign: boolean = false;
@Input() public selectedProjects:ClaimEntity[]=[] ;
public elementRef;
@Output() projectSelected = new EventEmitter();
@Input() public properties:EnvProperties;
public properties:EnvProperties = properties;
@Input() public inlineClaim:boolean=false;
@Input() localStoragePrefix:string = "";
@Input() basketLimit;
@Input() showOptions;
public errorCodes:ErrorCodes = new ErrorCodes();
public projects:string[];
public warningMessage = "";
@ -52,47 +53,85 @@ export class ClaimProjectsSearchFormComponent {
public rangeFields:string[][] = this.searchFields.PROJECT_RANGE_FIELDS;
openaireEntities = OpenaireEntities;
sub;
selectedFunder = null;
funderOptions = [];
isNoProjectFunder = false;
constructor(private _service: ProjectService, private _projectService: SearchProjectsService, myElement: ElementRef) {
this.elementRef = myElement;
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
this.getFunders();
}
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
getFunders(){
this.openaireResultsStatus = this.errorCodes.LOADING;
this.showResults = true;
this.sub = this._projectService.advancedSearchProjects("", 1, 0, this.properties,
this.refineFieldsQuery, this.refineFields, "&type=projects&sf=funder").subscribe(
data => {
let option = {value : null, label: "No funder selected"};
this.funderOptions.push(option);
for(let v of data[2][0].values){
let option = {value : v, label: v.name};
this.funderOptions.push(option);
}
this.openaireResultsStatus = this.errorCodes.DONE;
}, error =>{
this.openaireResultsStatus = this.errorCodes.ERROR;
})
}
search(page,size) {
if(this.keyword.length == 0){
this.showResults =false;
return;
funderChanged(value){
this.keyword = ""
this.selectedFunder = value;
this.isNoProjectFunder = this.selectedFunder && this.selectedFunder.number == 1;
this.openaireResults = [];
if(this.isNoProjectFunder){
this.showResults = true;
this.search(1,1);
}else{
this.openaireResults = [];
}
this.showResults =true;
}
search(page,size) {
/* if (this.keyword.length == 0) {
this.showResults = false;
return;
}*/
this.showResults = true;
this.openaireResults = [];
this.openaireResultsStatus = this.errorCodes.LOADING;
this.prevFilters = this.filters;
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, this.createOpenaireRefineQuery(), [], null).subscribe(
// this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
data => {
if(data != null) {
this.openaireResultsPage=page;
this.openaireResultsNum = data[0];
this.openaireResults =ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
if(data[2] && data[2].length > 0){
this.filters = this.checkSelectedFilters( data[2], this.prevFilters);
}
this.openaireResultsStatus = this.errorCodes.DONE;
if(this.openaireResultsNum == 0){
this.openaireResultsStatus = this.errorCodes.NONE;
this.filters = this.checkSelectedFilters( [], this.prevFilters);
}
}else {
this.openaireResultsStatus = this.errorCodes.ERROR;
if (data != null) {
this.openaireResultsPage = page;
this.openaireResultsNum = data[0];
this.openaireResults = ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
if (data[2] && data[2].length > 0) {
this.filters = this.checkSelectedFilters(data[2], this.prevFilters);
}
},
this.openaireResultsStatus = this.errorCodes.DONE;
if (this.openaireResultsNum == 0) {
this.openaireResultsStatus = this.errorCodes.NONE;
this.filters = this.checkSelectedFilters([], this.prevFilters);
}
/* if(this.isNoProjectFunder && this.claimResultsComponent){
this.claimResultsComponent.add(this.openaireResults[0])
}*/
} else {
this.openaireResultsStatus = this.errorCodes.ERROR;
}
},
err => {
this.openaireResultsStatus = this.errorCodes.ERROR;
//console.log(err.status);
@ -100,85 +139,23 @@ export class ClaimProjectsSearchFormComponent {
}
);
}
// select(entity){
// if(this.selectedProjects.length > 50){
// UIkit.notification({
// message : 'Your basket exceeds the number of allowed projects (50)',
// status : 'warning',
// timeout : 1500,
// pos : 'top-center'
// });
// return;
// }
// this.query = "";
// // this.searchTermStream.next(this.query); //clear
// entity = entity.value;
// // var project: ClaimProject = new ClaimProject();
// // project.funderId = entity.funderId;
// // project.funderName = entity.funderName;
// // project.id = entity.id;
// // project.projectName = entity.projectName;
// // project.projectAcronym = entity.projectAcronym;
// // project.startDate = entity.startDate;
// // project.endDate = entity.endDate;
// // project.code = entity.code;
// // project.jurisdiction = entity.jurisdiction;
// // project.fundingLevel0 = entity.fundingLevel0;
//
//
// var index:number =this.selectedProjects.indexOf(entity);
// var found:boolean = false;
// this.warningMessage = "";
//
// for (var _i = 0; _i < this.selectedProjects.length; _i++) {
// let project = this.selectedProjects[_i];
// if(entity.id == project.id){
// found=true;
// this.warningMessage = "Project already in your basket";
// }
// }
//
// if (!found) {
// this.selectedProjects.push(entity);
// if(this.selectedProjects != null){
// localStorage.setItem(this.localStoragePrefix + "projects", JSON.stringify(this.selectedProjects));
// }
// this.projectSelected.emit({
// value: true
// });
//
// }
// }
/* static showItem(item):string{
return ((item.field[1]['@value'])?item.field[1]['@value']+" - ":"" ) + item.field[3]['@value'];
}*/
remove(item){
remove(item){
let index:number =this.selectedProjects.indexOf(item);
if (index > -1) {
this.selectedProjects.splice(index, 1);
}
}
/* handleClick(event){
var clickedComponent = event.target;
var inside = false;
do {
if (clickedComponent === this.elementRef.nativeElement) {
inside = true;
}
clickedComponent = clickedComponent.parentNode;
} while (clickedComponent);
}*/
static openaire2ClaimEntity(items, properties:EnvProperties){
static openaire2ClaimEntity(items, properties:EnvProperties){
const projects: ClaimEntity[] = [];
for(const item of items){
const entity: ClaimEntity = new ClaimEntity();
entity.project = new ClaimProject();
entity.project.funderId = item.funderId;
entity.project.funderName = item.funderShortname;
entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId?entity.project.funderId.split("::")[1]:"");
entity.project.funderName = item.funderName;
entity.id = item.id;
entity.project.url = properties.searchLinkToProject + entity.id;
entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null;
entity.title = item.title.name;
entity.project.acronym = item.acronym;
entity.project.startDate = item.startYear;
@ -201,43 +178,47 @@ export class ClaimProjectsSearchFormComponent {
}
createOpenaireQueryParams():string {
createOpenaireQueryParams(): string {
let query = "";
if(this.keyword.length > 0){
query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
if (this.keyword.length > 0) {
// query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
query += StringUtils.quote(StringUtils.URIEncode(this.keyword));
}
return query;
}
/*if(this.startYear.length > 0 ){
query+='&fq=projectstartyear exact \"'+this.startYear+'\"'
}
if(this.endYear.length > 0 ){
query+='&fq=projectendyear exact \"'+this.endYear+'\"'
}*/
createOpenaireRefineQuery(): string {
let allFqs = "";
for (let filter of this.filters){
if(filter.countSelectedValues > 0){
let count_selected=0;
for (let filter of this.filters) {
if (filter.countSelectedValues > 0) {
let count_selected = 0;
let fq = "";
for (let value of filter.values){
if(value.selected == true){
for (let value of filter.values) {
if (value.selected == true) {
count_selected++;
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + (StringUtils.quote(value.id));
fq += (fq.length > 0 ? " " + filter.filterOperator + " " : "") + filter.filterId + " exact " + (StringUtils.quote(value.id));
}
}
if(count_selected > 0){
fq="&fq="+StringUtils.URIEncode(fq);
if (count_selected > 0) {
fq = "&fq=" + StringUtils.URIEncode(fq);
allFqs += fq;
}
}
}
for (let i=0; i<this.rangeFilters.length; i++){
if(this.selectedFunder){
allFqs += "&fq=" + StringUtils.URIEncode( "funder exact " + (StringUtils.quote(this.selectedFunder.id)));
}
if(!this.isNoProjectFunder || !this.selectedFunder){
allFqs += '&fq=(projectcode<>"unidentified")'
}
for (let i = 0; i < this.rangeFilters.length; i++) {
let filter = this.rangeFilters[i];
//selectedFromValue, selectedToValue, equalityOp, equalityOpFrom, equalityOpTo, filterOp ){
allFqs+= NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i],filter.selectedFromValue, filter.selectedToValue, " within ", ">=" ,"<=", "and" )
allFqs += NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i], filter.selectedFromValue, filter.selectedToValue, " within ", ">=", "<=", "and")
}
return query+allFqs;
return allFqs + "&type=projects";
}
public yearChanged() {
this.search(this.page, this.size);
@ -272,20 +253,21 @@ export class ClaimProjectsSearchFormComponent {
}
}
filter.countAllValues = filter.values.length;
}
if(filters.length == 0 ){
for(let j=0; j< prevFilters.length ; j++){
let filter = Object.assign({}, prevFilters[j]);
filter.values = [];
for(let filterValue of prevFilters[j].values) {
if(filterValue.selected){
filterValue.number = 0;
filter.values.push(filterValue);
}
}
filters.push(filter)
for(let j=0; j< prevFilters.length ; j++) {
let filter = Object.assign({}, prevFilters[j]);
filter.values = [];
for (let filterValue of prevFilters[j].values) {
if (filterValue.selected) {
filterValue.number = 0;
filter.values.push(filterValue);
}
}
filter.countAllValues = filter.values.length;
filters.push(filter)
}
}
return filters;
}

View File

@ -1,11 +1,9 @@
import { NgModule } from '@angular/core';
import {NgModule} from '@angular/core';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { CommonModule } from '@angular/common';
import {SharedModule} from '../../shared/shared.module';
import {CommonModule} from '@angular/common';
import {ClaimProjectsSearchFormComponent} from './claimProjectSearchForm.component';
// import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
import {ProjectServiceModule} from '../../landingPages/project/projectService.module';
import {ProjectsServiceModule} from '../../services/projectsService.module';
import {EntitiesAutocompleteModule} from '../../utils/entitiesAutoComplete/entitiesAutoComplete.module';
@ -13,29 +11,26 @@ import {HelperModule} from '../../utils/helper/helper.module';
import {ClaimResultsModule} from './claimResults.module';
import {PagingModule } from '../../utils/paging.module';
import {PagingModule} from '../../utils/paging.module';
import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.module';
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
import {ClaimEntitiesSelectionComponent} from "./claimEntitiesSelection.component";
import {MatSelectModule} from "@angular/material/select";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
SharedModule, CommonModule,
// LoadingModalModule,
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, MatSelectModule, AdvancedSearchInputModule, InputModule, DropdownFilterModule
],
@NgModule({
imports: [
SharedModule, CommonModule,
// LoadingModalModule,
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, AdvancedSearchInputModule, InputModule, DropdownFilterModule, LoadingModule
],
providers:[
],
declarations: [
ClaimProjectsSearchFormComponent,
ClaimEntitiesSelectionComponent
],
exports: [ClaimProjectsSearchFormComponent, ClaimEntitiesSelectionComponent]
exports: [ClaimProjectsSearchFormComponent]
})
export class ClaimProjectsSearchFormModule { }

View File

@ -1,14 +1,16 @@
<div *ngIf="showOptions && showOptions.linkToEntities.length > 0" class="uk-width-xlarge@l uk-width-large">
<advanced-search-input (searchEmitter)="search(true)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
[hint]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'" tooltip="true"></div>
</advanced-search-input>
</div>
<div *ngIf="!showOptions" class="uk-width-xlarge@l uk-width-large">
<div search-input [(value)]="keyword" [placeholder]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'"
(searchEmitter)="search(true)"></div>
<div class="uk-flex uk-flex-center uk-flex-left@m">
<div *ngIf="showOptions && showOptions.linkToEntities.length > 0" class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input (searchEmitter)="search(true)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
[hint]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'" tooltip="true"></div>
</advanced-search-input>
</div>
<div *ngIf="!showOptions" class="uk-width-xlarge@l uk-width-large">
<div search-input [(value)]="keyword" [placeholder]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'"
[searchInputClass]="'inner background'" (searchEmitter)="search(true)"></div>
</div>
</div>
<div *ngIf="!showSearchResults">
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">
@ -49,7 +51,9 @@
</div>
</div>
<div *ngIf="crossrefStatus === errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert">
<loading></loading>
</div>
<div>
<claim-results [localStoragePrefix]=localStoragePrefix [results]=crossrefResults
@ -112,7 +116,7 @@
<div *ngIf="openaireResultsStatus === errorCodes.LOADING"
class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center">Loading...</span></div>
role="alert"><loading></loading></div>
<claim-results [localStoragePrefix]=localStoragePrefix
[results]=openaireResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
<div class="uk-flex uk-flex-center" *ngIf=" openaireResultsStatus != errorCodes.LOADING && openaireResultsNum != null && openaireResultsNum > 0" >
@ -175,7 +179,7 @@
</div>
</div>
<div *ngIf="orcidStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
<span class="loading-gif uk-align-center"></span></div>
<loading></loading></div>
</div>
</div>
<div *ngIf="activeTab == 'datacite'" id="datacite" class="uk-animation-fade">
@ -188,7 +192,7 @@
<div class="uk-margin-top">
<div *ngIf="dataciteStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert"><loading></loading></div>
<div>
<claim-results [localStoragePrefix]=localStoragePrefix *ngIf="dataciteResults.length > 0 "
[results]=dataciteResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>

View File

@ -23,6 +23,7 @@ export class ClaimResultSearchFormComponent {
source: string = "datacite";
type: string = "dataset";
showSearchResults: boolean = false;
@Input() public centerAlign: boolean = false;
@Input() public select: boolean = true;
@Input() public keyword: string = '';
@Input() public selectedResults: ClaimEntity[];
@ -864,7 +865,7 @@ export class ClaimResultSearchFormComponent {
}
}
filter.countAllValues = filter.values.length;
}
return filters;
}

View File

@ -22,10 +22,11 @@ import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-
import {InputModule} from "../../sharedComponents/input/input.module";
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [SharedModule, CommonModule, SearchResearchResultsServiceModule, PagingModule, SearchCrossrefServiceModule,
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule, DropdownFilterModule],
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule, DropdownFilterModule, LoadingModule],
providers:[
SearchOrcidService
],

View File

@ -6,13 +6,9 @@ declare var UIkit: any;
@Component({
selector: 'claim-results',
template: `
<div *ngIf="results.length > 0 " class="uk-margin-top">
<div *ngFor=" let entity of results " [class]="(isSelected(entity))?'uk-block-muted':''" class=" uk-card uk-card-default uk-card-body uk-margin-bottom">
<div>
<div class="uk-text-small ">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
<div *ngFor="let entity of results" class="uk-card">
<div class="uk-padding-small">
<div class="uk-grid">
<div class="uk-width-expand uk-margin-right">
<claim-title [entity]="entity" [showIcon]="false"></claim-title>
@ -20,27 +16,29 @@ declare var UIkit: any;
<claim-project-metadata [entity]="entity"></claim-project-metadata>
</div>
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left uk-margin-small-right" [title]="(this.selectedResults.length>=basketLimit)?'Basket reached the size limit':''">
<button class="linking-add-button" [class.uk-disabled]="(this.selectedResults.length>=basketLimit)" *ngIf="!isSelected(entity)"
<button class="linking-add-button uk-icon-button-small" [class.uk-disabled]="(this.selectedResults.length>=basketLimit)" *ngIf="!isSelected(entity)"
(click)="add(entity)">
<icon name="add" [flex]="true"></icon>
</button>
<button *ngIf="isSelected(entity)" class="linking-selected-button" (click)="remove(entity)">
<button *ngIf="isSelected(entity)" class="linking-selected-button uk-icon-button-small" (click)="remove(entity)">
<icon name="check" [flex]="true"></icon>
</button>
</div>
</div>
</div>
</div>
</div>`,
</div>
`
})
export class ClaimResultsComponent {
@Input() results: ClaimEntity[];
@Input() selectedResults: ClaimEntity[];
@Input() localStoragePrefix: string = "";
@Input() basketLimit;
ngOnInit() {
}
public isSelected(item: ClaimEntity) {
return !!this.selectedResults.find(result => item.id === result.id);
}

View File

@ -0,0 +1,23 @@
export class ClaimsProperties{
ALLOW_ORGANIZATION_LINKING:boolean = false;
SELECT_ENTITIES = {
projects:"Funding"
}
INLINE_ENTITY = {
show: true,
guideText : null
}
BASKET ={
source_title: "Source",
target_title: "Link source to"
}
METADATA_PREVIEW ={
source_title: "Source",
target_title: "Link to",
edit_source_title: "Edit",
edit_target_title: "Edit",
edit_target_icon: "edit"
}
}

View File

@ -1,25 +1,27 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div class="uk-grid">
<div class="uk-width-expand uk-position-relative">
<div class="uk-width-expand uk-position-relative uk-margin-small-top">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div *ngIf="filterForm" [id]="actions?'page_content_actions':null" [class.uk-blur-background]="actions" [attr.uk-sticky]="(actions)?'media: @m':null" [attr.offset]="offset">
<div [class.uk-padding-small]="actions" class="uk-padding-remove-vertical">
<div class="uk-section-xsmall">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle">
<div search-input [disabled]="loading" [searchControl]="filterForm.controls.keyword" searchInputClass="outer"
placeholder="Search links" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
(searchEmitter)="changeKeyword()" [expandable]="true"></div>
</div>
</div>
</div>
</div>
<div [class.uk-padding]="actions" class="uk-padding-remove-vertical">
<div class="uk-margin-medium-top">
<results-and-pages [type]="resultsNum !== 1?'Links':'Link'" [page]="page" [pageSize]="size"
<div class="uk-margin-small-top">
<results-and-pages [type]="resultsNum !== 1?'Links':'Link'" [page]="page" [pageSize]="size" [hasSearch]="true" [searchTerm]="keyword"
[totalResults]="resultsNum" customClasses="uk-margin-remove"></results-and-pages>
</div>
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
<div class="uk-grid uk-flex-middle uk-margin-small-top" uk-grid>
<div *ngIf="fetchBy != 'User' && properties.environment == 'development'" >
<input [(ngModel)]="mine" [checked]="mine" (ngModelChange)="goTo(1)" type="checkbox" class="uk-checkbox"> Mine
</div>
<div>
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
name="Type of Entity" [disabled]="loading" [count]="entities.length">
@ -43,6 +45,7 @@
type="select" [options]="sortOptions">
</div>
</div>
<div class="uk-width-expand@l uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
[loading]="false" (pageChange)="pageChange($event)"></paging-no-load>
@ -56,57 +59,76 @@
<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>
<ul class="uk-margin-small-top uk-list uk-list-xlarge">
<li *ngFor="let claim of claims; let i=index" class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="uk-grid uk-grid-small" uk-grid>
<div class="uk-width-expand">
<div class="uk-margin-bottom">
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
[externalPortalUrl]=externalPortalUrl [source]="true"></claim-entity>
</div>
<div class="uk-margin-bottom">
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
<ng-template #notAvailable>
<span class="uk-label 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>
</ng-template>
</div>
<div class="uk-text-small">
<div *ngIf="showUserEmail" class="uk-margin-small-bottom">
<span class="uk-text-meta">Claimed by:</span>
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
<ng-container *ngIf="claims && claims.length > 0">
<div class="uk-flex uk-flex-middle uk-margin-top uk-margin-small-bottom uk-padding-small uk-padding-remove-horizontal">
<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-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
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
</div>
<div>
<span class="uk-text-meta">Claimed date:</span>
<span class="uk-margin-xsmall-left">{{claim.date}}</span>
<div class="uk-margin-small-bottom">
<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>
<ng-template #notAvailable>
<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>
</ng-template>
</div>
<div class="uk-text-small">
<div *ngIf="showUserEmail" class="uk-margin-xsmall-bottom">
<span class="uk-text-meta">Claimed by:</span>
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
</div>
<div>
<span class="uk-text-meta">Claimed date:</span>
<span class="uk-margin-xsmall-left">{{claim.date}}</span>
</div>
</div>
</div>
</div>
<div class="uk-visible@m">
<div class="claim-divider">
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
<div class="uk-visible@m">
<div class="claim-divider">
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
</div>
</div>
<div class="uk-width-1-2@m uk-width-1-1">
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
</div>
</div>
<div class="uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-column uk-flex-center">
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
</div>
</div>
</div>
<div class="uk-card-footer uk-flex uk-flex-right">
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
<icon name="delete" [flex]="true"></icon>
<span class="uk-margin-xsmall-left">Delete</span>
</button>
</div>
</li>
</ul>
<div class="uk-margin-medium-top uk-flex uk-flex-center uk-flex-right@m">
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
(pageChange)="pageChange($event)"></paging-no-load>
</div>
<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)">
<icon name="delete" [flex]="true"></icon>
</button>
</div>
</li>
</ul>
<div class="uk-margin-medium-top uk-flex uk-flex-center uk-flex-right@m">
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
(pageChange)="pageChange($event)"></paging-no-load>
</div>
</ng-container>
</div>
</div>
</div>

View File

@ -4,14 +4,4 @@
position: relative;
padding: 0 20px;
height: 100%;
&::before {
content: '';
position: absolute;
top: 0;
left: 50%;
right: 0;
bottom: 0;
border-left: @global-border-width solid @global-border;
}
}

View File

@ -27,7 +27,6 @@ import {DropdownFilterComponent} from "../../../utils/dropdown-filter/dropdown-f
styleUrls: ['displayClaims.component.less']
})
export class DisplayClaimsComponent implements OnInit, OnDestroy {
@Input() piwikSiteId = null;
@Input() pageTitle: string = "";
properties: EnvProperties;
public searchTermStream = new Subject<string>();
@ -41,7 +40,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
page: number = 1;
size: number = 50;
keyword: string; // the keyword string to give to the request as parameter
types = ["All", "Project", "Context", "Result", "User"];
types = ["All", "Project", "Context", "Result", "User", "Organization"];
loading: boolean = false;
@Input() fetchBy: string;
@Input() fetchId: string;
@ -53,6 +52,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
lastIndexDate = null;
public filterForm: FormGroup;
public entities: string[] = [];
selected = [];
mine = false;
allOptions: Option[] = [
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
@ -110,13 +111,13 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
this.updateTitle(this.pageTitle);
this.updateDescription(description);
this.updateUrl(this.url);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if(properties.adminToolsPortalType !== "explore") {
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
}
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => {
this.lastIndexDate = res;
}));
@ -133,6 +134,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
this.fetchId = this.fetchId ? this.fetchId : '';
}
let page = (params['page'] === undefined) ? 1 : +params['page'];
this.mine = (params['mine'] == 'true' ? true:false);
this.keyword = (params['keyword'] ? params['keyword'] : "");
this.filterForm.get('keyword').setValue(this.keyword);
this.page = (page <= 0) ? 1 : page;
@ -186,6 +188,16 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
}
);
} else if (this.fetchBy == "Organization") {
this.subResults = this._claimService.getClaimsByOrganization(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
}
);
} else if (this.fetchBy == "User") {
this.subResults = this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
@ -209,7 +221,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
}
);
} else if (this.fetchBy == "Context") {
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
@ -220,7 +232,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
}
);
} else {
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
@ -240,7 +252,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
handleErrors(err, message) {
NotificationHandler.rise(message, "danger");
console.error("Dispaly Claims (component): " + message + " " + (err && err.error ? err.error : ''));
console.error("Display Claims (component): " + message + " " + (err && err.error ? err.error : ''));
}
goTo(page: number = 1) {
@ -259,15 +271,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
types += (types.length > 0 ? ',' : '') + type;
}
params += (this.entities.length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : "";
if (this.isAdmin) {
params += (this.fetchBy == 'All' ? "" : (params.length > 0 ? '&' : '') + "fetchBy=" + this.fetchBy);
params += (this.fetchId == '' ? "" : (params.length > 0 ? '&' : '') + "fetchId=" + this.fetchId);
}
params += (this.filterForm.get("sort").value.sort == 'date' && this.filterForm.get("sort").value.descending ? "" : (params.length > 0 ? '&' : '') + "sort=" + this.filterForm.get("sort").value.sort + "-" + this.filterForm.get("sort").value.descending);
params += (this.keyword == '' ? "" : (params.length > 0 ? '&' : '') + "keyword=" + this.keyword);
if (this.communityId != null) {
params += "&communityId=" + this.communityId;
}
return params;
}
@ -290,7 +295,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
}
changeKeyword() {
if (this.filterForm.get("keyword") && (this.filterForm.get("keyword").value.length >= 3 || this.filterForm.get("keyword").value.length == 0)) {
if (this.filterForm.get("keyword") && (this.filterForm.get("keyword").value?.length >= 3 || this.filterForm.get("keyword").value?.length == 0)) {
this.searchTermStream.next(this.filterForm.get("keyword").value);
}
}
@ -311,23 +316,34 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
}
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.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.open();
}
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 => {
this.claims.splice(this.index, 1);
this.resultsNum = this.resultsNum - 1;
NotificationHandler.rise('Link has been deleted successfully');
if (this.index != null) {
this.claims.splice(this.index, 1);
this.resultsNum = this.resultsNum - 1;
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;
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
goToPage = this.page - 1;
@ -335,7 +351,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
this.goTo(goToPage);
}, err => {
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
}));
}
));
}
pageChange($event) {
@ -352,7 +369,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
if (claimDateStr < lastUpdateDateStr) {
return true;
} else {
return claim.target.collectedFrom != "infrastruct_::openaire" && claim.indexed;
return claim.target.collectedFrom != "infrastruct_::openaire";
}
}
@ -363,7 +380,44 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
}
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) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");

View File

@ -17,7 +17,6 @@ import {HelperModule} from '../../../utils/helper/helper.module';
import {Schema2jsonldModule} from '../../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../../sharedComponents/SEO/SEOService.module';
import {IndexInfoServiceModule} from "../../../utils/indexInfoService.module";
import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module";
import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module';
import {InputModule} from '../../../sharedComponents/input/input.module';
import {LoadingModule} from '../../../utils/loading/loading.module';
@ -30,7 +29,7 @@ import {link} from "../../../utils/icons/icons";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule,
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule, NoLoadPaging, IconsModule, DropdownFilterModule
],

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {EnvProperties} from '../../../utils/properties/env-properties';
import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
import {ClaimDBContext, ClaimDBOrganization, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
import {OpenaireEntities} from "../../../utils/properties/searchFields";
import {StringUtils} from "../../../utils/string-utils.class";
@ -15,31 +15,37 @@ import {StringUtils} from "../../../utils/string-utils.class";
<div *ngIf="source" class="uk-text-small">
{{getEntityName(type)}}
</div>
<div class="uk-flex">
<span *ngIf="!source" class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
<div>
<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"
path="/search/result" [externalPortalUrl]=externalPortalUrl></publication-title>
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
</div>
</div>
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)"
class="uk-flex">
<span class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)">
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
[externalPortalUrl]=externalPortalUrl></project-title>
</div>
<div *ngIf="type == 'context'" class="uk-flex uk-text-large">
<span class="uk-text-meta uk-margin-small-right uk-text-nowrap">Link to:</span>
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
<div *ngIf="type == 'organization'" [attr.uk-tooptip]="getEntityName(type)">
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<organization-title [organization]="entity"></organization-title>
</div>
<div *ngIf="type == 'context'">
<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>
</h6>
</div>
`
})
export class ClaimEntityFormatter {
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject;
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject | ClaimDBOrganization;
@Input() type: string;
@Input() properties: EnvProperties;
@Input() externalPortalUrl: string = null;
@Input() source: boolean = true;
@Input() linkAvailable: boolean = true;
public openAIREEntities = OpenaireEntities;
constructor() {

View File

@ -5,18 +5,19 @@ import { RouterModule } from '@angular/router';
import {ProjectTitleFormatter} from './projectTitleFormatter.component';
import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
import {ClaimEntityFormatter} from './claimEntityFormatter.component';
import {OrganizationTitleFormatterComponent} from "./organizationTitleFormatter.component";
@NgModule({
imports: [
CommonModule, RouterModule
],
declarations: [
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
],
providers: [ ],
exports: [
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
]
})

View File

@ -0,0 +1,18 @@
import {Component, Input} from '@angular/core';
@Component({
selector: 'organization-title',
template: `
<h6 *ngIf="organization" class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
{{(organization.shortName ? ('[' + organization.shortName + '] ') : '')}}{{organization.name}}
</p>
</h6>
`
})
export class OrganizationTitleFormatterComponent {
@Input() organization: any;
public url: string;
}

View File

@ -10,17 +10,17 @@ import {properties} from "../../../../../environments/environment";
<ng-container>
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading">
<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']}}
</a>
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading">
<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']}}
</a>
</p>
</h6>
</ng-container>
<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>
`
})

View File

@ -10,8 +10,8 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
<a *ngIf="!externalPortalUrl" [queryParams]="routerHelper.createQueryParam(param,entity.openaireId)"
[routerLink]="path" class="uk-link uk-link-heading">{{entity.title?entity.title:"[No title available]"}}</a>
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + path+'?'+param+'='+entity.openaireId" class="uk-link uk-link-heading custom-external">{{entity.title?entity.title:"[No title available]"}}</a>
[routerLink]="path" class="uk-link uk-link-heading" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}}</a>
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + path+'?'+param+'='+entity.openaireId" class="uk-link uk-link-heading custom-external" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}}</a>
</p>
</h6>
</ng-container>
@ -23,5 +23,6 @@ export class PublicationTitleFormatter {
@Input() path: string;
@Input() entity: any;
@Input() externalPortalUrl: string = null;
@Input() linkAvailable: boolean = true;
public routerHelper: RouterHelper = new RouterHelper();
}

View File

@ -10,10 +10,10 @@ export class ClaimsService {
}
private getClaimRequest(size : number, page : number, url :string, fromCache:boolean):any {
return this.http.get(url, CustomOptions.getAuthOptions());
return this.http.get(url, CustomOptions.getAuthOptionsWithBody());
}
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"") + (mine?"&mine=true":"");
return this.getClaimRequest(size,page,url,true);
}
@ -23,7 +23,7 @@ export class ClaimsService {
return this.getClaimRequest(size,page,url,false);
}
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string):any {
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string, mine:boolean):any {
//console.info('ClaimsService: getClaims for context : '+contextId);
let url = apiUrl +"contexts/"+contextId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,true);
@ -40,14 +40,15 @@ export class ClaimsService {
let url = apiUrl +"projects/"+projectId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,true);
}
getClaimsByOrganization( size : number, page : number, organizationId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
let url = apiUrl +"organizations/"+organizationId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"");
return this.getClaimRequest(size,page,url,true);
}
deleteClaimById(claimId:string , apiUrl:string):any{
//console.warn('Trying to delete claim with id : '+claimId);
let url = apiUrl +"claims/"+claimId;
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.delete( url, CustomOptions.getAuthOptionsWithBody())//.map(request => <any> request.json())
// .do(request => console.info("After delete" ))
.pipe(catchError(this.handleError));
}
@ -61,10 +62,7 @@ export class ClaimsService {
}
url= apiUrl +"claims/bulk?"+url;
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.delete( url, CustomOptions.getAuthOptions())//.map(request => <any> request.json())
// .do(request => console.info("After delete" ))
return this.http.delete( url, CustomOptions.getAuthOptionsWithBody())//.map(request => <any> request.json())
.pipe(catchError(this.handleError));
}
@ -72,40 +70,27 @@ export class ClaimsService {
// console.warn('Trying toinsert claims : '+claims);
let url = apiUrl +"claims/bulk";
let body = JSON.stringify( claims );
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request.status) )
.pipe(catchError(this.handleError));
}
insertClaim(claim, apiUrl:string):any{
//console.warn('Trying toinsert claim : '+claim);
let url = apiUrl +"claims";
let body = JSON.stringify( claim );
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request.status) )
.pipe(catchError(this.handleError));
}
insertDirectRecords(records, apiUrl:string):any{
//console.warn('Trying to feedrecords : '+records);
let url = apiUrl +"feed/bulk";
let body = JSON.stringify( records );
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request) )
.pipe(catchError(this.handleError));
}
getStatus(jobId, apiUrl:string):any{
let url = apiUrl +"jobStatus/" + jobId;
return this.http.get(url,CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console
@ -113,22 +98,4 @@ export class ClaimsService {
return observableThrowError(error || 'Server error');
}
// getClaim(id:string, apiUrl:string):any {
// let url = apiUrl+"claims/"+id;
// return new Promise((resolve, reject) => {
// this.http.get(url)
// //.map(res => res.json())
// .subscribe(
// data => {
// resolve(data['data']);
// },
// err => {
// reject(err);
// }
// )
// ;
// });
// }
}

View File

@ -50,7 +50,6 @@ export class SearchDataciteService {
static parse(response): ClaimEntity[] {
const results: ClaimEntity[] = [];
console.log(response);
for (let i = 0; i < response.length; i++) {
const item = response[i];
const entity: ClaimEntity = new ClaimEntity();
@ -59,22 +58,20 @@ export class SearchDataciteService {
entity.result.journal = null;
entity.result.DOI = item.attributes.doi;
entity.id = item.attributes.doi;
entity.title = item.attributes.title;
entity.title = Array.isArray(item.attributes.titles) && item.attributes.titles[0].title?item.attributes.titles[0].title:null;
entity.result.url = properties.doiURL + item.attributes.doi;
entity.result.source = 'datacite';
entity.type = 'dataset';
entity.result.date = item.attributes.published;
entity.result.date = item.attributes.publicationYear;
entity.result.accessRights = "OPEN";
entity.result.publisher = item.attributes['container-title'];
entity.result.publisher = item.attributes['publisher'];
entity.result.journal = null;
entity.result.record = item;
if (item.attributes.author) {
if (item.attributes.creators) {
entity.result.authors = [];
for (let j = 0; j < item.attributes.author.length; j++) {
const author = item.attributes.author[j];
if(author.family || author.literal) {
entity.result.authors.push((author.family) ? author.family + (author.given ? ', ' + author.given : '') : author.literal);
}
for (let j = 0; j < item.attributes.creators.length; j++) {
const author = item.attributes.creators[j].name;
entity.result.authors.push(author);
}
}
results.push(entity);

View File

@ -21,14 +21,38 @@ export class SearchOrcidService {
let url = properties.searchOrcidURL + term + '/record';
return this.http.get(url, { headers: headers })
//.map(res => res.json()['person'])
.pipe(map(res => res['person']))
.pipe(map(res => [res['name']['given-names'],
res['name']['family-name'],
res['name']]))
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
}
//.map(res => res.json()['person'])
.pipe(map(res => res['person']))
.pipe(map(res => [res['name']['given-names'],
res['name']['family-name'],
res['name'], res['name']['institution-name']]))
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
}
searchOrcidSingleAuthor(term: string, properties: EnvProperties, addId): any {
//var headers = new Headers();
//headers.append('Accept', 'application/orcid+json');
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
let url ="https://pub.orcid.org/v3.0/expanded-search/?q=orcid:" + term + '&start=0&rows=50';
return this.http.get(url, {headers: headers})
.pipe(map(res => res['expanded-result']))
.pipe(map(res => {
if(res) {
for (let auth_result of res) {
const author = {};
author['id'] = auth_result['orcid-id'];
author['authorGivenName'] = auth_result['given-names'];
author['authorFamilyName'] = auth_result['family-names'];
author['institutions'] = auth_result['institution-name'];
return author;
}
}
return null;
}));
}
searchOrcidAuthors(term: string,
properties: EnvProperties): any {
@ -45,14 +69,42 @@ export class SearchOrcidService {
}
searchOrcidAuthorsNew(term: string,
properties: EnvProperties, size = 10): any {
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
// let url = properties.searchOrcidURL+'search?defType=edismax&q='+term+'&qf=given-name^1.0+family-name^2.0+other-names^1.0+credit-name^1.0&start=0&rows=10';
let url = /*properties.searchOrcidURL +*/ 'https://pub.orcid.org/v3.0/expanded-search?q=' + StringUtils.URIEncode('{!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}') + term + '&start=0&rows=' + size;
// given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}
// https://pub.orcid.org/v3.0/expanded-search/?q=%7B!edismax%20qf%3D%22given-and-family-names%5E50.0%20family-name%5E10.0%20given-names%5E10.0%20credit-name%5E10.0%20other-names%5E5.0%20text%5E1.0%22%20pf%3D%22given-and-family-names%5E50.0%22%20bq%3D%22current-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E100.0%20past-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E70%22%20mm%3D1%7Dpaolo%20manghi&start=0&rows=50
//q={!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^5.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" mm=1}alessia bardi&start=0&rows=10
let key = url;
return this.http.get(url, {headers: headers})
.pipe(map(res => res['expanded-result']))
.pipe(map(res => {
let authors = [];
if(res) {
for (let auth_result of res) {
const author = {};
author['id'] = auth_result['orcid-id'];
author['authorGivenName'] = auth_result['given-names'];
author['authorFamilyName'] = auth_result['family-names'];
author['institutions'] = auth_result['institution-name'];
authors.push(author);
}
}
return authors;
}));
}
searchOrcidPublications(id: string, properties: EnvProperties, parse: boolean = false): any {
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
let url = properties.searchOrcidURL + id + '/works';
return this.http.get(url, { headers: headers })
.pipe(map(res => res['group']))
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
}
return this.http.get(url, { headers: headers })
.pipe(map(res => res['group']))
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
}
static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any {
@ -72,6 +124,9 @@ export class SearchOrcidService {
} else {
author['authorFamilyName'] = "";
}
if (data[3] != null) {
author['institution'] = data[3];
}
authors.push(author);
return true;
}

View File

@ -1,9 +1,7 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {SearchZenodoCommunitiesService} from './searchZenodoCommunities.service';
import {SearchOrcidService} from "./searchOrcid.service";
@NgModule({
@ -13,9 +11,9 @@ import {SearchZenodoCommunitiesService} from './searchZenodoCommunities.service'
declarations: [
],
providers:[
SearchZenodoCommunitiesService
SearchOrcidService
],
exports: [
]
})
export class SearchZenodoCommunitiesServiceModule { }
export class SearchOrcidServiceModule { }

View File

@ -37,7 +37,6 @@ export class ClaimsAdminComponent {
@Input() isConnect: boolean = false;
@Input() externalPortalUrl: string;
@Input() claimsInfoURL: string;
@Input() userInfoURL: string;
public user: User = null;
sub;

View File

@ -3,9 +3,6 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { ClaimsAdminComponent } from './claimsAdmin.component';
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
import { AdminLoginGuard} from'../../login/adminLoginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
@NgModule({
imports: [
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
DisplayClaimsModule
],
providers:[AdminLoginGuard, PreviousRouteRecorder,IsRouteEnabled],
providers:[],
declarations: [
ClaimsAdminComponent
],

View File

@ -18,26 +18,12 @@ export class ClaimsByTokenService {
let key = url;
return this.http.get(url, CustomOptions.getAuthOptions());
//.map(res => <any> res.text())
//.map(request => <any> request.json());
return this.http.get(url, CustomOptions.getAuthOptionsWithBody());
}
/*
getClaims(email: string, token: string, user_token: string):any {
let url = OpenaireProperties.getClaimsAPIURL(); // What else?
let body = JSON.stringify( {"email": email, "token": token} );
console.warn('Json body: : '+body);
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, options)
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}
*/
updateClaimsCuration( selectedRight: Set<string>, selectedWrong: Set<string>, apiURL:string) {
let url = apiURL + "curate/bulk";

View File

@ -1,6 +1,7 @@
<loading *ngIf="validInput === null" [full]="true" class="uk-position-center"></loading>
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
[piwikSiteId]="piwikSiteId" pageTitle="Direct Linking">
pageTitle="Direct Linking" [claimsProperties]="claimsProperties">
</linking-generic>
<div *ngIf="validInput== false" id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">

View File

@ -1,7 +1,7 @@
import {Component, Input, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ClaimEntity, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
import {ClaimEntity, ClaimOrganization, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
import {EntitiesSearchService} from '../../utils/entitiesAutoComplete/entitySearch.service';
import {SearchResearchResultsService} from '../../services/searchResearchResults.service';
import {LinkingGenericComponent} from "../linking/linkingGeneric.component";
@ -10,6 +10,8 @@ import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {StringUtils} from "../../utils/string-utils.class";
import {ClaimProjectsSearchFormComponent} from "../claim-utils/claimProjectSearchForm.component";
import {ClaimsProperties} from "../claim-utils/claims.properties";
@Component({
@ -17,26 +19,26 @@ import {StringUtils} from "../../utils/string-utils.class";
templateUrl: 'directLinking.component.html'
})
export class DirectLinkingComponent {
@Input() piwikSiteId = null;
@ViewChild(LinkingGenericComponent) linking: LinkingGenericComponent;
results: ClaimEntity[] = [];
// linkType: string = "project"; // link type (selected in home page) : project, context, software, etc
/* url Parameters for inline linking */
id: string = null; //entity id
@Input() id: string = null; //entity id
type: string = null; // entity type (publication or dataset)
// linkTo: string = null; // entity type (project or context or entity)
// linkToEntities: string[] = [];
showOptions:ShowOptions = new ShowOptions();
validEntityTypes = ["dataset", "publication", "software", "orp", "project", "context"];
validEntityTypes = ["dataset", "publication", "software", "other", "project", "context", "organization"];
sources: ClaimEntity[] = [];
inlineEntity: ClaimEntity = null;
validInput: boolean = null;//'true;
properties: EnvProperties;
@Input() communityId: string = null;
localStoragePrefix: string = "";
@Input() organizationClaim: boolean = false;
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
constructor(private _router: Router, private route: ActivatedRoute,private entitySearch:EntitiesSearchService,
private _searchResearchResultsService: SearchResearchResultsService) {}
subscriptions = [];
@ -49,11 +51,18 @@ export class DirectLinkingComponent {
}
ngOnInit() {
this.properties = properties;
/* if(!this.claimsProperties){
this.claimsProperties = new ClaimsProperties();
}*/
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.id = params['id'];
this.type = params['type'];
this.showOptions.linkTo = params['linkTo'];
if(this.organizationClaim){
this.type = "organization";
this.showOptions.linkTo = "result";
}else {
this.id = params['id'];
this.type = params['type'];
this.showOptions.linkTo = params['linkTo'];
}
if (this.type != null && this.showOptions.linkTo != null) {
this.type = (this.validEntityTypes.indexOf(this.type) != -1) ? this.type : 'publication';
this.showOptions.linkTo = (this.validEntityTypes.indexOf(this.showOptions.linkTo) != -1 || this.showOptions.linkTo == "result") ? this.showOptions.linkTo : 'project';
@ -69,20 +78,22 @@ export class DirectLinkingComponent {
if (this.type == "project") {
// this.linkType = "project";
this.getProjectById(this.id);
} else if (this.type == "organization") {
this.getOrganizationById(this.id);
} else if (this.type == "publication") {
this.getResearchResultById("publication", this.id);
} else if (this.type == "dataset") {
this.getResearchResultById("dataset", this.id);
} else if (this.type == "software") {
this.getResearchResultById("software", this.id);
} else if (this.type == "orp") {
} else if (this.type == "other") {
this.getResearchResultById("other", this.id);
} else {
this.validInput = this.isValidInput(null);
}
//set which entities it is allowed to link to.
// add first the
if(this.type == "project"){
if(this.type == "project" || this.type == "organization"){
this.showOptions.linkToEntities = ["result"];
this.showOptions.linkTo = "result";
}else{
@ -96,24 +107,27 @@ export class DirectLinkingComponent {
this.showOptions.linkToEntities = ["result","project","context" ];
}
}
} else {
this.validInput = this.isValidInput(null);
}
} else {
this.validInput = this.isValidInput(null);
}));
}
}));
}
isValidInput(result: ClaimEntity) {
if (result == null) {
return false;
} else if (this.type == "project" && this.showOptions.linkTo != "result") {
} else if (this.type == "organization" && !this.claimsProperties.ALLOW_ORGANIZATION_LINKING) {
return false;
} else if (["dataset", "publication", "software", "orp"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
} else if ((this.type == "project" || this.type == "organization") && this.showOptions.linkTo != "result") {
return false;
} else if (["project", "dataset", "publication", "software", "orp"].indexOf(this.type) == -1) {
} else if (["dataset", "publication", "software", "other"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
return false;
} else if (["project", "dataset", "publication", "software", "other", "organization"].indexOf(this.type) == -1) {
return false;
} else {
return true;
@ -131,6 +145,17 @@ export class DirectLinkingComponent {
this.handleError("Error getting project by id: " + id, err);
}));
}
getOrganizationById(id: string) {
this.subscriptions.push(this.entitySearch.fetchByType(id,"organization", this.properties).subscribe(
data => {
this.createClaimEntity(data, "organization");
},
err => {
this.validInput = this.isValidInput(null);
//console.log("An error occured")
this.handleError("Error getting project by id: " + id, err);
}));
}
getResearchResultById(resultType: string, id: string) {
this.subscriptions.push(this._searchResearchResultsService.searchById(resultType, id, this.properties).subscribe(data => {
@ -152,16 +177,28 @@ export class DirectLinkingComponent {
entity.type = "project";
entity.title = project.projectName;
entity.project = new ClaimProject();
entity.project.url = properties.searchLinkToProject + entity.id;
entity.project.acronym = project.projectAcronym;
entity.project.code = project.code;
entity.project.endDate = project.endDate;
entity.project.funderId = project.funderId;
entity.project.funderShortname = project.funderShortName?project.funderShortName:(entity.project.funderId.split("::")[1]);
entity.project.funderName = project.funderName;
entity.project.fundingLevel0 = project.fundingLevel0;
entity.project.jurisdiction = project.jurisdiction;
entity.project.startDate = project.startDate;
this.inlineEntity = entity;
}else{
}else if(type =="organization"){
let organization = data[0];
let entity:ClaimEntity = new ClaimEntity();
entity.id = organization.id;
entity.type = "organization";
entity.title = organization.label;
entity.organization = new ClaimOrganization();
// entity.organization.url = properties.searchLinkToOrganization + entity.id;
entity.organization.name = organization.label;
this.inlineEntity = entity;
}else{
results = ClaimResultSearchFormComponent.openaire2ClaimResults(data, this.properties);
}

View File

@ -5,20 +5,18 @@ import { DirectLinkingComponent } from './directLinking.component';
import {EntitySearchServiceModule} from '../../utils/entitiesAutoComplete/entitySearchService.module';
import {SearchResearchResultsServiceModule} from '../../services/searchResearchResultsService.module';
import {LoginGuard} from'../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {LinkingGenericModule} from '../linking/linkingGeneric.module';
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
SharedModule,
EntitySearchServiceModule, SearchResearchResultsServiceModule,
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule, LoadingModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers:[],
declarations: [
DirectLinkingComponent
], exports:[DirectLinkingComponent]

View File

@ -133,11 +133,11 @@ export class BulkClaimComponent {
}
});
}
upload() {
this.enableUpload = false;
this.showReport = false;
this.errorMessage = "";
console.log(this.filesToUpload);
if (this.filesToUpload.length == 0) {
this.errorMessage = "There is no selected file to upload.";
return;
@ -269,11 +269,16 @@ export class BulkClaimComponent {
}
},
err => {
//console.log(err);
// console.log(err);
BulkClaimComponent.handleError("Error getting crossref by DOIs: " + id, err);
this.notFoundIds.push(id);
this.notFoundIdsRow.push(row);
this.endOfFetching();
if(err.status == 404) {
this.searchInDatacite(id, accessMode, date, row);
} else {
this.notFoundIds.push(id);
this.notFoundIdsRow.push(row);
this.endOfFetching();
}
}
));
}

View File

@ -14,7 +14,9 @@ import {
Message
} from "../../claim-utils/claimHelper.class";
import {UserManagementService} from "../../../services/user-management.service";
import {Subscriber} from "rxjs";
import {Subscriber, timer} from "rxjs";
import {map} from "rxjs/operators";
import {LogService} from "../../../utils/log/log.service";
@Component({
selector: 'claim-insert',
@ -30,7 +32,19 @@ import {Subscriber} from "rxjs";
<div class="uk-width-expand uk-margin-small-left">CONFIRM LINKING</div>
</button>
</div>
<modal-loading [message]="'Please wait...'"></modal-loading>
<modal-loading [message]="'Please wait...'">
<div *ngIf="claimsJob">
<div *ngIf="claimsJob && claimsJob.insertedIds.length <1" class="uk-text-meta uk-text-small">
Initiating process....</div>
<div *ngIf="claimsJob && claimsJob.insertedIds.length >0" class="uk-text-meta uk-text-small">
{{claimsJob.insertedIds.length}} out of {{claims2Insert}} links created.</div>
<div *ngIf="feedRecordsJob && feedRecordsJob.insertedIds.length >0" class="uk-text-meta uk-text-small">
{{feedRecordsJob.insertedIds.length}} out of {{records2Insert}} records added in the index...</div>
<div *ngIf="claimsJob.status != 'COMPLETE'" class="uk-text-meta uk-text-small">
Please don't close the window, process is ongoing...</div>
</div>
</modal-loading>
<modal-alert (alertOutput)="confirmClose()">
<h4 class="modal-title uk-text-bold " id="myModalLabel">Confirmation notice</h4>
<p>All the links you provided will be published in the OpenAIRE platform. <br>
@ -46,7 +60,7 @@ import {Subscriber} from "rxjs";
})
export class ClaimInsertComponent {
constructor(private claimService: ClaimsService, private _router: Router, private route: ActivatedRoute,
private userManagementService: UserManagementService) {
private userManagementService: UserManagementService, private _logService: LogService) {
}
subscriptions = [];
ngOnDestroy() {
@ -60,6 +74,32 @@ export class ClaimInsertComponent {
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.params = params;
}));
if(localStorage.getItem(this.localStoragePrefix + "claimsJob")){
this.claimsJob = JSON.parse(localStorage.getItem(this.localStoragePrefix + "claimsJob"));
this.feedRecordsJob = JSON.parse(localStorage.getItem(this.localStoragePrefix + "feedRecordsJob"));
if(this.claimsJob.status != "COMPLETE"){
this.claiming = true;
let loadingTimerSubscription = timer(0, 1000).pipe(
map(() => {
if(this.loading) {
this.loading.open();
loadingTimerSubscription.unsubscribe();
}
})
).subscribe();
this.subscriptions.push(loadingTimerSubscription);
let timerSubscription = timer(0, 10000).pipe(
map(() => {
this.getStatus(); // load data contains the http request
})
).subscribe();
this.subscriptions.push(timerSubscription);
}else{
this.claimsJob = null;
}
}
}
params = {};
@ -84,15 +124,16 @@ export class ClaimInsertComponent {
private errorInClaims: ClaimRecord2Insert[] = [];
private insertedRecords = [];
private errorInRecords = [];
public claimsJob;
public feedRecordsJob;
public claims2Insert;
public records2Insert
infoToLog = [];
public insert() {
this.confirmOpen();
}
saveAndNavigate(){
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this.saveLocalStorage();
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
@ -106,6 +147,7 @@ export class ClaimInsertComponent {
this.errorInClaims = [];
this.insertedRecords = [];
this.errorInRecords = [];
this.infoToLog = [];
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
if (!user) {
this.saveAndNavigate();
@ -114,13 +156,14 @@ export class ClaimInsertComponent {
this.loading.open();
let claims: ClaimRecord2Insert[] = [];
let directclaims: DirectIndexRecord[] = [];
let idSuffix = (new Date()).getTime() + "";
let dashboard = this.properties.environment+"_"+this.properties.dashboard + (this.communityId?("_"+this.communityId):'');
for (let j = 0; j < this.sources.length; j++) { // if an external result -> direct insert in the index
const result: ClaimEntity = this.sources[j];
if (result.result && ["crossref", "datacite", "orcid"].indexOf(result.result.source) != -1) {
directclaims.push({
"id": result.id,
"record": ClaimInsertComponent.createDirectClaim(result, this.results)
"record": ClaimInsertComponent.createDirectClaim(result, this.results, idSuffix)
});
}
}
@ -131,12 +174,12 @@ export class ClaimInsertComponent {
if (this.sources.length > 0) {
directclaims.push({
"id": entity.id,
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources)
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources, idSuffix)
});
} else if (this.inlineEntity) {
} else if (this.inlineEntity && this.inlineEntity.type != "organization") {
directclaims.push({
"id": entity.id,
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity])
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity], idSuffix)
});
}
@ -145,28 +188,35 @@ export class ClaimInsertComponent {
for (let j = 0; j < this.sources.length; j++) {
const result: ClaimEntity = this.sources[j]; // this is a research result
if (entity.result) {
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard, idSuffix));
} else if (entity.context) {
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard, idSuffix));
} else if (entity.project) {
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard, idSuffix));
/* } else if (entity.organization) {
claims.push(ClaimInsertComponent.createOrganizationClaim(result, entity, user.email, dashboard, idSuffix));*/
}
this.infoToLog.push([ result.title?result.title: result.id, entity.title?entity.title:entity.id]);
}
if (this.inlineEntity) {
this.infoToLog.push([ this.inlineEntity.title?this.inlineEntity.title: this.inlineEntity.id, entity.title?entity.title:entity.id]);
if (this.inlineEntity.result) {
if (entity.result) {
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
} else if (entity.context) {
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
} else if (entity.project) {
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
}
} else if (this.inlineEntity.project) {
if (entity.result) {
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
}
} else if (this.inlineEntity.organization) {
if (entity.result) {
claims.push(ClaimInsertComponent.createOrganizationClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
}
}
}
@ -177,12 +227,15 @@ export class ClaimInsertComponent {
//first call direct index service - when call is done (success or error) call isertBulkClaims method to insert claims in DB
// console.log("directclaims");
// console.log(directclaims);
if (directclaims.length > 0 && this.properties.environment != "development"){
if (directclaims.length > 0/* && this.properties.environment != "development"*/){
this.subscriptions.push(this.claimService.insertDirectRecords(directclaims, this.properties.claimsAPIURL).subscribe(
data => {
this.insertedRecords = data.insertedIds;
this.errorInRecords = data.errorInClaims;
this.feedRecordsJob = data.data;
this.records2Insert = directclaims.length;
// console.log(data);
// this.insertedRecords = data.insertedIds;
//
// this.errorInRecords = data.errorInClaims;
this.isertBulkClaims(claims);
},
err => {
@ -190,12 +243,12 @@ export class ClaimInsertComponent {
if (err.code && err.code == 403) {
this.saveAndNavigate();
}
if (err.insertedIds && err.insertedIds.length > 0) {
/* if (err.insertedIds && err.insertedIds.length > 0) {
this.insertedRecords = err.insertedIds;
}
if (err.errorInClaims && err.errorInClaims.length > 0) {
this.errorInRecords = err.errorInClaims;
}
}*/
this.isertBulkClaims(claims);
ClaimInsertComponent.handleError("Error inserting direct records: " + JSON.stringify(directclaims), err);
@ -209,30 +262,24 @@ export class ClaimInsertComponent {
}
private isertBulkClaims(claims: ClaimRecord2Insert[]) {
console.log("claims");
console.log(claims);
this.errors.splice(0, this.errors.length);
this.subscriptions.push(this.claimService.insertBulkClaims(claims, this.properties.claimsAPIURL).subscribe(
data => {
this.insertedClaims = data.insertedIds;
this.errorInClaims = data.errorInClaims;
//TODO remove - testing having errors in claims
// this.insertedClaims.pop();
// this.insertedClaims.pop();
// this.errorInClaims.push(claims[1]);
// this.insertedClaims.splice(0,this.insertedClaims.length);
// this.errorInClaims = claims;
//remove till here
if (claims.length != this.insertedClaims.length) {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "claimServiceFail2Insert";
error.inserted = this.insertedClaims.length;
error.failed = this.errorInClaims.length;
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.claims2Insert = claims.length;
this.claimsJob = data.data;
if(this.properties.logServiceUrl) {
for(let info of this.infoToLog) {
this.subscriptions.push(this._logService.logLink(this.properties, info[0],info[1]).subscribe(res => {
}));
}
}
this.afterclaimsInsertion();
this.saveLocalStorage();
let timerSubscription = timer(0, 10000).pipe(
map(() => {
this.getStatus(); // load data contains the http request
})
).subscribe();
this.subscriptions.push(timerSubscription);
},
err => {
err = err && err.error?err.error:err;
@ -335,19 +382,27 @@ export class ClaimInsertComponent {
}
private afterclaimsInsertion() {
this.loading.close();
this.claiming = false;
this.loading.close();
if (this.errorInClaims.length == 0 && this.insertedClaims.length > 0) {
localStorage.removeItem(this.localStoragePrefix + "sources");
localStorage.removeItem(this.localStoragePrefix + "results");
this._router.navigate(['/myclaims'], {queryParams: this.params});
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") == -1) {
this._router.navigate([this.properties.myClaimsLink], {queryParams: this.params});
}else if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") != -1) {
this._router.navigate([this.properties.myClaimsLink], {relativeTo: this.route});
}else{
this._router.navigate(["/"]);
}
}
}
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: contextEntity.context.concept.id,
@ -360,11 +415,12 @@ export class ClaimInsertComponent {
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: projectEntity.id,
@ -377,11 +433,29 @@ export class ClaimInsertComponent {
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createOrganizationClaim(resultEntity: ClaimEntity, organizationEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: organizationEntity.id,
sourceType: "organization",
sourceCollectedFrom: "openaire",
sourceAccessRights: "OPEN",
sourceEmbargoEndDate: "",
targetId: resultEntity.id,
targetType: resultEntity.type,
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string): ClaimRecord2Insert {
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
@ -395,7 +469,9 @@ export class ClaimInsertComponent {
targetCollectedFrom: inlineResult.result.source,
targetAccessRights: inlineResult.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(inlineResult),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
@ -405,12 +481,13 @@ export class ClaimInsertComponent {
}
return ""
}
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[]) {
static createOpenAIREId(id, idSuffix:string):string {
return id.indexOf( "::" ) == -1 ? ("userclaim___::" + Md5.hashStr(id + idSuffix)):id;
}
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[], idSuffix:string) {
let entity = {};
const md5_id = Md5.hashStr(resultEntity.id);
entity["originalId"] = "userclaim___::" + md5_id;
entity["openaireId"] = "userclaim___::" + md5_id;
entity["originalId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
entity["openaireId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
entity["title"] = resultEntity.title;
entity["title"] = (Array.isArray(resultEntity.title) && resultEntity.title.length > 0) ? resultEntity.title[0] : resultEntity.title;
@ -459,7 +536,7 @@ export class ClaimInsertComponent {
entity["linksToProjects"] = [];
}
let project: ClaimEntity = results[i];
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderName + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderShortname + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
} else if (results[i].context) {
@ -517,8 +594,77 @@ export class ClaimInsertComponent {
}
if(this.defaultColors){
buttonClass+=" linksbaskettitles uk-padding-small ";
}
}
return buttonClass + "uk-text-center ";
}
getStatus(){
if(this.feedRecordsJob && ! (this.feedRecordsJob.status == "COMPLETE" || this.feedRecordsJob.status == "ERROR") ) {
this.subscriptions.push(this.claimService.getStatus(this.feedRecordsJob.id, this.properties.claimsAPIURL).subscribe(data => {
this.feedRecordsJob = data.data;
// console.log("feed", this.feedRecordsJob.status);
if (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR") {
this.insertedRecords = this.feedRecordsJob.insertedIds;
this.errorInRecords = this.feedRecordsJob.errorInClaims;
}
}, err => {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "jobError";
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.afterclaimsInsertion();
this.feedRecordsJob = null;
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
}
));
}
if(this.claimsJob) {
this.subscriptions.push(this.claimService.getStatus(this.claimsJob.id, this.properties.claimsAPIURL).subscribe(data => {
this.claimsJob = data.data;
// console.log("claim: ", this.claimsJob.status, this.feedRecordsJob.status?this.feedRecordsJob.status:" no feed job");
if ((this.claimsJob.status == "COMPLETE" || data.data.status == "ERROR") && ( !this.feedRecordsJob || (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR")) ) {
this.insertedClaims = this.claimsJob.insertedIds;
this.errorInClaims = this.claimsJob.errorInClaims;
if (this.claims2Insert != this.insertedClaims.length) {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "claimServiceFail2Insert";
error.inserted = this.insertedClaims.length;
error.failed = this.errorInClaims.length;
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
}
this.afterclaimsInsertion();
}
}, err => {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "jobError";
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.afterclaimsInsertion();
this.claimsJob = null;
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
}
));
}
}
saveLocalStorage(){
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
if (this.claimsJob != null) {
localStorage.setItem(this.localStoragePrefix + "claimsJob", JSON.stringify(this.claimsJob));
}
if (this.feedRecordsJob != null) {
localStorage.setItem(this.localStoragePrefix + "feedRecordsJob", JSON.stringify(this.feedRecordsJob));
}
}
}

View File

@ -6,10 +6,11 @@ import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
import {ClaimInsertComponent} from './insertClaim.component';
import {ClaimServiceModule} from '../../claim-utils/service/claimsService.module';
import {IconsModule} from "../../../utils/icons/icons.module";
import {LogServiceModule} from "../../../utils/log/LogService.module";
@NgModule({
imports: [
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule, LogServiceModule
],
declarations: [ClaimInsertComponent],
exports:[ ClaimInsertComponent]

View File

@ -1,20 +1,61 @@
<ng-template #destinations_basket>
<div *ngIf="(results.length)> 0 || showOptions.show=='result'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height: 17px;">
<start-over *ngIf=" (results.length)> 0"
[results]="results" [localStoragePrefix]="localStoragePrefix+'results'"
message="all results (projects, communities, research results)"
class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show=='result'" [results]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit"></bulk-claim>
</div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="results.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more entities can be added.
</div>
<claim-selected-results sectionTitle="Selected Results" [results]="results"
[localStoragePrefix]="localStoragePrefix+'results'" type="target">
</claim-selected-results>
<div *ngIf="(results.length) == 0 " class=" uk-text-center">
No entities to link with the sources. Start adding entities from the left panel.
</div>
</div>
</ng-template>
<div class="linking uk-background-default">
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
<breadcrumbs *ngIf="!inlineEntity" [breadcrumbs]="breadcrumbs"></breadcrumbs>
<!-- [routerLink]="inlineEntity.result?.url.split('?')[0]"-->
<!-- [queryParams]="routerHelper.createQueryParam(inlineEntity.result?.url.split('?')[1].split('=')[0], inlineEntity.id)"-->
<a *ngIf="inlineEntity && inlineEntity.result"
(click)="back()"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>
</a>
<a *ngIf="inlineEntity && inlineEntity.project"
[routerLink]="inlineEntity.project?.url?.split('?')[0]"
[queryParams]="routerHelper.createQueryParam(inlineEntity.project?.url.split('?')[1].split('=')[0], inlineEntity.id)"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>
</a>
</div>
</div>
<div uk-sticky="offset: 65; bottom: #pageBottom; media: @m" class="uk-blur-background">
<div *ngIf="!inlineEntity" uk-sticky="offset: 65; end: #pageBottom; media: @m" class="uk-blur-background">
<div class="uk-section-xsmall">
<stepper>
<step *ngIf="!inlineEntity" [status]="stepStatus('source')" stepId="source" stepNumber="1"
<step [status]="stepStatus('source')" stepId="source" stepNumber="1"
[stepText]="'Find Sources'" (stepChanged)="stepHasChanged($event)"
[active]="this.showOptions.show" [showStepLine]="false"></step>
<step [status]="stepStatus('target')" stepId="target" [stepNumber]="inlineEntity?1:2"
[stepText]="'Link Source' + (inlineEntity?'':'s') + ' to Entities'"
<step [status]="stepStatus('target')" stepId="target" [stepNumber]="2"
[stepText]="'Link Sources to Entities'"
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
[showStepLine]="!inlineEntity"></step>
<step [status]="stepStatus('claim')" stepId="claim" [stepNumber]="inlineEntity?2:3"
[showStepLine]="true"></step>
<step [status]="stepStatus('claim')" stepId="claim" [stepNumber]="3"
[stepText]="'Summarize and finish'"
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
[showStepLine]="true"></step>
@ -26,27 +67,30 @@
[results]="results" [sources]="sources"
[localStoragePrefix]="localStoragePrefix" [inlineEntity]="inlineEntity"
[showOptions]="showOptions" [properties]=properties [pageContents]="pageContents"
[defaultColors]="!communityId" [communityId]="communityId"
[defaultColors]="!communityId" [communityId]="communityId" [claimsProperties]="claimsProperties"
>
</metadata-preview>
<div id="tm-main" class="uk-section uk-padding-remove-top" *ngIf="showOptions.show != 'claim'">
<div>
<schema2jsonld *ngIf="url" [URL]="url" name="Link your {{openaireEntities.RESULTS}}" type="other"></schema2jsonld>
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div class="uk-container uk-container-large">
<div *ngIf="properties && claimsProperties" class="uk-section uk-padding-remove-top">
<div class="uk-container uk-container-large">
<div class="uk-grid basketContainer" *ngIf="showOptions.show!='claim'" uk-grid>
<div class="uk-width-2-3 uk-position-z-index">
<div class="uk-width-2-3@m uk-position-z-index uk-flex-first@m uk-flex-last uk-margin-medium-top">
<h2 *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.show" class="uk-text-center">Link source to</h2>
<div *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.guideText" class="uk-text-center">{{claimsProperties.INLINE_ENTITY.guideText}}</div>
<div *ngIf="showOptions.show=='source'">
<claim-result-search-form [selectedResults]="sources" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'"
[basketLimit]="basketLimit"
[basketLimit]="basketLimit" [centerAlign]="!!inlineEntity"
></claim-result-search-form>
</div>
<div *ngIf="showOptions.show=='project'">
<claim-projects-search-form [selectedProjects]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-projects-search-form>
</div>
<div *ngIf="showOptions.show=='context'">
@ -54,93 +98,87 @@
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-contexts-search-form>
</div>
<div *ngIf="showOptions.show=='result'">
<claim-result-search-form [selectedResults]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-result-search-form>
</div>
</div>
<!-- Basket-->
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3">
<div id="basket" uk-sticky="offset: 220; bottom: !*; media: @m" style="z-index: 0!important;">
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3@m uk-flex-last@m uk-flex-first uk-margin-medium-top">
<div id="basket" uk-sticky="offset: 220; end: !*; media: @m" style="z-index: 0!important;">
<div class="uk-card uk-card-default linkingBasket">
<div class="uk-card-body uk-padding-small">
<div class="uk-margin-right">
<ul class="uk-tab" uk-tab>
<li [class.uk-active]="showOptions.basketShowSources"
(click)="showOptions.basketswitchToSources()">
<a>
Sources to link ({{(sources.length + (inlineEntity ? 1 : 0)) |number}})
</a>
</li>
<li [class.uk-disabled]="sources.length == 0 && !inlineEntity"
[class.uk-active]="showOptions.basketShowLinksTo">
<a (click)="showOptions.basketswitchToLinkTo()">Link to <span
*ngIf="results.length> 0">({{(results.length) | number}})</span>
</a>
</li>
</ul>
<div *ngIf="showOptions.basketShowSources">
<div class="uk-height-medium uk-overflow-auto">
<div *ngIf="showOptions.show == 'source'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height:17px;">
<start-over *ngIf="showOptions.show == 'source' && sources.length> 0"
[results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'"
message="all sources" class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show == 'source'" [results]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
>
</bulk-claim>
<div>
<ng-container *ngIf="inlineEntity">
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-margin-small-bottom">
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.source_title}}</div>
<claim-selected-results [results]="[inlineEntity]"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="false" type="source">
</claim-selected-results>
</div>
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-padding-small uk-padding-remove-horizontal"><hr class="uk-margin-remove"/></div>
<div class="uk-margin-small-top">
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.target_title}} <span *ngIf="results.length> 0">({{(results.length) | number}})</span></div>
<ng-container *ngTemplateOutlet="destinations_basket"></ng-container>
</div>
</ng-container>
<ng-container *ngIf="!inlineEntity">
<ul class="uk-tab" uk-tab>
<li [class.uk-active]="showOptions.basketShowSources"
(click)="showOptions.basketswitchToSources()">
<a>
Sources to link ({{(sources.length) |number}})
</a>
</li>
<li [class.uk-disabled]="sources.length == 0"
[class.uk-active]="showOptions.basketShowLinksTo">
<a (click)="showOptions.basketswitchToLinkTo()">Link to <span
*ngIf="results.length> 0">({{(results.length) | number}})</span>
</a>
</li>
</ul>
<div *ngIf="showOptions.basketShowSources">
<div class="uk-height-max-medium uk-overflow-auto uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<div *ngIf="showOptions.show == 'source'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height:17px;">
<start-over *ngIf="showOptions.show == 'source' && sources.length> 0"
[results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'"
message="all sources" class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show == 'source'" [results]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
>
</bulk-claim>
</div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="sources.length == 0 && !inlineEntity " class="uk-text-center uk-text-meta">
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
</div>
<div *ngIf="sources.length >= basketLimit " class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more sources can be added.
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="sources.length == 0" class="uk-text-center uk-text-meta">
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
</div>
<div *ngIf="sources.length >= basketLimit " class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more sources can be added.
</div>
<claim-selected-results *ngIf="sources.length > 0" [results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="true" type="source">
</claim-selected-results>
</div>
<claim-selected-results *ngIf="inlineEntity" [results]="[inlineEntity]"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="false" type="source">
</claim-selected-results>
<claim-selected-results *ngIf="sources.length > 0" [results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="true" type="source">
</claim-selected-results>
</div>
</div>
</div>
<div *ngIf="showOptions.basketShowLinksTo">
<div class="uk-height-medium uk-overflow-auto">
<div *ngIf="(results.length)> 0 || showOptions.show=='result'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height: 17px;">
<start-over *ngIf=" (results.length)> 0"
[results]="results" [localStoragePrefix]="localStoragePrefix+'results'"
message="all results (projects, communities, research results)"
class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show=='result'" [results]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit"></bulk-claim>
</div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="results.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more entities can be added.
</div>
<claim-selected-results sectionTitle="Selected Results" [results]="results"
[localStoragePrefix]="localStoragePrefix+'results'" type="target">
</claim-selected-results>
<div *ngIf="(results.length) == 0 " class=" uk-text-center">
No entities to link with the sources. Start adding entities from the left panel.
</div>
<div *ngIf="showOptions.basketShowLinksTo">
<div class="uk-height-max-medium uk-overflow-auto uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<ng-container *ngTemplateOutlet="destinations_basket"></ng-container>
</div>
</div>
</div>
</ng-container>
</div>
</div>
<div *ngIf="showOptions.show == 'source'"
@ -164,7 +202,7 @@
<button class="uk-flex uk-flex-middle uk-button uk-button-text"
[class.uk-disabled]="results.length == 0" [disabled]="results.length == 0">
<icon *ngIf="inlineEntity" name="link" visuallyHidden="link" [flex]="true"></icon>
<div class="uk-width-expand uk-margin-small-left">STEP {{inlineEntity ? '2' : '3'}} - FINALISE AND FINISH</div>
<div class="uk-width-expand uk-margin-small-left"><ng-container *ngIf="!inlineEntity">STEP {{inlineEntity ? '2' : '3'}} - </ng-container>SUMMARISE</div>
</button>
</div>
</div>

View File

@ -13,13 +13,18 @@ import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {StringUtils} from "../../utils/string-utils.class";
import {RouterHelper} from "../../utils/routerHelper.class";
import { Location } from '@angular/common';
import {LoginErrorCodes} from "../../login/utils/guardHelper.class";
import {UserManagementService} from "../../services/user-management.service";
import {ClaimsProperties} from "../claim-utils/claims.properties";
@Component({
selector: 'linking-generic',
templateUrl: 'linkingGeneric.component.html'
})
export class LinkingGenericComponent {
@Input() piwikSiteId = null;
@Input() pageTitle: string = "Create links between research objects";
piwiksub:any;
@ -37,34 +42,43 @@ export class LinkingGenericComponent {
// show linkToEntities /values: result, project, context
@Input() sources:ClaimEntity[] =[];
properties:EnvProperties;
properties:EnvProperties = properties;
public openaireEntities = OpenaireEntities;
@Input() localStoragePrefix:string = "linking_";
url=null;
@ViewChild(AlertModal) alert;
public pageContents = null;
@Input() breadcrumbs: Breadcrumb[] = [];
public routerHelper: RouterHelper = new RouterHelper();
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
constructor (private _router: Router, private route: ActivatedRoute, private entitySearch:EntitiesSearchService,
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
private seoService: SEOService, private helper: HelperService, private cdr: ChangeDetectorRef ) {
private seoService: SEOService, private helper: HelperService, private cdr: ChangeDetectorRef,
private location: Location, private userManagementService: UserManagementService) {
}
subscriptions = [];
ngOnInit() {
if(this.breadcrumbs.length === 0) {
/* if(!this.claimsProperties){
this.claimsProperties = new ClaimsProperties();
}*/
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
if (!user) {
this.saveStateAndRedirectLogin();
}
}));
if(this.breadcrumbs.length === 0) {
this.breadcrumbs.push({name: 'home', route: '/'});
this.breadcrumbs.push({name: "Link", route: null});
}
this.showOptions.show = 'source';
this.showOptions.initSelectOptions();
this.showOptions.initSelectOptions(this.claimsProperties);
if(this.inlineEntity){
this.showOptions.showLinkTo();
// this.showOptions.basketShowLinksTo = true;
this.showOptions.show = this.showOptions.linkTo;
}
this.properties = properties;
this.url = this.properties.domain + this.properties.baseLink+this._router.url;
var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results.";
@ -74,13 +88,13 @@ export class LinkingGenericComponent {
this.seoService.createLinkForCanonicalURL(this.url, false);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if(properties.adminToolsPortalType !== "explore") {
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
})
}
if( typeof localStorage !== 'undefined') {
@ -92,6 +106,11 @@ export class LinkingGenericComponent {
if(localStorage.getItem(this.localStoragePrefix + "sources")){
this.sources = JSON.parse(localStorage.getItem(this.localStoragePrefix + "sources"));
}
if(localStorage.getItem(this.localStoragePrefix + "claimsJob")){
let job = JSON.parse(localStorage.getItem(this.localStoragePrefix + "claimsJob"));
if(job.status != "COMPLETE"){
this.showOptions.show = 'claim'; }
}
}
}
@ -150,18 +169,19 @@ export class LinkingGenericComponent {
stepHasChanged(stepId){
if(stepId == 'source'){
console.log("show source")
// console.log("show source")
this.showOptions.showSource();
}else if(stepId == 'target'){
console.log("show target")
// console.log("show target")
this.showOptions.show = this.showOptions.linkTo;
this.showOptions.showLinkTo();
}else if(stepId == 'claim'){
console.log("show target")
// console.log("show target")
this.showOptions.show = 'claim';
}
this.cdr.detectChanges();
console.log('stepHasChanged', stepId, this.showOptions.show)
HelperFunctions.scroll(true);
// console.log('stepHasChanged', stepId, this.showOptions.show)
}
stepStatus(stepId){
@ -193,5 +213,30 @@ export class LinkingGenericComponent {
}
}
}
private getEntityName (entityType:string, plural:boolean) {
return StringUtils.getEntityName(entityType, plural);
}
back(): void {
if(typeof document !== 'undefined') {
this.location.back();
}
}
saveStateAndRedirectLogin() {
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
}
});
}
}

View File

@ -7,20 +7,16 @@ import {SelectedContextsModule} from './selected/selectedContexts.module';
import {SelectedPublicationsModule} from './selected/selectedResults.module';
import {LinkingGenericComponent} from './linkingGeneric.component';
import {StartOverModule} from '../claim-utils/startOver.module';
import {LoginGuard} from '../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {ClaimContextSearchFormModule} from '../claim-utils/claimContextSearchForm.module';
import {ClaimProjectsSearchFormModule} from '../claim-utils/claimProjectSearchForm.module';
import {BulkClaimModule} from './bulkClaim/bulkClaim.module';
import {ClaimResultSearchFormModule} from '../claim-utils/claimResultSearchForm.module';
import {HelperModule} from '../../utils/helper/helper.module';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
import {MetadataPreviewModule} from './selected/metadataPreview.module';
import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.module";
import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
import {StepperModule} from "../../sharedComponents/stepper/stepper.module";
import {IconsModule} from "../../utils/icons/icons.module";
@ -34,10 +30,9 @@ import {link} from "../../utils/icons/icons";
StartOverModule,
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
PiwikServiceModule,
MatSelectModule, BreadcrumbsModule, StepperModule, IconsModule
],
providers: [LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers: [],
declarations: [
LinkingGenericComponent
], exports: [

View File

@ -3,13 +3,21 @@ import {SharedModule} from '../../../../openaireLibrary/shared/shared.module';
import {ClaimEntityTitleComponent} from "./ClaimEntityTitle.component";
import {ClaimEntityResultMetadataComponent} from "./ClaimEntityResultMetadata.component";
import {ClaimEntityProjectMetadataComponent} from "./ClaimEntityProjectMetadata.component";
import {IconsService} from "../../../utils/icons/icons.service";
import {coins} from "../../../utils/icons/icons";
import {IconsModule} from "../../../utils/icons/icons.module";
@NgModule({
imports: [
SharedModule
SharedModule,
IconsModule
],
declarations: [
ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent
], exports:[ ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent]
})
export class ClaimEntitiesMetadataModule { }
export class ClaimEntitiesMetadataModule {
constructor(private _iconsService:IconsService) {
this._iconsService.registerIcons([coins])
}
}

View File

@ -0,0 +1,11 @@
@import (reference) "~src/assets/openaire-theme/less/_import-variables";
.claim-entity-metadata {
& > *:not(:last-child):not(.other-separator)::after {
content: "\2022";
font-weight: normal;
margin-left: @global-xsmall-margin;
margin-right: @global-xsmall-margin;
}
}

View File

@ -4,18 +4,36 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
@Component({
selector: 'claim-project-metadata',
template: `
<div *ngIf="entity.type == 'project' && entity.project" class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'10px':'20px'">
<div *ngIf="entity.project.funderName">
<span class="uk-text-meta">Funder: </span>{{entity.project.funderName}}
</div>
<div *ngIf="entity.project.code">
<span class="uk-text-meta">GrandID: </span>{{entity.project.code}}
</div>
<div *ngIf=" !shortVersion && (entity.project.startDate || entity.project.endDate)">
<span class="uk-text-meta">Duration: </span>{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
</div>
</div>
`
<ng-container *ngIf="entity.type == 'project' && entity.project">
<div *ngIf="!shortVersion" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
[class.uk-margin-xsmall-top]="!shortVersion">
<span class="uk-text-capitalize">
{{entity.type == 'project' && entity.project.code == 'unidentified'?'funder':entity.type}}
</span>
<span *ngIf="entity.project.startDate || entity.project.endDate">
{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
</span>
</div>
<div *ngIf="shortVersion && entity.type == 'project' && entity.project.code == 'unidentified'" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
[class.uk-margin-xsmall-top]="!shortVersion">
<span class="uk-text-capitalize">
funder
</span>
</div>
<div *ngIf="entity.project.code!='unidentified'" class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'0px':'10px'"
[class.uk-margin-small-top]="!shortVersion">
<div *ngIf="entity.project.code">
<span class="uk-text-meta">Project Code: </span>{{entity.project.code}}
</div>
<div *ngIf="entity.project.funderName || entity.project.funderShortname">
<span class="uk-text-meta">Funding: </span>{{entity.project.funderName?entity.project.funderName:entity.project.funderShortname}}
</div>
</div>
</ng-container>
`,
styleUrls: ['ClaimEntityMetadata.component.less']
})

View File

@ -4,29 +4,37 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
@Component({
selector: 'claim-result-metadata',
template: `
<div *ngIf="entity.result" class="uk-text-small">
<div *ngIf="entity.result.authors && entity.result.authors.length >0 " class="uk-margin-small-bottom">
<span class="uk-text-meta">Authors: </span>{{sliceArray(entity.result.authors)}}
</div>
<div *ngIf="!shortVersion && entity.result.editors&& entity.result.editors.length > 0" class="uk-margin-small-bottom">
<span class="uk-text-meta">Editors: </span>{{sliceArray(entity.result.editors)}}
</div>
<div *ngIf="!shortVersion" class="uk-flex uk-flex-wrap" style="grid-gap: 20px;">
<span *ngIf="entity.result.publisher!=null">
<span class="uk-text-meta uk-margin-small-bottom">Publisher: </span>{{entity.result.publisher}}
<div *ngIf="entity.result">
<!-- display all existing data similar to entity-metadata -->
<div *ngIf="!shortVersion" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis uk-margin-xsmall-top">
<span class="uk-text-capitalize uk-text-italic">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</span>
<span *ngIf="entity.result.publisher!=null">
{{entity.result.publisher}}
</span>
<span *ngIf="entity.result.journal!=null">
<span class="uk-text-meta uk-margin-small-bottom">Journal: </span>{{entity.result.journal}}
</span>
<span *ngIf="entity.result.date">
<span class="uk-text-meta uk-margin-small-bottom">Published: </span>
<span *ngIf="entity.result.date">
<span [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{entity.result.date}}</span>
</span>
<div [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{getProjectDurationMessage(entity)}}
</div>
<span *ngIf="entity.result.journal!=null">
{{entity.result.journal}}
</span>
<div *ngIf="entity.result.editors && entity.result.editors.length > 0">
{{sliceArray(entity.result.editors)}}
</div>
</div>
<div *ngIf="entity.result.authors && entity.result.authors.length > 0" class="uk-flex uk-flex-wrap uk-text-small uk-text-emphasis uk-text-italic"
[class.uk-margin-small-top]="!shortVersion">
{{sliceArray(entity.result.authors)}}
</div>
<div class="uk-text-small uk-margin-top">
<span *ngIf="getProjectDurationMessage(entity)" [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">
{{getProjectDurationMessage(entity)}}
</span>
</div>
</div>
`
`,
styleUrls: ['ClaimEntityMetadata.component.less']
})

View File

@ -1,64 +1,80 @@
import {Component, Input} from '@angular/core';
import {ClaimEntity} from '../../claim-utils/claimHelper.class';
import {StringUtils} from "../../../utils/string-utils.class";
@Component({
selector: 'claim-title',
template:
`
<div class="uk-grid uk-flex uk-flex-middle">
<span *ngIf="showIcon" >
<span *ngIf=" entity.result" class="material-icons uk-text-small uk-text-meta" >insert_drive_file
</span>
<span *ngIf=" entity.project"
class="material-icons uk-text-small uk-text-meta">assignment_turned_in
</span>
<span *ngIf="entity.type=='community'" style="margin-right: 2px;"
class="material-icons uk-text-small uk-text-meta">people
</span></span>
<div class="uk-width-expand " style="word-break: break-word;" [class.uk-h6]="!shortVersion" [class.uk-text-bold]="shortVersion" [class.uk-text-truncate]="shortVersion" [class.uk-margin-bottom]="!shortVersion" [class.uk-padding-remove-left]="showIcon">
<a *ngIf="entity.result && entity.result.url" target="_blank" [href]="entity.result.url"
class="uk-link uk-link-heading">{{entity.title ? sliceString(entity.title) : '[No title available]'}}</a>
<span
*ngIf="(entity.result && !entity.result.url)">{{entity.title ? sliceString(entity.title) : '[No title available]'}}</span>
<span *ngIf="entity.type=='project' && entity.project">
<a *ngIf="entity.project && entity.project.url" target="_blank" [href]="entity.project.url"
class="uk-text-link">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
template: `
<div class="uk-grid uk-flex uk-flex-middle">
<span *ngIf="showIcon" class="uk-flex uk-margin-xsmall-right">
<icon *ngIf="entity.result" class=" uk-text-small uk-text-meta" name="insert_drive_file">
</icon>
<icon *ngIf="entity.project && entity.project.code !='unidentified'" class=" uk-text-small uk-text-meta" name="assignment_turned_in">
</icon>
<icon *ngIf="entity.project && entity.project.code =='unidentified'" class="uk-text-small uk-text-meta" name="coins" [ratio]="1.4">
</icon>
<icon *ngIf="entity.organization" class=" uk-text-small uk-text-meta" name="account_balance">
</icon>
<icon *ngIf="entity.type=='community'" class=" uk-text-small uk-text-meta" style="margin-right: 2px;" name="people">
</icon>
</span>
<div class="uk-width-expand multi-line-ellipsis lines-3" style="word-break: break-word;"
[class.uk-padding-remove-left]="showIcon" [class.uk-text-truncate]="shortVersion">
<div class="uk-margin-remove uk-text-break uk-inline-block"
[class.uk-h6]="!shortVersion" [class.uk-text-bold]="shortVersion">
<a *ngIf="entity.result && entity.result.url" target="_blank" [href]="entity.result.url"
class="uk-link uk-text-decoration-none uk-width-expand">
{{entity.title ? sliceString(entity.title) : '[No title available]'}}
</a>
<span
*ngIf="(entity.project && !entity.project.url)">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</span>
</span>
<span *ngIf="entity.type=='community' && entity.context">
<span *ngIf=" entity.context.community != entity.context.concept.label">
{{entity.context.community }} > {{entity.context.category}} >
</span>
<span> {{entity.context.concept.label}}</span>
</span>
<span *ngIf="(entity.result && !entity.result.url)">
{{entity.title ? sliceString(entity.title) : '[No title available]'}}
</span>
<span *ngIf="entity.type=='project' && entity.project && entity.project.code =='unidentified'">
<span *ngIf="!shortVersion">
{{(entity.project.funderShortname ? '[' + entity.project.funderShortname + '] ' : '') + entity.project.funderName}}
</span>
<span *ngIf="shortVersion">
{{sliceString(entity.project.funderName)}}
</span>
</span>
<span *ngIf="entity.type=='project' && entity.project && entity.project.code!='unidentified'">
<a *ngIf="entity.project && entity.project.url" target="_blank" [href]="entity.project.url"
class="uk-link uk-text-decoration-none uk-width-expand">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</a>
<span *ngIf="(entity.project && !entity.project.url)">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</span>
</span>
<span *ngIf="entity.type=='organization' && entity.organization">
{{sliceString(entity.title)}}
</span>
<span *ngIf="entity.type=='community' && entity.context">
<span *ngIf=" entity.context.community != entity.context.concept.label">
{{entity.context.community }} > {{entity.context.category}} >
</span>
<span>
{{entity.context.concept.label}}
</span>
</span>
</div>
</div>
</div>
</div>
`
})
export class ClaimEntityTitleComponent {
@Input() entity: ClaimEntity;
@Input() slice:boolean = false;
@Input() sliceSize:number = 45;
@ -66,14 +82,13 @@ export class ClaimEntityTitleComponent {
@Input() showIcon: boolean = false;
ngOnInit() {
}
sliceString(mystr:string): string {
if(this.slice){
if(this.slice){
// return StringUtils.sliceString(mystr,this.sliceSize);
}
return mystr;
}
return mystr;
}
}

View File

@ -6,15 +6,14 @@
<div class="uk-width-expand">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="uk-grid uk-grid-divider uk-child-width-1-2@m uk-child-width-1-1@s" uk-grid>
<div class="uk-grid uk-grid-divider uk-child-width-1-1@s" uk-grid [class.uk-child-width-1-2@m] = "claimsProperties.INLINE_ENTITY.show" >
<!-- Sources-->
<div>
<div *ngIf="claimsProperties.INLINE_ENTITY.show">
<div class=" uk-margin uk-animation-toggle">
<span class="uk-h6 "> SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
<span class="uk-h6 "> {{claimsProperties.METADATA_PREVIEW.source_title}} ({{sources.length + (inlineEntity ? 1 : 0) | number}})
</span>
<a *ngIf="!inlineEntity" class="uk-float-right" (click)="showOptions.showSource() "> <span
uk-icon="pencil"></span>Edit
sources</a>
<a *ngIf="!inlineEntity" class="uk-float-right uk-text-small" (click)="showOptions.showSource() "> <span
uk-icon="pencil" class="uk-margin-xsmall-right"></span>{{claimsProperties.METADATA_PREVIEW.edit_source_title}}</a>
</div>
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade uk-list-divider">
<li>
@ -51,10 +50,10 @@
<ul *ngIf="!inlineEntity && sources.length > 0 " class="uk-list uk-animation-fade uk-list-divider">
<li *ngFor=" let entity of sources ">
<div class="uk-grid uk-text-small uk-margin-top">
<div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<!-- <div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<span class="material-icons uk-text-small uk-text-meta">insert_drive_file</span>
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
</div> -->
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
@ -153,13 +152,15 @@
</div>
<!-- Results-->
<div class=" ">
<div class=" uk-margin ">
<span class=" uk-h6 "> LINK TO ({{results.length | number}})</span>
<div class=" uk-margin uk-grid">
<span class=" uk-h6 uk-width-expand"> {{claimsProperties.METADATA_PREVIEW.target_title}} ({{results.length | number}})</span>
<div class="uk-width-auto uk-flex">
<a class="uk-float-right" (click)="showOptions.showLinkTo()"> <span
uk-icon="pencil"></span>Edit
entities</a>
<icon [name]="claimsProperties.METADATA_PREVIEW.edit_target_icon" [flex]="true"></icon>
<a class=" uk-margin-left-xsmall uk-text-small" (click)="showOptions.showLinkTo()">
{{claimsProperties.METADATA_PREVIEW.edit_target_title}}</a>
</div>
</div>
<div *ngIf="results.length == 0">
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
@ -174,7 +175,7 @@
<li *ngFor=" let entity of results "
style="z-index: 0 !important;">
<div class="uk-grid uk-text-small uk-margin-top">
<div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<!-- <div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<span *ngIf="entity.result" class="material-icons uk-text-small uk-text-meta">insert_drive_file
</span>
<span *ngIf="entity.project"
@ -184,7 +185,7 @@
class="material-icons uk-text-small uk-text-meta">people
</span>
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
</div> -->
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
@ -250,6 +251,14 @@
None of the links saved.
</div>
</div>
<div *ngIf="message.type == 'jobError'">
<div class="">
<span class=" uk-text-bold">The saving status of your links can't be fetched. Please check your links or start over. </span>
<br>
<a routerLinkActive="router-link-active" routerLink="/myclaims">Manage your links here</a>
</div>
</div>
</div>
</div>
<div *ngIf="warnings.length > 0"

View File

@ -4,6 +4,7 @@ import {ClaimEntity, ClaimsErrorMessage, Message, ShowOptions} from '../../claim
import {EnvProperties} from "../../../utils/properties/env-properties";
import {Dates} from "../../../utils/string-utils.class";
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
import {ClaimsProperties} from "../../claim-utils/claims.properties";
@Component({
selector: 'metadata-preview',
@ -28,6 +29,7 @@ export class MetadataPreviewComponent {
@ViewChild(AlertModal) alertApplyAll;
@Input() localStoragePrefix: string = "";
@Input() communityId:string= null;
@Input() claimsProperties:ClaimsProperties;
errors:ClaimsErrorMessage[] = [];
warnings:Message[] = [];
public commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every entity

View File

@ -11,16 +11,17 @@ import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import {HelperModule} from "../../../utils/helper/helper.module";
import {SelectedPublicationsModule} from "./selectedResults.module";
import {IconsModule} from "../../../utils/icons/icons.module";
@NgModule({
imports: [
SharedModule,
AlertModalModule,
ClaimEntitiesMetadataModule,
InsertClaimsModule,
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
HelperModule, SelectedPublicationsModule
],
imports: [
SharedModule,
AlertModalModule,
ClaimEntitiesMetadataModule,
InsertClaimsModule,
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
HelperModule, SelectedPublicationsModule, IconsModule
],
declarations: [MetadataPreviewComponent],
exports:[MetadataPreviewComponent]
})

View File

@ -19,7 +19,7 @@ import {Subscriber} from "rxjs";
<div class="uk-margin-top">
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
[piwikSiteId]="piwikSiteId" pageTitle="My links">
pageTitle="My links">
</displayClaims>
</div>
</div>
@ -30,8 +30,6 @@ import {Subscriber} from "rxjs";
export class MyClaimsComponent {
@Input() claimsInfoURL: string;
@Input() communityId:string;
@Input() piwikSiteId = null;
@Input() userInfoURL: string;
public user: User = null;
constructor(private userManagementService: UserManagementService, private _router: Router) {}

View File

@ -3,9 +3,6 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { MyClaimsComponent } from './myClaims.component';
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
import {LoginGuard} from'../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
@NgModule({
imports: [
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
DisplayClaimsModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers:[],
declarations: [
MyClaimsComponent
], exports: [MyClaimsComponent]

View File

@ -56,12 +56,11 @@ export class CommunitiesService {
result['description'] = resData.description;
result['date'] = resData.creationDate;
result['status'] = 'all';
result['claim'] = resData.claim;
result['membership'] = resData.membership;
if (resData.hasOwnProperty('status')) {
result['status'] = resData.status;
const status = ['all', 'hidden', 'manager'];
if (status.indexOf(result['status']) === -1) {
result['status'] = 'hidden';
}
result.validateStatus();
}
if (resData.type != null) {
result['type'] = resData.type;

View File

@ -23,7 +23,7 @@ export class Layout {
variables['@global-background'] = Layout.convertRGBAtoRGB(options.backgrounds.light.color);
variables['@hero-background-image'] = (options.backgrounds.form.imageFile ? (this.getUrl(properties.utilsService + '/download/' + options.backgrounds.form.imageFile)) : 'none');
variables['@hero-background-position'] = options.backgrounds.form.position;
variables['@hero-fonts-mode'] = options.backgrounds.form.fontsDarkMode?'dark':'light';
variables['@hero-fonts-mode'] = options.backgrounds.form.fontsDarkMode == true ?'dark':'light';
}
if (options.buttons) {
//general
@ -174,6 +174,9 @@ export class CustomizationOptions {
}
public static checkForObsoleteVersion(current: CustomizationOptions, communityId: string) {
if(communityId === 'connect') {
return null;
}
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
let updated = Object.assign({}, defaultCO);
if (!current) {
@ -197,7 +200,7 @@ export class CustomizationOptions {
if (!current.backgrounds.form.position) {
current.backgrounds.form.position = "center bottom"
}
if (!current.backgrounds.form.fontsDarkMode) {
if (current.backgrounds.form.fontsDarkMode == undefined) {
current.backgrounds.form.fontsDarkMode = true;
}
if (!current.buttons) {

View File

@ -98,14 +98,14 @@ export class CommunityService {
community.description = resData.description;
community.date = resData.creationDate;
community.zenodoCommunity = resData.zenodoCommunity;
community.status = 'all';
community.status = 'PUBLIC';
community.claim = resData.claim;
community.membership = resData.membership;
community.type = resData.type;
community.otherZenodoCommunities = resData.otherZenodoCommunities;
if (resData.hasOwnProperty('status')) {
community.status = resData.status;
const status = ['all', 'hidden', 'manager'];
if (status.indexOf(community['status']) === -1) {
community.status = 'hidden';
}
community.validateStatus();
}
if (resData.subjects != null) {
community.subjects = Array.isArray(resData.subjects)?resData.subjects:[resData.subjects];

View File

@ -1,5 +1,4 @@
import {StringUtils} from "../../utils/string-utils.class";
import {properties} from "../../../../environments/environment";
import {SelectionCriteria} from "../../utils/entities/contentProvider";
export class CommunityInfo {
@ -14,8 +13,11 @@ export class CommunityInfo {
managers: string[];
date:Date;
subjects: string[];
status:string;
status:"all" | "manager" | "hidden" | "PUBLIC" | "RESTRICTED" | "PRIVATE";
claim: "all" | "managersOnly" | "membersOnly";
membership: "open" | "byInvitation";
zenodoCommunity:string;
otherZenodoCommunities: string[];
isUpload: boolean;
isSubscribed: boolean;
isManager: boolean;
@ -33,5 +35,24 @@ export class CommunityInfo {
}
return response;
}
public isOpen() {
return !(this.membership && this.membership === 'byInvitation');
}
public isPublic(){
return this.status == "all" || this.status == "PUBLIC";
}
public isRestricted(){
return this.status == "manager" || this.status == "RESTRICTED";
}
public isPrivate(){
return this.status == "hidden" || this.status == "PRIVATE";
}
public validateStatus(){
if(!(this.isPrivate() || this.isRestricted() || this.isPublic())){
this.status = "PRIVATE";
}
}
}
// export const prodReadyCommunities = ["dh-ch", "ee", "fam", "mes", "ni", "covid-19", "dariah", "epos", "egi"];

View File

@ -1,20 +1,13 @@
import {filter, map, mergeMap, take} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable, of} from 'rxjs';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {UserManagementService} from "../../services/user-management.service";
@Injectable()
export class ConnectAdminLoginGuard implements CanActivate, CanActivateChild {
export class ConnectAdminLoginGuard {
constructor(private router: Router,
private userManagementService: UserManagementService) {

View File

@ -1,11 +1,5 @@
import { Injectable } from '@angular/core';
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
CanLoad, Route, UrlSegment, CanActivateChild, UrlTree
} from '@angular/router';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import {Observable} from 'rxjs';
import {ConnectHelper} from '../connectHelper';
@ -14,7 +8,7 @@ import {CommunityService} from "../community/community.service";
import {map} from "rxjs/operators";
@Injectable()
export class IsCommunity implements CanActivate, CanActivateChild {
export class IsCommunity {
constructor(private router: Router,
private communityService: CommunityService) {

View File

@ -1,14 +1,18 @@
import {HttpParams} from '@angular/common/http';
import {properties} from "../../../environments/environment";
import {Session} from "../login/utils/helper.class";
import {CommunityInfo} from "./community/communityInfo";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
if(properties.dashboard === 'irish') {
return properties.adminToolsCommunity;
}
if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
domain = "test.openaire.eu"; //for testing
domain = "covid-19.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('eosc-portal.eu') != -1) {
@ -53,7 +57,12 @@ export class ConnectHelper {
}
public static isPrivate(community, user) {
return community && (community.status == "hidden" || (community.status == "manager" && !(Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isManager("community", community.communityId, user))))
public static isPrivate(community: CommunityInfo, user) {
return community && (community.isPrivate() || (community.isRestricted() && !(
Session.isPortalAdministrator(user) ||
Session.isCommunityCurator(user) ||
Session.isManager("community", community.communityId, user) ||
(!community.isOpen() && Session.isMember('community', community.communityId, user))
)))
}
}

View File

@ -7,15 +7,25 @@ import {map} from "rxjs/operators";
export class SearchCommunityProjectsService {
constructor(private http: HttpClient ) {}
searchProjects (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/projects";
searchProjects (properties:EnvProperties, pid: string, page=1, size=500):any {
return this.searchProjectsWithPaging(properties,pid,page, size, null, null);
}
searchProjectsWithPaging (properties:EnvProperties, pid: string, page=1, size=500, searchFilter, funder, orderBy = "name"):any {
let params = funder ? ["funder="+ funder] :[];
if (searchFilter) {
params.push("searchFilter="+ searchFilter)
}
params.push("orderBy="+ orderBy);
let url = properties.communityAPI+pid+"/projects/"+ (page-1) + "/" + size + (params.length > 0?"?" + params.join("&"):"");
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
countTotalProjects(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/projects";
let url = properties.communityAPI+pid+"/projects/0/1";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['length']));
.pipe(map(res => res['totalElements']));
}
getProjectFunders(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/funders";
return this.http.get<string[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
}
}

View File

@ -1,55 +0,0 @@
<div *ngIf="!hidden" class="">
<div *ngIf="showSaveResetButtons" class="uk-article-title custom-article-title">
User Email Preferences for Claims Notifications
</div>
<div *ngIf="userValidMessage.length > 0" class = "uk-alert uk-alert-danger uk-animation-fade" role="alert">
{{userValidMessage}}
</div>
<div *ngIf="savedMessage.length > 0" class="uk-alert uk-alert-success uk-animation-fade" role="alert">
{{savedMessage}}
</div>
<errorMessages [status]="[status]" [type]="'notification preferences'"></errorMessages>
<div *ngFor="let notification of notifications; let i=index" >
<!-- <div class="uk-accordion-title">Email preferences for {{preferencesFor}}: <strong>{{notification.openaireName}}</strong></div>-->
<!-- <div class="uk-accordion-content">-->
<form class="uk-form-horizontal"><!-- [formGroup]="myForm"-->
<!--[ngClass]="{'has-error':!myForm.controls.notify.valid && myForm.controls.notify.dirty}"-->
<div class="uk-margin uk-grid">
<div class=" inherit-color uk-width-medium"
title="Get e-mail notification when there are new user links related your community">Notify
for new user links:</div>
<mat-slide-toggle [checked]="notification.notify"
(change)="($event.source.checked = notification.notify);changeNotify(notification, !notification.notify, i)"></mat-slide-toggle>
</div>
<div *ngIf="notification.notify" [class]="notification.notify ? 'uk-margin' :
'uk-margin cursor-not-allowed'">
<div class="uk-form-label inherit-color">Frequency:</div>
<div class="uk-form-controls">
<select [class]="notification.notify ? 'uk-select' : 'uk-select uk-disabled'" id="form-horizontal-select"
[(ngModel)]="notification.frequency" (ngModelChange)="changeFrequency(i)" name="select_frequency">
<option [ngValue]="24" >Daily</option>
<option [ngValue]="48" >Every two days</option>
<option [ngValue]="168">Weekly</option>
</select>
</div>
</div>
<div *ngIf="showSaveResetButtons" class="uk-float-right">
<button type="submit" class="uk-button uk-button-primary" (click)="saveNotification(i)">Save Changes</button>
<button type="submit" class="uk-button" (click)="restoreNotification(i)">Reset</button>
</div>
</form>
</div>
<!-- </div>-->
<!-- </ul>-->
</div>

View File

@ -1,259 +0,0 @@
import {Component, Input} from '@angular/core';
import {Location} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router';
import {Session} from '../../login/utils/helper.class';
import {EnvProperties} from '../../utils/properties/env-properties';
import {MailPrefsService} from './mailPrefs.service';
import {ConnectHelper} from '../connectHelper';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../utils/errorMessages.component';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {properties} from "../../../../environments/environment";
import {Subscriber} from "rxjs";
declare var UIkit: any;
@Component({
selector: 'mailPrefs',
templateUrl: 'mailPrefs.component.html',
providers:[MailPrefsService]
})
export class MailPrefsComponent {
properties:EnvProperties;
subscriptions = [];
@Input() communityId: string;
public preferencesFor: string = "community";
public status: number;
public notifications = [];
public initialNotifications = [];
public prefsChanged = {};
public hidden: boolean = true;
//public showForbiddenMessage:boolean = false;
public userValidMessage:string = "";
public savedMessage: string = "";
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() showSaveResetButtons: boolean = true;
constructor (private _mailPrefsService: MailPrefsService, private route: ActivatedRoute, private _router:Router, private location: Location) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING;
}
ngOnInit() {
this.properties = properties;
this.subscriptions.push(this.route.params.subscribe(params => {
this.hidden = true;
console.debug(this.communityId);
if(!this.communityId){
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
}
if(!this.communityId) {
this.communityId = params['community'];
}
console.debug(this.communityId, params)
this.getEmailPreferences();
}));
}
getEmailPreferences() {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
if(this.communityId && this.communityId != "openaire") {
this.preferencesFor = "community";
this.subscriptions.push(this._mailPrefsService.getUserEmailPreferencesForCommunity(this.communityId, this.properties.claimsAPIURL).subscribe(
data => {
if(data.code == "204") {
this.status = this.errorCodes.NONE;
this.initialNotifications = [{notify: true, frequency:24, openaireId: this.communityId}];
} else {
this.initialNotifications = data.data;
}
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
this.status = this.errorCodes.DONE;
this.hidden = false;
},
err => {
this.hidden = false;
this.handleErrors(err);
this.handleError("Error getting user email preferences for community with id: "+this.communityId, err);
}
));
} else {
this.preferencesFor = "project";
this.subscriptions.push(this._mailPrefsService.getUserEmailPreferencesForOpenaire(this.properties.claimsAPIURL).subscribe(
data => {
if(data.code == "204") {
this.status = this.errorCodes.NONE;
} else {
this.initialNotifications = data.data;
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
//this.notifications = this.initialNotifications.map(x => Object.assign({}, x));
//this.notifications = this.initialNotifications;
this.status = this.errorCodes.DONE;
}
},
err => {
//console.info(err);
this.handleErrors(err);
this.handleError("Error getting user email preferences for openaire", err);
}
));
}
}
}
changeNotify(notification: any, checked: boolean, index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.savedMessage = "";
this.status = this.errorCodes.DONE;
notification.notify = checked;
this.prefsChanged[index] = true;
}
}
changeFrequency(index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.savedMessage = "";
this.status = this.errorCodes.DONE;
if(this.initialNotifications[index].frequency != this.notifications[index].frequency) {
this.prefsChanged[index] = true;
}
}
}
saveNotification(index: number) {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
this.subscriptions.push(this._mailPrefsService.saveUserEmailPreferences(this.notifications[index], this.properties.claimsAPIURL).subscribe(
data => {
this.initialNotifications[index] = JSON.parse(JSON.stringify( this.notifications[index] ));
this.status = this.errorCodes.DONE;
/*UIkit.notification({
message : '<strong>Your email preferences for '+this.notifications[index].openaireName+' have been successfully changed<strong>',
status : 'success',
timeout : 3000,
pos : 'top-center'
});*/
this.savedMessage = "Notification settings for claims saved!";
},
err => {
//console.log(err);
this.handleError("Error saving user email preferences: "+JSON.stringify(this.notifications[index]), err);
this.status = this.errorCodes.NOT_SAVED;
}
));
}
else {
/*UIkit.notification({
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>',
status : 'primary',
timeout : 3000,
pos : 'top-center'
});*/
this.savedMessage = "Notification settings for claims saved!";
}
}
}
}
restoreNotification(index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
this.notifications[index] = JSON.parse(JSON.stringify( this.initialNotifications[index] ));
this.status = this.errorCodes.DONE;
this.prefsChanged[index] = false;
}
}
}
/*
prefsChanged(index: number) : boolean {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
return true;
}
}
return false;
}
*/
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
}
handleErrors(err){
//this.showErrorMessage = true;
//try{
var code = "";
if(!err.status) {
var error = err.json();
code = error.code;
} else {
code = err.status;
}
this.status = this.errorMessages.getErrorCode(code);
}
private handleError(message: string, error) {
console.error("User mail notification preferences Page (for claims): "+message, error);
}
//}catch (e) {
//console.log("Couldn't parse answer as json")
//this.showErrorMessage = true;
//}
}

View File

@ -1,23 +0,0 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MailPrefsComponent } from './mailPrefs.component';
import { MailPrefsService } from './mailPrefs.service';
import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, ReactiveFormsModule, ErrorMessagesModule, MatSlideToggleModule
],
declarations: [
MailPrefsComponent
],
providers:[MailPrefsService],
exports: [
MailPrefsComponent
]
})
export class MailPrefsModule { }

View File

@ -1,15 +0,0 @@
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import{EnvProperties} from '../../utils/properties/env-properties';
@Injectable()
export class SearchZenodoCommunitiesService {
constructor(private http: HttpClient ) {}
searchZCommunities (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/zenodocommunities";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
}

View File

@ -16,12 +16,12 @@ export class ZenodoCommunitiesService {
//.map(res => <any> res.json())
.pipe(map(res => [this.parseZenodoCommunities(res['hits'].hits),res['hits'].total]));
}
getZenodoCommunityById(properties:EnvProperties, url: string, openaireId:string) {
getZenodoCommunityById(properties:EnvProperties, id: string) {
let url = properties.zenodoCommunities + "/" + id;
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)) : url)
//.map(res => <any> res.json())
.pipe(map(res => {
var community = this.parseZenodoCommunity(res);
community["openaireId"]=openaireId;
return community;
}));
}
@ -40,14 +40,14 @@ export class ZenodoCommunitiesService {
parseZenodoCommunity(resData:any):ZenodoCommunityInfo {
var result: ZenodoCommunityInfo = new ZenodoCommunityInfo();
result['title'] = resData.title;
let metadata = resData["metadata"];
result['title'] = metadata.title;
result['id'] = resData.id;
result['description'] = resData.description;
result['link'] = resData.links.html;
result['logoUrl'] = resData.logo_url;
result['description'] = metadata.description;
result['link'] = resData.links.self_html;
result['logoUrl'] = resData.links.logo;
result['date'] = resData.updated;
result['page'] = resData.page;
result['page'] = metadata.page;
return result;
}

View File

@ -6,5 +6,4 @@ export class ZenodoCommunityInfo {
logoUrl: string;
date: Date;
page: string;
openaireId:string;
}

View File

@ -4,27 +4,27 @@
<div class="uk-child-width-1-1 uk-grid uk-grid-margin-large" [attr.uk-scrollspy-class]="scrollspy?'':null"
[class.uk-grid-column-small]="smallForm" [class.uk-child-width-1-2@s]="!smallForm" [formGroup]="contactForm" uk-grid>
<div *ngIf="contactForm.get('name')" input placeholder="Name"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('name')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('name')"></div>
<div *ngIf="contactForm.get('surname')" input placeholder="Surname"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('surname')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('surname')"></div>
<div *ngIf="contactForm.get('email')" input placeholder="Email"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('email')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('email')"></div>
<div *ngIf="contactForm.get('job')" input placeholder="Job Title"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('job')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('job')"></div>
<div *ngIf="contactForm.get('affiliation')" input placeholder="Affiliation"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('affiliation')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('affiliation')"></div>
<div *ngIf="contactForm.get('community')" input placeholder="Research Community or Infrastructure"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('community')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('community')"></div>
<div *ngIf="contactForm.get('organization')" input placeholder="Organization"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organization')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organization')"></div>
<div *ngIf="contactForm.get('organizationType')" input type="select" placeholder="Organization Type"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organizationType')" [options]="organizationTypes"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organizationType')" [options]="organizationTypes"></div>
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1" input placeholder="Subject"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('subject')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('subject')"></div>
<div *ngIf="contactForm.get('message')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Comments"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('message')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('message')"></div>
<div *ngIf="contactForm.get('description')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Description"
[inputClass]="'inner' + (smallForm?' x-small':'')" [formInput]="contactForm.get('description')"></div>
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('description')"></div>
<div *ngIf="contactForm.get('recaptcha')" class="uk-flex uk-flex-center" [class.uk-width-1-1]="smallForm" [class.uk-flex-last@s]="!smallForm">
<re-captcha #captchaElem (resolved)="handleRecaptcha($event)" [siteKey]="properties.reCaptchaSiteKey"></re-captcha>
</div>

View File

@ -6,14 +6,6 @@ import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {DivIdsComponent} from './divIds.component';
import {AdminToolServiceModule} from "../../services/adminToolService.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatFormFieldModule } from "@angular/material/form-field";
import {MatChipsModule} from '@angular/material/chips';
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module";
import {PageContentModule} from "../sharedComponents/page-content/page-content.module";
import {ClassesRoutingModule} from "./classes-routing.module";
@ -23,9 +15,10 @@ import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
ClassesRoutingModule,
CommonModule, RouterModule, FormsModule,
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatAutocompleteModule, MatFormFieldModule, MatChipsModule,
MatCheckboxModule, AdminTabsModule, PageContentModule, ClassesRoutingModule, SearchInputModule, IconsModule, LoadingModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule,
AdminTabsModule, PageContentModule, SearchInputModule, IconsModule, LoadingModule
],
declarations: [DivIdsComponent],
exports: [DivIdsComponent]

View File

@ -16,9 +16,10 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
@NgModule({
imports: [
ClassHelpContentFormRoutingModule,
CommonModule, FormsModule, RouterModule,
SafeHtmlPipeModule, CKEditorModule,
AlertModalModule, ReactiveFormsModule, ClassHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
],
declarations: [
ClassContentFormComponent

View File

@ -19,8 +19,9 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
@NgModule({
imports: [
ClassHelpContentsRoutingModule,
CommonModule, RouterModule, FormsModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, ClassHelpContentsRoutingModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule,
SearchInputModule, IconsModule, LoadingModule, HTMLToStringPipeModule, PageContentModule
],
declarations: [

View File

@ -17,8 +17,9 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
@NgModule({
imports: [
EntitiesRoutingModule,
CommonModule, RouterModule, FormsModule, AdminToolServiceModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, EntitiesRoutingModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
],
declarations: [EntitiesComponent],
exports: [EntitiesComponent]

View File

@ -8,21 +8,21 @@ import {PageContentFormComponent} from './page-help-content-form.component';
import {PageHelpContentFormRoutingModule} from './page-help-content-form-routing.module';
import {AdminToolServiceModule} from '../../services/adminToolService.module';
import {InputModule} from '../../sharedComponents/input/input.module';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {IconsModule} from '../../utils/icons/icons.module';
import {PageContentModule} from '../sharedComponents/page-content/page-content.module';
import {RouterModule} from '@angular/router';
import {LoadingModule} from '../../utils/loading/loading.module';
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
@NgModule({
imports: [
PageHelpContentFormRoutingModule,
CommonModule, FormsModule, RouterModule,
SafeHtmlPipeModule, CKEditorModule,
AlertModalModule, ReactiveFormsModule, PageHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, PageContentModule, LoadingModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, IconsModule, PageContentModule, LoadingModule, MatSlideToggleModule
],
declarations: [
PageContentFormComponent
],
exports: [PageContentFormComponent]
declarations: [PageContentFormComponent],
exports: [PageContentFormComponent]
})
export class PageHelpContentFormModule {}
export class PageHelpContentFormModule {
}

View File

@ -17,8 +17,9 @@ import {HTMLToStringPipeModule} from '../../utils/pipes/HTMLToStringPipe.module'
@NgModule({
imports: [
PageHelpContentsRoutingModule,
CommonModule, RouterModule, FormsModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, PageHelpContentsRoutingModule, PageContentModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, PageContentModule,
SearchInputModule, IconsModule, LoadingModule, HTMLToStringPipeModule
],
declarations: [

View File

@ -18,8 +18,9 @@ import {LogoUrlPipeModule} from '../../utils/pipes/logoUrlPipe.module';
@NgModule({
imports: [
MenuRoutingModule,
CommonModule, RouterModule, FormsModule, AdminToolServiceModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, MenuRoutingModule, SearchInputModule, IconsModule, LoadingModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, SearchInputModule, IconsModule, LoadingModule,
TransitionGroupModule, LogoUrlPipeModule
],
declarations: [MenuComponent],

View File

@ -20,8 +20,9 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
@NgModule({
imports: [
PagesRoutingModule,
CommonModule, RouterModule, FormsModule, AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule,
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, PagesRoutingModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
MatAutocompleteModule, MatFormFieldModule, MatChipsModule, AdminTabsModule, PageContentModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
],
declarations: [PagesComponent],
exports: [PagesComponent]

View File

@ -1,17 +1,18 @@
import {Option} from "../../sharedComponents/input/input.component";
import {StakeholderEntities} from "../../monitor/entities/stakeholder";
import {StakeholderConfiguration} from "../../monitor-admin/utils/indicator-utils";
export class PortalUtils{
export class PortalUtils {
portalTypes: Option[] = [
{value: 'explore', label: 'Explore Portal'},
{value: 'connect', label: 'Connect portal'},
{value: 'monitor', label: 'Monitor portal'},
{value: 'community', label: 'Community Gateway'},
{value: 'funder', label: StakeholderEntities.FUNDER + ' Dashboard'},
{value: 'ri', label: StakeholderEntities.RI + ' Dashboard'},
{value: 'organization', label: StakeholderEntities.ORGANIZATION + ' Dashboard'},
{value: 'project', label: StakeholderEntities.PROJECT + ' Dashboard'}
{value: 'funder', label: StakeholderConfiguration.ENTITIES.funder + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
{value: 'ri', label: StakeholderConfiguration.ENTITIES.ri + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
{value: 'organization', label: StakeholderConfiguration.ENTITIES.organization + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
{value: 'project', label: StakeholderConfiguration.ENTITIES.project + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
{value: 'country', label: StakeholderConfiguration.ENTITIES.country + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
];
}

View File

@ -15,9 +15,10 @@ import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
PortalsRoutingModule,
CommonModule, FormsModule, AlertModalModule,
ReactiveFormsModule,
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, PortalsRoutingModule, IconsModule, SearchInputModule, LoadingModule
RouterModule, AdminToolServiceModule, InputModule, AdminTabsModule, PageContentModule, IconsModule, SearchInputModule, LoadingModule
],
declarations: [PortalsComponent],
exports: [PortalsComponent]

View File

@ -11,9 +11,9 @@ import {ActivatedRoute} from "@angular/router";
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'portal'"><a routerLink="../portals">Portals</a></li>
<li [class.uk-active]="tab === 'page'"><a routerLink="../pages">Pages</a></li>
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menus</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menus</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
</ul>
`
})
@ -25,7 +25,7 @@ export class AdminTabsComponent implements OnInit {
@Input()
public user: User;
@Input()
public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization"= 'page';
public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization" = 'page';
private subscriptions: any[] = [];
constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) {

View File

@ -80,9 +80,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
}
ngOnInit() {
if(this.isBrowser) {
this.stickyBugWorkaround();
}
this.subscriptions.push(this.layoutService.isMobile.subscribe(isMobile => {
this.isMobile = isMobile;
if(this.isBrowser) {
@ -132,77 +129,7 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
initFooter() {
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
}
/**
* Workaround for sticky not update bug when sidebar is toggled.
* TODO when UIKit will be updated => remove
*
* */
stickyBugWorkaround() {
let sidebarOffset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--dashboard-sidebar-width')) -
Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--dashboard-sidebar-mini-width'));
let transitionDelay = Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--dashboard-transition-delay')) * 1000;
this.subscriptions.push(this.layoutService.isOpen.subscribe(isOpen => {
if (this.sticky.header) {
if (isOpen) {
this.sticky.header.$el.style.width = Number.parseInt(this.sticky.header.$el.style.width) - sidebarOffset + 'px';
} else {
this.sticky.header.$el.style.width = Number.parseInt(this.sticky.header.$el.style.width) + sidebarOffset + 'px';
}
setTimeout(() => {
this.sticky.header.$emit();
}, transitionDelay);
}
if (this.sticky.footer) {
if (isOpen) {
this.sticky.footer.$el.style.width = Number.parseInt(this.sticky.footer.$el.style.width) - sidebarOffset + 'px';
} else {
this.sticky.footer.$el.style.width = Number.parseInt(this.sticky.footer.$el.style.width) + sidebarOffset + 'px';
}
setTimeout(() => {
this.sticky.footer.$emit();
}, transitionDelay);
}
this.cdr.detectChanges();
}));
}
/**
* @deprecated
*
* Should be smooth
*
* */
private observeBottom() {
let bottom = document.getElementById('bottom');
if (bottom) {
let bottomObs = new IntersectionObserver(entries => {
entries.forEach(entry => {
this.shouldSticky = !entry.isIntersecting;
})
});
this.subscriptions.push(bottomObs);
bottomObs.observe(bottom);
}
}
/**
* @deprecated
* */
private observeHeader() {
if (this.header) {
let headerObs = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.boundingClientRect.height > 0) {
this.layoutService.setReplaceHeader(!entry.isIntersecting);
}
})
});
this.subscriptions.push(headerObs);
headerObs.observe(this.header.nativeElement);
}
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {end: true, offset: footer_offset});
}
private observeStickyFooter() {

View File

@ -1,4 +1,4 @@
import {Injectable} from "@angular/core";
import {AfterViewInit, Injectable} from "@angular/core";
import {BehaviorSubject, Observable, Subscriber} from "rxjs";
import {ActivationStart, Router} from "@angular/router";
import {Icon} from "../../../sharedComponents/menu";
@ -75,6 +75,24 @@ export class LayoutService {
private isMobileSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
/** Active sidebar Item*/
private activeSidebarItemSubject: BehaviorSubject<SidebarItem> = new BehaviorSubject<SidebarItem>(null);
/**
* Add hasMenuSearchBar: false/ nothing on data of route config, if the search bar in the menu should not appear, otherwise true.
*/
private hasMenuSearchBarSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
/**
* Add hasStickyHeaderOnMobile: true in order to activate uk-sticky in header of mobile/tablet devices.
* */
private hasStickyHeaderOnMobileSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
/**
* Add a class in root element of the html. (For different theme apply)
* Handle it manually in the component, it doesn't use data
* */
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
/**
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
* */
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
private isBottomIntersectingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
private subscriptions: any[] = [];
ngOnDestroy() {
@ -102,6 +120,20 @@ export class LayoutService {
this.subscriptions.push(resizeObs);
resizeObs.observe(document.documentElement);
}
if(typeof document !== "undefined") {
setTimeout(() => {
let bottom = document.getElementById('bottom');
if (bottom) {
let bottomObs = new IntersectionObserver(entries => {
entries.forEach(entry => {
this.isBottomIntersectingSubject.next(entry.isIntersecting);
})
});
this.subscriptions.push(bottomObs);
bottomObs.observe(bottom);
}
}, 500)
}
}
constructor(private router: Router) {
@ -122,7 +154,7 @@ export class LayoutService {
data['hasHeader'] === false) {
this.setHasHeader(false);
if (typeof document !== "undefined") {
document.documentElement.style.setProperty('--header-height', '0');
document.documentElement.style.setProperty('--header-height', '0px');
}
} else {
this.setHasHeader(true);
@ -166,6 +198,18 @@ export class LayoutService {
} else {
this.setActiveMenuItem('');
}
if (data['hasMenuSearchBar'] !== undefined &&
data['hasMenuSearchBar'] === true) {
this.setHasMenuSearchBar(true);
} else {
this.setHasMenuSearchBar(false);
}
if (data['hasStickyHeaderOnMobile'] !== undefined &&
data['hasStickyHeaderOnMobile'] === true) {
this.setHasStickyHeaderOnMobile(true);
} else {
this.setHasStickyHeaderOnMobile(false);
}
}
}));
this.setObserver();
@ -292,4 +336,42 @@ export class LayoutService {
setActiveSidebarItem(value: SidebarItem) {
this.activeSidebarItemSubject.next(value);
}
get hasMenuSearchBar(): Observable<boolean> {
return this.hasMenuSearchBarSubject.asObservable();
}
setHasMenuSearchBar(value: boolean) {
this.hasMenuSearchBarSubject.next(value);
}
get hasStickyHeaderOnMobile(): Observable<boolean> {
return this.hasStickyHeaderOnMobileSubject.asObservable();
}
setHasStickyHeaderOnMobile(value: boolean) {
this.hasStickyHeaderOnMobileSubject.next(value);
}
get rootClass(): Observable<string> {
return this.rootClassSubject.asObservable();
}
setRootClass(value: string = null): void {
if(this.rootClassSubject.value != value) {
this.rootClassSubject.next(value);
}
}
get hasHelpPopUp(): Observable<boolean> {
return this.hasHelpPopUpSubject.asObservable();
}
setHasHelpPopUp(value: boolean) {
this.hasHelpPopUpSubject.next(value);
}
get isBottomIntersecting(): Observable<boolean> {
return this.isBottomIntersectingSubject.asObservable();
}
}

View File

@ -1,8 +1,8 @@
<aside id="sidebar_main" class="uk-visible@m">
<div id="sidebar_main" uk-sticky="end: .sidebar_main_swipe;" [attr.offset]="offset" class="uk-visible@m">
<div sidebar-content>
<ng-container *ngTemplateOutlet="menu; context: {mobile: false}"></ng-container>
</div>
</aside>
</div>
<div class="uk-hidden@m">
<div id="sidebar_offcanvas" #sidebar_offcanvas [attr.uk-offcanvas]="'overlay: true'">
<div class="uk-offcanvas-bar uk-padding-remove">
@ -28,8 +28,11 @@
[class.hide-on-close]="backItem.icon">{{backItem.title}}</span>
</a>
</div>
<div *ngIf="logoURL" id="sidebar_logo" class="uk-margin-top">
<img [src]="logoURL">
</div>
<div *ngIf="items.length > 0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
<ul #nav class="uk-list uk-nav uk-nav-parent-icon" [class.uk-list-large]="mobile"
<ul #nav class="uk-list uk-nav" [class.uk-list-large]="mobile"
[class.uk-nav-default]="!mobile" [class.uk-nav-primary]="mobile" uk-nav="duration: 400">
<ng-template ngFor [ngForOf]="items" let-item>
<li [class.uk-active]="item.isActive" [ngClass]="item.customClass"
@ -37,9 +40,10 @@
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
<div *ngIf="item.icon && (item.icon.svg || item.icon.name)" class="uk-width-auto">
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" ratio="0.9" [svg]="item.icon.svg" [flex]="true"></icon>
<icon class="menu-icon" [customClass]="item.icon.class" [name]="item.icon.name" [ratio]="item.icon.ratio?item.icon.ratio:0.9" [svg]="item.icon.svg" [flex]="true"></icon>
</div>
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
<span *ngIf="item.items.length > 0" class="uk-nav-parent-icon hide-on-close"></span>
</a>
<ul *ngIf="item.items?.length > 0 && (isBrowser || item.isActive)" class="uk-nav-sub">
<li *ngFor="let subItem of item.items" [ngClass]="subItem.customClass"

View File

@ -28,8 +28,10 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
@Input() activeSubItem: string = '';
@Input() backItem: MenuItem = null;
@Input() queryParamsHandling;
@Input() logoURL: string;
@ViewChild("nav") nav: ElementRef;
@ViewChild("sidebar_offcanvas") sidebar_offcanvas: ElementRef;
public offset: number;
public properties = properties;
private subscriptions: any[] = [];
private init: boolean = false;
@ -45,6 +47,9 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
}
ngOnInit() {
if (typeof document !== "undefined") {
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
}
this.setActiveMenuItem();
}

View File

@ -0,0 +1,48 @@
import {ChangeDetectorRef, Directive, OnInit} from "@angular/core";
import {BaseComponent} from "../../../sharedComponents/base/base.component";
import {MenuItem} from "../../../sharedComponents/menu";
import {LayoutService} from "./layout.service";
@Directive()
export class SidebarBaseComponent extends BaseComponent implements OnInit {
hasSidebar: boolean = false;
hasInternalSidebar: boolean = false;
hasAdminMenu: boolean = false;
/**
* Menu Items
* */
sideBarItems: MenuItem[] = [];
adminMenuItems: MenuItem[] = [];
backItem: MenuItem = null;
protected layoutService: LayoutService;
protected cdr: ChangeDetectorRef;
constructor() {
super();
}
ngOnInit() {
this.subscriptions.push(this.layoutService.hasSidebar.subscribe(hasSidebar => {
this.hasSidebar = hasSidebar;
this.cdr.detectChanges();
}));
this.subscriptions.push(this.layoutService.hasInternalSidebar.subscribe(hasInternalSidebar => {
this.hasInternalSidebar = hasInternalSidebar;
this.cdr.detectChanges();
}));
this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
this.hasAdminMenu = hasAdminMenu;
this.cdr.detectChanges();
}));
this.layoutService.setOpen(true);
}
public get open() {
return this.layoutService.open;
}
public get hover() {
return this.layoutService.hover;
}
}

View File

@ -8,26 +8,26 @@
<div class="uk-flex uk-flex-left@m uk-flex-center uk-width-expand">
<ul class="uk-subnav uk-subnav-pill">
<li [class.uk-active]="showCurrent" (click)="showCurrent = true">
<a class="uk-text-capitalize">{{role}}s</a>
<a class="uk-text-capitalize">{{roleUtils.roles[role]}}s</a>
</li>
<li [class.uk-active]="!showCurrent" (click)="showCurrent = false">
<a>Pending {{role}}s</a>
<a>Pending {{roleUtils.roles[role]}}s</a>
</li>
</ul>
</div>
<div class="uk-width-expand@m uk-width-1-1 uk-grid uk-flex-right@m uk-flex-center uk-flex-middle" uk-grid>
<div *ngIf="showCurrent" [disabled]="loadActive" search-input class="uk-width-expand@l uk-width-1-1"
[searchControl]="filterForm.get('active')" [expandable]="true" [placeholder]="'Search ' + role + 's'" searchInputClass="outer">
[searchControl]="filterForm.get('active')" [expandable]="true" [placeholder]="'Search ' + roleUtils.roles[role] + 's'" searchInputClass="outer">
</div>
<div *ngIf="!showCurrent" [disabled]="loadPending" search-input class="uk-width-expand@l uk-width-1-1"
[searchControl]="filterForm.get('pending')" [expandable]="true" [placeholder]="'Search invitations'" searchInputClass="outer">
</div>
<div>
<button *ngIf="exists" class="uk-button uk-button-default uk-flex uk-flex-middle"
<button *ngIf="canInvite" class="uk-button uk-button-default uk-flex uk-flex-middle"
[attr.uk-tooltip]="inviteDisableMessage" [class.uk-disabled]="loadPending || loadPending"
[disabled]="loadActive || loadPending || !!inviteDisableMessage" (click)="openInviteModal()">
<icon name="person_add" [flex]="true" type="filled"></icon>
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Invite {{role}}</span>
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Invite {{roleUtils.roles[role]}}</span>
</button>
<button *ngIf="!exists && isCurator" class="uk-button uk-button-default uk-flex uk-flex-middle"
(click)="openCreateRoleModal()">
@ -47,16 +47,16 @@
<div *ngIf="!loadActive && !loadPending">
<div *ngIf="(showCurrent && showActive.length == 0) || (!showCurrent && showPending.length == 0)"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div *ngIf="showCurrent">No {{role}}s found</div>
<div *ngIf="!showCurrent">No pending {{role}} invitations found</div>
<div *ngIf="showCurrent">No {{roleUtils.roles[role]}}s found</div>
<div *ngIf="!showCurrent">No pending {{roleUtils.roles[role]}} invitations found</div>
</div>
<div *ngIf="(showCurrent && showActive.length > 0) || (!showCurrent && showPending.length > 0)">
<no-load-paging *ngIf="showCurrent" [type]="(showActive.length > 1)?(role + 's'):role"
<no-load-paging *ngIf="showCurrent" [type]="(showActive.length > 1)?(roleUtils.roles[role] + 's'):role"
(pageChange)="updateActivePage($event)"
[page]="activePage" [pageSize]="pageSize"
[totalResults]="showActive.length">
</no-load-paging>
<no-load-paging *ngIf="!showCurrent" [type]="role + ' ' + (showPending.length > 1?'invitations':'invitation')"
<no-load-paging *ngIf="!showCurrent" [type]="roleUtils.roles[role] + ' ' + (showPending.length > 1?'invitations':'invitation')"
(pageChange)="updatePendingPage($event)"
[page]="pendingPage" [pageSize]="pageSize"
[totalResults]="showPending.length">
@ -95,23 +95,26 @@
</div>
</div>
<modal-alert #inviteModal (alertOutput)="invite()" [overflowBody]="false" classTitle="uk-background-primary uk-light"
[okDisabled]="invited && invited.invalid">
[okDisabled]="!valid">
<div *ngIf="message" class="uk-margin-medium-bottom uk-text-small">
<div [innerHTML]="message | safeHtml"></div>
</div>
<div *ngIf="invited">
<div input [formInput]="invited"
placeholder="Email"></div>
<div *ngIf="emailsForm">
<div #emailInput input [formInput]="emailsForm" type="chips"
placeholder="Recipients" hint="Add a recipient" [visibleChips]="3"
[addExtraChips]="true" [validators]="validators" [separators]="[',']">
<div note>Separate emails with commas</div>
</div>
</div>
</modal-alert>
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="deleteActive()" classTitle="uk-background-primary uk-light">
<div *ngIf="selectedUser">
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from {{role}}s?
Are you sure you want to remove <span class="uk-text-bold">{{selectedUser}}</span> from {{roleUtils.roles[role]}}s?
</div>
</modal-alert>
<modal-alert #deletePendingModal [overflowBody]="false" (alertOutput)="deletePending()" classTitle="uk-background-primary uk-light">
<div *ngIf="selectedUser">
Are you sure you want to cancel {{role}} invitation of <span class="uk-text-bold">{{selectedUser}}</span>?
Are you sure you want to cancel {{roleUtils.roles[role]}} invitation of <span class="uk-text-bold">{{selectedUser}}</span>?
</div>
</modal-alert>
<modal-alert #createRoleModal [overflowBody]="false" (alertOutput)="createGroup()" classTitle="uk-background-primary uk-light"

View File

@ -1,17 +1,39 @@
import {Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild} from '@angular/core';
import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
import {
ChangeDetectorRef,
Component,
Input,
OnChanges,
OnDestroy,
OnInit,
SimpleChanges,
ViewChild
} from '@angular/core';
import {UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, ValidatorFn, Validators} from '@angular/forms';
import {AlertModal} from "../../../utils/modal/alert";
import {UserRegistryService} from "../../../services/user-registry.service";
import {EnvProperties} from "../../../utils/properties/env-properties";
import {properties} from "../../../../../environments/environment";
import {Role, Session, User} from "../../../login/utils/helper.class";
import {Role, RoleUtils, Session, User} from "../../../login/utils/helper.class";
import {UserManagementService} from "../../../services/user-management.service";
import {Router} from "@angular/router";
import {StringUtils} from "../../../utils/string-utils.class";
import {NotificationService} from "../../../notifications/notification.service";
import {Subscription} from "rxjs";
import {forkJoin, of, Subscription} from "rxjs";
import {NotificationHandler} from "../../../utils/notification-handler";
import {ClearCacheService} from "../../../services/clear-cache.service";
import {catchError, map, tap} from "rxjs/operators";
import {InputComponent} from "../../../sharedComponents/input/input.component";
import {StakeholderUtils} from "../../../monitor-admin/utils/indicator-utils";
class InvitationResponse {
email: string;
invitation: any;
constructor(email, invitation) {
this.email = email;
this.invitation = invitation;
}
}
@Component({
selector: 'role-users',
@ -22,7 +44,9 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
@Input()
public id: string;
@Input()
public type: string;
set type(type: string) {
this._type = Role.mapType(type);
}
@Input()
public name: string;
@Input()
@ -32,6 +56,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
@Input()
public deleteAuthorizationLevel: 'curator' | 'manager' = 'curator';
@Input()
public inviteAuthorizationLevel: 'curator' | 'manager' = 'manager';
@Input()
public message: string = null;
@Input()
public emailComposer: Function;
@ -49,7 +75,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
public loadActive: boolean = true;
public loadPending: boolean = true;
public selectedUser: string = null;
public invited: UntypedFormControl;
public emailsForm: UntypedFormArray;
public validators: ValidatorFn[] = [Validators.email];
public properties: EnvProperties = properties;
public exists: boolean = true;
public roleFb: UntypedFormGroup;
@ -60,15 +87,19 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
/** Search */
filterForm: UntypedFormGroup;
@ViewChild('inviteModal') inviteModal: AlertModal;
@ViewChild('emailInput') emailInput: InputComponent;
@ViewChild('deleteModal') deleteModal: AlertModal;
@ViewChild('deletePendingModal') deletePendingModal: AlertModal;
@ViewChild('createRoleModal') createRoleModal: AlertModal;
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
public roleUtils: RoleUtils = new RoleUtils();
private _type: string;
constructor(private userRegistryService: UserRegistryService,
private userManagementService: UserManagementService,
private clearCacheService: ClearCacheService,
private notificationService: NotificationService,
private router: Router,
private cdr: ChangeDetectorRef,
private fb: UntypedFormBuilder) {
}
@ -116,9 +147,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
updateLists() {
this.loadActive = true;
this.loadPending = true;
this.subs.push(this.userRegistryService.getActive(this.type, this.id, this.role).subscribe(users => {
this.subs.push(this.userRegistryService.getActive(this._type, this.id, this.role, true).subscribe(users => {
this.active = users;
// users.forEach(user => this.active.push(user));
this.filterActiveBySearch(this.filterForm.value.active);
this.loadActive = false;
this.exists = true;
@ -130,7 +160,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
}
this.loadActive = false;
}));
this.subs.push(this.userRegistryService.getPending(this.type, this.id, this.role).subscribe(users => {
this.subs.push(this.userRegistryService.getPending(this._type, this.id, this.role, true).subscribe(users => {
this.pending = users;
this.filterPendingBySearch(this.filterForm.value.pending);
this.loadPending = false;
@ -159,7 +189,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
openDeleteModal(item: any) {
if (this.showCurrent) {
this.selectedUser = item.email;
this.deleteModal.alertTitle = 'Delete ' + this.role;
this.deleteModal.alertTitle = 'Delete ' + this.roleUtils.roles[this.role];
this.deleteModal.open();
} else {
this.selectedUser = item;
@ -169,10 +199,11 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
}
openInviteModal() {
this.inviteModal.alertTitle = 'Invite ' + this.role;
this.inviteModal.alertTitle = 'Invite ' + this.roleUtils.roles[this.role];
this.inviteModal.okButtonLeft = false;
this.inviteModal.okButtonText = 'Send';
this.invited = this.fb.control('', [Validators.required, Validators.email]);
this.emailsForm = this.fb.array([], Validators.required);
this.cdr.detectChanges();
this.inviteModal.open();
}
@ -181,8 +212,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.createRoleModal.okButtonLeft = false;
this.createRoleModal.okButtonText = 'Create';
this.roleFb = this.fb.group({
name: this.fb.control(Role.mapType(this.type) + '.' + this.id, Validators.required),
description: this.fb.control(Role.mapType(this.type) + ' ' + this.id, Validators.required)
name: this.fb.control(Role.roleName(this._type, this.id), Validators.required),
description: this.fb.control(Role.roleName(this._type, this.id), Validators.required)
});
setTimeout(() => {
this.roleFb.get('name').disable();
@ -193,7 +224,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
deleteActive() {
this.loadActive = true;
this.subs.push(this.userRegistryService.remove(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
this.subs.push(this.userRegistryService.remove(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
this.active = this.active.filter(user => user.email != this.selectedUser);
if (this.currentActivePage.length === 0) {
this.activePage = 1;
@ -211,58 +242,82 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
deletePending() {
this.loadPending = true;
this.subs.push(this.userRegistryService.cancelInvitation(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
this.subs.push(this.userRegistryService.cancelInvitation(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
this.pending = this.pending.filter(user => user != this.selectedUser);
this.filterPendingBySearch(this.filterForm.value.pending);
if (this.currentPendingPage.length === 0) {
this.pendingPage = 1;
}
NotificationHandler.rise(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been <b>canceled</b>');
NotificationHandler.rise(StringUtils.capitalize(this.roleUtils.roles[this.role]) + ' invitation to ' + this.selectedUser + ' has been <b>canceled</b>');
this.loadPending = false;
}, error => {
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
this.loadPending = false;
}));
}
get valid() {
return this.emailsForm && this.emailsForm.valid || (this.emailInput && this.emailInput.searchControl.getRawValue() && this.emailInput.searchControl.valid);
}
invite() {
if(this.emailInput.searchControl.getRawValue() && this.emailInput.searchControl.valid) {
this.emailInput.add(null,true);
}
this.showCurrent = false;
this.loadPending = true;
this.selectedUser = this.invited.value;
let details = {
link: this.link,
email: this.emailComposer(this.name, this.invited.value, this.role)
}
this.subs.push(this.userRegistryService.invite(this.type, this.id, details, this.role).subscribe(invitation => {
if (!this.pending.includes(this.invited.value)) {
this.pending.push(this.invited.value);
let current = null;
let invitations = (<Array<any>>this.emailsForm.value).map(email => {
current = email;
return this.userRegistryService.invite(this._type, this.id, {
link: this.link,
email: this.emailComposer(this.name, email, this.role)
}, this.role).pipe(catchError(error => {
return of(null);
}), map(invitation => new InvitationResponse(email, invitation)));
});
this.subs.push(forkJoin(invitations).subscribe(responses => {
let notifications = responses.map(response => {
if(response.invitation) {
NotificationHandler.rise(StringUtils.capitalize(this.role) + ' invitation to ' + response.email + ' has been <b>sent</b>');
if (!this.pending.includes(response.email)) {
this.pending.push(response.email);
}
if(this.notificationFn && properties.notificationsAPIURL) {
return this.notificationService.sendNotification(this.notificationFn(this.name, response.email, this.role, response.invitation)).pipe(map(notification => {
return notification;
}), tap(() => {
NotificationHandler.rise('A notification has been <b>sent</b> successfully to ' + response.email);
}), catchError( error => {
NotificationHandler.rise('An error has occurred while sending a notification to ' + response.email + '. Please try again later', 'danger');
return of(null);
}));
} else {
return of(null);
}
} else {
NotificationHandler.rise('An error has occurred while sending the invitation mail to ' +
response.email + '.Check if the user is already a ' + this.roleUtils.roles[this.role] + ' or try again later', 'danger');
return of(null);
}
});
this.subs.push(forkJoin(notifications).subscribe(() => {
this.pendingPage = Math.ceil(this.pending.length / this.pageSize);
this.filterPendingBySearch(this.filterForm.value.pending);
}
if (this.notificationFn) {
this.subs.push(this.notificationService.sendNotification(this.notificationFn(this.name, this.invited.value, this.role, invitation)).subscribe(notification => {
NotificationHandler.rise('A notification has been <b>sent</b> successfully');
}, error => {
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
}));
}
NotificationHandler.rise(StringUtils.capitalize(this.role) + ' invitation to ' + this.selectedUser + ' has been <b>sent</b>');
this.loadPending = false;
}, error => {
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
this.loadPending = false;
this.loadPending = false;
}))
}));
}
createGroup() {
this.loadActive = true;
this.loadPending = true;
this.userRegistryService.createRole(this.type, this.id).subscribe(() => {
this.userRegistryService.createRole(this._type, this.id).subscribe(() => {
NotificationHandler.rise('Group has been <b> successfully created</b>');
this.updateLists();
}, error => {
if(error.status === 409) {
NotificationHandler.rise('Group already exists. You can try to invite a ' + this.role + ' instead.', 'warning');
NotificationHandler.rise('Group already exists. You can try to invite a ' + this.roleUtils.roles[this.role] + ' instead.', 'warning');
this.updateLists();
} else {
NotificationHandler.rise('An error has occurred. Please try again later', 'danger');
@ -275,17 +330,21 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
public get canDelete() {
return (this.deleteAuthorizationLevel === 'curator'?this.isCurator:this.isManager);
}
public get canInvite() {
return this.exists && (this.inviteAuthorizationLevel === 'curator'?this.isCurator:this.isManager);
}
public isMe(userId: string) {
return userId && userId.includes(this.user.id) && !this.isCurator;
}
public get isManager(): boolean {
return this.isCurator || !!Session.isManager(this.type, this.id, this.user);
return this.isCurator || !!Session.isManager(this._type, this.id, this.user);
}
public get isCurator(): boolean {
return this.isPortalAdmin || !!Session.isCurator(this.type, this.user);
return this.isPortalAdmin || !!Session.isCurator(this._type, this.user);
}
public get isPortalAdmin(): boolean {

View File

@ -105,7 +105,7 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
updateList() {
this.loading = true;
this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member').subscribe(users => {
this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member', true).subscribe(users => {
this.subscribers = users;
this.filterBySearch(this.filterForm.value.keyword);
this.loading = false;
@ -141,8 +141,8 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
this.createRoleModal.okButtonLeft = false;
this.createRoleModal.okButtonText = 'create';
this.roleFb = this.fb.group({
name: this.fb.control(Role.mapType(this.type) + '.' + this.id, Validators.required),
description: this.fb.control(Role.mapType(this.type) + ' ' + this.id, Validators.required)
name: this.fb.control(Role.roleName(this.type, this.id), Validators.required),
description: this.fb.control(Role.roleName(this.type, this.id), Validators.required)
});
setTimeout(() => {
this.roleFb.get('name').disable();

View File

@ -15,7 +15,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
@Component({
selector: 'deposit-first-page',
template: `
<div class="deposit">
<div>
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
@ -48,7 +48,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
1. Find the appropriate repository or journal
</div>
<div>
Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan. Search and browse for OpenAIRE compliant repositories registered in OpenDOAR and re3data.
Find the appropriate repository to deposit your research products of any type (publication, data, software, other) or to include in your data management plan. Search and browse for OpenAIRE compliant repositories registered in OpenDOAR, re3data and FAIRsharing.
Looking for Open Access journals? Find those that suit your needs among the journals registered in the Directory of Open Access Journals (DOAJ).
To know more, read the OpenAIRE Open Access primer (<a target="_blank" href="https://www.openaire.eu/oa-basics">https://www.openaire.eu/oa-basics</a>)
</div>
@ -110,7 +110,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
<div class="uk-card-body uk-text-small">
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
<div>
Search and browse for <span class="uk-text-bold">OpenAIRE compliant repositories</span> registered in OpenDOAR and re3data.
Search and browse for <span class="uk-text-bold">OpenAIRE compliant repositories</span> registered in OpenDOAR, re3data and FAIRsharing.
</div>
</div>
<div class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
@ -152,7 +152,6 @@ export class DepositFirstPageComponent {
public title: string = "Deposit or publish your research in Open Access";
@Input() public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
@Input() piwikSiteId = null;
@Input() assetsPath: string = 'assets/common-assets/common';
@Input() communityId = null;
@ -201,10 +200,7 @@ export class DepositFirstPageComponent {
if (!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo";
}
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.title).subscribe());
this.breadcrumbs.push({name: 'home', route: '/'}, {name: "Deposit", route: null});
}

View File

@ -5,7 +5,6 @@ import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import {PiwikServiceModule} from '../utils/piwik/piwikService.module';
import {HelperModule} from '../utils/helper/helper.module';
import {Schema2jsonldModule} from '../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../sharedComponents/SEO/SEOService.module';
@ -18,7 +17,6 @@ import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-scree
imports: [
CommonModule, FormsModule,
RouterModule,
PiwikServiceModule,
HelperModule,
Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, SearchInputModule,
FullScreenModalModule

View File

@ -29,7 +29,8 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
<div class="uk-container uk-container-large">
<div class="uk-margin-top uk-flex uk-flex-center">
<div class="uk-width-large" [class.dark]="searchForm.dark">
<div search-input [(value)]="keyword" placeholder="Search by name, description, subject..." (searchEmitter)="keywordChanged()"></div>
<div search-input [(value)]="keyword" placeholder="Search by name, description, subject..." (searchEmitter)="keywordChanged()"
[searchInputClass]="'inner background'"></div>
<div class="uk-margin-top uk-text-center uk-margin-medium-bottom">
<a *ngIf="zenodoInformation.url" [href]="zenodoInformation.url" target="_blank" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
<span class="uk-flex uk-flex-middle">
@ -52,7 +53,6 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
export class SearchDataprovidersToDepositComponent {
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() piwikSiteId = null;
@Input() searchForm: SearchForm = {class: null, dark: false};
public results =[];
public filters =[];

View File

@ -9,7 +9,6 @@ import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.mod
import {DataProvidersServiceModule} from '../services/dataProvidersService.module';
import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module';
import {IsRouteEnabled} from '../error/isRouteEnabled.guard';
import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module";
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
@ -25,7 +24,7 @@ import {SearchInputModule} from "../sharedComponents/search-input/search-input.m
declarations: [
SearchDataprovidersToDepositComponent
],
providers:[ IsRouteEnabled],
providers:[],
exports: [
SearchDataprovidersToDepositComponent
]

View File

@ -19,7 +19,7 @@
<li *ngFor="let result of results">
<result-preview [properties]="properties" [showOrganizations]="true"
[showSubjects]="true" [result]="getResultPreview(result)" [promoteWebsiteURL]="true"
[isCard]="true" deposit="true">
[isCard]="true" deposit="true" [isMobile]="isMobile">
</result-preview>
</li>
</ul>

View File

@ -19,6 +19,7 @@ export class SearchResultsInDepositComponent {
@Input() status: number;
@Input() type: string;
@Input() properties:EnvProperties;
@Input() isMobile: boolean = false;
public urlParam: string;

View File

@ -3,15 +3,25 @@ import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/com
import {Observable, throwError, TimeoutError} from "rxjs";
import {catchError} from "rxjs/operators";
import {Session} from "./login/utils/helper.class";
import {Router} from "@angular/router";
import {GuardsCheckEnd, GuardsCheckStart, Router} from "@angular/router";
import {LoginErrorCodes} from "./login/utils/guardHelper.class";
import {properties} from "../../environments/environment";
import * as url from "url";
@Injectable()
export class ErrorInterceptorService implements HttpInterceptor {
private static UNAUTHORIZED_WHITELIST = [properties.userInfoUrl, properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
private static UNAUTHORIZED_WHITELIST = [properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
private url: string = null;
constructor(private router: Router) {
this.router.events.forEach(event => {
if(event instanceof GuardsCheckStart) {
this.url = event.url;
} else if(event instanceof GuardsCheckEnd) {
this.url = null;
}
})
}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
@ -42,7 +52,7 @@ export class ErrorInterceptorService implements HttpInterceptor {
this.router.navigate(['/user-info'], {
queryParams: {
'errorCode': LoginErrorCodes.NOT_LOGIN,
'redirectUrl': this.router.url
'redirectUrl': this.url?this.url:this.router.url
}
});
}
@ -51,7 +61,7 @@ export class ErrorInterceptorService implements HttpInterceptor {
this.router.navigate(['/user-info'], {
queryParams: {
'errorCode': LoginErrorCodes.NOT_AUTHORIZED,
'redirectUrl': this.router.url
'redirectUrl': this.url?this.url:this.router.url
}
});
}

View File

@ -4,24 +4,18 @@ import {Observable} from 'rxjs';
import {properties} from "../../../environments/environment";
@Injectable()
export class isDevelopmentGuard implements CanActivate, CanLoad {
@Injectable({
providedIn: 'root'
})
export class isDevelopmentGuard {
constructor(private router: Router) {
}
check(): Observable<boolean> | boolean {
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree{
if(properties.environment == 'development') {
return true;
} else {
this.router.navigate([properties.errorLink]);
}
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree{
return this.check();
}
canLoad(route: Route, segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
return this.check()
}
}
}

View File

@ -1,13 +1,15 @@
import {Observable} from 'rxjs';
import {take, tap} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Data, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import { ActivatedRouteSnapshot, Data, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {ConfigurationService} from '../utils/configuration/configuration.service';
import {ConnectHelper} from '../connect/connectHelper';
import {properties} from "../../../environments/environment";
@Injectable()
export class IsRouteEnabled implements CanActivate {
@Injectable({
providedIn: 'root'
})
export class IsRouteEnabled {
constructor(private router: Router,
private config: ConfigurationService) {
@ -23,7 +25,7 @@ export class IsRouteEnabled implements CanActivate {
if (!community) {
community = properties.adminToolsCommunity;
}
return this.config.isPageEnabledByState(properties, community, '/' + path).pipe(take(1), tap((enabled) => {
return this.config.isPageEnabled(properties, community, '/' + path).pipe(take(1), tap((enabled) => {
if (!enabled) {
this.router.navigate([redirect], {queryParams: {'page': path}});
}

View File

@ -22,7 +22,7 @@
<ul *ngIf="keyword?.length" class="uk-tab uk-tab-left">
<li *ngFor="let item of viewResults; index as i"
class="uk-margin-small-bottom uk-text-capitalize" [class.uk-active]="activeSection === item.id">
<a (click)="scrollToId(item.id)">{{item.id}}</a>
<a (click)="scrollToId(item.id)">{{item.id}}</a>
</li>
</ul>
</div>

View File

@ -72,8 +72,9 @@ export class FosSelectionComponent {
} else {
this.activeSection = this.fos[0].id;
}
this.setObserver();
if(typeof IntersectionObserver !== "undefined") {
this.setObserver();
}
this.cdr.detectChanges();
});
}
@ -93,7 +94,7 @@ export class FosSelectionComponent {
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
this.keyword = value;
this.findMatches(this.keyword);
if (typeof document !== 'undefined') {
if (typeof IntersectionObserver !== 'undefined') {
setTimeout(() => {
this.setObserver();
});

View File

@ -7,18 +7,18 @@
<div class="uk-container uk-container-large uk-section" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk-grid>
<div class="uk-width-3-5@m uk-width-1-1@s uk-flex uk-flex-column uk-flex-center">
<span class="uk-align-left uk-margin-remove-bottom">
<span uk-scrollspy-class class="uk-text-large" style="color: #EEB204">Beta</span>
</span>
<!-- <span class="uk-align-left uk-margin-remove-bottom">-->
<!-- <span uk-scrollspy-class class="uk-text-large" style="color: #EEB204">Beta</span>-->
<!-- </span>-->
<div style="max-width: 600px;">
<h1 uk-scrollspy-class class="uk-h1 uk-margin-remove-top">
<span>Fields of Science <span class="uk-text-primary">.</span></span>
</h1>
<div uk-scrollspy-class>
We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Research Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.
We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.
</div>
<div class="uk-text-meta uk-margin-top" uk-scrollspy-class>
Our work is based on the work from our partner Athena Research Center: SciNoBo : A Hierarchical Multi-Label Classifier of Scientific Publications - <a href="https://doi.org/10.1145/3487553.3524677" target="_blank">https://doi.org/10.1145/3487553.3524677</a>
Our work is based on the work from our partner Athena Research Center: SciNoBo : a novel system classifying scholarly communication in a dynamically constructed hierarchical Field-of-Science taxonomy - <a href="https://doi.org/10.3389/frma.2023.1149834" target="_blank">https://doi.org/10.3389/frma.2023.1149834</a>
</div>
<!-- TODO: We need a page for the button link -->
<!-- <div>
@ -32,13 +32,15 @@
</div>
</div>
<div class="uk-width-2-5@m uk-width-1-1@s uk-text-center" uk-scrollspy-class>
<img src="assets/common-assets/fos/fos-hero-img.svg" loading="lazy">
<img src="assets/common-assets/fos/fos-hero-img.svg" loading="lazy" alt="FoS logo">
</div>
</div>
</div>
<div *ngIf="fos?.length" class="uk-container uk-container-large uk-section" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div *ngIf="fos?.length" id="levels" class="uk-container uk-container-large uk-section"
uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-visible@m">
<div uk-sticky="offset: 50;" class="uk-sticky uk-background-default uk-padding uk-padding-remove-bottom uk-padding-remove-horizontal">
<div id="keyword_search" uk-sticky="offset: 50;" class="uk-sticky uk-background-default uk-padding uk-padding-remove-bottom uk-padding-remove-horizontal">
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
<div search-input [searchControl]="keywordControl" [options]="fosOptions" iconPosition="left" placeholder="Write a key word to filter the content"
searchInputClass="border-bottom" class="uk-width-large"></div>
@ -49,15 +51,33 @@
<div class="uk-margin-top uk-padding-small">
<div id="parentContainer" class="uk-grid uk-grid-large" uk-grid>
<div class="uk-width-1-4@m uk-visible@m">
<div class="uk-sticky" uk-sticky="bottom: !#parentContainer; offset: 200;">
<div class="uk-sticky" uk-sticky="end: !#parentContainer; offset: 200;">
<ul *ngIf="!keyword" class="uk-tab uk-tab-left">
<li *ngFor="let item of fos; index as i" [class.uk-active]="activeSection === item.id"
class="uk-margin-small-bottom uk-text-capitalize">
<a routerLink="./" [fragment]="item.id">{{item.id}}</a>
<a (click)="selectedParentLevels=[]" routerLink="./" [fragment]="item.id">
<div>
{{item.id}}
<ng-container *ngIf="selectedParentLevels.length > 0 && selectedParentLevels[0].id==item.id">
<div class="uk-margin-left uk-margin-xsmall-top">
<span class="uk-flex uk-flex-middle">
<icon [flex]="true" ratio="1" name="subdirectory_arrow_right"></icon>
{{selectedParentLevels[1].id}}
</span>
<div class="uk-margin-left uk-margin-xsmall-top">
<span class="uk-flex uk-flex-middle">
<icon [flex]="true" ratio="1" name="subdirectory_arrow_right"></icon>
{{selectedParentLevels[2].label}}
</span>
</div>
</div>
</ng-container>
</div>
</a>
</li>
</ul>
<ul *ngIf="keyword?.length" class="uk-tab uk-tab-left">
<li *ngFor="let item of viewResults; index as i"
<li *ngFor="let item of viewResults; index as i"
class="uk-margin-small-bottom uk-text-capitalize" [class.uk-active]="activeSection === item.id">
<a routerLink="./" [fragment]="item.id">{{item.id}}</a>
</li>
@ -91,11 +111,38 @@
</div>
</div>
<div class="uk-width-expand@m">
<ng-container *ngIf="!keyword">
<div *ngIf="!keyword && selectedParentLevels.length > 0" [id]="selectedParentLevels[0].id+'||'+selectedParentLevels[1].code+'||'+selectedParentLevels[2].code">
<a (click)="backClicked();"
class="uk-button-link uk-flex uk-flex-middle uk-margin-bottom">
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="1"></icon>
<span class="uk-margin-small-left">Back</span>
</a>
<div>
<h2 class="uk-h4 uk-text-capitalize uk-margin-remove">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(selectedParentLevels[2])"
class="uk-link-text">
{{selectedParentLevels[2].label}}
</a>
</h2>
<div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-xlarge-bottom" uk-grid="masonry: false">
<div *ngFor="let level4 of selectedParentLevels[2].children">
<div class="uk-text-capitalize">
<h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
class="uk-link-text">
{{level4.label}}
</a>
</h3>
</div>
</div>
</div>
</div>
</div>
<ng-container *ngIf="!keyword && selectedParentLevels.length == 0">
<div [id]="item.id" *ngFor="let item of fos; index as i">
<div class="uk-text-capitalize">
<h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(item.id)}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(item)"
class="uk-link-text">
{{item.id}}
</a>
@ -105,17 +152,56 @@
<div *ngFor="let child of item.children">
<div class="uk-text-capitalize">
<h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(child.id)}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(child)"
class="uk-link-text">
{{child.id}}
</a>
</h3>
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subChild.id)}"
class="uk-link-text">
{{subChild.id}}
</a>
</div>
<!-- class="parent uk-transition-toggle" tabindex="0"-->
<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">
<!-- <span class="uk-flex uk-flex-between">-->
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
class="uk-link-text uk-width-expand">
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
</a>
<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">
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
<!-- +{{subChild.children.length}} more-->
<!--&lt;!&ndash; <icon [flex]="true" ratio="1" name="chevron_right"></icon>&ndash;&gt;-->
<!-- </a>-->
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
<a class="uk-link-text uk-text-lowercase">
more
</a>
</span>
<!-- <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">-->
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
<!-- </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>-->
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
<!-- class="label4 uk-text-small uk-text-meta">-->
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- uk-transition-slide-top-->
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
<!-- <div class="child">-->
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>
</div>
@ -126,21 +212,27 @@
<div
class="uk-margin-large-bottom uk-padding uk-padding-remove-top uk-padding-remove-horizontal uk-text-capitalize" [class.custom-bottom-border]="i < viewResults.length - 1">
<h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(item.id)}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(item)"
class="uk-link-text" [innerHTML]="highlightKeyword(item.id)">
</a>
</h2>
<div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-medium-bottom" uk-grid="masonry: false">
<div *ngFor="let subItem of item.children">
<h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subItem.id)}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subItem)"
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
</a>
</h3>
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subSubItem.id)}"
class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.id)">
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
</a>
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
<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)">
</a>
</div>
</div>
</div>
</div>

View File

@ -15,6 +15,8 @@ import {PiwikService} from "../utils/piwik/piwik.service";
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
import Timeout = NodeJS.Timeout;
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
import {SearchFields} from "../utils/properties/searchFields";
import {HelperFunctions} from "../utils/HelperFunctions.class";
declare var UIkit;
@ -26,9 +28,9 @@ declare var UIkit;
export class FosComponent implements OnInit, OnDestroy {
public url: string = null;
public pageTitle: string = "OpenAIRE | Fields of Science";
public pageDescription: string = "We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Research Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.";
@Input() piwikSiteId = null;
public pageDescription: string = "We have integrated a Field-of-Science (FoS) taxonomy into our dataset to organize and discover research more effectively. Using the full capabilities of the OpenAIRE Graph (full-texts, citations, references, venues) we apply AI and bring forward any multidisciplinarity potential.";
public scrollPos = 0;
public selectedParentLevels = [];
public fos: any[] = [];
public fosOptions: string[] = [];
public activeSection: string;
@ -48,6 +50,7 @@ export class FosComponent implements OnInit, OnDestroy {
private timeout: Timeout;
@ViewChild('tabs') tabs: ElementRef;
public sliderInit: boolean = false;
private searchFieldsHelper: SearchFields = new SearchFields();
constructor(
private vocabulariesService: ISVocabulariesService,
@ -63,9 +66,7 @@ export class FosComponent implements OnInit, OnDestroy {
) {}
ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
@ -84,21 +85,43 @@ export class FosComponent implements OnInit, OnDestroy {
item.classList.remove('uk-active');
});
if (this.route.snapshot.fragment) {
this.activeSection = this.route.snapshot.fragment;
let i = this.fos.findIndex(item => item.id == this.route.snapshot.fragment);
slider.show(i);
let splitFragment = this.route.snapshot.fragment.split("||");
this.activeSection = this.route.snapshot.fragment.split("||")[0];
let i = this.fos.findIndex(item => (item.id == this.route.snapshot.fragment || this.route.snapshot.fragment.startsWith(item.id+"||")));
if(i <0 || i>this.fos.length-1) {
this._router.navigate(['./'], {fragment: "", relativeTo: this.route, state: {disableScroll: true}});
} else {
if (splitFragment.length > 1) {
let level1 = this.fos[i];
let level2 = null;
let level3 = null;
if (level1.children) {
level2 = level1.children.find(item => item.code == splitFragment[1]);
if (level2 && level2.children) {
level3 = level2.children.find(item => item.code == splitFragment[2]);
this.selectedParentLevels = [this.fos[i], level2, level3];
}
}
if(!level2 || !level3) {
this._router.navigate(['./'], {fragment: level1.id, relativeTo: this.route, state: {disableScroll: true}});
}
} else {
slider.show(i);
}
}
} else {
this.activeSection = this.fos[0].id;
}
this.cdr.detectChanges();
});
}
this.subscriptions.push(this.route.fragment.subscribe(fragment => {
if(fragment) {
this.activeSection = fragment;
this.activeSection = fragment.split("||")[0];
if(this.tabs) {
let slider = UIkit.slider(this.tabs.nativeElement);
let i = this.fos.findIndex(item => item.id == fragment);
let i = this.fos.findIndex(item => (item.id == fragment || fragment.startsWith(item.id+"||")));
slider.show(i);
}
} else {
@ -107,13 +130,16 @@ export class FosComponent implements OnInit, OnDestroy {
}));
this.keywordControl = this.fb.control('');
this.subscriptions.push(this.keywordControl.valueChanges.pipe(debounceTime(500), distinctUntilChanged()).subscribe(value => {
this.keyword = value;
this.findMatches(this.keyword);
if (typeof document !== 'undefined') {
setTimeout(() => {
this.setObserver();
});
}
if(this.keyword !== undefined || value) {
this.selectedParentLevels = [];
}
this.keyword = value;
this.findMatches(this.keyword);
if (typeof IntersectionObserver !== 'undefined') {
setTimeout(() => {
this.setObserver();
});
}
}));
});
}
@ -156,11 +182,16 @@ export class FosComponent implements OnInit, OnDestroy {
this.fos.forEach(fos => {
this.fosOptions.push(fos.id);
if(fos.children) {
fos.children.forEach(child => {
this.fosOptions.push(child.id);
if(child.children) {
child.children.forEach(child2 => {
this.fosOptions.push(child2.id);
fos.children.forEach(l2 => {
this.fosOptions.push(l2.id);
if(l2.children) {
l2.children.forEach(l3 => {
this.fosOptions.push(l3.id);
if(l3.children) {
l3.children.forEach(l4 => {
this.fosOptions.push(l4.id);
})
}
});
}
});
@ -172,19 +203,29 @@ export class FosComponent implements OnInit, OnDestroy {
this.viewResults = JSON.parse(JSON.stringify(this.fos));
let matchLevel1: boolean = false;
let matchLevel2: boolean = false;
let matchLevel3: boolean = false;
// 1st level search
if(this.viewResults.length) {
this.viewResults = this.viewResults.filter(item => {
matchLevel1 = !!item.id.includes(value?.toLowerCase());
// // 2nd level search
// 2nd level search
if(item.children?.length && !matchLevel1) {
item.children = item.children.filter(subItem => {
matchLevel2 = !!subItem.id.includes(value?.toLowerCase());
// 3rd level search
if(subItem.children?.length && !matchLevel2) {
subItem.children = subItem.children.filter(subSubItem => subSubItem.id.includes(value?.toLowerCase()));
subItem.children = subItem.children.filter(subSubItem => {
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
// 4th level search
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 subItem.children?.length > 0 || matchLevel2;
return subItem.children?.length > 0;
});
}
return item.children?.length > 0;
@ -193,7 +234,7 @@ export class FosComponent implements OnInit, OnDestroy {
}
highlightKeyword(name) {
if(name.includes(this.keyword.toLowerCase())) {
if(name.toLowerCase().includes(this.keyword.toLowerCase())) {
return name.replace(new RegExp(this.keyword, "gi"), (matchedValue) => `<mark class="highlighted">${matchedValue}</mark>`);
} else {
return name;
@ -218,4 +259,46 @@ export class FosComponent implements OnInit, OnDestroy {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
}
public buildFosQueryParam(fos) {
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
return (this.searchFieldsHelper.getFosParameter() == 'foslabel' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
}
public backClicked() {
let id = this.selectedParentLevels[0].id;
this.selectedParentLevels=[];
this.cdr.detectChanges();
if(this.scrollPos) {
HelperFunctions.scrollTo(0, this.scrollPos);
this._router.navigate(['./'], {fragment: id, relativeTo: this.route, state: {disableScroll: true}});
} else {
this._router.navigate(['./'], {
fragment: id,
relativeTo: this.route,
state: {disableScroll: false, behavior: 'auto'}
});
}
this.cdr.detectChanges();
if (typeof IntersectionObserver !== 'undefined') {
setTimeout(() => {
this.setObserver();
}, 200);
}
}
public moreClicked(level1, level2, level3) {
this.scrollPos = window.scrollY;
if(this.observer) {
this.observer.disconnect();
}
this.selectedParentLevels=[level1, level2, level3];
this.cdr.detectChanges();
this._router.navigate(['./'],
{fragment: this.selectedParentLevels[0].id+"||"+this.selectedParentLevels[1].code+"||"+this.selectedParentLevels[2].code,
relativeTo: this.route, state: {disableScroll: false, behavior: 'auto'}});
}
}

View File

@ -2,13 +2,11 @@ import {CommonModule} from "@angular/common";
import {NgModule} from "@angular/core";
import {FormsModule} from "@angular/forms";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../utils/piwik/previousRouteRecorder.guard";
import {IconsModule} from "../utils/icons/icons.module";
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
import {Schema2jsonldModule} from "../sharedComponents/schema2jsonld/schema2jsonld.module";
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
import {SEOServiceModule} from "../sharedComponents/SEO/SEOService.module";
import {PiwikService} from "../utils/piwik/piwik.service";
import {FosRoutingModule} from './fos-routing.module';
import {FosComponent} from './fos.component';
@ -22,9 +20,7 @@ import {FosComponent} from './fos.component';
declarations: [
FosComponent
],
providers: [
PreviousRouteRecorder, PiwikService
],
providers: [],
exports: [
FosComponent
]

View File

@ -2,7 +2,7 @@ import {Injectable, Inject, PLATFORM_ID, Optional} from '@angular/core';
import {HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse, HttpHeaders} from '@angular/common/http';
import {Observable, of} from 'rxjs';
import {tap} from 'rxjs/operators';
import {TransferState, makeStateKey, StateKey} from '@angular/platform-browser';
import {TransferState, makeStateKey, StateKey} from '@angular/core';
import {isPlatformServer} from '@angular/common';
import {properties} from "../../environments/environment";
import {REQUEST} from "./utils/tokens";

View File

@ -1,225 +0,0 @@
import {
Component,
ElementRef,
EventEmitter,
HostListener,
Input,
OnDestroy,
OnInit,
Output,
ViewChild
} from "@angular/core";
import {Annotation, AnnotationService} from "./annotation.service";
import {ResultLandingInfo} from "../../utils/entities/resultLandingInfo";
import {EnvProperties} from "../../utils/properties/env-properties";
import {properties} from "../../../../environments/environment";
import {UserManagementService} from "../../services/user-management.service";
import {COOKIE, Session, User} from "../../login/utils/helper.class";
import {Subscriber} from "rxjs";
@Component({
selector: 'b2note',
template: `
<div *ngIf="annotations && annotations.length > 0" class="sideInfoTitle uk-margin-small-bottom">Annotations</div>
<div class="b2note">
<form #form ngNoForm *ngIf="pid && isLoggedIn"
[action]="properties.b2noteAPIURL + 'widget'"
method="post"
target="b2note_iframe"
class="uk-padding-small uk-padding-remove-vertical">
<!--URL of the annotated record-->
<input
type="hidden"
name="recordurl_tofeed"
[value]="url">
<!--PID of the annotated record-->
<input
type="hidden"
name="pid_tofeed"
[value]="pid">
</form>
<loading *ngIf="loading" class="uk-margin-medium-top"></loading>
<ul *ngIf="annotations && !loading" class="uk-list uk-list-divider">
<li *ngFor="let annotation of annotations.slice(0, visibleAnnotations); let i=index" uk-grid
class="uk-flex uk-flex-top uk-margin-remove-left">
<div [ngClass]="annotation.type" class="type">{{annotation.type}}</div>
<div [class.uk-width-1-3]="annotation.targets"
[class.uk-width-1-6@s]="annotation.targets">{{annotation.text}}</div>
<ul class="uk-width-expand uk-list uk-margin-remove-top" *ngIf="annotation.targets">
<li *ngFor="let target of annotation.targets.slice(0, annotation.targetSize)">
<a *ngIf="target.url" [href]="target.url" target="_blank">{{target.id}}</a>
<a *ngIf="!target.url" routerLink="/search/result"
[queryParams]="searchPid(target.id)">{{target.id}}</a>
</li>
<li *ngIf="annotation.targetSize < annotation.targets.length"><a
(click)="open(i)">+ {{annotation.targets.length - annotation.targetSize}}
more</a></li>
</ul>
</li>
</ul>
<div *ngIf="visibleAnnotations < annotations.length" class="uk-margin-medium-top uk-text-center">
<button class="uk-button uk-button-primary"
(click)="visibleAnnotations = (visibleAnnotations + annotationSize)">Load More
</button>
</div>
</div>
<div [class.uk-hidden]="!visible">
<div class="widget-container" cdkDrag>
<button type="button" class="close" aria-label="Close" (click)="toggleAnnotation($event)">
<span aria-hidden="true">×</span>
</button>
<iframe #iframe id="b2note_iframe" name="b2note_iframe" class="b2note-iframe">
</iframe>
</div>
</div>`,
styleUrls: ['annotation.css']
})
export class AnnotationComponent implements OnInit, OnDestroy {
@Input()
public landingInfo: ResultLandingInfo = null;
@Input()
public id: string = null;
public properties: EnvProperties = properties;
public url: string = null;
public pid: string = null;
public keywords: string[] = [];
public visible: boolean = false;
public annotations: Annotation[] = [];
public annotationSize: number = 10;
public isLoggedIn: boolean = Session.isLoggedIn();
public visibleAnnotations: number;
public loading: boolean = false;
public submitted: boolean = false;
@Output()
public pidEmitter: EventEmitter<string> = new EventEmitter<string>();
@ViewChild('iframe') iframe: ElementRef;
@ViewChild('form') form: ElementRef;
private subscriptions: any[] = [];
constructor(private annotationService: AnnotationService) {
}
@HostListener('window:message', ['$event'])
public onChange(event) {
if (this.properties.b2noteAPIURL.includes(event.origin)) {
if (event.data === "B2NOTE loaded") {
let token = COOKIE.getCookie('AccessToken');
this.iframe.nativeElement.contentWindow.postMessage({token: token}, this.properties.b2noteAPIURL);
} else {
this.getAnnotations();
}
}
}
ngOnInit(): void {
this.visibleAnnotations = this.annotationSize;
if (typeof window !== "undefined") {
let id = this.id;
this.url = window.location.href;
if (this.landingInfo.deletedByInferenceIds) {
id = this.landingInfo.deletedByInferenceIds[0];
this.url = this.url.replace(this.id, id);
}
if (this.landingInfo.identifiers && this.landingInfo.identifiers.size > 0) {
if (this.landingInfo.identifiers.get('doi')) {
this.pid = this.landingInfo.identifiers.get('doi')[0];
} else {
const key: string = this.landingInfo.identifiers.keys().next().value;
if (key) {
this.pid = this.landingInfo.identifiers.get(key)[0];
}
}
}
if (this.pid) {
this.getAnnotations();
}
this.pidEmitter.emit(this.pid);
}
}
public get enabled(): boolean {
return this.pid && this.isLoggedIn;
}
private clearSubscriptions() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
this.subscriptions = [];
}
private getAnnotations() {
if (!this.annotations || this.annotations.length === 0) {
this.loading = true;
}
this.subscriptions.push(this.annotationService.getAllAnnotations(this.pid).subscribe(annotations => {
this.annotations.forEach((annotation, index) => {
if (!annotations.find(element => element.type === annotation.type && element.text === annotation.text)) {
this.annotations.splice(index, 1);
}
});
annotations.forEach(annotation => {
if (!this.annotations.find(element => element.type === annotation.type && element.text === annotation.text)) {
annotation.targetSize = 3;
this.annotationService.getAnnotationTargets(annotation.text, annotation.type).subscribe(targets => {
annotation.targets = targets.filter(target => target.id !== this.pid);
});
this.annotations.push(annotation);
}
});
this.annotations = this.sort(this.annotations);
this.loading = false;
}, error => {
this.loading = false;
}));
}
public sort(annotations: Annotation[]): Annotation[] {
return annotations.sort((a, b) => {
if (a.type === b.type) {
return 1;
} else if (a.type === 'semantic') {
return -1;
} else if (b.type === 'semantic') {
return 1;
} else if (a.type === 'keyword') {
return -1;
} else if (b.type === 'keyword') {
return 1;
}
});
}
public searchPid(pid: string): { [k: string]: any; } {
return {
pid: pid
}
}
ngOnDestroy() {
this.clearSubscriptions();
}
toggleAnnotation(event) {
if (this.visible) {
event.preventDefault();
} else if(!this.submitted) {
this.form.nativeElement.submit();
this.submitted = true;
}
this.visible = !this.visible;
}
open(i: number) {
this.annotations.forEach((annotation, index) => {
if (index != i) {
annotation.targetSize = 3;
} else {
annotation.targetSize = annotation.targets.length
}
});
}
}

View File

@ -1,41 +0,0 @@
.widget-container {
position: fixed;
left: 50%;
top: 50%;
z-index: 1000;
padding: 19px;
margin-left: -167px;
margin-top: -311px;
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12);
border: 1px solid #e3e3e3;
border-radius: 4px;
outline: 0;
min-height: 20px;
background-color: #f5f5f5;
cursor: move;
}
.widget-container:hover, .widget-container:active{
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
}
.close {
float: right;
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
font-size: 21px;
font-weight: bold;
opacity: 0.2;
}
.b2note-iframe {
width: 100%;
height: 600px;
border: 1px solid #dddddd;
}

View File

@ -1,13 +0,0 @@
import {NgModule} from "@angular/core";
import {AnnotationComponent} from "./annotation.component";
import {CommonModule} from "@angular/common";
import {DragDropModule} from "@angular/cdk/drag-drop";
import {RouterModule} from "@angular/router";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [CommonModule, DragDropModule, RouterModule, LoadingModule],
declarations: [AnnotationComponent],
exports: [AnnotationComponent]
})
export class AnnotationModule {}

Some files were not shown because too many files have changed in this diff Show More