@magmamath/students-features 0.6.14-rc.8 → 0.6.14
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/Alternatives/Alternatives.js +59 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +99 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +9 -12
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chatbot.js +3 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -6
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +0 -7
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +3 -13
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +10 -32
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +0 -3
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- 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/exampleSolution/ExampleSolutionModal.js +1 -3
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +11 -8
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +7 -7
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +48 -28
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +3 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +2 -2
- package/dist/commonjs/shared/translation/localization/en.json +2 -2
- package/dist/commonjs/shared/translation/localization/gb.json +2 -2
- package/dist/commonjs/shared/translation/localization/sct.json +2 -2
- package/dist/commonjs/shared/translation/localization/sw.json +3 -3
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +53 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +92 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +7 -10
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/module/features/chatbot/components/Chatbot.js +3 -5
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/index.js +0 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +3 -13
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +10 -32
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +0 -3
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- 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/exampleSolution/ExampleSolutionModal.js +1 -3
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +11 -8
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/features/exampleSolution/components/QuestionSection.js +9 -9
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -1
- package/dist/module/features/exampleSolution/components/SolutionSection.js +50 -30
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +3 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +2 -2
- package/dist/module/shared/translation/localization/en.json +2 -2
- package/dist/module/shared/translation/localization/gb.json +2 -2
- package/dist/module/shared/translation/localization/sct.json +2 -2
- package/dist/module/shared/translation/localization/sw.json +3 -3
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/{module/features/chatbot/components/Chat/Chat.d.ts → commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- 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/constants.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +4 -9
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +0 -20
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -18
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +2 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +2 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/{commonjs/features/chatbot/components/Chat/Chat.d.ts → module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- 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/constants.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +4 -9
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +0 -20
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -18
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +2 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts +2 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +60 -0
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +91 -0
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +2 -6
- package/src/features/chatbot/components/{Chat/Chat.tsx → ChatMessages/ChatbotMessages.tsx} +6 -10
- package/src/features/chatbot/components/Chatbot.tsx +2 -6
- package/src/features/chatbot/constants.ts +0 -7
- package/src/features/chatbot/index.ts +0 -2
- package/src/features/chatbot/model/ChatBotModel.ts +26 -44
- package/src/features/chatbot/model/ChatBotThreadManager.ts +9 -38
- package/src/features/chatbot/model/ChatbotApi.ts +0 -2
- package/src/features/chatbot/types/api.types.ts +4 -10
- package/src/features/chatbot/types/model.types.ts +0 -27
- package/src/features/chatbot/types/units.types.ts +0 -22
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +1 -7
- package/src/features/exampleSolution/assets/grid.webp +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +15 -9
- package/src/features/exampleSolution/components/QuestionSection.tsx +11 -7
- package/src/features/exampleSolution/components/SolutionSection.tsx +61 -28
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +5 -2
- package/src/features/exampleSolution/types.ts +2 -1
- package/src/shared/translation/localization/ca.json +2 -2
- package/src/shared/translation/localization/en.json +2 -2
- package/src/shared/translation/localization/gb.json +2 -2
- package/src/shared/translation/localization/sct.json +2 -2
- package/src/shared/translation/localization/sw.json +3 -3
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +0 -53
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js +0 -39
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -38
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +0 -140
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -142
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -44
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -105
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +0 -47
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js +0 -34
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -32
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +0 -132
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -134
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -38
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -97
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +0 -56
- package/src/features/chatbot/components/ChatInput/InputOption.tsx +0 -29
- package/src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx +0 -27
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -160
- package/src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx +0 -133
- package/src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx +0 -42
- package/src/features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx +0 -110
- package/src/features/exampleSolution/assets/grid.png +0 -0
|
@@ -12,9 +12,11 @@ import { SolutionSection } from "./SolutionSection.js";
|
|
|
12
12
|
import { useExampleSolution } from "../hooks/useExampleSolution.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
export const ExampleSolutionModalContent = ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
params: {
|
|
16
|
+
model,
|
|
17
|
+
payload,
|
|
18
|
+
cacheKey
|
|
19
|
+
}
|
|
18
20
|
}) => {
|
|
19
21
|
const {
|
|
20
22
|
result,
|
|
@@ -38,7 +40,8 @@ export const ExampleSolutionModalContent = ({
|
|
|
38
40
|
style: styles.content,
|
|
39
41
|
children: [/*#__PURE__*/_jsx(QuestionSection, {
|
|
40
42
|
status: status,
|
|
41
|
-
question: result?.question
|
|
43
|
+
question: result?.question,
|
|
44
|
+
renderKatexComponent: model.renderKatexComponent
|
|
42
45
|
}), /*#__PURE__*/_jsx(SolutionSection, {
|
|
43
46
|
status: status,
|
|
44
47
|
answer: result?.answer
|
|
@@ -72,8 +75,8 @@ const styles = StyleSheet.create({
|
|
|
72
75
|
},
|
|
73
76
|
lavaIconContainer: {
|
|
74
77
|
position: 'absolute',
|
|
75
|
-
bottom: -
|
|
76
|
-
right: -
|
|
78
|
+
bottom: -24,
|
|
79
|
+
right: -26
|
|
77
80
|
},
|
|
78
81
|
loaderContainer: {
|
|
79
82
|
paddingTop: 34,
|
|
@@ -84,8 +87,8 @@ const styles = StyleSheet.create({
|
|
|
84
87
|
},
|
|
85
88
|
messageBlock: {
|
|
86
89
|
position: 'absolute',
|
|
87
|
-
right:
|
|
88
|
-
bottom: -
|
|
90
|
+
right: 58,
|
|
91
|
+
bottom: -12
|
|
89
92
|
}
|
|
90
93
|
});
|
|
91
94
|
//# sourceMappingURL=ExampleSolutionModalContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","React","COLORS","HeadingVariants","SPACING","Typography","useUnit","$localization","MessageBlock","LavaIcon","QuestionSection","SolutionSection","useExampleSolution","jsx","_jsx","jsxs","_jsxs","ExampleSolutionModalContent","model","payload","cacheKey","result","status","localization","style","styles","container","children","align","variant","H2","color","NEUTRAL_9","exampleSolution","content","question","answer","messageBlock","lavaIconContainer","create","width","height","flex","flexDirection","marginTop","gap","solutionContainer","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","position","bottom","right","loaderContainer","paddingTop","backgroundColor","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AACzF,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,QAAQ,sCAA6B;AAC3D,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,QAAQ,QAAQ,eAAY;AAErC,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,kBAAkB,QAAQ,gCAA6B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","React","COLORS","HeadingVariants","SPACING","Typography","useUnit","$localization","MessageBlock","LavaIcon","QuestionSection","SolutionSection","useExampleSolution","jsx","_jsx","jsxs","_jsxs","ExampleSolutionModalContent","params","model","payload","cacheKey","result","status","localization","style","styles","container","children","align","variant","H2","color","NEUTRAL_9","exampleSolution","content","question","renderKatexComponent","answer","messageBlock","lavaIconContainer","create","width","height","flex","flexDirection","marginTop","gap","solutionContainer","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","position","bottom","right","loaderContainer","paddingTop","backgroundColor","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AACzF,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,QAAQ,sCAA6B;AAC3D,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,QAAQ,QAAQ,eAAY;AAErC,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,kBAAkB,QAAQ,gCAA6B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhE,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC1CC,MAAM,EAAE;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAS;AACH,CAAC,KAAK;EACtC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGX,kBAAkB,CAAC;IAAEO,KAAK;IAAEC,OAAO;IAAEC;EAAS,CAAC,CAAC;EAC3E,MAAMG,YAAY,GAAGlB,OAAO,CAACC,aAAa,CAAC;EAE3C,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,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAElD,MAAM,CAACmD;EACtB,CAAC;EACDb,iBAAiB,EAAE;IACjBc,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC,EAAE;IACXC,KAAK,EAAE,CAAC;EACV,CAAC;EACDC,eAAe,EAAE;IACfC,UAAU,EAAE,EAAE;IACdJ,QAAQ,EAAE,UAAU;IACpBZ,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdgB,eAAe,EAAEzD,MAAM,CAAC0D;EAC1B,CAAC;EACDrB,YAAY,EAAE;IACZe,QAAQ,EAAE,UAAU;IACpBE,KAAK,EAAE,EAAE;IACTD,MAAM,EAAE,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, View
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { COLORS, Loader, LoaderColor, SPACING
|
|
5
|
+
import { COLORS, Loader, LoaderColor, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import Animated, { FadeOut } from 'react-native-reanimated';
|
|
7
7
|
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
export const QuestionSection = ({
|
|
10
10
|
question,
|
|
11
|
-
status
|
|
11
|
+
status,
|
|
12
|
+
renderKatexComponent
|
|
12
13
|
}) => {
|
|
13
14
|
return /*#__PURE__*/_jsxs(View, {
|
|
14
15
|
style: styles.container,
|
|
15
|
-
children: [/*#__PURE__*/_jsx(
|
|
16
|
-
style: styles.
|
|
17
|
-
children:
|
|
18
|
-
children: question
|
|
19
|
-
})
|
|
16
|
+
children: [question && /*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: styles.katexContainer,
|
|
18
|
+
children: renderKatexComponent(question)
|
|
20
19
|
}), status === ExampleSolutionStatuses.LOADING && /*#__PURE__*/_jsx(Animated.View, {
|
|
21
20
|
exiting: FadeOut,
|
|
22
21
|
style: styles.loaderContainer,
|
|
@@ -31,12 +30,13 @@ const styles = StyleSheet.create({
|
|
|
31
30
|
container: {
|
|
32
31
|
flex: 1
|
|
33
32
|
},
|
|
34
|
-
|
|
33
|
+
katexContainer: {
|
|
35
34
|
flex: 1
|
|
36
35
|
},
|
|
37
36
|
loaderContainer: {
|
|
38
37
|
paddingTop: 34,
|
|
39
38
|
position: 'absolute',
|
|
39
|
+
zIndex: 100,
|
|
40
40
|
width: '100%',
|
|
41
41
|
height: '100%',
|
|
42
42
|
backgroundColor: COLORS.NEUTRAL_1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","React","COLORS","Loader","LoaderColor","SPACING","Animated","FadeOut","ExampleSolutionStatuses","jsx","_jsx","jsxs","_jsxs","QuestionSection","question","status","renderKatexComponent","style","styles","container","children","katexContainer","LOADING","exiting","loaderContainer","size","color","BLUE","create","flex","paddingTop","position","zIndex","width","height","backgroundColor","NEUTRAL_1","justifyContent","alignItems","errorContainer","padding","errorText","PRIMARY_RED","textAlign"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/QuestionSection.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,4BAA4B;AACjF,OAAOC,QAAQ,IAAIC,OAAO,QAAQ,yBAAyB;AAC3D,SAASC,uBAAuB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQtD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC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,KAAK,EAAExB,MAAM,CAACwC,WAAW;IACzBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,67 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, View, Image,
|
|
3
|
+
import { StyleSheet, View, Image, ImageBackground, ScrollView } from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import Animated, { FadeIn } from 'react-native-reanimated';
|
|
7
7
|
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
|
-
import gridImage from '../assets/grid.
|
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import gridImage from '../assets/grid.webp';
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const CONTAINER_SIZES = {
|
|
11
|
+
width: 489,
|
|
12
|
+
height: 543
|
|
13
|
+
};
|
|
14
|
+
const BORDER_WIDTH = 1;
|
|
10
15
|
const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage;
|
|
11
16
|
export const SolutionSection = ({
|
|
12
17
|
answer,
|
|
13
18
|
status
|
|
14
19
|
}) => {
|
|
15
20
|
const shouldShowAnswer = answer && (status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE);
|
|
16
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/_jsx(View, {
|
|
17
22
|
style: styles.container,
|
|
18
|
-
children:
|
|
19
|
-
source: {
|
|
20
|
-
uri: gridImagePath
|
|
21
|
-
},
|
|
22
|
-
style: [styles.gridImage, IS_WEB && styles.gridImageWeb]
|
|
23
|
-
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.ScrollView, {
|
|
23
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
24
24
|
style: styles.solutionScroll,
|
|
25
25
|
contentContainerStyle: styles.solutionScrollContent,
|
|
26
|
-
|
|
27
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
bounces: true,
|
|
27
|
+
children: IS_WEB ? /*#__PURE__*/_jsx(ImageBackground, {
|
|
28
|
+
resizeMode: "repeat",
|
|
29
|
+
style: [styles.gridImageWeb],
|
|
30
|
+
source: {
|
|
31
|
+
uri: gridImagePath
|
|
32
|
+
},
|
|
33
|
+
children: shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
34
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
35
|
+
style: styles.solutionText,
|
|
36
|
+
children: answer
|
|
37
|
+
})
|
|
38
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
39
|
+
children: [/*#__PURE__*/_jsx(ImageBackground, {
|
|
40
|
+
resizeMode: "repeat",
|
|
41
|
+
style: styles.gridImageRn,
|
|
42
|
+
source: {
|
|
43
|
+
uri: gridImagePath
|
|
44
|
+
}
|
|
45
|
+
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
46
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
47
|
+
style: styles.solutionText,
|
|
48
|
+
children: answer
|
|
49
|
+
})]
|
|
30
50
|
})
|
|
31
|
-
})
|
|
51
|
+
})
|
|
32
52
|
});
|
|
33
53
|
};
|
|
34
54
|
const styles = StyleSheet.create({
|
|
35
55
|
container: {
|
|
36
|
-
width:
|
|
56
|
+
width: CONTAINER_SIZES.width,
|
|
57
|
+
height: CONTAINER_SIZES.height,
|
|
37
58
|
overflow: 'hidden',
|
|
38
59
|
borderRadius: 8,
|
|
39
|
-
borderWidth:
|
|
60
|
+
borderWidth: BORDER_WIDTH,
|
|
40
61
|
borderColor: COLORS.NEUTRAL_5
|
|
41
62
|
},
|
|
42
|
-
|
|
63
|
+
gridImageRn: {
|
|
64
|
+
top: -327,
|
|
43
65
|
width: '100%',
|
|
44
|
-
height: '
|
|
45
|
-
|
|
46
|
-
aspectRatio: 28 / 8
|
|
66
|
+
height: '150%',
|
|
67
|
+
position: 'absolute'
|
|
47
68
|
},
|
|
48
69
|
gridImageWeb: {
|
|
49
|
-
transform: [{
|
|
50
|
-
scale: 3.5
|
|
51
|
-
}]
|
|
52
|
-
},
|
|
53
|
-
solutionScroll: {
|
|
54
|
-
position: 'absolute',
|
|
55
70
|
width: '100%',
|
|
56
71
|
height: '100%'
|
|
57
72
|
},
|
|
73
|
+
solutionScroll: {
|
|
74
|
+
flex: 1
|
|
75
|
+
},
|
|
58
76
|
solutionScrollContent: {
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
|
|
78
|
+
width: '100%'
|
|
61
79
|
},
|
|
62
80
|
solutionText: {
|
|
63
81
|
fontFamily: 'PlaypenSans-Light',
|
|
64
|
-
fontSize:
|
|
82
|
+
fontSize: 28,
|
|
83
|
+
marginHorizontal: SPACING[800],
|
|
84
|
+
marginVertical: SPACING[400]
|
|
65
85
|
}
|
|
66
86
|
});
|
|
67
87
|
//# sourceMappingURL=SolutionSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","Image","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","Image","ImageBackground","ScrollView","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CONTAINER_SIZES","width","height","BORDER_WIDTH","gridImagePath","resolveAssetSource","uri","SolutionSection","answer","status","shouldShowAnswer","DONE_DATA","CACHE","style","styles","container","children","solutionScroll","contentContainerStyle","solutionScrollContent","bounces","resizeMode","gridImageWeb","source","Text","entering","undefined","delay","duration","solutionText","gridImageRn","create","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","top","position","flex","minHeight","fontFamily","fontSize","marginHorizontal","marginVertical"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAEC,eAAe,EAAEC,UAAU,QAAQ,cAAc;AACnF,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AACpE,OAAOC,QAAQ,IAAIC,MAAM,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,OAAOC,SAAS,MAAM,qBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAO3C,MAAMC,eAAe,GAAG;EACtBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACV,CAAC;AACD,MAAMC,YAAY,GAAG,CAAC;AAEtB,MAAMC,aAAa,GAAG,CAAChB,MAAM,GAAGL,KAAK,CAACsB,kBAAkB,CAACZ,SAAS,CAAC,CAACa,GAAG,GAAGb,SAAS;AAEnF,OAAO,MAAMc,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAA6B,CAAC,KAAK;EAC3E,MAAMC,gBAAgB,GACpBF,MAAM,KACLC,MAAM,KAAKjB,uBAAuB,CAACmB,SAAS,IAAIF,MAAM,KAAKjB,uBAAuB,CAACoB,KAAK,CAAC;EAE5F,oBACEjB,IAAA,CAACb,IAAI;IAAC+B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5BrB,IAAA,CAACV,UAAU;MACT4B,KAAK,EAAEC,MAAM,CAACG,cAAe;MAC7BC,qBAAqB,EAAEJ,MAAM,CAACK,qBAAsB;MACpDC,OAAO;MAAAJ,QAAA,EAEN5B,MAAM,gBACLO,IAAA,CAACX,eAAe;QACdqC,UAAU,EAAC,QAAQ;QACnBR,KAAK,EAAE,CAACC,MAAM,CAACQ,YAAY,CAAE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M;IACdoC,QAAQ,EAAE;EACZ,CAAC;EACDhB,YAAY,EAAE;IACZrB,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDe,cAAc,EAAE;IACdsB,IAAI,EAAE;EACR,CAAC;EACDpB,qBAAqB,EAAE;IACrBqB,SAAS,EAAExC,eAAe,CAACE,MAAM,GAAGC,YAAY,GAAG,CAAC;IACpDF,KAAK,EAAE;EACT,CAAC;EACD4B,YAAY,EAAE;IACZY,UAAU,EAAE,mBAAmB;IAC/BC,QAAQ,EAAE,EAAE;IACZC,gBAAgB,EAAEtD,OAAO,CAAC,GAAG,CAAC;IAC9BuD,cAAc,EAAEvD,OAAO,CAAC,GAAG;EAC7B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,12 +6,14 @@ export class ExampleSolutionModel {
|
|
|
6
6
|
cache = new ExampleSolutionCache();
|
|
7
7
|
constructor({
|
|
8
8
|
api,
|
|
9
|
-
errorHandler
|
|
9
|
+
errorHandler,
|
|
10
|
+
renderKatexComponent
|
|
10
11
|
}) {
|
|
11
12
|
this.api = new ExampleSolutionsApi({
|
|
12
13
|
api,
|
|
13
14
|
errorHandler
|
|
14
15
|
});
|
|
16
|
+
this.renderKatexComponent = renderKatexComponent;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=ExampleSolution.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler","renderKatexComponent"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;EAIlDG,WAAWA,CAAC;IAAEC,GAAG;IAAEC,YAAY;IAAEC;EAAgD,CAAC,EAAE;IAClF,IAAI,CAACF,GAAG,GAAG,IAAIL,mBAAmB,CAAC;MAAEK,GAAG;MAAEC;IAAa,CAAC,CAAC;IACzD,IAAI,CAACC,oBAAoB,GAAGA,oBAAoB;EAClD;AACF","ignoreList":[]}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
16
|
-
"giveHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
16
|
-
"giveHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
16
|
-
"giveHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
16
|
-
"giveHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
13
|
"time.yearsAgo": "år sedan",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "Ge ledtråd",
|
|
16
|
-
"giveHint": "Ge ledtråd",
|
|
15
|
+
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
+
"giveHint": "Ge mig en ledtråd",
|
|
17
17
|
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
18
18
|
"errorMessage": "Något gick snett! Försök igen",
|
|
19
19
|
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"almostThere": "Nästan där"
|
|
26
26
|
},
|
|
27
27
|
"exampleSolution": {
|
|
28
|
-
"exampleSolution": "
|
|
28
|
+
"exampleSolution": "Lösningsexempel",
|
|
29
29
|
"letMeThink": "Låt mig tänka...",
|
|
30
30
|
"aha": "Aha!",
|
|
31
31
|
"errorMessage": "Något gick snett med att generera en exempellösning"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorScheme } from '../../types/style.types';
|
|
3
|
+
type AlternativesProps = {
|
|
4
|
+
onPressAlternative: (message: string, translatedMessage?: string) => void;
|
|
5
|
+
hasMessages: boolean;
|
|
6
|
+
isHintFeedback: boolean;
|
|
7
|
+
colorScheme?: ColorScheme;
|
|
8
|
+
};
|
|
9
|
+
export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, colorScheme, }: AlternativesProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Alternatives.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAGrD,KAAK,iBAAiB,GAAG;IACvB,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,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,sEAKtB,iBAAiB,sBA6BnB,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type HelpRequestOptionProps = {
|
|
3
|
+
onPress: () => void;
|
|
4
|
+
message: string;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
hoverColor?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const HelpRequestOption: ({ onPress, message, disabled, hoverColor, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=HelpRequestOption.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpRequestOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/HelpRequestOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAK1D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,iBAAiB,gDAK3B,sBAAsB,sBAyCxB,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageLoader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"MessageLoader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,KAAK,kBAAkB,GAAG;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,oBAAwC,kBAAkB,sBASnF,CAAA"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChatbotModel } from '../../model/ChatBotModel';
|
|
3
3
|
import { ColorScheme } from '../../types/style.types';
|
|
4
|
-
import { ChatInputMode } from '../../types/units.types';
|
|
5
4
|
type ChatbotMessagesProps = {
|
|
6
5
|
model: ChatbotModel;
|
|
7
6
|
isHintFeedback: boolean;
|
|
8
7
|
isTextToSpeechEnabled: boolean;
|
|
9
|
-
inputMode: ChatInputMode;
|
|
10
8
|
colorScheme?: ColorScheme;
|
|
11
9
|
};
|
|
12
|
-
export declare const
|
|
10
|
+
export declare const ChatbotMessages: ({ model, isHintFeedback, isTextToSpeechEnabled, colorScheme, }: ChatbotMessagesProps) => React.JSX.Element;
|
|
13
11
|
export {};
|
|
14
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=ChatbotMessages.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAIrC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAQD,eAAO,MAAM,eAAe,mEAKzB,oBAAoB,sBAwEtB,CAAA"}
|
|
@@ -2,7 +2,6 @@ import React, { ComponentType, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ChatbotModel } from '../model/ChatBotModel';
|
|
3
3
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
|
|
4
4
|
import { ColorScheme } from '../types/style.types';
|
|
5
|
-
import { ChatInputMode } from '../types/units.types';
|
|
6
5
|
type ChatbotProps = {
|
|
7
6
|
model: ChatbotModel;
|
|
8
7
|
isHintFeedback: boolean;
|
|
@@ -11,7 +10,6 @@ type ChatbotProps = {
|
|
|
11
10
|
voice: typeof DEFAULT_VOICE;
|
|
12
11
|
audioConfig: typeof AUDIO_CONFIG;
|
|
13
12
|
};
|
|
14
|
-
inputMode?: ChatInputMode;
|
|
15
13
|
ButtonWrapper: ComponentType<PropsWithChildren>;
|
|
16
14
|
iconSize?: {
|
|
17
15
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5C,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,OAAO,gHAQjB,YAAY,6BA8Bd,CAAA"}
|
|
@@ -29,24 +29,20 @@ export declare const MESSAGE_COLORS_MAP: {
|
|
|
29
29
|
blue: {
|
|
30
30
|
received: {
|
|
31
31
|
background: "#f2f2f4";
|
|
32
|
-
border: "#f2f2f4";
|
|
33
32
|
icon: ButtonColor;
|
|
34
33
|
};
|
|
35
34
|
sent: {
|
|
36
35
|
background: "#55abe0";
|
|
37
|
-
border: "#55abe0";
|
|
38
36
|
icon: ButtonColor;
|
|
39
37
|
};
|
|
40
38
|
};
|
|
41
39
|
yellow: {
|
|
42
40
|
received: {
|
|
43
41
|
background: "#f2f2f4";
|
|
44
|
-
border: "#f2f2f4";
|
|
45
42
|
icon: ButtonColor;
|
|
46
43
|
};
|
|
47
44
|
sent: {
|
|
48
45
|
background: "#ffae22";
|
|
49
|
-
border: "#ffae22";
|
|
50
46
|
icon: ButtonColor;
|
|
51
47
|
};
|
|
52
48
|
};
|
|
@@ -61,5 +57,4 @@ export declare const CONTROLS_COLORS_MAP: {
|
|
|
61
57
|
background: "#ffae22";
|
|
62
58
|
};
|
|
63
59
|
};
|
|
64
|
-
export declare const HOVER_ANIMATION_DURATION = 200;
|
|
65
60
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,4BAA4B,CAAA;AAKhE,eAAO,MAAM,YAAY;;;;CAIxB,CAAA;AAED,eAAO,MAAM,aAAa;;;CAGzB,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;CAgBhC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;CAErB,CAAA;AAEV,eAAO,MAAM,0BAA0B;;CAE7B,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;CAS/B,CAAA"}
|
|
@@ -5,7 +5,6 @@ export { MessageVariant, type ChatbotModelProps, type IChatDrawBoardAdapter, } f
|
|
|
5
5
|
export type { PostMessageResponse } from './types/api.types';
|
|
6
6
|
export { DefaultMessagesCreator } from './model/DefaultMessageCreator';
|
|
7
7
|
export type { ChatAnswer } from './types/units.types';
|
|
8
|
-
export { ChatInputMode } from './types/units.types';
|
|
9
8
|
export type { ConversationMessage } from './types/units.types';
|
|
10
9
|
export { ColorScheme } from './types/style.types';
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -28,10 +28,6 @@ export declare class ChatbotModel {
|
|
|
28
28
|
readonly setIsOpen: import("effector").EventCallable<boolean>;
|
|
29
29
|
readonly toggleOpen: import("effector").EventCallable<void>;
|
|
30
30
|
readonly $isOpen: import("effector").StoreWritable<boolean>;
|
|
31
|
-
readonly setIsTextInputFocused: import("effector").EventCallable<boolean>;
|
|
32
|
-
readonly $isTextInputFocused: import("effector").StoreWritable<boolean>;
|
|
33
|
-
readonly setTextInputValue: import("effector").EventCallable<string>;
|
|
34
|
-
readonly $textInputValue: import("effector").StoreWritable<string>;
|
|
35
31
|
readonly removeLastMessage: import("effector").EventCallable<void>;
|
|
36
32
|
private readonly setLastMessageKey;
|
|
37
33
|
readonly $lastMessageKey: import("effector").StoreWritable<string | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAClG,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,
|
|
1
|
+
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAClG,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EAEd,mBAAmB,EAEnB,sBAAsB,EACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AAExE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAGzD,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,qBAAa,YAAY;IACvB,SAAgB,WAAW,qBAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA4B;IAE5D,SAAgB,aAAa,uBAE3B;IACF,SAAgB,GAAG,EAAE,UAAU,CAAA;IAE/B,SAAgB,WAAW,EAAE,kBAAkB,CAAA;IAC/C,SAAgB,GAAG,EAAE,qBAAqB,CAAA;IAC1C,SAAgB,aAAa,EAAE,kBAAkB,CAAA;IAEjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;IACtD,SA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B;CAItC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ThreadItem } from './ThreadItem';
|
|
2
2
|
import { ChatHintPayload, ChatHintResponse, PostMessagePayload, PostMessageResponse } from '../types/api.types';
|
|
3
|
-
import { ChatbotMessages, IChatDrawBoardAdapter
|
|
3
|
+
import { ChatbotMessages, IChatDrawBoardAdapter } from '../types/model.types';
|
|
4
4
|
type ThreadManagerApi = {
|
|
5
5
|
getHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
|
|
6
|
-
sendMessage: (props: SendMessagePayload) => Promise<SendMessageResponse>;
|
|
7
6
|
};
|
|
8
7
|
type ChatBotThreadManagerProps = {
|
|
9
8
|
messagesLimit?: number;
|
|
@@ -17,18 +16,16 @@ export declare class ChatBotThreadManager {
|
|
|
17
16
|
private readonly threads;
|
|
18
17
|
private messagesLimit;
|
|
19
18
|
private currentKey;
|
|
20
|
-
private currentConversationId;
|
|
21
19
|
private readonly defaultMessages;
|
|
22
20
|
constructor({ drawBoardAdapter, api, messagesLimit, messages, }: ChatBotThreadManagerProps);
|
|
23
21
|
private getThreadItem;
|
|
24
22
|
setDrawBoardAdapter(adapter: IChatDrawBoardAdapter): void;
|
|
25
|
-
readonly postMessage: ({ problemAnswer, problem, answer, language, imageAltText,
|
|
23
|
+
readonly postMessage: ({ problemAnswer, problem, answer, language, imageAltText, }: PostMessagePayload) => Promise<PostMessageResponse>;
|
|
26
24
|
get(key: string): ThreadItem | undefined;
|
|
27
25
|
reset(key?: string): void;
|
|
28
26
|
setMessagesLimit(limit: number): void;
|
|
29
27
|
setApi(api: ThreadManagerApi): this;
|
|
30
28
|
setCurrentKey(key: string): void;
|
|
31
|
-
setCurrentConversationId(id: string): void;
|
|
32
29
|
}
|
|
33
30
|
export {};
|
|
34
31
|
//# sourceMappingURL=ChatBotThreadManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotThreadManager.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotThreadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatBotThreadManager.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotThreadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAG7E,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;CAC/D,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACxC,QAAQ,EAAE,eAAe,CAAA;IACzB,GAAG,CAAC,EAAE,gBAAgB,CAAA;CACvB,CAAA;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,GAAG,CAAgC;IAC3C,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IAExD,OAAO,CAAC,aAAa,CAAA;IACrB,OAAO,CAAC,UAAU,CAAK;IAEvB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAA;gBAEb,EACjB,gBAAgB,EAChB,GAAG,EACH,aAA6D,EAC7D,QAAQ,GACT,EAAE,yBAAyB;YAOd,aAAa;IAkBpB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB;IAIzD,SAAgB,WAAW,gEAMxB,kBAAkB,KAAG,OAAO,CAAC,mBAAmB,CAAC,CA2BnD;IAEM,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM;IAQlB,gBAAgB,CAAC,KAAK,EAAE,MAAM;IAI9B,MAAM,CAAC,GAAG,EAAE,gBAAgB;IAK5B,aAAa,CAAC,GAAG,EAAE,MAAM;CAGjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatbotApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatbotApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAGpF,qBAAa,UAAU;IACrB,SAAgB,aAAa,6KAAA;IAC7B,SAAgB,iBAAiB,8IAAA;IACjC,SAAgB,eAAe,oFAAA;IAC/B,SAAgB,kBAAkB,kJAAA;
|
|
1
|
+
{"version":3,"file":"ChatbotApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatbotApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAGpF,qBAAa,UAAU;IACrB,SAAgB,aAAa,6KAAA;IAC7B,SAAgB,iBAAiB,8IAAA;IACjC,SAAgB,eAAe,oFAAA;IAC/B,SAAgB,kBAAkB,kJAAA;IAElC,SAAgB,WAAW,iLAAA;gBAEf,GAAG,EAAE,kBAAkB;CAyBpC"}
|
|
@@ -3,15 +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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
options: {
|
|
9
|
+
default: ChatAnswer[];
|
|
10
|
+
hints: ChatAnswer[];
|
|
11
|
+
};
|
|
15
12
|
};
|
|
16
13
|
export type PostMessagePayload = {
|
|
17
14
|
language: string;
|
|
@@ -19,8 +16,6 @@ export type PostMessagePayload = {
|
|
|
19
16
|
answer?: string | string[];
|
|
20
17
|
problem: string;
|
|
21
18
|
imageAltText?: string;
|
|
22
|
-
customText?: string;
|
|
23
|
-
message?: string;
|
|
24
19
|
};
|
|
25
20
|
export type PostMessageResponse = {
|
|
26
21
|
message: string;
|