@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
@@ -1,42 +1,11 @@
1
1
  import React from 'react'
2
- import { ActivityIndicator } from 'react-native'
3
- import { Button, COLORS } from '@magmamath/react-native-ui'
4
-
5
- import { SpeakerIcon } from '../../../../shared/icons/SpeakerIcon'
6
- import { PlayIcon } from '../../../../shared/icons/PlayIcon'
7
- import { PauseIcon } from '../../../../shared/icons/PauseIcon'
8
- import { AudioStatus, T2SState } from '../../types/t2s.types'
9
2
  import { useChatModel } from '../../context/ChatBotModelContext'
3
+ import { PlayButton } from '../../../../shared/components/PlayButton'
4
+ import { T2SState } from '../../types/t2s.types'
10
5
  import { ConversationMessage } from '../../types/units.types'
11
- import { ColorScheme } from '../../types/style.types'
12
6
  import { MessageVariant } from '../../types/model.types'
13
- import { CONTROLS_COLORS_MAP, MESSAGE_COLORS_MAP } from '../../constants'
14
-
15
- type TextToSpeechIconProps = {
16
- status: AudioStatus
17
- isLoading: boolean
18
- isActive: boolean
19
- colorScheme?: ColorScheme
20
- }
21
-
22
- const TextToSpeechIcon = ({
23
- status,
24
- isActive,
25
- isLoading,
26
- colorScheme = ColorScheme.Blue,
27
- }: TextToSpeechIconProps) => {
28
- if (isLoading && isActive) {
29
- return <ActivityIndicator color={CONTROLS_COLORS_MAP[colorScheme].background} />
30
- }
31
-
32
- if (!isActive) {
33
- return <SpeakerIcon />
34
- }
35
-
36
- if (status === 'playing') return <PauseIcon color={COLORS.NEUTRAL_1} />
37
- if (status === 'paused') return <PlayIcon color={COLORS.NEUTRAL_1} />
38
- return <SpeakerIcon />
39
- }
7
+ import { ColorScheme } from '../../types/style.types'
8
+ import { MESSAGE_COLORS_MAP } from '../../constants'
40
9
 
