@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
|
@@ -10,35 +10,26 @@ export class ChatbotTranslation {
|
|
|
10
10
|
api,
|
|
11
11
|
$key,
|
|
12
12
|
defaultMessages,
|
|
13
|
+
messagesModel,
|
|
13
14
|
alternativesModel,
|
|
14
|
-
$context
|
|
15
|
-
chats
|
|
15
|
+
$context
|
|
16
16
|
}) {
|
|
17
17
|
this.api = api;
|
|
18
18
|
this.$key = $key;
|
|
19
19
|
this.$context = $context;
|
|
20
20
|
this.defaultMessages = defaultMessages;
|
|
21
|
+
this.messagesModel = messagesModel;
|
|
21
22
|
this.alternativesModel = alternativesModel;
|
|
22
23
|
this.translateAllMessagesFx = attach({
|
|
23
|
-
source: [this.$key,
|
|
24
|
-
mapParams: (_, [key,
|
|
24
|
+
source: [this.$key, this.messagesModel.$state, this.alternativesModel.$store, this.$context],
|
|
25
|
+
mapParams: (_, [key, messages, alternatives, context]) => ({
|
|
25
26
|
targetLanguage: context?.translationTargetLanguage ?? '',
|
|
26
|
-
messages:
|
|
27
|
+
messages: messages[key] ?? [],
|
|
27
28
|
alternatives
|
|
28
29
|
}),
|
|
29
30
|
effect: this.translateBatchFx
|
|
30
31
|
});
|
|
31
|
-
|
|
32
|
-
clock: this.translateAllMessagesFx.doneData,
|
|
33
|
-
source: [this.$key],
|
|
34
|
-
fn: ([key], translatedMessages) => ({
|
|
35
|
-
key,
|
|
36
|
-
data: {
|
|
37
|
-
messages: translatedMessages
|
|
38
|
-
}
|
|
39
|
-
}),
|
|
40
|
-
target: chats.update
|
|
41
|
-
});
|
|
32
|
+
this.initTranslationSamples();
|
|
42
33
|
}
|
|
43
34
|
shouldSkipTranslation(messages) {
|
|
44
35
|
if (this.$isTranslated.getState()) {
|
|
@@ -52,6 +43,17 @@ export class ChatbotTranslation {
|
|
|
52
43
|
}
|
|
53
44
|
return false;
|
|
54
45
|
}
|
|
46
|
+
initTranslationSamples() {
|
|
47
|
+
sample({
|
|
48
|
+
clock: this.translateAllMessagesFx.doneData,
|
|
49
|
+
source: [this.$key],
|
|
50
|
+
fn: ([key], translatedMessages) => ({
|
|
51
|
+
key,
|
|
52
|
+
data: translatedMessages
|
|
53
|
+
}),
|
|
54
|
+
target: this.messagesModel.setField
|
|
55
|
+
});
|
|
56
|
+
}
|
|
55
57
|
async translateRequest({
|
|
56
58
|
textList,
|
|
57
59
|
targetLanguage
|
|
@@ -128,45 +130,34 @@ export class ChatbotTranslation {
|
|
|
128
130
|
};
|
|
129
131
|
});
|
|
130
132
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}),
|
|
139
|
-
effect: createEffect(async ({
|
|
140
|
-
messages,
|
|
141
|
-
targetLanguage,
|
|
142
|
-
preventTranslate
|
|
133
|
+
translateMessagesFx = createEffect(async ({
|
|
134
|
+
messages,
|
|
135
|
+
targetLanguage
|
|
136
|
+
}) => {
|
|
137
|
+
const text = messages.map(({
|
|
138
|
+
options,
|
|
139
|
+
message
|
|
143
140
|
}) => {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
...message,
|
|
165
|
-
translatedMessage,
|
|
166
|
-
options: addTranslationToOptions(options, translatedTexts.splice(0, options.length))
|
|
167
|
-
};
|
|
168
|
-
});
|
|
169
|
-
})
|
|
141
|
+
return [message, ...options.map(({
|
|
142
|
+
text
|
|
143
|
+
}) => text)];
|
|
144
|
+
}).flat();
|
|
145
|
+
const response = await this.api.translateTextFx({
|
|
146
|
+
text,
|
|
147
|
+
targetLanguage
|
|
148
|
+
});
|
|
149
|
+
const translatedTexts = response.data.translations.map(({
|
|
150
|
+
translatedText
|
|
151
|
+
}) => decodeHTMLEntities(translatedText));
|
|
152
|
+
return messages.map(message => {
|
|
153
|
+
const options = message.options;
|
|
154
|
+
const translatedMessage = translatedTexts.shift();
|
|
155
|
+
return {
|
|
156
|
+
...message,
|
|
157
|
+
translatedMessage,
|
|
158
|
+
options: addTranslationToOptions(options, translatedTexts.splice(0, options.length))
|
|
159
|
+
};
|
|
160
|
+
});
|
|
170
161
|
});
|
|
171
162
|
reset() {
|
|
172
163
|
this.setIsTranslated(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","alternativesModel","$context","
|
|
1
|
+
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","messagesModel","alternativesModel","$context","translateAllMessagesFx","source","$state","$store","mapParams","_","key","messages","alternatives","context","targetLanguage","translationTargetLanguage","effect","translateBatchFx","initTranslationSamples","shouldSkipTranslation","getState","allTranslated","every","message","translatedMessage","clock","doneData","fn","translatedMessages","data","target","setField","translateRequest","textList","text","Object","values","flat","response","translateTextFx","translatedText","translations","map","entries","reduce","result","texts","splice","length","addTranslationToAlternatives","props","set","error","endMessage","defaultOptions","anotherHintOption","options","lastMessage","at","translatedTextsList","alternativesHints","hints","alternativesDefaults","default","forEach","index","translatedHints","translatedDefaults","isLastMessage","translateMessagesFx","translatedTexts","shift","reset"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAiBC,OAAO,EAAEC,MAAM,QAAe,UAAU;AASnG,SAASC,kBAAkB,QAAQ,eAAY;AAG/C,SACEC,4BAA4B,EAC5BC,uBAAuB,EACvBC,wBAAwB,QACnB,0BAAuB;AAc9B,OAAO,MAAMC,kBAAkB,CAAC;EAQrBC,eAAe,GAAGR,WAAW,CAAU,CAAC;EACxCS,aAAa,GAAGR,OAAO,CAAC,IAAI,CAACO,eAAe,EAAE,KAAK,CAAC;EAI7DE,WAAWA,CAAC;IACVC,GAAG;IACHC,IAAI;IACJC,eAAe;IACfC,aAAa;IACbC,iBAAiB;IACjBC;EACuB,CAAC,EAAE;IAC1B,IAAI,CAACL,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACI,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACH,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,iBAAiB,GAAGA,iBAAiB;IAE1C,IAAI,CAACE,sBAAsB,GAAGnB,MAAM,CA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AAGhD,OAAO;QACVC,iBAAiB;QACjBgC,OAAO,EAAEhE,uBAAuB,CAACgE,OAAO,EAAEc,eAAe,CAACvB,MAAM,CAAC,CAAC,EAAES,OAAO,CAACR,MAAM,CAAC;MACrF,CAAC;IACH,CAAC,CAAC;EACJ,CACF,CAAC;EAEMwB,KAAKA,CAAA,EAAG;IACb,IAAI,CAAC7E,eAAe,CAAC,KAAK,CAAC;EAC7B;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AAoEA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { Button, SPACING, COLORS, Typography } from '@magmamath/react-native-ui';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export const CheatDetected = ({
|
|
8
|
+
textContent,
|
|
9
|
+
model
|
|
10
|
+
}) => {
|
|
11
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
12
|
+
style: styles.container,
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
14
|
+
variant: "h2",
|
|
15
|
+
style: styles.title,
|
|
16
|
+
children: textContent.title
|
|
17
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
18
|
+
variant: "h1",
|
|
19
|
+
style: styles.description,
|
|
20
|
+
children: textContent.description
|
|
21
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
22
|
+
variant: "primary",
|
|
23
|
+
colorScheme: "red",
|
|
24
|
+
size: "large",
|
|
25
|
+
style: {
|
|
26
|
+
text: styles.buttonText
|
|
27
|
+
},
|
|
28
|
+
onPress: model.hidePopUpAndLeave,
|
|
29
|
+
children: textContent.leftButtonText
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
container: {
|
|
35
|
+
flex: 1,
|
|
36
|
+
gap: SPACING[800],
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
justifyContent: 'space-between'
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
color: COLORS.NEUTRAL_9
|
|
42
|
+
},
|
|
43
|
+
description: {
|
|
44
|
+
color: COLORS.NEUTRAL_9,
|
|
45
|
+
textAlign: 'center',
|
|
46
|
+
fontWeight: '700'
|
|
47
|
+
},
|
|
48
|
+
buttonText: {
|
|
49
|
+
textTransform: 'uppercase'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=CheatDetected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Button","SPACING","COLORS","Typography","jsx","_jsx","jsxs","_jsxs","CheatDetected","textContent","model","style","styles","container","children","variant","title","description","colorScheme","size","text","buttonText","onPress","hidePopUpAndLeave","leftButtonText","create","flex","gap","alignItems","justifyContent","color","NEUTRAL_9","textAlign","fontWeight","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/endOfAssignment/components/CheatDetected/CheatDetected.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,MAAM,EAAEC,OAAO,EAAEC,MAAM,EAAEC,UAAU,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGhF,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAEC;AAA4B,CAAC,KAAK;EAC7E,oBACEH,KAAA,CAACT,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BT,IAAA,CAACF,UAAU;MAACY,OAAO,EAAC,IAAI;MAACJ,KAAK,EAAEC,MAAM,CAACI,KAAM;MAAAF,QAAA,EAC1CL,WAAW,CAACO;IAAK,CACR,CAAC,eAEbX,IAAA,CAACF,UAAU;MAACY,OAAO,EAAC,IAAI;MAACJ,KAAK,EAAEC,MAAM,CAACK,WAAY;MAAAH,QAAA,EAChDL,WAAW,CAACQ;IAAW,CACd,CAAC,eAEbZ,IAAA,CAACL,MAAM;MACLe,OAAO,EAAC,SAAS;MACjBG,WAAW,EAAC,KAAK;MACjBC,IAAI,EAAC,OAAO;MACZR,KAAK,EAAE;QAAES,IAAI,EAAER,MAAM,CAACS;MAAW,CAAE;MACnCC,OAAO,EAAEZ,KAAK,CAACa,iBAAkB;MAAAT,QAAA,EAEhCL,WAAW,CAACe;IAAc,CACrB,CAAC;EAAA,CACL,CAAC;AAEX,CAAC;AAED,MAAMZ,MAAM,GAAGb,UAAU,CAAC0B,MAAM,CAAC;EAC/BZ,SAAS,EAAE;IACTa,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE1B,OAAO,CAAC,GAAG,CAAC;IACjB2B,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDb,KAAK,EAAE;IACLc,KAAK,EAAE5B,MAAM,CAAC6B;EAChB,CAAC;EACDd,WAAW,EAAE;IACXa,KAAK,EAAE5B,MAAM,CAAC6B,SAAS;IACvBC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE;EACd,CAAC;EACDZ,UAAU,EAAE;IACVa,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { memo, useEffect, useRef } from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import Animated, { useSharedValue, useAnimatedStyle, withSpring, withTiming, withDelay, interpolate, interpolateColor, runOnUI, runOnJS } from 'react-native-reanimated';
|
|
6
|
+
import { SPACING, Typography, COLORS, BORDER_RADIUS, IS_MOBILE } from '@magmamath/react-native-ui';
|
|
7
|
+
import { GoodDrawingSparks } from "./GoodDrawingSparks.js";
|
|
8
|
+
import { CorrectAnswerSparks } from "./CorrectAnswerSparks.js";
|
|
9
|
+
import { EOABadge } from "../../ui/EOABadge.js";
|
|
10
|
+
import { SparkIcon } from "../../ui/SparkIcon.js";
|
|
11
|
+
import { AnimatedCardVariant } from "../../types.js";
|
|
12
|
+
import { ANIMATION_DELAYS, BADGE_PARAMS, CARD_DIMENSIONS, OPACITY, SPRING_CONFIG, SPRING_CONFIG_STEP_3, VARIANT_COLORS } from "../../constants.js";
|
|
13
|
+
import { CelebrationVariant } from "../../../celebrations/types.js";
|
|
14
|
+
import { Celebrations } from "../../../celebrations/components/Celebrations.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
export const AnimatedCard = /*#__PURE__*/memo(({
|
|
17
|
+
variant,
|
|
18
|
+
textContent,
|
|
19
|
+
shouldTriggerSparkles,
|
|
20
|
+
solvedAmount = 0,
|
|
21
|
+
problemsAmount = 0,
|
|
22
|
+
gbdAmount = 0,
|
|
23
|
+
delay = 0,
|
|
24
|
+
onAnimationEnd
|
|
25
|
+
}) => {
|
|
26
|
+
const celebrationsRef = useRef(null);
|
|
27
|
+
const cardOpacity = useSharedValue(OPACITY.initial);
|
|
28
|
+
const cardWidth = useSharedValue(CARD_DIMENSIONS.initialWidth);
|
|
29
|
+
const badgeTranslateX = useSharedValue(BADGE_PARAMS.initialTranslateX);
|
|
30
|
+
const badgeRotation = useSharedValue(BADGE_PARAMS.initialRotation);
|
|
31
|
+
const badgeScale = useSharedValue(BADGE_PARAMS.initialScale);
|
|
32
|
+
const statsOpacity = useSharedValue(OPACITY.initial);
|
|
33
|
+
const delaySv = useSharedValue(0);
|
|
34
|
+
const animatedCardStyle = useAnimatedStyle(() => {
|
|
35
|
+
const progress = interpolate(statsOpacity.value, [OPACITY.initial, OPACITY.final], [OPACITY.initial, OPACITY.final]);
|
|
36
|
+
const backgroundColor = interpolateColor(progress, [OPACITY.initial, OPACITY.final], [VARIANT_COLORS[variant].initial, VARIANT_COLORS[variant].final]);
|
|
37
|
+
const height = interpolate(cardWidth.value, [CARD_DIMENSIONS.initialWidth, CARD_DIMENSIONS.finalWidth], [CARD_DIMENSIONS.initialHeight, CARD_DIMENSIONS.finalHeight]);
|
|
38
|
+
return {
|
|
39
|
+
opacity: cardOpacity.value,
|
|
40
|
+
width: cardWidth.value,
|
|
41
|
+
height,
|
|
42
|
+
backgroundColor
|
|
43
|
+
};
|
|
44
|
+
}, [statsOpacity, cardOpacity, cardWidth]);
|
|
45
|
+
const animatedBadgeStyle = useAnimatedStyle(() => ({
|
|
46
|
+
transform: [{
|
|
47
|
+
translateX: badgeTranslateX.value
|
|
48
|
+
}, {
|
|
49
|
+
rotate: `${badgeRotation.value}deg`
|
|
50
|
+
}, {
|
|
51
|
+
scale: badgeScale.value
|
|
52
|
+
}]
|
|
53
|
+
}), [badgeTranslateX, badgeRotation, badgeScale]);
|
|
54
|
+
const animatedStatsStyle = useAnimatedStyle(() => {
|
|
55
|
+
return {
|
|
56
|
+
opacity: statsOpacity.value
|
|
57
|
+
};
|
|
58
|
+
}, [statsOpacity]);
|
|
59
|
+
const statsSubtitle = (() => {
|
|
60
|
+
if (variant === AnimatedCardVariant.CORRECT_ANSWER) {
|
|
61
|
+
if (solvedAmount > 1) {
|
|
62
|
+
return textContent.stats?.correctAnswersPlural;
|
|
63
|
+
}
|
|
64
|
+
return textContent.stats?.correctAnswers;
|
|
65
|
+
} else {
|
|
66
|
+
if (gbdAmount > 1) {
|
|
67
|
+
return textContent.stats?.goodCalculationsPlural;
|
|
68
|
+
}
|
|
69
|
+
return textContent.stats?.goodCalculations;
|
|
70
|
+
}
|
|
71
|
+
})();
|
|
72
|
+
const runCelebration = () => {
|
|
73
|
+
if (variant === AnimatedCardVariant.CORRECT_ANSWER) {
|
|
74
|
+
celebrationsRef.current?.play(CelebrationVariant.CORRECT_FINISH_ASSIGNMENT);
|
|
75
|
+
} else {
|
|
76
|
+
celebrationsRef.current?.play(CelebrationVariant.GBD_FINISH_ASSIGNMENT);
|
|
77
|
+
}
|
|
78
|
+
onAnimationEnd?.();
|
|
79
|
+
};
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
runOnUI(() => {
|
|
82
|
+
'worklet';
|
|
83
|
+
|
|
84
|
+
const step3 = () => {
|
|
85
|
+
badgeTranslateX.value = withSpring(BADGE_PARAMS.finalTranslateX, SPRING_CONFIG_STEP_3);
|
|
86
|
+
statsOpacity.value = withDelay(80, withSpring(OPACITY.final, SPRING_CONFIG_STEP_3));
|
|
87
|
+
};
|
|
88
|
+
const step2 = () => {
|
|
89
|
+
badgeTranslateX.value = withSpring(BADGE_PARAMS.intermediateTranslateX, SPRING_CONFIG);
|
|
90
|
+
cardWidth.value = withSpring(CARD_DIMENSIONS.finalWidth, SPRING_CONFIG);
|
|
91
|
+
badgeRotation.value = withSpring(0, SPRING_CONFIG);
|
|
92
|
+
badgeScale.value = withSpring(1, SPRING_CONFIG, () => {
|
|
93
|
+
delaySv.value = withTiming(1, {
|
|
94
|
+
duration: ANIMATION_DELAYS.step3
|
|
95
|
+
}, () => {
|
|
96
|
+
step3();
|
|
97
|
+
delaySv.value = withTiming(0, {
|
|
98
|
+
duration: 100
|
|
99
|
+
}, finished => {
|
|
100
|
+
if (finished) {
|
|
101
|
+
runOnJS(runCelebration)();
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const step1 = () => {
|
|
108
|
+
cardOpacity.value = withDelay(delay, withSpring(OPACITY.final, SPRING_CONFIG, () => {
|
|
109
|
+
step2();
|
|
110
|
+
}));
|
|
111
|
+
};
|
|
112
|
+
step1();
|
|
113
|
+
})();
|
|
114
|
+
}, []);
|
|
115
|
+
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
116
|
+
style: styles.cardContainer,
|
|
117
|
+
children: [variant === AnimatedCardVariant.CORRECT_ANSWER ? /*#__PURE__*/_jsx(CorrectAnswerSparks, {
|
|
118
|
+
color: COLORS.GREEN_3,
|
|
119
|
+
shouldStartAnimation: shouldTriggerSparkles
|
|
120
|
+
}) : /*#__PURE__*/_jsx(GoodDrawingSparks, {
|
|
121
|
+
color: COLORS.ORANGE_3,
|
|
122
|
+
shouldStartAnimation: shouldTriggerSparkles
|
|
123
|
+
}), /*#__PURE__*/_jsx(Celebrations, {
|
|
124
|
+
modelRef: celebrationsRef,
|
|
125
|
+
style: styles.celebrations
|
|
126
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
127
|
+
style: [styles.card, animatedCardStyle],
|
|
128
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
129
|
+
style: styles.cardContent,
|
|
130
|
+
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
131
|
+
style: [styles.badgeContainer, animatedBadgeStyle],
|
|
132
|
+
children: /*#__PURE__*/_jsx(EOABadge, {
|
|
133
|
+
variant: variant,
|
|
134
|
+
color: VARIANT_COLORS[variant].primary,
|
|
135
|
+
size: 88,
|
|
136
|
+
iconSize: 56
|
|
137
|
+
})
|
|
138
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
139
|
+
style: [styles.statsWrapper, animatedStatsStyle],
|
|
140
|
+
children: [variant === AnimatedCardVariant.GOOD_DRAWING && /*#__PURE__*/_jsxs(View, {
|
|
141
|
+
style: styles.starContainer,
|
|
142
|
+
children: [/*#__PURE__*/_jsx(SparkIcon, {
|
|
143
|
+
size: 20,
|
|
144
|
+
color: VARIANT_COLORS[variant].initial
|
|
145
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
146
|
+
style: styles.starCircle
|
|
147
|
+
}), /*#__PURE__*/_jsx(SparkIcon, {
|
|
148
|
+
size: 12,
|
|
149
|
+
color: VARIANT_COLORS[variant].initial
|
|
150
|
+
})]
|
|
151
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
152
|
+
style: styles.statsValueContainer,
|
|
153
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
154
|
+
variant: "h1",
|
|
155
|
+
style: [styles.largeText, {
|
|
156
|
+
color: VARIANT_COLORS[variant].primary
|
|
157
|
+
}],
|
|
158
|
+
children: variant === AnimatedCardVariant.CORRECT_ANSWER ? solvedAmount : gbdAmount
|
|
159
|
+
}), variant === AnimatedCardVariant.CORRECT_ANSWER && /*#__PURE__*/_jsxs(Typography, {
|
|
160
|
+
variant: "h5",
|
|
161
|
+
style: styles.smallText,
|
|
162
|
+
children: ["/", problemsAmount]
|
|
163
|
+
})]
|
|
164
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
165
|
+
variant: "h3",
|
|
166
|
+
style: styles.cardTitle,
|
|
167
|
+
children: statsSubtitle
|
|
168
|
+
})]
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
})]
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
const styles = StyleSheet.create({
|
|
175
|
+
cardContainer: {
|
|
176
|
+
height: CARD_DIMENSIONS.finalHeight,
|
|
177
|
+
width: CARD_DIMENSIONS.finalWidth,
|
|
178
|
+
justifyContent: 'center',
|
|
179
|
+
alignItems: 'center'
|
|
180
|
+
},
|
|
181
|
+
card: {
|
|
182
|
+
padding: SPACING[200],
|
|
183
|
+
borderRadius: SPACING[400]
|
|
184
|
+
},
|
|
185
|
+
cardContent: {
|
|
186
|
+
flex: 1,
|
|
187
|
+
gap: SPACING[100],
|
|
188
|
+
borderRadius: BORDER_RADIUS[200],
|
|
189
|
+
flexDirection: 'row',
|
|
190
|
+
alignItems: 'center',
|
|
191
|
+
backgroundColor: COLORS.NEUTRAL_1
|
|
192
|
+
},
|
|
193
|
+
badgeContainer: {
|
|
194
|
+
borderRadius: BORDER_RADIUS[400],
|
|
195
|
+
marginRight: 50
|
|
196
|
+
},
|
|
197
|
+
statsWrapper: {
|
|
198
|
+
padding: SPACING[100],
|
|
199
|
+
gap: SPACING[100]
|
|
200
|
+
},
|
|
201
|
+
statsValueContainer: {
|
|
202
|
+
flexDirection: 'row',
|
|
203
|
+
height: IS_MOBILE ? 42 : 'auto',
|
|
204
|
+
paddingHorizontal: SPACING[100],
|
|
205
|
+
marginVertical: SPACING[100]
|
|
206
|
+
},
|
|
207
|
+
largeText: {
|
|
208
|
+
textAlign: 'center',
|
|
209
|
+
textAlignVertical: 'bottom',
|
|
210
|
+
fontSize: IS_MOBILE ? 56 : 60,
|
|
211
|
+
fontWeight: '700',
|
|
212
|
+
lineHeight: IS_MOBILE ? 54 : 46
|
|
213
|
+
},
|
|
214
|
+
smallText: {
|
|
215
|
+
fontSize: 16,
|
|
216
|
+
fontWeight: '700',
|
|
217
|
+
lineHeight: 16,
|
|
218
|
+
color: COLORS.NEUTRAL_6,
|
|
219
|
+
alignSelf: 'flex-end'
|
|
220
|
+
},
|
|
221
|
+
cardTitle: {
|
|
222
|
+
color: COLORS.NEUTRAL_7,
|
|
223
|
+
padding: SPACING[100]
|
|
224
|
+
},
|
|
225
|
+
starContainer: {
|
|
226
|
+
position: 'absolute',
|
|
227
|
+
left: 55,
|
|
228
|
+
top: 10
|
|
229
|
+
},
|
|
230
|
+
starCircle: {
|
|
231
|
+
width: 4,
|
|
232
|
+
height: 4,
|
|
233
|
+
borderRadius: 5,
|
|
234
|
+
backgroundColor: COLORS.ORANGE_2
|
|
235
|
+
},
|
|
236
|
+
celebrations: {
|
|
237
|
+
top: 0,
|
|
238
|
+
zIndex: 100000
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
//# sourceMappingURL=AnimatedCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","memo","useEffect","useRef","View","StyleSheet","Animated","useSharedValue","useAnimatedStyle","withSpring","withTiming","withDelay","interpolate","interpolateColor","runOnUI","runOnJS","SPACING","Typography","COLORS","BORDER_RADIUS","IS_MOBILE","GoodDrawingSparks","CorrectAnswerSparks","EOABadge","SparkIcon","AnimatedCardVariant","ANIMATION_DELAYS","BADGE_PARAMS","CARD_DIMENSIONS","OPACITY","SPRING_CONFIG","SPRING_CONFIG_STEP_3","VARIANT_COLORS","CelebrationVariant","Celebrations","jsx","_jsx","jsxs","_jsxs","AnimatedCard","variant","textContent","shouldTriggerSparkles","solvedAmount","problemsAmount","gbdAmount","delay","onAnimationEnd","celebrationsRef","cardOpacity","initial","cardWidth","initialWidth","badgeTranslateX","initialTranslateX","badgeRotation","initialRotation","badgeScale","initialScale","statsOpacity","delaySv","animatedCardStyle","progress","value","final","backgroundColor","height","finalWidth","initialHeight","finalHeight","opacity","width","animatedBadgeStyle","transform","translateX","rotate","scale","animatedStatsStyle","statsSubtitle","CORRECT_ANSWER","stats","correctAnswersPlural","correctAnswers","goodCalculationsPlural","goodCalculations","runCelebration","current","play","CORRECT_FINISH_ASSIGNMENT","GBD_FINISH_ASSIGNMENT","step3","finalTranslateX","step2","intermediateTranslateX","duration","finished","step1","style","styles","cardContainer","children","color","GREEN_3","shouldStartAnimation","ORANGE_3","modelRef","celebrations","card","cardContent","badgeContainer","primary","size","iconSize","statsWrapper","GOOD_DRAWING","starContainer","starCircle","statsValueContainer","largeText","smallText","cardTitle","create","justifyContent","alignItems","padding","borderRadius","flex","gap","flexDirection","NEUTRAL_1","marginRight","paddingHorizontal","marginVertical","textAlign","textAlignVertical","fontSize","fontWeight","lineHeight","NEUTRAL_6","alignSelf","NEUTRAL_7","position","left","top","ORANGE_2","zIndex"],"sourceRoot":"../../../../../../src","sources":["features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACtD,SAASC,IAAI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AE;EACb,CAAC;EACDnB,SAAS,EAAE;IACTnB,KAAK,EAAEnF,MAAM,CAAC0H,SAAS;IACvBhB,OAAO,EAAE5G,OAAO,CAAC,GAAG;EACtB,CAAC;EACDmG,aAAa,EAAE;IACb0B,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,EAAE;IACRC,GAAG,EAAE;EACP,CAAC;EACD3B,UAAU,EAAE;IACV7C,KAAK,EAAE,CAAC;IACRL,MAAM,EAAE,CAAC;IACT2D,YAAY,EAAE,CAAC;IACf5D,eAAe,EAAE/C,MAAM,CAAC8H;EAC1B,CAAC;EACDtC,YAAY,EAAE;IACZqC,GAAG,EAAE,CAAC;IACNE,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useCallback, useState } from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { useUnit } from 'effector-react';
|
|
6
|
+
import { SPACING, Typography, COLORS, FONT_FAMILY } from '@magmamath/react-native-ui';
|
|
7
|
+
import { AnimatedCard } from "./AnimatedCard.js";
|
|
8
|
+
import { PracticeButtonGroup } from "../../ui/PracticeButtonGroup.js";
|
|
9
|
+
import { GOOD_DRAWING_CARD_APPEARENCE_DELAY } from "../../constants.js";
|
|
10
|
+
import { AnimatedCardVariant, EOAModalVariant } from "../../types.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export const CorrectAnswer = ({
|
|
13
|
+
textContent,
|
|
14
|
+
model,
|
|
15
|
+
onPracticePress
|
|
16
|
+
}) => {
|
|
17
|
+
const popUpData = useUnit(model.$popUpData);
|
|
18
|
+
const modalVariant = useUnit(model.$modalVariant);
|
|
19
|
+
const [cardsAnimationCompleted, setCardsAnimationCompleted] = useState(false);
|
|
20
|
+
const {
|
|
21
|
+
user,
|
|
22
|
+
stats,
|
|
23
|
+
hasRecommendations,
|
|
24
|
+
isExam,
|
|
25
|
+
newerAssignmentAvailable
|
|
26
|
+
} = popUpData ?? {};
|
|
27
|
+
const {
|
|
28
|
+
solvedAmount,
|
|
29
|
+
problemsAmount,
|
|
30
|
+
goodDrawingAmount
|
|
31
|
+
} = stats ?? {};
|
|
32
|
+
const isPracticeButtonVisible = !!(user?.practiceMode && !newerAssignmentAvailable && (isExam || hasRecommendations));
|
|
33
|
+
const handlePracticePress = () => {
|
|
34
|
+
onPracticePress?.();
|
|
35
|
+
model.hidePopUp();
|
|
36
|
+
};
|
|
37
|
+
const onCorrectAnswerAnimationEnd = useCallback(() => {
|
|
38
|
+
if (goodDrawingAmount === 0) {
|
|
39
|
+
setCardsAnimationCompleted(true);
|
|
40
|
+
}
|
|
41
|
+
}, []);
|
|
42
|
+
const onGBDAnimationEnd = useCallback(() => {
|
|
43
|
+
setCardsAnimationCompleted(true);
|
|
44
|
+
}, []);
|
|
45
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: [styles.wrapper, modalVariant !== EOAModalVariant.HAS_GOOD_DRAWING && {
|
|
47
|
+
alignItems: 'center'
|
|
48
|
+
}],
|
|
49
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
50
|
+
style: styles.header,
|
|
51
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
52
|
+
variant: "large",
|
|
53
|
+
style: styles.title,
|
|
54
|
+
children: textContent?.title
|
|
55
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
56
|
+
variant: "h4",
|
|
57
|
+
style: styles.subtitle,
|
|
58
|
+
children: `${textContent?.subtitle} ${user?.firstName}!`
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
61
|
+
style: styles.animationContainer,
|
|
62
|
+
children: [/*#__PURE__*/_jsx(AnimatedCard, {
|
|
63
|
+
variant: AnimatedCardVariant.CORRECT_ANSWER,
|
|
64
|
+
textContent: textContent,
|
|
65
|
+
solvedAmount: solvedAmount,
|
|
66
|
+
problemsAmount: problemsAmount,
|
|
67
|
+
shouldTriggerSparkles: cardsAnimationCompleted,
|
|
68
|
+
onAnimationEnd: onCorrectAnswerAnimationEnd
|
|
69
|
+
}), modalVariant === EOAModalVariant.HAS_GOOD_DRAWING && /*#__PURE__*/_jsx(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
|
+
}), /*#__PURE__*/_jsx(PracticeButtonGroup, {
|
|
78
|
+
textContent: textContent,
|
|
79
|
+
isPracticeButtonVisible: isPracticeButtonVisible,
|
|
80
|
+
isExam: isExam,
|
|
81
|
+
onLeftButtonPress: model.hidePopUpAndLeave,
|
|
82
|
+
onRightButtonPress: handlePracticePress
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const styles = StyleSheet.create({
|
|
87
|
+
wrapper: {
|
|
88
|
+
flex: 1,
|
|
89
|
+
gap: SPACING[400]
|
|
90
|
+
},
|
|
91
|
+
header: {
|
|
92
|
+
gap: SPACING[100],
|
|
93
|
+
alignItems: 'center'
|
|
94
|
+
},
|
|
95
|
+
title: {
|
|
96
|
+
fontWeight: '900',
|
|
97
|
+
lineHeight: 54,
|
|
98
|
+
fontSize: 36,
|
|
99
|
+
paddingVertical: SPACING[100],
|
|
100
|
+
color: COLORS.NEUTRAL_9,
|
|
101
|
+
fontFamily: FONT_FAMILY.buenosAires
|
|
102
|
+
},
|
|
103
|
+
subtitle: {
|
|
104
|
+
color: COLORS.NEUTRAL_7,
|
|
105
|
+
paddingVertical: SPACING[100],
|
|
106
|
+
lineHeight: 25
|
|
107
|
+
},
|
|
108
|
+
animationContainer: {
|
|
109
|
+
flex: 1,
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
justifyContent: 'center',
|
|
112
|
+
gap: SPACING[800],
|
|
113
|
+
paddingTop: SPACING[800],
|
|
114
|
+
paddingBottom: SPACING[1600]
|
|
115
|
+
},
|
|
116
|
+
buttonsContainer: {
|
|
117
|
+
height: 62,
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
gap: SPACING[200],
|
|
121
|
+
paddingVertical: SPACING[300]
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=CorrectAnswer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useState","View","StyleSheet","useUnit","SPACING","Typography","COLORS","FONT_FAMILY","AnimatedCard","PracticeButtonGroup","GOOD_DRAWING_CARD_APPEARENCE_DELAY","AnimatedCardVariant","EOAModalVariant","jsx","_jsx","jsxs","_jsxs","CorrectAnswer","textContent","model","onPracticePress","popUpData","$popUpData","modalVariant","$modalVariant","cardsAnimationCompleted","setCardsAnimationCompleted","user","stats","hasRecommendations","isExam","newerAssignmentAvailable","solvedAmount","problemsAmount","goodDrawingAmount","isPracticeButtonVisible","practiceMode","handlePracticePress","hidePopUp","onCorrectAnswerAnimationEnd","onGBDAnimationEnd","style","styles","wrapper","HAS_GOOD_DRAWING","alignItems","children","header","variant","title","subtitle","firstName","animationContainer","CORRECT_ANSWER","shouldTriggerSparkles","onAnimationEnd","GOOD_DRAWING","gbdAmount","delay","onLeftButtonPress","hidePopUpAndLeave","onRightButtonPress","create","flex","gap","fontWeight","lineHeight","fontSize","paddingVertical","color","NEUTRAL_9","fontFamily","buenosAires","NEUTRAL_7","flexDirection","justifyContent","paddingTop","paddingBottom","buttonsContainer","height"],"sourceRoot":"../../../../../../src","sources":["features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC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