UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

1 lines 7.53 kB
{"version":3,"sources":["../src/components/RecommendedLessonDetails/types.ts"],"sourcesContent":["import type { StudentLessonStatus } from '../../types/recommendedLessons';\n\n/**\n * Internal student type for table display\n */\nexport interface DisplayStudent extends Record<string, unknown> {\n id: string;\n name: string;\n status: StudentLessonStatus;\n completionPercentage: number;\n duration: string | null;\n}\n\n/**\n * Labels for the RecommendedLessonDetails component\n */\nexport interface LessonDetailsLabels {\n viewLesson: string;\n viewPerformance: string;\n correctActivity: string;\n resultsTitle: string;\n completedLabel: string;\n bestResultLabel: string;\n hardestTopicLabel: string;\n studentColumn: string;\n statusColumn: string;\n completionColumn: string;\n durationColumn: string;\n}\n\n/**\n * Default labels for the component (pt-BR)\n */\nexport const DEFAULT_LABELS: LessonDetailsLabels = {\n viewLesson: 'Ver aula',\n viewPerformance: 'Ver desempenho',\n correctActivity: 'Corrigir atividade',\n resultsTitle: 'Resultados da aula recomendada',\n completedLabel: 'CONCLUÍDO',\n bestResultLabel: 'MELHOR RESULTADO',\n hardestTopicLabel: 'MAIOR DIFICULDADE',\n studentColumn: 'Aluno',\n statusColumn: 'Status',\n completionColumn: 'Conclusão',\n durationColumn: 'Duração',\n};\n\n/**\n * Breadcrumb item type\n */\nexport interface BreadcrumbItem {\n label: string;\n path?: string;\n}\n\n/**\n * Question alternative data\n */\nexport interface QuestionAlternative {\n id: string;\n text: string;\n isCorrect: boolean;\n isSelected: boolean;\n}\n\n/**\n * Question data for the performance modal\n */\nexport interface LessonQuestion {\n id: string;\n /** Answer ID from the API (used for correction) */\n answerId: string;\n /** Activity ID this question belongs to */\n activityId: string;\n title: string;\n statement: string;\n /** Question type (e.g., 'DISSERTATIVA', 'MULTIPLA_ESCOLHA') */\n questionType: string;\n /** Whether the answer is correct (null for not yet evaluated) */\n isCorrect: boolean | null;\n /** Teacher feedback for the answer */\n teacherFeedback: string | null;\n alternatives: QuestionAlternative[];\n}\n\n/**\n * Lesson progress data for the performance modal\n */\nexport interface LessonProgress {\n id: string;\n title: string;\n progress: number;\n questions: LessonQuestion[];\n}\n\n/**\n * Student performance data for the modal\n */\nexport interface StudentPerformanceData {\n studentName: string;\n correctAnswers: number;\n incorrectAnswers: number;\n bestResult: string | null;\n hardestTopic: string | null;\n lessons: LessonProgress[];\n}\n\n/**\n * Labels for the StudentPerformanceModal component (pt-BR)\n */\nexport interface StudentPerformanceLabels {\n title: string;\n correctAnswersLabel: string;\n incorrectAnswersLabel: string;\n bestResultLabel: string;\n hardestTopicLabel: string;\n lessonsTitle: string;\n}\n\n/**\n * Default labels for StudentPerformanceModal (pt-BR)\n */\nexport const DEFAULT_PERFORMANCE_LABELS: StudentPerformanceLabels = {\n title: 'Desempenho',\n correctAnswersLabel: 'N° DE QUESTÕES CORRETAS',\n incorrectAnswersLabel: 'N° DE QUESTÕES INCORRETAS',\n bestResultLabel: 'MELHOR RESULTADO',\n hardestTopicLabel: 'MAIOR DIFICULDADE',\n lessonsTitle: 'Aulas',\n};\n\n/**\n * Activity data for the StudentActivityPerformanceModal\n */\nexport interface PerformanceActivity {\n id: string;\n title: string;\n questions: LessonQuestion[];\n}\n\n/**\n * Lesson data for the StudentActivityPerformanceModal (placeholder for future)\n */\nexport interface PerformanceLesson {\n id: string;\n title: string;\n progress: number;\n}\n\n/**\n * Data for StudentActivityPerformanceModal\n */\nexport interface StudentActivityPerformanceData {\n /** User institution ID for API calls */\n userInstitutionId: string;\n /** User ID for correction API calls */\n userId: string;\n studentName: string;\n /** Student score (0-10) */\n score: number | null;\n /** Number of correct answers */\n correctAnswers: number;\n /** Number of incorrect answers */\n incorrectAnswers: number;\n /** Time to complete (formatted string, e.g., \"30 dias\") */\n completionTime: string | null;\n /** Best result topic */\n bestResult: string | null;\n /** Hardest topic */\n hardestTopic: string | null;\n /** List of activities with questions */\n activities: PerformanceActivity[];\n /** List of lessons (placeholder) */\n lessons?: PerformanceLesson[];\n}\n\n/**\n * Correction data for a question\n */\nexport interface QuestionCorrection {\n questionId: string;\n activityId: string;\n isCorrect: boolean | null;\n teacherFeedback: string;\n}\n\n/**\n * Labels for StudentActivityPerformanceModal (pt-BR)\n */\nexport interface StudentActivityPerformanceLabels {\n title: string;\n resultTitle: string;\n scoreLabel: string;\n correctAnswersLabel: string;\n incorrectAnswersLabel: string;\n completionTimeLabel: string;\n bestResultLabel: string;\n hardestTopicLabel: string;\n activitiesTitle: string;\n lessonsTitle: string;\n lessonsInDevelopment: string;\n feedbackPlaceholder: string;\n markCorrect: string;\n markIncorrect: string;\n /** Label for pending correction (e.g. essay not yet graded) */\n pending: string;\n /** Label for \"yes\" in \"is correct?\" radio (e.g. Sim) */\n correctYes: string;\n /** Label for \"no\" in \"is correct?\" radio (e.g. Não) */\n correctNo: string;\n /** Label for the \"is correct?\" question (e.g. Resposta está correta?) */\n isCorrectQuestionLabel: string;\n /** Label for the observation/feedback section (e.g. Incluir observação) */\n observationLabel: string;\n saveCorrection: string;\n saving: string;\n}\n\n/**\n * Default labels for StudentActivityPerformanceModal (pt-BR)\n */\nexport const DEFAULT_ACTIVITY_PERFORMANCE_LABELS: StudentActivityPerformanceLabels =\n {\n title: 'Corrigir atividade',\n resultTitle: 'Resultado da atividade',\n scoreLabel: 'NOTA',\n correctAnswersLabel: 'N° DE QUESTÕES CORRETAS',\n incorrectAnswersLabel: 'N° DE QUESTÕES INCORRETAS',\n completionTimeLabel: 'TEMPO DE CONCLUSÃO',\n bestResultLabel: 'MELHOR RESULTADO',\n hardestTopicLabel: 'MAIOR DIFICULDADE',\n activitiesTitle: 'Atividade',\n lessonsTitle: 'Aulas',\n lessonsInDevelopment: 'Em desenvolvimento',\n feedbackPlaceholder: 'Adicionar feedback para o aluno...',\n markCorrect: 'Correta',\n markIncorrect: 'Incorreta',\n pending: 'Pendente',\n correctYes: 'Sim',\n correctNo: 'Não',\n isCorrectQuestionLabel: 'Resposta está correta?',\n observationLabel: 'Incluir observação',\n saveCorrection: 'Salvar correção',\n saving: 'Salvando...',\n };\n"],"mappings":";AAiCO,IAAM,iBAAsC;AAAA,EACjD,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,gBAAgB;AAClB;AA6EO,IAAM,6BAAuD;AAAA,EAClE,OAAO;AAAA,EACP,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,cAAc;AAChB;AA4FO,IAAM,sCACX;AAAA,EACE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,qBAAqB;AAAA,EACrB,aAAa;AAAA,EACb,eAAe;AAAA,EACf,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,wBAAwB;AAAA,EACxB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,QAAQ;AACV;","names":[]}