refactor(patents): share app-card-search/source-filter across patent page.
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev There was a failure building this commit

This commit is contained in:
2026-08-18 10:39:01 +02:00
parent 1369a2bf29
commit 83c809983c
16 changed files with 111 additions and 110 deletions
@@ -36,19 +36,9 @@
<mat-option value="both">Beides</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="filter_alt"></mat-icon>
<mat-select
[value]="activeFilter"
(selectionChange)="setFilter($event.value)">
<mat-select-trigger>Filter nach Quelle</mat-select-trigger>
<mat-option value="all">Alle</mat-option>
<mat-option value="EPO">EPO</mat-option>
<mat-option value="USPTO">USPTO</mat-option>
</mat-select>
</mat-form-field>
<app-source-filter
[value]="activeFilter"
(valueChange)="setFilter($event)" />
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
@@ -17,6 +17,7 @@ import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-pagina
import { ComponentTooltipDirective } from '../../directives/component-tooltip.directive';
import { AppAuthorTooltipComponent } from '../../shared/ui/app-author-tooltip/app-author-tooltip.component';
import { PatentTableComponent } from '../../shared/ui/patent-table/patent-table.component';
import { SourceFilterComponent } from '../../shared/ui/source-filter/source-filter.component';
type SortColumn = 'title' | 'publication_year' | 'source' | 'match_type';
type SortDirection = 'asc' | 'desc';
@@ -35,6 +36,7 @@ type OrgPatentMatchTypeFilter = 'all' | 'institution' | 'name' | 'both';
QueryParamPaginatorComponent,
ComponentTooltipDirective,
PatentTableComponent,
SourceFilterComponent,
],
templateUrl: './institution-patents.component.html',
styleUrl: './institution-patents.component.scss',
@@ -13,19 +13,9 @@
<div class="patents-content">
<div class="patents-list">
<div class="patents-list-toolbar">
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="filter_alt"></mat-icon>
<mat-select
[value]="activeFilter()"
(selectionChange)="setFilter($event.value)">
<mat-select-trigger>Filter nach Quelle</mat-select-trigger>
<mat-option value="all">Alle</mat-option>
<mat-option value="EPO">EPO</mat-option>
<mat-option value="USPTO">USPTO</mat-option>
</mat-select>
</mat-form-field>
<app-source-filter
[value]="activeFilter()"
(valueChange)="setFilter($event)" />
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
@@ -16,6 +16,7 @@ import {
} from '../../patent-detail/patent-detail.utils';
import { KeywordPatentMappingStatus } from '../../../api';
import { PatentTableComponent } from '../../../shared/ui/patent-table/patent-table.component';
import { SourceFilterComponent } from '../../../shared/ui/source-filter/source-filter.component';
type SourceFilter = 'all' | 'EPO' | 'USPTO';
type SortColumn = 'title' | 'publication_year' | 'source';
@@ -34,6 +35,7 @@ function isValidSortColumn(value: string | null): value is SortColumn {
LoadingComponent,
QueryParamPaginatorComponent,
PatentTableComponent,
SourceFilterComponent,
],
templateUrl: './keywords-patents.component.html',
styleUrl: './keywords-patents.component.scss',
@@ -3,13 +3,7 @@
<mat-divider />
@if (loading) {
<app-loading
text="Patentdaten werden geladen..."
icon="workspace_premium"
[size]="150"
[diameter]="150" />
} @else if (error) {
@if (error) {
<p class="state-message error">Fehler beim Laden der Patente.</p>
} @else if (showDetail && selectedPatent) {
<div class="detail-view">
@@ -260,6 +254,7 @@
</div>
} @else {
<app-card-search
[loading]="loading"
[page]="cardSearchPage()"
[cardTmp]="cardTmp"
[additionalFiltersTmp]="filtersTmp"
@@ -12,7 +12,6 @@ import { PatentEntry } from '../../api/model/patentEntry';
import { IpcClassification } from '../../api';
import { OpenAlexTopicTag } from '../../api/model/openAlexTopicTag';
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
import { YearRangeSliderComponent } from '../../shared/ui/year-range-slider/year-range-slider.component';
import {
classificationSectionColor,
@@ -51,7 +50,6 @@ const MIN_YEAR = 1978;
MatChipsModule,
MatDividerModule,
TopicChipComponent,
LoadingComponent,
YearRangeSliderComponent,
CardSearchComponent,
],
@@ -13,19 +13,9 @@
<div class="patents-content">
<div class="patents-list">
<div class="patents-list-toolbar">
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="filter_alt"></mat-icon>
<mat-select
[value]="activeFilter"
(selectionChange)="setFilter($event.value)">
<mat-select-trigger>Filter nach Quelle</mat-select-trigger>
<mat-option value="all">Alle</mat-option>
<mat-option value="EPO">EPO</mat-option>
<mat-option value="USPTO">USPTO</mat-option>
</mat-select>
</mat-form-field>
<app-source-filter
[value]="activeFilter"
(valueChange)="setFilter($event)" />
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
@@ -17,6 +17,7 @@ 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';
import { PatentTableComponent } from '../../shared/ui/patent-table/patent-table.component';
import { SourceFilterComponent } from '../../shared/ui/source-filter/source-filter.component';
type SortColumn = 'title' | 'publication_year' | 'source';
type SortDirection = 'asc' | 'desc';
@@ -32,6 +33,7 @@ type SourceFilter = 'all' | 'EPO' | 'USPTO';
MatIconModule,
QueryParamPaginatorComponent,
PatentTableComponent,
SourceFilterComponent,
],
templateUrl: './person-patents.component.html',
styleUrl: './person-patents.component.scss',