person: pass topic field/domain to publications filter for consistent chip colors
This commit is contained in:
@@ -73,7 +73,12 @@ export class PersonInterestingComponent implements OnInit {
|
||||
readonly activeLegendFieldIds = signal<ReadonlySet<string>>(new Set());
|
||||
readonly activeLegendSubfieldIds = signal<ReadonlySet<string>>(new Set());
|
||||
|
||||
readonly tagClick = output<{ id: string; name: string }>();
|
||||
readonly tagClick = output<{
|
||||
id: string;
|
||||
name: string;
|
||||
fieldName?: string;
|
||||
domainName?: string;
|
||||
}>();
|
||||
|
||||
readonly tags = computed<InterestTag[]>(() => {
|
||||
const topicsList = this.topics() ?? [];
|
||||
@@ -139,7 +144,12 @@ export class PersonInterestingComponent implements OnInit {
|
||||
|
||||
onTagClick(tag: InterestTag): void {
|
||||
if (!tag.id) return;
|
||||
this.tagClick.emit({ id: tag.id, name: tag.label });
|
||||
this.tagClick.emit({
|
||||
id: tag.id,
|
||||
name: tag.label,
|
||||
fieldName: tag.fieldName || undefined,
|
||||
domainName: tag.domainName || undefined,
|
||||
});
|
||||
}
|
||||
|
||||
onLegendExpandedChange(expanded: boolean): void {
|
||||
|
||||
@@ -22,6 +22,8 @@ export interface WordCloudWord {
|
||||
name: string;
|
||||
value: number;
|
||||
topicId: string | undefined;
|
||||
fieldName: string | undefined;
|
||||
domainName: string | undefined;
|
||||
color: string;
|
||||
fontSize: number;
|
||||
fontWeight: number;
|
||||
@@ -186,6 +188,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
publicationYear: selection.years,
|
||||
publicationTopicId: selection.topic.id,
|
||||
publicationTopicName: selection.topic.name,
|
||||
publicationTopicField: selection.topic.field_name ?? null,
|
||||
publicationTopicDomain: selection.topic.domain_name ?? null,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -225,6 +229,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
publicationPage: 1,
|
||||
publicationTopicId: word.topicId,
|
||||
publicationTopicName: word.name,
|
||||
publicationTopicField: word.fieldName ?? null,
|
||||
publicationTopicDomain: word.domainName ?? null,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -462,6 +468,8 @@ export class PersonOverviewComponent implements OnInit {
|
||||
name,
|
||||
value,
|
||||
topicId: nameToId.get(name),
|
||||
fieldName: colorInput?.field_name ?? undefined,
|
||||
domainName: colorInput?.domain_name ?? undefined,
|
||||
color: topicHierarchyColor(colorInput),
|
||||
fontSize: Math.round(12 + t * (32 - 12)),
|
||||
fontWeight: t > 0.66 ? 800 : t > 0.33 ? 600 : 400,
|
||||
|
||||
@@ -234,7 +234,12 @@ export class PersonComponent {
|
||||
{ label: 'Patente', path: 'patents', disabled: false },
|
||||
];
|
||||
|
||||
onInterestingTagClick(selection: { id: string; name: string }): void {
|
||||
onInterestingTagClick(selection: {
|
||||
id: string;
|
||||
name: string;
|
||||
fieldName?: string;
|
||||
domainName?: string;
|
||||
}): void {
|
||||
if (!selection.id) return;
|
||||
|
||||
void this.router.navigate(['publications'], {
|
||||
@@ -243,6 +248,8 @@ export class PersonComponent {
|
||||
publicationPage: 1,
|
||||
publicationTopicId: selection.id,
|
||||
publicationTopicName: selection.name,
|
||||
publicationTopicField: selection.fieldName ?? null,
|
||||
publicationTopicDomain: selection.domainName ?? null,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user