@magmamath/students-features 1.3.14 → 1.3.16-rc.22

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 (348) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +2 -2
  2. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +2 -2
  4. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/helpers.js +3 -3
  6. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  7. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +3 -4
  8. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  9. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +4 -2
  10. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  11. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +3 -4
  12. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  13. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +4 -8
  14. package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -1
  15. package/dist/commonjs/features/feedback/components/EmptyComment.js +2 -2
  16. package/dist/commonjs/features/feedback/components/EmptyComment.js.map +1 -1
  17. package/dist/commonjs/features/feedback/model/comments.js +2 -2
  18. package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
  19. package/dist/commonjs/features/gifCelebrations/components/Gif.js +2 -2
  20. package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +1 -1
  21. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
  22. package/dist/commonjs/features/keyboard/components/Numpad/Numpad.js +2 -2
  23. package/dist/commonjs/features/keyboard/components/Numpad/Numpad.js.map +1 -1
  24. package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +2 -2
  25. package/dist/commonjs/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
  26. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js +1 -1
  27. package/dist/commonjs/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -1
  28. package/dist/commonjs/features/pmProgress/components/header/NextUp.js +7 -11
  29. package/dist/commonjs/features/pmProgress/components/header/NextUp.js.map +1 -1
  30. package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js +2 -2
  31. package/dist/commonjs/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
  32. package/dist/commonjs/features/pmProgress/components/header/StartButton.js +2 -2
  33. package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -1
  34. package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js +1 -1
  35. package/dist/commonjs/features/pmProgress/components/insights/PmInsights.js.map +1 -1
  36. package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js +2 -2
  37. package/dist/commonjs/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -1
  38. package/dist/commonjs/features/pmProgress/components/list/Fluency.js +2 -2
  39. package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -1
  40. package/dist/commonjs/features/pmProgress/components/list/ListCard.js +2 -2
  41. package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +1 -1
  42. package/dist/commonjs/features/pmProgress/components/list/ListItem.js +2 -2
  43. package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +1 -1
  44. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +1 -1
  45. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  46. package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js +2 -2
  47. package/dist/commonjs/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -1
  48. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +2 -2
  49. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  50. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +8 -3
  51. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  52. package/dist/commonjs/features/pmProgress/hooks/useNextUpDomain.js +42 -0
  53. package/dist/commonjs/features/pmProgress/hooks/useNextUpDomain.js.map +1 -0
  54. package/dist/commonjs/features/pmProgress/model/PmTreeModel.js +18 -16
  55. package/dist/commonjs/features/pmProgress/model/PmTreeModel.js.map +1 -1
  56. package/dist/commonjs/features/pmProgress/shared/pmProgress.constants.js +1 -1
  57. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +11 -7
  58. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  59. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +2 -2
  60. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -1
  61. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +2 -2
  62. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -1
  63. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +2 -2
  64. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
  65. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +2 -2
  66. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -1
  67. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +2 -2
  68. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -1
  69. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +2 -2
  70. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -1
  71. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +7 -7
  72. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  73. package/dist/commonjs/i18n/i18n.js +19 -0
  74. package/dist/commonjs/i18n/i18n.js.map +1 -0
  75. package/dist/commonjs/i18n/i18next.d.js +5 -0
  76. package/dist/commonjs/i18n/i18next.d.js.map +1 -0
  77. package/dist/commonjs/index.js +26 -41
  78. package/dist/commonjs/index.js.map +1 -1
  79. package/dist/commonjs/lib/helpers/helpers.js +12 -12
  80. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  81. package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
  82. package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
  83. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +1 -1
  84. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -1
  85. package/dist/module/features/chatbot/helpers.js +1 -1
  86. package/dist/module/features/chatbot/helpers.js.map +1 -1
  87. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +2 -3
  88. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  89. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +3 -2
  90. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  91. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +3 -4
  92. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  93. package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +5 -9
  94. package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -1
  95. package/dist/module/features/feedback/components/EmptyComment.js +1 -1
  96. package/dist/module/features/feedback/components/EmptyComment.js.map +1 -1
  97. package/dist/module/features/feedback/model/comments.js +1 -1
  98. package/dist/module/features/feedback/model/comments.js.map +1 -1
  99. package/dist/module/features/gifCelebrations/components/Gif.js +1 -1
  100. package/dist/module/features/gifCelebrations/components/Gif.js.map +1 -1
  101. package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
  102. package/dist/module/features/keyboard/components/Numpad/Numpad.js +1 -1
  103. package/dist/module/features/keyboard/components/Numpad/Numpad.js.map +1 -1
  104. package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js +1 -1
  105. package/dist/module/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.js.map +1 -1
  106. package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js +1 -1
  107. package/dist/module/features/pmProgress/components/chart/components/SlicesPaths.js.map +1 -1
  108. package/dist/module/features/pmProgress/components/header/NextUp.js +7 -11
  109. package/dist/module/features/pmProgress/components/header/NextUp.js.map +1 -1
  110. package/dist/module/features/pmProgress/components/header/PmProgressHeader.js +2 -2
  111. package/dist/module/features/pmProgress/components/header/PmProgressHeader.js.map +1 -1
  112. package/dist/module/features/pmProgress/components/header/StartButton.js +1 -1
  113. package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -1
  114. package/dist/module/features/pmProgress/components/insights/PmInsights.js +1 -1
  115. package/dist/module/features/pmProgress/components/insights/PmInsights.js.map +1 -1
  116. package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js +2 -3
  117. package/dist/module/features/pmProgress/components/insights/PmTimeframeStats.js.map +1 -1
  118. package/dist/module/features/pmProgress/components/list/Fluency.js +1 -1
  119. package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -1
  120. package/dist/module/features/pmProgress/components/list/ListCard.js +2 -2
  121. package/dist/module/features/pmProgress/components/list/ListCard.js.map +1 -1
  122. package/dist/module/features/pmProgress/components/list/ListItem.js +2 -2
  123. package/dist/module/features/pmProgress/components/list/ListItem.js.map +1 -1
  124. package/dist/module/features/pmProgress/components/list/PmDomainList.js +1 -1
  125. package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  126. package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js +1 -1
  127. package/dist/module/features/pmProgress/components/locked/PmStatusOverlay.js.map +1 -1
  128. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +2 -2
  129. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  130. package/dist/module/features/pmProgress/components/standard/StandardTag.js +8 -3
  131. package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  132. package/dist/module/features/pmProgress/hooks/useNextUpDomain.js +37 -0
  133. package/dist/module/features/pmProgress/hooks/useNextUpDomain.js.map +1 -0
  134. package/dist/module/features/pmProgress/model/PmTreeModel.js +20 -18
  135. package/dist/module/features/pmProgress/model/PmTreeModel.js.map +1 -1
  136. package/dist/module/features/pmProgress/shared/pmProgress.constants.js +1 -1
  137. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +3 -1
  138. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  139. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +1 -1
  140. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -1
  141. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +1 -1
  142. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -1
  143. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +1 -1
  144. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -1
  145. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +1 -1
  146. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -1
  147. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +1 -1
  148. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -1
  149. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +1 -1
  150. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -1
  151. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +1 -1
  152. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -1
  153. package/dist/module/i18n/i18n.js +12 -0
  154. package/dist/module/i18n/i18n.js.map +1 -0
  155. package/dist/module/i18n/i18next.d.js +5 -0
  156. package/dist/module/i18n/i18next.d.js.map +1 -0
  157. package/dist/module/index.js +0 -1
  158. package/dist/module/index.js.map +1 -1
  159. package/dist/module/lib/helpers/helpers.js +1 -1
  160. package/dist/module/lib/helpers/helpers.js.map +1 -1
  161. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +2 -2
  162. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +1 -2
  164. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  166. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +2 -2
  168. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/features/pmProgress/components/header/NextUp.d.ts.map +1 -1
  170. package/dist/typescript/commonjs/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
  172. package/dist/typescript/commonjs/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -1
  173. package/dist/typescript/commonjs/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/features/pmProgress/hooks/useNextUpDomain.d.ts +5 -0
  175. package/dist/typescript/commonjs/features/pmProgress/hooks/useNextUpDomain.d.ts.map +1 -0
  176. package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts +3 -3
  177. package/dist/typescript/commonjs/features/pmProgress/model/PmTreeModel.d.ts.map +1 -1
  178. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts +1 -1
  179. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
  180. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +5 -1
  181. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  182. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
  183. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +2 -2
  184. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/i18n/i18n.d.ts +8 -0
  186. package/dist/typescript/commonjs/i18n/i18n.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/index.d.ts +0 -1
  188. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  189. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +2 -2
  190. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  191. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +1 -2
  192. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  193. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  194. package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -1
  195. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +2 -2
  196. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
  197. package/dist/typescript/module/features/pmProgress/components/header/NextUp.d.ts.map +1 -1
  198. package/dist/typescript/module/features/pmProgress/components/list/Fluency.d.ts.map +1 -1
  199. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +1 -1
  200. package/dist/typescript/module/features/pmProgress/components/locked/PmStatusOverlay.d.ts.map +1 -1
  201. package/dist/typescript/module/features/pmProgress/components/standard/StandardTag.d.ts.map +1 -1
  202. package/dist/typescript/module/features/pmProgress/hooks/useNextUpDomain.d.ts +5 -0
  203. package/dist/typescript/module/features/pmProgress/hooks/useNextUpDomain.d.ts.map +1 -0
  204. package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts +3 -3
  205. package/dist/typescript/module/features/pmProgress/model/PmTreeModel.d.ts.map +1 -1
  206. package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts +1 -1
  207. package/dist/typescript/module/features/pmProgress/shared/pmProgress.constants.d.ts.map +1 -1
  208. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +5 -1
  209. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  210. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -1
  211. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +2 -2
  212. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -1
  213. package/dist/typescript/module/i18n/i18n.d.ts +8 -0
  214. package/dist/typescript/module/i18n/i18n.d.ts.map +1 -0
  215. package/dist/typescript/module/index.d.ts +0 -1
  216. package/dist/typescript/module/index.d.ts.map +1 -1
  217. package/package.json +11 -6
  218. package/src/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.tsx +1 -1
  219. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +1 -1
  220. package/src/features/chatbot/helpers.ts +1 -1
  221. package/src/features/chatbot/model/ChatBoxTextManager.ts +4 -8
  222. package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
  223. package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +3 -4
  224. package/src/features/exampleSolution/model/ExampleSolutionApi.ts +5 -9
  225. package/src/features/feedback/components/EmptyComment.tsx +1 -1
  226. package/src/features/feedback/model/comments.ts +1 -1
  227. package/src/features/gifCelebrations/components/Gif.tsx +1 -1
  228. package/src/features/gifCelebrations/helpers.ts +2 -2
  229. package/src/features/keyboard/components/Numpad/Numpad.tsx +1 -1
  230. package/src/features/keyboard/components/UnitsLayout/hooks/useUnitTabs.ts +1 -1
  231. package/src/features/pmProgress/components/chart/components/SlicesPaths.tsx +1 -1
  232. package/src/features/pmProgress/components/header/NextUp.tsx +7 -14
  233. package/src/features/pmProgress/components/header/PmProgressHeader.tsx +2 -2
  234. package/src/features/pmProgress/components/header/StartButton.tsx +1 -1
  235. package/src/features/pmProgress/components/insights/PmInsights.tsx +1 -1
  236. package/src/features/pmProgress/components/insights/PmTimeframeStats.tsx +2 -2
  237. package/src/features/pmProgress/components/list/Fluency.tsx +1 -1
  238. package/src/features/pmProgress/components/list/ListCard.tsx +3 -2
  239. package/src/features/pmProgress/components/list/ListItem.tsx +2 -2
  240. package/src/features/pmProgress/components/list/PmDomainList.tsx +1 -1
  241. package/src/features/pmProgress/components/locked/PmStatusOverlay.tsx +4 -12
  242. package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +2 -2
  243. package/src/features/pmProgress/components/standard/StandardTag.tsx +4 -3
  244. package/src/features/pmProgress/hooks/useNextUpDomain.ts +31 -0
  245. package/src/features/pmProgress/model/PmTreeModel.ts +26 -17
  246. package/src/features/pmProgress/shared/pmProgress.constants.ts +1 -1
  247. package/src/features/pmProgress/shared/pmProgress.helpers.ts +13 -2
  248. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +1 -1
  249. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +1 -1
  250. package/src/features/voice/recording/components/VoiceRecordButton.tsx +1 -1
  251. package/src/features/voice/recording/modal/ModalFooterButtons.tsx +2 -3
  252. package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +1 -1
  253. package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +1 -1
  254. package/src/features/voice/recording/model/VoiceRecord.model.ts +1 -1
  255. package/{dist/commonjs/shared/translation/localization/en.json → src/i18n/.generated/schema.json} +67 -62
  256. package/src/i18n/i18n.ts +13 -0
  257. package/src/i18n/i18next.d.ts +20 -0
  258. package/src/index.ts +0 -1
  259. package/src/lib/helpers/helpers.ts +1 -1
  260. package/dist/commonjs/lib/types/keys.js +0 -2
  261. package/dist/commonjs/lib/types/keys.js.map +0 -1
  262. package/dist/commonjs/shared/translation/constants.js +0 -23
  263. package/dist/commonjs/shared/translation/constants.js.map +0 -1
  264. package/dist/commonjs/shared/translation/helpers.js +0 -47
  265. package/dist/commonjs/shared/translation/helpers.js.map +0 -1
  266. package/dist/commonjs/shared/translation/hooks.js +0 -25
  267. package/dist/commonjs/shared/translation/hooks.js.map +0 -1
  268. package/dist/commonjs/shared/translation/index.js +0 -45
  269. package/dist/commonjs/shared/translation/index.js.map +0 -1
  270. package/dist/commonjs/shared/translation/localization/ca.json +0 -85
  271. package/dist/commonjs/shared/translation/localization/de.json +0 -85
  272. package/dist/commonjs/shared/translation/localization/gb.json +0 -85
  273. package/dist/commonjs/shared/translation/localization/sct.json +0 -85
  274. package/dist/commonjs/shared/translation/localization/sw.json +0 -85
  275. package/dist/commonjs/shared/translation/model.js +0 -15
  276. package/dist/commonjs/shared/translation/model.js.map +0 -1
  277. package/dist/commonjs/shared/translation/types.js +0 -6
  278. package/dist/commonjs/shared/translation/types.js.map +0 -1
  279. package/dist/commonjs/shared/translation/validation.types.js +0 -6
  280. package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
  281. package/dist/module/lib/types/keys.js +0 -2
  282. package/dist/module/lib/types/keys.js.map +0 -1
  283. package/dist/module/shared/translation/constants.js +0 -18
  284. package/dist/module/shared/translation/constants.js.map +0 -1
  285. package/dist/module/shared/translation/helpers.js +0 -38
  286. package/dist/module/shared/translation/helpers.js.map +0 -1
  287. package/dist/module/shared/translation/hooks.js +0 -19
  288. package/dist/module/shared/translation/hooks.js.map +0 -1
  289. package/dist/module/shared/translation/index.js +0 -6
  290. package/dist/module/shared/translation/index.js.map +0 -1
  291. package/dist/module/shared/translation/localization/ca.json +0 -85
  292. package/dist/module/shared/translation/localization/de.json +0 -85
  293. package/dist/module/shared/translation/localization/en.json +0 -85
  294. package/dist/module/shared/translation/localization/gb.json +0 -85
  295. package/dist/module/shared/translation/localization/sct.json +0 -85
  296. package/dist/module/shared/translation/localization/sw.json +0 -85
  297. package/dist/module/shared/translation/model.js +0 -11
  298. package/dist/module/shared/translation/model.js.map +0 -1
  299. package/dist/module/shared/translation/types.js +0 -4
  300. package/dist/module/shared/translation/types.js.map +0 -1
  301. package/dist/module/shared/translation/validation.types.js +0 -4
  302. package/dist/module/shared/translation/validation.types.js.map +0 -1
  303. package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
  304. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
  305. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -513
  306. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +0 -1
  307. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +0 -7
  308. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +0 -1
  309. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +0 -5
  310. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +0 -1
  311. package/dist/typescript/commonjs/shared/translation/index.d.ts +0 -4
  312. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +0 -1
  313. package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -173
  314. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +0 -1
  315. package/dist/typescript/commonjs/shared/translation/types.d.ts +0 -6
  316. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +0 -1
  317. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -21
  318. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
  319. package/dist/typescript/module/lib/types/keys.d.ts +0 -8
  320. package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
  321. package/dist/typescript/module/shared/translation/constants.d.ts +0 -513
  322. package/dist/typescript/module/shared/translation/constants.d.ts.map +0 -1
  323. package/dist/typescript/module/shared/translation/helpers.d.ts +0 -7
  324. package/dist/typescript/module/shared/translation/helpers.d.ts.map +0 -1
  325. package/dist/typescript/module/shared/translation/hooks.d.ts +0 -5
  326. package/dist/typescript/module/shared/translation/hooks.d.ts.map +0 -1
  327. package/dist/typescript/module/shared/translation/index.d.ts +0 -4
  328. package/dist/typescript/module/shared/translation/index.d.ts.map +0 -1
  329. package/dist/typescript/module/shared/translation/model.d.ts +0 -173
  330. package/dist/typescript/module/shared/translation/model.d.ts.map +0 -1
  331. package/dist/typescript/module/shared/translation/types.d.ts +0 -6
  332. package/dist/typescript/module/shared/translation/types.d.ts.map +0 -1
  333. package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -21
  334. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
  335. package/src/lib/types/keys.ts +0 -18
  336. package/src/shared/translation/constants.ts +0 -16
  337. package/src/shared/translation/helpers.ts +0 -47
  338. package/src/shared/translation/hooks.ts +0 -25
  339. package/src/shared/translation/index.ts +0 -3
  340. package/src/shared/translation/localization/ca.json +0 -85
  341. package/src/shared/translation/localization/de.json +0 -85
  342. package/src/shared/translation/localization/en.json +0 -85
  343. package/src/shared/translation/localization/gb.json +0 -85
  344. package/src/shared/translation/localization/sct.json +0 -85
  345. package/src/shared/translation/localization/sw.json +0 -85
  346. package/src/shared/translation/model.ts +0 -16
  347. package/src/shared/translation/types.ts +0 -21
  348. package/src/shared/translation/validation.types.ts +0 -34
