@magmamath/students-features 1.2.1-rc.2 → 1.2.1-rc.21

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.
Files changed (434) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +2 -1
  2. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
  4. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
  5. package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +1 -1
  6. package/dist/commonjs/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
  7. package/dist/commonjs/features/pmProgress/PmProgress.js +62 -0
  8. package/dist/commonjs/features/pmProgress/PmProgress.js.map +1 -0
  9. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +23 -0
  10. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
  11. package/dist/commonjs/features/pmProgress/components/chart/chart.types.js +2 -0
  12. package/dist/commonjs/features/pmProgress/components/chart/chart.types.js.map +1 -0
  13. package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +44 -0
  14. package/dist/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
  15. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js +26 -0
  16. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
  17. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +77 -0
  18. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
  19. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +38 -0
  20. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
  21. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +21 -0
  22. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  23. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js +82 -0
  24. package/dist/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
  25. package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js +49 -0
  26. package/dist/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
  27. package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js +25 -0
  28. package/dist/commonjs/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
  29. package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.js +20 -0
  30. package/dist/commonjs/features/pmProgress/components/chart/model/SliceHighlight.js.map +1 -0
  31. package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js +79 -0
  32. package/dist/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
  33. package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +199 -0
  34. package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
  35. package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +70 -0
  36. package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -0
  37. package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +94 -0
  38. package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
  39. package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js +71 -0
  40. package/dist/commonjs/features/pmProgress/components/insights/StatsCard.js.map +1 -0
  41. package/dist/commonjs/features/pmProgress/components/list/Fluency.js +69 -0
  42. package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -0
  43. package/dist/commonjs/features/pmProgress/components/list/ListCard.js +198 -0
  44. package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -0
  45. package/dist/commonjs/features/pmProgress/components/list/ListItem.js +121 -0
  46. package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -0
  47. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +89 -0
  48. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -0
  49. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +118 -0
  50. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
  51. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +202 -0
  52. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -0
  53. package/dist/commonjs/features/pmProgress/context/PmProgressContext.js +18 -0
  54. package/dist/commonjs/features/pmProgress/context/PmProgressContext.js.map +1 -0
  55. package/dist/commonjs/features/pmProgress/index.js +56 -0
  56. package/dist/commonjs/features/pmProgress/index.js.map +1 -0
  57. package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js +15 -0
  58. package/dist/commonjs/features/pmProgress/model/PmHighlightModel.js.map +1 -0
  59. package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js +22 -0
  60. package/dist/commonjs/features/pmProgress/model/PmInsightsModel.js.map +1 -0
  61. package/dist/commonjs/features/pmProgress/model/PmProgressApi.js +18 -0
  62. package/dist/commonjs/features/pmProgress/model/PmProgressApi.js.map +1 -0
  63. package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +43 -0
  64. package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +1 -0
  65. package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +47 -0
  66. package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
  67. package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js +100 -0
  68. package/dist/commonjs/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
  69. package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +141 -0
  70. package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -0
  71. package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +49 -0
  72. package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
  73. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +221 -0
  74. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
  75. package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js +12 -0
  76. package/dist/commonjs/features/pmProgress/shared/pmProgress.types.js.map +1 -0
  77. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +0 -5
  78. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  79. package/dist/commonjs/features/voice/types.js +0 -6
  80. package/dist/commonjs/features/voice/types.js.map +1 -1
  81. package/dist/commonjs/index.js +15 -3
  82. package/dist/commonjs/index.js.map +1 -1
  83. package/dist/commonjs/shared/icons/PentagonIcon.js +32 -0
  84. package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
  85. package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
  86. package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
  87. package/dist/commonjs/shared/icons/SliceDiamondIcon.js +32 -0
  88. package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
  89. package/dist/commonjs/shared/icons/StarIcon.js +32 -0
  90. package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
  91. package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
  92. package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
  93. package/dist/commonjs/shared/translation/localization/ca.json +19 -0
  94. package/dist/commonjs/shared/translation/localization/de.json +19 -0
  95. package/dist/commonjs/shared/translation/localization/en.json +19 -0
  96. package/dist/commonjs/shared/translation/localization/gb.json +19 -0
  97. package/dist/commonjs/shared/translation/localization/sct.json +19 -0
  98. package/dist/commonjs/shared/translation/localization/sw.json +19 -0
  99. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +2 -1
  100. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  101. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +2 -1
  102. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
  103. package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js +2 -2
  104. package/dist/module/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.js.map +1 -1
  105. package/dist/module/features/pmProgress/PmProgress.js +56 -0
  106. package/dist/module/features/pmProgress/PmProgress.js.map +1 -0
  107. package/dist/module/features/pmProgress/components/chart/chart.helpers.js +16 -0
  108. package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +1 -0
  109. package/dist/module/features/pmProgress/components/chart/chart.types.js +2 -0
  110. package/dist/module/features/pmProgress/components/chart/chart.types.js.map +1 -0
  111. package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js +38 -0
  112. package/dist/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.js.map +1 -0
  113. package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js +20 -0
  114. package/dist/module/features/pmProgress/components/chart/components/SlicesClipPaths.js.map +1 -0
  115. package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +71 -0
  116. package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -0
  117. package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js +32 -0
  118. package/dist/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.js.map +1 -0
  119. package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js +15 -0
  120. package/dist/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  121. package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js +76 -0
  122. package/dist/module/features/pmProgress/components/chart/components/layers/SliceFillColor.js.map +1 -0
  123. package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js +44 -0
  124. package/dist/module/features/pmProgress/components/chart/model/ArcPatternGenerator.js.map +1 -0
  125. package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js +20 -0
  126. package/dist/module/features/pmProgress/components/chart/model/PieChartManager.js.map +1 -0
  127. package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.js +15 -0
  128. package/dist/module/features/pmProgress/components/chart/model/SliceHighlight.js.map +1 -0
  129. package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js +74 -0
  130. package/dist/module/features/pmProgress/components/chart/model/SliceShapeGenerator.js.map +1 -0
  131. package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +192 -0
  132. package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -0
  133. package/dist/module/features/pmProgress/components/insights/PmInsights.js +63 -0
  134. package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -0
  135. package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +89 -0
  136. package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -0
  137. package/dist/module/features/pmProgress/components/insights/StatsCard.js +65 -0
  138. package/dist/module/features/pmProgress/components/insights/StatsCard.js.map +1 -0
  139. package/dist/module/features/pmProgress/components/list/Fluency.js +63 -0
  140. package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -0
  141. package/dist/module/features/pmProgress/components/list/ListCard.js +191 -0
  142. package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -0
  143. package/dist/module/features/pmProgress/components/list/ListItem.js +114 -0
  144. package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -0
  145. package/dist/module/features/pmProgress/components/list/PmDomainList.js +83 -0
  146. package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -0
  147. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +112 -0
  148. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -0
  149. package/dist/module/features/pmProgress/components/standard/StandardTag.js +196 -0
  150. package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -0
  151. package/dist/module/features/pmProgress/context/PmProgressContext.js +13 -0
  152. package/dist/module/features/pmProgress/context/PmProgressContext.js.map +1 -0
  153. package/dist/module/features/pmProgress/index.js +11 -0
  154. package/dist/module/features/pmProgress/index.js.map +1 -0
  155. package/dist/module/features/pmProgress/model/PmHighlightModel.js +10 -0
  156. package/dist/module/features/pmProgress/model/PmHighlightModel.js.map +1 -0
  157. package/dist/module/features/pmProgress/model/PmInsightsModel.js +17 -0
  158. package/dist/module/features/pmProgress/model/PmInsightsModel.js.map +1 -0
  159. package/dist/module/features/pmProgress/model/PmProgressApi.js +13 -0
  160. package/dist/module/features/pmProgress/model/PmProgressApi.js.map +1 -0
  161. package/dist/module/features/pmProgress/model/PmProgressModel.js +38 -0
  162. package/dist/module/features/pmProgress/model/PmProgressModel.js.map +1 -0
  163. package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +42 -0
  164. package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +1 -0
  165. package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js +95 -0
  166. package/dist/module/features/pmProgress/model/PmSolvingFlowModel.js.map +1 -0
  167. package/dist/module/features/pmProgress/model/PmTreeModel.js +136 -0
  168. package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -0
  169. package/dist/module/features/pmProgress/shared/pmProgress.constants.js +46 -0
  170. package/dist/module/features/pmProgress/shared/pmProgress.constants.js.map +1 -0
  171. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +202 -0
  172. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -0
  173. package/dist/module/features/pmProgress/shared/pmProgress.types.js +10 -0
  174. package/dist/module/features/pmProgress/shared/pmProgress.types.js.map +1 -0
  175. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +0 -5
  176. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  177. package/dist/module/features/voice/types.js +1 -5
  178. package/dist/module/features/voice/types.js.map +1 -1
  179. package/dist/module/index.js +1 -0
  180. package/dist/module/index.js.map +1 -1
  181. package/dist/module/shared/icons/PentagonIcon.js +24 -0
  182. package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
  183. package/dist/module/shared/icons/SketchArrowRight.js +25 -0
  184. package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
  185. package/dist/module/shared/icons/SliceDiamondIcon.js +24 -0
  186. package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
  187. package/dist/module/shared/icons/StarIcon.js +24 -0
  188. package/dist/module/shared/icons/StarIcon.js.map +1 -0
  189. package/dist/module/shared/icons/TimerIcon.js +27 -0
  190. package/dist/module/shared/icons/TimerIcon.js.map +1 -0
  191. package/dist/module/shared/translation/localization/ca.json +19 -0
  192. package/dist/module/shared/translation/localization/de.json +19 -0
  193. package/dist/module/shared/translation/localization/en.json +19 -0
  194. package/dist/module/shared/translation/localization/gb.json +19 -0
  195. package/dist/module/shared/translation/localization/sct.json +19 -0
  196. package/dist/module/shared/translation/localization/sw.json +19 -0
  197. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
  199. package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts +9 -0
  200. package/dist/typescript/commonjs/features/pmProgress/PmProgress.d.ts.map +1 -0
  201. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
  202. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts +36 -0
  204. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
  205. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
  206. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  207. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
  208. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
  209. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
  210. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
  211. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
  212. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  213. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  214. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  215. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
  216. package/dist/typescript/commonjs/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  217. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
  218. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  219. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts +16 -0
  220. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceHighlight.d.ts +10 -0
  222. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceHighlight.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
  224. package/dist/typescript/commonjs/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  225. package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
  226. package/dist/typescript/commonjs/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
  227. package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
  228. package/dist/typescript/commonjs/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
  229. package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
  230. package/dist/typescript/commonjs/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
  231. package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts +10 -0
  232. package/dist/typescript/commonjs/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
  233. package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts +8 -0
  234. package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
  235. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts +30 -0
  236. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
  237. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +11 -0
  238. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
  239. package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
  240. package/dist/typescript/commonjs/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
  241. package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
  242. package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
  243. package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
  244. package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
  245. package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts +12 -0
  246. package/dist/typescript/commonjs/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
  247. package/dist/typescript/commonjs/features/pmProgress/index.d.ts +6 -0
  248. package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
  249. package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
  250. package/dist/typescript/commonjs/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
  251. package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
  252. package/dist/typescript/commonjs/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
  253. package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts +17 -0
  254. package/dist/typescript/commonjs/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
  255. package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts +23 -0
  256. package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
  257. package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
  258. package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
  259. package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts +20 -0
  260. package/dist/typescript/commonjs/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
  261. package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +19 -0
  262. package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
  263. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +36 -0
  264. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
  265. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +64 -0
  266. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
  267. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts +187 -0
  268. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
  269. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
  270. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
  271. package/dist/typescript/commonjs/features/voice/types.d.ts +0 -4
  272. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  273. package/dist/typescript/commonjs/index.d.ts +1 -0
  274. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  275. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
  276. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
  277. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
  278. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
  279. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
  280. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  281. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
  282. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
  283. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
  284. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
  285. package/dist/typescript/commonjs/shared/translation/constants.d.ts +114 -0
  286. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  287. package/dist/typescript/commonjs/shared/translation/model.d.ts +38 -0
  288. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  289. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  290. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
  291. package/dist/typescript/module/features/pmProgress/PmProgress.d.ts +9 -0
  292. package/dist/typescript/module/features/pmProgress/PmProgress.d.ts.map +1 -0
  293. package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts +4 -0
  294. package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -0
  295. package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts +36 -0
  296. package/dist/typescript/module/features/pmProgress/components/chart/chart.types.d.ts.map +1 -0
  297. package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts +9 -0
  298. package/dist/typescript/module/features/pmProgress/components/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  299. package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts +10 -0
  300. package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesClipPaths.d.ts.map +1 -0
  301. package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts +11 -0
  302. package/dist/typescript/module/features/pmProgress/components/chart/components/SlicesPaths.d.ts.map +1 -0
  303. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts +12 -0
  304. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  305. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  306. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  307. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts +14 -0
  308. package/dist/typescript/module/features/pmProgress/components/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  309. package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts +12 -0
  310. package/dist/typescript/module/features/pmProgress/components/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  311. package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts +16 -0
  312. package/dist/typescript/module/features/pmProgress/components/chart/model/PieChartManager.d.ts.map +1 -0
  313. package/dist/typescript/module/features/pmProgress/components/chart/model/SliceHighlight.d.ts +10 -0
  314. package/dist/typescript/module/features/pmProgress/components/chart/model/SliceHighlight.d.ts.map +1 -0
  315. package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts +17 -0
  316. package/dist/typescript/module/features/pmProgress/components/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  317. package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts +3 -0
  318. package/dist/typescript/module/features/pmProgress/components/header/PmProgressHeader.d.ts.map +1 -0
  319. package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts +3 -0
  320. package/dist/typescript/module/features/pmProgress/components/insights/PmInsights.d.ts.map +1 -0
  321. package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts +3 -0
  322. package/dist/typescript/module/features/pmProgress/components/insights/PmTimeframeStats.d.ts.map +1 -0
  323. package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts +10 -0
  324. package/dist/typescript/module/features/pmProgress/components/insights/StatsCard.d.ts.map +1 -0
  325. package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts +8 -0
  326. package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -0
  327. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts +30 -0
  328. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -0
  329. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +11 -0
  330. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +1 -0
  331. package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts +3 -0
  332. package/dist/typescript/module/features/pmProgress/components/list/PmDomainList.d.ts.map +1 -0
  333. package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts +3 -0
  334. package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -0
  335. package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts +9 -0
  336. package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -0
  337. package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts +12 -0
  338. package/dist/typescript/module/features/pmProgress/context/PmProgressContext.d.ts.map +1 -0
  339. package/dist/typescript/module/features/pmProgress/index.d.ts +6 -0
  340. package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
  341. package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts +7 -0
  342. package/dist/typescript/module/features/pmProgress/model/PmHighlightModel.d.ts.map +1 -0
  343. package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts +14 -0
  344. package/dist/typescript/module/features/pmProgress/model/PmInsightsModel.d.ts.map +1 -0
  345. package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts +17 -0
  346. package/dist/typescript/module/features/pmProgress/model/PmProgressApi.d.ts.map +1 -0
  347. package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts +23 -0
  348. package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +1 -0
  349. package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +102 -0
  350. package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -0
  351. package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts +20 -0
  352. package/dist/typescript/module/features/pmProgress/model/PmSolvingFlowModel.d.ts.map +1 -0
  353. package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +19 -0
  354. package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -0
  355. package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +36 -0
  356. package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -0
  357. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +64 -0
  358. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -0
  359. package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts +187 -0
  360. package/dist/typescript/module/features/pmProgress/shared/pmProgress.types.d.ts.map +1 -0
  361. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +1 -3
  362. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -1
  363. package/dist/typescript/module/features/voice/types.d.ts +0 -4
  364. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  365. package/dist/typescript/module/index.d.ts +1 -0
  366. package/dist/typescript/module/index.d.ts.map +1 -1
  367. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
  368. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
  369. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
  370. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
  371. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
  372. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  373. package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
  374. package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
  375. package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
  376. package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
  377. package/dist/typescript/module/shared/translation/constants.d.ts +114 -0
  378. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  379. package/dist/typescript/module/shared/translation/model.d.ts +38 -0
  380. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  381. package/package.json +23 -12
  382. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +2 -1
  383. package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +2 -1
  384. package/src/features/endOfAssignment/components/AssessmentScoreCard/AssessmentScoreCard.tsx +2 -2
  385. package/src/features/pmProgress/PmProgress.tsx +52 -0
  386. package/src/features/pmProgress/__tests__/.keep +0 -0
  387. package/src/features/pmProgress/components/chart/chart.helpers.ts +15 -0
  388. package/src/features/pmProgress/components/chart/chart.types.ts +37 -0
  389. package/src/features/pmProgress/components/chart/components/PracticeProgressPieChart.tsx +32 -0
  390. package/src/features/pmProgress/components/chart/components/SlicesClipPaths.tsx +22 -0
  391. package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +86 -0
  392. package/src/features/pmProgress/components/chart/components/layers/SliceArcPattern.tsx +44 -0
  393. package/src/features/pmProgress/components/chart/components/layers/SliceBackgroundColor.tsx +11 -0
  394. package/src/features/pmProgress/components/chart/components/layers/SliceFillColor.tsx +88 -0
  395. package/src/features/pmProgress/components/chart/model/ArcPatternGenerator.ts +48 -0
  396. package/src/features/pmProgress/components/chart/model/PieChartManager.ts +20 -0
  397. package/src/features/pmProgress/components/chart/model/SliceHighlight.ts +17 -0
  398. package/src/features/pmProgress/components/chart/model/SliceShapeGenerator.ts +90 -0
  399. package/src/features/pmProgress/components/header/PmProgressHeader.tsx +187 -0
  400. package/src/features/pmProgress/components/insights/PmInsights.tsx +58 -0
  401. package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +83 -0
  402. package/src/features/pmProgress/components/insights/StatsCard.tsx +53 -0
  403. package/src/features/pmProgress/components/list/Fluency.tsx +58 -0
  404. package/src/features/pmProgress/components/list/ListCard.tsx +231 -0
  405. package/src/features/pmProgress/components/list/ListItem.tsx +136 -0
  406. package/src/features/pmProgress/components/list/PmDomainList.tsx +69 -0
  407. package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +109 -0
  408. package/src/features/pmProgress/components/standard/StandardTag.tsx +177 -0
  409. package/src/features/pmProgress/context/PmProgressContext.tsx +23 -0
  410. package/src/features/pmProgress/index.ts +8 -0
  411. package/src/features/pmProgress/model/PmHighlightModel.ts +11 -0
  412. package/src/features/pmProgress/model/PmInsightsModel.ts +23 -0
  413. package/src/features/pmProgress/model/PmProgressApi.ts +34 -0
  414. package/src/features/pmProgress/model/PmProgressModel.ts +48 -0
  415. package/src/features/pmProgress/model/PmRecommendationsModel.ts +47 -0
  416. package/src/features/pmProgress/model/PmSolvingFlowModel.ts +131 -0
  417. package/src/features/pmProgress/model/PmTreeModel.ts +130 -0
  418. package/src/features/pmProgress/shared/pmProgress.constants.ts +88 -0
  419. package/src/features/pmProgress/shared/pmProgress.helpers.ts +271 -0
  420. package/src/features/pmProgress/shared/pmProgress.types.ts +210 -0
  421. package/src/features/voice/recording/model/VoiceRecord.model.ts +0 -7
  422. package/src/features/voice/types.ts +0 -5
  423. package/src/index.ts +1 -0
  424. package/src/shared/icons/PentagonIcon.tsx +17 -0
  425. package/src/shared/icons/SketchArrowRight.tsx +18 -0
  426. package/src/shared/icons/SliceDiamondIcon.tsx +16 -0
  427. package/src/shared/icons/StarIcon.tsx +17 -0
  428. package/src/shared/icons/TimerIcon.tsx +21 -0
  429. package/src/shared/translation/localization/ca.json +19 -0
  430. package/src/shared/translation/localization/de.json +19 -0
  431. package/src/shared/translation/localization/en.json +19 -0
  432. package/src/shared/translation/localization/gb.json +19 -0
  433. package/src/shared/translation/localization/sct.json +19 -0
  434. package/src/shared/translation/localization/sw.json +19 -0
