@magmamath/students-features 1.3.23-rc.2 → 1.3.23-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/commonjs/features/translation/constants.js +11 -0
  2. package/dist/commonjs/features/translation/constants.js.map +1 -0
  3. package/dist/commonjs/features/translation/helpers.js +60 -0
  4. package/dist/commonjs/features/translation/helpers.js.map +1 -0
  5. package/dist/commonjs/features/translation/index.js +105 -0
  6. package/dist/commonjs/features/translation/index.js.map +1 -0
  7. package/dist/commonjs/features/translation/model/TranslationModel.js +122 -0
  8. package/dist/commonjs/features/translation/model/TranslationModel.js.map +1 -0
  9. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +142 -0
  10. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +1 -0
  11. package/dist/commonjs/features/translation/model/TranslationService.js +112 -0
  12. package/dist/commonjs/features/translation/model/TranslationService.js.map +1 -0
  13. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +314 -0
  14. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +1 -0
  15. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +50 -0
  16. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  17. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +230 -0
  18. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +1 -0
  19. package/dist/commonjs/features/translation/providers/google.types.js +2 -0
  20. package/dist/commonjs/features/translation/providers/google.types.js.map +1 -0
  21. package/dist/commonjs/features/translation/providers/translation.interface.js +49 -0
  22. package/dist/commonjs/features/translation/providers/translation.interface.js.map +1 -0
  23. package/dist/commonjs/features/translation/types.js +2 -0
  24. package/dist/commonjs/features/translation/types.js.map +1 -0
  25. package/dist/commonjs/features/voice/index.js +4 -4
  26. package/dist/commonjs/features/voice/index.js.map +1 -1
  27. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +44 -0
  28. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +107 -0
  30. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  31. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +66 -0
  32. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  33. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +58 -0
  34. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  35. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +8 -7
  36. package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  37. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +128 -0
  38. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  39. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +4 -4
  40. package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +1 -0
  41. package/dist/commonjs/features/voice/playing/model/PlaybackController.js +183 -0
  42. package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +1 -0
  43. package/dist/commonjs/features/voice/playing/model/Player.model.js +24 -1
  44. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
  45. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +4 -4
  46. package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  47. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +82 -0
  48. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  49. package/dist/commonjs/features/voice/playing/model/Translation.model.js +62 -0
  50. package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +1 -0
  51. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  52. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  53. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +46 -172
  54. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  55. package/dist/commonjs/features/voice/types.js.map +1 -1
  56. package/dist/commonjs/index.js +12 -0
  57. package/dist/commonjs/index.js.map +1 -1
  58. package/dist/module/features/translation/constants.js +7 -0
  59. package/dist/module/features/translation/constants.js.map +1 -0
  60. package/dist/module/features/translation/helpers.js +53 -0
  61. package/dist/module/features/translation/helpers.js.map +1 -0
  62. package/dist/module/features/translation/index.js +12 -0
  63. package/dist/module/features/translation/index.js.map +1 -0
  64. package/dist/module/features/translation/model/TranslationModel.js +117 -0
  65. package/dist/module/features/translation/model/TranslationModel.js.map +1 -0
  66. package/dist/module/features/translation/model/TranslationPreprocessor.js +137 -0
  67. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +1 -0
  68. package/dist/module/features/translation/model/TranslationService.js +107 -0
  69. package/dist/module/features/translation/model/TranslationService.js.map +1 -0
  70. package/dist/module/features/translation/preserve/wordsToPreserve.js +310 -0
  71. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +1 -0
  72. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +45 -0
  73. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  74. package/dist/module/features/translation/providers/google/supportedLanguages.js +225 -0
  75. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +1 -0
  76. package/dist/module/features/translation/providers/google.types.js +2 -0
  77. package/dist/module/features/translation/providers/google.types.js.map +1 -0
  78. package/dist/module/features/translation/providers/translation.interface.js +44 -0
  79. package/dist/module/features/translation/providers/translation.interface.js.map +1 -0
  80. package/dist/module/features/translation/types.js +2 -0
  81. package/dist/module/features/translation/types.js.map +1 -0
  82. package/dist/module/features/voice/index.js +1 -1
  83. package/dist/module/features/voice/index.js.map +1 -1
  84. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +38 -0
  85. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  86. package/dist/module/features/voice/playing/components/VoiceTranscription.js +101 -0
  87. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  88. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +58 -0
  89. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  90. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +52 -0
  91. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  92. package/dist/module/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +6 -5
  93. package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  94. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +123 -0
  95. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  96. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +2 -2
  97. package/dist/module/features/voice/playing/model/Dropdown.model.js.map +1 -0
  98. package/dist/module/features/voice/playing/model/PlaybackController.js +178 -0
  99. package/dist/module/features/voice/playing/model/PlaybackController.js.map +1 -0
  100. package/dist/module/features/voice/playing/model/Player.model.js +24 -1
  101. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
  102. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +2 -2
  103. package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  104. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +77 -0
  105. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  106. package/dist/module/features/voice/playing/model/Translation.model.js +57 -0
  107. package/dist/module/features/voice/playing/model/Translation.model.js.map +1 -0
  108. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  109. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  110. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +48 -174
  111. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  112. package/dist/module/features/voice/types.js.map +1 -1
  113. package/dist/module/index.js +1 -0
  114. package/dist/module/index.js.map +1 -1
  115. package/dist/typescript/commonjs/features/translation/constants.d.ts +5 -0
  116. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/translation/helpers.d.ts +9 -0
  118. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/translation/index.d.ts +12 -0
  120. package/dist/typescript/commonjs/features/translation/index.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +33 -0
  122. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  124. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +40 -0
  126. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  128. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  130. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  131. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  132. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +15 -0
  134. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +30 -0
  136. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/translation/types.d.ts +27 -0
  138. package/dist/typescript/commonjs/features/translation/types.d.ts.map +1 -0
  139. package/dist/typescript/commonjs/features/voice/index.d.ts +2 -1
  140. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  141. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  142. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  143. package/dist/typescript/{module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts → commonjs/features/voice/playing/components/VoiceTranscription.d.ts} +3 -4
  144. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  146. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  147. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  148. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  149. package/dist/typescript/{module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  150. package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  152. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  153. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → commonjs/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  154. package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  155. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +28 -0
  156. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  157. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +3 -0
  158. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
  159. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  160. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  162. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  163. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +25 -0
  164. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  166. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +18 -18
  168. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/features/voice/types.d.ts +5 -1
  170. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/index.d.ts +1 -0
  172. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  173. package/dist/typescript/module/features/translation/constants.d.ts +5 -0
  174. package/dist/typescript/module/features/translation/constants.d.ts.map +1 -0
  175. package/dist/typescript/module/features/translation/helpers.d.ts +9 -0
  176. package/dist/typescript/module/features/translation/helpers.d.ts.map +1 -0
  177. package/dist/typescript/module/features/translation/index.d.ts +12 -0
  178. package/dist/typescript/module/features/translation/index.d.ts.map +1 -0
  179. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +33 -0
  180. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +1 -0
  181. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  182. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  183. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +40 -0
  184. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +1 -0
  185. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  186. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  187. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  188. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  189. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  190. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  191. package/dist/typescript/module/features/translation/providers/google.types.d.ts +15 -0
  192. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +1 -0
  193. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +30 -0
  194. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +1 -0
  195. package/dist/typescript/module/features/translation/types.d.ts +27 -0
  196. package/dist/typescript/module/features/translation/types.d.ts.map +1 -0
  197. package/dist/typescript/module/features/voice/index.d.ts +2 -1
  198. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  199. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  200. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  201. package/dist/typescript/{commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts → module/features/voice/playing/components/VoiceTranscription.d.ts} +3 -4
  202. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  203. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  204. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  205. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  206. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  207. package/dist/typescript/{commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → module/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  208. package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  209. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  210. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  211. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → module/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  212. package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  213. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +28 -0
  214. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  215. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +3 -0
  216. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
  217. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → module/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  218. package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  219. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  220. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  221. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +25 -0
  222. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  223. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  224. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  225. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +18 -18
  226. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  227. package/dist/typescript/module/features/voice/types.d.ts +5 -1
  228. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  229. package/dist/typescript/module/index.d.ts +1 -0
  230. package/dist/typescript/module/index.d.ts.map +1 -1
  231. package/package.json +28 -1
  232. package/src/features/translation/constants.ts +4 -0
  233. package/src/features/translation/helpers.ts +63 -0
  234. package/src/features/translation/index.ts +30 -0
  235. package/src/features/translation/model/TranslationModel.ts +174 -0
  236. package/src/features/translation/model/TranslationPreprocessor.ts +171 -0
  237. package/src/features/translation/model/TranslationService.ts +148 -0
  238. package/src/features/translation/preserve/wordsToPreserve.ts +87 -0
  239. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +50 -0
  240. package/src/features/translation/providers/google/supportedLanguages.ts +229 -0
  241. package/src/features/translation/providers/google.types.ts +16 -0
  242. package/src/features/translation/providers/translation.interface.ts +63 -0
  243. package/src/features/translation/types.ts +30 -0
  244. package/src/features/voice/index.ts +2 -1
  245. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +37 -0
  246. package/src/features/voice/playing/components/VoiceTranscription.tsx +117 -0
  247. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +59 -0
  248. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +61 -0
  249. package/src/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.ts → useDropdownAnimation.ts} +5 -5
  250. package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +171 -0
  251. package/src/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.ts → Dropdown.model.ts} +2 -2
  252. package/src/features/voice/playing/model/PlaybackController.ts +213 -0
  253. package/src/features/voice/playing/model/Player.model.ts +26 -1
  254. package/src/features/voice/playing/model/{VoiceTranscriptionsCollection.ts → TranscriptionsCollection.ts} +1 -1
  255. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +88 -0
  256. package/src/features/voice/playing/model/Translation.model.ts +75 -0
  257. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
  258. package/src/features/voice/playing/model/VoicePlayer.model.ts +57 -194
  259. package/src/features/voice/types.ts +10 -0
  260. package/src/index.ts +1 -0
  261. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -251
  262. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  263. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -109
  264. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  265. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  266. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -34
  267. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  268. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -66
  269. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  270. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  271. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  272. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -244
  273. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  274. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -103
  275. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  276. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  277. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -29
  278. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  279. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -61
  280. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  281. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  282. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  283. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  284. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  285. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  286. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  287. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  288. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  289. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  290. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  291. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  292. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  293. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  294. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  295. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  296. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  297. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  298. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  299. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  300. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  301. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  302. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  303. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +0 -302
  304. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +0 -128
  305. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +0 -40
  306. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +0 -80
