@magmamath/students-features 0.6.0 → 0.6.1-2.rc-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 +14 -5
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +6 -2
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +27 -24
- 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 +9 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +18 -5
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +10 -3
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +16 -12
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +14 -8
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +14 -4
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +5 -2
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +2 -1
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +36 -1
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +8 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +7 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +67 -39
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +3 -8
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +12 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +4 -2
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +9 -1
- 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/chatbot/types/style.types.js +12 -0
- package/dist/commonjs/features/chatbot/types/style.types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +2 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +31 -0
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +97 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +43 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +61 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +68 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +75 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/index.js +2 -0
- package/dist/commonjs/features/exampleSolution/components/index.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/constants.js +13 -0
- package/dist/commonjs/features/exampleSolution/constants.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +54 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/index.js +39 -0
- package/dist/commonjs/features/exampleSolution/index.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +22 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +24 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +19 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/types.js +6 -0
- package/dist/commonjs/features/exampleSolution/types.js.map +1 -0
- package/dist/commonjs/features/feedback/model/comments.js +5 -3
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +7 -9
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +62 -0
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +1 -0
- 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 +44 -0
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +46 -0
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +90 -0
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/components/Progress.js +96 -0
- package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/constants.js +34 -0
- package/dist/commonjs/features/gifCelebrations/constants.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js +114 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/index.js +20 -0
- package/dist/commonjs/features/gifCelebrations/index.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +136 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +27 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js +30 -0
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsCache.js.map +1 -0
- package/dist/commonjs/features/gifCelebrations/types/model.types.js +6 -0
- package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +1 -0
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +12 -9
- package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/commonjs/features/problemSelector/constants.js +3 -6
- package/dist/commonjs/features/problemSelector/constants.js.map +1 -1
- package/dist/commonjs/index.js +36 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/ControlledSample.js +40 -0
- package/dist/commonjs/lib/effector/ControlledSample.js.map +1 -0
- package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/react-app-env.d.js +2 -0
- package/dist/commonjs/react-app-env.d.js.map +1 -0
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +681 -0
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +616 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/commonjs/shared/icons/index.js +204 -0
- package/dist/commonjs/shared/icons/index.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +5 -1
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +33 -0
- package/dist/commonjs/shared/translation/localization/en.json +13 -1
- package/dist/commonjs/shared/translation/localization/gb.json +13 -1
- package/dist/commonjs/shared/translation/localization/sct.json +33 -0
- package/dist/commonjs/shared/translation/localization/sw.json +13 -1
- package/dist/commonjs/shared/translation/types.js +2 -0
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/commonjs/types/common.types.js +2 -0
- package/dist/commonjs/types/common.types.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +6 -2
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +29 -27
- 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 +9 -4
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +18 -5
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +10 -3
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +16 -12
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -4
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +14 -8
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +14 -4
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +5 -2
- 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 +35 -0
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +9 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +1 -1
- package/dist/module/features/chatbot/index.js +1 -0
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +68 -40
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +3 -8
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +12 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +4 -2
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/constants.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +9 -1
- 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/chatbot/types/style.types.js +8 -0
- package/dist/module/features/chatbot/types/style.types.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +3 -1
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +25 -0
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +91 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js +35 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js +53 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js +60 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js +67 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/components/index.js +2 -0
- package/dist/module/features/exampleSolution/components/index.js.map +1 -0
- package/dist/module/features/exampleSolution/constants.js +9 -0
- package/dist/module/features/exampleSolution/constants.js.map +1 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +49 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/module/features/exampleSolution/index.js +6 -0
- package/dist/module/features/exampleSolution/index.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +17 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +19 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +14 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/module/features/exampleSolution/types.js +4 -0
- package/dist/module/features/exampleSolution/types.js.map +1 -0
- package/dist/module/features/feedback/model/comments.js +5 -3
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +7 -9
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/features/gifCelebrations/GifCelebrations.js +55 -0
- package/dist/module/features/gifCelebrations/GifCelebrations.js.map +1 -0
- 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 +36 -0
- package/dist/module/features/gifCelebrations/components/Backdrop.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/ContentContainer.js +38 -0
- package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/Gif.js +82 -0
- package/dist/module/features/gifCelebrations/components/Gif.js.map +1 -0
- package/dist/module/features/gifCelebrations/components/Progress.js +88 -0
- package/dist/module/features/gifCelebrations/components/Progress.js.map +1 -0
- package/dist/module/features/gifCelebrations/constants.js +30 -0
- package/dist/module/features/gifCelebrations/constants.js.map +1 -0
- package/dist/module/features/gifCelebrations/helpers.js +103 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -0
- package/dist/module/features/gifCelebrations/index.js +5 -0
- package/dist/module/features/gifCelebrations/index.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +131 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +22 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js +25 -0
- package/dist/module/features/gifCelebrations/model/GifCelebrationsCache.js.map +1 -0
- package/dist/module/features/gifCelebrations/types/model.types.js +4 -0
- package/dist/module/features/gifCelebrations/types/model.types.js.map +1 -0
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +13 -10
- package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -1
- package/dist/module/features/problemSelector/constants.js +2 -5
- package/dist/module/features/problemSelector/constants.js.map +1 -1
- package/dist/module/index.js +3 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/ControlledSample.js +35 -0
- package/dist/module/lib/effector/ControlledSample.js.map +1 -0
- package/dist/module/lib/effector/createControllerEffect.js.map +1 -1
- package/dist/module/react-app-env.d.js +2 -0
- package/dist/module/react-app-env.d.js.map +1 -0
- package/dist/module/shared/icons/ExcitedLavaIcon.js +673 -0
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js +608 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/module/shared/icons/index.js +21 -0
- package/dist/module/shared/icons/index.js.map +1 -0
- package/dist/module/shared/translation/constants.js +5 -1
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +33 -0
- package/dist/module/shared/translation/localization/en.json +13 -1
- package/dist/module/shared/translation/localization/gb.json +13 -1
- package/dist/module/shared/translation/localization/sct.json +33 -0
- package/dist/module/shared/translation/localization/sw.json +13 -1
- package/dist/module/shared/translation/types.js +2 -0
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/module/types/common.types.js +2 -0
- package/dist/module/types/common.types.js.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- 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 +2 -1
- 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 +5 -1
- 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 +6 -1
- 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 +7 -2
- 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 +6 -1
- 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 +5 -1
- 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 +3 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +4 -3
- 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 +33 -0
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +7 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +1 -3
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +5 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/constants.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 +5 -2
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts +5 -0
- package/dist/typescript/commonjs/features/chatbot/types/style.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/index.d.ts +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +15 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +12 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +25 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +10 -0
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +26 -0
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +29 -0
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +25 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +7 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts +18 -0
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +45 -0
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +2 -5
- package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +3 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts +17 -0
- package/dist/typescript/commonjs/lib/effector/ControlledSample.d.ts.map +1 -0
- 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/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts +19 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +24 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +3 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +5 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- 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 +2 -1
- 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 +5 -1
- 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 +6 -1
- 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 +7 -2
- 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 +6 -1
- 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 +5 -1
- 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 +3 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +4 -3
- 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 +33 -0
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +7 -2
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +1 -3
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +5 -0
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/constants.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 +5 -2
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts +5 -0
- package/dist/typescript/module/features/chatbot/types/style.types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/index.d.ts +1 -0
- package/dist/typescript/module/features/exampleSolution/components/index.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +15 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +12 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts +25 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +10 -0
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts +26 -0
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +29 -0
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/index.d.ts +3 -0
- package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +25 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +7 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts +18 -0
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsCache.d.ts.map +1 -0
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +45 -0
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +1 -0
- package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -1
- package/dist/typescript/module/features/problemSelector/constants.d.ts +2 -5
- package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +3 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts +17 -0
- package/dist/typescript/module/lib/effector/ControlledSample.d.ts.map +1 -0
- 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/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/index.d.ts +19 -0
- package/dist/typescript/module/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +24 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +3 -1
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +5 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +5 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -0
- package/package.json +11 -7
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +6 -0
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +28 -29
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +6 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +24 -4
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +39 -6
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +11 -3
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +28 -7
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +25 -5
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +24 -13
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +13 -3
- package/src/features/chatbot/components/Chatbot.tsx +6 -2
- package/src/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx +7 -10
- package/src/features/chatbot/constants.ts +37 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +11 -1
- package/src/features/chatbot/index.ts +1 -0
- package/src/features/chatbot/model/ChatBotModel.ts +66 -42
- package/src/features/chatbot/model/ChatBotThreadManager.ts +4 -10
- package/src/features/chatbot/model/ChatBoxTextManager.ts +14 -1
- package/src/features/chatbot/model/DefaultMessageCreator.ts +4 -2
- package/src/features/chatbot/model/constants.ts +0 -2
- package/src/features/chatbot/model/translation.ts +11 -1
- package/src/features/chatbot/types/model.types.ts +5 -2
- package/src/features/chatbot/types/style.types.ts +4 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +3 -0
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +29 -0
- package/src/features/exampleSolution/assets/grid.png +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +78 -0
- package/src/features/exampleSolution/components/LavaIcon.tsx +33 -0
- package/src/features/exampleSolution/components/MessageBlock.tsx +67 -0
- package/src/features/exampleSolution/components/QuestionSection.tsx +56 -0
- package/src/features/exampleSolution/components/SolutionSection.tsx +69 -0
- package/src/features/exampleSolution/components/index.ts +0 -0
- package/src/features/exampleSolution/constants.ts +5 -0
- package/src/features/exampleSolution/hooks/useExampleSolution.ts +64 -0
- package/src/features/exampleSolution/index.ts +3 -0
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +12 -0
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +23 -0
- package/src/features/exampleSolution/model/ExampleSolutionCache.ts +20 -0
- package/src/features/exampleSolution/types.ts +25 -0
- package/src/features/feedback/model/comments.ts +7 -7
- package/src/features/feedback/model/model.ts +6 -6
- package/src/features/gifCelebrations/GifCelebrations.tsx +75 -0
- 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 +41 -0
- package/src/features/gifCelebrations/components/ContentContainer.tsx +44 -0
- package/src/features/gifCelebrations/components/Gif.tsx +88 -0
- package/src/features/gifCelebrations/components/Progress.tsx +106 -0
- package/src/features/gifCelebrations/constants.ts +32 -0
- package/src/features/gifCelebrations/helpers.ts +144 -0
- package/src/features/gifCelebrations/index.ts +2 -0
- package/src/features/gifCelebrations/model/GifCelebrations.model.ts +167 -0
- package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +26 -0
- package/src/features/gifCelebrations/model/GifCelebrationsCache.ts +41 -0
- package/src/features/gifCelebrations/types/model.types.ts +53 -0
- package/src/features/problemSelector/components/ProblemSelectorButton.tsx +17 -10
- package/src/features/problemSelector/constants.ts +3 -2
- package/src/index.ts +3 -0
- package/src/lib/effector/ControlledSample.ts +40 -0
- package/src/lib/effector/createControllerEffect.ts +41 -41
- package/src/lib/helpers/helpers.ts +1 -1
- package/src/react-app-env.d.ts +6 -0
- package/src/shared/icons/ExcitedLavaIcon.tsx +541 -0
- package/src/shared/icons/LavaIconInGlasses.tsx +489 -0
- package/src/shared/icons/index.ts +18 -0
- package/src/shared/translation/constants.ts +4 -0
- package/src/shared/translation/localization/ca.json +33 -0
- package/src/shared/translation/localization/en.json +13 -1
- package/src/shared/translation/localization/gb.json +13 -1
- package/src/shared/translation/localization/sct.json +33 -0
- package/src/shared/translation/localization/sw.json +13 -1
- package/src/shared/translation/types.ts +6 -0
- package/src/shared/translation/validation.types.ts +9 -1
- package/src/types/common.types.ts +4 -0
- package/dist/commonjs/shared/icons/LockIcon.js +0 -31
- package/dist/commonjs/shared/icons/LockIcon.js.map +0 -1
- package/dist/module/shared/icons/LockIcon.js +0 -23
- package/dist/module/shared/icons/LockIcon.js.map +0 -1
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/LockIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +0 -1
- package/src/shared/icons/LockIcon.tsx +0 -16
|
@@ -1 +1 @@
|
|
|
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","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_constants","_styleTypes","_modelTypes","_jsxRuntime","e","__esModule","default","SentMessage","exports","React","memo","message","isTranslated","colorScheme","ColorScheme","Blue","text","translatedMessage","jsx","View","style","styles","container","backgroundColor","MESSAGE_COLORS_MAP","MessageVariant","SENT","background","children","Text","StyleSheet","create","alignSelf","maxWidth","padding","SPACING","borderRadius","BORDER_RADIUS","borderBottomRightRadius","fontSize","fontWeight","fontFamily","FONT_FAMILY","buenosAires","color","COLORS","NEUTRAL_1"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAC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","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ 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");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
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); }
|
|
16
17
|
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; }
|
|
@@ -22,7 +23,8 @@ const BOTTOM_OFFSET = _reactNative.Platform.select({
|
|
|
22
23
|
const ChatbotMessages = ({
|
|
23
24
|
model,
|
|
24
25
|
isHintFeedback,
|
|
25
|
-
isTextToSpeechEnabled
|
|
26
|
+
isTextToSpeechEnabled,
|
|
27
|
+
colorScheme = _styleTypes.ColorScheme.Blue
|
|
26
28
|
}) => {
|
|
27
29
|
const dimensions = (0, _reactNative.useWindowDimensions)();
|
|
28
30
|
const ref = (0, _react.useRef)(null);
|
|
@@ -32,10 +34,12 @@ const ChatbotMessages = ({
|
|
|
32
34
|
const currentPlayingId = (0, _effectorReact.useUnit)(model.t2s.$currentPlayingId);
|
|
33
35
|
const isTranslated = (0, _effectorReact.useUnit)(model.translation.$isTranslated);
|
|
34
36
|
const audioStatus = (0, _effectorReact.useUnit)(model.t2s.$status);
|
|
35
|
-
const
|
|
37
|
+
const errorSpottingEnabled = (0, _effectorReact.useUnit)(model.errorSpotting.$isEnabled);
|
|
36
38
|
const messages = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
37
39
|
messages
|
|
38
40
|
}) => messages);
|
|
41
|
+
const lastMessageId = messages.at(-1)?.id;
|
|
42
|
+
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET;
|
|
39
43
|
const askChatForHelp = (message, translatedMessage) => {
|
|
40
44
|
void model.sendHelpRequestFx({
|
|
41
45
|
message,
|
|
@@ -60,8 +64,11 @@ const ChatbotMessages = ({
|
|
|
60
64
|
style: styles.gap,
|
|
61
65
|
children: [messages.map(message => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
|
|
62
66
|
isTranslated: isTranslated,
|
|
67
|
+
withIcon: !message.isOwnMessage && message.id === lastMessageId,
|
|
63
68
|
message: message,
|
|
64
69
|
variant: message.isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
|
|
70
|
+
colorScheme: colorScheme,
|
|
71
|
+
withErrorSpotting: errorSpottingEnabled && !message.isOwnMessage,
|
|
65
72
|
t2sState: {
|
|
66
73
|
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
67
74
|
isActive: message.id === currentPlayingId,
|
|
@@ -69,11 +76,14 @@ const ChatbotMessages = ({
|
|
|
69
76
|
status: audioStatus,
|
|
70
77
|
disabled: isTextToSpeechPending
|
|
71
78
|
}
|
|
72
|
-
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
|
|
79
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
|
|
80
|
+
colorScheme: colorScheme
|
|
81
|
+
})]
|
|
73
82
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alternatives.Alternatives, {
|
|
74
83
|
onPressAlternative: askChatForHelp,
|
|
75
84
|
hasMessages: messages.length > 1,
|
|
76
|
-
isHintFeedback: isHintFeedback
|
|
85
|
+
isHintFeedback: isHintFeedback,
|
|
86
|
+
colorScheme: colorScheme
|
|
77
87
|
})]
|
|
78
88
|
})
|
|
79
89
|
});
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","withIcon","isOwnMessage","variant","MessageVariant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","MessageLoader","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;AAGA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAqD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,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,UA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c,EAAEA,cAAe;QAC/BE,WAAW,EAAEA;MAAY,CAC1B,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAAA4E,OAAA,CAAAhF,eAAA,GAAAA,eAAA;AAED,MAAM6C,MAAM,GAAGoC,uBAAU,CAACC,MAAM,CAAC;EAC/BpC,SAAS,EAAE;IACTqC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACV/C,MAAM,EAAE;EACV,CAAC;EACDe,IAAI,EAAE;IACJ+B,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD5B,GAAG,EAAE;IACHwB,IAAI,EAAE,CAAC;IACPxB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Chatbot = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
8
|
var _effectorReact = require("effector-react");
|
|
8
9
|
var _ChatbotMessages = require("./ChatMessages/ChatbotMessages.js");
|
|
9
10
|
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");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
const Chatbot = ({
|
|
@@ -17,7 +18,8 @@ const Chatbot = ({
|
|
|
17
18
|
isTextToSpeechEnabled = false,
|
|
18
19
|
textToSpeechConfig,
|
|
19
20
|
ButtonWrapper,
|
|
20
|
-
iconSize
|
|
21
|
+
iconSize,
|
|
22
|
+
colorScheme = _styleTypes.ColorScheme.Blue
|
|
21
23
|
}) => {
|
|
22
24
|
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
23
25
|
const isAvailable = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
@@ -33,6 +35,7 @@ const Chatbot = ({
|
|
|
33
35
|
value: model,
|
|
34
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotMessages.ChatbotMessages, {
|
|
35
37
|
model: model,
|
|
38
|
+
colorScheme: colorScheme,
|
|
36
39
|
isHintFeedback: isHintFeedback,
|
|
37
40
|
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
38
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatControls.ChatControls, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_ChatbotMessages","_ChatControls","_ChatBotModelContext","_styleTypes","_jsxRuntime","e","__esModule","default","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","ButtonWrapper","iconSize","colorScheme","ColorScheme","Blue","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":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAkD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAA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AA,CAC0B,CAAC;AAEnC,CAAC;AAAA0B,OAAA,CAAAhC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -6,13 +6,14 @@ 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");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
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); }
|
|
11
12
|
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; }
|
|
12
13
|
const ThreeDotsLoader = ({
|
|
13
14
|
dotsCount = 3,
|
|
14
15
|
animationDuration = 250,
|
|
15
|
-
backgroundColor =
|
|
16
|
+
backgroundColor = _reactNativeUi.COLORS.PRIMARY_BLUE
|
|
16
17
|
}) => {
|
|
17
18
|
const isWeb = _reactNative.Platform.OS === 'web';
|
|
18
19
|
const animations = (0, _react.useMemo)(() => [...Array(dotsCount)].map(() => new _reactNative.Animated.Value(0)), [dotsCount]);
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeUi","_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","COLORS","PRIMARY_BLUE","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;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,cAAA,GAAAF,OAAA;AAAmD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,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;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C,SAAS,EAAE,CAAC;YAAEL;UAAW,CAAC;QAAE,CAAC,EAAE;UAAE/B;QAAgB,CAAC;MAAE,GADrEe,KAEN,CAAC;IAEN,CAAC;EAAC,CACE,CAAC;AAEX,CAAC;AAAAsB,OAAA,CAAAxC,eAAA,GAAAA,eAAA;AAED,MAAM+B,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,8 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TEXT_TO_SPEECH_CONFIG = exports.KATEX_REPLACEMENTS_REVERSE = exports.KATEX_REPLACEMENTS = exports.DEFAULT_VOICE = exports.AUDIO_CONFIG = void 0;
|
|
6
|
+
exports.TEXT_TO_SPEECH_CONFIG = exports.MESSAGE_COLORS_MAP = exports.KATEX_REPLACEMENTS_REVERSE = exports.KATEX_REPLACEMENTS = exports.DEFAULT_VOICE = exports.CONTROLS_COLORS_MAP = exports.AUDIO_CONFIG = void 0;
|
|
7
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
7
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _modelTypes = require("./types/model.types.js");
|
|
10
|
+
var _styleTypes = require("./types/style.types.js");
|
|
8
11
|
const AUDIO_CONFIG = exports.AUDIO_CONFIG = {
|
|
9
12
|
audioEncoding: 'LINEAR16',
|
|
10
13
|
pitch: 0,
|
|
@@ -37,4 +40,36 @@ const KATEX_REPLACEMENTS = exports.KATEX_REPLACEMENTS = {
|
|
|
37
40
|
const KATEX_REPLACEMENTS_REVERSE = exports.KATEX_REPLACEMENTS_REVERSE = {
|
|
38
41
|
__KATEX_DOLLAR_SYMBOL__: '$'
|
|
39
42
|
};
|
|
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
|
+
};
|
|
40
75
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNativeUi","require","_reactNative","_modelTypes","_styleTypes","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__","MESSAGE_COLORS_MAP","ColorScheme","Blue","MessageVariant","RECEIVED","background","COLORS","NEUTRAL_3","icon","ButtonColor","BLUE","SENT","PRIMARY_BLUE","Yellow","YELLOW","PRIMARY_YELLOW","CONTROLS_COLORS_MAP","hover"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEO,MAAMI,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;E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.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);
|
|
13
15
|
$validationKey = (0, _effector.createStore)(null);
|
|
14
16
|
$activeData = (0, _effector.createStore)(null).on(this.activeDataChanged, (_, payload) => payload).on(this.spottingHidden, state => {
|
|
15
17
|
if (state) return {
|
|
@@ -125,6 +127,12 @@ class ErrorSpottingModel {
|
|
|
125
127
|
this.activeDataChanged(null);
|
|
126
128
|
this.abortPendingRequest();
|
|
127
129
|
}
|
|
130
|
+
enable() {
|
|
131
|
+
this.setIsEnabled(true);
|
|
132
|
+
}
|
|
133
|
+
disable() {
|
|
134
|
+
this.setIsEnabled(false);
|
|
135
|
+
}
|
|
128
136
|
}
|
|
129
137
|
exports.ErrorSpottingModel = ErrorSpottingModel;
|
|
130
138
|
//# sourceMappingURL=ErrorSpottingModel.js.map
|
|
@@ -1 +1 @@
|
|
|
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,EAAiC,CAAC;EAClEE,cAAc,GAAG,IAAAF,qBAAW,EAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["_effector","require","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","createEvent","activeDataChanged","spottingHidden","setIsEnabled","$isEnabled","restore","$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","enable","disable","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,EAAiC,CAAC;EAClEE,cAAc,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAC9BG,YAAY,GAAG,IAAAH,qBAAW,EAAU,CAAC;EAErCI,UAAU,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACF,YAAY,EAAE,KAAK,CAAC;EAC9CG,cAAc,GAAG,IAAAC,qBAAW,EAAgB,IAAI,CAAC;EACjDC,WAAW,GAAG,IAAAD,qBAAW,EAAiC,IAAI,CAAC,CAC5EE,EAAE,CAAC,IAAI,CAACR,iBAAiB,EAAE,C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G;IACb,IAAI,CAAC/D,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAAC0D,mBAAmB,CAAC,CAAC;EAC5B;EAEOM,MAAMA,CAAA,EAAG;IACd,IAAI,CAAC9D,YAAY,CAAC,IAAI,CAAC;EACzB;EAEO+D,OAAOA,CAAA,EAAG;IACf,IAAI,CAAC/D,YAAY,CAAC,KAAK,CAAC;EAC1B;AACF;AAACgE,OAAA,CAAArE,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -21,6 +21,12 @@ 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
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "DefaultMessagesCreator", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -38,4 +44,5 @@ var _ChatBotModel = require("./model/ChatBotModel.js");
|
|
|
38
44
|
var _t2sTypes = require("./types/t2s.types.js");
|
|
39
45
|
var _modelTypes = require("./types/model.types.js");
|
|
40
46
|
var _DefaultMessageCreator = require("./model/DefaultMessageCreator.js");
|
|
47
|
+
var _styleTypes = require("./types/style.types.js");
|
|
41
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator","_styleTypes"],"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;AAGA,IAAAK,WAAA,GAAAL,OAAA","ignoreList":[]}
|
|
@@ -14,13 +14,16 @@ 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");
|
|
17
18
|
class ChatbotModel {
|
|
18
19
|
textManager = new _ChatBoxTextManager.ChatBotTextManager();
|
|
19
20
|
defaultMessages = this.textManager.messages;
|
|
20
21
|
threadManager = new _ChatBotThreadManager.ChatBotThreadManager({
|
|
21
22
|
messages: this.defaultMessages
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
setCurrentKey = (0, _effector.createEvent)();
|
|
25
|
+
$currentKey = (0, _effector.restore)(this.setCurrentKey, '');
|
|
26
|
+
unbindCurrentKey = null;
|
|
24
27
|
resetAlternatives = (0, _effector.createEvent)();
|
|
25
28
|
setAlternatives = (0, _effector.createEvent)();
|
|
26
29
|
setIsOpen = (0, _effector.createEvent)();
|
|
@@ -117,6 +120,38 @@ class ChatbotModel {
|
|
|
117
120
|
target: this.$isOpen
|
|
118
121
|
});
|
|
119
122
|
}
|
|
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
|
+
});
|
|
120
155
|
}
|
|
121
156
|
createSendHelpRequestFx() {
|
|
122
157
|
const effect = (0, _effector.attach)({
|
|
@@ -165,6 +200,9 @@ class ChatbotModel {
|
|
|
165
200
|
(0, _effector.sample)({
|
|
166
201
|
clock: effect.fail,
|
|
167
202
|
source: this.$currentChatData,
|
|
203
|
+
filter: (_, {
|
|
204
|
+
error
|
|
205
|
+
}) => error.message !== 'Request aborted manually',
|
|
168
206
|
fn: ({
|
|
169
207
|
key,
|
|
170
208
|
messages
|
|
@@ -174,28 +212,31 @@ class ChatbotModel {
|
|
|
174
212
|
messages: [...messages, this.defaultMessages.error]
|
|
175
213
|
}
|
|
176
214
|
}),
|
|
177
|
-
filter: (_, {
|
|
178
|
-
error
|
|
179
|
-
}) => error.message !== 'Request aborted manually',
|
|
180
215
|
target: this.cache.update
|
|
181
216
|
});
|
|
182
217
|
return effect;
|
|
183
218
|
}
|
|
184
219
|
bindKey($store) {
|
|
185
|
-
(
|
|
186
|
-
|
|
187
|
-
|
|
220
|
+
this.unbindCurrentKey?.();
|
|
221
|
+
this.unbindCurrentKey = $store.watch(value => {
|
|
222
|
+
this.setCurrentKey(value);
|
|
223
|
+
this.threadManager.setCurrentKey(value);
|
|
188
224
|
});
|
|
189
|
-
|
|
225
|
+
const initialValue = $store.getState();
|
|
226
|
+
this.setCurrentKey(initialValue);
|
|
227
|
+
this.threadManager.setCurrentKey(initialValue);
|
|
190
228
|
return this;
|
|
191
229
|
}
|
|
192
|
-
bindExternalTranslationState($
|
|
193
|
-
(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
230
|
+
bindExternalTranslationState($isTranslated) {
|
|
231
|
+
if (!this.externalTranslationStateSync) {
|
|
232
|
+
this.externalTranslationStateSync = new _ControlledSample.ControlledSample({
|
|
233
|
+
clock: [this.$currentKey.updates, this.startConversation.done],
|
|
234
|
+
source: $isTranslated,
|
|
235
|
+
filter: flag => flag,
|
|
236
|
+
target: this.translation.translateAllMessagesFx,
|
|
237
|
+
isActiveDefault: true
|
|
238
|
+
});
|
|
239
|
+
}
|
|
199
240
|
return this;
|
|
200
241
|
}
|
|
201
242
|
setUpT2S(config) {
|
|
@@ -208,30 +249,6 @@ class ChatbotModel {
|
|
|
208
249
|
return this;
|
|
209
250
|
}
|
|
210
251
|
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
|
-
});
|
|
235
252
|
setHintMessage({
|
|
236
253
|
key,
|
|
237
254
|
...message
|
|
@@ -281,6 +298,17 @@ class ChatbotModel {
|
|
|
281
298
|
this.threadManager.reset();
|
|
282
299
|
this.errorSpotting.reset();
|
|
283
300
|
});
|
|
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
|
+
}
|
|
284
312
|
}
|
|
285
313
|
exports.ChatbotModel = ChatbotModel;
|
|
286
314
|
//# sourceMappingURL=ChatBotModel.js.map
|
|
@@ -1 +1 @@
|
|
|
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,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AAMO,MAAMU,YAAY,CAAC;EACRC,WAAW,GAAG,IAAIC,sCAAkB,CAAC,CAAC;EACrCC,eAAe,GAAG,IAAI,CAACF,WAAW,CAACG,QAAQ;EAE5CC,aAAa,GAAG,IAAIC,0CAAoB,CAAC;IACvDF,QAAQ,EAAE,IAAI,CAACD;EACjB,CAAC,CAAC;EAOcI,WAAW,GAAG,IAAAC,qBAAW,EAAC,EAAE,CAAC;EAEpCC,iBAAiB,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACjCC,eAAe,GAAG,IAAAD,qBAAW,EAAiC,CAAC;EAG/DE,SAAS,GAAG,IAAAF,qBAAW,EAAU,CAAC;EAClCG,UAAU,GAAG,IAAAH,qBAAW,EAAC,CAAC;EAC1BI,OAAO,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,SAAS,EAAE,KAAK,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AAI,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":[]}
|
|
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,GAAAC,OAAA;AAYA,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,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,iBAAA,GAAAV,OAAA;AAMO,MAAMW,YAAY,CAAC;EACRC,WAAW,GAAG,IAAIC,sCAAkB,CAAC,CAAC;EACrCC,eAAe,GAAG,IAAI,CAACF,WAAW,CAACG,QAAQ;EAE5CC,aAAa,GAAG,IAAIC,0CAAoB,CAAC;IACvDF,QAAQ,EAAE,IAAI,CAACD;EACjB,CAAC,CAAC;EAOeI,aAAa,GAAG,IAAAC,qBAAW,EAAS,CAAC;EACtCC,WAAW,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,aAAa,EAAE,EAAE,CAAC;EAErDI,gBAAgB,GAAwB,IAAI;EAG3CC,iBAAiB,GA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B,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":[]}
|
|
@@ -11,7 +11,6 @@ class ChatBotThreadManager {
|
|
|
11
11
|
drawBoardAdapter = null;
|
|
12
12
|
threads = new Map();
|
|
13
13
|
currentKey = '';
|
|
14
|
-
currentBinding = null;
|
|
15
14
|
constructor({
|
|
16
15
|
drawBoardAdapter,
|
|
17
16
|
api,
|
|
@@ -23,13 +22,6 @@ class ChatBotThreadManager {
|
|
|
23
22
|
this.messagesLimit = messagesLimit;
|
|
24
23
|
this.defaultMessages = messages;
|
|
25
24
|
}
|
|
26
|
-
bindKeyStore($store) {
|
|
27
|
-
this.currentBinding?.();
|
|
28
|
-
this.currentBinding = $store.watch(value => {
|
|
29
|
-
this.currentKey = value;
|
|
30
|
-
});
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
25
|
async getThreadItem() {
|
|
34
26
|
const key = this.currentKey;
|
|
35
27
|
const existingThreadItem = this.threads.get(key);
|
|
@@ -94,6 +86,9 @@ class ChatBotThreadManager {
|
|
|
94
86
|
this.api = api;
|
|
95
87
|
return this;
|
|
96
88
|
}
|
|
89
|
+
setCurrentKey(key) {
|
|
90
|
+
this.currentKey = key;
|
|
91
|
+
}
|
|
97
92
|
}
|
|
98
93
|
exports.ChatBotThreadManager = ChatBotThreadManager;
|
|
99
94
|
//# sourceMappingURL=ChatBotThreadManager.js.map
|