@magmamath/students-features 1.8.4 → 1.8.5-rc.1

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 (260) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  2. package/dist/commonjs/features/profile/Profile.js +90 -0
  3. package/dist/commonjs/features/profile/Profile.js.map +1 -0
  4. package/dist/commonjs/features/profile/components/actions/ProfileActions.js +70 -0
  5. package/dist/commonjs/features/profile/components/actions/ProfileActions.js.map +1 -0
  6. package/dist/commonjs/features/profile/components/cards/ProfileCard.js +57 -0
  7. package/dist/commonjs/features/profile/components/cards/ProfileCard.js.map +1 -0
  8. package/dist/commonjs/features/profile/components/info/AccountInfoCard.js +91 -0
  9. package/dist/commonjs/features/profile/components/info/AccountInfoCard.js.map +1 -0
  10. package/dist/commonjs/features/profile/components/modals/JoinClassModal.js +190 -0
  11. package/dist/commonjs/features/profile/components/modals/JoinClassModal.js.map +1 -0
  12. package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js +61 -0
  13. package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +1 -0
  14. package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js +128 -0
  15. package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js.map +1 -0
  16. package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js +22 -0
  17. package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js.map +1 -0
  18. package/dist/commonjs/features/profile/components/settings/PreferencesCard.js +69 -0
  19. package/dist/commonjs/features/profile/components/settings/PreferencesCard.js.map +1 -0
  20. package/dist/commonjs/features/profile/components/settings/SettingRow.js +48 -0
  21. package/dist/commonjs/features/profile/components/settings/SettingRow.js.map +1 -0
  22. package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js +77 -0
  23. package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js.map +1 -0
  24. package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js +119 -0
  25. package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js.map +1 -0
  26. package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js +37 -0
  27. package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js.map +1 -0
  28. package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js +62 -0
  29. package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js.map +1 -0
  30. package/dist/commonjs/features/profile/context/ProfileContext.js +18 -0
  31. package/dist/commonjs/features/profile/context/ProfileContext.js.map +1 -0
  32. package/dist/commonjs/features/profile/index.js +80 -0
  33. package/dist/commonjs/features/profile/index.js.map +1 -0
  34. package/dist/commonjs/features/profile/model/ProfileApi.js +15 -0
  35. package/dist/commonjs/features/profile/model/ProfileApi.js.map +1 -0
  36. package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js +60 -0
  37. package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js.map +1 -0
  38. package/dist/commonjs/features/profile/model/ProfileLanguageModel.js +30 -0
  39. package/dist/commonjs/features/profile/model/ProfileLanguageModel.js.map +1 -0
  40. package/dist/commonjs/features/profile/model/ProfileModel.js +53 -0
  41. package/dist/commonjs/features/profile/model/ProfileModel.js.map +1 -0
  42. package/dist/commonjs/features/profile/model/profileModal.types.js +6 -0
  43. package/dist/commonjs/features/profile/model/profileModal.types.js.map +1 -0
  44. package/dist/commonjs/features/profile/shared/JoinClassError.js +16 -0
  45. package/dist/commonjs/features/profile/shared/JoinClassError.js.map +1 -0
  46. package/dist/commonjs/features/profile/shared/profile.constants.js +29 -0
  47. package/dist/commonjs/features/profile/shared/profile.constants.js.map +1 -0
  48. package/dist/commonjs/features/profile/shared/profile.helpers.js +40 -0
  49. package/dist/commonjs/features/profile/shared/profile.helpers.js.map +1 -0
  50. package/dist/commonjs/features/profile/shared/profile.types.js +6 -0
  51. package/dist/commonjs/features/profile/shared/profile.types.js.map +1 -0
  52. package/dist/commonjs/index.js +12 -0
  53. package/dist/commonjs/index.js.map +1 -1
  54. package/dist/commonjs/shared/hooks/useKeyboardOffset.js +54 -0
  55. package/dist/commonjs/shared/hooks/useKeyboardOffset.js.map +1 -0
  56. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  57. package/dist/module/features/profile/Profile.js +84 -0
  58. package/dist/module/features/profile/Profile.js.map +1 -0
  59. package/dist/module/features/profile/components/actions/ProfileActions.js +64 -0
  60. package/dist/module/features/profile/components/actions/ProfileActions.js.map +1 -0
  61. package/dist/module/features/profile/components/cards/ProfileCard.js +51 -0
  62. package/dist/module/features/profile/components/cards/ProfileCard.js.map +1 -0
  63. package/dist/module/features/profile/components/info/AccountInfoCard.js +85 -0
  64. package/dist/module/features/profile/components/info/AccountInfoCard.js.map +1 -0
  65. package/dist/module/features/profile/components/modals/JoinClassModal.js +183 -0
  66. package/dist/module/features/profile/components/modals/JoinClassModal.js.map +1 -0
  67. package/dist/module/features/profile/components/modals/LogoutConfirmModal.js +55 -0
  68. package/dist/module/features/profile/components/modals/LogoutConfirmModal.js.map +1 -0
  69. package/dist/module/features/profile/components/modals/TranslationLanguageModal.js +122 -0
  70. package/dist/module/features/profile/components/modals/TranslationLanguageModal.js.map +1 -0
  71. package/dist/module/features/profile/components/settings/LanguageSettingsCard.js +16 -0
  72. package/dist/module/features/profile/components/settings/LanguageSettingsCard.js.map +1 -0
  73. package/dist/module/features/profile/components/settings/PreferencesCard.js +63 -0
  74. package/dist/module/features/profile/components/settings/PreferencesCard.js.map +1 -0
  75. package/dist/module/features/profile/components/settings/SettingRow.js +42 -0
  76. package/dist/module/features/profile/components/settings/SettingRow.js.map +1 -0
  77. package/dist/module/features/profile/components/settings/TextSettingsCard.js +71 -0
  78. package/dist/module/features/profile/components/settings/TextSettingsCard.js.map +1 -0
  79. package/dist/module/features/profile/components/settings/TextSizeSlider.js +112 -0
  80. package/dist/module/features/profile/components/settings/TextSizeSlider.js.map +1 -0
  81. package/dist/module/features/profile/components/settings/TextToSpeechRow.js +31 -0
  82. package/dist/module/features/profile/components/settings/TextToSpeechRow.js.map +1 -0
  83. package/dist/module/features/profile/components/settings/TranslationLanguageRow.js +56 -0
  84. package/dist/module/features/profile/components/settings/TranslationLanguageRow.js.map +1 -0
  85. package/dist/module/features/profile/context/ProfileContext.js +13 -0
  86. package/dist/module/features/profile/context/ProfileContext.js.map +1 -0
  87. package/dist/module/features/profile/index.js +11 -0
  88. package/dist/module/features/profile/index.js.map +1 -0
  89. package/dist/module/features/profile/model/ProfileApi.js +10 -0
  90. package/dist/module/features/profile/model/ProfileApi.js.map +1 -0
  91. package/dist/module/features/profile/model/ProfileJoinClassModel.js +55 -0
  92. package/dist/module/features/profile/model/ProfileJoinClassModel.js.map +1 -0
  93. package/dist/module/features/profile/model/ProfileLanguageModel.js +25 -0
  94. package/dist/module/features/profile/model/ProfileLanguageModel.js.map +1 -0
  95. package/dist/module/features/profile/model/ProfileModel.js +48 -0
  96. package/dist/module/features/profile/model/ProfileModel.js.map +1 -0
  97. package/dist/module/features/profile/model/profileModal.types.js +4 -0
  98. package/dist/module/features/profile/model/profileModal.types.js.map +1 -0
  99. package/dist/module/features/profile/shared/JoinClassError.js +11 -0
  100. package/dist/module/features/profile/shared/JoinClassError.js.map +1 -0
  101. package/dist/module/features/profile/shared/profile.constants.js +25 -0
  102. package/dist/module/features/profile/shared/profile.constants.js.map +1 -0
  103. package/dist/module/features/profile/shared/profile.helpers.js +32 -0
  104. package/dist/module/features/profile/shared/profile.helpers.js.map +1 -0
  105. package/dist/module/features/profile/shared/profile.types.js +4 -0
  106. package/dist/module/features/profile/shared/profile.types.js.map +1 -0
  107. package/dist/module/index.js +1 -0
  108. package/dist/module/index.js.map +1 -1
  109. package/dist/module/shared/hooks/useKeyboardOffset.js +49 -0
  110. package/dist/module/shared/hooks/useKeyboardOffset.js.map +1 -0
  111. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
  112. package/dist/typescript/commonjs/features/profile/Profile.d.ts +6 -0
  113. package/dist/typescript/commonjs/features/profile/Profile.d.ts.map +1 -0
  114. package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts +2 -0
  115. package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts.map +1 -0
  116. package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts +2 -0
  117. package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts.map +1 -0
  118. package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts +3 -0
  119. package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts.map +1 -0
  120. package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts +10 -0
  121. package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts.map +1 -0
  122. package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts +3 -0
  123. package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts.map +1 -0
  124. package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts +4 -0
  125. package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts.map +1 -0
  126. package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts +4 -0
  127. package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map +1 -0
  128. package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts +4 -0
  129. package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts.map +1 -0
  130. package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts +3 -0
  131. package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts.map +1 -0
  132. package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts +3 -0
  133. package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts.map +1 -0
  134. package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts +11 -0
  135. package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts.map +1 -0
  136. package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts +3 -0
  137. package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts.map +1 -0
  138. package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts +8 -0
  139. package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts.map +1 -0
  140. package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts +3 -0
  141. package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts.map +1 -0
  142. package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts +3 -0
  143. package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts.map +1 -0
  144. package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts +13 -0
  145. package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts.map +1 -0
  146. package/dist/typescript/commonjs/features/profile/index.d.ts +12 -0
  147. package/dist/typescript/commonjs/features/profile/index.d.ts.map +1 -0
  148. package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts +11 -0
  149. package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts.map +1 -0
  150. package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts +14 -0
  151. package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts.map +1 -0
  152. package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts +13 -0
  153. package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts.map +1 -0
  154. package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts +26 -0
  155. package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts.map +1 -0
  156. package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +14 -0
  157. package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +1 -0
  158. package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts +5 -0
  159. package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts.map +1 -0
  160. package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts +20 -0
  161. package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts.map +1 -0
  162. package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts +6 -0
  163. package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts.map +1 -0
  164. package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts +27 -0
  165. package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts.map +1 -0
  166. package/dist/typescript/commonjs/index.d.ts +1 -0
  167. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/shared/hooks/useKeyboardOffset.d.ts +11 -0
  169. package/dist/typescript/commonjs/shared/hooks/useKeyboardOffset.d.ts.map +1 -0
  170. package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
  171. package/dist/typescript/module/features/profile/Profile.d.ts +6 -0
  172. package/dist/typescript/module/features/profile/Profile.d.ts.map +1 -0
  173. package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts +2 -0
  174. package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts.map +1 -0
  175. package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts +2 -0
  176. package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts.map +1 -0
  177. package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts +3 -0
  178. package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts.map +1 -0
  179. package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts +10 -0
  180. package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts.map +1 -0
  181. package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts +3 -0
  182. package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts.map +1 -0
  183. package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts +4 -0
  184. package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts.map +1 -0
  185. package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts +4 -0
  186. package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts.map +1 -0
  187. package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts +4 -0
  188. package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts.map +1 -0
  189. package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts +3 -0
  190. package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts.map +1 -0
  191. package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts +3 -0
  192. package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts.map +1 -0
  193. package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts +11 -0
  194. package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts.map +1 -0
  195. package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts +3 -0
  196. package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts.map +1 -0
  197. package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts +8 -0
  198. package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts.map +1 -0
  199. package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts +3 -0
  200. package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts.map +1 -0
  201. package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts +3 -0
  202. package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts.map +1 -0
  203. package/dist/typescript/module/features/profile/context/ProfileContext.d.ts +13 -0
  204. package/dist/typescript/module/features/profile/context/ProfileContext.d.ts.map +1 -0
  205. package/dist/typescript/module/features/profile/index.d.ts +12 -0
  206. package/dist/typescript/module/features/profile/index.d.ts.map +1 -0
  207. package/dist/typescript/module/features/profile/model/ProfileApi.d.ts +11 -0
  208. package/dist/typescript/module/features/profile/model/ProfileApi.d.ts.map +1 -0
  209. package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts +14 -0
  210. package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts.map +1 -0
  211. package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts +13 -0
  212. package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts.map +1 -0
  213. package/dist/typescript/module/features/profile/model/ProfileModel.d.ts +26 -0
  214. package/dist/typescript/module/features/profile/model/ProfileModel.d.ts.map +1 -0
  215. package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +14 -0
  216. package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +1 -0
  217. package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts +5 -0
  218. package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts.map +1 -0
  219. package/dist/typescript/module/features/profile/shared/profile.constants.d.ts +20 -0
  220. package/dist/typescript/module/features/profile/shared/profile.constants.d.ts.map +1 -0
  221. package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts +6 -0
  222. package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts.map +1 -0
  223. package/dist/typescript/module/features/profile/shared/profile.types.d.ts +27 -0
  224. package/dist/typescript/module/features/profile/shared/profile.types.d.ts.map +1 -0
  225. package/dist/typescript/module/index.d.ts +1 -0
  226. package/dist/typescript/module/index.d.ts.map +1 -1
  227. package/dist/typescript/module/shared/hooks/useKeyboardOffset.d.ts +11 -0
  228. package/dist/typescript/module/shared/hooks/useKeyboardOffset.d.ts.map +1 -0
  229. package/package.json +4 -2
  230. package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +0 -1
  231. package/src/features/profile/Profile.tsx +83 -0
  232. package/src/features/profile/__tests__/ProfileModel.test.ts +99 -0
  233. package/src/features/profile/__tests__/profile.helpers.test.ts +57 -0
  234. package/src/features/profile/components/actions/ProfileActions.tsx +68 -0
  235. package/src/features/profile/components/cards/ProfileCard.tsx +53 -0
  236. package/src/features/profile/components/info/AccountInfoCard.tsx +74 -0
  237. package/src/features/profile/components/modals/JoinClassModal.tsx +180 -0
  238. package/src/features/profile/components/modals/LogoutConfirmModal.tsx +64 -0
  239. package/src/features/profile/components/modals/TranslationLanguageModal.tsx +126 -0
  240. package/src/features/profile/components/settings/LanguageSettingsCard.tsx +16 -0
  241. package/src/features/profile/components/settings/PreferencesCard.tsx +67 -0
  242. package/src/features/profile/components/settings/SettingRow.tsx +42 -0
  243. package/src/features/profile/components/settings/TextSettingsCard.tsx +64 -0
  244. package/src/features/profile/components/settings/TextSizeSlider.tsx +117 -0
  245. package/src/features/profile/components/settings/TextToSpeechRow.tsx +29 -0
  246. package/src/features/profile/components/settings/TranslationLanguageRow.tsx +60 -0
  247. package/src/features/profile/context/ProfileContext.tsx +24 -0
  248. package/src/features/profile/index.ts +11 -0
  249. package/src/features/profile/model/ProfileApi.ts +23 -0
  250. package/src/features/profile/model/ProfileJoinClassModel.ts +58 -0
  251. package/src/features/profile/model/ProfileLanguageModel.ts +26 -0
  252. package/src/features/profile/model/ProfileModel.ts +57 -0
  253. package/src/features/profile/model/profileModal.types.ts +16 -0
  254. package/src/features/profile/shared/JoinClassError.ts +7 -0
  255. package/src/features/profile/shared/profile.constants.ts +23 -0
  256. package/src/features/profile/shared/profile.helpers.ts +36 -0
  257. package/src/features/profile/shared/profile.types.ts +34 -0
  258. package/src/i18n/.generated/schema.json +9 -1
  259. package/src/index.ts +1 -0
  260. package/src/shared/hooks/useKeyboardOffset.ts +57 -0
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","useState","Animated","useAnimatedStyle","useSharedValue","withTiming","Platform","StyleSheet","TextInput","COLORS","FONT_FAMILY","IS_WEB","SPACING","ColorScheme","useKeyBoard","KeyboardKeys","SendMessageButton","TEST_IDS","jsx","_jsx","jsxs","_jsxs","MAX_AVAILABLE_MESSAGE_LENGTH","COMPACT_WIDTH","FULL_WIDTH","ANIMATION_DURATION","ChatTextInput","value","submitDisabled","onSubmit","onChangeText","onBlur","onFocus","colorScheme","Blue","placeholder","inputRef","isFocused","setIsFocused","widthSv","animatedStyle","width","handleInputChange","text","length","hasText","trim","isExpanded","shouldCollapseInput","shouldExpandInput","duration","handleSendMessage","current","focus","handleOnFocus","e","handleOnBlur","enabled","callback","event","key","ENTER","View","style","styles","inputWrapper","children","ref","placeholderTextColor","NEUTRAL_5","input","testID","OPEN_CHAT_TEXT_INPUT","onPress","disabled","create","container","position","alignItems","justifyContent","height","zIndex","left","flexDirection","borderWidth","borderColor","borderRadius","backgroundColor","NEUTRAL_1","paddingHorizontal","paddingVertical","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","flex","fontSize","minWidth","minHeight","fontWeight","fontFamily","buenosAires","OS","outlineStyle","arrowWrapper","marginLeft"],"sourceRoot":"../../../../../../../src","sources":["features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAChG,SAEEC,QAAQ,EACRC,UAAU,EACVC,SAAS,QAEJ,cAAc;AACrB,SAASC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAEjF,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,4CAAyC;AACrE,SAASC,YAAY,QAAQ,iCAA8B;AAE3D,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,QAAQ,QAAQ,wBAAwB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjD,MAAMC,4BAA4B,GAAG,GAAG;AACxC,MAA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AAC;IAC7B,IAAIN,QAAQ,CAACiG,EAAE,KAAK,KAAK,IAAI;MAAEC,YAAY,EAAE;IAAO,CAAC;EACvD,CAAC;EACDC,YAAY,EAAE;IACZC,UAAU,EAAE9F,OAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useRef","useState","Animated","useAnimatedStyle","useSharedValue","withTiming","Platform","StyleSheet","TextInput","COLORS","FONT_FAMILY","IS_WEB","SPACING","ColorScheme","useKeyBoard","KeyboardKeys","SendMessageButton","TEST_IDS","jsx","_jsx","jsxs","_jsxs","MAX_AVAILABLE_MESSAGE_LENGTH","COMPACT_WIDTH","FULL_WIDTH","ANIMATION_DURATION","ChatTextInput","value","submitDisabled","onSubmit","onChangeText","onBlur","onFocus","colorScheme","Blue","placeholder","inputRef","isFocused","setIsFocused","widthSv","animatedStyle","width","handleInputChange","text","length","hasText","trim","isExpanded","shouldCollapseInput","shouldExpandInput","duration","handleSendMessage","current","focus","handleOnFocus","e","handleOnBlur","enabled","callback","event","key","ENTER","View","style","styles","inputWrapper","children","ref","placeholderTextColor","NEUTRAL_5","input","testID","OPEN_CHAT_TEXT_INPUT","onPress","disabled","create","container","position","alignItems","justifyContent","height","zIndex","left","flexDirection","borderWidth","borderColor","borderRadius","backgroundColor","NEUTRAL_1","paddingHorizontal","paddingVertical","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","flex","fontSize","minWidth","minHeight","fontWeight","fontFamily","buenosAires","OS","outlineStyle","arrowWrapper","marginLeft"],"sourceRoot":"../../../../../../../src","sources":["features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAChG,SAEEC,QAAQ,EACRC,UAAU,EACVC,SAAS,QAEJ,cAAc;AACr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E;IAAE,CAAC;IACrCc,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;EAChB,CAAC;EACDzB,KAAK,EAAE;IACL0B,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,EAAE;IACZC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE3F,WAAW,CAAC4F,WAAW;IACnCb,iBAAiB,EAAE7E,OAAO,CAAC,GAAG,CAAC;IAC/B8E,eAAe,EAAE9E,OAAO,CAAC,GAAG,CAAC;IAC7B,IAAIN,QAAQ,CAACiG,EAAE,KAAK,KAAK,IAAI;MAAEC,YAAY,EAAE;IAAO,CAAC;EACvD,CAAC;EACDC,YAAY,EAAE;IACZC,UAAU,EAAE9F,OAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { ScrollView, StyleSheet, useWindowDimensions, View } from 'react-native';
5
+ import { COLORS, SPACING } from '@magmamath/react-native-ui';
6
+ import { isWeb } from "../../shared/common.constants.js";
7
+ import { ProfileActions } from "./components/actions/ProfileActions.js";
8
+ import { AccountInfoCard } from "./components/info/AccountInfoCard.js";
9
+ import { LanguageSettingsCard } from "./components/settings/LanguageSettingsCard.js";
10
+ import { PreferencesCard } from "./components/settings/PreferencesCard.js";
11
+ import { TextSettingsCard } from "./components/settings/TextSettingsCard.js";
12
+ import { ProfileProvider } from "./context/ProfileContext.js";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ const TWO_COLUMN_BREAKPOINT = 768;
15
+ const COLUMN_MAX_WIDTH = 560;
16
+ export const Profile = props => {
17
+ const {
18
+ showSolveMode,
19
+ versionInfo
20
+ } = props;
21
+ const {
22
+ width
23
+ } = useWindowDimensions();
24
+ const isTwoColumn = width >= TWO_COLUMN_BREAKPOINT;
25
+ return /*#__PURE__*/_jsx(ProfileProvider, {
26
+ value: props,
27
+ children: /*#__PURE__*/_jsxs(ScrollView, {
28
+ style: styles.container,
29
+ contentContainerStyle: styles.scroll,
30
+ scrollEnabled: isWeb,
31
+ showsVerticalScrollIndicator: isWeb,
32
+ children: [/*#__PURE__*/_jsxs(View, {
33
+ style: [styles.columns, !isTwoColumn && styles.columnsStacked],
34
+ children: [/*#__PURE__*/_jsxs(View, {
35
+ style: [styles.column, isTwoColumn ? styles.columnWide : styles.columnStacked],
36
+ children: [/*#__PURE__*/_jsx(LanguageSettingsCard, {}), /*#__PURE__*/_jsx(TextSettingsCard, {})]
37
+ }), /*#__PURE__*/_jsxs(View, {
38
+ style: [styles.column, isTwoColumn ? styles.columnWide : styles.columnStacked],
39
+ children: [showSolveMode && /*#__PURE__*/_jsx(PreferencesCard, {}), /*#__PURE__*/_jsx(AccountInfoCard, {})]
40
+ })]
41
+ }), /*#__PURE__*/_jsx(ProfileActions, {}), versionInfo ? /*#__PURE__*/_jsx(View, {
42
+ style: styles.version,
43
+ children: versionInfo
44
+ }) : null]
45
+ })
46
+ });
47
+ };
48
+ const styles = StyleSheet.create({
49
+ container: {
50
+ backgroundColor: COLORS.NEUTRAL_3,
51
+ flex: 1
52
+ },
53
+ scroll: {
54
+ flexGrow: 1,
55
+ gap: SPACING['800'],
56
+ paddingHorizontal: SPACING['800'],
57
+ paddingVertical: SPACING['600']
58
+ },
59
+ columns: {
60
+ flexDirection: 'row',
61
+ gap: SPACING['600'],
62
+ justifyContent: 'center',
63
+ width: '100%'
64
+ },
65
+ columnsStacked: {
66
+ alignItems: 'center',
67
+ flexDirection: 'column'
68
+ },
69
+ column: {
70
+ gap: SPACING['600'],
71
+ maxWidth: COLUMN_MAX_WIDTH
72
+ },
73
+ columnWide: {
74
+ flex: 1
75
+ },
76
+ columnStacked: {
77
+ width: '100%'
78
+ },
79
+ version: {
80
+ alignSelf: 'flex-end',
81
+ marginTop: 'auto'
82
+ }
83
+ });
84
+ //# sourceMappingURL=Profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ScrollView","StyleSheet","useWindowDimensions","View","COLORS","SPACING","isWeb","ProfileActions","AccountInfoCard","LanguageSettingsCard","PreferencesCard","TextSettingsCard","ProfileProvider","jsx","_jsx","jsxs","_jsxs","TWO_COLUMN_BREAKPOINT","COLUMN_MAX_WIDTH","Profile","props","showSolveMode","versionInfo","width","isTwoColumn","value","children","style","styles","container","contentContainerStyle","scroll","scrollEnabled","showsVerticalScrollIndicator","columns","columnsStacked","column","columnWide","columnStacked","version","create","backgroundColor","NEUTRAL_3","flex","flexGrow","gap","paddingHorizontal","paddingVertical","flexDirection","justifyContent","alignItems","maxWidth","alignSelf","marginTop"],"sourceRoot":"../../../../src","sources":["features/profile/Profile.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAChF,SAASC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAE5D,SAASC,KAAK,QAAQ,kCAA+B;AACrD,SAASC,cAAc,QAAQ,wCAAqC;AACpE,SAASC,eAAe,QAAQ,sCAAmC;AACnE,SAASC,oBAAoB,QAAQ,+CAA4C;AACjF,SAASC,eAAe,QAAQ,0CAAuC;AACvE,SAASC,gBAAgB,QAAQ,2CAAwC;AACzE,SAASC,eAAe,QAAkC,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAIpF,MAAMC,qBAAqB,GAAG,GAAG;AACjC,MAAMC,gBAAgB,GAAG,GAAG;AAE5B,OAAO,MAAMC,OAAO,GAAIC,KAAmB,IAAK;EAC9C,MAAM;IAAEC,aAAa;IAAEC;EAAY,CAAC,GAAGF,KAAK;EAC5C,MAAM;IAAEG;EAAM,CAAC,GAAGrB,mBAAmB,CAAC,CAAC;EACvC,MAAMsB,WAAW,GAAGD,KAAK,IAAIN,qBAAqB;EAElD,oBACEH,IAAA,C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AAE;EACR,CAAC;EACDZ,MAAM,EAAE;IACNa,QAAQ,EAAE,CAAC;IACXC,GAAG,EAAExC,OAAO,CAAC,KAAK,CAAC;IACnByC,iBAAiB,EAAEzC,OAAO,CAAC,KAAK,CAAC;IACjC0C,eAAe,EAAE1C,OAAO,CAAC,KAAK;EAChC,CAAC;EACD6B,OAAO,EAAE;IACPc,aAAa,EAAE,KAAK;IACpBH,GAAG,EAAExC,OAAO,CAAC,KAAK,CAAC;IACnB4C,cAAc,EAAE,QAAQ;IACxB1B,KAAK,EAAE;EACT,CAAC;EACDY,cAAc,EAAE;IACde,UAAU,EAAE,QAAQ;IACpBF,aAAa,EAAE;EACjB,CAAC;EACDZ,MAAM,EAAE;IACNS,GAAG,EAAExC,OAAO,CAAC,KAAK,CAAC;IACnB8C,QAAQ,EAAEjC;EACZ,CAAC;EACDmB,UAAU,EAAE;IACVM,IAAI,EAAE;EACR,CAAC;EACDL,aAAa,EAAE;IACbf,KAAK,EAAE;EACT,CAAC;EACDgB,OAAO,EAAE;IACPa,SAAS,EAAE,UAAU;IACrBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import { ButtonColor, ButtonSize, ButtonVariant, ReanimatedButton, SPACING } from '@magmamath/react-native-ui';
6
+ import { TEST_IDS } from '@magmamath/students-qa';
7
+ import { useText } from "../../../../i18n/i18n.js";
8
+ import { useProfile } from "../../context/ProfileContext.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ export const ProfileActions = () => {
11
+ const t = useText();
12
+ const {
13
+ onLogout,
14
+ onOpenJoinClass
15
+ } = useProfile();
16
+ return /*#__PURE__*/_jsxs(View, {
17
+ style: styles.container,
18
+ children: [/*#__PURE__*/_jsx(View, {
19
+ style: styles.leftHalf,
20
+ children: /*#__PURE__*/_jsx(ReanimatedButton, {
21
+ variant: ButtonVariant.SECONDARY,
22
+ colorScheme: ButtonColor.WHITE,
23
+ size: ButtonSize.LARGE,
24
+ onPress: onOpenJoinClass,
25
+ testID: TEST_IDS.JOIN_NEW_CLASS_BUTTON,
26
+ style: buttonStyle,
27
+ children: t('profile.joinNewClass')
28
+ })
29
+ }), /*#__PURE__*/_jsx(View, {
30
+ style: styles.rightHalf,
31
+ children: /*#__PURE__*/_jsx(ReanimatedButton, {
32
+ variant: ButtonVariant.PRIMARY,
33
+ colorScheme: ButtonColor.ORANGE,
34
+ size: ButtonSize.LARGE,
35
+ onPress: onLogout,
36
+ testID: TEST_IDS.LOGOUT_BUTTON,
37
+ style: buttonStyle,
38
+ children: t('profile.logOut')
39
+ })
40
+ })]
41
+ });
42
+ };
43
+ const styles = StyleSheet.create({
44
+ container: {
45
+ flexDirection: 'row',
46
+ gap: SPACING['600'],
47
+ width: '100%'
48
+ },
49
+ leftHalf: {
50
+ alignItems: 'flex-end',
51
+ flex: 1
52
+ },
53
+ rightHalf: {
54
+ alignItems: 'flex-start',
55
+ flex: 1
56
+ },
57
+ text: {
58
+ textTransform: 'uppercase'
59
+ }
60
+ });
61
+ const buttonStyle = {
62
+ text: styles.text
63
+ };
64
+ //# sourceMappingURL=ProfileActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","View","ButtonColor","ButtonSize","ButtonVariant","ReanimatedButton","SPACING","TEST_IDS","useText","useProfile","jsx","_jsx","jsxs","_jsxs","ProfileActions","t","onLogout","onOpenJoinClass","style","styles","container","children","leftHalf","variant","SECONDARY","colorScheme","WHITE","size","LARGE","onPress","testID","JOIN_NEW_CLASS_BUTTON","buttonStyle","rightHalf","PRIMARY","ORANGE","LOGOUT_BUTTON","create","flexDirection","gap","width","alignItems","flex","text","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/actions/ProfileActions.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,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,WAAY;QAAAX,QAAA,EAElBN,CAAC,CAAC,gBAAgB;MAAC,CACJ;IAAC,CACf,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGnB,UAAU,CAACqC,MAAM,CAAC;EAC/BjB,SAAS,EAAE;IACTkB,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAEjC,OAAO,CAAC,KAAK,CAAC;IACnBkC,KAAK,EAAE;EACT,CAAC;EACDlB,QAAQ,EAAE;IACRmB,UAAU,EAAE,UAAU;IACtBC,IAAI,EAAE;EACR,CAAC;EACDT,SAAS,EAAE;IACTQ,UAAU,EAAE,YAAY;IACxBC,IAAI,EAAE;EACR,CAAC;EACDC,IAAI,EAAE;IACJC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMZ,WAAW,GAAG;EAAEW,IAAI,EAAExB,MAAM,CAACwB;AAAK,CAAC","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import { BORDER_RADIUS, COLORS, HeadingVariants, SHADOWS, SPACING, Typography } from '@magmamath/react-native-ui';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export const ProfileCard = ({
8
+ title,
9
+ children,
10
+ style
11
+ }) => /*#__PURE__*/_jsxs(View, {
12
+ style: [styles.card, style],
13
+ children: [/*#__PURE__*/_jsx(View, {
14
+ style: styles.header,
15
+ children: /*#__PURE__*/_jsx(Typography, {
16
+ variant: HeadingVariants.H9,
17
+ style: styles.title,
18
+ children: title
19
+ })
20
+ }), /*#__PURE__*/_jsx(View, {
21
+ style: styles.divider
22
+ }), /*#__PURE__*/_jsx(View, {
23
+ style: styles.body,
24
+ children: children
25
+ })]
26
+ });
27
+ const styles = StyleSheet.create({
28
+ card: {
29
+ backgroundColor: COLORS.NEUTRAL_1,
30
+ borderRadius: BORDER_RADIUS['400'],
31
+ padding: SPACING['400'],
32
+ ...SHADOWS['1']
33
+ },
34
+ header: {
35
+ paddingLeft: SPACING['200']
36
+ },
37
+ title: {
38
+ color: COLORS.NEUTRAL_7
39
+ },
40
+ divider: {
41
+ backgroundColor: COLORS.NEUTRAL_3,
42
+ height: 1,
43
+ marginHorizontal: SPACING['100'],
44
+ marginVertical: SPACING['200']
45
+ },
46
+ body: {
47
+ gap: SPACING['400'],
48
+ justifyContent: 'center'
49
+ }
50
+ });
51
+ //# sourceMappingURL=ProfileCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","View","BORDER_RADIUS","COLORS","HeadingVariants","SHADOWS","SPACING","Typography","jsx","_jsx","jsxs","_jsxs","ProfileCard","title","children","style","styles","card","header","variant","H9","divider","body","create","backgroundColor","NEUTRAL_1","borderRadius","padding","paddingLeft","color","NEUTRAL_7","NEUTRAL_3","height","marginHorizontal","marginVertical","gap","justifyContent"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/cards/ProfileCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,SACEC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,OAAO,EACPC,OAAO,EACPC,UAAU,QACL,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQnC,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAwB,CAAC,kBACtEJ,KAAA,CAACV,IAAI;EAACc,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEF,KAAK,CAAE;EAAAD,QAAA,gBAChCL,IAAA,CAACR,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACE,MAAO;IAAAJ,QAAA,eACzBL,IAAA,CAACF,UAAU;MAACY,OAAO,EAAEf,eAAe,CAACgB,EAAG;MAACL,KAAK,EAAEC,MAAM,CAACH,KAAM;MAAAC,QAAA,EAC1DD;IAAK,CACI;EAAC,CACT,CAAC,eACPJ,IAAA,CAACR,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACK;EAAQ,CAAE,CAAC,eAC/BZ,IAAA,CAACR,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACM,IAAK;IAAAR,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAAA,CACvC,CACP;AAED,MAAME,MAAM,GAAGhB,UAAU,CAACuB,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJO,eAAe,EAAErB,MAAM,CAACsB,SAAS;IACjCC,YAAY,EAAExB,aAAa,CAAC,KAAK,CAAC;IAClCyB,OAAO,EAAErB,OAAO,CAAC,KAAK,CAAC;IACvB,GAAGD,OAAO,CAAC,GAAG;EAChB,CAAC;EACDa,MAAM,EAAE;IACNU,WAAW,EAAEtB,OAAO,CAAC,KAAK;EAC5B,CAAC;EACDO,KAAK,EAAE;IACLgB,KAAK,EAAE1B,MAAM,CAAC2B;EAChB,CAAC;EACDT,OAAO,EAAE;IACPG,eAAe,EAAErB,MAAM,CAAC4B,SAAS;IACjCC,MAAM,EAAE,CAAC;IACTC,gBAAgB,EAAE3B,OAAO,CAAC,KAAK,CAAC;IAChC4B,cAAc,EAAE5B,OAAO,CAAC,KAAK;EAC/B,CAAC;EACDgB,IAAI,EAAE;IACJa,GAAG,EAAE7B,OAAO,CAAC,KAAK,CAAC;IACnB8B,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { useUnit } from 'effector-react';
5
+ import { StyleSheet, View } from 'react-native';
6
+ import { COLORS, HeadingVariants, InfoIcon, SPACING, Typography } from '@magmamath/react-native-ui';
7
+ import { useText } from "../../../../i18n/i18n.js";
8
+ import { useProfile } from "../../context/ProfileContext.js";
9
+ import { ProfileCard } from "../cards/ProfileCard.js";
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const NOTE_ICON_SIZE = 20;
12
+ const InfoField = ({
13
+ label,
14
+ value
15
+ }) => /*#__PURE__*/_jsxs(View, {
16
+ style: styles.field,
17
+ children: [/*#__PURE__*/_jsx(Typography, {
18
+ variant: HeadingVariants.H8,
19
+ style: styles.label,
20
+ children: label
21
+ }), /*#__PURE__*/_jsx(Typography, {
22
+ variant: HeadingVariants.H6,
23
+ style: styles.value,
24
+ children: value
25
+ })]
26
+ });
27
+ export const AccountInfoCard = () => {
28
+ const t = useText();
29
+ const {
30
+ model
31
+ } = useProfile();
32
+ const user = useUnit(model.$user);
33
+ return /*#__PURE__*/_jsxs(ProfileCard, {
34
+ title: t('profile.accountInfo'),
35
+ children: [/*#__PURE__*/_jsx(InfoField, {
36
+ label: t('profile.fullName'),
37
+ value: user?.fullName ?? ''
38
+ }), /*#__PURE__*/_jsx(InfoField, {
39
+ label: t('profile.username'),
40
+ value: user?.username ?? ''
41
+ }), /*#__PURE__*/_jsx(InfoField, {
42
+ label: t('profile.school'),
43
+ value: user?.schoolName ?? ''
44
+ }), /*#__PURE__*/_jsx(View, {
45
+ style: styles.noteDivider
46
+ }), /*#__PURE__*/_jsxs(View, {
47
+ style: styles.note,
48
+ children: [/*#__PURE__*/_jsx(InfoIcon, {
49
+ size: NOTE_ICON_SIZE,
50
+ color: COLORS.NEUTRAL_7
51
+ }), /*#__PURE__*/_jsx(Typography, {
52
+ variant: HeadingVariants.H8,
53
+ style: styles.noteText,
54
+ children: t('profile.changePasswordNote')
55
+ })]
56
+ })]
57
+ });
58
+ };
59
+ const styles = StyleSheet.create({
60
+ field: {
61
+ gap: SPACING['100'],
62
+ paddingHorizontal: SPACING['100']
63
+ },
64
+ label: {
65
+ color: COLORS.NEUTRAL_7
66
+ },
67
+ value: {
68
+ color: COLORS.NEUTRAL_9
69
+ },
70
+ noteDivider: {
71
+ backgroundColor: COLORS.NEUTRAL_3,
72
+ height: 1,
73
+ marginHorizontal: SPACING['100']
74
+ },
75
+ note: {
76
+ alignItems: 'center',
77
+ flexDirection: 'row',
78
+ gap: SPACING['200']
79
+ },
80
+ noteText: {
81
+ color: COLORS.NEUTRAL_7,
82
+ flexShrink: 1
83
+ }
84
+ });
85
+ //# sourceMappingURL=AccountInfoCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useUnit","StyleSheet","View","COLORS","HeadingVariants","InfoIcon","SPACING","Typography","useText","useProfile","ProfileCard","jsx","_jsx","jsxs","_jsxs","NOTE_ICON_SIZE","InfoField","label","value","style","styles","field","children","variant","H8","H6","AccountInfoCard","t","model","user","$user","title","fullName","username","schoolName","noteDivider","note","size","color","NEUTRAL_7","noteText","create","gap","paddingHorizontal","NEUTRAL_9","backgroundColor","NEUTRAL_3","height","marginHorizontal","alignItems","flexDirection","flexShrink"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/info/AccountInfoCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AAEnG,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,WAAW,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,MAAMC,cAAc,GAAG,EAAE;AAOzB,MAAMC,SAAS,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAsB,CAAC,kBACjDJ,KAAA,CAACZ,IAAI;EAACiB,KAAK,EAAEC,MAAM,CAACC,KAAM;EAAAC,QAAA,gBACxBV,IAAA,CAACL,UAAU;IAACgB,OAAO,EAAEnB,eAAe,CAACoB,EAAG;IAACL,KAAK,EAAEC,MAAM,CAACH,KAAM;IAAAK,QAAA,EAC1DL;EAAK,CACI,CAAC,eACb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M,CAACoB,QAAS;QAAAlB,QAAA,EAC7DK,CAAC,CAAC,4BAA4B;MAAC,CACtB,CAAC;IAAA,CACT,CAAC;EAAA,CACI,CAAC;AAElB,CAAC;AAED,MAAMP,MAAM,GAAGnB,UAAU,CAACwC,MAAM,CAAC;EAC/BpB,KAAK,EAAE;IACLqB,GAAG,EAAEpC,OAAO,CAAC,KAAK,CAAC;IACnBqC,iBAAiB,EAAErC,OAAO,CAAC,KAAK;EAClC,CAAC;EACDW,KAAK,EAAE;IACLqB,KAAK,EAAEnC,MAAM,CAACoC;EAChB,CAAC;EACDrB,KAAK,EAAE;IACLoB,KAAK,EAAEnC,MAAM,CAACyC;EAChB,CAAC;EACDT,WAAW,EAAE;IACXU,eAAe,EAAE1C,MAAM,CAAC2C,SAAS;IACjCC,MAAM,EAAE,CAAC;IACTC,gBAAgB,EAAE1C,OAAO,CAAC,KAAK;EACjC,CAAC;EACD8B,IAAI,EAAE;IACJa,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBR,GAAG,EAAEpC,OAAO,CAAC,KAAK;EACpB,CAAC;EACDkC,QAAQ,EAAE;IACRF,KAAK,EAAEnC,MAAM,CAACoC,SAAS;IACvBY,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect, useMemo } from 'react';
4
+ import { Animated, StyleSheet, Text, useWindowDimensions, View } from 'react-native';
5
+ import { useUnit } from 'effector-react';
6
+ import { CodeField, Cursor, useClearByFocusCell } from 'react-native-confirmation-code-field';
7
+ import { BaseModal, Button, ButtonColor, ButtonSize, ButtonVariant, COLORS, CrossIcon, FONT_FAMILY, ReanimatedButton, SPACING } from '@magmamath/react-native-ui';
8
+ import { TEST_IDS } from '@magmamath/students-qa';
9
+ import { useText } from "../../../../i18n/i18n.js";
10
+ import { useKeyboardOffset } from "../../../../shared/hooks/useKeyboardOffset.js";
11
+ import { isWeb } from "../../../../shared/common.constants.js";
12
+ import { CLASS_CODE_LENGTH } from "../../shared/profile.constants.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ const CODE_PLACEHOLDER = '0';
15
+ const MAX_MODAL_WIDTH = 1044;
16
+ const SCREEN_MARGIN = 48;
17
+ const CELL_GAP = SPACING['400'];
18
+ const MODAL_H_PADDING = SPACING['800'];
19
+ const CELL_ASPECT = 0.95;
20
+ const CELL_RADIUS_RATIO = 0.24; // 36 / 150 in the design
21
+ const CELL_FONT_RATIO = 0.42; // 64 / 150 in the design
22
+ const MAX_CELL_RADIUS = 36;
23
+ const CLOSE_ICON_SIZE = 18;
24
+ const KEYBOARD_LIFT_RATIO = 2;
25
+ export const JoinClassModal = ({
26
+ modal: {
27
+ closeModal,
28
+ params
29
+ }
30
+ }) => {
31
+ const t = useText();
32
+ const {
33
+ model
34
+ } = params;
35
+ const {
36
+ width
37
+ } = useWindowDimensions();
38
+ const {
39
+ code,
40
+ isComplete,
41
+ isPending
42
+ } = useUnit({
43
+ code: model.joinClass.$code,
44
+ isComplete: model.joinClass.$isComplete,
45
+ isPending: model.api.joinClassFx.pending
46
+ });
47
+ const modalWidth = Math.min(MAX_MODAL_WIDTH, width - SCREEN_MARGIN);
48
+ const cellSize = (modalWidth - MODAL_H_PADDING * 2 - CELL_GAP * (CLASS_CODE_LENGTH - 1)) / CLASS_CODE_LENGTH;
49
+ const cellRadius = Math.min(MAX_CELL_RADIUS, cellSize * CELL_RADIUS_RATIO);
50
+ const cellFontSize = cellSize * CELL_FONT_RATIO;
51
+ const setCode = value => model.joinClass.setCode(value.toUpperCase());
52
+ const [cellProps, getCellOnLayoutHandler] = useClearByFocusCell({
53
+ value: code,
54
+ setValue: setCode
55
+ });
56
+ useEffect(() => {
57
+ const subscription = model.api.joinClassFx.finally.watch(() => {
58
+ model.joinClass.reset();
59
+ closeModal();
60
+ });
61
+ return () => subscription.unsubscribe();
62
+ }, [model, closeModal]);
63
+ const closeAndReset = () => {
64
+ model.joinClass.reset();
65
+ closeModal();
66
+ };
67
+ const submit = () => model.joinClass.submit();
68
+ const keyboardHeight = useKeyboardOffset();
69
+ const liftStyle = useMemo(() => ({
70
+ transform: [{
71
+ translateY: Animated.multiply(keyboardHeight, -1 / KEYBOARD_LIFT_RATIO)
72
+ }]
73
+ }), [keyboardHeight]);
74
+ return /*#__PURE__*/_jsx(Animated.View, {
75
+ style: liftStyle,
76
+ children: /*#__PURE__*/_jsx(BaseModal, {
77
+ onClose: closeAndReset,
78
+ closeButton: /*#__PURE__*/_jsx(Button, {
79
+ variant: ButtonVariant.TERTIARY,
80
+ icon: /*#__PURE__*/_jsx(CrossIcon, {
81
+ size: CLOSE_ICON_SIZE,
82
+ color: COLORS.NEUTRAL_7
83
+ }),
84
+ onPress: closeAndReset,
85
+ testID: TEST_IDS.JOIN_CLASS_CLOSE_BUTTON
86
+ }),
87
+ style: {
88
+ container: [styles.modal, {
89
+ width: modalWidth
90
+ }]
91
+ },
92
+ header: t('profile.joinClassTitle'),
93
+ content: /*#__PURE__*/_jsx(CodeField, {
94
+ ...cellProps,
95
+ nativeID: "join-class-code",
96
+ value: code,
97
+ onChangeText: setCode,
98
+ cellCount: CLASS_CODE_LENGTH,
99
+ rootStyle: styles.codeRoot,
100
+ textInputStyle: styles.codeInput,
101
+ autoFocus: true,
102
+ autoComplete: "off",
103
+ textContentType: "oneTimeCode",
104
+ keyboardType: "default",
105
+ returnKeyType: "go",
106
+ onSubmitEditing: submit,
107
+ testID: TEST_IDS.JOIN_CLASS_INPUT(0),
108
+ renderCell: ({
109
+ index,
110
+ symbol,
111
+ isFocused
112
+ }) => {
113
+ const isPlaceholder = !symbol && !isFocused;
114
+ return /*#__PURE__*/_jsx(View, {
115
+ style: [styles.cell, {
116
+ borderRadius: cellRadius,
117
+ width: cellSize
118
+ }],
119
+ onLayout: getCellOnLayoutHandler(index),
120
+ children: /*#__PURE__*/_jsx(Text, {
121
+ style: [styles.cellText, {
122
+ fontSize: cellFontSize
123
+ }, isPlaceholder && styles.cellPlaceholder],
124
+ children: symbol || (isFocused ? /*#__PURE__*/_jsx(Cursor, {}) : CODE_PLACEHOLDER)
125
+ })
126
+ }, index);
127
+ }
128
+ }),
129
+ footer: /*#__PURE__*/_jsx(ReanimatedButton, {
130
+ variant: ButtonVariant.PRIMARY,
131
+ colorScheme: ButtonColor.ORANGE,
132
+ size: ButtonSize.LARGE,
133
+ onPress: submit,
134
+ disabled: !isComplete || isPending,
135
+ isLoading: isPending,
136
+ testID: TEST_IDS.JOIN_CLASS_SUBMIT_BUTTON,
137
+ style: buttonStyle,
138
+ children: t('profile.joinClassButton')
139
+ })
140
+ })
141
+ });
142
+ };
143
+ const styles = StyleSheet.create({
144
+ modal: {
145
+ gap: SPACING['800'],
146
+ paddingHorizontal: MODAL_H_PADDING
147
+ },
148
+ codeRoot: {
149
+ flexDirection: 'row',
150
+ gap: CELL_GAP,
151
+ justifyContent: 'center'
152
+ },
153
+ codeInput: {
154
+ borderWidth: 0,
155
+ // kill the WebKit/iPad focus ring on the hidden input — focus is shown by the cells
156
+ ...(isWeb && {
157
+ outlineStyle: 'none'
158
+ })
159
+ },
160
+ cell: {
161
+ alignItems: 'center',
162
+ aspectRatio: CELL_ASPECT,
163
+ backgroundColor: COLORS.NEUTRAL_1,
164
+ borderColor: COLORS.NEUTRAL_5,
165
+ borderWidth: 3,
166
+ justifyContent: 'center'
167
+ },
168
+ cellText: {
169
+ color: COLORS.NEUTRAL_9,
170
+ fontFamily: FONT_FAMILY.buenosAiresSemiBold,
171
+ textAlign: 'center'
172
+ },
173
+ cellPlaceholder: {
174
+ color: COLORS.NEUTRAL_5
175
+ },
176
+ text: {
177
+ textTransform: 'uppercase'
178
+ }
179
+ });
180
+ const buttonStyle = {
181
+ text: styles.text
182
+ };
183
+ //# sourceMappingURL=JoinClassModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useMemo","Animated","StyleSheet","Text","useWindowDimensions","View","useUnit","CodeField","Cursor","useClearByFocusCell","BaseModal","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","CrossIcon","FONT_FAMILY","ReanimatedButton","SPACING","TEST_IDS","useText","useKeyboardOffset","isWeb","CLASS_CODE_LENGTH","jsx","_jsx","CODE_PLACEHOLDER","MAX_MODAL_WIDTH","SCREEN_MARGIN","CELL_GAP","MODAL_H_PADDING","CELL_ASPECT","CELL_RADIUS_RATIO","CELL_FONT_RATIO","MAX_CELL_RADIUS","CLOSE_ICON_SIZE","KEYBOARD_LIFT_RATIO","JoinClassModal","modal","closeModal","params","t","model","width","code","isComplete","isPending","joinClass","$code","$isComplete","api","joinClassFx","pending","modalWidth","Math","min","cellSize","cellRadius","cellFontSize","setCode","value","toUpperCase","cellProps","getCellOnLayoutHandler","setValue","subscription","finally","watch","reset","unsubscribe","closeAndReset","submit","keyboardHeight","liftStyle","transform","translateY","multiply","style","children","onClose","closeButton","variant","TERTIARY","icon","size","color","NEUTRAL_7","onPress","testID","JOIN_CLASS_CLOSE_BUTTON","container","styles","header","content","nativeID","onChangeText","cellCount","rootStyle","codeRoot","textInputStyle","codeInput","autoFocus","autoComplete","textContentType","keyboardType","returnKeyType","onSubmitEditing","JOIN_CLASS_INPUT","renderCell","index","symbol","isFocused","isPlaceholder","cell","borderRadius","onLayout","cellText","fontSize","cellPlaceholder","footer","PRIMARY","colorScheme","ORANGE","LARGE","disabled","isLoading","JOIN_CLASS_SUBMIT_BUTTON","buttonStyle","create","gap","paddingHorizontal","flexDirection","justifyContent","borderWidth","outlineStyle","alignItems","aspectRatio","backgroundColor","NEUTRAL_1","borderColor","NEUTRAL_5","NEUTRAL_9","fontFamily","buenosAiresSemiBold","textAlign","text","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/JoinClassModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACjD,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,I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AAY;QAAAjD,QAAA,EAElBrC,CAAC,CAAC,yBAAyB;MAAC,CACb;IACnB,CACF;EAAC,CACW,CAAC;AAEpB,CAAC;AAED,MAAMkD,MAAM,GAAG1F,UAAU,CAAC+H,MAAM,CAAC;EAC/B1F,KAAK,EAAE;IACL2F,GAAG,EAAE/G,OAAO,CAAC,KAAK,CAAC;IACnBgH,iBAAiB,EAAEpG;EACrB,CAAC;EACDoE,QAAQ,EAAE;IACRiC,aAAa,EAAE,KAAK;IACpBF,GAAG,EAAEpG,QAAQ;IACbuG,cAAc,EAAE;EAClB,CAAC;EACDhC,SAAS,EAAE;IACTiC,WAAW,EAAE,CAAC;IACd;IACA,IAAI/G,KAAK,IAAI;MAAEgH,YAAY,EAAE;IAAO,CAAC;EACvC,CAAC;EACDrB,IAAI,EAAE;IACJsB,UAAU,EAAE,QAAQ;IACpBC,WAAW,EAAEzG,WAAW;IACxB0G,eAAe,EAAE3H,MAAM,CAAC4H,SAAS;IACjCC,WAAW,EAAE7H,MAAM,CAAC8H,SAAS;IAC7BP,WAAW,EAAE,CAAC;IACdD,cAAc,EAAE;EAClB,CAAC;EACDhB,QAAQ,EAAE;IACR/B,KAAK,EAAEvE,MAAM,CAAC+H,SAAS;IACvBC,UAAU,EAAE9H,WAAW,CAAC+H,mBAAmB;IAC3CC,SAAS,EAAE;EACb,CAAC;EACD1B,eAAe,EAAE;IACfjC,KAAK,EAAEvE,MAAM,CAAC8H;EAChB,CAAC;EACDK,IAAI,EAAE;IACJC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMnB,WAAW,GAAG;EAAEkB,IAAI,EAAEtD,MAAM,CAACsD;AAAK,CAAC","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { StyleSheet } from 'react-native';
5
+ import { BaseModal, Button, ButtonColor, ButtonSize, ButtonVariant } from '@magmamath/react-native-ui';
6
+ import { useText } from "../../../../i18n/i18n.js";
7
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const LogoutConfirmModal = ({
9
+ modal: {
10
+ closeModal,
11
+ params
12
+ }
13
+ }) => {
14
+ const t = useText();
15
+ const confirm = () => {
16
+ closeModal();
17
+ params.onConfirm();
18
+ };
19
+ return /*#__PURE__*/_jsx(BaseModal, {
20
+ onClose: closeModal,
21
+ style: modalStyle,
22
+ header: t('profile.logOut'),
23
+ content: t('profile.logOutConfirmMessage'),
24
+ footer: /*#__PURE__*/_jsxs(_Fragment, {
25
+ children: [/*#__PURE__*/_jsx(Button, {
26
+ variant: ButtonVariant.TERTIARY,
27
+ size: ButtonSize.LARGE,
28
+ onPress: closeModal,
29
+ style: buttonTextStyle,
30
+ children: t('profile.cancel')
31
+ }), /*#__PURE__*/_jsx(Button, {
32
+ colorScheme: ButtonColor.ORANGE,
33
+ size: ButtonSize.LARGE,
34
+ onPress: confirm,
35
+ style: buttonTextStyle,
36
+ children: t('profile.yes')
37
+ })]
38
+ })
39
+ });
40
+ };
41
+ const styles = StyleSheet.create({
42
+ modal: {
43
+ width: 530
44
+ },
45
+ uppercase: {
46
+ textTransform: 'uppercase'
47
+ }
48
+ });
49
+ const modalStyle = {
50
+ container: styles.modal
51
+ };
52
+ const buttonTextStyle = {
53
+ text: styles.uppercase
54
+ };
55
+ //# sourceMappingURL=LogoutConfirmModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","BaseModal","Button","ButtonColor","ButtonSize","ButtonVariant","useText","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","LogoutConfirmModal","modal","closeModal","params","t","confirm","onConfirm","onClose","style","modalStyle","header","content","footer","children","variant","TERTIARY","size","LARGE","onPress","buttonTextStyle","colorScheme","ORANGE","styles","create","width","uppercase","textTransform","container","text"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/modals/LogoutConfirmModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,U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