@@ -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,88 @@
1
+ import React from 'react'
2
+ import { ClipPath, Defs, G, Path } from 'react-native-svg'
3
+ import { getSliceClipId } from '../../chart.helpers'
4
+
5
+ type SliceFillColorProps = {
6
+ clipPathId: string
7
+ shapeSvg: string
8
+ fillSvg: string
9
+ fillBorderSvg: string
10
+ color: string
11
+ percent: number
12
+ borderColor?: string
13
+ borderWidth?: number
14
+ }
15
+
16
+ export const SliceFillColor = ({
17
+ clipPathId,
18
+ shapeSvg,
19
+ fillSvg,
20
+ fillBorderSvg,
21
+ color,
22
+ percent,
23
+ borderColor,
24
+ borderWidth,
25
+ }: SliceFillColorProps) => {
26
+ const isFullyFilled = percent >= 100
27
+ const isPartiallyFilled = percent > 0
28
+ const hasBorder = borderColor != null && borderWidth != null && borderWidth > 0
29
+
30
+ const sliceClipId = getSliceClipId(clipPathId)
31
+ const borderClipId = `${sliceClipId}-border`
32
+
33
+ if (isFullyFilled) {
34
+ return (
35
+ <>
36
+ {hasBorder && (
37
+ <Defs>
38
+ <ClipPath id={borderClipId}>
39
+ <Path d={fillBorderSvg} />
40
+ </ClipPath>
41
+ </Defs>
42
+ )}
43
+ <G clipPath={`url(#${sliceClipId})`}>
44
+ <Path d={shapeSvg} fill={color} />
45
+ {hasBorder && (
46
+ <G clipPath={`url(#${borderClipId})`}>
47
+ <Path
48
+ d={fillBorderSvg}
49
+ fill="none"
50
+ stroke={borderColor}
51
+ strokeWidth={borderWidth! * 2}
52
+ />
53
+ </G>
54
+ )}
55
+ </G>
56
+ </>
57
+ )
58
+ }
59
+
60
+ if (isPartiallyFilled) {
61
+ return (
62
+ <>
63
+ {hasBorder && (
64
+ <Defs>
65
+ <ClipPath id={borderClipId}>
66
+ <Path d={fillBorderSvg} />
67
+ </ClipPath>
68
+ </Defs>
69
+ )}
70
+ <G clipPath={`url(#${sliceClipId})`}>
71
+ <Path d={fillSvg} fill={color} />
72
+ {hasBorder && (
73
+ <G clipPath={`url(#${borderClipId})`}>
74
+ <Path
75
+ d={fillBorderSvg}
76
+ fill="none"
77
+ stroke={borderColor}
78
+ strokeWidth={borderWidth! * 2}
79
+ />
80
+ </G>
81
+ )}
82
+ </G>
83
+ </>
84
+ )
85
+ }
86
+
87
+ return null
88
+ }
@@ -0,0 +1,48 @@
1
+ import type { PieChartManagerConfig, SliceShape } from '../chart.types'
2
+
3
+ export class OuterArcPatternGenerator {
4
+ constructor(private readonly config: PieChartManagerConfig) {}
5
+
6
+ public generateArcPath(slice: SliceShape, radius: number) {
7
+ const gapAngle = this.config.gapBetweenSlices / (2 * radius)
8
+ const startAngle = slice.startAngle + gapAngle
9
+ const endAngle = slice.endAngle - gapAngle
10
+
11
+ const startPoint = this.polarToCartesian(radius, startAngle)
12
+ const endPoint = this.polarToCartesian(radius, endAngle)
13
+ const largeArcFlag = endAngle - startAngle > Math.PI ? 1 : 0
14
+
15
+ return `M ${startPoint.x} ${startPoint.y} A ${radius} ${radius} 0 ${largeArcFlag} 1 ${endPoint.x} ${endPoint.y}`
16
+ }
17
+
18
+ /** Returns the sizes of the two rings where the checkerboard dashes are drawn. */
19
+ public getPatternTrackSizes(): [number, number] {
20
+ const { outerRadius, outerArc } = this.config
21
+ return [
22
+ outerRadius - outerArc.strokeWidth / 2,
23
+ outerRadius - outerArc.strokeWidth * 1.5,
24
+ ]
25
+ }
26
+
27
+ public getDashWidthForRadius(radius: number) {
28
+ return this.config.outerArc.dashWidth * (radius / this.config.outerRadius)
29
+ }
30
+
31
+ public getDashOffset(rowIndex: number, radius: number) {
32
+ const dashAngle = this.config.outerArc.dashWidth / this.config.outerRadius
33
+ const dashWidthAtRadius = dashAngle * radius
34
+ const baseOffset = dashWidthAtRadius / 2
35
+
36
+ if (rowIndex === 1) {
37
+ return baseOffset - dashWidthAtRadius
38
+ }
39
+ return baseOffset
40
+ }
41
+
42
+ private polarToCartesian(radius: number, angleInRadians: number) {
43
+ return {
44
+ x: radius * Math.sin(angleInRadians),
45
+ y: -radius * Math.cos(angleInRadians),
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,20 @@
1
+ import { SliceShapeGenerator } from './SliceShapeGenerator'
2
+ import { OuterArcPatternGenerator } from './ArcPatternGenerator'
3
+ import { SliceHighlight } from './SliceHighlight'
4
+ import type { PieChartManagerConfig } from '../chart.types'
5
+
6
+ export class PieChartManager {
7
+ public readonly shape: SliceShapeGenerator
8
+ public readonly pattern: OuterArcPatternGenerator
9
+ public readonly highlight: SliceHighlight
10
+
11
+ constructor(public readonly config: PieChartManagerConfig) {
12
+ this.shape = new SliceShapeGenerator(config)
13
+ this.pattern = new OuterArcPatternGenerator(config)
14
+ this.highlight = new SliceHighlight(config)
15
+ }
16
+
17
+ public getCenter() {
18
+ return { x: this.config.size / 2, y: this.config.size / 2 }
19
+ }
20
+ }
@@ -0,0 +1,17 @@
1
+ import { createEvent, createStore } from 'effector'
2
+ import type { PieChartManagerConfig } from '../chart.types'
3
+
4
+ export class SliceHighlight {
5
+ public readonly set = createEvent<number>()
6
+ public readonly reset = createEvent()
7
+
8
+ public readonly $highlightedIndex = createStore<number | null>(null)
9
+ .on(this.set, (_, index) => index)
10
+ .reset(this.reset)
11
+
12
+ constructor(private readonly config: PieChartManagerConfig) {}
13
+
14
+ public getTranslateY(isHighlighted: boolean): number {
15
+ return isHighlighted ? -this.config.pressOffset : 0
16
+ }
17
+ }
@@ -0,0 +1,90 @@
1
+ import { arc, pie } from 'd3-shape'
2
+ import type { PieChartManagerConfig, SliceInputData, SliceShape } from '../chart.types'
3
+
4
+ export class SliceShapeGenerator {
5
+ private innerRadius = 0
6
+ private readonly d3Pie = pie<SliceInputData>()
7
+ .value(({ value }) => value)
8
+ .sort(null)
9
+
10
+ constructor(private readonly config: PieChartManagerConfig) {}
11
+
12
+ public generateSlices(data: SliceInputData[]): SliceShape[] {
13
+ this.innerRadius = this.getInnerRadius(data.length)
14
+
15
+ return this.d3Pie(data).map((datum, index) => ({
16
+ index,
17
+ startAngle: datum.startAngle,
18
+ endAngle: datum.endAngle,
19
+ fillPercent: datum.data.fillPercent ?? 0,
20
+ backgroundColor: datum.data.backgroundColor ?? this.config.colors.background,
21
+ fillColor: datum.data.fillColor,
22
+ borderColor: datum.data.borderColor,
23
+ data: datum.data,
24
+ }))
25
+ }
26
+
27
+ public generateSlicePath(slice: SliceShape): string {
28
+ return this.buildArc(slice, this.config.outerRadius, this.getCornerRadius(100))
29
+ }
30
+
31
+ public generateFillPath(slice: SliceShape): string {
32
+ const fillRadius = this.getFillRadius(slice)
33
+ const cornerRadius = this.getCornerRadius(slice.fillPercent)
34
+
35
+ // Build with innerRadius 0 so d3 only rounds the outer corners.
36
+ // The slice clip path will cut the inner edge to the correct boundary.
37
+ return arc()
38
+ .outerRadius(fillRadius)
39
+ .innerRadius(0)
40
+ .cornerRadius(cornerRadius)
41
+ .padAngle(this.padAngle)
42
+ .padRadius(this.config.outerRadius)({
43
+ startAngle: slice.startAngle,
44
+ endAngle: slice.endAngle,
45
+ innerRadius: 0,
46
+ outerRadius: fillRadius,
47
+ }) as string
48
+ }
49
+
50
+ public generateFillBorderPath(slice: SliceShape): string {
51
+ const fillRadius = this.getFillRadius(slice)
52
+ const cornerRadius = this.getCornerRadius(slice.fillPercent)
53
+ return this.buildArc(slice, fillRadius, cornerRadius)
54
+ }
55
+
56
+
57
+ private getFillRadius(slice: SliceShape): number {
58
+ return this.innerRadius + (this.config.outerRadius - this.innerRadius) * (slice.fillPercent / 100)
59
+ }
60
+
61
+ private getInnerRadius(sliceCount: number): number {
62
+ const { innerRadius } = this.config
63
+ return typeof innerRadius === 'function' ? innerRadius(sliceCount) : innerRadius
64
+ }
65
+
66
+ private getCornerRadius(fillPercent: number): number {
67
+ const { cornerRadius } = this.config
68
+ return typeof cornerRadius === 'function' ? cornerRadius(fillPercent) : cornerRadius
69
+ }
70
+
71
+ private get padAngle(): number {
72
+ return this.config.gapBetweenSlices / this.config.outerRadius
73
+ }
74
+
75
+ private buildArc(slice: SliceShape, outerRadius: number, cornerRadius: number): string {
76
+ const innerRadius = this.innerRadius
77
+
78
+ return arc()
79
+ .outerRadius(outerRadius)
80
+ .innerRadius(innerRadius)
81
+ .cornerRadius(cornerRadius)
82
+ .padAngle(this.padAngle)
83
+ .padRadius(this.config.outerRadius)({
84
+ startAngle: slice.startAngle,
85
+ endAngle: slice.endAngle,
86
+ innerRadius,
87
+ outerRadius,
88
+ }) as string
89
+ }
90
+ }
@@ -0,0 +1,187 @@
1
+ import React, { useState } from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import {
4
+ Button,
5
+ ButtonColor,
6
+ ButtonSize,
7
+ ButtonVariant,
8
+ CaretDownIcon,
9
+ CaretUpIcon,
10
+ COLORS,
11
+ Dropdown,
12
+ HeadingVariants,
13
+ Menu,
14
+ PlayIcon,
15
+ SPACING,
16
+ Typography,
17
+ } from '@magmamath/react-native-ui'
18
+ import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
19
+ import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
20
+ import { useText } from '../../../../shared/translation'
21
+ import { useStoreMap, useUnit } from 'effector-react'
22
+ import { usePmProgress } from '../../context/PmProgressContext'
23
+ import { formatGradeName, isFluencyDomain } from '../../shared/pmProgress.helpers'
24
+ import { SolvingFlow } from '../../shared/pmProgress.constants'
25
+
26
+ export const PmProgressHeader = () => {
27
+ const t = useText()
28
+ const { model, onStartPress } = usePmProgress()
29
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false)
30
+
31
+ const grade = useUnit(model.tree.$grade)
32
+ const grades = useStoreMap(model.tree.$grades, (grades) =>
33
+ grades.map((grade) => ({
34
+ key: grade.value,
35
+ title: grade.name,
36
+ disabled: grade.isLocked,
37
+ })),
38
+ )
39
+
40
+ const nextUp = useStoreMap(model.tree.$domains, (domains) =>
41
+ domains.find((domain) => {
42
+ const isFluency = isFluencyDomain(domain.title)
43
+ const isCompleted = domain.skillsCount.achieved === domain.skillsCount.total
44
+ return !isFluency && !isCompleted
45
+ }),
46
+ )
47
+
48
+ return (
49
+ <View style={styles.container}>
50
+ <View style={styles.title}>
51
+ <Typography variant={HeadingVariants.H2} style={styles.dark}>
52
+ {t('pmProgress.title')}
53
+ </Typography>
54
+ <Dropdown
55
+ isOpen={isDropdownOpen}
56
+ onDismiss={() => setIsDropdownOpen(false)}
57
+ anchor={
58
+ <Button
59
+ variant={ButtonVariant.TERTIARY}
60
+ onPress={() => setIsDropdownOpen((prev) => !prev)}
61
+ >
62
+ <Typography variant={HeadingVariants.H8} style={styles.dark}>
63
+ {grade !== null ? formatGradeName(grade) : t('pmProgress.grade')}
64
+ </Typography>
65
+ <View style={styles.caret}>
66
+ {isDropdownOpen ? (
67
+ <CaretUpIcon color={COLORS.NEUTRAL_9} />
68
+ ) : (
69
+ <CaretDownIcon color={COLORS.NEUTRAL_9} />
70
+ )}
71
+ </View>
72
+ </Button>
73
+ }
74
+ >
75
+ <Menu
76
+ style={styles.menu}
77
+ items={grades}
78
+ onItemPress={(item) => {
79
+ model.tree.setGrade(item.key as number)
80
+ setIsDropdownOpen(false)
81
+ }}
82
+ />
83
+ </Dropdown>
84
+ </View>
85
+
86
+ <View style={styles.nextUp}>
87
+ <View style={styles.content}>
88
+ <View style={styles.subtitle}>
89
+ <Typography variant={HeadingVariants.H2} style={styles.dark}>
90
+ {t('pmProgress.nextUp')}
91
+ </Typography>
92
+ </View>
93
+ <View style={[styles.row, styles.tilted]}>
94
+ <Typography variant={HeadingVariants.H7} style={styles.muted}>
95
+ {nextUp?.title}
96
+ </Typography>
97
+ <View style={styles.diamond}>
98
+ <SliceDiamondIcon color={nextUp?.color} />
99
+ </View>
100
+ </View>
101
+ </View>
102
+ <View style={styles.arrow}>
103
+ <SketchArrowRight />
104
+ </View>
105
+ <Button
106
+ onPress={async () => {
107
+ const skill = await model.solving.start({ type: SolvingFlow.MAGMA })
108
+ onStartPress?.(skill)
109
+ }}
110
+ icon={<PlayIcon size={16} color={COLORS.NEUTRAL_1} />}
111
+ variant={ButtonVariant.PRIMARY}
112
+ size={ButtonSize.LARGE}
113
+ colorScheme={ButtonColor.YELLOW}
114
+ raiseLevel={6}
115
+ style={{ container: styles.startButton }}
116
+ >
117
+ <Typography variant={HeadingVariants.H6} style={styles.startButtonText}>
118
+ {t('pmProgress.startButton')}
119
+ </Typography>
120
+ </Button>
121
+ </View>
122
+ </View>
123
+ )
124
+ }
125
+
126
+ const styles = StyleSheet.create({
127
+ container: {
128
+ flexDirection: 'row',
129
+ justifyContent: 'space-between',
130
+ alignItems: 'center',
131
+ marginBottom: SPACING[400],
132
+ zIndex: 1,
133
+ },
134
+ title: {
135
+ flexDirection: 'row',
136
+ alignItems: 'center',
137
+ gap: SPACING[200],
138
+ },
139
+ dark: {
140
+ color: COLORS.NEUTRAL_9,
141
+ },
142
+ caret: {
143
+ marginLeft: SPACING[100],
144
+ },
145
+ menu: {
146
+ top: SPACING[100],
147
+ minWidth: 110,
148
+ },
149
+ nextUp: {
150
+ flexDirection: 'row',
151
+ alignItems: 'center',
152
+ gap: SPACING[400],
153
+ },
154
+ content: {
155
+ alignItems: 'center',
156
+ gap: SPACING[100],
157
+ },
158
+ subtitle: {
159
+ transform: [{ rotate: '355deg' }],
160
+ marginRight: SPACING[300],
161
+ },
162
+ tilted: {
163
+ transform: [{ rotate: '355deg' }],
164
+ },
165
+ row: {
166
+ flexDirection: 'row',
167
+ gap: SPACING[100],
168
+ },
169
+ muted: {
170
+ color: COLORS.NEUTRAL_8,
171
+ },
172
+ diamond: {
173
+ bottom: 10,
174
+ transform: [{ rotate: '5deg' }],
175
+ },
176
+ arrow: {
177
+ transform: [{ rotate: '358deg' }],
178
+ },
179
+ startButton: {
180
+ minWidth: 145,
181
+ },
182
+ startButtonText: {
183
+ fontWeight: '700',
184
+ textTransform: 'uppercase',
185
+ color: COLORS.NEUTRAL_1,
186
+ },
187
+ })
@@ -0,0 +1,58 @@
1
+ import React, { useMemo, useState } from 'react'
2
+ import { useStoreMap } from 'effector-react'
3
+ import { LayoutChangeEvent, StyleSheet, View } from 'react-native'
4
+ import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui'
5
+ import { PracticeProgressPieChart } from '../chart/components/PracticeProgressPieChart'
6
+ import { PmTimeframeStats } from './PmTimeframeStats'
7
+ import { usePmProgress } from '../../context/PmProgressContext'
8
+ import { createChartConfig } from '../../shared/pmProgress.helpers'
9
+ import { EMPTY_PIE_CHART_DATA, MAX_PIE_CHART_SIZE, STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
10
+
11
+ export const PmInsights = () => {
12
+ const { model } = usePmProgress()
13
+ const [chartSize, setChartSize] = useState(MAX_PIE_CHART_SIZE)
14
+ const chartData = useStoreMap(model.tree.$domains, (domains) =>
15
+ domains.map((domain) => ({
16
+ value: 1,
17
+ fillPercent: Math.round(domain.scorePercentage),
18
+ fillColor: domain.color,
19
+ borderColor: domain.borderColor,
20
+ backgroundColor: domain.backgroundColor,
21
+ })),
22
+ )
23
+
24
+ const chartConfig = useMemo(() => {
25
+ const size = Math.max(0, chartSize - SPACING[400])
26
+ return createChartConfig(size)
27
+ }, [chartSize])
28
+
29
+ const measureLayout = (event: LayoutChangeEvent) => {
30
+ const height = event.nativeEvent.layout.height
31
+ const size = Math.min(height - STATS_MAX_HEIGHT - SPACING[800], MAX_PIE_CHART_SIZE)
32
+ setChartSize(size)
33
+ }
34
+
35
+ return (
36
+ <View style={styles.container} onLayout={measureLayout}>
37
+ <View style={[styles.chart, { width: chartSize, height: chartSize }]}>
38
+ <PracticeProgressPieChart data={chartData.length > 0 ? chartData : EMPTY_PIE_CHART_DATA} config={chartConfig} />
39
+ </View>
40
+ <PmTimeframeStats />
41
+ </View>
42
+ )
43
+ }
44
+
45
+ const styles = StyleSheet.create({
46
+ container: {
47
+ height: '100%',
48
+ },
49
+ chart: {
50
+ alignItems: 'center',
51
+ justifyContent: 'center',
52
+ backgroundColor: COLORS.NEUTRAL_1,
53
+ borderRadius: BORDER_RADIUS[250],
54
+ padding: SPACING[400],
55
+ marginBottom: SPACING[400],
56
+ marginTop: SPACING[400],
57
+ },
58
+ })
@@ -0,0 +1,83 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import {
4
+ COLORS,
5
+ SelectGroup,
6
+ SelectOptionColor,
7
+ SelectOptionProps,
8
+ SPACING,
9
+ } from '@magmamath/react-native-ui'
10
+ import { StatsCard } from './StatsCard'
11
+ import { StarIcon } from '../../../../shared/icons/StarIcon'
12
+ import { TimerIcon } from '../../../../shared/icons/TimerIcon'
13
+ import { BORDER_RADIUS } from '@magmamath/react-native-ui'
14
+ import { useText } from '../../../../shared/translation'
15
+ import { useUnit } from 'effector-react'
16
+ import { formatTime } from '../../shared/pmProgress.helpers'
17
+ import { InsightsTimeframe, STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
18
+ import { usePmProgress } from '../../context/PmProgressContext'
19
+
20
+ export const PmTimeframeStats = () => {
21
+ const t = useText()
22
+ const { model } = usePmProgress()
23
+ const timeframe = useUnit(model.insights.$timeframe)
24
+ const insights = useUnit(model.insights.$insights)
25
+
26
+ const OPTIONS: SelectOptionProps[] = [
27
+ { key: InsightsTimeframe.WEEK, title: t('pmProgress.thisWeek') },
28
+ { key: InsightsTimeframe.LAST_WEEK, title: t('pmProgress.lastWeek') },
29
+ { key: InsightsTimeframe.ALL, title: t('pmProgress.allTime') },
30
+ ]
31
+
32
+ return (
33
+ <View style={styles.container}>
34
+ <View style={styles.content}>
35
+ <View style={styles.cards}>
36
+ <StatsCard
37
+ value={insights?.numberOfStars ?? 0}
38
+ label={t('pmProgress.stars')}
39
+ color={COLORS.PRIMARY_YELLOW}
40
+ icon={<StarIcon />}
41
+ />
42
+ <StatsCard
43
+ value={formatTime(insights?.timeInPracticeMs ?? 0)}
44
+ label={t('pmProgress.time')}
45
+ color={COLORS.PRIMARY_PURPLE}
46
+ icon={<TimerIcon />}
47
+ />
48
+ </View>
49
+
50
+ <SelectGroup
51
+ color={SelectOptionColor.GREY}
52
+ options={OPTIONS}
53
+ selectedOptions={OPTIONS.filter(({ key }) => key === timeframe)}
54
+ onOptionChange={({ key }) => model.insights.setTimeframe(key as InsightsTimeframe)}
55
+ />
56
+ </View>
57
+ </View>
58
+ )
59
+ }
60
+
61
+ const styles = StyleSheet.create({
62
+ container: {
63
+ maxHeight: STATS_MAX_HEIGHT,
64
+ height: '100%',
65
+ padding: SPACING[200],
66
+ backgroundColor: COLORS.NEUTRAL_1,
67
+ borderRadius: BORDER_RADIUS[300],
68
+ shadowColor: COLORS.NEUTRAL_9,
69
+ shadowOffset: { width: 0, height: 1 },
70
+ shadowOpacity: 0.1,
71
+ shadowRadius: 3,
72
+ elevation: 2,
73
+ },
74
+ content: {
75
+ gap: SPACING[100],
76
+ marginBottom: 4,
77
+ },
78
+ cards: {
79
+ flexDirection: 'row',
80
+ justifyContent: 'space-between',
81
+ gap: SPACING[300],
82
+ },
83
+ })