@magmamath/students-features 0.4.4 → 0.5.0-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 (801) hide show
  1. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +2 -1
  2. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  4. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +41 -0
  5. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -0
  6. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +22 -19
  7. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  8. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +32 -32
  9. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  10. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +11 -13
  11. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +8 -28
  13. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/components/Chatbot.js +5 -7
  15. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +17 -0
  17. package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +1 -0
  18. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +51 -0
  19. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
  20. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +116 -0
  21. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
  22. package/dist/commonjs/features/chatbot/index.js +0 -7
  23. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  24. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +145 -121
  25. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +44 -22
  27. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
  28. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +22 -0
  29. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -0
  30. package/dist/commonjs/features/chatbot/model/{api.js → ChatbotApi.js} +16 -1
  31. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -0
  32. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +110 -0
  33. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -0
  34. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +12 -12
  35. package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  36. package/dist/commonjs/features/chatbot/model/ThreadItem.js +16 -8
  37. package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
  38. package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
  39. package/dist/commonjs/features/chatbot/model/messagesHelper.js +7 -7
  40. package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
  41. package/dist/commonjs/features/chatbot/model/t2s.js +18 -13
  42. package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
  43. package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
  44. package/dist/commonjs/features/chatbot/model/translation.js +54 -45
  45. package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
  46. package/dist/commonjs/features/chatbot/types/api.types.js +4 -0
  47. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  48. package/dist/commonjs/features/chatbot/types/units.types.js +2 -0
  49. package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -0
  50. package/dist/commonjs/index.js +0 -24
  51. package/dist/commonjs/index.js.map +1 -1
  52. package/dist/commonjs/lib/effector/createEntityFieldStore.js +4 -0
  53. package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
  54. package/dist/commonjs/lib/effector/withEvent.js +13 -0
  55. package/dist/commonjs/lib/effector/withEvent.js.map +1 -0
  56. package/dist/commonjs/lib/helpers/helpers.js +1 -3
  57. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  58. package/dist/commonjs/lib/helpers/randomElements.js +24 -0
  59. package/dist/commonjs/lib/helpers/randomElements.js.map +1 -0
  60. package/dist/commonjs/lib/localization/en.json +7 -1
  61. package/dist/commonjs/lib/localization/gb.json +7 -1
  62. package/dist/commonjs/lib/localization/sw.json +7 -1
  63. package/dist/commonjs/lib/types/keys.js +2 -0
  64. package/dist/commonjs/lib/types/keys.js.map +1 -0
  65. package/dist/commonjs/shared/icons/HighlighterIcon.js +36 -0
  66. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -0
  67. package/dist/commonjs/shared/icons/{Valentine.js → StopIcon.js} +12 -9
  68. package/dist/commonjs/shared/icons/StopIcon.js.map +1 -0
  69. package/dist/commonjs/shared/icons/icon.types.js +4 -0
  70. package/dist/commonjs/shared/translation/helpers.js +22 -6
  71. package/dist/commonjs/shared/translation/helpers.js.map +1 -1
  72. package/dist/commonjs/shared/translation/hooks.js +3 -5
  73. package/dist/commonjs/shared/translation/hooks.js.map +1 -1
  74. package/dist/commonjs/shared/translation/model.js +1 -1
  75. package/dist/commonjs/shared/translation/model.js.map +1 -1
  76. package/dist/commonjs/shared/translation/types.js +1 -1
  77. package/dist/commonjs/shared/translation/types.js.map +1 -1
  78. package/dist/commonjs/shared/translation/validation.types.js +6 -0
  79. package/dist/commonjs/shared/translation/validation.types.js.map +1 -0
  80. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +2 -1
  81. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  82. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  83. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +35 -0
  84. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -0
  85. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +23 -20
  86. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  87. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +32 -32
  88. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  89. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +11 -13
  90. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  91. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +8 -28
  92. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  93. package/dist/module/features/chatbot/components/Chatbot.js +6 -8
  94. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  95. package/dist/module/features/chatbot/context/ChatBotModelContext.js +12 -0
  96. package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +1 -0
  97. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +45 -0
  98. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
  99. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +111 -0
  100. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
  101. package/dist/module/features/chatbot/index.js +0 -1
  102. package/dist/module/features/chatbot/index.js.map +1 -1
  103. package/dist/module/features/chatbot/model/ChatBotModel.js +147 -123
  104. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  105. package/dist/module/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +42 -20
  106. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
  107. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +17 -0
  108. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -0
  109. package/dist/module/features/chatbot/model/{api.js → ChatbotApi.js} +16 -1
  110. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -0
  111. package/dist/module/features/chatbot/model/ChatsCacheModel.js +104 -0
  112. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -0
  113. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
  114. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  115. package/dist/module/features/chatbot/model/ThreadItem.js +16 -8
  116. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  117. package/dist/module/features/chatbot/model/constants.js.map +1 -1
  118. package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
  119. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  120. package/dist/module/features/chatbot/model/t2s.js +19 -14
  121. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  122. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  123. package/dist/module/features/chatbot/model/translation.js +54 -45
  124. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  125. package/dist/module/features/chatbot/types/api.types.js +2 -0
  126. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  127. package/dist/module/features/chatbot/types/units.types.js +2 -0
  128. package/dist/module/features/chatbot/types/units.types.js.map +1 -0
  129. package/dist/module/index.js +0 -2
  130. package/dist/module/index.js.map +1 -1
  131. package/dist/module/lib/effector/createEntityFieldStore.js +4 -0
  132. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  133. package/dist/module/lib/effector/withEvent.js +9 -0
  134. package/dist/module/lib/effector/withEvent.js.map +1 -0
  135. package/dist/module/lib/helpers/helpers.js +0 -1
  136. package/dist/module/lib/helpers/helpers.js.map +1 -1
  137. package/dist/module/lib/helpers/randomElements.js +20 -0
  138. package/dist/module/lib/helpers/randomElements.js.map +1 -0
  139. package/dist/module/lib/localization/en.json +7 -1
  140. package/dist/module/lib/localization/gb.json +7 -1
  141. package/dist/module/lib/localization/sw.json +7 -1
  142. package/dist/module/lib/types/keys.js +2 -0
  143. package/dist/module/lib/types/keys.js.map +1 -0
  144. package/dist/module/shared/icons/HighlighterIcon.js +29 -0
  145. package/dist/module/shared/icons/HighlighterIcon.js.map +1 -0
  146. package/dist/module/shared/icons/StopIcon.js +26 -0
  147. package/dist/module/shared/icons/StopIcon.js.map +1 -0
  148. package/dist/module/shared/icons/icon.types.js +2 -0
  149. package/dist/module/shared/translation/helpers.js +19 -5
  150. package/dist/module/shared/translation/helpers.js.map +1 -1
  151. package/dist/module/shared/translation/hooks.js +4 -6
  152. package/dist/module/shared/translation/hooks.js.map +1 -1
  153. package/dist/module/shared/translation/model.js +1 -1
  154. package/dist/module/shared/translation/model.js.map +1 -1
  155. package/dist/module/shared/translation/types.js +2 -0
  156. package/dist/module/shared/translation/types.js.map +1 -1
  157. package/dist/module/shared/translation/validation.types.js +4 -0
  158. package/dist/module/shared/translation/validation.types.js.map +1 -0
  159. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
  160. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  161. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
  162. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
  164. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
  166. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  168. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  170. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
  172. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  173. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +2 -5
  174. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  175. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
  176. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
  177. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +7 -0
  178. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
  179. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +30 -0
  180. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/features/chatbot/index.d.ts +4 -3
  182. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  183. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +24 -18
  184. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  185. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
  186. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
  188. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
  190. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
  192. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
  194. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  195. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +13 -7
  196. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  197. package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
  198. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +7 -5
  199. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  200. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +16 -6
  201. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +7 -8
  203. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  204. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +2 -1
  205. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +2 -11
  207. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +25 -24
  209. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +2 -7
  211. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -1
  213. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +34 -0
  215. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -0
  216. package/dist/typescript/commonjs/index.d.ts +0 -3
  217. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +2 -0
  219. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  220. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +2 -0
  221. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +1 -0
  222. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +0 -1
  223. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +2 -0
  225. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +1 -0
  226. package/dist/typescript/commonjs/lib/types/keys.d.ts +8 -0
  227. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +4 -0
  229. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -0
  230. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +4 -0
  231. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +1 -0
  232. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +2 -0
  233. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  234. package/dist/typescript/commonjs/shared/translation/constants.d.ts +18 -0
  235. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +3 -2
  237. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
  239. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/shared/translation/index.d.ts +0 -1
  241. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/shared/translation/model.d.ts +41 -3
  243. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/shared/translation/types.d.ts +3 -3
  245. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +17 -0
  247. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -0
  248. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
  249. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  250. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
  251. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  252. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
  253. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
  254. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
  255. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  256. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  257. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  258. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  259. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  260. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
  261. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  262. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +2 -5
  263. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  264. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
  265. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
  266. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +7 -0
  267. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
  268. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +30 -0
  269. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
  270. package/dist/typescript/module/features/chatbot/index.d.ts +4 -3
  271. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  272. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +24 -18
  273. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  274. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
  275. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
  276. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
  277. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
  278. package/dist/typescript/module/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
  279. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
  280. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
  281. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
  282. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
  283. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  284. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +13 -7
  285. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  286. package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
  287. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +7 -5
  288. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  289. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +16 -6
  290. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  291. package/dist/typescript/module/features/chatbot/model/translation.d.ts +7 -8
  292. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  293. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +2 -1
  294. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  295. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +2 -11
  296. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  297. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +25 -24
  298. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  299. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +2 -7
  300. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  301. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -1
  302. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  303. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +34 -0
  304. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -0
  305. package/dist/typescript/module/index.d.ts +0 -3
  306. package/dist/typescript/module/index.d.ts.map +1 -1
  307. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +2 -0
  308. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  309. package/dist/typescript/module/lib/effector/withEvent.d.ts +2 -0
  310. package/dist/typescript/module/lib/effector/withEvent.d.ts.map +1 -0
  311. package/dist/typescript/module/lib/helpers/helpers.d.ts +0 -1
  312. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  313. package/dist/typescript/module/lib/helpers/randomElements.d.ts +2 -0
  314. package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +1 -0
  315. package/dist/typescript/module/lib/types/keys.d.ts +8 -0
  316. package/dist/typescript/module/lib/types/keys.d.ts.map +1 -0
  317. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +4 -0
  318. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -0
  319. package/dist/typescript/module/shared/icons/StopIcon.d.ts +4 -0
  320. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +1 -0
  321. package/dist/typescript/module/shared/icons/icon.types.d.ts +2 -0
  322. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  323. package/dist/typescript/module/shared/translation/constants.d.ts +18 -0
  324. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  325. package/dist/typescript/module/shared/translation/helpers.d.ts +3 -2
  326. package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
  327. package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
  328. package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
  329. package/dist/typescript/module/shared/translation/index.d.ts +0 -1
  330. package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
  331. package/dist/typescript/module/shared/translation/model.d.ts +41 -3
  332. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  333. package/dist/typescript/module/shared/translation/types.d.ts +3 -3
  334. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  335. package/dist/typescript/module/shared/translation/validation.types.d.ts +17 -0
  336. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -0
  337. package/package.json +3 -6
  338. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +2 -4
  339. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +5 -5
  340. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +36 -0
  341. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +27 -20
  342. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +27 -26
  343. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +9 -9
  344. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +9 -30
  345. package/src/features/chatbot/components/Chatbot.tsx +5 -11
  346. package/src/features/chatbot/context/ChatBotModelContext.ts +14 -0
  347. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +48 -0
  348. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +130 -0
  349. package/src/features/chatbot/index.ts +3 -4
  350. package/src/features/chatbot/model/ChatBotModel.ts +137 -130
  351. package/src/features/chatbot/model/{ChatBotMessageHandler.ts → ChatBotThreadManager.ts} +53 -27
  352. package/src/features/chatbot/model/ChatBoxTextManager.ts +18 -0
  353. package/src/features/chatbot/model/{api.ts → ChatbotApi.ts} +19 -2
  354. package/src/features/chatbot/model/ChatsCacheModel.ts +95 -0
  355. package/src/features/chatbot/model/DefaultMessageCreator.ts +17 -16
  356. package/src/features/chatbot/model/ThreadItem.ts +15 -10
  357. package/src/features/chatbot/model/constants.ts +2 -0
  358. package/src/features/chatbot/model/messagesHelper.ts +12 -7
  359. package/src/features/chatbot/model/t2s.ts +28 -13
  360. package/src/features/chatbot/model/translation.helpers.ts +2 -1
  361. package/src/features/chatbot/model/translation.ts +52 -46
  362. package/src/features/chatbot/types/api.types.ts +2 -12
  363. package/src/features/chatbot/types/model.types.ts +37 -32
  364. package/src/features/chatbot/types/t2s.types.ts +10 -15
  365. package/src/features/chatbot/types/translation.types.ts +2 -1
  366. package/src/features/chatbot/types/units.types.ts +37 -0
  367. package/src/index.ts +0 -3
  368. package/src/lib/effector/createEntityFieldStore.ts +9 -1
  369. package/src/lib/effector/withEvent.ts +7 -0
  370. package/src/lib/helpers/helpers.ts +0 -2
  371. package/src/lib/helpers/randomElements.ts +22 -0
  372. package/src/lib/localization/en.json +7 -1
  373. package/src/lib/localization/gb.json +7 -1
  374. package/src/lib/localization/sw.json +7 -1
  375. package/src/lib/types/keys.ts +18 -0
  376. package/src/shared/icons/HighlighterIcon.tsx +21 -0
  377. package/src/shared/icons/StopIcon.tsx +17 -0
  378. package/src/shared/icons/icon.types.ts +9 -6
  379. package/src/shared/translation/helpers.ts +22 -9
  380. package/src/shared/translation/hooks.ts +12 -16
  381. package/src/shared/translation/index.ts +0 -1
  382. package/src/shared/translation/model.ts +8 -8
  383. package/src/shared/translation/types.ts +10 -7
  384. package/src/shared/translation/validation.types.ts +26 -0
  385. package/dist/commonjs/features/celebrations/components/Celebrations.js +0 -51
  386. package/dist/commonjs/features/celebrations/components/Celebrations.js.map +0 -1
  387. package/dist/commonjs/features/celebrations/components/Particle.js +0 -85
  388. package/dist/commonjs/features/celebrations/components/Particle.js.map +0 -1
  389. package/dist/commonjs/features/celebrations/components/ParticleBatch.js +0 -47
  390. package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +0 -1
  391. package/dist/commonjs/features/celebrations/components/Spark.js +0 -23
  392. package/dist/commonjs/features/celebrations/components/Spark.js.map +0 -1
  393. package/dist/commonjs/features/celebrations/config.js +0 -224
  394. package/dist/commonjs/features/celebrations/config.js.map +0 -1
  395. package/dist/commonjs/features/celebrations/helpers.js +0 -99
  396. package/dist/commonjs/features/celebrations/helpers.js.map +0 -1
  397. package/dist/commonjs/features/celebrations/index.js +0 -28
  398. package/dist/commonjs/features/celebrations/index.js.map +0 -1
  399. package/dist/commonjs/features/celebrations/types.js +0 -15
  400. package/dist/commonjs/features/celebrations/types.js.map +0 -1
  401. package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
  402. package/dist/commonjs/features/chatbot/model/api.js.map +0 -1
  403. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -65
  404. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
  405. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -255
  406. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
  407. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -133
  408. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
  409. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -56
  410. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
  411. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -68
  412. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
  413. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -53
  414. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
  415. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +0 -47
  416. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +0 -1
  417. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -76
  418. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
  419. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -62
  420. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
  421. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -109
  422. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
  423. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -83
  424. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
  425. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  426. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +0 -96
  427. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
  428. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +0 -44
  429. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
  430. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -233
  431. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
  432. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -63
  433. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
  434. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +0 -34
  435. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +0 -1
  436. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -108
  437. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
  438. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -107
  439. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
  440. package/dist/commonjs/features/endOfAssignment/constants.js +0 -55
  441. package/dist/commonjs/features/endOfAssignment/constants.js.map +0 -1
  442. package/dist/commonjs/features/endOfAssignment/helpers.js +0 -64
  443. package/dist/commonjs/features/endOfAssignment/helpers.js.map +0 -1
  444. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +0 -51
  445. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
  446. package/dist/commonjs/features/endOfAssignment/index.js +0 -40
  447. package/dist/commonjs/features/endOfAssignment/index.js.map +0 -1
  448. package/dist/commonjs/features/endOfAssignment/model/model.js +0 -53
  449. package/dist/commonjs/features/endOfAssignment/model/model.js.map +0 -1
  450. package/dist/commonjs/features/endOfAssignment/types.js +0 -33
  451. package/dist/commonjs/features/endOfAssignment/types.js.map +0 -1
  452. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +0 -43
  453. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +0 -1
  454. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +0 -30
  455. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
  456. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -64
  457. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
  458. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +0 -29
  459. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
  460. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +0 -32
  461. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
  462. package/dist/commonjs/lib/constants.js +0 -11
  463. package/dist/commonjs/lib/constants.js.map +0 -1
  464. package/dist/commonjs/shared/hooks/useKeyDownListener.js +0 -27
  465. package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +0 -1
  466. package/dist/commonjs/shared/hooks/useKeyboard.js +0 -23
  467. package/dist/commonjs/shared/hooks/useKeyboard.js.map +0 -1
  468. package/dist/commonjs/shared/icons/Halloween.js +0 -54
  469. package/dist/commonjs/shared/icons/Halloween.js.map +0 -1
  470. package/dist/commonjs/shared/icons/Pi.js +0 -30
  471. package/dist/commonjs/shared/icons/Pi.js.map +0 -1
  472. package/dist/commonjs/shared/icons/Star.js +0 -30
  473. package/dist/commonjs/shared/icons/Star.js.map +0 -1
  474. package/dist/commonjs/shared/icons/Valentine.js.map +0 -1
  475. package/dist/commonjs/shared/icons/Winter.js +0 -32
  476. package/dist/commonjs/shared/icons/Winter.js.map +0 -1
  477. package/dist/module/features/celebrations/components/Celebrations.js +0 -45
  478. package/dist/module/features/celebrations/components/Celebrations.js.map +0 -1
  479. package/dist/module/features/celebrations/components/Particle.js +0 -77
  480. package/dist/module/features/celebrations/components/Particle.js.map +0 -1
  481. package/dist/module/features/celebrations/components/ParticleBatch.js +0 -40
  482. package/dist/module/features/celebrations/components/ParticleBatch.js.map +0 -1
  483. package/dist/module/features/celebrations/components/Spark.js +0 -17
  484. package/dist/module/features/celebrations/components/Spark.js.map +0 -1
  485. package/dist/module/features/celebrations/config.js +0 -219
  486. package/dist/module/features/celebrations/config.js.map +0 -1
  487. package/dist/module/features/celebrations/helpers.js +0 -92
  488. package/dist/module/features/celebrations/helpers.js.map +0 -1
  489. package/dist/module/features/celebrations/index.js +0 -5
  490. package/dist/module/features/celebrations/index.js.map +0 -1
  491. package/dist/module/features/celebrations/types.js +0 -11
  492. package/dist/module/features/celebrations/types.js.map +0 -1
  493. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
  494. package/dist/module/features/chatbot/model/api.js.map +0 -1
  495. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -59
  496. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
  497. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -249
  498. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
  499. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -126
  500. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
  501. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -50
  502. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
  503. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -62
  504. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
  505. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -47
  506. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
  507. package/dist/module/features/endOfAssignment/components/EOAModal.js +0 -41
  508. package/dist/module/features/endOfAssignment/components/EOAModal.js.map +0 -1
  509. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -70
  510. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
  511. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -56
  512. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
  513. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -103
  514. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
  515. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -77
  516. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
  517. package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  518. package/dist/module/features/endOfAssignment/components/Modal/Modal.js +0 -89
  519. package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
  520. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +0 -38
  521. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
  522. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -226
  523. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
  524. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -56
  525. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
  526. package/dist/module/features/endOfAssignment/components/Modal/model.js +0 -29
  527. package/dist/module/features/endOfAssignment/components/Modal/model.js.map +0 -1
  528. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -102
  529. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
  530. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -100
  531. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
  532. package/dist/module/features/endOfAssignment/constants.js +0 -51
  533. package/dist/module/features/endOfAssignment/constants.js.map +0 -1
  534. package/dist/module/features/endOfAssignment/helpers.js +0 -58
  535. package/dist/module/features/endOfAssignment/helpers.js.map +0 -1
  536. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +0 -46
  537. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
  538. package/dist/module/features/endOfAssignment/index.js +0 -6
  539. package/dist/module/features/endOfAssignment/index.js.map +0 -1
  540. package/dist/module/features/endOfAssignment/model/model.js +0 -48
  541. package/dist/module/features/endOfAssignment/model/model.js.map +0 -1
  542. package/dist/module/features/endOfAssignment/types.js +0 -29
  543. package/dist/module/features/endOfAssignment/types.js.map +0 -1
  544. package/dist/module/features/endOfAssignment/ui/EOABadge.js +0 -37
  545. package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +0 -1
  546. package/dist/module/features/endOfAssignment/ui/PracticeButton.js +0 -24
  547. package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
  548. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -57
  549. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
  550. package/dist/module/features/endOfAssignment/ui/SparkIcon.js +0 -21
  551. package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
  552. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +0 -24
  553. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
  554. package/dist/module/lib/constants.js +0 -7
  555. package/dist/module/lib/constants.js.map +0 -1
  556. package/dist/module/shared/hooks/useKeyDownListener.js +0 -22
  557. package/dist/module/shared/hooks/useKeyDownListener.js.map +0 -1
  558. package/dist/module/shared/hooks/useKeyboard.js +0 -20
  559. package/dist/module/shared/hooks/useKeyboard.js.map +0 -1
  560. package/dist/module/shared/icons/Halloween.js +0 -47
  561. package/dist/module/shared/icons/Halloween.js.map +0 -1
  562. package/dist/module/shared/icons/Pi.js +0 -23
  563. package/dist/module/shared/icons/Pi.js.map +0 -1
  564. package/dist/module/shared/icons/Star.js +0 -23
  565. package/dist/module/shared/icons/Star.js.map +0 -1
  566. package/dist/module/shared/icons/Valentine.js +0 -23
  567. package/dist/module/shared/icons/Valentine.js.map +0 -1
  568. package/dist/module/shared/icons/Winter.js +0 -25
  569. package/dist/module/shared/icons/Winter.js.map +0 -1
  570. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +0 -10
  571. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +0 -1
  572. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +0 -20
  573. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +0 -1
  574. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +0 -26
  575. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
  576. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +0 -4
  577. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +0 -1
  578. package/dist/typescript/commonjs/features/celebrations/config.d.ts +0 -192
  579. package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +0 -1
  580. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +0 -6
  581. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +0 -1
  582. package/dist/typescript/commonjs/features/celebrations/index.d.ts +0 -3
  583. package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +0 -1
  584. package/dist/typescript/commonjs/features/celebrations/types.d.ts +0 -11
  585. package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +0 -1
  586. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
  587. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
  588. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +0 -1
  589. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
  590. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
  591. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
  592. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
  593. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
  594. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
  595. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
  596. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
  597. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
  598. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
  599. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
  600. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
  601. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +0 -11
  602. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
  603. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
  604. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
  605. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
  606. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
  607. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
  608. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
  609. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
  610. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
  611. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
  612. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
  613. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
  614. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
  615. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
  616. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
  617. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
  618. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
  619. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +0 -14
  620. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
  621. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
  622. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
  623. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
  624. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
  625. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +0 -41
  626. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +0 -1
  627. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +0 -9
  628. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +0 -1
  629. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
  630. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
  631. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +0 -4
  632. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +0 -1
  633. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +0 -14
  634. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +0 -1
  635. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +0 -60
  636. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +0 -1
  637. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
  638. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
  639. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
  640. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
  641. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
  642. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
  643. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
  644. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
  645. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
  646. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
  647. package/dist/typescript/commonjs/lib/constants.d.ts +0 -4
  648. package/dist/typescript/commonjs/lib/constants.d.ts.map +0 -1
  649. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +0 -3
  650. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +0 -1
  651. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +0 -11
  652. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +0 -1
  653. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +0 -5
  654. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +0 -1
  655. package/dist/typescript/commonjs/shared/icons/Pi.d.ts +0 -5
  656. package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +0 -1
  657. package/dist/typescript/commonjs/shared/icons/Star.d.ts +0 -5
  658. package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +0 -1
  659. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +0 -5
  660. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +0 -1
  661. package/dist/typescript/commonjs/shared/icons/Winter.d.ts +0 -5
  662. package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +0 -1
  663. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +0 -10
  664. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +0 -1
  665. package/dist/typescript/module/features/celebrations/components/Particle.d.ts +0 -20
  666. package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +0 -1
  667. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +0 -26
  668. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
  669. package/dist/typescript/module/features/celebrations/components/Spark.d.ts +0 -4
  670. package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +0 -1
  671. package/dist/typescript/module/features/celebrations/config.d.ts +0 -192
  672. package/dist/typescript/module/features/celebrations/config.d.ts.map +0 -1
  673. package/dist/typescript/module/features/celebrations/helpers.d.ts +0 -6
  674. package/dist/typescript/module/features/celebrations/helpers.d.ts.map +0 -1
  675. package/dist/typescript/module/features/celebrations/index.d.ts +0 -3
  676. package/dist/typescript/module/features/celebrations/index.d.ts.map +0 -1
  677. package/dist/typescript/module/features/celebrations/types.d.ts +0 -11
  678. package/dist/typescript/module/features/celebrations/types.d.ts.map +0 -1
  679. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
  680. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
  681. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +0 -1
  682. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
  683. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
  684. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
  685. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
  686. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
  687. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
  688. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
  689. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
  690. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
  691. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
  692. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
  693. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
  694. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +0 -11
  695. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
  696. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
  697. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
  698. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
  699. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
  700. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
  701. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
  702. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
  703. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
  704. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
  705. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
  706. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
  707. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
  708. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
  709. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
  710. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
  711. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
  712. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +0 -14
  713. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
  714. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
  715. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
  716. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
  717. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
  718. package/dist/typescript/module/features/endOfAssignment/constants.d.ts +0 -41
  719. package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +0 -1
  720. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +0 -9
  721. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +0 -1
  722. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
  723. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
  724. package/dist/typescript/module/features/endOfAssignment/index.d.ts +0 -4
  725. package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +0 -1
  726. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +0 -14
  727. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +0 -1
  728. package/dist/typescript/module/features/endOfAssignment/types.d.ts +0 -60
  729. package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +0 -1
  730. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
  731. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
  732. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
  733. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
  734. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
  735. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
  736. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
  737. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
  738. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
  739. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
  740. package/dist/typescript/module/lib/constants.d.ts +0 -4
  741. package/dist/typescript/module/lib/constants.d.ts.map +0 -1
  742. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +0 -3
  743. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +0 -1
  744. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +0 -11
  745. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +0 -1
  746. package/dist/typescript/module/shared/icons/Halloween.d.ts +0 -5
  747. package/dist/typescript/module/shared/icons/Halloween.d.ts.map +0 -1
  748. package/dist/typescript/module/shared/icons/Pi.d.ts +0 -5
  749. package/dist/typescript/module/shared/icons/Pi.d.ts.map +0 -1
  750. package/dist/typescript/module/shared/icons/Star.d.ts +0 -5
  751. package/dist/typescript/module/shared/icons/Star.d.ts.map +0 -1
  752. package/dist/typescript/module/shared/icons/Valentine.d.ts +0 -5
  753. package/dist/typescript/module/shared/icons/Valentine.d.ts.map +0 -1
  754. package/dist/typescript/module/shared/icons/Winter.d.ts +0 -5
  755. package/dist/typescript/module/shared/icons/Winter.d.ts.map +0 -1
  756. package/src/features/celebrations/components/Celebrations.tsx +0 -62
  757. package/src/features/celebrations/components/Particle.tsx +0 -101
  758. package/src/features/celebrations/components/ParticleBatch.tsx +0 -57
  759. package/src/features/celebrations/components/Spark.tsx +0 -14
  760. package/src/features/celebrations/config.ts +0 -224
  761. package/src/features/celebrations/helpers.ts +0 -103
  762. package/src/features/celebrations/index.ts +0 -2
  763. package/src/features/celebrations/types.ts +0 -11
  764. package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +0 -65
  765. package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +0 -298
  766. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +0 -141
  767. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +0 -39
  768. package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +0 -40
  769. package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +0 -45
  770. package/src/features/endOfAssignment/components/EOAModal.tsx +0 -64
  771. package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +0 -77
  772. package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +0 -62
  773. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +0 -110
  774. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +0 -69
  775. package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  776. package/src/features/endOfAssignment/components/Modal/Modal.tsx +0 -121
  777. package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +0 -33
  778. package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +0 -196
  779. package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +0 -62
  780. package/src/features/endOfAssignment/components/Modal/model.ts +0 -34
  781. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +0 -103
  782. package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +0 -107
  783. package/src/features/endOfAssignment/constants.ts +0 -53
  784. package/src/features/endOfAssignment/helpers.ts +0 -28
  785. package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +0 -78
  786. package/src/features/endOfAssignment/index.ts +0 -3
  787. package/src/features/endOfAssignment/model/model.ts +0 -57
  788. package/src/features/endOfAssignment/types.ts +0 -65
  789. package/src/features/endOfAssignment/ui/EOABadge.tsx +0 -47
  790. package/src/features/endOfAssignment/ui/PracticeButton.tsx +0 -27
  791. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +0 -73
  792. package/src/features/endOfAssignment/ui/SparkIcon.tsx +0 -15
  793. package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +0 -17
  794. package/src/lib/constants.ts +0 -3
  795. package/src/shared/hooks/useKeyDownListener.ts +0 -27
  796. package/src/shared/hooks/useKeyboard.ts +0 -18
  797. package/src/shared/icons/Halloween.tsx +0 -33
  798. package/src/shared/icons/Pi.tsx +0 -16
  799. package/src/shared/icons/Star.tsx +0 -16
  800. package/src/shared/icons/Valentine.tsx +0 -16
  801. package/src/shared/icons/Winter.tsx +0 -19
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ErrorSpottingModel = void 0;
7
+ var _effector = require("effector");
8
+ const AUTO_CLOSE_TIMEOUT = 5000;
9
+ class ErrorSpottingModel {
10
+ errorSpottingPressed = (0, _effector.createEvent)();
11
+ activeDataChanged = (0, _effector.createEvent)();
12
+ spottingHidden = (0, _effector.createEvent)();
13
+ $validationKey = (0, _effector.createStore)(null);
14
+ $activeData = (0, _effector.createStore)(null).on(this.activeDataChanged, (_, payload) => payload).on(this.spottingHidden, state => {
15
+ if (state) return {
16
+ ...state,
17
+ isActive: false
18
+ };
19
+ return null;
20
+ }).on(this.$validationKey, (state, payload) => {
21
+ if (!state || payload === null) return state;
22
+ const isDisabled = payload !== state.validationKey;
23
+ return {
24
+ ...state,
25
+ isDisabled,
26
+ isActive: isDisabled ? false : state.isActive
27
+ };
28
+ });
29
+ closeTimeout = null;
30
+ constructor({
31
+ api,
32
+ $currentChatData
33
+ }) {
34
+ this.api = api;
35
+ this.$isLoading = api.spotErrorFx.pending;
36
+ this.$activeData.on($currentChatData, (state, payload) => {
37
+ if (!state || state.validationKey !== payload.currentThread?.strokesValidationKey) return null;
38
+ });
39
+ (0, _effector.sample)({
40
+ clock: api.spotErrorFx.doneData,
41
+ source: {
42
+ chatData: $currentChatData,
43
+ activeSpotting: this.$activeData,
44
+ validationKey: this.$validationKey
45
+ },
46
+ fn: (source, result) => {
47
+ const key = source.chatData.currentThread?.strokesValidationKey || null;
48
+ const currentKey = source.validationKey;
49
+ const isDisabled = !!currentKey && currentKey !== key;
50
+ return {
51
+ validationKey: key,
52
+ strokesIds: result.strokesIds,
53
+ isActive: !isDisabled,
54
+ isDisabled
55
+ };
56
+ },
57
+ target: this.$activeData
58
+ });
59
+ (0, _effector.sample)({
60
+ clock: this.errorSpottingPressed,
61
+ source: {
62
+ chatData: $currentChatData,
63
+ activeSpotting: this.$activeData
64
+ },
65
+ fn: source => source,
66
+ target: (0, _effector.createEffect)(({
67
+ chatData,
68
+ activeSpotting
69
+ }) => {
70
+ if (!chatData.currentThread?.strokes) return;
71
+ if (!activeSpotting) {
72
+ return this.api.spotErrorFx({
73
+ strokes: chatData.currentThread.strokes
74
+ }).then(() => {
75
+ this.scheduleClose();
76
+ });
77
+ }
78
+ this.activeDataChanged({
79
+ ...activeSpotting,
80
+ isActive: !activeSpotting.isActive
81
+ });
82
+ this.scheduleClose();
83
+ })
84
+ });
85
+ this.activeDataChanged.watch(spotting => {
86
+ if ((!spotting || !spotting.isActive) && this.closeTimeout) {
87
+ clearTimeout(this.closeTimeout);
88
+ this.closeTimeout = null;
89
+ }
90
+ });
91
+ }
92
+ scheduleClose() {
93
+ if (this.closeTimeout) clearTimeout(this.closeTimeout);
94
+ this.closeTimeout = setTimeout(() => {
95
+ this.spottingHidden();
96
+ this.closeTimeout = null;
97
+ }, AUTO_CLOSE_TIMEOUT);
98
+ }
99
+ bindStrokesValidation($store) {
100
+ (0, _effector.sample)({
101
+ source: $store,
102
+ target: this.$validationKey
103
+ });
104
+ return this;
105
+ }
106
+ abortPendingRequest() {
107
+ const isPending = this.api.spotErrorFx.pending.getState();
108
+ if (isPending) this.api.spotErrorFx.controller.abort();
109
+ }
110
+ reset() {
111
+ this.activeDataChanged(null);
112
+ this.abortPendingRequest();
113
+ }
114
+ }
115
+ exports.ErrorSpottingModel = ErrorSpottingModel;
116
+ //# sourceMappingURL=ErrorSpottingModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","createEvent","activeDataChanged","spottingHidden","$validationKey","createStore","$activeData","on","_","payload","state","isActive","isDisabled","validationKey","closeTimeout","constructor","api","$currentChatData","$isLoading","spotErrorFx","pending","currentThread","strokesValidationKey","sample","clock","doneData","source","chatData","activeSpotting","fn","result","key","currentKey","strokesIds","target","createEffect","strokes","then","scheduleClose","watch","spotting","clearTimeout","setTimeout","bindStrokesValidation","$store","abortPendingRequest","isPending","getState","controller","abort","reset","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAoBA,MAAMC,kBAAkB,GAAG,IAAI;AAExB,MAAMC,kBAAkB,CAAC;EAGdC,oBAAoB,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACnCC,iBAAiB,GAAG,IAAAD,qBAAW,EAAiC,CAAC;EACjEE,cAAc,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAE/BG,cAAc,GAAG,IAAAC,qBAAW,EAAgB,IAAI,CAAC;EACjDC,WAAW,GAAG,IAAAD,qBAAW,EAAiC,IAAI,CAAC,CAC5EE,EAAE,CAAC,IAAI,CAACL,iBAAiB,EAAE,CAACM,CAAC,EAAEC,OAAO,KAAKA,OAAO,CAAC,CACnDF,EAAE,CAAC,IAAI,CAACJ,cAAc,EAAGO,KAAK,IAAK;IAClC,IAAIA,KAAK,EAAE,OAAO;MAAE,GAAGA,KAAK;MAAEC,QAAQ,EAAE;IAAM,CAAC;IAC/C,OAAO,IAAI;EACb,CAAC,CAAC,CACDJ,EAAE,CAAC,IAAI,CAACH,cAAc,EAAE,CAACM,KAAK,EAAED,OAAO,KAAK;IAC3C,IAAI,CAACC,KAAK,IAAID,OAAO,KAAK,IAAI,EAAE,OAAOC,KAAK;IAC5C,MAAME,UAAU,GAAGH,OAAO,KAAKC,KAAK,CAACG,aAAa;IAClD,OAAO;MAAE,GAAGH,KAAK;MAAEE,UAAU;MAAED,QAAQ,EAAEC,UAAU,GAAG,KAAK,GAAGF,KAAK,CAACC;IAAS,CAAC;EAChF,CAAC,CAAC;EAIIG,YAAY,GAA0B,IAAI;EAE3CC,WAAWA,CAAC;IAAEC,GAAG;IAAEC;EAAqC,CAAC,EAAE;IAChE,IAAI,CAACD,GAA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AAI,CAAC9B,GAAG,CAACG,WAAW,CAACC,OAAO,CAAC2B,QAAQ,CAAC,CAAC;IACzD,IAAID,SAAS,EAAE,IAAI,CAAC9B,GAAG,CAACG,WAAW,CAAC6B,UAAU,CAACC,KAAK,CAAC,CAAC;EACxD;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAAChD,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAAC2C,mBAAmB,CAAC,CAAC;EAC5B;AACF;AAACM,OAAA,CAAApD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "AudioStatus", {
9
9
  return _t2sTypes.AudioStatus;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "ChatMessageHandler", {
13
- enumerable: true,
14
- get: function () {
15
- return _ChatBotMessageHandler.ChatMessageHandler;
16
- }
17
- });
18
12
  Object.defineProperty(exports, "Chatbot", {
19
13
  enumerable: true,
20
14
  get: function () {
@@ -43,6 +37,5 @@ var _Chatbot = require("./components/Chatbot.js");
43
37
  var _ChatBotModel = require("./model/ChatBotModel.js");
44
38
  var _t2sTypes = require("./types/t2s.types.js");
45
39
  var _modelTypes = require("./types/model.types.js");
46
- var _ChatBotMessageHandler = require("./model/ChatBotMessageHandler.js");
47
40
  var _DefaultMessageCreator = require("./model/DefaultMessageCreator.js");
48
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_ChatBotMessageHandler","_DefaultMessageCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAQA,IAAAI,sBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAMA,IAAAI,sBAAA,GAAAJ,OAAA","ignoreList":[]}
@@ -6,11 +6,21 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ChatbotModel = void 0;
7
7
  var _effector = require("effector");
8
8
  var _index = require("../../../lib/effector/index.js");
9
- var _api = require("./api.js");
9
+ var _ChatbotApi = require("./ChatbotApi.js");
10
10
  var _translation = require("./translation.js");
11
11
  var _t2s = require("./t2s.js");
12
12
  var _messagesHelper = require("./messagesHelper.js");
13
+ var _ChatBotThreadManager = require("./ChatBotThreadManager.js");
14
+ var _ChatsCacheModel = require("./ChatsCacheModel.js");
15
+ var _ErrorSpottingModel = require("../errorSpotting/ErrorSpottingModel.js");
16
+ var _withEvent = require("../../../lib/effector/withEvent.js");
17
+ var _ChatBoxTextManager = require("./ChatBoxTextManager.js");
13
18
  class ChatbotModel {
19
+ textManager = new _ChatBoxTextManager.ChatBotTextManager();
20
+ defaultMessages = this.textManager.messages;
21
+ threadManager = new _ChatBotThreadManager.ChatBotThreadManager({
22
+ messages: this.defaultMessages
23
+ });
14
24
  $currentKey = (0, _effector.createStore)('');
15
25
  resetAlternatives = (0, _effector.createEvent)();
16
26
  setAlternatives = (0, _effector.createEvent)();
@@ -24,84 +34,103 @@ class ChatbotModel {
24
34
  $context = (0, _effector.restore)(this.setContext, null);
25
35
  setScrollActive = (0, _effector.createEvent)();
26
36
  $isScrollActive = (0, _effector.restore)(this.setScrollActive, false);
27
- messages = (0, _index.createEntityFieldStore)();
28
- threadIds = (0, _index.createEntityFieldStore)();
29
- availableChats = (0, _index.createEntityFieldStore)();
37
+ cache = new _ChatsCacheModel.ChatsCacheModel();
30
38
  $currentChatData = (0, _effector.combine)({
31
- messages: this.messages.$state,
32
- threadIds: this.threadIds.$state,
33
- availableChats: this.availableChats.$state,
39
+ data: this.cache.$data,
34
40
  key: this.$currentKey
35
41
  }, ({
36
- messages,
37
- threadIds,
38
- availableChats,
42
+ data,
43
+ key
44
+ }) => data[key] ? {
45
+ ...data[key],
46
+ key
47
+ } : {
48
+ ...(0, _ChatsCacheModel.defaultChatData)(),
39
49
  key
40
- }) => {
41
- return {
42
- messages: messages[key] ?? [],
43
- threadId: threadIds[key] ?? null,
44
- isAvailable: availableChats[key] ?? false,
45
- key
46
- };
47
50
  });
48
51
  constructor({
49
52
  api,
50
- messages,
51
- $key
53
+ $key,
54
+ threadMessagesLimit
52
55
  }) {
53
- this.api = new _api.ChatbotAPI(api);
54
- this.defaultMessages = messages;
55
- if ($key) (0, _effector.sample)({
56
- source: $key,
57
- target: this.$currentKey
56
+ this.api = new _ChatbotApi.ChatbotAPI({
57
+ ...api,
58
+ postMessage: this.threadManager.postMessage
58
59
  });
60
+ this.threadManager.setApi({
61
+ getHint: api.requestHint
62
+ });
63
+ if (threadMessagesLimit) {
64
+ this.threadManager.setMessagesLimit(threadMessagesLimit);
65
+ }
59
66
  this.$alternatives = (0, _effector.restore)(this.api.getAlternativesFx.doneData, null).on(this.setAlternatives, (_, payload) => payload).reset(this.resetAlternatives);
67
+ this.t2s = new _t2s.ChatTextToSpeechModel({
68
+ api: this.api
69
+ });
60
70
  this.translation = new _translation.ChatbotTranslation({
61
71
  $context: this.$context,
62
- defaultMessages: messages,
72
+ defaultMessages: this.defaultMessages,
63
73
  $key: this.$currentKey,
64
74
  api: this.api,
65
- messagesModel: this.messages,
66
75
  alternativesModel: {
67
76
  $store: this.$alternatives,
68
77
  set: this.setAlternatives
69
- }
78
+ },
79
+ chats: this.cache
70
80
  });
71
- this.t2s = new _t2s.ChatTextToSpeechModel({
72
- $isOpen: this.$isOpen,
73
- api: this.api
81
+ this.errorSpotting = new _ErrorSpottingModel.ErrorSpottingModel({
82
+ api: this.api,
83
+ $currentChatData: this.$currentChatData
84
+ });
85
+ if ($key) this.bindKey($key);
86
+ (0, _effector.sample)({
87
+ source: this.$isOpen.updates,
88
+ filter: isOpen => !isOpen,
89
+ target: this.t2s.reset
90
+ });
91
+ (0, _effector.sample)({
92
+ clock: this.removeLastMessage,
93
+ source: [this.$lastMessageKey, this.cache.$data],
94
+ fn: ([lastMessageKey, chatsData]) => {
95
+ const chat = chatsData[lastMessageKey ?? ''];
96
+ if (!chat) return {
97
+ key: '',
98
+ data: {}
99
+ };
100
+ const updatedMessages = [...chat.messages];
101
+ updatedMessages.pop();
102
+ return {
103
+ key: lastMessageKey ?? '',
104
+ data: {
105
+ messages: updatedMessages
106
+ }
107
+ };
108
+ },
109
+ filter: ([lastMessageKey]) => !!lastMessageKey,
110
+ target: this.cache.update
74
111
  });
75
- this.sendHelpRequestFx = this.createSendHelpRequestFx();
76
- this.initChatReplyWatcher();
77
112
  }
78
113
  createSendHelpRequestFx() {
79
114
  const effect = (0, _effector.attach)({
80
- source: [this.$currentKey, this.translation.$isTranslated, this.$currentChatData, this.$context],
81
- mapParams: (params, [key, isTranslated, currentData, context]) => ({
115
+ source: [this.$currentKey, this.$context],
116
+ mapParams: (params, [key, context]) => ({
82
117
  message: params.message,
83
118
  translatedMessage: params.translatedMessage,
84
119
  context,
85
- key,
86
- isTranslated,
87
- threadId: currentData.threadId
120
+ key
88
121
  }),
89
122
  effect: (0, _index.createControllerEffect)(async ({
90
123
  message,
91
124
  translatedMessage,
92
125
  key,
93
- isTranslated,
94
- threadId,
95
126
  context
96
127
  }) => {
97
128
  if (!context) throw new Error('Context is required');
98
129
  this.setLastMessageKey(key);
99
- this.messages.setField({
100
- key,
101
- fn: currentMessages => [...(currentMessages || []), _messagesHelper.messagesHelper.createOwn({
130
+ this.cache.addMessages(key, {
131
+ messages: [_messagesHelper.messagesHelper.createOwn({
102
132
  message,
103
- translatedMessage,
104
- threadId
133
+ translatedMessage
105
134
  })]
106
135
  });
107
136
  const response = await this.api.postMessageFx({
@@ -109,26 +138,22 @@ class ChatbotModel {
109
138
  language: context.language,
110
139
  problemAnswer: context.problemAnswer,
111
140
  answer: context.answer,
112
- threadId,
113
141
  imageAltText: context.imageDescription
114
142
  });
115
- let messages = [_messagesHelper.messagesHelper.createAnswer(response)];
143
+ const thread = this.threadManager.get(key);
144
+ let messages = [_messagesHelper.messagesHelper.createAnswer(response, {
145
+ isInitial: thread?.history.length === 1
146
+ })];
116
147
  if (response.endMessage) {
117
148
  messages.push(_messagesHelper.messagesHelper.createLast(this.defaultMessages.endMessage));
118
149
  }
119
- if (isTranslated) {
120
- messages = await this.translation.translateMessagesFx({
121
- targetLanguage: context.translationTargetLanguage,
122
- messages
123
- });
124
- }
125
- this.messages.setField({
126
- key,
127
- fn: currentMessages => [...(currentMessages || []), ...messages]
150
+ messages = await this.translation.applyTranslationFx({
151
+ targetLanguage: context.translationTargetLanguage,
152
+ messages
128
153
  });
129
- this.threadIds.setField({
130
- key,
131
- data: response.threadId
154
+ this.cache.addMessages(key, {
155
+ messages,
156
+ thread
132
157
  });
133
158
  })
134
159
  });
@@ -140,35 +165,35 @@ class ChatbotModel {
140
165
  messages
141
166
  }) => ({
142
167
  key,
143
- data: [...messages, this.defaultMessages.error]
168
+ data: {
169
+ messages: [...messages, this.defaultMessages.error]
170
+ }
144
171
  }),
145
172
  filter: (_, {
146
173
  error
147
174
  }) => error.message !== 'Request aborted manually',
148
- target: this.messages.setField
175
+ target: this.cache.update
149
176
  });
150
177
  return effect;
151
178
  }
152
- initChatReplyWatcher() {
179
+ bindKey($store) {
153
180
  (0, _effector.sample)({
154
- clock: this.removeLastMessage,
155
- source: [this.$lastMessageKey, this.messages.$state],
156
- fn: ([lastMessageKey, messages]) => {
157
- if (!lastMessageKey) return {
158
- key: '',
159
- data: []
160
- };
161
- const updatedMessages = [...messages[lastMessageKey]];
162
- updatedMessages.pop();
163
- return {
164
- key: lastMessageKey,
165
- data: updatedMessages
166
- };
167
- },
168
- filter: ([lastMessageKey]) => !!lastMessageKey,
169
- target: this.messages.setField
181
+ source: $store,
182
+ target: this.$currentKey
170
183
  });
184
+ this.threadManager.bindKeyStore($store);
185
+ return this;
186
+ }
187
+ setUpT2S(config) {
188
+ this.t2s.setConfig(config);
189
+ return this;
171
190
  }
191
+ setDrawBoardAdapter(adapter) {
192
+ this.threadManager.setDrawBoardAdapter(adapter);
193
+ this.errorSpotting.bindStrokesValidation(adapter.$strokesValidationKey);
194
+ return this;
195
+ }
196
+ sendHelpRequestFx = this.createSendHelpRequestFx();
172
197
  startConversation = (0, _effector.attach)({
173
198
  source: this.$currentChatData,
174
199
  mapParams: (props, source) => ({
@@ -186,13 +211,10 @@ class ChatbotModel {
186
211
  key
187
212
  });
188
213
  }
189
- this.messages.setField({
190
- key,
191
- data: [this.defaultMessages.start]
192
- });
193
- this.availableChats.setField({
194
- key,
195
- data: true
214
+ this.cache.add(key, {
215
+ messages: [this.defaultMessages.start],
216
+ isAvailable: true,
217
+ currentThread: null
196
218
  });
197
219
  })
198
220
  });
@@ -201,49 +223,51 @@ class ChatbotModel {
201
223
  ...message
202
224
  }) {
203
225
  const options = this.$alternatives.getState()?.options.hints ?? message.options;
204
- this.messages.setField({
205
- key,
206
- fn: messages => {
207
- if (!messages || messages.length > 1) return;
208
- return [{
209
- ...message,
210
- options
211
- }];
212
- }
226
+ this.cache.setSingleMessage(key, {
227
+ ...message,
228
+ options
213
229
  });
214
230
  }
215
- reinitConversation = (0, _effector.createEffect)(({
231
+ reinitConversation = ({
216
232
  key
217
233
  }) => {
218
- this.messages.setField({
219
- key,
220
- fn: messages => {
221
- if (!messages?.length || messages.length === 1) return;
222
- const copy = [...messages];
223
- while (copy.at(-1)?.endMessage) {
224
- copy.pop();
225
- }
226
- const lastMessage = copy.at(-1);
227
- if (!lastMessage) return;
228
- copy.splice(copy.length - 1, 1, {
229
- ...lastMessage,
230
- options: [this.defaultMessages.anotherHintOption]
231
- });
232
- return copy;
233
- }
234
- });
235
- });
236
- bindKey($store) {
237
- (0, _effector.sample)({
238
- source: $store,
239
- target: this.$currentKey
234
+ this.cache.reinitChatThread(key, {
235
+ initialOption: this.defaultMessages.anotherHintOption
240
236
  });
241
- return this;
242
- }
243
- setT2SAudioProvider(audioProvider) {
244
- this.t2s.setAudioProvider(audioProvider);
245
- return this;
237
+ this.threadManager.reset(key);
238
+ };
239
+ disableChat(key) {
240
+ this.t2s.stop();
241
+ void this.t2s.reset();
242
+ this.cache.disableChat(key);
246
243
  }
244
+ softReset = (0, _effector.attach)({
245
+ source: {
246
+ isLoading: this.sendHelpRequestFx.pending,
247
+ lastMessageKey: this.$lastMessageKey
248
+ },
249
+ mapParams: (_, {
250
+ isLoading,
251
+ lastMessageKey
252
+ }) => !!(isLoading && lastMessageKey),
253
+ effect: (0, _effector.createEffect)(hasPendingMessage => {
254
+ if (hasPendingMessage) {
255
+ this.api.postMessageFx.controller.abort();
256
+ this.removeLastMessage();
257
+ }
258
+ this.errorSpotting.abortPendingRequest();
259
+ this.t2s.stop();
260
+ void this.t2s.reset();
261
+ this.translation.reset();
262
+ this.setScrollActive(false);
263
+ })
264
+ });
265
+ reset = (0, _withEvent.withEvent)(() => {
266
+ this.cache.reset();
267
+ this.resetAlternatives();
268
+ this.threadManager.reset();
269
+ this.errorSpotting.reset();
270
+ });
247
271
  }
248
272
  exports.ChatbotModel = ChatbotModel;
249
273
  //# sourceMappingURL=ChatBotModel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_effector","require","_index","_api","_translation","_t2s","_messagesHelper","ChatbotModel","$currentKey","createStore","resetAlternatives","createEvent","setAlternatives","setIsOpen","toggleOpen","$isOpen","restore","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","messages","createEntityFieldStore","threadIds","availableChats","$currentChatData","combine","$state","key","threadId","isAvailable","constructor","api","$key","ChatbotAPI","defaultMessages","sample","source","target","$alternatives","getAlternativesFx","doneData","_","payload","reset","translation","ChatbotTranslation","messagesModel","alternativesModel","$store","set","t2s","ChatTextToSpeechModel","sendHelpRequestFx","createSendHelpRequestFx","initChatReplyWatcher","effect","attach","$isTranslated","mapParams","params","isTranslated","currentData","context","message","translatedMessage","createControllerEffect","Error","setField","fn","currentMessages","messagesHelper","createOwn","response","postMessageFx","problem","language","problemAnswer","answer","imageAltText","imageDescription","createAnswer","endMessage","push","createLast","translateMessagesFx","targetLanguage","translationTargetLanguage","data","clock","fail","error","filter","lastMessageKey","updatedMessages","pop","startConversation","props","createEffect","initOnly","length","reinitConversation","start","setHintMessage","options","getState","hints","copy","at","lastMessage","splice","anotherHintOption","bindKey","setT2SAudioProvider","audioProvider","setAudioProvider","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAUA,IAAAC,MAAA,GAAAD,OAAA;AAYA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAEA,IAAAK,eAAA,GAAAL,OAAA;AAMO,MAAMM,YAAY,CAAC;EAKRC,WAAW,GAAG,IAAAC,qBAAW,EAAC,EAAE,CAAC;EAEpCC,iBAAiB,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACjCC,eAAe,GAAG,IAAAD,qBAAW,EAAiC,CAAC;EAG/DE,SAAS,GAAG,IAAAF,qBAAW,EAAU,CAAC;EAClCG,UAAU,GAAG,IAAAH,qBAAW,EAAC,CAAC;EAC1BI,OAAO,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,SAAS,EAAE,KAAK,CAAC,CAACI,EAAE,CAAC,IAAI,CAACH,UAAU,EAAGI,MAAM,IAAK,CAACA,MAAM,CAAC;EAE1EC,iBAAiB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AC;EAEKK,OAAOA,CAAC/D,MAAqB,EAAE;IACpC,IAAAb,gBAAM,EAAC;MACLC,MAAM,EAAEY,MAAM;MACdX,MAAM,EAAE,IAAI,CAACnC;IACf,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEO8G,mBAAmBA,CAACC,aAA4B,EAAE;IACvD,IAAI,CAAC/D,GAAG,CAACgE,gBAAgB,CAACD,aAAa,CAAC;IACxC,OAAO,IAAI;EACb;AACF;AAACE,OAAA,CAAAlH,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_effector","require","_index","_ChatbotApi","_translation","_t2s","_messagesHelper","_ChatBotThreadManager","_ChatsCacheModel","_ErrorSpottingModel","_withEvent","_ChatBoxTextManager","ChatbotModel","textManager","ChatBotTextManager","defaultMessages","messages","threadManager","ChatBotThreadManager","$currentKey","createStore","resetAlternatives","createEvent","setAlternatives","setIsOpen","toggleOpen","$isOpen","restore","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","cache","ChatsCacheModel","$currentChatData","combine","data","$data","key","defaultChatData","constructor","api","$key","threadMessagesLimit","ChatbotAPI","postMessage","setApi","getHint","requestHint","setMessagesLimit","$alternatives","getAlternativesFx","doneData","_","payload","reset","t2s","ChatTextToSpeechModel","translation","ChatbotTranslation","alternativesModel","$store","set","chats","errorSpotting","ErrorSpottingModel","bindKey","sample","source","updates","filter","target","clock","fn","lastMessageKey","chatsData","chat","updatedMessages","pop","update","createSendHelpRequestFx","effect","attach","mapParams","params","context","message","translatedMessage","createControllerEffect","Error","addMessages","messagesHelper","createOwn","response","postMessageFx","problem","language","problemAnswer","answer","imageAltText","imageDescription","thread","get","createAnswer","isInitial","history","length","endMessage","push","createLast","applyTranslationFx","targetLanguage","translationTargetLanguage","fail","error","bindKeyStore","setUpT2S","config","setConfig","setDrawBoardAdapter","adapter","bindStrokesValidation","$strokesValidationKey","sendHelpRequestFx","startConversation","props","createEffect","initOnly","reinitConversation","add","start","isAvailable","currentThread","setHintMessage","options","getState","hints","setSingleMessage","reinitChatThread","initialOption","anotherHintOption","disableChat","stop","softReset","isLoading","pending","hasPendingMessage","controller","abort","abortPendingRequest","withEvent","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAUA,IAAAC,MAAA,GAAAD,OAAA;AAYA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,mBAAA,GAAAV,OAAA;AAMO,MAAMW,YAAY,CAAC;EACRC,WAAW,GAAG,IAAIC,sCAAkB,CAAC,CAAC;EACrCC,eAAe,GAAG,IAAI,CAACF,WAAW,CAACG,QAAQ;EAE5CC,aAAa,GAAG,IAAIC,0CAAoB,CAAC;IACvDF,QAAQ,EAAE,IAAI,CAACD;EACjB,CAAC,CAAC;EAOcI,WAAW,GAAG,IAAAC,qBAAW,EAAC,EAAE,CAAC;EAEpCC,iBAAiB,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACjCC,eAAe,GAAG,IAAAD,qBAAW,EAAiC,CAAC;EAG/DE,SAAS,GAAG,IAAAF,qBAAW,EAAU,CAAC;EAClCG,UAAU,GAAG,IAAAH,qBAAW,EAAC,CAAC;EAC1BI,OAAO,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,SAAS,EAAE,KAAK,CAAC,CAACI,EAAE,CAAC,IAAI,CAACH,UAAU,EAAGI,MAAM,IAAK,CAACA,MAAM,CAAC;EAE1EC,iBAAiB,GAAG,IAAAR,qBAAW,EAAC,CAAC;EAChCS,iBAAiB,GAAG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