@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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { StyleProp, StyleSheet, ViewStyle } from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
import { useUnit } from 'effector-react'
|
|
5
|
+
import { $localization } from '../../../shared/translation'
|
|
6
|
+
import Animated, {
|
|
7
|
+
LinearTransition,
|
|
8
|
+
useAnimatedStyle,
|
|
9
|
+
withDelay,
|
|
10
|
+
withTiming,
|
|
11
|
+
} from 'react-native-reanimated'
|
|
12
|
+
import { ExampleSolutionStatuses } from '../constants'
|
|
13
|
+
|
|
14
|
+
type MessageBlockProps = {
|
|
15
|
+
status: ExampleSolutionStatuses
|
|
16
|
+
style?: StyleProp<ViewStyle>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const MessageBlock = ({ status, style }: MessageBlockProps) => {
|
|
20
|
+
const localisation = useUnit($localization)
|
|
21
|
+
|
|
22
|
+
const opacityAnimation = useAnimatedStyle(() => {
|
|
23
|
+
return {
|
|
24
|
+
opacity: withDelay(
|
|
25
|
+
2000,
|
|
26
|
+
withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 350 }),
|
|
27
|
+
),
|
|
28
|
+
}
|
|
29
|
+
}, [status])
|
|
30
|
+
|
|
31
|
+
if (status === ExampleSolutionStatuses.CACHE) return null
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Animated.View
|
|
35
|
+
layout={LinearTransition.duration(250)}
|
|
36
|
+
style={[styles.container, opacityAnimation, style]}
|
|
37
|
+
>
|
|
38
|
+
<Typography variant={'small'} numberOfLines={1}>
|
|
39
|
+
{status === ExampleSolutionStatuses.LOADING
|
|
40
|
+
? localisation.exampleSolution.letMeThink
|
|
41
|
+
: localisation.exampleSolution.aha}
|
|
42
|
+
</Typography>
|
|
43
|
+
</Animated.View>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
container: {
|
|
49
|
+
padding: SPACING[200],
|
|
50
|
+
backgroundColor: COLORS.NEUTRAL_3,
|
|
51
|
+
height: 44,
|
|
52
|
+
borderRadius: 12,
|
|
53
|
+
borderBottomRightRadius: 2,
|
|
54
|
+
borderWidth: StyleSheet.hairlineWidth,
|
|
55
|
+
borderColor: COLORS.NEUTRAL_5,
|
|
56
|
+
|
|
57
|
+
shadowColor: COLORS.NEUTRAL_10,
|
|
58
|
+
shadowOffset: {
|
|
59
|
+
width: 0,
|
|
60
|
+
height: 1,
|
|
61
|
+
},
|
|
62
|
+
shadowOpacity: 0.2,
|
|
63
|
+
shadowRadius: 1,
|
|
64
|
+
|
|
65
|
+
elevation: 3,
|
|
66
|
+
},
|
|
67
|
+
})
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { StyleSheet, View, ScrollView } from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { COLORS, Loader, LoaderColor, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
import Animated, { FadeOut } from 'react-native-reanimated'
|
|
5
|
+
import { ExampleSolutionStatuses } from '../constants'
|
|
6
|
+
|
|
7
|
+
type QuestionSectionProps = {
|
|
8
|
+
question?: string
|
|
9
|
+
status: ExampleSolutionStatuses
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const QuestionSection = ({ question, status }: QuestionSectionProps) => {
|
|
13
|
+
return (
|
|
14
|
+
<View style={styles.container}>
|
|
15
|
+
<ScrollView style={styles.scrollView}>
|
|
16
|
+
<Typography>{question}</Typography>
|
|
17
|
+
</ScrollView>
|
|
18
|
+
{status === ExampleSolutionStatuses.LOADING && (
|
|
19
|
+
<Animated.View exiting={FadeOut} style={styles.loaderContainer}>
|
|
20
|
+
<Loader size="large" color={LoaderColor.BLUE} />
|
|
21
|
+
</Animated.View>
|
|
22
|
+
)}
|
|
23
|
+
</View>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const styles = StyleSheet.create({
|
|
28
|
+
container: {
|
|
29
|
+
flex: 1,
|
|
30
|
+
},
|
|
31
|
+
scrollView: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
},
|
|
34
|
+
loaderContainer: {
|
|
35
|
+
paddingTop: 34,
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
40
|
+
justifyContent: 'flex-start',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
},
|
|
43
|
+
errorContainer: {
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
width: '100%',
|
|
46
|
+
height: '100%',
|
|
47
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
padding: SPACING[400],
|
|
51
|
+
},
|
|
52
|
+
errorText: {
|
|
53
|
+
color: COLORS.PRIMARY_RED,
|
|
54
|
+
textAlign: 'center',
|
|
55
|
+
},
|
|
56
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { StyleSheet, View, Image, Text } from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import Animated, { FadeIn } from 'react-native-reanimated'
|
|
5
|
+
import { ExampleSolutionStatuses } from '../constants'
|
|
6
|
+
import gridImage from '../assets/grid.png'
|
|
7
|
+
|
|
8
|
+
type SolutionSectionProps = {
|
|
9
|
+
answer?: string
|
|
10
|
+
status: ExampleSolutionStatuses
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage
|
|
14
|
+
|
|
15
|
+
export const SolutionSection = ({ answer, status }: SolutionSectionProps) => {
|
|
16
|
+
const shouldShowAnswer =
|
|
17
|
+
answer &&
|
|
18
|
+
(status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE)
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={styles.container}>
|
|
22
|
+
<Image
|
|
23
|
+
source={{ uri: gridImagePath }}
|
|
24
|
+
style={[styles.gridImage, IS_WEB && styles.gridImageWeb]}
|
|
25
|
+
/>
|
|
26
|
+
{shouldShowAnswer && (
|
|
27
|
+
<Animated.ScrollView
|
|
28
|
+
style={styles.solutionScroll}
|
|
29
|
+
contentContainerStyle={styles.solutionScrollContent}
|
|
30
|
+
entering={status === 'cache' ? undefined : FadeIn.delay(1000).duration(500)}
|
|
31
|
+
>
|
|
32
|
+
<Text style={styles.solutionText}>{answer}</Text>
|
|
33
|
+
</Animated.ScrollView>
|
|
34
|
+
)}
|
|
35
|
+
</View>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
container: {
|
|
41
|
+
width: 351,
|
|
42
|
+
overflow: 'hidden',
|
|
43
|
+
borderRadius: 8,
|
|
44
|
+
borderWidth: 1,
|
|
45
|
+
borderColor: COLORS.NEUTRAL_5,
|
|
46
|
+
},
|
|
47
|
+
gridImage: {
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '100%',
|
|
50
|
+
resizeMode: 'cover',
|
|
51
|
+
aspectRatio: 28 / 8,
|
|
52
|
+
},
|
|
53
|
+
gridImageWeb: {
|
|
54
|
+
transform: [{ scale: 3.5 }],
|
|
55
|
+
},
|
|
56
|
+
solutionScroll: {
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
width: '100%',
|
|
59
|
+
height: '100%',
|
|
60
|
+
},
|
|
61
|
+
solutionScrollContent: {
|
|
62
|
+
paddingHorizontal: SPACING[800],
|
|
63
|
+
paddingVertical: SPACING[400],
|
|
64
|
+
},
|
|
65
|
+
solutionText: {
|
|
66
|
+
fontFamily: 'PlaypenSans-Light',
|
|
67
|
+
fontSize: 22,
|
|
68
|
+
},
|
|
69
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
import { useUnit } from 'effector-react'
|
|
3
|
+
import { ExampleSolutionPayload, ExampleSolutionResponse } from '../types'
|
|
4
|
+
import { ExampleSolutionModel } from '../model/ExampleSolution.model'
|
|
5
|
+
import { ExampleSolutionStatuses } from '../constants'
|
|
6
|
+
|
|
7
|
+
const ANIMATION_DELAY = 600
|
|
8
|
+
|
|
9
|
+
type UseExampleSolutionParams = {
|
|
10
|
+
model: ExampleSolutionModel
|
|
11
|
+
payload: ExampleSolutionPayload
|
|
12
|
+
problemId: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type UseExampleSolutionReturn = {
|
|
16
|
+
result: ExampleSolutionResponse | null
|
|
17
|
+
status: ExampleSolutionStatuses
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const useExampleSolution = ({
|
|
21
|
+
model,
|
|
22
|
+
payload,
|
|
23
|
+
problemId,
|
|
24
|
+
}: UseExampleSolutionParams): UseExampleSolutionReturn => {
|
|
25
|
+
const exampleSolutionsCache = useUnit(model.cache.$state)
|
|
26
|
+
const [result, setResult] = useState<ExampleSolutionResponse | null>(null)
|
|
27
|
+
const [status, setStatus] = useState<ExampleSolutionStatuses>(ExampleSolutionStatuses.LOADING)
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const fetchExampleSolution = async () => {
|
|
31
|
+
try {
|
|
32
|
+
if (exampleSolutionsCache[problemId]) {
|
|
33
|
+
setResult(exampleSolutionsCache[problemId])
|
|
34
|
+
setStatus(ExampleSolutionStatuses.CACHE)
|
|
35
|
+
return
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const startTime = Date.now()
|
|
39
|
+
const response = await model.api.generateExampleSolutionFx(payload)
|
|
40
|
+
|
|
41
|
+
setResult(response)
|
|
42
|
+
model.cache.addExampleSolution({ problemId, response })
|
|
43
|
+
|
|
44
|
+
const elapsedTime = Date.now() - startTime
|
|
45
|
+
if (elapsedTime >= ANIMATION_DELAY) {
|
|
46
|
+
setStatus(ExampleSolutionStatuses.DONE_DATA)
|
|
47
|
+
} else {
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
setStatus(ExampleSolutionStatuses.DONE_DATA)
|
|
50
|
+
}, ANIMATION_DELAY)
|
|
51
|
+
}
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error('Failed to fetch example solution:', error)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
fetchExampleSolution()
|
|
58
|
+
}, [])
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
result,
|
|
62
|
+
status,
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GifCelebrationsModelProps } from '../types'
|
|
2
|
+
import { ExampleSolutionsApi } from './ExampleSolutionApi'
|
|
3
|
+
import { ExampleSolutionCache } from './ExampleSolutionCache'
|
|
4
|
+
|
|
5
|
+
export class ExampleSolutionModel {
|
|
6
|
+
public readonly api
|
|
7
|
+
public readonly cache = new ExampleSolutionCache()
|
|
8
|
+
|
|
9
|
+
constructor({ api, errorHandler }: GifCelebrationsModelProps) {
|
|
10
|
+
this.api = new ExampleSolutionsApi({ api, errorHandler })
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createControllerEffect } from './../../../lib/effector/createControllerEffect'
|
|
2
|
+
import { ExampleSolutionApiRequests } from '../types'
|
|
3
|
+
import { $localization } from '../../../shared/translation'
|
|
4
|
+
|
|
5
|
+
type ExampleSolutionApiProps = {
|
|
6
|
+
api: ExampleSolutionApiRequests
|
|
7
|
+
errorHandler?: (errorMessage: string) => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class ExampleSolutionsApi {
|
|
11
|
+
public readonly generateExampleSolutionFx
|
|
12
|
+
|
|
13
|
+
constructor({ api, errorHandler }: ExampleSolutionApiProps) {
|
|
14
|
+
this.generateExampleSolutionFx = createControllerEffect(api.generateExampleSolution)
|
|
15
|
+
|
|
16
|
+
this.generateExampleSolutionFx.fail.watch(() => {
|
|
17
|
+
if (errorHandler) {
|
|
18
|
+
const errorMessage = $localization.getState().exampleSolution.errorMessage
|
|
19
|
+
errorHandler(errorMessage)
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createEvent, createStore } from 'effector'
|
|
2
|
+
import { ExampleSolutionResponse } from '../types'
|
|
3
|
+
|
|
4
|
+
type AddExampleSolution = {
|
|
5
|
+
problemId: string
|
|
6
|
+
response: ExampleSolutionResponse
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class ExampleSolutionCache {
|
|
10
|
+
public readonly resetState = createEvent()
|
|
11
|
+
public readonly addExampleSolution = createEvent<AddExampleSolution>()
|
|
12
|
+
public readonly $state = createStore<Record<string, ExampleSolutionResponse>>({})
|
|
13
|
+
.reset(this.resetState)
|
|
14
|
+
.on(this.addExampleSolution, (state, exampleSolution) => {
|
|
15
|
+
return {
|
|
16
|
+
...state,
|
|
17
|
+
[exampleSolution.problemId]: exampleSolution.response,
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ExampleSolutionModel } from './model/ExampleSolution.model'
|
|
2
|
+
|
|
3
|
+
export type ExampleSolutionPayload = {
|
|
4
|
+
question: string
|
|
5
|
+
answer: string
|
|
6
|
+
language: string
|
|
7
|
+
altText?: string
|
|
8
|
+
imageCdnId?: string
|
|
9
|
+
}
|
|
10
|
+
export type ExampleSolutionResponse = {
|
|
11
|
+
question: string
|
|
12
|
+
answer: string
|
|
13
|
+
}
|
|
14
|
+
export type ExampleSolutionApiRequests = {
|
|
15
|
+
generateExampleSolution: (body: ExampleSolutionPayload) => Promise<ExampleSolutionResponse>
|
|
16
|
+
}
|
|
17
|
+
export type GifCelebrationsModelProps = {
|
|
18
|
+
api: ExampleSolutionApiRequests
|
|
19
|
+
errorHandler?: (errorMessage: string) => void
|
|
20
|
+
}
|
|
21
|
+
export type ExampleSolutionModalParams = {
|
|
22
|
+
problemId: string
|
|
23
|
+
payload: ExampleSolutionPayload
|
|
24
|
+
model: ExampleSolutionModel
|
|
25
|
+
}
|
|
@@ -23,18 +23,18 @@ export class TeacherCommentsModel {
|
|
|
23
23
|
state,
|
|
24
24
|
assignmentId,
|
|
25
25
|
problemId,
|
|
26
|
-
fn: data => ({
|
|
27
|
-
comments: data.comments.map(comment => ({ ...comment, isRead: true })),
|
|
26
|
+
fn: (data) => ({
|
|
27
|
+
comments: data.comments.map((comment) => ({ ...comment, isRead: true })),
|
|
28
28
|
unreadMessagesCount: 0,
|
|
29
29
|
}),
|
|
30
30
|
}),
|
|
31
31
|
)
|
|
32
|
-
.on(this.add, (state, { assignmentId,
|
|
32
|
+
.on(this.add, (state, { assignmentId, comment, isRead }) =>
|
|
33
33
|
updateCommentsState({
|
|
34
34
|
state,
|
|
35
35
|
assignmentId,
|
|
36
|
-
problemId,
|
|
37
|
-
fn: data => ({
|
|
36
|
+
problemId: comment.problemId,
|
|
37
|
+
fn: (data) => ({
|
|
38
38
|
comments: [...data.comments, comment],
|
|
39
39
|
unreadMessagesCount: isRead ? data.unreadMessagesCount : data.unreadMessagesCount + 1,
|
|
40
40
|
}),
|
|
@@ -45,7 +45,7 @@ export class TeacherCommentsModel {
|
|
|
45
45
|
state,
|
|
46
46
|
assignmentId,
|
|
47
47
|
problemId,
|
|
48
|
-
fn: data => {
|
|
48
|
+
fn: (data) => {
|
|
49
49
|
const commentToDelete = data.comments.find(({ _id }) => _id === commentId)
|
|
50
50
|
if (!commentToDelete) return data
|
|
51
51
|
|
|
@@ -77,7 +77,7 @@ export class TeacherCommentsModel {
|
|
|
77
77
|
sample({
|
|
78
78
|
clock: this.add,
|
|
79
79
|
source: { isOpen: $isOpen },
|
|
80
|
-
filter: ({ isOpen }) => isOpen,
|
|
80
|
+
filter: ({ isOpen }, { problemId, comment }) => isOpen && comment.problemId === problemId,
|
|
81
81
|
fn: (_, { comment }) => ({
|
|
82
82
|
ids: [comment._id],
|
|
83
83
|
}),
|
|
@@ -56,7 +56,7 @@ export class TeacherFeedbackModel {
|
|
|
56
56
|
comments?.length === 1 && comments[0]._id === EMPTY_COMMENT_ID
|
|
57
57
|
return !isOpen && isOnlyNoCommentsMessage
|
|
58
58
|
},
|
|
59
|
-
fn: ({ assignmentId, problemId }
|
|
59
|
+
fn: ({ assignmentId, problemId }) => ({
|
|
60
60
|
assignmentId,
|
|
61
61
|
problemId,
|
|
62
62
|
commentId: EMPTY_COMMENT_ID,
|
|
@@ -76,7 +76,7 @@ export class TeacherFeedbackModel {
|
|
|
76
76
|
const hasUnreadComments = comments.some(({ isRead }) => !isRead)
|
|
77
77
|
return isOpen && hasUnreadComments
|
|
78
78
|
},
|
|
79
|
-
fn: source => {
|
|
79
|
+
fn: (source) => {
|
|
80
80
|
const comments = findCommentsByCredits(source)
|
|
81
81
|
return { ids: comments.map(({ _id }) => _id) }
|
|
82
82
|
},
|
|
@@ -97,9 +97,8 @@ export class TeacherFeedbackModel {
|
|
|
97
97
|
|
|
98
98
|
sample({
|
|
99
99
|
clock: this.sockets.commentDeleted,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
assignmentId,
|
|
100
|
+
fn: (comment) => ({
|
|
101
|
+
assignmentId: comment.exerciseId,
|
|
103
102
|
problemId: comment.problemId,
|
|
104
103
|
commentId: comment._id,
|
|
105
104
|
}),
|
|
@@ -113,10 +112,11 @@ export class TeacherFeedbackModel {
|
|
|
113
112
|
problemId: credits.$problemId,
|
|
114
113
|
isOpen: this.$isOpen,
|
|
115
114
|
},
|
|
115
|
+
filter: ({ assignmentId }, comment) => assignmentId === comment.exerciseId,
|
|
116
116
|
fn: ({ assignmentId, problemId, isOpen }, comment) => ({
|
|
117
117
|
comment,
|
|
118
118
|
assignmentId,
|
|
119
|
-
problemId
|
|
119
|
+
problemId,
|
|
120
120
|
isRead: isOpen && comment.problemId === problemId,
|
|
121
121
|
}),
|
|
122
122
|
target: this.comments.add,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { Gif } from './components/Gif'
|
|
3
|
+
import { Progress } from './components/Progress'
|
|
4
|
+
import { ContentContainer } from './components/ContentContainer'
|
|
5
|
+
import { Backdrop } from './components/Backdrop'
|
|
6
|
+
import { Easing, runOnJS, useSharedValue, withSequence, withTiming } from 'react-native-reanimated'
|
|
7
|
+
import { useUnit } from 'effector-react'
|
|
8
|
+
import { ANIMATION_DURATION } from './constants'
|
|
9
|
+
import { GifCelebrationsModel } from './model/GifCelebrations.model'
|
|
10
|
+
import { ProgressValue, TextComponentType } from './types/model.types'
|
|
11
|
+
|
|
12
|
+
type GifCelebrationsProps = {
|
|
13
|
+
model: GifCelebrationsModel
|
|
14
|
+
TextComponent: TextComponentType
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const GifCelebrations = ({ model, TextComponent }: GifCelebrationsProps) => {
|
|
18
|
+
const [problemsAmount, resolvedProblemsAmount, activeGif] = useUnit([
|
|
19
|
+
model.$problemsAmount,
|
|
20
|
+
model.$resolvedProblemsAmount,
|
|
21
|
+
model.$activeGif,
|
|
22
|
+
])
|
|
23
|
+
|
|
24
|
+
const completedPercent =
|
|
25
|
+
resolvedProblemsAmount &&
|
|
26
|
+
problemsAmount &&
|
|
27
|
+
Math.round((resolvedProblemsAmount / problemsAmount) * 100)
|
|
28
|
+
|
|
29
|
+
const progress = useSharedValue<ProgressValue>(0)
|
|
30
|
+
|
|
31
|
+
const stopAnimation = () => {
|
|
32
|
+
model.stop()
|
|
33
|
+
progress.value = 0
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const playAnimation = () => {
|
|
37
|
+
progress.value = withSequence(
|
|
38
|
+
withTiming(1, {
|
|
39
|
+
duration: ANIMATION_DURATION,
|
|
40
|
+
easing: Easing.bezier(0.52, 0.16, 0.26, 0.77),
|
|
41
|
+
}),
|
|
42
|
+
withTiming(
|
|
43
|
+
2,
|
|
44
|
+
{
|
|
45
|
+
duration: ANIMATION_DURATION,
|
|
46
|
+
easing: Easing.bezier(0.71, 0.09, 0.49, 0.89),
|
|
47
|
+
},
|
|
48
|
+
() => runOnJS(stopAnimation)(),
|
|
49
|
+
),
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (activeGif) {
|
|
55
|
+
playAnimation()
|
|
56
|
+
}
|
|
57
|
+
}, [activeGif])
|
|
58
|
+
|
|
59
|
+
if (!activeGif) {
|
|
60
|
+
return null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Backdrop progress={progress}>
|
|
65
|
+
<ContentContainer progress={progress}>
|
|
66
|
+
<Gif
|
|
67
|
+
gifObject={activeGif}
|
|
68
|
+
getCachePathMethod={model.cache.getCachePathMethod}
|
|
69
|
+
TextComponent={TextComponent}
|
|
70
|
+
/>
|
|
71
|
+
<Progress progress={progress} completedPercent={completedPercent} />
|
|
72
|
+
</ContentContainer>
|
|
73
|
+
</Backdrop>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StyleSheet, useWindowDimensions } from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import Animated, { useAnimatedStyle, interpolateColor, SharedValue } from 'react-native-reanimated'
|
|
4
|
+
import { BACKDROP_COLOR } from '../constants'
|
|
5
|
+
import { ProgressValue } from '../types/model.types'
|
|
6
|
+
|
|
7
|
+
type BackdropProps = {
|
|
8
|
+
children: React.ReactNode
|
|
9
|
+
progress: SharedValue<ProgressValue>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const Backdrop = ({ children, progress }: BackdropProps) => {
|
|
13
|
+
const { width, height } = useWindowDimensions()
|
|
14
|
+
|
|
15
|
+
const backdropAnimatedStyle = useAnimatedStyle(
|
|
16
|
+
() => ({
|
|
17
|
+
backgroundColor: interpolateColor(
|
|
18
|
+
progress.value,
|
|
19
|
+
[0, 1, 2],
|
|
20
|
+
[BACKDROP_COLOR.INITIAL, BACKDROP_COLOR.FINAL, BACKDROP_COLOR.INITIAL],
|
|
21
|
+
),
|
|
22
|
+
}),
|
|
23
|
+
[progress],
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Animated.View style={[styles.backdrop, { width, height }, backdropAnimatedStyle]}>
|
|
28
|
+
{children}
|
|
29
|
+
</Animated.View>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
backdrop: {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
zIndex: 10100,
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
backgroundColor: 'rgba(51, 51, 51, 0.33);',
|
|
40
|
+
},
|
|
41
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StyleSheet, useWindowDimensions } from 'react-native'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { SPACING } from '@magmamath/react-native-ui'
|
|
4
|
+
import Animated, { useAnimatedStyle, interpolate, SharedValue } from 'react-native-reanimated'
|
|
5
|
+
import { CONTENT_CONTAINER } from '../constants'
|
|
6
|
+
import { ProgressValue } from '../types/model.types'
|
|
7
|
+
|
|
8
|
+
type ContentContainerProps = {
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
progress: SharedValue<ProgressValue>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const ContentContainer = ({ children, progress }: ContentContainerProps) => {
|
|
14
|
+
const { width } = useWindowDimensions()
|
|
15
|
+
|
|
16
|
+
const RIGHT_POSITION =
|
|
17
|
+
width / 2 + CONTENT_CONTAINER.CONTAINER_WIDTH / 2 + CONTENT_CONTAINER.ROTATION_PADDING
|
|
18
|
+
const LEFT_POSITION = -RIGHT_POSITION - CONTENT_CONTAINER.ROTATION_PADDING
|
|
19
|
+
|
|
20
|
+
const animatedStyles = useAnimatedStyle(
|
|
21
|
+
() => ({
|
|
22
|
+
transform: [
|
|
23
|
+
{
|
|
24
|
+
translateX: interpolate(progress.value, [0, 1, 2], [LEFT_POSITION, 0, RIGHT_POSITION]),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
rotate: `${interpolate(progress.value, [0, 1, 2], [-CONTENT_CONTAINER.ANGLE, 0, CONTENT_CONTAINER.ANGLE])}deg`,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
[progress, RIGHT_POSITION, LEFT_POSITION],
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
return <Animated.View style={[styles.container, animatedStyles]}>{children}</Animated.View>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
container: {
|
|
39
|
+
width: CONTENT_CONTAINER.CONTAINER_WIDTH,
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
gap: SPACING[800],
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
},
|
|
44
|
+
})
|