@magmamath/students-features 0.6.14-rc.9 → 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 -37
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +10 -31
- 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 +1 -1
- package/dist/commonjs/shared/translation/localization/en.json +1 -1
- package/dist/commonjs/shared/translation/localization/gb.json +1 -1
- 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 -37
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +10 -31
- 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 +1 -1
- package/dist/module/shared/translation/localization/en.json +1 -1
- package/dist/module/shared/translation/localization/gb.json +1 -1
- 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 +1 -5
- 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 -21
- 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 +1 -10
- 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 +1 -5
- 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 -21
- 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 +1 -10
- 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 +27 -71
- 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 -24
- package/src/features/chatbot/types/model.types.ts +0 -15
- 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 +1 -1
- package/src/shared/translation/localization/en.json +1 -1
- package/src/shared/translation/localization/gb.json +1 -1
- 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
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Pressable, StyleSheet } from 'react-native';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Animated, { useSharedValue, withTiming, useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
|
|
6
|
-
import { ArrowRightIcon, ArrowUpIcon, COLORS, FONT_FAMILY, IS_MOBILE, SPACING } from '@magmamath/react-native-ui';
|
|
7
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
8
|
-
import { MESSAGE_COLORS_MAP } from "../../constants.js";
|
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
export let OptionButtonVariant = /*#__PURE__*/function (OptionButtonVariant) {
|
|
11
|
-
OptionButtonVariant["Default"] = "default";
|
|
12
|
-
OptionButtonVariant["Short"] = "short";
|
|
13
|
-
return OptionButtonVariant;
|
|
14
|
-
}({});
|
|
15
|
-
const REQUEST_HINT_BUTTON = {
|
|
16
|
-
[OptionButtonVariant.Default]: {
|
|
17
|
-
WIDTH: 305,
|
|
18
|
-
FONT_SIZE: 20
|
|
19
|
-
},
|
|
20
|
-
[OptionButtonVariant.Short]: {
|
|
21
|
-
WIDTH: 163,
|
|
22
|
-
FONT_SIZE: 18
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
export const RequestHintButton = ({
|
|
26
|
-
onPress,
|
|
27
|
-
message,
|
|
28
|
-
disabled = false,
|
|
29
|
-
colorScheme = ColorScheme.Blue,
|
|
30
|
-
variant = OptionButtonVariant.Default
|
|
31
|
-
}) => {
|
|
32
|
-
const hoverSv = useSharedValue(0);
|
|
33
|
-
const onHoverIn = () => {
|
|
34
|
-
if (!disabled) hoverSv.value = withTiming(1, {
|
|
35
|
-
duration: 200
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
const onHoverOut = () => {
|
|
39
|
-
if (!disabled) hoverSv.value = withTiming(0, {
|
|
40
|
-
duration: 200
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
const animatedTextContainerStyle = useAnimatedStyle(() => {
|
|
44
|
-
if (disabled) {
|
|
45
|
-
return {
|
|
46
|
-
backgroundColor: COLORS.NEUTRAL_2,
|
|
47
|
-
borderColor: COLORS.NEUTRAL_5
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
const defaultBorderColor = variant === OptionButtonVariant.Default ? COLORS.NEUTRAL_1 : MESSAGE_COLORS_MAP[colorScheme].sent.border;
|
|
51
|
-
return {
|
|
52
|
-
backgroundColor: interpolateColor(hoverSv.value, [0, 1], [COLORS.NEUTRAL_1, MESSAGE_COLORS_MAP[colorScheme].sent.background]),
|
|
53
|
-
borderColor: interpolateColor(hoverSv.value, [0, 1], [defaultBorderColor, MESSAGE_COLORS_MAP[colorScheme].sent.border])
|
|
54
|
-
};
|
|
55
|
-
}, [hoverSv, disabled, colorScheme]);
|
|
56
|
-
const animatedTextStyle = useAnimatedStyle(() => {
|
|
57
|
-
if (disabled) return {
|
|
58
|
-
color: COLORS.NEUTRAL_5
|
|
59
|
-
};
|
|
60
|
-
return {
|
|
61
|
-
color: interpolateColor(hoverSv.value, [0, 1], [COLORS.NEUTRAL_10, COLORS.NEUTRAL_1])
|
|
62
|
-
};
|
|
63
|
-
}, [hoverSv, disabled]);
|
|
64
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
65
|
-
onHoverIn: onHoverIn,
|
|
66
|
-
onHoverOut: onHoverOut,
|
|
67
|
-
onPress: onPress,
|
|
68
|
-
style: [styles.button, {
|
|
69
|
-
cursor: disabled ? 'auto' : 'pointer',
|
|
70
|
-
width: REQUEST_HINT_BUTTON[variant].WIDTH
|
|
71
|
-
}],
|
|
72
|
-
disabled: disabled,
|
|
73
|
-
accessibilityState: {
|
|
74
|
-
disabled
|
|
75
|
-
},
|
|
76
|
-
accessibilityRole: "button",
|
|
77
|
-
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
78
|
-
style: [styles.content, animatedTextContainerStyle],
|
|
79
|
-
children: [/*#__PURE__*/_jsx(Animated.Text, {
|
|
80
|
-
numberOfLines: 1,
|
|
81
|
-
style: [styles.text, animatedTextStyle, {
|
|
82
|
-
fontSize: REQUEST_HINT_BUTTON[variant].FONT_SIZE
|
|
83
|
-
}],
|
|
84
|
-
children: message
|
|
85
|
-
}), /*#__PURE__*/_jsx(Animated.Text, {
|
|
86
|
-
style: [styles.icon, animatedTextStyle],
|
|
87
|
-
children: variant === OptionButtonVariant.Default ? /*#__PURE__*/_jsx(ArrowRightIcon, {
|
|
88
|
-
color: disabled ? COLORS.NEUTRAL_5 : 'currentColor',
|
|
89
|
-
size: 16
|
|
90
|
-
}) : /*#__PURE__*/_jsx(ArrowUpIcon, {
|
|
91
|
-
color: disabled ? COLORS.NEUTRAL_5 : 'currentColor',
|
|
92
|
-
size: 16
|
|
93
|
-
})
|
|
94
|
-
})]
|
|
95
|
-
})
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
const styles = StyleSheet.create({
|
|
99
|
-
button: {
|
|
100
|
-
flexDirection: 'row',
|
|
101
|
-
justifyContent: 'flex-end'
|
|
102
|
-
},
|
|
103
|
-
text: {
|
|
104
|
-
fontWeight: '400',
|
|
105
|
-
fontFamily: FONT_FAMILY.buenosAires,
|
|
106
|
-
color: COLORS.NEUTRAL_10
|
|
107
|
-
},
|
|
108
|
-
content: {
|
|
109
|
-
flex: 1,
|
|
110
|
-
flexDirection: 'row',
|
|
111
|
-
alignItems: 'center',
|
|
112
|
-
justifyContent: 'space-between',
|
|
113
|
-
paddingHorizontal: SPACING[400],
|
|
114
|
-
paddingVertical: SPACING[200],
|
|
115
|
-
borderWidth: 1,
|
|
116
|
-
borderRadius: 48,
|
|
117
|
-
elevation: 3,
|
|
118
|
-
shadowColor: '#333',
|
|
119
|
-
shadowOffset: {
|
|
120
|
-
width: 0,
|
|
121
|
-
height: 1
|
|
122
|
-
},
|
|
123
|
-
shadowOpacity: 0.25,
|
|
124
|
-
shadowRadius: 3,
|
|
125
|
-
backgroundColor: COLORS.PRIMARY_BLUE,
|
|
126
|
-
borderColor: COLORS.PRIMARY_BLUE
|
|
127
|
-
},
|
|
128
|
-
icon: {
|
|
129
|
-
top: IS_MOBILE ? 3 : 0
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
//# sourceMappingURL=RequestHintButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","StyleSheet","React","Animated","useSharedValue","withTiming","useAnimatedStyle","interpolateColor","ArrowRightIcon","ArrowUpIcon","COLORS","FONT_FAMILY","IS_MOBILE","SPACING","ColorScheme","MESSAGE_COLORS_MAP","jsx","_jsx","jsxs","_jsxs","OptionButtonVariant","REQUEST_HINT_BUTTON","Default","WIDTH","FONT_SIZE","Short","RequestHintButton","onPress","message","disabled","colorScheme","Blue","variant","hoverSv","onHoverIn","value","duration","onHoverOut","animatedTextContainerStyle","backgroundColor","NEUTRAL_2","borderColor","NEUTRAL_5","defaultBorderColor","NEUTRAL_1","sent","border","background","animatedTextStyle","color","NEUTRAL_10","style","styles","button","cursor","width","accessibilityState","accessibilityRole","children","View","content","Text","numberOfLines","text","fontSize","icon","size","create","flexDirection","justifyContent","fontWeight","fontFamily","buenosAires","flex","alignItems","paddingHorizontal","paddingVertical","borderWidth","borderRadius","elevation","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","PRIMARY_BLUE","top"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/RequestHintButton.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,IACbC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB,QAEX,yBAAyB;AAChC,SACEC,cAAc,EACdC,WAAW,EACXC,MAAM,EACNC,WAAW,EACXC,SAAS,EACTC,OAAO,QACF,4BAA4B;AACnC,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,kBAAkB,QAAQ,oBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYpD,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAK/B,MAAMC,mBAAmB,GAAG;EAC1B,CAACD,mBAAmB,CAACE,OAAO,GAAG;IAC7BC,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE;EACb,CAAC;EACD,CAACJ,mBAAmB,CAACK,KAAK,GAAG;IAAEF,KAAK,EAAE,GAAG;IAAEC,SAAS,EAAE;EAAG;AAC3D,CAAC;AAED,OAAO,MAAME,iBAAiB,GAAGA,CAAC;EAChCC,OAAO;EACPC,OAAO;EACPC,QAAQ,GAAG,KAAK;EAChBC,WAAW,GAAGhB,WAAW,CAACiB,IAAI;EAC9BC,OAAO,GAAGZ,mBAAmB,CAACE;AACR,CAAC,KAAK;EAC5B,MAAMW,OAAO,GAAG7B,cAAc,CAAC,CAAC,CAAC;EAEjC,MAAM8B,SAAS,GAAGA,CAAA,KAAM;IACtB,IAAI,CAACL,QAAQ,EAAEI,OAAO,CAACE,KAAK,GAAG9B,UAAU,C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G,CAAE,CAAC,gBAEjFjD,IAAA,CAACR,WAAW;UAACwC,KAAK,EAAEpB,QAAQ,GAAGnB,MAAM,CAACgC,SAAS,GAAG,cAAe;UAACwB,IAAI,EAAE;QAAG,CAAE;MAC9E,CACY,CAAC;IAAA,CACH;EAAC,CACP,CAAC;AAEhB,CAAC;AAED,MAAMd,MAAM,GAAGnD,UAAU,CAACkE,MAAM,CAAC;EAC/Bd,MAAM,EAAE;IACNe,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDN,IAAI,EAAE;IACJO,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE5D,WAAW,CAAC6D,WAAW;IACnCvB,KAAK,EAAEvC,MAAM,CAACwC;EAChB,CAAC;EACDU,OAAO,EAAE;IACPa,IAAI,EAAE,CAAC;IACPL,aAAa,EAAE,KAAK;IACpBM,UAAU,EAAE,QAAQ;IACpBL,cAAc,EAAE,eAAe;IAC/BM,iBAAiB,EAAE9D,OAAO,CAAC,GAAG,CAAC;IAC/B+D,eAAe,EAAE/D,OAAO,CAAC,GAAG,CAAC;IAC7BgE,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAE1B,KAAK,EAAE,CAAC;MAAE2B,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACf7C,eAAe,EAAE7B,MAAM,CAAC2E,YAAY;IACpC5C,WAAW,EAAE/B,MAAM,CAAC2E;EACtB,CAAC;EACDpB,IAAI,EAAE;IACJqB,GAAG,EAAE1E,SAAS,GAAG,CAAC,GAAG;EACvB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { useUnit } from 'effector-react';
|
|
5
|
-
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
-
import { Platform, StyleSheet, TextInput } from 'react-native';
|
|
7
|
-
import { COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui';
|
|
8
|
-
import { SendMessageButton } from "./SendMessageButton.js";
|
|
9
|
-
import { useChatModel } from "../../../context/ChatBotModelContext.js";
|
|
10
|
-
import { useKeyBoard } from "../../../../../shared/hooks/useKeyboard.js";
|
|
11
|
-
import { KeyboardKeys } from "../../../../../lib/constants.js";
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const COMPACT_WIDTH = 134;
|
|
14
|
-
const FULL_WIDTH = 305;
|
|
15
|
-
const ANIMATION_DURATION = 200;
|
|
16
|
-
export const ChatTextInput = ({
|
|
17
|
-
disabled,
|
|
18
|
-
colorScheme
|
|
19
|
-
}) => {
|
|
20
|
-
const model = useChatModel();
|
|
21
|
-
const inputValue = useUnit(model.$textInputValue);
|
|
22
|
-
const {
|
|
23
|
-
language
|
|
24
|
-
} = useUnit(model.$context) ?? {};
|
|
25
|
-
const widthSv = useSharedValue(COMPACT_WIDTH);
|
|
26
|
-
const arrowOpacitySv = useSharedValue(1);
|
|
27
|
-
const hintVisibleSv = useSharedValue(1);
|
|
28
|
-
const animatedInputStyle = useAnimatedStyle(() => ({
|
|
29
|
-
width: widthSv.value
|
|
30
|
-
}), [widthSv]);
|
|
31
|
-
const handleChangeText = text => {
|
|
32
|
-
if (text.trim().length > 500) return;
|
|
33
|
-
model.setTextInputValue(text);
|
|
34
|
-
const hasText = text.trim().length > 0;
|
|
35
|
-
const isExpanded = widthSv.value > COMPACT_WIDTH;
|
|
36
|
-
if (hasText && !isExpanded) {
|
|
37
|
-
widthSv.value = withTiming(FULL_WIDTH, {
|
|
38
|
-
duration: ANIMATION_DURATION
|
|
39
|
-
});
|
|
40
|
-
arrowOpacitySv.value = withTiming(0, {
|
|
41
|
-
duration: ANIMATION_DURATION
|
|
42
|
-
});
|
|
43
|
-
hintVisibleSv.value = withTiming(0, {
|
|
44
|
-
duration: ANIMATION_DURATION
|
|
45
|
-
});
|
|
46
|
-
} else if (!hasText && isExpanded) {
|
|
47
|
-
widthSv.value = withTiming(COMPACT_WIDTH, {
|
|
48
|
-
duration: ANIMATION_DURATION
|
|
49
|
-
});
|
|
50
|
-
arrowOpacitySv.value = withTiming(1, {
|
|
51
|
-
duration: ANIMATION_DURATION
|
|
52
|
-
});
|
|
53
|
-
hintVisibleSv.value = withTiming(1, {
|
|
54
|
-
duration: ANIMATION_DURATION
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const handleOnPress = () => {
|
|
59
|
-
if (disabled || inputValue.trim().length < 1 || inputValue.length > 500) return;
|
|
60
|
-
handleChangeText('');
|
|
61
|
-
void model.sendHelpRequestFx({
|
|
62
|
-
message: inputValue,
|
|
63
|
-
translatedMessage: inputValue,
|
|
64
|
-
isFreeText: true
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
useKeyBoard(event => {
|
|
68
|
-
if (event.key === KeyboardKeys.ENTER) {
|
|
69
|
-
handleOnPress();
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
73
|
-
style: [styles.inputWrapper, animatedInputStyle],
|
|
74
|
-
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
75
|
-
style: styles.input,
|
|
76
|
-
placeholder: language === 'Swedish' ? 'Skriv...' : 'Type...',
|
|
77
|
-
placeholderTextColor: COLORS.NEUTRAL_6,
|
|
78
|
-
value: inputValue,
|
|
79
|
-
onChangeText: handleChangeText,
|
|
80
|
-
onBlur: () => model.setIsTextInputFocused(false),
|
|
81
|
-
onFocus: () => model.setIsTextInputFocused(true)
|
|
82
|
-
}), /*#__PURE__*/_jsx(SendMessageButton, {
|
|
83
|
-
onPress: handleOnPress,
|
|
84
|
-
disabled: inputValue.trim().length < 1 || disabled,
|
|
85
|
-
colorScheme: colorScheme
|
|
86
|
-
})]
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
const styles = StyleSheet.create({
|
|
90
|
-
container: {
|
|
91
|
-
position: 'relative',
|
|
92
|
-
width: '100%',
|
|
93
|
-
alignItems: 'flex-end',
|
|
94
|
-
height: 52,
|
|
95
|
-
justifyContent: 'center'
|
|
96
|
-
},
|
|
97
|
-
inputWrapper: {
|
|
98
|
-
position: 'absolute',
|
|
99
|
-
zIndex: 1,
|
|
100
|
-
left: 0,
|
|
101
|
-
flexDirection: 'row',
|
|
102
|
-
borderWidth: 1,
|
|
103
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
104
|
-
borderRadius: 200,
|
|
105
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
106
|
-
paddingHorizontal: SPACING[100],
|
|
107
|
-
paddingVertical: SPACING[100],
|
|
108
|
-
elevation: 3,
|
|
109
|
-
shadowColor: '#333',
|
|
110
|
-
shadowOffset: {
|
|
111
|
-
width: 0,
|
|
112
|
-
height: 1
|
|
113
|
-
},
|
|
114
|
-
shadowOpacity: 0.25,
|
|
115
|
-
shadowRadius: 3
|
|
116
|
-
},
|
|
117
|
-
input: {
|
|
118
|
-
flex: 1,
|
|
119
|
-
fontSize: 16,
|
|
120
|
-
minWidth: 60,
|
|
121
|
-
minHeight: 22,
|
|
122
|
-
fontWeight: '400',
|
|
123
|
-
fontFamily: FONT_FAMILY.buenosAires,
|
|
124
|
-
paddingHorizontal: SPACING[200],
|
|
125
|
-
paddingVertical: SPACING[200],
|
|
126
|
-
...(Platform.OS === 'web' && {
|
|
127
|
-
outlineStyle: 'none'
|
|
128
|
-
})
|
|
129
|
-
},
|
|
130
|
-
arrowWrapper: {
|
|
131
|
-
marginLeft: SPACING[200]
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
//# sourceMappingURL=ChatTextInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useUnit","Animated","useAnimatedStyle","useSharedValue","withTiming","Platform","StyleSheet","TextInput","COLORS","FONT_FAMILY","SPACING","SendMessageButton","useChatModel","useKeyBoard","KeyboardKeys","jsx","_jsx","jsxs","_jsxs","COMPACT_WIDTH","FULL_WIDTH","ANIMATION_DURATION","ChatTextInput","disabled","colorScheme","model","inputValue","$textInputValue","language","$context","widthSv","arrowOpacitySv","hintVisibleSv","animatedInputStyle","width","value","handleChangeText","text","trim","length","setTextInputValue","hasText","isExpanded","duration","handleOnPress","sendHelpRequestFx","message","translatedMessage","isFreeText","event","key","ENTER","View","style","styles","inputWrapper","children","input","placeholder","placeholderTextColor","NEUTRAL_6","onChangeText","onBlur","setIsTextInputFocused","onFocus","onPress","create","container","position","alignItems","height","justifyContent","zIndex","left","flexDirection","borderWidth","borderColor","NEUTRAL_5","borderRadius","backgroundColor","NEUTRAL_1","paddingHorizontal","paddingVertical","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","flex","fontSize","minWidth","minHeight","fontWeight","fontFamily","buenosAires","OS","outlineStyle","arrowWrapper","marginLeft"],"sourceRoot":"../../../../../../../src","sources":["features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAChG,SAASC,QAAQ,EAAEC,UAAU,EAAEC,SAAS,QAAQ,cAAc;AAC9D,SAASC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,4BAA4B;AAEzE,SAASC,iBAAiB,QAAQ,wBAAqB;AAEvD,SAASC,YAAY,QAAQ,yCAAsC;AACnE,SAASC,WAAW,QAAQ,4CAAyC;AACrE,SAASC,YAAY,QAAQ,iCAA8B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3D,MAAMC,aAAa,GAAG,GA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AAI,EAAE,CAAC;IACPC,QAAQ,EAAE,EAAE;IACZC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAEpF,WAAW,CAACqF,WAAW;IACnCb,iBAAiB,EAAEvE,OAAO,CAAC,GAAG,CAAC;IAC/BwE,eAAe,EAAExE,OAAO,CAAC,GAAG,CAAC;IAC7B,IAAIL,QAAQ,CAAC0F,EAAE,KAAK,KAAK,IAAI;MAAEC,YAAY,EAAE;IAAO,CAAC;EACvD,CAAC;EACDC,YAAY,EAAE;IACZC,UAAU,EAAExF,OAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import { ChatTextInput } from "./ChatTextInput.js";
|
|
6
|
-
import { OptionButtonVariant, RequestHintButton } from "../RequestHintButton.js";
|
|
7
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
export const FreeTextInputBlock = ({
|
|
9
|
-
onPress,
|
|
10
|
-
message,
|
|
11
|
-
disabled,
|
|
12
|
-
colorScheme
|
|
13
|
-
}) => {
|
|
14
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
15
|
-
style: styles.container,
|
|
16
|
-
children: [/*#__PURE__*/_jsx(ChatTextInput, {
|
|
17
|
-
onPress: onPress,
|
|
18
|
-
disabled: disabled,
|
|
19
|
-
colorScheme: colorScheme
|
|
20
|
-
}), /*#__PURE__*/_jsx(RequestHintButton, {
|
|
21
|
-
onPress: onPress,
|
|
22
|
-
message: message,
|
|
23
|
-
disabled: disabled,
|
|
24
|
-
colorScheme: colorScheme,
|
|
25
|
-
variant: OptionButtonVariant.Short
|
|
26
|
-
})]
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
const styles = StyleSheet.create({
|
|
30
|
-
container: {
|
|
31
|
-
position: 'relative',
|
|
32
|
-
width: '100%',
|
|
33
|
-
alignItems: 'flex-end',
|
|
34
|
-
height: 52,
|
|
35
|
-
justifyContent: 'center'
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=FreeTextInputBlock.js.map
|
package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ChatTextInput","OptionButtonVariant","RequestHintButton","jsx","_jsx","jsxs","_jsxs","FreeTextInputBlock","onPress","message","disabled","colorScheme","style","styles","container","children","variant","Short","create","position","width","alignItems","height","justifyContent"],"sourceRoot":"../../../../../../../src","sources":["features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAS7E,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC;AACsB,CAAC,KAAK;EAC5B,oBACEL,KAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BX,IAAA,CAACJ,aAAa;MAACQ,OAAO,EAAEA,OAAQ;MAACE,QAAQ,EAAEA,QAAS;MAACC,WAAW,EAAEA;IAAY,CAAE,CAAC,eACjFP,IAAA,CAACF,iBAAiB;MAChBM,OAAO,EAAEA,OAAQ;MACjBC,OAAO,EAAEA,OAAQ;MACjBC,QAAQ,EAAEA,QAAS;MACnBC,WAAW,EAAEA,WAAY;MACzBK,OAAO,EAAEf,mBAAmB,CAACgB;IAAM,CACpC,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;AAED,MAAMJ,MAAM,GAAGf,UAAU,CAACoB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,UAAU,EAAE,UAAU;IACtBC,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { Pressable, StyleSheet } from 'react-native';
|
|
5
|
-
import Animated, { useSharedValue, withTiming, useAnimatedStyle, interpolateColor } from 'react-native-reanimated';
|
|
6
|
-
import { ArrowUpIcon, COLORS, IS_MOBILE } from '@magmamath/react-native-ui';
|
|
7
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
8
|
-
import { MESSAGE_COLORS_MAP } from "../../../constants.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export const SendMessageButton = ({
|
|
11
|
-
onPress,
|
|
12
|
-
disabled = false,
|
|
13
|
-
colorScheme = ColorScheme.Blue
|
|
14
|
-
}) => {
|
|
15
|
-
const hoverSv = useSharedValue(0);
|
|
16
|
-
const onHoverIn = () => {
|
|
17
|
-
if (!disabled) hoverSv.value = withTiming(1, {
|
|
18
|
-
duration: 200
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const onHoverOut = () => {
|
|
22
|
-
if (!disabled) hoverSv.value = withTiming(0, {
|
|
23
|
-
duration: 200
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
const animatedIconStyle = useAnimatedStyle(() => {
|
|
27
|
-
const backgroundColor = interpolateColor(hoverSv.value, [0, 1], [COLORS.NEUTRAL_1, MESSAGE_COLORS_MAP[colorScheme].sent.border]);
|
|
28
|
-
const color = interpolateColor(hoverSv.value, [0, 1], [COLORS.NEUTRAL_10, COLORS.NEUTRAL_1]);
|
|
29
|
-
return {
|
|
30
|
-
backgroundColor: disabled ? COLORS.NEUTRAL_2 : backgroundColor,
|
|
31
|
-
borderColor: disabled ? COLORS.NEUTRAL_5 : MESSAGE_COLORS_MAP[colorScheme].sent.border,
|
|
32
|
-
color: disabled ? COLORS.NEUTRAL_5 : color
|
|
33
|
-
};
|
|
34
|
-
}, [hoverSv, disabled]);
|
|
35
|
-
return /*#__PURE__*/_jsx(Pressable, {
|
|
36
|
-
onHoverIn: onHoverIn,
|
|
37
|
-
onHoverOut: onHoverOut,
|
|
38
|
-
onPress: onPress,
|
|
39
|
-
style: [styles.button, disabled && {
|
|
40
|
-
cursor: 'auto'
|
|
41
|
-
}],
|
|
42
|
-
disabled: disabled,
|
|
43
|
-
accessibilityState: {
|
|
44
|
-
disabled
|
|
45
|
-
},
|
|
46
|
-
accessibilityRole: "button",
|
|
47
|
-
children: IS_MOBILE ? /*#__PURE__*/_jsx(Animated.View, {
|
|
48
|
-
style: [styles.iconContainer, animatedIconStyle, {
|
|
49
|
-
borderColor: disabled ? COLORS.NEUTRAL_5 : MESSAGE_COLORS_MAP[colorScheme].sent.border
|
|
50
|
-
}],
|
|
51
|
-
children: /*#__PURE__*/_jsx(ArrowUpIcon, {
|
|
52
|
-
color: 'currentColor',
|
|
53
|
-
size: 16
|
|
54
|
-
})
|
|
55
|
-
}) : /*#__PURE__*/_jsx(Animated.Text, {
|
|
56
|
-
style: [styles.webIconContainer, animatedIconStyle],
|
|
57
|
-
children: /*#__PURE__*/_jsx(ArrowUpIcon, {
|
|
58
|
-
color: 'currentColor',
|
|
59
|
-
size: 16
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
const styles = StyleSheet.create({
|
|
65
|
-
button: {
|
|
66
|
-
flexDirection: 'row',
|
|
67
|
-
justifyContent: 'flex-end'
|
|
68
|
-
},
|
|
69
|
-
iconContainer: {
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
alignItems: 'center',
|
|
72
|
-
padding: 12,
|
|
73
|
-
borderRadius: 21,
|
|
74
|
-
borderWidth: 1
|
|
75
|
-
},
|
|
76
|
-
webIconContainer: {
|
|
77
|
-
flex: 1,
|
|
78
|
-
flexDirection: 'row',
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
justifyContent: 'space-between',
|
|
81
|
-
paddingHorizontal: 13,
|
|
82
|
-
paddingVertical: 12,
|
|
83
|
-
borderWidth: 1,
|
|
84
|
-
borderRadius: 48,
|
|
85
|
-
elevation: 3,
|
|
86
|
-
shadowColor: '#333',
|
|
87
|
-
shadowOffset: {
|
|
88
|
-
width: 0,
|
|
89
|
-
height: 1
|
|
90
|
-
},
|
|
91
|
-
shadowOpacity: 0.25,
|
|
92
|
-
shadowRadius: 3,
|
|
93
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
94
|
-
borderColor: COLORS.PRIMARY_BLUE
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
//# sourceMappingURL=SendMessageButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","StyleSheet","Animated","useSharedValue","withTiming","useAnimatedStyle","interpolateColor","ArrowUpIcon","COLORS","IS_MOBILE","ColorScheme","MESSAGE_COLORS_MAP","jsx","_jsx","SendMessageButton","onPress","disabled","colorScheme","Blue","hoverSv","onHoverIn","value","duration","onHoverOut","animatedIconStyle","backgroundColor","NEUTRAL_1","sent","border","color","NEUTRAL_10","NEUTRAL_2","borderColor","NEUTRAL_5","style","styles","button","cursor","accessibilityState","accessibilityRole","children","View","iconContainer","size","Text","webIconContainer","create","flexDirection","justifyContent","alignItems","padding","borderRadius","borderWidth","flex","paddingHorizontal","paddingVertical","elevation","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","PRIMARY_BLUE"],"sourceRoot":"../../../../../../../src","sources":["features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx"],"mappings":";;AAAA,OA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c,IAAI,EAAE;MAAG,CAAE;IAAC,CACnC;EAChB,CACQ,CAAC;AAEhB,CAAC;AAED,MAAMR,MAAM,GAAGlC,UAAU,CAAC6C,MAAM,CAAC;EAC/BV,MAAM,EAAE;IACNW,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDN,aAAa,EAAE;IACbM,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE;EACf,CAAC;EACDP,gBAAgB,EAAE;IAChBQ,IAAI,EAAE,CAAC;IACPN,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBD,cAAc,EAAE,eAAe;IAC/BM,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBH,WAAW,EAAE,CAAC;IACdD,YAAY,EAAE,EAAE;IAChBK,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfrC,eAAe,EAAEjB,MAAM,CAACkB,SAAS;IACjCM,WAAW,EAAExB,MAAM,CAACuD;EACtB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Chat/Chat.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;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,SAAS,EAAE,aAAa,CAAA;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAQD,eAAO,MAAM,IAAI,8EAMd,oBAAoB,sBAyEtB,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChatInputAreaProps } from '../../types/units.types';
|
|
3
|
-
export declare const ChatInput: ({ onPressAlternative, hasMessages, isHintFeedback, inputMode, colorScheme, }: ChatInputAreaProps) => "" | React.JSX.Element | undefined;
|
|
4
|
-
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAK5C,OAAO,EAAE,kBAAkB,EAAiC,MAAM,yBAAyB,CAAA;AAS3F,eAAO,MAAM,SAAS,iFAMnB,kBAAkB,uCAmCpB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/InputOption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,eAAO,MAAM,WAAW,gDAAiD,cAAc,sBAYtF,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChatInputProps } from '../../types/units.types';
|
|
3
|
-
export declare const InputOptionWithTextArea: ({ message, disabled, onPress, colorScheme }: ChatInputProps) => React.JSX.Element;
|
|
4
|
-
//# sourceMappingURL=InputOptionWithTextArea.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputOptionWithTextArea.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD,eAAO,MAAM,uBAAuB,gDAAiD,cAAc,sBAWlG,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
4
|
-
type HelpRequestOptionProps = {
|
|
5
|
-
onPress: () => void;
|
|
6
|
-
message: string;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
variant: OptionButtonVariant;
|
|
9
|
-
colorScheme?: ColorScheme;
|
|
10
|
-
visibleSv?: SharedValue<number>;
|
|
11
|
-
};
|
|
12
|
-
export declare enum OptionButtonVariant {
|
|
13
|
-
Default = "default",
|
|
14
|
-
Short = "short"
|
|
15
|
-
}
|
|
16
|
-
export declare const RequestHintButton: ({ onPress, message, disabled, colorScheme, variant, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=RequestHintButton.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequestHintButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/RequestHintButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAiB,EAKf,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAShC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAI1D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAUD,eAAO,MAAM,iBAAiB,0DAM3B,sBAAsB,sBA8ExB,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
3
|
-
type ChatTextInputProps = {
|
|
4
|
-
onPress: () => void;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
colorScheme?: ColorScheme;
|
|
7
|
-
};
|
|
8
|
-
export declare const ChatTextInput: ({ disabled, colorScheme }: ChatTextInputProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=ChatTextInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatTextInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAU1D,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,8BAA+B,kBAAkB,sBAoE1E,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorScheme } from '../../../types/style.types';
|
|
3
|
-
type FreeTextInputAreaProps = {
|
|
4
|
-
onPress: () => void;
|
|
5
|
-
message: string;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
colorScheme?: ColorScheme;
|
|
8
|
-
};
|
|
9
|
-
export declare const FreeTextInputBlock: ({ onPress, message, disabled, colorScheme, }: FreeTextInputAreaProps) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=FreeTextInputBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FreeTextInputBlock.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAIxD,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,iDAK5B,sBAAsB,sBAaxB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
3
|
-
type HelpRequestOptionProps = {
|
|
4
|
-
onPress: () => void;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
colorScheme?: ColorScheme;
|
|
7
|
-
};
|
|
8
|
-
export declare const SendMessageButton: ({ onPress, disabled, colorScheme, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=SendMessageButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SendMessageButton.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,wCAI3B,sBAAsB,sBAwDxB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Chat/Chat.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;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,SAAS,EAAE,aAAa,CAAA;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAQD,eAAO,MAAM,IAAI,8EAMd,oBAAoB,sBAyEtB,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChatInputAreaProps } from '../../types/units.types';
|
|
3
|
-
export declare const ChatInput: ({ onPressAlternative, hasMessages, isHintFeedback, inputMode, colorScheme, }: ChatInputAreaProps) => "" | React.JSX.Element | undefined;
|
|
4
|
-
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAK5C,OAAO,EAAE,kBAAkB,EAAiC,MAAM,yBAAyB,CAAA;AAS3F,eAAO,MAAM,SAAS,iFAMnB,kBAAkB,uCAmCpB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/InputOption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,eAAO,MAAM,WAAW,gDAAiD,cAAc,sBAYtF,CAAA"}
|
package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ChatInputProps } from '../../types/units.types';
|
|
3
|
-
export declare const InputOptionWithTextArea: ({ message, disabled, onPress, colorScheme }: ChatInputProps) => React.JSX.Element;
|
|
4
|
-
//# sourceMappingURL=InputOptionWithTextArea.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputOptionWithTextArea.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD,eAAO,MAAM,uBAAuB,gDAAiD,cAAc,sBAWlG,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SharedValue } from 'react-native-reanimated';
|
|
3
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
4
|
-
type HelpRequestOptionProps = {
|
|
5
|
-
onPress: () => void;
|
|
6
|
-
message: string;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
variant: OptionButtonVariant;
|
|
9
|
-
colorScheme?: ColorScheme;
|
|
10
|
-
visibleSv?: SharedValue<number>;
|
|
11
|
-
};
|
|
12
|
-
export declare enum OptionButtonVariant {
|
|
13
|
-
Default = "default",
|
|
14
|
-
Short = "short"
|
|
15
|
-
}
|
|
16
|
-
export declare const RequestHintButton: ({ onPress, message, disabled, colorScheme, variant, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=RequestHintButton.d.ts.map
|
package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequestHintButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/RequestHintButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAiB,EAKf,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAShC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAI1D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,mBAAmB,CAAA;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAChC,CAAA;AAED,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAUD,eAAO,MAAM,iBAAiB,0DAM3B,sBAAsB,sBA8ExB,CAAA"}
|
package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ColorScheme } from '@magmamath/students-features';
|
|
3
|
-
type ChatTextInputProps = {
|
|
4
|
-
onPress: () => void;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
colorScheme?: ColorScheme;
|
|
7
|
-
};
|
|
8
|
-
export declare const ChatTextInput: ({ disabled, colorScheme }: ChatTextInputProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=ChatTextInput.d.ts.map
|
package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatTextInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAU1D,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,8BAA+B,kBAAkB,sBAoE1E,CAAA"}
|