Compare commits
59
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
641f40ff45 | ||
|
|
6f0d17a991 | ||
|
|
2d1155d46b | ||
|
|
a1cf6e06af | ||
|
|
2e4a861e9c | ||
|
|
70e4ad71a6 | ||
|
|
dc27b49f63 | ||
|
|
b8707c7619 | ||
|
|
b251abb79f | ||
|
|
14be6c1a6c | ||
|
|
7addfe2a71 | ||
|
|
2474700473 | ||
|
|
0150f81a24 | ||
|
|
8a801d0bb5 | ||
|
|
496d2c88f0 | ||
|
|
9d8b287c13 | ||
|
|
94e0cad2d0 | ||
|
|
8be123bf3a | ||
|
|
570da1b47c | ||
|
|
02dd286d55 | ||
|
|
58199760de | ||
|
|
17b59213d3 | ||
|
|
06e2785914 | ||
|
|
0aea390e5e | ||
|
|
c33a900c66 | ||
|
|
f36e9a7d54 | ||
|
|
7259e3a0c0 | ||
|
|
b0581ad452 | ||
|
|
813953f1f5 | ||
|
|
288b21d407 | ||
|
|
01453f73dc | ||
|
|
410f1ade01 | ||
|
|
621a9dd2a1 | ||
|
|
18b9b8bf67 | ||
|
|
3f1ea0a418 | ||
|
|
211f7b82dc | ||
|
|
6675976feb | ||
|
|
034d3ee453 | ||
|
|
faa866f4e1 | ||
|
|
9c3e36930c | ||
|
|
d4daecd921 | ||
|
|
9f10e9e7af | ||
|
|
fa9def349c | ||
|
|
4073214131 | ||
|
|
03fac2a656 | ||
|
|
a204584ddd | ||
|
|
25de01c7be | ||
|
|
176235689f | ||
|
|
f27ee8b295 | ||
|
|
32616fe6aa | ||
|
|
9a5cb9e9b0 | ||
|
|
d11869c70b | ||
|
|
abb8c9dbb5 | ||
|
|
b8442213f8 | ||
|
|
0d19abb293 | ||
|
|
6ea3e79087 | ||
|
|
ba72b146a2 | ||
|
|
0f360c86b2 | ||
|
|
27f289f4a0 |
+10
-1
@@ -6,5 +6,14 @@ RUN mkdir /test && \
|
||||
pip install --root-user-action=ignore --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \
|
||||
pip install --root-user-action=ignore --no-cache-dir "sentence-transformers~=5.5.1"
|
||||
|
||||
ARG MODEL_NAME=intfloat/multilingual-e5-base
|
||||
ENV MODEL_NAME=${MODEL_NAME}
|
||||
ENV SENTENCE_TRANSFORMERS_HOME=/models
|
||||
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('intfloat/multilingual-e5-base')"
|
||||
ENV HF_HOME=/models
|
||||
|
||||
RUN python -c "import os, sentence_transformers; sentence_transformers.SentenceTransformer(os.environ['MODEL_NAME'])"
|
||||
|
||||
ENV HF_HUB_OFFLINE=1
|
||||
ENV TRANSFORMERS_OFFLINE=1
|
||||
ENV HF_DATASETS_OFFLINE=1
|
||||
|
||||
|
||||
@@ -6,9 +6,28 @@ so it is available for local runs or testing.
|
||||
Usage (run once from project root):
|
||||
python service/sentence_transformer/download_model.py
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Ensure service/src/main is in sys.path
|
||||
current_dir = Path(__file__).parent.resolve()
|
||||
src_main_dir = current_dir.parent / "src" / "main"
|
||||
if str(src_main_dir) not in sys.path:
|
||||
sys.path.insert(0, str(src_main_dir))
|
||||
|
||||
from inse.config import settings
|
||||
from sentence_transformers import SentenceTransformer
|
||||
|
||||
MODEL_NAME = "intfloat/multilingual-e5-base"
|
||||
print(f"Downloading '{MODEL_NAME}' to default cache directory...")
|
||||
MODEL_NAME = settings.sentence_transformers_model_name
|
||||
print(f"Downloading '{MODEL_NAME}' to cache directory...")
|
||||
model = SentenceTransformer(MODEL_NAME)
|
||||
print("Done.")
|
||||
|
||||
print(f"Verifying offline model loading for '{MODEL_NAME}'...")
|
||||
os.environ["HF_HUB_OFFLINE"] = "1"
|
||||
os.environ["TRANSFORMERS_OFFLINE"] = "1"
|
||||
os.environ["HF_DATASETS_OFFLINE"] = "1"
|
||||
|
||||
offline_model = SentenceTransformer(MODEL_NAME, local_files_only=True)
|
||||
print("Done. Model downloaded and verified for 100% offline usage.")
|
||||
|
||||
|
||||
@@ -169,8 +169,9 @@ def main():
|
||||
print("No topics found. Exiting.")
|
||||
return
|
||||
|
||||
from inse.util import get_model
|
||||
print(f"Initializing SentenceTransformer model '{MODEL_NAME}'...")
|
||||
model = SentenceTransformer(MODEL_NAME)
|
||||
model = get_model()
|
||||
|
||||
# 1. Gather all texts to embed
|
||||
keywords_by_topic = []
|
||||
|
||||
@@ -142,7 +142,7 @@ async def get_authors_by_ids(author_ids: list[str]) -> AuthorPage:
|
||||
|
||||
return await search_authors(
|
||||
page=0,
|
||||
size=len(author_ids),
|
||||
size=len(author_ids) if len(author_ids) <10000 else 10000,
|
||||
query={"terms": {"id": author_ids}},
|
||||
source=[
|
||||
"id",
|
||||
|
||||
@@ -23,12 +23,14 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
from pydantic_core import to_jsonable_python
|
||||
|
||||
from inse.authors.v2.model import Author
|
||||
class Fp7Publication(BaseModel):
|
||||
"""
|
||||
Fp7Publication
|
||||
""" # noqa: E501
|
||||
authors: Optional[StrictStr] = None
|
||||
oa_authors: Optional[List[Author]] = Field(default=None, alias="oaAuthors", description="OpenAlex authors matched to this publication's DOI")
|
||||
|
||||
collection: Optional[StrictStr] = None
|
||||
content_update_date: Optional[datetime] = Field(default=None, alias="contentUpdateDate")
|
||||
doi: Optional[StrictStr] = None
|
||||
@@ -46,7 +48,7 @@ class Fp7Publication(BaseModel):
|
||||
repository_url: Optional[StrictStr] = Field(default=None, alias="repositoryUrl")
|
||||
title: Optional[StrictStr] = None
|
||||
volume: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume"]
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume", "oaAuthors"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_by_name=True,
|
||||
|
||||
@@ -23,12 +23,13 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
from pydantic_core import to_jsonable_python
|
||||
|
||||
from inse.authors.v2.model import Author
|
||||
class H2020Publication(BaseModel):
|
||||
"""
|
||||
H2020Publication
|
||||
""" # noqa: E501
|
||||
authors: Optional[StrictStr] = None
|
||||
oa_authors: Optional[List[Author]] = Field(default=None, alias="oaAuthors", description="OpenAlex authors matched to this publication's DOI")
|
||||
collection: Optional[StrictStr] = None
|
||||
content_update_date: Optional[datetime] = Field(default=None, alias="contentUpdateDate")
|
||||
doi: Optional[StrictStr] = None
|
||||
@@ -46,7 +47,8 @@ class H2020Publication(BaseModel):
|
||||
repository_url: Optional[StrictStr] = Field(default=None, alias="repositoryUrl")
|
||||
title: Optional[StrictStr] = None
|
||||
volume: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume"]
|
||||
oa_authors: Optional[List[Author]] = Field(default=None, alias="oaAuthors", description="OpenAlex authors matched to this publication's DOI")
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume", "oaAuthors"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_by_name=True,
|
||||
|
||||
@@ -23,12 +23,14 @@ from typing import Any, ClassVar, Dict, List, Optional
|
||||
from typing import Optional, Set
|
||||
from typing_extensions import Self
|
||||
from pydantic_core import to_jsonable_python
|
||||
from inse.authors.v2.model import Author
|
||||
|
||||
class HEUPublication(BaseModel):
|
||||
"""
|
||||
HEUPublication
|
||||
""" # noqa: E501
|
||||
authors: Optional[StrictStr] = None
|
||||
oa_authors: Optional[List[Author]] = Field(default=None, alias="oaAuthors", description="OpenAlex authors matched to this publication's DOI")
|
||||
collection: Optional[StrictStr] = None
|
||||
content_update_date: Optional[datetime] = Field(default=None, alias="contentUpdateDate")
|
||||
doi: Optional[StrictStr] = None
|
||||
@@ -46,7 +48,8 @@ class HEUPublication(BaseModel):
|
||||
repository_url: Optional[StrictStr] = Field(default=None, alias="repositoryUrl")
|
||||
title: Optional[StrictStr] = None
|
||||
volume: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume"]
|
||||
oa_authors: Optional[List[Author]] = Field(default=None, alias="oaAuthors", description="OpenAlex authors matched to this publication's DOI")
|
||||
__properties: ClassVar[List[str]] = ["authors", "collection", "contentUpdateDate", "doi", "id", "isPublishedAs", "journalNumber", "journalTitle", "projectAcronym", "projectID", "publishedPages", "publishedYear", "publisher", "qaProcessedDoi", "rcn", "repositoryUrl", "title", "volume", "oaAuthors"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
validate_by_name=True,
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
Business logic for the "aktuell" news index on the INSE cluster.
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
|
||||
from pydantic import ValidationError
|
||||
|
||||
from inse.exceptions import ElasticsearchException
|
||||
|
||||
from ..integrations import elasticsearch, llm
|
||||
from ..persons.logic import find_ude_author_by_name, get_author_name_by_id
|
||||
from ..topics.logic import vector_search_topics_batch
|
||||
from .model import MatchedTopic, MentionedPerson, NewsArticle, NewsArticleDetail, NewsPage
|
||||
from .model import (MatchedTopic, MentionedPerson, NewsArticle, NewsArticleDetail, NewsKeywords, NewsPage)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -294,12 +294,19 @@ async def _get_article_keywords(
|
||||
if not text:
|
||||
return [], postproc_id
|
||||
|
||||
raw = await llm.call(
|
||||
response = await llm.call(
|
||||
system_prompt=KEYWORD_SYSTEM_PROMPT,
|
||||
user_prompt=f"Artikel:\n{text}",
|
||||
json_schema=NewsKeywords.model_json_schema(),
|
||||
schema_name="keywords",
|
||||
temperature=0.3,
|
||||
)
|
||||
keywords = _parse_keywords(raw)
|
||||
|
||||
try:
|
||||
keywords = _normalize_keywords(NewsKeywords.model_validate_json(response).keywords)
|
||||
except ValidationError:
|
||||
logger.warning(f"Keyword extraction for news {news_id} returned no valid JSON: {response}")
|
||||
keywords = []
|
||||
|
||||
if keywords:
|
||||
postproc_id = await _store_keywords(news_id, postproc_id, keywords)
|
||||
@@ -359,24 +366,12 @@ async def get_article_topics_from_index(news_id: str) -> list:
|
||||
return matched
|
||||
|
||||
|
||||
def _parse_keywords(raw: str) -> list:
|
||||
raw = (raw or "").strip()
|
||||
|
||||
try:
|
||||
parsed = json.loads(raw)
|
||||
if isinstance(parsed, list):
|
||||
candidates = parsed
|
||||
elif isinstance(parsed, dict):
|
||||
candidates = parsed.get("keywords", [])
|
||||
else:
|
||||
candidates = []
|
||||
except (json.JSONDecodeError, TypeError):
|
||||
candidates = re.split(r"[,\n]", raw)
|
||||
|
||||
def _normalize_keywords(candidates: list) -> list:
|
||||
"""Trims, dedups (case-insensitive) and caps the keywords from the LLM."""
|
||||
seen = set()
|
||||
keywords = []
|
||||
for item in candidates:
|
||||
term = str(item).strip().strip('"').strip()
|
||||
term = item.strip().strip('"').strip()
|
||||
if term and term.lower() not in seen:
|
||||
seen.add(term.lower())
|
||||
keywords.append(term)
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class NewsKeywords(BaseModel):
|
||||
keywords: List[str] = Field(description="The extracted keywords from the article.")
|
||||
|
||||
|
||||
class NewsArticle(BaseModel):
|
||||
|
||||
@@ -11,6 +11,8 @@ import time
|
||||
from datetime import datetime
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import ValidationError
|
||||
|
||||
from inse.exceptions import (
|
||||
BadRequestException,
|
||||
ElasticsearchException,
|
||||
@@ -26,6 +28,7 @@ from inse.persons.model import (
|
||||
CareerMetrics,
|
||||
CustomAuthor,
|
||||
CustomAuthorsListResponse,
|
||||
PersonBio
|
||||
)
|
||||
from inse.persons.query_builder import build_authors_search_rescored
|
||||
from inse.works.logic import enrich_topic_descriptions
|
||||
@@ -473,21 +476,28 @@ async def generate_person_bio(
|
||||
Beschreibe in zwei Sätzen das Hauptforschungsfeld des Autors. Formuliere dabei allgemeinverständlich, sodass auch Personen ohne Fachwissen einen Einblick in die Forschung gewinnen. Nenne keine konkreten Publikationen oder Einzelwerke, sondern konzentriere dich auf die übergeordneten Forschungsinteressen und Themen. Verzichte auf bloße Aufzählungen und verbinde die Informationen zu einem flüssigen Text.
|
||||
Beschreibe anschließend in ein bis zwei Sätzen die wirtschaftliche Relevanz der Forschung anhand von Anwendungen, Technologien oder Branchen, die davon profitieren könnten.
|
||||
Verwende insgesamt maximal 100 bis 120 Wörter. Formuliere die Antwort so, dass sie ohne weitere Anpassungen direkt als Kurzbiografie verwendet werden kann. Verwende keine Superlative oder übertriebene Formulierungen, sondern bleibe sachlich und informativ. Gebe den Text als One-Liner zurück, ohne Zeilenumbrüche oder Aufzählungen. Verwende keine Gedankenstriche (– oder —) zur Gliederung von Sätzen. Formuliere stattdessen mit Kommas, Klammern oder zwei getrennten Sätzen.
|
||||
Gib ausschließlich ein JSON-Objekt zurück, das den Text im Feld "bio" enthält.
|
||||
"""
|
||||
|
||||
user_prompt = f"Daten zur Person:\n{person_json}"
|
||||
|
||||
bio = await llm.call(
|
||||
response = await llm.call(
|
||||
system_prompt=system_prompt,
|
||||
user_prompt=user_prompt,
|
||||
json_schema=PersonBio.model_json_schema(),
|
||||
schema_name="bio",
|
||||
temperature=0.8,
|
||||
top_p=0.95,
|
||||
)
|
||||
|
||||
try:
|
||||
bio = PersonBio.model_validate_json(response).bio
|
||||
except ValidationError:
|
||||
logger.warning(f"Bio generation for author {author_id} returned no valid JSON: {response}")
|
||||
bio = "Etwas ist schiefgelaufen."
|
||||
|
||||
elapsed_time = time.time() - start_time
|
||||
logger.info(
|
||||
f"Bio generation for author {author_id} took {elapsed_time:.2f} seconds"
|
||||
)
|
||||
logger.info(f"Bio generation for author {author_id} took {elapsed_time:.2f} seconds")
|
||||
|
||||
return bio
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from collections import defaultdict
|
||||
from inse.config import get_settings
|
||||
from inse.integrations import elasticsearch
|
||||
from inse.model import ESCluster, ESIndex
|
||||
from inse.authors.v2.model import AuthorPage
|
||||
from inse.authors.v2.model import AuthorPage,Author
|
||||
from inse.authors.v2.service import get_authors_by_ids
|
||||
# Import base models
|
||||
from inse.models.cordis_eu_project import CordisEuProject
|
||||
@@ -136,17 +136,96 @@ async def get_enriched_cordis_project_by_id(
|
||||
|
||||
# helpers
|
||||
|
||||
async def _fetch_openalex_author_data_for_project_ids(
|
||||
project_ids: List[str],
|
||||
) -> Tuple[Dict[str, AuthorPage], Dict[str, Dict[str, List[Author]]]]:
|
||||
"""
|
||||
Single batched fetch that returns, per project_id:
|
||||
- an AuthorPage of all OpenAlex authors across all of the project's publications
|
||||
- a map of raw DOI -> List[Author] for attaching authors to individual publications
|
||||
"""
|
||||
if not project_ids:
|
||||
return {}, {}
|
||||
|
||||
query = {"bool": {"filter": [{"terms": {"projectID": project_ids}}]}}
|
||||
response = await elasticsearch.search(
|
||||
query=query,
|
||||
index=ESIndex.CORDIS_EU_PUBLICATIONS_WILDCARD,
|
||||
cluster=ESCluster.INSE,
|
||||
source=["projectID", "doi", "qaProcessedDoi"],
|
||||
size=10000,
|
||||
)
|
||||
|
||||
dois_by_project: Dict[str, Set[str]] = {}
|
||||
for hit in response.get("hits", {}).get("hits", []):
|
||||
source = hit.get("_source", {})
|
||||
pid = source.get("projectID")
|
||||
if not pid:
|
||||
continue
|
||||
dois_by_project.setdefault(pid, set())
|
||||
doi = source.get("doi")
|
||||
qa_processed_doi = source.get("qaProcessedDoi")
|
||||
if doi:
|
||||
dois_by_project[pid].add(doi)
|
||||
elif qa_processed_doi:
|
||||
dois_by_project[pid].add(qa_processed_doi)
|
||||
|
||||
all_dois = list({doi for dois in dois_by_project.values() for doi in dois})
|
||||
|
||||
# single ES call for the whole batch, keyed by raw DOI
|
||||
author_ids_by_doi = await get_openalex_author_ids_by_dois(dois=all_dois)
|
||||
all_author_ids = list({aid for ids in author_ids_by_doi.values() for aid in ids})
|
||||
|
||||
# single ES call to fetch all Author objects across every project
|
||||
author_page = await get_authors_by_ids(author_ids=all_author_ids)
|
||||
authors_by_id = {author.id: author for author in author_page.elements}
|
||||
|
||||
author_page_by_project: Dict[str, AuthorPage] = {}
|
||||
doi_author_map_by_project: Dict[str, Dict[str, List[Author]]] = {}
|
||||
|
||||
for pid in project_ids:
|
||||
dois = dois_by_project.get(pid, set())
|
||||
|
||||
doi_authors: Dict[str, List[Author]] = {}
|
||||
project_author_ids: Set[str] = set()
|
||||
for doi in dois:
|
||||
ids_for_doi = author_ids_by_doi.get(doi, [])
|
||||
doi_authors[doi] = [authors_by_id[aid] for aid in ids_for_doi if aid in authors_by_id]
|
||||
project_author_ids.update(ids_for_doi)
|
||||
|
||||
doi_author_map_by_project[pid] = doi_authors
|
||||
|
||||
authors_for_project = [authors_by_id[aid] for aid in project_author_ids if aid in authors_by_id]
|
||||
author_page_by_project[pid] = AuthorPage(
|
||||
elements=authors_for_project,
|
||||
total=len(authors_for_project),
|
||||
page=0,
|
||||
size=len(authors_for_project),
|
||||
)
|
||||
|
||||
return author_page_by_project, doi_author_map_by_project
|
||||
|
||||
|
||||
async def get_openalex_authors_for_cordis_project_ids(
|
||||
project_ids: List[str],
|
||||
) -> Dict[str, AuthorPage]:
|
||||
"""Returns a mapping of project_id -> AuthorPage for a batch of projects."""
|
||||
author_page_by_project, _ = await _fetch_openalex_author_data_for_project_ids(project_ids)
|
||||
return author_page_by_project
|
||||
|
||||
|
||||
async def _fetch_authors_and_topics_for_project(
|
||||
project_id: str,
|
||||
project_type: EuCordisProjectType,
|
||||
) -> Tuple[Optional[AuthorPage], List[Topic]]:
|
||||
"""Fetches OpenAlex authors and mapped topics for a single project."""
|
||||
authors_lookup, topics_lookup = await asyncio.gather(
|
||||
get_openalex_authors_for_projects_ids({project_type: [project_id]}),
|
||||
) -> Tuple[Optional[AuthorPage], List[Topic], Dict[str, List[Author]]]:
|
||||
"""Fetches OpenAlex authors (project-level + per-DOI map) and mapped topics for a single project."""
|
||||
(author_page_by_project, doi_author_map_by_project), topics_lookup = await asyncio.gather(
|
||||
_fetch_openalex_author_data_for_project_ids([project_id]),
|
||||
get_openalex_topics_for_eu_projects({project_type: [project_id]}),
|
||||
)
|
||||
|
||||
author_page = authors_lookup.get((project_type, project_id))
|
||||
author_page = author_page_by_project.get(project_id)
|
||||
doi_author_map = doi_author_map_by_project.get(project_id, {})
|
||||
|
||||
raw_topic_matches = sorted(
|
||||
topics_lookup.get((project_type, project_id), []),
|
||||
@@ -158,7 +237,26 @@ async def _fetch_authors_and_topics_for_project(
|
||||
if isinstance(match, dict)
|
||||
]
|
||||
|
||||
return author_page, topics
|
||||
return author_page, topics, doi_author_map
|
||||
|
||||
|
||||
def _attach_authors_to_publications(
|
||||
publications: List[Any],
|
||||
doi_author_map: Dict[str, List[Author]],
|
||||
) -> List[Any]:
|
||||
"""Sets oa_authors on each publication by matching its doi/qaProcessedDoi against doi_author_map."""
|
||||
for pub in publications:
|
||||
doi = getattr(pub, "doi", None)
|
||||
qa_processed_doi = getattr(pub, "qa_processed_doi", None)
|
||||
|
||||
authors = doi_author_map.get(doi) if doi else None
|
||||
if not authors and qa_processed_doi:
|
||||
authors = doi_author_map.get(qa_processed_doi)
|
||||
|
||||
pub.oa_authors = authors or []
|
||||
|
||||
return publications
|
||||
|
||||
|
||||
async def _fetch_related_entities_parallel(
|
||||
project_id: str,
|
||||
@@ -258,11 +356,15 @@ async def _enrich_fp7_project(
|
||||
logger.error(f"Failed to validate FP7 project {project_id}: {e}")
|
||||
return None
|
||||
|
||||
related, (authors, topics) = await asyncio.gather(
|
||||
related, (authors, topics, doi_author_map) = await asyncio.gather(
|
||||
_fetch_related_entities_parallel(project_id, _FP7_ENTITY_CONFIGS),
|
||||
_fetch_authors_and_topics_for_project(project_id, project_type),
|
||||
)
|
||||
|
||||
related["publications"] = _attach_authors_to_publications(
|
||||
related.get("publications", []), doi_author_map
|
||||
)
|
||||
|
||||
return Fp7ProjectDetails.from_project_with_relations(
|
||||
project=project, oa_authors=authors, oa_topics=topics, **related
|
||||
)
|
||||
@@ -279,11 +381,15 @@ async def _enrich_h2020_project(
|
||||
logger.error(f"Failed to validate H2020 project {project_id}: {e}")
|
||||
return None
|
||||
|
||||
related, (authors, topics) = await asyncio.gather(
|
||||
related, (authors, topics, doi_author_map) = await asyncio.gather(
|
||||
_fetch_related_entities_parallel(project_id, _H2020_ENTITY_CONFIGS),
|
||||
_fetch_authors_and_topics_for_project(project_id, project_type),
|
||||
)
|
||||
|
||||
related["publications"] = _attach_authors_to_publications(
|
||||
related.get("publications", []), doi_author_map
|
||||
)
|
||||
|
||||
return H2020ProjectDetails.from_project_with_relations(
|
||||
project=project, oa_authors=authors, oa_topics=topics, **related
|
||||
)
|
||||
@@ -300,57 +406,19 @@ async def _enrich_heu_project(
|
||||
logger.error(f"Failed to validate Horizon Europe project {project_id}: {e}")
|
||||
return None
|
||||
|
||||
related, (authors, topics) = await asyncio.gather(
|
||||
related, (authors, topics, doi_author_map) = await asyncio.gather(
|
||||
_fetch_related_entities_parallel(project_id, _HEU_ENTITY_CONFIGS),
|
||||
_fetch_authors_and_topics_for_project(project_id, project_type),
|
||||
)
|
||||
|
||||
related["publications"] = _attach_authors_to_publications(
|
||||
related.get("publications", []), doi_author_map
|
||||
)
|
||||
|
||||
return HEUProjectDetails.from_project_with_relations(
|
||||
project=project, oa_authors=authors, oa_topics=topics, **related
|
||||
)
|
||||
|
||||
async def _enrich_h2020_project(
|
||||
project_id: str,
|
||||
project_source: Dict[str, Any],
|
||||
project_type: EuCordisProjectType,
|
||||
) -> Optional[H2020ProjectDetails]:
|
||||
try:
|
||||
project = H2020Project.model_validate(project_source)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to validate H2020 project {project_id}: {e}")
|
||||
return None
|
||||
|
||||
related, (authors, topics) = await asyncio.gather(
|
||||
_fetch_related_entities_parallel(project_id, _H2020_ENTITY_CONFIGS),
|
||||
_fetch_authors_and_topics_for_project(project_id, project_type),
|
||||
)
|
||||
|
||||
return H2020ProjectDetails.from_project_with_relations(
|
||||
project=project, oa_authors=authors, oa_topics=topics, **related
|
||||
)
|
||||
|
||||
|
||||
async def _enrich_heu_project(
|
||||
project_id: str,
|
||||
project_source: Dict[str, Any],
|
||||
project_type: EuCordisProjectType,
|
||||
) -> Optional[HEUProjectDetails]:
|
||||
try:
|
||||
project = HEUProject.model_validate(project_source)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to validate Horizon Europe project {project_id}: {e}")
|
||||
return None
|
||||
|
||||
related, (authors, topics) = await asyncio.gather(
|
||||
_fetch_related_entities_parallel(project_id, _HEU_ENTITY_CONFIGS),
|
||||
_fetch_authors_and_topics_for_project(project_id, project_type),
|
||||
)
|
||||
|
||||
return HEUProjectDetails.from_project_with_relations(
|
||||
project=project, oa_authors=authors, oa_topics=topics, **related
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
def _eu_project_type_index_filter(
|
||||
@@ -490,7 +558,6 @@ async def get_eu_project_ids_by_organization_filters(
|
||||
for org_name in organization_names:
|
||||
if name and org_name.lower() in name.lower():
|
||||
project_org_matches[project_id].add(f"name:{org_name.lower()}")
|
||||
print(f"Project organization matches for {project_type}: {project_org_matches}")
|
||||
required_orgs = set()
|
||||
|
||||
# Add ID requirements
|
||||
@@ -512,7 +579,6 @@ async def get_eu_project_ids_by_organization_filters(
|
||||
continue
|
||||
|
||||
result[project_type].append(project_id)
|
||||
print(f"Final project IDs by type: {result}")
|
||||
return result
|
||||
|
||||
async def get_eu_organizations_for_projects(
|
||||
@@ -638,9 +704,13 @@ async def get_eu_euroscivoc_for_projects(
|
||||
return lookup
|
||||
|
||||
|
||||
async def search_eu_cordis_projects(
|
||||
page: int,
|
||||
size: int,
|
||||
class _NoMatchingEuProjects(Exception):
|
||||
"""Internal sentinel: some filter resolved to zero matching project IDs,
|
||||
so the overall query can short-circuit to an empty result without
|
||||
hitting Elasticsearch again."""
|
||||
|
||||
|
||||
async def _build_eu_cordis_search_query(
|
||||
project_types: Optional[List[EuCordisProjectType]] = None,
|
||||
organization_ids: Optional[List[str]] = None,
|
||||
organization_names: Optional[List[str]] = None,
|
||||
@@ -655,16 +725,16 @@ async def search_eu_cordis_projects(
|
||||
framework_programmes: Optional[List[str]] = None,
|
||||
funding_schemes: Optional[List[str]] = None,
|
||||
statuses: Optional[List[str]] = None,
|
||||
sort_by: str = "title",
|
||||
sort_direction: str = "asc",
|
||||
fuzzy: bool = False,
|
||||
) -> EuCordisProjectSearchPage:
|
||||
) -> Tuple[Dict[str, Any], List[EuCordisProjectType], List[Any]]:
|
||||
"""
|
||||
Generic EU CORDIS project search across FP7, H2020 and Horizon Europe.
|
||||
Mirrors DFG behavior:
|
||||
- fuzzy=True + topic_ids => OpenAlex topic mapping lookup
|
||||
- filter_topic_ids are always applied independently
|
||||
- selected organizations/topics must ALL match
|
||||
Builds the (query, project_types, indices) tuple shared by every EU CORDIS
|
||||
project search/aggregation. Centralizing this means the filters applied to
|
||||
the results table and to any derived aggregation (e.g. funding-over-time)
|
||||
can never drift apart.
|
||||
|
||||
Raises _NoMatchingEuProjects if any filter resolves to zero project IDs,
|
||||
so callers can short-circuit to an empty result without a wasted query.
|
||||
"""
|
||||
if not project_types:
|
||||
project_types = [
|
||||
@@ -680,7 +750,7 @@ async def search_eu_cordis_projects(
|
||||
# === Author filter resolved in service layer ===
|
||||
if author_project_ids is not None:
|
||||
if not author_project_ids:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
raise _NoMatchingEuProjects()
|
||||
|
||||
must_clauses.append({"terms": {"id": author_project_ids}})
|
||||
|
||||
@@ -693,7 +763,7 @@ async def search_eu_cordis_projects(
|
||||
|
||||
topic_filter = _eu_project_type_index_filter(topic_project_ids_by_type)
|
||||
if not topic_filter:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
raise _NoMatchingEuProjects()
|
||||
|
||||
must_clauses.append(topic_filter)
|
||||
|
||||
@@ -748,7 +818,7 @@ async def search_eu_cordis_projects(
|
||||
|
||||
topic_filter = _eu_project_type_index_filter(filter_topic_project_ids_by_type)
|
||||
if not topic_filter:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
raise _NoMatchingEuProjects()
|
||||
|
||||
must_clauses.append(topic_filter)
|
||||
|
||||
@@ -762,7 +832,7 @@ async def search_eu_cordis_projects(
|
||||
|
||||
org_filter = _eu_project_type_index_filter(org_project_ids_by_type)
|
||||
if not org_filter:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
raise _NoMatchingEuProjects()
|
||||
|
||||
must_clauses.append(org_filter)
|
||||
|
||||
@@ -825,12 +895,64 @@ async def search_eu_cordis_projects(
|
||||
|
||||
country_filter = _eu_project_type_index_filter(country_project_ids_by_type)
|
||||
if not country_filter:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
raise _NoMatchingEuProjects()
|
||||
|
||||
must_clauses.append(country_filter)
|
||||
|
||||
query = {"bool": {"must": must_clauses}} if must_clauses else {"match_all": {}}
|
||||
|
||||
return query, project_types, indices
|
||||
|
||||
|
||||
async def search_eu_cordis_projects(
|
||||
page: int,
|
||||
size: int,
|
||||
project_types: Optional[List[EuCordisProjectType]] = None,
|
||||
organization_ids: Optional[List[str]] = None,
|
||||
organization_names: Optional[List[str]] = None,
|
||||
author_project_ids: Optional[List[str]] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
topic_ids: Optional[List[str]] = None,
|
||||
filter_topic_ids: Optional[List[str]] = None,
|
||||
title: Optional[str] = None,
|
||||
funding_start_years: Optional[List[str]] = None,
|
||||
funding_end_years: Optional[List[str]] = None,
|
||||
countries: Optional[List[str]] = None,
|
||||
framework_programmes: Optional[List[str]] = None,
|
||||
funding_schemes: Optional[List[str]] = None,
|
||||
statuses: Optional[List[str]] = None,
|
||||
sort_by: str = "title",
|
||||
sort_direction: str = "asc",
|
||||
fuzzy: bool = False,
|
||||
) -> EuCordisProjectSearchPage:
|
||||
"""
|
||||
Generic EU CORDIS project search across FP7, H2020 and Horizon Europe.
|
||||
Mirrors DFG behavior:
|
||||
- fuzzy=True + topic_ids => OpenAlex topic mapping lookup
|
||||
- filter_topic_ids are always applied independently
|
||||
- selected organizations/topics must ALL match
|
||||
"""
|
||||
try:
|
||||
query, project_types, indices = await _build_eu_cordis_search_query(
|
||||
project_types=project_types,
|
||||
organization_ids=organization_ids,
|
||||
organization_names=organization_names,
|
||||
author_project_ids=author_project_ids,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
title=title,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
framework_programmes=framework_programmes,
|
||||
funding_schemes=funding_schemes,
|
||||
statuses=statuses,
|
||||
fuzzy=fuzzy,
|
||||
)
|
||||
except _NoMatchingEuProjects:
|
||||
return EuCordisProjectSearchPage(elements=[], total=0, page=page, size=size)
|
||||
|
||||
sort_direction = sort_direction.lower()
|
||||
if sort_direction not in ["asc", "desc"]:
|
||||
sort_direction = "asc"
|
||||
@@ -920,7 +1042,108 @@ async def search_eu_cordis_projects(
|
||||
page=page,
|
||||
size=size,
|
||||
)
|
||||
|
||||
|
||||
|
||||
async def get_eu_cordis_projects_funding_data(
|
||||
project_types: Optional[List[EuCordisProjectType]] = None,
|
||||
organization_ids: Optional[List[str]] = None,
|
||||
organization_names: Optional[List[str]] = None,
|
||||
author_project_ids: Optional[List[str]] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
topic_ids: Optional[List[str]] = None,
|
||||
filter_topic_ids: Optional[List[str]] = None,
|
||||
title: Optional[str] = None,
|
||||
funding_start_years: Optional[List[str]] = None,
|
||||
funding_end_years: Optional[List[str]] = None,
|
||||
countries: Optional[List[str]] = None,
|
||||
framework_programmes: Optional[List[str]] = None,
|
||||
funding_schemes: Optional[List[str]] = None,
|
||||
statuses: Optional[List[str]] = None,
|
||||
fuzzy: bool = False,
|
||||
) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
Fetches ONLY the fields needed for a funding-over-time aggregation
|
||||
(id, startDate, endDate, ecMaxContribution) for every EU CORDIS project
|
||||
matching the given filters.
|
||||
|
||||
This intentionally skips the author/organization/CORDIS-topic/EuroSciVoc/
|
||||
OpenAlex-topic enrichment that `search_eu_cordis_projects` performs per
|
||||
project, since none of that is needed to compute funding totals. That
|
||||
enrichment is what makes the funding-over-time endpoint slow for
|
||||
institutions with many projects - this function avoids it entirely.
|
||||
|
||||
"""
|
||||
try:
|
||||
query, _, indices = await _build_eu_cordis_search_query(
|
||||
project_types=project_types,
|
||||
organization_ids=organization_ids,
|
||||
organization_names=organization_names,
|
||||
author_project_ids=author_project_ids,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
title=title,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
framework_programmes=framework_programmes,
|
||||
funding_schemes=funding_schemes,
|
||||
statuses=statuses,
|
||||
fuzzy=fuzzy,
|
||||
)
|
||||
except _NoMatchingEuProjects:
|
||||
return []
|
||||
|
||||
results: List[Dict[str, Any]] = []
|
||||
page_size = 5000
|
||||
search_after: Optional[List[Any]] = None
|
||||
|
||||
while True:
|
||||
body: Dict[str, Any] = {
|
||||
"size": page_size,
|
||||
"track_total_hits": False,
|
||||
"_source": ["id", "startDate", "endDate", "ecMaxContribution"],
|
||||
"query": query,
|
||||
# "id" is unique per project and used elsewhere as a term-filter
|
||||
# field, so it's mapped as keyword - safe + deterministic sort
|
||||
# key for search_after pagination across an arbitrarily large
|
||||
# result set.
|
||||
"sort": [{"id": {"order": "asc", "unmapped_type": "keyword"}}],
|
||||
}
|
||||
if search_after is not None:
|
||||
body["search_after"] = search_after
|
||||
|
||||
response = await elasticsearch.search(
|
||||
index=indices,
|
||||
cluster=ESCluster.INSE,
|
||||
body=body,
|
||||
)
|
||||
|
||||
hits = response.get("hits", {}).get("hits", [])
|
||||
if not hits:
|
||||
break
|
||||
|
||||
for hit in hits:
|
||||
source = hit.get("_source", {})
|
||||
results.append(
|
||||
{
|
||||
"id": source.get("id"),
|
||||
"start_date": source.get("startDate"),
|
||||
"end_date": source.get("endDate"),
|
||||
"ec_max_contribution": source.get("ecMaxContribution"),
|
||||
}
|
||||
)
|
||||
|
||||
if len(hits) < page_size:
|
||||
break
|
||||
|
||||
search_after = hits[-1].get("sort")
|
||||
if not search_after:
|
||||
break
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def _to_openalex_doi_url(raw_doi: str) -> str:
|
||||
"""CORDIS stores bare DOIs (e.g. '10.1093/toxsci/kfs018');
|
||||
OpenAlex works index stores full URLs ('https://doi.org/10.1093/toxsci/kfs018')."""
|
||||
|
||||
@@ -46,7 +46,45 @@ async def get_dfg_institution_names_by_ids(institution_ids: List[int]) -> Option
|
||||
except Exception as e:
|
||||
logger.exception(f"Error fetching institution names for ids {institution_ids}: {str(e)}")
|
||||
return []
|
||||
|
||||
|
||||
async def get_institution_ids_by_institution_aliases(institution_aliases: list[str]) -> list[int]:
|
||||
if not institution_aliases:
|
||||
return []
|
||||
response = await elasticsearch.search(
|
||||
index=ESIndex.DFG_INSTITUTES,
|
||||
cluster=ESCluster.INSE,
|
||||
body={
|
||||
"size": 10000,
|
||||
"_source": ["institute_id"],
|
||||
"query": {
|
||||
"bool": {
|
||||
"should": [
|
||||
clause
|
||||
for name in institution_aliases
|
||||
for clause in (
|
||||
# {"match": {"root_name_de": {"query": name, "operator": "and"}}},
|
||||
# {"match": {"root_name_en": {"query": name, "operator": "and"}}},
|
||||
# {"match": {"institute_name_de": {"query": name, "operator": "and"}}},
|
||||
# {"match": {"institute_name_en": {"query": name, "operator": "and"}}},
|
||||
{"match_phrase": {"root_name_de":name}},
|
||||
{"match_phrase": {"root_name_en":name}},
|
||||
{"match_phrase": {"institute_name_de":name}},
|
||||
{"match_phrase": {"institute_name_en": name}},
|
||||
)
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
return list(
|
||||
{
|
||||
hit["_source"]["institute_id"]
|
||||
for hit in response.get("hits", {}).get("hits", [])
|
||||
if hit.get("_source", {}).get("institute_id") is not None
|
||||
}
|
||||
)
|
||||
|
||||
async def get_person_ids_by_institution_ids(
|
||||
institution_ids: list[int],
|
||||
) -> list[int]:
|
||||
@@ -59,10 +97,13 @@ async def get_person_ids_by_institution_ids(
|
||||
body={
|
||||
"size": 10000,
|
||||
"_source": ["person_id"],
|
||||
"query": {
|
||||
"terms": {
|
||||
"institute_id": institution_ids
|
||||
}
|
||||
"query": { "bool":{
|
||||
"should": [
|
||||
{"terms": {"institute_id": institution_ids}},
|
||||
{"terms": {"root_id": institution_ids}},
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -108,7 +149,6 @@ async def get_bund_project_ids_by_topic_ids(topic_ids: List[str]) -> List[str]:
|
||||
cluster=ESCluster.INSE,
|
||||
body=body,
|
||||
)
|
||||
print(f"Response from Elasticsearch: {json.dumps(response, indent=2)}") # Debugging line
|
||||
hits = response.get("hits", {}).get("hits", [])
|
||||
if not hits:
|
||||
break
|
||||
|
||||
@@ -264,19 +264,33 @@ class DfgProjectSummary(BaseModel):
|
||||
|
||||
institution = None
|
||||
if person.get("institute_id") is not None:
|
||||
institution = DfgInstitutionSummary(
|
||||
institute = DfgInstitutionSummary(
|
||||
id=person["institute_id"],
|
||||
institute_name_de=person.get("institute_name_de"),
|
||||
institute_name_en=person.get("institute_name_en"),
|
||||
address_country_de=person.get("address_country_de"),
|
||||
address_country_en=person.get("address_country_en"),
|
||||
root_id=person["root_id"],
|
||||
root_name_de=person.get("root_name_de"),
|
||||
root_name_en=person.get("root_name_en"),
|
||||
root_id=None,
|
||||
root_name_de=None,
|
||||
root_name_en=None,
|
||||
)
|
||||
|
||||
institutions[person["institute_id"]] = institution
|
||||
institutions[f"institute:{person['institute_id']}"] = institute
|
||||
|
||||
if person.get("root_id") is not None:
|
||||
root_institution = DfgInstitutionSummary(
|
||||
id=person["root_id"],
|
||||
institute_name_de=person.get("root_name_de"),
|
||||
institute_name_en=person.get("root_name_en"),
|
||||
address_country_de=person.get("address_country_de"),
|
||||
address_country_en=person.get("address_country_en"),
|
||||
root_id=None,
|
||||
root_name_de=None,
|
||||
root_name_en=None,
|
||||
)
|
||||
|
||||
institutions[f"root:{person['root_id']}"] = root_institution
|
||||
|
||||
if person.get("person_id") is not None:
|
||||
project_persons.append(
|
||||
DfgPersonSummary(
|
||||
@@ -290,6 +304,7 @@ class DfgProjectSummary(BaseModel):
|
||||
)
|
||||
)
|
||||
topics_raw = source.get("topics") or []
|
||||
print(f"Raw topics for DFG project {hit.get('_id', '')}: {topics_raw}")
|
||||
topics = None
|
||||
if isinstance(topics_raw, list) and topics_raw:
|
||||
# Sort by rank if present, so the most relevant topic comes first
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import json
|
||||
import logging
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple
|
||||
from typing import Any, Dict, List, Optional, Set
|
||||
|
||||
import urllib
|
||||
from inse.config import get_settings
|
||||
@@ -21,7 +21,7 @@ from inse.models.dfg_project_details import DfgProjectDetails
|
||||
from inse.models.bund_project_details import BundProjectDetails
|
||||
from inse.integrations import elasticsearch
|
||||
from inse.model import ESCluster, ESIndex
|
||||
from inse.projects.logic import get_person_ids_by_institution_ids, get_dfg_project_ids_by_topic_ids,get_bund_project_ids_by_topic_ids, get_openalex_topics_for_dfg_projects, get_person_institutes, get_openalex_topics_for_bund_projects
|
||||
from inse.projects.logic import get_person_ids_by_institution_ids, get_dfg_project_ids_by_topic_ids,get_bund_project_ids_by_topic_ids, get_openalex_topics_for_dfg_projects, get_person_institutes, get_openalex_topics_for_bund_projects, get_institution_ids_by_institution_aliases
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
@@ -323,7 +323,6 @@ async def get_dfg_project_ids_by_names(names: List[str]) -> List[str]:
|
||||
for project in hit.get("_source", {}).get("projects", [])
|
||||
if "project_id" in project
|
||||
}
|
||||
print(f"Retrieved project IDs for names {len(project_ids)}: {project_ids}")
|
||||
return list(project_ids)
|
||||
|
||||
async def get_dfg_project_ids_by_dois(dois: List[str]) -> List[str]:
|
||||
@@ -348,8 +347,9 @@ async def get_dfg_project_ids_by_dois(dois: List[str]) -> List[str]:
|
||||
async def search_dfg_projects(
|
||||
page: int,
|
||||
size: int,
|
||||
institution_aliases: Optional[List[str]] = None,
|
||||
project_ids: Optional[List[int]] = None,
|
||||
institution_ids: Optional[List[int]] = None,
|
||||
institution_ids: Optional[List[int]] = [],
|
||||
names: Optional[List[str]] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
topic_ids: Optional[List[str]] = None,
|
||||
@@ -409,7 +409,7 @@ async def search_dfg_projects(
|
||||
"query": {},
|
||||
}
|
||||
|
||||
must_clauses: List[Dict[str, Any]] = []
|
||||
must_clauses: List[Dict[str, Any]] = []
|
||||
if project_ids:
|
||||
must_clauses.append({"terms": {"id": project_ids}})
|
||||
# === Primary search clause: mutually exclusive fuzzy(topic_ids) vs keyword phrase search ===
|
||||
@@ -510,6 +510,24 @@ async def search_dfg_projects(
|
||||
if name_must_clauses:
|
||||
must_clauses.append({"bool": {"must": name_must_clauses}})
|
||||
|
||||
if institution_aliases:
|
||||
matching_institution_ids = await get_institution_ids_by_institution_aliases(
|
||||
institution_aliases=institution_aliases
|
||||
)
|
||||
if not matching_institution_ids:
|
||||
return DfgProjectPage(elements=[], total=0, page=page, size=size)
|
||||
matching_person_ids = await get_person_ids_by_institution_ids(
|
||||
institution_ids=matching_institution_ids
|
||||
)
|
||||
must_clauses.append(
|
||||
{
|
||||
"nested": {
|
||||
"path": "persons",
|
||||
"query": {"terms": {"persons.person_id": matching_person_ids}},
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if institution_ids:
|
||||
matching_person_ids = await get_person_ids_by_institution_ids(
|
||||
institution_ids=institution_ids
|
||||
@@ -550,7 +568,7 @@ async def search_dfg_projects(
|
||||
sort_config = {"id": {"order": sort_direction}}
|
||||
|
||||
body["sort"] = [sort_config]
|
||||
|
||||
# print(f"Executing DFG project search with body: {json.dumps(body, indent=2)}")
|
||||
# === Execute Search ===
|
||||
response = await elasticsearch.search(
|
||||
index=ESIndex.DFG_PROJECTS,
|
||||
@@ -574,9 +592,7 @@ async def search_dfg_projects(
|
||||
for hit in hits:
|
||||
source = hit["_source"]
|
||||
project_id = source["id"]
|
||||
|
||||
source["topics"] = topic_lookup.get(project_id, [])
|
||||
|
||||
source["topics"] = topic_lookup.get(str(project_id), [])
|
||||
persons = source.get("persons", [])
|
||||
for person in persons:
|
||||
person_id = person.get("person_id")
|
||||
@@ -669,7 +685,8 @@ def _bund_year_filters(field: str, years: List[str]) -> Dict[str, Any]:
|
||||
|
||||
async def search_bund_projects_with_filters(
|
||||
executing_agency: Optional[List[str]] = None,
|
||||
institution_ids: Optional[List[str]] = None,
|
||||
oa_institution_aliases: Optional[List[str]] = None,
|
||||
raw_oa_institution_id: Optional[str] = None,
|
||||
funding_arts: Optional[List[str]] = None, # actually EuCordisProjectType, but treated as strings
|
||||
title: Optional[str] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
@@ -683,10 +700,16 @@ async def search_bund_projects_with_filters(
|
||||
sort_by: str = "title",
|
||||
sort_direction: str = "asc",
|
||||
fuzzy: bool = False,
|
||||
skip_topic_enrichment: bool = False,
|
||||
) -> BundProjectPage:
|
||||
"""
|
||||
Main search function for BUND projects, analogous to the DFG search.
|
||||
"""
|
||||
|
||||
skip_topic_enrichment: when True, skips the extra OpenAlex-topics lookup
|
||||
used to populate `oa_topics` on each result. Callers that only need core
|
||||
project fields (e.g. funding-over-time aggregation) should set this to
|
||||
avoid the unnecessary ES round trip.
|
||||
"""
|
||||
from_ = page * size
|
||||
#institution_ids = ["I62318514"]
|
||||
# Fields we need to build BundProject objects (validation aliases match these exact names)
|
||||
@@ -731,6 +754,22 @@ async def search_bund_projects_with_filters(
|
||||
}
|
||||
|
||||
must_clauses: List[Dict[str, Any]] = []
|
||||
if oa_institution_aliases:
|
||||
must_clauses.append(
|
||||
{
|
||||
"bool": {
|
||||
"should": [
|
||||
clause
|
||||
for name in oa_institution_aliases
|
||||
for clause in (
|
||||
{"match": {"Zuwendungsempfänger": {"query": name, "operator": "and"}}},
|
||||
{"match": {"Ausführende Stelle": {"query": name, "operator": "and"}}},
|
||||
)
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
)
|
||||
# === Primary search clause: fuzzy(topic_ids) vs keyword phrase search ===
|
||||
if fuzzy and topic_ids:
|
||||
matching_project_ids = await get_bund_project_ids_by_topic_ids(topic_ids=topic_ids)
|
||||
@@ -804,7 +843,6 @@ async def search_bund_projects_with_filters(
|
||||
must_clauses.append(_bund_year_filters("funding_end", funding_end_years))
|
||||
|
||||
body["query"] = {"bool": {"must": must_clauses}} if must_clauses else {"match_all": {}}
|
||||
|
||||
# === Sorting ===
|
||||
sort_by = sort_by.strip().lower()
|
||||
sort_direction = sort_direction.strip().lower()
|
||||
@@ -822,7 +860,7 @@ async def search_bund_projects_with_filters(
|
||||
sort_config = {"Förderkennzeichen.keyword": {"order": sort_direction}}
|
||||
|
||||
body["sort"] = [sort_config]
|
||||
|
||||
# print(f"Executing BUND project search with body: {json.dumps(body, indent=2)}")
|
||||
# === Execute Search ===
|
||||
response = await elasticsearch.search(
|
||||
index=ESIndex.PROJECTS_BUND_V1,
|
||||
@@ -833,11 +871,13 @@ async def search_bund_projects_with_filters(
|
||||
|
||||
hits = response.get("hits", {}).get("hits", [])
|
||||
|
||||
# Enrich with OpenAlex topics
|
||||
project_ids = [hit["_id"] for hit in hits]
|
||||
topic_lookup = await get_openalex_topics_for_bund_projects(project_ids=project_ids)
|
||||
for hit in hits:
|
||||
hit["_source"]["oa_topics"] = topic_lookup.get(hit["_id"], [])
|
||||
# Enrich with OpenAlex topics (skipped for callers that don't need them,
|
||||
# e.g. funding-over-time aggregation, to avoid an unnecessary ES call)
|
||||
if not skip_topic_enrichment:
|
||||
project_ids = [hit["_id"] for hit in hits]
|
||||
topic_lookup = await get_openalex_topics_for_bund_projects(project_ids=project_ids)
|
||||
for hit in hits:
|
||||
hit["_source"]["oa_topics"] = topic_lookup.get(hit["_id"], [])
|
||||
|
||||
return _complete_response_to_bund_project_page(response, page, size)
|
||||
|
||||
@@ -1005,4 +1045,4 @@ def _hit_to_funding_project(hit: Dict[str, Any]) -> FundingProject:
|
||||
else:
|
||||
raise ValueError(
|
||||
"The provided hit does not belong to a recognized project index."
|
||||
)
|
||||
)
|
||||
@@ -100,7 +100,9 @@ async def get_single_dfg_project(
|
||||
response_model_by_alias=False,
|
||||
)
|
||||
async def search_bund_projects(
|
||||
|
||||
institutions_search_client: Annotated[
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
executing_agency: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Executing Agencies (Ausführende Stellen) to filter by."),
|
||||
@@ -137,9 +139,9 @@ async def search_bund_projects(
|
||||
Optional[List[str]],
|
||||
Query(description="Organization countries."),
|
||||
] = None,
|
||||
institution_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Institution IDs to filter by."),
|
||||
raw_oa_institution_id: Annotated[
|
||||
Optional[str],
|
||||
Query(description="The ID of the institution to filter by."),
|
||||
] = None,
|
||||
page: Annotated[int, Query(description="The page number.", ge=0)] = 0,
|
||||
size: Annotated[int, Query(description="The page size.", ge=1)] = 20,
|
||||
@@ -154,6 +156,7 @@ async def search_bund_projects(
|
||||
] = False,
|
||||
) -> BundProjectPage:
|
||||
return await projects_service.search_bund_projects_with_filters(
|
||||
institutions_search_client=institutions_search_client,
|
||||
executing_agency=executing_agency,
|
||||
funding_arts=funding_arts,
|
||||
title=title,
|
||||
@@ -163,7 +166,7 @@ async def search_bund_projects(
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
institution_ids=institution_ids,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
page=page,
|
||||
size=size,
|
||||
sort_by=sort_by,
|
||||
@@ -432,7 +435,11 @@ async def get_single_eu_cordis_project(
|
||||
@router.get(
|
||||
"/institution/bund/funding-over-time",
|
||||
summary="Get funding over time for bund projects.",
|
||||
description="Returns the funding over time for bund projects associated with the specified institution.",
|
||||
description=(
|
||||
"Returns the funding over time for BUND projects. Accepts the same "
|
||||
"filters as /bund/search, so the funding total can be made to match "
|
||||
"whatever the results table is currently filtered to."
|
||||
),
|
||||
operation_id="getInstitutionBundProjectsFundingOverTime",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
@@ -448,19 +455,73 @@ async def get_institution_bund_projects_funding_over_time(
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
raw_oa_institution_id: Annotated[
|
||||
str, Query(description="The institution ID to filter by.")
|
||||
],
|
||||
Optional[str], Query(description="The institution ID to filter by.")
|
||||
] = None,
|
||||
executing_agency: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Executing Agencies (Ausführende Stellen) to filter by."),
|
||||
] = None,
|
||||
funding_arts: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Project types to include: fp7, h2020, heu."),
|
||||
] = None,
|
||||
title: Annotated[
|
||||
Optional[str],
|
||||
Query(description="Project title/acronym search."),
|
||||
] = None,
|
||||
keywords: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Raw keywords to search in title/objective/keywords/topics."),
|
||||
] = None,
|
||||
topic_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="OpenAlex topic IDs used for fuzzy topic resolution."),
|
||||
] = None,
|
||||
filter_topic_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Additional OpenAlex topic IDs used as mandatory filters."),
|
||||
] = None,
|
||||
funding_start_years: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Funding start years."),
|
||||
] = None,
|
||||
funding_end_years: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Funding end years."),
|
||||
] = None,
|
||||
countries: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Organization countries."),
|
||||
] = None,
|
||||
fuzzy: Annotated[
|
||||
bool,
|
||||
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
|
||||
] = False,
|
||||
) -> InstitutionFunderSummary:
|
||||
return await projects_service.get_institution_bund_projects_funding_over_time(
|
||||
institutions_search_client=institutions_search_client,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
executing_agency=executing_agency,
|
||||
funding_arts=funding_arts,
|
||||
title=title,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
fuzzy=fuzzy,
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/institution/eu/funding-over-time",
|
||||
summary="Get funding over time for EU projects.",
|
||||
description="Returns the funding over time for EU projects associated with the specified institution.",
|
||||
description=(
|
||||
"Returns the funding over time for EU CORDIS projects. Accepts the "
|
||||
"same filters as /eu/search, so the funding total can be made to "
|
||||
"match whatever the results table is currently filtered to."
|
||||
),
|
||||
operation_id="getInstitutionCordisEuProjectsFundingOverTime",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
@@ -476,12 +537,93 @@ async def get_institution_cordis_eu_projects_funding_over_time(
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
raw_oa_institution_id: Annotated[
|
||||
str, Query(description="The institution ID to filter by.")
|
||||
],
|
||||
Optional[str],
|
||||
Query(description="OpenAlex institution ID to filter by."),
|
||||
] = None,
|
||||
author_id: Annotated[
|
||||
Optional[str],
|
||||
Query(description="OpenAlex author ID to filter by."),
|
||||
] = None,
|
||||
author_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Additional OpenAlex author IDs to filter by. All selected authors must match."),
|
||||
] = None,
|
||||
organization_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="CORDIS organisation IDs. All selected organizations must match."),
|
||||
] = None,
|
||||
organization_names: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="CORDIS organization names. All selected organizations must match."),
|
||||
] = None,
|
||||
project_types: Annotated[
|
||||
Optional[List[EuCordisProjectType]],
|
||||
Query(description="Project types to include: fp7, h2020, heu."),
|
||||
] = None,
|
||||
title: Annotated[
|
||||
Optional[str],
|
||||
Query(description="Project title/acronym search."),
|
||||
] = None,
|
||||
keywords: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Raw keywords to search in title/objective/keywords/topics."),
|
||||
] = None,
|
||||
topic_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="OpenAlex topic IDs used for fuzzy topic resolution."),
|
||||
] = None,
|
||||
filter_topic_ids: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Additional OpenAlex topic IDs used as mandatory filters."),
|
||||
] = None,
|
||||
funding_start_years: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Funding start years."),
|
||||
] = None,
|
||||
funding_end_years: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Funding end years."),
|
||||
] = None,
|
||||
countries: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Organization countries."),
|
||||
] = None,
|
||||
framework_programmes: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Framework programme filters."),
|
||||
] = None,
|
||||
funding_schemes: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Funding scheme filters."),
|
||||
] = None,
|
||||
statuses: Annotated[
|
||||
Optional[List[str]],
|
||||
Query(description="Project status filters."),
|
||||
] = None,
|
||||
fuzzy: Annotated[
|
||||
bool,
|
||||
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
|
||||
] = False,
|
||||
) -> InstitutionFunderSummary:
|
||||
return await projects_service.get_institution_cordis_eu_projects_funding_over_time(
|
||||
institutions_search_client=institutions_search_client,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
author_id=author_id,
|
||||
author_ids=author_ids,
|
||||
organization_ids=organization_ids,
|
||||
organization_names=organization_names,
|
||||
project_types=project_types,
|
||||
title=title,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
framework_programmes=framework_programmes,
|
||||
funding_schemes=funding_schemes,
|
||||
statuses=statuses,
|
||||
fuzzy=fuzzy,
|
||||
)
|
||||
|
||||
|
||||
@@ -500,6 +642,12 @@ async def get_institution_cordis_eu_projects_funding_over_time(
|
||||
response_model_by_alias=False,
|
||||
)
|
||||
async def get_dfg_projects(
|
||||
institutions_search_client: Annotated[
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
raw_oa_institution_id: Annotated[
|
||||
Optional[str], Query(description="The openalex institution ID to filter by.")
|
||||
] = None,
|
||||
author_id: Annotated[Optional[str], Query(description="The openalex author ID to filter by.")] = None,
|
||||
author_filter_ids: Annotated[Optional[List[int]], Query(description="The dfg author IDs to filter by.")] = None,
|
||||
institution_ids: Annotated[
|
||||
@@ -557,6 +705,8 @@ async def get_dfg_projects(
|
||||
fuzzy,
|
||||
)
|
||||
return await projects_service.get_dfg_projects_by_author_id(
|
||||
institutions_search_client=institutions_search_client,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
author_id=author_id,
|
||||
author_filter_ids=author_filter_ids,
|
||||
institution_ids=institution_ids,
|
||||
@@ -612,4 +762,4 @@ async def search_projects(
|
||||
title=title,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
)
|
||||
@@ -29,6 +29,7 @@ from inse.models.projects_eu_cordis.horizon_europe.heu_project_details import HE
|
||||
from inse.models.projects_eu_cordis.fp7.fp7_project_details import Fp7ProjectDetails
|
||||
from inse.projects.eu_cordis_projects_client import (
|
||||
get_enriched_cordis_project_by_id,
|
||||
get_eu_cordis_projects_funding_data,
|
||||
search_eu_cordis_projects as _search_eu_cordis_projects_es,
|
||||
)
|
||||
from typing import Union
|
||||
@@ -148,6 +149,8 @@ async def _get_dfg_project_ids_for_openalex_authors(
|
||||
return list(set.intersection(*project_sets))
|
||||
|
||||
async def get_dfg_projects_by_author_id(
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
raw_oa_institution_id: Optional[str],
|
||||
author_id: Optional[str],
|
||||
author_filter_ids: Optional[List[int]],
|
||||
institution_ids: Optional[List[int]],
|
||||
@@ -206,16 +209,24 @@ async def get_dfg_projects_by_author_id(
|
||||
"No author names found for author_filter_ids=%s",
|
||||
author_filter_ids,
|
||||
)
|
||||
|
||||
if institution_ids:
|
||||
logger.debug(
|
||||
"No institutions found for institution_ids=%s",
|
||||
institution_ids,
|
||||
institution_aliases = []
|
||||
if raw_oa_institution_id:
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
|
||||
raw_oa_institution_id
|
||||
)
|
||||
)
|
||||
|
||||
if not institution_aliases:
|
||||
return DfgProjectPage(
|
||||
elements=[],
|
||||
page=page,
|
||||
size=size,
|
||||
total=0,
|
||||
)
|
||||
return await projects_search_client.search_dfg_projects(
|
||||
page=page,
|
||||
size=size,
|
||||
institution_aliases=institution_aliases,
|
||||
project_ids=author_project_ids,
|
||||
names=filter_names or [],
|
||||
institution_ids=institution_ids,
|
||||
@@ -232,60 +243,164 @@ async def get_dfg_projects_by_author_id(
|
||||
|
||||
async def get_institution_cordis_eu_projects_funding_over_time(
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
raw_oa_institution_id: str,
|
||||
raw_oa_institution_id: Optional[str] = None,
|
||||
project_types: Optional[List[EuCordisProjectType]] = None,
|
||||
author_id: Optional[str] = None,
|
||||
author_ids: Optional[List[str]] = None,
|
||||
organization_ids: Optional[List[str]] = None,
|
||||
organization_names: Optional[List[str]] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
topic_ids: Optional[List[str]] = None,
|
||||
filter_topic_ids: Optional[List[str]] = None,
|
||||
title: Optional[str] = None,
|
||||
funding_start_years: Optional[List[str]] = None,
|
||||
funding_end_years: Optional[List[str]] = None,
|
||||
countries: Optional[List[str]] = None,
|
||||
framework_programmes: Optional[List[str]] = None,
|
||||
funding_schemes: Optional[List[str]] = None,
|
||||
statuses: Optional[List[str]] = None,
|
||||
fuzzy: bool = False,
|
||||
) -> InstitutionFunderSummary:
|
||||
page = await search_eu_cordis_projects(
|
||||
page=0,
|
||||
size=10000,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
institutions_search_client=institutions_search_client,
|
||||
"""
|
||||
Computes funding-over-time for EU CORDIS projects, applying the exact same
|
||||
filters as `search_eu_cordis_projects` (the table search). Uses a
|
||||
lightweight, fully-paginated fetch of just id/dates/amount - no author,
|
||||
organization or topic enrichment - so this stays fast even when a filter
|
||||
combination matches many thousands of projects.
|
||||
"""
|
||||
resolved_organization_names: List[str] = list(organization_names or [])
|
||||
|
||||
if raw_oa_institution_id:
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
|
||||
raw_oa_institution_id
|
||||
)
|
||||
)
|
||||
logger.debug(
|
||||
f"Found institution aliases for institution_id={raw_oa_institution_id}: {institution_aliases}"
|
||||
)
|
||||
resolved_organization_names.extend(institution_aliases)
|
||||
|
||||
all_author_ids: List[str] = []
|
||||
if author_id:
|
||||
all_author_ids.append(author_id)
|
||||
all_author_ids.extend(author_ids or [])
|
||||
author_project_ids = await _get_eu_project_ids_for_openalex_authors(
|
||||
author_ids=all_author_ids
|
||||
)
|
||||
|
||||
funding_data = await get_eu_cordis_projects_funding_data(
|
||||
project_types=project_types,
|
||||
organization_ids=organization_ids,
|
||||
organization_names=resolved_organization_names or None,
|
||||
author_project_ids=author_project_ids,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
title=title,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
framework_programmes=framework_programmes,
|
||||
funding_schemes=funding_schemes,
|
||||
statuses=statuses,
|
||||
fuzzy=fuzzy,
|
||||
)
|
||||
|
||||
return _calculate_funding_over_time(
|
||||
project_type=ProjectType.EU,
|
||||
projects=page.elements,
|
||||
funding_start_attr="start_date",
|
||||
funding_end_attr="end_date",
|
||||
funding_amount_attr="ec_max_contribution",
|
||||
funding_entries=[
|
||||
(entry.get("start_date"), entry.get("end_date"), entry.get("ec_max_contribution"))
|
||||
for entry in funding_data
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
async def get_institution_bund_projects_funding_over_time(
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
raw_oa_institution_id: str,
|
||||
raw_oa_institution_id: Optional[str] = None,
|
||||
executing_agency: Optional[List[str]] = None,
|
||||
funding_arts: Optional[List[str]] = None,
|
||||
title: Optional[str] = None,
|
||||
keywords: Optional[List[str]] = None,
|
||||
topic_ids: Optional[List[str]] = None,
|
||||
filter_topic_ids: Optional[List[str]] = None,
|
||||
funding_start_years: Optional[List[str]] = None,
|
||||
funding_end_years: Optional[List[str]] = None,
|
||||
countries: Optional[List[str]] = None,
|
||||
fuzzy: bool = False,
|
||||
) -> InstitutionFunderSummary:
|
||||
"""
|
||||
Computes funding-over-time for BUND projects, applying the exact same
|
||||
filters as `search_bund_projects_with_filters` (the table search).
|
||||
Skips the OpenAlex-topic enrichment step (irrelevant to a funding sum)
|
||||
and pages through ALL matches rather than a single capped size=10000
|
||||
request, so totals stay correct and fast for large result sets.
|
||||
"""
|
||||
logger.info(
|
||||
f"Fetching funding over time for institution_id={raw_oa_institution_id}"
|
||||
f"Fetching funding over time for institution_id={raw_oa_institution_id}, "
|
||||
f"executing_agency={executing_agency}, funding_arts={funding_arts}, "
|
||||
f"title={title}, keywords={keywords}, topic_ids={topic_ids}, "
|
||||
f"filter_topic_ids={filter_topic_ids}, funding_start_years={funding_start_years}, "
|
||||
f"funding_end_years={funding_end_years}, countries={countries}, fuzzy={fuzzy}"
|
||||
)
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
|
||||
raw_oa_institution_id
|
||||
|
||||
institution_aliases = []
|
||||
if raw_oa_institution_id:
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
|
||||
raw_oa_institution_id
|
||||
)
|
||||
)
|
||||
)
|
||||
logger.debug(
|
||||
f"Found institution aliases for institution_id={raw_oa_institution_id}: {institution_aliases}"
|
||||
)
|
||||
response = await projects_search_client.search_bund_projects(
|
||||
filter_properties=ProjectsFilteringProperties(
|
||||
project_type=ProjectType.BUND,
|
||||
page=0,
|
||||
size=10000,
|
||||
),
|
||||
institution_names=institution_aliases,
|
||||
)
|
||||
if not institution_aliases:
|
||||
return _calculate_funding_over_time(
|
||||
project_type=ProjectType.BUND,
|
||||
funding_entries=[],
|
||||
)
|
||||
|
||||
page_size = 5000
|
||||
page = 0
|
||||
funding_entries: List[Any] = []
|
||||
|
||||
while True:
|
||||
response = await projects_search_client.search_bund_projects_with_filters(
|
||||
oa_institution_aliases=institution_aliases,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
executing_agency=executing_agency,
|
||||
funding_arts=funding_arts,
|
||||
title=title,
|
||||
keywords=keywords,
|
||||
topic_ids=topic_ids,
|
||||
filter_topic_ids=filter_topic_ids,
|
||||
funding_start_years=funding_start_years,
|
||||
funding_end_years=funding_end_years,
|
||||
countries=countries,
|
||||
page=page,
|
||||
size=page_size,
|
||||
fuzzy=fuzzy,
|
||||
skip_topic_enrichment=True,
|
||||
)
|
||||
|
||||
funding_entries.extend(
|
||||
(element.funding_start, element.funding_end, element.grant_amount)
|
||||
for element in response.elements
|
||||
)
|
||||
|
||||
if len(response.elements) < page_size:
|
||||
break
|
||||
page += 1
|
||||
|
||||
return _calculate_funding_over_time(
|
||||
project_type=ProjectType.BUND,
|
||||
projects=response.elements,
|
||||
funding_start_attr="funding_start",
|
||||
funding_end_attr="funding_end",
|
||||
funding_amount_attr="grant_amount",
|
||||
funding_entries=funding_entries,
|
||||
)
|
||||
|
||||
|
||||
|
||||
#Bund
|
||||
async def search_bund_projects_with_filters(
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
executing_agency: Optional[str],
|
||||
institution_ids: Optional[List[str]],
|
||||
raw_oa_institution_id: Optional[str],
|
||||
title: Optional[str],
|
||||
keywords: Optional[List[str]],
|
||||
funding_arts: Optional[List[str]],
|
||||
@@ -300,9 +415,24 @@ async def search_bund_projects_with_filters(
|
||||
sort_direction: str = "asc",
|
||||
fuzzy: bool = False,
|
||||
) -> BundProjectPage:
|
||||
institution_aliases = []
|
||||
if raw_oa_institution_id:
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
|
||||
raw_oa_institution_id
|
||||
)
|
||||
)
|
||||
if not institution_aliases:
|
||||
return BundProjectPage(
|
||||
elements=[],
|
||||
page=page,
|
||||
size=size,
|
||||
total=0,
|
||||
)
|
||||
return await projects_search_client.search_bund_projects_with_filters(
|
||||
oa_institution_aliases=institution_aliases,
|
||||
raw_oa_institution_id=raw_oa_institution_id,
|
||||
executing_agency=executing_agency,
|
||||
institution_ids=[],
|
||||
funding_arts=funding_arts,
|
||||
title=title,
|
||||
keywords=keywords,
|
||||
@@ -320,20 +450,24 @@ async def search_bund_projects_with_filters(
|
||||
|
||||
def _calculate_funding_over_time(
|
||||
project_type: ProjectType,
|
||||
projects: List[Any],
|
||||
funding_start_attr: str,
|
||||
funding_end_attr: str,
|
||||
funding_amount_attr: str,
|
||||
funding_entries: List[Any],
|
||||
) -> InstitutionFunderSummary:
|
||||
"""
|
||||
funding_entries: list of (funding_start, funding_end, funding_amount)
|
||||
tuples. Each date value may be a date/datetime, an ISO date string, or
|
||||
None; amount may be numeric or None.
|
||||
"""
|
||||
funding_per_year: Dict[int, float] = {}
|
||||
|
||||
for project in projects:
|
||||
funding_start = getattr(project, funding_start_attr)
|
||||
funding_end = getattr(project, funding_end_attr)
|
||||
funding_amount = getattr(project, funding_amount_attr)
|
||||
for funding_start, funding_end, funding_amount in funding_entries:
|
||||
if not funding_start or not funding_end or not funding_amount:
|
||||
continue
|
||||
|
||||
if isinstance(funding_start, str):
|
||||
funding_start = datetime.date.fromisoformat(funding_start[:10])
|
||||
if isinstance(funding_end, str):
|
||||
funding_end = datetime.date.fromisoformat(funding_end[:10])
|
||||
|
||||
if hasattr(funding_start, "date"):
|
||||
funding_start = funding_start.date()
|
||||
if hasattr(funding_end, "date"):
|
||||
@@ -511,7 +645,7 @@ async def search_eu_cordis_projects(
|
||||
f"Found institution aliases for institution_id={raw_oa_institution_id}: {institution_aliases}"
|
||||
)
|
||||
resolved_organization_names.extend(institution_aliases)
|
||||
print("Resolved organization names:", resolved_organization_names)
|
||||
|
||||
all_author_ids: List[str] = []
|
||||
|
||||
if author_id:
|
||||
@@ -520,7 +654,6 @@ async def search_eu_cordis_projects(
|
||||
author_project_ids = await _get_eu_project_ids_for_openalex_authors(
|
||||
author_ids=all_author_ids
|
||||
)
|
||||
|
||||
return await _search_eu_cordis_projects_es(
|
||||
page=page,
|
||||
size=size,
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import List, Optional
|
||||
from fastapi import APIRouter, Query, Depends
|
||||
|
||||
from inse.tags import Tags
|
||||
from inse.exceptions import BadRequestException
|
||||
from . import logic, trend_logic
|
||||
from .model import (
|
||||
RankingResponse,
|
||||
@@ -43,7 +44,7 @@ def get_trend_strategy(search_type: TrendSearchType = Query(TrendSearchType.PUBL
|
||||
return NewsTrendStrategy()
|
||||
elif search_type == TrendSearchType.ALL:
|
||||
return AllTrendStrategy()
|
||||
raise ValueError(f"Unknown search type: {search_type}")
|
||||
raise BadRequestException(f"Unknown search type: {search_type}")
|
||||
|
||||
@router.get(
|
||||
"",
|
||||
@@ -74,6 +75,8 @@ async def get_trend(
|
||||
authors: Optional[List[str]] = Query(None, description="List of OpenAlex Author IDs"),
|
||||
strategy: TrendStrategy = Depends(get_trend_strategy)
|
||||
):
|
||||
if not topics or len(topics) == 0:
|
||||
raise BadRequestException("Topics list cannot be empty")
|
||||
return await strategy.get_trend(
|
||||
topics=topics,
|
||||
keywords=keywords,
|
||||
|
||||
@@ -128,12 +128,23 @@ async def get_top_institutions_by_region(
|
||||
|
||||
meta_top = await TrendMetadataResolver.resolve_all(topics=[topic])
|
||||
topic_id = meta_top.get("resolved_topic_ids", {}).get(topic)
|
||||
topic_display_name = meta_top.get("resolved_topic_names", {}).get(topic, topic)
|
||||
|
||||
topic_filter = (
|
||||
{"term": {"topics.id.keyword": topic_id}}
|
||||
if topic_id
|
||||
else {"match_phrase": {"topics.display_name": topic}}
|
||||
)
|
||||
if not topic_id and (topic.startswith("https://openalex.org/") or (topic.startswith("T") and topic[1:].isdigit())):
|
||||
topic_id = topic if topic.startswith("https://openalex.org/") else f"https://openalex.org/{topic}"
|
||||
|
||||
if topic_id:
|
||||
topic_filter = {
|
||||
"bool": {
|
||||
"should": [
|
||||
{"term": {"topics.id.keyword": topic_id}},
|
||||
{"term": {"topics.id": topic_id}},
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
else:
|
||||
topic_filter = {"match_phrase": {"topics.display_name": topic_display_name}}
|
||||
|
||||
must_clauses: List[Dict[str, Any]] = [
|
||||
{"term": {"type": "education"}},
|
||||
|
||||
@@ -12,15 +12,18 @@ DEFAULT_INSTITUTION_NAME = "University of Duisburg-Essen"
|
||||
|
||||
|
||||
def clean_inst_id(id_str: str) -> str:
|
||||
"""Extracts short OpenAlex ID from full URL or returns as-is."""
|
||||
"""Extracts short OpenAlex ID from full URL or returns as-is, ensuring uppercase prefix."""
|
||||
if not id_str:
|
||||
return ""
|
||||
s = id_str.strip()
|
||||
return s.split("/")[-1] if "/" in s else s
|
||||
raw_id = s.split("/")[-1] if "/" in s else s
|
||||
if len(raw_id) > 1 and raw_id[0].isalpha():
|
||||
return raw_id[0].upper() + raw_id[1:]
|
||||
return raw_id.upper()
|
||||
|
||||
|
||||
def to_full_inst_url(id_str: str) -> str:
|
||||
"""Ensures institution ID is formatted as a full OpenAlex URL."""
|
||||
"""Ensures institution ID is formatted as a full OpenAlex URL with proper capitalization."""
|
||||
cleaned = clean_inst_id(id_str)
|
||||
return f"https://openalex.org/{cleaned}" if cleaned else id_str
|
||||
|
||||
@@ -85,8 +88,9 @@ class TrendMetadataResolver:
|
||||
|
||||
alias_results = await asyncio.gather(*(get_alias(i) for i in inst_full_ids))
|
||||
for short_id, alias_list in alias_results:
|
||||
aliases_map[short_id] = alias_list
|
||||
aliases_map[f"https://openalex.org/{short_id}"] = alias_list
|
||||
s_upper = clean_inst_id(short_id)
|
||||
aliases_map[s_upper] = alias_list
|
||||
aliases_map[f"https://openalex.org/{s_upper}"] = alias_list
|
||||
|
||||
except Exception as e:
|
||||
logger.warning("Failed to resolve institutions from ES: %s", e)
|
||||
@@ -142,31 +146,65 @@ class TrendMetadataResolver:
|
||||
|
||||
async def fetch_topics():
|
||||
topic_ids: Dict[str, str] = {}
|
||||
topic_display_names: Dict[str, str] = {}
|
||||
if not topic_names:
|
||||
return topic_ids
|
||||
return topic_ids, topic_display_names
|
||||
|
||||
should_clauses = []
|
||||
for t in topic_names:
|
||||
if not t:
|
||||
continue
|
||||
clean_id = clean_inst_id(t)
|
||||
canonical_id = f"https://openalex.org/{clean_id}" if clean_id.startswith("T") else t
|
||||
if t.startswith("https://openalex.org/") or (clean_id.startswith("T") and clean_id[1:].isdigit()):
|
||||
should_clauses.extend([
|
||||
{"term": {"id": canonical_id}},
|
||||
{"term": {"id.keyword": canonical_id}},
|
||||
{"term": {"id": clean_id}},
|
||||
{"term": {"id.keyword": clean_id}},
|
||||
])
|
||||
else:
|
||||
should_clauses.append({"match_phrase": {"display_name": t}})
|
||||
try:
|
||||
res = await elasticsearch.search(
|
||||
index=ESIndex.OPENALEX_TOPICS.value,
|
||||
query={"bool": {"should": [{"match_phrase": {"display_name": t}} for t in topic_names]}},
|
||||
size=len(topic_names) * 2,
|
||||
query={"bool": {"should": should_clauses, "minimum_should_match": 1}},
|
||||
size=max(10, len(topic_names) * 3),
|
||||
source=["id", "display_name"],
|
||||
cluster="nes",
|
||||
)
|
||||
for hit in res.get("hits", {}).get("hits", []):
|
||||
src = hit["_source"]
|
||||
full_id = src.get("id", "")
|
||||
short_id = clean_inst_id(full_id)
|
||||
canonical_id = f"https://openalex.org/{short_id}" if short_id.startswith("T") else full_id
|
||||
d_name = src.get("display_name", "")
|
||||
for t in topic_names:
|
||||
if t.lower() in d_name.lower():
|
||||
topic_ids[t] = src["id"]
|
||||
t_clean = clean_inst_id(t)
|
||||
t_canonical = f"https://openalex.org/{t_clean}" if t_clean.startswith("T") else t
|
||||
if (
|
||||
t == full_id
|
||||
or t == short_id
|
||||
or t == canonical_id
|
||||
or t_canonical == canonical_id
|
||||
or t_clean == short_id
|
||||
or t.lower() in d_name.lower()
|
||||
or d_name.lower() in t.lower()
|
||||
):
|
||||
topic_ids[t] = canonical_id
|
||||
topic_display_names[t] = d_name
|
||||
topic_display_names[canonical_id] = d_name
|
||||
topic_display_names[short_id] = d_name
|
||||
topic_display_names[full_id] = d_name
|
||||
except Exception as e:
|
||||
logger.warning("Failed to resolve topic IDs from ES: %s", e)
|
||||
return topic_ids
|
||||
return topic_ids, topic_display_names
|
||||
|
||||
(
|
||||
(inst_names, inst_country_codes, inst_aliases),
|
||||
country_names,
|
||||
(continent_names, continent_country_codes),
|
||||
resolved_topic_ids,
|
||||
(resolved_topic_ids, resolved_topic_names),
|
||||
) = await asyncio.gather(
|
||||
fetch_institutions(),
|
||||
fetch_countries(),
|
||||
@@ -182,6 +220,7 @@ class TrendMetadataResolver:
|
||||
"continent_names": continent_names,
|
||||
"continent_country_codes": continent_country_codes,
|
||||
"resolved_topic_ids": resolved_topic_ids,
|
||||
"resolved_topic_names": resolved_topic_names,
|
||||
}
|
||||
|
||||
|
||||
@@ -196,6 +235,12 @@ class TrendQueryBuilder:
|
||||
fuzzy: bool = True,
|
||||
) -> Dict[str, Any]:
|
||||
"""Builds a topic or keyword matching clause."""
|
||||
target_id = resolved_topic_id
|
||||
if not target_id and topic_display_name:
|
||||
c_id = clean_inst_id(topic_display_name)
|
||||
if c_id.startswith("T") and c_id[1:].isdigit():
|
||||
target_id = f"https://openalex.org/{c_id}"
|
||||
|
||||
if not fuzzy and keyword:
|
||||
return {
|
||||
"bool": {
|
||||
@@ -208,12 +253,15 @@ class TrendQueryBuilder:
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
elif resolved_topic_id:
|
||||
elif target_id:
|
||||
c_id = clean_inst_id(target_id)
|
||||
canonical_id = f"https://openalex.org/{c_id}" if c_id.startswith("T") else target_id
|
||||
target_ids = list(dict.fromkeys([canonical_id, target_id, c_id]))
|
||||
return {
|
||||
"bool": {
|
||||
"should": [
|
||||
{"nested": {"path": "topics", "query": {"term": {"topics.id": resolved_topic_id}}}},
|
||||
{"term": {"primary_topic.id": resolved_topic_id}},
|
||||
{"nested": {"path": "topics", "query": {"terms": {"topics.id": target_ids}}}},
|
||||
{"terms": {"primary_topic.id": target_ids}},
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ class AuthorsTrendStrategy(TrendStrategy):
|
||||
if not query_authors:
|
||||
return TrendResponse(series=[], years=years_range)
|
||||
|
||||
query_authors_clean = [clean_inst_id(a).upper() for a in query_authors if a]
|
||||
query_authors_clean = [clean_inst_id(a) for a in query_authors if a]
|
||||
|
||||
# Resolve author display names
|
||||
resolved_names: Dict[str, str] = {}
|
||||
@@ -329,7 +329,7 @@ class AuthorsTrendStrategy(TrendStrategy):
|
||||
cluster=ESCluster.NES,
|
||||
)
|
||||
for hit in res.get("hits", {}).get("hits", []):
|
||||
short_id = hit["_id"]
|
||||
short_id = clean_inst_id(hit["_id"])
|
||||
full_id = f"https://openalex.org/{short_id}"
|
||||
display_name = hit["_source"].get("display_name", short_id)
|
||||
resolved_names[short_id] = display_name
|
||||
@@ -340,14 +340,12 @@ class AuthorsTrendStrategy(TrendStrategy):
|
||||
meta = await TrendMetadataResolver.resolve_all(topics=topics)
|
||||
resolved_topic_ids = meta["resolved_topic_ids"]
|
||||
|
||||
query_authors_full = [
|
||||
a if a.startswith("https://openalex.org/") else f"https://openalex.org/{clean_inst_id(a).upper()}"
|
||||
for a in query_authors
|
||||
]
|
||||
query_authors_full = [to_full_inst_url(a) for a in query_authors if a]
|
||||
|
||||
filters_map: Dict[str, Dict[str, Any]] = {}
|
||||
for auth_id, auth_url in zip(query_authors, query_authors_full):
|
||||
filters_map[f"author_{auth_id}"] = {
|
||||
clean_id = clean_inst_id(auth_id)
|
||||
filters_map[f"author_{clean_id}"] = {
|
||||
"nested": {
|
||||
"path": "authorships",
|
||||
"query": {"term": {"authorships.author.id": auth_url}},
|
||||
@@ -508,16 +506,17 @@ class PatentsTrendStrategy(TrendStrategy):
|
||||
def matches_patent(patent, topic: str, keyword: Optional[str], is_fuzzy: bool) -> bool:
|
||||
if matches_topic(patent, topic):
|
||||
return True
|
||||
if not is_fuzzy and keyword:
|
||||
t_lower = topic.lower()
|
||||
if patent.title and t_lower in patent.title.lower():
|
||||
return True
|
||||
if patent.abstract and t_lower in patent.abstract.lower():
|
||||
return True
|
||||
if keyword:
|
||||
kw_lower = keyword.lower()
|
||||
if patent.title and kw_lower in patent.title.lower():
|
||||
return True
|
||||
if patent.abstract and kw_lower in patent.abstract.lower():
|
||||
return True
|
||||
if patent.openalex_topics:
|
||||
for ot in patent.openalex_topics:
|
||||
if ot.topic_display_name and kw_lower in ot.topic_display_name.lower():
|
||||
return True
|
||||
return False
|
||||
|
||||
accumulated_data: Dict[str, Dict[str, Dict[int, tuple]]] = {
|
||||
|
||||
@@ -1,60 +1,72 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
This module contains utility functions
|
||||
for the service implementation.
|
||||
"""
|
||||
from typing import Optional
|
||||
from typing import TypeVar
|
||||
from inse.models.openalex import Author
|
||||
from . import model
|
||||
from inse.exceptions import NotFoundException
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
def raise_not_found_if_none(value: Optional[T]) -> T:
|
||||
''' Returns the value, if it is set, or raises a 404, if the value is None.'''
|
||||
if value == None:
|
||||
raise NotFoundException("Not found.")
|
||||
else:
|
||||
return value
|
||||
|
||||
def get_persons_data(hit:dict):
|
||||
source = hit.get("_source", {})
|
||||
source_copy = dict(source)
|
||||
source_copy["id"] = hit.get("_id", "") or source_copy.get("id")
|
||||
|
||||
# Resilient sanitization of IDs to protect against model regeneration type conflicts (#Generated)
|
||||
ids = source_copy.get("ids")
|
||||
if isinstance(ids, dict):
|
||||
ids_copy = {}
|
||||
orcid_val = ids.get("orcid")
|
||||
if orcid_val:
|
||||
ids_copy["orcid"] = str(orcid_val)
|
||||
source_copy["ids"] = ids_copy
|
||||
|
||||
author = Author.from_dict(source_copy)
|
||||
return author
|
||||
|
||||
from sentence_transformers import SentenceTransformer
|
||||
from .config import settings
|
||||
# Sentence Transformer Model
|
||||
_model: SentenceTransformer | None = None
|
||||
|
||||
def get_model():
|
||||
global _model
|
||||
if _model is None:
|
||||
import os
|
||||
# If SENTENCE_TRANSFORMERS_HOME is not set, check if container-baked /models folder is available
|
||||
if "SENTENCE_TRANSFORMERS_HOME" not in os.environ:
|
||||
if os.path.exists("/models"):
|
||||
os.environ["SENTENCE_TRANSFORMERS_HOME"] = "/models"
|
||||
os.environ["HF_HUB_OFFLINE"] = "1"
|
||||
else:
|
||||
# If it is set to /models, enforce offline mode as it is baked into the image
|
||||
if os.environ.get("SENTENCE_TRANSFORMERS_HOME") == "/models":
|
||||
os.environ["HF_HUB_OFFLINE"] = "1"
|
||||
|
||||
model_name = settings.sentence_transformers_model_name
|
||||
_model = SentenceTransformer(model_name)
|
||||
return _model
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
This module contains utility functions
|
||||
for the service implementation.
|
||||
"""
|
||||
from typing import Optional
|
||||
from typing import TypeVar
|
||||
from inse.models.openalex import Author
|
||||
from . import model
|
||||
from inse.exceptions import NotFoundException
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
def raise_not_found_if_none(value: Optional[T]) -> T:
|
||||
''' Returns the value, if it is set, or raises a 404, if the value is None.'''
|
||||
if value == None:
|
||||
raise NotFoundException("Not found.")
|
||||
else:
|
||||
return value
|
||||
|
||||
def get_persons_data(hit:dict):
|
||||
source = hit.get("_source", {})
|
||||
source_copy = dict(source)
|
||||
source_copy["id"] = hit.get("_id", "") or source_copy.get("id")
|
||||
|
||||
# Resilient sanitization of IDs to protect against model regeneration type conflicts (#Generated)
|
||||
ids = source_copy.get("ids")
|
||||
if isinstance(ids, dict):
|
||||
ids_copy = {}
|
||||
orcid_val = ids.get("orcid")
|
||||
if orcid_val:
|
||||
ids_copy["orcid"] = str(orcid_val)
|
||||
source_copy["ids"] = ids_copy
|
||||
|
||||
author = Author.from_dict(source_copy)
|
||||
return author
|
||||
|
||||
from sentence_transformers import SentenceTransformer
|
||||
from .config import settings
|
||||
# Sentence Transformer Model
|
||||
_model: SentenceTransformer | None = None
|
||||
|
||||
def get_model():
|
||||
global _model
|
||||
if _model is None:
|
||||
import os
|
||||
# Determine offline mode
|
||||
is_offline = os.environ.get("HF_HUB_OFFLINE") == "1"
|
||||
if "SENTENCE_TRANSFORMERS_HOME" not in os.environ:
|
||||
if os.path.exists("/models"):
|
||||
os.environ["SENTENCE_TRANSFORMERS_HOME"] = "/models"
|
||||
os.environ["HF_HOME"] = "/models"
|
||||
is_offline = True
|
||||
elif os.environ.get("SENTENCE_TRANSFORMERS_HOME") == "/models":
|
||||
is_offline = True
|
||||
|
||||
if is_offline:
|
||||
os.environ["HF_HUB_OFFLINE"] = "1"
|
||||
os.environ["TRANSFORMERS_OFFLINE"] = "1"
|
||||
os.environ["HF_DATASETS_OFFLINE"] = "1"
|
||||
|
||||
model_name = settings.sentence_transformers_model_name
|
||||
try:
|
||||
if is_offline:
|
||||
_model = SentenceTransformer(model_name, local_files_only=True)
|
||||
else:
|
||||
_model = SentenceTransformer(model_name)
|
||||
except Exception:
|
||||
# Fallback if local_files_only fails in unexpected local dev environments
|
||||
_model = SentenceTransformer(model_name)
|
||||
return _model
|
||||
+4
-10
@@ -25,10 +25,7 @@
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": [
|
||||
"@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
@@ -41,8 +38,8 @@
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "5kb",
|
||||
"maximumError": "10kb"
|
||||
"maximumWarning": "10kb",
|
||||
"maximumError": "20kb"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
@@ -83,10 +80,7 @@
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"inlineStyleLanguage": "scss",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": [
|
||||
"@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,7 @@ model/dfgProjectInstitutionRole.ts
|
||||
model/dfgProjectPage.ts
|
||||
model/dfgProjectPersonRole.ts
|
||||
model/dfgProjectPublicationSummary.ts
|
||||
model/dfgProjectStatusStatistics.ts
|
||||
model/dfgProjectSubjectArea.ts
|
||||
model/dfgProjectSubprojectSummary.ts
|
||||
model/dfgProjectSummary.ts
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface DfgProjectStatusStatistics {
|
||||
institution_id: string;
|
||||
organization_name: string;
|
||||
ongoing: number;
|
||||
upcoming: number;
|
||||
completed: number;
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Author } from './author';
|
||||
|
||||
/**
|
||||
* Fp7Publication
|
||||
*/
|
||||
export interface Fp7Publication {
|
||||
authors?: string | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
export interface Fp7Publication {
|
||||
authors?: string | null;
|
||||
oaAuthors?: Array<Author> | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Author } from './author';
|
||||
|
||||
/**
|
||||
* H2020Publication
|
||||
*/
|
||||
export interface H2020Publication {
|
||||
authors?: string | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
export interface H2020Publication {
|
||||
authors?: string | null;
|
||||
oaAuthors?: Array<Author> | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/**
|
||||
* Innovation Search Engine API
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Author } from './author';
|
||||
|
||||
/**
|
||||
* HEUPublication
|
||||
*/
|
||||
export interface HEUPublication {
|
||||
authors?: string | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
export interface HEUPublication {
|
||||
authors?: string | null;
|
||||
oaAuthors?: Array<Author> | null;
|
||||
collection?: string | null;
|
||||
contentUpdateDate?: string | null;
|
||||
doi?: string | null;
|
||||
id?: string | null;
|
||||
isPublishedAs?: string | null;
|
||||
journalNumber?: string | null;
|
||||
journalTitle?: string | null;
|
||||
projectAcronym?: string | null;
|
||||
projectID?: string | null;
|
||||
publishedPages?: string | null;
|
||||
publishedYear?: number | null;
|
||||
publisher?: string | null;
|
||||
qaProcessedDoi?: string | null;
|
||||
rcn?: string | null;
|
||||
repositoryUrl?: string | null;
|
||||
title?: string | null;
|
||||
volume?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ export * from './dfgProjectInstitutionRole';
|
||||
export * from './dfgProjectPage';
|
||||
export * from './dfgProjectPersonRole';
|
||||
export * from './dfgProjectPublicationSummary';
|
||||
export * from './dfgProjectStatusStatistics';
|
||||
export * from './dfgProjectSubjectArea';
|
||||
export * from './dfgProjectSubprojectSummary';
|
||||
export * from './dfgProjectSummary';
|
||||
|
||||
@@ -285,6 +285,7 @@ export const routes: Routes = [
|
||||
'search_type',
|
||||
'topic',
|
||||
'topics',
|
||||
'trend_topics',
|
||||
'keyword',
|
||||
'keywords',
|
||||
'institutions',
|
||||
@@ -294,7 +295,9 @@ export const routes: Routes = [
|
||||
'fuzzy',
|
||||
];
|
||||
return keys.some(
|
||||
(key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key),
|
||||
(key) =>
|
||||
from.queryParamMap.getAll(key).join(',') !==
|
||||
to.queryParamMap.getAll(key).join(','),
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -690,17 +693,71 @@ export const routes: Routes = [
|
||||
(mod) => mod.InstitutionProjectsComponent,
|
||||
),
|
||||
resolve: {
|
||||
bundProjectPage: bundProjectPageResolver,
|
||||
bundProjectsFunding: bundProjectsFundingResolver,
|
||||
cordisEuProjectPage: euCordisProjectsResolver,
|
||||
cordisEuProjectsFunding: cordisEuProjectsFundingResolver,
|
||||
},
|
||||
runGuardsAndResolvers: (from, to) => {
|
||||
const keys = ['page', 'size', 'sort_by', 'sort_direction', 'search'];
|
||||
return keys.some(
|
||||
(key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key),
|
||||
);
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
redirectTo: 'dfg',
|
||||
},
|
||||
{
|
||||
path: 'dfg',
|
||||
component: DfgProjectsComponent,
|
||||
resolve: {
|
||||
dfgProjectPage: dfgProjectsResolver,
|
||||
selectedDfgInstitutionsPage: selectedDfgInstitutionsResolver,
|
||||
selectedDfgAuthorsPage: selectedDfgAuthorsResolver,
|
||||
selectedTopicsPage: selectedTopicsResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
data: {
|
||||
resolvingFor: RESOLVING_PROJECT_PAGE_FOR.INSTITUTION,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'eu',
|
||||
component: EuProjectsComponent,
|
||||
resolve: {
|
||||
euCordisProjectPage: euCordisProjectsResolver,
|
||||
selectedEuInstitutionsPage: selectedEuInstitutionsResolver,
|
||||
selectedEuAuthorsPage: selectedAuthorsResolver,
|
||||
selectedTopicsPage: selectedTopicsResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
data: {
|
||||
resolvingFor: RESOLVING_PROJECT_PAGE_FOR.INSTITUTION,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'bund',
|
||||
component: BundProjectsComponent,
|
||||
resolve: {
|
||||
bundProjectPage: bundProjectsResolver,
|
||||
selectedBundInstitutionsPage: selectedBundInstitutionsResolver,
|
||||
selectedBundAuthorsPage: selectedAuthorsResolver,
|
||||
selectedTopicsPage: selectedTopicsResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
data: {
|
||||
resolvingFor: RESOLVING_PROJECT_PAGE_FOR.INSTITUTION,
|
||||
},
|
||||
},
|
||||
],
|
||||
// resolve: {
|
||||
// bundProjectPage: bundProjectPageResolver,
|
||||
// bundProjectsFunding: bundProjectsFundingResolver,
|
||||
// cordisEuProjectPage: euCordisProjectsResolver,
|
||||
// cordisEuProjectsFunding: cordisEuProjectsFundingResolver,
|
||||
// },
|
||||
// runGuardsAndResolvers: (from, to) => {
|
||||
// const keys = ['page', 'size', 'sort_by', 'sort_direction', 'search'];
|
||||
// return keys.some(
|
||||
// (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key),
|
||||
// );
|
||||
// },
|
||||
},
|
||||
{
|
||||
path: 'patents',
|
||||
|
||||
@@ -23,10 +23,11 @@ h1,
|
||||
h2,
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.page-header p {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
@@ -46,19 +47,19 @@ p {
|
||||
}
|
||||
|
||||
.table-panel {
|
||||
border: 1px solid #d7dde6;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
background: var(--sg-card-bg);
|
||||
}
|
||||
|
||||
.table-header {
|
||||
justify-content: space-between;
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.table-header span {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
@@ -74,29 +75,29 @@ th,
|
||||
td {
|
||||
padding: 12px 16px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #edf1f7;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #475569;
|
||||
color: var(--sg-text);
|
||||
font-weight: 700;
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
tr.deleted {
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
tr.deactivated:not(.deleted) {
|
||||
color: #64748b;
|
||||
background: #f8fafc;
|
||||
color: var(--sg-text-muted);
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
.link-button {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #1d4ed8;
|
||||
color: var(--sg-blue-highlight);
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
@@ -109,25 +110,25 @@ tr.deactivated:not(.deleted) {
|
||||
min-height: 24px;
|
||||
border-radius: 999px;
|
||||
padding: 2px 10px;
|
||||
background: #eef2ff;
|
||||
color: #3730a3;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.status {
|
||||
background: #dcfce7;
|
||||
color: #166534;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.status--deleted {
|
||||
background: #fee2e2;
|
||||
color: #991b1b;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.status--deactivated {
|
||||
background: #fef3c7;
|
||||
color: #92400e;
|
||||
background: var(--sg-warning-soft);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
.row-actions {
|
||||
@@ -135,7 +136,7 @@ tr.deactivated:not(.deleted) {
|
||||
}
|
||||
|
||||
.empty {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,14 @@
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at top left,
|
||||
rgba(61, 124, 255, 0.12),
|
||||
color-mix(in srgb, var(--sg-primary) 15%, transparent),
|
||||
transparent 34%
|
||||
),
|
||||
linear-gradient(160deg, #f7f9ff 0%, #ffffff 64%);
|
||||
linear-gradient(
|
||||
160deg,
|
||||
var(--sg-surface-muted) 0%,
|
||||
var(--sg-background) 64%
|
||||
);
|
||||
}
|
||||
|
||||
.login-panel {
|
||||
@@ -80,7 +84,7 @@ p {
|
||||
.step--active span {
|
||||
background: var(--sg-primary);
|
||||
border-color: var(--sg-primary);
|
||||
color: #ffffff;
|
||||
color: var(--sg-background);
|
||||
}
|
||||
|
||||
.step-line {
|
||||
@@ -158,7 +162,7 @@ p {
|
||||
}
|
||||
|
||||
.expiry--expired {
|
||||
color: #ba1a1a;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
|
||||
@@ -16,15 +16,16 @@
|
||||
h1 {
|
||||
margin: 2px 0 6px;
|
||||
font-size: 2rem;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: #667085;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
color: #3f51b5;
|
||||
color: var(--sg-primary);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
@@ -38,21 +39,22 @@
|
||||
align-items: center;
|
||||
gap: 0 10px;
|
||||
padding: 14px 18px;
|
||||
border: 1px solid #e4e7ec;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 14px;
|
||||
background: white;
|
||||
background: var(--sg-surface);
|
||||
|
||||
mat-icon {
|
||||
grid-row: 1 / 3;
|
||||
color: #3f51b5;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
strong {
|
||||
font-size: 1.25rem;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
span {
|
||||
color: #667085;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
@@ -71,19 +73,19 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: #667085;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.empty-state mat-icon {
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
font-size: 54px;
|
||||
color: #98a2b3;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.empty-state h2 {
|
||||
margin: 16px 0 6px;
|
||||
color: #1d2939;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, computed, input, output } from '@angular/core';
|
||||
import { Component, computed, inject, input, output } from '@angular/core';
|
||||
import { CollaborationGraph } from '../../api';
|
||||
import { EChartsCoreOption } from 'echarts';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
import { ChartThemeService } from '../../shared/services/chart-theme.service';
|
||||
|
||||
import * as echarts from 'echarts/core';
|
||||
import {
|
||||
@@ -36,9 +37,10 @@ export interface NodeClickEvent {
|
||||
})
|
||||
export class CollaborationGraphComponent {
|
||||
collaborationGraph = input.required<CollaborationGraph>();
|
||||
|
||||
handleNodeClick = output<NodeClickEvent>();
|
||||
|
||||
private readonly chartTheme = inject(ChartThemeService);
|
||||
|
||||
readonly isEmptyGraph = computed(() => {
|
||||
const graph = this.collaborationGraph();
|
||||
return (
|
||||
@@ -67,10 +69,13 @@ export class CollaborationGraphComponent {
|
||||
|
||||
options = computed<EChartsCoreOption>(() => {
|
||||
const graph = this.collaborationGraph();
|
||||
const colors = this.chartTheme.colors();
|
||||
if (!graph) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const textColor = colors.text;
|
||||
|
||||
const frequencies = this.occurenceFrequencies();
|
||||
const minFrequency = Math.min(...Object.values(frequencies));
|
||||
const maxFrequency = Math.max(...Object.values(frequencies));
|
||||
@@ -129,10 +134,10 @@ export class CollaborationGraphComponent {
|
||||
}));
|
||||
|
||||
const categories = [
|
||||
{ name: 'author' },
|
||||
{ name: 'collaborator' },
|
||||
{ name: 'institution' },
|
||||
{ name: 'work' },
|
||||
{ name: 'author', itemStyle: { color: colors.blueHighlight } },
|
||||
{ name: 'collaborator', itemStyle: { color: colors.success } },
|
||||
{ name: 'institution', itemStyle: { color: colors.warning } },
|
||||
{ name: 'work', itemStyle: { color: colors.primary } },
|
||||
];
|
||||
|
||||
return {
|
||||
@@ -142,6 +147,9 @@ export class CollaborationGraphComponent {
|
||||
orient: 'horizontal',
|
||||
formatter: (name: string) => this.categoryLabels[name] || name,
|
||||
itemGap: 20,
|
||||
textStyle: { color: textColor },
|
||||
inactiveColor: colors.mutedTextColor,
|
||||
inactiveBorderColor: colors.tooltipBorder,
|
||||
},
|
||||
series: {
|
||||
type: 'graph',
|
||||
@@ -152,19 +160,42 @@ export class CollaborationGraphComponent {
|
||||
links: links,
|
||||
categories: categories,
|
||||
roam: true,
|
||||
roamTrigger: 'global', // + 2 hours because of incomplete documentation https://github.com/apache/echarts/issues/17214
|
||||
roamTrigger: 'global',
|
||||
zoom: 0.1,
|
||||
force: {
|
||||
repulsion: 10000,
|
||||
friction: 0.9,
|
||||
gravity: 0.2,
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
color: textColor,
|
||||
fontSize: 12,
|
||||
},
|
||||
emphasis: {
|
||||
focus: 'adjacency',
|
||||
label: {
|
||||
show: true,
|
||||
color: textColor,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
lineStyle: {
|
||||
width: 5,
|
||||
},
|
||||
},
|
||||
blur: {
|
||||
itemStyle: {
|
||||
opacity: 0.15,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
opacity: 0.15,
|
||||
},
|
||||
lineStyle: {
|
||||
opacity: 0.1,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
+48
-19
@@ -1,7 +1,8 @@
|
||||
import { Component, computed, input } from '@angular/core';
|
||||
import { Component, computed, inject, input } from '@angular/core';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
import { WorkPrimaryCategory } from '../../../api';
|
||||
import { ChartThemeService } from '../../../shared/services/chart-theme.service';
|
||||
import { SUBFIELD_COLORS } from '../compare-authors-colors';
|
||||
|
||||
export interface AuthorCategoryLegendItem {
|
||||
@@ -69,6 +70,8 @@ export const AUTHOR_CATEGORY_LEGEND: readonly AuthorCategoryLegendItem[] = [
|
||||
export class AuthorCategoryPieComponent {
|
||||
counts = input<Partial<Record<WorkPrimaryCategory, number>> | null>(null);
|
||||
|
||||
private readonly chartTheme = inject(ChartThemeService);
|
||||
|
||||
readonly total = computed(() =>
|
||||
Object.values(this.counts() ?? {}).reduce(
|
||||
(sum, count) => sum + Math.max(0, count),
|
||||
@@ -79,14 +82,49 @@ export class AuthorCategoryPieComponent {
|
||||
readonly options = computed<EChartsOption>(() => {
|
||||
const counts = this.counts() ?? {};
|
||||
const total = this.total();
|
||||
const textColor = this.cssColor('--sg-text', '#0f172a');
|
||||
const mutedColor = this.cssColor('--sg-text-muted', '#64748b');
|
||||
const colors = this.chartTheme.colors();
|
||||
const textColor = colors.text;
|
||||
const mutedColor = colors.mutedTextColor;
|
||||
const tooltipBg = colors.cardBg;
|
||||
const tooltipBorder = colors.splitLine;
|
||||
const palette = colors.subfieldColors;
|
||||
|
||||
const categoryLegend: readonly AuthorCategoryLegendItem[] = [
|
||||
categoryLegendItem(
|
||||
WorkPrimaryCategory.BasicResearch,
|
||||
'Grundlagenforschung',
|
||||
palette[0],
|
||||
),
|
||||
categoryLegendItem(
|
||||
WorkPrimaryCategory.AppliedResearch,
|
||||
'Anwendungsbasierte Forschung',
|
||||
palette[1],
|
||||
),
|
||||
categoryLegendItem(
|
||||
WorkPrimaryCategory.ExperimentalDevelopment,
|
||||
'Experimentelle Entwicklung',
|
||||
palette[2],
|
||||
),
|
||||
categoryLegendItem(
|
||||
WorkPrimaryCategory.NonResearch,
|
||||
'Nicht-forschende Tätigkeit',
|
||||
palette[3],
|
||||
),
|
||||
categoryLegendItem(
|
||||
WorkPrimaryCategory.NotClassified,
|
||||
'Nicht klassifiziert',
|
||||
palette[4],
|
||||
),
|
||||
];
|
||||
|
||||
return {
|
||||
animation: false,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} Publikationen ({d} %)',
|
||||
backgroundColor: tooltipBg,
|
||||
borderColor: tooltipBorder,
|
||||
textStyle: { color: textColor },
|
||||
},
|
||||
graphic: {
|
||||
type: 'text',
|
||||
@@ -133,24 +171,15 @@ export class AuthorCategoryPieComponent {
|
||||
scale: true,
|
||||
scaleSize: 6,
|
||||
},
|
||||
data: AUTHOR_CATEGORY_LEGEND.map((item) => ({
|
||||
name: item.label,
|
||||
value: Math.max(0, counts[item.category] ?? 0),
|
||||
itemStyle: { color: item.color },
|
||||
})).filter((item) => item.value > 0),
|
||||
data: categoryLegend
|
||||
.map((item) => ({
|
||||
name: item.label,
|
||||
value: Math.max(0, counts[item.category] ?? 0),
|
||||
itemStyle: { color: item.color },
|
||||
}))
|
||||
.filter((item) => item.value > 0),
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
private cssColor(variable: string, fallback: string): string {
|
||||
if (typeof getComputedStyle !== 'function') {
|
||||
return fallback;
|
||||
}
|
||||
return (
|
||||
getComputedStyle(document.documentElement)
|
||||
.getPropertyValue(variable)
|
||||
.trim() || fallback
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-13
@@ -5,7 +5,7 @@
|
||||
.research-profile-card {
|
||||
border-color: var(--sg-border);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 8px 24px rgb(15 23 42 / 4%);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.profile-header {
|
||||
@@ -126,19 +126,12 @@ section {
|
||||
}
|
||||
|
||||
.legend-chip {
|
||||
--mdc-chip-elevated-container-color: color-mix(
|
||||
in srgb,
|
||||
var(--legend-color) 10%,
|
||||
var(--sg-surface)
|
||||
);
|
||||
--mdc-chip-label-text-color: var(--legend-color);
|
||||
--mdc-chip-outline-color: color-mix(
|
||||
in srgb,
|
||||
var(--legend-color) 28%,
|
||||
transparent
|
||||
);
|
||||
--mdc-chip-elevated-container-color: var(--sg-surface-soft);
|
||||
--mdc-chip-label-text-color: var(--sg-text);
|
||||
--mdc-chip-outline-color: var(--sg-border);
|
||||
|
||||
border: 1px solid color-mix(in srgb, var(--legend-color) 28%, transparent);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.legend-color {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@
|
||||
gap: 6px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 999px;
|
||||
background: var(--sg-surface-muted, #f7f9ff);
|
||||
border: 1px solid var(--sg-border, #dde5f2);
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
|
||||
mat-icon {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: var(--sg-text-soft, #8a95b3);
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
gap: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.legend-swatch {
|
||||
@@ -74,10 +74,10 @@
|
||||
|
||||
/* ---- cards ---- */
|
||||
.card {
|
||||
background: #fff;
|
||||
border: 1px solid #d7e4ff;
|
||||
background: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
padding: 20px 22px;
|
||||
}
|
||||
|
||||
@@ -85,19 +85,19 @@
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.card-sub {
|
||||
margin: 4px 0 0;
|
||||
font-size: 13px;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.compare-hint {
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
/* ---- comparison table ---- */
|
||||
@@ -114,7 +114,7 @@
|
||||
thead th {
|
||||
text-align: left;
|
||||
padding: 0 16px 10px;
|
||||
border-bottom: 2px solid var(--sg-border, #dde5f2);
|
||||
border-bottom: 2px solid var(--sg-border);
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
@@ -127,12 +127,12 @@
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
tbody tr + tr th,
|
||||
tbody tr + tr td {
|
||||
border-top: 1px solid var(--sg-border, #dde5f2);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
tbody th,
|
||||
@@ -148,7 +148,7 @@
|
||||
.metric-label {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.metric-hint {
|
||||
@@ -156,24 +156,24 @@
|
||||
margin-top: 2px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: var(--sg-text-soft, #8a95b3);
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.value-cell {
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
white-space: nowrap;
|
||||
|
||||
&.best {
|
||||
font-weight: 700;
|
||||
color: var(--sg-primary, #0b1020);
|
||||
background: var(--sg-surface-soft, #f3f6fd);
|
||||
color: var(--sg-primary);
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.value-empty {
|
||||
color: var(--sg-text-soft, #8a95b3);
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
/* author-position row: first / middle / last shown together, colour-coded */
|
||||
@@ -186,49 +186,49 @@
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
&.pos-first {
|
||||
color: #16a34a;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
&.pos-middle {
|
||||
color: #d97706;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
&.pos-last {
|
||||
color: #2563eb;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
&.rel-count {
|
||||
color: #7c3aed;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
&.rel-avg {
|
||||
color: #0891b2;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
&.cit-total {
|
||||
color: #b91c1c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
&.cit-avg {
|
||||
color: #ea580c;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
&.fwci-count {
|
||||
color: #4d7c0f;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
&.fwci-avg {
|
||||
color: #0d9488;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
&.year-from {
|
||||
color: #6d28d9;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
&.year-to {
|
||||
color: #be185d;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
&.ind-count {
|
||||
color: #92400e;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
&.ind-share {
|
||||
color: #1d4ed8;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
|
||||
.pos-sep {
|
||||
margin: 0 4px;
|
||||
color: var(--sg-text-soft, #b6bed6);
|
||||
color: var(--sg-text-soft);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@@ -244,13 +244,13 @@
|
||||
margin: 18px 0 0;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.chart-hint {
|
||||
margin: 2px 0 8px;
|
||||
font-size: 12px;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.profile-chart {
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
AuthorResearchProfileComponent,
|
||||
ResearchProfileAuthor,
|
||||
} from './author-research-profile/author-research-profile.component';
|
||||
import { ChartThemeService } from '../../shared/services/chart-theme.service';
|
||||
import {
|
||||
AUTHOR_COLORS,
|
||||
OTHER_COLOR,
|
||||
@@ -73,7 +74,6 @@ interface GroupSegment {
|
||||
label: string;
|
||||
colorClass: string;
|
||||
decimals: boolean;
|
||||
// render the value as-is, without the number pipe (e.g. years)
|
||||
plain: boolean;
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ interface SegmentDef {
|
||||
export class CompareAuthorsComponent implements OnInit {
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly rankingService = inject(RankingService);
|
||||
private readonly chartTheme = inject(ChartThemeService);
|
||||
|
||||
readonly keywords = signal<string[]>([]);
|
||||
readonly timespan = signal<{ from: number; to: number } | null>(null);
|
||||
@@ -143,6 +144,7 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
readonly summary = computed<AuthorSummary[]>(() => {
|
||||
const topicById = new Map(this.topic().map((a) => [a.author_id, a]));
|
||||
const staticById = new Map(this.staticStats().map((a) => [a.author_id, a]));
|
||||
const authorPalette = this.chartTheme.colors().authorColors;
|
||||
|
||||
return this.authorIds().map((id, index) => {
|
||||
const t = topicById.get(id);
|
||||
@@ -153,7 +155,7 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
const authorSummary: AuthorSummary = {
|
||||
authorId: id,
|
||||
name,
|
||||
color: AUTHOR_COLORS[index % AUTHOR_COLORS.length],
|
||||
color: authorPalette[index % authorPalette.length],
|
||||
totalWorks: t ? t.works_total : null,
|
||||
corresponding: t ? t.corresponding_count : null,
|
||||
avgPercentile: t ? t.avg_percentile : null,
|
||||
@@ -469,7 +471,11 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
return `<b>${params[0]?.name ?? ''}</b><br/>${lines.join('<br/>')}`;
|
||||
},
|
||||
},
|
||||
legend: { type: 'scroll', top: 0 },
|
||||
legend: {
|
||||
type: 'scroll',
|
||||
top: 0,
|
||||
textStyle: { color: this.chartTheme.colors().text },
|
||||
},
|
||||
grid: { left: 16, right: 24, top: 56, bottom: 8, containLabel: true },
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
@@ -506,7 +512,7 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
return `<b>${params[0]?.name ?? ''}</b><br/>${lines.join('<br/>')}`;
|
||||
},
|
||||
},
|
||||
legend: { top: 0 },
|
||||
legend: { top: 0, textStyle: { color: this.chartTheme.colors().text } },
|
||||
grid: { left: 16, right: 40, top: 32, bottom: 8, containLabel: true },
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
@@ -553,7 +559,7 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
|
||||
return {
|
||||
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
|
||||
legend: { top: 0 },
|
||||
legend: { top: 0, textStyle: { color: this.chartTheme.colors().text } },
|
||||
grid: { left: 16, right: 40, top: 32, bottom: 8, containLabel: true },
|
||||
xAxis: { type: 'value' },
|
||||
yAxis: {
|
||||
@@ -566,21 +572,21 @@ export class CompareAuthorsComponent implements OnInit {
|
||||
{
|
||||
name: 'Themen',
|
||||
type: 'bar',
|
||||
itemStyle: { color: '#0891b2' },
|
||||
itemStyle: { color: this.chartTheme.colors().blueHighlight },
|
||||
label: { show: true, position: 'right' },
|
||||
data: profiles.map((p) => p.distinct_topics),
|
||||
},
|
||||
{
|
||||
name: 'Subfields',
|
||||
type: 'bar',
|
||||
itemStyle: { color: '#d97706' },
|
||||
itemStyle: { color: this.chartTheme.colors().warning },
|
||||
label: { show: true, position: 'right' },
|
||||
data: profiles.map((p) => p.distinct_subfields),
|
||||
},
|
||||
{
|
||||
name: 'Fields',
|
||||
type: 'bar',
|
||||
itemStyle: { color: '#16a34a' },
|
||||
itemStyle: { color: this.chartTheme.colors().success },
|
||||
label: { show: true, position: 'right' },
|
||||
data: profiles.map((p) => p.distinct_fields),
|
||||
},
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// src/app/modules/university-ranking/dashboard.component.scss
|
||||
.dashboard-wrapper {
|
||||
padding: 2rem;
|
||||
font-family: 'Inter', sans-serif;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
|
||||
.dashboard-period-filter {
|
||||
display: flex;
|
||||
@@ -16,22 +14,22 @@
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
flex: 0 0 auto;
|
||||
border: 1px solid #cbd5e1;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
|
||||
button {
|
||||
padding: 0.55rem 0.8rem;
|
||||
border: 0;
|
||||
border-right: 1px solid #cbd5e1;
|
||||
border-right: 1px solid var(--sg-border);
|
||||
background: transparent;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
|
||||
&.active {
|
||||
background: #1d4ed8;
|
||||
color: #fff;
|
||||
background: var(--sg-blue-highlight);
|
||||
color: var(--sg-card-bg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,10 +55,10 @@
|
||||
gap: 1rem;
|
||||
min-height: 120px;
|
||||
padding: 1.25rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
box-shadow: 0 4px 14px rgb(15 23 42 / 6%);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition:
|
||||
@@ -69,13 +67,13 @@
|
||||
transform 160ms ease;
|
||||
|
||||
&:hover {
|
||||
border-color: #93c5fd;
|
||||
box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
|
||||
border-color: var(--sg-card-hover-border);
|
||||
box-shadow: var(--sg-shadow-md);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 3px solid #93c5fd;
|
||||
outline: 3px solid var(--sg-card-hover-border);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
@@ -86,13 +84,13 @@
|
||||
span,
|
||||
small {
|
||||
display: block;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
strong {
|
||||
display: block;
|
||||
margin: 0.2rem 0;
|
||||
color: #0f172a;
|
||||
color: var(--sg-text);
|
||||
font-size: clamp(1.7rem, 3vw, 2.3rem);
|
||||
line-height: 1.1;
|
||||
}
|
||||
@@ -105,38 +103,38 @@
|
||||
height: 52px;
|
||||
place-items: center;
|
||||
border-radius: 12px;
|
||||
background: #dbeafe;
|
||||
color: #1d4ed8;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
|
||||
&--persons {
|
||||
background: #dcfce7;
|
||||
color: #15803d;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
&--patents {
|
||||
background: #fee2e2;
|
||||
color: #b91c1c;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
&--eu-projects {
|
||||
background: #e0f2fe;
|
||||
color: #0369a1;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
&--bund-projects {
|
||||
background: #fef3c7;
|
||||
color: #b45309;
|
||||
background: var(--sg-warning-soft);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
&--dfg-projects {
|
||||
background: #f3e8ff;
|
||||
color: #7e22ce;
|
||||
background: var(--sg-warning-soft);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
.statistics-error {
|
||||
margin: -1rem 0 2rem;
|
||||
color: #b91c1c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.top-authors-section {
|
||||
@@ -146,9 +144,9 @@
|
||||
.topic-heatmap-section {
|
||||
margin-bottom: 2.5rem;
|
||||
padding: 1.25rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
background: var(--sg-card-bg);
|
||||
}
|
||||
|
||||
.topic-heatmap-header {
|
||||
@@ -165,7 +163,7 @@
|
||||
|
||||
p {
|
||||
margin-top: 0.35rem;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 820px) {
|
||||
@@ -194,8 +192,8 @@
|
||||
span {
|
||||
padding: 0.35rem 0.65rem;
|
||||
border-radius: 999px;
|
||||
background: #f1f5f9;
|
||||
color: #475569;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -203,7 +201,7 @@
|
||||
|
||||
.dfg-topic-summary {
|
||||
flex: 0 0 auto;
|
||||
color: #475569;
|
||||
color: var(--sg-text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -221,7 +219,7 @@
|
||||
|
||||
p {
|
||||
margin-top: 0.35rem;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
@@ -246,16 +244,16 @@
|
||||
|
||||
.top-authors-chart {
|
||||
padding: 1.25rem;
|
||||
border: 1px solid #e2e8f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
background: var(--sg-card-bg);
|
||||
|
||||
h3 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: #0f172a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +266,7 @@
|
||||
|
||||
.author-rank {
|
||||
flex: 0 0 1.4rem;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.8rem;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -287,7 +285,7 @@
|
||||
|
||||
.author-name {
|
||||
overflow: hidden;
|
||||
color: #1d4ed8;
|
||||
color: var(--sg-blue-highlight);
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -306,7 +304,7 @@
|
||||
|
||||
&:focus-visible {
|
||||
border-radius: 2px;
|
||||
outline: 2px solid #93c5fd;
|
||||
outline: 2px solid var(--sg-card-hover-border);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
@@ -315,20 +313,20 @@
|
||||
overflow: hidden;
|
||||
height: 7px;
|
||||
border-radius: 999px;
|
||||
background: #e2e8f0;
|
||||
background: var(--sg-border);
|
||||
}
|
||||
|
||||
.author-bar-fill {
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: linear-gradient(90deg, #2563eb, #60a5fa);
|
||||
background: var(--sg-blue-highlight);
|
||||
transition: width 220ms ease;
|
||||
}
|
||||
|
||||
.empty-chart {
|
||||
margin: 2rem 0;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
min-height: 260px;
|
||||
margin: 0;
|
||||
place-items: center;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { Component, Input, OnChanges, effect, inject } from '@angular/core';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
import { ChartThemeService } from '../../../shared/services/chart-theme.service';
|
||||
|
||||
import { DfgProjectTopic } from '../dashboard-statistics.service';
|
||||
|
||||
@@ -13,9 +14,22 @@ import { DfgProjectTopic } from '../dashboard-statistics.service';
|
||||
export class DfgTopicDonutComponent implements OnChanges {
|
||||
@Input() topics: DfgProjectTopic[] = [];
|
||||
|
||||
private chartTheme = inject(ChartThemeService);
|
||||
options: EChartsOption = {};
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
this.buildOptions();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
this.buildOptions();
|
||||
}
|
||||
|
||||
private buildOptions(): void {
|
||||
const theme = this.chartTheme.colors();
|
||||
|
||||
this.options = {
|
||||
color: [
|
||||
'#7255d9',
|
||||
@@ -29,9 +43,13 @@ export class DfgTopicDonutComponent implements OnChanges {
|
||||
'#db2777',
|
||||
'#9333ea',
|
||||
],
|
||||
backgroundColor: theme.backgroundColor,
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
confine: true,
|
||||
backgroundColor: theme.tooltipBg,
|
||||
borderColor: theme.tooltipBorder,
|
||||
textStyle: { color: theme.tooltipTextColor },
|
||||
formatter: (params: any) =>
|
||||
`<strong>${this.escapeHtml(String(params.name ?? ''))}</strong><br>${Number(params.value ?? 0).toLocaleString('de-DE')} DFG-Projekte`,
|
||||
},
|
||||
@@ -41,7 +59,7 @@ export class DfgTopicDonutComponent implements OnChanges {
|
||||
top: 'middle',
|
||||
right: 12,
|
||||
width: '38%',
|
||||
textStyle: { color: '#334155' },
|
||||
textStyle: { color: theme.textColor },
|
||||
formatter: (name: string) => this.truncate(name, 42),
|
||||
},
|
||||
graphic: [
|
||||
@@ -52,7 +70,7 @@ export class DfgTopicDonutComponent implements OnChanges {
|
||||
style: {
|
||||
text: `${this.topics.length}\nTopics`,
|
||||
align: 'center',
|
||||
fill: '#0f172a',
|
||||
fill: theme.textColor,
|
||||
fontSize: 18,
|
||||
fontWeight: 700,
|
||||
lineHeight: 25,
|
||||
@@ -68,7 +86,7 @@ export class DfgTopicDonutComponent implements OnChanges {
|
||||
avoidLabelOverlap: true,
|
||||
minAngle: 3,
|
||||
itemStyle: {
|
||||
borderColor: '#ffffff',
|
||||
borderColor: theme.cardBg,
|
||||
borderWidth: 3,
|
||||
borderRadius: 5,
|
||||
},
|
||||
|
||||
+27
-7
@@ -1,6 +1,7 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { Component, Input, OnChanges, effect, inject } from '@angular/core';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
import { ChartThemeService } from '../../../shared/services/chart-theme.service';
|
||||
|
||||
import {
|
||||
BmbfProjectStatusStatistics,
|
||||
@@ -19,9 +20,23 @@ export class EuProjectStatusChartComponent implements OnChanges {
|
||||
@Input({ required: true }) bmbfStatuses!: BmbfProjectStatusStatistics;
|
||||
@Input({ required: true }) dfgStatuses!: DfgProjectStatusStatistics;
|
||||
|
||||
private chartTheme = inject(ChartThemeService);
|
||||
options: EChartsOption = {};
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
// Re-build options when theme colors signal changes
|
||||
this.buildOptions();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
this.buildOptions();
|
||||
}
|
||||
|
||||
private buildOptions(): void {
|
||||
const theme = this.chartTheme.colors();
|
||||
|
||||
const values = [
|
||||
{
|
||||
name: 'Laufend',
|
||||
@@ -48,17 +63,21 @@ export class EuProjectStatusChartComponent implements OnChanges {
|
||||
this.bmbfStatuses?.completed ?? 0,
|
||||
this.dfgStatuses?.completed ?? 0,
|
||||
],
|
||||
color: '#64748b',
|
||||
color: theme.mutedTextColor,
|
||||
},
|
||||
];
|
||||
|
||||
this.options = {
|
||||
color: values.map((item) => item.color),
|
||||
animationDuration: 500,
|
||||
backgroundColor: theme.backgroundColor,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: { type: 'shadow' },
|
||||
confine: true,
|
||||
backgroundColor: theme.tooltipBg,
|
||||
borderColor: theme.tooltipBorder,
|
||||
textStyle: { color: theme.tooltipTextColor },
|
||||
valueFormatter: (value) =>
|
||||
`${Number(value ?? 0).toLocaleString('de-DE')} Projekte`,
|
||||
},
|
||||
@@ -66,7 +85,7 @@ export class EuProjectStatusChartComponent implements OnChanges {
|
||||
top: 0,
|
||||
left: 'center',
|
||||
data: values.map((item) => item.name),
|
||||
textStyle: { color: '#334155' },
|
||||
textStyle: { color: theme.textColor },
|
||||
},
|
||||
grid: { top: 56, right: 24, bottom: 30, left: 24, containLabel: true },
|
||||
xAxis: {
|
||||
@@ -75,15 +94,16 @@ export class EuProjectStatusChartComponent implements OnChanges {
|
||||
name: 'Anzahl Projekte',
|
||||
nameLocation: 'middle',
|
||||
nameGap: 28,
|
||||
axisLabel: { color: '#64748b' },
|
||||
splitLine: { lineStyle: { color: '#e2e8f0' } },
|
||||
axisLabel: { color: theme.mutedTextColor },
|
||||
nameTextStyle: { color: theme.mutedTextColor },
|
||||
splitLine: { lineStyle: { color: theme.gridLineColor } },
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
data: ['EU-Projekte', 'Bund-Projekte', 'DFG-Projekte'],
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: { color: '#334155', fontWeight: 600 },
|
||||
axisLabel: { color: theme.textColor, fontWeight: 600 },
|
||||
},
|
||||
series: values.map((item, index) => ({
|
||||
name: item.name,
|
||||
@@ -96,7 +116,7 @@ export class EuProjectStatusChartComponent implements OnChanges {
|
||||
position: 'inside',
|
||||
formatter: (params) =>
|
||||
Number(params.value ?? 0) > 0 ? String(params.value) : '',
|
||||
color: '#ffffff',
|
||||
color: theme.labelColor,
|
||||
fontWeight: 700,
|
||||
},
|
||||
itemStyle: {
|
||||
|
||||
+58
-69
@@ -4,12 +4,12 @@
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
padding: 24px 28px 20px;
|
||||
border-bottom: 1px solid var(--sg-border, #dde5f2);
|
||||
background: linear-gradient(135deg, #ffffff 52%, #f6f0ff 100%);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
background: var(--sg-card-bg);
|
||||
|
||||
h2 {
|
||||
margin: 1px 0 3px;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 1.375rem;
|
||||
font-weight: 700;
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
.dialog-eyebrow {
|
||||
display: block;
|
||||
color: #7255d9;
|
||||
color: var(--sg-primary);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -41,18 +41,18 @@
|
||||
|
||||
.dialog-close {
|
||||
flex: 0 0 auto;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
|
||||
&:hover {
|
||||
background: #f1f3f7;
|
||||
color: var(--sg-text, #101a3d);
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
mat-dialog-content {
|
||||
min-height: 410px;
|
||||
padding: 20px 28px 28px !important;
|
||||
background: #ffffff;
|
||||
background: var(--sg-card-bg);
|
||||
}
|
||||
|
||||
.topic-context-card {
|
||||
@@ -62,9 +62,9 @@ mat-dialog-content {
|
||||
gap: 12px;
|
||||
margin-bottom: 18px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--sg-border, #dde5f2);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: var(--sg-surface-muted, #f7f9ff);
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.topic-context-item {
|
||||
@@ -91,21 +91,21 @@ mat-dialog-content {
|
||||
}
|
||||
|
||||
.topic-context-icon--field {
|
||||
border: 1px solid #bdd4ff;
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
border: 1px solid var(--sg-blue-highlight);
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
.topic-context-icon--subfield {
|
||||
border: 1px solid #bdebcf;
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border: 1px solid var(--sg-success);
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.topic-context-icon--topic {
|
||||
border: 1px solid #d8cafe;
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
border: 1px solid var(--sg-primary);
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.topic-context-copy {
|
||||
@@ -116,7 +116,7 @@ mat-dialog-content {
|
||||
|
||||
strong {
|
||||
overflow: hidden;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.35;
|
||||
@@ -126,11 +126,11 @@ mat-dialog-content {
|
||||
}
|
||||
|
||||
.topic-context-item--topic strong {
|
||||
color: #7255d9;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.topic-context-label {
|
||||
color: var(--sg-text-soft, #8a95b3);
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 0.625rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.07em;
|
||||
@@ -141,15 +141,15 @@ mat-dialog-content {
|
||||
.topic-context-arrow {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: #a8b2c8;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.word-cloud-panel {
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--sg-border, #dde5f2);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
@@ -159,11 +159,11 @@ mat-dialog-content {
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 14px 18px;
|
||||
border-bottom: 1px solid #e8edf5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
|
||||
h3 {
|
||||
margin: 0 0 2px;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 0.9375rem;
|
||||
font-weight: 700;
|
||||
@@ -171,7 +171,7 @@ mat-dialog-content {
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
@@ -179,10 +179,10 @@ mat-dialog-content {
|
||||
.word-count {
|
||||
flex: 0 0 auto;
|
||||
padding: 5px 9px;
|
||||
border: 1px solid #d8cafe;
|
||||
border: 1px solid var(--sg-primary);
|
||||
border-radius: 999px;
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -193,20 +193,20 @@ mat-dialog-content {
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid #e8edf5;
|
||||
background: #f8faff;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.keyword-toolbar-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
|
||||
> mat-icon {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
color: #7255d9;
|
||||
color: var(--sg-primary);
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ mat-dialog-content {
|
||||
}
|
||||
|
||||
small {
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
}
|
||||
@@ -240,10 +240,10 @@ mat-dialog-content {
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 7px 4px 9px;
|
||||
border: 1px solid #c9bafa;
|
||||
border: 1px solid var(--sg-primary);
|
||||
border-radius: 999px;
|
||||
background: #f6f0ff;
|
||||
color: #6347c8;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
font-size: 0.6875rem;
|
||||
@@ -256,13 +256,13 @@ mat-dialog-content {
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: #a992ef;
|
||||
background: #eee7ff;
|
||||
border-color: var(--sg-primary);
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.keyword-selection-empty {
|
||||
color: var(--sg-text-soft, #8a95b3);
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 0.75rem;
|
||||
font-style: italic;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ mat-dialog-content {
|
||||
}
|
||||
|
||||
.keyword-search--secondary {
|
||||
background: #ffffff;
|
||||
background: var(--sg-card-bg);
|
||||
}
|
||||
|
||||
.keyword-search--disabled {
|
||||
@@ -303,18 +303,7 @@ mat-dialog-content {
|
||||
justify-content: center;
|
||||
gap: 14px 20px;
|
||||
padding: 30px 34px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 15% 20%,
|
||||
rgba(114, 85, 217, 0.06),
|
||||
transparent 28%
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 85% 75%,
|
||||
rgba(11, 99, 206, 0.05),
|
||||
transparent 30%
|
||||
),
|
||||
#ffffff;
|
||||
background: var(--sg-card-bg);
|
||||
}
|
||||
|
||||
.word-cloud-word {
|
||||
@@ -332,20 +321,20 @@ mat-dialog-content {
|
||||
background-color 150ms ease;
|
||||
|
||||
&:hover {
|
||||
background: rgba(241, 243, 247, 0.9);
|
||||
background: var(--sg-surface-soft);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 3px solid rgba(114, 85, 217, 0.25);
|
||||
outline: 3px solid var(--sg-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.word-cloud-word--selected {
|
||||
border-color: currentColor;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 8px rgba(51, 65, 85, 0.16);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-md);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
@@ -357,12 +346,12 @@ mat-dialog-content {
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 24px;
|
||||
color: var(--sg-text-muted, #64708f);
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
|
||||
strong {
|
||||
margin-top: 4px;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
@@ -377,24 +366,24 @@ mat-dialog-content {
|
||||
height: 46px;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: #f1f3f7;
|
||||
color: #64708f;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.state-icon--loading {
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
animation: state-pulse 1.4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.word-cloud-state--error .state-icon {
|
||||
background: #fff1f5;
|
||||
color: #d12f61;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
@keyframes state-pulse {
|
||||
50% {
|
||||
box-shadow: 0 0 0 8px rgba(114, 85, 217, 0.08);
|
||||
box-shadow: 0 0 0 8px var(--sg-primary-soft);
|
||||
transform: scale(1.04);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-10
@@ -57,16 +57,16 @@ export class TopicWordCloudDialogComponent {
|
||||
loadFailed = false;
|
||||
|
||||
private readonly colors = [
|
||||
'#2563eb',
|
||||
'#059669',
|
||||
'#d97706',
|
||||
'#dc2626',
|
||||
'#7c3aed',
|
||||
'#0284c7',
|
||||
'#ea580c',
|
||||
'#4f46e5',
|
||||
'#0f766e',
|
||||
'#be123c',
|
||||
'var(--sg-blue-highlight)',
|
||||
'var(--sg-success)',
|
||||
'var(--sg-warning)',
|
||||
'var(--sg-error)',
|
||||
'var(--sg-primary)',
|
||||
'var(--sg-blue-highlight)',
|
||||
'var(--sg-warning)',
|
||||
'var(--sg-primary-strong)',
|
||||
'var(--sg-success)',
|
||||
'var(--sg-error)',
|
||||
];
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.error-container {
|
||||
min-height: 90vh;
|
||||
background-color: none !important;
|
||||
background-color: transparent !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -11,9 +11,7 @@
|
||||
.error-card {
|
||||
max-width: 450px;
|
||||
width: 100%;
|
||||
box-shadow:
|
||||
0 4px 6px -1px rgb(0 0 0 / 0.05),
|
||||
0 2px 4px -2px rgb(0 0 0 / 0.05) !important;
|
||||
box-shadow: var(--sg-shadow-sm) !important;
|
||||
}
|
||||
|
||||
.error-content {
|
||||
@@ -33,7 +31,7 @@
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.05em;
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-muted);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
@@ -41,7 +39,7 @@
|
||||
margin: 0.5rem 0 1rem 0;
|
||||
font-size: 1.75rem;
|
||||
font-weight: 700;
|
||||
color: #1e293b;
|
||||
color: var(--sg-text);
|
||||
letter-spacing: -0.025em;
|
||||
line-height: 1.2;
|
||||
}
|
||||
@@ -49,7 +47,7 @@
|
||||
.error-message {
|
||||
margin: 0 0 2rem 0;
|
||||
font-size: 1rem;
|
||||
color: #475569;
|
||||
color: var(--sg-text-muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
@@ -68,17 +66,18 @@
|
||||
.diagnostics-title {
|
||||
font-size: 0.75rem !important;
|
||||
font-weight: 600;
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-muted);
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.diagnostics-code {
|
||||
margin-top: 0.5rem;
|
||||
padding: 1rem;
|
||||
background-color: #0f172a;
|
||||
background-color: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 8px;
|
||||
font-size: 0.75rem;
|
||||
color: #34d399;
|
||||
color: var(--sg-success);
|
||||
overflow-x: auto;
|
||||
font-family: monospace;
|
||||
text-align: left;
|
||||
|
||||
@@ -127,21 +127,12 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if (hasPagination()) {
|
||||
<div class="pagination">
|
||||
<button
|
||||
[disabled]="selectedPage === 1"
|
||||
(click)="setPage(selectedPage - 1)">
|
||||
Zurück
|
||||
</button>
|
||||
<span>Seite {{ selectedPage }} von {{ getPageCount() }}</span>
|
||||
<button
|
||||
[disabled]="selectedPage === getPageCount()"
|
||||
(click)="setPage(selectedPage + 1)">
|
||||
Weiter
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
<app-query-param-paginator
|
||||
[total]="totalPatents"
|
||||
queryParamPageKey="page"
|
||||
queryParamSizeKey="size"
|
||||
[pageSizeOptions]="[10, 20, 50]"
|
||||
(handlePageChange)="onPatentPageChange($event)" />
|
||||
</div>
|
||||
|
||||
@if (selectedPatent) {
|
||||
@@ -224,7 +215,7 @@
|
||||
<span class="patent-detail-action__label"
|
||||
>Patentdetails anzeigen</span
|
||||
>
|
||||
<span class="material-icons" aria-hidden="true">chevron_right</span>
|
||||
<mat-icon aria-hidden="true">chevron_right</mat-icon>
|
||||
</button>
|
||||
<p class="patent-detail-hint">
|
||||
Abstract, Erfinder, Anmelder und IPC/CPC-Klassifikation
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
.message {
|
||||
padding: 16px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
|
||||
&.message-hint {
|
||||
padding-top: 0;
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
|
||||
code {
|
||||
display: inline-block;
|
||||
margin-top: 6px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text);
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,11 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
app-query-param-paginator {
|
||||
display: block;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.patents-toolbar-field {
|
||||
width: fit-content;
|
||||
min-width: 180px;
|
||||
@@ -55,36 +60,53 @@
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
overflow: hidden;
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
padding: 12px 16px;
|
||||
background: var(--sg-surface-muted);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
color: var(--sg-text);
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
&:hover td {
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #f0f0f0;
|
||||
&.selected td {
|
||||
background: var(--sg-primary-soft);
|
||||
}
|
||||
|
||||
&:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.patent-title {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
color: var(--sg-text);
|
||||
font-weight: 600;
|
||||
max-width: 280px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -96,7 +118,7 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -118,26 +140,26 @@
|
||||
font-weight: 700;
|
||||
|
||||
&--institution {
|
||||
background: #f5f3ff;
|
||||
color: #6d28d9;
|
||||
border: 1px solid #ddd6fe;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
&--name {
|
||||
background: #fff7ed;
|
||||
color: #c2410c;
|
||||
border: 1px solid #fed7aa;
|
||||
background: var(--sg-warning-soft);
|
||||
color: var(--sg-warning);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
&--both {
|
||||
background: #ecfdf5;
|
||||
color: #047857;
|
||||
border: 1px solid #a7f3d0;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
.author-link {
|
||||
color: #2563eb;
|
||||
color: var(--sg-blue-highlight);
|
||||
text-decoration: none;
|
||||
font-size: 0.82rem;
|
||||
|
||||
@@ -155,30 +177,31 @@
|
||||
font-weight: 700;
|
||||
|
||||
&--epo {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border: 1px solid #bdebcf;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
&--uspto {
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
border: 1px solid #bdd4ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
.patent-detail {
|
||||
width: 440px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
background: #fafafa;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 24px;
|
||||
background: var(--sg-surface);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
|
||||
&.empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
color: var(--sg-text-muted);
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
@@ -189,14 +212,14 @@
|
||||
|
||||
.overview-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.overview-subtitle {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -208,9 +231,9 @@
|
||||
}
|
||||
|
||||
.overview-stat {
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 12px 8px;
|
||||
text-align: center;
|
||||
|
||||
@@ -218,48 +241,48 @@
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.overview-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
&--total {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #0b63ce;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
|
||||
&--institution {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #6d28d9;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
}
|
||||
|
||||
&--name {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #c2410c;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
&--both {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #047857;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.overview-hint {
|
||||
font-size: 12px;
|
||||
color: #aaa;
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -267,7 +290,8 @@
|
||||
h3 {
|
||||
margin: 0 0 16px 0;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
@@ -278,16 +302,16 @@
|
||||
gap: 10px;
|
||||
|
||||
.stat {
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
margin-bottom: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
@@ -297,7 +321,7 @@
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -306,7 +330,7 @@
|
||||
margin: 14px 0 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.patent-detail-action {
|
||||
@@ -317,10 +341,10 @@
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #bdd4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
|
||||
color: #0b63ce;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
@@ -330,9 +354,9 @@
|
||||
box-shadow 0.15s;
|
||||
|
||||
&:hover {
|
||||
border-color: #0b63ce;
|
||||
background: #f0f6ff;
|
||||
box-shadow: 0 2px 8px rgba(11, 99, 206, 0.12);
|
||||
border-color: var(--sg-blue-highlight);
|
||||
background: var(--sg-primary-soft);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
@@ -344,34 +368,34 @@
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.patent-full-detail {
|
||||
flex: 1;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 20px;
|
||||
background: #fafafa;
|
||||
background: var(--sg-surface-muted);
|
||||
|
||||
h3 {
|
||||
margin: 0 0 4px 0;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 16px 0 8px 0;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 13px;
|
||||
color: #444;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -381,20 +405,15 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
|
||||
width: auto;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.85rem;
|
||||
|
||||
border: 1px solid #d6e3f8;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
|
||||
background: #f8fbff;
|
||||
color: #2563eb;
|
||||
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color 0.15s ease,
|
||||
@@ -403,14 +422,14 @@
|
||||
box-shadow 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: #eef5ff;
|
||||
border-color: #bcd3f7;
|
||||
color: #1d4ed8;
|
||||
box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-blue-highlight);
|
||||
color: var(--sg-blue-highlight);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid #93c5fd;
|
||||
outline: 2px solid var(--sg-blue-highlight);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
@@ -418,7 +437,7 @@
|
||||
.detail-section {
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #eee;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.patent-meta {
|
||||
@@ -428,10 +447,10 @@
|
||||
|
||||
&__list {
|
||||
margin: 0;
|
||||
border: 1px solid #e2e8f4;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-surface);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -441,7 +460,7 @@
|
||||
gap: 12px 16px;
|
||||
align-items: center;
|
||||
padding: 11px 16px;
|
||||
border-top: 1px solid #eef2f8;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
|
||||
&:first-child {
|
||||
border-top: 0;
|
||||
@@ -451,7 +470,7 @@
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
@@ -459,7 +478,7 @@
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.35;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -483,32 +502,32 @@
|
||||
.tag {
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
background: var(--sg-primary-soft);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.classification-section {
|
||||
&--ipc .classification-card {
|
||||
background: #f0f6ff;
|
||||
border-color: #bfdbfe;
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-border);
|
||||
}
|
||||
|
||||
&--ipc .classification-badge--system {
|
||||
background: #dbeafe;
|
||||
color: #1d4ed8;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
&--cpc .classification-card {
|
||||
background: #f0fdf4;
|
||||
border-color: #bbf7d0;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
}
|
||||
|
||||
&--cpc .classification-badge--system {
|
||||
background: #dcfce7;
|
||||
color: #15803d;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,7 +540,7 @@
|
||||
.classification-card {
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #dbeafe;
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-card__header {
|
||||
@@ -547,7 +566,7 @@
|
||||
.classification-code {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.classification-badge {
|
||||
@@ -562,15 +581,15 @@
|
||||
}
|
||||
|
||||
.classification-badge--level {
|
||||
background: #e2e8f0;
|
||||
color: #475569;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.classification-summary {
|
||||
margin: 10px 0 0;
|
||||
font-size: 0.84rem;
|
||||
line-height: 1.5;
|
||||
color: #334155;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.classification-toggle {
|
||||
@@ -578,7 +597,7 @@
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: #2563eb;
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.78rem;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -590,7 +609,7 @@
|
||||
.classification-hierarchy {
|
||||
margin: 10px 0 0;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-hierarchy__row {
|
||||
@@ -603,7 +622,7 @@
|
||||
margin: 0;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
@@ -612,7 +631,7 @@
|
||||
margin: 0;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.45;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,9 +644,10 @@
|
||||
|
||||
button {
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
background: white;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -639,6 +659,6 @@
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
getPublicationStageLabel,
|
||||
} from '../patent-detail/patent-detail.utils';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { PageEvent } from '@angular/material/paginator';
|
||||
import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-paginator/query-param-paginator.component';
|
||||
|
||||
type SortMode = 'date' | 'title';
|
||||
type SourceFilter = 'all' | 'EPO' | 'USPTO';
|
||||
@@ -25,6 +27,7 @@ type OrgPatentMatchTypeFilter = 'all' | 'institution' | 'name' | 'both';
|
||||
MatFormFieldModule,
|
||||
MatSelectModule,
|
||||
MatIconModule,
|
||||
QueryParamPaginatorComponent,
|
||||
],
|
||||
templateUrl: './institution-patents.component.html',
|
||||
styleUrl: './institution-patents.component.scss',
|
||||
@@ -47,8 +50,8 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
activeMatchType: OrgPatentMatchTypeFilter = 'all';
|
||||
sortMode: SortMode = 'date';
|
||||
|
||||
selectedPage = 1;
|
||||
readonly pageSize = 20;
|
||||
pageIndex = 0;
|
||||
pageSize = 20;
|
||||
totalPatents = 0;
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -59,6 +62,12 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
const sortFromUrl = this.route.snapshot.queryParamMap.get('sortBy');
|
||||
const matchTypeFromUrl =
|
||||
this.route.snapshot.queryParamMap.get('matchType');
|
||||
this.pageIndex = this.parsePageIndexParam(
|
||||
this.route.snapshot.queryParamMap.get('page'),
|
||||
);
|
||||
this.pageSize = this.parsePageSizeParam(
|
||||
this.route.snapshot.queryParamMap.get('size'),
|
||||
);
|
||||
|
||||
if (this.isValidFilter(filterFromUrl)) {
|
||||
this.activeFilter = filterFromUrl;
|
||||
@@ -79,7 +88,7 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
|
||||
setFilter(filter: SourceFilter): void {
|
||||
this.activeFilter = filter;
|
||||
this.selectedPage = 1;
|
||||
this.pageIndex = 0;
|
||||
this.selectedPatent = null;
|
||||
this.reloadPatents();
|
||||
}
|
||||
@@ -87,7 +96,7 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
setMatchType(matchType: OrgPatentMatchTypeFilter): void {
|
||||
if (this.activeMatchType === matchType) return;
|
||||
this.activeMatchType = matchType;
|
||||
this.selectedPage = 1;
|
||||
this.pageIndex = 0;
|
||||
this.selectedPatent = null;
|
||||
this.reloadPatents();
|
||||
}
|
||||
@@ -108,8 +117,9 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
this.router.navigate(['/patent', this.selectedPatent.patent_id]);
|
||||
}
|
||||
|
||||
setPage(page: number): void {
|
||||
this.selectedPage = Math.min(Math.max(page, 1), this.getPageCount());
|
||||
onPatentPageChange(event: PageEvent): void {
|
||||
this.pageIndex = event.pageIndex;
|
||||
this.pageSize = event.pageSize;
|
||||
this.selectedPatent = null;
|
||||
this.reloadPatents();
|
||||
}
|
||||
@@ -118,14 +128,6 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
return this.filteredPatents;
|
||||
}
|
||||
|
||||
getPageCount(): number {
|
||||
return Math.max(1, Math.ceil(this.totalPatents / this.pageSize));
|
||||
}
|
||||
|
||||
hasPagination(): boolean {
|
||||
return this.totalPatents > this.pageSize;
|
||||
}
|
||||
|
||||
private reloadPatents(): void {
|
||||
const institutionId =
|
||||
this.institutionId ??
|
||||
@@ -145,7 +147,7 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
institutionId,
|
||||
|
||||
this.activeMatchType !== 'all' ? this.activeMatchType : undefined,
|
||||
this.selectedPage - 1,
|
||||
this.pageIndex,
|
||||
this.pageSize,
|
||||
this.activeFilter !== 'all' ? this.activeFilter : undefined,
|
||||
)
|
||||
@@ -183,13 +185,24 @@ export class InstitutionPatentsComponent implements OnInit {
|
||||
filter: this.activeFilter,
|
||||
sortBy: this.sortMode,
|
||||
matchType: this.activeMatchType,
|
||||
page: this.selectedPage,
|
||||
page: this.pageIndex,
|
||||
size: this.pageSize,
|
||||
},
|
||||
queryParamsHandling: 'merge',
|
||||
replaceUrl: true,
|
||||
});
|
||||
}
|
||||
|
||||
private parsePageIndexParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
return Number.isInteger(parsed) && parsed >= 0 ? parsed : 0;
|
||||
}
|
||||
|
||||
private parsePageSizeParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
return Number.isInteger(parsed) && parsed > 0 ? parsed : 20;
|
||||
}
|
||||
|
||||
private isValidFilter(value: string | null): value is SourceFilter {
|
||||
return value === 'all' || value === 'EPO' || value === 'USPTO';
|
||||
}
|
||||
|
||||
@@ -2,94 +2,87 @@
|
||||
<h3>Projekte</h3>
|
||||
|
||||
<div class="funding-area">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<app-query-param-input
|
||||
label="Suche nach Themen"
|
||||
queryParamKey="search" />
|
||||
<div class="person-projects">
|
||||
<nav mat-tab-nav-bar [tabPanel]="resultTabPanel" class="result-nav">
|
||||
@for (route of childRoutes; track route.path) {
|
||||
<a
|
||||
matTabLink
|
||||
[routerLink]="[route.path]"
|
||||
queryParamsHandling="merge"
|
||||
routerLinkActive
|
||||
#rla="routerLinkActive"
|
||||
[active]="rla.isActive">
|
||||
{{ route.label }}
|
||||
</a>
|
||||
}
|
||||
</nav>
|
||||
|
||||
<mat-tab-group
|
||||
[selectedIndex]="tabIndex()"
|
||||
(selectedTabChange)="selectedTabChange($event)">
|
||||
<mat-tab label="EU">
|
||||
<app-data-table
|
||||
[data]="euProjectData"
|
||||
[columns]="euProjectColumns"
|
||||
queryParamSortKey="sort_by"
|
||||
queryParamSortDirectionKey="sort_direction" />
|
||||
</mat-tab>
|
||||
<mat-tab label="Bund">
|
||||
<app-data-table
|
||||
[data]="bundProjectData"
|
||||
[columns]="bundProjectColumns"
|
||||
queryParamSortKey="sort_by"
|
||||
queryParamSortDirectionKey="sort_direction" />
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<app-query-param-paginator
|
||||
[total]="pageTotal()"
|
||||
[pageSizeOptions]="[10, 20, 50]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div class="funding-info-section">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Förderung über Zeit</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<app-institution-projects-funding-graph
|
||||
[fundings]="[bundProjectsFunding(), cordisEuProjectsFunding()]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-tab-nav-panel #resultTabPanel>
|
||||
<router-outlet />
|
||||
</mat-tab-nav-panel>
|
||||
<div class="funding-info-section">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Förderung über Zeit</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<app-institution-projects-funding-graph
|
||||
[fundings]="[bundProjectsFunding(), cordisEuProjectsFunding()]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<div class="funding-info-cards">
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euTotalFunding() | currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ??
|
||||
undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<div class="funding-info-cards">
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #fundingStartTmp let-row>
|
||||
{{ row.funding_start | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingEndTmp let-row>
|
||||
{{ row.funding_end | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingAmountTmp let-row>
|
||||
{{ row.funding_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
|
||||
</ng-template>
|
||||
|
||||
<ng-template #euProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/eu', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a></ng-template
|
||||
>
|
||||
|
||||
<ng-template #bundProjectActionsTmp let-row>
|
||||
<a
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
[routerLink]="['/projects/bund', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<ng-template #fundingStartTmp let-row>
|
||||
{{ row.funding_start | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingEndTmp let-row>
|
||||
{{ row.funding_end | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingAmountTmp let-row>
|
||||
{{ row.funding_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
|
||||
</ng-template>
|
||||
|
||||
<ng-template #euProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/eu', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a></ng-template
|
||||
>
|
||||
|
||||
<ng-template #bundProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/bund', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a>
|
||||
</ng-template>
|
||||
|
||||
@@ -20,18 +20,13 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatTabChangeEvent, MatTabsModule } from '@angular/material/tabs';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import {
|
||||
GenericColumn,
|
||||
DataTableComponent,
|
||||
} from '../../shared/ui/data-table/data-table.component';
|
||||
import { GenericColumn } from '../../shared/ui/data-table/data-table.component';
|
||||
import { CurrencyPipe, DatePipe } from '@angular/common';
|
||||
import { toSignal } from '@angular/core/rxjs-interop';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { InstitutionProjectsFundingGraphComponent } from '../institution-projects-funding-graph/institution-projects-funding-graph.component';
|
||||
import { AppInfoCardComponent } from '../../shared/ui/app-info-card/app-info-card.component';
|
||||
import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-paginator/query-param-paginator.component';
|
||||
import { QueryParamInputComponent } from '../../shared/ui/query-param-input/query-param-input.component';
|
||||
|
||||
type BundProjectRow = {
|
||||
id: string;
|
||||
@@ -58,7 +53,6 @@ type EuProjectRow = {
|
||||
MatTabsModule,
|
||||
FormsModule,
|
||||
MatInputModule,
|
||||
DataTableComponent,
|
||||
DatePipe,
|
||||
CurrencyPipe,
|
||||
MatIconModule,
|
||||
@@ -66,8 +60,6 @@ type EuProjectRow = {
|
||||
InstitutionProjectsFundingGraphComponent,
|
||||
AppInfoCardComponent,
|
||||
RouterModule,
|
||||
QueryParamPaginatorComponent,
|
||||
QueryParamInputComponent,
|
||||
],
|
||||
templateUrl: './institution-projects.component.html',
|
||||
styleUrl: './institution-projects.component.scss',
|
||||
@@ -116,6 +108,20 @@ export class InstitutionProjectsComponent implements OnInit {
|
||||
return funding.annual_average_over_period ?? 0;
|
||||
});
|
||||
|
||||
readonly childRoutes = [
|
||||
{
|
||||
path: 'dfg',
|
||||
label: 'DFG-Projekte',
|
||||
},
|
||||
{
|
||||
path: 'eu',
|
||||
label: 'EU-Projekte',
|
||||
},
|
||||
{
|
||||
path: 'bund',
|
||||
label: 'BUND-Projekte',
|
||||
},
|
||||
];
|
||||
constructor(
|
||||
private readonly activatedRoute: ActivatedRoute,
|
||||
private readonly router: Router,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.no-logs {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 120px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.logs-error {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
border-radius: 6px;
|
||||
background: #fef2f2;
|
||||
color: #991b1b;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.logs-header {
|
||||
@@ -32,7 +32,7 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-size: 13px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.logs-actions {
|
||||
@@ -54,28 +54,29 @@
|
||||
}
|
||||
|
||||
&--success {
|
||||
color: #166534;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
&--failed {
|
||||
color: #991b1b;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
&--running {
|
||||
color: #92400e;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
&--stopped {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
&--idle {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
.logs-panel {
|
||||
background: #0f172a;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
padding: 12px 14px;
|
||||
min-width: 520px;
|
||||
@@ -83,32 +84,10 @@
|
||||
min-height: 120px;
|
||||
max-height: 55vh;
|
||||
overflow: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #64748b #1e293b;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: #1e293b;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #64748b;
|
||||
border-radius: 6px;
|
||||
border: 3px solid #0f172a;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: #94a3b8;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
color: #e2e8f0;
|
||||
color: var(--sg-text);
|
||||
font-family: 'Roboto Mono', ui-monospace, monospace;
|
||||
font-size: 12px;
|
||||
white-space: pre-wrap;
|
||||
@@ -116,7 +95,7 @@
|
||||
}
|
||||
|
||||
.logs-loading {
|
||||
color: #cbd5e1;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +103,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -134,13 +113,13 @@
|
||||
}
|
||||
|
||||
.logs-hint {
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.run-duration {
|
||||
font-size: 13px;
|
||||
color: #475569;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
h1,
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
@@ -28,7 +29,7 @@ p {
|
||||
}
|
||||
|
||||
.page-header p {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
@@ -45,6 +46,8 @@ mat-paginator {
|
||||
.health-card {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
background: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.health-content {
|
||||
@@ -69,21 +72,21 @@ mat-paginator {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
background: #94a3b8;
|
||||
background: var(--sg-text-soft);
|
||||
flex-shrink: 0;
|
||||
|
||||
&--ok {
|
||||
background: #16a34a;
|
||||
background: var(--sg-success);
|
||||
}
|
||||
|
||||
&--error {
|
||||
background: #dc2626;
|
||||
background: var(--sg-error);
|
||||
}
|
||||
}
|
||||
|
||||
.health-detail {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.health-title {
|
||||
@@ -95,7 +98,7 @@ mat-paginator {
|
||||
|
||||
.health-host {
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@@ -151,7 +154,7 @@ mat-paginator {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s ease;
|
||||
|
||||
@@ -170,19 +173,19 @@ mat-paginator {
|
||||
|
||||
.edit-name-action[disabled] {
|
||||
cursor: not-allowed;
|
||||
color: #cbd5e1;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.task-description {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.task-index {
|
||||
width: fit-content;
|
||||
font-size: 11px;
|
||||
color: #475569;
|
||||
background: #f1f5f9;
|
||||
color: var(--sg-text);
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: 4px;
|
||||
padding: 1px 6px;
|
||||
}
|
||||
@@ -200,12 +203,12 @@ mat-paginator {
|
||||
font-family:
|
||||
ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.next-run {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.enabled-badge {
|
||||
@@ -214,12 +217,12 @@ mat-paginator {
|
||||
font-weight: 700;
|
||||
padding: 1px 8px;
|
||||
border-radius: 999px;
|
||||
background: #e2e8f0;
|
||||
color: #64748b;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text-muted);
|
||||
|
||||
&--on {
|
||||
background: #dcfce7;
|
||||
color: #166534;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,23 +240,23 @@ mat-paginator {
|
||||
}
|
||||
|
||||
&--success {
|
||||
color: #166534;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
&--failed {
|
||||
color: #991b1b;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
&--running {
|
||||
color: #92400e;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
&--stopped {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
&--idle {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,12 +271,12 @@ mat-paginator {
|
||||
|
||||
.last-run-message {
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.last-run-empty {
|
||||
font-size: 13px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.row-actions {
|
||||
@@ -282,7 +285,7 @@ mat-paginator {
|
||||
}
|
||||
|
||||
.delete-action:not(:disabled) {
|
||||
color: #b91c1c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.actions-header {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
min-width: 400px;
|
||||
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
@@ -22,24 +21,24 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.field-hint {
|
||||
margin: -6px 0 0;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.field-info {
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-muted);
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.server-error {
|
||||
margin: 8px 0 0;
|
||||
color: #b3261e;
|
||||
color: var(--sg-error);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
min-width: 400px;
|
||||
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
@@ -19,13 +18,13 @@
|
||||
}
|
||||
|
||||
.field-info {
|
||||
color: #94a3b8;
|
||||
color: var(--sg-text-muted);
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.server-error {
|
||||
margin: 8px 0 0;
|
||||
color: #b3261e;
|
||||
color: var(--sg-error);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
.task-description {
|
||||
margin: 0 0 16px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.schedule-form {
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
.field-hint {
|
||||
margin: -6px 0 0;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
width: 36px;
|
||||
height: 20px;
|
||||
border-radius: 999px;
|
||||
background: #cbd5e1;
|
||||
background: var(--sg-border-strong);
|
||||
transition: background 0.15s ease;
|
||||
}
|
||||
|
||||
@@ -55,13 +55,13 @@
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1px 2px rgba(16, 26, 61, 0.3);
|
||||
background: var(--sg-color-mix-base);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.enabled-toggle--on .enabled-toggle__track {
|
||||
background: #2259a8;
|
||||
background: var(--sg-primary);
|
||||
}
|
||||
|
||||
.enabled-toggle--on .enabled-toggle__thumb {
|
||||
@@ -70,11 +70,11 @@
|
||||
|
||||
.enabled-toggle__label {
|
||||
font-size: 14px;
|
||||
color: var(--sg-text, #101a3d);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.enabled-toggle:focus-visible {
|
||||
outline: 2px solid #2259a8;
|
||||
outline: 2px solid var(--sg-primary);
|
||||
outline-offset: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@@ -82,7 +82,7 @@
|
||||
.next-run-hint {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@
|
||||
<span class="patent-detail-action__label"
|
||||
>Patentdetails anzeigen</span
|
||||
>
|
||||
<span class="material-icons" aria-hidden="true">chevron_right</span>
|
||||
<mat-icon aria-hidden="true">chevron_right</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
+27
-19
@@ -1,28 +1,30 @@
|
||||
.message {
|
||||
padding: 16px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.fallback-notice {
|
||||
margin: 0 0 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
background: #f4f7fb;
|
||||
color: #3d4f63;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.patents-container {
|
||||
margin-top: 0;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
||||
background: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.patents-header {
|
||||
@@ -54,12 +56,14 @@
|
||||
gap: 6px;
|
||||
padding: 10px 14px;
|
||||
border-radius: 20px;
|
||||
background: #f2f2f2;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
|
||||
select {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--sg-text);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -82,24 +86,26 @@
|
||||
th {
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
border-bottom: 2px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
color: var(--sg-text);
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #f0f0f0;
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #eee;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,13 +121,13 @@
|
||||
font-weight: 600;
|
||||
|
||||
&--epo {
|
||||
background: #dbeafe;
|
||||
color: #1e40af;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
&--uspto {
|
||||
background: #dcfce7;
|
||||
color: #166534;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +142,8 @@
|
||||
flex: 0 0 320px;
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.detail-stats {
|
||||
@@ -147,19 +154,20 @@
|
||||
|
||||
.match-score {
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: #374151;
|
||||
color: var(--sg-text);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
display: block;
|
||||
word-break: break-word;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.patent-detail-action {
|
||||
@@ -171,8 +179,8 @@
|
||||
padding: 10px 12px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: #111827;
|
||||
color: #fff;
|
||||
background: var(--sg-primary);
|
||||
color: var(--sg-card-bg);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ $touch-target: 44px;
|
||||
.keywords-toolbar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--sg-background-muted, #f4f5f7);
|
||||
background: var(--sg-surface-muted);
|
||||
|
||||
::ng-deep app-topic-legend .topic-legend {
|
||||
width: 100%;
|
||||
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
border: 1px solid var(--sg-border);
|
||||
border-bottom: none;
|
||||
border-radius: 4px;
|
||||
margin: 0;
|
||||
@@ -65,17 +65,16 @@ $touch-target: 44px;
|
||||
justify-content: space-around;
|
||||
gap: 0.75rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
background: var(--sg-background-muted, #f4f5f7);
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
.toolbar-wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 1.3fr;
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
border: 1px solid var(--sg-border);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.toolbar-controls--placeholder {
|
||||
/* invisible spacer, preserves grid column width/position */
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -109,7 +108,7 @@ $touch-target: 44px;
|
||||
}
|
||||
|
||||
.toolbar-controls--placeholder {
|
||||
display: none; /* no need for a spacer once stacked */
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +116,7 @@ $touch-target: 44px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: nowrap; /* fixed: was invalid "no-wrap" */
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ $touch-target: 44px;
|
||||
.toolbar-divider {
|
||||
width: 1px;
|
||||
align-self: stretch;
|
||||
background: var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-border);
|
||||
}
|
||||
|
||||
mat-button-toggle-group {
|
||||
@@ -214,7 +213,7 @@ mat-button-toggle-group {
|
||||
|
||||
.keyword-card {
|
||||
padding: 0 !important;
|
||||
background: var(--sg-background-muted, #f4f5f7);
|
||||
background: var(--sg-surface-muted);
|
||||
.mat-card-header {
|
||||
padding: 0 0 0.5rem 0;
|
||||
}
|
||||
@@ -233,14 +232,14 @@ mat-button-toggle-group {
|
||||
}
|
||||
|
||||
.table-head {
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
border: 1px solid var(--sg-border);
|
||||
padding-top: 0.5rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr) 1.3fr;
|
||||
column-gap: 1rem;
|
||||
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
padding-bottom: 0.5rem;
|
||||
background: var(--sg-background-muted, #f4f5f7);
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.head-cell {
|
||||
@@ -250,7 +249,7 @@ mat-button-toggle-group {
|
||||
|
||||
.sub-cell {
|
||||
font-weight: 500;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: clamp(0.8rem, 1.2vw, 1rem);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
@@ -265,7 +264,6 @@ mat-button-toggle-group {
|
||||
column-gap: 1rem;
|
||||
row-gap: 0.4rem;
|
||||
align-items: start;
|
||||
//border-left: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
}
|
||||
|
||||
.table-col {
|
||||
@@ -274,7 +272,7 @@ mat-button-toggle-group {
|
||||
min-width: 0;
|
||||
padding: 0.5rem;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.8));
|
||||
border-right: 1px solid var(--sg-border);
|
||||
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
@@ -295,7 +293,7 @@ mat-button-toggle-group {
|
||||
}
|
||||
|
||||
.thick-border {
|
||||
border-right: 5px solid var(--sg-divider, rgba(0, 0, 0, 0.08)) !important;
|
||||
border-right: 5px solid var(--sg-border) !important;
|
||||
}
|
||||
|
||||
@container keyword-tool (max-width: #{$tablet}) {
|
||||
@@ -329,8 +327,8 @@ mat-button-toggle-group {
|
||||
margin-left: 0.35rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text-secondary);
|
||||
background: var(--sg-background-muted, #eceff1);
|
||||
color: var(--sg-text-muted);
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: 10px;
|
||||
padding: 0 6px;
|
||||
min-width: 18px;
|
||||
@@ -431,7 +429,7 @@ mat-button-toggle-group {
|
||||
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
font-size: 0.85rem;
|
||||
padding: 0.35rem 0;
|
||||
@@ -490,10 +488,10 @@ mat-button-toggle-group {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
background: var(--sg-background, #fff);
|
||||
background: var(--sg-background);
|
||||
padding: 0.75rem 0.5rem;
|
||||
margin-top: 0.75rem;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: var(--sg-shadow-md);
|
||||
}
|
||||
|
||||
.search-actions {
|
||||
@@ -567,9 +565,8 @@ mat-button-toggle-group {
|
||||
============================================================ */
|
||||
.source-expansion {
|
||||
margin: 0.5rem 1rem;
|
||||
background: var(--sg-background-muted, #f5f5f5);
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: 4px;
|
||||
//border-left: 4px solid var(--sg-primary, #1976d2);
|
||||
|
||||
.mat-expansion-panel-header {
|
||||
padding: 0.5rem 0.75rem;
|
||||
@@ -577,7 +574,7 @@ mat-button-toggle-group {
|
||||
min-height: 36px;
|
||||
font-size: 1rem;
|
||||
text-transform: uppercase;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
letter-spacing: 0.05em;
|
||||
|
||||
.mat-expansion-panel-header-title {
|
||||
@@ -594,7 +591,7 @@ mat-button-toggle-group {
|
||||
::ng-deep .mat-expansion-panel-content {
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.5;
|
||||
color: var(--sg-text-primary);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
::ng-deep .mat-expansion-panel-body {
|
||||
@@ -611,7 +608,7 @@ mat-button-toggle-group {
|
||||
}
|
||||
|
||||
::ng-deep .mat-expansion-panel-header:hover {
|
||||
background: rgba(0, 0, 0, 0.03);
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,7 +637,7 @@ mat-button-toggle-group {
|
||||
90deg,
|
||||
transparent 0%,
|
||||
transparent 35%,
|
||||
#2196f3 50%,
|
||||
var(--sg-primary) 50%,
|
||||
transparent 65%,
|
||||
transparent 100%
|
||||
);
|
||||
@@ -649,8 +646,8 @@ mat-button-toggle-group {
|
||||
animation: border-loading 1.5s linear infinite;
|
||||
|
||||
-webkit-mask:
|
||||
linear-gradient(#fff 0 0) content-box,
|
||||
linear-gradient(#fff 0 0);
|
||||
linear-gradient(var(--sg-color-mix-base) 0 0) content-box,
|
||||
linear-gradient(var(--sg-color-mix-base) 0 0);
|
||||
-webkit-mask-composite: xor;
|
||||
mask-composite: exclude;
|
||||
|
||||
@@ -661,7 +658,7 @@ mat-button-toggle-group {
|
||||
align-self: center;
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -688,6 +685,6 @@ mat-button-toggle-group {
|
||||
button:focus-visible,
|
||||
.mat-button-toggle:focus-visible,
|
||||
::ng-deep .mat-mdc-tab:focus-visible {
|
||||
outline: 2px solid var(--sg-primary, #1976d2);
|
||||
outline: 2px solid var(--sg-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ export class KeywordsSearchComponent {
|
||||
|
||||
const regex = new RegExp(escapedRegexKeyword, 'gi');
|
||||
|
||||
const replacement = `<span style="text-decoration: underline; background-color: color-mix(in srgb, ${color} 27%, #ffffff); font-weight: bold;" title="Keyword: ${escapedKeyword}">${escapedKeyword}</span>`;
|
||||
const replacement = `<span style="text-decoration: underline; background-color: color-mix(in srgb, ${color} 27%, var(--sg-color-mix-base)); font-weight: bold;" title="Keyword: ${escapedKeyword}">${escapedKeyword}</span>`;
|
||||
|
||||
highlightedContent = highlightedContent.replace(regex, replacement);
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
|
||||
.search-summary-card,
|
||||
.results-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
|
||||
.mat-mdc-card-content {
|
||||
|
||||
+2
-2
@@ -19,8 +19,8 @@
|
||||
}
|
||||
|
||||
.weights-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
|
||||
.mat-mdc-card-content {
|
||||
|
||||
+13
-13
@@ -28,8 +28,8 @@
|
||||
|
||||
.search-summary-card,
|
||||
.results-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
|
||||
.mat-mdc-card-content {
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
|
||||
.selected-hint {
|
||||
color: var(--sg-text-secondary, rgba(0, 0, 0, 0.6));
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
@@ -65,14 +65,14 @@
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.5rem 0.25rem;
|
||||
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.08));
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.author-name {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
color: var(--sg-primary, #1565c0);
|
||||
color: var(--sg-primary);
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
.author-score {
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--sg-text-secondary, rgba(0, 0, 0, 0.6));
|
||||
color: var(--sg-text-muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
::ng-deep .filter-section {
|
||||
margin-top: 0.75rem;
|
||||
padding: 0.5rem 0.6rem 0.6rem;
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
background: var(--sg-surface-variant, rgba(0, 0, 0, 0.015));
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.filter-section-header {
|
||||
@@ -111,7 +111,7 @@
|
||||
margin: 0;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 650;
|
||||
color: var(--sg-text-primary);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
button {
|
||||
@@ -126,7 +126,7 @@
|
||||
::ng-deep .filter-section .filter-row + .filter-row {
|
||||
margin-top: 0.5rem;
|
||||
padding-top: 0.5rem;
|
||||
border-top: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.08));
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
::ng-deep .company-filter-row {
|
||||
@@ -139,7 +139,7 @@
|
||||
::ng-deep .timespan-range-label {
|
||||
justify-content: center !important;
|
||||
font-weight: 500;
|
||||
color: var(--sg-text-primary) !important;
|
||||
color: var(--sg-text) !important;
|
||||
}
|
||||
|
||||
::ng-deep .timespan-slider {
|
||||
@@ -153,6 +153,6 @@
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: white;
|
||||
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
+3
-1
@@ -150,7 +150,9 @@ export class SearchResultsStateService {
|
||||
return kw;
|
||||
})
|
||||
.filter((t) => t.length > 0);
|
||||
return Array.from(new Set(list));
|
||||
const uniqueTopics = Array.from(new Set(list));
|
||||
|
||||
return uniqueTopics;
|
||||
});
|
||||
|
||||
setPayload(payload: SearchResultsPayload): void {
|
||||
|
||||
@@ -57,7 +57,10 @@
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<nav mat-tab-nav-bar [tabPanel]="resultTabPanel" class="result-nav">
|
||||
<nav
|
||||
mat-tab-nav-bar
|
||||
[tabPanel]="resultTabPanel"
|
||||
class="result-nav sg-tab-nav">
|
||||
@for (route of childRoutes; track route.path) {
|
||||
<a
|
||||
mat-tab-link
|
||||
|
||||
+13
-46
@@ -24,12 +24,12 @@ $touch-target: 44px;
|
||||
margin: 0;
|
||||
font-size: clamp(1.2rem, 2vw, 1.6rem);
|
||||
font-weight: 650;
|
||||
color: var(--sg-text-primary);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.2rem 0 0;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
@@ -38,8 +38,8 @@ $touch-target: 44px;
|
||||
KEYWORD SUMMARY CARD
|
||||
============================================================ */
|
||||
.summary-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
|
||||
.mat-mdc-card-content {
|
||||
@@ -61,7 +61,7 @@ $touch-target: 44px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.summary-count {
|
||||
@@ -69,7 +69,7 @@ $touch-target: 44px;
|
||||
margin-top: 0.15rem;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 650;
|
||||
color: var(--sg-text-primary);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.mode-badge {
|
||||
@@ -78,8 +78,8 @@ $touch-target: 44px;
|
||||
gap: 0.25rem;
|
||||
border-radius: 999px;
|
||||
padding: 0.25rem 0.5rem;
|
||||
background: var(--sg-background-muted, #f4f5f7);
|
||||
color: var(--sg-text-secondary);
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -105,48 +105,15 @@ $touch-target: 44px;
|
||||
CHILD ROUTE NAV
|
||||
============================================================ */
|
||||
.result-nav {
|
||||
display: flex;
|
||||
gap: 0.25rem;
|
||||
border-bottom: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
}
|
||||
|
||||
.result-nav__link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.5rem 0.85rem;
|
||||
border-radius: 6px 6px 0 0;
|
||||
color: var(--sg-text-secondary);
|
||||
text-decoration: none;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid transparent;
|
||||
transition:
|
||||
color 0.15s ease,
|
||||
border-color 0.15s ease;
|
||||
|
||||
mat-icon {
|
||||
font-size: 18px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--sg-text-primary);
|
||||
}
|
||||
|
||||
&--active {
|
||||
color: var(--sg-text-primary);
|
||||
border-bottom-color: var(--sg-primary, currentColor);
|
||||
}
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
EMPTY STATE
|
||||
============================================================ */
|
||||
.empty-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -158,7 +125,7 @@ $touch-target: 44px;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
text-align: center;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
|
||||
mat-icon {
|
||||
font-size: 48px;
|
||||
@@ -169,7 +136,7 @@ $touch-target: 44px;
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
color: var(--sg-text-primary);
|
||||
color: var(--sg-text);
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -26,7 +26,7 @@
|
||||
|
||||
.filter-prefix-icon {
|
||||
margin-right: 0.25rem;
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.select-search {
|
||||
@@ -34,10 +34,10 @@
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
|
||||
&__icon {
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
&__input {
|
||||
@@ -46,11 +46,12 @@
|
||||
outline: none;
|
||||
font: inherit;
|
||||
background: transparent;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
&__empty {
|
||||
padding: 0.5rem 0.75rem;
|
||||
color: rgba(0, 0, 0, 0.54);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
}
|
||||
@@ -69,10 +70,9 @@
|
||||
}
|
||||
|
||||
.results-card {
|
||||
background: var(--sg-surface, #ffffff);
|
||||
border: 1px solid var(--sg-divider, rgba(0, 0, 0, 0.12));
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: none;
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
@@ -104,21 +104,21 @@ main {
|
||||
}
|
||||
|
||||
&.is-relevant {
|
||||
background: #effaf3;
|
||||
border: 1px solid #bdebcf;
|
||||
color: #24834f;
|
||||
background: var(--sg-success-soft);
|
||||
border: 1px solid var(--sg-success);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
&.not-relevant {
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid #e2e2e2;
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
&.undetermined {
|
||||
background: #fff7e8;
|
||||
border: 1px solid #ffd796;
|
||||
color: #c67500;
|
||||
background: var(--sg-warning-soft);
|
||||
border: 1px solid var(--sg-warning);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,10 +157,10 @@ main {
|
||||
}
|
||||
|
||||
.sidebar-card {
|
||||
border: 1px solid #d7e4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ main {
|
||||
transition: background 0.12s;
|
||||
|
||||
&:hover {
|
||||
background: #f6f9ff;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
@@ -205,8 +205,8 @@ main {
|
||||
.count-badge {
|
||||
padding: 2px 7px;
|
||||
border-radius: 999px;
|
||||
background: #e8effe;
|
||||
color: #3b5bd6;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -264,12 +264,12 @@ main {
|
||||
}
|
||||
|
||||
.person-item.is-link:hover {
|
||||
background: #e5ecfb;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
.person-item.is-muted {
|
||||
.avatar {
|
||||
background: #ececef;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@@ -282,9 +282,9 @@ main {
|
||||
justify-self: end;
|
||||
padding: 3px 9px;
|
||||
border-radius: 999px;
|
||||
background: #effaf3;
|
||||
border: 1px solid #bdebcf;
|
||||
color: #24834f;
|
||||
background: var(--sg-success-soft);
|
||||
border: 1px solid var(--sg-success);
|
||||
color: var(--sg-success);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.03em;
|
||||
@@ -296,7 +296,7 @@ main {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: #e5ecfb;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
@@ -329,7 +329,7 @@ main {
|
||||
place-items: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: 1px solid #d7e4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 8px;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
@@ -337,7 +337,7 @@ main {
|
||||
transition: background 0.12s;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
background: #f0f6ff;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ main {
|
||||
.topic-item {
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
border: 1.5px solid color-mix(in srgb, var(--t) 38%, #ffffff);
|
||||
border: 1.5px solid color-mix(in srgb, var(--t) 38%, var(--sg-color-mix-base));
|
||||
}
|
||||
|
||||
.topic-item-header {
|
||||
@@ -380,8 +380,8 @@ main {
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
padding: 11px 14px;
|
||||
background: color-mix(in srgb, var(--t) 13%, #ffffff);
|
||||
color: color-mix(in srgb, var(--t) 90%, #0f172a);
|
||||
background: color-mix(in srgb, var(--t) 13%, var(--sg-color-mix-base));
|
||||
color: color-mix(in srgb, var(--t) 90%, var(--sg-text));
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
@@ -391,15 +391,15 @@ main {
|
||||
transition: background 0.15s;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--t) 22%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 22%, var(--sg-color-mix-base));
|
||||
}
|
||||
|
||||
&.is-expanded {
|
||||
background: var(--t);
|
||||
color: #ffffff;
|
||||
color: var(--sg-color-mix-base);
|
||||
|
||||
mat-icon {
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
color: color-mix(in srgb, var(--sg-color-mix-base) 85%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ main {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
color: color-mix(in srgb, var(--t) 70%, #0f172a);
|
||||
color: color-mix(in srgb, var(--t) 70%, var(--sg-text));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,11 +423,11 @@ main {
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
padding: 14px 14px 14px;
|
||||
background: #ffffff;
|
||||
background: var(--sg-card-bg);
|
||||
|
||||
.analyse-btn {
|
||||
position: absolute;
|
||||
color: color-mix(in srgb, var(--t) 90%, #0f172a);
|
||||
color: color-mix(in srgb, var(--t) 90%, var(--sg-text));
|
||||
font-size: 18px;
|
||||
top: 0.1em;
|
||||
right: 0.1em;
|
||||
@@ -447,16 +447,16 @@ main {
|
||||
width: 100%;
|
||||
padding: 6px 14px;
|
||||
border-radius: 999px;
|
||||
border: 1.5px solid color-mix(in srgb, var(--t) 50%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 10%, #ffffff);
|
||||
color: color-mix(in srgb, var(--t) 90%, #0f172a);
|
||||
border: 1.5px solid color-mix(in srgb, var(--t) 50%, var(--sg-color-mix-base));
|
||||
background: color-mix(in srgb, var(--t) 10%, var(--sg-color-mix-base));
|
||||
color: color-mix(in srgb, var(--t) 90%, var(--sg-text));
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background 0.12s;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--t) 22%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 22%, var(--sg-color-mix-base));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,43 +522,79 @@ main {
|
||||
}
|
||||
|
||||
.purple {
|
||||
--topic-border: #d8cafe;
|
||||
--topic-bg: #f6f0ff;
|
||||
--topic-color: #7255d9;
|
||||
--topic-border: color-mix(
|
||||
in srgb,
|
||||
var(--sg-primary) 72%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-bg: color-mix(
|
||||
in srgb,
|
||||
var(--sg-primary) 8%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.blue {
|
||||
--topic-border: #bdd4ff;
|
||||
--topic-bg: #f0f6ff;
|
||||
--topic-color: #0b63ce;
|
||||
--topic-border: color-mix(
|
||||
in srgb,
|
||||
var(--sg-blue-highlight) 72%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-bg: color-mix(
|
||||
in srgb,
|
||||
var(--sg-blue-highlight) 8%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
.green {
|
||||
--topic-border: #bdebcf;
|
||||
--topic-bg: #effaf3;
|
||||
--topic-color: #24834f;
|
||||
--topic-border: color-mix(
|
||||
in srgb,
|
||||
var(--sg-success) 72%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-bg: color-mix(
|
||||
in srgb,
|
||||
var(--sg-success) 8%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-color: var(--sg-success);
|
||||
}
|
||||
|
||||
.orange {
|
||||
--topic-border: #ffd796;
|
||||
--topic-bg: #fff7e8;
|
||||
--topic-color: #c67500;
|
||||
--topic-border: color-mix(
|
||||
in srgb,
|
||||
var(--sg-warning) 72%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-bg: color-mix(
|
||||
in srgb,
|
||||
var(--sg-warning) 8%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-color: var(--sg-warning);
|
||||
}
|
||||
|
||||
.pink {
|
||||
--topic-border: #ffc7d7;
|
||||
--topic-bg: #fff1f5;
|
||||
--topic-color: #d12f61;
|
||||
--topic-border: color-mix(
|
||||
in srgb,
|
||||
var(--sg-error) 72%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
--topic-bg: color-mix(in srgb, var(--sg-error) 8%, var(--sg-color-mix-base));
|
||||
--topic-color: var(--sg-error);
|
||||
}
|
||||
|
||||
// ── Keyword highlights in article text ───────────────────────────────────────
|
||||
|
||||
@keyframes kw-flash {
|
||||
0% {
|
||||
background: color-mix(in srgb, var(--t) 45%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base));
|
||||
}
|
||||
40% {
|
||||
background: color-mix(in srgb, var(--t) 45%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base));
|
||||
}
|
||||
100% {
|
||||
background: transparent;
|
||||
@@ -579,7 +615,7 @@ main {
|
||||
transition: background 0.15s;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--t) 15%, #ffffff);
|
||||
background: color-mix(in srgb, var(--t) 15%, var(--sg-color-mix-base));
|
||||
}
|
||||
|
||||
&.kw-flash {
|
||||
|
||||
@@ -201,11 +201,11 @@ export class NewsDetailComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
const orphanColors = [
|
||||
'#7255d9',
|
||||
'#0b63ce',
|
||||
'#24834f',
|
||||
'#c67500',
|
||||
'#d12f61',
|
||||
'var(--sg-primary)',
|
||||
'var(--sg-blue-highlight)',
|
||||
'var(--sg-success)',
|
||||
'var(--sg-warning)',
|
||||
'var(--sg-error)',
|
||||
];
|
||||
let orphanIdx = 0;
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
|
||||
::ng-deep .snippet em {
|
||||
font-style: normal;
|
||||
background: #fff48d;
|
||||
background: var(--sg-warning-soft);
|
||||
color: var(--sg-warning);
|
||||
padding: 0 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
@@ -93,10 +94,10 @@
|
||||
min-width: 132px;
|
||||
height: 42px;
|
||||
padding: 0 14px;
|
||||
border-color: #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
|
||||
mat-icon {
|
||||
margin-right: 6px;
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
h1,
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.page-header p,
|
||||
.table-header span {
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.page-header p {
|
||||
@@ -32,15 +33,15 @@ p {
|
||||
min-height: 24px;
|
||||
border-radius: 999px;
|
||||
padding: 2px 10px;
|
||||
background: #dcfce7;
|
||||
color: #166534;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.status--deleted {
|
||||
background: #fee2e2;
|
||||
color: #991b1b;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
padding: 38px 42px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-lg);
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 90% 10%,
|
||||
rgba(200, 217, 255, 0.75),
|
||||
transparent 35%
|
||||
),
|
||||
linear-gradient(140deg, #fff 0%, #f8faff 100%);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
@@ -59,7 +53,7 @@
|
||||
padding: 5px 10px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
@@ -71,6 +65,7 @@ h1 {
|
||||
margin: 20px 0 13px;
|
||||
font-size: clamp(27px, 3vw, 42px);
|
||||
line-height: 1.13;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.meta-line {
|
||||
@@ -93,7 +88,7 @@ h1 {
|
||||
padding: 9px 16px;
|
||||
border: 1px solid var(--sg-border-strong);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
@@ -102,7 +97,7 @@ h1 {
|
||||
.hero-actions a.primary-action {
|
||||
border-color: var(--sg-primary);
|
||||
background: var(--sg-primary);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
}
|
||||
|
||||
.hero-actions mat-icon {
|
||||
@@ -116,9 +111,9 @@ h1 {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
align-self: center;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(199, 211, 232, 0.8);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-md);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.metrics div {
|
||||
@@ -185,6 +180,7 @@ aside {
|
||||
.section-title h2 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.section-title span {
|
||||
@@ -313,13 +309,13 @@ dd {
|
||||
}
|
||||
|
||||
.source-badge--epo {
|
||||
background: #e8f7ee;
|
||||
color: #1f7a43;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.source-badge--uspto {
|
||||
background: #eef3ff;
|
||||
color: #1f4fbf;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
.classification-cards {
|
||||
@@ -335,11 +331,11 @@ dd {
|
||||
}
|
||||
|
||||
.classification-card-section--ipc .classification-card {
|
||||
background: #f4f8ff;
|
||||
background: var(--sg-primary-soft);
|
||||
}
|
||||
|
||||
.classification-card-section--cpc .classification-card {
|
||||
background: #f3fbf5;
|
||||
background: var(--sg-success-soft);
|
||||
}
|
||||
|
||||
.classification-card__header {
|
||||
@@ -359,7 +355,7 @@ dd {
|
||||
.classification-code {
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
@@ -380,12 +376,12 @@ dd {
|
||||
}
|
||||
|
||||
.classification-badge--system {
|
||||
background: #e8eef8;
|
||||
color: #35507a;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
.classification-badge--level {
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
@@ -415,7 +411,7 @@ dd {
|
||||
grid-template-columns: 90px minmax(0, 1fr);
|
||||
gap: 10px;
|
||||
padding: 6px 0;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-hierarchy__row dt {
|
||||
|
||||
@@ -10,6 +10,7 @@ h1 {
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
padding: 1rem 0 0;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.search-and-filter {
|
||||
@@ -34,9 +35,9 @@ h1 {
|
||||
.year-filter {
|
||||
width: min(285px, 100%);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #dbe5f6;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 10px;
|
||||
background: #fbfdff;
|
||||
background: var(--sg-surface-muted);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -49,7 +50,7 @@ h1 {
|
||||
}
|
||||
|
||||
.year-filter-label {
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -57,20 +58,20 @@ h1 {
|
||||
.reset-range-button {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #0057ff;
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
font-family: inherit;
|
||||
|
||||
&:disabled {
|
||||
color: #9aa5bc;
|
||||
color: var(--sg-text-soft);
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.year-filter-values {
|
||||
color: #40506f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
@@ -80,14 +81,14 @@ h1 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 0;
|
||||
color: #7c88a3;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.year-range-slider {
|
||||
--range-start: 0%;
|
||||
--range-end: 100%;
|
||||
--accent: #0057ff;
|
||||
--accent: var(--sg-blue-highlight);
|
||||
|
||||
position: relative;
|
||||
height: 16px;
|
||||
@@ -103,12 +104,12 @@ h1 {
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
#d8e2f4 0%,
|
||||
#d8e2f4 var(--range-start),
|
||||
var(--sg-border) 0%,
|
||||
var(--sg-border) var(--range-start),
|
||||
var(--accent) var(--range-start),
|
||||
var(--accent) var(--range-end),
|
||||
#d8e2f4 var(--range-end),
|
||||
#d8e2f4 100%
|
||||
var(--sg-border) var(--range-end),
|
||||
var(--sg-border) 100%
|
||||
);
|
||||
}
|
||||
|
||||
@@ -134,12 +135,10 @@ h1 {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-top: -5px;
|
||||
border: 2px solid #ffffff;
|
||||
border: 2px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: #0057ff;
|
||||
box-shadow:
|
||||
0 0 0 1px #9ab7ff,
|
||||
0 2px 6px rgba(0, 87, 255, 0.22);
|
||||
background: var(--sg-blue-highlight);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -147,12 +146,10 @@ h1 {
|
||||
&::-moz-range-thumb {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 2px solid #ffffff;
|
||||
border: 2px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: #0057ff;
|
||||
box-shadow:
|
||||
0 0 0 1px #9ab7ff,
|
||||
0 2px 6px rgba(0, 87, 255, 0.22);
|
||||
background: var(--sg-blue-highlight);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -170,11 +167,11 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 24px 1rem;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
|
||||
&.error {
|
||||
color: #c0392b;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +200,8 @@ mat-paginator {
|
||||
|
||||
.card {
|
||||
padding: 0.5rem;
|
||||
background-color: var(--sg-background);
|
||||
background-color: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
transition: transform 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -211,13 +209,14 @@ mat-paginator {
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
transform: scale(1.05);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
mat-card-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +233,7 @@ mat-paginator {
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
font-size: 0.9rem;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
mat-card-actions {
|
||||
@@ -258,21 +257,21 @@ mat-card-actions {
|
||||
font-weight: 700;
|
||||
|
||||
&--epo {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border: 1px solid #bdebcf;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
border: 1px solid var(--sg-success);
|
||||
}
|
||||
&--uspto {
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
border: 1px solid #bdd4ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
.no-results {
|
||||
text-align: center;
|
||||
padding: 2rem;
|
||||
color: var(--sg-text-secondary);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.detail-view {
|
||||
@@ -281,18 +280,18 @@ mat-card-actions {
|
||||
h2 {
|
||||
margin: 0 0 1rem;
|
||||
font-size: 1.4rem;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
h4 {
|
||||
margin: 16px 0 8px;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
p {
|
||||
font-size: 13px;
|
||||
color: #444;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -304,25 +303,25 @@ mat-card-actions {
|
||||
gap: 0.4rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.85rem;
|
||||
border: 1px solid #d6e3f8;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
background: #f8fbff;
|
||||
color: #2563eb;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #eef5ff;
|
||||
border-color: #bcd3f7;
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
|
||||
.patent-meta__list {
|
||||
margin: 12px 0 20px;
|
||||
border: 1px solid #e2e8f4;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
|
||||
background: var(--sg-surface);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -332,7 +331,7 @@ mat-card-actions {
|
||||
gap: 12px 16px;
|
||||
align-items: center;
|
||||
padding: 11px 16px;
|
||||
border-top: 1px solid #eef2f8;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
|
||||
&:first-child {
|
||||
border-top: 0;
|
||||
@@ -342,13 +341,13 @@ mat-card-actions {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
dd {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
color: var(--sg-text);
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
@@ -356,7 +355,7 @@ mat-card-actions {
|
||||
.detail-section {
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #eee;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.tag-list {
|
||||
@@ -376,28 +375,28 @@ mat-card-actions {
|
||||
.tag {
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
background: var(--sg-primary-soft);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.classification-section {
|
||||
&--ipc .classification-card {
|
||||
background: #f0f6ff;
|
||||
border-color: #bfdbfe;
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-border);
|
||||
}
|
||||
&--ipc .classification-badge--system {
|
||||
background: #dbeafe;
|
||||
color: #1d4ed8;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
&--cpc .classification-card {
|
||||
background: #f0fdf4;
|
||||
border-color: #bbf7d0;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
}
|
||||
&--cpc .classification-badge--system {
|
||||
background: #dcfce7;
|
||||
color: #15803d;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +409,7 @@ mat-card-actions {
|
||||
.classification-card {
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #dbeafe;
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-card__header {
|
||||
@@ -434,7 +433,7 @@ mat-card-actions {
|
||||
.classification-code {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.classification-badge {
|
||||
@@ -448,14 +447,14 @@ mat-card-actions {
|
||||
}
|
||||
|
||||
.classification-badge--level {
|
||||
background: #e2e8f0;
|
||||
color: #475569;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
.classification-summary {
|
||||
margin: 10px 0 0;
|
||||
font-size: 0.84rem;
|
||||
line-height: 1.5;
|
||||
color: #334155;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.classification-toggle {
|
||||
@@ -463,7 +462,7 @@ mat-card-actions {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: #2563eb;
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.78rem;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
@@ -474,7 +473,7 @@ mat-card-actions {
|
||||
.classification-hierarchy {
|
||||
margin: 10px 0 0;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-hierarchy__row {
|
||||
@@ -487,13 +486,13 @@ mat-card-actions {
|
||||
margin: 0;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
dd {
|
||||
margin: 0;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.45;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
background: var(--sg-primary);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
border-color: var(--sg-primary);
|
||||
outline: none;
|
||||
box-shadow:
|
||||
@@ -223,14 +223,14 @@
|
||||
&.active {
|
||||
border-color: var(--sg-primary);
|
||||
box-shadow:
|
||||
0 0 0 1px #ffffff,
|
||||
0 0 0 1px var(--sg-background),
|
||||
0 0 0 3px var(--sg-primary);
|
||||
}
|
||||
|
||||
&.active:hover,
|
||||
&.active:focus-visible {
|
||||
background: var(--sg-primary);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
}
|
||||
|
||||
&.is-loading {
|
||||
|
||||
+27
-26
@@ -1,15 +1,15 @@
|
||||
$marked-color: #5470c6;
|
||||
$related-person-color: #4f8df5;
|
||||
$timeline-purple: #7255d9;
|
||||
$timeline-purple-bg: #f6f0ff;
|
||||
$marked-color: var(--sg-blue-highlight);
|
||||
$related-person-color: var(--sg-primary);
|
||||
$timeline-purple: var(--sg-warning);
|
||||
$timeline-purple-bg: var(--sg-warning-soft);
|
||||
|
||||
$timeline-orange-bg: #fff7e8;
|
||||
$timeline-orange-border: #ffd796;
|
||||
$timeline-orange-text: #c67500;
|
||||
$timeline-orange-bg: var(--sg-warning-soft);
|
||||
$timeline-orange-border: var(--sg-warning);
|
||||
$timeline-orange-text: var(--sg-warning);
|
||||
|
||||
$card-border: #dbe5f6;
|
||||
$text-main: #07163d;
|
||||
$text-muted: #64718f;
|
||||
$card-border: var(--sg-border);
|
||||
$text-main: var(--sg-text);
|
||||
$text-muted: var(--sg-text-muted);
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
@@ -50,7 +50,7 @@ $text-muted: #64718f;
|
||||
}
|
||||
|
||||
.state-error {
|
||||
color: #b42318;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
@@ -58,8 +58,8 @@ $text-muted: #64718f;
|
||||
padding: 18px 22px;
|
||||
border: 1px solid $card-border;
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
|
||||
h2 {
|
||||
margin: 0 0 6px;
|
||||
@@ -106,8 +106,9 @@ $text-muted: #64718f;
|
||||
.graph-card,
|
||||
.connection-list {
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -141,7 +142,7 @@ $text-muted: #64718f;
|
||||
}
|
||||
|
||||
.graph-related-persons-button:hover {
|
||||
background: rgba(84, 112, 198, 0.08);
|
||||
background: var(--sg-primary-soft);
|
||||
}
|
||||
|
||||
.graph-related-persons-icon {
|
||||
@@ -248,7 +249,7 @@ $text-muted: #64718f;
|
||||
flex: 0 0 auto;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid $card-border;
|
||||
background: #fbfdff;
|
||||
background: var(--sg-surface-muted);
|
||||
color: $text-muted;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
@@ -271,7 +272,7 @@ $text-muted: #64718f;
|
||||
}
|
||||
|
||||
.connection-item {
|
||||
border-bottom: 1px solid #edf2fb;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.connection-row {
|
||||
@@ -281,11 +282,11 @@ $text-muted: #64718f;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: #f8fbff;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #f0f6ff;
|
||||
background: var(--sg-primary-soft);
|
||||
box-shadow: inset 3px 0 0 $marked-color;
|
||||
}
|
||||
|
||||
@@ -320,7 +321,7 @@ $text-muted: #64718f;
|
||||
|
||||
.connection-detail {
|
||||
padding: 0 16px 16px;
|
||||
background: #f8fbff;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
.detail-grid {
|
||||
@@ -328,7 +329,7 @@ $text-muted: #64718f;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px 18px;
|
||||
padding: 14px 0 4px;
|
||||
border-top: 1px solid #e5edf8;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.detail-field {
|
||||
@@ -375,11 +376,11 @@ $text-muted: #64718f;
|
||||
}
|
||||
|
||||
.detail-value.detail-status--active {
|
||||
color: #218354;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.detail-value.detail-status--removed {
|
||||
color: #6b7280;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.officers-toggle {
|
||||
@@ -390,7 +391,7 @@ $text-muted: #64718f;
|
||||
margin-top: 14px;
|
||||
padding: 12px 0 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #e5edf8;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
background: transparent;
|
||||
color: $text-muted;
|
||||
font-size: 11px;
|
||||
@@ -429,7 +430,7 @@ $text-muted: #64718f;
|
||||
|
||||
.officer-role {
|
||||
padding-left: 10px;
|
||||
border-left: 4px solid #8a95b3;
|
||||
border-left: 4px solid var(--sg-border-strong);
|
||||
color: $text-main;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
+4
-4
@@ -372,7 +372,7 @@ export class PersonCompanyConnectionsComponent implements OnInit {
|
||||
show: true,
|
||||
position: 'bottom',
|
||||
fontWeight: 700,
|
||||
color: '#07163d',
|
||||
color: 'var(--sg-text)',
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -400,7 +400,7 @@ export class PersonCompanyConnectionsComponent implements OnInit {
|
||||
label: {
|
||||
show: true,
|
||||
position: 'bottom',
|
||||
color: '#07163d',
|
||||
color: 'var(--sg-text)',
|
||||
width: 125,
|
||||
overflow: 'truncate',
|
||||
},
|
||||
@@ -443,7 +443,7 @@ export class PersonCompanyConnectionsComponent implements OnInit {
|
||||
label: {
|
||||
show: true,
|
||||
position: 'bottom',
|
||||
color: '#07163d',
|
||||
color: 'var(--sg-text)',
|
||||
width: 110,
|
||||
overflow: 'truncate',
|
||||
fontSize: 11,
|
||||
@@ -506,7 +506,7 @@ export class PersonCompanyConnectionsComponent implements OnInit {
|
||||
itemHeight: 20,
|
||||
selectedMode: false,
|
||||
textStyle: {
|
||||
color: '#3f4659',
|
||||
color: 'var(--sg-text-muted)',
|
||||
fontSize: 13,
|
||||
fontWeight: 500,
|
||||
},
|
||||
|
||||
@@ -1,306 +1,13 @@
|
||||
@if (loading) {
|
||||
<p class="message">Lade Förderungen...</p>
|
||||
<app-loading
|
||||
text="Förderdaten werden geladen..."
|
||||
icon="volunteer_activism"
|
||||
[size]="150"
|
||||
[diameter]="150" />
|
||||
} @else if (error) {
|
||||
<p class="message">Fehler beim Laden der Förderungen.</p>
|
||||
} @else if (funders.length === 0) {
|
||||
<p class="message">Keine Förderungen gefunden.</p>
|
||||
} @else if (selectedPublicationDetailId) {
|
||||
@if (getSelectedPublicationDetail(); as publication) {
|
||||
<div class="funding-publication-page">
|
||||
<button
|
||||
type="button"
|
||||
class="publication-detail-back"
|
||||
(click)="closePublicationDetail()">
|
||||
<span class="material-icons">arrow_back</span>
|
||||
Zurück zu den Förderungen
|
||||
</button>
|
||||
|
||||
<section class="publication-detail-hero">
|
||||
<div class="publication-detail-hero__content">
|
||||
<div class="publication-detail-hero__meta">
|
||||
@if (publication.publication_year) {
|
||||
<span>{{ publication.publication_year }}</span>
|
||||
}
|
||||
@if (hasTextValue(getPublicationTypeLabel(publication))) {
|
||||
<span>{{ getPublicationTypeLabel(publication) }}</span>
|
||||
}
|
||||
@if (hasTextValue(getLanguageLabel(publication))) {
|
||||
<span>{{ getLanguageLabel(publication) }}</span>
|
||||
}
|
||||
</div>
|
||||
<h2>{{ publication.title }}</h2>
|
||||
@if (hasPublicationSource(publication)) {
|
||||
<p class="publication-detail-hero__source">
|
||||
{{ getPublicationSourceLabel(publication) }}
|
||||
</p>
|
||||
}
|
||||
<p class="publication-detail-hero__authors">
|
||||
{{ getPublicationAuthors(publication) }}
|
||||
</p>
|
||||
<div class="publication-detail-hero__highlights">
|
||||
@if (typeof publication.cited_by_count === 'number') {
|
||||
<span class="hero-highlight">
|
||||
<span class="hero-highlight__value">{{
|
||||
publication.cited_by_count
|
||||
}}</span>
|
||||
<span class="hero-highlight__label">Zitationen</span>
|
||||
</span>
|
||||
}
|
||||
<span
|
||||
class="hero-highlight hero-highlight--badge"
|
||||
[class.hero-highlight--open]="
|
||||
getOpenAccessBadge(publication).tone === 'open'
|
||||
"
|
||||
[class.hero-highlight--closed]="
|
||||
getOpenAccessBadge(publication).tone === 'closed'
|
||||
">
|
||||
{{ getOpenAccessBadge(publication).label }}
|
||||
</span>
|
||||
<span
|
||||
class="position-badge"
|
||||
[ngClass]="getPositionBadgeClass(publication.author_position)">
|
||||
{{ getPositionLabel(publication.author_position || 'unknown') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@if (getPublicationExternalUrl(publication); as externalUrl) {
|
||||
<a
|
||||
class="publication-detail-hero__action"
|
||||
[href]="externalUrl"
|
||||
target="_blank"
|
||||
rel="noopener">
|
||||
Zur Publikation
|
||||
<span class="material-icons">open_in_new</span>
|
||||
</a>
|
||||
}
|
||||
</section>
|
||||
|
||||
<div class="publication-detail-grid">
|
||||
<div class="publication-detail-main">
|
||||
<section class="publication-detail-section">
|
||||
<h3>Überblick</h3>
|
||||
<p
|
||||
class="publication-overview"
|
||||
[innerHTML]="getPublicationOverview(publication)"></p>
|
||||
</section>
|
||||
|
||||
<section class="publication-detail-section">
|
||||
<h3>Abstract</h3>
|
||||
<p class="publication-abstract">
|
||||
{{ publication.abstract || 'Kein Abstract vorhanden.' }}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@if (publication.publication_date) {
|
||||
<section class="publication-detail-section">
|
||||
<h3>Publikationsdaten</h3>
|
||||
<dl class="publication-detail-facts">
|
||||
<div>
|
||||
<dt>Datum</dt>
|
||||
<dd>{{ getPublicationDateLabel(publication) }}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (
|
||||
hasTextValue(publication.primary_topic) ||
|
||||
hasTextValue(publication.topic_field) ||
|
||||
hasTextValue(publication.topic_subfield) ||
|
||||
hasTextValue(publication.topic_domain) ||
|
||||
hasListValues(publication.topics) ||
|
||||
hasListValues(publication.keywords)
|
||||
) {
|
||||
<section class="publication-detail-section">
|
||||
<h3>Einordnung</h3>
|
||||
<dl class="publication-detail-facts">
|
||||
@if (hasTextValue(publication.primary_topic)) {
|
||||
<div>
|
||||
<dt>Hauptthema</dt>
|
||||
<dd>{{ publication.primary_topic }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasTextValue(publication.topic_field)) {
|
||||
<div>
|
||||
<dt>Fachgebiet</dt>
|
||||
<dd>{{ publication.topic_field }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasTextValue(publication.topic_subfield)) {
|
||||
<div>
|
||||
<dt>Teilgebiet</dt>
|
||||
<dd>{{ publication.topic_subfield }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasTextValue(publication.topic_domain)) {
|
||||
<div>
|
||||
<dt>Bereich</dt>
|
||||
<dd>{{ publication.topic_domain }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasListValues(publication.topics)) {
|
||||
<div>
|
||||
<dt>Themen</dt>
|
||||
<dd>
|
||||
<ul class="tag-list">
|
||||
@for (topic of publication.topics; track topic) {
|
||||
<li class="tag">{{ topic }}</li>
|
||||
}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasListValues(publication.keywords)) {
|
||||
<div>
|
||||
<dt>Keywords</dt>
|
||||
<dd>
|
||||
<ul class="tag-list">
|
||||
@for (keyword of publication.keywords; track keyword) {
|
||||
<li class="tag">{{ keyword }}</li>
|
||||
}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (
|
||||
getCitationCountsByYear(publication).length ||
|
||||
publication.is_retracted
|
||||
) {
|
||||
<section class="publication-detail-section">
|
||||
<h3>Wirkung</h3>
|
||||
<dl class="publication-detail-facts">
|
||||
@if (getCitationCountsByYear(publication); as citationYears) {
|
||||
@if (citationYears.length) {
|
||||
<div>
|
||||
<dt>Zitiert pro Jahr</dt>
|
||||
<dd>
|
||||
<table class="citation-year-table">
|
||||
<tbody>
|
||||
@for (entry of citationYears; track entry.year) {
|
||||
<tr>
|
||||
<th scope="row">{{ entry.year }}</th>
|
||||
<td>{{ entry.count }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@if (publication.is_retracted) {
|
||||
<div>
|
||||
<dt>Zurückgezogen</dt>
|
||||
<dd>
|
||||
<span class="warning-badge">Ja, zurückgezogen</span>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</section>
|
||||
}
|
||||
|
||||
<section class="publication-detail-section">
|
||||
<h3>Zugang</h3>
|
||||
<dl class="publication-detail-facts">
|
||||
<div>
|
||||
<dt>Open Access</dt>
|
||||
<dd>
|
||||
<span
|
||||
class="access-badge"
|
||||
[class.access-badge--open]="
|
||||
getOpenAccessBadge(publication).tone === 'open'
|
||||
"
|
||||
[class.access-badge--closed]="
|
||||
getOpenAccessBadge(publication).tone === 'closed'
|
||||
">
|
||||
{{ getOpenAccessBadge(publication).label }}
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Volltext</dt>
|
||||
<dd class="access-actions">
|
||||
<span>{{ getFulltextLabel(publication) }}</span>
|
||||
@if (publication.pdf_url) {
|
||||
<a
|
||||
class="inline-action"
|
||||
[href]="publication.pdf_url"
|
||||
target="_blank"
|
||||
rel="noopener">
|
||||
PDF öffnen
|
||||
<span class="material-icons">open_in_new</span>
|
||||
</a>
|
||||
}
|
||||
</dd>
|
||||
</div>
|
||||
@if (hasTextValue(getLicenseLabel(publication))) {
|
||||
<div>
|
||||
<dt>Lizenz</dt>
|
||||
<dd>{{ getLicenseLabel(publication) }}</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<aside class="publication-detail-side">
|
||||
<section
|
||||
class="publication-detail-section publication-detail-section--funding">
|
||||
<h3>Förderbezug</h3>
|
||||
<dl class="publication-detail-facts">
|
||||
<div>
|
||||
<dt>Förderer</dt>
|
||||
<dd>{{ getPublicationFunderLabel(publication) }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>Position</dt>
|
||||
<dd>
|
||||
<span
|
||||
class="position-badge"
|
||||
[ngClass]="
|
||||
getPositionBadgeClass(publication.author_position)
|
||||
">
|
||||
{{
|
||||
getPositionLabel(publication.author_position || 'unknown')
|
||||
}}
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
@if (publication.grant_labels?.length) {
|
||||
<div>
|
||||
<dt>Grant</dt>
|
||||
<dd>{{ getGrantLabel(publication) }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasListValues(publication.institutions)) {
|
||||
<div>
|
||||
<dt>Institutionen</dt>
|
||||
<dd>{{ getListLabel(publication.institutions) }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (hasListValues(publication.countries)) {
|
||||
<div>
|
||||
<dt>Länder</dt>
|
||||
<dd>
|
||||
<ul class="tag-list tag-list--compact">
|
||||
@for (country of publication.countries; track country) {
|
||||
<li class="tag">{{ country }}</li>
|
||||
}
|
||||
</ul>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</section>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
} @else {
|
||||
<div class="funding-container">
|
||||
<div class="funding-content">
|
||||
@@ -338,7 +45,10 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Förderer</th>
|
||||
<th>Publikationen</th>
|
||||
<th class="text-center">Publikationen</th>
|
||||
<th class="text-center">Erstautor</th>
|
||||
<th class="text-center">Mitautor</th>
|
||||
<th class="text-center">Letztautor</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -347,29 +57,35 @@
|
||||
[class.selected]="selectedFunder === funder"
|
||||
(click)="selectFunder(funder)">
|
||||
<td class="funder-name">{{ funder.funder_name }}</td>
|
||||
<td>{{ getPublicationCount(funder) }}</td>
|
||||
<td class="text-center">{{ getPublicationCount(funder) }}</td>
|
||||
<td class="text-center">
|
||||
<span
|
||||
class="position-count-badge position-count-badge--first"
|
||||
>{{ funder.author_position_count.first || 0 }}</span
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span
|
||||
class="position-count-badge position-count-badge--middle"
|
||||
>{{ funder.author_position_count.middle || 0 }}</span
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span
|
||||
class="position-count-badge position-count-badge--last"
|
||||
>{{ funder.author_position_count.last || 0 }}</span
|
||||
>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@if (hasFunderListPagination()) {
|
||||
<div class="publication-pagination">
|
||||
<button
|
||||
[disabled]="selectedFunderListPage === 1"
|
||||
(click)="setFunderListPage(selectedFunderListPage - 1)">
|
||||
Zurück
|
||||
</button>
|
||||
<span
|
||||
>Seite {{ selectedFunderListPage }} von
|
||||
{{ getFunderListPageCount() }}</span
|
||||
>
|
||||
<button
|
||||
[disabled]="selectedFunderListPage === getFunderListPageCount()"
|
||||
(click)="setFunderListPage(selectedFunderListPage + 1)">
|
||||
Weiter
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
<app-query-param-paginator
|
||||
[total]="filteredFunders.length"
|
||||
queryParamPageKey="funderPage"
|
||||
queryParamSizeKey="funderSize"
|
||||
[pageSizeOptions]="[10, 25, 50]"
|
||||
(handlePageChange)="onFunderPageChange($event)" />
|
||||
</div>
|
||||
|
||||
<!-- Rechte Seite: Details -->
|
||||
@@ -408,44 +124,31 @@
|
||||
<ul class="publication-list">
|
||||
@for (id of getSelectedPublicationIdsPage(); track id) {
|
||||
<li class="publication-item" (click)="togglePublication(id)">
|
||||
<span class="publication-title">{{
|
||||
getPublicationTitle(id)
|
||||
}}</span>
|
||||
@if (expandedPublicationId === id) {
|
||||
<button
|
||||
type="button"
|
||||
class="publication-more-info"
|
||||
title="Publikationsdetails öffnen"
|
||||
(click)="openPublicationDetail($event, id)">
|
||||
<span class="mehr-infos-label">Mehr Infos</span>
|
||||
<span class="publication-link-icon">
|
||||
<span class="publication-title">
|
||||
{{ getPublicationTitle(id) }}
|
||||
@if (expandedPublicationId === id) {
|
||||
<a
|
||||
class="publication-more-info"
|
||||
title="Publikationsdetails öffnen"
|
||||
[routerLink]="['/publication', getShortPublicationId(id)]"
|
||||
[state]="{
|
||||
returnUrl: getCurrentUrl(),
|
||||
returnLabel: 'Förderungen',
|
||||
}"
|
||||
(click)="$event.stopPropagation()">
|
||||
<span class="material-icons">open_in_new</span>
|
||||
</span>
|
||||
</button>
|
||||
}
|
||||
</a>
|
||||
}
|
||||
</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@if (hasPublicationPagination()) {
|
||||
<div class="publication-pagination">
|
||||
<button
|
||||
[disabled]="selectedPublicationPage === 1"
|
||||
(click)="setPublicationPage(selectedPublicationPage - 1)">
|
||||
Zurück
|
||||
</button>
|
||||
<span
|
||||
>Seite {{ selectedPublicationPage }} von
|
||||
{{ getSelectedPublicationPageCount() }}</span
|
||||
>
|
||||
<button
|
||||
[disabled]="
|
||||
selectedPublicationPage === getSelectedPublicationPageCount()
|
||||
"
|
||||
(click)="setPublicationPage(selectedPublicationPage + 1)">
|
||||
Weiter
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
<app-query-param-paginator
|
||||
[total]="getSelectedPublicationTotal()"
|
||||
queryParamPageKey="pubPage"
|
||||
queryParamSizeKey="pubSize"
|
||||
[pageSizeOptions]="[10, 25, 50]"
|
||||
(handlePageChange)="onPublicationPageChange($event)" />
|
||||
</div>
|
||||
} @else {
|
||||
<div class="funding-detail empty">
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
.message {
|
||||
padding: 16px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
app-query-param-paginator {
|
||||
display: block;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.funding-container {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
@@ -35,52 +39,108 @@
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
overflow: hidden;
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
padding: 12px 16px;
|
||||
background: var(--sg-surface-muted);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
&.selected {
|
||||
background: #f0f0f0;
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:hover td {
|
||||
background: rgba(16, 26, 61, 0.04);
|
||||
}
|
||||
|
||||
&.selected td {
|
||||
background: var(--sg-primary-soft);
|
||||
}
|
||||
|
||||
&:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.funder-name {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
color: var(--sg-text);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.position-count-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 26px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
|
||||
&--first {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
}
|
||||
|
||||
&--middle {
|
||||
background: #f6f0ff;
|
||||
color: #7255d9;
|
||||
}
|
||||
|
||||
&--last {
|
||||
background: #fff1f2;
|
||||
color: #be123c;
|
||||
}
|
||||
}
|
||||
|
||||
.funding-detail {
|
||||
width: 440px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
background: #fafafa;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 24px;
|
||||
background: var(--sg-surface);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
|
||||
h3 {
|
||||
margin: 0 0 16px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 16px 0 8px;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
margin: 20px 0 10px;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,15 +153,15 @@
|
||||
.stat {
|
||||
min-width: 100px;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 10px;
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
@@ -109,59 +169,57 @@
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
&.stat-first {
|
||||
background: #effaf3;
|
||||
border-color: #bdebcf;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
|
||||
.stat-label,
|
||||
.stat-value {
|
||||
color: #24834f;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
&.stat-middle {
|
||||
background: #f6f0ff;
|
||||
border-color: #d8cafe;
|
||||
background: var(--sg-warning-soft);
|
||||
border-color: var(--sg-warning);
|
||||
|
||||
.stat-label,
|
||||
.stat-value {
|
||||
color: #7255d9;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
&.stat-last {
|
||||
background: #fff1f2;
|
||||
border-color: #fda4af;
|
||||
background: var(--sg-error-soft);
|
||||
border-color: var(--sg-error);
|
||||
|
||||
.stat-label,
|
||||
.stat-value {
|
||||
color: #be123c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.position-badge--first,
|
||||
.hero-highlight--open,
|
||||
.publication-detail-grid .access-badge--open {
|
||||
background: #effaf3;
|
||||
border-color: #bdebcf;
|
||||
color: #24834f;
|
||||
.position-badge--first {
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.position-badge--middle {
|
||||
background: #f6f0ff;
|
||||
border-color: #d8cafe;
|
||||
color: #7255d9;
|
||||
background: var(--sg-warning-soft);
|
||||
border-color: var(--sg-warning);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
.position-badge--last {
|
||||
background: #fff1f2;
|
||||
border-color: #fda4af;
|
||||
color: #be123c;
|
||||
background: var(--sg-error-soft);
|
||||
border-color: var(--sg-error);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.position-badge--first,
|
||||
@@ -175,12 +233,12 @@
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
max-height: 300px;
|
||||
max-height: 320px;
|
||||
overflow-y: auto;
|
||||
|
||||
li {
|
||||
padding: 6px 0;
|
||||
border-bottom: 1px solid #5b5555;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
@@ -194,9 +252,9 @@
|
||||
|
||||
button {
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -208,8 +266,11 @@
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
}
|
||||
|
||||
.empty-overview {
|
||||
@@ -219,30 +280,30 @@
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
padding: 4px 12px;
|
||||
border: 1px solid #dbe3f2;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: #475569;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
|
||||
&.position-badge--first {
|
||||
background: #effaf3;
|
||||
border-color: #bdebcf;
|
||||
color: #24834f;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
&.position-badge--middle {
|
||||
background: #f6f0ff;
|
||||
border-color: #d8cafe;
|
||||
color: #7255d9;
|
||||
background: var(--sg-warning-soft);
|
||||
border-color: var(--sg-warning);
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
&.position-badge--last {
|
||||
background: #fff1f2;
|
||||
border-color: #fda4af;
|
||||
color: #be123c;
|
||||
background: var(--sg-error-soft);
|
||||
border-color: var(--sg-error);
|
||||
color: var(--sg-error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,12 +311,12 @@
|
||||
margin: 0 0 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
margin: 0 0 20px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -269,371 +330,88 @@
|
||||
&__stat {
|
||||
text-align: center;
|
||||
padding: 12px 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: var(--sg-surface);
|
||||
}
|
||||
|
||||
&__stat-value {
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
&__stat-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
&__stat--publications {
|
||||
.empty-overview__stat-value,
|
||||
.empty-overview__stat-label {
|
||||
color: #0b63ce;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
|
||||
&__stat--funders {
|
||||
.empty-overview__stat-value,
|
||||
.empty-overview__stat-label {
|
||||
color: #b45309;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
&__hint {
|
||||
p {
|
||||
margin: 0;
|
||||
color: #aaa;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.funding-publication-page {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.publication-detail-back,
|
||||
.publication-more-info {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
vertical-align: middle;
|
||||
margin-left: 6px;
|
||||
color: #1976d2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.publication-detail-back {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.publication-more-info {
|
||||
gap: 4px;
|
||||
margin-top: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.publication-detail-hero {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
align-items: flex-start;
|
||||
padding: 24px;
|
||||
border: 1px solid #dbe3f2;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 16px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 95% 5%,
|
||||
rgba(200, 217, 255, 0.45),
|
||||
transparent 35%
|
||||
),
|
||||
linear-gradient(140deg, #fff 0%, #f8faff 100%);
|
||||
|
||||
&__content {
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
span {
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #dbe3f2;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
color: #64748b;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0 0 10px;
|
||||
font-size: clamp(1.25rem, 2vw, 1.75rem);
|
||||
line-height: 1.25;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
|
||||
&__source {
|
||||
margin: 0 0 8px;
|
||||
color: #334155;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
&__authors {
|
||||
margin: 0 0 16px;
|
||||
color: #64748b;
|
||||
line-height: 1.5;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
&__highlights {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 10px 16px;
|
||||
border: 1px solid #bdd4ff;
|
||||
border-radius: 8px;
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
|
||||
.material-icons {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hero-highlight {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, 0.85);
|
||||
|
||||
&__value {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
color: #1e3a5f;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 0.7rem;
|
||||
color: #64748b;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&--badge {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
&--closed {
|
||||
border-color: #e0e6f0;
|
||||
background: #f8fafc;
|
||||
color: #64748b;
|
||||
}
|
||||
}
|
||||
|
||||
.position-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
|
||||
&--unknown {
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
}
|
||||
|
||||
$g: '.publication-detail-grid';
|
||||
|
||||
#{$g} {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-main,
|
||||
#{$g} .publication-detail-side {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-section {
|
||||
border: 1px solid #e0e6f0;
|
||||
border-radius: 10px;
|
||||
padding: 18px;
|
||||
background: #fff;
|
||||
|
||||
h3 {
|
||||
margin: 0 0 14px;
|
||||
font-size: 1rem;
|
||||
color: #1e3a5f;
|
||||
}
|
||||
}
|
||||
|
||||
#{$g} .publication-overview,
|
||||
#{$g} .publication-abstract {
|
||||
margin: 0;
|
||||
color: #334155;
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts div {
|
||||
display: grid;
|
||||
grid-template-columns: 130px minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts dt {
|
||||
color: #64748b;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
#{$g} .publication-detail-facts dd {
|
||||
margin: 0;
|
||||
word-break: break-word;
|
||||
color: #1e293b;
|
||||
}
|
||||
|
||||
#{$g} .tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#{$g} .tag,
|
||||
#{$g} .access-badge,
|
||||
#{$g} .warning-badge {
|
||||
display: inline-flex;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
#{$g} .tag {
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
#{$g} .access-badge {
|
||||
font-weight: 600;
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
#{$g} .access-badge--closed {
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
#{$g} .inline-action {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #0b63ce;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
text-decoration: none;
|
||||
transition: color 0.15s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
color: #0b4f9e;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#{$g} .warning-badge {
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
color: #b91c1c;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.publication-item {
|
||||
padding: 8px 0;
|
||||
border-bottom: 2px solid #5b5555;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: rgba(16, 26, 61, 0.04);
|
||||
}
|
||||
}
|
||||
|
||||
.publication-title {
|
||||
font-size: 0.875rem;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mehr-infos-label,
|
||||
.publication-link-icon {
|
||||
color: #1976d2;
|
||||
}
|
||||
|
||||
.mehr-infos-label {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.publication-link-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.material-icons {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.publication-detail-hero {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
|
||||
&__action {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
#{$g} {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +1,37 @@
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, RouterLink } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { PageEvent } from '@angular/material/paginator';
|
||||
import { FundingService } from '../../api';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-paginator/query-param-paginator.component';
|
||||
|
||||
type SortMode = 'name' | 'top';
|
||||
type AuthorPosition = 'first' | 'middle' | 'last' | 'unknown';
|
||||
|
||||
type CitationCountByYear = {
|
||||
year: number;
|
||||
count: number;
|
||||
};
|
||||
|
||||
type FundingPublicationDetail = {
|
||||
id: string;
|
||||
title: string;
|
||||
abstract?: string | null;
|
||||
doi?: string | null;
|
||||
publication_year?: number | null;
|
||||
publication_date?: string | null;
|
||||
publication_type?: string | null;
|
||||
language?: string | null;
|
||||
publication_url?: string | null;
|
||||
pdf_url?: string | null;
|
||||
source_name?: string | null;
|
||||
source_type?: string | null;
|
||||
is_open_access?: boolean | null;
|
||||
open_access_status?: string | null;
|
||||
has_fulltext?: boolean | null;
|
||||
license?: string | null;
|
||||
cited_by_count?: number | null;
|
||||
is_retracted?: boolean | null;
|
||||
primary_topic?: string | null;
|
||||
topic_field?: string | null;
|
||||
topic_subfield?: string | null;
|
||||
topic_domain?: string | null;
|
||||
author_position?: AuthorPosition | string | null;
|
||||
authors?: string[];
|
||||
funder_names?: string[];
|
||||
institutions?: string[];
|
||||
countries?: string[];
|
||||
topics?: string[];
|
||||
keywords?: string[];
|
||||
grant_labels?: string[];
|
||||
counts_by_year?: Array<{
|
||||
year?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
@Component({
|
||||
selector: 'app-person-funding',
|
||||
imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatIconModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
MatFormFieldModule,
|
||||
MatSelectModule,
|
||||
MatIconModule,
|
||||
LoadingComponent,
|
||||
QueryParamPaginatorComponent,
|
||||
],
|
||||
templateUrl: './person-funding.component.html',
|
||||
styleUrl: './person-funding.component.scss',
|
||||
})
|
||||
@@ -63,26 +39,24 @@ export class PersonFundingComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
private router = inject(Router);
|
||||
private fundingApi = inject(FundingService);
|
||||
private sanitizer = inject(DomSanitizer);
|
||||
private initialSelectedFunderKey: string | null = null;
|
||||
private initialPublicationPage = 1;
|
||||
private initialFunderListPage = 1;
|
||||
private initialPublicationDetailId: string | null = null;
|
||||
private initialFunderPageIndex = 0;
|
||||
private initialFunderPageSize = 10;
|
||||
private initialPublicationPageIndex = 0;
|
||||
private initialPublicationPageSize = 10;
|
||||
|
||||
funders: any[] = [];
|
||||
filteredFunders: any[] = [];
|
||||
authorName: string | null = null;
|
||||
selectedFunder: any = null;
|
||||
selectedFunderListPage = 1;
|
||||
selectedPublicationPage = 1;
|
||||
readonly funderListPageSize = 10;
|
||||
readonly publicationPageSize = 10;
|
||||
funderPageIndex = 0;
|
||||
funderPageSize = 10;
|
||||
publicationPageIndex = 0;
|
||||
publicationPageSize = 10;
|
||||
activeFilter: 'all' | 'first' | 'middle' | 'last' = 'all';
|
||||
sortMode: SortMode = 'name';
|
||||
loading = true;
|
||||
error = false;
|
||||
expandedPublicationId: string | null = null;
|
||||
selectedPublicationDetailId: string | null = null;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.parent?.paramMap.subscribe((params) => {
|
||||
@@ -91,15 +65,18 @@ export class PersonFundingComponent implements OnInit {
|
||||
const sortFromUrl = this.route.snapshot.queryParamMap.get('sortBy');
|
||||
this.initialSelectedFunderKey =
|
||||
this.route.snapshot.queryParamMap.get('funder');
|
||||
this.initialPublicationDetailId =
|
||||
this.route.snapshot.queryParamMap.get('publicationDetail');
|
||||
this.initialPublicationPage = this.parsePageParam(
|
||||
this.route.snapshot.queryParamMap.get('publicationPage') ??
|
||||
this.route.snapshot.queryParamMap.get('page'),
|
||||
);
|
||||
this.initialFunderListPage = this.parsePageParam(
|
||||
this.initialFunderPageIndex = this.parsePageIndexParam(
|
||||
this.route.snapshot.queryParamMap.get('funderPage'),
|
||||
);
|
||||
this.initialFunderPageSize = this.parsePageSizeParam(
|
||||
this.route.snapshot.queryParamMap.get('funderSize'),
|
||||
);
|
||||
this.initialPublicationPageIndex = this.parsePageIndexParam(
|
||||
this.route.snapshot.queryParamMap.get('pubPage'),
|
||||
);
|
||||
this.initialPublicationPageSize = this.parsePageSizeParam(
|
||||
this.route.snapshot.queryParamMap.get('pubSize'),
|
||||
);
|
||||
if (this.isValidFilter(filterFromUrl)) {
|
||||
this.activeFilter = filterFromUrl;
|
||||
}
|
||||
@@ -111,11 +88,12 @@ export class PersonFundingComponent implements OnInit {
|
||||
this.fundingApi.getFundersByAuthor(authorId).subscribe({
|
||||
next: (result: any) => {
|
||||
this.funders = result.funders ?? [];
|
||||
this.authorName = result.author_name ?? null;
|
||||
this.applyFilter();
|
||||
this.selectedFunderListPage = this.clampPage(
|
||||
this.initialFunderListPage,
|
||||
this.getFunderListPageCount(),
|
||||
this.funderPageSize = this.initialFunderPageSize;
|
||||
this.funderPageIndex = this.clampPageIndex(
|
||||
this.initialFunderPageIndex,
|
||||
this.funderPageSize,
|
||||
this.filteredFunders.length,
|
||||
);
|
||||
this.restoreSelectedFunderFromUrl();
|
||||
this.loading = false;
|
||||
@@ -131,8 +109,7 @@ export class PersonFundingComponent implements OnInit {
|
||||
|
||||
selectFunder(funder: any): void {
|
||||
this.selectedFunder = funder;
|
||||
this.selectedPublicationPage = 1;
|
||||
this.selectedPublicationDetailId = null;
|
||||
this.publicationPageIndex = 0;
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
@@ -148,11 +125,20 @@ export class PersonFundingComponent implements OnInit {
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
onFunderPageChange(event: PageEvent): void {
|
||||
this.funderPageIndex = event.pageIndex;
|
||||
this.funderPageSize = event.pageSize;
|
||||
}
|
||||
|
||||
onPublicationPageChange(event: PageEvent): void {
|
||||
this.publicationPageIndex = event.pageIndex;
|
||||
this.publicationPageSize = event.pageSize;
|
||||
}
|
||||
|
||||
private applyFilter(): void {
|
||||
this.selectedFunder = null;
|
||||
this.selectedPublicationDetailId = null;
|
||||
this.selectedFunderListPage = 1;
|
||||
this.selectedPublicationPage = 1;
|
||||
this.funderPageIndex = 0;
|
||||
this.publicationPageIndex = 0;
|
||||
let funders: any[];
|
||||
if (this.activeFilter === 'all') {
|
||||
funders = this.funders;
|
||||
@@ -181,21 +167,14 @@ export class PersonFundingComponent implements OnInit {
|
||||
this.getFunderKey(funder) === this.getFunderKey(matchedFunder),
|
||||
);
|
||||
if (matchedIndex >= 0) {
|
||||
this.selectedFunderListPage =
|
||||
Math.floor(matchedIndex / this.funderListPageSize) + 1;
|
||||
this.funderPageIndex = Math.floor(matchedIndex / this.funderPageSize);
|
||||
}
|
||||
this.selectedPublicationPage = this.clampPublicationPage(
|
||||
this.initialPublicationPage,
|
||||
this.getPublicationPageCountForFunder(matchedFunder),
|
||||
this.publicationPageSize = this.initialPublicationPageSize;
|
||||
this.publicationPageIndex = this.clampPageIndex(
|
||||
this.initialPublicationPageIndex,
|
||||
this.publicationPageSize,
|
||||
this.getPublicationIds(matchedFunder).length,
|
||||
);
|
||||
if (
|
||||
this.initialPublicationDetailId &&
|
||||
this.getPublicationIds(matchedFunder).includes(
|
||||
this.initialPublicationDetailId,
|
||||
)
|
||||
) {
|
||||
this.selectedPublicationDetailId = this.initialPublicationDetailId;
|
||||
}
|
||||
this.updateQueryParams();
|
||||
} else {
|
||||
this.updateQueryParams();
|
||||
@@ -211,11 +190,10 @@ export class PersonFundingComponent implements OnInit {
|
||||
funder: this.selectedFunder
|
||||
? this.getFunderKey(this.selectedFunder)
|
||||
: null,
|
||||
publicationPage: this.selectedFunder
|
||||
? this.selectedPublicationPage
|
||||
: null,
|
||||
publicationDetail: this.selectedPublicationDetailId,
|
||||
funderPage: this.selectedFunderListPage,
|
||||
funderPage: this.funderPageIndex,
|
||||
funderSize: this.funderPageSize,
|
||||
pubPage: this.selectedFunder ? this.publicationPageIndex : null,
|
||||
pubSize: this.selectedFunder ? this.publicationPageSize : null,
|
||||
},
|
||||
queryParamsHandling: 'merge',
|
||||
replaceUrl: true,
|
||||
@@ -261,61 +239,29 @@ export class PersonFundingComponent implements OnInit {
|
||||
}
|
||||
|
||||
getPagedFunders(): any[] {
|
||||
const startIndex =
|
||||
(this.selectedFunderListPage - 1) * this.funderListPageSize;
|
||||
const startIndex = this.funderPageIndex * this.funderPageSize;
|
||||
return this.filteredFunders.slice(
|
||||
startIndex,
|
||||
startIndex + this.funderListPageSize,
|
||||
startIndex + this.funderPageSize,
|
||||
);
|
||||
}
|
||||
|
||||
hasFunderListPagination(): boolean {
|
||||
return this.getFunderListPageCount() > 1;
|
||||
}
|
||||
|
||||
getFunderListPageCount(): number {
|
||||
return Math.max(
|
||||
1,
|
||||
Math.ceil(this.filteredFunders.length / this.funderListPageSize),
|
||||
);
|
||||
}
|
||||
|
||||
setFunderListPage(page: number): void {
|
||||
this.selectedFunderListPage = this.clampPage(
|
||||
page,
|
||||
this.getFunderListPageCount(),
|
||||
);
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
getSelectedPublicationIdsPage(): string[] {
|
||||
if (!this.selectedFunder) {
|
||||
return [];
|
||||
}
|
||||
const allPublicationIds = this.getPublicationIds(this.selectedFunder);
|
||||
const startIndex =
|
||||
(this.selectedPublicationPage - 1) * this.publicationPageSize;
|
||||
const startIndex = this.publicationPageIndex * this.publicationPageSize;
|
||||
return allPublicationIds.slice(
|
||||
startIndex,
|
||||
startIndex + this.publicationPageSize,
|
||||
);
|
||||
}
|
||||
|
||||
hasPublicationPagination(): boolean {
|
||||
return this.getSelectedPublicationPageCount() > 1;
|
||||
}
|
||||
|
||||
getSelectedPublicationPageCount(): number {
|
||||
if (!this.selectedFunder) {
|
||||
return 1;
|
||||
}
|
||||
return this.getPublicationPageCountForFunder(this.selectedFunder);
|
||||
}
|
||||
|
||||
setPublicationPage(page: number): void {
|
||||
const totalPages = this.getSelectedPublicationPageCount();
|
||||
this.selectedPublicationPage = this.clampPublicationPage(page, totalPages);
|
||||
this.updateQueryParams();
|
||||
getSelectedPublicationTotal(): number {
|
||||
return this.selectedFunder
|
||||
? this.getPublicationIds(this.selectedFunder).length
|
||||
: 0;
|
||||
}
|
||||
|
||||
getPositionLabel(position: string): string {
|
||||
@@ -348,11 +294,6 @@ export class PersonFundingComponent implements OnInit {
|
||||
return allIds.size;
|
||||
}
|
||||
|
||||
private getPublicationPageCountForFunder(funder: any): number {
|
||||
const publicationCount = this.getPublicationIds(funder).length;
|
||||
return Math.max(1, Math.ceil(publicationCount / this.publicationPageSize));
|
||||
}
|
||||
|
||||
private sortFunders(funders: any[]): any[] {
|
||||
const sortedFunders = [...funders];
|
||||
return sortedFunders.sort((first, second) => {
|
||||
@@ -376,21 +317,25 @@ export class PersonFundingComponent implements OnInit {
|
||||
return funder.funder_name ?? '';
|
||||
}
|
||||
|
||||
private clampPublicationPage(page: number, totalPages: number): number {
|
||||
return this.clampPage(page, totalPages);
|
||||
private clampPageIndex(
|
||||
pageIndex: number,
|
||||
pageSize: number,
|
||||
total: number,
|
||||
): number {
|
||||
const maxIndex = Math.max(0, Math.ceil(total / pageSize) - 1);
|
||||
return Math.min(Math.max(pageIndex, 0), maxIndex);
|
||||
}
|
||||
|
||||
private clampPage(page: number, totalPages: number): number {
|
||||
return Math.min(Math.max(page, 1), totalPages);
|
||||
}
|
||||
|
||||
private parsePageParam(value: string | null): number {
|
||||
private parsePageIndexParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
if (!Number.isInteger(parsed) || parsed < 1) {
|
||||
return 1;
|
||||
}
|
||||
return parsed;
|
||||
return Number.isInteger(parsed) && parsed >= 0 ? parsed : 0;
|
||||
}
|
||||
|
||||
private parsePageSizeParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
return Number.isInteger(parsed) && parsed > 0 ? parsed : 10;
|
||||
}
|
||||
|
||||
getPublicationTitle(publicationId: string): string {
|
||||
const detailTitle = this.getPublicationDetail(publicationId)?.title;
|
||||
if (detailTitle) return detailTitle;
|
||||
@@ -404,23 +349,8 @@ export class PersonFundingComponent implements OnInit {
|
||||
this.expandedPublicationId = this.expandedPublicationId === id ? null : id;
|
||||
}
|
||||
|
||||
openPublicationDetail(event: MouseEvent, publicationId: string): void {
|
||||
event.stopPropagation();
|
||||
this.selectedPublicationDetailId = publicationId;
|
||||
this.expandedPublicationId = null;
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
closePublicationDetail(): void {
|
||||
this.selectedPublicationDetailId = null;
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
getSelectedPublicationDetail(): FundingPublicationDetail | null {
|
||||
if (!this.selectedPublicationDetailId) {
|
||||
return null;
|
||||
}
|
||||
return this.getPublicationDetail(this.selectedPublicationDetailId);
|
||||
getCurrentUrl(): string {
|
||||
return this.router.url;
|
||||
}
|
||||
|
||||
getPublicationDetail(publicationId: string): FundingPublicationDetail | null {
|
||||
@@ -447,64 +377,6 @@ export class PersonFundingComponent implements OnInit {
|
||||
return parts[parts.length - 1] ?? publicationId;
|
||||
}
|
||||
|
||||
getPublicationExternalUrl(
|
||||
publication: FundingPublicationDetail,
|
||||
): string | null {
|
||||
return (
|
||||
publication.publication_url ??
|
||||
this.selectedFunder?.publication_urls?.[publication.id] ??
|
||||
publication.id ??
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
getPublicationAuthors(publication: FundingPublicationDetail): string {
|
||||
return publication.authors?.length
|
||||
? publication.authors.join(', ')
|
||||
: 'Keine Angaben';
|
||||
}
|
||||
|
||||
hasPublicationSource(publication: FundingPublicationDetail): boolean {
|
||||
return !!publication.source_name;
|
||||
}
|
||||
|
||||
hasListValues(values?: string[] | null): boolean {
|
||||
return !!values?.length;
|
||||
}
|
||||
|
||||
hasTextValue(value?: string | null): boolean {
|
||||
return !!value && value !== '-' && value !== 'Keine Angaben';
|
||||
}
|
||||
|
||||
getOpenAccessBadge(publication: FundingPublicationDetail): {
|
||||
label: string;
|
||||
tone: 'open' | 'closed' | 'unknown';
|
||||
} {
|
||||
if (publication.is_open_access) {
|
||||
const statusLabels: Record<string, string> = {
|
||||
bronze: 'Bronze',
|
||||
diamond: 'Diamond',
|
||||
gold: 'Gold',
|
||||
green: 'Green',
|
||||
hybrid: 'Hybrid',
|
||||
};
|
||||
const status = publication.open_access_status
|
||||
? (statusLabels[publication.open_access_status] ??
|
||||
publication.open_access_status)
|
||||
: null;
|
||||
return {
|
||||
label: status ? `Open Access (${status})` : 'Open Access',
|
||||
tone: 'open',
|
||||
};
|
||||
}
|
||||
|
||||
if (publication.open_access_status === 'closed') {
|
||||
return { label: 'Nicht frei zugänglich', tone: 'closed' };
|
||||
}
|
||||
|
||||
return { label: 'Zugang unbekannt', tone: 'unknown' };
|
||||
}
|
||||
|
||||
getPositionBadgeClass(position?: AuthorPosition | string | null): string {
|
||||
const classes: Record<string, string> = {
|
||||
first: 'position-badge--first',
|
||||
@@ -515,218 +387,6 @@ export class PersonFundingComponent implements OnInit {
|
||||
return classes[position ?? 'unknown'] ?? classes['unknown'];
|
||||
}
|
||||
|
||||
getAuthorName(): string {
|
||||
return this.authorName ?? 'Die Person';
|
||||
}
|
||||
|
||||
getPublicationOverview(publication: FundingPublicationDetail): SafeHtml {
|
||||
const yearText = publication.publication_year
|
||||
? `aus dem Jahr ${publication.publication_year}`
|
||||
: 'ohne Jahresangabe';
|
||||
const authorText = publication.authors?.length
|
||||
? `von ${publication.authors.map((author) => this.escapeHtml(author)).join(', ')}`
|
||||
: 'ohne Autorenangabe';
|
||||
const funderText = this.selectedFunder?.funder_name
|
||||
? `Sie ist dem Förderer ${this.escapeHtml(this.selectedFunder.funder_name)} zugeordnet`
|
||||
: 'Es ist kein Förderer ausgewählt';
|
||||
const positionText = publication.author_position
|
||||
? `${this.boldAuthorName(this.getAuthorName())} ist als ${this.getPositionLabel(publication.author_position)} beteiligt`
|
||||
: 'die Autorposition ist nicht bekannt';
|
||||
const sourceText = publication.source_name
|
||||
? `Erschienen ist sie in/bei ${this.escapeHtml(publication.source_name)}.`
|
||||
: '';
|
||||
const citationText =
|
||||
typeof publication.cited_by_count === 'number'
|
||||
? `Sie wurde ${publication.cited_by_count} Mal zitiert.`
|
||||
: '';
|
||||
|
||||
const html =
|
||||
`Publikation ${yearText} ${authorText}. ${sourceText} ${funderText}; ${positionText}. ${citationText}`.trim();
|
||||
return this.sanitizer.bypassSecurityTrustHtml(html);
|
||||
}
|
||||
|
||||
private escapeHtml(value: string): string {
|
||||
return value
|
||||
.replaceAll('&', '&')
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>');
|
||||
}
|
||||
|
||||
private boldAuthorName(name: string): string {
|
||||
return `<strong>${this.escapeHtml(name)}</strong>`;
|
||||
}
|
||||
|
||||
getPublicationDateLabel(publication: FundingPublicationDetail): string {
|
||||
if (publication.publication_date) {
|
||||
const date = new Date(`${publication.publication_date}T00:00:00`);
|
||||
if (!Number.isNaN(date.getTime())) {
|
||||
return new Intl.DateTimeFormat('de-DE').format(date);
|
||||
}
|
||||
return publication.publication_date;
|
||||
}
|
||||
|
||||
return publication.publication_year
|
||||
? String(publication.publication_year)
|
||||
: '-';
|
||||
}
|
||||
|
||||
getPublicationTypeLabel(publication: FundingPublicationDetail): string {
|
||||
const labels: Record<string, string> = {
|
||||
article: 'Artikel',
|
||||
book: 'Buch',
|
||||
'book-chapter': 'Buchkapitel',
|
||||
dataset: 'Datensatz',
|
||||
dissertation: 'Dissertation',
|
||||
editorial: 'Editorial',
|
||||
letter: 'Letter',
|
||||
preprint: 'Preprint',
|
||||
'proceedings-article': 'Konferenzbeitrag',
|
||||
report: 'Bericht',
|
||||
review: 'Review',
|
||||
};
|
||||
const type = publication.publication_type;
|
||||
if (!type) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return labels[type] ?? type;
|
||||
}
|
||||
|
||||
getLanguageLabel(publication: FundingPublicationDetail): string {
|
||||
const labels: Record<string, string> = {
|
||||
de: 'Deutsch',
|
||||
en: 'Englisch',
|
||||
es: 'Spanisch',
|
||||
fr: 'Französisch',
|
||||
it: 'Italienisch',
|
||||
pt: 'Portugiesisch',
|
||||
};
|
||||
const language = publication.language;
|
||||
if (!language) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return labels[language] ?? language.toUpperCase();
|
||||
}
|
||||
|
||||
getPublicationSourceLabel(publication: FundingPublicationDetail): string {
|
||||
if (!publication.source_name) {
|
||||
return 'Keine Angaben';
|
||||
}
|
||||
|
||||
const sourceType = this.getSourceTypeLabel(publication.source_type);
|
||||
return sourceType === '-'
|
||||
? publication.source_name
|
||||
: `${publication.source_name} (${sourceType})`;
|
||||
}
|
||||
|
||||
getSourceTypeLabel(sourceType?: string | null): string {
|
||||
const labels: Record<string, string> = {
|
||||
book: 'Buch',
|
||||
conference: 'Konferenz',
|
||||
journal: 'Journal',
|
||||
repository: 'Repository',
|
||||
};
|
||||
if (!sourceType) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return labels[sourceType] ?? sourceType;
|
||||
}
|
||||
|
||||
getListLabel(values?: string[] | null): string {
|
||||
return values?.length ? values.join(', ') : 'Keine Angaben';
|
||||
}
|
||||
|
||||
getPublicationFunderLabel(publication: FundingPublicationDetail): string {
|
||||
if (publication.funder_names?.length) {
|
||||
return this.getListLabel(publication.funder_names);
|
||||
}
|
||||
|
||||
return this.selectedFunder?.funder_name ?? 'Keine Angaben';
|
||||
}
|
||||
|
||||
getCitationCountLabel(publication: FundingPublicationDetail): string {
|
||||
if (typeof publication.cited_by_count !== 'number') {
|
||||
return 'Keine Angaben';
|
||||
}
|
||||
|
||||
return publication.cited_by_count === 1
|
||||
? '1 Zitation'
|
||||
: `${publication.cited_by_count} Zitationen`;
|
||||
}
|
||||
|
||||
getCitationCountsByYear(
|
||||
publication: FundingPublicationDetail,
|
||||
): CitationCountByYear[] {
|
||||
return (publication.counts_by_year ?? [])
|
||||
.filter(
|
||||
(count) =>
|
||||
typeof count.year === 'number' &&
|
||||
typeof count.cited_by_count === 'number',
|
||||
)
|
||||
.map((count) => ({
|
||||
year: count.year as number,
|
||||
count: count.cited_by_count as number,
|
||||
}))
|
||||
.sort((first, second) => second.year - first.year);
|
||||
}
|
||||
|
||||
getOpenAccessLabel(publication: FundingPublicationDetail): string {
|
||||
const statusLabels: Record<string, string> = {
|
||||
bronze: 'Bronze',
|
||||
closed: 'geschlossen',
|
||||
diamond: 'Diamond',
|
||||
gold: 'Gold',
|
||||
green: 'Green',
|
||||
hybrid: 'Hybrid',
|
||||
};
|
||||
const status = publication.open_access_status
|
||||
? (statusLabels[publication.open_access_status] ??
|
||||
publication.open_access_status)
|
||||
: null;
|
||||
|
||||
if (publication.is_open_access) {
|
||||
return status ? `Ja (${status})` : 'Ja';
|
||||
}
|
||||
|
||||
return status === 'geschlossen' ? 'Nein' : 'Keine Angaben';
|
||||
}
|
||||
|
||||
getFulltextLabel(publication: FundingPublicationDetail): string {
|
||||
if (publication.pdf_url) {
|
||||
return 'PDF verfügbar';
|
||||
}
|
||||
if (publication.has_fulltext) {
|
||||
return 'Volltext verfügbar';
|
||||
}
|
||||
|
||||
return 'Kein Volltext hinterlegt';
|
||||
}
|
||||
|
||||
getLicenseLabel(publication: FundingPublicationDetail): string {
|
||||
return publication.license
|
||||
? publication.license.toUpperCase()
|
||||
: 'Keine Angaben';
|
||||
}
|
||||
|
||||
getRetractionLabel(publication: FundingPublicationDetail): string {
|
||||
if (publication.is_retracted === true) {
|
||||
return 'Ja, zurückgezogen';
|
||||
}
|
||||
if (publication.is_retracted === false) {
|
||||
return 'Nein, nicht zurückgezogen';
|
||||
}
|
||||
|
||||
return 'Keine Angaben';
|
||||
}
|
||||
|
||||
getGrantLabel(publication: FundingPublicationDetail): string {
|
||||
return publication.grant_labels?.length
|
||||
? publication.grant_labels.join(', ')
|
||||
: 'Kein Grant-Name hinterlegt';
|
||||
}
|
||||
|
||||
getPublicationPosition(publicationId: string): AuthorPosition {
|
||||
if (!this.selectedFunder) {
|
||||
return 'unknown';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
padding: 24px 28px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: var(--sg-surface-muted);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||
box-shadow: inset 0 1px 0 var(--sg-border);
|
||||
}
|
||||
|
||||
.interest-card-loading {
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
.interest-tags .interest-empty {
|
||||
padding: 9px 16px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-style: dashed;
|
||||
border: 1px dashed var(--sg-border);
|
||||
border-radius: 7px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
@@ -67,7 +66,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -146,8 +146,12 @@
|
||||
max-width: min(320px, 46vw);
|
||||
padding: 3px 8px;
|
||||
border-radius: 7px;
|
||||
background: color-mix(in srgb, var(--topic-color) 22%, #ffffff);
|
||||
color: color-mix(in srgb, var(--topic-color) 45%, #07163d);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--topic-color) 22%,
|
||||
var(--sg-color-mix-base)
|
||||
);
|
||||
color: color-mix(in srgb, var(--topic-color) 45%, var(--sg-text));
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
box-shadow: inset 0 0 0 1px
|
||||
@@ -433,7 +437,7 @@ mat-paginator {
|
||||
.submit-btn {
|
||||
width: 100%;
|
||||
background: var(--sg-primary);
|
||||
color: #fff;
|
||||
color: var(--sg-color-mix-base);
|
||||
border: none;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 10px;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div
|
||||
class="graph"
|
||||
echarts
|
||||
[options]="options"
|
||||
[options]="options()"
|
||||
[autoResize]="true"
|
||||
(wheel)="onGraphWheel($event)"
|
||||
(chartClick)="onChartEvent($event, 'chartClick')"></div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Component, computed, effect, input, output } from '@angular/core';
|
||||
import { Component, computed, inject, input, output } from '@angular/core';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { CollaborationNetwork } from '../../api';
|
||||
import { NgxEchartsDirective } from 'ngx-echarts';
|
||||
import { ChartThemeService } from '../../shared/services/chart-theme.service';
|
||||
import { EChartsCoreOption } from 'echarts/types/dist/core';
|
||||
|
||||
import * as echarts from 'echarts/core';
|
||||
@@ -13,6 +14,7 @@ import {
|
||||
import { CanvasRenderer } from 'echarts/renderers';
|
||||
import { GraphChart } from 'echarts/charts';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
echarts.use([
|
||||
GridComponent,
|
||||
CanvasRenderer,
|
||||
@@ -37,12 +39,16 @@ export interface NodeClickEvent {
|
||||
})
|
||||
export class PersonNetworkGraphComponent {
|
||||
collaborationNetwork = input<CollaborationNetwork>();
|
||||
|
||||
handleNodeClick = output<NodeClickEvent>();
|
||||
|
||||
authorDisplayName: string = '';
|
||||
private readonly chartTheme = inject(ChartThemeService);
|
||||
|
||||
options!: EChartsCoreOption;
|
||||
categoryLabels: Record<string, string> = {
|
||||
author: 'Autor',
|
||||
collaborator: 'Kollaborierender',
|
||||
institution: 'Institution',
|
||||
work: 'Publikation',
|
||||
};
|
||||
|
||||
readonly isEmptyGraph = computed(() => {
|
||||
const network = this.collaborationNetwork();
|
||||
@@ -63,27 +69,170 @@ export class PersonNetworkGraphComponent {
|
||||
);
|
||||
});
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
const network = this.collaborationNetwork();
|
||||
if (!network) {
|
||||
return;
|
||||
}
|
||||
this.updateGraphOptions(network);
|
||||
});
|
||||
}
|
||||
readonly options = computed<EChartsCoreOption>(() => {
|
||||
const collaborationNetwork = this.collaborationNetwork();
|
||||
const colors = this.chartTheme.colors();
|
||||
if (!collaborationNetwork) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const textColor = colors.text;
|
||||
|
||||
const primaryAuthor = collaborationNetwork.author_nodes.find(
|
||||
(n) => n.category === 'author',
|
||||
);
|
||||
const primaryAuthorId = primaryAuthor ? primaryAuthor.raw_id : '';
|
||||
const selectedNodeId = primaryAuthorId;
|
||||
|
||||
const occurences = this.calculateOccurenceFrequencies(collaborationNetwork);
|
||||
const freqValues = Object.values(occurences);
|
||||
const minFrequency = freqValues.length ? Math.min(...freqValues) : 0;
|
||||
const maxFrequency = freqValues.length ? Math.max(...freqValues) : 0;
|
||||
const freqDenominator =
|
||||
maxFrequency === minFrequency ? 1 : maxFrequency - minFrequency;
|
||||
|
||||
const categories = [
|
||||
{
|
||||
name: 'author',
|
||||
itemStyle: { color: colors.blueHighlight },
|
||||
},
|
||||
{
|
||||
name: 'collaborator',
|
||||
itemStyle: { color: colors.success },
|
||||
},
|
||||
{
|
||||
name: 'institution',
|
||||
itemStyle: { color: colors.warning },
|
||||
},
|
||||
{
|
||||
name: 'work',
|
||||
itemStyle: { color: colors.primary },
|
||||
},
|
||||
];
|
||||
|
||||
const nodes = collaborationNetwork.author_nodes
|
||||
.filter((node) => node.raw_id && node.display_name)
|
||||
.map((node) => {
|
||||
const rawId = node.raw_id;
|
||||
|
||||
const isPrimaryAuthor =
|
||||
rawId === primaryAuthorId ||
|
||||
rawId.toUpperCase() === primaryAuthorId.toUpperCase() ||
|
||||
rawId.split('/').pop()?.toUpperCase() ===
|
||||
primaryAuthorId.toUpperCase() ||
|
||||
primaryAuthorId.split('/').pop()?.toUpperCase() ===
|
||||
rawId.toUpperCase();
|
||||
|
||||
let category: NodeCategory;
|
||||
if (isPrimaryAuthor) {
|
||||
category = 'author';
|
||||
} else if (node.category === 'institution') {
|
||||
category = 'institution';
|
||||
} else if (node.category === 'work') {
|
||||
category = 'work';
|
||||
} else {
|
||||
category = 'collaborator';
|
||||
}
|
||||
|
||||
const isSelected = selectedNodeId
|
||||
? rawId === selectedNodeId ||
|
||||
rawId.toUpperCase() === selectedNodeId.toUpperCase() ||
|
||||
rawId.split('/').pop()?.toUpperCase() ===
|
||||
selectedNodeId.toUpperCase() ||
|
||||
selectedNodeId.split('/').pop()?.toUpperCase() ===
|
||||
rawId.toUpperCase()
|
||||
: false;
|
||||
|
||||
const baseId = node.raw_id + '';
|
||||
const nodeFreq = occurences[node.raw_id] || 0;
|
||||
const computedSymbolSize =
|
||||
25 + ((nodeFreq - minFrequency) / freqDenominator) * 30;
|
||||
|
||||
return {
|
||||
id: baseId,
|
||||
name: node.display_name,
|
||||
category,
|
||||
label: {
|
||||
show: node.category !== 'work',
|
||||
formatter: '{b}',
|
||||
},
|
||||
symbolSize: node.category === 'work' ? 15 : computedSymbolSize,
|
||||
};
|
||||
});
|
||||
|
||||
const links = collaborationNetwork.collaboration_edges.map((edge) => ({
|
||||
source: edge.raw_source_id + '',
|
||||
target: edge.raw_target_id + '',
|
||||
}));
|
||||
|
||||
const legendData = categories.map((c) => c.name);
|
||||
|
||||
return {
|
||||
legend: {
|
||||
data: legendData,
|
||||
bottom: 0,
|
||||
orient: 'horizontal',
|
||||
formatter: (name: string) => this.categoryLabels[name] || name,
|
||||
itemGap: 20,
|
||||
textStyle: { color: textColor },
|
||||
inactiveColor: colors.mutedTextColor,
|
||||
inactiveBorderColor: colors.tooltipBorder,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'graph',
|
||||
layout: 'force',
|
||||
symbolSize: 15,
|
||||
animation: false,
|
||||
data: nodes,
|
||||
roam: true,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'right',
|
||||
color: textColor,
|
||||
fontSize: 12,
|
||||
},
|
||||
force: {
|
||||
repulsion: 10000,
|
||||
friction: 0.9,
|
||||
gravity: 0.2,
|
||||
},
|
||||
zoom: 0.1,
|
||||
links,
|
||||
categories,
|
||||
roamTrigger: 'global',
|
||||
emphasis: {
|
||||
focus: 'adjacency',
|
||||
label: {
|
||||
show: true,
|
||||
color: textColor,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
lineStyle: {
|
||||
width: 4,
|
||||
},
|
||||
},
|
||||
blur: {
|
||||
itemStyle: {
|
||||
opacity: 0.15,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
opacity: 0.15,
|
||||
},
|
||||
lineStyle: {
|
||||
opacity: 0.1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
|
||||
onGraphWheel(event: WheelEvent): void {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
categoryLabels: Record<string, string> = {
|
||||
author: 'Autor',
|
||||
collaborator: 'Kollaborierender',
|
||||
institution: 'Institution',
|
||||
work: 'Publikation',
|
||||
};
|
||||
|
||||
onChartEvent(event: any, type: string) {
|
||||
if (type !== 'chartClick') {
|
||||
return;
|
||||
@@ -97,129 +246,7 @@ export class PersonNetworkGraphComponent {
|
||||
this.handleNodeClick.emit({ id, name, category });
|
||||
}
|
||||
|
||||
private updateGraphOptions(collaborationNetwork: CollaborationNetwork): void {
|
||||
if (!collaborationNetwork) {
|
||||
return;
|
||||
}
|
||||
|
||||
const frequencies =
|
||||
this.calculateOccurenceFrequencies(collaborationNetwork);
|
||||
|
||||
const freqValues = Object.values(frequencies);
|
||||
const minFrequency = freqValues.length ? Math.min(...freqValues) : 0;
|
||||
const maxFrequency = freqValues.length ? Math.max(...freqValues) : 0;
|
||||
const freqDenominator =
|
||||
maxFrequency === minFrequency ? 1 : maxFrequency - minFrequency;
|
||||
|
||||
const datas = [
|
||||
{
|
||||
nodes: [
|
||||
collaborationNetwork.work_nodes,
|
||||
collaborationNetwork.author_nodes,
|
||||
collaborationNetwork.institution_nodes,
|
||||
]
|
||||
.flat()
|
||||
.map((node) => {
|
||||
const category = (() => {
|
||||
if (node.category === 'institution') {
|
||||
return 'institution';
|
||||
}
|
||||
if (node.category === 'work') {
|
||||
return 'work';
|
||||
}
|
||||
if (node.raw_id === collaborationNetwork.raw_person_id) {
|
||||
return 'author';
|
||||
}
|
||||
return 'collaborator';
|
||||
})();
|
||||
|
||||
const baseId = node.raw_id + '';
|
||||
const nodeFreq = frequencies[node.raw_id] || 0;
|
||||
const computedSymbolSize =
|
||||
25 + ((nodeFreq - minFrequency) / freqDenominator) * 30;
|
||||
|
||||
return {
|
||||
id: baseId,
|
||||
name: node.display_name,
|
||||
category,
|
||||
label: {
|
||||
show: node.category !== 'work',
|
||||
formatter: '{b}',
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
formatter: '{b}',
|
||||
},
|
||||
},
|
||||
symbolSize: node.category === 'work' ? 15 : computedSymbolSize,
|
||||
};
|
||||
}),
|
||||
links: collaborationNetwork.collaboration_edges.map((edge) => {
|
||||
return [edge.raw_source_id + '', edge.raw_target_id + ''];
|
||||
}),
|
||||
categories: [
|
||||
{
|
||||
name: 'author',
|
||||
},
|
||||
{
|
||||
name: 'collaborator',
|
||||
},
|
||||
{
|
||||
name: 'institution',
|
||||
},
|
||||
{
|
||||
name: 'work',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const legendData = datas.length
|
||||
? datas[0].categories.map((c) => c.name)
|
||||
: [];
|
||||
|
||||
this.options = {
|
||||
legend: {
|
||||
data: legendData,
|
||||
bottom: 0,
|
||||
orient: 'horizontal',
|
||||
formatter: (name: string) => this.categoryLabels[name] || name,
|
||||
itemGap: 20,
|
||||
},
|
||||
series: datas.map((item) => {
|
||||
return {
|
||||
type: 'graph',
|
||||
layout: 'force',
|
||||
symbolSize: 15,
|
||||
animation: false,
|
||||
data: item.nodes,
|
||||
roam: true,
|
||||
force: {
|
||||
repulsion: 10000,
|
||||
friction: 0.9,
|
||||
gravity: 0.2,
|
||||
},
|
||||
zoom: 0.1,
|
||||
links: item.links.map((e) => {
|
||||
return {
|
||||
source: e[0] + '',
|
||||
target: e[1] + '',
|
||||
};
|
||||
}),
|
||||
categories: item.categories,
|
||||
roamTrigger: 'global', // + 2 hours because of incomplete documentation https://github.com/apache/echarts/issues/17214
|
||||
emphasis: {
|
||||
focus: 'adjacency',
|
||||
lineStyle: {
|
||||
width: 5,
|
||||
},
|
||||
},
|
||||
};
|
||||
}),
|
||||
};
|
||||
}
|
||||
calculateOccurenceFrequencies(
|
||||
private calculateOccurenceFrequencies(
|
||||
network: CollaborationNetwork,
|
||||
): Record<string, number> {
|
||||
const frequencies: Record<string, number> = {};
|
||||
|
||||
+55
-59
@@ -1,12 +1,12 @@
|
||||
.research-timeline-card {
|
||||
--accent: #0057ff;
|
||||
--accent: var(--sg-blue-highlight);
|
||||
|
||||
width: 100%;
|
||||
padding: 24px 28px;
|
||||
border: 1px solid #d7e4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 16px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-card-bg);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
box-sizing: border-box;
|
||||
|
||||
button {
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
h2 {
|
||||
margin: 0 0 6px;
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
@@ -58,12 +58,12 @@
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
color: #64718f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
|
||||
span {
|
||||
color: #74809b;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,26 +86,26 @@
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
border: 1px solid #dbe5f6;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
background: var(--sg-surface);
|
||||
|
||||
button {
|
||||
border-radius: 8px;
|
||||
padding: 9px 18px;
|
||||
color: #3f4b66;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: #f2f6ff;
|
||||
background: var(--sg-surface-muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: #eef4ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--accent);
|
||||
box-shadow: inset 0 0 0 1px #3d7cff;
|
||||
box-shadow: inset 0 0 0 1px var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,9 +116,9 @@
|
||||
justify-self: end;
|
||||
width: min(var(--year-filter-width), 100%);
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #dbe5f6;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 10px;
|
||||
background: #fbfdff;
|
||||
background: var(--sg-surface-muted);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
}
|
||||
|
||||
.year-filter-label {
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -151,13 +151,13 @@
|
||||
font-size: 11px;
|
||||
|
||||
&:disabled {
|
||||
color: #9aa5bc;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.year-filter-values {
|
||||
gap: 5px;
|
||||
color: #40506f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
@@ -166,7 +166,7 @@
|
||||
.year-filter-bounds {
|
||||
justify-content: space-between;
|
||||
margin-top: 0;
|
||||
color: #7c88a3;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
@@ -188,12 +188,12 @@
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
#d8e2f4 0%,
|
||||
#d8e2f4 var(--range-start),
|
||||
var(--sg-border) 0%,
|
||||
var(--sg-border) var(--range-start),
|
||||
var(--accent) var(--range-start),
|
||||
var(--accent) var(--range-end),
|
||||
#d8e2f4 var(--range-end),
|
||||
#d8e2f4 100%
|
||||
var(--sg-border) var(--range-end),
|
||||
var(--sg-border) 100%
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,12 +220,10 @@
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-top: -5px;
|
||||
border: 2px solid #ffffff;
|
||||
border: 2px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
box-shadow:
|
||||
0 0 0 1px #9ab7ff,
|
||||
0 2px 6px rgba(0, 87, 255, 0.22);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -233,12 +231,10 @@
|
||||
.range-input::-moz-range-thumb {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border: 2px solid #ffffff;
|
||||
border: 2px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
box-shadow:
|
||||
0 0 0 1px #9ab7ff,
|
||||
0 2px 6px rgba(0, 87, 255, 0.22);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -269,7 +265,7 @@
|
||||
left: 34px;
|
||||
right: 34px;
|
||||
height: 2px;
|
||||
background: #23395d;
|
||||
background: var(--sg-border-strong);
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
@@ -278,7 +274,7 @@
|
||||
right: -10px;
|
||||
border-top: 6px solid transparent;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-left: 12px solid #23395d;
|
||||
border-left: 12px solid var(--sg-border-strong);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +294,7 @@
|
||||
|
||||
.year-button {
|
||||
margin-bottom: 9px;
|
||||
color: #15213f;
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 18px;
|
||||
@@ -308,10 +304,10 @@
|
||||
.dot {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 3px solid #ffffff;
|
||||
border: 3px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: var(--timeline-color);
|
||||
box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.24);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +317,7 @@
|
||||
}
|
||||
|
||||
.timeline-load-more-point {
|
||||
--timeline-color: #b8c7e6;
|
||||
--timeline-color: var(--sg-text-soft);
|
||||
|
||||
.year-button {
|
||||
color: var(--accent);
|
||||
@@ -331,9 +327,9 @@
|
||||
|
||||
.research-timeline-card .load-more-action-button {
|
||||
padding: 7px 12px;
|
||||
border: 1px solid #bdd4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
background: #f0f6ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--accent);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
@@ -347,7 +343,7 @@
|
||||
h3 {
|
||||
min-height: 42px;
|
||||
margin: 0 0 8px;
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.35;
|
||||
@@ -358,7 +354,7 @@
|
||||
.publication-count {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -387,7 +383,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
}
|
||||
|
||||
.no-topics {
|
||||
color: #9aa5bc;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -409,10 +405,10 @@ app-topic-chip.timeline-topic-chip {
|
||||
min-width: 300px;
|
||||
box-sizing: border-box;
|
||||
padding: 15px 16px;
|
||||
border: 1px solid #dbe5f6;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-left: 4px solid var(--timeline-color);
|
||||
border-radius: 14px;
|
||||
background: #fbfdff;
|
||||
background: var(--sg-surface-muted);
|
||||
}
|
||||
|
||||
.phase-card-header {
|
||||
@@ -425,10 +421,10 @@ app-topic-chip.timeline-topic-chip {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-top: 3px;
|
||||
border: 3px solid #ffffff;
|
||||
border: 3px solid var(--sg-surface);
|
||||
border-radius: 50%;
|
||||
background: var(--timeline-color);
|
||||
box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.22);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.phase-title-block {
|
||||
@@ -437,7 +433,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
|
||||
h3 {
|
||||
margin: 10px 0 0;
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.35;
|
||||
@@ -449,20 +445,20 @@ app-topic-chip.timeline-topic-chip {
|
||||
width: fit-content;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
background: #eef4ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--accent);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.phase-years-button:hover {
|
||||
background: #dfeaff;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
.phase-publications-button {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
@@ -495,7 +491,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
margin-top: 13px;
|
||||
padding-top: 4px;
|
||||
padding-right: 6px;
|
||||
border-top: 1px solid #dbe5f6;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
@@ -508,7 +504,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
padding: 10px 0;
|
||||
|
||||
& + & {
|
||||
border-top: 1px solid #e4ebf7;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +515,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
|
||||
.phase-year-button {
|
||||
width: fit-content;
|
||||
color: #07163d;
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-align: left;
|
||||
@@ -527,7 +523,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
|
||||
span,
|
||||
.phase-year-publication-button {
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -549,7 +545,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-top: 18px;
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -557,9 +553,9 @@ app-topic-chip.timeline-topic-chip {
|
||||
.note-dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 3px solid #dce5f5;
|
||||
border: 3px solid var(--sg-border);
|
||||
border-radius: 50%;
|
||||
background: #52627f;
|
||||
background: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.load-more-content {
|
||||
@@ -585,7 +581,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: #68748f;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -596,7 +592,7 @@ app-topic-chip.timeline-topic-chip {
|
||||
}
|
||||
|
||||
.timeline-state-error {
|
||||
color: #b42318;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
<th>Patent</th>
|
||||
<th>Quelle</th>
|
||||
<th>Jahr</th>
|
||||
<th>Erfinder</th>
|
||||
<th>Anmelder</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -68,26 +70,23 @@
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ patent.publication_year ?? '-' }}</td>
|
||||
<td class="patent-people" [title]="getInventorsLabel(patent)">
|
||||
{{ getInventorsLabel(patent) }}
|
||||
</td>
|
||||
<td class="patent-people" [title]="getAssigneesLabel(patent)">
|
||||
{{ getAssigneesLabel(patent) }}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if (hasPagination()) {
|
||||
<div class="pagination">
|
||||
<button
|
||||
[disabled]="selectedPage === 1"
|
||||
(click)="setPage(selectedPage - 1)">
|
||||
Zurück
|
||||
</button>
|
||||
<span>Seite {{ selectedPage }} von {{ getPageCount() }}</span>
|
||||
<button
|
||||
[disabled]="selectedPage === getPageCount()"
|
||||
(click)="setPage(selectedPage + 1)">
|
||||
Weiter
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
<app-query-param-paginator
|
||||
[total]="filteredPatents.length"
|
||||
queryParamPageKey="page"
|
||||
queryParamSizeKey="size"
|
||||
[pageSizeOptions]="[10, 25, 50]"
|
||||
(handlePageChange)="onPatentPageChange($event)" />
|
||||
</div>
|
||||
|
||||
@if (selectedPatent) {
|
||||
@@ -137,7 +136,7 @@
|
||||
<span class="patent-detail-action__label"
|
||||
>Patentdetails anzeigen</span
|
||||
>
|
||||
<span class="material-icons" aria-hidden="true">chevron_right</span>
|
||||
<mat-icon aria-hidden="true">chevron_right</mat-icon>
|
||||
</button>
|
||||
<p class="patent-detail-hint">
|
||||
Abstract, Erfinder, Anmelder und IPC/CPC-Klassifikation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.message {
|
||||
padding: 16px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.patents-container {
|
||||
@@ -10,6 +10,11 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
app-query-param-paginator {
|
||||
display: block;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.patents-toolbar-field {
|
||||
width: fit-content;
|
||||
min-width: 180px;
|
||||
@@ -39,41 +44,66 @@
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
overflow: hidden;
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
padding: 12px 16px;
|
||||
background: var(--sg-surface-muted);
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
tr {
|
||||
cursor: pointer;
|
||||
color: var(--sg-text);
|
||||
transition: background-color 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: #f5f5f5;
|
||||
&:hover td {
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: #f0f0f0;
|
||||
&.selected td {
|
||||
background: var(--sg-primary-soft);
|
||||
}
|
||||
|
||||
&:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
|
||||
.patent-title {
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
color: var(--sg-text);
|
||||
font-weight: 600;
|
||||
max-width: 400px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.patent-people {
|
||||
max-width: 220px;
|
||||
color: var(--sg-text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,18 +119,18 @@
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
background: #f3f4f6;
|
||||
border: 1px solid #e5e7eb;
|
||||
color: #374151;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 0.68rem;
|
||||
font-weight: 600;
|
||||
|
||||
&--signal {
|
||||
padding: 4px 10px;
|
||||
font-size: 0.75rem;
|
||||
background: #ecfdf5;
|
||||
border-color: #a7f3d0;
|
||||
color: #047857;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,30 +148,31 @@
|
||||
font-weight: 700;
|
||||
|
||||
&--epo {
|
||||
background: #effaf3;
|
||||
color: #24834f;
|
||||
border: 1px solid #bdebcf;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
border: 1px solid var(--sg-success);
|
||||
}
|
||||
|
||||
&--uspto {
|
||||
background: #f0f6ff;
|
||||
color: #0b63ce;
|
||||
border: 1px solid #bdd4ff;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
}
|
||||
|
||||
.patent-detail {
|
||||
width: 440px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
background: #fafafa;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 24px;
|
||||
background: var(--sg-surface);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
|
||||
&.empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999;
|
||||
color: var(--sg-text-muted);
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
@@ -152,14 +183,14 @@
|
||||
|
||||
.overview-title {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.overview-subtitle {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -171,9 +202,9 @@
|
||||
}
|
||||
|
||||
.overview-stat {
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 12px 8px;
|
||||
text-align: center;
|
||||
|
||||
@@ -181,41 +212,41 @@
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.overview-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
&--total {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #7255d9;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
}
|
||||
|
||||
&--epo {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #24834f;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
&--uspto {
|
||||
.overview-value,
|
||||
.overview-label {
|
||||
color: #0b63ce;
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.overview-hint {
|
||||
font-size: 12px;
|
||||
color: #aaa;
|
||||
color: var(--sg-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -223,7 +254,8 @@
|
||||
h3 {
|
||||
margin: 0 0 16px 0;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
@@ -234,16 +266,16 @@
|
||||
gap: 10px;
|
||||
|
||||
.stat {
|
||||
background: white;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
margin-bottom: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
@@ -253,7 +285,7 @@
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -262,7 +294,7 @@
|
||||
margin: 14px 0 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.patent-detail-action {
|
||||
@@ -273,10 +305,10 @@
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #bdd4ff;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
|
||||
color: #0b63ce;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
@@ -286,12 +318,12 @@
|
||||
box-shadow 0.15s;
|
||||
|
||||
&:hover {
|
||||
border-color: #0b63ce;
|
||||
background: #f0f6ff;
|
||||
box-shadow: 0 2px 8px rgba(11, 99, 206, 0.12);
|
||||
border-color: var(--sg-blue-highlight);
|
||||
background: var(--sg-surface-soft);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
mat-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
@@ -300,34 +332,34 @@
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: #888;
|
||||
color: var(--sg-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.patent-full-detail {
|
||||
flex: 1;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
padding: 20px;
|
||||
background: #fafafa;
|
||||
background: var(--sg-surface-muted);
|
||||
|
||||
h3 {
|
||||
margin: 0 0 4px 0;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 16px 0 8px 0;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
color: var(--sg-text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 13px;
|
||||
color: #444;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -337,20 +369,15 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
|
||||
width: auto;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem 0.85rem;
|
||||
|
||||
border: 1px solid #d6e3f8;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 999px;
|
||||
|
||||
background: #f8fbff;
|
||||
color: #2563eb;
|
||||
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color 0.15s ease,
|
||||
@@ -359,14 +386,13 @@
|
||||
box-shadow 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
background: #eef5ff;
|
||||
border-color: #bcd3f7;
|
||||
color: #1d4ed8;
|
||||
box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-blue-highlight);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid #93c5fd;
|
||||
outline: 2px solid var(--sg-blue-highlight);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
@@ -374,7 +400,7 @@
|
||||
.detail-section {
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #eee;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.patent-meta {
|
||||
@@ -384,10 +410,10 @@
|
||||
|
||||
&__list {
|
||||
margin: 0;
|
||||
border: 1px solid #e2e8f4;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
|
||||
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
|
||||
background: var(--sg-surface);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -397,7 +423,7 @@
|
||||
gap: 12px 16px;
|
||||
align-items: center;
|
||||
padding: 11px 16px;
|
||||
border-top: 1px solid #eef2f8;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
|
||||
&:first-child {
|
||||
border-top: 0;
|
||||
@@ -407,7 +433,7 @@
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
@@ -415,7 +441,7 @@
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #1e293b;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.35;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -439,32 +465,32 @@
|
||||
.tag {
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
background: #f0f6ff;
|
||||
border: 1px solid #dbeafe;
|
||||
color: #1e40af;
|
||||
background: var(--sg-primary-soft);
|
||||
border: 1px solid var(--sg-border);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.classification-section {
|
||||
&--ipc .classification-card {
|
||||
background: #f0f6ff;
|
||||
border-color: #bfdbfe;
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-border);
|
||||
}
|
||||
|
||||
&--ipc .classification-badge--system {
|
||||
background: #dbeafe;
|
||||
color: #1d4ed8;
|
||||
background: var(--sg-surface-muted);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
|
||||
&--cpc .classification-card {
|
||||
background: #f0fdf4;
|
||||
border-color: #bbf7d0;
|
||||
background: var(--sg-success-soft);
|
||||
border-color: var(--sg-success);
|
||||
}
|
||||
|
||||
&--cpc .classification-badge--system {
|
||||
background: #dcfce7;
|
||||
color: #15803d;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +503,7 @@
|
||||
.classification-card {
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #dbeafe;
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-card__header {
|
||||
@@ -503,7 +529,7 @@
|
||||
.classification-code {
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.classification-badge {
|
||||
@@ -518,15 +544,15 @@
|
||||
}
|
||||
|
||||
.classification-badge--level {
|
||||
background: #e2e8f0;
|
||||
color: #475569;
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.classification-summary {
|
||||
margin: 10px 0 0;
|
||||
font-size: 0.84rem;
|
||||
line-height: 1.5;
|
||||
color: #334155;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.classification-toggle {
|
||||
@@ -534,7 +560,7 @@
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: #2563eb;
|
||||
color: var(--sg-blue-highlight);
|
||||
font-size: 0.78rem;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -546,7 +572,7 @@
|
||||
.classification-hierarchy {
|
||||
margin: 10px 0 0;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid rgba(15, 23, 42, 0.08);
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.classification-hierarchy__row {
|
||||
@@ -559,7 +585,7 @@
|
||||
margin: 0;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
color: #64748b;
|
||||
color: var(--sg-text-muted);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
@@ -568,7 +594,7 @@
|
||||
margin: 0;
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.45;
|
||||
color: #334155;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,9 +607,9 @@
|
||||
|
||||
button {
|
||||
padding: 4px 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 6px;
|
||||
background: white;
|
||||
background: var(--sg-surface);
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -595,6 +621,6 @@
|
||||
|
||||
span {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
getPublicationStageLabel,
|
||||
} from '../patent-detail/patent-detail.utils';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { PageEvent } from '@angular/material/paginator';
|
||||
import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-paginator/query-param-paginator.component';
|
||||
|
||||
type SortMode = 'date' | 'title';
|
||||
type SourceFilter = 'all' | 'EPO' | 'USPTO';
|
||||
@@ -25,6 +27,7 @@ type SourceFilter = 'all' | 'EPO' | 'USPTO';
|
||||
MatFormFieldModule,
|
||||
MatSelectModule,
|
||||
MatIconModule,
|
||||
QueryParamPaginatorComponent,
|
||||
],
|
||||
templateUrl: './person-patents.component.html',
|
||||
styleUrl: './person-patents.component.scss',
|
||||
@@ -45,12 +48,18 @@ export class PersonPatentsComponent {
|
||||
activeFilter: SourceFilter = 'all';
|
||||
sortMode: SortMode = 'date';
|
||||
|
||||
selectedPage = 1;
|
||||
readonly pageSize = 10;
|
||||
pageIndex = 0;
|
||||
pageSize = 10;
|
||||
|
||||
constructor() {
|
||||
const filterFromUrl = this.route.snapshot.queryParamMap.get('filter');
|
||||
const sortFromUrl = this.route.snapshot.queryParamMap.get('sortBy');
|
||||
this.pageIndex = this.parsePageIndexParam(
|
||||
this.route.snapshot.queryParamMap.get('page'),
|
||||
);
|
||||
this.pageSize = this.parsePageSizeParam(
|
||||
this.route.snapshot.queryParamMap.get('size'),
|
||||
);
|
||||
|
||||
if (this.isValidFilter(filterFromUrl)) {
|
||||
this.activeFilter = filterFromUrl;
|
||||
@@ -93,12 +102,17 @@ export class PersonPatentsComponent {
|
||||
|
||||
setFilter(filter: SourceFilter): void {
|
||||
this.activeFilter = filter;
|
||||
this.selectedPage = 1;
|
||||
this.pageIndex = 0;
|
||||
this.selectedPatent = null;
|
||||
this.applyFilter();
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
onPatentPageChange(event: PageEvent): void {
|
||||
this.pageIndex = event.pageIndex;
|
||||
this.pageSize = event.pageSize;
|
||||
}
|
||||
|
||||
setSortMode(sortMode: SortMode): void {
|
||||
this.sortMode = sortMode;
|
||||
this.applyFilter();
|
||||
@@ -144,12 +158,24 @@ export class PersonPatentsComponent {
|
||||
queryParams: {
|
||||
filter: this.activeFilter,
|
||||
sortBy: this.sortMode,
|
||||
page: this.pageIndex,
|
||||
size: this.pageSize,
|
||||
},
|
||||
queryParamsHandling: 'merge',
|
||||
replaceUrl: true,
|
||||
});
|
||||
}
|
||||
|
||||
private parsePageIndexParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
return Number.isInteger(parsed) && parsed >= 0 ? parsed : 0;
|
||||
}
|
||||
|
||||
private parsePageSizeParam(value: string | null): number {
|
||||
const parsed = Number(value);
|
||||
return Number.isInteger(parsed) && parsed > 0 ? parsed : 10;
|
||||
}
|
||||
|
||||
private isValidFilter(value: string | null): value is SourceFilter {
|
||||
return value === 'all' || value === 'EPO' || value === 'USPTO';
|
||||
}
|
||||
@@ -159,21 +185,16 @@ export class PersonPatentsComponent {
|
||||
}
|
||||
|
||||
getPagedPatents(): PatentEntry[] {
|
||||
const start = (this.selectedPage - 1) * this.pageSize;
|
||||
const start = this.pageIndex * this.pageSize;
|
||||
return this.filteredPatents.slice(start, start + this.pageSize);
|
||||
}
|
||||
|
||||
getPageCount(): number {
|
||||
return Math.max(1, Math.ceil(this.filteredPatents.length / this.pageSize));
|
||||
getInventorsLabel(patent: PatentEntry): string {
|
||||
return patent.inventors?.length ? patent.inventors.join(', ') : '-';
|
||||
}
|
||||
|
||||
hasPagination(): boolean {
|
||||
return this.getPageCount() > 1;
|
||||
}
|
||||
|
||||
setPage(page: number): void {
|
||||
this.selectedPage = Math.min(Math.max(page, 1), this.getPageCount());
|
||||
this.updateQueryParams();
|
||||
getAssigneesLabel(patent: PatentEntry): string {
|
||||
return patent.assignees?.length ? patent.assignees.join(', ') : '-';
|
||||
}
|
||||
|
||||
formatDate(date: string | null | undefined): string {
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
[loading]="isTopicsLoading()"
|
||||
(tagClick)="onInterestingTagClick($event)"></app-person-interesting>
|
||||
</section>
|
||||
<nav class="person-tabs" mat-tab-nav-bar [tabPanel]="tabPanel">
|
||||
<nav class="person-tabs sg-tab-nav" mat-tab-nav-bar [tabPanel]="tabPanel">
|
||||
@for (link of links(); track link.path) {
|
||||
<a
|
||||
mat-tab-link
|
||||
|
||||
@@ -34,13 +34,7 @@
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
border-radius: 50%;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 50% 30%,
|
||||
rgba(255, 255, 255, 0.78),
|
||||
transparent 34%
|
||||
),
|
||||
linear-gradient(145deg, #c8d9ff, #f7faff 48%, #88a9ee);
|
||||
background: var(--sg-avatar-gradient);
|
||||
border: 1px solid var(--sg-border);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
color: var(--sg-primary);
|
||||
@@ -85,7 +79,7 @@
|
||||
padding: 0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text-muted);
|
||||
cursor: pointer;
|
||||
|
||||
@@ -226,14 +220,14 @@
|
||||
}
|
||||
|
||||
.orcid-chip:hover {
|
||||
border-color: #6cc24a;
|
||||
border-color: var(--sg-success);
|
||||
}
|
||||
|
||||
.orcid-chip mat-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
color: #6cc24a;
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
@@ -252,7 +246,7 @@
|
||||
padding: 24px 28px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: var(--sg-surface-muted);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.bio-card h3 {
|
||||
@@ -275,26 +269,6 @@
|
||||
|
||||
.person-tabs {
|
||||
padding: 0 32px;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
background: var(--sg-background);
|
||||
}
|
||||
|
||||
.person-tabs a {
|
||||
min-width: 132px;
|
||||
height: 58px;
|
||||
color: var(--sg-text);
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.person-tabs a.mdc-tab--active {
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
::ng-deep .person-tabs .mdc-tab-indicator__content--underline {
|
||||
border-color: var(--sg-primary);
|
||||
border-top-width: 3px;
|
||||
}
|
||||
|
||||
.person-panel {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// Complete SCSS with all styles including clickable elements
|
||||
|
||||
.detail-page {
|
||||
padding: 28px 32px 42px;
|
||||
max-width: 100%;
|
||||
@@ -19,7 +17,7 @@
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
@@ -28,7 +26,7 @@
|
||||
|
||||
.status-badge:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.status-badge mat-icon {
|
||||
@@ -41,9 +39,9 @@
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
@@ -51,8 +49,8 @@
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.back-link mat-icon {
|
||||
@@ -81,8 +79,8 @@
|
||||
}
|
||||
|
||||
.project-hero {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #d9e2f0;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-md);
|
||||
padding: 28px 32px;
|
||||
margin-bottom: 28px;
|
||||
@@ -103,7 +101,7 @@
|
||||
.project-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
@@ -120,8 +118,8 @@
|
||||
.new-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #27ae60;
|
||||
color: #fff;
|
||||
background: var(--sg-success);
|
||||
color: var(--sg-background);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
@@ -155,8 +153,8 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: #fff;
|
||||
border: 1px solid #d9e2f0;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
@@ -166,8 +164,8 @@ h1 {
|
||||
|
||||
.agency-info:hover,
|
||||
.funding-type-info:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.agency-info mat-icon,
|
||||
@@ -183,7 +181,7 @@ h1 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #d9e2f0;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.metric-item {
|
||||
@@ -217,7 +215,8 @@ h1 {
|
||||
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
border-color: #d9e2f0 !important;
|
||||
background: var(--sg-card-bg) !important;
|
||||
border-color: var(--sg-border) !important;
|
||||
border-radius: var(--sg-radius-md) !important;
|
||||
}
|
||||
|
||||
@@ -230,7 +229,7 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 16px 20px 12px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.section-header mat-icon {
|
||||
@@ -255,7 +254,7 @@ h1 {
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
margin-left: auto;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
@@ -300,16 +299,16 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.person-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@@ -320,7 +319,7 @@ h1 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
@@ -345,9 +344,9 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
font-size: 13px;
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
@@ -355,8 +354,8 @@ h1 {
|
||||
}
|
||||
|
||||
.institution-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.institution-item mat-icon {
|
||||
@@ -394,7 +393,7 @@ h1 {
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 24px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.detail-row:last-child {
|
||||
@@ -423,7 +422,7 @@ h1 {
|
||||
}
|
||||
|
||||
.detail-row dd.clickable:hover {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.detail-row dd.clickable:hover .search-icon {
|
||||
@@ -469,7 +468,7 @@ h1 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
font-size: 48px;
|
||||
color: #e74c3c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.error-state p {
|
||||
@@ -477,9 +476,8 @@ h1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
// Clickable external link styling
|
||||
.external-link {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,14 +124,14 @@ export class BundDetailsComponent implements OnInit {
|
||||
return year >= new Date().getFullYear() ? `Laufend` : `Abgeschlossen`;
|
||||
}
|
||||
getStatusColor(status: string | null | undefined): string {
|
||||
if (!status) return '#95a5a6';
|
||||
if (!status) return 'var(--sg-text-muted)';
|
||||
const statusUpper = status.toUpperCase();
|
||||
if (statusUpper.includes('ABGESCHLOSSEN')) {
|
||||
return '#27ae60';
|
||||
return 'var(--sg-success)';
|
||||
} else if (statusUpper.includes('LAUFEND')) {
|
||||
return '#f39c12';
|
||||
return 'var(--sg-warning)';
|
||||
} else {
|
||||
return '#95a5a6';
|
||||
return 'var(--sg-text-muted)';
|
||||
}
|
||||
}
|
||||
goBack(): void {
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
@@ -26,8 +26,8 @@
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.back-link mat-icon {
|
||||
@@ -56,8 +56,8 @@
|
||||
}
|
||||
|
||||
.project-hero {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #d9e2f0;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-md);
|
||||
padding: 28px 32px;
|
||||
margin-bottom: 28px;
|
||||
@@ -77,7 +77,7 @@
|
||||
.project-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
@@ -125,24 +125,24 @@ h1 {
|
||||
}
|
||||
|
||||
.primary-action {
|
||||
background: var(--sg-primary, #0066cc);
|
||||
color: #fff;
|
||||
background: var(--sg-primary);
|
||||
color: var(--sg-background);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.primary-action:hover {
|
||||
background: var(--sg-primary-dark, #0052a3);
|
||||
background: var(--sg-primary-strong);
|
||||
}
|
||||
|
||||
.secondary-action {
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text);
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.secondary-action:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.primary-action mat-icon,
|
||||
@@ -157,7 +157,7 @@ h1 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #d9e2f0;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.metric-item {
|
||||
@@ -191,7 +191,8 @@ h1 {
|
||||
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
border-color: #d9e2f0 !important;
|
||||
background: var(--sg-card-bg) !important;
|
||||
border-color: var(--sg-border) !important;
|
||||
border-radius: var(--sg-radius-md) !important;
|
||||
}
|
||||
|
||||
@@ -204,7 +205,7 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 16px 20px 12px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.section-header mat-icon {
|
||||
@@ -229,7 +230,7 @@ h1 {
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
margin-left: auto;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
@@ -241,7 +242,7 @@ h1 {
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
@@ -250,7 +251,7 @@ h1 {
|
||||
|
||||
.status-badge:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
|
||||
.status-badge mat-icon {
|
||||
@@ -296,16 +297,16 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.person-item:hover {
|
||||
cursor: pointer;
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
@@ -315,7 +316,7 @@ h1 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
@@ -337,7 +338,7 @@ h1 {
|
||||
|
||||
.person-role {
|
||||
font-size: 11px;
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -362,9 +363,9 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
font-size: 13px;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
@@ -393,8 +394,8 @@ h1 {
|
||||
flex-shrink: 0;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background: #fbeaea;
|
||||
color: #c0392b;
|
||||
background: var(--sg-error-soft);
|
||||
color: var(--sg-error);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -409,16 +410,16 @@ h1 {
|
||||
|
||||
.subproject-item {
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.subproject-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
|
||||
.subproject-main {
|
||||
@@ -438,7 +439,7 @@ h1 {
|
||||
flex-shrink: 0;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
@@ -452,9 +453,9 @@ h1 {
|
||||
|
||||
.publication-item {
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
}
|
||||
|
||||
.publication-title {
|
||||
@@ -501,7 +502,7 @@ h1 {
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.detail-row:last-child {
|
||||
@@ -522,7 +523,7 @@ h1 {
|
||||
}
|
||||
|
||||
.external-link {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -556,7 +557,7 @@ h1 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
font-size: 48px;
|
||||
color: #e74c3c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
|
||||
.error-state p {
|
||||
|
||||
@@ -211,14 +211,14 @@ export class DfgDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
getStatusColor(status: string | null | undefined): string {
|
||||
if (!status) return '#95a5a6';
|
||||
if (!status) return 'var(--sg-text-muted)';
|
||||
const statusUpper = status.toUpperCase();
|
||||
if (statusUpper.includes('ABGESCHLOSSEN')) {
|
||||
return '#27ae60';
|
||||
return 'var(--sg-success)';
|
||||
} else if (statusUpper.includes('LAUFEND')) {
|
||||
return '#f39c12';
|
||||
return 'var(--sg-warning)';
|
||||
} else {
|
||||
return '#95a5a6';
|
||||
return 'var(--sg-text-muted)';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-9
@@ -11,19 +11,19 @@
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.deliv-icon {
|
||||
flex-shrink: 0;
|
||||
color: #7b1fa2;
|
||||
color: var(--sg-warning);
|
||||
|
||||
mat-icon {
|
||||
width: 24px;
|
||||
@@ -53,16 +53,16 @@
|
||||
|
||||
.deliv-type {
|
||||
padding: 1px 8px;
|
||||
background: #f3e5f5;
|
||||
background: var(--sg-warning-soft);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #7b1fa2;
|
||||
color: var(--sg-warning);
|
||||
}
|
||||
|
||||
.deliv-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
@@ -82,7 +82,8 @@
|
||||
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
border-color: #d9e2f0 !important;
|
||||
background: var(--sg-card-bg) !important;
|
||||
border-color: var(--sg-border) !important;
|
||||
border-radius: var(--sg-radius-md) !important;
|
||||
}
|
||||
|
||||
@@ -91,7 +92,7 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e6e9ed;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.section-header mat-icon {
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
[subfieldName]="keyword.subfieldName"
|
||||
[fieldName]="keyword.fieldName"
|
||||
[domainName]="keyword.domainName"
|
||||
[color]="keyword.color || '#d9e2f0'"
|
||||
[color]="keyword.color || 'var(--sg-border)'"
|
||||
[disabled]="!keyword.id">
|
||||
</app-topic-chip>
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
font-weight: 500;
|
||||
}
|
||||
.project-hero {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #d9e2f0;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-md);
|
||||
padding: 28px 32px;
|
||||
margin-bottom: 28px;
|
||||
@@ -46,7 +46,7 @@
|
||||
.project-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-text);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
@@ -81,7 +81,7 @@ h1 {
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
@@ -89,7 +89,7 @@ h1 {
|
||||
}
|
||||
.status-badge:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: var(--sg-shadow-md);
|
||||
}
|
||||
.status-badge mat-icon {
|
||||
width: 16px;
|
||||
@@ -101,8 +101,8 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 14px;
|
||||
background: #fff;
|
||||
border: 1px solid #d9e2f0;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
@@ -110,8 +110,8 @@ h1 {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.scheme-info:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
}
|
||||
.scheme-info mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
@@ -124,16 +124,16 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
background: #e8f0fe;
|
||||
border: 1px solid #c5d8f0;
|
||||
background: var(--sg-primary-soft);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #1a73e8;
|
||||
color: var(--sg-blue-highlight);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.doi-link:hover {
|
||||
background: #d5e3fa;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
.doi-link mat-icon {
|
||||
width: 18px;
|
||||
@@ -145,7 +145,7 @@ h1 {
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #d9e2f0;
|
||||
border-top: 1px solid var(--sg-border);
|
||||
}
|
||||
.metric-item {
|
||||
display: flex;
|
||||
@@ -173,7 +173,8 @@ h1 {
|
||||
}
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
border-color: #d9e2f0 !important;
|
||||
background: var(--sg-card-bg) !important;
|
||||
border-color: var(--sg-border) !important;
|
||||
border-radius: var(--sg-radius-md) !important;
|
||||
}
|
||||
.section-header {
|
||||
@@ -181,7 +182,7 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e6e9ed;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
.section-header mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
@@ -203,7 +204,7 @@ h1 {
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
margin-left: auto;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
@@ -238,15 +239,15 @@ h1 {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.topic-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.topic-value {
|
||||
@@ -280,7 +281,7 @@ h1 {
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
.detail-row:last-child {
|
||||
border-bottom: 0;
|
||||
@@ -304,7 +305,7 @@ h1 {
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.detail-row dd.clickable:hover {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
.detail-row dd.clickable:hover .search-icon,
|
||||
.detail-row dd:hover .search-icon {
|
||||
@@ -322,7 +323,7 @@ h1 {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
color: var(--sg-background);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
@@ -335,7 +336,7 @@ h1 {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: var(--sg-primary, #0066cc);
|
||||
color: var(--sg-primary);
|
||||
text-decoration: none;
|
||||
word-break: break-all;
|
||||
}
|
||||
@@ -359,7 +360,7 @@ h1 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
font-size: 48px;
|
||||
color: #e74c3c;
|
||||
color: var(--sg-error);
|
||||
}
|
||||
.error-state p {
|
||||
margin: 0;
|
||||
@@ -427,16 +428,16 @@ h1 {
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.program-badge.fp7 {
|
||||
background: #e8eaf6;
|
||||
color: #283593;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
.program-badge.h2020 {
|
||||
background: #e3f2fd;
|
||||
color: #0d47a1;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-blue-highlight);
|
||||
}
|
||||
.program-badge.heu {
|
||||
background: #e8f5e9;
|
||||
color: #1b5e20;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
@@ -444,9 +445,9 @@ h1 {
|
||||
gap: 4px;
|
||||
padding: 0 4px;
|
||||
margin-bottom: 24px;
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: var(--sg-radius-md);
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
overflow-x: auto;
|
||||
}
|
||||
.tab-btn {
|
||||
@@ -465,13 +466,13 @@ h1 {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tab-btn:hover {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
background: var(--sg-surface-soft);
|
||||
color: var(--sg-text);
|
||||
}
|
||||
.tab-btn.active {
|
||||
background: #fff;
|
||||
color: var(--sg-primary, #0066cc);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
background: var(--sg-card-bg);
|
||||
color: var(--sg-primary);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
.tab-btn mat-icon {
|
||||
width: 20px;
|
||||
@@ -485,7 +486,7 @@ h1 {
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
padding: 0 6px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 10px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 11px;
|
||||
@@ -515,15 +516,15 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e6e9ed;
|
||||
background: var(--sg-surface-muted);
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.eurosci-voc-item.clickable:hover {
|
||||
background: #f0f3f7;
|
||||
border-color: #b8c5d6;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
background: var(--sg-surface-soft);
|
||||
border-color: var(--sg-border-strong);
|
||||
box-shadow: var(--sg-shadow-sm);
|
||||
}
|
||||
.eurosci-voc-item .voc-path {
|
||||
display: flex;
|
||||
@@ -536,36 +537,36 @@ h1 {
|
||||
.eurosci-voc-item .path-segment {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
background: #fff;
|
||||
border: 1px solid #e6e9ed;
|
||||
background: var(--sg-surface);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
.eurosci-voc-item .path-segment:last-child {
|
||||
background: #e8f0fe;
|
||||
border-color: #c5d8f0;
|
||||
color: #005a9c;
|
||||
background: var(--sg-primary-soft);
|
||||
border-color: var(--sg-border);
|
||||
color: var(--sg-blue-highlight);
|
||||
font-weight: 600;
|
||||
}
|
||||
.eurosci-voc-item .path-separator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
.eurosci-voc-item .voc-code {
|
||||
font-size: 12px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-soft);
|
||||
font-family: monospace;
|
||||
background: #eef2f7;
|
||||
background: var(--sg-surface-soft);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.eurosci-voc-item .voc-description {
|
||||
font-size: 13px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -580,9 +581,9 @@ h1 {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 14px;
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
.erc-pi-item .pi-name {
|
||||
font-weight: 500;
|
||||
|
||||
@@ -221,14 +221,14 @@ export class EuDetailsComponent implements OnInit, OnDestroy {
|
||||
*/
|
||||
private getKeywordColor(index: number): string {
|
||||
const colors = [
|
||||
'#3498db', // Blue
|
||||
'#e67e22', // Orange
|
||||
'#27ae60', // Green
|
||||
'#8e44ad', // Purple
|
||||
'#e74c3c', // Red
|
||||
'#1abc9c', // Teal
|
||||
'#f39c12', // Gold
|
||||
'#2c3e50', // Navy
|
||||
'var(--sg-blue-highlight)',
|
||||
'var(--sg-warning)',
|
||||
'var(--sg-success)',
|
||||
'var(--sg-primary)',
|
||||
'var(--sg-error)',
|
||||
'var(--sg-blue-highlight)',
|
||||
'var(--sg-warning)',
|
||||
'var(--sg-text-muted)',
|
||||
];
|
||||
return colors[index % colors.length];
|
||||
}
|
||||
@@ -326,22 +326,22 @@ export class EuDetailsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
getStatusColor(status: string | null | undefined): string {
|
||||
if (!status) return '#95a5a6';
|
||||
if (!status) return 'var(--sg-text-muted)';
|
||||
|
||||
const statusUpper = status.toUpperCase();
|
||||
if (statusUpper.includes('CLOSED') || statusUpper.includes('COMPLETED')) {
|
||||
return '#27ae60';
|
||||
return 'var(--sg-success)';
|
||||
} else if (
|
||||
statusUpper.includes('ONGOING') ||
|
||||
statusUpper.includes('ACTIVE')
|
||||
) {
|
||||
return '#f39c12';
|
||||
return 'var(--sg-warning)';
|
||||
} else if (statusUpper.includes('SIGNED')) {
|
||||
return '#3498db';
|
||||
return 'var(--sg-blue-highlight)';
|
||||
} else if (statusUpper.includes('CANCELLED')) {
|
||||
return '#e74c3c';
|
||||
return 'var(--sg-error)';
|
||||
} else {
|
||||
return '#95a5a6';
|
||||
return 'var(--sg-text-muted)';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -5,10 +5,10 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e6e9ed;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
|
||||
mat-icon {
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 24px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
@@ -18,7 +18,7 @@
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,18 +31,18 @@
|
||||
|
||||
.mat-mdc-header-cell {
|
||||
font-weight: 600;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 2px solid #e6e9ed;
|
||||
background: var(--sg-surface-muted);
|
||||
border-bottom: 2px solid var(--sg-border);
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
.mat-mdc-row:hover {
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,21 +64,21 @@
|
||||
|
||||
.org-name-text {
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.org-name-cell:hover .org-name-text {
|
||||
color: #005a9c;
|
||||
color: var(--sg-primary);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.role-chip {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.country-chip {
|
||||
@@ -95,27 +95,27 @@
|
||||
|
||||
.currency-value {
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.empty-value {
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-soft);
|
||||
}
|
||||
|
||||
.activity-chip {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #f0f3f7;
|
||||
background: var(--sg-surface-soft);
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.sme-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
background: #e8f5e9;
|
||||
color: #2e7d32;
|
||||
background: var(--sg-success-soft);
|
||||
color: var(--sg-success);
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
@@ -132,23 +132,23 @@
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
background: #f0f3f7;
|
||||
background: var(--sg-surface-soft);
|
||||
border-radius: 4px;
|
||||
color: #4a5a6a;
|
||||
color: var(--sg-text);
|
||||
text-decoration: none;
|
||||
font-size: 12px;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: #e8edf5;
|
||||
color: #005a9c;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.link-icon {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.link-label {
|
||||
|
||||
+10
-10
@@ -3,7 +3,7 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e6e9ed;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
}
|
||||
|
||||
.section-header mat-icon {
|
||||
@@ -33,19 +33,19 @@
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
background: var(--sg-surface);
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: #f8fafc;
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.ipr-icon {
|
||||
flex-shrink: 0;
|
||||
color: #f39c12;
|
||||
color: var(--sg-warning);
|
||||
|
||||
mat-icon {
|
||||
width: 24px;
|
||||
@@ -74,17 +74,17 @@
|
||||
|
||||
.ipr-type {
|
||||
padding: 1px 8px;
|
||||
background: #fff3e0;
|
||||
background: var(--sg-warning-soft);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #e65100;
|
||||
color: var(--sg-warning);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.ipr-patent-type {
|
||||
padding: 1px 8px;
|
||||
background: #e8eaf6;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #283593;
|
||||
color: var(--sg-primary);
|
||||
}
|
||||
|
||||
.ipr-applicant {
|
||||
@@ -103,7 +103,7 @@
|
||||
.ipr-app-id,
|
||||
.ipr-award-id {
|
||||
padding: 1px 8px;
|
||||
background: #f5f7fa;
|
||||
background: var(--sg-surface-soft);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
}
|
||||
}
|
||||
|
||||
+30
-22
@@ -18,29 +18,37 @@
|
||||
|
||||
<ng-template #authorsTemplate let-pub>
|
||||
@if (pub.authors) {
|
||||
@let authorList = parseAuthors(pub.authors);
|
||||
@let authorList = pub.oaAuthors ?? [];
|
||||
@let isExpanded = isPublicationAuthorsExpanded(pub);
|
||||
@let visibleAuthors =
|
||||
isExpanded ? authorList : authorList.slice(0, 3);
|
||||
<div
|
||||
class="author-tags"
|
||||
aria-label="Autoren"
|
||||
style="padding: 0.5rem 0">
|
||||
@for (
|
||||
author of visibleAuthors;
|
||||
track getAuthorTrackId(author, $index)
|
||||
) {
|
||||
<app-author-chip
|
||||
size="mini"
|
||||
[author]="author"
|
||||
[showIcon]="true"
|
||||
[isClickable]="false" />
|
||||
} @empty {
|
||||
<span class="empty-text">-</span>
|
||||
}
|
||||
|
||||
@if (authorList.length > 0) {
|
||||
<div class="authors-container">
|
||||
@for (author of authorList; track author; let last = $last) {
|
||||
<span class="author-wrapper">
|
||||
<span
|
||||
class="author-name"
|
||||
(click)="
|
||||
searchForPersonName(author); $event.stopPropagation()
|
||||
">
|
||||
{{ author }}
|
||||
</span>
|
||||
|
||||
@if (!last) {
|
||||
<span class="author-separator">, </span>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<span class="empty-value">—</span>
|
||||
}
|
||||
@if (authorList.length > 3) {
|
||||
<button
|
||||
type="button"
|
||||
class="publication-institution-more"
|
||||
[attr.aria-expanded]="isExpanded"
|
||||
(click)="togglePublicationAuthorsExpansion(pub)">
|
||||
{{ isExpanded ? 'weniger' : '+' + (authorList.length - 3) }}
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<span class="empty-value">—</span>
|
||||
}
|
||||
|
||||
+47
-23
@@ -3,17 +3,41 @@
|
||||
.publications-tab {
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
background: var(--sg-card-bg);
|
||||
border: 1px solid var(--sg-border);
|
||||
}
|
||||
.publication-institution-more {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 24px;
|
||||
padding: 3px 8px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: var(--sg-surface);
|
||||
color: var(--sg-text-muted);
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
line-height: 1.2;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
border-color: var(--sg-primary);
|
||||
color: var(--sg-primary);
|
||||
background: var(--sg-surface-soft);
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e6e9ed;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
|
||||
mat-icon {
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 24px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
@@ -23,7 +47,7 @@
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,28 +59,28 @@
|
||||
|
||||
.mat-mdc-header-cell {
|
||||
font-weight: 600;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 2px solid #e6e9ed;
|
||||
background: var(--sg-surface-muted);
|
||||
border-bottom: 2px solid var(--sg-border);
|
||||
padding: 12px 16px;
|
||||
}
|
||||
|
||||
.mat-mdc-cell {
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-bottom: 1px solid var(--sg-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.mat-mdc-row {
|
||||
transition: background 0.2s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mat-mdc-row:hover {
|
||||
background: #f8fafc;
|
||||
&:hover {
|
||||
background: var(--sg-surface-soft);
|
||||
}
|
||||
}
|
||||
|
||||
.pub-title-cell {
|
||||
@@ -68,27 +92,27 @@
|
||||
|
||||
.pub-title-text {
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.pub-title-cell:hover .pub-title-text {
|
||||
color: #005a9c;
|
||||
color: var(--sg-primary);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.author-name:hover {
|
||||
color: #005a9c;
|
||||
color: var(--sg-primary);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.journal-chip {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #e8edf5;
|
||||
background: var(--sg-primary-soft);
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@@ -97,16 +121,16 @@
|
||||
|
||||
.year-value {
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.publisher-text {
|
||||
color: #4a5a6a;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.empty-value {
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-soft);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -122,17 +146,17 @@
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 4px 10px;
|
||||
background: #f0f3f7;
|
||||
background: var(--sg-surface-soft);
|
||||
border-radius: 12px;
|
||||
color: #4a5a6a;
|
||||
color: var(--sg-text);
|
||||
text-decoration: none;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
background: #e8edf5;
|
||||
color: #005a9c;
|
||||
background: var(--sg-primary-soft);
|
||||
color: var(--sg-primary);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@@ -140,7 +164,7 @@
|
||||
font-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: #6b7a8a;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.link-label {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user