@magmamath/students-features 0.4.5 → 0.5.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (806) 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 +30 -47
  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 +57 -0
  19. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
  20. package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +130 -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 +147 -122
  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} +15 -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/types/keys.js +2 -0
  61. package/dist/commonjs/lib/types/keys.js.map +1 -0
  62. package/dist/commonjs/shared/icons/HighlighterIcon.js +36 -0
  63. package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -0
  64. package/dist/commonjs/shared/icons/{Valentine.js → StopIcon.js} +12 -9
  65. package/dist/commonjs/shared/icons/StopIcon.js.map +1 -0
  66. package/dist/commonjs/shared/icons/icon.types.js +4 -0
  67. package/dist/commonjs/shared/translation/constants.js +3 -3
  68. package/dist/commonjs/shared/translation/constants.js.map +1 -1
  69. package/dist/commonjs/shared/translation/helpers.js +22 -6
  70. package/dist/commonjs/shared/translation/helpers.js.map +1 -1
  71. package/dist/commonjs/shared/translation/hooks.js +3 -5
  72. package/dist/commonjs/shared/translation/hooks.js.map +1 -1
  73. package/{src/lib → dist/commonjs/shared/translation}/localization/en.json +8 -1
  74. package/dist/{module/lib → commonjs/shared/translation}/localization/gb.json +8 -1
  75. package/dist/commonjs/{lib → shared/translation}/localization/sw.json +8 -1
  76. package/dist/commonjs/shared/translation/model.js +1 -1
  77. package/dist/commonjs/shared/translation/model.js.map +1 -1
  78. package/dist/commonjs/shared/translation/types.js +1 -1
  79. package/dist/commonjs/shared/translation/types.js.map +1 -1
  80. package/dist/commonjs/shared/translation/validation.types.js +6 -0
  81. package/dist/commonjs/shared/translation/validation.types.js.map +1 -0
  82. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +2 -1
  83. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
  84. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  85. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +35 -0
  86. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -0
  87. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +31 -48
  88. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  89. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +32 -32
  90. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  91. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +11 -13
  92. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
  93. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +8 -28
  94. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  95. package/dist/module/features/chatbot/components/Chatbot.js +6 -8
  96. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  97. package/dist/module/features/chatbot/context/ChatBotModelContext.js +12 -0
  98. package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +1 -0
  99. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +51 -0
  100. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
  101. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +125 -0
  102. package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -0
  103. package/dist/module/features/chatbot/index.js +0 -1
  104. package/dist/module/features/chatbot/index.js.map +1 -1
  105. package/dist/module/features/chatbot/model/ChatBotModel.js +149 -124
  106. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  107. package/dist/module/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js} +42 -20
  108. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -0
  109. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +17 -0
  110. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -0
  111. package/dist/module/features/chatbot/model/{api.js → ChatbotApi.js} +15 -1
  112. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -0
  113. package/dist/module/features/chatbot/model/ChatsCacheModel.js +104 -0
  114. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -0
  115. package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
  116. package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
  117. package/dist/module/features/chatbot/model/ThreadItem.js +16 -8
  118. package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
  119. package/dist/module/features/chatbot/model/constants.js.map +1 -1
  120. package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
  121. package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
  122. package/dist/module/features/chatbot/model/t2s.js +19 -14
  123. package/dist/module/features/chatbot/model/t2s.js.map +1 -1
  124. package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
  125. package/dist/module/features/chatbot/model/translation.js +54 -45
  126. package/dist/module/features/chatbot/model/translation.js.map +1 -1
  127. package/dist/module/features/chatbot/types/api.types.js +2 -0
  128. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  129. package/dist/module/features/chatbot/types/units.types.js +2 -0
  130. package/dist/module/features/chatbot/types/units.types.js.map +1 -0
  131. package/dist/module/index.js +0 -2
  132. package/dist/module/index.js.map +1 -1
  133. package/dist/module/lib/effector/createEntityFieldStore.js +4 -0
  134. package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
  135. package/dist/module/lib/effector/withEvent.js +9 -0
  136. package/dist/module/lib/effector/withEvent.js.map +1 -0
  137. package/dist/module/lib/helpers/helpers.js +0 -1
  138. package/dist/module/lib/helpers/helpers.js.map +1 -1
  139. package/dist/module/lib/helpers/randomElements.js +20 -0
  140. package/dist/module/lib/helpers/randomElements.js.map +1 -0
  141. package/dist/module/lib/types/keys.js +2 -0
  142. package/dist/module/lib/types/keys.js.map +1 -0
  143. package/dist/module/shared/icons/HighlighterIcon.js +29 -0
  144. package/dist/module/shared/icons/HighlighterIcon.js.map +1 -0
  145. package/dist/module/shared/icons/StopIcon.js +26 -0
  146. package/dist/module/shared/icons/StopIcon.js.map +1 -0
  147. package/dist/module/shared/icons/icon.types.js +2 -0
  148. package/dist/module/shared/translation/constants.js +3 -3
  149. package/dist/module/shared/translation/constants.js.map +1 -1
  150. package/dist/module/shared/translation/helpers.js +19 -5
  151. package/dist/module/shared/translation/helpers.js.map +1 -1
  152. package/dist/module/shared/translation/hooks.js +4 -6
  153. package/dist/module/shared/translation/hooks.js.map +1 -1
  154. package/dist/{commonjs/lib → module/shared/translation}/localization/en.json +8 -1
  155. package/{src/lib → dist/module/shared/translation}/localization/gb.json +8 -1
  156. package/dist/module/{lib → shared/translation}/localization/sw.json +8 -1
  157. package/dist/module/shared/translation/model.js +1 -1
  158. package/dist/module/shared/translation/model.js.map +1 -1
  159. package/dist/module/shared/translation/types.js +2 -0
  160. package/dist/module/shared/translation/types.js.map +1 -1
  161. package/dist/module/shared/translation/validation.types.js +4 -0
  162. package/dist/module/shared/translation/validation.types.js.map +1 -0
  163. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
  164. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
  166. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
  168. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
  169. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
  170. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  172. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  173. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  174. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  175. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
  176. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  177. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +2 -5
  178. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  179. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
  180. package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +8 -0
  182. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -0
  184. package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/features/chatbot/index.d.ts +4 -3
  186. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  187. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +24 -18
  188. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  189. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
  190. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
  192. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
  194. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
  196. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
  198. package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  199. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +13 -7
  200. package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  201. package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
  202. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +7 -5
  203. package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  204. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +16 -6
  205. package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
  206. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +7 -8
  207. package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
  208. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +2 -1
  209. package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  210. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +12 -11
  211. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  212. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +19 -24
  213. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  214. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +2 -7
  215. package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
  216. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -1
  217. package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
  218. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +34 -0
  219. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -0
  220. package/dist/typescript/commonjs/index.d.ts +0 -3
  221. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +2 -0
  223. package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  224. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +2 -0
  225. package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +1 -0
  226. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +0 -1
  227. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +2 -0
  229. package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +1 -0
  230. package/dist/typescript/commonjs/lib/types/keys.d.ts +8 -0
  231. package/dist/typescript/commonjs/lib/types/keys.d.ts.map +1 -0
  232. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +4 -0
  233. package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -0
  234. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +4 -0
  235. package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +1 -0
  236. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +2 -0
  237. package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/shared/translation/constants.d.ts +21 -0
  239. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/shared/translation/helpers.d.ts +3 -2
  241. package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
  242. package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
  243. package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
  244. package/dist/typescript/commonjs/shared/translation/index.d.ts +0 -1
  245. package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
  246. package/dist/typescript/commonjs/shared/translation/model.d.ts +43 -3
  247. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  248. package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
  249. package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
  250. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +17 -0
  251. package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -0
  252. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
  253. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
  254. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +5 -5
  255. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  256. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +11 -0
  257. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -0
  258. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -3
  259. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  260. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  261. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  262. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
  263. package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
  264. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +2 -10
  265. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  266. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +2 -5
  267. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  268. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +4 -0
  269. package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +1 -0
  270. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +8 -0
  271. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
  272. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -0
  273. package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -0
  274. package/dist/typescript/module/features/chatbot/index.d.ts +4 -3
  275. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  276. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +24 -18
  277. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  278. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +33 -0
  279. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -0
  280. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +6 -0
  281. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -0
  282. package/dist/typescript/module/features/chatbot/model/{api.d.ts → ChatbotApi.d.ts} +4 -3
  283. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -0
  284. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +27 -0
  285. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -0
  286. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +5 -3
  287. package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
  288. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +13 -7
  289. package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
  290. package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
  291. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +7 -5
  292. package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
  293. package/dist/typescript/module/features/chatbot/model/t2s.d.ts +16 -6
  294. package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
  295. package/dist/typescript/module/features/chatbot/model/translation.d.ts +7 -8
  296. package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
  297. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +2 -1
  298. package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
  299. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +12 -11
  300. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  301. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +19 -24
  302. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  303. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +2 -7
  304. package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
  305. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -1
  306. package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
  307. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +34 -0
  308. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -0
  309. package/dist/typescript/module/index.d.ts +0 -3
  310. package/dist/typescript/module/index.d.ts.map +1 -1
  311. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +2 -0
  312. package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
  313. package/dist/typescript/module/lib/effector/withEvent.d.ts +2 -0
  314. package/dist/typescript/module/lib/effector/withEvent.d.ts.map +1 -0
  315. package/dist/typescript/module/lib/helpers/helpers.d.ts +0 -1
  316. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  317. package/dist/typescript/module/lib/helpers/randomElements.d.ts +2 -0
  318. package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +1 -0
  319. package/dist/typescript/module/lib/types/keys.d.ts +8 -0
  320. package/dist/typescript/module/lib/types/keys.d.ts.map +1 -0
  321. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +4 -0
  322. package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -0
  323. package/dist/typescript/module/shared/icons/StopIcon.d.ts +4 -0
  324. package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +1 -0
  325. package/dist/typescript/module/shared/icons/icon.types.d.ts +2 -0
  326. package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
  327. package/dist/typescript/module/shared/translation/constants.d.ts +21 -0
  328. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  329. package/dist/typescript/module/shared/translation/helpers.d.ts +3 -2
  330. package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
  331. package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
  332. package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
  333. package/dist/typescript/module/shared/translation/index.d.ts +0 -1
  334. package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
  335. package/dist/typescript/module/shared/translation/model.d.ts +43 -3
  336. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  337. package/dist/typescript/module/shared/translation/types.d.ts +4 -4
  338. package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
  339. package/dist/typescript/module/shared/translation/validation.types.d.ts +17 -0
  340. package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -0
  341. package/package.json +3 -6
  342. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +2 -4
  343. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +5 -5
  344. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +36 -0
  345. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +37 -47
  346. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +27 -26
  347. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +9 -9
  348. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +9 -31
  349. package/src/features/chatbot/components/Chatbot.tsx +5 -11
  350. package/src/features/chatbot/context/ChatBotModelContext.ts +14 -0
  351. package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +53 -0
  352. package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +150 -0
  353. package/src/features/chatbot/index.ts +3 -4
  354. package/src/features/chatbot/model/ChatBotModel.ts +141 -133
  355. package/src/features/chatbot/model/{ChatBotMessageHandler.ts → ChatBotThreadManager.ts} +53 -27
  356. package/src/features/chatbot/model/ChatBoxTextManager.ts +18 -0
  357. package/src/features/chatbot/model/{api.ts → ChatbotApi.ts} +18 -2
  358. package/src/features/chatbot/model/ChatsCacheModel.ts +95 -0
  359. package/src/features/chatbot/model/DefaultMessageCreator.ts +17 -16
  360. package/src/features/chatbot/model/ThreadItem.ts +15 -10
  361. package/src/features/chatbot/model/constants.ts +2 -0
  362. package/src/features/chatbot/model/messagesHelper.ts +12 -7
  363. package/src/features/chatbot/model/t2s.ts +28 -13
  364. package/src/features/chatbot/model/translation.helpers.ts +2 -1
  365. package/src/features/chatbot/model/translation.ts +52 -46
  366. package/src/features/chatbot/types/api.types.ts +12 -12
  367. package/src/features/chatbot/types/model.types.ts +31 -32
  368. package/src/features/chatbot/types/t2s.types.ts +10 -15
  369. package/src/features/chatbot/types/translation.types.ts +2 -1
  370. package/src/features/chatbot/types/units.types.ts +37 -0
  371. package/src/index.ts +0 -3
  372. package/src/lib/effector/createEntityFieldStore.ts +9 -1
  373. package/src/lib/effector/withEvent.ts +7 -0
  374. package/src/lib/helpers/helpers.ts +0 -2
  375. package/src/lib/helpers/randomElements.ts +22 -0
  376. package/src/lib/types/keys.ts +18 -0
  377. package/src/shared/icons/HighlighterIcon.tsx +21 -0
  378. package/src/shared/icons/StopIcon.tsx +17 -0
  379. package/src/shared/icons/icon.types.ts +9 -6
  380. package/src/shared/translation/constants.ts +3 -3
  381. package/src/shared/translation/helpers.ts +22 -9
  382. package/src/shared/translation/hooks.ts +12 -16
  383. package/src/shared/translation/index.ts +0 -1
  384. package/{dist/module/lib → src/shared/translation}/localization/en.json +8 -1
  385. package/{dist/commonjs/lib → src/shared/translation}/localization/gb.json +8 -1
  386. package/src/{lib → shared/translation}/localization/sw.json +8 -1
  387. package/src/shared/translation/model.ts +8 -8
  388. package/src/shared/translation/types.ts +11 -8
  389. package/src/shared/translation/validation.types.ts +26 -0
  390. package/dist/commonjs/features/celebrations/components/Celebrations.js +0 -51
  391. package/dist/commonjs/features/celebrations/components/Celebrations.js.map +0 -1
  392. package/dist/commonjs/features/celebrations/components/Particle.js +0 -85
  393. package/dist/commonjs/features/celebrations/components/Particle.js.map +0 -1
  394. package/dist/commonjs/features/celebrations/components/ParticleBatch.js +0 -47
  395. package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +0 -1
  396. package/dist/commonjs/features/celebrations/components/Spark.js +0 -23
  397. package/dist/commonjs/features/celebrations/components/Spark.js.map +0 -1
  398. package/dist/commonjs/features/celebrations/config.js +0 -224
  399. package/dist/commonjs/features/celebrations/config.js.map +0 -1
  400. package/dist/commonjs/features/celebrations/helpers.js +0 -99
  401. package/dist/commonjs/features/celebrations/helpers.js.map +0 -1
  402. package/dist/commonjs/features/celebrations/index.js +0 -28
  403. package/dist/commonjs/features/celebrations/index.js.map +0 -1
  404. package/dist/commonjs/features/celebrations/types.js +0 -15
  405. package/dist/commonjs/features/celebrations/types.js.map +0 -1
  406. package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
  407. package/dist/commonjs/features/chatbot/model/api.js.map +0 -1
  408. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -65
  409. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
  410. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -255
  411. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
  412. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -133
  413. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
  414. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -56
  415. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
  416. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -68
  417. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
  418. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -53
  419. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
  420. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +0 -47
  421. package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +0 -1
  422. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -76
  423. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
  424. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -62
  425. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
  426. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -109
  427. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
  428. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -83
  429. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
  430. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  431. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +0 -96
  432. package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
  433. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +0 -44
  434. package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
  435. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -233
  436. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
  437. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -63
  438. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
  439. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +0 -34
  440. package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +0 -1
  441. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -108
  442. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
  443. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -107
  444. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
  445. package/dist/commonjs/features/endOfAssignment/constants.js +0 -55
  446. package/dist/commonjs/features/endOfAssignment/constants.js.map +0 -1
  447. package/dist/commonjs/features/endOfAssignment/helpers.js +0 -64
  448. package/dist/commonjs/features/endOfAssignment/helpers.js.map +0 -1
  449. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +0 -51
  450. package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
  451. package/dist/commonjs/features/endOfAssignment/index.js +0 -40
  452. package/dist/commonjs/features/endOfAssignment/index.js.map +0 -1
  453. package/dist/commonjs/features/endOfAssignment/model/model.js +0 -53
  454. package/dist/commonjs/features/endOfAssignment/model/model.js.map +0 -1
  455. package/dist/commonjs/features/endOfAssignment/types.js +0 -33
  456. package/dist/commonjs/features/endOfAssignment/types.js.map +0 -1
  457. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +0 -43
  458. package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +0 -1
  459. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +0 -30
  460. package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
  461. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -64
  462. package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
  463. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +0 -29
  464. package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
  465. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +0 -32
  466. package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
  467. package/dist/commonjs/lib/constants.js +0 -11
  468. package/dist/commonjs/lib/constants.js.map +0 -1
  469. package/dist/commonjs/shared/hooks/useKeyDownListener.js +0 -27
  470. package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +0 -1
  471. package/dist/commonjs/shared/hooks/useKeyboard.js +0 -23
  472. package/dist/commonjs/shared/hooks/useKeyboard.js.map +0 -1
  473. package/dist/commonjs/shared/icons/Halloween.js +0 -54
  474. package/dist/commonjs/shared/icons/Halloween.js.map +0 -1
  475. package/dist/commonjs/shared/icons/Pi.js +0 -30
  476. package/dist/commonjs/shared/icons/Pi.js.map +0 -1
  477. package/dist/commonjs/shared/icons/Star.js +0 -30
  478. package/dist/commonjs/shared/icons/Star.js.map +0 -1
  479. package/dist/commonjs/shared/icons/Valentine.js.map +0 -1
  480. package/dist/commonjs/shared/icons/Winter.js +0 -32
  481. package/dist/commonjs/shared/icons/Winter.js.map +0 -1
  482. package/dist/module/features/celebrations/components/Celebrations.js +0 -45
  483. package/dist/module/features/celebrations/components/Celebrations.js.map +0 -1
  484. package/dist/module/features/celebrations/components/Particle.js +0 -77
  485. package/dist/module/features/celebrations/components/Particle.js.map +0 -1
  486. package/dist/module/features/celebrations/components/ParticleBatch.js +0 -40
  487. package/dist/module/features/celebrations/components/ParticleBatch.js.map +0 -1
  488. package/dist/module/features/celebrations/components/Spark.js +0 -17
  489. package/dist/module/features/celebrations/components/Spark.js.map +0 -1
  490. package/dist/module/features/celebrations/config.js +0 -219
  491. package/dist/module/features/celebrations/config.js.map +0 -1
  492. package/dist/module/features/celebrations/helpers.js +0 -92
  493. package/dist/module/features/celebrations/helpers.js.map +0 -1
  494. package/dist/module/features/celebrations/index.js +0 -5
  495. package/dist/module/features/celebrations/index.js.map +0 -1
  496. package/dist/module/features/celebrations/types.js +0 -11
  497. package/dist/module/features/celebrations/types.js.map +0 -1
  498. package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +0 -1
  499. package/dist/module/features/chatbot/model/api.js.map +0 -1
  500. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +0 -59
  501. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +0 -1
  502. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +0 -249
  503. package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +0 -1
  504. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +0 -126
  505. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +0 -1
  506. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +0 -50
  507. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +0 -1
  508. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +0 -62
  509. package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +0 -1
  510. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +0 -47
  511. package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +0 -1
  512. package/dist/module/features/endOfAssignment/components/EOAModal.js +0 -41
  513. package/dist/module/features/endOfAssignment/components/EOAModal.js.map +0 -1
  514. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +0 -70
  515. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +0 -1
  516. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +0 -56
  517. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +0 -1
  518. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +0 -103
  519. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +0 -1
  520. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +0 -77
  521. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +0 -1
  522. package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  523. package/dist/module/features/endOfAssignment/components/Modal/Modal.js +0 -89
  524. package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +0 -1
  525. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +0 -38
  526. package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +0 -1
  527. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +0 -226
  528. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +0 -1
  529. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +0 -56
  530. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +0 -1
  531. package/dist/module/features/endOfAssignment/components/Modal/model.js +0 -29
  532. package/dist/module/features/endOfAssignment/components/Modal/model.js.map +0 -1
  533. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +0 -102
  534. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +0 -1
  535. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +0 -100
  536. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +0 -1
  537. package/dist/module/features/endOfAssignment/constants.js +0 -51
  538. package/dist/module/features/endOfAssignment/constants.js.map +0 -1
  539. package/dist/module/features/endOfAssignment/helpers.js +0 -58
  540. package/dist/module/features/endOfAssignment/helpers.js.map +0 -1
  541. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +0 -46
  542. package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +0 -1
  543. package/dist/module/features/endOfAssignment/index.js +0 -6
  544. package/dist/module/features/endOfAssignment/index.js.map +0 -1
  545. package/dist/module/features/endOfAssignment/model/model.js +0 -48
  546. package/dist/module/features/endOfAssignment/model/model.js.map +0 -1
  547. package/dist/module/features/endOfAssignment/types.js +0 -29
  548. package/dist/module/features/endOfAssignment/types.js.map +0 -1
  549. package/dist/module/features/endOfAssignment/ui/EOABadge.js +0 -37
  550. package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +0 -1
  551. package/dist/module/features/endOfAssignment/ui/PracticeButton.js +0 -24
  552. package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +0 -1
  553. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +0 -57
  554. package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +0 -1
  555. package/dist/module/features/endOfAssignment/ui/SparkIcon.js +0 -21
  556. package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +0 -1
  557. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +0 -24
  558. package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +0 -1
  559. package/dist/module/lib/constants.js +0 -7
  560. package/dist/module/lib/constants.js.map +0 -1
  561. package/dist/module/shared/hooks/useKeyDownListener.js +0 -22
  562. package/dist/module/shared/hooks/useKeyDownListener.js.map +0 -1
  563. package/dist/module/shared/hooks/useKeyboard.js +0 -20
  564. package/dist/module/shared/hooks/useKeyboard.js.map +0 -1
  565. package/dist/module/shared/icons/Halloween.js +0 -47
  566. package/dist/module/shared/icons/Halloween.js.map +0 -1
  567. package/dist/module/shared/icons/Pi.js +0 -23
  568. package/dist/module/shared/icons/Pi.js.map +0 -1
  569. package/dist/module/shared/icons/Star.js +0 -23
  570. package/dist/module/shared/icons/Star.js.map +0 -1
  571. package/dist/module/shared/icons/Valentine.js +0 -23
  572. package/dist/module/shared/icons/Valentine.js.map +0 -1
  573. package/dist/module/shared/icons/Winter.js +0 -25
  574. package/dist/module/shared/icons/Winter.js.map +0 -1
  575. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +0 -10
  576. package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +0 -1
  577. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +0 -20
  578. package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +0 -1
  579. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +0 -26
  580. package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
  581. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +0 -4
  582. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +0 -1
  583. package/dist/typescript/commonjs/features/celebrations/config.d.ts +0 -192
  584. package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +0 -1
  585. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +0 -6
  586. package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +0 -1
  587. package/dist/typescript/commonjs/features/celebrations/index.d.ts +0 -3
  588. package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +0 -1
  589. package/dist/typescript/commonjs/features/celebrations/types.d.ts +0 -11
  590. package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +0 -1
  591. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
  592. package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
  593. package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +0 -1
  594. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
  595. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
  596. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
  597. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
  598. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
  599. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
  600. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
  601. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
  602. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
  603. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
  604. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
  605. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
  606. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +0 -11
  607. package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
  608. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
  609. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
  610. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
  611. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
  612. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
  613. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
  614. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
  615. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
  616. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
  617. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
  618. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
  619. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
  620. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
  621. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
  622. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
  623. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
  624. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +0 -14
  625. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
  626. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
  627. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
  628. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
  629. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
  630. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +0 -41
  631. package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +0 -1
  632. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +0 -9
  633. package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +0 -1
  634. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
  635. package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
  636. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +0 -4
  637. package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +0 -1
  638. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +0 -14
  639. package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +0 -1
  640. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +0 -60
  641. package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +0 -1
  642. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
  643. package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
  644. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
  645. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
  646. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
  647. package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
  648. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
  649. package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
  650. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
  651. package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
  652. package/dist/typescript/commonjs/lib/constants.d.ts +0 -4
  653. package/dist/typescript/commonjs/lib/constants.d.ts.map +0 -1
  654. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +0 -3
  655. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +0 -1
  656. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +0 -11
  657. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +0 -1
  658. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +0 -5
  659. package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +0 -1
  660. package/dist/typescript/commonjs/shared/icons/Pi.d.ts +0 -5
  661. package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +0 -1
  662. package/dist/typescript/commonjs/shared/icons/Star.d.ts +0 -5
  663. package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +0 -1
  664. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +0 -5
  665. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +0 -1
  666. package/dist/typescript/commonjs/shared/icons/Winter.d.ts +0 -5
  667. package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +0 -1
  668. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +0 -10
  669. package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +0 -1
  670. package/dist/typescript/module/features/celebrations/components/Particle.d.ts +0 -20
  671. package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +0 -1
  672. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +0 -26
  673. package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +0 -1
  674. package/dist/typescript/module/features/celebrations/components/Spark.d.ts +0 -4
  675. package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +0 -1
  676. package/dist/typescript/module/features/celebrations/config.d.ts +0 -192
  677. package/dist/typescript/module/features/celebrations/config.d.ts.map +0 -1
  678. package/dist/typescript/module/features/celebrations/helpers.d.ts +0 -6
  679. package/dist/typescript/module/features/celebrations/helpers.d.ts.map +0 -1
  680. package/dist/typescript/module/features/celebrations/index.d.ts +0 -3
  681. package/dist/typescript/module/features/celebrations/index.d.ts.map +0 -1
  682. package/dist/typescript/module/features/celebrations/types.d.ts +0 -11
  683. package/dist/typescript/module/features/celebrations/types.d.ts.map +0 -1
  684. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +0 -31
  685. package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +0 -1
  686. package/dist/typescript/module/features/chatbot/model/api.d.ts.map +0 -1
  687. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +0 -4
  688. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +0 -1
  689. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +0 -15
  690. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +0 -1
  691. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +0 -4
  692. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +0 -1
  693. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +0 -8
  694. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +0 -1
  695. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +0 -8
  696. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +0 -1
  697. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +0 -12
  698. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +0 -1
  699. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +0 -11
  700. package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +0 -1
  701. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +0 -4
  702. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +0 -1
  703. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +0 -4
  704. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +0 -1
  705. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +0 -4
  706. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +0 -1
  707. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +0 -8
  708. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +0 -1
  709. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +0 -20
  710. package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +0 -1
  711. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +0 -3
  712. package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +0 -1
  713. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +0 -4
  714. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +0 -1
  715. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +0 -4
  716. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +0 -1
  717. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +0 -14
  718. package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +0 -1
  719. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +0 -4
  720. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +0 -1
  721. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +0 -8
  722. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +0 -1
  723. package/dist/typescript/module/features/endOfAssignment/constants.d.ts +0 -41
  724. package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +0 -1
  725. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +0 -9
  726. package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +0 -1
  727. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +0 -27
  728. package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +0 -1
  729. package/dist/typescript/module/features/endOfAssignment/index.d.ts +0 -4
  730. package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +0 -1
  731. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +0 -14
  732. package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +0 -1
  733. package/dist/typescript/module/features/endOfAssignment/types.d.ts +0 -60
  734. package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +0 -1
  735. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +0 -11
  736. package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +0 -1
  737. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +0 -10
  738. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +0 -1
  739. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +0 -14
  740. package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +0 -1
  741. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +0 -4
  742. package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +0 -1
  743. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +0 -4
  744. package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +0 -1
  745. package/dist/typescript/module/lib/constants.d.ts +0 -4
  746. package/dist/typescript/module/lib/constants.d.ts.map +0 -1
  747. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +0 -3
  748. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +0 -1
  749. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +0 -11
  750. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +0 -1
  751. package/dist/typescript/module/shared/icons/Halloween.d.ts +0 -5
  752. package/dist/typescript/module/shared/icons/Halloween.d.ts.map +0 -1
  753. package/dist/typescript/module/shared/icons/Pi.d.ts +0 -5
  754. package/dist/typescript/module/shared/icons/Pi.d.ts.map +0 -1
  755. package/dist/typescript/module/shared/icons/Star.d.ts +0 -5
  756. package/dist/typescript/module/shared/icons/Star.d.ts.map +0 -1
  757. package/dist/typescript/module/shared/icons/Valentine.d.ts +0 -5
  758. package/dist/typescript/module/shared/icons/Valentine.d.ts.map +0 -1
  759. package/dist/typescript/module/shared/icons/Winter.d.ts +0 -5
  760. package/dist/typescript/module/shared/icons/Winter.d.ts.map +0 -1
  761. package/src/features/celebrations/components/Celebrations.tsx +0 -62
  762. package/src/features/celebrations/components/Particle.tsx +0 -101
  763. package/src/features/celebrations/components/ParticleBatch.tsx +0 -57
  764. package/src/features/celebrations/components/Spark.tsx +0 -14
  765. package/src/features/celebrations/config.ts +0 -224
  766. package/src/features/celebrations/helpers.ts +0 -103
  767. package/src/features/celebrations/index.ts +0 -2
  768. package/src/features/celebrations/types.ts +0 -11
  769. package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +0 -65
  770. package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +0 -298
  771. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +0 -141
  772. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +0 -39
  773. package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +0 -40
  774. package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +0 -45
  775. package/src/features/endOfAssignment/components/EOAModal.tsx +0 -64
  776. package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +0 -77
  777. package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +0 -62
  778. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +0 -110
  779. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +0 -69
  780. package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
  781. package/src/features/endOfAssignment/components/Modal/Modal.tsx +0 -121
  782. package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +0 -33
  783. package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +0 -196
  784. package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +0 -62
  785. package/src/features/endOfAssignment/components/Modal/model.ts +0 -34
  786. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +0 -103
  787. package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +0 -107
  788. package/src/features/endOfAssignment/constants.ts +0 -53
  789. package/src/features/endOfAssignment/helpers.ts +0 -28
  790. package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +0 -78
  791. package/src/features/endOfAssignment/index.ts +0 -3
  792. package/src/features/endOfAssignment/model/model.ts +0 -57
  793. package/src/features/endOfAssignment/types.ts +0 -65
  794. package/src/features/endOfAssignment/ui/EOABadge.tsx +0 -47
  795. package/src/features/endOfAssignment/ui/PracticeButton.tsx +0 -27
  796. package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +0 -73
  797. package/src/features/endOfAssignment/ui/SparkIcon.tsx +0 -15
  798. package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +0 -17
  799. package/src/lib/constants.ts +0 -3
  800. package/src/shared/hooks/useKeyDownListener.ts +0 -27
  801. package/src/shared/hooks/useKeyboard.ts +0 -18
  802. package/src/shared/icons/Halloween.tsx +0 -33
  803. package/src/shared/icons/Pi.tsx +0 -16
  804. package/src/shared/icons/Star.tsx +0 -16
  805. package/src/shared/icons/Valentine.tsx +0 -16
  806. package/src/shared/icons/Winter.tsx +0 -19
