@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
|
@@ -2,21 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
-
import { BORDER_RADIUS, COLORS, FONT_FAMILY, SPACING } from '@magmamath/react-native-ui';
|
|
6
|
-
import { MESSAGE_COLORS_MAP } from "../../constants.js";
|
|
7
|
-
import { ColorScheme } from "../../types/style.types.js";
|
|
8
|
-
import { MessageVariant } from "../../types/model.types.js";
|
|
9
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
6
|
export const SentMessage = /*#__PURE__*/React.memo(({
|
|
11
7
|
message,
|
|
12
|
-
isTranslated
|
|
13
|
-
colorScheme = ColorScheme.Blue
|
|
8
|
+
isTranslated
|
|
14
9
|
}) => {
|
|
15
10
|
const text = isTranslated ? message.translatedMessage : message.message;
|
|
16
11
|
return /*#__PURE__*/_jsx(View, {
|
|
17
|
-
style:
|
|
18
|
-
backgroundColor: MESSAGE_COLORS_MAP[colorScheme][MessageVariant.SENT].background
|
|
19
|
-
}],
|
|
12
|
+
style: styles.container,
|
|
20
13
|
children: /*#__PURE__*/_jsx(Text, {
|
|
21
14
|
style: styles.text,
|
|
22
15
|
children: text
|
|
@@ -27,15 +20,16 @@ const styles = StyleSheet.create({
|
|
|
27
20
|
container: {
|
|
28
21
|
alignSelf: 'flex-end',
|
|
29
22
|
maxWidth: 305,
|
|
30
|
-
padding:
|
|
31
|
-
borderRadius:
|
|
32
|
-
borderBottomRightRadius: 0
|
|
23
|
+
padding: 8,
|
|
24
|
+
borderRadius: 8,
|
|
25
|
+
borderBottomRightRadius: 0,
|
|
26
|
+
backgroundColor: '#55ABE0'
|
|
33
27
|
},
|
|
34
28
|
text: {
|
|
35
29
|
fontSize: 20,
|
|
36
30
|
fontWeight: 400,
|
|
37
|
-
fontFamily:
|
|
38
|
-
color:
|
|
31
|
+
fontFamily: 'Buenos Aires',
|
|
32
|
+
color: '#FFF'
|
|
39
33
|
}
|
|
40
34
|
});
|
|
41
35
|
//# sourceMappingURL=SentMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","jsx","_jsx","SentMessage","memo","message","isTranslated","text","translatedMessage","style","styles","container","children","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGrD,OAAO,MAAMC,WAAW,gBAAGN,KAAK,CAACO,IAAI,CAAC,CAAC;EAAEC,OAAO;EAAEC;AAA2B,CAAC,KAAK;EACjF,MAAMC,IAAI,GAAGD,YAAY,GAAGD,OAAO,CAACG,iBAAiB,GAAGH,OAAO,CAACA,OAAO;EAEvE,oBACEH,IAAA,CAACF,IAAI;IAACS,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5BV,IAAA,CAACH,IAAI;MAACU,KAAK,EAAEC,MAAM,CAACH,IAAK;MAAAK,QAAA,EAAEL;IAAI,CAAO;EAAC,CACnC,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMG,MAAM,GAAGZ,UAAU,CAACe,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,uBAAuB,EAAE,CAAC;IAC1BC,eAAe,EAAE;EACnB,CAAC;EACDZ,IAAI,EAAE;IACJa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,7 +7,6 @@ import { ChatMessage } from "../ChatMessage/ChatMessage.js";
|
|
|
7
7
|
import { MessageLoader } from "../ChatMessage/MessageLoader.js";
|
|
8
8
|
import { Alternatives } from "../Alternatives/Alternatives.js";
|
|
9
9
|
import { MessageVariant } from "../../types/model.types.js";
|
|
10
|
-
import { ColorScheme } from "../../types/style.types.js";
|
|
11
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const TOOLBAR_HEIGHT = 140;
|
|
13
12
|
const BOTTOM_OFFSET = Platform.select({
|
|
@@ -17,8 +16,7 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
17
16
|
export const ChatbotMessages = ({
|
|
18
17
|
model,
|
|
19
18
|
isHintFeedback,
|
|
20
|
-
isTextToSpeechEnabled
|
|
21
|
-
colorScheme = ColorScheme.Blue
|
|
19
|
+
isTextToSpeechEnabled
|
|
22
20
|
}) => {
|
|
23
21
|
const dimensions = useWindowDimensions();
|
|
24
22
|
const ref = useRef(null);
|
|
@@ -28,12 +26,10 @@ export const ChatbotMessages = ({
|
|
|
28
26
|
const currentPlayingId = useUnit(model.t2s.$currentPlayingId);
|
|
29
27
|
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
30
28
|
const audioStatus = useUnit(model.t2s.$status);
|
|
31
|
-
const
|
|
29
|
+
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
32
30
|
const messages = useStoreMap(model.$currentChatData, ({
|
|
33
31
|
messages
|
|
34
32
|
}) => messages);
|
|
35
|
-
const lastMessageId = messages.at(-1)?.id;
|
|
36
|
-
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
37
33
|
const askChatForHelp = (message, translatedMessage) => {
|
|
38
34
|
void model.sendHelpRequestFx({
|
|
39
35
|
message,
|
|
@@ -58,11 +54,8 @@ export const ChatbotMessages = ({
|
|
|
58
54
|
style: styles.gap,
|
|
59
55
|
children: [messages.map(message => /*#__PURE__*/_jsx(ChatMessage, {
|
|
60
56
|
isTranslated: isTranslated,
|
|
61
|
-
withIcon: !message.isOwnMessage && message.id === lastMessageId,
|
|
62
57
|
message: message,
|
|
63
58
|
variant: message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
64
|
-
colorScheme: colorScheme,
|
|
65
|
-
withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
|
|
66
59
|
t2sState: {
|
|
67
60
|
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
68
61
|
isActive: message.id === currentPlayingId,
|
|
@@ -70,14 +63,11 @@ export const ChatbotMessages = ({
|
|
|
70
63
|
status: audioStatus,
|
|
71
64
|
disabled: isTextToSpeechPending
|
|
72
65
|
}
|
|
73
|
-
}, message.id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {
|
|
74
|
-
colorScheme: colorScheme
|
|
75
|
-
})]
|
|
66
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {})]
|
|
76
67
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/_jsx(Alternatives, {
|
|
77
68
|
onPressAlternative: askChatForHelp,
|
|
78
69
|
hasMessages: messages.length > 1,
|
|
79
|
-
isHintFeedback: isHintFeedback
|
|
80
|
-
colorScheme: colorScheme
|
|
70
|
+
isHintFeedback: isHintFeedback
|
|
81
71
|
})]
|
|
82
72
|
})
|
|
83
73
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","
|
|
1
|
+
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","$currentChatData","askChatForHelp","message","translatedMessage","style","styles","container","maxHeight","children","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","variant","isOwnMessage","SENT","RECEIVED","t2sState","isEnabled","isActive","id","isLoading","status","disabled","onPressAlternative","hasMessages","length","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAC1F,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,aAAa,QAAQ,iCAA8B;AAC5D,SAASC,YAAY,QAAQ,iCAA8B;AAC3D,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQxD,MAAMC,cAAc,GAAG,GAAG;AAC1B,MAAMC,aAAa,GAAGhB,QAAQ,CAACiB,MAAM,CAAC;EACpCC,GAAG,EAAE,GAAG;EACRC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,KAAK;EACLC,cAAc;EACdC;AACoB,CAAC,KAAK;EAC1B,MAAMC,UAAU,GAAGrB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;IACJwB,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDrB,GAAG,EAAE;IACHiB,IAAI,EAAE,CAAC;IACPjB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
3
|
import { useStoreMap, useUnit } from 'effector-react';
|
|
5
4
|
import { ChatbotMessages } from "./ChatMessages/ChatbotMessages.js";
|
|
6
5
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import { ChatBotModelContext } from "../context/ChatBotModelContext.js";
|
|
8
|
-
import { ColorScheme } from "../types/style.types.js";
|
|
9
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
export const Chatbot = ({
|
|
11
10
|
model,
|
|
@@ -13,8 +12,7 @@ export const Chatbot = ({
|
|
|
13
12
|
isTextToSpeechEnabled = false,
|
|
14
13
|
textToSpeechConfig,
|
|
15
14
|
ButtonWrapper,
|
|
16
|
-
iconSize
|
|
17
|
-
colorScheme = ColorScheme.Blue
|
|
15
|
+
iconSize
|
|
18
16
|
}) => {
|
|
19
17
|
const alternatives = useUnit(model.$alternatives);
|
|
20
18
|
const isAvailable = useStoreMap(model.$currentChatData, ({
|
|
@@ -30,7 +28,6 @@ export const Chatbot = ({
|
|
|
30
28
|
value: model,
|
|
31
29
|
children: [/*#__PURE__*/_jsx(ChatbotMessages, {
|
|
32
30
|
model: model,
|
|
33
|
-
colorScheme: colorScheme,
|
|
34
31
|
isHintFeedback: isHintFeedback,
|
|
35
32
|
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
36
33
|
}), /*#__PURE__*/_jsx(ChatControls, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","ChatBotModelContext","jsx","_jsx","jsxs","_jsxs","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","ButtonWrapper","iconSize","alternatives","$alternatives","isAvailable","$currentChatData","t2s","setAudioConfig","openChat","setIsOpen","closeChat","chatAccess","Provider","value","children","onPressChatIcon","onPressClose"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,YAAY,QAAQ,gCAA6B;AAE1D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,QAAQ,mCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAcpE,OAAO,MAAMC,OAAO,GAAGA,CAAC;EACtBC,KAAK;EACLC,cAAc;EACdC,qBAAqB,GAAG,KAAK;EAC7BC,kBAAkB;EAClBC,aAAa;EACbC;AACY,CAAC,KAAK;EAClB,MAAMC,YAAY,GAAGhB,OAAO,CAACU,KAAK,CAACO,aAAa,CAAC;EACjD,MAAMC,WAAW,GAAGnB,WAAW,CAACW,KAAK,CAACS,gBAAgB,EAAE,CAAC;IAAED;EAAY,CAAC,KAAKA,WAAW,CAAC;EACzFR,KAAK,CAACU,GAAG,CAACC,cAAc,CAACR,kBAAkB,IAAI,IAAI,CAAC;EAEpD,MAAMS,QAAQ,GAAGA,CAAA,KAAMZ,KAAK,CAACa,SAAS,CAAC,IAAI,CAAC;EAC5C,MAAMC,SAAS,GAAGA,CAAA,KAAMd,KAAK,CAACa,SAAS,CAAC,KAAK,CAAC;EAE9C,IAAI,CAACL,WAAW,IAAIF,YAAY,EAAES,UAAU,KAAK,KAAK,EAAE;IACtD,OAAO,IAAI;EACb;EAEA,oBACEjB,KAAA,CAACJ,mBAAmB,CAACsB,QAAQ;IAACC,KAAK,EAAEjB,KAAM;IAAAkB,QAAA,gBACzCtB,IAAA,CAACL,eAAe;MACdS,KAAK,EAAEA,KAAM;MACbC,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA;IAAsB,CAC9C,CAAC,eAEFN,IAAA,CAACJ,YAAY;MACXQ,KAAK,EAAEA,KAAM;MACbmB,eAAe,EAAEP,QAAS;MAC1BQ,YAAY,EAAEN,SAAU;MACxBV,aAAa,EAAEA,aAAc;MAC7BC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useEffect, useMemo } from 'react';
|
|
4
5
|
import { View, Animated, StyleSheet, Platform } from 'react-native';
|
|
5
|
-
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const ThreeDotsLoader = ({
|
|
8
8
|
dotsCount = 3,
|
|
9
9
|
animationDuration = 250,
|
|
10
|
-
backgroundColor =
|
|
10
|
+
backgroundColor = '#55ABE0'
|
|
11
11
|
}) => {
|
|
12
12
|
const isWeb = Platform.OS === 'web';
|
|
13
13
|
const animations = useMemo(() => [...Array(dotsCount)].map(() => new Animated.Value(0)), [dotsCount]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","View","Animated","StyleSheet","Platform","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","View","Animated","StyleSheet","Platform","jsx","_jsx","ThreeDotsLoader","dotsCount","animationDuration","backgroundColor","isWeb","OS","animations","Array","map","Value","animationsArray","anim","index","sequence","timing","toValue","duration","useNativeDriver","delay","loop","parallel","start","style","styles","container","children","translateY","interpolate","inputRange","outputRange","dot","transform","create","flexDirection","justifyContent","alignItems","borderRadius","height","width","marginHorizontal"],"sourceRoot":"../../../../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AC;EAC3D,CAAC,EAAE,CAACf,UAAU,EAAEJ,iBAAiB,CAAC,CAAC;EAEnC,oBACEH,IAAA,CAACL,IAAI;IAAC4B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BnB,UAAU,CAACE,GAAG,CAAC,CAACG,IAAI,EAAEC,KAAK,KAAK;MAC/B,MAAMc,UAAU,GAAGf,IAAI,CAACgB,WAAW,CAAC;QAClCC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;MACrB,CAAC,CAAC;MAEF,oBACE9B,IAAA,CAACJ,QAAQ,CAACD,IAAI;QAEZ4B,KAAK,EAAE,CACLC,MAAM,CAACO,GAAG,EACV;UAAEC,SAAS,EAAE,CAAC;YAAEL;UAAW,CAAC;QAAE,CAAC,EAC/B;UAAEvB;QAAgB,CAAC;MACnB,GALGS,KAMN,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMW,MAAM,GAAG3B,UAAU,CAACoC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDL,GAAG,EAAE;IACHM,YAAY,EAAE,CAAC;IACfC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { ButtonColor, COLORS } from '@magmamath/react-native-ui';
|
|
4
3
|
import { Platform } from 'react-native';
|
|
5
|
-
import { MessageVariant } from "./types/model.types.js";
|
|
6
|
-
import { ColorScheme } from "./types/style.types.js";
|
|
7
4
|
export const AUDIO_CONFIG = {
|
|
8
5
|
audioEncoding: 'LINEAR16',
|
|
9
6
|
pitch: 0,
|
|
@@ -36,36 +33,4 @@ export const KATEX_REPLACEMENTS = {
|
|
|
36
33
|
export const KATEX_REPLACEMENTS_REVERSE = {
|
|
37
34
|
__KATEX_DOLLAR_SYMBOL__: '$'
|
|
38
35
|
};
|
|
39
|
-
export const MESSAGE_COLORS_MAP = {
|
|
40
|
-
[ColorScheme.Blue]: {
|
|
41
|
-
[MessageVariant.RECEIVED]: {
|
|
42
|
-
background: COLORS.NEUTRAL_3,
|
|
43
|
-
icon: ButtonColor.BLUE
|
|
44
|
-
},
|
|
45
|
-
[MessageVariant.SENT]: {
|
|
46
|
-
background: COLORS.PRIMARY_BLUE,
|
|
47
|
-
icon: ButtonColor.BLUE
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
[ColorScheme.Yellow]: {
|
|
51
|
-
[MessageVariant.RECEIVED]: {
|
|
52
|
-
background: COLORS.NEUTRAL_3,
|
|
53
|
-
icon: ButtonColor.YELLOW
|
|
54
|
-
},
|
|
55
|
-
[MessageVariant.SENT]: {
|
|
56
|
-
background: COLORS.PRIMARY_YELLOW,
|
|
57
|
-
icon: ButtonColor.YELLOW
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
export const CONTROLS_COLORS_MAP = {
|
|
62
|
-
[ColorScheme.Blue]: {
|
|
63
|
-
hover: COLORS.PRIMARY_BLUE,
|
|
64
|
-
background: COLORS.PRIMARY_BLUE
|
|
65
|
-
},
|
|
66
|
-
[ColorScheme.Yellow]: {
|
|
67
|
-
hover: COLORS.PRIMARY_YELLOW,
|
|
68
|
-
background: COLORS.PRIMARY_YELLOW
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
36
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Platform","AUDIO_CONFIG","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,YAAY,GAAG;EAC1BC,aAAa,EAAE,UAAU;EACzBC,KAAK,EAAE,CAAC;EACRC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,YAAY,EAAE,OAAO;EACrBC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,MAAMC,qBAAqB,GAAGR,QAAQ,CAACS,MAAM,CAAC;EACnDC,GAAG,EAAE;IACHC,WAAW,EAAE;MACXT,aAAa,EAAE,KAAK;MACpBC,KAAK,EAAE,GAAG;MACVC,YAAY,EAAE;IAChB,CAAC;IACDQ,KAAK,EAAE;MACLN,YAAY,EAAE,OAAO;MACrBC,IAAI,EAAE;IACR;EACF,CAAC;EACDM,OAAO,EAAE;IACPF,WAAW,EAAEV,YAAY;IACzBW,KAAK,EAAEP;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMS,kBAAkB,GAAG;EAChC,KAAK,EAAE;AACT,CAAU;AAEV,OAAO,MAAMC,0BAA0B,GAAG;EACxCC,uBAAuB,EAAE;AAC3B,CAAU","ignoreList":[]}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createEvent, createStore, sample, createEffect
|
|
3
|
+
import { createEvent, createStore, sample, createEffect } from 'effector';
|
|
4
4
|
const AUTO_CLOSE_TIMEOUT = 5000;
|
|
5
5
|
export class ErrorSpottingModel {
|
|
6
6
|
errorSpottingPressed = createEvent();
|
|
7
7
|
activeDataChanged = createEvent();
|
|
8
8
|
spottingHidden = createEvent();
|
|
9
|
-
setIsEnabled = createEvent();
|
|
10
|
-
$isEnabled = restore(this.setIsEnabled, false);
|
|
11
9
|
$validationKey = createStore(null);
|
|
12
10
|
$activeData = createStore(null).on(this.activeDataChanged, (_, payload) => payload).on(this.spottingHidden, state => {
|
|
13
11
|
if (state) return {
|
|
@@ -123,11 +121,5 @@ export class ErrorSpottingModel {
|
|
|
123
121
|
this.activeDataChanged(null);
|
|
124
122
|
this.abortPendingRequest();
|
|
125
123
|
}
|
|
126
|
-
enable() {
|
|
127
|
-
this.setIsEnabled(true);
|
|
128
|
-
}
|
|
129
|
-
disable() {
|
|
130
|
-
this.setIsEnabled(false);
|
|
131
|
-
}
|
|
132
124
|
}
|
|
133
125
|
//# sourceMappingURL=ErrorSpottingModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","sample","createEffect","
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","sample","createEffect","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","activeDataChanged","spottingHidden","$validationKey","$activeData","on","_","payload","state","isActive","isDisabled","validationKey","closeTimeout","constructor","api","$currentChatData","$currentChatContext","$isLoading","spotErrorFx","pending","currentThread","strokesValidationKey","clock","doneData","source","chatData","activeSpotting","fn","result","key","currentKey","strokesIds","highlightedStrokeIds","target","context","message","Error","strokes","problemDescription","problem","correctAnswer","problemAnswer","userAnswer","answer","hint","then","scheduleClose","watch","spotting","clearTimeout","setTimeout","bindStrokesValidation","$store","abortPendingRequest","isPending","getState","controller","abort","reset"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,WAAW,EAAEC,MAAM,EAAEC,YAAY,QAAe,UAAU;AAwBhF,MAAMC,kBAAkB,GAAG,IAAI;AAM/B,OAAO,MAAMC,kBAAkB,CAAC;EAGdC,oBAAoB,GAAGN,WAAW,CAA4B,CAAC;EAC9DO,iBAAiB,GAAGP,WAAW,CAAiC,CAAC;EAClEQ,cAAc,GAAGR,WAAW,CAAC,CAAC;EAE9BS,cAAc,GAAGR,WAAW,CAAgB,IAAI,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ACI,WAAW,CAACsC,UAAU,CAACC,KAAK,CAAC,CAAC;EACxD;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAACzD,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAACoD,mBAAmB,CAAC,CAAC;EAC5B;AACF","ignoreList":[]}
|
|
@@ -5,5 +5,4 @@ export { ChatbotModel } from "./model/ChatBotModel.js";
|
|
|
5
5
|
export { AudioStatus } from "./types/t2s.types.js";
|
|
6
6
|
export { MessageVariant } from "./types/model.types.js";
|
|
7
7
|
export { DefaultMessagesCreator } from "./model/DefaultMessageCreator.js";
|
|
8
|
-
export { ColorScheme } from "./types/style.types.js";
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator"
|
|
1
|
+
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,WAAW,QAA4B,sBAAmB;AACnE,SACEC,cAAc,QAGT,wBAAqB;AAE5B,SAASC,sBAAsB,QAAQ,kCAA+B","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { attach, combine, createEffect, createEvent, restore, sample } from 'effector';
|
|
3
|
+
import { attach, combine, createEffect, createEvent, createStore, restore, sample } from 'effector';
|
|
4
4
|
import { ChatbotAPI } from "./ChatbotApi.js";
|
|
5
5
|
import { ChatbotTranslation } from "./translation.js";
|
|
6
6
|
import { ChatTextToSpeechModel } from "./t2s.js";
|
|
@@ -10,16 +10,13 @@ import { ChatsCacheModel, defaultChatData } from "./ChatsCacheModel.js";
|
|
|
10
10
|
import { ErrorSpottingModel } from "../errorSpotting/ErrorSpottingModel.js";
|
|
11
11
|
import { withEvent } from "../../../lib/effector/withEvent.js";
|
|
12
12
|
import { ChatBotTextManager } from "./ChatBoxTextManager.js";
|
|
13
|
-
import { ControlledSample } from "../../../lib/effector/ControlledSample.js";
|
|
14
13
|
export class ChatbotModel {
|
|
15
14
|
textManager = new ChatBotTextManager();
|
|
16
15
|
defaultMessages = this.textManager.messages;
|
|
17
16
|
threadManager = new ChatBotThreadManager({
|
|
18
17
|
messages: this.defaultMessages
|
|
19
18
|
});
|
|
20
|
-
|
|
21
|
-
$currentKey = restore(this.setCurrentKey, '');
|
|
22
|
-
unbindCurrentKey = null;
|
|
19
|
+
$currentKey = createStore('');
|
|
23
20
|
resetAlternatives = createEvent();
|
|
24
21
|
setAlternatives = createEvent();
|
|
25
22
|
setIsOpen = createEvent();
|
|
@@ -116,38 +113,6 @@ export class ChatbotModel {
|
|
|
116
113
|
target: this.$isOpen
|
|
117
114
|
});
|
|
118
115
|
}
|
|
119
|
-
this.startConversation = attach({
|
|
120
|
-
source: {
|
|
121
|
-
currentChatData: this.$currentChatData,
|
|
122
|
-
alternatives: this.$alternatives
|
|
123
|
-
},
|
|
124
|
-
mapParams: (props, source) => ({
|
|
125
|
-
...props,
|
|
126
|
-
...source
|
|
127
|
-
}),
|
|
128
|
-
effect: createEffect(({
|
|
129
|
-
currentChatData,
|
|
130
|
-
alternatives,
|
|
131
|
-
initOnly
|
|
132
|
-
}) => {
|
|
133
|
-
const {
|
|
134
|
-
key,
|
|
135
|
-
messages
|
|
136
|
-
} = currentChatData;
|
|
137
|
-
if (!alternatives?.chatAccess) return;
|
|
138
|
-
if (messages.length) {
|
|
139
|
-
if (initOnly) return;
|
|
140
|
-
return this.reinitConversation({
|
|
141
|
-
key
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
this.cache.add(key, {
|
|
145
|
-
messages: [this.defaultMessages.start],
|
|
146
|
-
isAvailable: true,
|
|
147
|
-
currentThread: null
|
|
148
|
-
});
|
|
149
|
-
})
|
|
150
|
-
});
|
|
151
116
|
}
|
|
152
117
|
createSendHelpRequestFx() {
|
|
153
118
|
const effect = attach({
|
|
@@ -213,26 +178,20 @@ export class ChatbotModel {
|
|
|
213
178
|
return effect;
|
|
214
179
|
}
|
|
215
180
|
bindKey($store) {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
this
|
|
219
|
-
this.threadManager.setCurrentKey(value);
|
|
181
|
+
sample({
|
|
182
|
+
source: $store,
|
|
183
|
+
target: this.$currentKey
|
|
220
184
|
});
|
|
221
|
-
|
|
222
|
-
this.setCurrentKey(initialValue);
|
|
223
|
-
this.threadManager.setCurrentKey(initialValue);
|
|
185
|
+
this.threadManager.bindKeyStore($store);
|
|
224
186
|
return this;
|
|
225
187
|
}
|
|
226
|
-
bindExternalTranslationState($
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
isActiveDefault: true
|
|
234
|
-
});
|
|
235
|
-
}
|
|
188
|
+
bindExternalTranslationState($store) {
|
|
189
|
+
sample({
|
|
190
|
+
source: $store,
|
|
191
|
+
clock: [this.$currentKey.updates, this.startConversation.done],
|
|
192
|
+
filter: isTranslated => !!isTranslated,
|
|
193
|
+
target: this.translation.translateAllMessagesFx
|
|
194
|
+
});
|
|
236
195
|
return this;
|
|
237
196
|
}
|
|
238
197
|
setUpT2S(config) {
|
|
@@ -245,6 +204,30 @@ export class ChatbotModel {
|
|
|
245
204
|
return this;
|
|
246
205
|
}
|
|
247
206
|
sendHelpRequestFx = this.createSendHelpRequestFx();
|
|
207
|
+
startConversation = attach({
|
|
208
|
+
source: this.$currentChatData,
|
|
209
|
+
mapParams: (props, source) => ({
|
|
210
|
+
...props,
|
|
211
|
+
...source
|
|
212
|
+
}),
|
|
213
|
+
effect: createEffect(({
|
|
214
|
+
key,
|
|
215
|
+
messages,
|
|
216
|
+
initOnly
|
|
217
|
+
}) => {
|
|
218
|
+
if (messages.length) {
|
|
219
|
+
if (initOnly) return;
|
|
220
|
+
return this.reinitConversation({
|
|
221
|
+
key
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
this.cache.add(key, {
|
|
225
|
+
messages: [this.defaultMessages.start],
|
|
226
|
+
isAvailable: true,
|
|
227
|
+
currentThread: null
|
|
228
|
+
});
|
|
229
|
+
})
|
|
230
|
+
});
|
|
248
231
|
setHintMessage({
|
|
249
232
|
key,
|
|
250
233
|
...message
|
|
@@ -294,16 +277,5 @@ export class ChatbotModel {
|
|
|
294
277
|
this.threadManager.reset();
|
|
295
278
|
this.errorSpotting.reset();
|
|
296
279
|
});
|
|
297
|
-
unbindKey() {
|
|
298
|
-
this.unbindCurrentKey?.();
|
|
299
|
-
this.unbindCurrentKey = null;
|
|
300
|
-
this.setCurrentKey('');
|
|
301
|
-
this.threadManager.setCurrentKey('');
|
|
302
|
-
return this;
|
|
303
|
-
}
|
|
304
|
-
unbindExternalTranslationState() {
|
|
305
|
-
this.externalTranslationStateSync?.disable();
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
280
|
}
|
|
309
281
|
//# sourceMappingURL=ChatBotModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attach","combine","createEffect","createEvent","restore","sample","ChatbotAPI","ChatbotTranslation","ChatTextToSpeechModel","messagesHelper","ChatBotThreadManager","ChatsCacheModel","defaultChatData","ErrorSpottingModel","withEvent","ChatBotTextManager","ControlledSample","ChatbotModel","textManager","defaultMessages","messages","threadManager","setCurrentKey","$currentKey","unbindCurrentKey","resetAlternatives","setAlternatives","setIsOpen","toggleOpen","$isOpen","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","cache","$currentChatData","data","$data","key","constructor","api","$key","threadMessagesLimit","settings","postMessage","setApi","getHint","requestHint","setMessagesLimit","$alternatives","getAlternativesFx","doneData","_","payload","reset","t2s","translation","alternativesModel","$store","set","chats","errorSpotting","$currentChatContext","bindKey","source","updates","filter","target","spottingHidden","clock","fn","lastMessageKey","chatsData","chat","updatedMessages","pop","update","closeOnKeyChange","startConversation","currentChatData","alternatives","mapParams","props","effect","initOnly","chatAccess","length","reinitConversation","add","start","isAvailable","currentThread","createSendHelpRequestFx","params","context","message","translatedMessage","Error","addMessages","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","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","unbindKey","unbindExternalTranslationState","disable"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,OAAO,EAAEC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAoB,UAAU;AAYlG,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,kBAAkB,QAAQ,kBAAe;AAClD,SAASC,qBAAqB,QAAmB,UAAO;AACxD,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,eAAe,EAAEC,eAAe,QAAQ,sBAAmB;AACpE,SAASC,kBAAkB,QAAQ,wCAAqC;AACxE,SAASC,SAAS,QAAQ,oCAAiC;AAC3D,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SAASC,gBAAgB,QAAQ,2CAAwC;AAMzE,OAAO,MAAMC,YAAY,CAAC;EACRC,WAAW,GAAG,IAAIH,kBAAkB,CAAC,CAAC;EACrCI,eAAe,GAAG,IAAI,CAACD,WAAW,CAACE,QAAQ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AK,CAAC,CAAC;IAC1B,IAAI,CAACO,aAAa,CAACP,KAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;EAEKqG,SAASA,CAAA,EAAG;IACjB,IAAI,CAACxI,gBAAgB,GAAG,CAAC;IACzB,IAAI,CAACA,gBAAgB,GAAG,IAAI;IAE5B,IAAI,CAACF,aAAa,CAAC,EAAE,CAAC;IACtB,IAAI,CAACD,aAAa,CAACC,aAAa,CAAC,EAAE,CAAC;IACpC,OAAO,IAAI;EACb;EAEO2I,8BAA8BA,CAAA,EAAG;IACtC,IAAI,CAAC9B,4BAA4B,EAAE+B,OAAO,CAAC,CAAC;IAC5C,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["attach","combine","createEffect","createEvent","createStore","restore","sample","ChatbotAPI","ChatbotTranslation","ChatTextToSpeechModel","messagesHelper","ChatBotThreadManager","ChatsCacheModel","defaultChatData","ErrorSpottingModel","withEvent","ChatBotTextManager","ChatbotModel","textManager","defaultMessages","messages","threadManager","$currentKey","resetAlternatives","setAlternatives","setIsOpen","toggleOpen","$isOpen","on","isOpen","removeLastMessage","setLastMessageKey","$lastMessageKey","setContext","$context","setScrollActive","$isScrollActive","cache","$currentChatData","data","$data","key","constructor","api","$key","threadMessagesLimit","settings","postMessage","setApi","getHint","requestHint","setMessagesLimit","$alternatives","getAlternativesFx","doneData","_","payload","reset","t2s","translation","alternativesModel","$store","set","chats","errorSpotting","$currentChatContext","bindKey","source","updates","filter","target","spottingHidden","clock","fn","lastMessageKey","chatsData","chat","updatedMessages","pop","update","closeOnKeyChange","createSendHelpRequestFx","effect","mapParams","params","context","message","translatedMessage","Error","addMessages","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"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotModel.ts"],"mappings":";;AAAA,SACEA,MAAM,EACNC,OAAO,EACPC,YAAY,EACZC,WAAW,EACXC,WAAW,EACXC,OAAO,EACPC,MAAM,QAED,UAAU;AAYjB,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,kBAAkB,QAAQ,kBAAe;AAClD,SAASC,qBAAqB,QAAmB,UAAO;AACxD,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,eAAe,EAAEC,eAAe,QAAQ,sBAAmB;AACpE,SAASC,kBAAkB,QAAQ,wCAAqC;AACxE,SAASC,SAAS,QAAQ,oCAAiC;AAC3D,SAASC,kBAAkB,QAAQ,yBAAsB;AAMzD,OAAO,MAAMC,YAAY,CAAC;EACRC,WAAW,GAAG,IAAIF,kBAAkB,CAAC,CAAC;EACrCG,eAAe,GAAG,IAAI,CAACD,WAAW,CAACE,QAAQ;EAE5CC,aAAa,GAAG,IAAIV,oBAAoB,CAAC;IACvDS,QAAQ,EAAE,IAAI,CAACD;EACjB,CAAC,CAAC;EAOcG,WAAW,GAAGlB,WAAW,CAAC,EAAE,CAAC;EAEpCmB,iBAAiB,GAAGpB,WAAW,CAAC,CAAC;EACjCqB,eAAe,GAAGrB,WAAW,CAAiC,CAAC;EAG/DsB,SAAS,GAAGtB,WAAW,CAAU,CAAC;EAClCuB,UAAU,GAAGvB,WAAW,CAAC,CAAC;EAC1BwB,OAAO,GAAGtB,OAAO,CAAC,IAAI,CAACoB,SAAS,EAAE,KAAK,CAAC,CAACG,EAAE,CAAC,IAAI,CAACF,UAAU,EAAGG,MAAM,IAA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G1C,SAAS,CAAC,MAAM;IACtC,IAAI,CAACsB,KAAK,CAACoB,KAAK,CAAC,CAAC;IAClB,IAAI,CAAClC,iBAAiB,CAAC,CAAC;IACxB,IAAI,CAACF,aAAa,CAACoC,KAAK,CAAC,CAAC;IAC1B,IAAI,CAACO,aAAa,CAACP,KAAK,CAAC,CAAC;EAC5B,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ export class ChatBotThreadManager {
|
|
|
7
7
|
drawBoardAdapter = null;
|
|
8
8
|
threads = new Map();
|
|
9
9
|
currentKey = '';
|
|
10
|
+
currentBinding = null;
|
|
10
11
|
constructor({
|
|
11
12
|
drawBoardAdapter,
|
|
12
13
|
api,
|
|
@@ -18,6 +19,13 @@ export class ChatBotThreadManager {
|
|
|
18
19
|
this.messagesLimit = messagesLimit;
|
|
19
20
|
this.defaultMessages = messages;
|
|
20
21
|
}
|
|
22
|
+
bindKeyStore($store) {
|
|
23
|
+
this.currentBinding?.();
|
|
24
|
+
this.currentBinding = $store.watch(value => {
|
|
25
|
+
this.currentKey = value;
|
|
26
|
+
});
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
21
29
|
async getThreadItem() {
|
|
22
30
|
const key = this.currentKey;
|
|
23
31
|
const existingThreadItem = this.threads.get(key);
|
|
@@ -82,8 +90,5 @@ export class ChatBotThreadManager {
|
|
|
82
90
|
this.api = api;
|
|
83
91
|
return this;
|
|
84
92
|
}
|
|
85
|
-
setCurrentKey(key) {
|
|
86
|
-
this.currentKey = key;
|
|
87
|
-
}
|
|
88
93
|
}
|
|
89
94
|
//# sourceMappingURL=ChatBotThreadManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThreadItem","CHAT_BOT_MODEL_DEFAULTS","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","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","CHAT_BOT_MODEL_DEFAULTS","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","currentBinding","constructor","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","bindKeyStore","$store","watch","value","getThreadItem","key","existingThreadItem","get","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"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AASzC,SAASC,uBAAuB,QAAQ,gBAAa;AAarD,OAAO,MAAMC,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,GAAGT,uBAAuB,CAACU,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIT,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACM,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACG,eAAe,GAAGD,QAAQ;EAC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