@magmamath/students-features 0.4.0-rc.0 → 0.4.0
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/dist/commonjs/features/celebrations/components/Celebrations.js +51 -0
- package/dist/commonjs/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Particle.js +84 -0
- package/dist/commonjs/features/celebrations/components/Particle.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js +45 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Spark.js +23 -0
- package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -0
- package/dist/commonjs/features/celebrations/config.js +199 -0
- package/dist/commonjs/features/celebrations/config.js.map +1 -0
- package/dist/commonjs/features/celebrations/helpers.js +94 -0
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -0
- package/dist/commonjs/features/celebrations/index.js +28 -0
- package/dist/commonjs/features/celebrations/index.js.map +1 -0
- package/dist/commonjs/features/celebrations/types.js +15 -0
- package/dist/commonjs/features/celebrations/types.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +1 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.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/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +17 -28
- package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +117 -136
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +1 -0
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -21
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
- package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/messagesHelper.js +5 -1
- package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +6 -0
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +45 -54
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +58 -0
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +247 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +131 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +56 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +68 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +53 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +47 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +69 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +55 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +102 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +83 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +96 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +44 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +233 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +63 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +34 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +91 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +107 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/constants.js +55 -0
- package/dist/commonjs/features/endOfAssignment/constants.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js +64 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +51 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/index.js +40 -0
- package/dist/commonjs/features/endOfAssignment/index.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js +53 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/types.js +33 -0
- package/dist/commonjs/features/endOfAssignment/types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +43 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +30 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +65 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +29 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +32 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/commonjs/index.js +24 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/commonjs/shared/icons/Halloween.js +54 -0
- package/dist/commonjs/shared/icons/Halloween.js.map +1 -0
- package/dist/commonjs/shared/icons/Pi.js +30 -0
- package/dist/commonjs/shared/icons/Pi.js.map +1 -0
- package/dist/commonjs/shared/icons/Star.js +30 -0
- package/dist/commonjs/shared/icons/Star.js.map +1 -0
- package/dist/commonjs/shared/icons/{StopIcon.js → Valentine.js} +9 -12
- package/dist/commonjs/shared/icons/Valentine.js.map +1 -0
- package/dist/commonjs/shared/icons/Winter.js +32 -0
- package/dist/commonjs/shared/icons/Winter.js.map +1 -0
- package/dist/commonjs/shared/icons/icon.types.js +0 -4
- package/dist/module/features/celebrations/components/Celebrations.js +45 -0
- package/dist/module/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/module/features/celebrations/components/Particle.js +76 -0
- package/dist/module/features/celebrations/components/Particle.js.map +1 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js +38 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/module/features/celebrations/components/Spark.js +17 -0
- package/dist/module/features/celebrations/components/Spark.js.map +1 -0
- package/dist/module/features/celebrations/config.js +194 -0
- package/dist/module/features/celebrations/config.js.map +1 -0
- package/dist/module/features/celebrations/helpers.js +87 -0
- package/dist/module/features/celebrations/helpers.js.map +1 -0
- package/dist/module/features/celebrations/index.js +5 -0
- package/dist/module/features/celebrations/index.js.map +1 -0
- package/dist/module/features/celebrations/types.js +11 -0
- package/dist/module/features/celebrations/types.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +4 -6
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -12
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +2 -6
- package/dist/module/features/chatbot/components/Chatbot.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/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +15 -26
- package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatBotModel.js +119 -138
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +1 -0
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +8 -21
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -16
- package/dist/module/features/chatbot/model/api.js.map +1 -0
- package/dist/module/features/chatbot/model/messagesHelper.js +5 -1
- package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +7 -1
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +45 -54
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/api.types.js +0 -2
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +52 -0
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +241 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +124 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +50 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +62 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +47 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js +41 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +63 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +49 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +96 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +77 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +89 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +38 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +226 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +56 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js +29 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +85 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +100 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/constants.js +51 -0
- package/dist/module/features/endOfAssignment/constants.js.map +1 -0
- package/dist/module/features/endOfAssignment/helpers.js +58 -0
- package/dist/module/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +46 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/module/features/endOfAssignment/index.js +6 -0
- package/dist/module/features/endOfAssignment/index.js.map +1 -0
- package/dist/module/features/endOfAssignment/model/model.js +48 -0
- package/dist/module/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/types.js +29 -0
- package/dist/module/features/endOfAssignment/types.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js +37 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js +24 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +58 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js +21 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +24 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/module/index.js +2 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/module/shared/icons/Halloween.js +47 -0
- package/dist/module/shared/icons/Halloween.js.map +1 -0
- package/dist/module/shared/icons/Pi.js +23 -0
- package/dist/module/shared/icons/Pi.js.map +1 -0
- package/dist/module/shared/icons/Star.js +23 -0
- package/dist/module/shared/icons/Star.js.map +1 -0
- package/dist/module/shared/icons/Valentine.js +23 -0
- package/dist/module/shared/icons/Valentine.js.map +1 -0
- package/dist/module/shared/icons/Winter.js +25 -0
- package/dist/module/shared/icons/Winter.js.map +1 -0
- package/dist/module/shared/icons/icon.types.js +0 -2
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.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/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +14 -19
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +6 -12
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +4 -3
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +4 -2
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +8 -7
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -2
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +19 -26
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +2 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/module/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/module/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/module/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.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/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatBotThreadManager.d.ts → ChatBotMessageHandler.d.ts} +8 -11
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +14 -19
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +6 -12
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +4 -3
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +4 -2
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +8 -7
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -2
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +19 -26
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +2 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/features/celebrations/components/Celebrations.tsx +62 -0
- package/src/features/celebrations/components/Particle.tsx +99 -0
- package/src/features/celebrations/components/ParticleBatch.tsx +56 -0
- package/src/features/celebrations/components/Spark.tsx +14 -0
- package/src/features/celebrations/config.ts +199 -0
- package/src/features/celebrations/helpers.ts +96 -0
- package/src/features/celebrations/index.ts +2 -0
- package/src/features/celebrations/types.ts +11 -0
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +0 -3
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +0 -14
- package/src/features/chatbot/components/Chatbot.tsx +2 -3
- package/src/features/chatbot/index.ts +3 -3
- package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +16 -28
- package/src/features/chatbot/model/ChatBotModel.ts +124 -123
- package/src/features/chatbot/model/DefaultMessageCreator.ts +3 -3
- package/src/features/chatbot/model/ThreadItem.ts +9 -20
- package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -19
- package/src/features/chatbot/model/messagesHelper.ts +6 -2
- package/src/features/chatbot/model/t2s.ts +10 -3
- package/src/features/chatbot/model/translation.helpers.ts +1 -2
- package/src/features/chatbot/model/translation.ts +46 -52
- package/src/features/chatbot/types/api.types.ts +12 -2
- package/src/features/chatbot/types/model.types.ts +26 -38
- package/src/features/chatbot/types/translation.types.ts +1 -2
- package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +48 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +293 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +128 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +39 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +40 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +45 -0
- package/src/features/endOfAssignment/components/EOAModal.tsx +64 -0
- package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +56 -0
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +46 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +102 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +69 -0
- package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +105 -0
- package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +33 -0
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +196 -0
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +62 -0
- package/src/features/endOfAssignment/components/Modal/model.ts +34 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +85 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +107 -0
- package/src/features/endOfAssignment/constants.ts +53 -0
- package/src/features/endOfAssignment/helpers.ts +28 -0
- package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +78 -0
- package/src/features/endOfAssignment/index.ts +3 -0
- package/src/features/endOfAssignment/model/model.ts +57 -0
- package/src/features/endOfAssignment/types.ts +65 -0
- package/src/features/endOfAssignment/ui/EOABadge.tsx +47 -0
- package/src/features/endOfAssignment/ui/PracticeButton.tsx +27 -0
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +75 -0
- package/src/features/endOfAssignment/ui/SparkIcon.tsx +15 -0
- package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +17 -0
- package/src/index.ts +2 -0
- package/src/lib/effector/createEntityFieldStore.ts +1 -9
- package/src/shared/icons/Halloween.tsx +33 -0
- package/src/shared/icons/Pi.tsx +16 -0
- package/src/shared/icons/Star.tsx +16 -0
- package/src/shared/icons/Valentine.tsx +16 -0
- package/src/shared/icons/Winter.tsx +19 -0
- package/src/shared/icons/icon.types.ts +6 -9
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js +0 -17
- package/dist/commonjs/features/chatbot/context/ChatBotContext.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -58
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -99
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
- package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
- package/dist/commonjs/lib/helpers/randomElements.js +0 -24
- package/dist/commonjs/lib/helpers/randomElements.js.map +0 -1
- package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
- package/dist/module/features/chatbot/context/ChatBotContext.js +0 -12
- package/dist/module/features/chatbot/context/ChatBotContext.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -52
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -94
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/module/features/chatbot/types/units.types.js +0 -2
- package/dist/module/features/chatbot/types/units.types.js.map +0 -1
- package/dist/module/lib/helpers/randomElements.js +0 -20
- package/dist/module/lib/helpers/randomElements.js.map +0 -1
- package/dist/module/shared/icons/HighlighterIcon.js +0 -29
- package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/module/shared/icons/StopIcon.js +0 -26
- package/dist/module/shared/icons/StopIcon.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -31
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts +0 -2
- package/dist/typescript/commonjs/lib/helpers/randomElements.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/context/ChatBotContext.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -3
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -28
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -26
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -31
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/helpers/randomElements.d.ts +0 -2
- package/dist/typescript/module/lib/helpers/randomElements.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
- package/src/features/chatbot/context/ChatBotContext.ts +0 -18
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -116
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -94
- package/src/features/chatbot/types/units.types.ts +0 -34
- package/src/lib/helpers/randomElements.ts +0 -22
- package/src/shared/icons/HighlighterIcon.tsx +0 -21
- package/src/shared/icons/StopIcon.tsx +0 -17
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React, { useCallback, useState } from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { useUnit } from 'effector-react'
|
|
5
|
+
import { SPACING, Typography, COLORS, FONT_FAMILY } from '@magmamath/react-native-ui'
|
|
6
|
+
|
|
7
|
+
import { AnimatedCard } from './AnimatedCard'
|
|
8
|
+
|
|
9
|
+
import { PracticeButtonGroup } from '../../ui/PracticeButtonGroup'
|
|
10
|
+
import { GOOD_DRAWING_CARD_APPEARENCE_DELAY } from '../../constants'
|
|
11
|
+
import { AnimatedCardVariant, EOAModalContentProps, EOAModalVariant } from '../../types'
|
|
12
|
+
|
|
13
|
+
export const CorrectAnswer = ({ textContent, model, onPracticePress }: EOAModalContentProps) => {
|
|
14
|
+
const popUpData = useUnit(model.$popUpData)
|
|
15
|
+
const modalVariant = useUnit(model.$modalVariant)
|
|
16
|
+
const [cardsAnimationCompleted, setCardsAnimationCompleted] = useState(false)
|
|
17
|
+
|
|
18
|
+
const { user, stats, hasRecommendations, isExam, newerAssignmentAvailable } = popUpData ?? {}
|
|
19
|
+
const { solvedAmount, problemsAmount, goodDrawingAmount } = stats ?? {}
|
|
20
|
+
|
|
21
|
+
const isPracticeButtonVisible = !!(
|
|
22
|
+
user?.practiceMode &&
|
|
23
|
+
!newerAssignmentAvailable &&
|
|
24
|
+
(isExam || hasRecommendations)
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
const handlePracticePress = () => {
|
|
28
|
+
onPracticePress?.()
|
|
29
|
+
model.hidePopUp()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const onCorrectAnswerAnimationEnd = useCallback(() => {
|
|
33
|
+
if (goodDrawingAmount === 0) {
|
|
34
|
+
setCardsAnimationCompleted(true)
|
|
35
|
+
}
|
|
36
|
+
}, [])
|
|
37
|
+
|
|
38
|
+
const onGBDAnimationEnd = useCallback(() => {
|
|
39
|
+
setCardsAnimationCompleted(true)
|
|
40
|
+
}, [])
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<View
|
|
44
|
+
style={[
|
|
45
|
+
styles.wrapper,
|
|
46
|
+
modalVariant !== EOAModalVariant.HAS_GOOD_DRAWING && { alignItems: 'center' },
|
|
47
|
+
]}
|
|
48
|
+
>
|
|
49
|
+
<View style={styles.header}>
|
|
50
|
+
<Typography variant="large" style={styles.title}>
|
|
51
|
+
{textContent?.title}
|
|
52
|
+
</Typography>
|
|
53
|
+
<Typography variant="h4" style={styles.subtitle}>
|
|
54
|
+
{`${textContent?.subtitle} ${user?.firstName}!`}
|
|
55
|
+
</Typography>
|
|
56
|
+
</View>
|
|
57
|
+
|
|
58
|
+
<View style={styles.animationContainer}>
|
|
59
|
+
<AnimatedCard
|
|
60
|
+
variant={AnimatedCardVariant.CORRECT_ANSWER}
|
|
61
|
+
textContent={textContent}
|
|
62
|
+
solvedAmount={solvedAmount}
|
|
63
|
+
problemsAmount={problemsAmount}
|
|
64
|
+
shouldTriggerSparkles={cardsAnimationCompleted}
|
|
65
|
+
onAnimationEnd={onCorrectAnswerAnimationEnd}
|
|
66
|
+
/>
|
|
67
|
+
|
|
68
|
+
{modalVariant === EOAModalVariant.HAS_GOOD_DRAWING && (
|
|
69
|
+
<AnimatedCard
|
|
70
|
+
variant={AnimatedCardVariant.GOOD_DRAWING}
|
|
71
|
+
textContent={textContent}
|
|
72
|
+
gbdAmount={goodDrawingAmount}
|
|
73
|
+
shouldTriggerSparkles={cardsAnimationCompleted}
|
|
74
|
+
onAnimationEnd={onGBDAnimationEnd}
|
|
75
|
+
delay={GOOD_DRAWING_CARD_APPEARENCE_DELAY}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
</View>
|
|
79
|
+
|
|
80
|
+
<PracticeButtonGroup
|
|
81
|
+
textContent={textContent}
|
|
82
|
+
isPracticeButtonVisible={isPracticeButtonVisible}
|
|
83
|
+
isExam={isExam}
|
|
84
|
+
onLeftButtonPress={model.hidePopUpAndLeave}
|
|
85
|
+
onRightButtonPress={handlePracticePress}
|
|
86
|
+
/>
|
|
87
|
+
</View>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const styles = StyleSheet.create({
|
|
92
|
+
wrapper: {
|
|
93
|
+
flex: 1,
|
|
94
|
+
gap: SPACING[400],
|
|
95
|
+
},
|
|
96
|
+
header: {
|
|
97
|
+
gap: SPACING[100],
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
},
|
|
100
|
+
title: {
|
|
101
|
+
fontWeight: '900',
|
|
102
|
+
lineHeight: 54,
|
|
103
|
+
fontSize: 36,
|
|
104
|
+
paddingVertical: SPACING[100],
|
|
105
|
+
color: COLORS.NEUTRAL_9,
|
|
106
|
+
fontFamily: FONT_FAMILY.buenosAires,
|
|
107
|
+
},
|
|
108
|
+
subtitle: {
|
|
109
|
+
color: COLORS.NEUTRAL_7,
|
|
110
|
+
paddingVertical: SPACING[100],
|
|
111
|
+
lineHeight: 25,
|
|
112
|
+
},
|
|
113
|
+
animationContainer: {
|
|
114
|
+
flex: 1,
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
gap: SPACING[800],
|
|
118
|
+
paddingTop: SPACING[800],
|
|
119
|
+
paddingBottom: SPACING[1600],
|
|
120
|
+
},
|
|
121
|
+
buttonsContainer: {
|
|
122
|
+
height: 62,
|
|
123
|
+
flexDirection: 'row',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
gap: SPACING[200],
|
|
126
|
+
paddingVertical: SPACING[300],
|
|
127
|
+
},
|
|
128
|
+
})
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { Spark } from './Spark'
|
|
5
|
+
import { SPARKS_ANIMATION_DELAY } from '../../constants'
|
|
6
|
+
|
|
7
|
+
type CorrectAnswerProps = {
|
|
8
|
+
shouldStartAnimation: boolean
|
|
9
|
+
color: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const CA_SPARKS_MAP = [
|
|
13
|
+
{ id: '1', x: 22, y: 20, size: 14, initialDelay: SPARKS_ANIMATION_DELAY * 1.3 },
|
|
14
|
+
{ id: '2', x: 128, y: 127, size: 21, initialDelay: SPARKS_ANIMATION_DELAY * 1.14 },
|
|
15
|
+
{ id: '3', x: 268, y: 44, size: 28, initialDelay: SPARKS_ANIMATION_DELAY * 1.4 },
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
export const CorrectAnswerSparks = ({ color, shouldStartAnimation }: CorrectAnswerProps) => {
|
|
19
|
+
if (!shouldStartAnimation) {
|
|
20
|
+
return null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<View style={styles.container}>
|
|
25
|
+
{CA_SPARKS_MAP.map((star) => (
|
|
26
|
+
<Spark key={star.id} color={color} {...star} />
|
|
27
|
+
))}
|
|
28
|
+
</View>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
zIndex: 110,
|
|
36
|
+
width: '100%',
|
|
37
|
+
height: '100%',
|
|
38
|
+
},
|
|
39
|
+
})
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { StyleSheet, View } from 'react-native'
|
|
3
|
+
import { Spark } from './Spark'
|
|
4
|
+
import { SPARKS_ANIMATION_DELAY } from '../../constants'
|
|
5
|
+
|
|
6
|
+
const GD_SPARKS_MAP = [
|
|
7
|
+
{ id: '1', x: 20, y: 135.5, size: 14, initialDelay: SPARKS_ANIMATION_DELAY * 1.25 },
|
|
8
|
+
{ id: '2', x: 25, y: 19.5, size: 21, initialDelay: SPARKS_ANIMATION_DELAY },
|
|
9
|
+
{ id: '3', x: 115, y: 132, size: 28, initialDelay: SPARKS_ANIMATION_DELAY * 1.1 },
|
|
10
|
+
{ id: '4', x: 315, y: 42, size: 14, initialDelay: SPARKS_ANIMATION_DELAY * 1.31 },
|
|
11
|
+
{ id: '5', x: 326, y: 24.5, size: 21, initialDelay: SPARKS_ANIMATION_DELAY * 1.36 },
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
type GoodDrawingSparksProps = {
|
|
15
|
+
shouldStartAnimation: boolean
|
|
16
|
+
color: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const GoodDrawingSparks = ({ color, shouldStartAnimation }: GoodDrawingSparksProps) => {
|
|
20
|
+
if (!shouldStartAnimation) {
|
|
21
|
+
return null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<View style={styles.container}>
|
|
26
|
+
{GD_SPARKS_MAP.map((star) => (
|
|
27
|
+
<Spark key={star.id} color={color} {...star} />
|
|
28
|
+
))}
|
|
29
|
+
</View>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
container: {
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
zIndex: 110,
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
},
|
|
40
|
+
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
3
|
+
import { SparkIcon } from '../../ui/SparkIcon'
|
|
4
|
+
import { useSparkAnimation } from '../../hooks/useSparkAnimation'
|
|
5
|
+
import Animated from 'react-native-reanimated'
|
|
6
|
+
|
|
7
|
+
type SparkProps = {
|
|
8
|
+
id: string
|
|
9
|
+
x: number
|
|
10
|
+
y: number
|
|
11
|
+
size: number
|
|
12
|
+
color: string
|
|
13
|
+
initialDelay: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const SPARKS_SPRING_CONFIG = {
|
|
17
|
+
mass: 1.8,
|
|
18
|
+
damping: 25,
|
|
19
|
+
stiffness: 293,
|
|
20
|
+
overshootClamping: false,
|
|
21
|
+
restDisplacementThreshold: 0.01,
|
|
22
|
+
restSpeedThreshold: 2,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const HOLD_DELAY = 800
|
|
26
|
+
const ROTATION_ANGLE = 90
|
|
27
|
+
|
|
28
|
+
export const Spark = ({ id, x, y, size, initialDelay = 350, color = COLORS.GREEN_3 }: SparkProps) => {
|
|
29
|
+
const { animatedStyle } = useSparkAnimation({
|
|
30
|
+
id,
|
|
31
|
+
initialDelay,
|
|
32
|
+
rotationAngle: ROTATION_ANGLE,
|
|
33
|
+
holdDelay: HOLD_DELAY,
|
|
34
|
+
springConfig: SPARKS_SPRING_CONFIG,
|
|
35
|
+
x,
|
|
36
|
+
y,
|
|
37
|
+
size,
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Animated.View style={animatedStyle}>
|
|
42
|
+
<SparkIcon size={size} color={color} />
|
|
43
|
+
</Animated.View>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { useUnit } from 'effector-react'
|
|
3
|
+
|
|
4
|
+
import { EOAModel } from '../model/model'
|
|
5
|
+
import { EOAEventType, EOAModalText, EOAModalVariant } from '../types'
|
|
6
|
+
|
|
7
|
+
import { Modal } from './Modal/Modal'
|
|
8
|
+
|
|
9
|
+
import { NoAnswer } from './NoAnswer/NoAnswer'
|
|
10
|
+
import { CheatDetected } from './CheatDetected/CheatDetected'
|
|
11
|
+
import { CorrectAnswer } from './CorrectAnswer/CorrectAnswer'
|
|
12
|
+
import { ExamLeave } from './ExamLeave/ExamLeave'
|
|
13
|
+
import { ExamPaused } from './ExamPaused/ExamPaused'
|
|
14
|
+
import { ExamSubmit } from './ExamSubmit/ExamSubmit'
|
|
15
|
+
|
|
16
|
+
import { getModalContainerSize, shouldDisplayModalBackground } from '../helpers'
|
|
17
|
+
|
|
18
|
+
const MODAL_CONTENT_VARIANTS_MAP = new Map([
|
|
19
|
+
[EOAModalVariant.NO_CORRECT_ANSWERS, NoAnswer],
|
|
20
|
+
[EOAModalVariant.HAS_CORRECT_ANSWERS, CorrectAnswer],
|
|
21
|
+
[EOAModalVariant.HAS_GOOD_DRAWING, CorrectAnswer],
|
|
22
|
+
[EOAModalVariant.EXAM_FINISHED_NO_CORRECT_ANSWERS, NoAnswer],
|
|
23
|
+
[EOAModalVariant.EXAM_FINISHED_HAS_CORRECT_ANSWERS, CorrectAnswer],
|
|
24
|
+
[EOAModalVariant.EXAM_SAFE_MODE_SUBMIT, ExamSubmit],
|
|
25
|
+
[EOAModalVariant.EXAM_SUBMIT, ExamSubmit],
|
|
26
|
+
[EOAModalVariant.EXAM_PAUSED, ExamPaused],
|
|
27
|
+
[EOAModalVariant.EXAM_SAFE_MODE_CHEAT_DETECTED, CheatDetected],
|
|
28
|
+
[EOAModalVariant.EXAM_SAFE_MODE_LEAVE, ExamLeave],
|
|
29
|
+
])
|
|
30
|
+
|
|
31
|
+
type EOAModalProps = {
|
|
32
|
+
model: EOAModel
|
|
33
|
+
textContent: EOAModalText
|
|
34
|
+
onPracticePress: () => void
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const EOAModal = ({ model, textContent, onPracticePress }: EOAModalProps) => {
|
|
38
|
+
const popUpData = useUnit(model.$popUpData)
|
|
39
|
+
const modalVariant = useUnit(model.$modalVariant)
|
|
40
|
+
|
|
41
|
+
if (!popUpData || !modalVariant) return null
|
|
42
|
+
|
|
43
|
+
const withBackground = shouldDisplayModalBackground(modalVariant)
|
|
44
|
+
const isDismissable =
|
|
45
|
+
popUpData.eventType !== EOAEventType.CHEAT_DETECTED &&
|
|
46
|
+
popUpData.eventType !== EOAEventType.EXAM_PAUSED
|
|
47
|
+
|
|
48
|
+
const ModalContent = MODAL_CONTENT_VARIANTS_MAP.get(modalVariant)
|
|
49
|
+
|
|
50
|
+
if (!ModalContent) return null
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Modal
|
|
54
|
+
isVisible={true}
|
|
55
|
+
isDismissable={isDismissable}
|
|
56
|
+
style={getModalContainerSize(modalVariant)}
|
|
57
|
+
onClose={model.hidePopUp}
|
|
58
|
+
content={
|
|
59
|
+
<ModalContent model={model} textContent={textContent} onPracticePress={onPracticePress} />
|
|
60
|
+
}
|
|
61
|
+
withBackground={withBackground}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { Button, COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { EOAModalContentProps } from '../../types'
|
|
6
|
+
|
|
7
|
+
export const ExamLeave = ({ textContent, model }: EOAModalContentProps) => {
|
|
8
|
+
const handleDismiss = () => model.hidePopUp()
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<View style={styles.container}>
|
|
12
|
+
<Typography variant='h1' style={styles.description}>
|
|
13
|
+
{textContent.description}
|
|
14
|
+
</Typography>
|
|
15
|
+
|
|
16
|
+
<View style={styles.buttonsContainer}>
|
|
17
|
+
<Button variant='tertiary' size='large' style={{ text: styles.buttonText }} onPress={handleDismiss}>
|
|
18
|
+
{textContent.leftButtonText}
|
|
19
|
+
</Button>
|
|
20
|
+
|
|
21
|
+
<Button
|
|
22
|
+
variant='primary'
|
|
23
|
+
colorScheme='red'
|
|
24
|
+
size='large'
|
|
25
|
+
style={{ text: styles.buttonText }}
|
|
26
|
+
onPress={model.hidePopUpAndLeave}
|
|
27
|
+
>
|
|
28
|
+
{textContent.rightButtonText}
|
|
29
|
+
</Button>
|
|
30
|
+
</View>
|
|
31
|
+
</View>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
container: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
gap: SPACING[800],
|
|
39
|
+
paddingTop: SPACING[800],
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'space-between',
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
textAlign: 'center',
|
|
45
|
+
fontWeight: '700',
|
|
46
|
+
color: COLORS.NEUTRAL_9,
|
|
47
|
+
},
|
|
48
|
+
buttonsContainer: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
gap: SPACING[200],
|
|
52
|
+
},
|
|
53
|
+
buttonText: {
|
|
54
|
+
textTransform: 'uppercase',
|
|
55
|
+
},
|
|
56
|
+
})
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { Button, COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { EOAModalContentProps } from '../../types'
|
|
6
|
+
|
|
7
|
+
export const ExamPaused = ({ textContent, model }: EOAModalContentProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<View style={styles.container}>
|
|
10
|
+
<Typography variant='h2' style={styles.title}>
|
|
11
|
+
{textContent.title}
|
|
12
|
+
</Typography>
|
|
13
|
+
|
|
14
|
+
<Typography variant='h1' style={styles.description}>
|
|
15
|
+
{textContent.description}
|
|
16
|
+
</Typography>
|
|
17
|
+
|
|
18
|
+
<Button
|
|
19
|
+
variant='primary'
|
|
20
|
+
colorScheme='purple'
|
|
21
|
+
size='large'
|
|
22
|
+
style={{ text: styles.buttonText }}
|
|
23
|
+
onPress={model.hidePopUpAndLeave}
|
|
24
|
+
>
|
|
25
|
+
{textContent.leftButtonText}
|
|
26
|
+
</Button>
|
|
27
|
+
</View>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
gap: SPACING[800],
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
color: COLORS.NEUTRAL_9,
|
|
38
|
+
},
|
|
39
|
+
description: {
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
fontWeight: '700',
|
|
42
|
+
},
|
|
43
|
+
buttonText: {
|
|
44
|
+
textTransform: 'uppercase',
|
|
45
|
+
},
|
|
46
|
+
})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet, Platform, Image } from 'react-native'
|
|
3
|
+
import { useUnit } from 'effector-react'
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ButtonVariant,
|
|
7
|
+
COLORS,
|
|
8
|
+
IS_MOBILE,
|
|
9
|
+
SPACING,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@magmamath/react-native-ui'
|
|
12
|
+
|
|
13
|
+
import { ExamSubmitContent } from './ExamSubmitContent'
|
|
14
|
+
import { EOAModalContentProps } from '../../types'
|
|
15
|
+
import { PracticeButton } from '../../ui/PracticeButton'
|
|
16
|
+
|
|
17
|
+
export const ExamSubmit = ({ textContent, model, onPracticePress }: EOAModalContentProps) => {
|
|
18
|
+
const popUpData = useUnit(model.$popUpData)
|
|
19
|
+
|
|
20
|
+
const problemsAmount = popUpData?.stats?.problemsAmount ?? 0
|
|
21
|
+
const practiceModeEnabled = popUpData?.user.practiceMode
|
|
22
|
+
|
|
23
|
+
const leaveAssignmentButtonVariant =
|
|
24
|
+
!practiceModeEnabled || popUpData?.newerAssignmentAvailable
|
|
25
|
+
? ButtonVariant.PRIMARY
|
|
26
|
+
: ButtonVariant.TERTIARY
|
|
27
|
+
|
|
28
|
+
const handlePracticePress = () => {
|
|
29
|
+
onPracticePress?.()
|
|
30
|
+
model.hidePopUp()
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<View style={styles.container}>
|
|
35
|
+
<View style={styles.contentBackground}>
|
|
36
|
+
{IS_MOBILE ? (
|
|
37
|
+
<Image source={require('./blurred-card.png')} />
|
|
38
|
+
) : (
|
|
39
|
+
<ExamSubmitContent problemsAmount={problemsAmount} />
|
|
40
|
+
)}
|
|
41
|
+
</View>
|
|
42
|
+
<Typography variant="h2" style={styles.title}>
|
|
43
|
+
{textContent.title}
|
|
44
|
+
</Typography>
|
|
45
|
+
<Typography variant="h1" style={styles.description}>
|
|
46
|
+
{textContent.description}
|
|
47
|
+
</Typography>
|
|
48
|
+
|
|
49
|
+
<View style={styles.buttonsContainer}>
|
|
50
|
+
<Button
|
|
51
|
+
variant={leaveAssignmentButtonVariant}
|
|
52
|
+
size="large"
|
|
53
|
+
colorScheme={popUpData?.isExam ? 'purple' : 'blue'}
|
|
54
|
+
style={{ text: { textTransform: 'uppercase' } }}
|
|
55
|
+
onPress={model.hidePopUpAndLeave}
|
|
56
|
+
>
|
|
57
|
+
{textContent.leftButtonText ?? ''}
|
|
58
|
+
</Button>
|
|
59
|
+
{!!practiceModeEnabled && !popUpData?.newerAssignmentAvailable && (
|
|
60
|
+
<PracticeButton onPress={handlePracticePress} text={textContent.rightButtonText} />
|
|
61
|
+
)}
|
|
62
|
+
</View>
|
|
63
|
+
</View>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
container: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
gap: SPACING[400],
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
justifyContent: 'space-between',
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
color: COLORS.NEUTRAL_9,
|
|
76
|
+
paddingVertical: SPACING[100],
|
|
77
|
+
},
|
|
78
|
+
description: {
|
|
79
|
+
color: COLORS.NEUTRAL_9,
|
|
80
|
+
textAlign: 'center',
|
|
81
|
+
fontWeight: 700,
|
|
82
|
+
paddingTop: SPACING[800],
|
|
83
|
+
paddingBottom: SPACING[1600],
|
|
84
|
+
},
|
|
85
|
+
contentBackground: {
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
zIndex: -1,
|
|
88
|
+
top: '22%',
|
|
89
|
+
...(Platform.OS === 'web' && {
|
|
90
|
+
filter: 'blur(4px)',
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
buttonsContainer: {
|
|
94
|
+
height: 62,
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
gap: SPACING[200],
|
|
98
|
+
},
|
|
99
|
+
buttonText: {
|
|
100
|
+
textTransform: 'uppercase',
|
|
101
|
+
},
|
|
102
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, CorrectIcon, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type ExamSumitContentProps = {
|
|
6
|
+
problemsAmount: number
|
|
7
|
+
description?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const ExamSubmitContent = ({ problemsAmount, description }: ExamSumitContentProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<View style={styles.container}>
|
|
13
|
+
<View style={styles.content}>
|
|
14
|
+
<View style={styles.iconContainer}>
|
|
15
|
+
<CorrectIcon size={70} color={COLORS.NEUTRAL_1} />
|
|
16
|
+
</View>
|
|
17
|
+
<View style={styles.textContainer}>
|
|
18
|
+
<Typography variant="xxl" style={styles.largeText}>
|
|
19
|
+
{description || '?'}
|
|
20
|
+
</Typography>
|
|
21
|
+
<Typography style={styles.text}>/{problemsAmount}</Typography>
|
|
22
|
+
</View>
|
|
23
|
+
</View>
|
|
24
|
+
</View>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
opacity: 0.4,
|
|
31
|
+
paddingHorizontal: SPACING[100],
|
|
32
|
+
paddingTop: SPACING[100],
|
|
33
|
+
paddingBottom: 38,
|
|
34
|
+
marginBottom: SPACING[800],
|
|
35
|
+
backgroundColor: COLORS.NEUTRAL_5,
|
|
36
|
+
borderRadius: BORDER_RADIUS[400],
|
|
37
|
+
},
|
|
38
|
+
content: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
borderRadius: BORDER_RADIUS[200],
|
|
41
|
+
paddingVertical: SPACING[400],
|
|
42
|
+
paddingHorizontal: SPACING[800],
|
|
43
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
44
|
+
gap: SPACING[500],
|
|
45
|
+
},
|
|
46
|
+
iconContainer: {
|
|
47
|
+
backgroundColor: COLORS.NEUTRAL_5,
|
|
48
|
+
padding: SPACING[200],
|
|
49
|
+
borderRadius: 100,
|
|
50
|
+
height: 70,
|
|
51
|
+
width: 70,
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
},
|
|
55
|
+
textContainer: {
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
fontWeight: '700',
|
|
60
|
+
color: COLORS.NEUTRAL_5,
|
|
61
|
+
alignSelf: 'flex-end',
|
|
62
|
+
},
|
|
63
|
+
largeText: {
|
|
64
|
+
fontSize: 48,
|
|
65
|
+
fontWeight: '700',
|
|
66
|
+
lineHeight: 48,
|
|
67
|
+
color: COLORS.NEUTRAL_5,
|
|
68
|
+
},
|
|
69
|
+
})
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useState } from 'react'
|
|
2
|
+
import { ButtonVariant, CrossIcon, COLORS, BORDER_RADIUS, SPACING, SHADOWS, Button } from '@magmamath/react-native-ui'
|
|
3
|
+
import {
|
|
4
|
+
Animated,
|
|
5
|
+
GestureResponderEvent,
|
|
6
|
+
StyleProp,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
TextStyle,
|
|
9
|
+
TouchableWithoutFeedback,
|
|
10
|
+
View,
|
|
11
|
+
ViewStyle,
|
|
12
|
+
} from 'react-native'
|
|
13
|
+
|
|
14
|
+
import { ModalModel } from './model'
|
|
15
|
+
import { ModalBackground } from './ModalBackground'
|
|
16
|
+
|
|
17
|
+
const stopPropagation = {
|
|
18
|
+
onTouchStart: (event: GestureResponderEvent) => {
|
|
19
|
+
event.stopPropagation()
|
|
20
|
+
},
|
|
21
|
+
onMouseDown: (event: MouseEvent) => {
|
|
22
|
+
event.stopPropagation()
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ModalProps = {
|
|
27
|
+
isVisible: boolean
|
|
28
|
+
content: ReactNode
|
|
29
|
+
isDismissable: boolean
|
|
30
|
+
onClose?: () => void
|
|
31
|
+
hideCloseButton?: boolean
|
|
32
|
+
withBackground?: boolean
|
|
33
|
+
style?: {
|
|
34
|
+
overlay?: StyleProp<ViewStyle>
|
|
35
|
+
container?: StyleProp<ViewStyle>
|
|
36
|
+
header?: StyleProp<TextStyle> | StyleProp<ViewStyle>
|
|
37
|
+
content?: StyleProp<TextStyle> | StyleProp<ViewStyle>
|
|
38
|
+
footer?: StyleProp<ViewStyle>
|
|
39
|
+
closeButton?: StyleProp<ViewStyle>
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Modal = ({ isVisible, isDismissable = true, onClose, style, content, withBackground }: ModalProps) => {
|
|
44
|
+
const [modalModel] = useState(() => new ModalModel())
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (isVisible) {
|
|
48
|
+
modalModel.animation.show()
|
|
49
|
+
}
|
|
50
|
+
}, [isVisible])
|
|
51
|
+
|
|
52
|
+
if (!isVisible) return null
|
|
53
|
+
return (
|
|
54
|
+
<TouchableWithoutFeedback onPress={() => isDismissable && onClose?.()}>
|
|
55
|
+
<Animated.View style={[styles.overlay, style?.overlay, modalModel.animatedStyle]}>
|
|
56
|
+
<TouchableWithoutFeedback {...stopPropagation}>
|
|
57
|
+
<View style={[styles.container, style?.container]}>
|
|
58
|
+
{withBackground && <View style={styles.backgroundWrapper}>{<ModalBackground />}</View>}
|
|
59
|
+
{isDismissable && (
|
|
60
|
+
<View style={[styles.closeButton, style?.closeButton]}>
|
|
61
|
+
<Button
|
|
62
|
+
variant={ButtonVariant.TERTIARY}
|
|
63
|
+
icon={<CrossIcon size={18} color={COLORS.NEUTRAL_7} />}
|
|
64
|
+
onPress={onClose}
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
)}
|
|
68
|
+
{content}
|
|
69
|
+
</View>
|
|
70
|
+
</TouchableWithoutFeedback>
|
|
71
|
+
</Animated.View>
|
|
72
|
+
</TouchableWithoutFeedback>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
overlay: {
|
|
78
|
+
...StyleSheet.absoluteFillObject,
|
|
79
|
+
justifyContent: 'center',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
|
82
|
+
zIndex: 10001,
|
|
83
|
+
},
|
|
84
|
+
container: {
|
|
85
|
+
position: 'relative',
|
|
86
|
+
justifyContent: 'space-between',
|
|
87
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
88
|
+
minWidth: 300,
|
|
89
|
+
maxWidth: 957,
|
|
90
|
+
borderRadius: BORDER_RADIUS['400'],
|
|
91
|
+
paddingHorizontal: SPACING['1600'],
|
|
92
|
+
paddingVertical: SPACING['800'],
|
|
93
|
+
gap: SPACING['600'],
|
|
94
|
+
...SHADOWS['5'],
|
|
95
|
+
},
|
|
96
|
+
closeButton: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
top: SPACING['400'],
|
|
99
|
+
right: SPACING['400'],
|
|
100
|
+
},
|
|
101
|
+
backgroundWrapper: {
|
|
102
|
+
...StyleSheet.absoluteFillObject,
|
|
103
|
+
zIndex: -1,
|
|
104
|
+
},
|
|
105
|
+
})
|