@magmamath/students-features 0.11.0-rc.8 → 1.0.0

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 (500) hide show
  1. package/dist/commonjs/features/chatbot/components/Chat/Chat.js +49 -139
  2. package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +58 -43
  4. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -3
  6. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  7. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  8. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  9. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  10. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  11. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  13. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +36 -11
  14. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  15. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
  16. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  17. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +20 -14
  18. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  19. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  20. package/dist/commonjs/features/chatbot/components/Chatbot.js +12 -22
  21. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/constants.js +4 -4
  23. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/helpers.js +1 -8
  25. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  27. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +10 -46
  28. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  29. package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
  30. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
  31. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -9
  32. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  33. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  34. package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
  35. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
  36. package/dist/commonjs/features/voice/constants.js +23 -0
  37. package/dist/commonjs/features/voice/constants.js.map +1 -0
  38. package/dist/commonjs/features/voice/helpers.js +208 -0
  39. package/dist/commonjs/features/voice/helpers.js.map +1 -0
  40. package/dist/commonjs/features/voice/index.js +105 -0
  41. package/dist/commonjs/features/voice/index.js.map +1 -0
  42. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
  43. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
  44. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +215 -0
  45. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  46. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
  47. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  48. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
  49. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  50. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  51. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  52. package/dist/commonjs/features/voice/playing/model/Player.model.js +98 -0
  53. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
  54. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
  55. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  56. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +39 -0
  57. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
  58. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +223 -0
  59. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  60. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
  61. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  62. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
  63. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  64. package/dist/commonjs/features/voice/playing/model/index.js +20 -0
  65. package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
  66. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
  67. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
  68. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +63 -0
  69. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  70. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
  71. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  72. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +27 -0
  73. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
  74. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
  75. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  76. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
  77. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  78. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
  79. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  80. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
  81. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  82. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
  83. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  84. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
  85. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  86. package/dist/commonjs/features/voice/recording/model/Recorder.model.js +55 -0
  87. package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
  88. package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
  89. package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
  90. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +248 -0
  91. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  92. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
  93. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  94. package/dist/commonjs/features/voice/types.js +6 -0
  95. package/dist/commonjs/features/voice/types.js.map +1 -0
  96. package/dist/commonjs/index.js +12 -0
  97. package/dist/commonjs/index.js.map +1 -1
  98. package/dist/commonjs/shared/components/PlayButton.js +70 -0
  99. package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
  100. package/dist/commonjs/shared/translation/localization/ca.json +17 -0
  101. package/dist/commonjs/shared/translation/localization/de.json +17 -0
  102. package/dist/commonjs/shared/translation/localization/en.json +17 -0
  103. package/dist/commonjs/shared/translation/localization/gb.json +17 -0
  104. package/dist/commonjs/shared/translation/localization/sct.json +17 -0
  105. package/dist/commonjs/shared/translation/localization/sw.json +17 -0
  106. package/dist/module/features/chatbot/components/Chat/Chat.js +51 -141
  107. package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
  108. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +59 -45
  109. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  110. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -3
  111. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  112. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  113. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  114. package/dist/module/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  115. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  116. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  117. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  118. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +38 -14
  119. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  120. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
  121. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  122. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +21 -15
  123. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  124. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  125. package/dist/module/features/chatbot/components/Chatbot.js +11 -20
  126. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  127. package/dist/module/features/chatbot/constants.js +5 -5
  128. package/dist/module/features/chatbot/constants.js.map +1 -1
  129. package/dist/module/features/chatbot/helpers.js +1 -8
  130. package/dist/module/features/chatbot/helpers.js.map +1 -1
  131. package/dist/module/features/chatbot/index.js.map +1 -1
  132. package/dist/module/features/chatbot/model/ChatBotModel.js +10 -46
  133. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  134. package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
  135. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
  136. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -9
  137. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  138. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  139. package/dist/module/features/gifCelebrations/helpers.js +1 -0
  140. package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
  141. package/dist/module/features/voice/constants.js +19 -0
  142. package/dist/module/features/voice/constants.js.map +1 -0
  143. package/dist/module/features/voice/helpers.js +191 -0
  144. package/dist/module/features/voice/helpers.js.map +1 -0
  145. package/dist/module/features/voice/index.js +12 -0
  146. package/dist/module/features/voice/index.js.map +1 -0
  147. package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
  148. package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
  149. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
  150. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  151. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
  152. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  153. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
  154. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  155. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  156. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  157. package/dist/module/features/voice/playing/model/Player.model.js +93 -0
  158. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
  159. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
  160. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  161. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +34 -0
  162. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
  163. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +218 -0
  164. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  165. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
  166. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  167. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
  168. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  169. package/dist/module/features/voice/playing/model/index.js +5 -0
  170. package/dist/module/features/voice/playing/model/index.js.map +1 -0
  171. package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
  172. package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
  173. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +57 -0
  174. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  175. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
  176. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  177. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js +21 -0
  178. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
  179. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
  180. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  181. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
  182. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  183. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
  184. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  185. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
  186. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  187. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
  188. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  189. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
  190. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  191. package/dist/module/features/voice/recording/model/Recorder.model.js +50 -0
  192. package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
  193. package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
  194. package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
  195. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +244 -0
  196. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  197. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
  198. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  199. package/dist/module/features/voice/types.js +4 -0
  200. package/dist/module/features/voice/types.js.map +1 -0
  201. package/dist/module/index.js +1 -0
  202. package/dist/module/index.js.map +1 -1
  203. package/dist/module/shared/components/PlayButton.js +64 -0
  204. package/dist/module/shared/components/PlayButton.js.map +1 -0
  205. package/dist/module/shared/translation/localization/ca.json +17 -0
  206. package/dist/module/shared/translation/localization/de.json +17 -0
  207. package/dist/module/shared/translation/localization/en.json +17 -0
  208. package/dist/module/shared/translation/localization/gb.json +17 -0
  209. package/dist/module/shared/translation/localization/sct.json +17 -0
  210. package/dist/module/shared/translation/localization/sw.json +17 -0
  211. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +1 -2
  212. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  213. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
  214. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  215. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  217. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
  218. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +6 -1
  221. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  223. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  225. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +1 -2
  227. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
  229. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -2
  232. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -2
  234. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
  236. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  237. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +17 -19
  238. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  239. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +13 -7
  240. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -1
  242. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/features/voice/constants.d.ts +16 -0
  245. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
  246. package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
  247. package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
  248. package/dist/typescript/commonjs/features/voice/index.d.ts +10 -0
  249. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
  250. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  251. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  252. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  253. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  254. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  255. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  257. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  258. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  259. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  260. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +23 -0
  261. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
  262. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  263. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
  265. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
  266. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  267. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
  269. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  271. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  272. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +3 -0
  273. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
  274. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  275. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  276. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  277. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  278. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  279. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  280. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
  281. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
  282. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  283. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  284. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  285. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  286. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  287. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  288. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  289. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  290. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  291. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  292. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  293. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  294. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
  295. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  296. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
  297. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  299. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  300. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  301. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  302. package/dist/typescript/commonjs/features/voice/types.d.ts +72 -0
  303. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
  304. package/dist/typescript/commonjs/index.d.ts +1 -0
  305. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  306. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
  307. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
  308. package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
  309. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  310. package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
  311. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  312. package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
  313. package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
  314. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +1 -2
  315. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  316. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
  317. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  318. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  319. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  320. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
  321. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  322. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  323. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +6 -1
  324. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  325. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  326. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  327. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  328. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  329. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +1 -2
  330. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  331. package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
  332. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  333. package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
  334. package/dist/typescript/module/features/chatbot/index.d.ts +2 -2
  335. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  336. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -2
  337. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  338. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
  339. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  340. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +17 -19
  341. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  342. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +13 -7
  343. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  344. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -1
  345. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
  346. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
  347. package/dist/typescript/module/features/voice/constants.d.ts +16 -0
  348. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
  349. package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
  350. package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
  351. package/dist/typescript/module/features/voice/index.d.ts +10 -0
  352. package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
  353. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  354. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  355. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  356. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  357. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  358. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  359. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  360. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  361. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  362. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  363. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +23 -0
  364. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
  365. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  366. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  367. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
  368. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
  369. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  370. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  371. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
  372. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  373. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  374. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  375. package/dist/typescript/module/features/voice/playing/model/index.d.ts +3 -0
  376. package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
  377. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  378. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  379. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  380. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  381. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  382. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  383. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
  384. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
  385. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  386. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  387. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  388. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  389. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  390. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  391. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  392. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  393. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  394. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  395. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  396. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  397. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
  398. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  399. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
  400. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  401. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  402. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  403. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  404. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  405. package/dist/typescript/module/features/voice/types.d.ts +72 -0
  406. package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
  407. package/dist/typescript/module/index.d.ts +1 -0
  408. package/dist/typescript/module/index.d.ts.map +1 -1
  409. package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
  410. package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
  411. package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
  412. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  413. package/dist/typescript/module/shared/translation/model.d.ts +34 -0
  414. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  415. package/dist/typescript/module/types/common.types.d.ts +3 -0
  416. package/dist/typescript/module/types/common.types.d.ts.map +1 -1
  417. package/package.json +11 -4
  418. package/src/features/chatbot/components/Chat/Chat.tsx +69 -192
  419. package/src/features/chatbot/components/ChatControls/ChatControls.tsx +66 -44
  420. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -3
  421. package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +2 -2
  422. package/src/features/chatbot/components/ChatInput/FreeText/SendMessageButton.tsx +1 -1
  423. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
  424. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -0
  425. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
  426. package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +35 -11
  427. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
  428. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +17 -11
  429. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +1 -1
  430. package/src/features/chatbot/components/Chatbot.tsx +11 -21
  431. package/src/features/chatbot/constants.ts +4 -4
  432. package/src/features/chatbot/helpers.ts +0 -3
  433. package/src/features/chatbot/index.ts +2 -16
  434. package/src/features/chatbot/model/ChatBotModel.ts +8 -51
  435. package/src/features/chatbot/model/ChatbotApi.ts +1 -1
  436. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -7
  437. package/src/features/chatbot/types/api.types.ts +17 -17
  438. package/src/features/chatbot/types/model.types.ts +15 -7
  439. package/src/features/chatbot/types/units.types.ts +0 -1
  440. package/src/features/gifCelebrations/helpers.ts +1 -0
  441. package/src/features/voice/constants.ts +15 -0
  442. package/src/features/voice/helpers.ts +251 -0
  443. package/src/features/voice/index.ts +11 -0
  444. package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
  445. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +251 -0
  446. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
  447. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
  448. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  449. package/src/features/voice/playing/model/Player.model.ts +104 -0
  450. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
  451. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +42 -0
  452. package/src/features/voice/playing/model/VoicePlayer.model.ts +255 -0
  453. package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +40 -0
  454. package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +11 -0
  455. package/src/features/voice/playing/model/index.ts +2 -0
  456. package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
  457. package/src/features/voice/recording/components/VoiceRecordButton.tsx +64 -0
  458. package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
  459. package/src/features/voice/recording/components/VoiceRecordDivider.tsx +17 -0
  460. package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
  461. package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
  462. package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
  463. package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
  464. package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
  465. package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
  466. package/src/features/voice/recording/model/Recorder.model.ts +63 -0
  467. package/src/features/voice/recording/model/Uploader.model.ts +48 -0
  468. package/src/features/voice/recording/model/VoiceRecord.model.ts +302 -0
  469. package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
  470. package/src/features/voice/types.ts +84 -0
  471. package/src/index.ts +1 -0
  472. package/src/shared/components/PlayButton.tsx +84 -0
  473. package/src/shared/translation/localization/ca.json +17 -0
  474. package/src/shared/translation/localization/de.json +17 -0
  475. package/src/shared/translation/localization/en.json +17 -0
  476. package/src/shared/translation/localization/gb.json +17 -0
  477. package/src/shared/translation/localization/sct.json +17 -0
  478. package/src/shared/translation/localization/sw.json +17 -0
  479. package/src/types/common.types.ts +1 -0
  480. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  481. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js +0 -39
  482. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js.map +0 -1
  483. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -43
  484. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
  485. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  486. package/dist/module/features/chatbot/components/Chat/CloseButton.js +0 -33
  487. package/dist/module/features/chatbot/components/Chat/CloseButton.js.map +0 -1
  488. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -40
  489. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
  490. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
  491. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
  492. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
  493. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
  494. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
  495. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
  496. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
  497. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
  498. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  499. package/src/features/chatbot/components/Chat/CloseButton.tsx +0 -31
  500. package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +0 -38
