@magmamath/students-features 0.6.14-rc.25 → 0.6.14-rc.3
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/Chat/Chat.js +10 -1
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +24 -45
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js +39 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +38 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +123 -38
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +47 -55
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +9 -31
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +4 -20
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +4 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +1 -75
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +15 -50
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +16 -10
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatbotTranslation.js → translation.js} +1 -29
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/model.types.js +1 -6
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +3 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +11 -18
- 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 +29 -55
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +1 -3
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/commonjs/shared/hooks/useKeyDownListener.js +2 -3
- package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -2
- package/dist/commonjs/shared/translation/localization/en.json +2 -3
- package/dist/commonjs/shared/translation/localization/gb.json +1 -2
- package/dist/commonjs/shared/translation/localization/sct.json +1 -2
- package/dist/commonjs/shared/translation/localization/sw.json +2 -3
- package/dist/module/features/chatbot/components/Chat/Chat.js +10 -1
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +23 -43
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js +34 -0
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +32 -0
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +122 -38
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +46 -55
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +9 -31
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +5 -21
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +4 -1
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +0 -71
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +15 -50
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +16 -10
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatbotTranslation.js → translation.js} +1 -29
- package/dist/module/features/chatbot/model/translation.js.map +1 -0
- package/dist/module/features/chatbot/types/model.types.js +0 -5
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/units.types.js.map +1 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +3 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +12 -19
- 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 +31 -57
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +1 -3
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/module/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/module/shared/hooks/useKeyDownListener.js +2 -3
- package/dist/module/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -2
- package/dist/module/shared/translation/localization/en.json +2 -3
- package/dist/module/shared/translation/localization/gb.json +1 -2
- package/dist/module/shared/translation/localization/sct.json +1 -2
- package/dist/module/shared/translation/localization/sw.json +2 -3
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +4 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts +2 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +10 -8
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +3 -9
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +4 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +11 -6
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatbotTranslation.d.ts → translation.d.ts} +2 -3
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +1 -23
- 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 +2 -28
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +14 -1
- 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 +1 -5
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +1 -2
- 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 +2 -3
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +1 -2
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyDownListener.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts +1 -1
- package/dist/typescript/commonjs/shared/hooks/useKeyboard.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -5
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -2
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +4 -2
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts +2 -7
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +10 -8
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +3 -9
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +4 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +11 -6
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatbotTranslation.d.ts → translation.d.ts} +2 -3
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +1 -23
- 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 +2 -28
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +14 -1
- 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 +1 -5
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +1 -2
- 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 +2 -3
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts +1 -2
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -1
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts +1 -1
- package/dist/typescript/module/shared/hooks/useKeyDownListener.d.ts.map +1 -1
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts +1 -1
- package/dist/typescript/module/shared/hooks/useKeyboard.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -5
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -2
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/features/chatbot/components/Chat/Chat.tsx +18 -9
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +30 -62
- package/src/features/chatbot/components/ChatInput/InputOption.tsx +29 -0
- package/src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx +32 -0
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +189 -95
- package/src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx +41 -79
- package/src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx +11 -40
- package/src/features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx +8 -36
- package/src/features/chatbot/components/Chatbot.tsx +2 -0
- package/src/features/chatbot/helpers.ts +1 -70
- package/src/features/chatbot/model/ChatBotModel.ts +42 -83
- package/src/features/chatbot/model/ChatBotThreadManager.ts +16 -14
- package/src/features/chatbot/model/{ChatbotTranslation.ts → translation.ts} +2 -32
- package/src/features/chatbot/types/api.types.ts +1 -25
- package/src/features/chatbot/types/model.types.ts +1 -35
- package/src/features/chatbot/types/translation.types.ts +0 -6
- package/src/features/chatbot/types/units.types.ts +17 -1
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +7 -1
- package/src/features/exampleSolution/assets/grid.png +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +12 -24
- package/src/features/exampleSolution/components/QuestionSection.tsx +7 -11
- package/src/features/exampleSolution/components/SolutionSection.tsx +29 -72
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +2 -5
- package/src/features/exampleSolution/types.ts +1 -2
- package/src/features/formulaSheet/components/FormulaSheet.tsx +4 -6
- package/src/shared/hooks/useKeyDownListener.ts +1 -3
- package/src/shared/translation/localization/ca.json +1 -2
- package/src/shared/translation/localization/en.json +2 -3
- package/src/shared/translation/localization/gb.json +1 -2
- package/src/shared/translation/localization/sct.json +1 -2
- package/src/shared/translation/localization/sw.json +2 -3
- package/dist/commonjs/features/chatbot/model/ChatBotTextInput.js +0 -16
- package/dist/commonjs/features/chatbot/model/ChatBotTextInput.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/module/features/chatbot/model/ChatBotTextInput.js +0 -11
- package/dist/module/features/chatbot/model/ChatBotTextInput.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotTextInput.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotTextInput.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotTranslation.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotTextInput.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/model/ChatBotTextInput.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotTranslation.d.ts.map +0 -1
- package/src/features/chatbot/model/ChatBotTextInput.ts +0 -10
- package/src/features/exampleSolution/assets/grid.webp +0 -0
|
@@ -24,6 +24,7 @@ const Chat = ({
|
|
|
24
24
|
model,
|
|
25
25
|
isHintFeedback,
|
|
26
26
|
isTextToSpeechEnabled,
|
|
27
|
+
inputMode,
|
|
27
28
|
colorScheme = _styleTypes.ColorScheme.Blue
|
|
28
29
|
}) => {
|
|
29
30
|
const dimensions = (0, _reactNative.useWindowDimensions)();
|
|
@@ -40,6 +41,12 @@ const Chat = ({
|
|
|
40
41
|
}) => messages);
|
|
41
42
|
const lastMessageId = messages.at(-1)?.id;
|
|
42
43
|
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
44
|
+
const askChatForHelp = (message, translatedMessage) => {
|
|
45
|
+
void model.sendHelpRequestFx({
|
|
46
|
+
message,
|
|
47
|
+
translatedMessage
|
|
48
|
+
});
|
|
49
|
+
};
|
|
43
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
44
51
|
style: [styles.container, {
|
|
45
52
|
maxHeight: MAX_HEIGHT
|
|
@@ -74,9 +81,11 @@ const Chat = ({
|
|
|
74
81
|
colorScheme: colorScheme
|
|
75
82
|
})]
|
|
76
83
|
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatInput.ChatInput, {
|
|
84
|
+
onPressAlternative: askChatForHelp,
|
|
85
|
+
hasMessages: messages.length > 1,
|
|
77
86
|
isHintFeedback: isHintFeedback,
|
|
78
87
|
colorScheme: colorScheme,
|
|
79
|
-
|
|
88
|
+
inputMode: inputMode
|
|
80
89
|
})]
|
|
81
90
|
})
|
|
82
91
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_ChatInput","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","Chat","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_ChatInput","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","Chat","model","isHintFeedback","isTextToSpeechEnabled","inputMode","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","withIcon","isOwnMessage","variant","MessageVariant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","MessageLoader","ChatInput","onPressAlternative","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Chat/Chat.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAqD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,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,EAAEzD;UACZ;QAAE,GAbGuB,OAAO,CAACJ,EAcd,CACF,CAAC,EAEDtB,oBAAoB,iBAAI,IAAAzC,WAAA,CAAAqE,GAAA,EAACzE,cAAA,CAAA0G,aAAa;UAACvE,WAAW,EAAEA;QAAY,CAAE,CAAC;MAAA,CAChE,CACP,EAEAO,MAAM,iBACL,IAAAtC,WAAA,CAAAqE,GAAA,EAACxE,UAAA,CAAA0G,SAAS;QACRC,kBAAkB,EAAEtC,cAAe;QACnCuC,WAAW,EAAE/C,QAAQ,CAACgD,MAAM,GAAG,CAAE;QACjC9E,cAAc,EAAEA,cAAe;QAC/BG,WAAW,EAAEA,WAAY;QACzBD,SAAS,EAAEA;MAAU,CACtB,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAAA6E,OAAA,CAAAjF,IAAA,GAAAA,IAAA;AAED,MAAM8C,MAAM,GAAGoC,uBAAU,CAACC,MAAM,CAAC;EAC/BpC,SAAS,EAAE;IACTqC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACV/C,MAAM,EAAE;EACV,CAAC;EACDe,IAAI,EAAE;IACJ+B,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD5B,GAAG,EAAE;IACHwB,IAAI,EAAE,CAAC;IACPxB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,25 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ChatInput = void 0;
|
|
7
|
-
var _react =
|
|
8
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
9
|
-
var _reactNative = require("react-native");
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
8
|
var _effectorReact = require("effector-react");
|
|
11
9
|
var _ChatBotModelContext = require("../../context/ChatBotModelContext.js");
|
|
12
10
|
var _styleTypes = require("../../types/style.types.js");
|
|
13
|
-
var
|
|
14
|
-
var
|
|
11
|
+
var _unitsTypes = require("../../types/units.types.js");
|
|
12
|
+
var _InputOption = require("./InputOption.js");
|
|
13
|
+
var _InputOptionWithTextArea = require("./InputOptionWithTextArea.js");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function
|
|
17
|
-
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
const chatInputVariant = {
|
|
17
|
+
[_unitsTypes.ChatInputMode.Option]: _InputOption.InputOption,
|
|
18
|
+
[_unitsTypes.ChatInputMode.FreeText]: _InputOptionWithTextArea.InputOptionWithTextArea
|
|
19
|
+
};
|
|
18
20
|
const ChatInput = ({
|
|
19
|
-
|
|
21
|
+
onPressAlternative,
|
|
20
22
|
hasMessages,
|
|
23
|
+
isHintFeedback,
|
|
24
|
+
inputMode,
|
|
21
25
|
colorScheme = _styleTypes.ColorScheme.Blue
|
|
22
26
|
}) => {
|
|
23
27
|
const model = (0, _ChatBotModelContext.useChatModel)();
|
|
24
|
-
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
25
28
|
const isTranslated = (0, _effectorReact.useUnit)(model.translation.$isTranslated);
|
|
29
|
+
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
26
30
|
const isTranslationPending = (0, _effectorReact.useUnit)(model.translation.translateAllMessagesFx.pending);
|
|
27
31
|
const isHelpRequestPending = (0, _effectorReact.useUnit)(model.sendHelpRequestFx.pending);
|
|
28
32
|
const lastMessageOptions = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
@@ -31,44 +35,19 @@ const ChatInput = ({
|
|
|
31
35
|
const lastMessage = messages.at(-1);
|
|
32
36
|
return lastMessage?.options ?? [];
|
|
33
37
|
});
|
|
34
|
-
const
|
|
38
|
+
const availableOption = (() => {
|
|
35
39
|
if (hasMessages && lastMessageOptions.length) return lastMessageOptions[0];
|
|
36
|
-
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, [option.text, option.translatedText]);
|
|
47
|
-
const shouldDisableInput = isHelpRequestPending || hasMessages && lastMessageOptions.length === 0;
|
|
48
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
49
|
-
style: styles.container,
|
|
50
|
-
children: _reactNativeUi.IS_WEB && alternatives?.isOpenChatEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeTextInputBlock.FreeTextInputBlock, {
|
|
51
|
-
optionLabel: optionLabel,
|
|
52
|
-
onOptionPress: sendMessage,
|
|
53
|
-
disabled: shouldDisableInput,
|
|
54
|
-
colorScheme: colorScheme
|
|
55
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_RequestHintButton.RequestHintButton, {
|
|
56
|
-
onPress: sendMessage,
|
|
57
|
-
label: optionLabel,
|
|
58
|
-
disabled: shouldDisableInput,
|
|
59
|
-
colorScheme: colorScheme,
|
|
60
|
-
variant: _RequestHintButton.HintButtonVariant.Default
|
|
61
|
-
})
|
|
40
|
+
if (isHintFeedback && alternatives?.options.hints) return alternatives?.options.hints[0];
|
|
41
|
+
return alternatives?.options.default[0] ?? null;
|
|
42
|
+
})();
|
|
43
|
+
const buttonLabel = (isTranslated && !isTranslationPending ? availableOption?.translatedText : availableOption?.text) ?? '';
|
|
44
|
+
const Component = chatInputVariant[inputMode];
|
|
45
|
+
return availableOption?.text && /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
46
|
+
message: buttonLabel,
|
|
47
|
+
onPress: () => onPressAlternative(availableOption.text, availableOption.translatedText),
|
|
48
|
+
disabled: isHelpRequestPending || hasMessages && lastMessageOptions.length === 0,
|
|
49
|
+
colorScheme: colorScheme
|
|
62
50
|
});
|
|
63
51
|
};
|
|
64
52
|
exports.ChatInput = ChatInput;
|
|
65
|
-
const styles = _reactNative.StyleSheet.create({
|
|
66
|
-
container: {
|
|
67
|
-
flex: 1,
|
|
68
|
-
width: 305,
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
marginVertical: 8
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
53
|
//# sourceMappingURL=ChatInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_ChatBotModelContext","_styleTypes","_unitsTypes","_InputOption","_InputOptionWithTextArea","_jsxRuntime","e","__esModule","default","chatInputVariant","ChatInputMode","Option","InputOption","FreeText","InputOptionWithTextArea","ChatInput","onPressAlternative","hasMessages","isHintFeedback","inputMode","colorScheme","ColorScheme","Blue","model","useChatModel","isTranslated","useUnit","translation","$isTranslated","alternatives","$alternatives","isTranslationPending","translateAllMessagesFx","pending","isHelpRequestPending","sendHelpRequestFx","lastMessageOptions","useStoreMap","$currentChatData","messages","lastMessage","at","options","availableOption","length","hints","buttonLabel","translatedText","text","Component","jsx","message","onPress","disabled","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/ChatInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,wBAAA,GAAAN,OAAA;AAAmE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnE,MAAMG,gBAAsE,GAAG;EAC7E,CAACC,yB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rB,YAAY,IAAI,CAACM,oBAAoB,GAClCY,eAAe,EAAEI,cAAc,GAC/BJ,eAAe,EAAEK,IAAI,KAAK,EAAE;EAElC,MAAMC,SAAS,GAAGxC,gBAAgB,CAACU,SAAS,CAAC;EAE7C,OACEwB,eAAe,EAAEK,IAAI,iBACnB,IAAA3C,WAAA,CAAA6C,GAAA,EAACD,SAAS;IACRE,OAAO,EAAEL,WAAY;IACrBM,OAAO,EAAEA,CAAA,KAAMpC,kBAAkB,CAAC2B,eAAe,CAACK,IAAI,EAAEL,eAAe,CAACI,cAAc,CAAE;IACxFM,QAAQ,EAAEnB,oBAAoB,IAAKjB,WAAW,IAAImB,kBAAkB,CAACQ,MAAM,KAAK,CAAG;IACnFxB,WAAW,EAAEA;EAAY,CAC1B,CACF;AAEL,CAAC;AAAAkC,OAAA,CAAAvC,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InputOption = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _RequestHintButton = require("./RequestHintButton.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const InputOption = ({
|
|
13
|
+
message,
|
|
14
|
+
onPress,
|
|
15
|
+
colorScheme,
|
|
16
|
+
disabled
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
19
|
+
style: styles.container,
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RequestHintButton.RequestHintButton, {
|
|
21
|
+
onPress: onPress,
|
|
22
|
+
message: message,
|
|
23
|
+
disabled: disabled,
|
|
24
|
+
colorScheme: colorScheme,
|
|
25
|
+
variant: _RequestHintButton.OptionButtonVariant.Default
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.InputOption = InputOption;
|
|
30
|
+
const styles = _reactNative.StyleSheet.create({
|
|
31
|
+
container: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
width: 305,
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
marginVertical: 8
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=InputOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_RequestHintButton","_jsxRuntime","e","__esModule","default","InputOption","message","onPress","colorScheme","disabled","jsx","View","style","styles","container","children","RequestHintButton","variant","OptionButtonVariant","Default","exports","StyleSheet","create","flex","width","alignItems","justifyContent","marginVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/InputOption.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,kBAAA,GAAAH,OAAA;AAAyD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGlD,MAAMG,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAEC,OAAO;EAAEC,WAAW;EAAEC;AAAyB,CAAC,KAAK;EAC1F,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACd,YAAA,CAAAe,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAd,WAAA,CAAAS,GAAA,EAACV,kBAAA,CAAAgB,iBAAiB;MAChBT,OAAO,EAAEA,OAAQ;MACjBD,OAAO,EAAEA,OAAQ;MACjBG,QAAQ,EAAEA,QAAS;MACnBD,WAAW,EAAEA,WAAY;MACzBS,OAAO,EAAEC,sCAAmB,CAACC;IAAQ,CACtC;EAAC,CACE,CAAC;AAEX,CAAC;AAAAC,OAAA,CAAAf,WAAA,GAAAA,WAAA;AAED,MAAMQ,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InputOptionWithTextArea = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _FreeTextInputBlock = require("./freeText/FreeTextInputBlock.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const InputOptionWithTextArea = ({
|
|
13
|
+
message,
|
|
14
|
+
disabled,
|
|
15
|
+
onPress,
|
|
16
|
+
colorScheme
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
19
|
+
style: styles.container,
|
|
20
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FreeTextInputBlock.FreeTextInputBlock, {
|
|
21
|
+
message: message,
|
|
22
|
+
onPress: onPress,
|
|
23
|
+
disabled: disabled,
|
|
24
|
+
colorScheme: colorScheme
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
exports.InputOptionWithTextArea = InputOptionWithTextArea;
|
|
29
|
+
const styles = _reactNative.StyleSheet.create({
|
|
30
|
+
container: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
width: 305,
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
marginVertical: 8
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=InputOptionWithTextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_FreeTextInputBlock","_jsxRuntime","e","__esModule","default","InputOptionWithTextArea","message","disabled","onPress","colorScheme","jsx","View","style","styles","container","children","FreeTextInputBlock","exports","StyleSheet","create","flex","width","alignItems","justifyContent","marginVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,mBAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3D,MAAMG,uBAAuB,GAAGA,CAAC;EACtCC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC;AACc,CAAC,KAAK;EACpB,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACd,YAAA,CAAAe,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAd,WAAA,CAAAS,GAAA,EAACV,mBAAA,CAAAgB,kBAAkB;MACjBV,OAAO,EAAEA,OAAQ;MACjBE,OAAO,EAAEA,OAAQ;MACjBD,QAAQ,EAAEA,QAAS;MACnBE,WAAW,EAAEA;IAAY,CAC1B;EAAC,CACE,CAAC;AAEX,CAAC;AAAAQ,OAAA,CAAAZ,uBAAA,GAAAA,uBAAA;AAED,MAAMQ,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.RequestHintButton = exports.
|
|
6
|
+
exports.RequestHintButton = exports.OptionButtonVariant = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
8
|
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
10
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
11
|
var _studentsFeatures = require("@magmamath/students-features");
|
|
@@ -13,38 +13,129 @@ var _constants = require("../../constants.js");
|
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
// import React, { useEffect, useRef, useState } from 'react'
|
|
18
|
+
// import { Animated, Pressable, StyleSheet } from 'react-native'
|
|
19
|
+
// import { ArrowUpIcon, COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui'
|
|
20
|
+
//
|
|
21
|
+
// type HelpRequestOptionProps = {
|
|
22
|
+
// onPress: () => void
|
|
23
|
+
// message: string
|
|
24
|
+
// disabled: boolean
|
|
25
|
+
// hoverColor?: string
|
|
26
|
+
// }
|
|
27
|
+
//
|
|
28
|
+
// export const HelpRequestButton = ({
|
|
29
|
+
// onPress,
|
|
30
|
+
// message,
|
|
31
|
+
// disabled = false,
|
|
32
|
+
// hoverColor = COLORS.PRIMARY_BLUE,
|
|
33
|
+
// }: HelpRequestOptionProps) => {
|
|
34
|
+
// const [isHovered, setIsHovered] = useState(false)
|
|
35
|
+
// const hoverAnim = useRef(new Animated.Value(0)).current
|
|
36
|
+
//
|
|
37
|
+
// const backgroundColor = hoverAnim.interpolate({
|
|
38
|
+
// inputRange: [0, 1],
|
|
39
|
+
// outputRange: [COLORS.NEUTRAL_1, hoverColor],
|
|
40
|
+
// })
|
|
41
|
+
// const textColor = hoverAnim.interpolate({
|
|
42
|
+
// inputRange: [0, 1],
|
|
43
|
+
// outputRange: [COLORS.NEUTRAL_10, COLORS.NEUTRAL_1],
|
|
44
|
+
// })
|
|
45
|
+
//
|
|
46
|
+
// useEffect(() => {
|
|
47
|
+
// Animated.timing(hoverAnim, {
|
|
48
|
+
// toValue: isHovered ? 1 : 0,
|
|
49
|
+
// duration: 200,
|
|
50
|
+
// useNativeDriver: false,
|
|
51
|
+
// }).start()
|
|
52
|
+
// }, [isHovered, hoverAnim])
|
|
53
|
+
//
|
|
54
|
+
// return (
|
|
55
|
+
// <Pressable
|
|
56
|
+
// onHoverIn={() => setIsHovered(true)}
|
|
57
|
+
// onHoverOut={() => setIsHovered(false)}
|
|
58
|
+
// onPress={onPress}
|
|
59
|
+
// style={styles.button}
|
|
60
|
+
// disabled={disabled}
|
|
61
|
+
// accessibilityState={{ disabled }}
|
|
62
|
+
// accessibilityRole="button"
|
|
63
|
+
// >
|
|
64
|
+
// <Animated.View
|
|
65
|
+
// style={[styles.textWrapper, { backgroundColor, borderColor: isHovered ? backgroundColor: COLORS.PRIMARY_BLUE }]}
|
|
66
|
+
// >
|
|
67
|
+
// <Animated.Text numberOfLines={1} style={[styles.text, { color: textColor }]}>
|
|
68
|
+
// I need a hint
|
|
69
|
+
// </Animated.Text>
|
|
70
|
+
// <ArrowUpIcon color={isHovered ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_10} />
|
|
71
|
+
// </Animated.View>
|
|
72
|
+
// </Pressable>
|
|
73
|
+
// )
|
|
74
|
+
// }
|
|
75
|
+
//
|
|
76
|
+
// const styles = StyleSheet.create({
|
|
77
|
+
// button: {
|
|
78
|
+
// flexDirection: 'row',
|
|
79
|
+
// alignItems: 'flex-end',
|
|
80
|
+
// justifyContent: 'space-between',
|
|
81
|
+
// width: '100%',
|
|
82
|
+
// },
|
|
83
|
+
// text: {
|
|
84
|
+
// fontSize: 18,
|
|
85
|
+
// fontWeight: 400,
|
|
86
|
+
// fontFamily: FONT_FAMILY.buenosAires,
|
|
87
|
+
// color: COLORS.NEUTRAL_10,
|
|
88
|
+
// },
|
|
89
|
+
// textWrapper: {
|
|
90
|
+
// flex: 1,
|
|
91
|
+
// flexDirection: 'row',
|
|
92
|
+
// alignItems: 'center',
|
|
93
|
+
// justifyContent: 'space-between',
|
|
94
|
+
// maxWidth: 163,
|
|
95
|
+
// paddingHorizontal: SPACING[400],
|
|
96
|
+
// paddingVertical: SPACING[200],
|
|
97
|
+
// borderWidth: 1,
|
|
98
|
+
// borderRadius: 48,
|
|
99
|
+
// elevation: 3,
|
|
100
|
+
// shadowColor: '#333',
|
|
101
|
+
// shadowOffset: { width: 0, height: 1 },
|
|
102
|
+
// shadowOpacity: 0.25,
|
|
103
|
+
// shadowRadius: 3,
|
|
104
|
+
// backgroundColor: COLORS.NEUTRAL_1,
|
|
105
|
+
// borderColor: COLORS.PRIMARY_BLUE,
|
|
106
|
+
// },
|
|
107
|
+
// })
|
|
108
|
+
let OptionButtonVariant = exports.OptionButtonVariant = /*#__PURE__*/function (OptionButtonVariant) {
|
|
109
|
+
OptionButtonVariant["Default"] = "default";
|
|
110
|
+
OptionButtonVariant["Short"] = "short";
|
|
111
|
+
return OptionButtonVariant;
|
|
20
112
|
}({});
|
|
21
|
-
const HOVER_ANIMATION_DURATION = 200;
|
|
22
113
|
const REQUEST_HINT_BUTTON = {
|
|
23
|
-
[
|
|
24
|
-
|
|
25
|
-
|
|
114
|
+
[OptionButtonVariant.Default]: {
|
|
115
|
+
WIDTH: 305,
|
|
116
|
+
FONT_SIZE: 20
|
|
26
117
|
},
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
118
|
+
[OptionButtonVariant.Short]: {
|
|
119
|
+
WIDTH: 163,
|
|
120
|
+
FONT_SIZE: 18
|
|
30
121
|
}
|
|
31
122
|
};
|
|
32
|
-
const RequestHintButton =
|
|
123
|
+
const RequestHintButton = ({
|
|
33
124
|
onPress,
|
|
34
|
-
|
|
125
|
+
message,
|
|
35
126
|
disabled = false,
|
|
36
127
|
colorScheme = _studentsFeatures.ColorScheme.Blue,
|
|
37
|
-
variant =
|
|
128
|
+
variant = OptionButtonVariant.Default
|
|
38
129
|
}) => {
|
|
39
130
|
const hoverSv = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
40
131
|
const onHoverIn = () => {
|
|
41
132
|
if (!disabled) hoverSv.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
42
|
-
duration:
|
|
133
|
+
duration: 200
|
|
43
134
|
});
|
|
44
135
|
};
|
|
45
136
|
const onHoverOut = () => {
|
|
46
137
|
if (!disabled) hoverSv.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
47
|
-
duration:
|
|
138
|
+
duration: 200
|
|
48
139
|
});
|
|
49
140
|
};
|
|
50
141
|
const animatedTextContainerStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
@@ -54,7 +145,7 @@ const RequestHintButton = exports.RequestHintButton = /*#__PURE__*/(0, _react.me
|
|
|
54
145
|
borderColor: _reactNativeUi.COLORS.NEUTRAL_5
|
|
55
146
|
};
|
|
56
147
|
}
|
|
57
|
-
const defaultBorderColor = variant ===
|
|
148
|
+
const defaultBorderColor = variant === OptionButtonVariant.Default ? _reactNativeUi.COLORS.NEUTRAL_1 : _constants.MESSAGE_COLORS_MAP[colorScheme].sent.border;
|
|
58
149
|
return {
|
|
59
150
|
backgroundColor: (0, _reactNativeReanimated.interpolateColor)(hoverSv.value, [0, 1], [_reactNativeUi.COLORS.NEUTRAL_1, _constants.MESSAGE_COLORS_MAP[colorScheme].sent.background]),
|
|
60
151
|
borderColor: (0, _reactNativeReanimated.interpolateColor)(hoverSv.value, [0, 1], [defaultBorderColor, _constants.MESSAGE_COLORS_MAP[colorScheme].sent.border])
|
|
@@ -68,18 +159,14 @@ const RequestHintButton = exports.RequestHintButton = /*#__PURE__*/(0, _react.me
|
|
|
68
159
|
color: (0, _reactNativeReanimated.interpolateColor)(hoverSv.value, [0, 1], [_reactNativeUi.COLORS.NEUTRAL_10, _reactNativeUi.COLORS.NEUTRAL_1])
|
|
69
160
|
};
|
|
70
161
|
}, [hoverSv, disabled]);
|
|
71
|
-
const iconColor = disabled ? _reactNativeUi.COLORS.NEUTRAL_5 : 'currentColor';
|
|
72
|
-
const {
|
|
73
|
-
width,
|
|
74
|
-
fontSize
|
|
75
|
-
} = REQUEST_HINT_BUTTON[variant];
|
|
76
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
77
163
|
onHoverIn: onHoverIn,
|
|
78
164
|
onHoverOut: onHoverOut,
|
|
79
165
|
onPress: onPress,
|
|
80
166
|
style: [styles.button, {
|
|
81
|
-
cursor: disabled ? 'auto' : 'pointer'
|
|
82
|
-
|
|
167
|
+
cursor: disabled ? 'auto' : 'pointer'
|
|
168
|
+
}, {
|
|
169
|
+
width: REQUEST_HINT_BUTTON[variant].WIDTH
|
|
83
170
|
}],
|
|
84
171
|
disabled: disabled,
|
|
85
172
|
accessibilityState: {
|
|
@@ -91,22 +178,23 @@ const RequestHintButton = exports.RequestHintButton = /*#__PURE__*/(0, _react.me
|
|
|
91
178
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.Text, {
|
|
92
179
|
numberOfLines: 1,
|
|
93
180
|
style: [styles.text, animatedTextStyle, {
|
|
94
|
-
fontSize
|
|
181
|
+
fontSize: REQUEST_HINT_BUTTON[variant].FONT_SIZE
|
|
95
182
|
}],
|
|
96
|
-
children:
|
|
183
|
+
children: message
|
|
97
184
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.Text, {
|
|
98
|
-
style:
|
|
99
|
-
children: variant ===
|
|
100
|
-
color:
|
|
185
|
+
style: animatedTextStyle,
|
|
186
|
+
children: variant === OptionButtonVariant.Default ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ArrowRightIcon, {
|
|
187
|
+
color: 'currentColor',
|
|
101
188
|
size: 16
|
|
102
189
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ArrowUpIcon, {
|
|
103
|
-
color:
|
|
190
|
+
color: 'currentColor',
|
|
104
191
|
size: 16
|
|
105
192
|
})
|
|
106
193
|
})]
|
|
107
194
|
})
|
|
108
195
|
});
|
|
109
|
-
}
|
|
196
|
+
};
|
|
197
|
+
exports.RequestHintButton = RequestHintButton;
|
|
110
198
|
const styles = _reactNative.StyleSheet.create({
|
|
111
199
|
button: {
|
|
112
200
|
flexDirection: 'row',
|
|
@@ -118,12 +206,12 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
118
206
|
color: _reactNativeUi.COLORS.NEUTRAL_10
|
|
119
207
|
},
|
|
120
208
|
content: {
|
|
121
|
-
height: 44,
|
|
122
209
|
flex: 1,
|
|
123
210
|
flexDirection: 'row',
|
|
124
211
|
alignItems: 'center',
|
|
125
212
|
justifyContent: 'space-between',
|
|
126
213
|
paddingHorizontal: _reactNativeUi.SPACING[400],
|
|
214
|
+
paddingVertical: _reactNativeUi.SPACING[200],
|
|
127
215
|
borderWidth: 1,
|
|
128
216
|
borderRadius: 48,
|
|
129
217
|
elevation: 3,
|
|
@@ -134,11 +222,8 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
134
222
|
},
|
|
135
223
|
shadowOpacity: 0.25,
|
|
136
224
|
shadowRadius: 3,
|
|
137
|
-
backgroundColor: _reactNativeUi.COLORS.
|
|
225
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
138
226
|
borderColor: _reactNativeUi.COLORS.PRIMARY_BLUE
|
|
139
|
-
},
|
|
140
|
-
iconWrapper: {
|
|
141
|
-
top: _reactNativeUi.IS_MOBILE ? 3 : 0
|
|
142
227
|
}
|
|
143
228
|
});
|
|
144
229
|
//# sourceMappingURL=RequestHintButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_reactNativeUi","_studentsFeatures","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","OptionButtonVariant","exports","REQUEST_HINT_BUTTON","Default","WIDTH","FONT_SIZE","Short","RequestHintButton","onPress","message","disabled","colorScheme","ColorScheme","Blue","variant","hoverSv","useSharedValue","onHoverIn","value","withTiming","duration","onHoverOut","animatedTextContainerStyle","useAnimatedStyle","backgroundColor","COLORS","NEUTRAL_2","borderColor","NEUTRAL_5","defaultBorderColor","NEUTRAL_1","MESSAGE_COLORS_MAP","sent","border","interpolateColor","background","animatedTextStyle","color","NEUTRAL_10","jsx","Pressable","style","styles","button","cursor","width","accessibilityState","accessibilityRole","children","jsxs","View","content","Text","numberOfLines","text","fontSize","ArrowRightIcon","size","ArrowUpIcon","StyleSheet","create","flexDirection","justifyContent","fontWeight","fontFamily","FONT_FAMILY","buenosAires","flex","alignItems","paddingHorizontal","SPACING","paddingVertical","borderWidth","borderRadius","elevation","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","PRIMARY_BLUE"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/RequestHintButton.tsx"],"mappings":";;;;;;AA4FA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAJ,OAAA;AAOA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAoD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,w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