41
10
  type MessageTextToSpeechProps = {
42
11
  state: T2SState
@@ -46,14 +15,14 @@ type MessageTextToSpeechProps = {
46
15
  }
47
16
 
48
17
  export const MessageTextToSpeech = ({
49
- state: { status, disabled, isActive, isLoading },
50
- message,
18
+ state,
51
19
  variant,
20
+ message,
52
21
  colorScheme = ColorScheme.Blue,
53
22
  }: MessageTextToSpeechProps) => {
54
23
  const model = useChatModel()
55
24
 
56
- function play() {
25
+ const play = () => {
57
26
  void model.t2s.play({
58
27
  isTranslated: model.translation.$isTranslated.getState(),
59
28
  message,
@@ -61,21 +30,10 @@ export const MessageTextToSpeech = ({
61
30
  }
62
31
 
63
32
  return (
64
- <Button
65
- disabled={disabled}
66
- isActive={isActive}
67
- variant={'secondary'}
33
+ <PlayButton
68
34
  colorScheme={MESSAGE_COLORS_MAP[colorScheme][variant].icon}
69
- size={'small'}
35
+ state={state}
70
36
  onPress={play}
71
- icon={
72
- <TextToSpeechIcon
73
- isActive={isActive}
74
- isLoading={isLoading}
75
- status={status}
76
- colorScheme={colorScheme}
77
- />
78
- }
79
37
  />
80
38
  )
81
39
  }
@@ -1,16 +1,17 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, View } from 'react-native'
3
- import { BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui'
4
3
 
5
- import { ColorScheme } from '../../types/style.types'
6
- import { MessageVariant } from '../../types/model.types'
7
4
  import { VariantProps } from './ChatMessage'
5
+ import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
6
+ import { ColorScheme } from '../../types/style.types'
8
7
  import { MessageContent } from './MessageContent'
8
+ import { MessageVariant } from '../../types/model.types'
9
9
 
10
10
  export const ReceivedMessage = ({
11
11
  message,
12
12
  isTranslated,
13
13
  t2sState,
14
+ withIcon,
14
15
  colorScheme = ColorScheme.Blue,
15
16
  withErrorSpotting,
16
17
  highlightedWordIndex,
@@ -20,6 +21,12 @@ export const ReceivedMessage = ({
20
21
 
21
22
  return (
22
23
  <View style={styles.container}>
24
+ {withIcon && (
25
+ <View style={styles.icon}>
26
+ <ChatbotIcon width={60} height={80} />
27
+ </View>
28
+ )}
29
+
23
30
  <View style={styles.message}>
24
31
  <MessageContent
25
32
  message={message}
@@ -40,15 +47,16 @@ const styles = StyleSheet.create({
40
47
  container: {
41
48
  flex: 1,
42
49
  flexDirection: 'row',
43
- maxWidth: 365,
44
- width: 305,
50
+ maxWidth: 372,
51
+ width: 372,
45
52
  alignItems: 'flex-end',
46
53
  justifyContent: 'flex-end',
47
- paddingHorizontal: 2,
48
- // backgroundColor: COLORS.BLUE_6,
54
+ },
55
+ icon: {
56
+ alignSelf: 'flex-end',
57
+ marginRight: 8,
49
58
  },
50
59
  message: {
51
- // backgroundColor: COLORS.BLUE_6,
52
60
  flex: 1,
53
61
  flexDirection: 'row',
54
62
  maxWidth: 305,
@@ -58,10 +66,8 @@ const styles = StyleSheet.create({
58
66
  shadowOpacity: 0.25,
59
67
  shadowRadius: 3,
60
68
  elevation: 3,
61
- borderRadius: BORDER_RADIUS[300],
69
+ borderRadius: 8,
62
70
  borderBottomLeftRadius: 0,
63
71
  backgroundColor: '#F2F2F4',
64
- // alignItems: 'flex-end',
65
- // justifyContent: 'flex-end',
66
72
  },
67
73
  })
@@ -29,7 +29,7 @@ const styles = StyleSheet.create({
29
29
  alignSelf: 'flex-end',
30
30
  maxWidth: 305,
31
31
  padding: SPACING[200],
32
- borderRadius: BORDER_RADIUS[300],
32
+ borderRadius: BORDER_RADIUS[200],
33
33
  borderBottomRightRadius: 0,
34
34
  },
35
35
  text: {
@@ -1,4 +1,4 @@
1
- import React, { ComponentType, PropsWithChildren, useCallback } from 'react'
1
+ import React, { ComponentType, PropsWithChildren, useMemo } from 'react'
2
2
  import { useStoreMap, useUnit } from 'effector-react'
3
3
 
4
4
  import { ChatbotModel } from '../model/ChatBotModel'
@@ -13,7 +13,6 @@ type ChatbotProps = {
13
13
  model: ChatbotModel
14
14
  isHintFeedback: boolean
15
15
  isTextToSpeechEnabled: boolean
16
- withQuickActionButton?: boolean
17
16
  textToSpeechConfig?: {
18
17
  voice: typeof DEFAULT_VOICE
19
18
  audioConfig: typeof AUDIO_CONFIG
@@ -34,31 +33,23 @@ export const Chatbot = ({
34
33
  ButtonWrapper,
35
34
  iconSize,
36
35
  colorScheme = ColorScheme.Blue,
37
- withQuickActionButton,
38
36
  TTSHighlightRenderer,
39
37
  }: ChatbotProps) => {
40
- const alternatives = useUnit(model.$alternatives)
41
38
  const isChatAllowed = useUnit(model.$chatAccess)
42
39
  const isAvailable = useStoreMap(model.$currentChatData, ({ isAvailable }) => isAvailable)
43
- const hasBeenOpened = useStoreMap(model.$currentChatData, ({ hasBeenOpened }) => hasBeenOpened)
44
-
45
40
  model.t2s.setAudioConfig(textToSpeechConfig ?? null)
46
41
 
42
+ const shouldAnimateCloseButton = useStoreMap({
43
+ store: model.$currentChatData,
44
+ fn: (chat, [isInputDisabled]) => {
45
+ return isInputDisabled && chat.messages.length === 1
46
+ },
47
+ keys: [isInputDisabled],
48
+ })
49
+
47
50
  const openChat = () => model.setIsOpen(true)
48
51
  const closeChat = () => model.setIsOpen(false)
49
52
 
50
- const sendHelpRequest = useCallback(() => {
51
- const option = alternatives?.options.default[0]
52
- if (!option) return
53
-
54
- model.setIsOpen(true)
55
- void model.sendHelpRequestFx({
56
- message: option.text,
57
- translatedMessage: option.translatedText,
58
- skipOwnMessage: true,
59
- })
60
- }, [alternatives])
61
-
62
53
  if (!isAvailable || !isChatAllowed) {
63
54
  return null
64
55
  }
@@ -73,16 +64,15 @@ export const Chatbot = ({
73
64
  isInputDisabled={isInputDisabled}
74
65
  MessageWrapper={ButtonWrapper}
75
66
  TTSHighlightRenderer={TTSHighlightRenderer}
76
- onPressClose={closeChat}
77
67
  />
78
68
 
79
69
  <ChatControls
80
70
  model={model}
81
71
  onPressChatIcon={openChat}
82
- onPressHelpButton={sendHelpRequest}
72
+ onPressClose={closeChat}
83
73
  iconSize={iconSize}
84
74
  ButtonWrapper={isInputDisabled ? undefined : ButtonWrapper}
85
- withHelpButton={withQuickActionButton && !hasBeenOpened}
75
+ shouldAnimateCloseButton={shouldAnimateCloseButton}
86
76
  />
87
77
  </ChatBotModelContext.Provider>
88
78
  )
@@ -46,24 +46,24 @@ export const MESSAGE_COLORS_MAP = {
46
46
  [MessageVariant.RECEIVED]: {
47
47
  background: COLORS.NEUTRAL_3,
48
48
  border: COLORS.NEUTRAL_3,
49
- icon: ButtonColor.BLUE,
49
+ icon: ColorScheme.Blue,
50
50
  },
51
51
  [MessageVariant.SENT]: {
52
52
  background: COLORS.PRIMARY_BLUE,
53
53
  border: COLORS.PRIMARY_BLUE,
54
- icon: ButtonColor.BLUE,
54
+ icon: ColorScheme.Blue,
55
55
  },
56
56
  },
57
57
  [ColorScheme.Yellow]: {
58
58
  [MessageVariant.RECEIVED]: {
59
59
  background: COLORS.NEUTRAL_3,
60
60
  border: COLORS.NEUTRAL_3,
61
- icon: ButtonColor.YELLOW,
61
+ icon: ColorScheme.Yellow,
62
62
  },
63
63
  [MessageVariant.SENT]: {
64
64
  background: COLORS.PRIMARY_YELLOW,
65
65
  border: COLORS.PRIMARY_YELLOW,
66
- icon: ButtonColor.YELLOW,
66
+ icon: ColorScheme.Yellow,
67
67
  },
68
68
  },
69
69
  }
@@ -65,7 +65,6 @@ export function prepareChatRequestPayload(
65
65
  imageAltText,
66
66
  answerOptions,
67
67
  answer,
68
- chatHistory,
69
68
  } = payload
70
69
 
71
70
  if (freeTextMessage) {
@@ -75,7 +74,6 @@ export function prepareChatRequestPayload(
75
74
  data: {
76
75
  conversationId,
77
76
  message: freeTextMessage,
78
- ...(chatHistory && { chatHistory }),
79
77
  ...(!!problemStandards?.length && { problemStandards }),
80
78
  },
81
79
  }
@@ -86,7 +84,6 @@ export function prepareChatRequestPayload(
86
84
  correctAnswer: problemAnswer,
87
85
  problemDescription,
88
86
  language,
89
- ...(chatHistory && { chatHistory }),
90
87
  ...(imageCdnId && { imageCdnId }),
91
88
  ...(imageAltText && { altText: imageAltText }),
92
89
  ...(!!problemStandards?.length && { problemStandards }),
@@ -1,27 +1,13 @@
1
1
  export { Chatbot } from './components/Chatbot'
2
2
  export { ChatbotModel } from './model/ChatBotModel'
3
- export {
4
- AudioStatus,
5
- type AudioProvider,
6
- type TTSHighlightRenderer,
7
- type TTSHighlightRendererProps,
8
- } from './types/t2s.types'
3
+ export { AudioStatus, type AudioProvider, type TTSHighlightRenderer, type TTSHighlightRendererProps } from './types/t2s.types'
9
4
  export {
10
5
  MessageVariant,
11
6
  type ChatbotModelProps,
12
7
  type IChatDrawBoardAdapter,
13
8
  } from './types/model.types'
14
9
  export type { RequestOptionalConfig } from '../../lib/effector/createControllerEffect'
15
- export type {
16
- ChatHintPayload,
17
- ChatHintResponse,
18
- ChatHistory,
19
- GetAlternativesResponse,
20
- GetAlternativesPayload,
21
- SendMessagePayload,
22
- SendMessageResponse,
23
- PostMessageResponse,
24
- } from './types/api.types'
10
+ export type { PostMessageResponse } from './types/api.types'
25
11
  export { DefaultMessagesCreator } from './model/DefaultMessageCreator'
26
12
  export type { ChatAnswer } from './types/units.types'
27
13
  export type { ConversationMessage } from './types/units.types'
@@ -58,7 +58,7 @@ export class ChatbotModel {
58
58
 
59
59
  readonly resetAlternatives = createEvent()
60
60
  readonly setAlternatives = createEvent<GetAlternativesResponse | null>()
61
- readonly $alternatives = createStore<GetAlternativesResponse | null>(null)
61
+ readonly $alternatives: Store<GetAlternativesResponse | null>
62
62
 
63
63
  readonly setIsOpen = createEvent<boolean>()
64
64
  readonly toggleOpen = createEvent()
@@ -94,7 +94,7 @@ export class ChatbotModel {
94
94
  this.threadManager.setMessagesLimit(threadMessagesLimit)
95
95
  }
96
96
 
97
- this.$alternatives
97
+ this.$alternatives = createStore<GetAlternativesResponse | null>(null)
98
98
  .on(this.api.getAlternativesFx.doneData, (_, payload) => transformAlternatives(payload))
99
99
  .on(this.setAlternatives, (_, payload) => transformAlternatives(payload))
100
100
  .reset(this.resetAlternatives)
@@ -127,21 +127,6 @@ export class ChatbotModel {
127
127
  target: [this.t2s.reset, this.errorSpotting.spottingHidden],
128
128
  })
129
129
 
130
- sample({
131
- clock: this.$isOpen.updates,
132
- filter: (isOpen) => !isOpen,
133
- fn: () => false,
134
- target: this.setScrollActive,
135
- })
136
-
137
- sample({
138
- clock: this.setIsOpen,
139
- source: this.$currentChatData,
140
- filter: ({ hasBeenOpened }, isOpen) => isOpen && !hasBeenOpened,
141
- fn: ({ key }) => ({ key, data: { hasBeenOpened: true } }),
142
- target: this.cache.update,
143
- })
144
-
145
130
  sample({
146
131
  clock: this.removeLastMessage,
147
132
  source: [this.$lastMessageKey, this.cache.$data] as const,
@@ -211,58 +196,30 @@ export class ChatbotModel {
211
196
 
212
197
  private createSendHelpRequestFx() {
213
198
  const effect = attach({
214
- source: {
215
- key: this.$currentKey,
216
- context: this.$context,
217
- cache: this.cache.$data,
218
- alternatives: this.$alternatives,
219
- },
199
+ source: { key: this.$currentKey, context: this.$context, cache: this.cache.$data },
220
200
  mapParams: (params: SendHelpParams, source) => ({
221
201
  ...params,
222
202
  ...source,
223
203
  }),
224
204
  effect: createEffect(
225
- async ({
226
- message,
227
- translatedMessage,
228
- key,
229
- context,
230
- isFreeText,
231
- skipOwnMessage,
232
- cache,
233
- alternatives,
234
- }: SendHelpProps) => {
205
+ async ({ message, translatedMessage, key, context, isFreeText, cache }: SendHelpProps) => {
235
206
  if (!context) throw new Error('Trying to send message in chat without context')
236
207
  this.setLastMessageKey(key)
237
- if (skipOwnMessage) {
238
- this.cache.clearMessages(key)
239
- } else {
240
- this.cache.addMessages(key, {
241
- messages: [messagesHelper.createOwn({ message, translatedMessage })],
242
- })
243
- }
244
-
245
- const chatHistory =
246
- context.assignmentId && context.problemId
247
- ? {
248
- exerciseId: context.assignmentId,
249
- problemId: context.problemId,
250
- chatVersion: alternatives?.version,
251
- }
252
- : undefined
208
+ this.cache.addMessages(key, {
209
+ messages: [messagesHelper.createOwn({ message, translatedMessage })],
210
+ })
253
211
 
254
212
  // Request is overridden by ThreadManager.postMessage (delegates to sendMessage/getHint)
255
213
  const response = await this.api.postMessageFx({
256
214
  answer: context.answer,
257
215
  answerOptions: context.answerOptions,
258
- problemDescription: context.problemDescription,
216
+ problemDescription: context.problem,
259
217
  problemStandards: context.problemStandards,
260
218
  problemAnswer: context.problemAnswer,
261
219
  language: context.language,
262
220
  imageAltText: context.imageDescription,
263
221
  imageCdnId: context.imageCdnId,
264
222
  conversationId: cache[key].conversationId,
265
- chatHistory,
266
223
  ...(isFreeText && { freeTextMessage: message }),
267
224
  })
268
225
 
@@ -13,7 +13,6 @@ export class ChatbotAPI {
13
13
  constructor(api: ChatbotApiRequests) {
14
14
  this.postMessageFx = createControllerEffect(api.postMessage)
15
15
  this.getAlternativesFx = createEffect(api.getAlternatives)
16
- this.textToSpeechTextFx = createEffect(api.postTextToSpeech)
17
16
  this.translateTextFx = createEffect(
18
17
  async (payload: GoogleTranslatePayload): Promise<GoogleTranslateResponse> => {
19
18
  const response = await api.postTranslateText({
@@ -33,5 +32,6 @@ export class ChatbotAPI {
33
32
  }
34
33
  },
35
34
  )
35
+ this.textToSpeechTextFx = createEffect(api.postTextToSpeech)
36
36
  }
37
37
  }
@@ -71,13 +71,6 @@ export class ChatsCacheModel {
71
71
  })
72
72
  }
73
73
 
74
- public clearMessages(key: string) {
75
- this.cache.setField({
76
- key,
77
- fn: (current) => (current ? { ...current, messages: [] } : undefined),
78
- })
79
- }
80
-
81
74
  public setSingleMessage(key: string, message: ConversationMessage) {
82
75
  this.cache.setField({
83
76
  key,
@@ -1,4 +1,5 @@
1
- import { ChatAnswer, Stroke } from './units.types'
1
+ import { ChatAnswer, FullStrokeData, Stroke } from './units.types'
2
+ import { ProblemStandard } from './model.types'
2
3
 
3
4
  export type GetAlternativesPayload = {
4
5
  municipalityId: string
@@ -10,15 +11,6 @@ export type AlternativesOptions = {
10
11
  hints: ChatAnswer[]
11
12
  }
12
13
 
13
- export type ChatHistory = { exerciseId: string; problemId: string; chatVersion?: string }
14
-
15
- export type ProblemStandard = {
16
- id: string
17
- name: string
18
- description: string
19
- numberOfMatchedSkills: number
20
- }
21
-
22
14
  export type GetAlternativesResponse = {
23
15
  /**
24
16
  * @deprecated chatAccess depends on assignment.lavaChat or class grade
@@ -31,15 +23,14 @@ export type GetAlternativesResponse = {
31
23
  }
32
24
 
33
25
  export type SendMessagePayload = {
34
- message: string
35
- altText?: string
36
- answerOptions?: string[]
37
- chatHistory?: ChatHistory
38
- correctAnswer?: string | string[]
39
- conversationId?: string
40
26
  problemDescription?: string
41
27
  problemStandards?: ProblemStandard[]
28
+ correctAnswer?: string | string[]
29
+ answerOptions?: string[]
30
+ altText?: string
42
31
  language?: string
32
+ message: string
33
+ conversationId?: string
43
34
  }
44
35
 
45
36
  export type SendMessageResponse = {
@@ -58,7 +49,6 @@ export type PostMessagePayload = {
58
49
  imageCdnId?: string
59
50
  freeTextMessage?: string
60
51
  conversationId?: string | null
61
- chatHistory?: ChatHistory
62
52
  }
63
53
 
64
54
  export type PostMessageResponse = {
@@ -124,3 +114,13 @@ export type ChatHintResponse = {
124
114
  conversationId?: string | null
125
115
  errorStrokeIds?: string[]
126
116
  }
117
+ export type ErrorSpottingPayload = {
118
+ strokes: FullStrokeData[]
119
+ problemDescription: string
120
+ correctAnswer: string[]
121
+ userAnswer: string | string[]
122
+ hint: string
123
+ }
124
+ export type ErrorSpottingResponse = {
125
+ highlightedStrokeIds: string[]
126
+ }
@@ -2,6 +2,8 @@ import type { Store, StoreWritable } from 'effector'
2
2
  import {
3
3
  ChatHintPayload,
4
4
  ChatHintResponse,
5
+ ErrorSpottingPayload,
6
+ ErrorSpottingResponse,
5
7
  GetAlternativesPayload,
6
8
  GetAlternativesResponse,
7
9
  GoogleText2SpeechPayload,
@@ -10,7 +12,6 @@ import {
10
12
  GoogleTranslateResponse,
11
13
  PostMessagePayload,
12
14
  PostMessageResponse,
13
- ProblemStandard,
14
15
  SendMessagePayload,
15
16
  SendMessageResponse,
16
17
  } from './api.types'
@@ -42,6 +43,10 @@ export type ChatbotApiRequests = {
42
43
  postTextToSpeech: (
43
44
  props: WithAbortSignal<GoogleText2SpeechPayload>,
44
45
  ) => Promise<GoogleText2SpeechResponse>
46
+ /**
47
+ * @deprecated merged with hint
48
+ */
49
+ spotError?: (props: ErrorSpottingPayload) => Promise<ErrorSpottingResponse>
45
50
  }
46
51
 
47
52
  type ChatbotSettings = {
@@ -65,14 +70,12 @@ export type SendHelpParams = {
65
70
  message: string
66
71
  translatedMessage?: string
67
72
  isFreeText?: boolean
68
- skipOwnMessage?: boolean
69
73
  }
70
74
 
71
75
  export type SendHelpProps = SendHelpParams & {
72
76
  key: string
73
77
  context: ChatbotContext | null
74
78
  cache: Record<string, ChatItem>
75
- alternatives?: GetAlternativesResponse | null
76
79
  isFreeText?: boolean
77
80
  }
78
81
 
@@ -126,15 +129,13 @@ export type IChatDrawBoardAdapter = {
126
129
 
127
130
  export type ChatbotContext = {
128
131
  language: string
129
- problemDescription: string
132
+ problem: string
130
133
  problemAnswer: string[]
131
134
  translationTargetLanguage: string
132
- assignmentId?: string
133
135
  answer?: string | string[]
134
136
  answerOptions?: string[]
135
137
  imageDescription?: string
136
138
  imageCdnId?: string
137
- problemId?: string
138
139
  problemStandards?: ProblemStandard[]
139
140
  }
140
141
 
@@ -149,7 +150,7 @@ export enum ChatRequestType {
149
150
 
150
151
  type FreeTextWithConversationId = {
151
152
  type: ChatRequestType.FREETEXT
152
- data: Pick<SendMessagePayload, 'message' | 'conversationId' | 'chatHistory'>
153
+ data: Pick<SendMessagePayload, 'message' | 'conversationId'>
153
154
  }
154
155
 
155
156
  type FreeTextNewConversation = {
@@ -162,4 +163,11 @@ export type HintRequest = {
162
163
  data: ChatHintPayload
163
164
  }
164
165
 
166
+ export type ProblemStandard = {
167
+ id: string
168
+ name: string
169
+ description: string
170
+ numberOfMatchedSkills: number
171
+ }
172
+
165
173
  export type ChatRequestPayload = FreeTextWithConversationId | FreeTextNewConversation | HintRequest
@@ -36,5 +36,4 @@ export type ChatItem = {
36
36
  isAvailable: boolean
37
37
  currentThread: IThreadItem | null
38
38
  conversationId?: string | null
39
- hasBeenOpened?: boolean
40
39
  }
@@ -52,6 +52,7 @@ export const generateProblemsGifsTable = (
52
52
  const selectedGif = unshownGif || gifsInGroup[0]
53
53
 
54
54
  if (selectedGif) {
55
+ selectedGif.isShown = true
55
56
  result[problemNumber] = {
56
57
  url: selectedGif.url,
57
58
  group: groupKey,
@@ -0,0 +1,15 @@
1
+ export const VOICE_RECORDER_CONTAINER_SIZES = {
2
+ COLLAPSED: 61,
3
+ EXPANDED: 152,
4
+ }
5
+ export const VOICE_RECORDER_MAX_DURATION_MS = 60000 // 1 minute
6
+ export const VOICE_RECORDER_MIN_DURATION_MS = 300
7
+ export enum VoiceRecorderState {
8
+ IDLE,
9
+ RECORDING,
10
+ PAUSED,
11
+ }
12
+ export const DROPDOWN_MAX_CONTENT_HEIGHT = 330
13
+ export const TRANSCRIPT_RETRY_INTERVAL_MS = 4000
14
+ export const TRANSCRIPT_MAX_RETRIES = 15
15
+ export const NO_AUDIO_BE_MESSAGE = 'No audio'