@magmamath/students-features 1.8.4-rc.9 → 1.8.4

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 (277) hide show
  1. package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js +5 -1
  2. package/dist/commonjs/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
  3. package/dist/commonjs/features/uiMode/index.js +7 -0
  4. package/dist/commonjs/features/uiMode/index.js.map +1 -1
  5. package/dist/commonjs/features/uiMode/uiMode.helpers.js +7 -2
  6. package/dist/commonjs/features/uiMode/uiMode.helpers.js.map +1 -1
  7. package/dist/commonjs/index.js +0 -12
  8. package/dist/commonjs/index.js.map +1 -1
  9. package/dist/module/features/pmProgress/shared/TreeNormalizer.js +5 -1
  10. package/dist/module/features/pmProgress/shared/TreeNormalizer.js.map +1 -1
  11. package/dist/module/features/uiMode/index.js +1 -0
  12. package/dist/module/features/uiMode/index.js.map +1 -1
  13. package/dist/module/features/uiMode/uiMode.helpers.js +6 -1
  14. package/dist/module/features/uiMode/uiMode.helpers.js.map +1 -1
  15. package/dist/module/index.js +0 -1
  16. package/dist/module/index.js.map +1 -1
  17. package/dist/module/shared/icons/ArrowRightIcon.js.map +1 -0
  18. package/dist/module/shared/icons/CloseIcon.js.map +1 -0
  19. package/dist/module/shared/icons/ExcitedLavaIcon.js.map +1 -0
  20. package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
  21. package/dist/typescript/commonjs/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
  22. package/dist/typescript/commonjs/features/uiMode/index.d.ts +1 -0
  23. package/dist/typescript/commonjs/features/uiMode/index.d.ts.map +1 -1
  24. package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts +2 -0
  25. package/dist/typescript/commonjs/features/uiMode/uiMode.helpers.d.ts.map +1 -1
  26. package/dist/typescript/commonjs/index.d.ts +0 -1
  27. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  28. package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts +4 -0
  29. package/dist/typescript/module/features/pmProgress/shared/TreeNormalizer.d.ts.map +1 -1
  30. package/dist/typescript/module/features/uiMode/index.d.ts +1 -0
  31. package/dist/typescript/module/features/uiMode/index.d.ts.map +1 -1
  32. package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts +2 -0
  33. package/dist/typescript/module/features/uiMode/uiMode.helpers.d.ts.map +1 -1
  34. package/dist/typescript/module/index.d.ts +0 -1
  35. package/dist/typescript/module/index.d.ts.map +1 -1
  36. package/package.json +2 -5
  37. package/src/features/pmProgress/shared/TreeNormalizer.ts +5 -1
  38. package/src/features/uiMode/__tests__/getUIMode.test.ts +64 -0
  39. package/src/features/uiMode/index.ts +1 -0
  40. package/src/features/uiMode/uiMode.helpers.ts +16 -1
  41. package/src/i18n/.generated/schema.json +1 -9
  42. package/src/index.ts +0 -1
  43. package/dist/commonjs/features/profile/Profile.js +0 -90
  44. package/dist/commonjs/features/profile/Profile.js.map +0 -1
  45. package/dist/commonjs/features/profile/components/actions/ProfileActions.js +0 -67
  46. package/dist/commonjs/features/profile/components/actions/ProfileActions.js.map +0 -1
  47. package/dist/commonjs/features/profile/components/cards/ProfileCard.js +0 -57
  48. package/dist/commonjs/features/profile/components/cards/ProfileCard.js.map +0 -1
  49. package/dist/commonjs/features/profile/components/info/AccountInfoCard.js +0 -90
  50. package/dist/commonjs/features/profile/components/info/AccountInfoCard.js.map +0 -1
  51. package/dist/commonjs/features/profile/components/modals/JoinClassModal.js +0 -154
  52. package/dist/commonjs/features/profile/components/modals/JoinClassModal.js.map +0 -1
  53. package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js +0 -61
  54. package/dist/commonjs/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
  55. package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js +0 -126
  56. package/dist/commonjs/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
  57. package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js +0 -22
  58. package/dist/commonjs/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
  59. package/dist/commonjs/features/profile/components/settings/PreferencesCard.js +0 -70
  60. package/dist/commonjs/features/profile/components/settings/PreferencesCard.js.map +0 -1
  61. package/dist/commonjs/features/profile/components/settings/SettingRow.js +0 -48
  62. package/dist/commonjs/features/profile/components/settings/SettingRow.js.map +0 -1
  63. package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js +0 -74
  64. package/dist/commonjs/features/profile/components/settings/TextSettingsCard.js.map +0 -1
  65. package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js +0 -116
  66. package/dist/commonjs/features/profile/components/settings/TextSizeSlider.js.map +0 -1
  67. package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js +0 -35
  68. package/dist/commonjs/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
  69. package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js +0 -60
  70. package/dist/commonjs/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
  71. package/dist/commonjs/features/profile/context/ProfileContext.js +0 -18
  72. package/dist/commonjs/features/profile/context/ProfileContext.js.map +0 -1
  73. package/dist/commonjs/features/profile/index.js +0 -80
  74. package/dist/commonjs/features/profile/index.js.map +0 -1
  75. package/dist/commonjs/features/profile/model/ProfileApi.js +0 -15
  76. package/dist/commonjs/features/profile/model/ProfileApi.js.map +0 -1
  77. package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js +0 -60
  78. package/dist/commonjs/features/profile/model/ProfileJoinClassModel.js.map +0 -1
  79. package/dist/commonjs/features/profile/model/ProfileLanguageModel.js +0 -30
  80. package/dist/commonjs/features/profile/model/ProfileLanguageModel.js.map +0 -1
  81. package/dist/commonjs/features/profile/model/ProfileModel.js +0 -53
  82. package/dist/commonjs/features/profile/model/ProfileModel.js.map +0 -1
  83. package/dist/commonjs/features/profile/model/profileModal.types.js +0 -6
  84. package/dist/commonjs/features/profile/model/profileModal.types.js.map +0 -1
  85. package/dist/commonjs/features/profile/shared/JoinClassError.js +0 -16
  86. package/dist/commonjs/features/profile/shared/JoinClassError.js.map +0 -1
  87. package/dist/commonjs/features/profile/shared/profile.constants.js +0 -29
  88. package/dist/commonjs/features/profile/shared/profile.constants.js.map +0 -1
  89. package/dist/commonjs/features/profile/shared/profile.helpers.js +0 -40
  90. package/dist/commonjs/features/profile/shared/profile.helpers.js.map +0 -1
  91. package/dist/commonjs/features/profile/shared/profile.types.js +0 -6
  92. package/dist/commonjs/features/profile/shared/profile.types.js.map +0 -1
  93. package/dist/module/features/profile/Profile.js +0 -84
  94. package/dist/module/features/profile/Profile.js.map +0 -1
  95. package/dist/module/features/profile/components/actions/ProfileActions.js +0 -61
  96. package/dist/module/features/profile/components/actions/ProfileActions.js.map +0 -1
  97. package/dist/module/features/profile/components/cards/ProfileCard.js +0 -51
  98. package/dist/module/features/profile/components/cards/ProfileCard.js.map +0 -1
  99. package/dist/module/features/profile/components/info/AccountInfoCard.js +0 -84
  100. package/dist/module/features/profile/components/info/AccountInfoCard.js.map +0 -1
  101. package/dist/module/features/profile/components/modals/JoinClassModal.js +0 -147
  102. package/dist/module/features/profile/components/modals/JoinClassModal.js.map +0 -1
  103. package/dist/module/features/profile/components/modals/LogoutConfirmModal.js +0 -55
  104. package/dist/module/features/profile/components/modals/LogoutConfirmModal.js.map +0 -1
  105. package/dist/module/features/profile/components/modals/TranslationLanguageModal.js +0 -120
  106. package/dist/module/features/profile/components/modals/TranslationLanguageModal.js.map +0 -1
  107. package/dist/module/features/profile/components/settings/LanguageSettingsCard.js +0 -16
  108. package/dist/module/features/profile/components/settings/LanguageSettingsCard.js.map +0 -1
  109. package/dist/module/features/profile/components/settings/PreferencesCard.js +0 -64
  110. package/dist/module/features/profile/components/settings/PreferencesCard.js.map +0 -1
  111. package/dist/module/features/profile/components/settings/SettingRow.js +0 -42
  112. package/dist/module/features/profile/components/settings/SettingRow.js.map +0 -1
  113. package/dist/module/features/profile/components/settings/TextSettingsCard.js +0 -68
  114. package/dist/module/features/profile/components/settings/TextSettingsCard.js.map +0 -1
  115. package/dist/module/features/profile/components/settings/TextSizeSlider.js +0 -109
  116. package/dist/module/features/profile/components/settings/TextSizeSlider.js.map +0 -1
  117. package/dist/module/features/profile/components/settings/TextToSpeechRow.js +0 -29
  118. package/dist/module/features/profile/components/settings/TextToSpeechRow.js.map +0 -1
  119. package/dist/module/features/profile/components/settings/TranslationLanguageRow.js +0 -54
  120. package/dist/module/features/profile/components/settings/TranslationLanguageRow.js.map +0 -1
  121. package/dist/module/features/profile/context/ProfileContext.js +0 -13
  122. package/dist/module/features/profile/context/ProfileContext.js.map +0 -1
  123. package/dist/module/features/profile/index.js +0 -11
  124. package/dist/module/features/profile/index.js.map +0 -1
  125. package/dist/module/features/profile/model/ProfileApi.js +0 -10
  126. package/dist/module/features/profile/model/ProfileApi.js.map +0 -1
  127. package/dist/module/features/profile/model/ProfileJoinClassModel.js +0 -55
  128. package/dist/module/features/profile/model/ProfileJoinClassModel.js.map +0 -1
  129. package/dist/module/features/profile/model/ProfileLanguageModel.js +0 -25
  130. package/dist/module/features/profile/model/ProfileLanguageModel.js.map +0 -1
  131. package/dist/module/features/profile/model/ProfileModel.js +0 -48
  132. package/dist/module/features/profile/model/ProfileModel.js.map +0 -1
  133. package/dist/module/features/profile/model/profileModal.types.js +0 -4
  134. package/dist/module/features/profile/model/profileModal.types.js.map +0 -1
  135. package/dist/module/features/profile/shared/JoinClassError.js +0 -11
  136. package/dist/module/features/profile/shared/JoinClassError.js.map +0 -1
  137. package/dist/module/features/profile/shared/profile.constants.js +0 -25
  138. package/dist/module/features/profile/shared/profile.constants.js.map +0 -1
  139. package/dist/module/features/profile/shared/profile.helpers.js +0 -32
  140. package/dist/module/features/profile/shared/profile.helpers.js.map +0 -1
  141. package/dist/module/features/profile/shared/profile.types.js +0 -4
  142. package/dist/module/features/profile/shared/profile.types.js.map +0 -1
  143. package/dist/typescript/commonjs/features/profile/Profile.d.ts +0 -6
  144. package/dist/typescript/commonjs/features/profile/Profile.d.ts.map +0 -1
  145. package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
  146. package/dist/typescript/commonjs/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
  147. package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
  148. package/dist/typescript/commonjs/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
  149. package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts +0 -3
  150. package/dist/typescript/commonjs/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
  151. package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts +0 -10
  152. package/dist/typescript/commonjs/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
  153. package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts +0 -3
  154. package/dist/typescript/commonjs/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
  155. package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts +0 -4
  156. package/dist/typescript/commonjs/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
  157. package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
  158. package/dist/typescript/commonjs/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
  159. package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
  160. package/dist/typescript/commonjs/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
  161. package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
  162. package/dist/typescript/commonjs/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
  163. package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts +0 -3
  164. package/dist/typescript/commonjs/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
  165. package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts +0 -11
  166. package/dist/typescript/commonjs/features/profile/components/settings/SettingRow.d.ts.map +0 -1
  167. package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
  168. package/dist/typescript/commonjs/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
  169. package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
  170. package/dist/typescript/commonjs/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
  171. package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
  172. package/dist/typescript/commonjs/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
  173. package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
  174. package/dist/typescript/commonjs/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
  175. package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts +0 -13
  176. package/dist/typescript/commonjs/features/profile/context/ProfileContext.d.ts.map +0 -1
  177. package/dist/typescript/commonjs/features/profile/index.d.ts +0 -12
  178. package/dist/typescript/commonjs/features/profile/index.d.ts.map +0 -1
  179. package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts +0 -11
  180. package/dist/typescript/commonjs/features/profile/model/ProfileApi.d.ts.map +0 -1
  181. package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
  182. package/dist/typescript/commonjs/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
  183. package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts +0 -13
  184. package/dist/typescript/commonjs/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
  185. package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts +0 -26
  186. package/dist/typescript/commonjs/features/profile/model/ProfileModel.d.ts.map +0 -1
  187. package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts +0 -14
  188. package/dist/typescript/commonjs/features/profile/model/profileModal.types.d.ts.map +0 -1
  189. package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts +0 -5
  190. package/dist/typescript/commonjs/features/profile/shared/JoinClassError.d.ts.map +0 -1
  191. package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts +0 -20
  192. package/dist/typescript/commonjs/features/profile/shared/profile.constants.d.ts.map +0 -1
  193. package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts +0 -6
  194. package/dist/typescript/commonjs/features/profile/shared/profile.helpers.d.ts.map +0 -1
  195. package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts +0 -27
  196. package/dist/typescript/commonjs/features/profile/shared/profile.types.d.ts.map +0 -1
  197. package/dist/typescript/module/features/profile/Profile.d.ts +0 -6
  198. package/dist/typescript/module/features/profile/Profile.d.ts.map +0 -1
  199. package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts +0 -2
  200. package/dist/typescript/module/features/profile/__tests__/ProfileModel.test.d.ts.map +0 -1
  201. package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts +0 -2
  202. package/dist/typescript/module/features/profile/__tests__/profile.helpers.test.d.ts.map +0 -1
  203. package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts +0 -3
  204. package/dist/typescript/module/features/profile/components/actions/ProfileActions.d.ts.map +0 -1
  205. package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts +0 -10
  206. package/dist/typescript/module/features/profile/components/cards/ProfileCard.d.ts.map +0 -1
  207. package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts +0 -3
  208. package/dist/typescript/module/features/profile/components/info/AccountInfoCard.d.ts.map +0 -1
  209. package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts +0 -4
  210. package/dist/typescript/module/features/profile/components/modals/JoinClassModal.d.ts.map +0 -1
  211. package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts +0 -4
  212. package/dist/typescript/module/features/profile/components/modals/LogoutConfirmModal.d.ts.map +0 -1
  213. package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts +0 -4
  214. package/dist/typescript/module/features/profile/components/modals/TranslationLanguageModal.d.ts.map +0 -1
  215. package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts +0 -3
  216. package/dist/typescript/module/features/profile/components/settings/LanguageSettingsCard.d.ts.map +0 -1
  217. package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts +0 -3
  218. package/dist/typescript/module/features/profile/components/settings/PreferencesCard.d.ts.map +0 -1
  219. package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts +0 -11
  220. package/dist/typescript/module/features/profile/components/settings/SettingRow.d.ts.map +0 -1
  221. package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts +0 -3
  222. package/dist/typescript/module/features/profile/components/settings/TextSettingsCard.d.ts.map +0 -1
  223. package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts +0 -8
  224. package/dist/typescript/module/features/profile/components/settings/TextSizeSlider.d.ts.map +0 -1
  225. package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts +0 -3
  226. package/dist/typescript/module/features/profile/components/settings/TextToSpeechRow.d.ts.map +0 -1
  227. package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts +0 -3
  228. package/dist/typescript/module/features/profile/components/settings/TranslationLanguageRow.d.ts.map +0 -1
  229. package/dist/typescript/module/features/profile/context/ProfileContext.d.ts +0 -13
  230. package/dist/typescript/module/features/profile/context/ProfileContext.d.ts.map +0 -1
  231. package/dist/typescript/module/features/profile/index.d.ts +0 -12
  232. package/dist/typescript/module/features/profile/index.d.ts.map +0 -1
  233. package/dist/typescript/module/features/profile/model/ProfileApi.d.ts +0 -11
  234. package/dist/typescript/module/features/profile/model/ProfileApi.d.ts.map +0 -1
  235. package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts +0 -14
  236. package/dist/typescript/module/features/profile/model/ProfileJoinClassModel.d.ts.map +0 -1
  237. package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts +0 -13
  238. package/dist/typescript/module/features/profile/model/ProfileLanguageModel.d.ts.map +0 -1
  239. package/dist/typescript/module/features/profile/model/ProfileModel.d.ts +0 -26
  240. package/dist/typescript/module/features/profile/model/ProfileModel.d.ts.map +0 -1
  241. package/dist/typescript/module/features/profile/model/profileModal.types.d.ts +0 -14
  242. package/dist/typescript/module/features/profile/model/profileModal.types.d.ts.map +0 -1
  243. package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts +0 -5
  244. package/dist/typescript/module/features/profile/shared/JoinClassError.d.ts.map +0 -1
  245. package/dist/typescript/module/features/profile/shared/profile.constants.d.ts +0 -20
  246. package/dist/typescript/module/features/profile/shared/profile.constants.d.ts.map +0 -1
  247. package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts +0 -6
  248. package/dist/typescript/module/features/profile/shared/profile.helpers.d.ts.map +0 -1
  249. package/dist/typescript/module/features/profile/shared/profile.types.d.ts +0 -27
  250. package/dist/typescript/module/features/profile/shared/profile.types.d.ts.map +0 -1
  251. package/src/features/profile/Profile.tsx +0 -83
  252. package/src/features/profile/__tests__/ProfileModel.test.ts +0 -99
  253. package/src/features/profile/__tests__/profile.helpers.test.ts +0 -57
  254. package/src/features/profile/components/actions/ProfileActions.tsx +0 -65
  255. package/src/features/profile/components/cards/ProfileCard.tsx +0 -53
  256. package/src/features/profile/components/info/AccountInfoCard.tsx +0 -73
  257. package/src/features/profile/components/modals/JoinClassModal.tsx +0 -145
  258. package/src/features/profile/components/modals/LogoutConfirmModal.tsx +0 -64
  259. package/src/features/profile/components/modals/TranslationLanguageModal.tsx +0 -124
  260. package/src/features/profile/components/settings/LanguageSettingsCard.tsx +0 -16
  261. package/src/features/profile/components/settings/PreferencesCard.tsx +0 -68
  262. package/src/features/profile/components/settings/SettingRow.tsx +0 -42
  263. package/src/features/profile/components/settings/TextSettingsCard.tsx +0 -61
  264. package/src/features/profile/components/settings/TextSizeSlider.tsx +0 -110
  265. package/src/features/profile/components/settings/TextToSpeechRow.tsx +0 -24
  266. package/src/features/profile/components/settings/TranslationLanguageRow.tsx +0 -58
  267. package/src/features/profile/context/ProfileContext.tsx +0 -24
  268. package/src/features/profile/index.ts +0 -11
  269. package/src/features/profile/model/ProfileApi.ts +0 -23
  270. package/src/features/profile/model/ProfileJoinClassModel.ts +0 -58
  271. package/src/features/profile/model/ProfileLanguageModel.ts +0 -26
  272. package/src/features/profile/model/ProfileModel.ts +0 -57
  273. package/src/features/profile/model/profileModal.types.ts +0 -16
  274. package/src/features/profile/shared/JoinClassError.ts +0 -7
  275. package/src/features/profile/shared/profile.constants.ts +0 -23
  276. package/src/features/profile/shared/profile.helpers.ts +0 -36
  277. package/src/features/profile/shared/profile.types.ts +0 -34
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useUnit","StyleSheet","View","COLORS","HeadingVariants","ParagraphVariants","SPACING","Typography","useText","useProfile","TextSizeSlider","ProfileCard","jsx","_jsx","jsxs","_jsxs","TextSettingsCard","t","model","settings","$settings","title","children","variant","H8","style","styles","label","sliderWrap","value","textSize","onSlidingComplete","setTextSize","markers","XS","marker","selectable","MEDIUM","XL","create","color","NEUTRAL_9","gap","alignItems","flexDirection","justifyContent","NEUTRAL_7","fontWeight"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextSettingsCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SACEC,MAAM,EACNC,eAAe,EACfC,iBAAiB,EACjBC,OAAO,EACPC,UAAU,QACL,4BAA4B;AAEnC,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,WAAW,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,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,EAAC;QAEpF,CAAY,CAAC;MAAA,CACT,CAAC;IAAA,CACH,CAAC;EAAA,CACI,CAAC;AAElB,CAAC;AAED,MAAMI,MAAM,GAAGzB,UAAU,CAACsC,MAAM,CAAC;EAC/BZ,KAAK,EAAE;IACLa,KAAK,EAAErC,MAAM,CAACsC;EAChB,CAAC;EACDb,UAAU,EAAE;IACVc,GAAG,EAAEpC,OAAO,CAAC,KAAK;EACpB,CAAC;EACD2B,OAAO,EAAE;IACPU,UAAU,EAAE,UAAU;IACtBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDV,MAAM,EAAE;IACNK,KAAK,EAAErC,MAAM,CAAC2C,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- import React, { useRef, useState } from 'react';
4
- import { PanResponder, StyleSheet, View } from 'react-native';
5
- import { COLORS } from '@magmamath/react-native-ui';
6
- import { TEXT_SIZE } from "../../shared/profile.constants.js";
7
- import { snapTextSize } from "../../shared/profile.helpers.js";
8
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- const THUMB_SIZE = 20;
10
- const DOT_SIZE = 6;
11
- const TRACK_HEIGHT = 10;
12
- const TRACK_RADIUS = 5;
13
- const STEPS = (TEXT_SIZE.MAX - TEXT_SIZE.MIN) / TEXT_SIZE.STEP + 1;
14
- const RANGE = TEXT_SIZE.MAX - TEXT_SIZE.MIN;
15
- const TRACK_PADDING = THUMB_SIZE / 2 - DOT_SIZE / 2;
16
- export const TextSizeSlider = ({
17
- value,
18
- onSlidingComplete
19
- }) => {
20
- const [trackWidth, setTrackWidth] = useState(0);
21
- const [dragValue, setDragValue] = useState(null);
22
- const widthRef = useRef(0);
23
- const onCompleteRef = useRef(onSlidingComplete);
24
- onCompleteRef.current = onSlidingComplete;
25
- const currentValue = dragValue ?? value;
26
- const fraction = RANGE === 0 ? 0 : (currentValue - TEXT_SIZE.MIN) / RANGE;
27
- const travel = Math.max(0, trackWidth - THUMB_SIZE);
28
- const measureTrack = event => {
29
- const width = event.nativeEvent.layout.width;
30
- widthRef.current = width;
31
- setTrackWidth(width);
32
- };
33
- const valueFromX = x => {
34
- const width = widthRef.current;
35
- if (width <= 0) return TEXT_SIZE.MIN;
36
- const ratio = Math.min(1, Math.max(0, x / width));
37
- return snapTextSize(TEXT_SIZE.MIN + ratio * RANGE);
38
- };
39
- const panResponder = useRef(PanResponder.create({
40
- onStartShouldSetPanResponder: () => true,
41
- onMoveShouldSetPanResponder: () => true,
42
- onPanResponderGrant: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
43
- onPanResponderMove: event => setDragValue(valueFromX(event.nativeEvent.locationX)),
44
- onPanResponderRelease: event => {
45
- const next = valueFromX(event.nativeEvent.locationX);
46
- setDragValue(null);
47
- onCompleteRef.current(next);
48
- },
49
- onPanResponderTerminate: () => setDragValue(null)
50
- })).current;
51
- return /*#__PURE__*/_jsxs(View, {
52
- style: styles.container,
53
- onLayout: measureTrack,
54
- ...panResponder.panHandlers,
55
- children: [/*#__PURE__*/_jsx(View, {
56
- style: styles.track,
57
- children: Array.from({
58
- length: STEPS
59
- }, (_, index) => {
60
- const isEdge = index === 0 || index === STEPS - 1;
61
- return /*#__PURE__*/_jsx(View, {
62
- style: [styles.dot, isEdge && styles.dotHidden]
63
- }, index);
64
- })
65
- }), /*#__PURE__*/_jsx(View, {
66
- style: [styles.thumb, {
67
- left: fraction * travel
68
- }]
69
- })]
70
- });
71
- };
72
- const styles = StyleSheet.create({
73
- container: {
74
- height: THUMB_SIZE,
75
- justifyContent: 'center',
76
- width: '100%'
77
- },
78
- track: {
79
- alignItems: 'center',
80
- backgroundColor: COLORS.NEUTRAL_3,
81
- borderColor: COLORS.NEUTRAL_4,
82
- borderRadius: TRACK_RADIUS,
83
- borderWidth: 0.5,
84
- boxShadow: 'inset -3px -3px 3px rgba(255, 255, 255, 0.6), inset 2px 2px 3px rgba(0, 0, 0, 0.12)',
85
- flexDirection: 'row',
86
- height: TRACK_HEIGHT,
87
- justifyContent: 'space-between',
88
- paddingHorizontal: TRACK_PADDING,
89
- width: '100%'
90
- },
91
- dot: {
92
- backgroundColor: COLORS.NEUTRAL_5,
93
- borderRadius: DOT_SIZE / 2,
94
- height: DOT_SIZE,
95
- width: DOT_SIZE
96
- },
97
- dotHidden: {
98
- opacity: 0
99
- },
100
- thumb: {
101
- backgroundColor: COLORS.NEUTRAL_1,
102
- borderRadius: THUMB_SIZE / 2,
103
- boxShadow: '0px 2px 6px rgba(0, 0, 0, 0.2)',
104
- height: THUMB_SIZE,
105
- position: 'absolute',
106
- width: THUMB_SIZE
107
- }
108
- });
109
- //# sourceMappingURL=TextSizeSlider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useRef","useState","PanResponder","StyleSheet","View","COLORS","TEXT_SIZE","snapTextSize","jsx","_jsx","jsxs","_jsxs","THUMB_SIZE","DOT_SIZE","TRACK_HEIGHT","TRACK_RADIUS","STEPS","MAX","MIN","STEP","RANGE","TRACK_PADDING","TextSizeSlider","value","onSlidingComplete","trackWidth","setTrackWidth","dragValue","setDragValue","widthRef","onCompleteRef","current","currentValue","fraction","travel","Math","max","measureTrack","event","width","nativeEvent","layout","valueFromX","x","ratio","min","panResponder","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onPanResponderGrant","locationX","onPanResponderMove","onPanResponderRelease","next","onPanResponderTerminate","style","styles","container","onLayout","panHandlers","children","track","Array","from","length","_","index","isEdge","dot","dotHidden","thumb","left","height","justifyContent","alignItems","backgroundColor","NEUTRAL_3","borderColor","NEUTRAL_4","borderRadius","borderWidth","boxShadow","flexDirection","paddingHorizontal","NEUTRAL_5","opacity","NEUTRAL_1","position"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextSizeSlider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,SAA4BC,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AChCkB,KAAK,EAAE;EACT,CAAC;EACD8B,GAAG,EAAE;IACHO,eAAe,EAAEvE,MAAM,CAACgF,SAAS;IACjCL,YAAY,EAAEnE,QAAQ,GAAG,CAAC;IAC1B4D,MAAM,EAAE5D,QAAQ;IAChB0B,KAAK,EAAE1B;EACT,CAAC;EACDyD,SAAS,EAAE;IACTgB,OAAO,EAAE;EACX,CAAC;EACDf,KAAK,EAAE;IACLK,eAAe,EAAEvE,MAAM,CAACkF,SAAS;IACjCP,YAAY,EAAEpE,UAAU,GAAG,CAAC;IAC5BsE,SAAS,EAAE,gCAAgC;IAC3CT,MAAM,EAAE7D,UAAU;IAClB4E,QAAQ,EAAE,UAAU;IACpBjD,KAAK,EAAE3B;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { useUnit } from 'effector-react';
5
- import { COLORS, SpeakerIcon, Toggle } from '@magmamath/react-native-ui';
6
- import { useText } from "../../../../i18n/i18n.js";
7
- import { useProfile } from "../../context/ProfileContext.js";
8
- import { SettingRow } from "./SettingRow.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- const ICON_SIZE = 20;
11
- export const TextToSpeechRow = () => {
12
- const t = useText();
13
- const {
14
- model
15
- } = useProfile();
16
- const settings = useUnit(model.$settings);
17
- return /*#__PURE__*/_jsx(SettingRow, {
18
- icon: /*#__PURE__*/_jsx(SpeakerIcon, {
19
- size: ICON_SIZE,
20
- color: COLORS.NEUTRAL_7
21
- }),
22
- label: t('profile.textToSpeech'),
23
- children: /*#__PURE__*/_jsx(Toggle, {
24
- value: settings.textToSpeech,
25
- onValueChange: model.setTextToSpeech
26
- })
27
- });
28
- };
29
- //# sourceMappingURL=TextToSpeechRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useUnit","COLORS","SpeakerIcon","Toggle","useText","useProfile","SettingRow","jsx","_jsx","ICON_SIZE","TextToSpeechRow","t","model","settings","$settings","icon","size","color","NEUTRAL_7","label","children","value","textToSpeech","onValueChange","setTextToSpeech"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TextToSpeechRow.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,MAAM,EAAEC,WAAW,EAAEC,MAAM,QAAQ,4BAA4B;AAExE,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,UAAU,QAAQ,iCAA8B;AACzD,SAASC,UAAU,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEzC,MAAMC,SAAS,GAAG,EAAE;AAEpB,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,CAAC,GAAGP,OAAO,CAAC,CAAC;EACnB,MAAM;IAAEQ;EAAM,CAAC,GAAGP,UAAU,CAAC,CAAC;EAC9B,MAAMQ,QAAQ,GAAGb,OAAO,CAACY,KAAK,CAACE,SAAS,CAAC;EAEzC,oBACEN,IAAA,CAACF,UAAU;IACTS,IAAI,eAAEP,IAAA,CAACN,WAAW;MAACc,IAAI,EAAEP,SAAU;MAACQ,KAAK,EAAEhB,MAAM,CAACiB;IAAU,CAAE,CAAE;IAChEC,KAAK,EAAER,CAAC,CAAC,sBAAsB,CAAE;IAAAS,QAAA,eAEjCZ,IAAA,CAACL,MAAM;MAACkB,KAAK,EAAER,QAAQ,CAACS,YAAa;MAACC,aAAa,EAAEX,KAAK,CAACY;IAAgB,CAAE;EAAC,CACpE,CAAC;AAEjB,CAAC","ignoreList":[]}
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- import React from 'react';
4
- import { useUnit } from 'effector-react';
5
- import { StyleSheet } from 'react-native';
6
- import { COLORS, FilterDropdown, FilterDropdownSize, FilterDropdownVariant, GlobeIcon } from '@magmamath/react-native-ui';
7
- import { useText } from "../../../../i18n/i18n.js";
8
- import { useProfile } from "../../context/ProfileContext.js";
9
- import { SettingRow } from "./SettingRow.js";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- const ICON_SIZE = 20;
12
- export const TranslationLanguageRow = () => {
13
- const t = useText();
14
- const {
15
- model,
16
- onOpenTranslationModal
17
- } = useProfile();
18
- const settings = useUnit(model.$settings);
19
- return /*#__PURE__*/_jsx(SettingRow, {
20
- icon: /*#__PURE__*/_jsx(GlobeIcon, {
21
- size: ICON_SIZE,
22
- color: COLORS.NEUTRAL_7
23
- }),
24
- label: t('profile.translationLanguage'),
25
- style: styles.settingRow,
26
- children: /*#__PURE__*/_jsx(FilterDropdown, {
27
- variant: FilterDropdownVariant.SECONDARY,
28
- size: FilterDropdownSize.MEDIUM,
29
- value: settings.translationLanguage ?? undefined,
30
- placeholder: t('profile.selectLanguage'),
31
- disabled: settings.isTranslationLocked,
32
- onPress: onOpenTranslationModal,
33
- accessibilityLabel: t('profile.translationLanguage'),
34
- style: {
35
- text: styles.filterLabel,
36
- container: styles.filterContainer
37
- }
38
- })
39
- });
40
- };
41
- const styles = StyleSheet.create({
42
- settingRow: {
43
- paddingVertical: 0
44
- },
45
- filterLabel: {
46
- color: COLORS.NEUTRAL_7,
47
- fontSize: 16,
48
- fontWeight: '400'
49
- },
50
- filterContainer: {
51
- maxWidth: 231
52
- }
53
- });
54
- //# sourceMappingURL=TranslationLanguageRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useUnit","StyleSheet","COLORS","FilterDropdown","FilterDropdownSize","FilterDropdownVariant","GlobeIcon","useText","useProfile","SettingRow","jsx","_jsx","ICON_SIZE","TranslationLanguageRow","t","model","onOpenTranslationModal","settings","$settings","icon","size","color","NEUTRAL_7","label","style","styles","settingRow","children","variant","SECONDARY","MEDIUM","value","translationLanguage","undefined","placeholder","disabled","isTranslationLocked","onPress","accessibilityLabel","text","filterLabel","container","filterContainer","create","paddingVertical","fontSize","fontWeight","maxWidth"],"sourceRoot":"../../../../../../src","sources":["features/profile/components/settings/TranslationLanguageRow.tsx"],"mappings":";;AAAA,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,EAAEhB,MAAM,CAACiB;MACpB;IAAE,CACH;EAAC,CACQ,CAAC;AAEjB,CAAC;AAED,MAAMjB,MAAM,GAAGxB,UAAU,CAAC0C,MAAM,CAAC;EAC/BjB,UAAU,EAAE;IACVkB,eAAe,EAAE;EACnB,CAAC;EACDJ,WAAW,EAAE;IACXnB,KAAK,EAAEnB,MAAM,CAACoB,SAAS;IACvBuB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDJ,eAAe,EAAE;IACfK,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- import { createContext, useContext } from 'react';
4
- const ProfileContext = /*#__PURE__*/createContext(null);
5
- export function useProfile() {
6
- const value = useContext(ProfileContext);
7
- if (!value) {
8
- throw new Error('useProfile must be used within ProfileProvider');
9
- }
10
- return value;
11
- }
12
- export const ProfileProvider = ProfileContext.Provider;
13
- //# sourceMappingURL=ProfileContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createContext","useContext","ProfileContext","useProfile","value","Error","ProfileProvider","Provider"],"sourceRoot":"../../../../../src","sources":["features/profile/context/ProfileContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAwB,OAAO;AAajE,MAAMC,cAAc,gBAAGF,aAAa,CAA6B,IAAI,CAAC;AAEtE,OAAO,SAASG,UAAUA,CAAA,EAAwB;EAChD,MAAMC,KAAK,GAAGH,UAAU,CAACC,cAAc,CAAC;EACxC,IAAI,CAACE,KAAK,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA,OAAOD,KAAK;AACd;AAEA,OAAO,MAAME,eAAe,GAAGJ,cAAc,CAACK,QAAQ","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- export { Profile } from "./Profile.js";
4
- export { ProfileModel } from "./model/ProfileModel.js";
5
- export { TranslationLanguageModal } from "./components/modals/TranslationLanguageModal.js";
6
- export { JoinClassModal } from "./components/modals/JoinClassModal.js";
7
- export { LogoutConfirmModal } from "./components/modals/LogoutConfirmModal.js";
8
- export { JoinClassError } from "./shared/JoinClassError.js";
9
- export * from "./shared/profile.types.js";
10
- export * from "./shared/profile.constants.js";
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Profile","ProfileModel","TranslationLanguageModal","JoinClassModal","LogoutConfirmModal","JoinClassError"],"sourceRoot":"../../../../src","sources":["features/profile/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,cAAW;AACnC,SAASC,YAAY,QAAQ,yBAAsB;AAGnD,SAASC,wBAAwB,QAAQ,iDAA8C;AACvF,SAASC,cAAc,QAAQ,uCAAoC;AACnE,SAASC,kBAAkB,QAAQ,2CAAwC;AAE3E,SAASC,cAAc,QAAQ,4BAAyB;AACxD,cAAc,2BAAwB;AACtC,cAAc,+BAA4B","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- import { createEffect } from 'effector';
4
- export class ProfileApi {
5
- constructor(props) {
6
- this.updateSettingsFx = createEffect(props.updateSettings);
7
- this.joinClassFx = createEffect(props.joinClass);
8
- }
9
- }
10
- //# sourceMappingURL=ProfileApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEffect","ProfileApi","constructor","props","updateSettingsFx","updateSettings","joinClassFx","joinClass"],"sourceRoot":"../../../../../src","sources":["features/profile/model/ProfileApi.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,UAAU;AAcvC,OAAO,MAAMC,UAAU,CAAC;EAItBC,WAAWA,CAACC,KAAsB,EAAE;IAClC,IAAI,CAACC,gBAAgB,GAAGJ,YAAY,CAACG,KAAK,CAACE,cAAc,CAAC;IAC1D,IAAI,CAACC,WAAW,GAAGN,YAAY,CAACG,KAAK,CAACI,SAAS,CAAC;EAClD;AACF","ignoreList":[]}
@@ -1,55 +0,0 @@
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
@@ -1 +0,0 @@
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"],"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AAEK;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":[]}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,48 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=profileModal.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/profile/model/profileModal.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,25 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,32 +0,0 @@
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
@@ -1 +0,0 @@
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":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=profile.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/profile/shared/profile.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,6 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ProfileModel.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileModel.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/__tests__/ProfileModel.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile.helpers.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.helpers.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/profile/__tests__/profile.helpers.test.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const ProfileActions: () => React.JSX.Element;
3
- //# sourceMappingURL=ProfileActions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProfileActions.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/actions/ProfileActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,eAAO,MAAM,cAAc,yBA8B1B,CAAA"}
@@ -1,10 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const AccountInfoCard: () => React.JSX.Element;
3
- //# sourceMappingURL=AccountInfoCard.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"JoinClassModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/profile/components/modals/JoinClassModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAiBxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAYvE,eAAO,MAAM,cAAc,sCAAuC,iBAAiB,sBAkFlF,CAAA"}
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
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"}