@magmamath/students-features 0.9.113 → 0.9.114-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  2. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
  4. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/constants.js +4 -4
  6. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  7. package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
  8. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
  9. package/dist/commonjs/features/voice/constants.js +22 -0
  10. package/dist/commonjs/features/voice/constants.js.map +1 -0
  11. package/dist/commonjs/features/voice/helpers.js +211 -0
  12. package/dist/commonjs/features/voice/helpers.js.map +1 -0
  13. package/dist/commonjs/features/voice/index.js +138 -0
  14. package/dist/commonjs/features/voice/index.js.map +1 -0
  15. package/dist/commonjs/features/voice/model/index.js +68 -0
  16. package/dist/commonjs/features/voice/model/index.js.map +1 -0
  17. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
  18. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
  19. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
  20. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  21. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
  22. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
  24. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  25. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  26. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  27. package/dist/commonjs/features/voice/playing/model/Player.model.js +87 -0
  28. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +244 -0
  30. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  31. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
  32. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  33. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +39 -0
  34. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
  35. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
  36. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  37. package/dist/commonjs/features/voice/playing/model/index.js +47 -0
  38. package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
  39. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
  40. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
  41. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +61 -0
  42. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  43. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
  44. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  45. package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js +27 -0
  46. package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
  47. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
  48. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  49. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
  50. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  51. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
  52. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  53. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
  54. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  55. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
  56. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  57. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
  58. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  59. package/dist/commonjs/features/voice/recording/model/Recorder.model.js +54 -0
  60. package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
  61. package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
  62. package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
  63. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +239 -0
  64. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  65. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
  66. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  67. package/dist/commonjs/features/voice/recording/model/index.js +34 -0
  68. package/dist/commonjs/features/voice/recording/model/index.js.map +1 -0
  69. package/dist/commonjs/features/voice/types.js +6 -0
  70. package/dist/commonjs/features/voice/types.js.map +1 -0
  71. package/dist/commonjs/index.js +12 -0
  72. package/dist/commonjs/index.js.map +1 -1
  73. package/dist/commonjs/shared/components/PlayButton.js +70 -0
  74. package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
  75. package/dist/commonjs/shared/translation/localization/ca.json +17 -0
  76. package/dist/commonjs/shared/translation/localization/de.json +17 -0
  77. package/dist/commonjs/shared/translation/localization/en.json +17 -0
  78. package/dist/commonjs/shared/translation/localization/gb.json +17 -0
  79. package/dist/commonjs/shared/translation/localization/sct.json +17 -0
  80. package/dist/commonjs/shared/translation/localization/sw.json +17 -0
  81. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  82. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  83. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
  84. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  85. package/dist/module/features/chatbot/constants.js +5 -5
  86. package/dist/module/features/chatbot/constants.js.map +1 -1
  87. package/dist/module/features/gifCelebrations/helpers.js +1 -0
  88. package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
  89. package/dist/module/features/voice/constants.js +18 -0
  90. package/dist/module/features/voice/constants.js.map +1 -0
  91. package/dist/module/features/voice/helpers.js +194 -0
  92. package/dist/module/features/voice/helpers.js.map +1 -0
  93. package/dist/module/features/voice/index.js +20 -0
  94. package/dist/module/features/voice/index.js.map +1 -0
  95. package/dist/module/features/voice/model/index.js +15 -0
  96. package/dist/module/features/voice/model/index.js.map +1 -0
  97. package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
  98. package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
  99. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +201 -0
  100. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  101. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
  102. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  103. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
  104. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  105. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  106. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  107. package/dist/module/features/voice/playing/model/Player.model.js +82 -0
  108. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
  109. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +234 -0
  110. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  111. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
  112. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  113. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +34 -0
  114. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
  115. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
  116. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  117. package/dist/module/features/voice/playing/model/index.js +8 -0
  118. package/dist/module/features/voice/playing/model/index.js.map +1 -0
  119. package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
  120. package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
  121. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +55 -0
  122. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  123. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
  124. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  125. package/dist/module/features/voice/recording/components/VoiceRecordDevider.js +21 -0
  126. package/dist/module/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
  127. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
  128. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  129. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
  130. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  131. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
  132. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  133. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
  134. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  135. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
  136. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  137. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
  138. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  139. package/dist/module/features/voice/recording/model/Recorder.model.js +49 -0
  140. package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
  141. package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
  142. package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
  143. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +234 -0
  144. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  145. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
  146. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  147. package/dist/module/features/voice/recording/model/index.js +7 -0
  148. package/dist/module/features/voice/recording/model/index.js.map +1 -0
  149. package/dist/module/features/voice/types.js +4 -0
  150. package/dist/module/features/voice/types.js.map +1 -0
  151. package/dist/module/index.js +1 -0
  152. package/dist/module/index.js.map +1 -1
  153. package/dist/module/shared/components/PlayButton.js +64 -0
  154. package/dist/module/shared/components/PlayButton.js.map +1 -0
  155. package/dist/module/shared/translation/localization/ca.json +17 -0
  156. package/dist/module/shared/translation/localization/de.json +17 -0
  157. package/dist/module/shared/translation/localization/en.json +17 -0
  158. package/dist/module/shared/translation/localization/gb.json +17 -0
  159. package/dist/module/shared/translation/localization/sct.json +17 -0
  160. package/dist/module/shared/translation/localization/sw.json +17 -0
  161. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  162. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  164. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
  166. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/features/voice/constants.d.ts +15 -0
  169. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
  170. package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
  171. package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
  172. package/dist/typescript/commonjs/features/voice/index.d.ts +13 -0
  173. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
  174. package/dist/typescript/commonjs/features/voice/model/index.d.ts +11 -0
  175. package/dist/typescript/commonjs/features/voice/model/index.d.ts.map +1 -0
  176. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  177. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  178. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
  179. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  180. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  181. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  182. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  183. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  184. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  185. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  186. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +21 -0
  187. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
  188. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  189. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  190. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
  191. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  192. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
  193. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
  194. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  195. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  196. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +7 -0
  197. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
  198. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  199. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  200. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  201. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  202. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  203. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
  205. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
  206. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  207. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  208. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  209. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  210. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  211. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  212. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  213. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  214. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  215. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  216. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  217. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  218. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
  219. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  220. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
  221. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  222. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  223. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  224. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  225. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  226. package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts +5 -0
  227. package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/features/voice/types.d.ts +58 -0
  229. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
  230. package/dist/typescript/commonjs/index.d.ts +1 -0
  231. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  232. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
  233. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
  234. package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
  235. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
  237. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
  239. package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
  240. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  241. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  242. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  243. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  244. package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
  245. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  246. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
  247. package/dist/typescript/module/features/voice/constants.d.ts +15 -0
  248. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
  249. package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
  250. package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
  251. package/dist/typescript/module/features/voice/index.d.ts +13 -0
  252. package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
  253. package/dist/typescript/module/features/voice/model/index.d.ts +11 -0
  254. package/dist/typescript/module/features/voice/model/index.d.ts.map +1 -0
  255. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  256. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  257. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
  258. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  259. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  260. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  261. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  262. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  263. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  264. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  265. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +21 -0
  266. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
  267. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  268. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  269. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
  270. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  271. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
  272. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
  273. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  274. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  275. package/dist/typescript/module/features/voice/playing/model/index.d.ts +7 -0
  276. package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
  277. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  278. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  279. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  280. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  281. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  282. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  283. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
  284. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
  285. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  286. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  287. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  288. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  289. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  290. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  291. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  292. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  293. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  294. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  295. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  296. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  297. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
  298. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  299. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
  300. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  301. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  302. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  303. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  304. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  305. package/dist/typescript/module/features/voice/recording/model/index.d.ts +5 -0
  306. package/dist/typescript/module/features/voice/recording/model/index.d.ts.map +1 -0
  307. package/dist/typescript/module/features/voice/types.d.ts +58 -0
  308. package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
  309. package/dist/typescript/module/index.d.ts +1 -0
  310. package/dist/typescript/module/index.d.ts.map +1 -1
  311. package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
  312. package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
  313. package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
  314. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  315. package/dist/typescript/module/shared/translation/model.d.ts +34 -0
  316. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  317. package/dist/typescript/module/types/common.types.d.ts +3 -0
  318. package/dist/typescript/module/types/common.types.d.ts.map +1 -1
  319. package/package.json +11 -4
  320. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
  321. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
  322. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
  323. package/src/features/chatbot/constants.ts +4 -4
  324. package/src/features/gifCelebrations/helpers.ts +1 -0
  325. package/src/features/voice/constants.ts +14 -0
  326. package/src/features/voice/helpers.ts +254 -0
  327. package/src/features/voice/index.ts +17 -0
  328. package/src/features/voice/model/index.ts +13 -0
  329. package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
  330. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +239 -0
  331. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
  332. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
  333. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  334. package/src/features/voice/playing/model/Player.model.ts +92 -0
  335. package/src/features/voice/playing/model/VoicePlayer.model.ts +282 -0
  336. package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +53 -0
  337. package/src/features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts +43 -0
  338. package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +12 -0
  339. package/src/features/voice/playing/model/index.ts +6 -0
  340. package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
  341. package/src/features/voice/recording/components/VoiceRecordButton.tsx +63 -0
  342. package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
  343. package/src/features/voice/recording/components/VoiceRecordDevider.tsx +17 -0
  344. package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
  345. package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
  346. package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
  347. package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
  348. package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
  349. package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
  350. package/src/features/voice/recording/model/Recorder.model.ts +62 -0
  351. package/src/features/voice/recording/model/Uploader.model.ts +48 -0
  352. package/src/features/voice/recording/model/VoiceRecord.model.ts +278 -0
  353. package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
  354. package/src/features/voice/recording/model/index.ts +4 -0
  355. package/src/features/voice/types.ts +69 -0
  356. package/src/index.ts +1 -0
  357. package/src/shared/components/PlayButton.tsx +84 -0
  358. package/src/shared/translation/localization/ca.json +17 -0
  359. package/src/shared/translation/localization/de.json +17 -0
  360. package/src/shared/translation/localization/en.json +17 -0
  361. package/src/shared/translation/localization/gb.json +17 -0
  362. package/src/shared/translation/localization/sct.json +17 -0
  363. package/src/shared/translation/localization/sw.json +17 -0
  364. package/src/types/common.types.ts +1 -0
  365. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  366. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  367. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ import { RecordingPresets, useAudioRecorder, useAudioRecorderState } from 'expo-audio';
