@magmamath/students-features 1.3.4-rc.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +2 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +1 -1
- package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
- package/dist/commonjs/features/pmProgress/PmProgress.js +42 -0
- package/dist/commonjs/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +24 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js +2 -0
- package/dist/commonjs/features/pmProgress/components/chart/chart.types.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +44 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js +26 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +91 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +38 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +21 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js +55 -0
- package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js +49 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js +23 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js +79 -0
- package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js +50 -0
- package/dist/commonjs/features/pmProgress/components/content/PmContent.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js +127 -0
- package/dist/commonjs/features/pmProgress/components/header/NextUp.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +133 -0
- package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js +126 -0
- package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +70 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +99 -0
- package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +72 -0
- package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js +82 -0
- package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js +207 -0
- package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js +139 -0
- package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +96 -0
- package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +101 -0
- package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +134 -0
- package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +203 -0
- package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -0
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js +18 -0
- package/dist/commonjs/features/pmProgress/context/PmProgressContext.js.map +1 -0
- package/dist/commonjs/features/pmProgress/index.js +64 -0
- package/dist/commonjs/features/pmProgress/index.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js +15 -0
- package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js +22 -0
- package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js +18 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressApi.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +43 -0
- package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +47 -0
- package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js +104 -0
- package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +176 -0
- package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +52 -0
- package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +65 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +234 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js +12 -0
- package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js.map +1 -0
- package/dist/commonjs/features/voice/constants.js +3 -13
- package/dist/commonjs/features/voice/constants.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +5 -19
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +20 -71
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +0 -5
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/features/voice/types.js +0 -6
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/index.js +15 -3
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/MenuIcon.js +30 -0
- package/dist/commonjs/shared/icons/MenuIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/PentagonIcon.js +29 -0
- package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
- package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js +29 -0
- package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/StarIcon.js +32 -0
- package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
- package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +24 -0
- package/dist/commonjs/shared/translation/localization/de.json +24 -0
- package/dist/commonjs/shared/translation/localization/en.json +24 -0
- package/dist/commonjs/shared/translation/localization/gb.json +24 -0
- package/dist/commonjs/shared/translation/localization/sct.json +24 -0
- package/dist/commonjs/shared/translation/localization/sw.json +24 -0
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +2 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +2 -2
- package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
- package/dist/module/features/pmProgress/PmProgress.js +36 -0
- package/dist/module/features/pmProgress/PmProgress.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js +17 -0
- package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/chart.types.js +2 -0
- package/dist/module/features/pmProgress/components/chart/chart.types.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +38 -0
- package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js +20 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +85 -0
- package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +32 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +15 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js +49 -0
- package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js +44 -0
- package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js +18 -0
- package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js +74 -0
- package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
- package/dist/module/features/pmProgress/components/content/PmContent.js +44 -0
- package/dist/module/features/pmProgress/components/content/PmContent.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/NextUp.js +121 -0
- package/dist/module/features/pmProgress/components/header/NextUp.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +126 -0
- package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
- package/dist/module/features/pmProgress/components/header/StartButton.js +119 -0
- package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js +63 -0
- package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +94 -0
- package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js +66 -0
- package/dist/module/features/pmProgress/components/insights/StatsCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js +76 -0
- package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js +200 -0
- package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js +132 -0
- package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js +90 -0
- package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -0
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js +95 -0
- package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +128 -0
- package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
- package/dist/module/features/pmProgress/components/standard/StandardTag.js +197 -0
- package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -0
- package/dist/module/features/pmProgress/context/PmProgressContext.js +13 -0
- package/dist/module/features/pmProgress/context/PmProgressContext.js.map +1 -0
- package/dist/module/features/pmProgress/index.js +9 -0
- package/dist/module/features/pmProgress/index.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmHighlightModel.js +10 -0
- package/dist/module/features/pmProgress/model/PmHighlightModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmInsightsModel.js +17 -0
- package/dist/module/features/pmProgress/model/PmInsightsModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmProgressApi.js +13 -0
- package/dist/module/features/pmProgress/model/PmProgressApi.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmProgressModel.js +38 -0
- package/dist/module/features/pmProgress/model/PmProgressModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +42 -0
- package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js +99 -0
- package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js +171 -0
- package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -0
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js +47 -0
- package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js +62 -0
- package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +214 -0
- package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js +8 -0
- package/dist/module/features/pmProgress/shared/pmProgress.types.js.map +1 -0
- package/dist/module/features/voice/constants.js +2 -12
- package/dist/module/features/voice/constants.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecord.js +6 -20
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +22 -73
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +2 -2
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +0 -5
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/features/voice/types.js +1 -5
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/MenuIcon.js +22 -0
- package/dist/module/shared/icons/MenuIcon.js.map +1 -0
- package/dist/module/shared/icons/PentagonIcon.js +21 -0
- package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
- package/dist/module/shared/icons/SketchArrowRight.js +25 -0
- package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js +21 -0
- package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
- package/dist/module/shared/icons/StarIcon.js +24 -0
- package/dist/module/shared/icons/StarIcon.js.map +1 -0
- package/dist/module/shared/icons/TimerIcon.js +27 -0
- package/dist/module/shared/icons/TimerIcon.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +24 -0
- package/dist/module/shared/translation/localization/de.json +24 -0
- package/dist/module/shared/translation/localization/en.json +24 -0
- package/dist/module/shared/translation/localization/gb.json +24 -0
- package/dist/module/shared/translation/localization/sct.json +24 -0
- package/dist/module/shared/translation/localization/sw.json +24 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts +36 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/content/PmContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts +31 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts +8 -0
- package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
- package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
- package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts +15 -0
- package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts +23 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts +22 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +25 -0
- package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +17 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +49 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +73 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts +193 -0
- package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts +2 -12
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +3 -1
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/types.d.ts +0 -4
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/MenuIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/MenuIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +144 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +48 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/PmProgress.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts +36 -0
- package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/content/PmContent.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts +11 -0
- package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts +31 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +12 -0
- package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts +8 -0
- package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
- package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
- package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts +15 -0
- package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts +7 -0
- package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
- package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
- package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts +23 -0
- package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
- package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts +22 -0
- package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +25 -0
- package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +17 -0
- package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +49 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +73 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts +193 -0
- package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/constants.d.ts +2 -12
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +3 -1
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/types.d.ts +0 -4
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/MenuIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/MenuIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +144 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +48 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +21 -13
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +2 -1
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +2 -1
- package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +2 -2
- package/src/features/pmProgress/PmProgress.tsx +30 -0
- package/src/features/pmProgress/__tests__/.keep +0 -0
- package/src/features/pmProgress/components/chart/chart.helpers.ts +16 -0
- package/src/features/pmProgress/components/chart/chart.types.ts +37 -0
- package/src/features/pmProgress/components/chart/components/PracticeProgressPieChart.tsx +32 -0
- package/src/features/pmProgress/components/chart/components/SlicesClipPaths.tsx +22 -0
- package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +90 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceArcPattern.tsx +44 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.tsx +11 -0
- package/src/features/pmProgress/components/chart/components/layers/SliceFillColor.tsx +60 -0
- package/src/features/pmProgress/components/chart/model/ArcPatternGenerator.ts +48 -0
- package/src/features/pmProgress/components/chart/model/PieChartManager.ts +17 -0
- package/src/features/pmProgress/components/chart/model/SliceShapeGenerator.ts +90 -0
- package/src/features/pmProgress/components/content/PmContent.tsx +44 -0
- package/src/features/pmProgress/components/header/NextUp.tsx +109 -0
- package/src/features/pmProgress/components/header/PmProgressHeader.tsx +135 -0
- package/src/features/pmProgress/components/header/StartButton.tsx +160 -0
- package/src/features/pmProgress/components/insights/PmInsights.tsx +65 -0
- package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +88 -0
- package/src/features/pmProgress/components/insights/StatsCard.tsx +54 -0
- package/src/features/pmProgress/components/list/Fluency.tsx +72 -0
- package/src/features/pmProgress/components/list/ListCard.tsx +231 -0
- package/src/features/pmProgress/components/list/ListItem.tsx +164 -0
- package/src/features/pmProgress/components/list/PmDomainList.tsx +76 -0
- package/src/features/pmProgress/components/locked/PmStatusOverlay.tsx +101 -0
- package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +127 -0
- package/src/features/pmProgress/components/standard/StandardTag.tsx +181 -0
- package/src/features/pmProgress/context/PmProgressContext.tsx +26 -0
- package/src/features/pmProgress/index.ts +6 -0
- package/src/features/pmProgress/model/PmHighlightModel.ts +11 -0
- package/src/features/pmProgress/model/PmInsightsModel.ts +23 -0
- package/src/features/pmProgress/model/PmProgressApi.ts +34 -0
- package/src/features/pmProgress/model/PmProgressModel.ts +48 -0
- package/src/features/pmProgress/model/PmRecommendationsModel.ts +47 -0
- package/src/features/pmProgress/model/PmSolvingFlowModel.ts +140 -0
- package/src/features/pmProgress/model/PmTreeModel.ts +171 -0
- package/src/features/pmProgress/shared/TreeNormalizer.ts +64 -0
- package/src/features/pmProgress/shared/pmProgress.constants.ts +100 -0
- package/src/features/pmProgress/shared/pmProgress.helpers.ts +307 -0
- package/src/features/pmProgress/shared/pmProgress.types.ts +217 -0
- package/src/features/voice/constants.ts +2 -13
- package/src/features/voice/recording/components/VoiceRecord.tsx +5 -28
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +30 -99
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +2 -2
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +4 -8
- package/src/features/voice/recording/model/VoiceRecord.model.ts +0 -7
- package/src/features/voice/types.ts +0 -5
- package/src/index.ts +1 -0
- package/src/shared/icons/MenuIcon.tsx +15 -0
- package/src/shared/icons/PentagonIcon.tsx +14 -0
- package/src/shared/icons/SketchArrowRight.tsx +18 -0
- package/src/shared/icons/SliceDiamondIcon.tsx +14 -0
- package/src/shared/icons/StarIcon.tsx +17 -0
- package/src/shared/icons/TimerIcon.tsx +21 -0
- package/src/shared/translation/localization/ca.json +24 -0
- package/src/shared/translation/localization/de.json +24 -0
- package/src/shared/translation/localization/en.json +24 -0
- package/src/shared/translation/localization/gb.json +24 -0
- package/src/shared/translation/localization/sct.json +24 -0
- package/src/shared/translation/localization/sw.json +24 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "1.3.4
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -18,52 +18,60 @@
|
|
|
18
18
|
"release": "release-it"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@magmamath/frontend-config": "1.1.
|
|
21
|
+
"@magmamath/frontend-config": "1.1.3",
|
|
22
22
|
"@magmamath/react-native-ui": "*",
|
|
23
|
+
"@matteappen/skills-utils": "^3.7.1",
|
|
24
|
+
"@react-native-masked-view/masked-view": "*",
|
|
25
|
+
"d3-shape": "3.2.0",
|
|
23
26
|
"effector": "^23.2.3",
|
|
27
|
+
"effector-action": "^1.2.2",
|
|
24
28
|
"effector-react": "^23.2.1",
|
|
29
|
+
"effector-storage": "^8.0.0",
|
|
30
|
+
"expo": ">=52.0.47",
|
|
31
|
+
"expo-audio": "^1.1.1",
|
|
25
32
|
"patronum": "^2.3.0",
|
|
26
33
|
"react": "*",
|
|
27
34
|
"react-native": "*",
|
|
28
35
|
"react-native-gesture-handler": "*",
|
|
36
|
+
"react-native-linear-gradient": "*",
|
|
29
37
|
"react-native-modalfy": "*",
|
|
30
38
|
"react-native-reanimated": ">=0.3.16",
|
|
31
|
-
"react-native-svg": "^15.10.0"
|
|
32
|
-
"expo-audio": "^1.1.1",
|
|
33
|
-
"expo": ">=52.0.47",
|
|
34
|
-
"@react-native-masked-view/masked-view": "*",
|
|
35
|
-
"react-native-linear-gradient": "*"
|
|
39
|
+
"react-native-svg": "^15.10.0"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
42
|
+
"@magmamath/frontend-config": "1.1.3",
|
|
38
43
|
"@magmamath/react-native-ui": "0.4.83",
|
|
39
|
-
"@
|
|
44
|
+
"@matteappen/skills-utils": "^3.7.1",
|
|
45
|
+
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
40
46
|
"@react-native/eslint-config": "^0.73.1",
|
|
41
47
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
48
|
+
"@types/d3-shape": "3.1.7",
|
|
42
49
|
"@types/jest": "^29.5.5",
|
|
43
50
|
"@types/react": "^18.2.44",
|
|
51
|
+
"axios": "^1.13.5",
|
|
44
52
|
"del-cli": "^5.1.0",
|
|
45
53
|
"effector": "^23.2.3",
|
|
54
|
+
"effector-action": "1.2.2",
|
|
46
55
|
"effector-react": "^23.2.1",
|
|
56
|
+
"effector-storage": "^8.0.0",
|
|
47
57
|
"eslint": "^8.51.0",
|
|
48
58
|
"eslint-config-prettier": "^9.0.0",
|
|
49
59
|
"eslint-plugin-prettier": "^5.0.1",
|
|
50
60
|
"expo": "^52.0.47",
|
|
51
61
|
"expo-audio": "^1.1.1",
|
|
52
62
|
"jest": "^29.7.0",
|
|
53
|
-
"prettier": "^3.0.3",
|
|
54
63
|
"patronum": "^2.3.0",
|
|
64
|
+
"prettier": "^3.0.3",
|
|
55
65
|
"react": "18.3.1",
|
|
56
66
|
"react-native": "0.76.3",
|
|
57
67
|
"react-native-builder-bob": "^0.33.3",
|
|
58
68
|
"react-native-gesture-handler": "^2.28.0",
|
|
69
|
+
"react-native-linear-gradient": "^2.8.3",
|
|
59
70
|
"react-native-modalfy": "^3.7.0",
|
|
60
71
|
"react-native-reanimated": "^3.17.2",
|
|
61
72
|
"react-native-svg": "^15.10.0",
|
|
62
73
|
"release-it": "^17.10.0",
|
|
63
|
-
"typescript": "^5.2.2"
|
|
64
|
-
"axios": "^1.13.5",
|
|
65
|
-
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
66
|
-
"react-native-linear-gradient": "^2.8.3"
|
|
74
|
+
"typescript": "^5.2.2"
|
|
67
75
|
},
|
|
68
76
|
"resolutions": {
|
|
69
77
|
"@types/react": "^18.2.44"
|
|
@@ -6,6 +6,7 @@ import { useChatModel } from '../../context/ChatBotModelContext'
|
|
|
6
6
|
import { ColorScheme } from '../../types/style.types'
|
|
7
7
|
import { HintButtonVariant, RequestHintButton } from './RequestHintButton'
|
|
8
8
|
import { FreeTextInputBlock } from './FreeText/FreeTextInputBlock'
|
|
9
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
9
10
|
|
|
10
11
|
export type ChatInputProps = {
|
|
11
12
|
hasMessages: boolean
|
|
@@ -82,6 +83,6 @@ const styles = StyleSheet.create({
|
|
|
82
83
|
width: INPUT_WIDTH,
|
|
83
84
|
alignItems: 'flex-end',
|
|
84
85
|
justifyContent: 'center',
|
|
85
|
-
marginLeft:
|
|
86
|
+
marginLeft: SPACING[150],
|
|
86
87
|
},
|
|
87
88
|
})
|
|
@@ -8,6 +8,7 @@ import { ColorScheme } from '../../types/style.types'
|
|
|
8
8
|
import { MessageButtonsBlock } from './MessageButtonsBlock'
|
|
9
9
|
import { getSpacerSize } from './helpers'
|
|
10
10
|
import { MessageVariant } from '../../types/model.types'
|
|
11
|
+
import { FONT_FAMILY } from '@magmamath/react-native-ui'
|
|
11
12
|
|
|
12
13
|
type MessageContentProps = {
|
|
13
14
|
text: string
|
|
@@ -100,7 +101,7 @@ const styles = StyleSheet.create({
|
|
|
100
101
|
flex: 1,
|
|
101
102
|
fontSize: 20,
|
|
102
103
|
fontWeight: 400,
|
|
103
|
-
fontFamily:
|
|
104
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
104
105
|
color: '#33334D',
|
|
105
106
|
width: '100%',
|
|
106
107
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native'
|
|
3
|
-
import { BORDER_RADIUS, COLORS, SHADOWS, SPACING } from '@magmamath/react-native-ui'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, FONT_FAMILY, SHADOWS, SPACING } from '@magmamath/react-native-ui'
|
|
4
4
|
import { EOAModalText } from '@magmamath/students-features'
|
|
5
5
|
|
|
6
6
|
type AssessmentScoreCardProps = {
|
|
@@ -38,6 +38,6 @@ const styles = StyleSheet.create({
|
|
|
38
38
|
fontSize: 96,
|
|
39
39
|
fontWeight: '700',
|
|
40
40
|
color: COLORS.NEUTRAL_9,
|
|
41
|
-
fontFamily:
|
|
41
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
42
42
|
},
|
|
43
43
|
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { memo } from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { useGate } from 'effector-react'
|
|
4
|
+
import { PmProgressHeader } from './components/header/PmProgressHeader'
|
|
5
|
+
import { PmProgressContextValue, PmProgressProvider } from './context/PmProgressContext'
|
|
6
|
+
import { User } from './shared/pmProgress.types'
|
|
7
|
+
import { PmProgressContent } from './components/content/PmContent'
|
|
8
|
+
|
|
9
|
+
type PmProgressProps = { user: User } & PmProgressContextValue
|
|
10
|
+
|
|
11
|
+
export const PmProgress = memo(({ model, user, ...props }: PmProgressProps) => {
|
|
12
|
+
useGate(model.gate, { user })
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<PmProgressProvider value={{ model, ...props }}>
|
|
16
|
+
<View style={styles.container}>
|
|
17
|
+
<PmProgressHeader />
|
|
18
|
+
<PmProgressContent />
|
|
19
|
+
</View>
|
|
20
|
+
</PmProgressProvider>
|
|
21
|
+
)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const styles = StyleSheet.create({
|
|
25
|
+
container: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
height: '100%',
|
|
29
|
+
},
|
|
30
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const getSliceClipId = (index: number | string) => `slice-clip-${index}`
|
|
2
|
+
|
|
3
|
+
export const dynamicInnerRadius = (sliceCount: number): number => {
|
|
4
|
+
if (sliceCount >= 5) return 14
|
|
5
|
+
if (sliceCount === 4) return 8
|
|
6
|
+
if (sliceCount === 3) return 6
|
|
7
|
+
if (sliceCount === 2) return 4
|
|
8
|
+
if (sliceCount === 1) return 0
|
|
9
|
+
return 30
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const dynamicCornerRadius = (fillPercent: number): number => {
|
|
13
|
+
if (fillPercent >= 30) return 8
|
|
14
|
+
if (fillPercent >= 5) return 6
|
|
15
|
+
return 4
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type SliceInputData = {
|
|
2
|
+
value: number
|
|
3
|
+
fillPercent?: number
|
|
4
|
+
backgroundColor?: string
|
|
5
|
+
fillColor: string
|
|
6
|
+
borderColor: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type SliceShape = {
|
|
10
|
+
index: number
|
|
11
|
+
startAngle: number
|
|
12
|
+
endAngle: number
|
|
13
|
+
fillPercent: number
|
|
14
|
+
backgroundColor: string
|
|
15
|
+
fillColor: string
|
|
16
|
+
borderColor: string
|
|
17
|
+
data: SliceInputData
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type PieChartManagerConfig = {
|
|
21
|
+
size: number
|
|
22
|
+
outerRadius: number
|
|
23
|
+
innerRadius: number | ((sliceCount: number) => number)
|
|
24
|
+
cornerRadius: number | ((fillPercent: number) => number)
|
|
25
|
+
gapBetweenSlices: number
|
|
26
|
+
borderWidth: number
|
|
27
|
+
pressOffset: number
|
|
28
|
+
outerArc: {
|
|
29
|
+
color: string
|
|
30
|
+
strokeWidth: number
|
|
31
|
+
dashWidth: number
|
|
32
|
+
}
|
|
33
|
+
colors: {
|
|
34
|
+
background: string
|
|
35
|
+
highlightedBackground: string
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { memo, useMemo } from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import Svg, { G } from 'react-native-svg'
|
|
4
|
+
import { PieChartManager } from '../model/PieChartManager'
|
|
5
|
+
import { SlicesClipPaths } from './SlicesClipPaths'
|
|
6
|
+
import { SlicesPaths } from './SlicesPaths'
|
|
7
|
+
import type { PieChartManagerConfig, SliceInputData } from '../chart.types'
|
|
8
|
+
|
|
9
|
+
type PracticeProgressPieChartProps = {
|
|
10
|
+
data: SliceInputData[]
|
|
11
|
+
config: PieChartManagerConfig
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const PracticeProgressPieChart = memo(({ data, config }: PracticeProgressPieChartProps) => {
|
|
15
|
+
const pieChartManager = useMemo(() => new PieChartManager(config), [config])
|
|
16
|
+
const center = pieChartManager.getCenter()
|
|
17
|
+
|
|
18
|
+
const slices = useMemo(() => {
|
|
19
|
+
return pieChartManager.shape.generateSlices(data)
|
|
20
|
+
}, [data, pieChartManager])
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View>
|
|
24
|
+
<Svg width={config.size} height={config.size}>
|
|
25
|
+
<G x={center.x} y={center.y}>
|
|
26
|
+
<SlicesClipPaths slices={slices} pieChartManager={pieChartManager} />
|
|
27
|
+
<SlicesPaths slices={slices} pieChartManager={pieChartManager} config={config} />
|
|
28
|
+
</G>
|
|
29
|
+
</Svg>
|
|
30
|
+
</View>
|
|
31
|
+
)
|
|
32
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { ClipPath, Defs, Path } from 'react-native-svg'
|
|
3
|
+
import { getSliceClipId } from '../chart.helpers'
|
|
4
|
+
import type { SliceShape } from '../chart.types'
|
|
5
|
+
import type { PieChartManager } from '../model/PieChartManager'
|
|
6
|
+
|
|
7
|
+
type SlicesClipPathsProps = {
|
|
8
|
+
slices: SliceShape[]
|
|
9
|
+
pieChartManager: PieChartManager
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const SlicesClipPaths = ({ slices, pieChartManager }: SlicesClipPathsProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<Defs>
|
|
15
|
+
{slices.map((slice) => (
|
|
16
|
+
<ClipPath key={slice.index} id={getSliceClipId(slice.index)}>
|
|
17
|
+
<Path d={pieChartManager.shape.generateSlicePath(slice)} />
|
|
18
|
+
</ClipPath>
|
|
19
|
+
))}
|
|
20
|
+
</Defs>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 = isHighlighted ? -config.pressOffset : 0
|
|
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}
|
|
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
|
+
...Platform.select({ web: { cursor: 'pointer' } as ViewStyle }),
|
|
86
|
+
},
|
|
87
|
+
visual: {
|
|
88
|
+
...Platform.select({ web: { transition: 'transform 0.1s ease-in-out' } as ViewStyle }),
|
|
89
|
+
},
|
|
90
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 = 0,
|
|
25
|
+
}: SliceFillColorProps) => {
|
|
26
|
+
const isFullyFilled = percent >= 100
|
|
27
|
+
const isPartiallyFilled = percent > 0
|
|
28
|
+
const hasBorder = borderColor != null && borderWidth != null && borderWidth > 0
|
|
29
|
+
|
|
30
|
+
if (!isPartiallyFilled && !isFullyFilled) return null
|
|
31
|
+
|
|
32
|
+
const sliceClipId = getSliceClipId(clipPathId)
|
|
33
|
+
const borderClipId = `${sliceClipId}-border`
|
|
34
|
+
const fillPath = isFullyFilled ? shapeSvg : fillSvg
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
{hasBorder && (
|
|
39
|
+
<Defs>
|
|
40
|
+
<ClipPath id={borderClipId}>
|
|
41
|
+
<Path d={fillBorderSvg} />
|
|
42
|
+
</ClipPath>
|
|
43
|
+
</Defs>
|
|
44
|
+
)}
|
|
45
|
+
<G clipPath={`url(#${sliceClipId})`}>
|
|
46
|
+
<Path d={fillPath} fill={color} />
|
|
47
|
+
{hasBorder && (
|
|
48
|
+
<G clipPath={`url(#${borderClipId})`}>
|
|
49
|
+
<Path
|
|
50
|
+
d={fillBorderSvg}
|
|
51
|
+
fill="none"
|
|
52
|
+
stroke={borderColor}
|
|
53
|
+
strokeWidth={borderWidth * 2}
|
|
54
|
+
/>
|
|
55
|
+
</G>
|
|
56
|
+
)}
|
|
57
|
+
</G>
|
|
58
|
+
</>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
@@ -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,17 @@
|
|
|
1
|
+
import { SliceShapeGenerator } from './SliceShapeGenerator'
|
|
2
|
+
import { OuterArcPatternGenerator } from './ArcPatternGenerator'
|
|
3
|
+
import type { PieChartManagerConfig } from '../chart.types'
|
|
4
|
+
|
|
5
|
+
export class PieChartManager {
|
|
6
|
+
public readonly shape: SliceShapeGenerator
|
|
7
|
+
public readonly pattern: OuterArcPatternGenerator
|
|
8
|
+
|
|
9
|
+
constructor(public readonly config: PieChartManagerConfig) {
|
|
10
|
+
this.shape = new SliceShapeGenerator(config)
|
|
11
|
+
this.pattern = new OuterArcPatternGenerator(config)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public getCenter() {
|
|
15
|
+
return { x: this.config.size / 2, y: this.config.size / 2 }
|
|
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
|
+
}
|