@magmamath/students-features 0.5.0 → 0.5.1-rc-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 (414) hide show
  1. package/dist/commonjs/features/celebrations/config.js +4 -4
  2. package/dist/commonjs/features/celebrations/config.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +1 -2
  4. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  6. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +47 -30
  7. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  8. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +42 -22
  9. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  10. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +14 -11
  11. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
  13. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/components/Chatbot.js +7 -5
  15. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/index.js +7 -0
  17. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  18. package/dist/commonjs/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +22 -44
  19. package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  20. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +125 -146
  21. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +12 -12
  23. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -16
  25. package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
  27. package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
  28. package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
  29. package/dist/commonjs/features/chatbot/model/messagesHelper.js +7 -7
  30. package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
  31. package/dist/commonjs/features/chatbot/model/t2s.js +13 -18
  32. package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
  33. package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
  34. package/dist/commonjs/features/chatbot/model/translation.js +19 -28
  35. package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
  36. package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
  37. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  38. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +2 -4
  39. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
  40. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  41. package/dist/commonjs/index.js.map +1 -1
  42. package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
  43. package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
  44. package/{src/shared/translation → dist/commonjs/lib}/localization/en.json +1 -8
  45. package/dist/{module/shared/translation → commonjs/lib}/localization/gb.json +1 -8
  46. package/dist/commonjs/{shared/translation → lib}/localization/sw.json +1 -8
  47. package/dist/commonjs/shared/icons/icon.types.js +0 -4
  48. package/dist/commonjs/shared/translation/constants.js +3 -3
  49. package/dist/commonjs/shared/translation/constants.js.map +1 -1
  50. package/dist/commonjs/shared/translation/helpers.js +6 -22
  51. package/dist/commonjs/shared/translation/helpers.js.map +1 -1
  52. package/dist/commonjs/shared/translation/hooks.js +5 -3
  53. package/dist/commonjs/shared/translation/hooks.js.map +1 -1
  54. package/dist/commonjs/shared/translation/model.js +1 -1
  55. package/dist/commonjs/shared/translation/model.js.map +1 -1
  56. package/dist/commonjs/shared/translation/types.js +1 -1
  57. package/dist/commonjs/shared/translation/types.js.map +1 -1
  58. package/dist/module/features/celebrations/config.js +4 -4
  59. package/dist/module/features/celebrations/config.js.map +1 -1
  60. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +1 -2
  61. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  62. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  63. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +48 -31
  64. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  65. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +43 -23
  66. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  67. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +13 -11
  68. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  69. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
  70. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  71. package/dist/module/features/chatbot/components/Chatbot.js +8 -6
  72. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  73. package/dist/module/features/chatbot/index.js +1 -0
  74. package/dist/module/features/chatbot/index.js.map +1 -1
  75. package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +20 -42
  76. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
  77. package/dist/module/features/chatbot/model/ChatBotModel.js +126 -147
  78. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  79. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
  80. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  81. package/dist/module/features/chatbot/model/ThreadItem.js +8 -16
  82. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  83. package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
  84. package/dist/module/features/chatbot/model/api.js.map +1 -0
  85. package/dist/module/features/chatbot/model/constants.js.map +1 -1
  86. package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
  87. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  88. package/dist/module/features/chatbot/model/t2s.js +14 -19
  89. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  90. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  91. package/dist/module/features/chatbot/model/translation.js +19 -28
  92. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  93. package/dist/module/features/chatbot/types/api.types.js +0 -2
  94. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  95. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +2 -4
  96. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
  97. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
  98. package/dist/module/index.js.map +1 -1
  99. package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
  100. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  101. package/dist/module/{shared/translation → lib}/localization/en.json +1 -8
  102. package/dist/{commonjs/shared/translation → module/lib}/localization/gb.json +1 -8
  103. package/dist/module/{shared/translation → lib}/localization/sw.json +1 -8
  104. package/dist/module/shared/icons/icon.types.js +0 -2
  105. package/dist/module/shared/translation/constants.js +3 -3
  106. package/dist/module/shared/translation/constants.js.map +1 -1
  107. package/dist/module/shared/translation/helpers.js +5 -19
  108. package/dist/module/shared/translation/helpers.js.map +1 -1
  109. package/dist/module/shared/translation/hooks.js +6 -4
  110. package/dist/module/shared/translation/hooks.js.map +1 -1
  111. package/dist/module/shared/translation/model.js +1 -1
  112. package/dist/module/shared/translation/model.js.map +1 -1
  113. package/dist/module/shared/translation/types.js +0 -2
  114. package/dist/module/shared/translation/types.js.map +1 -1
  115. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  116. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  117. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  118. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  119. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  120. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  121. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  122. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  123. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  124. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  125. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  126. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  127. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +5 -2
  128. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  129. package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
  130. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  131. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  132. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +18 -24
  134. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  135. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  136. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  137. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +7 -13
  138. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  139. package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  140. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
  141. package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
  142. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +5 -7
  143. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  144. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +6 -16
  145. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  146. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +9 -8
  147. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  148. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
  149. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  150. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -12
  151. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  152. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +24 -19
  153. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  154. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +7 -9
  155. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  156. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -3
  157. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  158. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
  159. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  160. package/dist/typescript/commonjs/index.d.ts +1 -0
  161. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  162. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
  163. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  164. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
  165. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  166. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -21
  167. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +2 -3
  169. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
  170. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
  171. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
  172. package/dist/typescript/commonjs/shared/translation/index.d.ts +1 -0
  173. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/shared/translation/model.d.ts +3 -43
  175. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  176. package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
  177. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  178. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
  179. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  180. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
  181. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  182. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
  183. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  184. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  185. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  186. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  187. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  188. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
  189. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  190. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +5 -2
  191. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  192. package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
  193. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  194. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
  195. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
  196. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +18 -24
  197. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  198. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
  199. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  200. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +7 -13
  201. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  202. package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
  203. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
  204. package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
  205. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +5 -7
  206. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  207. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +6 -16
  208. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  209. package/dist/typescript/module/features/chatbot/model/translation.d.ts +9 -8
  210. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  211. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
  212. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  213. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -12
  214. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  215. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +24 -19
  216. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  217. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +7 -9
  218. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  219. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -3
  220. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  221. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
  222. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
  223. package/dist/typescript/module/index.d.ts +1 -0
  224. package/dist/typescript/module/index.d.ts.map +1 -1
  225. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
  226. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  227. package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
  228. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  229. package/dist/typescript/module/shared/translation/constants.d.ts +0 -21
  230. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  231. package/dist/typescript/module/shared/translation/helpers.d.ts +2 -3
  232. package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
  233. package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
  234. package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
  235. package/dist/typescript/module/shared/translation/index.d.ts +1 -0
  236. package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
  237. package/dist/typescript/module/shared/translation/model.d.ts +3 -43
  238. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  239. package/dist/typescript/module/shared/translation/types.d.ts +4 -4
  240. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  241. package/package.json +2 -2
  242. package/src/features/celebrations/config.ts +4 -4
  243. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +4 -2
  244. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +10 -7
  245. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +51 -34
  246. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +40 -15
  247. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +10 -9
  248. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +34 -17
  249. package/src/features/chatbot/components/Chatbot.tsx +11 -5
  250. package/src/features/chatbot/index.ts +4 -3
  251. package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +27 -53
  252. package/src/features/chatbot/model/ChatBotModel.ts +149 -151
  253. package/src/features/chatbot/model/DefaultMessageCreator.ts +16 -17
  254. package/src/features/chatbot/model/ThreadItem.ts +10 -15
  255. package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -5
  256. package/src/features/chatbot/model/constants.ts +0 -2
  257. package/src/features/chatbot/model/messagesHelper.ts +7 -12
  258. package/src/features/chatbot/model/t2s.ts +13 -28
  259. package/src/features/chatbot/model/translation.helpers.ts +1 -2
  260. package/src/features/chatbot/model/translation.ts +24 -34
  261. package/src/features/chatbot/types/api.types.ts +12 -12
  262. package/src/features/chatbot/types/model.types.ts +32 -31
  263. package/src/features/chatbot/types/t2s.types.ts +15 -18
  264. package/src/features/chatbot/types/translation.types.ts +2 -3
  265. package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +2 -3
  266. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +1 -0
  267. package/src/index.ts +1 -0
  268. package/src/lib/effector/createEntityFieldStore.ts +1 -9
  269. package/{dist/commonjs/shared/translation → src/lib}/localization/en.json +1 -8
  270. package/src/{shared/translation → lib}/localization/gb.json +1 -8
  271. package/src/{shared/translation → lib}/localization/sw.json +1 -8
  272. package/src/shared/icons/icon.types.ts +6 -9
  273. package/src/shared/translation/constants.ts +3 -3
  274. package/src/shared/translation/helpers.ts +9 -22
  275. package/src/shared/translation/hooks.ts +16 -12
  276. package/src/shared/translation/index.ts +1 -0
  277. package/src/shared/translation/model.ts +8 -8
  278. package/src/shared/translation/types.ts +8 -11
  279. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -44
  280. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  281. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +0 -62
  282. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  283. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js +0 -13
  284. package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  285. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +0 -17
  286. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  287. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -57
  288. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  289. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -130
  290. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  291. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  292. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -22
  293. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  294. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
  295. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
  296. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  297. package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
  298. package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
  299. package/dist/commonjs/lib/effector/withEvent.js +0 -13
  300. package/dist/commonjs/lib/effector/withEvent.js.map +0 -1
  301. package/dist/commonjs/lib/types/keys.js +0 -2
  302. package/dist/commonjs/lib/types/keys.js.map +0 -1
  303. package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
  304. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
  305. package/dist/commonjs/shared/icons/StopIcon.js +0 -33
  306. package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
  307. package/dist/commonjs/shared/translation/validation.types.js +0 -6
  308. package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
  309. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -38
  310. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
  311. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +0 -57
  312. package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
  313. package/dist/module/features/chatbot/components/ChatMessage/helpers.js +0 -9
  314. package/dist/module/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
  315. package/dist/module/features/chatbot/context/ChatBotModelContext.js +0 -12
  316. package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +0 -1
  317. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -51
  318. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
  319. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -125
  320. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
  321. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
  322. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -17
  323. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
  324. package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
  325. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
  326. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
  327. package/dist/module/features/chatbot/types/units.types.js +0 -2
  328. package/dist/module/features/chatbot/types/units.types.js.map +0 -1
  329. package/dist/module/lib/effector/withEvent.js +0 -9
  330. package/dist/module/lib/effector/withEvent.js.map +0 -1
  331. package/dist/module/lib/types/keys.js +0 -2
  332. package/dist/module/lib/types/keys.js.map +0 -1
  333. package/dist/module/shared/icons/HighlighterIcon.js +0 -29
  334. package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
  335. package/dist/module/shared/icons/StopIcon.js +0 -26
  336. package/dist/module/shared/icons/StopIcon.js.map +0 -1
  337. package/dist/module/shared/translation/validation.types.js +0 -4
  338. package/dist/module/shared/translation/validation.types.js.map +0 -1
  339. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  340. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  341. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  342. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  343. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  344. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  345. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  346. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  347. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  348. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  349. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  350. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  351. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  352. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  353. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  354. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  355. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  356. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  357. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  358. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -34
  359. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
  360. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +0 -2
  361. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +0 -1
  362. package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
  363. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
  364. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
  365. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
  366. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
  367. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
  368. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -17
  369. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
  370. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
  371. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
  372. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
  373. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
  374. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
  375. package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
  376. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
  377. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
  378. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
  379. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
  380. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
  381. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
  382. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
  383. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
  384. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
  385. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
  386. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
  387. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
  388. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
  389. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -34
  390. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
  391. package/dist/typescript/module/lib/effector/withEvent.d.ts +0 -2
  392. package/dist/typescript/module/lib/effector/withEvent.d.ts.map +0 -1
  393. package/dist/typescript/module/lib/types/keys.d.ts +0 -8
  394. package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
  395. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
  396. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
  397. package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
  398. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
  399. package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -17
  400. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
  401. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +0 -38
  402. package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +0 -52
  403. package/src/features/chatbot/components/ChatMessage/helpers.ts +0 -9
  404. package/src/features/chatbot/context/ChatBotModelContext.ts +0 -14
  405. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
  406. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -150
  407. package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -18
  408. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -95
  409. package/src/features/chatbot/types/units.types.ts +0 -37
  410. package/src/lib/effector/withEvent.ts +0 -7
  411. package/src/lib/types/keys.ts +0 -18
  412. package/src/shared/icons/HighlighterIcon.tsx +0 -21
  413. package/src/shared/icons/StopIcon.tsx +0 -17
  414. package/src/shared/translation/validation.types.ts +0 -26