@@ -1,29 +1,27 @@
1
- import { attach, createEffect, createEvent, restore } from 'effector'
2
- import { VoiceTranscriptionsCollection } from './VoiceTranscriptionsCollection'
1
+ import { createEvent, restore } from 'effector'
2
+ import { TranscriptionsCollection } from './TranscriptionsCollection'
3
3
  import { VoiceFileDownloaderModel } from './VoiceFileDownloader.model'
4
- import { VoiceTranscriptionsDropdownModel } from './VoiceTranscriptionsDropdown.model'
4
+ import { DropdownModel } from './Dropdown.model'
5
+ import { TranslationModel } from './Translation.model'
5
6
  import { AnswerAudio, VoicePlayerApi, VoiceTranscriptionItem } from '../../types'
6
- import { PlayerModel, PlayerState } from './Player.model'
7
- import { TranscriptionsDownloaderModel } from './TranscriptionsDownloaderModel'
7
+ import { PlayerModel } from './Player.model'
8
+ import { TranscriptionsDownloaderModel } from './TranscriptionsDownloader.model'
9
+ import { PlaybackController } from './PlaybackController'
8
10
 
9
- type VoiceTranscriptionsPlayerModelParams = {
11
+ type VoicePlayerModelParams = {
10
12
  api: VoicePlayerApi
11
13
  audios?: AnswerAudio[]
12
14
  }
13
- type TogglePlayPauseParams = {
14
- attemptNumber: number
15
- playerState: PlayerState
16
- }
17
15
 
18
16
  export class VoicePlayerModel {
19
- public readonly collection = new VoiceTranscriptionsCollection()
20
- public readonly downloader = new VoiceFileDownloaderModel()
21
- public readonly dropdown = new VoiceTranscriptionsDropdownModel()
17
+ public readonly collection = new TranscriptionsCollection()
18
+ public readonly dropdown = new DropdownModel()
22
19
  public readonly playerModel = new PlayerModel()
20
+ public readonly downloader: VoiceFileDownloaderModel
21
+ public readonly translation: TranslationModel
23
22
  public readonly loader: TranscriptionsDownloaderModel
24
23
  public readonly api: VoicePlayerApi
25
- private currentPlayingAttempt: number | null = null
26
- private shouldPreventPlayback = false
24
+ private readonly playback: PlaybackController
27
25
 
28
26
  public readonly setCurrentAttempt = createEvent<number | null>()
29
27
  public readonly reset = createEvent()
@@ -32,33 +30,21 @@ export class VoicePlayerModel {
32
30
  public readonly $playerState = this.playerModel.$playerState
33
31
 
34
32
  public readonly pauseAudio = this.playerModel.pause
33
+ public readonly seekAudio = this.playerModel.seek
35
34
 
36
- public readonly stopAudio = () => {
37
- this.shouldPreventPlayback = true
38
- this.abortAllDownloads()
39
- this.playerModel.stop()
40
- this.currentPlayingAttempt = null
41
- this.setCurrentAttempt(null)
42
- }
43
-
44
- public readonly resetPlayer = () => {
45
- this.shouldPreventPlayback = true
46
- this.releaseCollectionResources()
47
- this.playerModel.stop()
48
- this.currentPlayingAttempt = null
49
- this.setCurrentAttempt(null)
50
- this.collection.clear()
51
- }
35
+ public readonly togglePlayPause: PlaybackController['togglePlayPause']
52
36
 
53
- constructor(params: VoiceTranscriptionsPlayerModelParams) {
37
+ constructor(params: VoicePlayerModelParams) {
54
38
  this.api = params.api
39
+ this.downloader = new VoiceFileDownloaderModel(params.api)
55
40
  this.loader = new TranscriptionsDownloaderModel(this.collection, params.api)
56
- this.downloader.setApi(params.api)
57
-
58
- this.playerModel.playbackFinished.watch(() => {
59
- this.currentPlayingAttempt = null
60
- this.setCurrentAttempt(null)
41
+ this.translation = new TranslationModel(this.collection, params.api)
42
+ this.playback = new PlaybackController({
43
+ collection: this.collection,
44
+ player: this.playerModel,
45
+ downloader: this.downloader,
61
46
  })
47
+ this.togglePlayPause = this.playback.togglePlayPause
62
48
 
63
49
  if (params.audios) {
64
50
  this.initializeCollectionFromAudios(params.audios)
@@ -67,158 +53,28 @@ export class VoicePlayerModel {
67
53
  this.playerModel.setupAudioMode()
68
54
  }
69
55
 
70
- public initializeWithAudios(answerAudio: AnswerAudio[]) {
71
- this.loader.setTranscriptsLoaded(false)
72
- this.collection.clear()
73
- this.initializeCollectionFromAudios(answerAudio)
56
+ public readonly stopAudio = () => {
57
+ this.playback.halt()
74
58
  }
75
59
 
76
- private initializeCollectionFromAudios(audios: AnswerAudio[]) {
77
- if (!audios) {
78
- console.warn('VoicePlayerModel: audios is not provided')
79
- return
80
- }
81
- audios.forEach((audio, index) => {
82
- const attemptNumber = index + 1
83
- if (!audio.audioFileId) {
84
- console.warn('VoicePlayerModel: audioFileId is missing for audio', audio)
85
- return
86
- }
87
- this.collection.add(attemptNumber, {
88
- attemptNumber,
89
- audioFileId: audio.audioFileId,
90
- _id: audio._id,
91
- hasDrawing: !!audio.drawing,
92
- })
93
- })
60
+ public readonly preloadAudio = (attemptNumber?: number) => {
61
+ const target = attemptNumber ?? this.$currentAttempt.getState()
62
+ if (target === null) return
63
+ return this.playback.preloadAudio(target)
94
64
  }
95
65
 
96
- private releaseCollectionResources() {
97
- this.collection.getAll().forEach((item) => {
98
- if (item.controller) {
99
- this.downloader.abortDownload(item.controller)
100
- }
101
- if (item.audioUri?.startsWith('blob:')) {
102
- try {
103
- URL.revokeObjectURL(item.audioUri)
104
- } catch (e) {}
105
- }
106
- })
66
+ public readonly resetPlayer = () => {
67
+ this.playback.releaseResources()
68
+ this.playback.halt()
69
+ this.collection.clear()
70
+ this.translation.clearCache()
107
71
  }
108
72
 
109
- private abortAllDownloads() {
110
- this.collection.getAll().forEach((item) => {
111
- if (item.controller && item.audioLoading) {
112
- this.downloader.abortDownload(item.controller)
113
- this.collection.update(item.attemptNumber, {
114
- audioLoading: false,
115
- controller: undefined,
116
- audioDownloadPromise: undefined,
117
- })
118
- }
119
- })
73
+ public initializeWithAudios(answerAudio: AnswerAudio[]) {
74
+ this.collection.clear()
75
+ this.initializeCollectionFromAudios(answerAudio)
120
76
  }
121
77
 
122
- private readonly handlePlayAttempt = createEffect(async (attemptNumber: number) => {
123
- this.shouldPreventPlayback = false
124
- const item = this.collection.get(attemptNumber)
125
- if (!item) return
126
-
127
- if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
128
- this.abortAllDownloads()
129
- }
130
-
131
- if (this.collection.hasAudio(attemptNumber)) {
132
- this.playAudioFx(attemptNumber)
133
- return
134
- }
135
-
136
- try {
137
- this.playerModel.setPlayerState(PlayerState.LOADING)
138
- const { collectionItem, downloadPromise } = await this.downloader.download({
139
- audioFileId: item.audioFileId,
140
- attemptNumber,
141
- })
142
-
143
- if (this.shouldPreventPlayback) {
144
- collectionItem.controller?.abort()
145
- return
146
- }
147
-
148
- this.collection.update(attemptNumber, collectionItem)
149
-
150
- const result = await downloadPromise
151
-
152
- if (this.shouldPreventPlayback) {
153
- if (result.uri?.startsWith('blob:')) {
154
- URL.revokeObjectURL(result.uri)
155
- }
156
- return
157
- }
158
-
159
- this.collection.update(attemptNumber, {
160
- audioUri: result.uri,
161
- audioLoading: false,
162
- audioError: undefined,
163
- controller: undefined,
164
- audioDownloadPromise: undefined,
165
- })
166
-
167
- this.playerModel.setPlayerState(PlayerState.IDLE)
168
- this.playAudioFx(attemptNumber)
169
- } catch (error) {
170
- console.error('Audio download error:', error)
171
- if (error instanceof Error && error.name === 'AbortError') {
172
- this.playerModel.setPlayerState(PlayerState.IDLE)
173
- return
174
- }
175
-
176
- this.collection.update(attemptNumber, {
177
- audioLoading: false,
178
- audioError: error instanceof Error ? error.message : 'Failed to download audio',
179
- controller: undefined,
180
- audioDownloadPromise: undefined,
181
- })
182
- }
183
- })
184
-
185
- private playAudioFx = createEffect(async (attemptNumber: number) => {
186
- if (this.shouldPreventPlayback) return
187
-
188
- const item = this.collection.get(attemptNumber)
189
- if (!item?.audioUri) {
190
- console.warn('No audio URI available for attempt:', attemptNumber)
191
- return
192
- }
193
-
194
- try {
195
- if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
196
- this.playerModel.player?.remove()
197
- }
198
-
199
- if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
200
- this.playerModel.pause()
201
- return
202
- }
203
-
204
- if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
205
- this.playerModel.resume()
206
- return
207
- }
208
-
209
- this.currentPlayingAttempt = attemptNumber
210
- this.setCurrentAttempt(attemptNumber)
211
- await this.playerModel.play(item.audioUri)
212
- } catch (error) {
213
- console.error('Error playing audio:', error)
214
- this.playerModel.setPlayerState(PlayerState.IDLE)
215
-
216
- this.collection.update(attemptNumber, {
217
- audioError: error instanceof Error ? error.message : 'Failed to play audio',
218
- })
219
- }
220
- })
221
-
222
78
  public isAudioLoading(attemptNumber: number): boolean {
223
79
  return this.collection.get(attemptNumber)?.audioLoading || false
224
80
  }
@@ -232,24 +88,31 @@ export class VoicePlayerModel {
232
88
  }
233
89
 
234
90
  public cleanup() {
235
- this.releaseCollectionResources()
91
+ this.playback.releaseResources()
236
92
  this.collection.clear()
237
- this.currentPlayingAttempt = null
238
93
  this.reset()
239
- this.loader.reset()
240
94
  this.dropdown.reset()
95
+ this.translation.reset()
241
96
  this.playerModel.release()
242
97
  }
243
98
 
244
- public togglePlayPause = attach({
245
- source: this.playerModel.$playerState,
246
- mapParams: (attemptNumber: number, playerState) => ({ attemptNumber, playerState }),
247
- effect: createEffect(({ attemptNumber, playerState }: TogglePlayPauseParams) => {
248
- if (this.currentPlayingAttempt === attemptNumber && playerState === PlayerState.PLAYING) {
249
- this.pauseAudio()
250
- } else {
251
- this.handlePlayAttempt(attemptNumber)
99
+ private initializeCollectionFromAudios(audios: AnswerAudio[]) {
100
+ if (!audios) {
101
+ console.warn('VoicePlayerModel: audios is not provided')
102
+ return
103
+ }
104
+ audios.forEach((audio, index) => {
105
+ const attemptNumber = index + 1
106
+ if (!audio.audioFileId) {
107
+ console.warn('VoicePlayerModel: audioFileId is missing for audio', audio)
108
+ return
252
109
  }
253
- }),
254
- })
110
+ this.collection.add(attemptNumber, {
111
+ attemptNumber,
112
+ audioFileId: audio.audioFileId,
113
+ _id: audio._id,
114
+ hasDrawing: !!audio.drawing,
115
+ })
116
+ })
117
+ }
255
118
  }
@@ -2,6 +2,12 @@ import { WithAbortSignal } from 'src/types/common.types'
2
2
  import { getAvailableInputs } from './helpers'
3
3
  import { VoiceRecordModel } from './recording/model/VoiceRecord.model'
4
4
  import { AxiosResponse } from 'axios'
5
+ import type {
6
+ GoogleTranslateProps as GoogleTranslatePayload,
7
+ GoogleTranslateResponse,
8
+ } from '../translation/providers/google.types'
9
+
10
+ export type { GoogleTranslatePayload, GoogleTranslateResponse }
5
11
 
6
12
  export type VoiceRecordNotificationTypes = {
7
13
  success: (message: string) => void
@@ -57,6 +63,7 @@ export type VoiceRecorderApi = {
57
63
  type TranscriptionStatus = 'pending' | 'completed' | 'failed'
58
64
  export type AudioTranscriptResponse = {
59
65
  text: string
66
+ language: string
60
67
  status: TranscriptionStatus
61
68
  }
62
69
 
@@ -66,6 +73,7 @@ export type VoicePlayerApi = {
66
73
  audioFileId: string,
67
74
  options?: { signal?: AbortSignal },
68
75
  ) => Promise<AxiosResponse<Blob>>
76
+ translateText: (payload: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
69
77
  }
70
78
 
71
79
  export type VoiceTranscriptionItem = {
@@ -73,6 +81,7 @@ export type VoiceTranscriptionItem = {
73
81
  audioFileId: string
74
82
  _id: string
75
83
  transcript?: string
84
+ transcriptLanguage?: string
76
85
  transcriptLoading?: boolean
77
86
  transcriptError?: string
78
87
  audioUri?: string
@@ -92,3 +101,4 @@ export enum VoiceTranscriptionVariant {
92
101
  SMALL = 'small',
93
102
  LARGE = 'large',
94
103
  }
104
+
package/src/index.ts CHANGED
@@ -14,3 +14,4 @@ export * from './shared/icons'
14
14
  export * from './features/voice'
15
15
  export * from './features/featureUsage'
16
16
  export * from './features/uiMode'
17
+ export * from './features/translation'
@@ -1,251 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.VoiceTranscriptionsDropdown = void 0;
7
- var _reactNativeUi = require("@magmamath/react-native-ui");
8
- var _effectorReact = require("effector-react");
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _reactNative = require("react-native");
11
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
12
- var _types = require("../../types.js");
13
- var _useVoiceTranscriptionsDropdown = require("../hooks/useVoiceTranscriptionsDropdown.js");
14
- var _index = require("../model/index.js");
15
- var _VoiceTranscriptionsDropdownItem = require("./VoiceTranscriptionsDropdownItem.js");
16
- var _constants = require("../../constants.js");
17
- var _i18n = require("../../../../i18n/i18n.js");
18
- var _PlayButton = require("../../../../shared/components/PlayButton.js");
19
- var _helpers = require("../../helpers.js");
20
- var _jsxRuntime = require("react/jsx-runtime");
21
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
- const AnimatedTouchableOpacity = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TouchableOpacity);
24
- const VoiceTranscriptionsDropdown = ({
25
- style,
26
- model,
27
- answers,
28
- attemptOffset,
29
- onAttemptOffsetChange,
30
- attemptsCount,
31
- problemId,
32
- variant = _types.VoiceTranscriptionVariant.SMALL
33
- }) => {
34
- const [attempts, setAttempts] = (0, _react.useState)([]);
35
- const scrollRef = (0, _react.useRef)(null);
36
- const scrollViewRef = (0, _react.useRef)(null);
37
- const itemLayoutsRef = (0, _react.useRef)(new Map());
38
- const answersRef = (0, _react.useRef)(answers);
39
- answersRef.current = answers;
40
- const t = (0, _i18n.useText)();
41
- const [currentAttempt, transcriptsLoaded, playerState, isDropdownExpanded] = (0, _effectorReact.useUnit)([model.$currentAttempt, model.loader.$transcriptsLoaded, model.$playerState, model.dropdown.$isExpanded]);
42
- const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
43
- const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
44
- const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
45
- const playButtonState = {
46
- isActive: playerState !== _index.PlayerState.IDLE,
47
- isLoading: playerState === _index.PlayerState.LOADING,
48
- status: (0, _helpers.getAudioStatus)(playerState)
49
- };
50
- const {
51
- listAnimatedStyle,
52
- iconAnimatedStyle,
53
- onListLayout
54
- } = (0, _useVoiceTranscriptionsDropdown.useVoiceTranscriptionsDropdown)(model.dropdown);
55
- const handleItemLayout = (0, _react.useCallback)((id, event) => {
56
- itemLayoutsRef.current.set(id, event.nativeEvent.layout.y);
57
- }, []);
58
- const scrollToAttempt = (0, _react.useCallback)(attemptNumber => {
59
- if (_reactNativeUi.IS_WEB) {
60
- const item = attempts.find(item => item.attemptNumber === attemptNumber);
61
- if (item) {
62
- const y = itemLayoutsRef.current.get(item._id);
63
- if (y !== undefined) {
64
- scrollViewRef.current?.scrollTo({
65
- y,
66
- animated: true
67
- });
68
- }
69
- }
70
- return;
71
- }
72
- const index = attempts.findIndex(item => item.attemptNumber === attemptNumber);
73
- if (index !== -1) {
74
- scrollRef.current?.scrollToIndex({
75
- index,
76
- animated: true,
77
- viewPosition: 0
78
- });
79
- }
80
- }, [attempts]);
81
- const handleItemToggle = (0, _react.useCallback)(attempt => {
82
- if (onAttemptOffsetChange && attemptsCount !== undefined) {
83
- onAttemptOffsetChange(attemptsCount - attempt);
84
- }
85
- }, [onAttemptOffsetChange, attemptsCount]);
86
- const handlePlayPress = (0, _react.useCallback)(() => {
87
- if (activeAttempt) {
88
- model.togglePlayPause(activeAttempt);
89
- }
90
- }, [model, activeAttempt]);
91
- const handleScrollToIndexFailed = (0, _react.useCallback)(info => {
92
- setTimeout(() => {
93
- scrollRef.current?.scrollToIndex({
94
- index: info.index,
95
- animated: true,
96
- viewPosition: 0
97
- });
98
- }, 100);
99
- }, []);
100
- (0, _react.useEffect)(() => {
101
- model.reinitializePlayer();
102
- return () => model.cleanup();
103
- }, [model]);
104
- (0, _react.useEffect)(() => {
105
- const isLastAttemptsWithoutDrowing = !answers[answers.length - 1].drawing;
106
- if (answers.length > 0 && isLastAttemptsWithoutDrowing) {
107
- model.dropdown.setExpanded(true);
108
- } else {
109
- model.dropdown.setExpanded(false);
110
- }
111
- model.resetPlayer();
112
- }, [problemId]);
113
- (0, _react.useEffect)(() => {
114
- if (answersRef.current.some(answer => answer.audioFileId)) {
115
- model.initializeWithAudios(answersRef.current);
116
- model.loader.loadAllTranscripts();
117
- }
118
- }, [model, answersKey]);
119
- (0, _react.useEffect)(() => {
120
- model.stopAudio();
121
- }, [activeAttempt]);
122
- (0, _react.useEffect)(() => {
123
- const allAttempts = model.getAllAttempts();
124
- setAttempts(allAttempts);
125
- }, [answersKey, transcriptsLoaded, currentAttempt, model]);
126
- (0, _react.useEffect)(() => {
127
- if (isDropdownExpanded && activeAttempt !== null) {
128
- setTimeout(() => {
129
- scrollToAttempt(activeAttempt);
130
- }, 500);
131
- }
132
- }, [isDropdownExpanded, answersKey]);
133
- const renderItem = (0, _react.useCallback)(({
134
- item
135
- }) => {
136
- const isLoading = model.loader.isTranscriptLoading(item.attemptNumber);
137
- const transcript = model.loader.getTranscript(item.attemptNumber);
138
- const isActive = activeAttempt === item.attemptNumber;
139
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionsDropdownItem.VoiceTranscriptionsDropdownItem, {
140
- isLoading: isActive && isLoading,
141
- attempt: item.attemptNumber,
142
- content: transcript && transcript !== _constants.NO_AUDIO_BE_MESSAGE ? transcript : t('voice.transcriptNotAvailable'),
143
- isActive: isActive,
144
- onToggle: handleItemToggle,
145
- scrollToAttempt: scrollToAttempt
146
- });
147
- }, [model, activeAttempt, t, handleItemToggle, scrollToAttempt]);
148
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
149
- style: [styles.container, style],
150
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
151
- style: styles.header,
152
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
153
- style: styles.title,
154
- variant: "h7",
155
- children: t('voice.transcriptions')
156
- }), hasActiveTranscript && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
157
- entering: _reactNativeReanimated.FadeIn.duration(120),
158
- exiting: _reactNativeReanimated.FadeOut.duration(120),
159
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
160
- state: playButtonState,
161
- onPress: handlePlayPress,
162
- activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
163
- })
164
- })]
165
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
166
- style: [listAnimatedStyle, {
167
- overflow: 'hidden'
168
- }],
169
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
170
- onLayout: onListLayout,
171
- style: styles.listContainer,
172
- children: _reactNativeUi.IS_WEB ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableListScrollView, {
173
- bounces: false,
174
- ref: scrollViewRef,
175
- hideShadow: true,
176
- style: styles.list,
177
- contentContainerStyle: styles.listContent,
178
- children: attempts.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
179
- onLayout: e => handleItemLayout(item._id, e),
180
- children: renderItem({
181
- item
182
- })
183
- }, item._id))
184
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableList, {
185
- bounces: false,
186
- ref: scrollRef,
187
- hideShadow: true,
188
- data: attempts,
189
- keyExtractor: item => item._id,
190
- onScrollToIndexFailed: handleScrollToIndexFailed,
191
- renderItem: renderItem,
192
- contentContainerStyle: styles.listContent
193
- })
194
- })
195
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTouchableOpacity, {
196
- style: [styles.expandButton, iconAnimatedStyle],
197
- onPress: () => model.dropdown.toggleExpand(),
198
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CaretDownIcon, {
199
- size: 22
200
- })
201
- })]
202
- });
203
- };
204
- exports.VoiceTranscriptionsDropdown = VoiceTranscriptionsDropdown;
205
- const styles = _reactNative.StyleSheet.create({
206
- container: {
207
- position: 'absolute',
208
- top: 56,
209
- left: 8,
210
- width: 222,
211
- maxHeight: 405,
212
- minHeight: 51,
213
- padding: 4,
214
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
215
- borderRadius: 12,
216
- backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
217
- overflow: 'hidden'
218
- },
219
- // hugeContainer: {
220
- // width: '98%',
221
- // height: '100%',
222
- // },
223
- header: {
224
- flexDirection: 'row',
225
- justifyContent: 'space-between',
226
- alignItems: 'center',
227
- padding: 4,
228
- marginBottom: 4,
229
- height: 32
230
- },
231
- title: {
232
- color: _reactNativeUi.COLORS.NEUTRAL_9,
233
- marginLeft: 4
234
- },
235
- list: {
236
- flex: 1
237
- },
238
- expandButton: {
239
- justifyContent: 'center',
240
- alignItems: 'center'
241
- },
242
- listContainer: {
243
- position: 'absolute',
244
- maxHeight: _constants.DROPDOWN_MAX_CONTENT_HEIGHT,
245
- width: '100%'
246
- },
247
- listContent: {
248
- paddingHorizontal: 4
249
- }
250
- });
251
- //# sourceMappingURL=VoiceTranscriptionsDropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNativeUi","require","_effectorReact","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_types","_useVoiceTranscriptionsDropdown","_index","_VoiceTranscriptionsDropdownItem","_constants","_i18n","_PlayButton","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionsDropdown","style","model","answers","attemptOffset","onAttemptOffsetChange","attemptsCount","problemId","variant","VoiceTranscriptionVariant","SMALL","attempts","setAttempts","useState","scrollRef","useRef","scrollViewRef","itemLayoutsRef","Map","answersRef","current","useText","currentAttempt","transcriptsLoaded","playerState","isDropdownExpanded","useUnit","$currentAttempt","loader","$transcriptsLoaded","$playerState","dropdown","$isExpanded","activeAttempt","getActiveAttempt","answersKey","useMemo","map","_id","audioFileId","join","hasActiveTranscript","undefined","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","listAnimatedStyle","iconAnimatedStyle","onListLayout","useVoiceTranscriptionsDropdown","handleItemLayout","useCallback","id","event","nativeEvent","layout","y","scrollToAttempt","attemptNumber","IS_WEB","item","find","scrollTo","animated","index","findIndex","scrollToIndex","viewPosition","handleItemToggle","attempt","handlePlayPress","togglePlayPause","handleScrollToIndexFailed","info","setTimeout","useEffect","reinitializePlayer","cleanup","isLastAttemptsWithoutDrowing","length","drawing","setExpanded","resetPlayer","some","answer","initializeWithAudios","loadAllTranscripts","stopAudio","allAttempts","getAllAttempts","renderItem","isTranscriptLoading","transcript","getTranscript","jsx","VoiceTranscriptionsDropdownItem","content","NO_AUDIO_BE_MESSAGE","onToggle","jsxs","View","styles","container","children","header","Typography","title","entering","FadeIn","duration","exiting","FadeOut","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","overflow","onLayout","listContainer","ScrollableListScrollView","bounces","ref","hideShadow","list","contentContainerStyle","listContent","ScrollableList","data","keyExtractor","onScrollToIndexFailed","expandButton","toggleExpand","CaretDownIcon","size","exports","StyleSheet","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","flexDirection","justifyContent","alignItems","marginBottom","height","color","NEUTRAL_9","marginLeft","flex","DROPDOWN_MAX_CONTENT_HEIGHT","paddingHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAUA,IAAAK,sBAAA,GAAAF,uBAAA,CAAAH,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,+BAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,gCAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,QAAA,GAAAb,OAAA;AAAgE,IAAAc,WAAA,GA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