@@ -1,27 +1,20 @@
1
1
  import type { Store } from 'effector'
2
2
  import {
3
+ ChatHintPayload,
4
+ ChatHintResponse,
5
+ ErrorSpottingPayload,
6
+ ErrorSpottingResponse,
7
+ GetAlternativesPayload,
3
8
  GetAlternativesResponse,
4
- PostMessagePayload,
5
- PostMessageResponse,
6
- GoogleTranslatePayload,
7
- GoogleTranslateResponse,
8
9
  GoogleText2SpeechPayload,
9
10
  GoogleText2SpeechResponse,
10
- ChatAnswer,
11
- GetAlternativesPayload,
12
- Stroke,
11
+ GoogleTranslatePayload,
12
+ GoogleTranslateResponse,
13
+ PostMessagePayload,
14
+ PostMessageResponse,
13
15
  } from './api.types'
14
16
  import { ExtendWithOptional } from '../../../lib/helpers/types'
15
-
16
- export type ConversationMessage = {
17
- id: string
18
- message: string
19
- threadId: string
20
- options: ChatAnswer[]
21
- isOwnMessage: boolean
22
- translatedMessage?: string
23
- endMessage?: boolean
24
- }
17
+ import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types'
25
18
 
26
19
  export type ChatbotMessages = {
27
20
  error: ConversationMessage
@@ -30,15 +23,20 @@ export type ChatbotMessages = {
30
23
  anotherHintOption: ChatAnswer
31
24
  }
32
25
 
26
+ export type ChatbotApiRequests = {
27
+ getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>
28
+ postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>
29
+ postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
30
+ postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>
31
+ spotError: (props: ErrorSpottingPayload) => Promise<ErrorSpottingResponse>
32
+ }
33
+
33
34
  export type ChatbotModelProps = {
34
35
  $key?: Store<string>
35
- api: {
36
- getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>
37
- postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>
38
- postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
39
- postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>
36
+ api: Omit<ChatbotApiRequests, 'postMessage'> & {
37
+ requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>
40
38
  }
41
- messages: ChatbotMessages
39
+ threadMessagesLimit?: number
42
40
  }
43
41
 
44
42
  export type SendHelpParams = {
@@ -48,8 +46,6 @@ export type SendHelpParams = {
48
46
 
49
47
  export type SendHelpProps = SendHelpParams & {
50
48
  key: string
51
- isTranslated: boolean
52
- threadId: string
53
49
  context: ChatbotContext | null
54
50
  }
55
51
 
@@ -71,16 +67,19 @@ export enum MessageVariant {
71
67
  RECEIVED = 'received',
72
68
  }
73
69
 
74
- export type ChatbotRenderer = {
75
- message: string
76
- variant: MessageVariant
77
- withTextToSpeech: boolean
78
- }
70
+ export type CreateMessageResponse = ExtendWithOptional<
71
+ Omit<PostMessageResponse, 'threadId'>,
72
+ ConversationMessage
73
+ >
79
74
 
80
- export type CreateMessageResponse = ExtendWithOptional<PostMessageResponse, ConversationMessage>
75
+ type GetVisibleStrokesResponse = {
76
+ strokes: FullStrokeData[]
77
+ validationKey: string
78
+ }
81
79
 
82
80
  export type IChatDrawBoardAdapter = {
83
- getVisibleStrokes(): Promise<Stroke[] | null>
81
+ $strokesValidationKey: Store<string | null>
82
+ getVisibleStrokes(): Promise<GetVisibleStrokesResponse | null>
84
83
  }
85
84
 
86
85
  export type ChatbotContext = {
@@ -1,24 +1,19 @@
1
- import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants'
1
+ import { ConversationMessage } from './units.types'
2
2
 
3
3
  export enum AudioStatus {
4
- PLAYING = 'playing',
5
- STOPPED = 'stopped',
6
- PAUSED = 'paused',
4
+ PLAYING = 'playing',
5
+ STOPPED = 'stopped',
6
+ PAUSED = 'paused',
7
7
  }
8
8
 
9
9
  export type AudioProvider = {
10
- play: (audioPath: string, onPlaybackComplete: () => void) => Promise<void>
11
- pause: () => void
12
- resume: () => void
13
- stop: () => void
10
+ play: (audioPath: string, onPlaybackComplete: () => void) => Promise<void>
11
+ pause: () => void
12
+ resume: () => void
13
+ stop: () => void
14
14
  }
15
15
 
16
16
  export type PlayTextToSpeechProps = {
17
- text: string
18
- messageId: string
19
- isTranslated: boolean
20
- config?: {
21
- voice?: typeof DEFAULT_VOICE
22
- audioConfig?: typeof AUDIO_CONFIG
23
- }
17
+ message: ConversationMessage
18
+ isTranslated: boolean
24
19
  }
@@ -1,5 +1,5 @@
1
- import { ConversationMessage } from './model.types'
2
1
  import { GetAlternativesResponse } from './api.types'
2
+ import { ConversationMessage } from './units.types'
3
3
 
4
4
  export type TranslateBatchFxProps = {
5
5
  messages: ConversationMessage[]
@@ -8,6 +8,7 @@ export type TranslateBatchFxProps = {
8
8
  }
9
9
 
10
10
  export type TranslateMessageFxProps = {
11
+ preventTranslate?: boolean
11
12
  messages: ConversationMessage[]
12
13
  targetLanguage: string
13
14
  }
@@ -0,0 +1,37 @@
1
+ export type Stroke = {
2
+ x: number[]
3
+ y: number[]
4
+ }
5
+ export type FullStrokeData = Stroke & {
6
+ id: string
7
+ }
8
+
9
+ export type IThreadItem = {
10
+ id: string
11
+ strokesValidationKey: string | null
12
+ strokes: FullStrokeData[] | null
13
+ history: string[]
14
+ }
15
+
16
+ export type ChatAnswer = {
17
+ text: string
18
+ promptKey: string
19
+ translatedText?: string
20
+ }
21
+
22
+ export type ConversationMessage = {
23
+ id: string
24
+ message: string
25
+ options: ChatAnswer[]
26
+ isOwnMessage: boolean
27
+ translatedMessage?: string
28
+ endMessage?: boolean
29
+ isInitial?: boolean
30
+ threadId?: string
31
+ }
32
+
33
+ export type ChatItem = {
34
+ messages: ConversationMessage[]
35
+ isAvailable: boolean
36
+ currentThread: IThreadItem | null
37
+ }
package/src/index.ts CHANGED
@@ -1,7 +1,4 @@
1
1
  export { useFeaturesLocalization, setFeaturesLocalization, Locale } from './shared/translation'
2
- export type { LocalizationConfig } from './shared/translation'
3
2
  export { generateRandomId } from './lib/helpers/helpers'
4
3
  export * from './features/chatbot'
5
4
  export * from './features/feedback'
6
- export * from './features/celebrations'
7
- export * from './features/endOfAssignment'
@@ -1,4 +1,4 @@
1
- import { createEvent, createStore } from 'effector'
1
+ import { createEvent, createStore, Event } from 'effector'
2
2
 
3
3
  type UpdateField<T> = {
4
4
  key: string
@@ -19,6 +19,14 @@ export class EntityFieldStore<T> {
19
19
  return { ...state, [key]: data }
20
20
  })
21
21
  .reset(this.reset)
22
+
23
+ public on<EV>(
24
+ event: Event<EV>,
25
+ fn: (state: Record<string, T>, payload: EV) => Record<string, T> | void,
26
+ ) {
27
+ this.$state.on(event, fn)
28
+ return this
29
+ }
22
30
  }
23
31
 
24
32
  export function createEntityFieldStore<T>() {
@@ -0,0 +1,7 @@
1
+ import { createEvent } from 'effector'
2
+
3
+ export function withEvent<T = void>(cb: (props: T) => void) {
4
+ const event = createEvent<T>()
5
+ event.watch(cb)
6
+ return event
7
+ }
@@ -1,7 +1,5 @@
1
1
  import { getText } from '../../shared/translation/helpers'
2
2
 
3
- export const noop = () => {};
4
-
5
3
  export const generateRandomId = () =>
6
4
  Date.now().toString(36) + Math.random().toString(36).substring(2)
7
5
 
@@ -0,0 +1,22 @@
1
+ export function getRandomElements<T>(array: T[], limit = array.length): T[] {
2
+ if (array.length === 0) {
3
+ return []
4
+ }
5
+
6
+ const randomCount = Math.min(Math.floor(Math.random() * array.length) + 1, limit)
7
+
8
+ const arrayCopy = [...array]
9
+ const result: T[] = []
10
+
11
+ for (let i = 0; i < randomCount; i++) {
12
+ if (arrayCopy.length === 0) {
13
+ break
14
+ }
15
+
16
+ const randomIndex = Math.floor(Math.random() * arrayCopy.length)
17
+ result.push(arrayCopy[randomIndex])
18
+ arrayCopy.splice(randomIndex, 1)
19
+ }
20
+
21
+ return result
22
+ }
@@ -0,0 +1,18 @@
1
+ type JoinKeys<K extends string, P extends string> = `${K}.${P}`
2
+
3
+ type NestedKeys<T, Prefix extends string = ''> = T extends object
4
+ ? T extends Array<any>
5
+ ? never
6
+ : {
7
+ [K in keyof T & string]: T[K] extends object
8
+ ?
9
+ | JoinKeys<Prefix extends '' ? K : `${Prefix}.${K}`, NestedKeys<T[K], ''>>
10
+ | (Prefix extends '' ? K : `${Prefix}.${K}`)
11
+ : Prefix extends ''
12
+ ? K
13
+ : `${Prefix}.${K}`
14
+ }[keyof T & string]
15
+ : never
16
+
17
+ type FlattenKeys<T> = T extends string ? T : never
18
+ export type RetrieveKeys<T> = FlattenKeys<NestedKeys<T>>
@@ -0,0 +1,21 @@
1
+ import React from 'react'
2
+ import Svg, { Path } from 'react-native-svg'
3
+ import { IconProps } from './icon.types'
4
+ import { COLORS } from '@magmamath/react-native-ui'
5
+
6
+ export function HighlighterIcon({ size = 17, color = COLORS.NEUTRAL_9, style }: IconProps) {
7
+ return (
8
+ <Svg style={style} width={size} height={size} viewBox="0 0 17 17" fill="none">
9
+ <Path
10
+ d="M6.02 1.557a.596.596 0 011.108 0l.42 1.067c.06.153.182.275.336.335l1.066.42a.596.596 0 010 1.109l-1.066.42a.596.596 0 00-.336.336l-.42 1.066a.596.596 0 01-1.109 0L5.6 5.244a.596.596 0 00-.336-.336l-1.066-.42a.596.596 0 010-1.108l1.066-.42a.596.596 0 00.336-.336l.42-1.067z"
11
+ fill={color}
12
+ />
13
+ <Path
14
+ fillRule="evenodd"
15
+ clipRule="evenodd"
16
+ d="M8.843 3.338l-.974.73-2.11 1.583.26.66a.596.596 0 001.109 0l.42-1.067a.596.596 0 01.336-.336l1.066-.42a.596.596 0 000-1.108l-.107-.042zm.67-.502c.497.346.665.964.506 1.495l.476-.357 2.868 2.868-3.636 4.849-4.08-4.08.38-.286a1.316 1.316 0 01-.705-.74l-.185-.468-.898.674a.95.95 0 00-.33 1.065 1.75 1.75 0 00-.2.53l-.602 3.016-1.752 1.752a.95.95 0 00.297 1.545l1.83.784a1.35 1.35 0 001.487-.286l.966-.966 3.016-.604c.187-.037.366-.105.53-.199a.95.95 0 001.065-.33l5.445-7.26a2.25 2.25 0 00-.209-2.94L14.44 1.554a2.25 2.25 0 00-2.941-.209l-1.986 1.49zm3.866-.22a.75.75 0 00-.98-.07l-.692.519 2.565 2.565.52-.692a.75.75 0 00-.07-.98l-1.343-1.342zM3.797 12.832l-.807.808.99.425.525-.525-.708-.707zm2.015-.107l2.357-.47-3.086-3.087-.471 2.357 1.2 1.2z"
17
+ fill={color}
18
+ />
19
+ </Svg>
20
+ )
21
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react'
2
+ import Svg, { Path } from 'react-native-svg'
3
+ import { IconProps } from './icon.types'
4
+ import { COLORS } from '@magmamath/react-native-ui'
5
+
6
+ export function StopIcon({ size = 17, color = COLORS.NEUTRAL_9, style }: IconProps) {
7
+ return (
8
+ <Svg width={size} height={size} viewBox="0 0 17 17" fill="none" style={style}>
9
+ <Path
10
+ fillRule="evenodd"
11
+ clipRule="evenodd"
12
+ d="M1.759 2.996c0-.967.784-1.752 1.752-1.752h10.496c.967 0 1.752.785 1.752 1.752v10.496c0 .968-.785 1.752-1.752 1.752H3.51a1.752 1.752 0 01-1.752-1.752V2.996z"
13
+ fill={color}
14
+ />
15
+ </Svg>
16
+ )
17
+ }
@@ -1,8 +1,11 @@
1
+ import { StyleProp, ViewStyle } from 'react-native'
2
+
1
3
  export type IconProps = {
2
- color?: string
3
- className?: string
4
- size?: number
5
- strokeWidth?: string
6
- width?: number
7
- height?: number
4
+ color?: string
5
+ className?: string
6
+ size?: number
7
+ strokeWidth?: string
8
+ width?: number
9
+ height?: number
10
+ style?: StyleProp<ViewStyle>
8
11
  }
@@ -1,7 +1,7 @@
1
1
  import { Locale } from './types'
2
- import EN from '../../lib/localization/en.json'
3
- import GB from '../../lib/localization/gb.json'
4
- import SW from '../../lib/localization/sw.json'
2
+ import EN from './localization/en.json'
3
+ import GB from './localization/gb.json'
4
+ import SW from './localization/sw.json'
5
5
 
6
6
  export const LOCALIZATION_CONFIGS = {
7
7
  [Locale.EN]: EN,
@@ -1,6 +1,23 @@
1
1
  import { LOCALIZATION_CONFIGS } from './constants'
2
2
  import { $localization, setLocalization } from './model'
3
- import { GetText, LocalizationConfig, TranslationKeys } from './types'
3
+ import { GetText, TranslationKeys, Translations } from './types'
4
+
5
+ export function getTranslation(config: Translations, key: TranslationKeys) {
6
+ const rawTranslation = config?.[key as keyof Translations]
7
+ if (typeof rawTranslation === 'string' || !key.includes('.')) {
8
+ return rawTranslation as string
9
+ }
10
+ const keys = key.split('.')
11
+ let translation = config
12
+ for (const k of keys) {
13
+ if (translation[k as keyof Translations] === undefined) return key
14
+ translation = translation[k as keyof Translations] as any
15
+ }
16
+ if (typeof translation === 'string') {
17
+ return translation
18
+ }
19
+ return key
20
+ }
4
21
 
5
22
  export const getSubstitutedString = (str: string, substitutions: Record<string, string> = {}) => {
6
23
  const substitutionsArray = Object.entries(substitutions)
@@ -18,17 +35,13 @@ export const getSubstitutedString = (str: string, substitutions: Record<string,
18
35
  export const getText: GetText = (key: TranslationKeys, args = null) => {
19
36
  const config = $localization.getState()
20
37
 
21
- const translation = config?.[key]
22
-
23
- if (translation && args) {
24
- return getSubstitutedString(translation, args)
25
- }
26
-
27
- return translation ?? key
38
+ const translation = getTranslation(config, key)
39
+ if (args) return getSubstitutedString(translation, args)
40
+ return translation
28
41
  }
29
42
 
30
43
  export const setFeaturesLocalization = (
31
- generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig,
44
+ generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations,
32
45
  ) => {
33
46
  setLocalization(generator)
34
47
  }
@@ -1,28 +1,24 @@
1
1
  import { useUnit } from 'effector-react'
2
2
  import { $localization, setLocalization } from './model'
3
- import { GetText, LocalizationConfig } from './types'
3
+ import { GetText, Translations } from './types'
4
4
  import { useEffect } from 'react'
5
5
  import { LOCALIZATION_CONFIGS } from './constants'
6
- import { getSubstitutedString } from './helpers'
6
+ import { getSubstitutedString, getTranslation } from './helpers'
7
7
 
8
8
  export const useText = (): GetText => {
9
- const config = useUnit($localization) as LocalizationConfig
9
+ const config = useUnit($localization)
10
10
 
11
- return (key, args = null) => {
12
- const translation = config?.[key]
13
-
14
- if (translation && args) {
15
- return getSubstitutedString(translation, args)
16
- }
17
-
18
- return translation ?? key
19
- }
11
+ return (key, args = null) => {
12
+ const translation = getTranslation(config, key)
13
+ if (args) return getSubstitutedString(translation, args)
14
+ return translation
15
+ }
20
16
  }
21
17
 
22
18
  export const useFeaturesLocalization = (
23
- generator: ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig) | LocalizationConfig,
19
+ generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations,
24
20
  ) => {
25
- useEffect(() => {
26
- setLocalization(generator)
27
- }, [generator])
21
+ useEffect(() => {
22
+ setLocalization(generator)
23
+ }, [generator])
28
24
  }
@@ -2,4 +2,3 @@ export { useFeaturesLocalization, useText } from './hooks'
2
2
  export { setFeaturesLocalization, getText as t } from './helpers'
3
3
  export { $localization, setLocalization } from './model'
4
4
  export { Locale } from './types'
5
- export type { LocalizationConfig } from './types'
@@ -10,5 +10,12 @@
10
10
  "time.monthAgo": "month ago",
11
11
  "time.monthsAgo": "months ago",
12
12
  "time.yearAgo": "year ago",
13
- "time.yearsAgo": "years ago"
13
+ "time.yearsAgo": "years ago",
14
+ "chat": {
15
+ "anotherHint": "Give me another hint",
16
+ "answerAgain": "Answer again to get another hint!",
17
+ "errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
18
+ "howCanIHelp": "Hi! Do you want help?",
19
+ "showError": "Show error"
20
+ }
14
21
  }
@@ -10,5 +10,12 @@
10
10
  "time.monthAgo": "month ago",
11
11
  "time.monthsAgo": "months ago",
12
12
  "time.yearAgo": "year ago",
13
- "time.yearsAgo": "years ago"
13
+ "time.yearsAgo": "years ago",
14
+ "chat": {
15
+ "anotherHint": "Give me another hint",
16
+ "answerAgain": "Answer again to get another hint!",
17
+ "errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
18
+ "howCanIHelp": "Hi! Do you want help?",
19
+ "showError": "Show error"
20
+ }
14
21
  }
@@ -10,5 +10,12 @@
10
10
  "time.monthAgo": "månad sedan",
11
11
  "time.monthsAgo": "månader sedan",
12
12
  "time.yearAgo": "år sedan",
13
- "time.yearsAgo": "år sedan"
13
+ "time.yearsAgo": "år sedan",
14
+ "chat": {
15
+ "anotherHint": "Ge mig en ledtråd",
16
+ "answerAgain": "Svara igen för att få en till ledtråd!",
17
+ "errorMessage": "Tyvärr kan jag inte hjälpa dig just nu 😔.",
18
+ "howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
19
+ "showError": "Visa fel"
20
+ }
14
21
  }
@@ -1,15 +1,15 @@
1
1
  import { createEvent, createStore } from 'effector'
2
- import { Locale, LocalizationConfig } from './types'
2
+ import { Locale, Translations } from './types'
3
3
  import { LOCALIZATION_CONFIGS } from './constants'
4
4
 
5
5
  export const setLocalization = createEvent<
6
- LocalizationConfig | ((config: typeof LOCALIZATION_CONFIGS) => LocalizationConfig)
6
+ Translations | ((config: typeof LOCALIZATION_CONFIGS) => Translations)
7
7
  >()
8
8
 
9
- export const $localization = createStore<LocalizationConfig>(LOCALIZATION_CONFIGS[Locale.EN]).on(
10
- setLocalization,
11
- (state, payload) => {
12
- if (typeof payload === 'function') return payload(LOCALIZATION_CONFIGS)
13
- if (state.locale !== payload.locale) return payload
14
- },
9
+ export const $localization = createStore<Translations>(LOCALIZATION_CONFIGS[Locale.EN]).on(
10
+ setLocalization,
11
+ (state, payload) => {
12
+ if (typeof payload === 'function') return payload(LOCALIZATION_CONFIGS)
13
+ return payload
14
+ },
15
15
  )
@@ -1,12 +1,12 @@
1
- import enTranslations from '../../lib/localization/en.json'
1
+ import enTranslations from './localization/en.json'
2
+ import swTranslations from './localization/sw.json'
3
+ import gbTranslations from './localization/gb.json'
4
+ import { RetrieveKeys } from '../../lib/types/keys'
5
+ import { ISValidTranslation } from './validation.types'
2
6
 
3
7
  export type Translations = typeof enTranslations
4
- export type TranslationKeys = keyof Translations
5
-
6
- export type GetText = <T extends TranslationKeys>(
7
- key: T,
8
- args?: Record<string, string> | null,
9
- ) => Translations[T]
8
+ export type TranslationKeys = RetrieveKeys<Translations>
9
+ export type GetText = (key: TranslationKeys, args?: Record<string, string> | null) => string
10
10
 
11
11
  export enum Locale {
12
12
  EN = 'en-SE',
@@ -14,4 +14,7 @@ export enum Locale {
14
14
  GB = 'en-GB',
15
15
  }
16
16
 
17
- export type LocalizationConfig = Record<string, string>
17
+ // Validation of translations, do not remove
18
+ type ISValidEN = ISValidTranslation<Translations>
19
+ type ISValidSW = ISValidTranslation<typeof swTranslations>
20
+ type ISValidGB = ISValidTranslation<typeof gbTranslations>
@@ -0,0 +1,26 @@
1
+ import enTranslations from './localization/en.json'
2
+ import swTranslations from './localization/sw.json'
3
+ import gbTranslations from './localization/gb.json'
4
+
5
+ type Extends<T, U> = T extends U ? true : false
6
+
7
+ type ExtendsAll<Candidate, Types extends unknown[]> = Types extends [infer Head, ...infer Tail]
8
+ ? Extends<Candidate, Head> extends true
9
+ ? ExtendsAll<Candidate, Tail>
10
+ : false
11
+ : true
12
+
13
+ type FindDominantType<Types extends unknown[]> = Types extends [
14
+ infer First,
15
+ ...infer Rest extends unknown[],
16
+ ]
17
+ ? ExtendsAll<First, Rest> extends true
18
+ ? First
19
+ : FindDominantType<Rest>
20
+ : never
21
+
22
+ type DominantTranslation = FindDominantType<
23
+ [typeof enTranslations, typeof swTranslations, typeof gbTranslations]
24
+ >
25
+
26
+ export type ISValidTranslation<T extends DominantTranslation> = T
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Celebrations = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _ParticleBatch = require("./ParticleBatch.js");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- const Celebrations = exports.Celebrations = /*#__PURE__*/(0, _react.memo)(({
14
- style,
15
- modelRef
16
- }) => {
17
- const activeBatchesIds = (0, _react.useRef)(new Set());
18
- const [particlesBatches, setParticlesBatches] = (0, _react.useState)([]);
19
- const [containerWidth, setContainerWidth] = (0, _react.useState)(0);
20
- const addParticlesBatch = variant => {
21
- const batchId = Math.random();
22
- activeBatchesIds.current.add(batchId);
23
- setParticlesBatches(prev => [...prev, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ParticleBatch.ParticleBatch, {
24
- onAnimationEnd: () => {
25
- activeBatchesIds.current.delete(batchId);
26
- setParticlesBatches(prev => prev.filter(batch => batch.key !== batchId.toString()));
27
- },
28
- containerWidth: containerWidth,
29
- variant: variant
30
- }, batchId)]);
31
- };
32
- (0, _react.useImperativeHandle)(modelRef, () => ({
33
- play: addParticlesBatch
34
- }), [containerWidth]);
35
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
36
- style: [styles.container, style],
37
- onLayout: event => {
38
- setContainerWidth(event.nativeEvent.layout.width);
39
- },
40
- pointerEvents: "box-none",
41
- children: particlesBatches
42
- });
43
- });
44
- const styles = _reactNative.StyleSheet.create({
45
- container: {
46
- zIndex: 0,
47
- position: 'absolute',
48
- width: '100%'
49
- }
50
- });
51
- //# sourceMappingURL=Celebrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_ParticleBatch","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Celebrations","exports","memo","style","modelRef","activeBatchesIds","useRef","Set","particlesBatches","setParticlesBatches","useState","containerWidth","setContainerWidth","addParticlesBatch","variant","batchId","Math","random","current","add","prev","jsx","ParticleBatch","onAnimationEnd","delete","filter","batch","key","toString","useImperativeHandle","play","View","styles","container","onLayout","event","nativeEvent","layout","width","pointerEvents","children","StyleSheet","create","zIndex","position"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/Celebrations.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAQxC,MAAMW,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,WAAI,EAAC,CAAC;EAAEC,KAAK;EAAEC;AAA4B,CAAC,KAAK;EAC3E,MAAMC,gBAAgB,GAAG,IAAAC,aAAM,EAAC,IAAIC,GAAG,CAAS,CAAC,CAAC;EAClD,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAG,IAAAC,eAAQ,EAEtD,EAAE,CAAC;EACL,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EAEvD,MAAMG,iBAAiB,GAAIC,OAA2B,IAAK;IACzD,MAAMC,OAAO,GAAGC,IAAI,CAACC,MAAM,CAAC,CAAC;IAC7BZ,gBAAgB,CAACa,OAAO,CAACC,GAAG,CAACJ,OAAO,CAAC;IACrCN,mBAAmB,CAAEW,IAAI,IAAK,CAC5B,GAAGA,IAAI,eACP,IAAAzC,WAAA,CAAA0C,GAAA,EAAC3C,cAAA,CAAA4C,aAAa;MAEZC,cAAc,EAAEA,CAAA,KAAM;QACpBlB,gBAAgB,CAACa,OAAO,CAACM,MAAM,CAACT,OAAO,CAAC;QACxCN,mBAAmB,CAAEW,IAAI,IAAKA,IAAI,CAACK,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKZ,OAAO,CAACa,QAAQ,CAAC,CAAC,CAAC,CAAC;MACzF,CAAE;MACFjB,cAAc,EAAEA,cAAe;MAC/BG,OAAO,EAAEA;IAAQ,GANZC,OAON,CAAC,CACH,CAAC;EACJ,CAAC;EAED,IAAAc,0BAAmB,EACjBzB,QAAQ,EACR,OAAO;IACL0B,IAAI,EAAEjB;EACR,CAAC,CAAC,EACF,CAACF,cAAc,CACjB,CAAC;EAED,oBACE,IAAAhC,WAAA,CAAA0C,GAAA,EAAC/C,YAAA,CAAAyD,IAAI;IACH5B,KAAK,EAAE,CAAC6B,MAAM,CAACC,SAAS,EAAE9B,KAAK,CAAE;IACjC+B,QAAQ,EAAGC,KAAK,IAAK;MACnBvB,iBAAiB,CAACuB,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,KAAK,CAAC;IACnD,CAAE;IACFC,aAAa,EAAC,UAAU;IAAAC,QAAA,EAEvBhC;EAAgB,CACb,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMwB,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBN,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}