@@ -1,4 +1,8 @@
1
- import { ChatAnswer, FullStrokeData, Stroke } from './units.types';
1
+ export type ChatAnswer = {
2
+ text: string;
3
+ promptKey: string;
4
+ translatedText?: string;
5
+ };
2
6
  export type GetAlternativesPayload = {
3
7
  municipalityId: string;
4
8
  assignmentClassGrade: number;
@@ -14,14 +18,15 @@ export type PostMessagePayload = {
14
18
  language: string;
15
19
  problemAnswer: string[];
16
20
  answer?: string | string[];
21
+ threadId?: string | null;
17
22
  problem: string;
18
23
  imageAltText?: string;
19
24
  };
20
25
  export type PostMessageResponse = {
21
26
  message: string;
27
+ threadId: string;
22
28
  options: ChatAnswer[];
23
29
  endMessage?: boolean;
24
- threadId: string;
25
30
  };
26
31
  export type GoogleTranslatePayload = {
27
32
  text: string[];
@@ -52,6 +57,10 @@ export type GoogleText2SpeechPayload = {
52
57
  export type GoogleText2SpeechResponse = string | undefined | {
53
58
  audioContent?: string;
54
59
  };
60
+ export type Stroke = {
61
+ x: number[];
62
+ y: number[];
63
+ };
55
64
  export type ChatHintPayload = {
56
65
  problemDescription: string;
57
66
  correctAnswer: string[];
@@ -64,14 +73,4 @@ export type ChatHintPayload = {
64
73
  export type ChatHintResponse = {
65
74
  message: string;
66
75
  };
67
- export type ErrorSpottingPayload = {
68
- strokes: FullStrokeData[];
69
- problemDescription: string;
70
- correctAnswer: string[];
71
- userAnswer: string | string[];
72
- hint: string;
73
- };
74
- export type ErrorSpottingResponse = {
75
- highlightedStrokeIds: string[];
76
- };
77
76
  //# sourceMappingURL=api.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/api.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAElE,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,GAAG,IAAI,CAAA;AAER,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,KAAK,EAAE,UAAU,EAAE,CAAA;KACpB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,G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AChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG;IAClC,oBAAoB,EAAE,MAAM,EAAE,CAAA;CAC/B,CAAA"}
1
+ {"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/api.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,GAAG,IAAI,CAAA;AAER,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE;QACP,OAAO,EAAE,UAAU,EAAE,CAAA;QACrB,KAAK,EAAE,UAAU,EAAE,CAAA;KACpB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB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AAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA"}
@@ -1,26 +1,30 @@
1
1
  import type { Store } from 'effector';
2
- import { ChatHintPayload, ChatHintResponse, ErrorSpottingPayload, ErrorSpottingResponse, GetAlternativesPayload, GetAlternativesResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, GoogleTranslatePayload, GoogleTranslateResponse, PostMessagePayload, PostMessageResponse } from './api.types';
2
+ import { GetAlternativesResponse, PostMessagePayload, PostMessageResponse, GoogleTranslatePayload, GoogleTranslateResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, ChatAnswer, GetAlternativesPayload, Stroke } from './api.types';
3
3
  import { ExtendWithOptional } from '../../../lib/helpers/types';
4
- import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types';
4
+ export type ConversationMessage = {
5
+ id: string;
6
+ message: string;
7
+ threadId: string;
8
+ options: ChatAnswer[];
9
+ isOwnMessage: boolean;
10
+ translatedMessage?: string;
11
+ endMessage?: boolean;
12
+ };
5
13
  export type ChatbotMessages = {
6
14
  error: ConversationMessage;
7
15
  start: ConversationMessage;
8
16
  endMessage: ConversationMessage;
9
17
  anotherHintOption: ChatAnswer;
10
18
  };
11
- export type ChatbotApiRequests = {
12
- getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
13
- postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
14
- postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
15
- postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
16
- spotError: (props: ErrorSpottingPayload) => Promise<ErrorSpottingResponse>;
17
- };
18
19
  export type ChatbotModelProps = {
19
20
  $key?: Store<string>;
20
- api: Omit<ChatbotApiRequests, 'postMessage'> & {
21
- requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
21
+ api: {
22
+ getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
23
+ postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
24
+ postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
25
+ postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
22
26
  };
23
- threadMessagesLimit?: number;
27
+ messages: ChatbotMessages;
24
28
  };
25
29
  export type SendHelpParams = {
26
30
  message: string;
@@ -28,6 +32,8 @@ export type SendHelpParams = {
28
32
  };
29
33
  export type SendHelpProps = SendHelpParams & {
30
34
  key: string;
35
+ isTranslated: boolean;
36
+ threadId: string;
31
37
  context: ChatbotContext | null;
32
38
  };
33
39
  export type SetHintMessageProps = {
@@ -44,14 +50,14 @@ export declare enum MessageVariant {
44
50
  SENT = "sent",
45
51
  RECEIVED = "received"
46
52
  }
47
- export type CreateMessageResponse = ExtendWithOptional<Omit<PostMessageResponse, 'threadId'>, ConversationMessage>;
48
- type GetVisibleStrokesResponse = {
49
- strokes: FullStrokeData[];
50
- validationKey: string;
53
+ export type ChatbotRenderer = {
54
+ message: string;
55
+ variant: MessageVariant;
56
+ withTextToSpeech: boolean;
51
57
  };
58
+ export type CreateMessageResponse = ExtendWithOptional<PostMessageResponse, ConversationMessage>;
52
59
  export type IChatDrawBoardAdapter = {
53
- $strokesValidationKey: Store<string | null>;
54
- getVisibleStrokes(): Promise<GetVisibleStrokesResponse | null>;
60
+ getVisibleStrokes(): Promise<Stroke[] | null>;
55
61
  };
56
62
  export type ChatbotContext = {
57
63
  language: string;
@@ -61,5 +67,4 @@ export type ChatbotContext = {
61
67
  translationTargetLanguage: string;
62
68
  imageDescription?: string;
63
69
  };
64
- export {};
65
70
  //# sourceMappingURL=model.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"AAA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GAAG,MAAM,EAAE,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
1
+ {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,MAAM,EACP,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAE/D,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,UAAU,EAAE,mBAAmB,CAAA;IAC/B,iBAAiB,EAAE,UAAU,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACpB,GAAG,EAAE;QACH,eAAe,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;QACpF,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;QACxE,iBAAiB,EAAE,CAAC,KAAK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E,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ConversationMessage } from './units.types';
1
+ import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
2
2
  export declare enum AudioStatus {
3
3
  PLAYING = "playing",
4
4
  STOPPED = "stopped",
@@ -11,14 +11,12 @@ export type AudioProvider = {
11
11
  stop: () => void;
12
12
  };
13
13
  export type PlayTextToSpeechProps = {
14
- message: ConversationMessage;
14
+ text: string;
15
+ messageId: string;
15
16
  isTranslated: boolean;
16
- };
17
- export type T2SState = {
18
- status: AudioStatus;
19
- disabled: boolean;
20
- isActive: boolean;
21
- isLoading: boolean;
22
- isEnabled: boolean;
17
+ config?: {
18
+ voice?: typeof DEFAULT_VOICE;
19
+ audioConfig?: typeof AUDIO_CONFIG;
20
+ };
23
21
  };
24
22
  //# sourceMappingURL=t2s.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"t2s.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/t2s.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"t2s.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/t2s.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CACpB;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;QAC5B,WAAW,CAAC,EAAE,OAAO,YAAY,CAAA;KACpC,CAAA;CACJ,CAAA"}
@@ -1,14 +1,13 @@
1
+ import { ConversationMessage } from './model.types';
1
2
  import { GetAlternativesResponse } from './api.types';
2
- import { ConversationMessage } from './units.types';
3
3
  export type TranslateBatchFxProps = {
4
4
  messages: ConversationMessage[];
5
5
  targetLanguage: string;
6
6
  alternatives: GetAlternativesResponse | null;
7
7
  };
8
- export type ApplyTranslationProps = {
8
+ export type TranslateMessageFxProps = {
9
9
  messages: ConversationMessage[];
10
10
  targetLanguage: string;
11
- isTranslationActive: boolean;
12
11
  };
13
12
  export type AddTranslationToAlternativesProps = {
14
13
  alternatives: GetAlternativesResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"translation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/translation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,mBAAmB,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,EAAE,uBAAuB,CAAA;IACrC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC5C,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAA;CAC7C,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,EAAE,CAAA;QACf,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB,GAAG,IAAI,CAAA;CACT,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI;IACzE,QAAQ,EAAE,IAAI,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA"}
1
+ {"version":3,"file":"translation.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/translation.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,EAAE,uBAAuB,CAAA;IACrC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AACD,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC5C,WAAW,EAAE,mBAAmB,GAAG,SAAS,CAAA;CAC7C,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,EAAE,CAAA;QACf,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB,GAAG,IAAI,CAAA;CACT,CAAA;AAED,MAAM,MAAM,qBAAqB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI;IACzE,QAAQ,EAAE,IAAI,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAqBtD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa/D,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,EAAE,YAAY,CAAA;IACzB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,+IAUpB,iBAAiB,uBA4KrB,CAAA"}
1
+ {"version":3,"file":"AnimatedCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAqBtD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAa/D,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,EAAE,YAAY,CAAA;IACzB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,YAAY,+IAUpB,iBAAiB,uBA0KrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PracticeButtonGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAcxC,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE,uBAAuB,EAAE,OAAO,CAAA;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,mBAAmB,6FAM7B,wBAAwB,sBAiC1B,CAAA"}
1
+ {"version":3,"file":"PracticeButtonGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAexC,KAAK,wBAAwB,GAAG;IAC9B,WAAW,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClE,uBAAuB,EAAE,OAAO,CAAA;IAChC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,mBAAmB,6FAM7B,wBAAwB,sBAiC1B,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export { useFeaturesLocalization, setFeaturesLocalization, Locale } from './shared/translation';
2
+ export type { LocalizationConfig } from './shared/translation';
2
3
  export { generateRandomId } from './lib/helpers/helpers';
3
4
  export * from './features/chatbot';
4
5
  export * from './features/feedback';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
@@ -1,4 +1,3 @@
1
- import { Event } from 'effector';
2
1
  type UpdateField<T> = {
3
2
  key: string;
4
3
  } & ({
@@ -12,7 +11,6 @@ export declare class EntityFieldStore<T> {
12
11
  readonly setField: import("effector").EventCallable<UpdateField<T>>;
13
12
  readonly reset: import("effector").EventCallable<void>;
14
13
  readonly $state: import("effector").StoreWritable<Record<string, T>>;
15
- on<EV>(event: Event<EV>, fn: (state: Record<string, T>, payload: EV) => Record<string, T> | void): this;
16
14
  }
17
15
  export declare function createEntityFieldStore<T>(): EntityFieldStore<T>;
18
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"createEntityFieldStore.d.ts","sourceRoot":"","sources":["../../../../../src/lib/effector/createEntityFieldStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,EAAE,MAAM,UAAU,CAAA;AAE1D,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC,CAAA;AAEnF,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,SAAgB,QAAQ,mDAAgC;IACxD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,MAAM,sDAUF;IAEb,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,EAChB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI;CAK1E;AAED,wBAAgB,sBAAsB,CAAC,CAAC,yBAEvC"}
1
+ {"version":3,"file":"createEntityFieldStore.d.ts","sourceRoot":"","sources":["../../../../../src/lib/effector/createEntityFieldStore.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,CAAC,CAAC,IAAI;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC,CAAA;AAEnF,qBAAa,gBAAgB,CAAC,CAAC;IAC7B,SAAgB,QAAQ,mDAAgC;IACxD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,MAAM,sDAUF;CACrB;AAED,wBAAgB,sBAAsB,CAAC,CAAC,yBAEvC"}
@@ -1,4 +1,3 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
1
  export type IconProps = {
3
2
  color?: string;
4
3
  className?: string;
@@ -6,6 +5,5 @@ export type IconProps = {
6
5
  strokeWidth?: string;
7
6
  width?: number;
8
7
  height?: number;
9
- style?: StyleProp<ViewStyle>;
10
8
  };
11
9
  //# sourceMappingURL=icon.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnD,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA"}
1
+ {"version":3,"file":"icon.types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/icon.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -12,13 +12,6 @@ export declare const LOCALIZATION_CONFIGS: {
12
12
  "time.monthsAgo": string;
13
13
  "time.yearAgo": string;
14
14
  "time.yearsAgo": string;
15
- chat: {
16
- anotherHint: string;
17
- answerAgain: string;
18
- errorMessage: string;
19
- howCanIHelp: string;
20
- showError: string;
21
- };
22
15
  };
23
16
  "en-GB": {
24
17
  "teacherFeedback.noComments": string;
@@ -33,13 +26,6 @@ export declare const LOCALIZATION_CONFIGS: {
33
26
  "time.monthsAgo": string;
34
27
  "time.yearAgo": string;
35
28
  "time.yearsAgo": string;
36
- chat: {
37
- anotherHint: string;
38
- answerAgain: string;
39
- errorMessage: string;
40
- howCanIHelp: string;
41
- showError: string;
42
- };
43
29
  };
44
30
  "sv-SE": {
45
31
  "teacherFeedback.noComments": string;
@@ -54,13 +40,6 @@ export declare const LOCALIZATION_CONFIGS: {
54
40
  "time.monthsAgo": string;
55
41
  "time.yearAgo": string;
56
42
  "time.yearsAgo": string;
57
- chat: {
58
- anotherHint: string;
59
- answerAgain: string;
60
- errorMessage: string;
61
- howCanIHelp: string;
62
- showError: string;
63
- };
64
43
  };
65
44
  };
66
45
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { LOCALIZATION_CONFIGS } from './constants';
2
- import { GetText, TranslationKeys, Translations } from './types';
3
- export declare function getTranslation(config: Translations, key: TranslationKeys): string;
2
+ import { GetText, LocalizationConfig } from './types';
4
3
  export declare const getSubstitutedString: (str: string, substitutions?: Record<string, string>) => string;
5
4
  export declare const getText: GetText;
6
- export declare const setFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations) => void;
5
+ export declare const setFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig) => void;
7
6
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEhE,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,UAexE;AAED,eAAO,MAAM,oBAAoB,QAAS,MAAM,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAWtF,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,OAMrB,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,YAAY,SAGlF,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAmB,MAAM,SAAS,CAAA;AAEtE,eAAO,MAAM,oBAAoB,QAAS,MAAM,kBAAiB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAWtF,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,OAUrB,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,kBAAkB,CAAC,GAAG,kBAAkB,SAG9F,CAAA"}
@@ -1,5 +1,5 @@
1
- import { GetText, Translations } from './types';
1
+ import { GetText, LocalizationConfig } from './types';
2
2
  import { LOCALIZATION_CONFIGS } from './constants';
3
3
  export declare const useText: () => GetText;
4
- export declare const useFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations) => void;
4
+ export declare const useFeaturesLocalization: (generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig) => void;
5
5
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,OAAO,QAAO,OAQ1B,CAAA;AAED,eAAO,MAAM,uBAAuB,cACvB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,YAAY,CAAC,GAAG,YAAY,SAKlF,CAAA"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,OAAO,QAAO,OAY1B,CAAA;AAED,eAAO,MAAM,uBAAuB,cACrB,CAAC,CAAC,MAAM,EAAE,OAAO,oBAAoB,KAAK,kBAAkB,CAAC,GAAG,kBAAkB,SAKhG,CAAA"}
@@ -2,4 +2,5 @@ export { useFeaturesLocalization, useText } from './hooks';
2
2
  export { setFeaturesLocalization, getText as t } from './helpers';
3
3
  export { $localization, setLocalization } from './model';
4
4
  export { Locale } from './types';
5
+ export type { LocalizationConfig } from './types';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,45 +1,5 @@
1
- import { Translations } from './types';
1
+ import { LocalizationConfig } from './types';
2
2
  import { LOCALIZATION_CONFIGS } from './constants';
3
- export declare const setLocalization: import("effector").EventCallable<{
4
- "teacherFeedback.noComments": string;
5
- "time.justNow": string;
6
- "time.minuteAgo": string;
7
- "time.minutesAgo": string;
8
- "time.hourAgo": string;
9
- "time.hoursAgo": string;
10
- "time.dayAgo": string;
11
- "time.daysAgo": string;
12
- "time.monthAgo": string;
13
- "time.monthsAgo": string;
14
- "time.yearAgo": string;
15
- "time.yearsAgo": string;
16
- chat: {
17
- anotherHint: string;
18
- answerAgain: string;
19
- errorMessage: string;
20
- howCanIHelp: string;
21
- showError: string;
22
- };
23
- } | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
24
- export declare const $localization: import("effector").StoreWritable<{
25
- "teacherFeedback.noComments": string;
26
- "time.justNow": string;
27
- "time.minuteAgo": string;
28
- "time.minutesAgo": string;
29
- "time.hourAgo": string;
30
- "time.hoursAgo": string;
31
- "time.dayAgo": string;
32
- "time.daysAgo": string;
33
- "time.monthAgo": string;
34
- "time.monthsAgo": string;
35
- "time.yearAgo": string;
36
- "time.yearsAgo": string;
37
- chat: {
38
- anotherHint: string;
39
- answerAgain: string;
40
- errorMessage: string;
41
- howCanIHelp: string;
42
- showError: string;
43
- };
44
- }>;
3
+ export declare const setLocalization: import("effector").EventCallable<LocalizationConfig | ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig)>;
4
+ export declare const $localization: import("effector").StoreWritable<LocalizationConfig>;
45
5
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,kBAAkB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe,kEACO,OAAO,oBAAoB,KAAK,kBAAkB,EAClF,CAAA;AAEH,eAAO,MAAM,aAAa,sDAMzB,CAAA"}
@@ -1,11 +1,11 @@
1
- import enTranslations from './localization/en.json';
2
- import { RetrieveKeys } from '../../lib/types/keys';
1
+ import enTranslations from '../../lib/localization/en.json';
3
2
  export type Translations = typeof enTranslations;
4
- export type TranslationKeys = RetrieveKeys<Translations>;
5
- export type GetText = (key: TranslationKeys, args?: Record<string, string> | null) => string;
3
+ export type TranslationKeys = keyof Translations;
4
+ export type GetText = <T extends TranslationKeys>(key: T, args?: Record<string, string> | null) => Translations[T];
6
5
  export declare enum Locale {
7
6
  EN = "en-SE",
8
7
  SW = "sv-SE",
9
8
  GB = "en-GB"
10
9
  }
10
+ export type LocalizationConfig = Record<string, string>;
11
11
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;AACxD,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,MAAM,CAAA;AAE5F,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;CACb"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,gCAAgC,CAAA;AAE3D,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,MAAM,YAAY,CAAA;AAEhD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,eAAe,EAC9C,GAAG,EAAE,CAAC,EACN,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KACjC,YAAY,CAAC,CAAC,CAAC,CAAA;AAEpB,oBAAY,MAAM;IAChB,EAAE,UAAU;IACZ,EAAE,UAAU;IACZ,EAAE,UAAU;CACb;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
+ import { ChatbotModel } from '../../model/ChatBotModel';
2
3
  type AlternativesProps = {
4
+ model: ChatbotModel;
3
5
  onPressAlternative: (message: string, translatedMessage?: string) => void;
4
6
  hasMessages: boolean;
5
7
  isHintFeedback: boolean;
6
8
  };
7
- export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
9
+ export declare const Alternatives: ({ model, onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
8
10
  export {};
9
11
  //# sourceMappingURL=Alternatives.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,iBAAiB,GAAG;IACvB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,yDAItB,iBAAiB,sBA4BnB,CAAA"}
1
+ {"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,YAAY,CAAA;IACnB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,gEAKtB,iBAAiB,sBA2BnB,CAAA"}
@@ -1,12 +1,15 @@
1
- import React from 'react';
2
- import { T2SState } from '../../types/t2s.types';
3
- import { MessageVariant } from '../../types/model.types';
4
- import { ConversationMessage } from '../../types/units.types';
1
+ import React, { ReactNode } from 'react';
2
+ import { AudioStatus } from '../../types/t2s.types';
3
+ import { MessageVariant, ChatbotRenderer } from '../../types/model.types';
5
4
  type ChatMessageProps = {
6
5
  variant: MessageVariant;
7
- message: ConversationMessage;
8
- isTranslated?: boolean;
9
- t2sState: T2SState;
6
+ message: string;
7
+ onPressTextToSpeech: () => void;
8
+ isTextToSpeechPending: boolean;
9
+ isActive: boolean;
10
+ withTextToSpeech?: boolean;
11
+ audioStatus: AudioStatus;
12
+ renderer?: (props: ChatbotRenderer) => ReactNode;
10
13
  };
11
14
  export type VariantProps = Omit<ChatMessageProps, 'variant'>;
12
15
  export declare const ChatMessage: ({ variant, ...props }: ChatMessageProps) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAG5C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
1
+ {"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
- import { T2SState } from '../../types/t2s.types';
3
- import { ConversationMessage } from '../../types/units.types';
2
+ import { AudioStatus } from '../../types/t2s.types';
4
3
  type MessageTextToSpeechProps = {
5
- state: T2SState;
6
- message: ConversationMessage;
4
+ status: AudioStatus;
5
+ disabled: boolean;
6
+ isActive: boolean;
7
+ isLoading: boolean;
8
+ onPress: () => void;
7
9
  };
8
- export declare const MessageTextToSpeech: ({ state: { status, disabled, isActive, isLoading }, message, }: MessageTextToSpeechProps) => React.JSX.Element;
10
+ export declare const MessageTextToSpeech: ({ status, disabled, isActive, isLoading, onPress, }: MessageTextToSpeechProps) => React.JSX.Element;
9
11
  export {};
10
12
  //# sourceMappingURL=MessageTextToSpeech.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAe,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAuB7D,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,mBAAmB,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,mBAAmB,mEAG7B,wBAAwB,sBAqB1B,CAAA"}
1
+ {"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAsBnD,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,wDAM7B,wBAAwB,sBAU1B,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from './ChatMessage';
3
- export declare const ReceivedMessage: ({ message, isTranslated, t2sState }: VariantProps) => React.JSX.Element;
3
+ export declare const ReceivedMessage: ({ message, onPressTextToSpeech, isTextToSpeechPending, isActive, audioStatus, renderer, withTextToSpeech, }: VariantProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=ReceivedMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAI5C,eAAO,MAAM,eAAe,wCAAyC,YAAY,sBAchF,CAAA"}
1
+ {"version":3,"file":"ReceivedMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAK5C,eAAO,MAAM,eAAe,gHAQzB,YAAY,sBAuBd,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { VariantProps } from './ChatMessage';
3
- export declare const SentMessage: React.MemoExoticComponent<({ message, isTranslated }: VariantProps) => React.JSX.Element>;
3
+ export declare const SentMessage: ({ message, renderer }: VariantProps) => React.JSX.Element;
4
4
  //# sourceMappingURL=SentMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SentMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/SentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,eAAO,MAAM,WAAW,wDAA0C,YAAY,uBAQ5E,CAAA"}
1
+ {"version":3,"file":"SentMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/SentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG5C,eAAO,MAAM,WAAW,0BAA2B,YAAY,sBAQ9D,CAAA"}
@@ -1,10 +1,18 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { ChatbotModel } from '../../model/ChatBotModel';
3
+ import { AUDIO_CONFIG, DEFAULT_VOICE } from '../../constants';
4
+ import { ChatbotRenderer } from '../../types/model.types';
3
5
  type ChatbotMessagesProps = {
4
6
  model: ChatbotModel;
5
7
  isHintFeedback: boolean;
8
+ sanitizeSpeechInput: (speech: string) => string;
6
9
  isTextToSpeechEnabled: boolean;
10
+ textToSpeechConfig?: {
11
+ voice: typeof DEFAULT_VOICE;
12
+ audioConfig: typeof AUDIO_CONFIG;
13
+ };
14
+ renderer?: (props: ChatbotRenderer) => ReactNode;
7
15
  };
8
- export declare const ChatbotMessages: ({ model, isHintFeedback, isTextToSpeechEnabled, }: ChatbotMessagesProps) => React.JSX.Element;
16
+ export declare const ChatbotMessages: ({ model, isHintFeedback, sanitizeSpeechInput, isTextToSpeechEnabled, textToSpeechConfig, renderer, }: ChatbotMessagesProps) => React.JSX.Element;
9
17
  export {};
10
18
  //# sourceMappingURL=ChatbotMessages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAGrC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMvD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;CAC/B,CAAA;AAQD,eAAO,MAAM,eAAe,sDAIzB,oBAAoB,sBAkEtB,CAAA"}
1
+ {"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAU,MAAM,OAAO,CAAA;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIvD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAyB,MAAM,iBAAiB,CAAA;AACpF,OAAO,EAAkB,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAQD,eAAO,MAAM,eAAe,yGAOzB,oBAAoB,sBA0EtB,CAAA"}