@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,53 @@
1
+ import React, { ReactNode } from 'react'
2
+ import { View, StyleSheet, Text, Platform } from 'react-native'
3
+ import { COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
4
+
5
+ type StatsCardProps = {
6
+ value: number | string
7
+ label: string
8
+ color: string
9
+ icon: ReactNode
10
+ }
11
+
12
+ export const StatsCard = ({ value, label, color, icon }: StatsCardProps) => {
13
+ return (
14
+ <View style={[styles.card, { borderColor: color }]}>
15
+ <View style={[styles.iconContainer, { backgroundColor: color }]}>{icon}</View>
16
+ <View>
17
+ <Text style={[styles.value, { color }]}>{value}</Text>
18
+ <Text style={styles.label}>{label}</Text>
19
+ </View>
20
+ </View>
21
+ )
22
+ }
23
+
24
+ const styles = StyleSheet.create({
25
+ card: {
26
+ flex: 1,
27
+ height: 65,
28
+ alignItems: 'center',
29
+ flexDirection: 'row',
30
+ borderRadius: 12,
31
+ borderWidth: 4,
32
+ padding: 8,
33
+ gap: 8,
34
+ },
35
+ iconContainer: {
36
+ width: 42,
37
+ height: 42,
38
+ alignItems: 'center',
39
+ justifyContent: 'center',
40
+ borderRadius: 100,
41
+ },
42
+ value: {
43
+ fontSize: 32,
44
+ fontWeight: '700',
45
+ fontFamily: FONT_FAMILY.buenosAires,
46
+ },
47
+ label: {
48
+ color: COLORS.NEUTRAL_8,
49
+ fontSize: 12,
50
+ fontFamily: FONT_FAMILY.buenosAires,
51
+ top: -6,
52
+ },
53
+ })
@@ -0,0 +1,58 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import { ListCard } from './ListCard'
4
+ import { COLORS, SPACING } from '@magmamath/react-native-ui'
5
+ import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
6
+ import { useText } from '../../../../shared/translation'
7
+ import { useUnit } from 'effector-react'
8
+ import { CustomDomain, SolvingFlow } from '../../shared/pmProgress.constants'
9
+ import { Domain } from '../../shared/pmProgress.types'
10
+ import { usePmProgress } from '../../context/PmProgressContext'
11
+
12
+ type FluencyProps = {
13
+ data: Domain | undefined
14
+ }
15
+
16
+ export const Fluency = ({ data }: FluencyProps) => {
17
+ const t = useText()
18
+ const { model, onStandardPress } = usePmProgress()
19
+ const expandedId = useUnit(model.highlight.$expandedId)
20
+
21
+ if (!data) return null
22
+
23
+ return (
24
+ <View style={styles.container}>
25
+ <View style={styles.separator} />
26
+ <ListCard
27
+ title={t('pmProgress.fluency')}
28
+ items={data.standards.map((standard) => ({ ...standard, id: standard.standardId }))}
29
+ progress={data.scorePercentage}
30
+ color={COLORS.PRIMARY_ORANGE}
31
+ onPress={() => model.highlight.expand(CustomDomain.FLUENCY)}
32
+ onItemPress={async (item) => {
33
+ const skill = await model.solving.start({
34
+ type: SolvingFlow.STANDARD,
35
+ standardId: item.standardId,
36
+ })
37
+ onStandardPress?.(skill)
38
+ }}
39
+ isFirst
40
+ isLast
41
+ isExpanded={expandedId === CustomDomain.FLUENCY}
42
+ icon={<SliceDiamondIcon color={COLORS.PRIMARY_ORANGE} />}
43
+ />
44
+ </View>
45
+ )
46
+ }
47
+
48
+ const styles = StyleSheet.create({
49
+ container: {
50
+ marginBottom: SPACING[800],
51
+ },
52
+ separator: {
53
+ height: 1,
54
+ marginHorizontal: SPACING[100],
55
+ marginVertical: SPACING[200],
56
+ backgroundColor: COLORS.NEUTRAL_4,
57
+ },
58
+ })
@@ -0,0 +1,231 @@
1
+ import React, { useState } from 'react'
2
+ import { Pressable, View, StyleSheet } from 'react-native'
3
+ import {
4
+ BORDER_RADIUS,
5
+ CaretDownIcon,
6
+ CaretRightIcon,
7
+ COLORS,
8
+ HeadingVariants,
9
+ SPACING,
10
+ Typography,
11
+ } from '@magmamath/react-native-ui'
12
+ import { ListItem } from './ListItem'
13
+ import { useText } from '../../../../shared/translation'
14
+ import { SkillsCount } from '../../shared/pmProgress.types'
15
+
16
+ const HEADER_HEIGHT = 60
17
+ const PROGRESS_BAR_WIDTH = 50
18
+ const PROGRESS_BAR_HEIGHT = 10
19
+
20
+ export type ListCardItem = {
21
+ id: string
22
+ title: string
23
+ subtitle: string
24
+ skillsCount: SkillsCount
25
+ }
26
+
27
+ function getVisibleItems<T>(items: T[], maxItems?: number) {
28
+ const visible = maxItems != null ? items.slice(0, maxItems) : items
29
+ const remainingCount = maxItems != null ? Math.max(0, items.length - maxItems) : 0
30
+ return { visible, remainingCount }
31
+ }
32
+
33
+ type ListCardProps<T extends ListCardItem> = {
34
+ title: string
35
+ icon: React.ReactElement
36
+ color: string
37
+ items: T[]
38
+ onItemPress?: (item: T) => void
39
+ isExpanded?: boolean
40
+ onPress?: () => void
41
+ onHoverIn?: () => void
42
+ onHoverOut?: () => void
43
+ progress?: number
44
+ rightContent?: React.ReactNode
45
+ isFirst?: boolean
46
+ isLast?: boolean
47
+ maxItems?: number
48
+ expandedColor?: string
49
+ isSkillsLeftHidden?: boolean
50
+ isHighlighted?: boolean
51
+ }
52
+
53
+ export const ListCard = <T extends ListCardItem>({
54
+ title,
55
+ icon,
56
+ color,
57
+ items,
58
+ isExpanded = false,
59
+ isHighlighted = false,
60
+ onPress,
61
+ onHoverIn,
62
+ onHoverOut,
63
+ onItemPress,
64
+ progress = 0,
65
+ rightContent,
66
+ isFirst,
67
+ isLast,
68
+ maxItems,
69
+ expandedColor = COLORS.NEUTRAL_3,
70
+ isSkillsLeftHidden = false,
71
+ }: ListCardProps<T>) => {
72
+ const t = useText()
73
+ const [isHovered, setIsHovered] = useState(false)
74
+
75
+ const { visible, remainingCount } = getVisibleItems(items, maxItems)
76
+ const withHighlight = isHovered || isExpanded || isHighlighted
77
+
78
+ const Caret = isExpanded ? CaretDownIcon : CaretRightIcon
79
+
80
+ return (
81
+ <View
82
+ style={[
83
+ styles.container,
84
+ !isFirst && styles.containerCollapsed,
85
+ isFirst && styles.containerFirst,
86
+ isLast && styles.containerLast,
87
+ withHighlight && { backgroundColor: expandedColor },
88
+ ]}
89
+ >
90
+ <Pressable
91
+ style={[
92
+ styles.header,
93
+ isFirst && styles.headerFirst,
94
+ isLast && !isExpanded && styles.headerLast,
95
+ withHighlight && { backgroundColor: expandedColor },
96
+ ]}
97
+ onPress={onPress}
98
+ onHoverIn={() => {
99
+ setIsHovered(true)
100
+ onHoverIn?.()
101
+ }}
102
+ onHoverOut={() => {
103
+ setIsHovered(false)
104
+ onHoverOut?.()
105
+ }}
106
+ >
107
+ {icon}
108
+ <View style={styles.caret}>
109
+ <Caret color={COLORS.NEUTRAL_9} />
110
+ </View>
111
+ <Typography variant={HeadingVariants.H6} style={styles.title}>
112
+ {title}
113
+ </Typography>
114
+ {rightContent ?? (
115
+ <View style={styles.progress}>
116
+ <Typography variant={HeadingVariants.H7} style={[styles.percentage, { color }]}>
117
+ {Math.round(progress)}%
118
+ </Typography>
119
+ <View style={styles.track}>
120
+ <View
121
+ style={[styles.fill, { width: `${Math.round(progress)}%`, backgroundColor: color }]}
122
+ />
123
+ </View>
124
+ </View>
125
+ )}
126
+ </Pressable>
127
+ {isExpanded && (
128
+ <View style={[styles.items, isLast && styles.itemsLast]}>
129
+ {visible.map((item) => {
130
+ const skillsLeft = item.skillsCount.total - item.skillsCount.achieved
131
+ return (
132
+ <ListItem
133
+ key={item.id}
134
+ title={item.title}
135
+ skillsLeft={skillsLeft}
136
+ subtitle={item.subtitle}
137
+ isFinished={skillsLeft === 0}
138
+ isSkillsLeftHidden={isSkillsLeftHidden}
139
+ onPress={() => onItemPress?.(item)}
140
+ />
141
+ )
142
+ })}
143
+ {remainingCount > 0 && (
144
+ <Typography variant={HeadingVariants.H8} style={styles.moreText}>
145
+ {t('pmProgress.andMore', { count: `${remainingCount}` })}
146
+ </Typography>
147
+ )}
148
+ </View>
149
+ )}
150
+ </View>
151
+ )
152
+ }
153
+
154
+ const styles = StyleSheet.create({
155
+ container: {
156
+ justifyContent: 'center',
157
+ backgroundColor: COLORS.NEUTRAL_2,
158
+ overflow: 'hidden',
159
+ cursor: 'pointer',
160
+ },
161
+ containerCollapsed: {
162
+ marginTop: -1,
163
+ },
164
+ containerFirst: {
165
+ borderTopLeftRadius: BORDER_RADIUS[200],
166
+ borderTopRightRadius: BORDER_RADIUS[200],
167
+ },
168
+ containerLast: {
169
+ borderBottomLeftRadius: BORDER_RADIUS[200],
170
+ borderBottomRightRadius: BORDER_RADIUS[200],
171
+ },
172
+ header: {
173
+ flexDirection: 'row',
174
+ alignItems: 'center',
175
+ height: HEADER_HEIGHT,
176
+ padding: SPACING[400],
177
+ backgroundColor: COLORS.NEUTRAL_2,
178
+ borderWidth: 1,
179
+ borderColor: COLORS.NEUTRAL_4,
180
+ cursor: 'pointer',
181
+ },
182
+ headerFirst: {
183
+ borderTopLeftRadius: BORDER_RADIUS[200],
184
+ borderTopRightRadius: BORDER_RADIUS[200],
185
+ },
186
+ headerLast: {
187
+ borderBottomLeftRadius: BORDER_RADIUS[200],
188
+ borderBottomRightRadius: BORDER_RADIUS[200],
189
+ },
190
+ caret: {
191
+ marginLeft: SPACING[400],
192
+ },
193
+ title: {
194
+ color: COLORS.NEUTRAL_9,
195
+ marginLeft: SPACING[200],
196
+ flex: 1,
197
+ },
198
+ progress: {
199
+ flexDirection: 'row',
200
+ alignItems: 'center',
201
+ gap: SPACING[200],
202
+ },
203
+ percentage: {
204
+ textAlign: 'right',
205
+ },
206
+ track: {
207
+ width: PROGRESS_BAR_WIDTH,
208
+ height: PROGRESS_BAR_HEIGHT,
209
+ backgroundColor: COLORS.NEUTRAL_4,
210
+ borderRadius: BORDER_RADIUS[200],
211
+ overflow: 'hidden',
212
+ },
213
+ fill: {
214
+ height: '100%',
215
+ borderRadius: BORDER_RADIUS[200],
216
+ },
217
+ items: {
218
+ gap: SPACING[200],
219
+ padding: SPACING[200],
220
+ backgroundColor: COLORS.NEUTRAL_1,
221
+ },
222
+ itemsLast: {
223
+ borderBottomLeftRadius: BORDER_RADIUS[200],
224
+ borderBottomRightRadius: BORDER_RADIUS[200],
225
+ },
226
+ moreText: {
227
+ textAlign: 'center',
228
+ color: COLORS.NEUTRAL_7,
229
+ marginVertical: SPACING[200],
230
+ },
231
+ })
@@ -0,0 +1,136 @@
1
+ import React, { useState } from 'react'
2
+ import { View, Pressable, StyleSheet } from 'react-native'
3
+ import {
4
+ ArrowRightIcon,
5
+ CheckIcon,
6
+ COLORS,
7
+ FONT_FAMILY,
8
+ HeadingVariants,
9
+ Typography,
10
+ } from '@magmamath/react-native-ui'
11
+ import { useText } from '../../../../shared/translation'
12
+
13
+ const FINISHED_BG = '#EFFBF5'
14
+ const FINISHED_TITLE = '#00804A'
15
+ const FINISHED_SUBTITLE = '#29A96F'
16
+ const FINISHED_ICON = '#5CD497'
17
+ const CARD_HEIGHT = 52
18
+ const ICON_SIZE = 25
19
+ const SUBTITLE_FONT_SIZE = 10
20
+ const SUBTITLE_LINE_HEIGHT = 14
21
+
22
+ export type ListItemProps = {
23
+ title: string
24
+ subtitle: string
25
+ skillsLeft: number
26
+ isFinished?: boolean
27
+ onPress?: () => void
28
+ isSkillsLeftHidden?: boolean
29
+ }
30
+
31
+ export const ListItem = ({
32
+ title,
33
+ subtitle,
34
+ skillsLeft,
35
+ isFinished = false,
36
+ onPress,
37
+ isSkillsLeftHidden = false,
38
+ }: ListItemProps) => {
39
+ const t = useText()
40
+ const [isHovered, setIsHovered] = useState(false)
41
+ const isSkillsLeftVisible = skillsLeft > 0 && !isFinished && !isSkillsLeftHidden
42
+
43
+ return (
44
+ <Pressable
45
+ onPress={onPress}
46
+ style={[styles.card, isFinished && styles.finished, isHovered && styles.hovered]}
47
+ onHoverIn={() => setIsHovered(true)}
48
+ onHoverOut={() => setIsHovered(false)}
49
+ >
50
+ <View style={styles.content}>
51
+ <Typography
52
+ variant={HeadingVariants.H10}
53
+ style={[styles.title, isFinished && styles.titleFinished]}
54
+ numberOfLines={1}
55
+ >
56
+ {title}
57
+ </Typography>
58
+ <Typography
59
+ style={[styles.subtitle, isFinished && styles.subtitleFinished]}
60
+ numberOfLines={1}
61
+ >
62
+ {subtitle}
63
+ </Typography>
64
+ </View>
65
+ <View style={styles.trailing}>
66
+ {isSkillsLeftVisible && (
67
+ <Typography variant={HeadingVariants.H10} style={styles.skills}>
68
+ {skillsLeft} {skillsLeft === 1 ? t('pmProgress.skillLeft') : t('pmProgress.skillsLeft')}
69
+ </Typography>
70
+ )}
71
+ <View style={styles.icon}>
72
+ {isFinished ? (
73
+ <CheckIcon color={FINISHED_ICON} />
74
+ ) : (
75
+ <ArrowRightIcon color={COLORS.NEUTRAL_9} />
76
+ )}
77
+ </View>
78
+ </View>
79
+ </Pressable>
80
+ )
81
+ }
82
+
83
+ const styles = StyleSheet.create({
84
+ card: {
85
+ flexDirection: 'row',
86
+ alignItems: 'center',
87
+ height: CARD_HEIGHT,
88
+ paddingLeft: 32,
89
+ paddingRight: 16,
90
+ backgroundColor: 'white',
91
+ borderRadius: 12,
92
+ gap: 8,
93
+ boxShadow: '0px 0px 1px 0px #33333366, 0px 1px 3px 0px #3333331A',
94
+ },
95
+ finished: {
96
+ backgroundColor: FINISHED_BG,
97
+ boxShadow: '0px 0px 1px 0px #33333366, 0px 1px 3px 0px #3333331A',
98
+ },
99
+ hovered: {
100
+ backgroundColor: '#FAFAFB',
101
+ boxShadow:
102
+ '0px 0px 1px 0px #33333366, 0px 1px 3px 0px #3333331A, 4px 4px 10px rgba(51, 51, 51, 0.15)',
103
+ },
104
+ content: {
105
+ flex: 1,
106
+ },
107
+ title: {
108
+ color: COLORS.NEUTRAL_9,
109
+ },
110
+ titleFinished: {
111
+ color: FINISHED_TITLE,
112
+ },
113
+ subtitle: {
114
+ color: COLORS.NEUTRAL_7,
115
+ fontSize: SUBTITLE_FONT_SIZE,
116
+ fontFamily: FONT_FAMILY.buenosAires,
117
+ lineHeight: SUBTITLE_LINE_HEIGHT,
118
+ },
119
+ subtitleFinished: {
120
+ color: FINISHED_SUBTITLE,
121
+ },
122
+ trailing: {
123
+ flexDirection: 'row',
124
+ alignItems: 'center',
125
+ gap: 8,
126
+ },
127
+ skills: {
128
+ color: COLORS.NEUTRAL_9,
129
+ },
130
+ icon: {
131
+ width: ICON_SIZE,
132
+ height: ICON_SIZE,
133
+ justifyContent: 'center',
134
+ alignItems: 'center',
135
+ },
136
+ })
@@ -0,0 +1,69 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import { useUnit } from 'effector-react'
4
+ import { BORDER_RADIUS, COLORS, ScrollableList, SPACING } from '@magmamath/react-native-ui'
5
+ import { ListCard } from './ListCard'
6
+ import { Fluency } from './Fluency'
7
+ import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
8
+ import { usePmProgress } from '../../context/PmProgressContext'
9
+ import { isFluencyDomain } from '../../shared/pmProgress.helpers'
10
+ import { SolvingFlow } from '../../shared/pmProgress.constants'
11
+
12
+ export const PmDomainList = () => {
13
+ const { model, onStandardPress } = usePmProgress()
14
+ const domains = useUnit(model.tree.$domains)
15
+ const expandedId = useUnit(model.highlight.$expandedId)
16
+ const hoveredId = useUnit(model.highlight.$hoveredId)
17
+
18
+ const fluency = domains.find(({ title }) => isFluencyDomain(title))
19
+ const list = fluency ? domains.filter(({ title }) => !isFluencyDomain(title)) : domains
20
+
21
+ return (
22
+ <View style={styles.container}>
23
+ <ScrollableList
24
+ data={list}
25
+ hideShadow
26
+ scrollbarWidth={8}
27
+ style={styles.scroll}
28
+ ListFooterComponent={<Fluency data={fluency} />}
29
+ keyExtractor={(item) => item.domainId}
30
+ renderItem={({ item, index }) => (
31
+ <ListCard
32
+ title={item.title}
33
+ items={item.standards.map((standard) => ({ ...standard, id: standard.standardId }))}
34
+ progress={item.scorePercentage}
35
+ color={item.color}
36
+ onPress={() => model.highlight.expand(item.domainId)}
37
+ onHoverIn={() => model.highlight.hover(item.domainId)}
38
+ onHoverOut={() => model.highlight.hover(null)}
39
+ onItemPress={async (item) => {
40
+ const skill = await model.solving.start({
41
+ type: SolvingFlow.STANDARD,
42
+ standardId: item.standardId,
43
+ })
44
+ onStandardPress?.(skill)
45
+ }}
46
+ isLast={index === list.length - 1}
47
+ isFirst={index === 0}
48
+ isExpanded={expandedId === item.domainId}
49
+ isHighlighted={hoveredId === item.domainId || expandedId === item.domainId}
50
+ icon={<SliceDiamondIcon color={item.color} />}
51
+ />
52
+ )}
53
+ />
54
+ </View>
55
+ )
56
+ }
57
+
58
+ const styles = StyleSheet.create({
59
+ container: {
60
+ flex: 1,
61
+ overflow: 'hidden',
62
+ padding: SPACING[200],
63
+ backgroundColor: COLORS.NEUTRAL_1,
64
+ borderRadius: BORDER_RADIUS[400],
65
+ },
66
+ scroll: {
67
+ flex: 1,
68
+ },
69
+ })
@@ -0,0 +1,109 @@
1
+ import React from 'react'
2
+ import { StyleSheet, Text, View } from 'react-native'
3
+ import { ListCard } from '../list/ListCard'
4
+ import { PentagonIcon } from '../../../../shared/icons/PentagonIcon'
5
+ import {
6
+ BORDER_RADIUS,
7
+ Button,
8
+ ButtonSize,
9
+ ButtonVariant,
10
+ COLORS,
11
+ SPACING,
12
+ } from '@magmamath/react-native-ui'
13
+ import { useText } from '../../../../shared/translation'
14
+ import { useStoreMap, useUnit } from 'effector-react'
15
+ import { CustomDomain, SolvingFlow } from '../../shared/pmProgress.constants'
16
+ import { usePmProgress } from '../../context/PmProgressContext'
17
+
18
+ export const PmTeacherRecs = () => {
19
+ const t = useText()
20
+ const { model, onPracticePress, onTeacherRecommendationPress } = usePmProgress()
21
+ const expandedId = useUnit(model.highlight.$expandedId)
22
+
23
+ // TODO: rework this, probably split and pass renderer to ListCard
24
+ const recommendations = useStoreMap(model.recommendations.$teacher, ({ items }) =>
25
+ items.map((skill) => ({
26
+ id: skill._id,
27
+ skillId: skill._id,
28
+ title: skill.nameTranslations,
29
+ subtitle: skill.shortDescriptionTranslations,
30
+ skillsCount: { total: 1, achieved: 0, failed: 0 }, // TODO: fix this to be able to determine if isFinished - I think need to find this in skillsMapping or something??
31
+ })),
32
+ )
33
+
34
+ if (!recommendations.length) return null
35
+
36
+ return (
37
+ <View style={styles.container}>
38
+ <View style={styles.wrapper}>
39
+ <ListCard
40
+ title={t('pmProgress.teacherRecs')}
41
+ items={recommendations}
42
+ maxItems={3}
43
+ color={COLORS.PRIMARY_YELLOW}
44
+ expandedColor={COLORS.YELLOW_1}
45
+ onPress={() => model.highlight.expand(CustomDomain.TEACHER)}
46
+ onItemPress={async (item) => {
47
+ const skill = await model.solving.start({
48
+ type: SolvingFlow.TEACHER,
49
+ skillId: item.skillId,
50
+ })
51
+ onPracticePress?.(skill)
52
+ }}
53
+ isLast
54
+ isFirst
55
+ isSkillsLeftHidden
56
+ isExpanded={expandedId === CustomDomain.TEACHER}
57
+ isHighlighted={expandedId === CustomDomain.TEACHER}
58
+ icon={<PentagonIcon color={COLORS.PRIMARY_YELLOW} />}
59
+ rightContent={
60
+ <Button
61
+ onPress={async () => {
62
+ const skill = await model.solving.start({ type: SolvingFlow.TEACHER })
63
+ onTeacherRecommendationPress?.(skill)
64
+ }}
65
+ size={ButtonSize.SMALL}
66
+ variant={ButtonVariant.SECONDARY}
67
+ >
68
+ {t('pmProgress.practiceButton')}
69
+ </Button>
70
+ }
71
+ />
72
+ {recommendations.length > 0 && (
73
+ <View style={styles.badge}>
74
+ <Text style={styles.text}>{recommendations.length}</Text>
75
+ </View>
76
+ )}
77
+ </View>
78
+ </View>
79
+ )
80
+ }
81
+
82
+ const styles = StyleSheet.create({
83
+ container: {
84
+ overflow: 'visible',
85
+ padding: SPACING[200],
86
+ borderRadius: BORDER_RADIUS[400],
87
+ backgroundColor: COLORS.NEUTRAL_1,
88
+ },
89
+ wrapper: {
90
+ position: 'relative',
91
+ },
92
+ badge: {
93
+ position: 'absolute',
94
+ top: -8,
95
+ right: -8,
96
+ width: 20,
97
+ height: 20,
98
+ backgroundColor: COLORS.PRIMARY_RED,
99
+ alignItems: 'center',
100
+ justifyContent: 'center',
101
+ borderRadius: '50%',
102
+ },
103
+ text: {
104
+ textAlign: 'center',
105
+ fontSize: 12,
106
+ fontWeight: '600',
107
+ color: COLORS.NEUTRAL_1,
108
+ },
109
+ })