@magmamath/students-features 1.2.0 → 1.2.1-rc.10
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 +62 -0
- package/dist/commonjs/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +22 -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 +69 -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 +82 -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 +25 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.js +20 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.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/header/PmProgressHeader.js +199 -0
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +71 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +95 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +71 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +70 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +187 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +119 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +86 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +118 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.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 +36 -0
- package/dist/commonjs/features/pmProgress/index.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 +45 -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 +79 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +148 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +33 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +193 -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/index.js +15 -3
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/PentagonIcon.js +32 -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 +32 -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 +19 -0
- package/dist/commonjs/shared/translation/localization/de.json +19 -0
- package/dist/commonjs/shared/translation/localization/en.json +19 -0
- package/dist/commonjs/shared/translation/localization/gb.json +19 -0
- package/dist/commonjs/shared/translation/localization/sct.json +19 -0
- package/dist/commonjs/shared/translation/localization/sw.json +19 -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 +56 -0
- package/dist/module/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js +15 -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 +63 -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 +76 -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 +20 -0
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.js +15 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.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/header/PmProgressHeader.js +192 -0
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js +64 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +90 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js +65 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js +64 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js +180 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js +112 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +80 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +112 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.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/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 +40 -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 +74 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js +143 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +30 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +177 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js +10 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/PentagonIcon.js +24 -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 +24 -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 +19 -0
- package/dist/module/shared/translation/localization/de.json +19 -0
- package/dist/module/shared/translation/localization/en.json +19 -0
- package/dist/module/shared/translation/localization/gb.json +19 -0
- package/dist/module/shared/translation/localization/sct.json +19 -0
- package/dist/module/shared/translation/localization/sw.json +19 -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 +16 -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/SliceHighlight.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceHighlight.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/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/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 +10 -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 +26 -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 +10 -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/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/context/PmProgressContext.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/index.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 +21 -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 +19 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +24 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +23 -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 +59 -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 +185 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- 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/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 +114 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +38 -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 +16 -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/SliceHighlight.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceHighlight.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/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/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 +10 -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 +26 -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 +10 -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/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/context/PmProgressContext.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/index.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 +21 -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 +19 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +24 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +23 -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 +59 -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 +185 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- 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/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 +114 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +38 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +13 -2
- 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 +52 -0
- package/src/features/pmProgress/__tests__/.keep +0 -0
- package/src/features/pmProgress/components/chart/chart.helpers.ts +14 -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 +75 -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 +88 -0
- package/src/features/pmProgress/components/chart/model/ArcPatternGenerator.ts +48 -0
- package/src/features/pmProgress/components/chart/model/PieChartManager.ts +20 -0
- package/src/features/pmProgress/components/chart/model/SliceHighlight.ts +17 -0
- package/src/features/pmProgress/components/chart/model/SliceShapeGenerator.ts +90 -0
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +187 -0
- package/src/features/pmProgress/components/insights/PmInsights.tsx +60 -0
- package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +85 -0
- package/src/features/pmProgress/components/insights/StatsCard.tsx +53 -0
- package/src/features/pmProgress/components/list/Fluency.tsx +59 -0
- package/src/features/pmProgress/components/list/ListCard.tsx +216 -0
- package/src/features/pmProgress/components/list/ListItem.tsx +132 -0
- package/src/features/pmProgress/components/list/PmDomainList.tsx +66 -0
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +108 -0
- package/src/features/pmProgress/context/PmProgressContext.tsx +23 -0
- package/src/features/pmProgress/index.ts +6 -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 +50 -0
- package/src/features/pmProgress/model/PmRecommendationsModel.ts +47 -0
- package/src/features/pmProgress/model/PmSolvingFlowModel.ts +105 -0
- package/src/features/pmProgress/model/PmTreeModel.ts +148 -0
- package/src/features/pmProgress/shared/pmProgress.constants.ts +73 -0
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +239 -0
- package/src/features/pmProgress/shared/pmProgress.types.ts +207 -0
- package/src/index.ts +1 -0
- package/src/shared/icons/PentagonIcon.tsx +17 -0
- package/src/shared/icons/SketchArrowRight.tsx +18 -0
- package/src/shared/icons/SliceDiamondIcon.tsx +16 -0
- package/src/shared/icons/StarIcon.tsx +17 -0
- package/src/shared/icons/TimerIcon.tsx +21 -0
- package/src/shared/translation/localization/ca.json +19 -0
- package/src/shared/translation/localization/de.json +19 -0
- package/src/shared/translation/localization/en.json +19 -0
- package/src/shared/translation/localization/gb.json +19 -0
- package/src/shared/translation/localization/sct.json +19 -0
- package/src/shared/translation/localization/sw.json +19 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { ClipPath, Defs, G, Path } from 'react-native-svg'
|
|
3
|
+
import { getSliceClipId } from '../../chart.helpers'
|
|
4
|
+
|
|
5
|
+
type SliceFillColorProps = {
|
|
6
|
+
clipPathId: string
|
|
7
|
+
shapeSvg: string
|
|
8
|
+
fillSvg: string
|
|
9
|
+
fillBorderSvg: string
|
|
10
|
+
color: string
|
|
11
|
+
percent: number
|
|
12
|
+
borderColor?: string
|
|
13
|
+
borderWidth?: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SliceFillColor = ({
|
|
17
|
+
clipPathId,
|
|
18
|
+
shapeSvg,
|
|
19
|
+
fillSvg,
|
|
20
|
+
fillBorderSvg,
|
|
21
|
+
color,
|
|
22
|
+
percent,
|
|
23
|
+
borderColor,
|
|
24
|
+
borderWidth,
|
|
25
|
+
}: SliceFillColorProps) => {
|
|
26
|
+
const isFullyFilled = percent >= 100
|
|
27
|
+
const isPartiallyFilled = percent > 0
|
|
28
|
+
const hasBorder = borderColor != null && borderWidth != null && borderWidth > 0
|
|
29
|
+
|
|
30
|
+
const sliceClipId = getSliceClipId(clipPathId)
|
|
31
|
+
const borderClipId = `${sliceClipId}-border`
|
|
32
|
+
|
|
33
|
+
if (isFullyFilled) {
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
{hasBorder && (
|
|
37
|
+
<Defs>
|
|
38
|
+
<ClipPath id={borderClipId}>
|
|
39
|
+
<Path d={fillBorderSvg} />
|
|
40
|
+
</ClipPath>
|
|
41
|
+
</Defs>
|
|
42
|
+
)}
|
|
43
|
+
<G clipPath={`url(#${sliceClipId})`}>
|
|
44
|
+
<Path d={shapeSvg} fill={color} />
|
|
45
|
+
{hasBorder && (
|
|
46
|
+
<G clipPath={`url(#${borderClipId})`}>
|
|
47
|
+
<Path
|
|
48
|
+
d={fillBorderSvg}
|
|
49
|
+
fill="none"
|
|
50
|
+
stroke={borderColor}
|
|
51
|
+
strokeWidth={borderWidth! * 2}
|
|
52
|
+
/>
|
|
53
|
+
</G>
|
|
54
|
+
)}
|
|
55
|
+
</G>
|
|
56
|
+
</>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (isPartiallyFilled) {
|
|
61
|
+
return (
|
|
62
|
+
<>
|
|
63
|
+
{hasBorder && (
|
|
64
|
+
<Defs>
|
|
65
|
+
<ClipPath id={borderClipId}>
|
|
66
|
+
<Path d={fillBorderSvg} />
|
|
67
|
+
</ClipPath>
|
|
68
|
+
</Defs>
|
|
69
|
+
)}
|
|
70
|
+
<G clipPath={`url(#${sliceClipId})`}>
|
|
71
|
+
<Path d={fillSvg} fill={color} />
|
|
72
|
+
{hasBorder && (
|
|
73
|
+
<G clipPath={`url(#${borderClipId})`}>
|
|
74
|
+
<Path
|
|
75
|
+
d={fillBorderSvg}
|
|
76
|
+
fill="none"
|
|
77
|
+
stroke={borderColor}
|
|
78
|
+
strokeWidth={borderWidth! * 2}
|
|
79
|
+
/>
|
|
80
|
+
</G>
|
|
81
|
+
)}
|
|
82
|
+
</G>
|
|
83
|
+
</>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return null
|
|
88
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PieChartManagerConfig, SliceShape } from '../chart.types'
|
|
2
|
+
|
|
3
|
+
export class OuterArcPatternGenerator {
|
|
4
|
+
constructor(private readonly config: PieChartManagerConfig) {}
|
|
5
|
+
|
|
6
|
+
public generateArcPath(slice: SliceShape, radius: number) {
|
|
7
|
+
const gapAngle = this.config.gapBetweenSlices / (2 * radius)
|
|
8
|
+
const startAngle = slice.startAngle + gapAngle
|
|
9
|
+
const endAngle = slice.endAngle - gapAngle
|
|
10
|
+
|
|
11
|
+
const startPoint = this.polarToCartesian(radius, startAngle)
|
|
12
|
+
const endPoint = this.polarToCartesian(radius, endAngle)
|
|
13
|
+
const largeArcFlag = endAngle - startAngle > Math.PI ? 1 : 0
|
|
14
|
+
|
|
15
|
+
return `M ${startPoint.x} ${startPoint.y} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${endPoint.x} ${endPoint.y}`
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Returns the sizes of the two rings where the checkerboard dashes are drawn. */
|
|
19
|
+
public getPatternTrackSizes(): [number, number] {
|
|
20
|
+
const { outerRadius, outerArc } = this.config
|
|
21
|
+
return [
|
|
22
|
+
outerRadius - outerArc.strokeWidth / 2,
|
|
23
|
+
outerRadius - outerArc.strokeWidth * 1.5,
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public getDashWidthForRadius(radius: number) {
|
|
28
|
+
return this.config.outerArc.dashWidth * (radius / this.config.outerRadius)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public getDashOffset(rowIndex: number, radius: number) {
|
|
32
|
+
const dashAngle = this.config.outerArc.dashWidth / this.config.outerRadius
|
|
33
|
+
const dashWidthAtRadius = dashAngle * radius
|
|
34
|
+
const baseOffset = dashWidthAtRadius / 2
|
|
35
|
+
|
|
36
|
+
if (rowIndex === 1) {
|
|
37
|
+
return baseOffset - dashWidthAtRadius
|
|
38
|
+
}
|
|
39
|
+
return baseOffset
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private polarToCartesian(radius: number, angleInRadians: number) {
|
|
43
|
+
return {
|
|
44
|
+
x: radius * Math.sin(angleInRadians),
|
|
45
|
+
y: -radius * Math.cos(angleInRadians),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SliceShapeGenerator } from './SliceShapeGenerator'
|
|
2
|
+
import { OuterArcPatternGenerator } from './ArcPatternGenerator'
|
|
3
|
+
import { SliceHighlight } from './SliceHighlight'
|
|
4
|
+
import type { PieChartManagerConfig } from '../chart.types'
|
|
5
|
+
|
|
6
|
+
export class PieChartManager {
|
|
7
|
+
public readonly shape: SliceShapeGenerator
|
|
8
|
+
public readonly pattern: OuterArcPatternGenerator
|
|
9
|
+
public readonly highlight: SliceHighlight
|
|
10
|
+
|
|
11
|
+
constructor(public readonly config: PieChartManagerConfig) {
|
|
12
|
+
this.shape = new SliceShapeGenerator(config)
|
|
13
|
+
this.pattern = new OuterArcPatternGenerator(config)
|
|
14
|
+
this.highlight = new SliceHighlight(config)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public getCenter() {
|
|
18
|
+
return { x: this.config.size / 2, y: this.config.size / 2 }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createEvent, createStore } from 'effector'
|
|
2
|
+
import type { PieChartManagerConfig } from '../chart.types'
|
|
3
|
+
|
|
4
|
+
export class SliceHighlight {
|
|
5
|
+
public readonly set = createEvent<number>()
|
|
6
|
+
public readonly reset = createEvent()
|
|
7
|
+
|
|
8
|
+
public readonly $highlightedIndex = createStore<number | null>(null)
|
|
9
|
+
.on(this.set, (_, index) => index)
|
|
10
|
+
.reset(this.reset)
|
|
11
|
+
|
|
12
|
+
constructor(private readonly config: PieChartManagerConfig) {}
|
|
13
|
+
|
|
14
|
+
public getTranslateY(isHighlighted: boolean): number {
|
|
15
|
+
return isHighlighted ? -this.config.pressOffset : 0
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { arc, pie } from 'd3-shape'
|
|
2
|
+
import type { PieChartManagerConfig, SliceInputData, SliceShape } from '../chart.types'
|
|
3
|
+
|
|
4
|
+
export class SliceShapeGenerator {
|
|
5
|
+
private innerRadius = 0
|
|
6
|
+
private readonly d3Pie = pie<SliceInputData>()
|
|
7
|
+
.value(({ value }) => value)
|
|
8
|
+
.sort(null)
|
|
9
|
+
|
|
10
|
+
constructor(private readonly config: PieChartManagerConfig) {}
|
|
11
|
+
|
|
12
|
+
public generateSlices(data: SliceInputData[]): SliceShape[] {
|
|
13
|
+
this.innerRadius = this.getInnerRadius(data.length)
|
|
14
|
+
|
|
15
|
+
return this.d3Pie(data).map((datum, index) => ({
|
|
16
|
+
index,
|
|
17
|
+
startAngle: datum.startAngle,
|
|
18
|
+
endAngle: datum.endAngle,
|
|
19
|
+
fillPercent: datum.data.fillPercent ?? 0,
|
|
20
|
+
backgroundColor: datum.data.backgroundColor ?? this.config.colors.background,
|
|
21
|
+
fillColor: datum.data.fillColor,
|
|
22
|
+
borderColor: datum.data.borderColor,
|
|
23
|
+
data: datum.data,
|
|
24
|
+
}))
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public generateSlicePath(slice: SliceShape): string {
|
|
28
|
+
return this.buildArc(slice, this.config.outerRadius, this.getCornerRadius(100))
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public generateFillPath(slice: SliceShape): string {
|
|
32
|
+
const fillRadius = this.getFillRadius(slice)
|
|
33
|
+
const cornerRadius = this.getCornerRadius(slice.fillPercent)
|
|
34
|
+
|
|
35
|
+
// Build with innerRadius 0 so d3 only rounds the outer corners.
|
|
36
|
+
// The slice clip path will cut the inner edge to the correct boundary.
|
|
37
|
+
return arc()
|
|
38
|
+
.outerRadius(fillRadius)
|
|
39
|
+
.innerRadius(0)
|
|
40
|
+
.cornerRadius(cornerRadius)
|
|
41
|
+
.padAngle(this.padAngle)
|
|
42
|
+
.padRadius(this.config.outerRadius)({
|
|
43
|
+
startAngle: slice.startAngle,
|
|
44
|
+
endAngle: slice.endAngle,
|
|
45
|
+
innerRadius: 0,
|
|
46
|
+
outerRadius: fillRadius,
|
|
47
|
+
}) as string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public generateFillBorderPath(slice: SliceShape): string {
|
|
51
|
+
const fillRadius = this.getFillRadius(slice)
|
|
52
|
+
const cornerRadius = this.getCornerRadius(slice.fillPercent)
|
|
53
|
+
return this.buildArc(slice, fillRadius, cornerRadius)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
private getFillRadius(slice: SliceShape): number {
|
|
58
|
+
return this.innerRadius + (this.config.outerRadius - this.innerRadius) * (slice.fillPercent / 100)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private getInnerRadius(sliceCount: number): number {
|
|
62
|
+
const { innerRadius } = this.config
|
|
63
|
+
return typeof innerRadius === 'function' ? innerRadius(sliceCount) : innerRadius
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private getCornerRadius(fillPercent: number): number {
|
|
67
|
+
const { cornerRadius } = this.config
|
|
68
|
+
return typeof cornerRadius === 'function' ? cornerRadius(fillPercent) : cornerRadius
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private get padAngle(): number {
|
|
72
|
+
return this.config.gapBetweenSlices / this.config.outerRadius
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private buildArc(slice: SliceShape, outerRadius: number, cornerRadius: number): string {
|
|
76
|
+
const innerRadius = this.innerRadius
|
|
77
|
+
|
|
78
|
+
return arc()
|
|
79
|
+
.outerRadius(outerRadius)
|
|
80
|
+
.innerRadius(innerRadius)
|
|
81
|
+
.cornerRadius(cornerRadius)
|
|
82
|
+
.padAngle(this.padAngle)
|
|
83
|
+
.padRadius(this.config.outerRadius)({
|
|
84
|
+
startAngle: slice.startAngle,
|
|
85
|
+
endAngle: slice.endAngle,
|
|
86
|
+
innerRadius,
|
|
87
|
+
outerRadius,
|
|
88
|
+
}) as string
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { Portal } from 'react-native-portalize'
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ButtonColor,
|
|
7
|
+
ButtonSize,
|
|
8
|
+
ButtonVariant,
|
|
9
|
+
CaretDownIcon,
|
|
10
|
+
CaretUpIcon,
|
|
11
|
+
COLORS,
|
|
12
|
+
Dropdown,
|
|
13
|
+
HeadingVariants,
|
|
14
|
+
Menu,
|
|
15
|
+
PlayIcon,
|
|
16
|
+
SPACING,
|
|
17
|
+
Typography,
|
|
18
|
+
} from '@magmamath/react-native-ui'
|
|
19
|
+
import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
|
|
20
|
+
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
21
|
+
import { useText } from '../../../../shared/translation'
|
|
22
|
+
import { useStoreMap, useUnit } from 'effector-react'
|
|
23
|
+
import { usePmProgress } from '../../context/PmProgressContext'
|
|
24
|
+
import { isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
25
|
+
import { SolvingFlow } from '../../shared/pmProgress.constants'
|
|
26
|
+
|
|
27
|
+
export const PmProgressHeader = () => {
|
|
28
|
+
const t = useText()
|
|
29
|
+
const { model, onStartPress } = usePmProgress()
|
|
30
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState(false)
|
|
31
|
+
|
|
32
|
+
const grade = useUnit(model.tree.$grade)
|
|
33
|
+
const grades = useStoreMap(model.tree.$grades, (grades) =>
|
|
34
|
+
grades.map((grade) => ({
|
|
35
|
+
key: grade.value,
|
|
36
|
+
title: grade.name,
|
|
37
|
+
disabled: grade.isLocked,
|
|
38
|
+
})),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const nextUp = useStoreMap(model.tree.$domains, (domains) =>
|
|
42
|
+
domains.find((domain) => {
|
|
43
|
+
const isFluency = isFluencyDomain(domain.title)
|
|
44
|
+
const isCompleted = domain.skillsCount.achieved === domain.skillsCount.total
|
|
45
|
+
return !isFluency && !isCompleted
|
|
46
|
+
}),
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<View style={styles.container}>
|
|
51
|
+
<View style={styles.title}>
|
|
52
|
+
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
53
|
+
{t('pmProgress.title')}
|
|
54
|
+
</Typography>
|
|
55
|
+
<Dropdown
|
|
56
|
+
isOpen={isDropdownOpen}
|
|
57
|
+
Portal={Portal}
|
|
58
|
+
onDismiss={() => setIsDropdownOpen(false)}
|
|
59
|
+
anchor={
|
|
60
|
+
<Button
|
|
61
|
+
variant={ButtonVariant.TERTIARY}
|
|
62
|
+
onPress={() => setIsDropdownOpen((prev) => !prev)}
|
|
63
|
+
>
|
|
64
|
+
<Typography variant={HeadingVariants.H8} style={styles.dark}>
|
|
65
|
+
{t('pmProgress.grade')} {grade}
|
|
66
|
+
</Typography>
|
|
67
|
+
<View style={styles.caret}>
|
|
68
|
+
{isDropdownOpen ? (
|
|
69
|
+
<CaretUpIcon color={COLORS.NEUTRAL_9} />
|
|
70
|
+
) : (
|
|
71
|
+
<CaretDownIcon color={COLORS.NEUTRAL_9} />
|
|
72
|
+
)}
|
|
73
|
+
</View>
|
|
74
|
+
</Button>
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
<Menu
|
|
78
|
+
style={styles.menu}
|
|
79
|
+
items={grades}
|
|
80
|
+
onItemPress={(item) => model.tree.setGrade(item.key as number)}
|
|
81
|
+
/>
|
|
82
|
+
</Dropdown>
|
|
83
|
+
</View>
|
|
84
|
+
|
|
85
|
+
<View style={styles.nextUp}>
|
|
86
|
+
<View style={styles.content}>
|
|
87
|
+
<View style={styles.subtitle}>
|
|
88
|
+
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
89
|
+
{t('pmProgress.nextUp')}
|
|
90
|
+
</Typography>
|
|
91
|
+
</View>
|
|
92
|
+
<View style={[styles.row, styles.tilted]}>
|
|
93
|
+
<Typography variant={HeadingVariants.H7} style={styles.muted}>
|
|
94
|
+
{nextUp?.title}
|
|
95
|
+
</Typography>
|
|
96
|
+
<View style={styles.diamond}>
|
|
97
|
+
<SliceDiamondIcon color={nextUp?.color} />
|
|
98
|
+
</View>
|
|
99
|
+
</View>
|
|
100
|
+
</View>
|
|
101
|
+
<View style={styles.arrow}>
|
|
102
|
+
<SketchArrowRight />
|
|
103
|
+
</View>
|
|
104
|
+
<Button
|
|
105
|
+
onPress={async () => {
|
|
106
|
+
const skill = await model.solving.start({ type: SolvingFlow.MAGMA })
|
|
107
|
+
|
|
108
|
+
// @ts-ignore
|
|
109
|
+
onStartPress?.(skill)
|
|
110
|
+
}}
|
|
111
|
+
icon={<PlayIcon size={16} color={COLORS.NEUTRAL_1} />}
|
|
112
|
+
variant={ButtonVariant.PRIMARY}
|
|
113
|
+
size={ButtonSize.LARGE}
|
|
114
|
+
colorScheme={ButtonColor.YELLOW}
|
|
115
|
+
raiseLevel={6}
|
|
116
|
+
style={{ container: styles.startButton }}
|
|
117
|
+
>
|
|
118
|
+
<Typography variant={HeadingVariants.H6} style={styles.startButtonText}>
|
|
119
|
+
{t('pmProgress.startButton')}
|
|
120
|
+
</Typography>
|
|
121
|
+
</Button>
|
|
122
|
+
</View>
|
|
123
|
+
</View>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const styles = StyleSheet.create({
|
|
128
|
+
container: {
|
|
129
|
+
flexDirection: 'row',
|
|
130
|
+
justifyContent: 'space-between',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
marginBottom: SPACING[400],
|
|
133
|
+
},
|
|
134
|
+
title: {
|
|
135
|
+
flexDirection: 'row',
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
gap: SPACING[200],
|
|
138
|
+
},
|
|
139
|
+
dark: {
|
|
140
|
+
color: COLORS.NEUTRAL_9,
|
|
141
|
+
},
|
|
142
|
+
caret: {
|
|
143
|
+
marginLeft: SPACING[100],
|
|
144
|
+
},
|
|
145
|
+
menu: {
|
|
146
|
+
top: SPACING[100],
|
|
147
|
+
minWidth: 110,
|
|
148
|
+
},
|
|
149
|
+
nextUp: {
|
|
150
|
+
flexDirection: 'row',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
gap: SPACING[400],
|
|
153
|
+
},
|
|
154
|
+
content: {
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
gap: SPACING[100],
|
|
157
|
+
},
|
|
158
|
+
subtitle: {
|
|
159
|
+
transform: [{ rotate: '355deg' }],
|
|
160
|
+
marginRight: SPACING[300],
|
|
161
|
+
},
|
|
162
|
+
tilted: {
|
|
163
|
+
transform: [{ rotate: '355deg' }],
|
|
164
|
+
},
|
|
165
|
+
row: {
|
|
166
|
+
flexDirection: 'row',
|
|
167
|
+
gap: SPACING[100],
|
|
168
|
+
},
|
|
169
|
+
muted: {
|
|
170
|
+
color: COLORS.NEUTRAL_8,
|
|
171
|
+
},
|
|
172
|
+
diamond: {
|
|
173
|
+
bottom: 10,
|
|
174
|
+
transform: [{ rotate: '5deg' }],
|
|
175
|
+
},
|
|
176
|
+
arrow: {
|
|
177
|
+
transform: [{ rotate: '358deg' }],
|
|
178
|
+
},
|
|
179
|
+
startButton: {
|
|
180
|
+
minWidth: 145,
|
|
181
|
+
},
|
|
182
|
+
startButtonText: {
|
|
183
|
+
fontWeight: '700',
|
|
184
|
+
textTransform: 'uppercase',
|
|
185
|
+
color: COLORS.NEUTRAL_1,
|
|
186
|
+
},
|
|
187
|
+
})
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { useMemo, useState } from 'react'
|
|
2
|
+
import { LayoutChangeEvent, StyleSheet, View } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import { useStoreMap } from 'effector-react'
|
|
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 { STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
|
|
10
|
+
|
|
11
|
+
export const PmInsights = () => {
|
|
12
|
+
const { model } = usePmProgress()
|
|
13
|
+
const [chartSize, setChartSize] = useState(0)
|
|
14
|
+
const chartData = useStoreMap(model.tree.$domains, (domains) =>
|
|
15
|
+
domains.map((domain) => ({
|
|
16
|
+
value: 1,
|
|
17
|
+
fillPercent: Math.round(domain.scorePercentage),
|
|
18
|
+
fillColor: domain.color,
|
|
19
|
+
borderColor: domain.borderColor,
|
|
20
|
+
backgroundColor: domain.backgroundColor,
|
|
21
|
+
})),
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const chartConfig = useMemo(() => {
|
|
25
|
+
const size = Math.max(0, chartSize - SPACING[400])
|
|
26
|
+
return createChartConfig(size)
|
|
27
|
+
}, [chartSize])
|
|
28
|
+
|
|
29
|
+
const measureLayout = (event: LayoutChangeEvent) => {
|
|
30
|
+
const height = event.nativeEvent.layout.height
|
|
31
|
+
const size = height - STATS_MAX_HEIGHT - SPACING[800]
|
|
32
|
+
setChartSize(size)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!chartData) return null
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<View style={styles.container} onLayout={measureLayout}>
|
|
39
|
+
<View style={[styles.chart, { width: chartSize, height: chartSize }]}>
|
|
40
|
+
<PracticeProgressPieChart data={chartData} config={chartConfig} />
|
|
41
|
+
</View>
|
|
42
|
+
<PmTimeframeStats />
|
|
43
|
+
</View>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
container: {
|
|
49
|
+
height: '100%',
|
|
50
|
+
},
|
|
51
|
+
chart: {
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
55
|
+
borderRadius: BORDER_RADIUS[250],
|
|
56
|
+
padding: SPACING[400],
|
|
57
|
+
marginBottom: SPACING[400],
|
|
58
|
+
marginTop: SPACING[400],
|
|
59
|
+
},
|
|
60
|
+
})
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
if (!insights) return null
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View style={styles.container}>
|
|
36
|
+
<View style={styles.content}>
|
|
37
|
+
<View style={styles.cards}>
|
|
38
|
+
<StatsCard
|
|
39
|
+
value={insights.numberOfStars}
|
|
40
|
+
label={t('pmProgress.stars')}
|
|
41
|
+
color={COLORS.PRIMARY_YELLOW}
|
|
42
|
+
icon={<StarIcon />}
|
|
43
|
+
/>
|
|
44
|
+
<StatsCard
|
|
45
|
+
value={formatTime(insights.timeInPracticeMs)}
|
|
46
|
+
label={t('pmProgress.time')}
|
|
47
|
+
color={COLORS.PRIMARY_PURPLE}
|
|
48
|
+
icon={<TimerIcon />}
|
|
49
|
+
/>
|
|
50
|
+
</View>
|
|
51
|
+
|
|
52
|
+
<SelectGroup
|
|
53
|
+
color={SelectOptionColor.GREY}
|
|
54
|
+
options={OPTIONS}
|
|
55
|
+
selectedOptions={OPTIONS.filter(({ key }) => key === timeframe)}
|
|
56
|
+
onOptionChange={({ key }) => model.insights.setTimeframe(key as InsightsTimeframe)}
|
|
57
|
+
/>
|
|
58
|
+
</View>
|
|
59
|
+
</View>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const styles = StyleSheet.create({
|
|
64
|
+
container: {
|
|
65
|
+
maxHeight: STATS_MAX_HEIGHT,
|
|
66
|
+
height: '100%',
|
|
67
|
+
padding: SPACING[200],
|
|
68
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
69
|
+
borderRadius: BORDER_RADIUS[300],
|
|
70
|
+
shadowColor: COLORS.NEUTRAL_9,
|
|
71
|
+
shadowOffset: { width: 0, height: 1 },
|
|
72
|
+
shadowOpacity: 0.1,
|
|
73
|
+
shadowRadius: 3,
|
|
74
|
+
elevation: 2,
|
|
75
|
+
},
|
|
76
|
+
content: {
|
|
77
|
+
gap: SPACING[100],
|
|
78
|
+
marginBottom: 4,
|
|
79
|
+
},
|
|
80
|
+
cards: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
justifyContent: 'space-between',
|
|
83
|
+
gap: SPACING[300],
|
|
84
|
+
},
|
|
85
|
+
})
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react'
|
|
2
|
+
import { View, StyleSheet, Text, Platform } from 'react-native'
|
|
3
|
+
import { COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type StatsCardProps = {
|
|
6
|
+
value: number | string
|
|
7
|
+
label: string
|
|
8
|
+
color: string
|
|
9
|
+
icon: ReactNode
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const StatsCard = ({ value, label, color, icon }: StatsCardProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<View style={[styles.card, { borderColor: color }]}>
|
|
15
|
+
<View style={[styles.iconContainer, { backgroundColor: color }]}>{icon}</View>
|
|
16
|
+
<View>
|
|
17
|
+
<Text style={[styles.value, { color }]}>{value}</Text>
|
|
18
|
+
<Text style={styles.label}>{label}</Text>
|
|
19
|
+
</View>
|
|
20
|
+
</View>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
card: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
height: 65,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
borderRadius: 12,
|
|
31
|
+
borderWidth: 4,
|
|
32
|
+
padding: 8,
|
|
33
|
+
gap: 8,
|
|
34
|
+
},
|
|
35
|
+
iconContainer: {
|
|
36
|
+
width: 42,
|
|
37
|
+
height: 42,
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
borderRadius: 100,
|
|
41
|
+
},
|
|
42
|
+
value: {
|
|
43
|
+
fontSize: 32,
|
|
44
|
+
fontWeight: '700',
|
|
45
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
color: COLORS.NEUTRAL_8,
|
|
49
|
+
fontSize: 12,
|
|
50
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
51
|
+
top: -6,
|
|
52
|
+
},
|
|
53
|
+
})
|