@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.
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +10 -5
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +7 -7
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +9 -5
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +9 -9
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js +2 -2
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -10
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +5 -3
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +6 -4
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/shared/hooks/useKeyDownListener.js +5 -1
- package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -0
- package/dist/commonjs/shared/translation/localization/en.json +1 -0
- package/dist/commonjs/shared/translation/localization/gb.json +1 -0
- package/dist/commonjs/shared/translation/localization/sct.json +1 -0
- package/dist/commonjs/shared/translation/localization/sw.json +3 -2
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +10 -5
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +7 -7
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +9 -5
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +9 -9
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js +2 -2
- package/dist/module/features/chatbot/types/units.types.js +0 -6
- package/dist/module/features/chatbot/types/units.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +5 -3
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +5 -3
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +5 -3
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +5 -3
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +5 -3
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +6 -4
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/shared/hooks/useKeyDownListener.js +5 -1
- package/dist/module/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -0
- package/dist/module/shared/translation/localization/en.json +1 -0
- package/dist/module/shared/translation/localization/gb.json +1 -0
- package/dist/module/shared/translation/localization/sct.json +1 -0
- package/dist/module/shared/translation/localization/sw.json +3 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +7 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +5 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +7 -1
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +1 -1
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +5 -1
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +2 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -1
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +13 -8
- package/src/features/chatbot/components/ChatInput/FreeText/FreeTextInputBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +7 -7
- package/src/features/chatbot/components/Chatbot.tsx +0 -2
- package/src/features/chatbot/helpers.ts +15 -5
- package/src/features/chatbot/model/ChatBotModel.ts +5 -9
- package/src/features/chatbot/model/ChatBotThreadManager.ts +1 -1
- package/src/features/chatbot/types/model.types.ts +5 -5
- package/src/features/chatbot/types/units.types.ts +0 -5
- package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +6 -4
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +6 -4
- package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +6 -4
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +6 -4
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +6 -4
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +7 -5
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -4
- package/src/shared/hooks/useKeyDownListener.ts +9 -4
- package/src/shared/translation/localization/ca.json +1 -0
- package/src/shared/translation/localization/en.json +1 -0
- package/src/shared/translation/localization/gb.json +1 -0
- package/src/shared/translation/localization/sct.json +1 -0
- package/src/shared/translation/localization/sw.json +3 -2
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
- 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
|
-
})
|