@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
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ import { createEffect, createEvent, restore, sample } from 'effector';
4
+ import { JoinClassError } from "../shared/JoinClassError.js";
5
+ import { CLASS_CODE_LENGTH, JoinClassStatus } from "../shared/profile.constants.js";
6
+ import { getJoinClassErrorMessage, getJoinClassSuccessMessage } from "../shared/profile.helpers.js";
7
+ export class ProfileJoinClassModel {
8
+ reset = createEvent();
9
+ setCode = createEvent();
10
+ submit = createEvent();
11
+ $code = restore(this.setCode, '').reset(this.reset);
12
+ $isComplete = this.$code.map(code => code.length === CLASS_CODE_LENGTH);
13
+ constructor(api, notify) {
14
+ this.api = api;
15
+ this.notify = notify;
16
+ this.init();
17
+ }
18
+ init() {
19
+ const notifyFx = createEffect(this.notify);
20
+ sample({
21
+ clock: this.submit,
22
+ source: this.$code,
23
+ filter: code => code.length === CLASS_CODE_LENGTH,
24
+ fn: classCode => ({
25
+ classCode
26
+ }),
27
+ target: this.api.joinClassFx
28
+ });
29
+ sample({
30
+ clock: this.api.joinClassFx.done,
31
+ fn: ({
32
+ result
33
+ }) => ({
34
+ status: JoinClassStatus.SUCCESS,
35
+ message: getJoinClassSuccessMessage(result.name)
36
+ }),
37
+ target: notifyFx
38
+ });
39
+ sample({
40
+ clock: this.api.joinClassFx.fail,
41
+ fn: ({
42
+ error
43
+ }) => ({
44
+ status: JoinClassStatus.ERROR,
45
+ message: getJoinClassErrorMessage(error instanceof JoinClassError ? error.code : null)
46
+ }),
47
+ target: notifyFx
48
+ });
49
+ sample({
50
+ clock: this.api.joinClassFx.done,
51
+ target: this.reset
52
+ });
53
+ }
54
+ }
55
+ //# sourceMappingURL=ProfileJoinClassModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","createEvent","restore","sample","JoinClassError","CLASS_CODE_LENGTH","JoinClassStatus","getJoinClassErrorMessage","getJoinClassSuccessMessage","ProfileJoinClassModel","reset","setCode","submit","$code","$isComplete","map","code","length","constructor","api","notify","init","notifyFx","clock","source","filter","fn","classCode","target","joinClassFx","done","result","status","SUCCESS","message","name","fail","error","ERROR"],"sourceRoot":"../../../../../src","sources":["features/profile/model/ProfileJoinClassModel.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,UAAU;AAErE,SAASC,cAAc,QAAQ,6BAA0B;AACzD,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,gCAA6B;AAChF,SAASC,wBAAwB,EAAEC,0BAA0B,QAAQ,8BAA2B;AAIhG,OAAO,MAAMC,qBAAqB,CAAC;EACjBC,KAAK,GAAGT,WAAW,CAAC,CAAC;EACrBU,OAAO,GAAGV,WAAW,CAAS,CAAC;EAC/BW,MAAM,GAAGX,WAAW,CAAC,CAAC;EAEtBY,KAAK,GAAGX,OAAO,CAAC,IAAI,CAACS,OAAO,EAAE,EAAE,CAAC,CAACD,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACnDI,WAAW,GAAG,IAAI,CAACD,KAAK,CAACE,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACC,MAAM,KAAKZ,iBAAiB,CAAC;EAEzFa,WAAWA,CACQC,GAAe,EACfC,MAAuB,EACxC;IAAA,KAFiBD,GAAe,GAAfA,GAAe;IAAA,KACfC,MAAuB,GAAvBA,MAAuB;IAExC,IAAI,CAACC,IAAI,CAAC,CAAC;EACb;EAEQA,IAAIA,CAAA,EAAG;IACb,MAAMC,QAAQ,GAAGtB,YAAY,CAAC,IAAI,CAACoB,MAAM,CAAC;IAE1CjB,MAAM,CAAC;MACLoB,KAAK,EAAE,IAAI,CAACX,MAAM;MAClBY,MAAM,EAAE,IAAI,CAACX,KAAK;MAClBY,MAAM,EAAGT,IAAI,IAAKA,IAAI,CAACC,MAAM,KAAKZ,iBAAiB;MACnDqB,EAAE,EAAGC,SAAS,KAAM;QAAEA;MAAU,CAAC,CAAC;MAClCC,MAAM,EAAE,IAAI,CAACT,GAAG,CAACU;IACnB,CAAC,CAAC;IAEF1B,MAAM,CAAC;MACLoB,KAAK,EAAE,IAAI,CAACJ,GAAG,CAACU,WAAW,CAACC,IAAI;MAChCJ,EAAE,EAAEA,CAAC;QAAEK;MAAO,CAAC,MAAM;QACnBC,MAAM,EAAE1B,eAAe,CAAC2B,OAAO;QAC/BC,OAAO,EAAE1B,0BAA0B,CAACuB,MAAM,CAACI,IAAI;MACjD,CAAC,CAAC;MACFP,MAAM,EAAEN;IACV,CAAC,CAAC;IAEFnB,MAAM,CAAC;MACLoB,KAAK,EAAE,IAAI,CAACJ,GAAG,CAACU,WAAW,CAACO,IAAI;MAChCV,EAAE,EAAEA,CAAC;QAAEW;MAAM,CAAC,MAAM;QAClBL,MAAM,EAAE1B,eAAe,CAACgC,KAAK;QAC7BJ,OAAO,EAAE3B,wBAAwB,CAAC8B,KAAK,YAAYjC,cAAc,GAAGiC,KAAK,CAACrB,IAAI,GAAG,IAAI;MACvF,CAAC,CAAC;MACFY,MAAM,EAAEN;IACV,CAAC,CAAC;IAEFnB,MAAM,CAAC;MACLoB,KAAK,EAAE,IAAI,CAACJ,GAAG,CAACU,WAAW,CAACC,IAAI;MAChCF,MAAM,EAAE,IAAI,CAAClB;IACf,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ import { createEvent, restore, sample } from 'effector';
4
+ import { getAvailableLanguages } from "../shared/profile.helpers.js";
5
+ export class ProfileLanguageModel {
6
+ reset = createEvent();
7
+ setSearch = createEvent();
8
+ selectLanguage = createEvent();
9
+ $search = restore(this.setSearch, '').reset(this.reset);
10
+ $languages = this.$search.map(search => getAvailableLanguages(search));
11
+ constructor(api) {
12
+ this.api = api;
13
+ this.init();
14
+ }
15
+ init() {
16
+ sample({
17
+ clock: this.selectLanguage,
18
+ fn: translationLanguage => ({
19
+ translationLanguage
20
+ }),
21
+ target: this.api.updateSettingsFx
22
+ });
23
+ }
24
+ }
25
+ //# sourceMappingURL=ProfileLanguageModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEvent","restore","sample","getAvailableLanguages","ProfileLanguageModel","reset","setSearch","selectLanguage","$search","$languages","map","search","constructor","api","init","clock","fn","translationLanguage","target","updateSettingsFx"],"sourceRoot":"../../../../../src","sources":["features/profile/model/ProfileLanguageModel.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,UAAU;AAGvD,SAASC,qBAAqB,QAAQ,8BAA2B;AAGjE,OAAO,MAAMC,oBAAoB,CAAC;EAChBC,KAAK,GAAGL,WAAW,CAAC,CAAC;EACrBM,SAAS,GAAGN,WAAW,CAAS,CAAC;EACjCO,cAAc,GAAGP,WAAW,CAAkB,CAAC;EAE/CQ,OAAO,GAAGP,OAAO,CAAC,IAAI,CAACK,SAAS,EAAE,EAAE,CAAC,CAACD,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACvDI,UAAU,GAAG,IAAI,CAACD,OAAO,CAACE,GAAG,CAAEC,MAAM,IAAKR,qBAAqB,CAACQ,MAAM,CAAC,CAAC;EAExFC,WAAWA,CAAkBC,GAAe,EAAE;IAAA,KAAjBA,GAAe,GAAfA,GAAe;IAC1C,IAAI,CAACC,IAAI,CAAC,CAAC;EACb;EAEQA,IAAIA,CAAA,EAAG;IACbZ,MAAM,CAAC;MACLa,KAAK,EAAE,IAAI,CAACR,cAAc;MAC1BS,EAAE,EAAGC,mBAAmB,KAAM;QAAEA;MAAoB,CAAC,CAAC;MACtDC,MAAM,EAAE,IAAI,CAACL,GAAG,CAACM;IACnB,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ import { createEvent, sample } from 'effector';
4
+ import { ProfileApi } from "./ProfileApi.js";
5
+ import { ProfileJoinClassModel } from "./ProfileJoinClassModel.js";
6
+ import { ProfileLanguageModel } from "./ProfileLanguageModel.js";
7
+ export class ProfileModel {
8
+ setTextToSpeech = createEvent();
9
+ setTextSize = createEvent();
10
+ setCanvasType = createEvent();
11
+ constructor({
12
+ api,
13
+ notify,
14
+ $user,
15
+ $settings
16
+ }) {
17
+ this.api = new ProfileApi(api);
18
+ this.joinClass = new ProfileJoinClassModel(this.api, notify);
19
+ this.language = new ProfileLanguageModel(this.api);
20
+ this.$user = $user;
21
+ this.$settings = $settings;
22
+ this.init();
23
+ }
24
+ init() {
25
+ sample({
26
+ clock: this.setTextToSpeech,
27
+ fn: textToSpeech => ({
28
+ textToSpeech
29
+ }),
30
+ target: this.api.updateSettingsFx
31
+ });
32
+ sample({
33
+ clock: this.setTextSize,
34
+ fn: textSize => ({
35
+ textSize
36
+ }),
37
+ target: this.api.updateSettingsFx
38
+ });
39
+ sample({
40
+ clock: this.setCanvasType,
41
+ fn: canvasType => ({
42
+ canvasType
43
+ }),
44
+ target: this.api.updateSettingsFx
45
+ });
46
+ }
47
+ }
48
+ //# sourceMappingURL=ProfileModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEvent","sample","ProfileApi","ProfileJoinClassModel","ProfileLanguageModel","ProfileModel","setTextToSpeech","setTextSize","setCanvasType","constructor","api","notify","$user","$settings","joinClass","language","init","clock","fn","textToSpeech","target","updateSettingsFx","textSize","canvasType"],"sourceRoot":"../../../../../src","sources":["features/profile/model/ProfileModel.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,MAAM,QAAoB,UAAU;AAI1D,SAASC,UAAU,QAA8B,iBAAc;AAC/D,SAASC,qBAAqB,QAAQ,4BAAyB;AAC/D,SAASC,oBAAoB,QAAQ,2BAAwB;AAS7D,OAAO,MAAMC,YAAY,CAAC;EAKRC,eAAe,GAAGN,WAAW,CAAU,CAAC;EACxCO,WAAW,GAAGP,WAAW,CAAS,CAAC;EACnCQ,aAAa,GAAGR,WAAW,CAAoB,CAAC;EAKhES,WAAWA,CAAC;IAAEC,GAAG;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAA6B,CAAC,EAAE;IAChE,IAAI,CAACH,GAAG,GAAG,IAAIR,UAAU,CAACQ,GAAG,CAAC;IAC9B,IAAI,CAACI,SAAS,GAAG,IAAIX,qBAAqB,CAAC,IAAI,CAACO,GAAG,EAAEC,MAAM,CAAC;IAC5D,IAAI,CAACI,QAAQ,GAAG,IAAIX,oBAAoB,CAAC,IAAI,CAACM,GAAG,CAAC;IAClD,IAAI,CAACE,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,SAAS,GAAGA,SAAS;IAE1B,IAAI,CAACG,IAAI,CAAC,CAAC;EACb;EAEQA,IAAIA,CAAA,EAAG;IACbf,MAAM,CAAC;MACLgB,KAAK,EAAE,IAAI,CAACX,eAAe;MAC3BY,EAAE,EAAGC,YAAY,KAAM;QAAEA;MAAa,CAAC,CAAC;MACxCC,MAAM,EAAE,IAAI,CAACV,GAAG,CAACW;IACnB,CAAC,CAAC;IAEFpB,MAAM,CAAC;MACLgB,KAAK,EAAE,IAAI,CAACV,WAAW;MACvBW,EAAE,EAAGI,QAAQ,KAAM;QAAEA;MAAS,CAAC,CAAC;MAChCF,MAAM,EAAE,IAAI,CAACV,GAAG,CAACW;IACnB,CAAC,CAAC;IAEFpB,MAAM,CAAC;MACLgB,KAAK,EAAE,IAAI,CAACT,aAAa;MACzBU,EAAE,EAAGK,UAAU,KAAM;QAAEA;MAAW,CAAC,CAAC;MACpCH,MAAM,EAAE,IAAI,CAACV,GAAG,CAACW;IACnB,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=profileModal.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/profile/model/profileModal.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ // Carries the backend error code so the library can map it to a message without parsing HTTP errors.
4
+ export class JoinClassError extends Error {
5
+ constructor(code) {
6
+ super(code === null ? 'Join class failed' : `Join class failed (code ${code})`);
7
+ this.code = code;
8
+ this.name = 'JoinClassError';
9
+ }
10
+ }
11
+ //# sourceMappingURL=JoinClassError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["JoinClassError","Error","constructor","code","name"],"sourceRoot":"../../../../../src","sources":["features/profile/shared/JoinClassError.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,cAAc,SAASC,KAAK,CAAC;EACxCC,WAAWA,CAAiBC,IAAmB,EAAE;IAC/C,KAAK,CAACA,IAAI,KAAK,IAAI,GAAG,mBAAmB,GAAG,2BAA2BA,IAAI,GAAG,CAAC;IAAA,KADrDA,IAAmB,GAAnBA,IAAmB;IAE7C,IAAI,CAACC,IAAI,GAAG,gBAAgB;EAC9B;AACF","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ export let ProfileCanvasType = /*#__PURE__*/function (ProfileCanvasType) {
4
+ ProfileCanvasType[ProfileCanvasType["DRAWING"] = 1] = "DRAWING";
5
+ ProfileCanvasType[ProfileCanvasType["SPREADSHEET"] = 2] = "SPREADSHEET";
6
+ return ProfileCanvasType;
7
+ }({});
8
+ export const TEXT_SIZE = {
9
+ MIN: 16,
10
+ MAX: 32,
11
+ STEP: 4
12
+ };
13
+ export const CLASS_CODE_LENGTH = 6;
14
+ export let JoinClassStatus = /*#__PURE__*/function (JoinClassStatus) {
15
+ JoinClassStatus["SUCCESS"] = "success";
16
+ JoinClassStatus["ERROR"] = "error";
17
+ return JoinClassStatus;
18
+ }({});
19
+ export let JoinClassErrorCode = /*#__PURE__*/function (JoinClassErrorCode) {
20
+ JoinClassErrorCode[JoinClassErrorCode["CLASS_NOT_FOUND"] = 1021] = "CLASS_NOT_FOUND";
21
+ JoinClassErrorCode[JoinClassErrorCode["ALREADY_JOINED"] = 1030] = "ALREADY_JOINED";
22
+ JoinClassErrorCode[JoinClassErrorCode["OTHER_DISTRICT"] = 1035] = "OTHER_DISTRICT";
23
+ return JoinClassErrorCode;
24
+ }({});
25
+ //# sourceMappingURL=profile.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ProfileCanvasType","TEXT_SIZE","MIN","MAX","STEP","CLASS_CODE_LENGTH","JoinClassStatus","JoinClassErrorCode"],"sourceRoot":"../../../../../src","sources":["features/profile/shared/profile.constants.ts"],"mappings":";;AAAA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAK7B,OAAO,MAAMC,SAAS,GAAG;EACvBC,GAAG,EAAE,EAAE;EACPC,GAAG,EAAE,EAAE;EACPC,IAAI,EAAE;AACR,CAAU;AAEV,OAAO,MAAMC,iBAAiB,GAAG,CAAC;AAElC,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAK3B,WAAYC,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { Language, LANGUAGES_CONFIG, PRIORITY_LANGUAGES } from '@magmamath/frontend-config';
4
+ import { getText } from "../../../i18n/i18n.js";
5
+ import { JoinClassErrorCode, TEXT_SIZE } from "./profile.constants.js";
6
+ export const getAvailableLanguages = search => {
7
+ const prioritySet = new Set(PRIORITY_LANGUAGES);
8
+ const otherLanguages = Object.values(Language).filter(language => !LANGUAGES_CONFIG[language]?.baseName && !prioritySet.has(language));
9
+ const allLanguages = [...PRIORITY_LANGUAGES, ...otherLanguages];
10
+ if (!search) return allLanguages;
11
+ const query = search.toLowerCase();
12
+ return allLanguages.filter(language => language.toLowerCase().includes(query));
13
+ };
14
+ export const snapTextSize = value => {
15
+ const {
16
+ MIN,
17
+ MAX,
18
+ STEP
19
+ } = TEXT_SIZE;
20
+ const clamped = Math.min(MAX, Math.max(MIN, value));
21
+ return Math.round((clamped - MIN) / STEP) * STEP + MIN;
22
+ };
23
+ const JOIN_CLASS_ERROR_KEYS = {
24
+ [JoinClassErrorCode.CLASS_NOT_FOUND]: 'profile.joinClassErrorNotFound',
25
+ [JoinClassErrorCode.ALREADY_JOINED]: 'profile.joinClassErrorAlreadyJoined',
26
+ [JoinClassErrorCode.OTHER_DISTRICT]: 'profile.joinClassErrorOtherDistrict'
27
+ };
28
+ export const getJoinClassSuccessMessage = className => getText('profile.joinClassSuccess', {
29
+ className
30
+ });
31
+ export const getJoinClassErrorMessage = code => getText(code !== null && JOIN_CLASS_ERROR_KEYS[code] || 'profile.joinClassErrorDefault');
32
+ //# sourceMappingURL=profile.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Language","LANGUAGES_CONFIG","PRIORITY_LANGUAGES","getText","JoinClassErrorCode","TEXT_SIZE","getAvailableLanguages","search","prioritySet","Set","otherLanguages","Object","values","filter","language","baseName","has","allLanguages","query","toLowerCase","includes","snapTextSize","value","MIN","MAX","STEP","clamped","Math","min","max","round","JOIN_CLASS_ERROR_KEYS","CLASS_NOT_FOUND","ALREADY_JOINED","OTHER_DISTRICT","getJoinClassSuccessMessage","className","getJoinClassErrorMessage","code"],"sourceRoot":"../../../../../src","sources":["features/profile/shared/profile.helpers.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,gBAAgB,EAAEC,kBAAkB,QAAQ,4BAA4B;AAE3F,SAASC,OAAO,QAA6B,uBAAoB;AACjE,SAASC,kBAAkB,EAAEC,SAAS,QAAQ,wBAAqB;AAEnE,OAAO,MAAMC,qBAAqB,GAAIC,MAAe,IAAiB;EACpE,MAAMC,WAAW,GAAG,IAAIC,GAAG,CAAWP,kBAAkB,CAAC;EAEzD,MAAMQ,cAAc,GAAGC,MAAM,CAACC,MAAM,CAACZ,QAAQ,CAAC,CAACa,MAAM,CAClDC,QAAQ,IAAK,CAACb,gBAAgB,CAACa,QAAQ,CAAC,EAAEC,QAAQ,IAAI,CAACP,WAAW,CAACQ,GAAG,CAACF,QAAQ,CAClF,CAAC;EAED,MAAMG,YAAY,GAAG,CAAC,GAAGf,kBAAkB,EAAE,GAAGQ,cAAc,CAAC;EAC/D,IAAI,CAACH,MAAM,EAAE,OAAOU,YAAY;EAEhC,MAAMC,KAAK,GAAGX,MAAM,CAACY,WAAW,CAAC,CAAC;EAClC,OAAOF,YAAY,CAACJ,MAAM,CAAEC,QAAQ,IAAKA,QAAQ,CAACK,WAAW,CAAC,CAAC,CAACC,QAAQ,CAACF,KAAK,CAAC,CAAC;AAClF,CAAC;AAED,OAAO,MAAMG,YAAY,GAAIC,KAAa,IAAa;EACrD,MAAM;IAAEC,GAAG;IAAEC,GAAG;IAAEC;EAAK,CAAC,GAAGpB,SAAS;EACpC,MAAMqB,OAAO,GAAGC,IAAI,CAACC,GAAG,CAACJ,GAAG,EAAEG,IAAI,CAACE,GAAG,CAACN,GAAG,EAAED,KAAK,CAAC,CAAC;EACnD,OAAOK,IAAI,CAACG,KAAK,CAAC,CAACJ,OAAO,GAAGH,GAAG,IAAIE,IAAI,CAAC,GAAGA,IAAI,GAAGF,GAAG;AACxD,CAAC;AAED,MAAMQ,qBAAqD,GAAG;EAC5D,CAAC3B,kBAAkB,CAAC4B,eAAe,GAAG,gCAAgC;EACtE,CAAC5B,kBAAkB,CAAC6B,cAAc,GAAG,qCAAqC;EAC1E,CAAC7B,kBAAkB,CAAC8B,cAAc,GAAG;AACvC,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAIC,SAAiB,IAC1DjC,OAAO,CAAC,0BAA0B,EAAE;EAAEiC;AAAU,CAAC,CAAC;AAEpD,OAAO,MAAMC,wBAAwB,GAAIC,IAAmB,IAC1DnC,OAAO,CAAEmC,IAAI,KAAK,IAAI,IAAIP,qBAAqB,CAACO,IAAI,CAAC,IAAK,+BAA+B,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=profile.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/profile/shared/profile.types.ts"],"mappings":"","ignoreList":[]}
@@ -18,4 +18,5 @@ export * from "./features/uiMode/index.js";
18
18
  export * from "./features/fluency/index.js";
