@magmamath/students-features 1.3.4-rc.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +2 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +1 -1
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
- package/dist/commonjs/features/pmProgress/PmProgress.js +42 -0
- package/dist/commonjs/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +24 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js +2 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +44 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js +26 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +91 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +38 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +21 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js +55 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js +49 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js +23 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js +79 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js +50 -0
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js +127 -0
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +133 -0
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +126 -0
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +70 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +99 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +72 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +82 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +207 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +139 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +96 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +101 -0
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +134 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +203 -0
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -0
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js +18 -0
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js.map +1 -0
- package/dist/commonjs/features/pmProgress/index.js +64 -0
- package/dist/commonjs/features/pmProgress/index.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js +15 -0
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js +22 -0
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js +18 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +43 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +47 -0
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js +104 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +176 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +52 -0
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +65 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +234 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js +12 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js.map +1 -0
- package/dist/commonjs/features/voice/constants.js +3 -15
- package/dist/commonjs/features/voice/constants.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +5 -19
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +26 -81
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +0 -5
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/features/voice/types.js +0 -6
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/index.js +15 -3
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/MenuIcon.js +30 -0
- package/dist/commonjs/shared/icons/MenuIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/PentagonIcon.js +29 -0
- package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js +29 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/StarIcon.js +32 -0
- package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
- package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +24 -0
- package/dist/commonjs/shared/translation/localization/de.json +24 -0
- package/dist/commonjs/shared/translation/localization/en.json +24 -0
- package/dist/commonjs/shared/translation/localization/gb.json +24 -0
- package/dist/commonjs/shared/translation/localization/sct.json +24 -0
- package/dist/commonjs/shared/translation/localization/sw.json +24 -0
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +2 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +2 -2
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
- package/dist/module/features/pmProgress/PmProgress.js +36 -0
- package/dist/module/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js +17 -0
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/chart.types.js +2 -0
- package/dist/module/features/pmProgress/components/chart/chart.types.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +38 -0
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js +20 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +85 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +32 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +15 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js +49 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js +44 -0
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js +18 -0
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js +74 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/components/content/PmContent.js +44 -0
- package/dist/module/features/pmProgress/components/content/PmContent.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/NextUp.js +121 -0
- package/dist/module/features/pmProgress/components/header/NextUp.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +126 -0
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/StartButton.js +119 -0
- package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js +63 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +94 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js +66 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js +76 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js +200 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js +132 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +90 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js +95 -0
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +128 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
- package/dist/module/features/pmProgress/components/standard/StandardTag.js +197 -0
- package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -0
- package/dist/module/features/pmProgress/context/PmProgressContext.js +13 -0
- package/dist/module/features/pmProgress/context/PmProgressContext.js.map +1 -0
- package/dist/module/features/pmProgress/index.js +9 -0
- package/dist/module/features/pmProgress/index.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmHighlightModel.js +10 -0
- package/dist/module/features/pmProgress/model/PmHighlightModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmInsightsModel.js +17 -0
- package/dist/module/features/pmProgress/model/PmInsightsModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmProgressApi.js +13 -0
- package/dist/module/features/pmProgress/model/PmProgressApi.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmProgressModel.js +38 -0
- package/dist/module/features/pmProgress/model/PmProgressModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +42 -0
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js +99 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js +171 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js +47 -0
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +62 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +214 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js +8 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js.map +1 -0
- package/dist/module/features/voice/constants.js +2 -14
- package/dist/module/features/voice/constants.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecord.js +6 -20
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +28 -83
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +0 -5
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/features/voice/types.js +1 -5
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/MenuIcon.js +22 -0
- package/dist/module/shared/icons/MenuIcon.js.map +1 -0
- package/dist/module/shared/icons/PentagonIcon.js +21 -0
- package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/module/shared/icons/SketchArrowRight.js +25 -0
- package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js +21 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/module/shared/icons/StarIcon.js +24 -0
- package/dist/module/shared/icons/StarIcon.js.map +1 -0
- package/dist/module/shared/icons/TimerIcon.js +27 -0
- package/dist/module/shared/icons/TimerIcon.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +24 -0
- package/dist/module/shared/translation/localization/de.json +24 -0
- package/dist/module/shared/translation/localization/en.json +24 -0
- package/dist/module/shared/translation/localization/gb.json +24 -0
- package/dist/module/shared/translation/localization/sct.json +24 -0
- package/dist/module/shared/translation/localization/sw.json +24 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts +36 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts +31 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts +15 -0
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts +23 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts +22 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +25 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +49 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +73 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts +193 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts +2 -12
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +3 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/types.d.ts +0 -4
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/MenuIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/MenuIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +144 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +48 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts +36 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts +31 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts +15 -0
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts +7 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts +23 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts +22 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +25 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +49 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +73 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts +193 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/constants.d.ts +2 -12
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +3 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/types.d.ts +0 -4
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/MenuIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/MenuIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +144 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +48 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +21 -13
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +2 -1
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +2 -1
- package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +2 -2
- package/src/features/pmProgress/PmProgress.tsx +30 -0
- package/src/features/pmProgress/__tests__/.keep +0 -0
- package/src/features/pmProgress/components/chart/chart.helpers.ts +16 -0
- package/src/features/pmProgress/components/chart/chart.types.ts +37 -0
- package/src/features/pmProgress/components/chart/components/PracticeProgressPieChart.tsx +32 -0
- package/src/features/pmProgress/components/chart/components/SlicesClipPaths.tsx +22 -0
- package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +90 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceArcPattern.tsx +44 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.tsx +11 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceFillColor.tsx +60 -0
- package/src/features/pmProgress/components/chart/model/ArcPatternGenerator.ts +48 -0
- package/src/features/pmProgress/components/chart/model/PieChartManager.ts +17 -0
- package/src/features/pmProgress/components/chart/model/SliceShapeGenerator.ts +90 -0
- package/src/features/pmProgress/components/content/PmContent.tsx +44 -0
- package/src/features/pmProgress/components/header/NextUp.tsx +109 -0
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +135 -0
- package/src/features/pmProgress/components/header/StartButton.tsx +160 -0
- package/src/features/pmProgress/components/insights/PmInsights.tsx +65 -0
- package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +88 -0
- package/src/features/pmProgress/components/insights/StatsCard.tsx +54 -0
- package/src/features/pmProgress/components/list/Fluency.tsx +72 -0
- package/src/features/pmProgress/components/list/ListCard.tsx +231 -0
- package/src/features/pmProgress/components/list/ListItem.tsx +164 -0
- package/src/features/pmProgress/components/list/PmDomainList.tsx +76 -0
- package/src/features/pmProgress/components/locked/PmStatusOverlay.tsx +101 -0
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +127 -0
- package/src/features/pmProgress/components/standard/StandardTag.tsx +181 -0
- package/src/features/pmProgress/context/PmProgressContext.tsx +26 -0
- package/src/features/pmProgress/index.ts +6 -0
- package/src/features/pmProgress/model/PmHighlightModel.ts +11 -0
- package/src/features/pmProgress/model/PmInsightsModel.ts +23 -0
- package/src/features/pmProgress/model/PmProgressApi.ts +34 -0
- package/src/features/pmProgress/model/PmProgressModel.ts +48 -0
- package/src/features/pmProgress/model/PmRecommendationsModel.ts +47 -0
- package/src/features/pmProgress/model/PmSolvingFlowModel.ts +140 -0
- package/src/features/pmProgress/model/PmTreeModel.ts +171 -0
- package/src/features/pmProgress/shared/TreeNormalizer.ts +64 -0
- package/src/features/pmProgress/shared/pmProgress.constants.ts +100 -0
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +307 -0
- package/src/features/pmProgress/shared/pmProgress.types.ts +217 -0
- package/src/features/voice/constants.ts +2 -14
- package/src/features/voice/recording/components/VoiceRecord.tsx +5 -28
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +30 -114
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +2 -2
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +4 -8
- package/src/features/voice/recording/model/VoiceRecord.model.ts +0 -7
- package/src/features/voice/types.ts +0 -5
- package/src/index.ts +1 -0
- package/src/shared/icons/MenuIcon.tsx +15 -0
- package/src/shared/icons/PentagonIcon.tsx +14 -0
- package/src/shared/icons/SketchArrowRight.tsx +18 -0
- package/src/shared/icons/SliceDiamondIcon.tsx +14 -0
- package/src/shared/icons/StarIcon.tsx +17 -0
- package/src/shared/icons/TimerIcon.tsx +21 -0
- package/src/shared/translation/localization/ca.json +24 -0
- package/src/shared/translation/localization/de.json +24 -0
- package/src/shared/translation/localization/en.json +24 -0
- package/src/shared/translation/localization/gb.json +24 -0
- package/src/shared/translation/localization/sct.json +24 -0
- package/src/shared/translation/localization/sw.json +24 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useUnit } from 'effector-react'
|
|
3
|
+
import { StyleSheet, View } from 'react-native'
|
|
4
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
5
|
+
import { PmTeacherRecs } from '../recs/PmTeacherRecs'
|
|
6
|
+
import { PmDomainList } from '../list/PmDomainList'
|
|
7
|
+
import { PmInsights } from '../insights/PmInsights'
|
|
8
|
+
import { PmStatusOverlay } from '../locked/PmStatusOverlay'
|
|
9
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
10
|
+
import { PmProgressStatus } from '@magmamath/students-features'
|
|
11
|
+
|
|
12
|
+
export const PmProgressContent = () => {
|
|
13
|
+
const { model } = usePmProgress()
|
|
14
|
+
const status = useUnit(model.tree.$status)
|
|
15
|
+
|
|
16
|
+
if (status) {
|
|
17
|
+
return <PmStatusOverlay status={status} />
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={styles.content}>
|
|
22
|
+
<View style={styles.column}>
|
|
23
|
+
<PmTeacherRecs />
|
|
24
|
+
<PmDomainList />
|
|
25
|
+
</View>
|
|
26
|
+
|
|
27
|
+
<PmInsights />
|
|
28
|
+
</View>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
content: {
|
|
34
|
+
flex: 1,
|
|
35
|
+
flexDirection: 'row',
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
},
|
|
38
|
+
column: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
overflow: 'hidden',
|
|
41
|
+
marginRight: SPACING[500],
|
|
42
|
+
gap: SPACING[200],
|
|
43
|
+
},
|
|
44
|
+
})
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
|
|
5
|
+
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
6
|
+
import { useText } from '../../../../shared/translation'
|
|
7
|
+
import { useUnit, useStoreMap } from 'effector-react'
|
|
8
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
9
|
+
import { isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
10
|
+
import { OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
|
|
11
|
+
import { StartButton } from './StartButton'
|
|
12
|
+
|
|
13
|
+
export const NextUp = () => {
|
|
14
|
+
const t = useText()
|
|
15
|
+
const { model, onStartPress } = usePmProgress()
|
|
16
|
+
|
|
17
|
+
const status = useUnit(model.tree.$status)
|
|
18
|
+
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
19
|
+
|
|
20
|
+
const nextUp = useStoreMap(model.tree.$domains, (domains) =>
|
|
21
|
+
domains.find((domain) => {
|
|
22
|
+
const isFluency = isFluencyDomain(domain.title)
|
|
23
|
+
const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
|
|
24
|
+
return !isFluency && !isDomainCompleted
|
|
25
|
+
}),
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const isLoading = loaderOpeningId === OpeningLoaderId.START_BUTTON
|
|
29
|
+
const isSkillOpeningActionPending = !!(loaderOpeningId !== null || status)
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View style={styles.container}>
|
|
33
|
+
{nextUp && !status && (
|
|
34
|
+
<>
|
|
35
|
+
<View style={styles.content}>
|
|
36
|
+
<View style={styles.subtitle}>
|
|
37
|
+
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
38
|
+
{t('pmProgress.nextUp')}
|
|
39
|
+
</Typography>
|
|
40
|
+
</View>
|
|
41
|
+
<View style={[styles.row, styles.tilted]}>
|
|
42
|
+
<Typography variant={HeadingVariants.H7} style={styles.muted}>
|
|
43
|
+
{nextUp?.title}
|
|
44
|
+
</Typography>
|
|
45
|
+
<View style={styles.diamond}>
|
|
46
|
+
<SliceDiamondIcon color={nextUp?.color} />
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
</View>
|
|
50
|
+
<View style={styles.arrow}>
|
|
51
|
+
<SketchArrowRight />
|
|
52
|
+
</View>
|
|
53
|
+
</>
|
|
54
|
+
)}
|
|
55
|
+
|
|
56
|
+
<StartButton
|
|
57
|
+
onPress={async () => {
|
|
58
|
+
try {
|
|
59
|
+
model.solving.setLoaderOpeningId(OpeningLoaderId.START_BUTTON)
|
|
60
|
+
const skill = await model.solving.start({ type: SolvingFlow.MAGMA })
|
|
61
|
+
await onStartPress?.(skill)
|
|
62
|
+
} finally {
|
|
63
|
+
model.solving.setLoaderOpeningId(null)
|
|
64
|
+
}
|
|
65
|
+
}}
|
|
66
|
+
disabled={isSkillOpeningActionPending}
|
|
67
|
+
isLoading={isLoading}
|
|
68
|
+
isActive={isLoading}
|
|
69
|
+
withPulsation={!!nextUp && !isLoading && !isSkillOpeningActionPending && !status}
|
|
70
|
+
/>
|
|
71
|
+
</View>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
container: {
|
|
77
|
+
flexDirection: 'row',
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
gap: SPACING[400],
|
|
80
|
+
},
|
|
81
|
+
content: {
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
gap: SPACING[100],
|
|
84
|
+
},
|
|
85
|
+
dark: {
|
|
86
|
+
color: COLORS.NEUTRAL_9,
|
|
87
|
+
},
|
|
88
|
+
subtitle: {
|
|
89
|
+
transform: [{ rotate: '355deg' }],
|
|
90
|
+
marginRight: SPACING[300],
|
|
91
|
+
},
|
|
92
|
+
tilted: {
|
|
93
|
+
transform: [{ rotate: '355deg' }],
|
|
94
|
+
},
|
|
95
|
+
row: {
|
|
96
|
+
flexDirection: 'row',
|
|
97
|
+
gap: SPACING[100],
|
|
98
|
+
},
|
|
99
|
+
muted: {
|
|
100
|
+
color: COLORS.NEUTRAL_8,
|
|
101
|
+
},
|
|
102
|
+
diamond: {
|
|
103
|
+
bottom: 10,
|
|
104
|
+
transform: [{ rotate: '5deg' }],
|
|
105
|
+
},
|
|
106
|
+
arrow: {
|
|
107
|
+
transform: [{ rotate: '358deg' }],
|
|
108
|
+
},
|
|
109
|
+
})
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { Platform, StyleSheet, TextStyle, useWindowDimensions, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonVariant,
|
|
6
|
+
CaretDownIcon,
|
|
7
|
+
CaretUpIcon,
|
|
8
|
+
COLORS,
|
|
9
|
+
Dropdown,
|
|
10
|
+
HeadingVariants,
|
|
11
|
+
Menu,
|
|
12
|
+
MenuItemProps,
|
|
13
|
+
SPACING,
|
|
14
|
+
Typography,
|
|
15
|
+
} from '@magmamath/react-native-ui'
|
|
16
|
+
import { isWeb } from '../../../../shared/common.constants'
|
|
17
|
+
import { useText } from '../../../../shared/translation'
|
|
18
|
+
import { useUnit, useStoreMap } from 'effector-react'
|
|
19
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
20
|
+
import { formatGradeLabel } from '../../shared/pmProgress.helpers'
|
|
21
|
+
import { MenuIcon } from '../../../../shared/icons/MenuIcon'
|
|
22
|
+
import { NextUp } from './NextUp'
|
|
23
|
+
import { BURGER_MENU_BREAKPOINT, MENU_MAX_HEIGHT } from '@magmamath/students-features'
|
|
24
|
+
|
|
25
|
+
const menuItemProps: MenuItemProps = {
|
|
26
|
+
style: {
|
|
27
|
+
text: { whiteSpace: 'nowrap' } as TextStyle,
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const PmProgressHeader = () => {
|
|
32
|
+
const t = useText()
|
|
33
|
+
const { model, customGradeLabels, readOnly, onMenuPress } = usePmProgress()
|
|
34
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState(false)
|
|
35
|
+
const dimensions = useWindowDimensions()
|
|
36
|
+
const withMenuButton = isWeb && dimensions.width <= BURGER_MENU_BREAKPOINT
|
|
37
|
+
|
|
38
|
+
const grade = useUnit(model.tree.$grade)
|
|
39
|
+
const grades = useStoreMap({
|
|
40
|
+
store: model.tree.$grades,
|
|
41
|
+
keys: [customGradeLabels],
|
|
42
|
+
fn: (grades) =>
|
|
43
|
+
grades.map((grade) => ({
|
|
44
|
+
key: grade.value,
|
|
45
|
+
title: formatGradeLabel(grade.value, customGradeLabels),
|
|
46
|
+
disabled: grade.isLocked,
|
|
47
|
+
...menuItemProps,
|
|
48
|
+
})),
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<View style={styles.container}>
|
|
53
|
+
<View style={styles.title}>
|
|
54
|
+
{withMenuButton && (
|
|
55
|
+
<View style={styles.burgerMenu}>
|
|
56
|
+
<Button
|
|
57
|
+
onPress={onMenuPress}
|
|
58
|
+
variant={ButtonVariant.TERTIARY}
|
|
59
|
+
icon={<MenuIcon size={24} />}
|
|
60
|
+
/>
|
|
61
|
+
</View>
|
|
62
|
+
)}
|
|
63
|
+
|
|
64
|
+
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
65
|
+
{t('pmProgress.title')}
|
|
66
|
+
</Typography>
|
|
67
|
+
<Dropdown
|
|
68
|
+
isOpen={isDropdownOpen}
|
|
69
|
+
onDismiss={() => setIsDropdownOpen(false)}
|
|
70
|
+
anchor={
|
|
71
|
+
<Button
|
|
72
|
+
variant={ButtonVariant.TERTIARY}
|
|
73
|
+
onPress={() => setIsDropdownOpen((prev) => !prev)}
|
|
74
|
+
>
|
|
75
|
+
<Typography variant={HeadingVariants.H8} style={styles.dark}>
|
|
76
|
+
{grade !== null
|
|
77
|
+
? formatGradeLabel(grade, customGradeLabels)
|
|
78
|
+
: t('pmProgress.grade')}
|
|
79
|
+
</Typography>
|
|
80
|
+
<View style={styles.caret}>
|
|
81
|
+
{isDropdownOpen ? (
|
|
82
|
+
<CaretUpIcon color={COLORS.NEUTRAL_9} />
|
|
83
|
+
) : (
|
|
84
|
+
<CaretDownIcon color={COLORS.NEUTRAL_9} />
|
|
85
|
+
)}
|
|
86
|
+
</View>
|
|
87
|
+
</Button>
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
<Menu
|
|
91
|
+
style={styles.menu}
|
|
92
|
+
items={grades}
|
|
93
|
+
onItemPress={(item) => {
|
|
94
|
+
model.tree.setGrade(item.key as number)
|
|
95
|
+
setIsDropdownOpen(false)
|
|
96
|
+
}}
|
|
97
|
+
/>
|
|
98
|
+
</Dropdown>
|
|
99
|
+
</View>
|
|
100
|
+
|
|
101
|
+
{!readOnly && <NextUp />}
|
|
102
|
+
</View>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const styles = StyleSheet.create({
|
|
107
|
+
container: {
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
justifyContent: 'space-between',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
marginBottom: SPACING[400],
|
|
112
|
+
zIndex: 1,
|
|
113
|
+
},
|
|
114
|
+
burgerMenu: {
|
|
115
|
+
marginRight: SPACING[200],
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
gap: SPACING[200],
|
|
121
|
+
},
|
|
122
|
+
dark: {
|
|
123
|
+
color: COLORS.NEUTRAL_9,
|
|
124
|
+
},
|
|
125
|
+
caret: {
|
|
126
|
+
marginLeft: SPACING[100],
|
|
127
|
+
},
|
|
128
|
+
menu: {
|
|
129
|
+
top: SPACING[100],
|
|
130
|
+
minWidth: 110,
|
|
131
|
+
overflow: 'scroll',
|
|
132
|
+
maxHeight: MENU_MAX_HEIGHT,
|
|
133
|
+
...Platform.select({ web: { scrollbarWidth: 'none' } }),
|
|
134
|
+
},
|
|
135
|
+
})
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
+
import { Animated, StyleSheet, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
ButtonColor,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
COLORS,
|
|
9
|
+
HeadingVariants,
|
|
10
|
+
PlayIcon,
|
|
11
|
+
SPACING,
|
|
12
|
+
Typography,
|
|
13
|
+
} from '@magmamath/react-native-ui'
|
|
14
|
+
import { useText } from '../../../../shared/translation'
|
|
15
|
+
|
|
16
|
+
const PULSATION_COLOR = '#FFBE4E66'
|
|
17
|
+
const PULSE_OVERFLOW_X = 16
|
|
18
|
+
const PULSE_OVERFLOW_Y = 18
|
|
19
|
+
const PULSE_OFFSET_TOP = -6
|
|
20
|
+
const PULSE_OFFSET_LEFT = -8
|
|
21
|
+
const PULSE_DURATION = 1000
|
|
22
|
+
const PULSE_DELAY = 1000
|
|
23
|
+
const MIN_SCALE_X = 0.7
|
|
24
|
+
|
|
25
|
+
type Sizes = {
|
|
26
|
+
width: number
|
|
27
|
+
height: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type StartButtonProps = {
|
|
31
|
+
onPress: () => void
|
|
32
|
+
disabled: boolean
|
|
33
|
+
isLoading: boolean
|
|
34
|
+
isActive: boolean
|
|
35
|
+
withPulsation?: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const StartButton = ({
|
|
39
|
+
onPress,
|
|
40
|
+
disabled,
|
|
41
|
+
isLoading,
|
|
42
|
+
isActive,
|
|
43
|
+
withPulsation,
|
|
44
|
+
}: StartButtonProps) => {
|
|
45
|
+
const t = useText()
|
|
46
|
+
const [sizes, setSizes] = useState<Sizes | null>(null)
|
|
47
|
+
const [aspectRatio, setAspectRatio] = useState<number | null>(null)
|
|
48
|
+
const showPulsation = withPulsation && sizes && aspectRatio
|
|
49
|
+
|
|
50
|
+
const scaleAnimValue = useRef(new Animated.Value(0)).current
|
|
51
|
+
const fadeAnimValue = useRef(new Animated.Value(1)).current
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (!sizes || !withPulsation) return
|
|
55
|
+
|
|
56
|
+
const scaleAnimation = Animated.timing(scaleAnimValue, {
|
|
57
|
+
toValue: 1,
|
|
58
|
+
duration: PULSE_DURATION,
|
|
59
|
+
useNativeDriver: true,
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
const fadeOutAnimation = Animated.timing(fadeAnimValue, {
|
|
63
|
+
toValue: 0,
|
|
64
|
+
duration: PULSE_DURATION,
|
|
65
|
+
useNativeDriver: true,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
const pulsation = Animated.loop(
|
|
69
|
+
Animated.sequence([scaleAnimation, Animated.delay(PULSE_DELAY), fadeOutAnimation]),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
pulsation.start()
|
|
73
|
+
|
|
74
|
+
return () => {
|
|
75
|
+
pulsation.stop()
|
|
76
|
+
scaleAnimValue.setValue(0)
|
|
77
|
+
fadeAnimValue.setValue(1)
|
|
78
|
+
}
|
|
79
|
+
}, [sizes, withPulsation])
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<View
|
|
83
|
+
style={styles.container}
|
|
84
|
+
onLayout={(event) => {
|
|
85
|
+
setSizes({
|
|
86
|
+
width: event.nativeEvent.layout.width + PULSE_OVERFLOW_X,
|
|
87
|
+
height: event.nativeEvent.layout.height + PULSE_OVERFLOW_Y,
|
|
88
|
+
})
|
|
89
|
+
setAspectRatio(event.nativeEvent.layout.width / event.nativeEvent.layout.height)
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
{showPulsation && (
|
|
93
|
+
<Animated.View
|
|
94
|
+
style={[
|
|
95
|
+
styles.animatedBackground,
|
|
96
|
+
{
|
|
97
|
+
width: sizes.width,
|
|
98
|
+
height: sizes.height,
|
|
99
|
+
top: PULSE_OFFSET_TOP,
|
|
100
|
+
left: PULSE_OFFSET_LEFT,
|
|
101
|
+
transform: [
|
|
102
|
+
{
|
|
103
|
+
scaleX: scaleAnimValue.interpolate({
|
|
104
|
+
inputRange: [0, 1],
|
|
105
|
+
outputRange: [
|
|
106
|
+
aspectRatio / 10 > MIN_SCALE_X ? MIN_SCALE_X : aspectRatio / 10,
|
|
107
|
+
1,
|
|
108
|
+
],
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
scaleY: scaleAnimValue.interpolate({
|
|
113
|
+
inputRange: [0, 1],
|
|
114
|
+
outputRange: [0, 1],
|
|
115
|
+
}),
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
opacity: fadeAnimValue,
|
|
119
|
+
},
|
|
120
|
+
]}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
<Button
|
|
124
|
+
onPress={onPress}
|
|
125
|
+
disabled={disabled}
|
|
126
|
+
isLoading={isLoading}
|
|
127
|
+
isActive={isActive}
|
|
128
|
+
icon={<PlayIcon size={16} color={COLORS.NEUTRAL_1} />}
|
|
129
|
+
variant={ButtonVariant.PRIMARY}
|
|
130
|
+
size={ButtonSize.LARGE}
|
|
131
|
+
colorScheme={ButtonColor.YELLOW}
|
|
132
|
+
raiseLevel={6}
|
|
133
|
+
style={{ container: styles.startButton }}
|
|
134
|
+
>
|
|
135
|
+
<Typography variant={HeadingVariants.H6} style={styles.startButtonText}>
|
|
136
|
+
{t('pmProgress.startButton')}
|
|
137
|
+
</Typography>
|
|
138
|
+
</Button>
|
|
139
|
+
</View>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const styles = StyleSheet.create({
|
|
144
|
+
container: {
|
|
145
|
+
marginRight: SPACING[200],
|
|
146
|
+
},
|
|
147
|
+
startButton: {
|
|
148
|
+
minWidth: 145,
|
|
149
|
+
},
|
|
150
|
+
startButtonText: {
|
|
151
|
+
fontWeight: '700',
|
|
152
|
+
textTransform: 'uppercase',
|
|
153
|
+
color: COLORS.NEUTRAL_1,
|
|
154
|
+
},
|
|
155
|
+
animatedBackground: {
|
|
156
|
+
backgroundColor: PULSATION_COLOR,
|
|
157
|
+
position: 'absolute',
|
|
158
|
+
borderRadius: 50,
|
|
159
|
+
},
|
|
160
|
+
})
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react'
|
|
2
|
+
import { useStoreMap } from 'effector-react'
|
|
3
|
+
import { LayoutChangeEvent, StyleSheet, View } from 'react-native'
|
|
4
|
+
import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui'
|
|
5
|
+
import { PracticeProgressPieChart } from '../chart/components/PracticeProgressPieChart'
|
|
6
|
+
import { PmTimeframeStats } from './PmTimeframeStats'
|
|
7
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
8
|
+
import { createChartConfig } from '../../shared/pmProgress.helpers'
|
|
9
|
+
import {
|
|
10
|
+
EMPTY_PIE_CHART_DATA,
|
|
11
|
+
MAX_PIE_CHART_SIZE,
|
|
12
|
+
STATS_MAX_HEIGHT,
|
|
13
|
+
} from '../../shared/pmProgress.constants'
|
|
14
|
+
|
|
15
|
+
export const PmInsights = () => {
|
|
16
|
+
const { model } = usePmProgress()
|
|
17
|
+
const [chartSize, setChartSize] = useState(MAX_PIE_CHART_SIZE)
|
|
18
|
+
const chartData = useStoreMap(model.tree.$domains, (domains) =>
|
|
19
|
+
domains.map((domain) => ({
|
|
20
|
+
value: 1,
|
|
21
|
+
fillPercent: Math.round(domain.scorePercentage),
|
|
22
|
+
fillColor: domain.color,
|
|
23
|
+
borderColor: domain.borderColor,
|
|
24
|
+
backgroundColor: domain.backgroundColor,
|
|
25
|
+
})),
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const chartConfig = useMemo(() => {
|
|
29
|
+
const size = Math.max(0, chartSize - SPACING[400])
|
|
30
|
+
return createChartConfig(size)
|
|
31
|
+
}, [chartSize])
|
|
32
|
+
|
|
33
|
+
const measureLayout = (event: LayoutChangeEvent) => {
|
|
34
|
+
const height = event.nativeEvent.layout.height
|
|
35
|
+
const size = Math.min(height - STATS_MAX_HEIGHT - SPACING[800], MAX_PIE_CHART_SIZE)
|
|
36
|
+
setChartSize(size)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<View style={styles.container} onLayout={measureLayout}>
|
|
41
|
+
<View style={[styles.chart, { width: chartSize, height: chartSize }]}>
|
|
42
|
+
<PracticeProgressPieChart
|
|
43
|
+
data={chartData.length > 0 ? chartData : EMPTY_PIE_CHART_DATA}
|
|
44
|
+
config={chartConfig}
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
<PmTimeframeStats />
|
|
48
|
+
</View>
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
container: {
|
|
54
|
+
height: '100%',
|
|
55
|
+
},
|
|
56
|
+
chart: {
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
justifyContent: 'center',
|
|
59
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
60
|
+
borderRadius: BORDER_RADIUS[250],
|
|
61
|
+
padding: SPACING[400],
|
|
62
|
+
marginBottom: SPACING[400],
|
|
63
|
+
marginTop: SPACING[400],
|
|
64
|
+
},
|
|
65
|
+
})
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
COLORS,
|
|
5
|
+
SelectGroup,
|
|
6
|
+
SelectOptionColor,
|
|
7
|
+
SelectOptionProps,
|
|
8
|
+
SPACING,
|
|
9
|
+
} from '@magmamath/react-native-ui'
|
|
10
|
+
import { StatsCard } from './StatsCard'
|
|
11
|
+
import { StarIcon } from '../../../../shared/icons/StarIcon'
|
|
12
|
+
import { TimerIcon } from '../../../../shared/icons/TimerIcon'
|
|
13
|
+
import { BORDER_RADIUS } from '@magmamath/react-native-ui'
|
|
14
|
+
import { useText } from '../../../../shared/translation'
|
|
15
|
+
import { useUnit } from 'effector-react'
|
|
16
|
+
import { formatTime } from '../../shared/pmProgress.helpers'
|
|
17
|
+
import { InsightsTimeframe, STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
|
|
18
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
19
|
+
|
|
20
|
+
export const PmTimeframeStats = () => {
|
|
21
|
+
const t = useText()
|
|
22
|
+
const { model } = usePmProgress()
|
|
23
|
+
const timeframe = useUnit(model.insights.$timeframe)
|
|
24
|
+
const insights = useUnit(model.insights.$insights)
|
|
25
|
+
|
|
26
|
+
const OPTIONS: SelectOptionProps[] = [
|
|
27
|
+
{ key: InsightsTimeframe.WEEK, title: t('pmProgress.thisWeek') },
|
|
28
|
+
{ key: InsightsTimeframe.LAST_WEEK, title: t('pmProgress.lastWeek') },
|
|
29
|
+
{ key: InsightsTimeframe.ALL, title: t('pmProgress.allTime') },
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View style={styles.container}>
|
|
34
|
+
<View style={styles.content}>
|
|
35
|
+
<View style={styles.cards}>
|
|
36
|
+
<StatsCard
|
|
37
|
+
value={insights?.numberOfStars ?? 0}
|
|
38
|
+
label={t('pmProgress.stars')}
|
|
39
|
+
color={COLORS.PRIMARY_YELLOW}
|
|
40
|
+
icon={<StarIcon />}
|
|
41
|
+
/>
|
|
42
|
+
<StatsCard
|
|
43
|
+
value={formatTime(insights?.timeInPracticeMs ?? 0)}
|
|
44
|
+
label={t('pmProgress.time')}
|
|
45
|
+
color={COLORS.PRIMARY_PURPLE}
|
|
46
|
+
iconStyle={styles.timeIcon}
|
|
47
|
+
icon={<TimerIcon />}
|
|
48
|
+
/>
|
|
49
|
+
</View>
|
|
50
|
+
|
|
51
|
+
<SelectGroup
|
|
52
|
+
color={SelectOptionColor.GREY}
|
|
53
|
+
options={OPTIONS}
|
|
54
|
+
selectedOptions={OPTIONS.filter(({ key }) => key === timeframe)}
|
|
55
|
+
onOptionChange={({ key }) => model.insights.setTimeframe(key as InsightsTimeframe)}
|
|
56
|
+
/>
|
|
57
|
+
</View>
|
|
58
|
+
</View>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
container: {
|
|
64
|
+
maxHeight: STATS_MAX_HEIGHT,
|
|
65
|
+
height: '100%',
|
|
66
|
+
padding: SPACING[200],
|
|
67
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
68
|
+
borderRadius: BORDER_RADIUS[300],
|
|
69
|
+
shadowColor: COLORS.NEUTRAL_9,
|
|
70
|
+
shadowOffset: { width: 0, height: 1 },
|
|
71
|
+
shadowOpacity: 0.1,
|
|
72
|
+
shadowRadius: 3,
|
|
73
|
+
elevation: 2,
|
|
74
|
+
},
|
|
75
|
+
content: {
|
|
76
|
+
gap: SPACING[100],
|
|
77
|
+
marginBottom: 4,
|
|
78
|
+
},
|
|
79
|
+
cards: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
justifyContent: 'space-between',
|
|
82
|
+
gap: SPACING[300],
|
|
83
|
+
},
|
|
84
|
+
timeIcon: {
|
|
85
|
+
paddingBottom: 2,
|
|
86
|
+
paddingLeft: 2,
|
|
87
|
+
},
|
|
88
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react'
|
|
2
|
+
import { View, StyleSheet, Text, ViewStyle } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type StatsCardProps = {
|
|
6
|
+
value: number | string
|
|
7
|
+
label: string
|
|
8
|
+
color: string
|
|
9
|
+
icon: ReactNode
|
|
10
|
+
iconStyle?: ViewStyle
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const StatsCard = ({ value, label, color, icon, iconStyle }: StatsCardProps) => {
|
|
14
|
+
return (
|
|
15
|
+
<View style={[styles.card, { borderColor: color }]}>
|
|
16
|
+
<View style={[styles.iconContainer, { backgroundColor: color }, iconStyle]}>{icon}</View>
|
|
17
|
+
<View>
|
|
18
|
+
<Text style={[styles.value, { color }]}>{value}</Text>
|
|
19
|
+
<Text style={styles.label}>{label}</Text>
|
|
20
|
+
</View>
|
|
21
|
+
</View>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const styles = StyleSheet.create({
|
|
26
|
+
card: {
|
|
27
|
+
flex: 1,
|
|
28
|
+
height: 65,
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
borderRadius: BORDER_RADIUS[300],
|
|
32
|
+
borderWidth: 4,
|
|
33
|
+
padding: SPACING[200],
|
|
34
|
+
gap: SPACING[200],
|
|
35
|
+
},
|
|
36
|
+
iconContainer: {
|
|
37
|
+
width: 42,
|
|
38
|
+
height: 42,
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
borderRadius: 100,
|
|
42
|
+
},
|
|
43
|
+
value: {
|
|
44
|
+
fontSize: 32,
|
|
45
|
+
fontWeight: '700',
|
|
46
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
47
|
+
},
|
|
48
|
+
label: {
|
|
49
|
+
color: COLORS.NEUTRAL_8,
|
|
50
|
+
fontSize: 12,
|
|
51
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
52
|
+
top: -6,
|
|
53
|
+
},
|
|
54
|
+
})
|