4
+ import { useEffect } from 'react';
5
+ import { IS_WEB } from '@magmamath/react-native-ui';
6
+ import { VOICE_RECORDER_MAX_DURATION_MS, VoiceRecorderState } from "../../constants.js";
7
+ import { addAudioInputsListenerWeb, getAvailableInputs } from "../../helpers.js";
8
+ export const useVoiceRecorder = model => {
9
+ const recorder = useAudioRecorder(RecordingPresets.LOW_QUALITY, model.recordingStatusUpdate);
10
+ const recorderState = useAudioRecorderState(recorder);
11
+ useEffect(() => {
12
+ if (recorderState.durationMillis >= VOICE_RECORDER_MAX_DURATION_MS && recorderState.isRecording) {
13
+ model.recorderModel.stop();
14
+ }
15
+ // Track the last known duration while recording (for old browsers where getAudioDurationMs returns Infinity)
16
+ if (recorderState.isRecording && recorderState.durationMillis > 0) {
17
+ model.recorderModel.setLastKnownDurationMs(recorderState.durationMillis);
18
+ }
19
+ }, [recorderState.durationMillis]);
20
+ useEffect(() => {
21
+ if (!IS_WEB) {
22
+ //only once for iPad and listener for WEB
23
+ getAvailableInputs(recorder).then(inputs => {
24
+ model.recorderModel.setAvailableInputs(inputs);
25
+ });
26
+ return;
27
+ }
28
+ const removeListener = addAudioInputsListenerWeb(devices => {
29
+ model.recorderModel.setAvailableInputs(devices);
30
+ });
31
+ return removeListener;
32
+ }, [recorder, model.recorderModel]);
33
+ useEffect(() => {
34
+ if (recorderState.isRecording) {
35
+ model.recorderModel.setVoiceRecordState(VoiceRecorderState.RECORDING);
36
+ return;
37
+ }
38
+ if (recorderState.durationMillis > 0) {
39
+ model.recorderModel.setVoiceRecordState(VoiceRecorderState.PAUSED);
40
+ return;
41
+ }
42
+ model.recorderModel.setVoiceRecordState(VoiceRecorderState.IDLE);
43
+ return () => {
44
+ model.recorderModel.reset();
45
+ };
46
+ }, [recorderState, model.recorderModel]);
47
+ useEffect(() => {
48
+ model.recorderModel.recorder = recorder;
49
+ }, [recorder]);
50
+ return {
51
+ recorderState
52
+ };
53
+ };
54
+ //# sourceMappingURL=useVoiceRecorder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["RecordingPresets","useAudioRecorder","useAudioRecorderState","useEffect","IS_WEB","VOICE_RECORDER_MAX_DURATION_MS","VoiceRecorderState","addAudioInputsListenerWeb","getAvailableInputs","useVoiceRecorder","model","recorder","LOW_QUALITY","recordingStatusUpdate","recorderState","durationMillis","isRecording","recorderModel","stop","setLastKnownDurationMs","then","inputs","setAvailableInputs","removeListener","devices","setVoiceRecordState","RECORDING","PAUSED","IDLE","reset"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorder.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,gBAAgB,EAAEC,qBAAqB,QAAQ,YAAY;AAEtF,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,8BAA8B,EAAEC,kBAAkB,QA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AAa,CAACC,cAAc,GAAG,CAAC,EAAE;MACpCL,KAAK,CAACO,aAAa,CAACQ,mBAAmB,CAACnB,kBAAkB,CAACqB,MAAM,CAAC;MAClE;IACF;IACAjB,KAAK,CAACO,aAAa,CAACQ,mBAAmB,CAACnB,kBAAkB,CAACsB,IAAI,CAAC;IAEhE,OAAO,MAAM;MACXlB,KAAK,CAACO,aAAa,CAACY,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACf,aAAa,EAAEJ,KAAK,CAACO,aAAa,CAAC,CAAC;EAExCd,SAAS,CAAC,MAAM;IACdO,KAAK,CAACO,aAAa,CAACN,QAAQ,GAAGA,QAAQ;EACzC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEG;EAAc,CAAC;AAC1B,CAAC","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { useAnimatedStyle, withTiming } from 'react-native-reanimated';
4
+ import { VOICE_RECORDER_CONTAINER_SIZES } from "../../constants.js";
5
+ export const useVoiceRecorderAnimation = isExpanded => {
6
+ const containerAnimatedStyle = useAnimatedStyle(() => {
7
+ return {
8
+ height: withTiming(isExpanded ? VOICE_RECORDER_CONTAINER_SIZES.EXPANDED : VOICE_RECORDER_CONTAINER_SIZES.COLLAPSED, {
9
+ duration: 280
10
+ })
11
+ };
12
+ }, [isExpanded]);
13
+ return {
14
+ containerAnimatedStyle
15
+ };
16
+ };
17
+ //# sourceMappingURL=useVoiceRecorderAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAnimatedStyle","withTiming","VOICE_RECORDER_CONTAINER_SIZES","useVoiceRecorderAnimation","isExpanded","containerAnimatedStyle","height","EXPANDED","COLLAPSED","duration"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorderAnimation.ts"],"mappings":";;AAAA,SAASA,gBAAgB,EAAEC,UAAU,QAAQ,yBAAyB;AACtE,SAASC,8BAA8B,QAAQ,oBAAiB;AAEhE,OAAO,MAAMC,yBAAyB,GAAIC,UAAmB,IAAK;EAChE,MAAMC,sBAAsB,GAAGL,gBAAgB,CAAC,MAAM;IACpD,OAAO;MACLM,MAAM,EAAEL,UAAU,CAChBG,UAAU,GACNF,8BAA8B,CAACK,QAAQ,GACvCL,8BAA8B,CAACM,SAAS,EAC5C;QACEC,QAAQ,EAAE;MACZ,CACF;IACF,CAAC;EACH,CAAC,EAAE,CAACL,UAAU,CAAC,CAAC;EAEhB,OAAO;IAAEC;EAAuB,CAAC;AACnC,CAAC","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Button, ButtonColor, ButtonSize, ButtonVariant, SPACING } from '@magmamath/react-native-ui';
5
+ import { StyleSheet, View } from 'react-native';
6
+ import { useText } from "../../../../shared/translation/index.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const ModalFooterButtons = ({
9
+ onCancel,
10
+ onConfirm,
11
+ confirmLabel,
12
+ confirmColor = ButtonColor.BLUE
13
+ }) => {
14
+ const t = useText();
15
+ return /*#__PURE__*/_jsxs(View, {
16
+ style: styles.container,
17
+ children: [/*#__PURE__*/_jsx(Button, {
18
+ style: {
19
+ text: styles.buttonLabel
20
+ },
21
+ variant: ButtonVariant.TERTIARY,
22
+ size: ButtonSize.LARGE,
23
+ onPress: onCancel,
24
+ children: t('voice.cancel')
25
+ }), /*#__PURE__*/_jsx(Button, {
26
+ colorScheme: confirmColor,
27
+ variant: ButtonVariant.PRIMARY,
28
+ size: ButtonSize.LARGE,
29
+ onPress: onConfirm,
30
+ style: {
31
+ text: styles.buttonLabel
32
+ },
33
+ children: t(confirmLabel)
34
+ })]
35
+ });
36
+ };
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ flexDirection: 'row',
40
+ alignItems: 'center',
41
+ gap: SPACING[200]
42
+ },
43
+ buttonLabel: {
44
+ textTransform: 'uppercase'
45
+ }
46
+ });
47
+ //# sourceMappingURL=ModalFooterButtons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Button","ButtonColor","ButtonSize","ButtonVariant","SPACING","StyleSheet","View","useText","jsx","_jsx","jsxs","_jsxs","ModalFooterButtons","onCancel","onConfirm","confirmLabel","confirmColor","BLUE","t","style","styles","container","children","text","buttonLabel","variant","TERTIARY","size","LARGE","onPress","colorScheme","PRIMARY","create","flexDirection","alignItems","gap","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/ModalFooterButtons.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,WAAW,EAAEC,UAAU,EAAEC,aAAa,EAAEC,OAAO,QAAQ,4BAA4B;AACpG,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,yCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUxD,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,SAAS;EACTC,YAAY;EACZC,YAAY,GAAGf,WAAW,CAACgB;AACJ,CAAC,KAAK;EAC7B,MAAMC,CAAC,GAAGX,OAAO,CAAC,CAAC;EAEnB,oBACEI,KAAA,CAACL,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5Bb,IAAA,CAACT,MAAM;MACLmB,KAAK,EAAE;QAAEI,IAAI,EAAEH,MAAM,CAACI;MAAY,CAAE;MACpCC,OAAO,EAAEtB,aAAa,CAACuB,QAAS;MAChCC,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;MACvBC,OAAO,EAAEhB,QAAS;MAAAS,QAAA,EAEjBJ,CAAC,CAAC,cAAc;IAAC,CACZ,CAAC,eACTT,IAAA,CAACT,MAAM;MACL8B,WAAW,EAAEd,YAAa;MAC1BS,OAAO,EAAEtB,aAAa,CAAC4B,OAAQ;MAC/BJ,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;MACvBC,OAAO,EAAEf,SAAU;MACnBK,KAAK,EAAE;QAAEI,IAAI,EAAEH,MAAM,CAACI;MAAY,CAAE;MAAAF,QAAA,EAEnCJ,CAAC,CAACH,YAAY;IAAC,CACV,CAAC;EAAA,CACL,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGf,UAAU,CAAC2B,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE/B,OAAO,CAAC,GAAG;EAClB,CAAC;EACDoB,WAAW,EAAE;IACXY,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect } from 'react';
4
+ import { BaseModal, ButtonColor } from '@magmamath/react-native-ui';
5
+ import { StyleSheet } from 'react-native';
6
+ import { useUnit } from 'effector-react';
7
+ import { VoiceRecorderState } from "../../constants.js";
8
+ import { useText } from "../../../../shared/translation/index.js";
9
+ import { ModalFooterButtons } from "./ModalFooterButtons.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ export const VoiceRecordDeleteModal = ({
12
+ modal: {
13
+ closeModal,
14
+ params
15
+ }
16
+ }) => {
17
+ const t = useText();
18
+ const {
19
+ model
20
+ } = params;
21
+ const recorderState = useUnit(model.recorderModel.$voiceRecordState);
22
+ const handleDelete = () => {
23
+ if (recorderState === VoiceRecorderState.PAUSED) {
24
+ // if recording is paused, we need to start it again to ensure the recorder is in a consistent state before deletion
25
+ // without .record() browser still will use microphone
26
+ model.recorderModel.recorder.record();
27
+ setTimeout(() => {
28
+ model.stop();
29
+ model.deleteCurrentRecording();
30
+ }, 50);
31
+ closeModal();
32
+ return;
33
+ }
34
+ model.deleteCurrentRecording();
35
+ closeModal();
36
+ };
37
+ useEffect(() => {
38
+ if (recorderState === VoiceRecorderState.RECORDING) {
39
+ model.recorderModel.recorder.pause();
40
+ }
41
+ return () => {
42
+ if (model.recorderModel.$voiceRecordState.getState() === VoiceRecorderState.PAUSED) {
43
+ try {
44
+ model.recorderModel.recorder.record();
45
+ } catch (error) {
46
+ console.error(`Failed to resume recording: ${error}`);
47
+ }
48
+ }
49
+ };
50
+ }, []);
51
+ return /*#__PURE__*/_jsx(BaseModal, {
52
+ style: {
53
+ container: styles.modalContainer
54
+ },
55
+ header: t('voice.deleteRecording'),
56
+ content: t('voice.youWontBeAbleToRecover'),
57
+ footer: /*#__PURE__*/_jsx(ModalFooterButtons, {
58
+ onCancel: closeModal,
59
+ onConfirm: handleDelete,
60
+ confirmLabel: "voice.delete",
61
+ confirmColor: ButtonColor.RED
62
+ })
63
+ });
64
+ };
65
+ const styles = StyleSheet.create({
66
+ modalContainer: {
67
+ width: 600,
68
+ height: 268
69
+ }
70
+ });
71
+ //# sourceMappingURL=VoiceRecordDeleteModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","BaseModal","ButtonColor","StyleSheet","useUnit","VoiceRecorderState","useText","ModalFooterButtons","jsx","_jsx","VoiceRecordDeleteModal","modal","closeModal","params","t","model","recorderState","recorderModel","$voiceRecordState","handleDelete","PAUSED","recorder","record","setTimeout","stop","deleteCurrentRecording","RECORDING","pause","getState","error","console","style","container","styles","modalContainer","header","content","footer","onCancel","onConfirm","confirmLabel","confirmColor","RED","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordDeleteModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,SAAS,EAAEC,WAAW,QAAQ,4BAA4B;AACnE,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,kBAAkB,QAAQ,oBAAiB;AACpD,SAASC,OAAO,QAAQ,yCAAgC;AACxD,SAASC,kBAAkB,QAAQ,yBAAsB;AAAA,SAAAC,G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KAAK,EAAE;MACLC,SAAS,EAAEC,MAAM,CAACC;IACpB,CAAE;IACFC,MAAM,EAAErB,CAAC,CAAC,uBAAuB,CAAE;IACnCsB,OAAO,EAAEtB,CAAC,CAAC,8BAA8B,CAAE;IAC3CuB,MAAM,eACJ5B,IAAA,CAACF,kBAAkB;MACjB+B,QAAQ,EAAE1B,UAAW;MACrB2B,SAAS,EAAEpB,YAAa;MACxBqB,YAAY,EAAC,cAAc;MAC3BC,YAAY,EAAEvC,WAAW,CAACwC;IAAI,CAC/B;EACF,CACF,CAAC;AAEN,CAAC;AAED,MAAMT,MAAM,GAAG9B,UAAU,CAACwC,MAAM,CAAC;EAC/BT,cAAc,EAAE;IACdU,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { BaseModal } from '@magmamath/react-native-ui';
5
+ import { StyleSheet } from 'react-native';
6
+ import { useText } from "../../../../shared/translation/index.js";
7
+ import { ModalFooterButtons } from "./ModalFooterButtons.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ export const VoiceRecordUndoModal = ({
10
+ modal: {
11
+ closeModal,
12
+ params
13
+ }
14
+ }) => {
15
+ const t = useText();
16
+ const {
17
+ model
18
+ } = params;
19
+ const handleRedo = () => {
20
+ model.deleteCurrentRecording({
21
+ notification: false
22
+ });
23
+ closeModal();
24
+ model.initializeRecording();
25
+ };
26
+ return /*#__PURE__*/_jsx(BaseModal, {
27
+ style: {
28
+ container: styles.modalStyle
29
+ },
30
+ header: t('voice.redoRecording'),
31
+ content: t('voice.thisWillRemoveRecording'),
32
+ footer: /*#__PURE__*/_jsx(ModalFooterButtons, {
33
+ onCancel: closeModal,
34
+ onConfirm: handleRedo,
35
+ confirmLabel: "voice.redo"
36
+ })
37
+ });
38
+ };
39
+ const styles = StyleSheet.create({
40
+ modalStyle: {
41
+ width: 600,
42
+ height: 268
43
+ }
44
+ });
45
+ //# sourceMappingURL=VoiceRecordUndoModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","BaseModal","StyleSheet","useText","ModalFooterButtons","jsx","_jsx","VoiceRecordUndoModal","modal","closeModal","params","t","model","handleRedo","deleteCurrentRecording","notification","initializeRecording","style","container","styles","modalStyle","header","content","footer","onCancel","onConfirm","confirmLabel","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordUndoModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,OAAO,QAAQ,yCAAgC;AACxD,SAASC,kBAAkB,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUzD,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACH,CAAC,KAAK;EAC/B,MAAMC,CAAC,GAAGR,OAAO,CAAC,CAAC;EACnB,MAAM;IAAES;EAAM,CAAC,GAAGF,MAAM;EAExB,MAAMG,UAAU,GAAGA,CAAA,KAAM;IACvBD,KAAK,CAACE,sBAAsB,CAAC;MAAEC,YAAY,EAAE;IAAM,CAAC,CAAC;IACrDN,UAAU,CAAC,CAAC;IACZG,KAAK,CAACI,mBAAmB,CAAC,CAAC;EAC7B,CAAC;EAED,oBACEV,IAAA,CAACL,SAAS;IACRgB,KAAK,EAAE;MACLC,SAAS,EAAEC,MAAM,CAACC;IACpB,CAAE;IACFC,MAAM,EAAEV,CAAC,CAAC,qBAAqB,CAAE;IACjCW,OAAO,EAAEX,CAAC,CAAC,+BAA+B,CAAE;IAC5CY,MAAM,eACJjB,IAAA,CAACF,kBAAkB;MACjBoB,QAAQ,EAAEf,UAAW;MACrBgB,SAAS,EAAEZ,UAAW;MACtBa,YAAY,EAAC;IAAY,CAC1B;EACF,CACF,CAAC;AAEN,CAAC;AAED,MAAMP,MAAM,GAAGjB,UAAU,CAACyB,MAAM,CAAC;EAC/BP,UAAU,EAAE;IACVQ,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import { createEffect, createEvent, restore } from 'effector';
4
+ import { setAudioModeAsync } from 'expo-audio';
5
+ import { VoiceRecorderState } from "../../constants.js";
6
+ const AUDIO_MODE_CONFIG = {
7
+ playsInSilentMode: true,
8
+ allowsRecording: true
9
+ };
10
+ export class RecorderModel {
11
+ stopResolver = null;
12
+ reset = createEvent();
13
+ setVoiceRecordState = createEvent();
14
+ setAvailableInputs = createEvent();
15
+ setLastKnownDurationMs = createEvent();
16
+ $voiceRecordState = restore(this.setVoiceRecordState, VoiceRecorderState.IDLE).reset(this.reset);
17
+ $availableInputs = restore(this.setAvailableInputs, []);
18
+ $lastKnownDurationMs = restore(this.setLastKnownDurationMs, 0).reset(this.reset);
19
+ start = createEffect(async () => {
20
+ try {
21
+ await setAudioModeAsync(AUDIO_MODE_CONFIG);
22
+ await this.recorder.prepareToRecordAsync();
23
+ this.recorder.record();
24
+ } catch (error) {
25
+ console.error('Error starting recording:', error);
26
+ throw error;
27
+ }
28
+ });
29
+ stop = createEffect(() => {
30
+ if (!this.recorder.getStatus().isRecording) return;
31
+ return this.recorder.stop();
32
+ });
33
+ stopAndAwaitResult() {
34
+ return new Promise(resolve => {
35
+ this.stopResolver = resolve;
36
+ this.recorder.getStatus().isRecording && this.recorder.stop();
37
+ });
38
+ }
39
+ resolveRecord(result) {
40
+ if (this.stopResolver) {
41
+ this.stopResolver(result);
42
+ this.stopResolver = null;
43
+ }
44
+ }
45
+ clearStopResolver() {
46
+ this.stopResolver = null;
47
+ }
48
+ }
49
+ //# sourceMappingURL=Recorder.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","createEvent","restore","setAudioModeAsync","VoiceRecorderState","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","$voiceRecordState","IDLE","$availableInputs","$lastKnownDurationMs","start","recorder","prepareToRecordAsync","record","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAC7D,SAAwBC,iBAAiB,QAAQ,YAAY;AAC7D,SAASC,kBAAkB,QAAQ,oBAAiB;AAGpD,MAAMC,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIV,OAAO,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAGT,WAAW,CAAC,CAAC;EACrBU,mBAAmB,GAAGV,WAAW,CAAqB,CAAC;EACvDW,kBAAkB,GAAGX,WAAW,CAAuB,CAAC;EACxDY,sBAAsB,GAAGZ,WAAW,CAAS,CAAC;EAE9Ca,iBAAiB,GAAGZ,OAAO,CACzC,IAAI,CAACS,mBAAmB,EACxBP,kBAAkB,CAACW,IACrB,CAAC,CAACL,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACHM,gBAAgB,GAAGd,OAAO,CAAC,IAAI,CAACU,kBAAkB,EAAE,EAAE,CAAC;EACvDK,oBAAoB,GAAGf,OAAO,CAAC,IAAI,CAACW,sBAAsB,EAAE,CAAC,CAAC,CAACH,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAEhFQ,KAAK,GAAGlB,YAAY,CAAC,YAAY;IAC/C,IAAI;MACF,MAAMG,iBAAiB,CAACE,iBAAiB,CAAC;MAC1C,MAAM,IAAI,CAACc,QAAQ,CAACC,oBAAoB,CAAC,CAAC;MAC1C,IAAI,CAACD,QAAQ,CAACE,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC,OAAOC,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,2BAA2B,EAAEA,KAAK,CAAC;MACjD,MAAMA,KAAK;IACb;EACF,CAAC,CAAC;EAEcE,IAAI,GAAGxB,YAAY,CAAC,MAAM;IACxC,IAAI,CAAC,IAAI,CAACmB,QAAQ,CAACM,SAAS,CAAC,CAAC,CAACC,WAAW,EAAE;IAC5C,OAAO,IAAI,CAACP,QAAQ,CAACK,IAAI,CAAC,CAAC;EAC7B,CAAC,CAAC;EAEKG,kBAAkBA,CAAA,EAAe;IACtC,OAAO,IAAIC,OAAO,CAAEC,OAAO,IAAK;MAC9B,IAAI,CAACpB,YAAY,GAAGoB,OAAO;MAC3B,IAAI,CAACV,QAAQ,CAACM,SAAS,CAAC,CAAC,CAACC,WAAW,IAAI,IAAI,CAACP,QAAQ,CAACK,IAAI,CAAC,CAAC;IAC/D,CAAC,CAAC;EACJ;EAEOM,aAAaA,CAACC,MAAS,EAAQ;IACpC,IAAI,IAAI,CAACtB,YAAY,EAAE;MACrB,IAAI,CAACA,YAAY,CAACsB,MAAM,CAAC;MACzB,IAAI,CAACtB,YAAY,GAAG,IAAI;IAC1B;EACF;EAEOuB,iBAAiBA,CAAA,EAAS;IAC/B,IAAI,CAACvB,YAAY,GAAG,IAAI;EAC1B;AACF","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ import { createEffect } from 'effector';
4
+ import { generateAudioFormData, uploadAudioFileRequestGenerator } from "../../helpers.js";
5
+ export class UploaderModel {
6
+ setApi = api => {
7
+ this.api = api;
8
+ };
9
+ upload = createEffect(async ({
10
+ uri,
11
+ fileName,
12
+ durationMs
13
+ }) => {
14
+ const formData = await generateAudioFormData({
15
+ audioFileUri: uri,
16
+ durationMs,
17
+ fileName
18
+ });
19
+ const {
20
+ uploadAudio,
21
+ controller
22
+ } = uploadAudioFileRequestGenerator(formData, this.api);
23
+ const uploadPromise = uploadAudio();
24
+ const collectionItem = {
25
+ durationMs,
26
+ audioUploadPromise: uploadPromise,
27
+ controller,
28
+ uri
29
+ };
30
+ return {
31
+ collectionItem,
32
+ uploadPromise
33
+ };
34
+ });
35
+ abortUpload = controller => {
36
+ controller?.abort();
37
+ };
38
+ }
39
+ //# sourceMappingURL=Uploader.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","generateAudioFormData","uploadAudioFileRequestGenerator","UploaderModel","setApi","api","upload","uri","fileName","durationMs","formData","audioFileUri","uploadAudio","controller","uploadPromise","collectionItem","audioUploadPromise","abortUpload","abort"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Uploader.model.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,UAAU;AAEvC,SAASC,qBAAqB,EAAEC,+BAA+B,QAAQ,kBAAe;AAatF,OAAO,MAAMC,aAAa,CAAC;EAGTC,MAAM,GAAIC,GAAqB,IAAK;IAClD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,MAAM,GAAGN,YAAY,CACnC,OAAO;IAAEO,GAAG;IAAEC,QAAQ;IAAEC;EAAyB,CAAC,KAA4B;IAC5E,MAAMC,QAAQ,GAAG,MAAMT,qBAAqB,CAAC;MAC3CU,YAAY,EAAEJ,GAAG;MACjBE,UAAU;MACVD;IACF,CAAC,CAAC;IAEF,MAAM;MAAEI,WAAW;MAAEC;IAAW,CAAC,GAAGX,+BAA+B,CAACQ,QAAQ,EAAE,IAAI,CAACL,GAAG,CAAC;IACvF,MAAMS,aAAa,GAAGF,WAAW,CAAC,CAAC;IAEnC,MAAMG,cAAyC,GAAG;MAChDN,UAAU;MACVO,kBAAkB,EAAEF,aAAa;MACjCD,UAAU;MACVN;IACF,CAAC;IAED,OAAO;MAAEQ,cAAc;MAAED;IAAc,CAAC;EAC1C,CACF,CAAC;EAEeG,WAAW,GAAIJ,UAA4B,IAAK;IAC9DA,UAAU,EAAEK,KAAK,CAAC,CAAC;EACrB,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+
3
+ import { attach, combine, createEffect, createEvent, restore, sample } from 'effector';
4
+ import { RecorderModel } from "./Recorder.model.js";
5
+ import { VoiceRecordsCollection } from "./VoiceRecordCollection.js";
6
+ import { UploaderModel } from "./Uploader.model.js";
7
+ import { VoiceRecorderState } from "../../constants.js";
8
+ import { ensureRecordingPermissions, getAvailableInputs } from "../../helpers.js";
9
+ import { t } from "../../../../shared/translation/index.js";
10
+ export class VoiceRecordModel {
11
+ recorderModel = new RecorderModel();
12
+ collection = new VoiceRecordsCollection();
13
+ uploader = new UploaderModel();
14
+ shouldDiscardRecording = false;
15
+ setCurrentKey = createEvent();
16
+ setCurrentRecord = createEvent();
17
+ reset = createEvent();
18
+ setIsButtonDisabled = createEvent();
19
+ startAudioUpload = createEvent();
20
+ $currentKey = restore(this.setCurrentKey, '');
21
+ $currentRecord = restore(this.setCurrentRecord, null).reset(this.reset);
22
+ $isButtonDisabled = restore(this.setIsButtonDisabled, false);
23
+ $isExpanded = combine(this.recorderModel.$voiceRecordState, this.$currentRecord, (recorderState, currentRecord) => {
24
+ if (recorderState !== VoiceRecorderState.IDLE || currentRecord) return true;
25
+ return false;
26
+ });
27
+ deleteAudioRecord = createEffect(async audioFileId => {
28
+ await this.api.deleteAudioFile(audioFileId);
29
+ });
30
+ deleteCurrentRecording = attach({
31
+ source: this.$currentKey,
32
+ mapParams: (props, currentKey) => ({
33
+ notification: true,
34
+ ...props,
35
+ currentKey
36
+ }),
37
+ effect: createEffect(({
38
+ currentKey,
39
+ notification
40
+ }) => {
41
+ const recordingItem = this.collection.get(currentKey);
42
+ if (recordingItem?.id) {
43
+ this.deleteAudioRecord(recordingItem.id);
44
+ }
45
+ this.abortUploadIfInProgress(recordingItem);
46
+ this.resetRecordingState(currentKey);
47
+ if (notification) {
48
+ this.notification.success(t('voice.recordingDeleted'));
49
+ }
50
+ })
51
+ });
52
+ initializeRecording = attach({
53
+ source: this.$currentRecord,
54
+ effect: createEffect(async currentRecord => {
55
+ if (currentRecord) {
56
+ this.deleteCurrentRecording({
57
+ notification: false
58
+ });
59
+ }
60
+ const hasPermissions = await ensureRecordingPermissions();
61
+ if (!hasPermissions) {
62
+ this.notification.error(t('voice.noMicrophoneAccess'));
63
+ return;
64
+ }
65
+ const inputs = await getAvailableInputs(this.recorderModel.recorder);
66
+ this.recorderModel.setAvailableInputs(inputs);
67
+ if (inputs.length === 0) {
68
+ this.notification.error(t('voice.noMicrophoneFound'));
69
+ return;
70
+ }
71
+ return this.recorderModel.start().catch(error => {
72
+ if (error.name === 'NotAllowedError') {
73
+ this.notification.error(t('voice.noMicrophoneAccessBySystem'));
74
+ }
75
+ });
76
+ })
77
+ });
78
+ stop = createEffect(async () => {
79
+ this.shouldDiscardRecording = true;
80
+ await this.recorderModel.stop();
81
+ this.recorderModel.clearStopResolver();
82
+ this.recorderModel.reset();
83
+ });
84
+ cleanup = async () => {
85
+ if (this.recorderModel.recorder.getStatus().isRecording) {
86
+ await this.recorderModel.recorder.stop();
87
+ }
88
+ this.recorderModel.reset();
89
+ };
90
+ recordingStatusUpdate = status => {
91
+ if (status.error) {
92
+ this.notification.error(`Recorder error: ${status.error}`);
93
+ this.recorderModel.clearStopResolver();
94
+ this.shouldDiscardRecording = false;
95
+ return;
96
+ }
97
+ if (status.isFinished && status.url) {
98
+ if (!this.shouldDiscardRecording) {
99
+ this.startAudioUpload(status.url);
100
+ }
101
+ this.shouldDiscardRecording = false;
102
+ }
103
+ };
104
+ getRecordingItem = attach({
105
+ source: this.recorderModel.$voiceRecordState,
106
+ mapParams: (key, recorderState) => ({
107
+ key,
108
+ recorderState
109
+ }),
110
+ effect: createEffect(async ({
111
+ key,
112
+ recorderState
113
+ }) => {
114
+ try {
115
+ const isRecording = recorderState === VoiceRecorderState.RECORDING;
116
+ if (isRecording) {
117
+ return await this.recorderModel.stopAndAwaitResult();
118
+ }
119
+ return this.collection.get(key);
120
+ } catch (error) {
121
+ console.error(`Failed to get recording item: ${error}`);
122
+ this.notification.error(t('voice.uploadFailed'));
123
+ return undefined;
124
+ }
125
+ })
126
+ });
127
+ abortUploadIfInProgress(recordingItem) {
128
+ if (!recordingItem?.id && recordingItem?.controller) {
129
+ this.uploader.abortUpload(recordingItem.controller);
130
+ }
131
+ }
132
+ resetRecordingState(currentKey) {
133
+ this.recorderModel.reset();
134
+ this.reset();
135
+ this.collection.delete(currentKey);
136
+ }
137
+ handleAudioUpload = createEffect(async ({
138
+ uri,
139
+ currentKey,
140
+ durationMs
141
+ }) => {
142
+ const {
143
+ collectionItem,
144
+ uploadPromise
145
+ } = await this.uploader.upload({
146
+ uri,
147
+ fileName: currentKey,
148
+ durationMs
149
+ });
150
+ this.collection.add(currentKey, collectionItem);
151
+ this.setCurrentRecord(collectionItem);
152
+ this.recorderModel.resolveRecord(collectionItem);
153
+ uploadPromise.then(data => {
154
+ if (this.collection.get(currentKey)) {
155
+ this.collection.update(currentKey, {
156
+ id: data.id
157
+ });
158
+ }
159
+ }).catch(error => {
160
+ if (error.name === 'CanceledError') return;
161
+ this.collection.delete(currentKey);
162
+ this.reset();
163
+ this.notification.error(t('voice.uploadFailed'));
164
+ });
165
+ return uploadPromise;
166
+ });
167
+ setupUploadHandler() {
168
+ sample({
169
+ clock: this.startAudioUpload,
170
+ source: {
171
+ currentKey: this.$currentKey,
172
+ durationMs: this.recorderModel.$lastKnownDurationMs
173
+ },
174
+ filter: ({
175
+ currentKey
176
+ }, uri) => !!uri && !!currentKey,
177
+ fn: ({
178
+ currentKey,
179
+ durationMs
180
+ }, uri) => ({
181
+ currentKey,
182
+ durationMs,
183
+ uri
184
+ }),
185
+ target: this.handleAudioUpload
186
+ });
187
+ }
188
+ setupCurrentRecordSync() {
189
+ sample({
190
+ source: this.$currentKey,
191
+ fn: currentKey => this.collection.get(currentKey),
192
+ target: createEffect(recordingItem => {
193
+ if (!recordingItem) {
194
+ this.reset();
195
+ return;
196
+ }
197
+ this.setCurrentRecord(recordingItem);
198
+ })
199
+ });
200
+ }
201
+ recorderButtonHandler = attach({
202
+ source: {
203
+ currentKey: this.$currentKey,
204
+ recorderState: this.recorderModel.$voiceRecordState
205
+ },
206
+ effect: createEffect(({
207
+ currentKey,
208
+ recorderState
209
+ }) => {
210
+ if (recorderState === VoiceRecorderState.RECORDING) {
211
+ this.recorderModel.stop();
212
+ return;
213
+ }
214
+ if (this.collection.get(currentKey)) {
215
+ this.events.undoRecord();
216
+ return;
217
+ }
218
+ this.initializeRecording();
219
+ })
220
+ });
221
+ constructor({
222
+ api,
223
+ notification,
224
+ events
225
+ }) {
226
+ this.api = api;
227
+ this.notification = notification;
228
+ this.events = events;
229
+ this.uploader.setApi(api);
230
+ this.setupUploadHandler();
231
+ this.setupCurrentRecordSync();
232
+ }
233
+ }
234
+ //# sourceMappingURL=VoiceRecord.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["attach","combine","createEffect","createEvent","restore","sample","RecorderModel","VoiceRecordsCollection","UploaderModel","VoiceRecorderState","ensureRecordingPermissions","getAvailableInputs","t","VoiceRecordModel","recorderModel","collection","uploader","shouldDiscardRecording","setCurrentKey","setCurrentRecord","reset","setIsButtonDisabled","startAudioUpload","$currentKey","$currentRecord","$isButtonDisabled","$isExpanded","$voiceRecordState","recorderState","currentRecord","IDLE","deleteAudioRecord","audioFileId","api","deleteAudioFile","deleteCurrentRecording","source","mapParams","props","currentKey","notification","effect","recordingItem","get","id","abortUploadIfInProgress","resetRecordingState","success","initializeRecording","hasPermissions","error","inputs","recorder","setAvailableInputs","length","start","catch","name","stop","clearStopResolver","cleanup","getStatus","isRecording","recordingStatusUpdate","status","isFinished","url","getRecordingItem","key","RECORDING","stopAndAwaitResult","console","undefined","controller","abortUpload","delete","handleAudioUpload","uri","durationMs","collectionItem","uploadPromise","upload","fileName","add","resolveRecord","then","data","update","setupUploadHandler","clock","$lastKnownDurationMs","filter","fn","target","setupCurrentRecordSync","recorderButtonHandler","events","undoRecord","constructor","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nB,kBAAkB,CAAC4D,SAAS,EAAE;QAClD,IAAI,CAACvD,aAAa,CAAC4C,IAAI,CAAC,CAAC;QACzB;MACF;MACA,IAAI,IAAI,CAAC3C,UAAU,CAAC4B,GAAG,CAACJ,UAAU,CAAC,EAAE;QACnC,IAAI,CAACyD,MAAM,CAACC,UAAU,CAAC,CAAC;QACxB;MACF;MAEA,IAAI,CAACjD,mBAAmB,CAAC,CAAC;IAC5B,CAAC;EACH,CAAC,CAAC;EAEFkD,WAAWA,CAAC;IAAEjE,GAAG;IAAEO,YAAY;IAAEwD;EAA+B,CAAC,EAAE;IACjE,IAAI,CAAC/D,GAAG,GAAGA,GAAG;IACd,IAAI,CAACO,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACwD,MAAM,GAAGA,MAAM;IACpB,IAAI,CAAChF,QAAQ,CAACmF,MAAM,CAAClE,GAAG,CAAC;IAEzB,IAAI,CAACuD,kBAAkB,CAAC,CAAC;IACzB,IAAI,CAACM,sBAAsB,CAAC,CAAC;EAC/B;AACF","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ export class VoiceRecordsCollection {
4
+ collection = new Map();
5
+ add(key, item) {
6
+ this.collection.set(key, item);
7
+ }
8
+ update(key, item) {
9
+ const existingItem = this.collection.get(key) || {};
10
+ this.collection.set(key, {
11
+ ...existingItem,
12
+ ...item
13
+ });
14
+ }
15
+ delete(key) {
16
+ this.collection.delete(key);
17
+ }
18
+ get(key) {
19
+ return this.collection.get(key);
20
+ }
21
+ clear() {
22
+ this.collection.clear();
23
+ }
24
+ }
25
+ //# sourceMappingURL=VoiceRecordCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["VoiceRecordsCollection","collection","Map","add","key","item","set","update","existingItem","get","delete","clear"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/VoiceRecordCollection.ts"],"mappings":";;AAEA,OAAO,MAAMA,sBAAsB,CAAC;EAClBC,UAAU,GAA2C,IAAIC,GAAG,CAAC,CAAC;EAEvEC,GAAGA,CAACC,GAAW,EAAEC,IAA+B,EAAE;IACvD,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACF,GAAG,EAAEC,IAAI,CAAC;EAChC;EAEOE,MAAMA,CAACH,GAAW,EAAEC,IAAwC,EAAE;IACnE,MAAMG,YAAY,GAAG,IAAI,CAACP,UAAU,CAACQ,GAAG,CAACL,GAAG,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAACH,UAAU,CAACK,GAAG,CAACF,GAAG,EAAE;MAAE,GAAGI,YAAY;MAAE,GAAGH;IAAK,CAAC,CAAC;EACxD;EAEOK,MAAMA,CAACN,GAAW,EAAE;IACzB,IAAI,CAACH,UAAU,CAACS,MAAM,CAACN,GAAG,CAAC;EAC7B;EAEOK,GAAGA,CAACL,GAAW,EAAE;IACtB,OAAO,IAAI,CAACH,UAAU,CAACQ,GAAG,CAACL,GAAG,CAAC;EACjC;EAEOO,KAAKA,CAAA,EAAG;IACb,IAAI,CAACV,UAAU,CAACU,KAAK,CAAC,CAAC;EACzB;AACF","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+
3
+ export { VoiceRecordModel } from "./VoiceRecord.model.js";
4
+ export { VoiceRecordsCollection } from "./VoiceRecordCollection.js";
5
+ export { RecorderModel } from "./Recorder.model.js";
6
+ export { UploaderModel } from "./Uploader.model.js";
7
+ //# sourceMappingURL=index.js.map