19
19
  export * from "./features/fluency-teacher/index.js";
20
20
  export * from "./features/translation/index.js";
21
+ export * from "./features/profile/index.js";
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,gCAAuB;AACrC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB;AAC9B,cAAc,2BAAkB;AAChC,cAAc,kCAAyB;AACvC,cAAc,4BAAmB;AACjC,cAAc,6BAAoB;AAClC,cAAc,qCAA4B;AAC1C,cAAc,iCAAwB","ignoreList":[]}
1
+ {"version":3,"names":["generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,gCAAuB;AACrC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB;AAC9B,cAAc,2BAAkB;AAChC,cAAc,kCAAyB;AACvC,cAAc,4BAAmB;AACjC,cAAc,6BAAoB;AAClC,cAAc,qCAA4B;AAC1C,cAAc,iCAAwB;AACtC,cAAc,6BAAoB","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import { useEffect, useRef } from 'react';
4
+ import { Animated, Keyboard, Platform } from 'react-native';
5
+ import { isWeb } from "../common.constants.js";
6
+ const SHOW_EVENT = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';
7
+ const HIDE_EVENT = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';
8
+ const ANIMATION_DURATION = 220;
9
+
10
+ /**
11
+ * Returns an animated value tracking the on-screen keyboard height.
12
+ *
13
+ * - native: subscribes to the platform `Keyboard` events.
14
+ * - web: reads `visualViewport`, so it only reacts to a *virtual* keyboard
15
+ * (mobile browsers). A physical desktop keyboard never shrinks the viewport,
16
+ * so the value stays 0 and nothing moves.
17
+ */
18
+ export const useKeyboardOffset = () => {
19
+ const keyboardHeight = useRef(new Animated.Value(0)).current;
20
+ useEffect(() => {
21
+ const animateTo = toValue => Animated.timing(keyboardHeight, {
22
+ toValue,
23
+ duration: ANIMATION_DURATION,
24
+ useNativeDriver: !isWeb
25
+ }).start();
26
+ if (isWeb) {
27
+ const viewport = window.visualViewport;
28
+ if (!viewport) return;
29
+ const update = () => {
30
+ const overlap = Math.max(0, window.innerHeight - viewport.height - viewport.offsetTop);
31
+ animateTo(overlap);
32
+ };
33
+ viewport.addEventListener('resize', update);
34
+ viewport.addEventListener('scroll', update);
35
+ return () => {
36
+ viewport.removeEventListener('resize', update);
37
+ viewport.removeEventListener('scroll', update);
38
+ };
39
+ }
40
+ const showSub = Keyboard.addListener(SHOW_EVENT, event => animateTo(event.endCoordinates.height));
41
+ const hideSub = Keyboard.addListener(HIDE_EVENT, () => animateTo(0));
42
+ return () => {
43
+ showSub.remove();
44
+ hideSub.remove();
45
+ };
46
+ }, [keyboardHeight]);
47
+ return keyboardHeight;
48
+ };
49
+ //# sourceMappingURL=useKeyboardOffset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useRef","Animated","Keyboard","Platform","isWeb","SHOW_EVENT","OS","HIDE_EVENT","ANIMATION_DURATION","useKeyboardOffset","keyboardHeight","Value","current","animateTo","toValue","timing","duration","useNativeDriver","start","viewport","window","visualViewport","update","overlap","Math","max","innerHeight","height","offsetTop","addEventListener","removeEventListener","showSub","addListener","event","endCoordinates","hideSub","remove"],"sourceRoot":"../../../../src","sources":["shared/hooks/useKeyboardOffset.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,QAAQ,QAA4B,cAAc;AAE/E,SAASC,KAAK,QAAQ,wBAAqB;AAE3C,MAAMC,UAAU,GAAGF,QAAQ,CAACG,EAAE,KAAK,KAAK,GAAG,kBAAkB,GAAG,iBAAiB;AACjF,MAAMC,UAAU,GAAGJ,QAAQ,CAACG,EAAE,KAAK,KAAK,GAAG,kBAAkB,GAAG,iBAAiB;AACjF,MAAME,kBAAkB,GAAG,GAAG;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAMC,cAAc,GAAGV,MAAM,CAAC,IAAIC,QAAQ,CAACU,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EAE5Db,SAAS,CAAC,MAAM;IACd,MAAMc,SAAS,GAAIC,OAAe,IAChCb,QAAQ,CAACc,MAAM,CAACL,cAAc,EAAE;MAC9BI,OAAO;MACPE,QAAQ,EAAER,kBAAkB;MAC5BS,eAAe,EAAE,CAACb;IACpB,CAAC,CAAC,CAACc,KAAK,CAAC,CAAC;IAEZ,IAAId,KAAK,EAAE;MACT,MAAMe,QAAQ,GAAGC,MAAM,CAACC,cAAc;MACtC,IAAI,CAACF,QAAQ,EAAE;MAEf,MAAMG,MAAM,GAAGA,CAAA,KAAM;QACnB,MAAMC,OAAO,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEL,MAAM,CAACM,WAAW,GAAGP,QAAQ,CAACQ,MAAM,GAAGR,QAAQ,CAACS,SAAS,CAAC;QACtFf,SAAS,CAACU,OAAO,CAAC;MACpB,CAAC;MAEDJ,QAAQ,CAACU,gBAAgB,CAAC,QAAQ,EAAEP,MAAM,CAAC;MAC3CH,QAAQ,CAACU,gBAAgB,CAAC,QAAQ,EAAEP,MAAM,CAAC;MAC3C,OAAO,MAAM;QACXH,QAAQ,CAACW,mBAAmB,CAAC,QAAQ,EAAER,MAAM,CAAC;QAC9CH,QAAQ,CAACW,mBAAmB,CAAC,QAAQ,EAAER,MAAM,CAAC;MAChD,CAAC;IACH;IAEA,MAAMS,OAAO,GAAG7B,QAAQ,CAAC8B,WAAW,CAAC3B,UAAU,EAAG4B,KAAoB,IACpEpB,SAAS,CAACoB,KAAK,CAACC,cAAc,CAACP,MAAM,CACvC,CAAC;IACD,MAAMQ,OAAO,GAAGjC,QAAQ,CAAC8B,WAAW,CAACzB,UAAU,EAAE,MAAMM,SAAS,CAAC,CAAC,CAAC,CAAC;IACpE,OAAO,MAAM;MACXkB,OAAO,CAACK,MAAM,CAAC,CAAC;MAChBD,OAAO,CAACC,MAAM,CAAC,CAAC;IAClB,CAAC;EACH,CAAC,EAAE,CAAC1B,cAAc,CAAC,CAAC;EAEpB,OAAOA,cAAc;AACvB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatTextInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,OAAO,EACL,oBAAoB,EAIpB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAY1D,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACnE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,kGASvB,kBAAkB,sBA+EpB,CAAA"}
1
+ {"version":3,"file":"ChatTextInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAE/C,OAAO,EACL,oBAAoB,EAIpB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAY1D,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACnE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,kGASvB,kBAAkB,sBA+EpB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { type ProfileContextValue } from './context/ProfileContext';
3
+ type ProfileProps = ProfileContextValue;
4
+ export declare const Profile: (props: ProfileProps) => React.JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=Profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/Profile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEpF,KAAK,YAAY,GAAG,mBAAmB,CAAA;AAKvC,eAAO,MAAM,OAAO,UAAW,YAAY,sBA4B1C,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProfileModel.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileModel.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/__tests__/ProfileModel.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=profile.helpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.helpers.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/__tests__/profile.helpers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const ProfileActions: () => React.JSX.Element;
3
+ //# sourceMappingURL=ProfileActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileActions.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/actions/ProfileActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,eAAO,MAAM,cAAc,yBAgC1B,CAAA"}
@@ -0,0 +1,10 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ type ProfileCardProps = {
4
+ title: string;
5
+ children: ReactNode;
6
+ style?: StyleProp<ViewStyle>;
7
+ };
8
+ export declare const ProfileCard: ({ title, children, style }: ProfileCardProps) => React.JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=ProfileCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/cards/ProfileCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAUrE,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,WAAW,+BAAgC,gBAAgB,sBAUvE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const AccountInfoCard: () => React.JSX.Element;
3
+ //# sourceMappingURL=AccountInfoCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountInfoCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/info/AccountInfoCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA2BzB,eAAO,MAAM,eAAe,yBAmB3B,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ProfileModalProps } from '../../model/profileModal.types';
3
+ export declare const JoinClassModal: ({ modal: { closeModal, params } }: ProfileModalProps) => React.JSX.Element;
4
+ //# sourceMappingURL=JoinClassModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JoinClassModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/JoinClassModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAsBjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAcvE,eAAO,MAAM,cAAc,sCAAuC,iBAAiB,sBAyGlF,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { LogoutModalParams, ProfileModalProps } from '../../model/profileModal.types';
3
+ export declare const LogoutConfirmModal: ({ modal: { closeModal, params }, }: ProfileModalProps<LogoutModalParams>) => React.JSX.Element;
4
+ //# sourceMappingURL=LogoutConfirmModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoutConfirmModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/LogoutConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAE1F,eAAO,MAAM,kBAAkB,uCAE5B,iBAAiB,CAAC,iBAAiB,CAAC,sBAoCtC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ProfileModalProps } from '../../model/profileModal.types';
3
+ export declare const TranslationLanguageModal: ({ modal: { closeModal, params } }: ProfileModalProps) => React.JSX.Element;
4
+ //# sourceMappingURL=TranslationLanguageModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationLanguageModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/TranslationLanguageModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkBzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,eAAO,MAAM,wBAAwB,sCAAuC,iBAAiB,sBAsE5F,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const LanguageSettingsCard: () => React.JSX.Element;
3
+ //# sourceMappingURL=LanguageSettingsCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageSettingsCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/LanguageSettingsCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,oBAAoB,yBAShC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const PreferencesCard: () => React.JSX.Element;
3
+ //# sourceMappingURL=PreferencesCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreferencesCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/PreferencesCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkCzB,eAAO,MAAM,eAAe,yBAyB3B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ type SettingRowProps = {
4
+ label: string;
5
+ children: ReactNode;
6
+ style?: StyleProp<ViewStyle>;
7
+ icon?: ReactNode;
8
+ };
9
+ export declare const SettingRow: ({ icon, label, children, style }: SettingRowProps) => React.JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=SettingRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingRow.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/SettingRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAGrE,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,UAAU,qCAAsC,eAAe,sBAU3E,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const TextSettingsCard: () => React.JSX.Element;
3
+ //# sourceMappingURL=TextSettingsCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextSettingsCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/TextSettingsCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAgBzB,eAAO,MAAM,gBAAgB,yBA0B5B,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type TextSizeSliderProps = {
3
+ value: number;
4
+ onSlidingComplete: (value: number) => void;
5
+ };
6
+ export declare const TextSizeSlider: ({ value, onSlidingComplete }: TextSizeSliderProps) => React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=TextSizeSlider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextSizeSlider.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/TextSizeSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAQ/C,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,CAAA;AAUD,eAAO,MAAM,cAAc,iCAAkC,mBAAmB,sBAuD/E,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const TextToSpeechRow: () => React.JSX.Element;
3
+ //# sourceMappingURL=TextToSpeechRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextToSpeechRow.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/TextToSpeechRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,eAAO,MAAM,eAAe,yBAiB3B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const TranslationLanguageRow: () => React.JSX.Element;
3
+ //# sourceMappingURL=TranslationLanguageRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationLanguageRow.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/settings/TranslationLanguageRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkBzB,eAAO,MAAM,sBAAsB,yBA2BlC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ProfileModel } from '../model/ProfileModel';
3
+ export type ProfileContextValue = {
4
+ model: ProfileModel;
5
+ onLogout: () => void;
6
+ onOpenTranslationModal: () => void;
7
+ onOpenJoinClass: () => void;
8
+ showSolveMode?: boolean;
9
+ versionInfo?: ReactNode;
10
+ };
11
+ export declare function useProfile(): ProfileContextValue;
12
+ export declare const ProfileProvider: import("react").Provider<ProfileContextValue | null>;
13
+ //# sourceMappingURL=ProfileContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileContext.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/context/ProfileContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,YAAY,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,sBAAsB,EAAE,MAAM,IAAI,CAAA;IAClC,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB,CAAA;AAID,wBAAgB,UAAU,IAAI,mBAAmB,CAMhD;AAED,eAAO,MAAM,eAAe,sDAA0B,CAAA"}
@@ -0,0 +1,12 @@
1
+ export { Profile } from './Profile';
2
+ export { ProfileModel } from './model/ProfileModel';
3
+ export type { ProfileApiProps } from './model/ProfileApi';
4
+ export type { ProfileContextValue } from './context/ProfileContext';
5
+ export { TranslationLanguageModal } from './components/modals/TranslationLanguageModal';
6
+ export { JoinClassModal } from './components/modals/JoinClassModal';
7
+ export { LogoutConfirmModal } from './components/modals/LogoutConfirmModal';
8
+ export type { ProfileModalParams, LogoutModalParams } from './model/profileModal.types';
9
+ export { JoinClassError } from './shared/JoinClassError';
10
+ export * from './shared/profile.types';
11
+ export * from './shared/profile.constants';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { JoinClassPayload, JoinClassResult, ProfileSettingsUpdate } from '../shared/profile.types';
2
+ export type ProfileApiProps = {
3
+ updateSettings: (payload: ProfileSettingsUpdate) => void;
4
+ joinClass: (payload: JoinClassPayload) => Promise<JoinClassResult>;
5
+ };
6
+ export declare class ProfileApi {
7
+ readonly updateSettingsFx: import("effector").Effect<Partial<import("../shared/profile.types").ProfileSettings>, void, Error>;
8
+ readonly joinClassFx: import("effector").Effect<JoinClassPayload, JoinClassResult, Error>;
9
+ constructor(props: ProfileApiProps);
10
+ }
11
+ //# sourceMappingURL=ProfileApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/ProfileApi.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACtB,MAAM,yBAAyB,CAAA;AAEhC,MAAM,MAAM,eAAe,GAAG;IAE5B,cAAc,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,CAAA;IACxD,SAAS,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;CACnE,CAAA;AAED,qBAAa,UAAU;IACrB,SAAgB,gBAAgB,qGAAA;IAChC,SAAgB,WAAW,sEAAA;gBAEf,KAAK,EAAE,eAAe;CAInC"}
@@ -0,0 +1,14 @@
1
+ import type { NotifyJoinClass } from '../shared/profile.types';
2
+ import type { ProfileApi } from './ProfileApi';
3
+ export declare class ProfileJoinClassModel {
4
+ private readonly api;
5
+ private readonly notify;
6
+ readonly reset: import("effector").EventCallable<void>;
7
+ readonly setCode: import("effector").EventCallable<string>;
8
+ readonly submit: import("effector").EventCallable<void>;
9
+ readonly $code: import("effector").StoreWritable<string>;
10
+ readonly $isComplete: import("effector").Store<boolean>;
11
+ constructor(api: ProfileApi, notify: NotifyJoinClass);
12
+ private init;
13
+ }
14
+ //# sourceMappingURL=ProfileJoinClassModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileJoinClassModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/ProfileJoinClassModel.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,qBAAa,qBAAqB;IAS9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IATzB,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,OAAO,2CAAwB;IAC/C,SAAgB,MAAM,yCAAgB;IAEtC,SAAgB,KAAK,2CAA8C;IACnE,SAAgB,WAAW,oCAA8D;gBAGtE,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,eAAe;IAK1C,OAAO,CAAC,IAAI;CAkCb"}
@@ -0,0 +1,13 @@
1
+ import type { Language } from '@magmamath/frontend-config';
2
+ import type { ProfileApi } from './ProfileApi';
3
+ export declare class ProfileLanguageModel {
4
+ private readonly api;
5
+ readonly reset: import("effector").EventCallable<void>;
6
+ readonly setSearch: import("effector").EventCallable<string>;
7
+ readonly selectLanguage: import("effector").EventCallable<Language | null>;
8
+ readonly $search: import("effector").StoreWritable<string>;
9
+ readonly $languages: import("effector").Store<Language[]>;
10
+ constructor(api: ProfileApi);
11
+ private init;
12
+ }
13
+ //# sourceMappingURL=ProfileLanguageModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfileLanguageModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/model/ProfileLanguageModel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAG1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,qBAAa,oBAAoB;IAQnB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAPhC,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,SAAS,2CAAwB;IACjD,SAAgB,cAAc,oDAAiC;IAE/D,SAAgB,OAAO,2CAAgD;IACvE,SAAgB,UAAU,uCAA8D;gBAE3D,GAAG,EAAE,UAAU;IAI5C,OAAO,CAAC,IAAI;CAOb"}