@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,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { createEvent, createStore, sample, createEffect } from 'effector';
|
|
3
|
+
import { createEvent, createStore, sample, createEffect, restore } 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);
|
|
9
11
|
$validationKey = createStore(null);
|
|
10
12
|
$activeData = createStore(null).on(this.activeDataChanged, (_, payload) => payload).on(this.spottingHidden, state => {
|
|
11
13
|
if (state) return {
|
|
@@ -121,5 +123,11 @@ export class ErrorSpottingModel {
|
|
|
121
123
|
this.activeDataChanged(null);
|
|
122
124
|
this.abortPendingRequest();
|
|
123
125
|
}
|
|
126
|
+
enable() {
|
|
127
|
+
this.setIsEnabled(true);
|
|
128
|
+
}
|
|
129
|
+
disable() {
|
|
130
|
+
this.setIsEnabled(false);
|
|
131
|
+
}
|
|
124
132
|
}
|
|
125
133
|
//# sourceMappingURL=ErrorSpottingModel.js.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","sample","createEffect","restore","AUTO_CLOSE_TIMEOUT","ErrorSpottingModel","errorSpottingPressed","activeDataChanged","spottingHidden","setIsEnabled","$isEnabled","$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","enable","disable"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;AACA,SAASA,WAAW,EAAEC,WAAW,EAAEC,MAAM,EAAEC,YAAY,EAASC,OAAO,QAAQ,UAAU;AAwBzF,MAAMC,kBAAkB,GAAG,IAAI;AAM/B,OAAO,MAAMC,kBAAkB,CAAC;E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C;MACL+B,MAAM,EAAE4B,MAAM;MACdnB,MAAM,EAAE,IAAI,CAAC9B;IACf,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEOkD,mBAAmBA,CAAA,EAAG;IAC3B,MAAMC,SAAS,GAAG,IAAI,CAACxC,GAAG,CAACI,WAAW,CAACC,OAAO,CAACoC,QAAQ,CAAC,CAAC;IACzD,IAAID,SAAS,EAAE,IAAI,CAACxC,GAAG,CAACI,WAAW,CAACsC,UAAU,CAACC,KAAK,CAAC,CAAC;EACxD;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAAC3D,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAACsD,mBAAmB,CAAC,CAAC;EAC5B;EAEOM,MAAMA,CAAA,EAAG;IACd,IAAI,CAAC1D,YAAY,CAAC,IAAI,CAAC;EACzB;EAEO2D,OAAOA,CAAA,EAAG;IACf,IAAI,CAAC3D,YAAY,CAAC,KAAK,CAAC;EAC1B;AACF","ignoreList":[]}
|
|
@@ -5,4 +5,5 @@ 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";
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator","ColorScheme"],"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;AAGtE,SAASC,WAAW,QAAQ,wBAAqB","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { attach, combine, createEffect, createEvent,
|
|
3
|
+
import { attach, combine, createEffect, createEvent, 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,13 +10,16 @@ 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";
|
|
13
14
|
export class ChatbotModel {
|
|
14
15
|
textManager = new ChatBotTextManager();
|
|
15
16
|
defaultMessages = this.textManager.messages;
|
|
16
17
|
threadManager = new ChatBotThreadManager({
|
|
17
18
|
messages: this.defaultMessages
|
|
18
19
|
});
|
|
19
|
-
|
|
20
|
+
setCurrentKey = createEvent();
|
|
21
|
+
$currentKey = restore(this.setCurrentKey, '');
|
|
22
|
+
unbindCurrentKey = null;
|
|
20
23
|
resetAlternatives = createEvent();
|
|
21
24
|
setAlternatives = createEvent();
|
|
22
25
|
setIsOpen = createEvent();
|
|
@@ -113,6 +116,38 @@ export class ChatbotModel {
|
|
|
113
116
|
target: this.$isOpen
|
|
114
117
|
});
|
|
115
118
|
}
|
|
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
|
+
});
|
|
116
151
|
}
|
|
117
152
|
createSendHelpRequestFx() {
|
|
118
153
|
const effect = attach({
|
|
@@ -161,6 +196,9 @@ export class ChatbotModel {
|
|
|
161
196
|
sample({
|
|
162
197
|
clock: effect.fail,
|
|
163
198
|
source: this.$currentChatData,
|
|
199
|
+
filter: (_, {
|
|
200
|
+
error
|
|
201
|
+
}) => error.message !== 'Request aborted manually',
|
|
164
202
|
fn: ({
|
|
165
203
|
key,
|
|
166
204
|
messages
|
|
@@ -170,28 +208,31 @@ export class ChatbotModel {
|
|
|
170
208
|
messages: [...messages, this.defaultMessages.error]
|
|
171
209
|
}
|
|
172
210
|
}),
|
|
173
|
-
filter: (_, {
|
|
174
|
-
error
|
|
175
|
-
}) => error.message !== 'Request aborted manually',
|
|
176
211
|
target: this.cache.update
|
|
177
212
|
});
|
|
178
213
|
return effect;
|
|
179
214
|
}
|
|
180
215
|
bindKey($store) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
216
|
+
this.unbindCurrentKey?.();
|
|
217
|
+
this.unbindCurrentKey = $store.watch(value => {
|
|
218
|
+
this.setCurrentKey(value);
|
|
219
|
+
this.threadManager.setCurrentKey(value);
|
|
184
220
|
});
|
|
185
|
-
|
|
221
|
+
const initialValue = $store.getState();
|
|
222
|
+
this.setCurrentKey(initialValue);
|
|
223
|
+
this.threadManager.setCurrentKey(initialValue);
|
|
186
224
|
return this;
|
|
187
225
|
}
|
|
188
|
-
bindExternalTranslationState($
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
226
|
+
bindExternalTranslationState($isTranslated) {
|
|
227
|
+
if (!this.externalTranslationStateSync) {
|
|
228
|
+
this.externalTranslationStateSync = new ControlledSample({
|
|
229
|
+
clock: [this.$currentKey.updates, this.startConversation.done],
|
|
230
|
+
source: $isTranslated,
|
|
231
|
+
filter: flag => flag,
|
|
232
|
+
target: this.translation.translateAllMessagesFx,
|
|
233
|
+
isActiveDefault: true
|
|
234
|
+
});
|
|
235
|
+
}
|
|
195
236
|
return this;
|
|
196
237
|
}
|
|
197
238
|
setUpT2S(config) {
|
|
@@ -204,30 +245,6 @@ export class ChatbotModel {
|
|
|
204
245
|
return this;
|
|
205
246
|
}
|
|
206
247
|
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
|
-
});
|
|
231
248
|
setHintMessage({
|
|
232
249
|
key,
|
|
233
250
|
...message
|
|
@@ -277,5 +294,16 @@ export class ChatbotModel {
|
|
|
277
294
|
this.threadManager.reset();
|
|
278
295
|
this.errorSpotting.reset();
|
|
279
296
|
});
|
|
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
|
+
}
|
|
280
308
|
}
|
|
281
309
|
//# sourceMappingURL=ChatBotModel.js.map
|
|
@@ -1 +1 @@
|
|
|
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,GAAGr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,aAAa,CAACqF,mBAAmB,CAAC,CAAC;MAExC,IAAI,CAAC3F,GAAG,CAACoF,IAAI,CAAC,CAAC;MACf,KAAK,IAAI,CAACpF,GAAG,CAACD,KAAK,CAAC,CAAC;MACrB,IAAI,CAACtB,eAAe,CAAC,KAAK,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEcsB,KAAK,GAAG1C,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":[]}
|
|
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;EAE5CC,aAAa,GAAG,IAAIX,oBAAoB,CAAC;IACvDU,QAAQ,EAAE,IAAI,CAACD;EACjB,CAAC,CAAC;EAOeG,aAAa,GAAGnB,WAAW,CAAS,CAAC;EACtCoB,WAAW,GAAGnB,OAAO,CAAC,IAAI,CAACkB,aAAa,EAAE,EAAE,CAAC;EAErDE,gBAAgB,GAAwB,IAAI;EAG3CC,iBAAiB,GAAG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AACC,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":[]}
|
|
@@ -7,7 +7,6 @@ export class ChatBotThreadManager {
|
|
|
7
7
|
drawBoardAdapter = null;
|
|
8
8
|
threads = new Map();
|
|
9
9
|
currentKey = '';
|
|
10
|
-
currentBinding = null;
|
|
11
10
|
constructor({
|
|
12
11
|
drawBoardAdapter,
|
|
13
12
|
api,
|
|
@@ -19,13 +18,6 @@ export class ChatBotThreadManager {
|
|
|
19
18
|
this.messagesLimit = messagesLimit;
|
|
20
19
|
this.defaultMessages = messages;
|
|
21
20
|
}
|
|
22
|
-
bindKeyStore($store) {
|
|
23
|
-
this.currentBinding?.();
|
|
24
|
-
this.currentBinding = $store.watch(value => {
|
|
25
|
-
this.currentKey = value;
|
|
26
|
-
});
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
21
|
async getThreadItem() {
|
|
30
22
|
const key = this.currentKey;
|
|
31
23
|
const existingThreadItem = this.threads.get(key);
|
|
@@ -90,5 +82,8 @@ export class ChatBotThreadManager {
|
|
|
90
82
|
this.api = api;
|
|
91
83
|
return this;
|
|
92
84
|
}
|
|
85
|
+
setCurrentKey(key) {
|
|
86
|
+
this.currentKey = key;
|
|
87
|
+
}
|
|
93
88
|
}
|
|
94
89
|
//# sourceMappingURL=ChatBotThreadManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThreadItem","CHAT_BOT_MODEL_DEFAULTS","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","
|
|
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","setCurrentKey"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AAQzC,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;EAIhBC,WAAWA,CAAC;IACjBJ,gBAAgB;IAChBD,GAAG;IACHM,aAAa,GAAGR,uBAAuB,CAACS,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIR,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACK,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACG,eAAe,GAAGD,QAAQ;EACjC;EAEA,MAAcE,aAAaA,CAAA,EAAG;IAC5B,MAAMC,GAAG,GAAG,IAAI,CAACP,UAAU;IAC3B,MAAMQ,kBAAkB,GAAG,IAAI,CAACV,OAAO,CAACW,GAAG,CAACF,GAAG,CAAC;IAChD,IAAIC,kBAAkB,EAAE,OAAOA,kBAAkB;IACjD,MAAME,UAAU,GAAG,IAAIjB,UAAU,CAAC,CAAC;IACnC,IAAI,CAACK,OAAO,CAACa,GAAG,CAACJ,GAAG,EAAEG,UAAU,CAAC;IACjC,IAAI,CAAC,IAAI,CAACb,gBAAgB,EAAE,OAAOa,UAAU;IAC7C,IAAI;MAC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E;IAEhG,OAAO;MACLF,OAAO,EAAER,MAAM,CAACQ,OAAO;MACvBG,OAAO,EAAEF,WAAW;MACpBG,UAAU,EAAE,CAACH,WAAW,CAACpB,MAAM;MAC/BwB,QAAQ,EAAEjC,UAAU,CAACkC;IACvB,CAAC;EACH,CAAC;EAEMnC,GAAGA,CAACF,GAAW,EAAE;IACtB,OAAO,IAAI,CAACT,OAAO,CAACW,GAAG,CAACF,GAAG,CAAC;EAC9B;EAEOsC,KAAKA,CAACtC,GAAY,EAAE;IACzB,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MAC3B,IAAI,CAACT,OAAO,CAACgD,MAAM,CAACvC,GAAG,CAAC;MACxB;IACF;IACA,IAAI,CAACT,OAAO,CAACiD,KAAK,CAAC,CAAC;EACtB;EAEOC,gBAAgBA,CAACC,KAAa,EAAE;IACrC,IAAI,CAAC/C,aAAa,GAAG+C,KAAK;EAC5B;EAEOC,MAAMA,CAACtD,GAAqB,EAAE;IACnC,IAAI,CAACA,GAAG,GAAGA,GAAG;IACd,OAAO,IAAI;EACb;EAEOuD,aAAaA,CAAC5C,GAAW,EAAE;IAChC,IAAI,CAACP,UAAU,GAAGO,GAAG;EACvB;AACF","ignoreList":[]}
|
|
@@ -8,10 +8,21 @@ export class ChatBotTextManager {
|
|
|
8
8
|
textGetter: getText
|
|
9
9
|
}).bindToLanguageChanged($localization.updates);
|
|
10
10
|
messages = {
|
|
11
|
-
error: this.messagesCreator.createMessage('chat.errorMessage'
|
|
11
|
+
error: this.messagesCreator.createMessage('chat.errorMessage', {
|
|
12
|
+
options: [this.messagesCreator.createOption('chat.giveHint')]
|
|
13
|
+
}),
|
|
12
14
|
start: this.messagesCreator.createMessage('chat.howCanIHelp'),
|
|
13
15
|
endMessage: this.messagesCreator.createMessage('chat.answerAgain'),
|
|
14
16
|
anotherHintOption: this.messagesCreator.createOption('chat.anotherHint')
|
|
15
17
|
};
|
|
18
|
+
defaultMessages = {
|
|
19
|
+
...this.messages
|
|
20
|
+
};
|
|
21
|
+
update(cb) {
|
|
22
|
+
Object.assign(this.messages, cb(this.messagesCreator));
|
|
23
|
+
}
|
|
24
|
+
restore() {
|
|
25
|
+
Object.assign(this.messages, this.defaultMessages);
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
28
|
//# sourceMappingURL=ChatBoxTextManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DefaultMessagesCreator","getText","$localization","ChatBotTextManager","messagesCreator","textGetter","bindToLanguageChanged","updates","messages","error","createMessage","start","endMessage","anotherHintOption","
|
|
1
|
+
{"version":3,"names":["DefaultMessagesCreator","getText","$localization","ChatBotTextManager","messagesCreator","textGetter","bindToLanguageChanged","updates","messages","error","createMessage","options","createOption","start","endMessage","anotherHintOption","defaultMessages","update","cb","Object","assign","restore"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBoxTextManager.ts"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,4BAAyB;AAEhE,SAASC,OAAO,QAAQ,wCAAqC;AAE7D,SAASC,aAAa,QAAQ,sCAA6B;AAE3D,OAAO,MAAMC,kBAAkB,CAAC;EACbC,eAAe,GAAG,IAAIJ,sBAAsB,CAAkB;IAC7EK,UAAU,EAAEJ;EACd,CAAC,CAAC,CAACK,qBAAqB,CAACJ,aAAa,CAACK,OAAO,CAAC;EAE/BC,QAAQ,GAAoB;IAC1CC,KAAK,EAAE,IAAI,CAACL,eAAe,CAACM,aAAa,CAAC,mBAAmB,EAAE;MAC7DC,OAAO,EAAE,CAAC,IAAI,CAACP,eAAe,CAACQ,YAAY,CAAC,eAAe,CAAC;IAC9D,CAAC,CAAC;IACFC,KAAK,EAAE,IAAI,CAACT,eAAe,CAACM,aAAa,CAAC,kBAAkB,CAAC;IAC7DI,UAAU,EAAE,IAAI,CAACV,eAAe,CAACM,aAAa,CAAC,kBAAkB,CAAC;IAClEK,iBAAiB,EAAE,IAAI,CAACX,eAAe,CAACQ,YAAY,CAAC,kBAAkB;EACzE,CAAC;EACgBI,eAAe,GAAG;IAAE,GAAG,IAAI,CAACR;EAAS,CAAC;EAEhDS,MAAMA,CACXC,EAAkF,EAClF;IACAC,MAAM,CAACC,MAAM,CAAC,IAAI,CAACZ,QAAQ,EAAEU,EAAE,CAAC,IAAI,CAACd,eAAe,CAAC,CAAC;EACxD;EAEOiB,OAAOA,CAAA,EAAG;IACfF,MAAM,CAACC,MAAM,CAAC,IAAI,CAACZ,QAAQ,EAAE,IAAI,CAACQ,eAAe,CAAC;EACpD;AACF","ignoreList":[]}
|
|
@@ -8,12 +8,13 @@ export class DefaultMessagesCreator {
|
|
|
8
8
|
this.getter = textGetter;
|
|
9
9
|
}
|
|
10
10
|
createMessage(key, {
|
|
11
|
-
isOwn = false
|
|
11
|
+
isOwn = false,
|
|
12
|
+
options = []
|
|
12
13
|
} = {}) {
|
|
13
14
|
const message = {
|
|
14
15
|
id: this.list.size.toString(),
|
|
15
16
|
message: this.getter(key),
|
|
16
|
-
options
|
|
17
|
+
options,
|
|
17
18
|
isOwnMessage: isOwn
|
|
18
19
|
};
|
|
19
20
|
this.list.set(message, key);
|
|
@@ -22,6 +23,7 @@ export class DefaultMessagesCreator {
|
|
|
22
23
|
createOption(key) {
|
|
23
24
|
const option = {
|
|
24
25
|
text: this.getter(key),
|
|
26
|
+
translatedText: '',
|
|
25
27
|
promptKey: ''
|
|
26
28
|
};
|
|
27
29
|
this.list.set(option, key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DefaultMessagesCreator","list","Map","constructor","textGetter","getter","createMessage","key","isOwn","message","id","size","toString","
|
|
1
|
+
{"version":3,"names":["DefaultMessagesCreator","list","Map","constructor","textGetter","getter","createMessage","key","isOwn","options","message","id","size","toString","isOwnMessage","set","createOption","option","text","translatedText","promptKey","bindToLanguageChanged","event","watch","forEach","chatMessage"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/DefaultMessageCreator.ts"],"mappings":";;AAkBA,OAAO,MAAMA,s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[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,uBAAuB,GAAG;EACrCC,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
|
|
@@ -39,6 +39,7 @@ export class ChatbotTranslation {
|
|
|
39
39
|
});
|
|
40
40
|
sample({
|
|
41
41
|
clock: this.translateAllMessagesFx.doneData,
|
|
42
|
+
filter: (_, translatedMessages) => !!translatedMessages.length,
|
|
42
43
|
source: [this.$key],
|
|
43
44
|
fn: ([key], translatedMessages) => ({
|
|
44
45
|
key,
|
|
@@ -80,7 +81,7 @@ export class ChatbotTranslation {
|
|
|
80
81
|
targetLanguage
|
|
81
82
|
}) => {
|
|
82
83
|
const allTranslated = messages.every(message => message.translatedMessage);
|
|
83
|
-
if (allTranslated || !targetLanguage) {
|
|
84
|
+
if (allTranslated || !targetLanguage || !messages) {
|
|
84
85
|
return messages;
|
|
85
86
|
}
|
|
86
87
|
const defaultMessages = [this.defaultMessages.error, this.defaultMessages.endMessage];
|
|
@@ -97,6 +98,7 @@ export class ChatbotTranslation {
|
|
|
97
98
|
defaultMessages: defaultMessages.map(({
|
|
98
99
|
message
|
|
99
100
|
}) => message),
|
|
101
|
+
defaultMessagesOptions: defaultMessages.flatMap(message => message.options.map(option => option.text)),
|
|
100
102
|
defaultOptions: defaultOptions.map(({
|
|
101
103
|
text
|
|
102
104
|
}) => text),
|
|
@@ -108,6 +110,12 @@ export class ChatbotTranslation {
|
|
|
108
110
|
});
|
|
109
111
|
translatedTextsList.defaultMessages.forEach((message, index) => {
|
|
110
112
|
defaultMessages[index].translatedMessage = message;
|
|
113
|
+
defaultMessages[index].options = defaultMessages[index].options.map(option => {
|
|
114
|
+
return {
|
|
115
|
+
...option,
|
|
116
|
+
translatedText: translatedTextsList.defaultMessagesOptions[index]
|
|
117
|
+
};
|
|
118
|
+
});
|
|
111
119
|
});
|
|
112
120
|
translatedTextsList.defaultOptions.forEach((message, index) => {
|
|
113
121
|
defaultOptions[index].translatedText = message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","alternativesModel","$context","chats","applyTranslationFx","source","mapParams","messages","isTranslationActive","context","targetLanguage","translationTargetLanguage","effect","translateMessagesFx","translateAllMessagesFx","$data","$store","_","key","alternatives","translateBatchFx","clock","doneData","
|
|
1
|
+
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","alternativesModel","$context","chats","applyTranslationFx","source","mapParams","messages","isTranslationActive","context","targetLanguage","translationTargetLanguage","effect","translateMessagesFx","translateAllMessagesFx","$data","$store","_","key","alternatives","translateBatchFx","clock","doneData","filter","translatedMessages","length","fn","data","target","update","translateRequest","textList","text","Object","values","flat","response","translateTextFx","translatedText","translations","map","entries","reduce","result","texts","splice","addTranslationToAlternatives","props","set","allTranslated","every","message","translatedMessage","error","endMessage","defaultOptions","anotherHintOption","options","lastMessage","at","translatedTextsList","defaultMessagesOptions","flatMap","option","alternativesHints","hints","alternativesDefaults","default","forEach","index","translatedHints","translatedDefaults","isLastMessage","translatedTexts","shift","reset"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAiBC,OAAO,EAAEC,MAAM,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AAK,CAAC,CAAC;MACjD,OAAO;QACL,GAAGvB,OAAO;QACVC,iBAAiB;QACjBK,OAAO,EAAEjE,uBAAuB,CAACiE,OAAO,EAAEgB,eAAe,CAAC5B,MAAM,CAAC,CAAC,EAAEY,OAAO,CAAChC,MAAM,CAAC;MACrF,CAAC;IACH,CAAC,CAAC;EACJ,CACF,CAAC;EAEMkD,KAAKA,CAAA,EAAG;IACb,IAAI,CAAChF,eAAe,CAAC,KAAK,CAAC;EAC7B;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AAwEA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ColorScheme"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/style.types.ts"],"mappings":";;AAAA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
|
-
import { Animated, StyleSheet, TouchableWithoutFeedback, View } from 'react-native';
|
|
4
|
+
import { Animated, Keyboard, StyleSheet, TouchableWithoutFeedback, View } from 'react-native';
|
|
5
5
|
import { ButtonVariant, CrossIcon, COLORS, BORDER_RADIUS, SPACING, SHADOWS, Button } from '@magmamath/react-native-ui';
|
|
6
6
|
import { ModalModel } from "./model.js";
|
|
7
7
|
import { ModalBackground } from "./ModalBackground.js";
|
|
@@ -26,6 +26,8 @@ export const Modal = ({
|
|
|
26
26
|
useEffect(() => {
|
|
27
27
|
if (isVisible) {
|
|
28
28
|
modalModel.animation.show();
|
|
29
|
+
// It's important to blur drawboard text input when modal appears
|
|
30
|
+
Keyboard.dismiss();
|
|
29
31
|
}
|
|
30
32
|
}, [isVisible]);
|
|
31
33
|
if (!isVisible) return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","Animated","StyleSheet","TouchableWithoutFeedback","View","ButtonVariant","CrossIcon","COLORS","BORDER_RADIUS","SPACING","SHADOWS","Button","ModalModel","ModalBackground","jsx","_jsx","jsxs","_jsxs","stopPropagation","onTouchStart","event","onMouseDown","Modal","isVisible","isDismissable","onClose","style","content","withBackground","modalModel","animation","show","onPress","children","styles","overlay","animatedStyle","container","backgroundWrapper","closeButton","variant","TERTIARY","icon","size","color","NEUTRAL_7","create","absoluteFillObject","justifyContent","alignItems","backgroundColor","zIndex","position","NEUTRAL_1","minWidth","maxWidth","borderRadius","paddingHorizontal","paddingVertical","gap","top","right"],"sourceRoot":"../../../../../../src","sources":["features/endOfAssignment/components/Modal/Modal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAeC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SACEC,QAAQ,
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","Animated","Keyboard","StyleSheet","TouchableWithoutFeedback","View","ButtonVariant","CrossIcon","COLORS","BORDER_RADIUS","SPACING","SHADOWS","Button","ModalModel","ModalBackground","jsx","_jsx","jsxs","_jsxs","stopPropagation","onTouchStart","event","onMouseDown","Modal","isVisible","isDismissable","onClose","style","content","withBackground","modalModel","animation","show","dismiss","onPress","children","styles","overlay","animatedStyle","container","backgroundWrapper","closeButton","variant","TERTIARY","icon","size","color","NEUTRAL_7","create","absoluteFillObject","justifyContent","alignItems","backgroundColor","zIndex","position","NEUTRAL_1","minWidth","maxWidth","borderRadius","paddingHorizontal","paddingVertical","gap","top","right"],"sourceRoot":"../../../../../../src","sources":["features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E,GAAG;IACbC,QAAQ,EAAE,GAAG;IACbC,YAAY,EAAEjD,aAAa,CAAC,KAAK,CAAC;IAClCkD,iBAAiB,EAAEjD,OAAO,CAAC,MAAM,CAAC;IAClCkD,eAAe,EAAElD,OAAO,CAAC,KAAK,CAAC;IAC/BmD,GAAG,EAAEnD,OAAO,CAAC,KAAK,CAAC;IACnB,GAAGC,OAAO,CAAC,GAAG;EAChB,CAAC;EACD8B,WAAW,EAAE;IACXa,QAAQ,EAAE,UAAU;IACpBQ,GAAG,EAAEpD,OAAO,CAAC,KAAK,CAAC;IACnBqD,KAAK,EAAErD,OAAO,CAAC,KAAK;EACtB,CAAC;EACD8B,iBAAiB,EAAE;IACjB,GAAGrC,UAAU,CAAC8C,kBAAkB;IAChCI,MAAM,EAAE,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { BaseModal, SPACING } from '@magmamath/react-native-ui';
|
|
5
|
+
import { ExampleSolutionModalContent } from "./components/ExampleSolutionModalContent.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const ExampleSolutionModal = ({
|
|
8
|
+
modal: {
|
|
9
|
+
closeModal,
|
|
10
|
+
params
|
|
11
|
+
}
|
|
12
|
+
}) => /*#__PURE__*/_jsx(BaseModal, {
|
|
13
|
+
style: {
|
|
14
|
+
container: {
|
|
15
|
+
paddingHorizontal: SPACING[800]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
onClose: closeModal,
|
|
19
|
+
content: /*#__PURE__*/_jsx(ExampleSolutionModalContent, {
|
|
20
|
+
model: params.model,
|
|
21
|
+
payload: params.payload,
|
|
22
|
+
problemId: params.problemId
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=ExampleSolutionModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","BaseModal","SPACING","ExampleSolutionModalContent","jsx","_jsx","ExampleSolutionModal","modal","closeModal","params","style","container","paddingHorizontal","onClose","content","model","payload","problemId"],"sourceRoot":"../../../../src","sources":["features/exampleSolution/ExampleSolutionModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,OAAO,QAAQ,4BAA4B;AAC/D,SAASC,2BAA2B,QAAQ,6CAA0C;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUtF,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACM,CAAC,kBACnCJ,IAAA,CAACJ,SAAS;EACRS,KAAK,EAAE;IACLC,SAAS,EAAE;MAAEC,iBAAiB,EAAEV,OAAO,CAAC,GAAG;IAAE;EAC/C,CAAE;EACFW,OAAO,EAAEL,UAAW;EACpBM,OAAO,eACLT,IAAA,CAACF,2BAA2B;IAC1BY,KAAK,EAAEN,MAAM,CAACM,KAAM;IACpBC,OAAO,EAAEP,MAAM,CAACO,OAAQ;IACxBC,SAAS,EAAER,MAAM,CAACQ;EAAU,CAC7B;AACF,CACF,CACF","ignoreList":[]}
|
|
Binary file
|