@magmamath/students-features 1.2.1-rc.39 → 1.2.1-rc.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 +1 -2
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +1 -2
- 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/voice/constants.js +8 -2
- package/dist/commonjs/features/voice/constants.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +16 -5
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +68 -20
- 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 +2 -2
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +5 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/index.js +3 -15
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +0 -24
- package/dist/commonjs/shared/translation/localization/de.json +0 -24
- package/dist/commonjs/shared/translation/localization/en.json +0 -24
- package/dist/commonjs/shared/translation/localization/gb.json +0 -24
- package/dist/commonjs/shared/translation/localization/sct.json +0 -24
- package/dist/commonjs/shared/translation/localization/sw.json +0 -24
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -2
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +1 -2
- 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/voice/constants.js +8 -2
- package/dist/module/features/voice/constants.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecord.js +17 -6
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +69 -21
- 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 +2 -2
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +5 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/features/voice/types.js +5 -1
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +0 -24
- package/dist/module/shared/translation/localization/de.json +0 -24
- package/dist/module/shared/translation/localization/en.json +0 -24
- package/dist/module/shared/translation/localization/gb.json +0 -24
- package/dist/module/shared/translation/localization/sct.json +0 -24
- package/dist/module/shared/translation/localization/sw.json +0 -24
- 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/voice/constants.d.ts +8 -2
- 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 +1 -3
- 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 +2 -1
- 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 +3 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/types.d.ts +4 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -144
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -48
- 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/voice/constants.d.ts +8 -2
- 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 +1 -3
- 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 +2 -1
- 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 +3 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/types.d.ts +4 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -144
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -48
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +13 -25
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -2
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +1 -2
- package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +2 -2
- package/src/features/voice/constants.ts +8 -2
- package/src/features/voice/recording/components/VoiceRecord.tsx +26 -5
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +91 -29
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +2 -2
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +7 -3
- package/src/features/voice/recording/model/VoiceRecord.model.ts +7 -0
- package/src/features/voice/types.ts +5 -0
- package/src/index.ts +0 -1
- package/src/shared/translation/localization/ca.json +0 -24
- package/src/shared/translation/localization/de.json +0 -24
- package/src/shared/translation/localization/en.json +0 -24
- package/src/shared/translation/localization/gb.json +0 -24
- package/src/shared/translation/localization/sct.json +0 -24
- package/src/shared/translation/localization/sw.json +0 -24
- package/dist/commonjs/features/pmProgress/PmProgress.js +0 -42
- package/dist/commonjs/features/pmProgress/PmProgress.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +0 -24
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js +0 -2
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +0 -44
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js +0 -26
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +0 -87
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +0 -38
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +0 -21
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js +0 -82
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js +0 -49
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js +0 -25
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.js +0 -20
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js +0 -79
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js +0 -50
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +0 -216
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +0 -114
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +0 -70
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +0 -99
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +0 -72
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +0 -80
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +0 -197
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +0 -140
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +0 -96
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +0 -101
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +0 -134
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +0 -1
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +0 -203
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +0 -1
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js +0 -18
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js.map +0 -1
- package/dist/commonjs/features/pmProgress/index.js +0 -64
- package/dist/commonjs/features/pmProgress/index.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js +0 -15
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js +0 -22
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js +0 -18
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +0 -43
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +0 -47
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js +0 -102
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +0 -170
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +0 -1
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +0 -52
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +0 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +0 -59
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +0 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +0 -217
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +0 -1
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js +0 -12
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js.map +0 -1
- package/dist/commonjs/shared/icons/PentagonIcon.js +0 -32
- package/dist/commonjs/shared/icons/PentagonIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/SketchArrowRight.js +0 -33
- package/dist/commonjs/shared/icons/SketchArrowRight.js.map +0 -1
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js +0 -32
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/StarIcon.js +0 -32
- package/dist/commonjs/shared/icons/StarIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/TimerIcon.js +0 -35
- package/dist/commonjs/shared/icons/TimerIcon.js.map +0 -1
- package/dist/module/features/pmProgress/PmProgress.js +0 -36
- package/dist/module/features/pmProgress/PmProgress.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js +0 -17
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/chart.types.js +0 -2
- package/dist/module/features/pmProgress/components/chart/chart.types.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +0 -38
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js +0 -20
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +0 -81
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +0 -32
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +0 -15
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js +0 -76
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js +0 -44
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js +0 -20
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.js +0 -15
- package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.js.map +0 -1
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js +0 -74
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +0 -1
- package/dist/module/features/pmProgress/components/content/PmContent.js +0 -44
- package/dist/module/features/pmProgress/components/content/PmContent.js.map +0 -1
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +0 -209
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +0 -1
- package/dist/module/features/pmProgress/components/header/StartButton.js +0 -107
- package/dist/module/features/pmProgress/components/header/StartButton.js.map +0 -1
- package/dist/module/features/pmProgress/components/insights/PmInsights.js +0 -63
- package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +0 -1
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +0 -94
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +0 -1
- package/dist/module/features/pmProgress/components/insights/StatsCard.js +0 -66
- package/dist/module/features/pmProgress/components/insights/StatsCard.js.map +0 -1
- package/dist/module/features/pmProgress/components/list/Fluency.js +0 -74
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +0 -1
- package/dist/module/features/pmProgress/components/list/ListCard.js +0 -190
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +0 -1
- package/dist/module/features/pmProgress/components/list/ListItem.js +0 -133
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +0 -1
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +0 -90
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +0 -1
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js +0 -95
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js.map +0 -1
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +0 -128
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +0 -1
- package/dist/module/features/pmProgress/components/standard/StandardTag.js +0 -197
- package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +0 -1
- package/dist/module/features/pmProgress/context/PmProgressContext.js +0 -13
- package/dist/module/features/pmProgress/context/PmProgressContext.js.map +0 -1
- package/dist/module/features/pmProgress/index.js +0 -9
- package/dist/module/features/pmProgress/index.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmHighlightModel.js +0 -10
- package/dist/module/features/pmProgress/model/PmHighlightModel.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmInsightsModel.js +0 -17
- package/dist/module/features/pmProgress/model/PmInsightsModel.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmProgressApi.js +0 -13
- package/dist/module/features/pmProgress/model/PmProgressApi.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmProgressModel.js +0 -38
- package/dist/module/features/pmProgress/model/PmProgressModel.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +0 -42
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js +0 -97
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +0 -1
- package/dist/module/features/pmProgress/model/PmTreeModel.js +0 -165
- package/dist/module/features/pmProgress/model/PmTreeModel.js.map +0 -1
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js +0 -47
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +0 -1
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +0 -56
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +0 -1
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +0 -197
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +0 -1
- package/dist/module/features/pmProgress/shared/pmProgress.types.js +0 -10
- package/dist/module/features/pmProgress/shared/pmProgress.types.js.map +0 -1
- package/dist/module/shared/icons/PentagonIcon.js +0 -24
- package/dist/module/shared/icons/PentagonIcon.js.map +0 -1
- package/dist/module/shared/icons/SketchArrowRight.js +0 -25
- package/dist/module/shared/icons/SketchArrowRight.js.map +0 -1
- package/dist/module/shared/icons/SliceDiamondIcon.js +0 -24
- package/dist/module/shared/icons/SliceDiamondIcon.js.map +0 -1
- package/dist/module/shared/icons/StarIcon.js +0 -24
- package/dist/module/shared/icons/StarIcon.js.map +0 -1
- package/dist/module/shared/icons/TimerIcon.js +0 -27
- package/dist/module/shared/icons/TimerIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts +0 -9
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts +0 -4
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts +0 -36
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +0 -9
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +0 -10
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts +0 -11
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +0 -12
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +0 -8
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +0 -14
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +0 -12
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts +0 -16
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceHighlight.d.ts +0 -10
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceHighlight.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +0 -17
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts +0 -11
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts +0 -12
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts +0 -8
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts +0 -31
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +0 -12
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts +0 -8
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts +0 -3
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts +0 -9
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts +0 -14
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts +0 -7
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts +0 -7
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts +0 -14
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts +0 -17
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts +0 -23
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +0 -102
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts +0 -22
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +0 -25
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +0 -17
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +0 -44
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +0 -66
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts +0 -193
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts +0 -9
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts +0 -4
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts +0 -36
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +0 -9
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +0 -10
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts +0 -11
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +0 -12
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +0 -8
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +0 -14
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +0 -12
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts +0 -16
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceHighlight.d.ts +0 -10
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceHighlight.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +0 -17
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts +0 -11
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts +0 -12
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts +0 -8
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts +0 -31
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +0 -12
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts +0 -8
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts +0 -3
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts +0 -9
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts +0 -14
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/index.d.ts +0 -7
- package/dist/typescript/module/features/pmProgress/index.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts +0 -7
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts +0 -14
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts +0 -17
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts +0 -23
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +0 -102
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts +0 -22
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +0 -25
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +0 -17
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +0 -44
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +0 -66
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts +0 -193
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +0 -4
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/StarIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +0 -1
- package/src/features/pmProgress/PmProgress.tsx +0 -30
- package/src/features/pmProgress/__tests__/.keep +0 -0
- package/src/features/pmProgress/components/chart/chart.helpers.ts +0 -16
- package/src/features/pmProgress/components/chart/chart.types.ts +0 -37
- package/src/features/pmProgress/components/chart/components/PracticeProgressPieChart.tsx +0 -32
- package/src/features/pmProgress/components/chart/components/SlicesClipPaths.tsx +0 -22
- package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +0 -90
- package/src/features/pmProgress/components/chart/components/layers/SliceArcPattern.tsx +0 -44
- package/src/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.tsx +0 -11
- package/src/features/pmProgress/components/chart/components/layers/SliceFillColor.tsx +0 -88
- package/src/features/pmProgress/components/chart/model/ArcPatternGenerator.ts +0 -48
- package/src/features/pmProgress/components/chart/model/PieChartManager.ts +0 -20
- package/src/features/pmProgress/components/chart/model/SliceHighlight.ts +0 -17
- package/src/features/pmProgress/components/chart/model/SliceShapeGenerator.ts +0 -90
- package/src/features/pmProgress/components/content/PmContent.tsx +0 -44
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +0 -211
- package/src/features/pmProgress/components/header/StartButton.tsx +0 -141
- package/src/features/pmProgress/components/insights/PmInsights.tsx +0 -65
- package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +0 -88
- package/src/features/pmProgress/components/insights/StatsCard.tsx +0 -54
- package/src/features/pmProgress/components/list/Fluency.tsx +0 -69
- package/src/features/pmProgress/components/list/ListCard.tsx +0 -230
- package/src/features/pmProgress/components/list/ListItem.tsx +0 -161
- package/src/features/pmProgress/components/list/PmDomainList.tsx +0 -76
- package/src/features/pmProgress/components/locked/PmStatusOverlay.tsx +0 -101
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +0 -127
- package/src/features/pmProgress/components/standard/StandardTag.tsx +0 -182
- package/src/features/pmProgress/context/PmProgressContext.tsx +0 -25
- package/src/features/pmProgress/index.ts +0 -6
- package/src/features/pmProgress/model/PmHighlightModel.ts +0 -11
- package/src/features/pmProgress/model/PmInsightsModel.ts +0 -23
- package/src/features/pmProgress/model/PmProgressApi.ts +0 -34
- package/src/features/pmProgress/model/PmProgressModel.ts +0 -48
- package/src/features/pmProgress/model/PmRecommendationsModel.ts +0 -47
- package/src/features/pmProgress/model/PmSolvingFlowModel.ts +0 -134
- package/src/features/pmProgress/model/PmTreeModel.ts +0 -163
- package/src/features/pmProgress/shared/TreeNormalizer.ts +0 -64
- package/src/features/pmProgress/shared/pmProgress.constants.ts +0 -98
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +0 -273
- package/src/features/pmProgress/shared/pmProgress.types.ts +0 -218
- package/src/shared/icons/PentagonIcon.tsx +0 -17
- package/src/shared/icons/SketchArrowRight.tsx +0 -18
- package/src/shared/icons/SliceDiamondIcon.tsx +0 -16
- package/src/shared/icons/StarIcon.tsx +0 -17
- package/src/shared/icons/TimerIcon.tsx +0 -21
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Platform, StyleSheet, ViewStyle } from 'react-native'
|
|
3
|
-
import { G, Path } from 'react-native-svg'
|
|
4
|
-
import { useUnit } from 'effector-react'
|
|
5
|
-
import { SliceBackgroundColor } from './layers/SliceBackgroundColor'
|
|
6
|
-
import { SliceFillColor } from './layers/SliceFillColor'
|
|
7
|
-
import { SliceArcPattern } from './layers/SliceArcPattern'
|
|
8
|
-
import { usePmProgress } from '../../../context/PmProgressContext'
|
|
9
|
-
import type { PieChartManagerConfig, SliceShape } from '../chart.types'
|
|
10
|
-
import type { PieChartManager } from '../model/PieChartManager'
|
|
11
|
-
|
|
12
|
-
type SlicesPathsProps = {
|
|
13
|
-
slices: SliceShape[]
|
|
14
|
-
pieChartManager: PieChartManager
|
|
15
|
-
config: PieChartManagerConfig
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const SlicesPaths = ({ slices, pieChartManager, config }: SlicesPathsProps) => {
|
|
19
|
-
const { model } = usePmProgress()
|
|
20
|
-
const [hoveredId, expandedId, domains] = useUnit([
|
|
21
|
-
model.highlight.$hoveredId,
|
|
22
|
-
model.highlight.$expandedId,
|
|
23
|
-
model.tree.$domains,
|
|
24
|
-
])
|
|
25
|
-
|
|
26
|
-
const highlightedId = hoveredId ?? expandedId
|
|
27
|
-
const highlightedIndex = highlightedId
|
|
28
|
-
? domains.findIndex(({ domainId }) => domainId === highlightedId)
|
|
29
|
-
: null
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<>
|
|
33
|
-
{slices.map((slice) => {
|
|
34
|
-
const id = `${slice.index}`
|
|
35
|
-
const shapeSvg = pieChartManager.shape.generateSlicePath(slice)
|
|
36
|
-
const fillSvg = pieChartManager.shape.generateFillPath(slice)
|
|
37
|
-
const fillBorderSvg = pieChartManager.shape.generateFillBorderPath(slice)
|
|
38
|
-
const isHighlighted = highlightedIndex === slice.index
|
|
39
|
-
const translateY = pieChartManager.highlight.getTranslateY(isHighlighted)
|
|
40
|
-
const borderWidth = isHighlighted ? config.borderWidth : 0
|
|
41
|
-
const domainId = domains[slice.index]?.domainId
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<G
|
|
45
|
-
key={id}
|
|
46
|
-
style={styles.container}
|
|
47
|
-
onPress={() => domainId && model.highlight.expand(domainId)}
|
|
48
|
-
onMouseEnter={() => domainId && model.highlight.hover(domainId)}
|
|
49
|
-
onMouseLeave={() => model.highlight.hover(null)}
|
|
50
|
-
>
|
|
51
|
-
<Path d={shapeSvg} fill="transparent" />
|
|
52
|
-
<G style={styles.visual} transform={`translate(0, ${translateY})`}>
|
|
53
|
-
<SliceBackgroundColor
|
|
54
|
-
path={shapeSvg}
|
|
55
|
-
color={isHighlighted ? config.colors.highlightedBackground : slice.backgroundColor}
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<SliceFillColor
|
|
59
|
-
clipPathId={id}
|
|
60
|
-
shapeSvg={shapeSvg}
|
|
61
|
-
fillSvg={fillSvg}
|
|
62
|
-
fillBorderSvg={fillBorderSvg}
|
|
63
|
-
color={slice.fillColor}
|
|
64
|
-
percent={slice.fillPercent}
|
|
65
|
-
borderColor={isHighlighted ? slice.borderColor : undefined}
|
|
66
|
-
borderWidth={borderWidth || undefined}
|
|
67
|
-
/>
|
|
68
|
-
|
|
69
|
-
<SliceArcPattern
|
|
70
|
-
clipPathId={id}
|
|
71
|
-
slice={slice}
|
|
72
|
-
config={config}
|
|
73
|
-
pieChartManager={pieChartManager}
|
|
74
|
-
/>
|
|
75
|
-
</G>
|
|
76
|
-
</G>
|
|
77
|
-
)
|
|
78
|
-
})}
|
|
79
|
-
</>
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const styles = StyleSheet.create({
|
|
84
|
-
container: {
|
|
85
|
-
cursor: 'pointer',
|
|
86
|
-
},
|
|
87
|
-
visual: {
|
|
88
|
-
...Platform.select({ web: { transition: 'transform 0.1s ease-in-out' } as ViewStyle }),
|
|
89
|
-
},
|
|
90
|
-
})
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { G, Path } from 'react-native-svg'
|
|
3
|
-
import { getSliceClipId } from '../../chart.helpers'
|
|
4
|
-
import type { PieChartManagerConfig, SliceShape } from '../../chart.types'
|
|
5
|
-
import type { PieChartManager } from '../../model/PieChartManager'
|
|
6
|
-
|
|
7
|
-
type SliceArcPatternProps = {
|
|
8
|
-
clipPathId: string
|
|
9
|
-
slice: SliceShape
|
|
10
|
-
pieChartManager: PieChartManager
|
|
11
|
-
config: PieChartManagerConfig
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const SliceArcPattern = ({
|
|
15
|
-
clipPathId,
|
|
16
|
-
slice,
|
|
17
|
-
pieChartManager,
|
|
18
|
-
config,
|
|
19
|
-
}: SliceArcPatternProps) => {
|
|
20
|
-
const patternSizes = pieChartManager.pattern.getPatternTrackSizes()
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<G clipPath={`url(#${getSliceClipId(clipPathId)})`}>
|
|
24
|
-
{patternSizes.map((radius, rowIndex) => {
|
|
25
|
-
const arcPath = pieChartManager.pattern.generateArcPath(slice, radius)
|
|
26
|
-
const dashWidth = pieChartManager.pattern.getDashWidthForRadius(radius)
|
|
27
|
-
const dashOffset = pieChartManager.pattern.getDashOffset(rowIndex, radius)
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<Path
|
|
31
|
-
key={rowIndex}
|
|
32
|
-
d={arcPath}
|
|
33
|
-
fill="none"
|
|
34
|
-
stroke={config.outerArc.color}
|
|
35
|
-
strokeWidth={config.outerArc.strokeWidth}
|
|
36
|
-
strokeDasharray={[dashWidth, dashWidth]}
|
|
37
|
-
strokeDashoffset={dashOffset}
|
|
38
|
-
strokeLinecap="butt"
|
|
39
|
-
/>
|
|
40
|
-
)
|
|
41
|
-
})}
|
|
42
|
-
</G>
|
|
43
|
-
)
|
|
44
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Path } from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
type BackgroundLayerProps = {
|
|
5
|
-
path: string
|
|
6
|
-
color: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const SliceBackgroundColor = ({ path, color }: BackgroundLayerProps) => {
|
|
10
|
-
return <Path d={path} fill={color} />
|
|
11
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { useUnit } from 'effector-react'
|
|
3
|
-
import { StyleSheet, View } from 'react-native'
|
|
4
|
-
import { SPACING } from '@magmamath/react-native-ui'
|
|
5
|
-
import { PmTeacherRecs } from '../recs/PmTeacherRecs'
|
|
6
|
-
import { PmDomainList } from '../list/PmDomainList'
|
|
7
|
-
import { PmInsights } from '../insights/PmInsights'
|
|
8
|
-
import { PmStatusOverlay } from '../locked/PmStatusOverlay'
|
|
9
|
-
import { usePmProgress } from '../../context/PmProgressContext'
|
|
10
|
-
import { PmProgressStatus } from '@magmamath/students-features'
|
|
11
|
-
|
|
12
|
-
export const PmProgressContent = () => {
|
|
13
|
-
const { model } = usePmProgress()
|
|
14
|
-
const status = useUnit(model.tree.$status)
|
|
15
|
-
|
|
16
|
-
if (status) {
|
|
17
|
-
return <PmStatusOverlay status={status} />
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<View style={styles.content}>
|
|
22
|
-
<View style={styles.column}>
|
|
23
|
-
<PmTeacherRecs />
|
|
24
|
-
<PmDomainList />
|
|
25
|
-
</View>
|
|
26
|
-
|
|
27
|
-
<PmInsights />
|
|
28
|
-
</View>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const styles = StyleSheet.create({
|
|
33
|
-
content: {
|
|
34
|
-
flex: 1,
|
|
35
|
-
flexDirection: 'row',
|
|
36
|
-
overflow: 'hidden',
|
|
37
|
-
},
|
|
38
|
-
column: {
|
|
39
|
-
flex: 1,
|
|
40
|
-
overflow: 'hidden',
|
|
41
|
-
marginRight: SPACING[500],
|
|
42
|
-
gap: SPACING[200],
|
|
43
|
-
},
|
|
44
|
-
})
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import { Dimensions, Platform, StyleSheet, TextStyle, View } from 'react-native'
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
ButtonVariant,
|
|
6
|
-
CaretDownIcon,
|
|
7
|
-
CaretUpIcon,
|
|
8
|
-
COLORS,
|
|
9
|
-
Dropdown,
|
|
10
|
-
HeadingVariants,
|
|
11
|
-
Menu,
|
|
12
|
-
MenuItemProps,
|
|
13
|
-
SPACING,
|
|
14
|
-
Typography,
|
|
15
|
-
} from '@magmamath/react-native-ui'
|
|
16
|
-
import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
|
|
17
|
-
import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
|
|
18
|
-
import { useText } from '../../../../shared/translation'
|
|
19
|
-
import { useUnit, useStoreMap } from 'effector-react'
|
|
20
|
-
import { usePmProgress } from '../../context/PmProgressContext'
|
|
21
|
-
import { formatGradeLabel, isFluencyDomain } from '../../shared/pmProgress.helpers'
|
|
22
|
-
import { OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
|
|
23
|
-
import { StartButton } from './StartButton'
|
|
24
|
-
|
|
25
|
-
const menuItemProps: MenuItemProps = {
|
|
26
|
-
style: {
|
|
27
|
-
text: { whiteSpace: 'nowrap' } as TextStyle,
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const PmProgressHeader = () => {
|
|
32
|
-
const t = useText()
|
|
33
|
-
const { model, onStartPress, customGradeLabels, readOnly } = usePmProgress()
|
|
34
|
-
const [isDropdownOpen, setIsDropdownOpen] = useState(false)
|
|
35
|
-
const status = useUnit(model.tree.$status)
|
|
36
|
-
|
|
37
|
-
const grade = useUnit(model.tree.$grade)
|
|
38
|
-
const grades = useStoreMap({
|
|
39
|
-
store: model.tree.$grades,
|
|
40
|
-
keys: [customGradeLabels],
|
|
41
|
-
fn: (grades) =>
|
|
42
|
-
grades.map((grade) => ({
|
|
43
|
-
key: grade.value,
|
|
44
|
-
title: formatGradeLabel(grade.value, customGradeLabels),
|
|
45
|
-
disabled: grade.isLocked,
|
|
46
|
-
...menuItemProps,
|
|
47
|
-
})),
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
|
|
51
|
-
|
|
52
|
-
const nextUp = useStoreMap(model.tree.$domains, (domains) =>
|
|
53
|
-
domains.find((domain) => {
|
|
54
|
-
const isFluency = isFluencyDomain(domain.title)
|
|
55
|
-
const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
|
|
56
|
-
return !isFluency && !isDomainCompleted
|
|
57
|
-
}),
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
const isLoading = loaderOpeningId === OpeningLoaderId.START_BUTTON
|
|
61
|
-
const isSkillOpeningActionPending = !!(loaderOpeningId !== null || status)
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<View style={styles.container}>
|
|
65
|
-
<View style={styles.title}>
|
|
66
|
-
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
67
|
-
{t('pmProgress.title')}
|
|
68
|
-
</Typography>
|
|
69
|
-
<Dropdown
|
|
70
|
-
isOpen={isDropdownOpen}
|
|
71
|
-
onDismiss={() => setIsDropdownOpen(false)}
|
|
72
|
-
anchor={
|
|
73
|
-
<Button
|
|
74
|
-
variant={ButtonVariant.TERTIARY}
|
|
75
|
-
onPress={() => setIsDropdownOpen((prev) => !prev)}
|
|
76
|
-
>
|
|
77
|
-
<Typography variant={HeadingVariants.H8} style={styles.dark}>
|
|
78
|
-
{grade !== null
|
|
79
|
-
? formatGradeLabel(grade, customGradeLabels)
|
|
80
|
-
: t('pmProgress.grade')}
|
|
81
|
-
</Typography>
|
|
82
|
-
<View style={styles.caret}>
|
|
83
|
-
{isDropdownOpen ? (
|
|
84
|
-
<CaretUpIcon color={COLORS.NEUTRAL_9} />
|
|
85
|
-
) : (
|
|
86
|
-
<CaretDownIcon color={COLORS.NEUTRAL_9} />
|
|
87
|
-
)}
|
|
88
|
-
</View>
|
|
89
|
-
</Button>
|
|
90
|
-
}
|
|
91
|
-
>
|
|
92
|
-
<Menu
|
|
93
|
-
style={styles.menu}
|
|
94
|
-
items={grades}
|
|
95
|
-
onItemPress={(item) => {
|
|
96
|
-
model.tree.setGrade(item.key as number)
|
|
97
|
-
setIsDropdownOpen(false)
|
|
98
|
-
}}
|
|
99
|
-
/>
|
|
100
|
-
</Dropdown>
|
|
101
|
-
</View>
|
|
102
|
-
|
|
103
|
-
{!readOnly && (
|
|
104
|
-
<View style={styles.nextUp}>
|
|
105
|
-
{nextUp && !status && (
|
|
106
|
-
<>
|
|
107
|
-
<View style={styles.content}>
|
|
108
|
-
<View style={styles.subtitle}>
|
|
109
|
-
<Typography variant={HeadingVariants.H2} style={styles.dark}>
|
|
110
|
-
{t('pmProgress.nextUp')}
|
|
111
|
-
</Typography>
|
|
112
|
-
</View>
|
|
113
|
-
<View style={[styles.row, styles.tilted]}>
|
|
114
|
-
<Typography variant={HeadingVariants.H7} style={styles.muted}>
|
|
115
|
-
{nextUp?.title}
|
|
116
|
-
</Typography>
|
|
117
|
-
<View style={styles.diamond}>
|
|
118
|
-
<SliceDiamondIcon color={nextUp?.color} />
|
|
119
|
-
</View>
|
|
120
|
-
</View>
|
|
121
|
-
</View>
|
|
122
|
-
<View style={styles.arrow}>
|
|
123
|
-
<SketchArrowRight />
|
|
124
|
-
</View>
|
|
125
|
-
</>
|
|
126
|
-
)}
|
|
127
|
-
|
|
128
|
-
<StartButton
|
|
129
|
-
onPress={async () => {
|
|
130
|
-
try {
|
|
131
|
-
model.solving.setLoaderOpeningId(OpeningLoaderId.START_BUTTON)
|
|
132
|
-
const skill = await model.solving.start({ type: SolvingFlow.MAGMA })
|
|
133
|
-
await onStartPress?.(skill)
|
|
134
|
-
} finally {
|
|
135
|
-
model.solving.setLoaderOpeningId(null)
|
|
136
|
-
}
|
|
137
|
-
}}
|
|
138
|
-
disabled={isSkillOpeningActionPending}
|
|
139
|
-
isLoading={isLoading}
|
|
140
|
-
isActive={isLoading}
|
|
141
|
-
withPulsation={!!nextUp && !isLoading && !isSkillOpeningActionPending && !status}
|
|
142
|
-
/>
|
|
143
|
-
</View>
|
|
144
|
-
)}
|
|
145
|
-
</View>
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const SMALL_SCREEN_THRESHOLD = 568
|
|
150
|
-
const SMALL_SCREEN_MENU_MAX_HEIGHT = 300
|
|
151
|
-
const WINDOW_HEIGHT = Dimensions.get('window').height
|
|
152
|
-
const MENU_MAX_HEIGHT =
|
|
153
|
-
WINDOW_HEIGHT <= SMALL_SCREEN_THRESHOLD ? SMALL_SCREEN_MENU_MAX_HEIGHT : WINDOW_HEIGHT * 0.8
|
|
154
|
-
|
|
155
|
-
const styles = StyleSheet.create({
|
|
156
|
-
container: {
|
|
157
|
-
flexDirection: 'row',
|
|
158
|
-
justifyContent: 'space-between',
|
|
159
|
-
alignItems: 'center',
|
|
160
|
-
marginBottom: SPACING[400],
|
|
161
|
-
zIndex: 1,
|
|
162
|
-
},
|
|
163
|
-
title: {
|
|
164
|
-
flexDirection: 'row',
|
|
165
|
-
alignItems: 'center',
|
|
166
|
-
gap: SPACING[200],
|
|
167
|
-
},
|
|
168
|
-
dark: {
|
|
169
|
-
color: COLORS.NEUTRAL_9,
|
|
170
|
-
},
|
|
171
|
-
caret: {
|
|
172
|
-
marginLeft: SPACING[100],
|
|
173
|
-
},
|
|
174
|
-
menu: {
|
|
175
|
-
top: SPACING[100],
|
|
176
|
-
minWidth: 110,
|
|
177
|
-
overflow: 'scroll',
|
|
178
|
-
maxHeight: MENU_MAX_HEIGHT,
|
|
179
|
-
...Platform.select({ web: { scrollbarWidth: 'none' } }),
|
|
180
|
-
},
|
|
181
|
-
nextUp: {
|
|
182
|
-
flexDirection: 'row',
|
|
183
|
-
alignItems: 'center',
|
|
184
|
-
gap: SPACING[400],
|
|
185
|
-
},
|
|
186
|
-
content: {
|
|
187
|
-
alignItems: 'center',
|
|
188
|
-
gap: SPACING[100],
|
|
189
|
-
},
|
|
190
|
-
subtitle: {
|
|
191
|
-
transform: [{ rotate: '355deg' }],
|
|
192
|
-
marginRight: SPACING[300],
|
|
193
|
-
},
|
|
194
|
-
tilted: {
|
|
195
|
-
transform: [{ rotate: '355deg' }],
|
|
196
|
-
},
|
|
197
|
-
row: {
|
|
198
|
-
flexDirection: 'row',
|
|
199
|
-
gap: SPACING[100],
|
|
200
|
-
},
|
|
201
|
-
muted: {
|
|
202
|
-
color: COLORS.NEUTRAL_8,
|
|
203
|
-
},
|
|
204
|
-
diamond: {
|
|
205
|
-
bottom: 10,
|
|
206
|
-
transform: [{ rotate: '5deg' }],
|
|
207
|
-
},
|
|
208
|
-
arrow: {
|
|
209
|
-
transform: [{ rotate: '358deg' }],
|
|
210
|
-
},
|
|
211
|
-
})
|