@magmamath/students-features 0.6.14-rc.9 → 0.6.15

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 (249) hide show
  1. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +59 -0
  2. package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
  3. package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +99 -0
  4. package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
  5. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
  6. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  7. package/dist/commonjs/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +9 -12
  8. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
  9. package/dist/commonjs/features/chatbot/components/Chatbot.js +3 -5
  10. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  11. package/dist/commonjs/features/chatbot/constants.js +1 -6
  12. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  13. package/dist/commonjs/features/chatbot/index.js +0 -7
  14. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  15. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +3 -37
  16. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  17. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +10 -31
  18. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  19. package/dist/commonjs/features/chatbot/model/ChatbotApi.js +0 -3
  20. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
  21. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  22. package/dist/commonjs/features/chatbot/types/units.types.js +0 -10
  23. package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
  24. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +1 -3
  25. package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
  26. package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
  27. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +12 -9
  28. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  29. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +7 -7
  30. package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -1
  31. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +55 -29
  32. package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -1
  33. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +3 -1
  34. package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
  35. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +6 -4
  36. package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
  37. package/dist/commonjs/shared/translation/localization/ca.json +1 -1
  38. package/dist/commonjs/shared/translation/localization/en.json +1 -1
  39. package/dist/commonjs/shared/translation/localization/gb.json +1 -1
  40. package/dist/commonjs/shared/translation/localization/sct.json +2 -2
  41. package/dist/commonjs/shared/translation/localization/sw.json +3 -3
  42. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +53 -0
  43. package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
  44. package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +92 -0
  45. package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
  46. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
  47. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  48. package/dist/module/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +7 -10
  49. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
  50. package/dist/module/features/chatbot/components/Chatbot.js +3 -5
  51. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  52. package/dist/module/features/chatbot/constants.js +0 -5
  53. package/dist/module/features/chatbot/constants.js.map +1 -1
  54. package/dist/module/features/chatbot/index.js +0 -1
  55. package/dist/module/features/chatbot/index.js.map +1 -1
  56. package/dist/module/features/chatbot/model/ChatBotModel.js +3 -37
  57. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  58. package/dist/module/features/chatbot/model/ChatBotThreadManager.js +10 -31
  59. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  60. package/dist/module/features/chatbot/model/ChatbotApi.js +0 -3
  61. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
  62. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  63. package/dist/module/features/chatbot/types/units.types.js +0 -6
  64. package/dist/module/features/chatbot/types/units.types.js.map +1 -1
  65. package/dist/module/features/exampleSolution/ExampleSolutionModal.js +1 -3
  66. package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
  67. package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
  68. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +12 -9
  69. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  70. package/dist/module/features/exampleSolution/components/QuestionSection.js +9 -9
  71. package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -1
  72. package/dist/module/features/exampleSolution/components/SolutionSection.js +57 -31
  73. package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -1
  74. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +3 -1
  75. package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
  76. package/dist/module/features/formulaSheet/components/FormulaSheet.js +6 -4
  77. package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
  78. package/dist/module/shared/translation/localization/ca.json +1 -1
  79. package/dist/module/shared/translation/localization/en.json +1 -1
  80. package/dist/module/shared/translation/localization/gb.json +1 -1
  81. package/dist/module/shared/translation/localization/sct.json +2 -2
  82. package/dist/module/shared/translation/localization/sw.json +3 -3
  83. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
  84. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
  85. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
  86. package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
  87. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  88. package/dist/typescript/{module/features/chatbot/components/Chat/Chat.d.ts → commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
  89. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
  90. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +0 -2
  91. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  92. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +0 -5
  93. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  94. package/dist/typescript/commonjs/features/chatbot/index.d.ts +0 -1
  95. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  96. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -5
  97. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  98. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
  99. package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
  100. package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
  101. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +4 -21
  102. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  103. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +1 -10
  104. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  105. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -18
  106. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
  107. package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
  108. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
  109. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  110. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +2 -1
  111. package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
  112. package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
  113. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
  114. package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
  115. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +2 -1
  116. package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -1
  117. package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
  118. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
  119. package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
  120. package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
  121. package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
  122. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  123. package/dist/typescript/{commonjs/features/chatbot/components/Chat/Chat.d.ts → module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
  124. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
  125. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +0 -2
  126. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  127. package/dist/typescript/module/features/chatbot/constants.d.ts +0 -5
  128. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  129. package/dist/typescript/module/features/chatbot/index.d.ts +0 -1
  130. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  131. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -5
  132. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  133. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
  134. package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
  135. package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
  136. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +4 -21
  137. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  138. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +1 -10
  139. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  140. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -18
  141. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
  142. package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
  143. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
  144. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  145. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +2 -1
  146. package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
  147. package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
  148. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
  149. package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
  150. package/dist/typescript/module/features/exampleSolution/types.d.ts +2 -1
  151. package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -1
  152. package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
  153. package/package.json +1 -1
  154. package/src/features/chatbot/components/Alternatives/Alternatives.tsx +60 -0
  155. package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +91 -0
  156. package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +2 -6
  157. package/src/features/chatbot/components/{Chat/Chat.tsx → ChatMessages/ChatbotMessages.tsx} +6 -10
  158. package/src/features/chatbot/components/Chatbot.tsx +2 -6
  159. package/src/features/chatbot/constants.ts +0 -7
  160. package/src/features/chatbot/index.ts +0 -2
  161. package/src/features/chatbot/model/ChatBotModel.ts +27 -71
  162. package/src/features/chatbot/model/ChatBotThreadManager.ts +9 -38
  163. package/src/features/chatbot/model/ChatbotApi.ts +0 -2
  164. package/src/features/chatbot/types/api.types.ts +4 -24
  165. package/src/features/chatbot/types/model.types.ts +0 -15
  166. package/src/features/chatbot/types/units.types.ts +0 -22
  167. package/src/features/exampleSolution/ExampleSolutionModal.tsx +1 -7
  168. package/src/features/exampleSolution/assets/grid.webp +0 -0
  169. package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +16 -10
  170. package/src/features/exampleSolution/components/QuestionSection.tsx +11 -7
  171. package/src/features/exampleSolution/components/SolutionSection.tsx +72 -29
  172. package/src/features/exampleSolution/model/ExampleSolution.model.ts +5 -2
  173. package/src/features/exampleSolution/types.ts +2 -1
  174. package/src/features/formulaSheet/components/FormulaSheet.tsx +7 -4
  175. package/src/shared/translation/localization/ca.json +1 -1
  176. package/src/shared/translation/localization/en.json +1 -1
  177. package/src/shared/translation/localization/gb.json +1 -1
  178. package/src/shared/translation/localization/sct.json +2 -2
  179. package/src/shared/translation/localization/sw.json +3 -3
  180. package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +0 -1
  181. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +0 -53
  182. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
  183. package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js +0 -39
  184. package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
  185. package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -38
  186. package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
  187. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +0 -140
  188. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
  189. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -142
  190. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
  191. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -44
  192. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
  193. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -105
  194. package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
  195. package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
  196. package/dist/module/features/chatbot/components/Chat/Chat.js.map +0 -1
  197. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +0 -47
  198. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
  199. package/dist/module/features/chatbot/components/ChatInput/InputOption.js +0 -34
  200. package/dist/module/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
  201. package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -32
  202. package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
  203. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +0 -132
  204. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
  205. package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -134
  206. package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
  207. package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -38
  208. package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
  209. package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -97
  210. package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
  211. package/dist/module/features/exampleSolution/assets/grid.png +0 -0
  212. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
  213. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
  214. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
  215. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
  216. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
  217. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
  218. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
  219. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
  220. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
  221. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
  222. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
  223. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
  224. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
  225. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
  226. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
  227. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
  228. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
  229. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
  230. package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
  231. package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
  232. package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
  233. package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
  234. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
  235. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
  236. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
  237. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
  238. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
  239. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
  240. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
  241. package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
  242. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +0 -56
  243. package/src/features/chatbot/components/ChatInput/InputOption.tsx +0 -29
  244. package/src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx +0 -27
  245. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -160
  246. package/src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx +0 -133
  247. package/src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx +0 -42
  248. package/src/features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx +0 -110
  249. package/src/features/exampleSolution/assets/grid.png +0 -0
@@ -3,28 +3,12 @@ export type GetAlternativesPayload = {
3
3
  municipalityId: string;
4
4
  assignmentClassGrade: number;
5
5
  } | null;
6
- export type AlternativesOptions = {
7
- default: ChatAnswer[];
8
- hints: ChatAnswer[];
9
- };
10
6
  export type GetAlternativesResponse = {
11
7
  chatAccess?: boolean;
12
- isOpenChatEnabled?: boolean;
13
- version: string;
14
- options: AlternativesOptions;
15
- };
16
- export type SendMessagePayload = {
17
- problemDescription: string;
18
- correctAnswer?: string | string[];
19
- answerOptions?: string[];
20
- altText?: string;
21
- language: string;
22
- message: string;
23
- conversationId?: string;
24
- };
25
- export type SendMessageResponse = {
26
- message: string;
27
- conversationId: string;
8
+ options: {
9
+ default: ChatAnswer[];
10
+ hints: ChatAnswer[];
11
+ };
28
12
  };
29
13
  export type PostMessagePayload = {
30
14
  language: string;
@@ -32,7 +16,6 @@ export type PostMessagePayload = {
32
16
  answer?: string | string[];
33
17
  problem: string;
34
18
  imageAltText?: string;
35
- message?: string;
36
19
  };
37
20
  export type PostMessageResponse = {
38
21
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/api.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAElE,MAAM,MAAM,sBAAsB,GAAG;IACnC,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,GAAG,IAAI,CAAA;AAER,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,u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ACL,YAAY,EAAE,MAAM,CAAA;QACpB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,WAAW,EAAE;QACX,aAAa,EAAE,MAAM,CAAA;QACrB,KAAK,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,SAAS,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtF,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG;IAClC,oBAAoB,EAAE,MAAM,EAAE,CAAA;CAC/B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { Store } from 'effector';
2
- import { ChatHintPayload, ChatHintResponse, ErrorSpottingPayload, ErrorSpottingResponse, GetAlternativesPayload, GetAlternativesResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, GoogleTranslatePayload, GoogleTranslateResponse, PostMessagePayload, PostMessageResponse, SendMessagePayload, SendMessageResponse } from './api.types';
2
+ import { ChatHintPayload, ChatHintResponse, ErrorSpottingPayload, ErrorSpottingResponse, GetAlternativesPayload, GetAlternativesResponse, GoogleText2SpeechPayload, GoogleText2SpeechResponse, GoogleTranslatePayload, GoogleTranslateResponse, PostMessagePayload, PostMessageResponse } from './api.types';
3
3
  import { ExtendWithOptional } from '../../../lib/helpers/types';
4
4
  import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types';
5
5
  export type ChatbotMessages = {
@@ -10,7 +10,6 @@ export type ChatbotMessages = {
10
10
  };
11
11
  export type ChatbotApiRequests = {
12
12
  getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
13
- sendMessage: (props: SendMessagePayload) => Promise<SendMessageResponse>;
14
13
  postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>;
15
14
  postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>;
16
15
  postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>;
@@ -30,18 +29,10 @@ export type ChatbotModelProps = {
30
29
  export type SendHelpParams = {
31
30
  message: string;
32
31
  translatedMessage?: string;
33
- isFreeText?: boolean;
34
32
  };
35
33
  export type SendHelpProps = SendHelpParams & {
36
34
  key: string;
37
35
  context: ChatbotContext | null;
38
- isFreeText?: boolean;
39
- };
40
- export type SendMessageProps = SendHelpParams & {
41
- key: string;
42
- context: ChatbotContext | null;
43
- conversationId?: string;
44
- message: string;
45
36
  };
46
37
  export type SetHintMessageProps = {
47
38
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EAC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,yBAAyB,GAAG;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,qBAAqB,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC3C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;IACnE,UAAU,IAAI,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
1
+ {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,e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AE,MAAM,EAAE,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,yBAAyB,EAAE,MAAM,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -1,4 +1,3 @@
1
- import { ColorScheme } from './style.types';
2
1
  export type Stroke = {
3
2
  x: number[];
4
3
  y: number[];
@@ -32,21 +31,4 @@ export type ChatItem = {
32
31
  isAvailable: boolean;
33
32
  currentThread: IThreadItem | null;
34
33
  };
35
- export type ChatInputAreaProps = {
36
- onPressAlternative: (message: string, translatedMessage?: string) => void;
37
- hasMessages: boolean;
38
- isHintFeedback: boolean;
39
- inputMode: ChatInputMode;
40
- colorScheme?: ColorScheme;
41
- };
42
- export declare enum ChatInputMode {
43
- FreeText = 1,
44
- Option = 2
45
- }
46
- export type ChatInputProps = {
47
- message: string;
48
- disabled: boolean;
49
- onPress: () => void;
50
- colorScheme: ColorScheme;
51
- };
52
34
  //# sourceMappingURL=units.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"units.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/units.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,EAAE,MAAM,EAAE,CAAA;IACX,CAAC,EAAE,MAAM,EAAE,CAAA;CACZ,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,aAAa,EAAE,WAAW,GAAG,IAAI,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,aAAa,CAAA;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,oBAAY,aAAa;IACvB,QAAQ,IAAI;IACZ,MAAM,IAAI;CACX;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA"}
1
+ {"version":3,"file":"units.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/types/units.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,EAAE,MAAM,EAAE,CAAA;IACX,CAAC,EAAE,MAAM,EAAE,CAAA;CACZ,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG;IACpC,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,CAAA;IAChC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,WAAW,EAAE,OAAO,CAAA;IACpB,aAAa,EAAE,WAAW,GAAG,IAAI,CAAA;CAClC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSolutionModal.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/ExampleSolutionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,0BAA0B,CAAA;KACnC,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,uCAE9B,kCAAkC,sBAcpC,CAAA"}
1
+ {"version":3,"file":"ExampleSolutionModal.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/ExampleSolutionModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,kCAAkC,GAAG;IACxC,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE,0BAA0B,CAAA;KACnC,CAAA;CACF,CAAA;AAED,eAAO,MAAM,oBAAoB,uCAE9B,kCAAkC,sBAQpC,CAAA"}
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ExampleSolutionModalParams } from '../types';
3
- export declare const ExampleSolutionModalContent: ({ model, payload, cacheKey, }: ExampleSolutionModalParams) => React.JSX.Element;
3
+ type ExampleSolutionModalContentProps = {
4
+ params: ExampleSolutionModalParams;
5
+ };
6
+ export declare const ExampleSolutionModalContent: ({ params: { model, payload, cacheKey }, }: ExampleSolutionModalContentProps) => React.JSX.Element;
7
+ export {};
4
8
  //# sourceMappingURL=ExampleSolutionModalContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,eAAO,MAAM,2BAA2B,kCAIrC,0BAA0B,sBAiB5B,CAAA"}
1
+ {"version":3,"file":"ExampleSolutionModalContent.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAKrD,KAAK,gCAAgC,GAAG;IACtC,MAAM,EAAE,0BAA0B,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,2BAA2B,8CAErC,gCAAgC,sBAqBlC,CAAA"}
@@ -3,7 +3,8 @@ import { ExampleSolutionStatuses } from '../constants';
3
3
  type QuestionSectionProps = {
4
4
  question?: string;
5
5
  status: ExampleSolutionStatuses;
6
+ renderKatexComponent: (katexString: string) => React.ReactNode;
6
7
  };
7
- export declare const QuestionSection: ({ question, status }: QuestionSectionProps) => React.JSX.Element;
8
+ export declare const QuestionSection: ({ question, status, renderKatexComponent, }: QuestionSectionProps) => React.JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=QuestionSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/QuestionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,eAAe,yBAA0B,oBAAoB,sBAazE,CAAA"}
1
+ {"version":3,"file":"QuestionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/QuestionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/D,CAAA;AAED,eAAO,MAAM,eAAe,gDAIzB,oBAAoB,sBAWtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAID,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAsBvE,CAAA"}
1
+ {"version":3,"file":"SolutionSection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/SolutionSection.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAGtD,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAA;AAWD,eAAO,MAAM,eAAe,uBAAwB,oBAAoB,sBAiDvE,CAAA"}
@@ -1,9 +1,10 @@
1
- import { GifCelebrationsModelProps } from '../types';
1
+ import { ExampleSolutionModelProps } from '../types';
2
2
  import { ExampleSolutionsApi } from './ExampleSolutionApi';
3
3
  import { ExampleSolutionCache } from './ExampleSolutionCache';
4
4
  export declare class ExampleSolutionModel {
5
5
  readonly api: ExampleSolutionsApi;
6
6
  readonly cache: ExampleSolutionCache;
7
- constructor({ api, errorHandler }: GifCelebrationsModelProps);
7
+ readonly renderKatexComponent: (katexString: string) => React.ReactNode;
8
+ constructor({ api, errorHandler, renderKatexComponent }: ExampleSolutionModelProps);
8
9
  }
9
10
  //# sourceMappingURL=ExampleSolution.model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExampleSolution.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolution.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,oBAAoB;IAC/B,SAAgB,GAAG,sBAAA;IACnB,SAAgB,KAAK,uBAA6B;gBAEtC,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,yBAAyB;CAG7D"}
1
+ {"version":3,"file":"ExampleSolution.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/model/ExampleSolution.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,qBAAa,oBAAoB;IAC/B,SAAgB,GAAG,sBAAA;IACnB,SAAgB,KAAK,uBAA6B;IAElD,SAAgB,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;gBAElE,EAAE,GAAG,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,yBAAyB;CAInF"}
@@ -14,9 +14,10 @@ export type ExampleSolutionApiRequests = {
14
14
  generateExampleSolution: (body: ExampleSolutionPayload) => Promise<ExampleSolutionResponse>;
15
15
  };
16
16
  export type ExampleSolutionErrorHandler = (errorMessage: string) => void;
17
- export type GifCelebrationsModelProps = {
17
+ export type ExampleSolutionModelProps = {
18
18
  api: ExampleSolutionApiRequests;
19
19
  errorHandler?: ExampleSolutionErrorHandler;
20
+ renderKatexComponent: (katexString: string) => React.ReactNode;
20
21
  };
21
22
  export type ExampleSolutionModalParams = {
22
23
  cacheKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,uBAAuB,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CAC5F,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;AACxE,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,0BAA0B,CAAA;IAC/B,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,sBAAsB,CAAA;IAC/B,KAAK,EAAE,oBAAoB,CAAA;CAC5B,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/exampleSolution/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,uBAAuB,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CAC5F,CAAA;AACD,MAAM,MAAM,2BAA2B,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;AACxE,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,0BAA0B,CAAA;IAC/B,YAAY,CAAC,EAAE,2BAA2B,CAAA;IAC1C,oBAAoB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA;CAC/D,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,sBAAsB,CAAA;IAC/B,KAAK,EAAE,oBAAoB,CAAA;CAC5B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAkDxB,CAAA"}
1
+ {"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,YAAY,4FAqDxB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmamath/students-features",
3
- "version": "0.6.14-rc.9",
3
+ "version": "0.6.15",
4
4
  "description": "Magmamath features library",
5
5
  "source": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -0,0 +1,60 @@
1
+ import React from 'react'
2
+ import { StyleSheet, View } from 'react-native'
3
+ import { useStoreMap, useUnit } from 'effector-react'
4
+
5
+ import { HelpRequestOption } from './HelpRequestOption'
6
+ import { useChatModel } from '../../context/ChatBotModelContext'
7
+ import { ColorScheme } from '../../types/style.types'
8
+ import { CONTROLS_COLORS_MAP } from '../../constants'
9
+
10
+ type AlternativesProps = {
11
+ onPressAlternative: (message: string, translatedMessage?: string) => void
12
+ hasMessages: boolean
13
+ isHintFeedback: boolean
14
+ colorScheme?: ColorScheme
15
+ }
16
+
17
+ export const Alternatives = ({
18
+ onPressAlternative,
19
+ hasMessages,
20
+ isHintFeedback,
21
+ colorScheme = ColorScheme.Blue,
22
+ }: AlternativesProps) => {
23
+ const model = useChatModel()
24
+ const isTranslated = useUnit(model.translation.$isTranslated)
25
+ const alternatives = useUnit(model.$alternatives)
26
+ const isTranslationPending = useUnit(model.translation.translateAllMessagesFx.pending)
27
+ const lastMessageOptions = useStoreMap(model.$currentChatData, ({ messages }) => {
28
+ const lastMessage = messages.at(-1)
29
+ return lastMessage?.options ?? []
30
+ })
31
+
32
+ const options = (() => {
33
+ if (hasMessages) return lastMessageOptions
34
+ if (isHintFeedback) return alternatives?.options.hints ?? []
35
+ return alternatives?.options.default ?? []
36
+ })()
37
+
38
+ return (
39
+ <View style={styles.container}>
40
+ {options.map(({ text, translatedText }, index) => (
41
+ <HelpRequestOption
42
+ key={index}
43
+ onPress={() => onPressAlternative(text, translatedText)}
44
+ message={isTranslated ? (translatedText as string) : text}
45
+ disabled={isTranslationPending}
46
+ hoverColor={CONTROLS_COLORS_MAP[colorScheme].hover}
47
+ />
48
+ ))}
49
+ </View>
50
+ )
51
+ }
52
+
53
+ const styles = StyleSheet.create({
54
+ container: {
55
+ flex: 1,
56
+ width: 305,
57
+ marginVertical: 8,
58
+ gap: 8,
59
+ },
60
+ })
@@ -0,0 +1,91 @@
1
+ import React, { useEffect, useRef, useState } from 'react'
2
+ import { Animated, Pressable, StyleSheet } from 'react-native'
3
+ import { COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui'
4
+ import { ArrowRightIcon } from '../../../../shared/icons/ArrowRightIcon'
5
+
6
+ type HelpRequestOptionProps = {
7
+ onPress: () => void
8
+ message: string
9
+ disabled: boolean
10
+ hoverColor?: string
11
+ }
12
+
13
+ export const HelpRequestOption = ({
14
+ onPress,
15
+ message,
16
+ disabled = false,
17
+ hoverColor = COLORS.PRIMARY_BLUE,
18
+ }: HelpRequestOptionProps) => {
19
+ const [isHovered, setIsHovered] = useState(false)
20
+ const hoverAnim = useRef(new Animated.Value(0)).current
21
+
22
+ const backgroundColor = hoverAnim.interpolate({
23
+ inputRange: [0, 1],
24
+ outputRange: [COLORS.NEUTRAL_1, hoverColor],
25
+ })
26
+ const textColor = hoverAnim.interpolate({
27
+ inputRange: [0, 1],
28
+ outputRange: [COLORS.NEUTRAL_10, COLORS.NEUTRAL_1],
29
+ })
30
+
31
+ useEffect(() => {
32
+ Animated.timing(hoverAnim, {
33
+ toValue: isHovered ? 1 : 0,
34
+ duration: 200,
35
+ useNativeDriver: false,
36
+ }).start()
37
+ }, [isHovered, hoverAnim])
38
+
39
+ return (
40
+ <Pressable
41
+ onHoverIn={() => setIsHovered(true)}
42
+ onHoverOut={() => setIsHovered(false)}
43
+ onPress={onPress}
44
+ style={styles.button}
45
+ disabled={disabled}
46
+ accessibilityState={{ disabled }}
47
+ accessibilityRole="button"
48
+ >
49
+ <Animated.View
50
+ style={[styles.textWrapper, { backgroundColor, borderColor: backgroundColor }]}
51
+ >
52
+ <Animated.Text numberOfLines={1} style={[styles.text, { color: textColor }]}>
53
+ {message}
54
+ </Animated.Text>
55
+ <ArrowRightIcon color={isHovered ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_10} />
56
+ </Animated.View>
57
+ </Pressable>
58
+ )
59
+ }
60
+
61
+ const styles = StyleSheet.create({
62
+ button: {
63
+ flexDirection: 'row',
64
+ alignItems: 'center',
65
+ justifyContent: 'space-between',
66
+ width: '100%',
67
+ },
68
+ text: {
69
+ fontSize: 20,
70
+ fontWeight: 400,
71
+ fontFamily: FONT_FAMILY.buenosAires,
72
+ color: COLORS.NEUTRAL_10,
73
+ },
74
+ textWrapper: {
75
+ flex: 1,
76
+ flexDirection: 'row',
77
+ alignItems: 'center',
78
+ justifyContent: 'space-between',
79
+ maxWidth: 305,
80
+ paddingHorizontal: SPACING[400],
81
+ paddingVertical: SPACING[200],
82
+ borderWidth: 1,
83
+ borderRadius: 48,
84
+ elevation: 3,
85
+ shadowColor: '#333',
86
+ shadowOffset: { width: 0, height: 1 },
87
+ shadowOpacity: 0.25,
88
+ shadowRadius: 3,
89
+ backgroundColor: COLORS.NEUTRAL_1,
90
+ },
91
+ })
@@ -6,7 +6,6 @@ import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
6
6
  import { ThreeDotsLoader } from '../ThreeDotsLoader/ThreeDotsLoader'
7
7
  import { CONTROLS_COLORS_MAP } from '../../constants'
8
8
  import { ColorScheme } from '../../types/style.types'
9
- import { LavaIconInGlasses } from '@magmamath/students-features'
10
9
 
11
10
  type MessageLoaderProps = {
12
11
  colorScheme?: ColorScheme
@@ -15,7 +14,7 @@ type MessageLoaderProps = {
15
14
  export const MessageLoader = ({ colorScheme = ColorScheme.Blue }: MessageLoaderProps) => (
16
15
  <View style={styles.container}>
17
16
  <View style={styles.icon}>
18
- <LavaIconInGlasses width={60} height={80} />
17
+ <ChatbotIcon width={60} height={80} />
19
18
  </View>
20
19
  <View style={styles.loader}>
21
20
  <ThreeDotsLoader backgroundColor={CONTROLS_COLORS_MAP[colorScheme].background} />
@@ -28,13 +27,10 @@ const styles = StyleSheet.create({
28
27
  flexDirection: 'row',
29
28
  width: 327,
30
29
  alignItems: 'flex-end',
31
- paddingLeft:70
32
30
  },
33
31
  icon: {
34
- position: 'absolute',
35
- zIndex:1,
36
32
  alignSelf: 'flex-end',
37
- left: 0
33
+ marginRight: 8,
38
34
  },
39
35
  loader: {
40
36
  flex: 1,
@@ -5,16 +5,14 @@ import { useStoreMap, useUnit } from 'effector-react'
5
5
  import { ChatbotModel } from '../../model/ChatBotModel'
6
6
  import { ChatMessage } from '../ChatMessage/ChatMessage'
7
7
  import { MessageLoader } from '../ChatMessage/MessageLoader'
8
- import { ChatInput } from '../ChatInput/ChatInput'
8
+ import { Alternatives } from '../Alternatives/Alternatives'
9
9
  import { MessageVariant } from '../../types/model.types'
10
10
  import { ColorScheme } from '../../types/style.types'
11
- import { ChatInputMode } from '../../types/units.types'
12
11
 
13
12
  type ChatbotMessagesProps = {
14
13
  model: ChatbotModel
15
14
  isHintFeedback: boolean
16
15
  isTextToSpeechEnabled: boolean
17
- inputMode: ChatInputMode
18
16
  colorScheme?: ColorScheme
19
17
  }
20
18
 
@@ -24,11 +22,10 @@ const BOTTOM_OFFSET = Platform.select({
24
22
  default: 294,
25
23
  })
26
24
 
27
- export const Chat = ({
25
+ export const ChatbotMessages = ({
28
26
  model,
29
27
  isHintFeedback,
30
28
  isTextToSpeechEnabled,
31
- inputMode,
32
29
  colorScheme = ColorScheme.Blue,
33
30
  }: ChatbotMessagesProps) => {
34
31
  const dimensions = useWindowDimensions()
@@ -48,8 +45,8 @@ export const Chat = ({
48
45
 
49
46
  const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET
50
47
 
51
- const askChatForHelp = (message: string, translatedMessage?: string, isFreeText?: boolean) => {
52
- void model.sendHelpRequestFx({ message, translatedMessage, isFreeText })
48
+ const askChatForHelp = (message: string, translatedMessage?: string) => {
49
+ void model.sendHelpRequestFx({ message, translatedMessage })
53
50
  }
54
51
 
55
52
  return (
@@ -91,13 +88,12 @@ export const Chat = ({
91
88
  </View>
92
89
  )}
93
90
 
94
- {isOpen && (
95
- <ChatInput
91
+ {!isHelpRequestPending && isOpen && (
92
+ <Alternatives
96
93
  onPressAlternative={askChatForHelp}
97
94
  hasMessages={messages.length > 1}
98
95
  isHintFeedback={isHintFeedback}
99
96
  colorScheme={colorScheme}
100
- inputMode={inputMode}
101
97
  />
102
98
  )}
103
99
  </ScrollView>
@@ -2,13 +2,11 @@ import React, { ComponentType, PropsWithChildren } from 'react'
2
2
  import { useStoreMap, useUnit } from 'effector-react'
3
3
 
4
4
  import { ChatbotModel } from '../model/ChatBotModel'
5
- import { Chat } from './Chat/Chat'
5
+ import { ChatbotMessages } from './ChatMessages/ChatbotMessages'
6
6
  import { ChatControls } from './ChatControls/ChatControls'
7
7
  import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants'
8
8
  import { ChatBotModelContext } from '../context/ChatBotModelContext'
9
9
  import { ColorScheme } from '../types/style.types'
10
- import { ChatInputMode } from '../types/units.types'
11
- import { IS_MOBILE } from '@magmamath/react-native-ui'
12
10
 
13
11
  type ChatbotProps = {
14
12
  model: ChatbotModel
@@ -18,7 +16,6 @@ type ChatbotProps = {
18
16
  voice: typeof DEFAULT_VOICE
19
17
  audioConfig: typeof AUDIO_CONFIG
20
18
  }
21
- inputMode?: ChatInputMode
22
19
  ButtonWrapper: ComponentType<PropsWithChildren>
23
20
  iconSize?: { width: number; height: number } // TODO: use number instead
24
21
  colorScheme?: ColorScheme
@@ -46,12 +43,11 @@ export const Chatbot = ({
46
43
 
47
44
  return (
48
45
  <ChatBotModelContext.Provider value={model}>
49
- <Chat
46
+ <ChatbotMessages
50
47
  model={model}
51
48
  colorScheme={colorScheme}
52
49
  isHintFeedback={isHintFeedback}
53
50
  isTextToSpeechEnabled={isTextToSpeechEnabled}
54
- inputMode={alternatives?.isOpenChatEnabled ? ChatInputMode.FreeText : ChatInputMode.Option}
55
51
  />
56
52
 
57
53
  <ChatControls
@@ -2,7 +2,6 @@ import { ButtonColor, COLORS } from '@magmamath/react-native-ui'
2
2
  import { Platform } from 'react-native'
3
3
  import { MessageVariant } from './types/model.types'
4
4
  import { ColorScheme } from './types/style.types'
5
- import { ANIMATION_DURATION } from '../gifCelebrations/constants'
6
5
 
7
6
  export const AUDIO_CONFIG = {
8
7
  audioEncoding: 'LINEAR16',
@@ -45,24 +44,20 @@ export const MESSAGE_COLORS_MAP = {
45
44
  [ColorScheme.Blue]: {
46
45
  [MessageVariant.RECEIVED]: {
47
46
  background: COLORS.NEUTRAL_3,
48
- border: COLORS.NEUTRAL_3,
49
47
  icon: ButtonColor.BLUE,
50
48
  },
51
49
  [MessageVariant.SENT]: {
52
50
  background: COLORS.PRIMARY_BLUE,
53
- border: COLORS.PRIMARY_BLUE,
54
51
  icon: ButtonColor.BLUE,
55
52
  },
56
53
  },
57
54
  [ColorScheme.Yellow]: {
58
55
  [MessageVariant.RECEIVED]: {
59
56
  background: COLORS.NEUTRAL_3,
60
- border: COLORS.NEUTRAL_3,
61
57
  icon: ButtonColor.YELLOW,
62
58
  },
63
59
  [MessageVariant.SENT]: {
64
60
  background: COLORS.PRIMARY_YELLOW,
65
- border: COLORS.PRIMARY_YELLOW,
66
61
  icon: ButtonColor.YELLOW,
67
62
  },
68
63
  },
@@ -78,5 +73,3 @@ export const CONTROLS_COLORS_MAP = {
78
73
  background: COLORS.PRIMARY_YELLOW,
79
74
  },
80
75
  }
81
-
82
- export const HOVER_ANIMATION_DURATION = 200
@@ -9,7 +9,5 @@ export {
9
9
  export type { PostMessageResponse } from './types/api.types'
10
10
  export { DefaultMessagesCreator } from './model/DefaultMessageCreator'
11
11
  export type { ChatAnswer } from './types/units.types'
12
- export { ChatInputMode } from './types/units.types'
13
-
14
12
  export type { ConversationMessage } from './types/units.types'
15
13
  export { ColorScheme } from './types/style.types'