@magmamath/students-features 0.6.1-8.rc-3 → 0.6.2
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/README.md +5 -14
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +2 -6
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +24 -27
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +4 -9
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +5 -18
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +3 -10
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +12 -16
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -13
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +8 -14
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +4 -14
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +2 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +1 -2
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -36
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -8
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.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 +36 -64
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +8 -3
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -9
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +1 -9
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +0 -2
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/commonjs/features/feedback/model/comments.js +3 -5
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +9 -7
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +9 -12
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/commonjs/features/problemSelector/constants.js +6 -3
- package/dist/commonjs/features/problemSelector/constants.js.map +1 -1
- package/dist/commonjs/index.js +0 -36
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/shared/icons/LockIcon.js +31 -0
- package/dist/commonjs/shared/icons/LockIcon.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +1 -5
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/en.json +0 -11
- package/dist/commonjs/shared/translation/localization/gb.json +0 -11
- package/dist/commonjs/shared/translation/localization/sw.json +0 -11
- package/dist/commonjs/shared/translation/types.js +0 -2
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +2 -6
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +27 -29
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +4 -9
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +5 -18
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +3 -10
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +12 -16
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -13
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +8 -14
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +4 -14
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +2 -5
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +3 -3
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -35
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +1 -9
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.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 +37 -65
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +8 -3
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -9
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +0 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +1 -9
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +1 -3
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/module/features/feedback/model/comments.js +3 -5
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +9 -7
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/formulaSheet/components/FormulaSheet.js +4 -5
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +10 -13
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/module/features/problemSelector/constants.js +5 -2
- package/dist/module/features/problemSelector/constants.js.map +1 -1
- package/dist/module/index.js +0 -3
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/module/shared/icons/LockIcon.js +23 -0
- package/dist/module/shared/icons/LockIcon.js.map +1 -0
- package/dist/module/shared/translation/constants.js +1 -5
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/en.json +0 -11
- package/dist/module/shared/translation/localization/gb.json +0 -11
- package/dist/module/shared/translation/localization/sw.json +0 -11
- package/dist/module/shared/translation/types.js +0 -2
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +1 -6
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +1 -6
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +1 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +0 -33
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.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 +2 -7
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +2 -5
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +5 -2
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -3
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -99
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -22
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +1 -3
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +1 -5
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +1 -6
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +2 -7
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +1 -6
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +1 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +0 -33
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.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 +2 -7
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +2 -5
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/constants.d.ts +5 -2
- package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -3
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +1 -1
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/LockIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -99
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -22
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +1 -3
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +1 -5
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -1
- package/package.json +7 -11
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +0 -6
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +29 -28
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -6
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +4 -24
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +6 -39
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +3 -11
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +7 -28
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +5 -25
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +13 -24
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +3 -13
- package/src/features/chatbot/components/Chatbot.tsx +2 -6
- package/src/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx +10 -7
- package/src/features/chatbot/constants.ts +0 -37
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +1 -11
- package/src/features/chatbot/index.ts +0 -1
- package/src/features/chatbot/model/ChatBotModel.ts +41 -65
- package/src/features/chatbot/model/ChatBotThreadManager.ts +10 -4
- package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -11
- package/src/features/chatbot/model/DefaultMessageCreator.ts +0 -1
- package/src/features/chatbot/model/translation.ts +1 -11
- package/src/features/chatbot/types/model.types.ts +2 -5
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +0 -3
- package/src/features/feedback/model/comments.ts +7 -7
- package/src/features/feedback/model/model.ts +6 -6
- package/src/features/formulaSheet/components/FormulaSheet.tsx +4 -6
- package/src/features/problemSelector/components/ProblemSelectorButton.tsx +10 -17
- package/src/features/problemSelector/constants.ts +2 -3
- package/src/index.ts +0 -3
- package/src/lib/effector/createControllerEffect.ts +41 -41
- package/src/lib/helpers/helpers.ts +1 -1
- package/src/shared/icons/LockIcon.tsx +16 -0
- package/src/shared/translation/constants.ts +0 -4
- package/src/shared/translation/localization/en.json +0 -11
- package/src/shared/translation/localization/gb.json +0 -11
- package/src/shared/translation/localization/sw.json +0 -11
- package/src/shared/translation/types.ts +0 -6
- package/src/shared/translation/validation.types.ts +1 -9
- package/dist/commonjs/features/chatbot/types/style.types.js +0 -12
- package/dist/commonjs/features/chatbot/types/style.types.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +0 -29
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -104
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +0 -68
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +0 -101
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/constants.js +0 -13
- package/dist/commonjs/features/exampleSolution/constants.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +0 -61
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/index.js +0 -39
- package/dist/commonjs/features/exampleSolution/index.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +0 -24
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +0 -32
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +0 -18
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/types.js +0 -6
- package/dist/commonjs/features/exampleSolution/types.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +0 -62
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/commonjs/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +0 -44
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +0 -46
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +0 -90
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Progress.js +0 -96
- package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/constants.js +0 -34
- package/dist/commonjs/features/gifCelebrations/constants.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +0 -114
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/index.js +0 -20
- package/dist/commonjs/features/gifCelebrations/index.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +0 -136
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +0 -27
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js +0 -30
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/types/model.types.js +0 -6
- package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/commonjs/lib/effector/ControlledSample.js +0 -40
- package/dist/commonjs/lib/effector/ControlledSample.js.map +0 -1
- package/dist/commonjs/react-app-env.d.js +0 -2
- package/dist/commonjs/react-app-env.d.js.map +0 -1
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +0 -681
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +0 -616
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +0 -1
- package/dist/commonjs/shared/icons/index.js +0 -204
- package/dist/commonjs/shared/icons/index.js.map +0 -1
- package/dist/commonjs/shared/translation/localization/ca.json +0 -33
- package/dist/commonjs/shared/translation/localization/sct.json +0 -33
- package/dist/commonjs/types/common.types.js +0 -2
- package/dist/commonjs/types/common.types.js.map +0 -1
- package/dist/module/features/chatbot/types/style.types.js +0 -8
- package/dist/module/features/chatbot/types/style.types.js.map +0 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +0 -23
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -98
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +0 -1
- package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/module/features/exampleSolution/components/QuestionSection.js +0 -60
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +0 -1
- package/dist/module/features/exampleSolution/components/SolutionSection.js +0 -93
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +0 -1
- package/dist/module/features/exampleSolution/constants.js +0 -9
- package/dist/module/features/exampleSolution/constants.js.map +0 -1
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +0 -56
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +0 -1
- package/dist/module/features/exampleSolution/index.js +0 -6
- package/dist/module/features/exampleSolution/index.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +0 -19
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +0 -27
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +0 -1
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +0 -13
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +0 -1
- package/dist/module/features/exampleSolution/types.js +0 -4
- package/dist/module/features/exampleSolution/types.js.map +0 -1
- package/dist/module/features/gifCelebrations/GifCelebrations.js +0 -55
- package/dist/module/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/module/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/module/features/gifCelebrations/components/Backdrop.js +0 -36
- package/dist/module/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/ContentContainer.js +0 -38
- package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Gif.js +0 -82
- package/dist/module/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Progress.js +0 -88
- package/dist/module/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/module/features/gifCelebrations/constants.js +0 -30
- package/dist/module/features/gifCelebrations/constants.js.map +0 -1
- package/dist/module/features/gifCelebrations/helpers.js +0 -103
- package/dist/module/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/module/features/gifCelebrations/index.js +0 -5
- package/dist/module/features/gifCelebrations/index.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +0 -131
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +0 -22
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js +0 -25
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js.map +0 -1
- package/dist/module/features/gifCelebrations/types/model.types.js +0 -4
- package/dist/module/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/module/lib/effector/ControlledSample.js +0 -35
- package/dist/module/lib/effector/ControlledSample.js.map +0 -1
- package/dist/module/react-app-env.d.js +0 -2
- package/dist/module/react-app-env.d.js.map +0 -1
- package/dist/module/shared/icons/ExcitedLavaIcon.js +0 -673
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +0 -1
- package/dist/module/shared/icons/LavaIconInGlasses.js +0 -608
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +0 -1
- package/dist/module/shared/icons/index.js +0 -21
- package/dist/module/shared/icons/index.js.map +0 -1
- package/dist/module/shared/translation/localization/ca.json +0 -33
- package/dist/module/shared/translation/localization/sct.json +0 -33
- package/dist/module/types/common.types.js +0 -2
- package/dist/module/types/common.types.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +0 -9
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +0 -6
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +0 -4
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +0 -27
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +0 -26
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +0 -29
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -25
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -7
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts +0 -18
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +0 -45
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts +0 -17
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/index.d.ts +0 -19
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +0 -5
- package/dist/typescript/commonjs/types/common.types.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +0 -11
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +0 -8
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +0 -9
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/constants.d.ts +0 -6
- package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +0 -9
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/index.d.ts +0 -4
- package/dist/typescript/module/features/exampleSolution/index.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +0 -13
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +0 -11
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts +0 -27
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts +0 -26
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +0 -29
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -25
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -7
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts +0 -18
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +0 -45
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts +0 -17
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +0 -4
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/index.d.ts +0 -19
- package/dist/typescript/module/shared/icons/index.d.ts.map +0 -1
- package/dist/typescript/module/types/common.types.d.ts +0 -5
- package/dist/typescript/module/types/common.types.d.ts.map +0 -1
- package/src/features/chatbot/types/style.types.ts +0 -4
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +0 -23
- package/src/features/exampleSolution/assets/grid.webp +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -83
- package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
- package/src/features/exampleSolution/components/MessageBlock.tsx +0 -67
- package/src/features/exampleSolution/components/QuestionSection.tsx +0 -60
- package/src/features/exampleSolution/components/SolutionSection.tsx +0 -112
- package/src/features/exampleSolution/constants.ts +0 -5
- package/src/features/exampleSolution/hooks/useExampleSolution.ts +0 -66
- package/src/features/exampleSolution/index.ts +0 -3
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +0 -15
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +0 -33
- package/src/features/exampleSolution/model/ExampleSolutionCache.ts +0 -20
- package/src/features/exampleSolution/types.ts +0 -27
- package/src/features/gifCelebrations/GifCelebrations.tsx +0 -75
- package/src/features/gifCelebrations/assets/confetti.webp +0 -0
- package/src/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/src/features/gifCelebrations/components/Backdrop.tsx +0 -41
- package/src/features/gifCelebrations/components/ContentContainer.tsx +0 -44
- package/src/features/gifCelebrations/components/Gif.tsx +0 -88
- package/src/features/gifCelebrations/components/Progress.tsx +0 -106
- package/src/features/gifCelebrations/constants.ts +0 -32
- package/src/features/gifCelebrations/helpers.ts +0 -144
- package/src/features/gifCelebrations/index.ts +0 -2
- package/src/features/gifCelebrations/model/GifCelebrations.model.ts +0 -167
- package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +0 -26
- package/src/features/gifCelebrations/model/GifCelebrationsCache.ts +0 -41
- package/src/features/gifCelebrations/types/model.types.ts +0 -53
- package/src/lib/effector/ControlledSample.ts +0 -40
- package/src/react-app-env.d.ts +0 -6
- package/src/shared/icons/ExcitedLavaIcon.tsx +0 -541
- package/src/shared/icons/LavaIconInGlasses.tsx +0 -489
- package/src/shared/icons/index.ts +0 -18
- package/src/shared/translation/localization/ca.json +0 -33
- package/src/shared/translation/localization/sct.json +0 -33
- package/src/types/common.types.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","SentMessage","exports","React","memo","message","isTranslated","text","translatedMessage","jsx","View","style","styles","container","children","Text","StyleSheet","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAqD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG9C,MAAMG,WAAW,GAAAC,OAAA,CAAAD,WAAA,gBAAGE,cAAK,CAACC,IAAI,CAAC,CAAC;EAAEC,OAAO;EAAEC;AAA2B,CAAC,KAAK;EACjF,MAAMC,IAAI,GAAGD,YAAY,GAAGD,OAAO,CAACG,iBAAiB,GAAGH,OAAO,CAACA,OAAO;EAEvE,oBACE,IAAAR,WAAA,CAAAY,GAAA,EAACb,YAAA,CAAAc,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAjB,WAAA,CAAAY,GAAA,EAACb,YAAA,CAAAmB,IAAI;MAACJ,KAAK,EAAEC,MAAM,CAACL,IAAK;MAAAO,QAAA,EAAEP;IAAI,CAAO;EAAC,CACnC,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMK,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,uBAAuB,EAAE,CAAC;IAC1BC,eAAe,EAAE;EACnB,CAAC;EACDhB,IAAI,EAAE;IACJiB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,7 +11,6 @@ var _ChatMessage = require("../ChatMessage/ChatMessage.js");
|
|
|
11
11
|
var _MessageLoader = require("../ChatMessage/MessageLoader.js");
|
|
12
12
|
var _Alternatives = require("../Alternatives/Alternatives.js");
|
|
13
13
|
var _modelTypes = require("../../types/model.types.js");
|
|
14
|
-
var _styleTypes = require("../../types/style.types.js");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -23,8 +22,7 @@ const BOTTOM_OFFSET = _reactNative.Platform.select({
|
|
|
23
22
|
const ChatbotMessages = ({
|
|
24
23
|
model,
|
|
25
24
|
isHintFeedback,
|
|
26
|
-
isTextToSpeechEnabled
|
|
27
|
-
colorScheme = _styleTypes.ColorScheme.Blue
|
|
25
|
+
isTextToSpeechEnabled
|
|
28
26
|
}) => {
|
|
29
27
|
const dimensions = (0, _reactNative.useWindowDimensions)();
|
|
30
28
|
const ref = (0, _react.useRef)(null);
|
|
@@ -34,12 +32,10 @@ const ChatbotMessages = ({
|
|
|
34
32
|
const currentPlayingId = (0, _effectorReact.useUnit)(model.t2s.$currentPlayingId);
|
|
35
33
|
const isTranslated = (0, _effectorReact.useUnit)(model.translation.$isTranslated);
|
|
36
34
|
const audioStatus = (0, _effectorReact.useUnit)(model.t2s.$status);
|
|
37
|
-
const
|
|
35
|
+
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
38
36
|
const messages = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
39
37
|
messages
|
|
40
38
|
}) => messages);
|
|
41
|
-
const lastMessageId = messages.at(-1)?.id;
|
|
42
|
-
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
43
39
|
const askChatForHelp = (message, translatedMessage) => {
|
|
44
40
|
void model.sendHelpRequestFx({
|
|
45
41
|
message,
|
|
@@ -64,11 +60,8 @@ const ChatbotMessages = ({
|
|
|
64
60
|
style: styles.gap,
|
|
65
61
|
children: [messages.map(message => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
|
|
66
62
|
isTranslated: isTranslated,
|
|
67
|
-
withIcon: !message.isOwnMessage && message.id === lastMessageId,
|
|
68
63
|
message: message,
|
|
69
64
|
variant: message.isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
|
|
70
|
-
colorScheme: colorScheme,
|
|
71
|
-
withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
|
|
72
65
|
t2sState: {
|
|
73
66
|
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
74
67
|
isActive: message.id === currentPlayingId,
|
|
@@ -76,14 +69,11 @@ const ChatbotMessages = ({
|
|
|
76
69
|
status: audioStatus,
|
|
77
70
|
disabled: isTextToSpeechPending
|
|
78
71
|
}
|
|
79
|
-
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
|
|
80
|
-
colorScheme: colorScheme
|
|
81
|
-
})]
|
|
72
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {})]
|
|
82
73
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alternatives.Alternatives, {
|
|
83
74
|
onPressAlternative: askChatForHelp,
|
|
84
75
|
hasMessages: messages.length > 1,
|
|
85
|
-
isHintFeedback: isHintFeedback
|
|
86
|
-
colorScheme: colorScheme
|
|
76
|
+
isHintFeedback: isHintFeedback
|
|
87
77
|
})]
|
|
88
78
|
})
|
|
89
79
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","useStoreMap","$currentChatData","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","variant","isOwnMessage","MessageVariant","SENT","RECEIVED","t2sState","isEnabled","isActive","id","isLoading","status","disabled","MessageLoader","Alternatives","onPressAlternative","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAwD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,C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
|
exports.Chatbot = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
7
|
var _effectorReact = require("effector-react");
|
|
9
8
|
var _ChatbotMessages = require("./ChatMessages/ChatbotMessages.js");
|
|
10
9
|
var _ChatControls = require("./ChatControls/ChatControls.js");
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _ChatBotModelContext = require("../context/ChatBotModelContext.js");
|
|
12
|
-
var _styleTypes = require("../types/style.types.js");
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
const Chatbot = ({
|
|
@@ -18,8 +17,7 @@ const Chatbot = ({
|
|
|
18
17
|
isTextToSpeechEnabled = false,
|
|
19
18
|
textToSpeechConfig,
|
|
20
19
|
ButtonWrapper,
|
|
21
|
-
iconSize
|
|
22
|
-
colorScheme = _styleTypes.ColorScheme.Blue
|
|
20
|
+
iconSize
|
|
23
21
|
}) => {
|
|
24
22
|
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
25
23
|
const isAvailable = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
@@ -35,7 +33,6 @@ const Chatbot = ({
|
|
|
35
33
|
value: model,
|
|
36
34
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotMessages.ChatbotMessages, {
|
|
37
35
|
model: model,
|
|
38
|
-
colorScheme: colorScheme,
|
|
39
36
|
isHintFeedback: isHintFeedback,
|
|
40
37
|
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
41
38
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatControls.ChatControls, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_effectorReact","require","_ChatbotMessages","_ChatControls","_react","_interopRequireDefault","_ChatBotModelContext","_jsxRuntime","e","__esModule","default","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","ButtonWrapper","iconSize","alternatives","useUnit","$alternatives","isAvailable","useStoreMap","$currentChatData","t2s","setAudioConfig","openChat","setIsOpen","closeChat","chatAccess","jsxs","ChatBotModelContext","Provider","value","children","jsx","ChatbotMessages","ChatControls","onPressChatIcon","onPressClose","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAAoE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAI,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAc7D,MAAMG,OAAO,GAAGA,CAAC;EACtBC,KAAK;EACLC,cAAc;EACdC,qBAAqB,GAAG,KAAK;EAC7BC,kBAAkB;EAClBC,aAAa;EACbC;AACY,CAAC,KAAK;EAClB,MAAMC,YAAY,GAAG,IAAAC,sBAAO,EAACP,KAAK,CAACQ,aAAa,CAAC;EACjD,MAAMC,WAAW,GAAG,IAAAC,0BAAW,EAACV,KAAK,CAACW,gBAAgB,EAAE,CAAC;IAAEF;EAAY,CAAC,KAAKA,WAAW,CAAC;EACzFT,KAAK,CAACY,GAAG,CAACC,cAAc,CAACV,kBAAkB,IAAI,IAAI,CAAC;EAEpD,MAAMW,QAAQ,GAAGA,CAAA,KAAMd,KAAK,CAACe,SAAS,CAAC,IAAI,CAAC;EAC5C,MAAMC,SAAS,GAAGA,CAAA,KAAMhB,KAAK,CAACe,SAAS,CAAC,KAAK,CAAC;EAE9C,IAAI,CAACN,WAAW,IAAIH,YAAY,EAAEW,UAAU,KAAK,KAAK,EAAE;IACtD,OAAO,IAAI;EACb;EAEA,oBACE,IAAAtB,WAAA,CAAAuB,IAAA,EAACxB,oBAAA,CAAAyB,mBAAmB,CAACC,QAAQ;IAACC,KAAK,EAAErB,KAAM;IAAAsB,QAAA,gBACzC,IAAA3B,WAAA,CAAA4B,GAAA,EAACjC,gBAAA,CAAAkC,eAAe;MACdxB,KAAK,EAAEA,KAAM;MACbC,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA;IAAsB,CAC9C,CAAC,eAEF,IAAAP,WAAA,CAAA4B,GAAA,EAAChC,aAAA,CAAAkC,YAAY;MACXzB,KAAK,EAAEA,KAAM;MACb0B,eAAe,EAAEZ,QAAS;MAC1Ba,YAAY,EAAEX,SAAU;MACxBZ,aAAa,EAAEA,aAAc;MAC7BC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC;AAAAuB,OAAA,CAAA7B,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ThreeDotsLoader = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
12
|
const ThreeDotsLoader = ({
|
|
14
13
|
dotsCount = 3,
|
|
15
14
|
animationDuration = 250,
|
|
16
|
-
backgroundColor =
|
|
15
|
+
backgroundColor = '#55ABE0'
|
|
17
16
|
}) => {
|
|
18
17
|
const isWeb = _reactNative.Platform.OS === 'web';
|
|
19
18
|
const animations = (0, _react.useMemo)(() => [...Array(dotsCount)].map(() => new _reactNative.Animated.Value(0)), [dotsCount]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ThreeDotsLoader","dotsCount","animationDuration","backgroundColor","isWeb","Platform","OS","animations","useMemo","Array","map","Animated","Value","useEffect","animationsArray","anim","index","sequence","timing","toValue","duration","useNativeDriver","delay","loop","parallel","start","jsx","View","style","styles","container","children","translateY","interpolate","inputRange","outputRange","dot","transform","exports","StyleSheet","create","flexDirection","justifyContent","alignItems","borderRadius","height","width","marginHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAmE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAA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,KAMN,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAAAsB,OAAA,CAAAtC,eAAA,GAAAA,eAAA;AAED,MAAM6B,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDP,GAAG,EAAE;IACHQ,YAAY,EAAE,CAAC;IACfC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TEXT_TO_SPEECH_CONFIG = exports.
|
|
7
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
6
|
+
exports.TEXT_TO_SPEECH_CONFIG = exports.KATEX_REPLACEMENTS_REVERSE = exports.KATEX_REPLACEMENTS = exports.DEFAULT_VOICE = exports.AUDIO_CONFIG = void 0;
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
var _modelTypes = require("./types/model.types.js");
|
|
10
|
-
var _styleTypes = require("./types/style.types.js");
|
|
11
8
|
const AUDIO_CONFIG = exports.AUDIO_CONFIG = {
|
|
12
9
|
audioEncoding: 'LINEAR16',
|
|
13
10
|
pitch: 0,
|
|
@@ -40,36 +37,4 @@ const KATEX_REPLACEMENTS = exports.KATEX_REPLACEMENTS = {
|
|
|
40
37
|
const KATEX_REPLACEMENTS_REVERSE = exports.KATEX_REPLACEMENTS_REVERSE = {
|
|
41
38
|
__KATEX_DOLLAR_SYMBOL__: '$'
|
|
42
39
|
};
|
|
43
|
-
const MESSAGE_COLORS_MAP = exports.MESSAGE_COLORS_MAP = {
|
|
44
|
-
[_styleTypes.ColorScheme.Blue]: {
|
|
45
|
-
[_modelTypes.MessageVariant.RECEIVED]: {
|
|
46
|
-
background: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
47
|
-
icon: _reactNativeUi.ButtonColor.BLUE
|
|
48
|
-
},
|
|
49
|
-
[_modelTypes.MessageVariant.SENT]: {
|
|
50
|
-
background: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
51
|
-
icon: _reactNativeUi.ButtonColor.BLUE
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
[_styleTypes.ColorScheme.Yellow]: {
|
|
55
|
-
[_modelTypes.MessageVariant.RECEIVED]: {
|
|
56
|
-
background: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
57
|
-
icon: _reactNativeUi.ButtonColor.YELLOW
|
|
58
|
-
},
|
|
59
|
-
[_modelTypes.MessageVariant.SENT]: {
|
|
60
|
-
background: _reactNativeUi.COLORS.PRIMARY_YELLOW,
|
|
61
|
-
icon: _reactNativeUi.ButtonColor.YELLOW
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const CONTROLS_COLORS_MAP = exports.CONTROLS_COLORS_MAP = {
|
|
66
|
-
[_styleTypes.ColorScheme.Blue]: {
|
|
67
|
-
hover: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
68
|
-
background: _reactNativeUi.COLORS.PRIMARY_BLUE
|
|
69
|
-
},
|
|
70
|
-
[_styleTypes.ColorScheme.Yellow]: {
|
|
71
|
-
hover: _reactNativeUi.COLORS.PRIMARY_YELLOW,
|
|
72
|
-
background: _reactNativeUi.COLORS.PRIMARY_YELLOW
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
40
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNative","require","AUDIO_CONFIG","exports","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","Platform","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,aAAa,EAAE,UAAU;EACzBC,KAAK,EAAE,CAAC;EACRC,YAAY,EAAE;AAChB,CAAC;AAEM,MAAMC,aAAa,GAAAJ,OAAA,CAAAI,aAAA,GAAG;EAC3BC,YAAY,EAAE,OAAO;EACrBC,IAAI,EAAE;AACR,CAAC;AAEM,MAAMC,qBAAqB,GAAAP,OAAA,CAAAO,qBAAA,GAAGC,qBAAQ,CAACC,MAAM,CAAC;EACnDC,GAAG,EAAE;IACHC,WAAW,EAAE;MACXV,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE,GAAG;MACVC,YAAY,EAAE;IAChB,CAAC;IACDS,KAAK,EAAE;MACLP,YAAY,EAAE,OAAO;MACrBC,IAAI,EAAE;IACR;EACF,CAAC;EACDO,OAAO,EAAE;IACPF,WAAW,EAAEZ,YAAY;IACzBa,KAAK,EAAER;EACT;AACF,CAAC,CAAC;AAEK,MAAMU,kBAAkB,GAAAd,OAAA,CAAAc,kBAAA,GAAG;EAChC,KAAK,EAAE;AACT,CAAU;AAEH,MAAMC,0BAA0B,GAAAf,OAAA,CAAAe,0BAAA,GAAG;EACxCC,uBAAuB,EAAE;AAC3B,CAAU","ignoreList":[]}
|
|
@@ -10,8 +10,6 @@ class ErrorSpottingModel {
|
|
|
10
10
|
errorSpottingPressed = (0, _effector.createEvent)();
|
|
11
11
|
activeDataChanged = (0, _effector.createEvent)();
|
|
12
12
|
spottingHidden = (0, _effector.createEvent)();
|
|
13
|
-
setIsEnabled = (0, _effector.createEvent)();
|
|
14
|
-
$isEnabled = (0, _effector.restore)(this.setIsEnabled, false);
|
|
15
13
|
$validationKey = (0, _effector.createStore)(null);
|
|
16
14
|
$activeData = (0, _effector.createStore)(null).on(this.activeDataChanged, (_, payload) => payload).on(this.spottingHidden, state => {
|
|
17
15
|
if (state) return {
|
|
@@ -127,12 +125,6 @@ class ErrorSpottingModel {
|
|
|
127
125
|
this.activeDataChanged(null);
|
|
128
126
|
this.abortPendingRequest();
|
|
129
127
|
}
|
|
130
|
-
enable() {
|
|
131
|
-
this.setIsEnabled(true);
|
|
132
|
-
}
|
|
133
|
-
disable() {
|
|
134
|
-
this.setIsEnabled(false);
|
|
135
|
-
}
|
|
136
128
|
}
|
|
137
129
|
exports.ErrorSpottingModel = ErrorSpottingModel;
|
|
138
130
|
//# sourceMappingURL=ErrorSpottingModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","createEvent","activeDataChanged","spottingHidden","
|
|
1
|
+
{"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","createEvent","activeDataChanged","spottingHidden","$validationKey","createStore","$activeData","on","_","payload","state","isActive","isDisabled","validationKey","closeTimeout","constructor","api","$currentChatData","$currentChatContext","$isLoading","spotErrorFx","pending","currentThread","strokesValidationKey","sample","clock","doneData","source","chatData","activeSpotting","fn","result","key","currentKey","strokesIds","highlightedStrokeIds","target","context","message","createEffect","Error","strokes","problemDescription","problem","correctAnswer","problemAnswer","userAnswer","answer","hint","then","scheduleClose","watch","spotting","clearTimeout","setTimeout","bindStrokesValidation","$store","abortPendingRequest","isPending","getState","controller","abort","reset","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAwBA,MAAMC,kBAAkB,GAAG,IAAI;AAMxB,MAAMC,kBAAkB,CAAC;EAGdC,oBAAoB,GAAG,IAAAC,qBAAW,EAA4B,CAAC;EAC9DC,iBAAiB,GAAG,IAAAD,qBAAW,E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AAMC,SAAS,GAAG,IAAI,CAAC1C,GAAG,CAACI,WAAW,CAACC,OAAO,CAACsC,QAAQ,CAAC,CAAC;IACzD,IAAID,SAAS,EAAE,IAAI,CAAC1C,GAAG,CAACI,WAAW,CAACwC,UAAU,CAACC,KAAK,CAAC,CAAC;EACxD;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAAC5D,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAACuD,mBAAmB,CAAC,CAAC;EAC5B;AACF;AAACM,OAAA,CAAAhE,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -21,12 +21,6 @@ Object.defineProperty(exports, "ChatbotModel", {
|
|
|
21
21
|
return _ChatBotModel.ChatbotModel;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "ColorScheme", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _styleTypes.ColorScheme;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
24
|
Object.defineProperty(exports, "DefaultMessagesCreator", {
|
|
31
25
|
enumerable: true,
|
|
32
26
|
get: function () {
|
|
@@ -44,5 +38,4 @@ var _ChatBotModel = require("./model/ChatBotModel.js");
|
|
|
44
38
|
var _t2sTypes = require("./types/t2s.types.js");
|
|
45
39
|
var _modelTypes = require("./types/model.types.js");
|
|
46
40
|
var _DefaultMessageCreator = require("./model/DefaultMessageCreator.js");
|
|
47
|
-
var _styleTypes = require("./types/style.types.js");
|
|
48
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator"
|
|
1
|
+
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAMA,IAAAI,sBAAA,GAAAJ,OAAA","ignoreList":[]}
|
|
@@ -14,16 +14,13 @@ var _ChatsCacheModel = require("./ChatsCacheModel.js");
|
|
|
14
14
|
var _ErrorSpottingModel = require("../errorSpotting/ErrorSpottingModel.js");
|
|
15
15
|
var _withEvent = require("../../../lib/effector/withEvent.js");
|
|
16
16
|
var _ChatBoxTextManager = require("./ChatBoxTextManager.js");
|
|
17
|
-
var _ControlledSample = require("../../../lib/effector/ControlledSample.js");
|
|
18
17
|
class ChatbotModel {
|
|
19
18
|
textManager = new _ChatBoxTextManager.ChatBotTextManager();
|
|
20
19
|
defaultMessages = this.textManager.messages;
|
|
21
20
|
threadManager = new _ChatBotThreadManager.ChatBotThreadManager({
|
|
22
21
|
messages: this.defaultMessages
|
|
23
22
|
});
|
|
24
|
-
|
|
25
|
-
$currentKey = (0, _effector.restore)(this.setCurrentKey, '');
|
|
26
|
-
unbindCurrentKey = null;
|
|
23
|
+
$currentKey = (0, _effector.createStore)('');
|
|
27
24
|
resetAlternatives = (0, _effector.createEvent)();
|
|
28
25
|
setAlternatives = (0, _effector.createEvent)();
|
|
29
26
|
setIsOpen = (0, _effector.createEvent)();
|
|
@@ -120,38 +117,6 @@ class ChatbotModel {
|
|
|
120
117
|
target: this.$isOpen
|
|
121
118
|
});
|
|
122
119
|
}
|
|
123
|
-
this.startConversation = (0, _effector.attach)({
|
|
124
|
-
source: {
|
|
125
|
-
currentChatData: this.$currentChatData,
|
|
126
|
-
alternatives: this.$alternatives
|
|
127
|
-
},
|
|
128
|
-
mapParams: (props, source) => ({
|
|
129
|
-
...props,
|
|
130
|
-
...source
|
|
131
|
-
}),
|
|
132
|
-
effect: (0, _effector.createEffect)(({
|
|
133
|
-
currentChatData,
|
|
134
|
-
alternatives,
|
|
135
|
-
initOnly
|
|
136
|
-
}) => {
|
|
137
|
-
const {
|
|
138
|
-
key,
|
|
139
|
-
messages
|
|
140
|
-
} = currentChatData;
|
|
141
|
-
if (!alternatives?.chatAccess) return;
|
|
142
|
-
if (messages.length) {
|
|
143
|
-
if (initOnly) return;
|
|
144
|
-
return this.reinitConversation({
|
|
145
|
-
key
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
this.cache.add(key, {
|
|
149
|
-
messages: [this.defaultMessages.start],
|
|
150
|
-
isAvailable: true,
|
|
151
|
-
currentThread: null
|
|
152
|
-
});
|
|
153
|
-
})
|
|
154
|
-
});
|
|
155
120
|
}
|
|
156
121
|
createSendHelpRequestFx() {
|
|
157
122
|
const effect = (0, _effector.attach)({
|
|
@@ -217,26 +182,20 @@ class ChatbotModel {
|
|
|
217
182
|
return effect;
|
|
218
183
|
}
|
|
219
184
|
bindKey($store) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
this
|
|
223
|
-
this.threadManager.setCurrentKey(value);
|
|
185
|
+
(0, _effector.sample)({
|
|
186
|
+
source: $store,
|
|
187
|
+
target: this.$currentKey
|
|
224
188
|
});
|
|
225
|
-
|
|
226
|
-
this.setCurrentKey(initialValue);
|
|
227
|
-
this.threadManager.setCurrentKey(initialValue);
|
|
189
|
+
this.threadManager.bindKeyStore($store);
|
|
228
190
|
return this;
|
|
229
191
|
}
|
|
230
|
-
bindExternalTranslationState($
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
isActiveDefault: true
|
|
238
|
-
});
|
|
239
|
-
}
|
|
192
|
+
bindExternalTranslationState($store) {
|
|
193
|
+
(0, _effector.sample)({
|
|
194
|
+
source: $store,
|
|
195
|
+
clock: [this.$currentKey.updates, this.startConversation.done],
|
|
196
|
+
filter: isTranslated => !!isTranslated,
|
|
197
|
+
target: this.translation.translateAllMessagesFx
|
|
198
|
+
});
|
|
240
199
|
return this;
|
|
241
200
|
}
|
|
242
201
|
setUpT2S(config) {
|
|
@@ -249,6 +208,30 @@ class ChatbotModel {
|
|
|
249
208
|
return this;
|
|
250
209
|
}
|
|
251
210
|
sendHelpRequestFx = this.createSendHelpRequestFx();
|
|
211
|
+
startConversation = (0, _effector.attach)({
|
|
212
|
+
source: this.$currentChatData,
|
|
213
|
+
mapParams: (props, source) => ({
|
|
214
|
+
...props,
|
|
215
|
+
...source
|
|
216
|
+
}),
|
|
217
|
+
effect: (0, _effector.createEffect)(({
|
|
218
|
+
key,
|
|
219
|
+
messages,
|
|
220
|
+
initOnly
|
|
221
|
+
}) => {
|
|
222
|
+
if (messages.length) {
|
|
223
|
+
if (initOnly) return;
|
|
224
|
+
return this.reinitConversation({
|
|
225
|
+
key
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
this.cache.add(key, {
|
|
229
|
+
messages: [this.defaultMessages.start],
|
|
230
|
+
isAvailable: true,
|
|
231
|
+
currentThread: null
|
|
232
|
+
});
|
|
233
|
+
})
|
|
234
|
+
});
|
|
252
235
|
setHintMessage({
|
|
253
236
|
key,
|
|
254
237
|
...message
|
|
@@ -298,17 +281,6 @@ class ChatbotModel {
|
|
|
298
281
|
this.threadManager.reset();
|
|
299
282
|
this.errorSpotting.reset();
|
|
300
283
|
});
|
|
301
|
-
unbindKey() {
|
|
302
|
-
this.unbindCurrentKey?.();
|
|
303
|
-
this.unbindCurrentKey = null;
|
|
304
|
-
this.setCurrentKey('');
|
|
305
|
-
this.threadManager.setCurrentKey('');
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
|
-
unbindExternalTranslationState() {
|
|
309
|
-
this.externalTranslationStateSync?.disable();
|
|
310
|
-
return this;
|
|
311
|
-
}
|
|
312
284
|
}
|
|
313
285
|
exports.ChatbotModel = ChatbotModel;
|
|
314
286
|
//# sourceMappingURL=ChatBotModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_ChatbotApi","_translation","_t2s","_messagesHelper","_ChatBotThreadManager","_ChatsCacheModel","_ErrorSpottingModel","_withEvent","_ChatBoxTextManager","_ControlledSample","ChatbotModel","textManager","ChatBotTextManager","defaultMessages","messages","threadManager","ChatBotThreadManager","setCurrentKey","createEvent","$currentKey","restore","unbindCurrentKey","resetAlternatives","setAlternatives","setIsOpen","toggleOpen","$isOpen","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","cache","ChatsCacheModel","$currentChatData","combine","data","$data","key","defaultChatData","constructor","api","$key","threadMessagesLimit","settings","ChatbotAPI","postMessage","setApi","getHint","requestHint","setMessagesLimit","$alternatives","getAlternativesFx","doneData","_","payload","reset","t2s","ChatTextToSpeechModel","translation","ChatbotTranslation","alternativesModel","$store","set","chats","errorSpotting","ErrorSpottingModel","$currentChatContext","bindKey","sample","source","updates","filter","target","spottingHidden","clock","fn","lastMessageKey","chatsData","chat","updatedMessages","pop","update","closeOnKeyChange","startConversation","attach","currentChatData","alternatives","mapParams","props","effect","createEffect","initOnly","chatAccess","length","reinitConversation","add","start","isAvailable","currentThread","createSendHelpRequestFx","params","context","message","translatedMessage","Error","addMessages","messagesHelper","createOwn","response","postMessageFx","problem","language","problemAnswer","answer","imageAltText","imageDescription","thread","get","createAnswer","isInitial","history","endMessage","push","createLast","translatedMessages","applyTranslationFx","fail","error","watch","value","initialValue","getState","bindExternalTranslationState","$isTranslated","externalTranslationStateSync","ControlledSample","done","flag","translateAllMessagesFx","isActiveDefault","setUpT2S","config","setConfig","setDrawBoardAdapter","adapter","bindStrokesValidation","$strokesValidationKey","sendHelpRequestFx","setHintMessage","options","hints","setSingleMessage","reinitChatThread","initialOption","anotherHintOption","disableChat","stop","softReset","isLoading","pending","hasPendingMessage","controller","abort","abortPendingRequest","withEvent","unbindKey","unbindExternalTranslationState","disable","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAA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AK;MACnD,IAAIA,iBAAiB,EAAE;QACrB,IAAI,CAACxH,GAAG,CAACqE,aAAa,CAACoD,UAAU,CAACC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC1I,iBAAiB,CAAC,CAAC;MAC1B;MACA,IAAI,CAACwC,aAAa,CAACmG,mBAAmB,CAAC,CAAC;MAExC,IAAI,CAAC3G,GAAG,CAACoG,IAAI,CAAC,CAAC;MACf,KAAK,IAAI,CAACpG,GAAG,CAACD,KAAK,CAAC,CAAC;MACrB,IAAI,CAAC1B,eAAe,CAAC,KAAK,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEc0B,KAAK,GAAG,IAAA6G,oBAAS,EAAC,MAAM;IACtC,IAAI,CAACrI,KAAK,CAACwB,KAAK,CAAC,CAAC;IAClB,IAAI,CAACtC,iBAAiB,CAAC,CAAC;IACxB,IAAI,CAACP,aAAa,CAAC6C,KAAK,CAAC,CAAC;IAC1B,IAAI,CAACS,aAAa,CAACT,KAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;EAEK8G,SAASA,CAAA,EAAG;IACjB,IAAI,CAACrJ,gBAAgB,GAAG,CAAC;IACzB,IAAI,CAACA,gBAAgB,GAAG,IAAI;IAE5B,IAAI,CAACJ,aAAa,CAAC,EAAE,CAAC;IACtB,IAAI,CAACF,aAAa,CAACE,aAAa,CAAC,EAAE,CAAC;IACpC,OAAO,IAAI;EACb;EAEO0J,8BAA8BA,CAAA,EAAG;IACtC,IAAI,CAAChC,4BAA4B,EAAEiC,OAAO,CAAC,CAAC;IAC5C,OAAO,IAAI;EACb;AACF;AAACC,OAAA,CAAAnK,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_effector","require","_ChatbotApi","_translation","_t2s","_messagesHelper","_ChatBotThreadManager","_ChatsCacheModel","_ErrorSpottingModel","_withEvent","_ChatBoxTextManager","ChatbotModel","textManager","ChatBotTextManager","defaultMessages","messages","threadManager","ChatBotThreadManager","$currentKey","createStore","resetAlternatives","createEvent","setAlternatives","setIsOpen","toggleOpen","$isOpen","restore","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","cache","ChatsCacheModel","$currentChatData","combine","data","$data","key","defaultChatData","constructor","api","$key","threadMessagesLimit","settings","ChatbotAPI","postMessage","setApi","getHint","requestHint","setMessagesLimit","$alternatives","getAlternativesFx","doneData","_","payload","reset","t2s","ChatTextToSpeechModel","translation","ChatbotTranslation","alternativesModel","$store","set","chats","errorSpotting","ErrorSpottingModel","$currentChatContext","bindKey","sample","source","updates","filter","target","spottingHidden","clock","fn","lastMessageKey","chatsData","chat","updatedMessages","pop","update","closeOnKeyChange","createSendHelpRequestFx","effect","attach","mapParams","params","context","message","translatedMessage","createEffect","Error","addMessages","messagesHelper","createOwn","response","postMessageFx","problem","language","problemAnswer","answer","imageAltText","imageDescription","thread","get","createAnswer","isInitial","history","length","endMessage","push","createLast","translatedMessages","applyTranslationFx","fail","error","bindKeyStore","bindExternalTranslationState","startConversation","done","isTranslated","translateAllMessagesFx","setUpT2S","config","setConfig","setDrawBoardAdapter","adapter","bindStrokesValidation","$strokesValidationKey","sendHelpRequestFx","props","initOnly","reinitConversation","add","start","isAvailable","currentThread","setHintMessage","options","getState","hints","setSingleMessage","reinitChatThread","initialOption","anotherHintOption","disableChat","stop","softReset","isLoading","pending","hasPendingMessage","controller","abort","abortPendingRequest","withEvent","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAqBA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,G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S,GAAG,IAAA/D,gBAAM,EAAC;IACxBhB,MAAM,EAAE;MACNgF,SAAS,EAAE,IAAI,CAACnB,iBAAiB,CAACoB,OAAO;MACzC1E,cAAc,EAAE,IAAI,CAAClD;IACvB,CAAC;IACD4D,SAAS,EAAEA,CAACjC,CAAO,EAAE;MAAEgG,SAAS;MAAEzE;IAAe,CAAC,KAAK,CAAC,EAAEyE,SAAS,IAAIzE,cAAc,CAAC;IACtFQ,MAAM,EAAE,IAAAO,sBAAY,EAAE4D,iBAA0B,IAAK;MACnD,IAAIA,iBAAiB,EAAE;QACrB,IAAI,CAAC/G,GAAG,CAACyD,aAAa,CAACuD,UAAU,CAACC,KAAK,CAAC,CAAC;QACzC,IAAI,CAACjI,iBAAiB,CAAC,CAAC;MAC1B;MACA,IAAI,CAACwC,aAAa,CAAC0F,mBAAmB,CAAC,CAAC;MAExC,IAAI,CAAClG,GAAG,CAAC2F,IAAI,CAAC,CAAC;MACf,KAAK,IAAI,CAAC3F,GAAG,CAACD,KAAK,CAAC,CAAC;MACrB,IAAI,CAAC1B,eAAe,CAAC,KAAK,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEc0B,KAAK,GAAG,IAAAoG,oBAAS,EAAC,MAAM;IACtC,IAAI,CAAC5H,KAAK,CAACwB,KAAK,CAAC,CAAC;IAClB,IAAI,CAACxC,iBAAiB,CAAC,CAAC;IACxB,IAAI,CAACJ,aAAa,CAAC4C,KAAK,CAAC,CAAC;IAC1B,IAAI,CAACS,aAAa,CAACT,KAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;AACJ;AAACqG,OAAA,CAAAtJ,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ class ChatBotThreadManager {
|
|
|
11
11
|
drawBoardAdapter = null;
|
|
12
12
|
threads = new Map();
|
|
13
13
|
currentKey = '';
|
|
14
|
+
currentBinding = null;
|
|
14
15
|
constructor({
|
|
15
16
|
drawBoardAdapter,
|
|
16
17
|
api,
|
|
@@ -22,6 +23,13 @@ class ChatBotThreadManager {
|
|
|
22
23
|
this.messagesLimit = messagesLimit;
|
|
23
24
|
this.defaultMessages = messages;
|
|
24
25
|
}
|
|
26
|
+
bindKeyStore($store) {
|
|
27
|
+
this.currentBinding?.();
|
|
28
|
+
this.currentBinding = $store.watch(value => {
|
|
29
|
+
this.currentKey = value;
|
|
30
|
+
});
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
25
33
|
async getThreadItem() {
|
|
26
34
|
const key = this.currentKey;
|
|
27
35
|
const existingThreadItem = this.threads.get(key);
|
|
@@ -86,9 +94,6 @@ class ChatBotThreadManager {
|
|
|
86
94
|
this.api = api;
|
|
87
95
|
return this;
|
|
88
96
|
}
|
|
89
|
-
setCurrentKey(key) {
|
|
90
|
-
this.currentKey = key;
|
|
91
|
-
}
|
|
92
97
|
}
|
|
93
98
|
exports.ChatBotThreadManager = ChatBotThreadManager;
|
|
94
99
|
//# sourceMappingURL=ChatBotThreadManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ThreadItem","require","_constants","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","ThreadItem","set","content","getContent","setValidationKey","validationKey","text","setText","strokes","length","setStrokes","setDrawBoardAdapter","adapter","postMessage","problemAnswer","problem","answer","language","imageAltText","Error","result","getHint","getNextHintProps","correctAnswer","problemDescription","userAnswer","history","push","message","nextOptions","anotherHintOption","options","endMessage","threadId","id","reset","delete","clear","setMessagesLimit","limit","setApi","
|
|
1
|
+
{"version":3,"names":["_ThreadItem","require","_constants","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","currentBinding","constructor","messagesLimit","CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT","messages","defaultMessages","bindKeyStore","$store","watch","value","getThreadItem","key","existingThreadItem","get","threadItem","ThreadItem","set","content","getContent","setValidationKey","validationKey","text","setText","strokes","length","setStrokes","setDrawBoardAdapter","adapter","postMessage","problemAnswer","problem","answer","language","imageAltText","Error","result","getHint","getNextHintProps","correctAnswer","problemDescription","userAnswer","history","push","message","nextOptions","anotherHintOption","options","endMessage","threadId","id","reset","delete","clear","setMessagesLimit","limit","setApi","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,UAAA,GAAAD,OAAA;AAaO,MAAME,oBAAoB,CAAC;EACxBC,GAAG,GAA4B,IAAI;EACnCC,gBAAgB,GAAiC,IAAI;EAC5CC,OAAO,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGhDC,UAAU,GAAG,EAAE;EACfC,cAAc,GAAwB,IAAI;EAI3CC,WAAWA,CAAC;IACjBL,gBAAgB;IAChBD,GAAG;IACHO,aAAa,GAAGC,kCAAuB,CAACC,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIV,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACM,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACI,eAAe,GAAGD,QAAQ;EACjC;EAEOE,YAAYA,CAACC,MAAqB,EAAE;IACzC,IAAI,CAACR,cAAc,GAAG,CAAC;IACvB,IAAI,CAACA,cAAc,GAAGQ,MAAM,CAACC,KAAK,CAAEC,KAAK,IAAK;MAC5C,IAAI,CAACX,UAAU,GAAGW,KAAK;IACzB,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEA,MAAcC,aAAaA,CAAA,EAAG;IAC5B,MAAMC,GAAG,GAAG,IAAI,CAACb,UAAU;IAC3B,MAAMc,kBAAkB,GAAG,IAAI,CAAChB,OAAO,CAACiB,GAAG,CAACF,GAAG,CA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