view data fixes
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 5m42s
Contract Testing / contract-snapshot (pull_request) Has been skipped

This commit is contained in:
2026-01-22 23:40:38 +01:00
parent 1288a9dc30
commit 18133aef4c
111 changed files with 841 additions and 324 deletions

View File

@@ -0,0 +1,33 @@
/**
* ActivityLevelDisplay
*
* Deterministic mapping of engagement rates to activity level labels.
*/
export class ActivityLevelDisplay {
/**
* Maps engagement rate to activity level label.
*/
static levelLabel(engagementRate: number): string {
if (engagementRate < 20) {
return 'Low';
} else if (engagementRate < 50) {
return 'Medium';
} else {
return 'High';
}
}
/**
* Maps engagement rate to activity level value.
*/
static levelValue(engagementRate: number): 'low' | 'medium' | 'high' {
if (engagementRate < 20) {
return 'low';
} else if (engagementRate < 50) {
return 'medium';
} else {
return 'high';
}
}
}