@magmamath/students-features 0.8.0-rc.2 → 0.8.0-rc.4

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 (168) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  2. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +10 -5
  4. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
  6. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
  7. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +7 -7
  8. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  9. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  10. package/dist/commonjs/features/chatbot/helpers.js +9 -5
  11. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +9 -9
  13. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +1 -1
  15. package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/types/model.types.js +2 -2
  17. package/dist/commonjs/features/chatbot/types/units.types.js +0 -10
  18. package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
  19. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +5 -3
  20. package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -1
  21. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +5 -3
  22. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  23. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +5 -3
  24. package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -1
  25. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
  26. package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
  27. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +5 -3
  28. package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  29. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +6 -4
  30. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  31. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
  32. package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  33. package/dist/commonjs/shared/hooks/useKeyDownListener.js +5 -1
  34. package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +1 -1
  35. package/dist/commonjs/shared/translation/localization/ca.json +1 -0
  36. package/dist/commonjs/shared/translation/localization/en.json +1 -0
  37. package/dist/commonjs/shared/translation/localization/gb.json +1 -0
  38. package/dist/commonjs/shared/translation/localization/sct.json +1 -0
  39. package/dist/commonjs/shared/translation/localization/sw.json +3 -2
  40. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  41. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  42. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +10 -5
  43. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  44. package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
  45. package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
  46. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +7 -7
  47. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  48. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  49. package/dist/module/features/chatbot/helpers.js +9 -5
  50. package/dist/module/features/chatbot/helpers.js.map +1 -1
  51. package/dist/module/features/chatbot/model/ChatBotModel.js +9 -9
  52. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  53. package/dist/module/features/chatbot/model/ChatBotThreadManager.js +1 -1
  54. package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
  55. package/dist/module/features/chatbot/types/model.types.js +2 -2
  56. package/dist/module/features/chatbot/types/units.types.js +0 -6
  57. package/dist/module/features/chatbot/types/units.types.js.map +1 -1
  58. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +5 -3
  59. package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -1
  60. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +5 -3
  61. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  62. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +5 -3
  63. package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -1
  64. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
  65. package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
  66. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +5 -3
  67. package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
  68. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +6 -4
  69. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  70. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
  71. package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
  72. package/dist/module/shared/hooks/useKeyDownListener.js +5 -1
  73. package/dist/module/shared/hooks/useKeyDownListener.js.map +1 -1
  74. package/dist/module/shared/translation/localization/ca.json +1 -0
  75. package/dist/module/shared/translation/localization/en.json +1 -0
  76. package/dist/module/shared/translation/localization/gb.json +1 -0
  77. package/dist/module/shared/translation/localization/sct.json +1 -0
  78. package/dist/module/shared/translation/localization/sw.json +3 -2
  79. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
  80. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +2 -2
  81. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +0 -2
  82. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  83. package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
  84. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  85. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +5 -5
  86. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -4
  87. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
  88. package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -1
  89. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  90. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -1
  91. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
  92. package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
  93. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  94. package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  95. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +7 -1
  96. package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +1 -1
  97. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +5 -1
  98. package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +1 -1
  99. package/dist/typescript/commonjs/shared/translation/constants.d.ts +5 -0
  100. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  101. package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
  102. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  103. package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
  104. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +2 -2
  105. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +0 -2
  106. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  107. package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
  108. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  109. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +5 -5
  110. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -4
  111. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
  112. package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -1
  113. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  114. package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -1
  115. package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
  116. package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
  117. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  118. package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
  119. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +7 -1
  120. package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +1 -1
  121. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +5 -1
  122. package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +1 -1
  123. package/dist/typescript/module/shared/translation/constants.d.ts +5 -0
  124. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  125. package/dist/typescript/module/shared/translation/model.d.ts +2 -0
  126. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  127. package/package.json +1 -1
  128. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -1
  129. package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +13 -8
  130. package/src/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.tsx +1 -1
  131. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +7 -7
  132. package/src/features/chatbot/components/Chatbot.tsx +0 -2
  133. package/src/features/chatbot/helpers.ts +15 -5
  134. package/src/features/chatbot/model/ChatBotModel.ts +5 -9
  135. package/src/features/chatbot/model/ChatBotThreadManager.ts +1 -1
  136. package/src/features/chatbot/types/model.types.ts +5 -5
  137. package/src/features/chatbot/types/units.types.ts +0 -5
  138. package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +6 -4
  139. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +6 -4
  140. package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +6 -4
  141. package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +6 -4
  142. package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +6 -4
  143. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +7 -5
  144. package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -4
  145. package/src/shared/hooks/useKeyDownListener.ts +9 -4
  146. package/src/shared/translation/localization/ca.json +1 -0
  147. package/src/shared/translation/localization/en.json +1 -0
  148. package/src/shared/translation/localization/gb.json +1 -0
  149. package/src/shared/translation/localization/sct.json +1 -0
  150. package/src/shared/translation/localization/sw.json +3 -2
  151. package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
  152. package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
  153. package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
  154. package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
  155. package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
  156. package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
  157. package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
  158. package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
  159. package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
  160. package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
  161. package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
  162. package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
  163. package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
  164. package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
  165. package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
  166. package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
  167. package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
  168. package/src/features/exampleSolution/components/MessageBlock.tsx +0 -67
@@ -1,67 +0,0 @@
1
- import { StyleProp, StyleSheet, ViewStyle } from 'react-native'
2
- import React from 'react'
3
- import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
4
- import { useUnit } from 'effector-react'
5
- import { $localization } from '../../../shared/translation'
6
- import Animated, {
7
- LinearTransition,
8
- useAnimatedStyle,
9
- withDelay,
10
- withTiming,
11
- } from 'react-native-reanimated'
12
- import { ExampleSolutionStatuses } from '../constants'
13
-
14
- type MessageBlockProps = {
15
- status: ExampleSolutionStatuses
16
- style?: StyleProp<ViewStyle>
17
- }
18
-
19
- export const MessageBlock = ({ status, style }: MessageBlockProps) => {
20
- const localization = useUnit($localization)
21
-
22
- const opacityAnimation = useAnimatedStyle(() => {
23
- return {
24
- opacity: withDelay(
25
- 2000,
26
- withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 350 }),
27
- ),
28
- }
29
- }, [status])
30
-
31
- if (status === ExampleSolutionStatuses.CACHE) return null
32
-
33
- return (
34
- <Animated.View
35
- layout={LinearTransition.duration(250)}
36
- style={[styles.container, opacityAnimation, style]}
37
- >
38
- <Typography variant={'small'} numberOfLines={1}>
39
- {status === ExampleSolutionStatuses.LOADING
40
- ? localization.exampleSolution.letMeThink
41
- : localization.exampleSolution.aha}
42
- </Typography>
43
- </Animated.View>
44
- )
45
- }
46
-
47
- const styles = StyleSheet.create({
48
- container: {
49
- padding: SPACING[200],
50
- backgroundColor: COLORS.NEUTRAL_3,
51
- height: 44,
52
- borderRadius: 12,
53
- borderBottomRightRadius: 2,
54
- borderWidth: StyleSheet.hairlineWidth,
55
- borderColor: COLORS.NEUTRAL_5,
56
-
57
- shadowColor: COLORS.NEUTRAL_10,
58
- shadowOffset: {
59
- width: 0,
60
- height: 1,
61
- },
62
- shadowOpacity: 0.2,
63
- shadowRadius: 1,
64
-
65
- elevation: 3,
66
- },
67
- })