@@ -3,34 +3,27 @@ import { StyleSheet, View } from 'react-native'
3
3
  import { COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui'
4
4
  import { SketchArrowRight } from '../../../../shared/icons/SketchArrowRight'
5
5
  import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
6
- import { useText } from '../../../../shared/translation'
7
- import { useUnit, useStoreMap } from 'effector-react'
6
+ import { useUnit } from 'effector-react'
8
7
  import { usePmProgress } from '../../context/PmProgressContext'
9
- import { isFluencyDomain } from '../../shared/pmProgress.helpers'
10
8
  import { OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
11
9
  import { StartButton } from './StartButton'
10
+ import { useNextUpDomain } from '../../hooks/useNextUpDomain'
11
+ import { useText } from '../../../../i18n/i18n'
12
12
 
13
13
  export const NextUp = () => {
14
14
  const t = useText()
15
15
  const { model, onStartPress } = usePmProgress()
16
+ const nextUp = useNextUpDomain()
16
17
 
17
18
  const status = useUnit(model.tree.$status)
18
19
  const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
19
20
 
20
- const nextUp = useStoreMap(model.tree.$domains, (domains) =>
21
- domains.find((domain) => {
22
- const isFluency = isFluencyDomain(domain.title)
23
- const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
24
- return !isFluency && !isDomainCompleted
25
- }),
26
- )
27
-
28
21
  const isLoading = loaderOpeningId === OpeningLoaderId.START_BUTTON
29
22
  const isSkillOpeningActionPending = !!(loaderOpeningId !== null || status)
30
23
 
31
24
  return (
32
25
  <View style={styles.container}>
33
- {nextUp && !status && (
26
+ {nextUp.domain && !status && (
34
27
  <>
35
28
  <View style={styles.content}>
36
29
  <View style={styles.subtitle}>
@@ -40,10 +33,10 @@ export const NextUp = () => {
40
33
  </View>
41
34
  <View style={[styles.row, styles.tilted]}>
42
35
  <Typography variant={HeadingVariants.H7} style={styles.muted}>
43
- {nextUp?.title}
36
+ {nextUp.domain.title}
44
37
  </Typography>
45
38
  <View style={styles.diamond}>
46
- <SliceDiamondIcon color={nextUp?.color} />
39
+ <SliceDiamondIcon color={nextUp.domain.color} />
47
40
  </View>
48
41
  </View>
49
42
  </View>
@@ -14,13 +14,13 @@ import {
14
14
  Typography,
15
15
  } from '@magmamath/react-native-ui'
16
16
  import { isWeb } from '../../../../shared/common.constants'
17
- import { useText } from '../../../../shared/translation'
18
- import { useUnit, useStoreMap } from 'effector-react'
17
+ import { useStoreMap, useUnit } from 'effector-react'
19
18
  import { usePmProgress } from '../../context/PmProgressContext'
20
19
  import { formatGradeLabel } from '../../shared/pmProgress.helpers'
21
20
  import { MenuIcon } from '../../../../shared/icons/MenuIcon'
22
21
  import { NextUp } from './NextUp'
23
22
  import { BURGER_MENU_BREAKPOINT, MENU_MAX_HEIGHT } from '@magmamath/students-features'
23
+ import { useText } from '../../../../i18n/i18n'
24
24
 
25
25
  const menuItemProps: MenuItemProps = {
26
26
  style: {
@@ -11,7 +11,7 @@ import {
11
11
  SPACING,
12
12
  Typography,
13
13
  } from '@magmamath/react-native-ui'
14
- import { useText } from '../../../../shared/translation'
14
+ import { useText } from '../../../../i18n/i18n'
15
15
 
16
16
  const PULSATION_COLOR = '#FFBE4E66'
17
17
  const PULSE_OVERFLOW_X = 16
@@ -15,7 +15,7 @@ import {
15
15
  export const PmInsights = () => {
16
16
  const { model } = usePmProgress()
17
17
  const [chartSize, setChartSize] = useState(MAX_PIE_CHART_SIZE)
18
- const chartData = useStoreMap(model.tree.$domains, (domains) =>
18
+ const chartData = useStoreMap(model.tree.$domainsInGrade, (domains) =>
19
19
  domains.map((domain) => ({
20
20
  value: 1,
21
21
  fillPercent: Math.round(domain.scorePercentage),
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, View } from 'react-native'
3
3
  import {
4
+ BORDER_RADIUS,
4
5
  COLORS,
5
6
  FONT_FAMILY,
6
7
  SelectGroup,
@@ -12,12 +13,11 @@ import {
12
13
  import { StatsCard } from './StatsCard'
13
14
  import { StarIcon } from '../../../../shared/icons/StarIcon'
14
15
  import { TimerIcon } from '../../../../shared/icons/TimerIcon'
15
- import { BORDER_RADIUS } from '@magmamath/react-native-ui'
16
- import { useText } from '../../../../shared/translation'
17
16
  import { useUnit } from 'effector-react'
18
17
  import { formatTime } from '../../shared/pmProgress.helpers'
19
18
  import { InsightsTimeframe, STATS_MAX_HEIGHT } from '../../shared/pmProgress.constants'
20
19
  import { usePmProgress } from '../../context/PmProgressContext'
20
+ import { useText } from '../../../../i18n/i18n'
21
21
 
22
22
  const optionStyle: SelectOptionProps['style'] = {
23
23
  text: {
@@ -3,11 +3,11 @@ import { StyleSheet, View } from 'react-native'
3
3
  import { ListCard } from './ListCard'
4
4
  import { COLORS, SPACING } from '@magmamath/react-native-ui'
5
5
  import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
6
- import { useText } from '../../../../shared/translation'
7
6
  import { useUnit } from 'effector-react'
8
7
  import { SolvingFlow } from '../../shared/pmProgress.constants'
9
8
  import { Domain } from '../../shared/pmProgress.types'
10
9
  import { usePmProgress } from '../../context/PmProgressContext'
10
+ import { useText } from '../../../../i18n/i18n'
11
11
 
12
12
  type FluencyProps = {
13
13
  data: Domain | undefined
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { Pressable, View, StyleSheet, Platform, ViewStyle } from 'react-native'
2
+ import { Platform, Pressable, StyleSheet, View, ViewStyle } from 'react-native'
3
3
  import {
4
4
  BORDER_RADIUS,
5
5
  CaretDownIcon,
@@ -10,7 +10,8 @@ import {
10
10
  Typography,
11
11
  } from '@magmamath/react-native-ui'
12
12
  import { ListItem } from './ListItem'
13
- import { useText } from '../../../../shared/translation'
13
+ import { useText } from '../../../../i18n/i18n'
14
+
14
15
  const HEADER_HEIGHT = 60
15
16
  const PROGRESS_BAR_WIDTH = 50
16
17
  const PROGRESS_BAR_HEIGHT = 10
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { ActivityIndicator, View, Pressable, StyleSheet, Text } from 'react-native'
2
+ import { ActivityIndicator, Pressable, StyleSheet, Text, View } from 'react-native'
3
3
  import {
4
4
  ArrowRightIcon,
5
5
  BORDER_RADIUS,
@@ -11,7 +11,7 @@ import {
11
11
  SPACING,
12
12
  Typography,
13
13
  } from '@magmamath/react-native-ui'
14
- import { useText } from '../../../../shared/translation'
14
+ import { useText } from '../../../../i18n/i18n'
15
15
 
16
16
  const CARD_HEIGHT = 52
17
17
  const ICON_SIZE = 25
@@ -11,7 +11,7 @@ import { SolvingFlow } from '../../shared/pmProgress.constants'
11
11
 
12
12
  export const PmDomainList = () => {
13
13
  const { model, onStandardPress } = usePmProgress()
14
- const domains = useUnit(model.tree.$domains)
14
+ const domains = useUnit(model.tree.$domainsInGrade)
15
15
  const expandedId = useUnit(model.highlight.$expandedId)
16
16
  const hoveredId = useUnit(model.highlight.$hoveredId)
17
17
  const loaderOpeningId = useUnit(model.solving.$loaderOpeningId)
@@ -1,22 +1,14 @@
1
1
  import React, { ReactNode } from 'react'
2
2
  import { StyleSheet, View } from 'react-native'
3
- import {
4
- COLORS,
5
- ErrorIcon,
6
- HeadingVariants,
7
- LockIcon,
8
- SPACING,
9
- Typography,
10
- } from '@magmamath/react-native-ui'
11
- import { useText } from '../../../../shared/translation'
12
- import { TranslationKeys } from '../../../../shared/translation/types'
3
+ import { COLORS, ErrorIcon, HeadingVariants, LockIcon, SPACING, Typography, } from '@magmamath/react-native-ui'
13
4
  import { PmProgressStatus } from '../../shared/pmProgress.constants'
5
+ import { TranslationKey, useText } from '../../../../i18n/i18n'
14
6
 
15
7
  type EmptyStateVariant = {
16
8
  icon: ReactNode
17
9
  circleColor: string
18
- titleKey: TranslationKeys
19
- subtitleKey: TranslationKeys
10
+ titleKey: TranslationKey
11
+ subtitleKey: TranslationKey
20
12
  }
21
13
 
22
14
  const PM_EMPTY_STATE_VARIANTS: Record<PmProgressStatus, EmptyStateVariant> = {
@@ -11,10 +11,10 @@ import {
11
11
  SHADOWS,
12
12
  SPACING,
13
13
  } from '@magmamath/react-native-ui'
14
- import { useText } from '../../../../shared/translation'
15
- import { useUnit, useStoreMap } from 'effector-react'
14
+ import { useStoreMap, useUnit } from 'effector-react'
16
15
  import { CustomDomain, OpeningLoaderId, SolvingFlow } from '../../shared/pmProgress.constants'
17
16
  import { usePmProgress } from '../../context/PmProgressContext'
17
+ import { useText } from '../../../../i18n/i18n'
18
18
 
19
19
  export const PmTeacherRecs = () => {
20
20
  const t = useText()
@@ -4,6 +4,7 @@ import { PmProgressModel } from '@magmamath/students-features'
4
4
  import { SliceDiamondIcon } from '../../../../shared/icons/SliceDiamondIcon'
5
5
  import { COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
6
6
  import { useStoreMap } from 'effector-react'
7
+ import { isWeb } from '../../../../shared/common.constants'
7
8
 
8
9
  type ColorPreset = {
9
10
  background: string
@@ -118,7 +119,7 @@ type StandardTagProps = {
118
119
 
119
120
  export const StandardTag = ({ skillId, model }: StandardTagProps) => {
120
121
  const standardInfo = useStoreMap({
121
- store: model.tree.$domains,
122
+ store: model.tree.$domainsInGrade,
122
123
  keys: [skillId],
123
124
  fn: (domains, [skillId]) => {
124
125
  const domain = domains.find((d) => d.standards.some((s) => s.skillIds.includes(skillId)))
@@ -150,7 +151,7 @@ export const StandardTag = ({ skillId, model }: StandardTagProps) => {
150
151
  const styles = StyleSheet.create({
151
152
  container: {
152
153
  minWidth: 110,
153
- maxWidth: 350,
154
+ maxWidth: isWeb ? 350 : 280,
154
155
  paddingHorizontal: 8,
155
156
  paddingVertical: 4,
156
157
  borderRadius: 12,
@@ -165,7 +166,7 @@ const styles = StyleSheet.create({
165
166
  elevation: 2,
166
167
  },
167
168
  textContainer: {
168
- flex: 1,
169
+ ...(isWeb ? { flex: 1 } : { flexShrink: 1 }),
169
170
  flexDirection: 'column',
170
171
  justifyContent: 'center',
171
172
  alignItems: 'flex-start',
@@ -0,0 +1,31 @@
1
+ import { useUnit, useStoreMap } from 'effector-react'
2
+ import { usePmProgress } from '../context/PmProgressContext'
3
+ import { findDomainBySkillId, isFluencyDomain } from '../shared/pmProgress.helpers'
4
+
5
+ export const useNextUpDomain = () => {
6
+ const { model } = usePmProgress()
7
+ const magmaRecs = useUnit(model.recommendations.$magma)
8
+ const domainsInTree = useUnit(model.tree.$domains)
9
+
10
+ return useStoreMap({
11
+ store: model.tree.$domainsInGrade,
12
+ keys: [magmaRecs, domainsInTree],
13
+ fn: (domainsInGrade) => {
14
+ const firstRec = magmaRecs.items[0]
15
+ if (firstRec) {
16
+ const allDomains = Object.values(domainsInTree).flat()
17
+ const domain = findDomainBySkillId(firstRec._id, allDomains) ?? null
18
+ return { domain, isFromRecommendation: true }
19
+ }
20
+
21
+ const domain =
22
+ domainsInGrade.find((domain) => {
23
+ const isFluency = isFluencyDomain(domain.title)
24
+ const isDomainCompleted = domain.standards.every((standard) => standard.isCompleted)
25
+ return !isFluency && !isDomainCompleted
26
+ }) ?? null
27
+
28
+ return { domain, isFromRecommendation: false }
29
+ },
30
+ })
31
+ }
@@ -1,4 +1,4 @@
1
- import { attach, createEffect, createEvent, createStore, restore, sample } from 'effector'
1
+ import { attach, combine, createEffect, createEvent, createStore, restore, sample } from 'effector'
2
2
  import { createAction } from 'effector-action'
3
3
  import {
4
4
  Domain,
@@ -18,6 +18,7 @@ import {
18
18
  getInitialPmGrade,
19
19
  getTreeGrades,
20
20
  isTreeDataReady,
21
+ isTreeDataWithoutGradeReady,
21
22
  } from '../shared/pmProgress.helpers'
22
23
  import { TreeNormalizer } from '../shared/TreeNormalizer'
23
24
  import { persist } from 'effector-storage/session'
@@ -30,12 +31,14 @@ export class PmTreeModel {
30
31
  private readonly $user = createStore<User | null>(null)
31
32
 
32
33
  private readonly setupInitialGrade = createEvent<SetupInitialGradeProps>()
33
- private readonly setDomains = createEvent<Domain[]>()
34
34
  public readonly setGrade = createEvent<number | null>()
35
35
 
36
36
  public readonly $isInitialized = createStore(false)
37
37
  public readonly $grade = restore(this.setGrade, null)
38
- public readonly $domains = restore(this.setDomains, [])
38
+ public readonly $domains = createStore<Record<number, Domain[]>>({})
39
+ public readonly $domainsInGrade = combine(this.$domains, this.$grade, (domains, grade) =>
40
+ grade !== null ? (domains[grade] ?? []) : [],
41
+ )
39
42
  public readonly $grades = createStore<Grade[]>([])
40
43
  public readonly $status = createStore<PmProgressStatus | null>(null)
41
44
 
@@ -48,7 +51,7 @@ export class PmTreeModel {
48
51
  this.setupFailedAndLockedStatus()
49
52
  this.setupTreeInit()
50
53
  this.setupGradeInit()
51
- this.setupDomainStructure()
54
+ this.setupDomainsInTree()
52
55
  }
53
56
 
54
57
  public readonly initTreeFx = createEffect(async ({ user }: PmProgressGateProps) => {
@@ -150,22 +153,28 @@ export class PmTreeModel {
150
153
  })
151
154
  }
152
155
 
153
- private setupDomainStructure() {
156
+ private setupDomainsInTree() {
154
157
  sample({
155
- clock: [this.$grade, this.initTreeFx.doneData],
156
- source: { tree: this.$tree, stats: this.$stats, user: this.$user, grade: this.$grade },
157
- filter: isTreeDataReady,
158
- fn: ({ tree, stats, user, grade }) => {
159
- const [treeWithUserStats] = enhanceProgressMatrixData(
160
- Object.values(tree.treeMapping),
161
- stats,
162
- [{ entityId: user._id, name: user.fullName }],
163
- grade as number,
158
+ clock: this.initTreeFx.doneData,
159
+ source: { tree: this.$tree, stats: this.$stats, user: this.$user },
160
+ filter: isTreeDataWithoutGradeReady,
161
+ fn: ({ tree, stats, user }) => {
162
+ const treeNodes = Object.values(tree.treeMapping)
163
+ const grades = getTreeGrades(tree, user).filter((g) => !g.isLocked)
164
+
165
+ return Object.fromEntries(
166
+ grades.map((grade) => {
167
+ const [treeWithStats] = enhanceProgressMatrixData(
168
+ treeNodes,
169
+ stats,
170
+ [{ entityId: user._id, name: user.fullName }],
171
+ grade.value,
172
+ )
173
+ return [grade.value, getDomainStructure(treeWithStats, tree.treeMapping)]
174
+ }),
164
175
  )
165
-
166
- return getDomainStructure(treeWithUserStats, tree.treeMapping)
167
176
  },
168
- target: this.setDomains,
177
+ target: this.$domains,
169
178
  })
170
179
  }
171
180
  }
@@ -35,7 +35,7 @@ export enum PmProgressStatus {
35
35
  export enum SessionStorageKeys {
36
36
  SOLVING_QUEUE = 'PM_SOLVING_QUEUE',
37
37
  GRADE = 'PM_GRADE',
38
- DOMAINS = 'PM_DOMAINS',
38
+ DOMAINS = 'PM_DOMAINS_IN_TREE',
39
39
  }
40
40
 
41
41
  /**
@@ -1,5 +1,6 @@
1
1
  import { COLORS } from '@magmamath/react-native-ui'
2
2
  import type { ProgressMatrixStatsDto } from '@matteappen/skills-utils/enhanceProgressData/types'
3
+ import type { GradeLabelsMap } from './pmProgress.types'
3
4
  import {
4
5
  Domain,
5
6
  DomainStandard,
@@ -13,8 +14,7 @@ import {
13
14
  import { CustomDomain, DOMAIN_BORDER_COLORS, DOMAIN_COLORS } from './pmProgress.constants'
14
15
  import { dynamicCornerRadius, dynamicInnerRadius } from '../components/chart/chart.helpers'
15
16
  import type { PieChartManagerConfig } from '../components/chart/chart.types'
16
- import { getText } from '../../../shared/translation/helpers'
17
- import type { GradeLabelsMap } from './pmProgress.types'
17
+ import { getText } from '../../../i18n/i18n'
18
18
 
19
19
  const groupStandardsByDomain = (
20
20
  standardStats: ProgressMatrixStatsDto[number]['standardStats'],
@@ -171,6 +171,14 @@ type TreeDataReady = {
171
171
  export const isTreeDataReady = (source: TreeDataSource): source is TreeDataReady =>
172
172
  source.tree !== null && source.stats !== null && source.user !== null && source.grade !== null
173
173
 
174
+ type TreeDataWithoutGrade = Omit<TreeDataSource, 'grade'>
175
+ type TreeDataWithoutGradeReady = Omit<TreeDataReady, 'grade'>
176
+
177
+ export const isTreeDataWithoutGradeReady = (
178
+ source: TreeDataWithoutGrade,
179
+ ): source is TreeDataWithoutGradeReady =>
180
+ source.tree !== null && source.stats !== null && source.user !== null
181
+
174
182
  export const createChartConfig = (size: number): PieChartManagerConfig => {
175
183
  const OUTER_MARGIN = 5
176
184
  return {
@@ -261,6 +269,9 @@ export const withoutDuplicates = (skills: (Skill | undefined)[]): Skill[] => {
261
269
  })
262
270
  }
263
271
 
272
+ export const findDomainBySkillId = (skillId: string, domains: Domain[]): Domain | undefined =>
273
+ domains.find((d) => d.standards.some((s) => s.skillIds.includes(skillId)))
274
+
264
275
  // Reorders grades starting from the given grade, wrapping around. [1,2,3] with start=2 → [2,3,1]
265
276
  export const startGradesFrom = (grades: Grade[], startGrade: number): Grade[] => {
266
277
  const index = grades.findIndex(({ value }) => value === startGrade)
@@ -24,7 +24,7 @@ import { useVoiceTranscriptionsDropdown } from '../hooks/useVoiceTranscriptionsD
24
24
  import { VoicePlayerModel, PlayerState } from '../model'
25
25
  import { VoiceTranscriptionsDropdownItem } from './VoiceTranscriptionsDropdownItem'
26
26
  import { DROPDOWN_MAX_CONTENT_HEIGHT, NO_AUDIO_BE_MESSAGE } from '../../constants'
27
- import { useText } from '../../../../shared/translation'
27
+ import { useText } from '../../../../i18n/i18n'
28
28
  import { PlayButton } from '../../../../shared/components/PlayButton'
29
29
  import { getActiveAttempt, getAudioStatus } from '../../helpers'
30
30
 
@@ -12,7 +12,7 @@ import {
12
12
  } from '@magmamath/react-native-ui'
13
13
  import Animated, { runOnJS, useAnimatedReaction } from 'react-native-reanimated'
14
14
  import { useVoiceTranscriptionsDropdownItemAnimation } from '../hooks/useVoiceTranscriptionsDropdownItemAnimation'
15
- import { useText } from '../../../../shared/translation'
15
+ import { useText } from '../../../../i18n/i18n'
16
16
 
17
17
  type VoiceTranscriptionsDropdownItemProps = {
18
18
  attempt: number
@@ -16,8 +16,8 @@ import { Pressable, StyleSheet } from 'react-native'
16
16
  import { VoiceRecordModel } from '../model/VoiceRecord.model'
17
17
  import { useUnit } from 'effector-react'
18
18
  import { VOICE_RECORD_SHADOWS, VoiceRecorderState } from '../../constants'
19
- import { useText } from '../../../../shared/translation'
20
19
  import { RecordButtonVariant } from '../../types'
20
+ import { useText } from '../../../../i18n/i18n'
21
21
 
22
22
  type VoiceRecordButtonProps = {
23
23
  model: VoiceRecordModel
@@ -1,13 +1,12 @@
1
1
  import React from 'react'
2
2
  import { Button, ButtonColor, ButtonSize, ButtonVariant, SPACING } from '@magmamath/react-native-ui'
3
3
  import { StyleSheet, View } from 'react-native'
4
- import { useText } from '../../../../shared/translation'
5
- import { TranslationKeys } from '../../../../shared/translation/types'
4
+ import { TranslationKey, useText } from '../../../../i18n/i18n'
6
5
 
7
6
  type ModalFooterButtonsProps = {
8
7
  onCancel: () => void
9
8
  onConfirm: () => void
10
- confirmLabel: TranslationKeys
9
+ confirmLabel: TranslationKey
11
10
  confirmColor?: ButtonColor
12
11
  }
13
12
 
@@ -3,7 +3,7 @@ import { BaseModal, ButtonColor } from '@magmamath/react-native-ui'
3
3
  import { StyleSheet } from 'react-native'
4
4
  import { useUnit } from 'effector-react'
5
5
  import { VoiceRecorderState } from '../../constants'
6
- import { useText } from '../../../../shared/translation'
6
+ import { useText } from '../../../../i18n/i18n'
7
7
  import { ModalFooterButtons } from './ModalFooterButtons'
8
8
  import { VoiceRecordModalParams } from '../../types'
9
9
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { BaseModal } from '@magmamath/react-native-ui'
3
3
  import { StyleSheet } from 'react-native'
4
- import { useText } from '../../../../shared/translation'
4
+ import { useText } from '../../../../i18n/i18n'
5
5
  import { ModalFooterButtons } from './ModalFooterButtons'
6
6
  import { VoiceRecordModalParams } from '../../types'
7
7
 
@@ -10,7 +10,7 @@ import {
10
10
  } from '../../types'
11
11
  import { ensureRecordingPermissions, getAvailableInputs } from '../../helpers'
12
12
  import { VOICE_RECORDER_MIN_DURATION_MS } from '../../constants'
13
- import { t } from '../../../../shared/translation'
13
+ import { getText as t } from '../../../../i18n/i18n'
14
14
 
15
15
  type VoiceRecordModelParams = {
16
16
  api: VoiceRecorderApi
@@ -1,85 +1,90 @@
1
1
  {
2
- "locale": "en-SE",
3
- "teacherFeedback.noComments": "No comments yet",
4
- "time.justNow": "just now",
5
- "time.minuteAgo": "minute ago",
6
- "time.minutesAgo": "{{count}} minutes ago",
7
- "time.hourAgo": "hour ago",
8
- "time.hoursAgo": "{{count}} hours ago",
9
- "time.dayAgo": "day ago",
10
- "time.daysAgo": "{{count}} days ago",
11
- "time.monthAgo": "month ago",
12
- "time.monthsAgo": "{{count}} months ago",
13
- "time.yearAgo": "year ago",
14
- "time.yearsAgo": "{{count}} years ago",
15
2
  "chat": {
16
3
  "anotherHint": "Give me another hint",
17
- "getHint": "Get a hint",
18
- "needHint": "I need a hint",
19
- "giveHintOpenChat": "I need a hint",
20
4
  "answerAgain": "Answer again to get another hint!",
21
5
  "errorMessage": "Something went wrong! Try again",
6
+ "getHint": "Get a hint",
7
+ "giveHint": "I need a hint",
8
+ "giveHintOpenChat": "I need a hint",
22
9
  "howCanIHelp": "Hi! Do you want help?",
23
- "showError": "Show error",
24
- "inputPlaceholder": "Type..."
25
- },
26
- "gifCelebrations": {
27
- "greatStart": "Great start!",
28
- "onTheWay": "On the way!",
29
- "almostThere": "Almost there"
10
+ "inputPlaceholder": "Type...",
11
+ "needHint": "I need a hint",
12
+ "showError": "Show error"
30
13
  },
31
14
  "exampleSolution": {
32
- "exampleSolution": "Example solution",
33
- "letMeThink": "Let me think...",
34
15
  "aha": "Aha!",
35
- "errorMessage": "Something went wrong with generating an example solution"
16
+ "errorMessage": "Something went wrong with generating an example solution",
17
+ "exampleSolution": "Example solution",
18
+ "letMeThink": "Let me think..."
19
+ },
20
+ "gifCelebrations": {
21
+ "almostThere": "Almost there",
22
+ "greatStart": "Great start!",
23
+ "onTheWay": "On the way!"
36
24
  },
37
25
  "keyboard": {
38
- "length": "Length",
39
26
  "area": "Area",
27
+ "length": "Length",
28
+ "time": "Time",
40
29
  "volume": "Volume",
41
- "weight": "Weight",
42
- "time": "Time"
30
+ "weight": "Weight"
31
+ },
32
+ "locale": "en-SE",
33
+ "pmProgress": {
34
+ "allLockedSubtitle": "Your teacher has locked all grades.\nAsk them to unlock grades so you can start practicing.",
35
+ "allLockedTitle": "All grades are locked",
36
+ "allTime": "All time",
37
+ "andMore": "and '{{'count'}}' more...",
38
+ "fluency": "Fluency",
39
+ "grade": "Grade",
40
+ "gradeK": "K",
41
+ "gradeOther": "Other",
42
+ "initErrorSubtitle": "We couldn't load your progress.\nPlease try again later.",
43
+ "initErrorTitle": "Something went wrong",
44
+ "lastWeek": "Last week",
45
+ "loading": "Loading...",
46
+ "nextUp": "Next up!",
47
+ "practiceButton": "PRACTICE",
48
+ "skillLeft": "skill left",
49
+ "skillsLeft": "skills left",
50
+ "stars": "Practice stars",
51
+ "startButton": "START",
52
+ "teacherRecs": "Teacher recommendations",
53
+ "thisWeek": "This week",
54
+ "time": "Practice time",
55
+ "title": "Practice & Progress"
56
+ },
57
+ "teacherFeedback": {
58
+ "noComments": "No comments yet"
59
+ },
60
+ "time": {
61
+ "dayAgo": "day ago",
62
+ "daysAgo": "{{count}} days ago",
63
+ "hourAgo": "hour ago",
64
+ "hoursAgo": "{{count}} hours ago",
65
+ "justNow": "just now",
66
+ "minuteAgo": "minute ago",
67
+ "minutesAgo": "{{count}} minutes ago",
68
+ "monthAgo": "month ago",
69
+ "monthsAgo": "{{count}} months ago",
70
+ "yearAgo": "year ago",
71
+ "yearsAgo": "{{count}} years ago"
43
72
  },
44
73
  "voice": {
45
- "deleteRecording": "Delete recording?",
46
- "youWontBeAbleToRecover": "You won't be able to recover this file once it's gone.",
47
- "recordingDeleted": "Recording successfully deleted.",
48
- "delete": "Delete",
74
+ "attempt": "Attempt {{ number }}",
49
75
  "cancel": "Cancel",
76
+ "delete": "Delete",
77
+ "deleteRecording": "Delete recording?",
50
78
  "noMicrophoneAccess": "No microphone access.",
51
79
  "noMicrophoneAccessBySystem": "Microphone access denied by system settings.",
52
80
  "noMicrophoneFound": "No microphone found.",
53
- "uploadFailed": "Upload failed. Please try again.",
54
- "redoRecording": "Redo recording?",
81
+ "recordingDeleted": "Recording successfully deleted.",
55
82
  "redo": "Redo",
83
+ "redoRecording": "Redo recording?",
56
84
  "thisWillRemoveRecording": "This will remove your previous recording.",
57
85
  "transcriptions": "Transcriptions",
58
- "attempt": "Attempt {{number}}",
59
- "transcriptNotAvailable": "Transcript not available"
60
- },
61
- "pmProgress": {
62
- "title": "Practice & Progress",
63
- "startButton": "START",
64
- "nextUp": "Next up!",
65
- "teacherRecs": "Teacher recommendations",
66
- "practiceButton": "PRACTICE",
67
- "stars": "Practice stars",
68
- "time": "Practice time",
69
- "thisWeek": "This week",
70
- "lastWeek": "Last week",
71
- "allTime": "All time",
72
- "fluency": "Fluency",
73
- "andMore": "and {{count}} more...",
74
- "skillsLeft": "skills left",
75
- "skillLeft": "skill left",
76
- "grade": "Grade",
77
- "gradeK": "K",
78
- "gradeOther": "Other",
79
- "loading": "Loading...",
80
- "allLockedTitle": "All grades are locked",
81
- "allLockedSubtitle": "Your teacher has locked all grades.\nAsk them to unlock grades so you can start practicing.",
82
- "initErrorTitle": "Something went wrong",
83
- "initErrorSubtitle": "We couldn't load your progress.\nPlease try again later."
86
+ "transcriptNotAvailable": "Transcript not available",
87
+ "uploadFailed": "Upload failed. Please try again.",
88
+ "youWontBeAbleToRecover": "You won't be able to recover this file once it's gone."
84
89
  }
85
- }
90
+ }