@magmamath/students-features 0.6.14-rc.2 → 0.6.14-rc.21
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/{ChatMessages/ChatbotMessages.js → Chat/Chat.js} +8 -15
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +74 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +144 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +135 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +77 -0
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/{Alternatives/InputButton.js → ChatInput/freeText/SendMessageButton.js} +26 -17
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chatbot.js +2 -2
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +2 -1
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +7 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +44 -8
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotTextInput.js +16 -0
- package/dist/commonjs/features/chatbot/model/ChatBotTextInput.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +44 -11
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/types.js +2 -0
- package/dist/commonjs/features/chatbot/types/types.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/units.types.js +10 -0
- 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 +18 -11
- 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 +55 -29
- 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/features/formulaSheet/components/FormulaSheet.js +5 -4
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/commonjs/shared/hooks/useKeyDownListener.js +3 -2
- package/dist/commonjs/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +2 -1
- package/dist/commonjs/shared/translation/localization/en.json +3 -2
- package/dist/commonjs/shared/translation/localization/gb.json +2 -1
- package/dist/commonjs/shared/translation/localization/sct.json +2 -1
- package/dist/commonjs/shared/translation/localization/sw.json +3 -2
- package/dist/module/features/chatbot/components/{ChatMessages/ChatbotMessages.js → Chat/Chat.js} +6 -13
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +67 -0
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +138 -0
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +128 -0
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +71 -0
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +1 -0
- package/dist/module/features/chatbot/components/{Alternatives/InputButton.js → ChatInput/freeText/SendMessageButton.js} +25 -16
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +1 -0
- package/dist/module/features/chatbot/components/Chatbot.js +2 -2
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +1 -0
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/index.js +1 -0
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +44 -8
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotTextInput.js +11 -0
- package/dist/module/features/chatbot/model/ChatBotTextInput.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +44 -11
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/chatbot/types/types.js +2 -0
- package/dist/module/features/chatbot/types/types.js.map +1 -0
- package/dist/module/features/chatbot/types/units.types.js +6 -0
- 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 +19 -12
- 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 +57 -31
- 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/features/formulaSheet/components/FormulaSheet.js +5 -4
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/module/shared/hooks/useKeyDownListener.js +3 -2
- package/dist/module/shared/hooks/useKeyDownListener.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +2 -1
- package/dist/module/shared/translation/localization/en.json +3 -2
- package/dist/module/shared/translation/localization/gb.json +2 -1
- package/dist/module/shared/translation/localization/sct.json +2 -1
- package/dist/module/shared/translation/localization/sw.json +3 -2
- package/dist/typescript/commonjs/features/chatbot/components/{ChatMessages/ChatbotMessages.d.ts → Chat/Chat.d.ts} +3 -3
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts +9 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +16 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +16 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +11 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +1 -0
- package/dist/typescript/{module/features/chatbot/components/Alternatives/InputButton.d.ts → 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 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +2 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +5 -6
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotTextInput.d.ts +8 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotTextInput.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +3 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +23 -1
- 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 +11 -2
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/types.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +5 -0
- 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/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 +5 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/{ChatMessages/ChatbotMessages.d.ts → Chat/Chat.d.ts} +3 -3
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts +9 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +16 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +16 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +11 -0
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/chatbot/components/Alternatives/InputButton.d.ts → 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 -0
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +2 -0
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +5 -6
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotTextInput.d.ts +8 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotTextInput.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +3 -2
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +23 -1
- 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 +11 -2
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/types.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/types/types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +5 -0
- 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/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 +5 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +2 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/features/chatbot/components/{ChatMessages/ChatbotMessages.tsx → Chat/Chat.tsx} +12 -17
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +83 -0
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +156 -0
- package/src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx +153 -0
- package/src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx +83 -0
- package/src/features/chatbot/components/{Alternatives/InputButton.tsx → ChatInput/freeText/SendMessageButton.tsx} +37 -16
- package/src/features/chatbot/components/Chatbot.tsx +4 -2
- package/src/features/chatbot/constants.ts +3 -0
- package/src/features/chatbot/index.ts +2 -0
- package/src/features/chatbot/model/ChatBotModel.ts +67 -33
- package/src/features/chatbot/model/ChatBotTextInput.ts +10 -0
- package/src/features/chatbot/model/ChatBotThreadManager.ts +35 -9
- package/src/features/chatbot/model/translation.ts +1 -1
- package/src/features/chatbot/types/api.types.ts +25 -1
- package/src/features/chatbot/types/model.types.ts +16 -1
- package/src/features/chatbot/types/types.ts +0 -0
- package/src/features/chatbot/types/units.types.ts +6 -0
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +1 -7
- package/src/features/exampleSolution/assets/grid.webp +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +24 -12
- package/src/features/exampleSolution/components/QuestionSection.tsx +11 -7
- package/src/features/exampleSolution/components/SolutionSection.tsx +72 -29
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +5 -2
- package/src/features/exampleSolution/types.ts +2 -1
- package/src/features/formulaSheet/components/FormulaSheet.tsx +6 -4
- package/src/shared/hooks/useKeyDownListener.ts +3 -1
- package/src/shared/translation/localization/ca.json +2 -1
- package/src/shared/translation/localization/en.json +3 -2
- package/src/shared/translation/localization/gb.json +2 -1
- package/src/shared/translation/localization/sct.json +2 -1
- package/src/shared/translation/localization/sw.json +3 -2
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +0 -111
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +0 -208
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/InputButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.js +0 -157
- package/dist/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +0 -105
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +0 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +0 -200
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +0 -1
- package/dist/module/features/chatbot/components/Alternatives/InputButton.js.map +0 -1
- package/dist/module/features/chatbot/components/Alternatives/InputWithHintRow.js +0 -150
- package/dist/module/features/chatbot/components/Alternatives/InputWithHintRow.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +0 -11
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +0 -13
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.d.ts +0 -11
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +0 -11
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +0 -13
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputWithHintRow.d.ts +0 -11
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputWithHintRow.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +0 -1
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +0 -135
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +0 -214
- package/src/features/chatbot/components/Alternatives/InputWithHintRow.tsx +0 -160
- package/src/features/exampleSolution/assets/grid.png +0 -0
|
@@ -1,67 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, View, Image,
|
|
3
|
+
import { StyleSheet, View, Image, ImageBackground, ScrollView, useWindowDimensions } from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import Animated, { FadeIn } from 'react-native-reanimated';
|
|
7
7
|
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
|
-
import gridImage from '../assets/grid.
|
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import gridImage from '../assets/grid.webp';
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const CONTAINER_SIZES = {
|
|
11
|
+
width: 489,
|
|
12
|
+
height: 543
|
|
13
|
+
};
|
|
14
|
+
const BORDER_WIDTH = 1;
|
|
15
|
+
const CONTAINER_HEIGHT_OFFSET = 160;
|
|
10
16
|
const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage;
|
|
11
17
|
export const SolutionSection = ({
|
|
12
18
|
answer,
|
|
13
19
|
status
|
|
14
20
|
}) => {
|
|
21
|
+
const {
|
|
22
|
+
height
|
|
23
|
+
} = useWindowDimensions();
|
|
15
24
|
const shouldShowAnswer = answer && (status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE);
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: styles.container,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
style: [styles.gridImage, IS_WEB && styles.gridImageWeb]
|
|
23
|
-
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.ScrollView, {
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: [styles.container, IS_WEB && {
|
|
27
|
+
maxHeight: height - CONTAINER_HEIGHT_OFFSET
|
|
28
|
+
}],
|
|
29
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
24
30
|
style: styles.solutionScroll,
|
|
25
31
|
contentContainerStyle: styles.solutionScrollContent,
|
|
26
|
-
|
|
27
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
bounces: true,
|
|
33
|
+
children: IS_WEB ? /*#__PURE__*/_jsx(ImageBackground, {
|
|
34
|
+
resizeMode: "repeat",
|
|
35
|
+
style: [styles.gridImageWeb],
|
|
36
|
+
source: {
|
|
37
|
+
uri: gridImagePath
|
|
38
|
+
},
|
|
39
|
+
children: shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
40
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
41
|
+
style: styles.solutionText,
|
|
42
|
+
children: answer
|
|
43
|
+
})
|
|
44
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
45
|
+
children: [/*#__PURE__*/_jsx(ImageBackground, {
|
|
46
|
+
resizeMode: "repeat",
|
|
47
|
+
style: styles.gridImageRn,
|
|
48
|
+
source: {
|
|
49
|
+
uri: gridImagePath
|
|
50
|
+
}
|
|
51
|
+
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
52
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
53
|
+
style: styles.solutionText,
|
|
54
|
+
children: answer
|
|
55
|
+
})]
|
|
30
56
|
})
|
|
31
|
-
})
|
|
57
|
+
})
|
|
32
58
|
});
|
|
33
59
|
};
|
|
34
60
|
const styles = StyleSheet.create({
|
|
35
61
|
container: {
|
|
36
|
-
width:
|
|
62
|
+
width: CONTAINER_SIZES.width,
|
|
63
|
+
height: CONTAINER_SIZES.height,
|
|
37
64
|
overflow: 'hidden',
|
|
38
65
|
borderRadius: 8,
|
|
39
|
-
borderWidth:
|
|
66
|
+
borderWidth: BORDER_WIDTH,
|
|
40
67
|
borderColor: COLORS.NEUTRAL_5
|
|
41
68
|
},
|
|
42
|
-
|
|
69
|
+
gridImageRn: {
|
|
70
|
+
top: -327,
|
|
43
71
|
width: '100%',
|
|
44
|
-
height: '
|
|
45
|
-
|
|
46
|
-
aspectRatio: 28 / 8
|
|
72
|
+
height: '150%',
|
|
73
|
+
position: 'absolute'
|
|
47
74
|
},
|
|
48
75
|
gridImageWeb: {
|
|
49
|
-
transform: [{
|
|
50
|
-
scale: 3.5
|
|
51
|
-
}]
|
|
52
|
-
},
|
|
53
|
-
solutionScroll: {
|
|
54
|
-
position: 'absolute',
|
|
55
76
|
width: '100%',
|
|
56
77
|
height: '100%'
|
|
57
78
|
},
|
|
79
|
+
solutionScroll: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
58
82
|
solutionScrollContent: {
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
|
|
84
|
+
width: '100%'
|
|
61
85
|
},
|
|
62
86
|
solutionText: {
|
|
63
87
|
fontFamily: 'PlaypenSans-Light',
|
|
64
|
-
fontSize:
|
|
88
|
+
fontSize: 28,
|
|
89
|
+
marginHorizontal: SPACING[800],
|
|
90
|
+
marginVertical: SPACING[400]
|
|
65
91
|
}
|
|
66
92
|
});
|
|
67
93
|
//# sourceMappingURL=SolutionSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","Image","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","Image","ImageBackground","ScrollView","useWindowDimensions","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CONTAINER_SIZES","width","height","BORDER_WIDTH","CONTAINER_HEIGHT_OFFSET","gridImagePath","resolveAssetSource","uri","SolutionSection","answer","status","shouldShowAnswer","DONE_DATA","CACHE","style","styles","container","maxHeight","children","solutionScroll","contentContainerStyle","solutionScrollContent","bounces","resizeMode","gridImageWeb","source","Text","entering","undefined","delay","duration","solutionText","gridImageRn","create","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","top","position","flex","minHeight","fontFamily","fontSize","marginHorizontal","marginVertical"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,KAAK,EACLC,eAAe,EACfC,UAAU,EACVC,mBAAmB,QACd,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AACpE,OAAOC,QAAQ,IAAIC,MAAM,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,OAAOC,SAAS,MAAM,qBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAO3C,MAAMC,eAAe,GAAG;EACtBC,KAAK,EAAE,GAA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,EAAE,EAAE;IACZC,gBAAgB,EAAExD,OAAO,CAAC,GAAG,CAAC;IAC9ByD,cAAc,EAAEzD,OAAO,CAAC,GAAG;EAC7B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,12 +6,14 @@ export class ExampleSolutionModel {
|
|
|
6
6
|
cache = new ExampleSolutionCache();
|
|
7
7
|
constructor({
|
|
8
8
|
api,
|
|
9
|
-
errorHandler
|
|
9
|
+
errorHandler,
|
|
10
|
+
renderKatexComponent
|
|
10
11
|
}) {
|
|
11
12
|
this.api = new ExampleSolutionsApi({
|
|
12
13
|
api,
|
|
13
14
|
errorHandler
|
|
14
15
|
});
|
|
16
|
+
this.renderKatexComponent = renderKatexComponent;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=ExampleSolution.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler","renderKatexComponent"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;EAIlDG,WAAWA,CAAC;IAAEC,GAAG;IAAEC,YAAY;IAAEC;EAAgD,CAAC,EAAE;IAClF,IAAI,CAACF,GAAG,GAAG,IAAIL,mBAAmB,CAAC;MAAEK,GAAG;MAAEC;IAAa,CAAC,CAAC;IACzD,IAAI,CAACC,oBAAoB,GAAGA,oBAAoB;EAClD;AACF","ignoreList":[]}
|
|
@@ -18,6 +18,10 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
|
|
|
18
18
|
const isOpen = useUnit(model.modal.$isOpen);
|
|
19
19
|
const sheetFileBlob = useUnit(model.file.$blob);
|
|
20
20
|
const isRequestPending = useUnit(model.api.getPDFFileBlobFx.pending);
|
|
21
|
+
const onPressHandler = () => {
|
|
22
|
+
model.modal.toggle();
|
|
23
|
+
onPress?.();
|
|
24
|
+
};
|
|
21
25
|
useEffect(() => {
|
|
22
26
|
model.file.setId(fileId ?? null);
|
|
23
27
|
}, [fileId]);
|
|
@@ -28,10 +32,7 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
|
|
|
28
32
|
variant: ButtonVariant.SECONDARY,
|
|
29
33
|
colorScheme: buttonColor,
|
|
30
34
|
isActive: isOpen,
|
|
31
|
-
onPress: () =>
|
|
32
|
-
model.modal.toggle();
|
|
33
|
-
onPress?.();
|
|
34
|
-
},
|
|
35
|
+
onPress: () => onPressHandler(),
|
|
35
36
|
icon: /*#__PURE__*/_jsx(TheoryIcon, {
|
|
36
37
|
color: isOpen ? COLORS.NEUTRAL_1 : undefined,
|
|
37
38
|
size: 20
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","setId","children","size","variant","SECONDARY","colorScheme","isActive","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","onPressHandler","toggle","setId","children","size","variant","SECONDARY","colorScheme","isActive","icon","color","NEUTRAL_1","undefined","isLoading","onClose","setIsOpen"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/components/FormulaSheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAaC,SAAS,QAAQ,OAAO;AAC/D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACEC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,MAAM,EACNC,UAAU,EAEVC,WAAW,QAEN,4BAA4B;AAEnC,SAASC,iBAAiB,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAavD,OAAO,MAAMC,YAAY,gBAAGjB,UAAU,CACpC,CACE;EACEkB,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,UAAU,GAAGhB,UAAU,CAACiB,MAAM;EAC9BC,WAAW,GAAGnB,WAAW,CAACoB,IAAI;EAC9BC,WAAW,GAAGhB,WAAW,CAACe,IAAI;EAC9BE,OAAO;EACPC;AACF,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,MAAM,GAAG3B,OAAO,CAACgB,KAAK,CAACY,KAAK,CAACC,OAAO,CAAC;EAC3C,MAAMC,aAAa,GAAG9B,OAAO,CAACgB,KAAK,CAACe,IAAI,CAACC,KAAK,CAAC;EAC/C,MAAMC,gBAAgB,GAAGjC,OAAO,CAACgB,KAAK,CAACkB,GAAG,CAACC,gBAAgB,CAACC,OAAO,CAAC;EAEpE,MAAMC,cAAc,GAAGA,CAAA,KAAM;IAC3BrB,KAAK,CAACY,KAAK,CAACU,MAAM,CAAC,CAAC;IACpBd,OAAO,GAAG,CAAC;EACb,CAAC;EAEDzB,SAAS,CAAC,MAAM;IACdiB,KAAK,CAACe,IAAI,CAACQ,KAAK,CAACtB,MAAM,IAAI,IAAI,CAAC;EAClC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,oBACEH,KAAA,CAAAF,SAAA;IAAA4B,QAAA,gBACE9B,IAAA,CAACT,MAAM;MACLyB,GAAG,EAAEA,GAAI;MACTe,IAAI,EAAEtB,UAAW;MACjBuB,OAAO,EAAEtC,aAAa,CAACuC,SAAU;MACjCC,WAAW,EAAEvB,WAAY;MACzBwB,QAAQ,EAAElB,MAAO;MACjBH,OAAO,EAAEA,CAAA,KAAMa,cAAc,CAAC,CAAE;MAChCS,IAAI,eAAEpC,IAAA,CAACJ,UAAU;QAACyC,KAAK,EAAEpB,MAAM,GAAGtB,MAAM,CAAC2C,SAAS,GAAGC,SAAU;QAACR,IAAI,EAAE;MAAG,CAAE,CAAE;MAC7EhB,KAAK,EAAEA;IAAM,CACd,CAAC,EAEDE,MAAM,iBACLjB,IAAA,CAACF,iBAAiB;MAChB0C,SAAS,EAAEjB,gBAAiB;MAC5BV,WAAW,EAAEA,WAAY;MACzB4B,OAAO,EAAEA,CAAA,KAAMnC,KAAK,CAACY,KAAK,CAACwB,SAAS,CAAC,KAAK,CAAE;MAAAZ,QAAA,EAE3CtB,QAAQ,CAACY,aAAa,IAAI,EAAE;IAAC,CACb,CACpB;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { KeyboardKeys } from "../../lib/constants.js";
|
|
5
|
-
export const useKeyDownListener = (callback, overrideKeys = [KeyboardKeys.ENTER]) => {
|
|
5
|
+
export const useKeyDownListener = (callback, enabled = true, overrideKeys = [KeyboardKeys.ENTER]) => {
|
|
6
6
|
const callbackRef = useRef(callback);
|
|
7
7
|
callbackRef.current = callback;
|
|
8
8
|
useEffect(() => {
|
|
9
|
+
if (!enabled) return;
|
|
9
10
|
const eventHandler = event => {
|
|
10
11
|
if (overrideKeys.includes(event.key)) {
|
|
11
12
|
event.preventDefault();
|
|
@@ -17,6 +18,6 @@ export const useKeyDownListener = (callback, overrideKeys = [KeyboardKeys.ENTER]
|
|
|
17
18
|
return () => {
|
|
18
19
|
document.removeEventListener('keydown', eventHandler, true);
|
|
19
20
|
};
|
|
20
|
-
}, []);
|
|
21
|
+
}, [enabled]);
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=useKeyDownListener.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useRef","KeyboardKeys","useKeyDownListener","callback","overrideKeys","ENTER","callbackRef","current","eventHandler","event","includes","key","preventDefault","stopPropagation","document","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["shared/hooks/useKeyDownListener.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,YAAY,QAAQ,wBAAqB;AAElD,OAAO,MAAMC,kBAAkB,GAAGA,CAChCC,QAAwC,EACxCC,YAAY,GAAG,
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","KeyboardKeys","useKeyDownListener","callback","enabled","overrideKeys","ENTER","callbackRef","current","eventHandler","event","includes","key","preventDefault","stopPropagation","document","addEventListener","removeEventListener"],"sourceRoot":"../../../../src","sources":["shared/hooks/useKeyDownListener.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,SAASC,YAAY,QAAQ,wBAAqB;AAElD,OAAO,MAAMC,kBAAkB,GAAGA,CAChCC,QAAwC,EACxCC,OAAO,GAAG,IAAI,EACdC,YAAY,GAAG,CAACJ,YAAY,CAACK,KAAK,CAAC,KAChC;EACH,MAAMC,WAAW,GAAGP,MAAM,CAACG,QAAQ,CAAC;EACpCI,WAAW,CAACC,OAAO,GAAGL,QAAQ;EAE9BJ,SAAS,CAAC,MAAM;IACd,IAAI,CAACK,OAAO,EAAE;IACd,MAAMK,YAAY,GAAIC,KAAoB,IAAK;MAC7C,IAAIL,YAAY,CAACM,QAAQ,CAACD,KAAK,CAACE,GAAmB,CAAC,EAAE;QACpDF,KAAK,CAACG,cAAc,CAAC,CAAC;QACtBH,KAAK,CAACI,eAAe,CAAC,CAAC;MACzB;MAEAP,WAAW,CAACC,OAAO,CAACE,KAAK,CAAC;IAC5B,CAAC;IAEDK,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEP,YAAY,EAAE,IAAI,CAAC;IACxD,OAAO,MAAM;MACXM,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAER,YAAY,EAAE,IAAI,CAAC;IAC7D,CAAC;EACH,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC;AACf,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
-
"showError": "Show error"
|
|
20
|
+
"showError": "Show error",
|
|
21
|
+
"inputPlaceholder": "Type..."
|
|
21
22
|
},
|
|
22
23
|
"gifCelebrations": {
|
|
23
24
|
"greatStart": "Great start!",
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
16
|
"giveHint": "I need a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
-
"showError": "Show error"
|
|
20
|
+
"showError": "Show error",
|
|
21
|
+
"inputPlaceholder": "Type..."
|
|
21
22
|
},
|
|
22
23
|
"gifCelebrations": {
|
|
23
24
|
"greatStart": "Great start!",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
-
"showError": "Show error"
|
|
20
|
+
"showError": "Show error",
|
|
21
|
+
"inputPlaceholder": "Type..."
|
|
21
22
|
},
|
|
22
23
|
"gifCelebrations": {
|
|
23
24
|
"greatStart": "Great start!",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
20
|
-
"showError": "Show error"
|
|
20
|
+
"showError": "Show error",
|
|
21
|
+
"inputPlaceholder": "Type..."
|
|
21
22
|
},
|
|
22
23
|
"gifCelebrations": {
|
|
23
24
|
"greatStart": "Great start!",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
18
18
|
"errorMessage": "Något gick snett! Försök igen",
|
|
19
19
|
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
20
|
-
"showError": "Visa fel"
|
|
20
|
+
"showError": "Visa fel",
|
|
21
|
+
"inputPlaceholder": "Skriv..."
|
|
21
22
|
},
|
|
22
23
|
"gifCelebrations": {
|
|
23
24
|
"greatStart": "Bra start!",
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
"almostThere": "Nästan där"
|
|
26
27
|
},
|
|
27
28
|
"exampleSolution": {
|
|
28
|
-
"exampleSolution": "
|
|
29
|
+
"exampleSolution": "Lösningsexempel",
|
|
29
30
|
"letMeThink": "Låt mig tänka...",
|
|
30
31
|
"aha": "Aha!",
|
|
31
32
|
"errorMessage": "Något gick snett med att generera en exempellösning"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChatbotModel } from '../../model/ChatBotModel';
|
|
3
3
|
import { ColorScheme } from '../../types/style.types';
|
|
4
|
-
type
|
|
4
|
+
type ChatbotProps = {
|
|
5
5
|
model: ChatbotModel;
|
|
6
6
|
isHintFeedback: boolean;
|
|
7
7
|
isTextToSpeechEnabled: boolean;
|
|
8
8
|
colorScheme?: ColorScheme;
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const Chat: ({ model, isHintFeedback, isTextToSpeechEnabled, colorScheme, }: ChatbotProps) => React.JSX.Element;
|
|
11
11
|
export {};
|
|
12
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAQrD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,IAAI,mEAKd,YAAY,sBAmEd,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorScheme } from '../../types/style.types';
|
|
3
|
+
export type ChatInputProps = {
|
|
4
|
+
hasMessages: boolean;
|
|
5
|
+
isHintFeedback: boolean;
|
|
6
|
+
colorScheme?: ColorScheme;
|
|
7
|
+
};
|
|
8
|
+
export declare const ChatInput: ({ isHintFeedback, hasMessages, colorScheme, }: ChatInputProps) => React.JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=ChatInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/ChatInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAK1C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAIrD,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,SAAS,kDAInB,cAAc,6BAqDhB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorScheme } from '@magmamath/students-features';
|
|
3
|
+
export declare enum HintButtonVariant {
|
|
4
|
+
Default = "default",
|
|
5
|
+
Short = "short"
|
|
6
|
+
}
|
|
7
|
+
type RequestHintButtonProps = {
|
|
8
|
+
onPress: () => void;
|
|
9
|
+
label: string;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
colorScheme?: ColorScheme;
|
|
12
|
+
variant: HintButtonVariant;
|
|
13
|
+
};
|
|
14
|
+
export declare const RequestHintButton: React.MemoExoticComponent<({ onPress, label, disabled, colorScheme, variant, }: RequestHintButtonProps) => React.JSX.Element>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=RequestHintButton.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestHintButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatInput/RequestHintButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAe,MAAM,OAAO,CAAA;AAenC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAG1D,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAYD,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,iBAAiB,kFAOzB,sBAAsB,uBA0E1B,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
|
|
3
|
+
import { ColorScheme } from '@magmamath/students-features';
|
|
4
|
+
type ChatTextInputProps = {
|
|
5
|
+
value: string;
|
|
6
|
+
onSubmit: () => void;
|
|
7
|
+
submitDisabled?: boolean;
|
|
8
|
+
onChangeText?: (text: string) => void;
|
|
9
|
+
onBlur?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
|
|
10
|
+
onFocus?: (e: NativeSyntheticEvent<TextInputFocusEventData>) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
colorScheme?: ColorScheme;
|
|
13
|
+
};
|
|
14
|
+
export declare const ChatTextInput: ({ value, submitDisabled, onSubmit, onChangeText, onBlur, onFocus, colorScheme, placeholder, }: ChatTextInputProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=ChatTextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatTextInput.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EACL,oBAAoB,EAIpB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAW1D,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACnE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAA;IACpE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,kGASvB,kBAAkB,sBAsEpB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorScheme } from '../../../types/style.types';
|
|
3
|
+
type FreeTextInputBlockProps = {
|
|
4
|
+
optionLabel: string;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
onOptionPress: () => void;
|
|
7
|
+
colorScheme?: ColorScheme;
|
|
8
|
+
};
|
|
9
|
+
export declare const FreeTextInputBlock: ({ optionLabel, onOptionPress, disabled, colorScheme, }: FreeTextInputBlockProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=FreeTextInputBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAGzB,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAOxD,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,2DAK5B,uBAAuB,sBAkDzB,CAAA"}
|
|
@@ -5,6 +5,6 @@ type HelpRequestOptionProps = {
|
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
colorScheme?: ColorScheme;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const SendMessageButton: ({ onPress, disabled, colorScheme, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
9
9
|
export {};
|
|
10
|
-
//# sourceMappingURL=
|
|
10
|
+
//# sourceMappingURL=SendMessageButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -2,6 +2,7 @@ import React, { ComponentType, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ChatbotModel } from '../model/ChatBotModel';
|
|
3
3
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
|
|
4
4
|
import { ColorScheme } from '../types/style.types';
|
|
5
|
+
import { ChatInputMode } from '../types/units.types';
|
|
5
6
|
type ChatbotProps = {
|
|
6
7
|
model: ChatbotModel;
|
|
7
8
|
isHintFeedback: boolean;
|
|
@@ -10,6 +11,7 @@ type ChatbotProps = {
|
|
|
10
11
|
voice: typeof DEFAULT_VOICE;
|
|
11
12
|
audioConfig: typeof AUDIO_CONFIG;
|
|
12
13
|
};
|
|
14
|
+
inputMode?: ChatInputMode;
|
|
13
15
|
ButtonWrapper: ComponentType<PropsWithChildren>;
|
|
14
16
|
iconSize?: {
|
|
15
17
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5C,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,OAAO,gHAQjB,YAAY,6BA8Bd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,4BAA4B,CAAA;AAMhE,eAAO,MAAM,YAAY;;;;CAIxB,CAAA;AAED,eAAO,MAAM,aAAa;;;CAGzB,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;CAgBhC,CAAA;AAEF,eAAO,MAAM,kBAAkB;;CAErB,CAAA;AAEV,eAAO,MAAM,0BAA0B;;CAE7B,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;CAyB9B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;CAS/B,CAAA;AAED,eAAO,MAAM,wBAAwB,MAAM,CAAA"}
|
|
@@ -5,6 +5,7 @@ export { MessageVariant, type ChatbotModelProps, type IChatDrawBoardAdapter, } f
|
|
|
5
5
|
export type { PostMessageResponse } from './types/api.types';
|
|
6
6
|
export { DefaultMessagesCreator } from './model/DefaultMessageCreator';
|
|
7
7
|
export type { ChatAnswer } from './types/units.types';
|
|
8
|
+
export { ChatInputMode } from './types/units.types';
|
|
8
9
|
export type { ConversationMessage } from './types/units.types';
|
|
9
10
|
export { ColorScheme } from './types/style.types';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/chatbot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACnE,OAAO,EACL,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { type Store } from 'effector';
|
|
2
|
-
import { ChatbotContext, ChatbotModelProps, IChatDrawBoardAdapter, SendHelpParams, SetHintMessageProps, StartConversationProps } from '../types/model.types';
|
|
2
|
+
import { ChatbotContext, ChatbotModelProps, IChatDrawBoardAdapter, ReinitConversationProps, SendHelpParams, SetHintMessageProps, StartConversationProps } from '../types/model.types';
|
|
3
3
|
import { GetAlternativesResponse } from '../types/api.types';
|
|
4
4
|
import { ChatbotAPI } from './ChatbotApi';
|
|
5
5
|
import { ChatbotTranslation } from './translation';
|
|
6
6
|
import { ChatTextToSpeechModel, T2SConfig } from './t2s';
|
|
7
7
|
import { ChatBotThreadManager } from './ChatBotThreadManager';
|
|
8
8
|
import { ErrorSpottingModel } from '../errorSpotting/ErrorSpottingModel';
|
|
9
|
+
import { ChatBotTextInput } from './ChatBotTextInput';
|
|
9
10
|
import { ChatBotTextManager } from './ChatBoxTextManager';
|
|
10
|
-
type ReinitConversationProps = {
|
|
11
|
-
key: string;
|
|
12
|
-
};
|
|
13
11
|
export declare class ChatbotModel {
|
|
14
12
|
readonly textManager: ChatBotTextManager;
|
|
15
13
|
private readonly defaultMessages;
|
|
@@ -18,13 +16,14 @@ export declare class ChatbotModel {
|
|
|
18
16
|
readonly translation: ChatbotTranslation;
|
|
19
17
|
readonly t2s: ChatTextToSpeechModel;
|
|
20
18
|
readonly errorSpotting: ErrorSpottingModel;
|
|
19
|
+
readonly textInput: ChatBotTextInput;
|
|
21
20
|
private readonly setCurrentKey;
|
|
22
21
|
readonly $currentKey: import("effector").StoreWritable<string>;
|
|
23
22
|
private unbindCurrentKey;
|
|
24
23
|
private externalTranslationStateSync?;
|
|
25
24
|
readonly resetAlternatives: import("effector").EventCallable<void>;
|
|
26
25
|
readonly setAlternatives: import("effector").EventCallable<GetAlternativesResponse | null>;
|
|
27
|
-
readonly $alternatives:
|
|
26
|
+
readonly $alternatives: import("effector").StoreWritable<GetAlternativesResponse | null>;
|
|
28
27
|
readonly setIsOpen: import("effector").EventCallable<boolean>;
|
|
29
28
|
readonly toggleOpen: import("effector").EventCallable<void>;
|
|
30
29
|
readonly $isOpen: import("effector").StoreWritable<boolean>;
|
|
@@ -41,6 +40,7 @@ export declare class ChatbotModel {
|
|
|
41
40
|
messages: import("..").ConversationMessage[];
|
|
42
41
|
isAvailable: boolean;
|
|
43
42
|
currentThread: import("../types/units.types").IThreadItem | null;
|
|
43
|
+
conversationId?: string | null;
|
|
44
44
|
}>;
|
|
45
45
|
constructor({ api, $key, threadMessagesLimit, settings }: ChatbotModelProps);
|
|
46
46
|
private createSendHelpRequestFx;
|
|
@@ -58,5 +58,4 @@ export declare class ChatbotModel {
|
|
|
58
58
|
unbindKey(): this;
|
|
59
59
|
unbindExternalTranslationState(): this;
|
|
60
60
|
}
|
|
61
|
-
export {};
|
|
62
61
|
//# sourceMappingURL=ChatBotModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"ChatBotModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAElG,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,cAAc,EAEd,mBAAmB,EAEnB,sB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IAEvE,SAAgB,UAAU,0DAAuC;IACjE,SAAgB,QAAQ,0DAAiC;IAEzD,SAAgB,eAAe,4CAAyB;IACxD,SAAgB,eAAe,4CAAuC;IAEtE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAE9C,SAAgB,gBAAgB;;;;;;OAG/B;gBAEW,EAAE,GAAG,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAa,EAAE,EAAE,iBAAiB;IAuGhF,OAAO,CAAC,uBAAuB;IAkExB,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IAa7B,4BAA4B,CAAC,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC;IAa1D,QAAQ,CAAC,MAAM,EAAE,SAAS;IAK1B,mBAAmB,CAAC,OAAO,EAAE,qBAAqB;IAMzD,SAAgB,iBAAiB,wEAAA;IACjC,SAAgB,iBAAiB,yDAAiC;IAE3D,cAAc,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAAE,mBAAmB;IAK9D,SAAgB,kBAAkB,YAAa,uBAAuB,UAGrE;IAEM,WAAW,CAAC,GAAG,EAAE,MAAM;IAMvB,SAAS,+CAkBd;IAEF,SAAgB,KAAK,yCAMnB;IAEK,SAAS;IAST,8BAA8B;CAItC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class ChatBotTextInput {
|
|
2
|
+
readonly setValue: import("effector").EventCallable<string>;
|
|
3
|
+
readonly setIsFocused: import("effector").EventCallable<boolean>;
|
|
4
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
5
|
+
readonly $value: import("effector").StoreWritable<string>;
|
|
6
|
+
readonly $isFocused: import("effector").StoreWritable<boolean>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ChatBotTextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatBotTextInput.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotTextInput.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAC3B,SAAgB,QAAQ,2CAAwB;IAChD,SAAgB,YAAY,4CAAyB;IACrD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,MAAM,2CAA+C;IACrE,SAAgB,UAAU,4CAAsD;CACjF"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ThreadItem } from './ThreadItem';
|
|
2
|
-
import { ChatHintPayload, ChatHintResponse, PostMessagePayload, PostMessageResponse } from '../types/api.types';
|
|
2
|
+
import { ChatHintPayload, ChatHintResponse, PostMessagePayload, PostMessageResponse, SendMessagePayload, SendMessageResponse } from '../types/api.types';
|
|
3
3
|
import { ChatbotMessages, IChatDrawBoardAdapter } from '../types/model.types';
|
|
4
4
|
type ThreadManagerApi = {
|
|
5
5
|
getHint: (props: ChatHintPayload) => Promise<ChatHintResponse>;
|
|
6
|
+
sendMessage: (props: SendMessagePayload) => Promise<SendMessageResponse>;
|
|
6
7
|
};
|
|
7
8
|
type ChatBotThreadManagerProps = {
|
|
8
9
|
messagesLimit?: number;
|
|
@@ -20,7 +21,7 @@ export declare class ChatBotThreadManager {
|
|
|
20
21
|
constructor({ drawBoardAdapter, api, messagesLimit, messages, }: ChatBotThreadManagerProps);
|
|
21
22
|
private getThreadItem;
|
|
22
23
|
setDrawBoardAdapter(adapter: IChatDrawBoardAdapter): void;
|
|
23
|
-
readonly postMessage: ({ problemAnswer,
|
|
24
|
+
readonly postMessage: ({ problemAnswer, problemDescription, answer, answerOptions, language, imageAltText, imageCdnId, freeTextMessage, conversationId, }: PostMessagePayload) => Promise<PostMessageResponse>;
|
|
24
25
|
get(key: string): ThreadItem | undefined;
|
|
25
26
|
reset(key?: string): void;
|
|
26
27
|
setMessagesLimit(limit: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBotThreadManager.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotThreadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAG7E,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"ChatBotThreadManager.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/model/ChatBotThreadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAG7E,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC9D,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;CACzE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACxC,QAAQ,EAAE,eAAe,CAAA;IACzB,GAAG,CAAC,EAAE,gBAAgB,CAAA;CACvB,CAAA;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,GAAG,CAAgC;IAC3C,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgC;IAExD,OAAO,CAAC,aAAa,CAAA;IACrB,OAAO,CAAC,UAAU,CA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