'use client'; import { calculateSchwartzResults, SchwartzHigherOrder, SchwartzValue, } from '../../test/private/SchwartzCalculator'; interface SchwartzResultProps { answers: string[]; } const valueDescriptions: Record = { selfDirection: '重视独立思考、自由选择和创造。', stimulation: '重视新奇、挑战、变化和兴奋体验。', hedonism: '重视愉悦、享受和积极体验。', achievement: '重视能力表现、努力成果和外部认可。', power: '重视影响力、资源、地位和掌控感。', security: '重视稳定、安全、健康和生活保障。', conformity: '重视规则、克制和对他人影响的边界。', tradition: '重视文化、家庭、仪式和既有传承。', benevolence: '重视照顾亲近的人、忠诚和可靠支持。', universalism: '重视公平、包容、自然和更广泛的人群福祉。', }; const higherOrderDescriptions: Record = { opennessToChange: '偏向自由、探索、变化和个人选择。', conservation: '偏向秩序、稳定、规范和连续性。', selfEnhancement: '偏向成就、影响力和个人资源增长。', selfTranscendence: '偏向关怀、公平、包容和超越个人利益。', }; function width(score: number) { return `${Math.max(0, Math.min(100, ((score - 1) / 4) * 100))}%`; } export function SchwartzResult({ answers }: SchwartzResultProps) { const results = calculateSchwartzResults(answers); const topValues = results.rankedValues.slice(0, 3); return (

Schwartz 价值观结果

{topValues.map((item, index) => ( ))}

主要价值组合:{topValues.map((item) => item.name).join(' / ')}

价值观结果更适合看相对优先级,而不是单个分数高低。你的高分价值通常会影响职业选择、关系边界、生活节奏和长期目标。

{results.rankedHigherOrders.map((item) => ( ))}

十种基础价值观

{results.rankedValues.map((item) => ( ))}
注:价值观不是好坏评价,而是优先级。相对冲突的价值同时高分时,实际选择中可能更需要明确场景和取舍。
); } function MetricCard({ title, value, score }: { title: string; value: string; score: string }) { return (
{title}
{value}
{score} / 5
); } function ScoreCard({ title, score, description, color, }: { title: string; score: number; description: string; color: string; }) { return (

{title}

{score.toFixed(2)} / 5

{description}

); }