@magmamath/students-features 1.3.4-rc.2 → 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 -13
- 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 +20 -71
- 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 -12
- 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 +22 -73
- 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 -13
- package/src/features/voice/recording/components/VoiceRecord.tsx +5 -28
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +30 -99
- 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,72 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { ListCard } from './ListCard'
|
|
4
|
+
import { COLORS, SPACING } from '@magmamath/react-native-ui'
|
|
5
|
+
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
6
|
+
import { useText } from '../../../../shared/translation'
|
|
7
|
+
import { useUnit } from 'effector-react'
|
|
8
|
+
import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
9
|
+
import { Domain } from '../../shared/pmProgress.types'
|
|
10
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
11
|
+
|
|
12
|
+
type FluencyProps = {
|
|
13
|
+
data: Domain | undefined
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Fluency = ({ data }: FluencyProps) => {
|
|
17
|
+
const t = useText()
|
|
18
|
+
const { model, onStandardPress } = usePmProgress()
|
|
19
|
+
const expandedId = useUnit(model.highlight.$expandedId)
|
|
20
|
+
const hoveredId = useUnit(model.highlight.$hoveredId)
|
|
21
|
+
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
22
|
+
|
|
23
|
+
if (!data) return null
|
|
24
|
+
|
|
25
|
+
const isExpanded = expandedId === data.domainId
|
|
26
|
+
const isHighlighted = hoveredId === data.domainId || isExpanded
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<View style={styles.container}>
|
|
30
|
+
<View style={styles.separator} />
|
|
31
|
+
<ListCard
|
|
32
|
+
title={t('pmProgress.fluency')}
|
|
33
|
+
items={data.standards.map((standard) => ({ ...standard, id: standard.standardId }))}
|
|
34
|
+
progress={data.scorePercentage}
|
|
35
|
+
color={COLORS.PRIMARY_ORANGE}
|
|
36
|
+
onPress={() => model.highlight.expand(data.domainId)}
|
|
37
|
+
onHoverIn={() => model.highlight.hover(data.domainId)}
|
|
38
|
+
onHoverOut={() => model.highlight.hover(null)}
|
|
39
|
+
onItemPress={async (item) => {
|
|
40
|
+
try {
|
|
41
|
+
model.solving.setLoaderOpeningId(item.id)
|
|
42
|
+
const skill = await model.solving.start({
|
|
43
|
+
type: SolvingFlow.STANDARD,
|
|
44
|
+
standardId: item.standardId,
|
|
45
|
+
})
|
|
46
|
+
await onStandardPress?.(skill)
|
|
47
|
+
} finally {
|
|
48
|
+
model.solving.setLoaderOpeningId(null)
|
|
49
|
+
}
|
|
50
|
+
}}
|
|
51
|
+
loadingItemId={loaderOpeningId}
|
|
52
|
+
isFirst
|
|
53
|
+
isLast
|
|
54
|
+
isExpanded={isExpanded}
|
|
55
|
+
isHighlighted={isHighlighted}
|
|
56
|
+
icon={<SliceDiamondIcon color={COLORS.PRIMARY_ORANGE} />}
|
|
57
|
+
/>
|
|
58
|
+
</View>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
container: {
|
|
64
|
+
marginBottom: SPACING[800],
|
|
65
|
+
},
|
|
66
|
+
separator: {
|
|
67
|
+
height: 1,
|
|
68
|
+
marginHorizontal: SPACING[100],
|
|
69
|
+
marginVertical: SPACING[200],
|
|
70
|
+
backgroundColor: COLORS.NEUTRAL_4,
|
|
71
|
+
},
|
|
72
|
+
})
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { Pressable, View, StyleSheet, Platform, ViewStyle } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
BORDER_RADIUS,
|
|
5
|
+
CaretDownIcon,
|
|
6
|
+
CaretRightIcon,
|
|
7
|
+
COLORS,
|
|
8
|
+
HeadingVariants,
|
|
9
|
+
SPACING,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@magmamath/react-native-ui'
|
|
12
|
+
import { ListItem } from './ListItem'
|
|
13
|
+
import { useText } from '../../../../shared/translation'
|
|
14
|
+
const HEADER_HEIGHT = 60
|
|
15
|
+
const PROGRESS_BAR_WIDTH = 50
|
|
16
|
+
const PROGRESS_BAR_HEIGHT = 10
|
|
17
|
+
|
|
18
|
+
export type ListCardItem = {
|
|
19
|
+
id: string
|
|
20
|
+
title: string
|
|
21
|
+
subtitle: string
|
|
22
|
+
isCompleted: boolean
|
|
23
|
+
skillsLeft: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getVisibleItems<T>(items: T[], maxItems?: number) {
|
|
27
|
+
const visible = maxItems != null ? items.slice(0, maxItems) : items
|
|
28
|
+
const remainingCount = maxItems != null ? Math.max(0, items.length - maxItems) : 0
|
|
29
|
+
return { visible, remainingCount }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type ListCardProps<T extends ListCardItem> = {
|
|
33
|
+
title: string
|
|
34
|
+
icon: React.ReactElement
|
|
35
|
+
color: string
|
|
36
|
+
items: T[]
|
|
37
|
+
onItemPress?: (item: T) => void
|
|
38
|
+
isExpanded?: boolean
|
|
39
|
+
onPress?: () => void
|
|
40
|
+
onHoverIn?: () => void
|
|
41
|
+
onHoverOut?: () => void
|
|
42
|
+
progress?: number
|
|
43
|
+
rightContent?: React.ReactNode
|
|
44
|
+
isFirst?: boolean
|
|
45
|
+
isLast?: boolean
|
|
46
|
+
maxItems?: number
|
|
47
|
+
expandedColor?: string
|
|
48
|
+
isSkillsLeftHidden?: boolean
|
|
49
|
+
isHighlighted?: boolean
|
|
50
|
+
loadingItemId?: string | null
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const ListCard = <T extends ListCardItem>({
|
|
54
|
+
title,
|
|
55
|
+
icon,
|
|
56
|
+
color,
|
|
57
|
+
items,
|
|
58
|
+
isExpanded = false,
|
|
59
|
+
isHighlighted = false,
|
|
60
|
+
onPress,
|
|
61
|
+
onHoverIn,
|
|
62
|
+
onHoverOut,
|
|
63
|
+
onItemPress,
|
|
64
|
+
progress = 0,
|
|
65
|
+
rightContent,
|
|
66
|
+
isFirst,
|
|
67
|
+
isLast,
|
|
68
|
+
maxItems,
|
|
69
|
+
expandedColor = COLORS.NEUTRAL_3,
|
|
70
|
+
isSkillsLeftHidden = false,
|
|
71
|
+
loadingItemId = null,
|
|
72
|
+
}: ListCardProps<T>) => {
|
|
73
|
+
const t = useText()
|
|
74
|
+
const [isHovered, setIsHovered] = useState(false)
|
|
75
|
+
|
|
76
|
+
const { visible: standards, remainingCount } = getVisibleItems(items, maxItems)
|
|
77
|
+
const withHighlight = isHovered || isExpanded || isHighlighted
|
|
78
|
+
|
|
79
|
+
const Caret = isExpanded ? CaretDownIcon : CaretRightIcon
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<View
|
|
83
|
+
style={[
|
|
84
|
+
styles.container,
|
|
85
|
+
!isFirst && styles.containerCollapsed,
|
|
86
|
+
isFirst && styles.containerFirst,
|
|
87
|
+
isLast && styles.containerLast,
|
|
88
|
+
withHighlight && { backgroundColor: expandedColor },
|
|
89
|
+
]}
|
|
90
|
+
>
|
|
91
|
+
<Pressable
|
|
92
|
+
style={[
|
|
93
|
+
styles.header,
|
|
94
|
+
isFirst && styles.headerFirst,
|
|
95
|
+
isLast && !isExpanded && styles.headerLast,
|
|
96
|
+
withHighlight && { backgroundColor: expandedColor },
|
|
97
|
+
]}
|
|
98
|
+
onPress={onPress}
|
|
99
|
+
onHoverIn={() => {
|
|
100
|
+
setIsHovered(true)
|
|
101
|
+
onHoverIn?.()
|
|
102
|
+
}}
|
|
103
|
+
onHoverOut={() => {
|
|
104
|
+
setIsHovered(false)
|
|
105
|
+
onHoverOut?.()
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
<View>{icon}</View>
|
|
109
|
+
|
|
110
|
+
<View style={styles.caret}>
|
|
111
|
+
<Caret color={COLORS.NEUTRAL_9} />
|
|
112
|
+
</View>
|
|
113
|
+
<Typography variant={HeadingVariants.H6} style={styles.title}>
|
|
114
|
+
{title}
|
|
115
|
+
</Typography>
|
|
116
|
+
{rightContent ?? (
|
|
117
|
+
<View style={styles.progress}>
|
|
118
|
+
<Typography variant={HeadingVariants.H7} style={[styles.percentage, { color }]}>
|
|
119
|
+
{Math.round(progress)}%
|
|
120
|
+
</Typography>
|
|
121
|
+
<View style={styles.track}>
|
|
122
|
+
<View
|
|
123
|
+
style={[styles.fill, { width: `${Math.round(progress)}%`, backgroundColor: color }]}
|
|
124
|
+
/>
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
)}
|
|
128
|
+
</Pressable>
|
|
129
|
+
{isExpanded && (
|
|
130
|
+
<View style={[styles.items, isLast && styles.itemsLast]}>
|
|
131
|
+
{standards.map((standard) => (
|
|
132
|
+
<ListItem
|
|
133
|
+
key={standard.id}
|
|
134
|
+
title={standard.title}
|
|
135
|
+
skillsLeft={standard.skillsLeft}
|
|
136
|
+
subtitle={standard.subtitle}
|
|
137
|
+
isFinished={standard.isCompleted}
|
|
138
|
+
isLoading={loadingItemId === standard.id}
|
|
139
|
+
isSkillsLeftHidden={isSkillsLeftHidden}
|
|
140
|
+
onPress={() => onItemPress?.(standard)}
|
|
141
|
+
/>
|
|
142
|
+
))}
|
|
143
|
+
{remainingCount > 0 && (
|
|
144
|
+
<Typography variant={HeadingVariants.H8} style={styles.moreText}>
|
|
145
|
+
{t('pmProgress.andMore', { count: `${remainingCount}` })}
|
|
146
|
+
</Typography>
|
|
147
|
+
)}
|
|
148
|
+
</View>
|
|
149
|
+
)}
|
|
150
|
+
</View>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const styles = StyleSheet.create({
|
|
155
|
+
container: {
|
|
156
|
+
justifyContent: 'center',
|
|
157
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
158
|
+
overflow: 'hidden',
|
|
159
|
+
...Platform.select({ web: { cursor: 'pointer' } as ViewStyle }),
|
|
160
|
+
},
|
|
161
|
+
containerCollapsed: {
|
|
162
|
+
marginTop: -1,
|
|
163
|
+
},
|
|
164
|
+
containerFirst: {
|
|
165
|
+
borderTopLeftRadius: BORDER_RADIUS[200],
|
|
166
|
+
borderTopRightRadius: BORDER_RADIUS[200],
|
|
167
|
+
},
|
|
168
|
+
containerLast: {
|
|
169
|
+
borderBottomLeftRadius: BORDER_RADIUS[200],
|
|
170
|
+
borderBottomRightRadius: BORDER_RADIUS[200],
|
|
171
|
+
},
|
|
172
|
+
header: {
|
|
173
|
+
flexDirection: 'row',
|
|
174
|
+
alignItems: 'center',
|
|
175
|
+
height: HEADER_HEIGHT,
|
|
176
|
+
padding: SPACING[400],
|
|
177
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
178
|
+
borderWidth: 1,
|
|
179
|
+
borderColor: COLORS.NEUTRAL_4,
|
|
180
|
+
...Platform.select({ web: { cursor: 'pointer' } as ViewStyle }),
|
|
181
|
+
},
|
|
182
|
+
headerFirst: {
|
|
183
|
+
borderTopLeftRadius: BORDER_RADIUS[200],
|
|
184
|
+
borderTopRightRadius: BORDER_RADIUS[200],
|
|
185
|
+
},
|
|
186
|
+
headerLast: {
|
|
187
|
+
borderBottomLeftRadius: BORDER_RADIUS[200],
|
|
188
|
+
borderBottomRightRadius: BORDER_RADIUS[200],
|
|
189
|
+
},
|
|
190
|
+
caret: {
|
|
191
|
+
marginLeft: SPACING[400],
|
|
192
|
+
},
|
|
193
|
+
title: {
|
|
194
|
+
color: COLORS.NEUTRAL_9,
|
|
195
|
+
marginLeft: SPACING[200],
|
|
196
|
+
flex: 1,
|
|
197
|
+
},
|
|
198
|
+
progress: {
|
|
199
|
+
flexDirection: 'row',
|
|
200
|
+
alignItems: 'center',
|
|
201
|
+
gap: SPACING[200],
|
|
202
|
+
},
|
|
203
|
+
percentage: {
|
|
204
|
+
textAlign: 'right',
|
|
205
|
+
},
|
|
206
|
+
track: {
|
|
207
|
+
width: PROGRESS_BAR_WIDTH,
|
|
208
|
+
height: PROGRESS_BAR_HEIGHT,
|
|
209
|
+
backgroundColor: COLORS.NEUTRAL_4,
|
|
210
|
+
borderRadius: BORDER_RADIUS[200],
|
|
211
|
+
overflow: 'hidden',
|
|
212
|
+
},
|
|
213
|
+
fill: {
|
|
214
|
+
height: '100%',
|
|
215
|
+
borderRadius: BORDER_RADIUS[200],
|
|
216
|
+
},
|
|
217
|
+
items: {
|
|
218
|
+
gap: SPACING[200],
|
|
219
|
+
padding: SPACING[200],
|
|
220
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
221
|
+
},
|
|
222
|
+
itemsLast: {
|
|
223
|
+
borderBottomLeftRadius: BORDER_RADIUS[200],
|
|
224
|
+
borderBottomRightRadius: BORDER_RADIUS[200],
|
|
225
|
+
},
|
|
226
|
+
moreText: {
|
|
227
|
+
textAlign: 'center',
|
|
228
|
+
color: COLORS.NEUTRAL_7,
|
|
229
|
+
marginVertical: SPACING[200],
|
|
230
|
+
},
|
|
231
|
+
})
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { ActivityIndicator, View, Pressable, StyleSheet, Text } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
ArrowRightIcon,
|
|
5
|
+
BORDER_RADIUS,
|
|
6
|
+
CheckIcon,
|
|
7
|
+
COLORS,
|
|
8
|
+
FONT_FAMILY,
|
|
9
|
+
HeadingVariants,
|
|
10
|
+
SHADOWS,
|
|
11
|
+
SPACING,
|
|
12
|
+
Typography,
|
|
13
|
+
} from '@magmamath/react-native-ui'
|
|
14
|
+
import { useText } from '../../../../shared/translation'
|
|
15
|
+
|
|
16
|
+
const CARD_HEIGHT = 52
|
|
17
|
+
const ICON_SIZE = 25
|
|
18
|
+
const SUBTITLE_FONT_SIZE = 10
|
|
19
|
+
const SUBTITLE_LINE_HEIGHT = 14
|
|
20
|
+
|
|
21
|
+
export type ListItemProps = {
|
|
22
|
+
title: string
|
|
23
|
+
subtitle: string
|
|
24
|
+
skillsLeft: number
|
|
25
|
+
isFinished?: boolean
|
|
26
|
+
isLoading?: boolean
|
|
27
|
+
onPress?: () => void
|
|
28
|
+
isSkillsLeftHidden?: boolean
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const ListItem = ({
|
|
32
|
+
title,
|
|
33
|
+
subtitle,
|
|
34
|
+
skillsLeft,
|
|
35
|
+
isFinished = false,
|
|
36
|
+
isLoading = false,
|
|
37
|
+
onPress,
|
|
38
|
+
isSkillsLeftHidden = false,
|
|
39
|
+
}: ListItemProps) => {
|
|
40
|
+
const t = useText()
|
|
41
|
+
const [isHovered, setIsHovered] = useState(false)
|
|
42
|
+
const isSkillsLeftVisible = skillsLeft > 0 && !isFinished && !isSkillsLeftHidden
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Pressable
|
|
46
|
+
onPress={onPress}
|
|
47
|
+
disabled={isLoading}
|
|
48
|
+
style={[
|
|
49
|
+
styles.card,
|
|
50
|
+
isFinished && styles.finished,
|
|
51
|
+
isHovered && styles.hovered,
|
|
52
|
+
isHovered && isFinished && styles.hoveredFinished,
|
|
53
|
+
isLoading && styles.loading,
|
|
54
|
+
]}
|
|
55
|
+
onHoverIn={() => setIsHovered(true)}
|
|
56
|
+
onHoverOut={() => setIsHovered(false)}
|
|
57
|
+
>
|
|
58
|
+
<View style={styles.content}>
|
|
59
|
+
<Typography
|
|
60
|
+
variant={HeadingVariants.H10}
|
|
61
|
+
style={[styles.title, isFinished && styles.titleFinished]}
|
|
62
|
+
numberOfLines={1}
|
|
63
|
+
>
|
|
64
|
+
{title}
|
|
65
|
+
</Typography>
|
|
66
|
+
<Typography
|
|
67
|
+
style={[styles.subtitle, isFinished && styles.subtitleFinished]}
|
|
68
|
+
numberOfLines={1}
|
|
69
|
+
>
|
|
70
|
+
{subtitle}
|
|
71
|
+
</Typography>
|
|
72
|
+
</View>
|
|
73
|
+
<View style={styles.trailing}>
|
|
74
|
+
{isLoading ? (
|
|
75
|
+
<View style={styles.loadingIndicator}>
|
|
76
|
+
<Text>{t('pmProgress.loading')} </Text>
|
|
77
|
+
<ActivityIndicator size="small" color={COLORS.NEUTRAL_7} />
|
|
78
|
+
</View>
|
|
79
|
+
) : (
|
|
80
|
+
<>
|
|
81
|
+
{isSkillsLeftVisible && (
|
|
82
|
+
<Typography variant={HeadingVariants.H10} style={styles.skills}>
|
|
83
|
+
{skillsLeft}{' '}
|
|
84
|
+
{skillsLeft === 1 ? t('pmProgress.skillLeft') : t('pmProgress.skillsLeft')}
|
|
85
|
+
</Typography>
|
|
86
|
+
)}
|
|
87
|
+
<View style={styles.icon}>
|
|
88
|
+
{isFinished ? (
|
|
89
|
+
<CheckIcon color={COLORS.PRIMARY_GREEN} />
|
|
90
|
+
) : (
|
|
91
|
+
<ArrowRightIcon color={COLORS.NEUTRAL_9} />
|
|
92
|
+
)}
|
|
93
|
+
</View>
|
|
94
|
+
</>
|
|
95
|
+
)}
|
|
96
|
+
</View>
|
|
97
|
+
</Pressable>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const styles = StyleSheet.create({
|
|
102
|
+
card: {
|
|
103
|
+
flexDirection: 'row',
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
height: CARD_HEIGHT,
|
|
106
|
+
paddingLeft: SPACING[800],
|
|
107
|
+
paddingRight: SPACING[400],
|
|
108
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
109
|
+
borderRadius: BORDER_RADIUS[300],
|
|
110
|
+
gap: SPACING[200],
|
|
111
|
+
...SHADOWS['1'],
|
|
112
|
+
},
|
|
113
|
+
finished: {
|
|
114
|
+
backgroundColor: COLORS.GREEN_1,
|
|
115
|
+
...SHADOWS['1'],
|
|
116
|
+
},
|
|
117
|
+
hovered: {
|
|
118
|
+
backgroundColor: COLORS.NEUTRAL_2,
|
|
119
|
+
boxShadow:
|
|
120
|
+
'0px 0px 1px 0px #33333366, 0px 1px 3px 0px #3333331A, 4px 4px 10px rgba(51, 51, 51, 0.15)',
|
|
121
|
+
},
|
|
122
|
+
hoveredFinished: {
|
|
123
|
+
backgroundColor: COLORS.GREEN_2,
|
|
124
|
+
},
|
|
125
|
+
content: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
},
|
|
128
|
+
title: {
|
|
129
|
+
color: COLORS.NEUTRAL_9,
|
|
130
|
+
},
|
|
131
|
+
titleFinished: {
|
|
132
|
+
color: COLORS.GREEN_7,
|
|
133
|
+
},
|
|
134
|
+
subtitle: {
|
|
135
|
+
color: COLORS.NEUTRAL_7,
|
|
136
|
+
fontSize: SUBTITLE_FONT_SIZE,
|
|
137
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
138
|
+
lineHeight: SUBTITLE_LINE_HEIGHT,
|
|
139
|
+
},
|
|
140
|
+
subtitleFinished: {
|
|
141
|
+
color: COLORS.GREEN_6,
|
|
142
|
+
},
|
|
143
|
+
trailing: {
|
|
144
|
+
flexDirection: 'row',
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
gap: 8,
|
|
147
|
+
},
|
|
148
|
+
skills: {
|
|
149
|
+
color: COLORS.NEUTRAL_9,
|
|
150
|
+
},
|
|
151
|
+
icon: {
|
|
152
|
+
width: ICON_SIZE,
|
|
153
|
+
height: ICON_SIZE,
|
|
154
|
+
justifyContent: 'center',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
},
|
|
157
|
+
loading: {
|
|
158
|
+
opacity: 0.5,
|
|
159
|
+
},
|
|
160
|
+
loadingIndicator: {
|
|
161
|
+
flexDirection: 'row',
|
|
162
|
+
gap: SPACING[200],
|
|
163
|
+
},
|
|
164
|
+
})
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { useUnit } from 'effector-react'
|
|
4
|
+
import { BORDER_RADIUS, COLORS, ScrollableList, SPACING } from '@magmamath/react-native-ui'
|
|
5
|
+
import { ListCard } from './ListCard'
|
|
6
|
+
import { Fluency } from './Fluency'
|
|
7
|
+
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
8
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
9
|
+
import { isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
10
|
+
import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
11
|
+
|
|
12
|
+
export const PmDomainList = () => {
|
|
13
|
+
const { model, onStandardPress } = usePmProgress()
|
|
14
|
+
const domains = useUnit(model.tree.$domains)
|
|
15
|
+
const expandedId = useUnit(model.highlight.$expandedId)
|
|
16
|
+
const hoveredId = useUnit(model.highlight.$hoveredId)
|
|
17
|
+
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
18
|
+
|
|
19
|
+
const fluency = domains.find(({ title }) => isFluencyDomain(title))
|
|
20
|
+
const list = fluency ? domains.filter(({ title }) => !isFluencyDomain(title)) : domains
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View style={styles.container}>
|
|
24
|
+
<ScrollableList
|
|
25
|
+
data={list}
|
|
26
|
+
hideShadow
|
|
27
|
+
scrollbarWidth={8}
|
|
28
|
+
style={styles.scroll}
|
|
29
|
+
ListFooterComponent={<Fluency data={fluency} />}
|
|
30
|
+
keyExtractor={(item) => item.domainId}
|
|
31
|
+
renderItem={({ item, index }) => (
|
|
32
|
+
<ListCard
|
|
33
|
+
title={item.title}
|
|
34
|
+
items={item.standards.map((standard) => ({ ...standard, id: standard.standardId }))}
|
|
35
|
+
progress={item.scorePercentage}
|
|
36
|
+
color={item.color}
|
|
37
|
+
onPress={() => model.highlight.expand(item.domainId)}
|
|
38
|
+
onHoverIn={() => model.highlight.hover(item.domainId)}
|
|
39
|
+
onHoverOut={() => model.highlight.hover(null)}
|
|
40
|
+
onItemPress={async (item) => {
|
|
41
|
+
try {
|
|
42
|
+
model.solving.setLoaderOpeningId(item.id)
|
|
43
|
+
const skill = await model.solving.start({
|
|
44
|
+
type: SolvingFlow.STANDARD,
|
|
45
|
+
standardId: item.standardId,
|
|
46
|
+
})
|
|
47
|
+
await onStandardPress?.(skill)
|
|
48
|
+
} finally {
|
|
49
|
+
model.solving.setLoaderOpeningId(null)
|
|
50
|
+
}
|
|
51
|
+
}}
|
|
52
|
+
loadingItemId={loaderOpeningId}
|
|
53
|
+
isLast={index === list.length - 1}
|
|
54
|
+
isFirst={index === 0}
|
|
55
|
+
isExpanded={expandedId === item.domainId}
|
|
56
|
+
isHighlighted={hoveredId === item.domainId || expandedId === item.domainId}
|
|
57
|
+
icon={<SliceDiamondIcon color={item.color} />}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
/>
|
|
61
|
+
</View>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
container: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
overflow: 'hidden',
|
|
69
|
+
padding: SPACING[200],
|
|
70
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
71
|
+
borderRadius: BORDER_RADIUS[400],
|
|
72
|
+
},
|
|
73
|
+
scroll: {
|
|
74
|
+
flex: 1,
|
|
75
|
+
},
|
|
76
|
+
})
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import {
|
|
4
|
+
COLORS,
|
|
5
|
+
ErrorIcon,
|
|
6
|
+
HeadingVariants,
|
|
7
|
+
LockIcon,
|
|
8
|
+
SPACING,
|
|
9
|
+
Typography,
|
|
10
|
+
} from '@magmamath/react-native-ui'
|
|
11
|
+
import { useText } from '../../../../shared/translation'
|
|
12
|
+
import { TranslationKeys } from '../../../../shared/translation/types'
|
|
13
|
+
import { PmProgressStatus } from '../../shared/pmProgress.constants'
|
|
14
|
+
|
|
15
|
+
type EmptyStateVariant = {
|
|
16
|
+
icon: ReactNode
|
|
17
|
+
circleColor: string
|
|
18
|
+
titleKey: TranslationKeys
|
|
19
|
+
subtitleKey: TranslationKeys
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const PM_EMPTY_STATE_VARIANTS: Record<PmProgressStatus, EmptyStateVariant> = {
|
|
23
|
+
[PmProgressStatus.LOCKED]: {
|
|
24
|
+
icon: <LockIcon color={COLORS.NEUTRAL_6} size={40} />,
|
|
25
|
+
circleColor: COLORS.NEUTRAL_2,
|
|
26
|
+
titleKey: 'pmProgress.allLockedTitle',
|
|
27
|
+
subtitleKey: 'pmProgress.allLockedSubtitle',
|
|
28
|
+
},
|
|
29
|
+
[PmProgressStatus.ERROR]: {
|
|
30
|
+
icon: <ErrorIcon color={COLORS.PRIMARY_RED} size={40} />,
|
|
31
|
+
circleColor: COLORS.RED_1,
|
|
32
|
+
titleKey: 'pmProgress.initErrorTitle',
|
|
33
|
+
subtitleKey: 'pmProgress.initErrorSubtitle',
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
type PmStatusOverlayProps = {
|
|
38
|
+
status: PmProgressStatus
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const PmStatusOverlay = ({ status }: PmStatusOverlayProps) => {
|
|
42
|
+
const t = useText()
|
|
43
|
+
|
|
44
|
+
const variant = PM_EMPTY_STATE_VARIANTS[status]
|
|
45
|
+
if (!variant) return null
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<View style={styles.container}>
|
|
49
|
+
<View style={styles.content}>
|
|
50
|
+
<View style={[styles.iconCircle, { backgroundColor: variant.circleColor }]}>
|
|
51
|
+
{variant.icon}
|
|
52
|
+
</View>
|
|
53
|
+
<View style={styles.text}>
|
|
54
|
+
<Typography variant={HeadingVariants.H2} style={styles.title}>
|
|
55
|
+
{t(variant.titleKey)}
|
|
56
|
+
</Typography>
|
|
57
|
+
<Typography variant={HeadingVariants.H7} style={styles.subtitle}>
|
|
58
|
+
{t(variant.subtitleKey)}
|
|
59
|
+
</Typography>
|
|
60
|
+
</View>
|
|
61
|
+
</View>
|
|
62
|
+
</View>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const styles = StyleSheet.create({
|
|
67
|
+
container: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
},
|
|
72
|
+
content: {
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
gap: SPACING[500],
|
|
75
|
+
paddingBottom: SPACING[800],
|
|
76
|
+
},
|
|
77
|
+
iconCircle: {
|
|
78
|
+
width: 88,
|
|
79
|
+
height: 88,
|
|
80
|
+
borderRadius: 44,
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
},
|
|
84
|
+
text: {
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
gap: SPACING[200],
|
|
87
|
+
maxWidth: 340,
|
|
88
|
+
},
|
|
89
|
+
title: {
|
|
90
|
+
color: COLORS.NEUTRAL_9,
|
|
91
|
+
textAlign: 'center',
|
|
92
|
+
fontSize: 24,
|
|
93
|
+
fontWeight: '500',
|
|
94
|
+
},
|
|
95
|
+
subtitle: {
|
|
96
|
+
color: COLORS.NEUTRAL_7,
|
|
97
|
+
textAlign: 'center',
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
},
|
|
101
|
+
})
|