@@ -0,0 +1,251 @@
1
+ import { IS_MOBILE, IS_WEB } from '@magmamath/react-native-ui'
2
+ import {
3
+ AudioPlayer,
4
+ AudioRecorder,
5
+ createAudioPlayer,
6
+ getRecordingPermissionsAsync,
7
+ requestRecordingPermissionsAsync,
8
+ } from 'expo-audio'
9
+ import * as FileSystem from 'expo-file-system'
10
+ import { VoicePlayerApi, VoiceRecorderApi } from './types'
11
+ import { VOICE_RECORDER_MAX_DURATION_MS } from './constants'
12
+ import { PlayerState } from './playing/model'
13
+ import { AudioStatus } from '../chatbot'
14
+ import { AxiosResponse } from 'axios'
15
+
16
+ export const formatDuration = (ms: number): string => {
17
+ const totalSeconds = Math.floor(ms / 1000)
18
+ const minutes = Math.floor(totalSeconds / 60)
19
+ const seconds = totalSeconds % 60
20
+ return `${minutes}:${seconds.toString().padStart(2, '0')}`
21
+ }
22
+
23
+ export const ensureRecordingPermissions = async () => {
24
+ const { status } = await getRecordingPermissionsAsync()
25
+
26
+ if (status !== 'granted') {
27
+ const { granted } = await requestRecordingPermissionsAsync()
28
+ return granted
29
+ }
30
+
31
+ return true
32
+ }
33
+
34
+ const getAvailableInputsWeb = async () => {
35
+ if (!navigator.mediaDevices?.enumerateDevices) return []
36
+
37
+ const devices = await navigator.mediaDevices.enumerateDevices()
38
+ return devices.filter((d) => d.kind === 'audioinput')
39
+ }
40
+
41
+ export const getAvailableInputs = async (recorder: AudioRecorder) => {
42
+ if (IS_WEB) {
43
+ return await getAvailableInputsWeb()
44
+ }
45
+ if (IS_MOBILE) {
46
+ return await recorder.getAvailableInputs()
47
+ }
48
+ return []
49
+ }
50
+
51
+ export const addAudioInputsListenerWeb = (callback: (devices: MediaDeviceInfo[]) => void) => {
52
+ if (!IS_WEB || !navigator.mediaDevices?.addEventListener) {
53
+ return () => {}
54
+ }
55
+
56
+ const handleDeviceChange = async () => {
57
+ const devices = await getAvailableInputsWeb()
58
+ callback(devices)
59
+ }
60
+
61
+ handleDeviceChange()
62
+
63
+ navigator.mediaDevices.addEventListener('devicechange', handleDeviceChange)
64
+
65
+ return () => {
66
+ navigator.mediaDevices.removeEventListener('devicechange', handleDeviceChange)
67
+ }
68
+ }
69
+ /**
70
+ *
71
+ * @param fileUri
72
+ * @param externalPlayer - is optional expo-audio player, but should be provided
73
+ * because creating player is resource consuming operation
74
+ */
75
+ export const getAudioDurationMs = (
76
+ fileUri: string,
77
+ externalPlayer?: AudioPlayer,
78
+ ): Promise<number | undefined> => {
79
+ if (!fileUri) return Promise.resolve(undefined)
80
+
81
+ const player = externalPlayer ?? createAudioPlayer()
82
+ const isInternalPlayer = !externalPlayer
83
+
84
+ player.replace(fileUri)
85
+
86
+ return new Promise((resolve, reject) => {
87
+ const subscription = player.addListener('playbackStatusUpdate', () => {
88
+ if (player.duration !== undefined && player.duration > 0) {
89
+ subscription.remove()
90
+
91
+ // player.duration is in seconds (e.g., 1.234567)
92
+ const durationMs = Math.round(player.duration * 1000) // convert to milliseconds
93
+
94
+ if (isInternalPlayer) {
95
+ player.remove()
96
+ }
97
+
98
+ resolve(durationMs)
99
+ }
100
+ })
101
+
102
+ setTimeout(() => {
103
+ subscription.remove()
104
+
105
+ if (isInternalPlayer) {
106
+ player.remove()
107
+ }
108
+
109
+ reject(new Error('Timeout loading audio metadata'))
110
+ }, 3000)
111
+ })
112
+ }
113
+
114
+ type GenerateAudioFormDataParams = {
115
+ audioFileUri: string
116
+ durationMs: number
117
+ fileName?: string
118
+ }
119
+
120
+ export const generateAudioFormData = async ({
121
+ audioFileUri,
122
+ durationMs,
123
+ fileName,
124
+ }: GenerateAudioFormDataParams): Promise<FormData> => {
125
+ const formData = new FormData()
126
+ const duration = Math.min(durationMs, VOICE_RECORDER_MAX_DURATION_MS).toString()
127
+
128
+ if (IS_WEB) {
129
+ const response = await fetch(audioFileUri)
130
+ const blob = await response.blob()
131
+ const filename = fileName + blob.type.replace('audio/', '.')
132
+
133
+ formData.append('file', blob, filename)
134
+ formData.append('filename', filename)
135
+ formData.append('duration', duration)
136
+
137
+ return formData
138
+ }
139
+
140
+ const filename = fileName + '.m4a'
141
+ const file = {
142
+ uri: audioFileUri,
143
+ type: 'audio/m4a',
144
+ name: filename,
145
+ } as any
146
+
147
+ formData.append('file', file, filename)
148
+ formData.append('filename', filename)
149
+ formData.append('duration', duration)
150
+
151
+ return formData
152
+ }
153
+
154
+ export const uploadAudioFileRequestGenerator = (
155
+ audioFileFormData: FormData,
156
+ api: VoiceRecorderApi,
157
+ ) => {
158
+ const controller = new AbortController()
159
+
160
+ return {
161
+ uploadAudio: () =>
162
+ api.uploadAudioFile(
163
+ {
164
+ audioFileFormData,
165
+ },
166
+ //@ts-ignore
167
+ {
168
+ signal: controller.signal,
169
+ },
170
+ ),
171
+ controller,
172
+ }
173
+ }
174
+
175
+ const downloadAudioMobile = async (response: any, audioFileId: string) => {
176
+ const { config } = response
177
+ const url = config.url.startsWith('http')
178
+ ? config.url
179
+ : `${config.baseURL?.replace(/\/$/, '')}/${config.url.replace(/^\//, '')}`
180
+
181
+ const fileName = `audio-${audioFileId}.mp4`
182
+ const fileUri = `${FileSystem.cacheDirectory}${fileName}`
183
+ const authHeader = config.headers?.Authorization || config.headers?.authorization
184
+
185
+ const downloadResult = await FileSystem.downloadAsync(
186
+ url,
187
+ fileUri,
188
+ authHeader ? { headers: { Authorization: authHeader } } : undefined,
189
+ )
190
+
191
+ if (downloadResult.status !== 200) {
192
+ throw new Error(`Failed to download audio file. Status: ${downloadResult.status}`)
193
+ }
194
+
195
+ return {
196
+ uri: downloadResult.uri,
197
+ fileName,
198
+ fileType: 'audio/mp4',
199
+ }
200
+ }
201
+
202
+ const downloadAudioWeb = (response: AxiosResponse<Blob>, audioFileId: string) => {
203
+ const blob: Blob = response.data
204
+
205
+ if (!(blob instanceof Blob)) {
206
+ throw new Error('Unable to extract audio blob from response')
207
+ }
208
+
209
+ return {
210
+ uri: URL.createObjectURL(blob),
211
+ fileName: `audio-${audioFileId}.mp4`,
212
+ fileType: blob.type || 'audio/mp4',
213
+ }
214
+ }
215
+
216
+ export const downloadAudioFileRequestGenerator = (audioFileId: string, api: VoicePlayerApi) => {
217
+ const controller = new AbortController()
218
+
219
+ return {
220
+ downloadAudio: async () => {
221
+ const response = await api.downloadAudioFile(audioFileId, {
222
+ //@ts-ignore
223
+ signal: controller.signal,
224
+ })
225
+
226
+ return IS_WEB
227
+ ? downloadAudioWeb(response, audioFileId)
228
+ : downloadAudioMobile(response, audioFileId)
229
+ },
230
+ controller,
231
+ }
232
+ }
233
+
234
+ export const getActiveAttempt = (attemptOffset?: number, attemptsCount?: number): number | null => {
235
+ if (attemptOffset === undefined || attemptsCount === undefined) return null
236
+ return attemptsCount - attemptOffset
237
+ }
238
+
239
+ export const getAudioStatus = (state: PlayerState): AudioStatus | undefined => {
240
+ if (state === PlayerState.PLAYING) return AudioStatus.PLAYING
241
+ if (state === PlayerState.PAUSED) return AudioStatus.PAUSED
242
+ return undefined
243
+ }
244
+
245
+ export const is400Error = (error: unknown): boolean => {
246
+ if (error instanceof Error) {
247
+ const httpError = error as any
248
+ return httpError.status === 400 || httpError.response?.status === 400
249
+ }
250
+ return false
251
+ }
@@ -0,0 +1,11 @@
1
+ export * from './recording/components/VoiceRecord'
2
+ export * from './recording/model/VoiceRecord.model'
3
+ export * from './recording/modal/VoiceRecordDeleteModal'
4
+ export * from './recording/modal/VoiceRecordUndoModal'
5
+
6
+ export * from './playing/model/VoicePlayer.model'
7
+ export * from './playing/components/VoiceTranscriptionsDropdown'
8
+
9
+ export * from './playing/components/VoiceIcon'
10
+ export * from './constants'
11
+ export * from './types'
@@ -0,0 +1,38 @@
1
+ import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
2
+ import React from 'react'
3
+ import { COLORS, MicrophoneIcon } from '@magmamath/react-native-ui'
4
+ import Animated, { FadeIn } from 'react-native-reanimated'
5
+
6
+ type VoiceIconProps = {
7
+ style?: StyleProp<ViewStyle>
8
+ }
9
+
10
+ export const VoiceIcon = ({ style }: VoiceIconProps) => {
11
+ return (
12
+ <Animated.View entering={FadeIn.duration(250)} style={[styles.container, style]}>
13
+ <View style={styles.iconContainer}>
14
+ <MicrophoneIcon color={COLORS.NEUTRAL_5} />
15
+ </View>
16
+ </Animated.View>
17
+ )
18
+ }
19
+
20
+ const styles = StyleSheet.create({
21
+ container: {
22
+ flex: 1,
23
+ justifyContent: 'center',
24
+ alignItems: 'center',
25
+ },
26
+ iconContainer: {
27
+ maxHeight: 124,
28
+ height: '80%',
29
+ aspectRatio: 1,
30
+ alignSelf: 'center',
31
+ padding: 24,
32
+ borderWidth: 4,
33
+ borderColor: COLORS.NEUTRAL_5,
34
+ borderRadius: 400,
35
+ justifyContent: 'center',
36
+ alignItems: 'center',
37
+ },
38
+ })
@@ -0,0 +1,251 @@
1
+ import {
2
+ Typography,
3
+ ScrollableList,
4
+ CaretDownIcon,
5
+ COLORS,
6
+ IS_WEB,
7
+ } from '@magmamath/react-native-ui'
8
+ import { useUnit } from 'effector-react'
9
+ import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react'
10
+ import { TouchableOpacity, StyleProp, ViewStyle, FlatList, View, StyleSheet } from 'react-native'
11
+ import Animated, { FadeIn, FadeOut } from 'react-native-reanimated'
12
+ import { AnswerAudio, VoiceTranscriptionItem } from '../../types'
13
+ import { useVoiceTranscriptionsDropdown } from '../hooks/useVoiceTranscriptionsDropdown'
14
+ import { VoicePlayerModel, PlayerState } from '../model'
15
+ import { VoiceTranscriptionsDropdownItem } from './VoiceTranscriptionsDropdownItem'
16
+ import { DROPDOWN_MAX_CONTENT_HEIGHT, NO_AUDIO_BE_MESSAGE } from '../../constants'
17
+ import { useText } from '../../../../shared/translation'
18
+ import { PlayButton } from '../../../../shared/components/PlayButton'
19
+ import { getActiveAttempt, getAudioStatus } from '../../helpers'
20
+
21
+ const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity)
22
+
23
+ type VoiceTranscriptionsDropdownProps = {
24
+ style?: StyleProp<ViewStyle>
25
+ model: VoicePlayerModel
26
+ answers: AnswerAudio[]
27
+ attemptOffset: number
28
+ onAttemptOffsetChange: (offset: number) => void
29
+ attemptsCount: number
30
+ problemId: string
31
+ }
32
+
33
+ export const VoiceTranscriptionsDropdown = ({
34
+ style,
35
+ model,
36
+ answers,
37
+ attemptOffset,
38
+ onAttemptOffsetChange,
39
+ attemptsCount,
40
+ problemId,
41
+ }: VoiceTranscriptionsDropdownProps) => {
42
+ const [attempts, setAttempts] = useState<VoiceTranscriptionItem[]>([])
43
+
44
+ const scrollRef = useRef<FlatList | null>(null)
45
+ const answersRef = useRef(answers)
46
+ answersRef.current = answers
47
+
48
+ const t = useText()
49
+
50
+ const [currentAttempt, transcriptsLoaded, playerState] = useUnit([
51
+ model.$currentAttempt,
52
+ model.loader.$transcriptsLoaded,
53
+ model.$playerState,
54
+ ])
55
+
56
+ const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount)
57
+
58
+ const answersKey = useMemo(
59
+ () => answers.map((a) => `${a._id}:${a.audioFileId ?? ''}`).join(','),
60
+ [answers],
61
+ )
62
+ const hasActiveTranscript =
63
+ activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined
64
+
65
+ const playButtonState = {
66
+ isActive: playerState !== PlayerState.IDLE,
67
+ isLoading: playerState === PlayerState.LOADING,
68
+ status: getAudioStatus(playerState),
69
+ }
70
+
71
+ const { listAnimatedStyle, iconAnimatedStyle, onListLayout } = useVoiceTranscriptionsDropdown(
72
+ model.dropdown,
73
+ )
74
+
75
+ const scrollToAttempt = useCallback(
76
+ (attemptNumber: number) => {
77
+ const index = attempts.findIndex((item) => item.attemptNumber === attemptNumber)
78
+ if (index !== -1) {
79
+ scrollRef.current?.scrollToIndex({ index, animated: true, viewPosition: 0 })
80
+ }
81
+ },
82
+ [attempts],
83
+ )
84
+
85
+ const handleItemToggle = useCallback(
86
+ (attempt: number) => {
87
+ if (onAttemptOffsetChange && attemptsCount !== undefined) {
88
+ onAttemptOffsetChange(attemptsCount - attempt)
89
+ }
90
+ },
91
+ [onAttemptOffsetChange, attemptsCount],
92
+ )
93
+
94
+ const handlePlayPress = useCallback(() => {
95
+ if (activeAttempt) {
96
+ model.togglePlayPause(activeAttempt)
97
+ }
98
+ }, [model, activeAttempt])
99
+
100
+ const handleScrollToIndexFailed = useCallback((info: { index: number }) => {
101
+ setTimeout(() => {
102
+ scrollRef.current?.scrollToIndex({ index: info.index, animated: true, viewPosition: 0 })
103
+ }, 100)
104
+ }, [])
105
+
106
+ useEffect(() => {
107
+ model.reinitializePlayer()
108
+ return () => model.cleanup()
109
+ }, [model])
110
+
111
+ useEffect(() => {
112
+ const isLastAttemptsWithoutDrowing = !answers[answers.length - 1].drawing
113
+ if (answers.length > 0 && isLastAttemptsWithoutDrowing) {
114
+ model.dropdown.setExpanded(true)
115
+ } else {
116
+ model.dropdown.setExpanded(false)
117
+ }
118
+
119
+ model.resetPlayer()
120
+ }, [problemId])
121
+
122
+ useEffect(() => {
123
+ if (answersRef.current.some((answer) => answer.audioFileId)) {
124
+ model.initializeWithAudios(answersRef.current)
125
+ model.loader.loadAllTranscripts()
126
+ }
127
+ }, [model, answersKey])
128
+
129
+ useEffect(() => {
130
+ model.stopAudio()
131
+ }, [activeAttempt])
132
+
133
+ useEffect(() => {
134
+ const allAttempts = model.getAllAttempts()
135
+ const validAttempts = allAttempts.filter((item) => typeof item.attemptNumber === 'number')
136
+ setAttempts(validAttempts)
137
+ }, [answersKey, transcriptsLoaded, currentAttempt, model])
138
+
139
+ useEffect(() => {
140
+ if (activeAttempt !== null) {
141
+ scrollToAttempt(activeAttempt)
142
+ }
143
+ }, [activeAttempt, hasActiveTranscript, scrollToAttempt, model])
144
+
145
+ const renderItem = useCallback(
146
+ ({ item }: { item: VoiceTranscriptionItem }) => {
147
+ const isLoading = model.loader.isTranscriptLoading(item.attemptNumber)
148
+ const transcript = model.loader.getTranscript(item.attemptNumber)
149
+ const isActive = activeAttempt === item.attemptNumber
150
+
151
+ return (
152
+ <VoiceTranscriptionsDropdownItem
153
+ isLoading={isActive && isLoading}
154
+ attempt={item.attemptNumber}
155
+ content={
156
+ transcript && transcript !== NO_AUDIO_BE_MESSAGE
157
+ ? transcript
158
+ : t('voice.transcriptNotAvailable')
159
+ }
160
+ isActive={isActive}
161
+ onToggle={handleItemToggle}
162
+ scrollToAttempt={scrollToAttempt}
163
+ />
164
+ )
165
+ },
166
+ [model, activeAttempt, t, handleItemToggle, scrollToAttempt],
167
+ )
168
+
169
+ return (
170
+ <Animated.View style={[styles.container, style]}>
171
+ <View style={styles.header}>
172
+ <Typography style={styles.title} variant="h7">
173
+ {t('voice.transcriptions')}
174
+ </Typography>
175
+ {hasActiveTranscript && (
176
+ <Animated.View entering={FadeIn.duration(120)} exiting={FadeOut.duration(120)}>
177
+ <PlayButton
178
+ state={playButtonState}
179
+ onPress={handlePlayPress}
180
+ activityIndicatorColor={COLORS.NEUTRAL_1}
181
+ />
182
+ </Animated.View>
183
+ )}
184
+ </View>
185
+
186
+ <Animated.View style={[listAnimatedStyle, { overflow: 'hidden' }]}>
187
+ <View onLayout={onListLayout} style={styles.listContainer}>
188
+ <ScrollableList
189
+ bounces={false}
190
+ ref={scrollRef}
191
+ hideShadow
192
+ data={attempts}
193
+ keyExtractor={(item) => item._id}
194
+ onScrollToIndexFailed={handleScrollToIndexFailed}
195
+ renderItem={renderItem}
196
+ style={IS_WEB && styles.list}
197
+ contentContainerStyle={styles.listContent}
198
+ />
199
+ </View>
200
+ </Animated.View>
201
+
202
+ <AnimatedTouchableOpacity
203
+ style={[styles.expandButton, iconAnimatedStyle]}
204
+ onPress={() => model.dropdown.toggleExpand()}
205
+ >
206
+ <CaretDownIcon size={22} />
207
+ </AnimatedTouchableOpacity>
208
+ </Animated.View>
209
+ )
210
+ }
211
+
212
+ const styles = StyleSheet.create({
213
+ container: {
214
+ position: 'absolute',
215
+ top: 56,
216
+ left: 8,
217
+ width: 222,
218
+ maxHeight: 405,
219
+ minHeight: 51,
220
+ padding: 4,
221
+ boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
222
+ borderRadius: 12,
223
+ backgroundColor: COLORS.NEUTRAL_1,
224
+ overflow: 'hidden',
225
+ },
226
+ header: {
227
+ flexDirection: 'row',
228
+ justifyContent: 'space-between',
229
+ alignItems: 'center',
230
+ padding: 4,
231
+ marginBottom: 4,
232
+ height: 32,
233
+ },
234
+ title: {
235
+ color: COLORS.NEUTRAL_9,
236
+ marginLeft: 4,
237
+ },
238
+ list: { flex: 1 },
239
+ expandButton: {
240
+ justifyContent: 'center',
241
+ alignItems: 'center',
242
+ },
243
+ listContainer: {
244
+ position: 'absolute',
245
+ maxHeight: DROPDOWN_MAX_CONTENT_HEIGHT,
246
+ width: '100%',
247
+ },
248
+ listContent: {
249
+ paddingHorizontal: 4,
250
+ },
251
+ })
@@ -0,0 +1,127 @@
1
+ import { Pressable, StyleSheet, View } from 'react-native'
2
+ import React, { memo, useCallback } from 'react'
3
+ import {
4
+ Button,
5
+ ButtonSize,
6
+ ButtonVariant,
7
+ COLORS,
8
+ Loader,
9
+ LoaderColor,
10
+ LoaderSize,
11
+ Typography,
12
+ } from '@magmamath/react-native-ui'
13
+ import Animated, { runOnJS, useAnimatedReaction } from 'react-native-reanimated'
14
+ import { useVoiceTranscriptionsDropdownItemAnimation } from '../hooks/useVoiceTranscriptionsDropdownItemAnimation'
15
+ import { useText } from '../../../../shared/translation'
16
+
17
+ type VoiceTranscriptionsDropdownItemProps = {
18
+ attempt: number
19
+ content: string
20
+ isActive: boolean
21
+ isLoading?: boolean
22
+ onToggle: (attempt: number) => void
23
+ scrollToAttempt: (attempt: number) => void
24
+ }
25
+
26
+ export const VoiceTranscriptionsDropdownItem = memo(
27
+ ({
28
+ attempt,
29
+ content,
30
+ isActive,
31
+ isLoading,
32
+ onToggle,
33
+ scrollToAttempt,
34
+ }: VoiceTranscriptionsDropdownItemProps) => {
35
+ const t = useText()
36
+
37
+ const { contentAnimatedStyle, onLayout, progress } =
38
+ useVoiceTranscriptionsDropdownItemAnimation(isActive)
39
+
40
+ const handleScrollToAttempt = useCallback(
41
+ (attemptNumber: number) => {
42
+ setTimeout(() => {
43
+ scrollToAttempt(attemptNumber)
44
+ }, 300)
45
+ },
46
+ [scrollToAttempt],
47
+ )
48
+
49
+ useAnimatedReaction(
50
+ () => progress.value,
51
+ (progress) => {
52
+ if (progress === 1 && isActive) {
53
+ runOnJS(handleScrollToAttempt)(attempt)
54
+ }
55
+ },
56
+ [progress, attempt, isActive],
57
+ )
58
+
59
+ return (
60
+ <View style={styles.container}>
61
+ <Pressable disabled={isActive} style={styles.itemHeader} onPress={() => onToggle(attempt)}>
62
+ <Button
63
+ onPress={() => !isActive && onToggle(attempt)}
64
+ size={ButtonSize.SMALL}
65
+ variant={ButtonVariant.TERTIARY}
66
+ style={{
67
+ text: {
68
+ textTransform: 'uppercase',
69
+ color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7,
70
+ },
71
+ }}
72
+ >
73
+ {t('voice.attempt', { number: String(attempt) })}
74
+ </Button>
75
+ </Pressable>
76
+ {isLoading ? (
77
+ <View style={styles.loaderContainer}>
78
+ <Loader size={LoaderSize.SMALL} color={LoaderColor.BLUE} />
79
+ </View>
80
+ ) : (
81
+ <Animated.View style={contentAnimatedStyle}>
82
+ <View onLayout={onLayout} style={styles.contentWrapper}>
83
+ <Typography
84
+ variant="h8"
85
+ style={[
86
+ styles.itemContent,
87
+ {
88
+ color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7,
89
+ },
90
+ ]}
91
+ >
92
+ {content}
93
+ </Typography>
94
+ </View>
95
+ </Animated.View>
96
+ )}
97
+ </View>
98
+ )
99
+ },
100
+ )
101
+
102
+ const styles = StyleSheet.create({
103
+ container: {
104
+ borderTopWidth: 1,
105
+ borderColor: COLORS.NEUTRAL_3,
106
+ },
107
+ itemHeader: {
108
+ flexDirection: 'row',
109
+ justifyContent: 'space-between',
110
+ alignItems: 'center',
111
+ width: '100%',
112
+ paddingVertical: 8,
113
+ },
114
+ itemContent: {
115
+ paddingHorizontal: 8,
116
+ },
117
+ contentWrapper: {
118
+ width: '100%',
119
+ position: 'absolute',
120
+ },
121
+ loaderContainer: {
122
+ justifyContent: 'center',
123
+ alignItems: 'center',
124
+ paddingTop: 4,
125
+ paddingBottom: 8,
126
+ },
127
+ })