@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,57 @@
|
|
|
1
|
+
import { createStore, createEvent, sample } from 'effector'
|
|
2
|
+
import { EOAModalVariant, EOAModalData, EOAEventType } from '../types'
|
|
3
|
+
|
|
4
|
+
export class EOAModel {
|
|
5
|
+
public readonly showPopUp = createEvent<EOAModalData>()
|
|
6
|
+
public readonly hidePopUp = createEvent()
|
|
7
|
+
|
|
8
|
+
public readonly practicePressed = createEvent()
|
|
9
|
+
public readonly leavePressed = createEvent()
|
|
10
|
+
public readonly goToFirstProblemPressed = createEvent()
|
|
11
|
+
public readonly updateRecommendations = createEvent<boolean>()
|
|
12
|
+
public readonly popUpTriggered = createEvent<EOAEventType>()
|
|
13
|
+
|
|
14
|
+
public readonly $popUpData = createStore<EOAModalData | null>(null)
|
|
15
|
+
.on(this.showPopUp, (_, payload) => payload)
|
|
16
|
+
.on(this.updateRecommendations, (state, hasRecommendations) => (state ? { ...state, hasRecommendations } : state))
|
|
17
|
+
.reset(this.hidePopUp)
|
|
18
|
+
|
|
19
|
+
public readonly $modalVariant = createStore<EOAModalVariant | null>(null)
|
|
20
|
+
.on(this.showPopUp, (_, popUpData) => {
|
|
21
|
+
if (!popUpData) return null;
|
|
22
|
+
|
|
23
|
+
const { isExam, stats, examFinished, eventType, cheatDetection } = popUpData;
|
|
24
|
+
const solvedAmount = stats?.solvedAmount ?? 0;
|
|
25
|
+
const goodDrawingAmount = stats?.goodDrawingAmount ?? 0;
|
|
26
|
+
|
|
27
|
+
if (!isExam) {
|
|
28
|
+
if (solvedAmount === 0) return EOAModalVariant.NO_CORRECT_ANSWERS;
|
|
29
|
+
if (solvedAmount > 0 && goodDrawingAmount > 0) return EOAModalVariant.HAS_GOOD_DRAWING;
|
|
30
|
+
return EOAModalVariant.HAS_CORRECT_ANSWERS;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (eventType === EOAEventType.EXAM_PAUSED) return EOAModalVariant.EXAM_PAUSED;
|
|
34
|
+
if (eventType === EOAEventType.CHEAT_DETECTED) return EOAModalVariant.EXAM_SAFE_MODE_CHEAT_DETECTED;
|
|
35
|
+
if (eventType === EOAEventType.SUBMIT && !examFinished) {
|
|
36
|
+
return cheatDetection
|
|
37
|
+
? EOAModalVariant.EXAM_SAFE_MODE_SUBMIT
|
|
38
|
+
: EOAModalVariant.EXAM_SUBMIT;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (examFinished || eventType === EOAEventType.EXAM_FINISHED) {
|
|
42
|
+
return solvedAmount > 0
|
|
43
|
+
? EOAModalVariant.EXAM_FINISHED_HAS_CORRECT_ANSWERS
|
|
44
|
+
: EOAModalVariant.EXAM_FINISHED_NO_CORRECT_ANSWERS;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return EOAModalVariant.EXAM_SAFE_MODE_LEAVE;
|
|
48
|
+
})
|
|
49
|
+
.reset(this.hidePopUp);
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
public readonly hidePopUpAndLeave = () => {
|
|
53
|
+
this.leavePressed()
|
|
54
|
+
this.hidePopUp()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EOAModel } from "./model/model"
|
|
2
|
+
|
|
3
|
+
export enum EOAEventType {
|
|
4
|
+
SUBMIT = 'SUBMIT',
|
|
5
|
+
EXAM_LEAVE = 'EXAM_LEAVE',
|
|
6
|
+
EXAM_PAUSED = 'EXAM_PAUSED',
|
|
7
|
+
EXAM_FINISHED = 'EXAM_FINISHED',
|
|
8
|
+
CHEAT_DETECTED = 'CHEAT_DETECTED',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum EOAModalVariant {
|
|
12
|
+
NO_CORRECT_ANSWERS = 'NO_CORRECT_ANSWERS',
|
|
13
|
+
HAS_CORRECT_ANSWERS = 'HAS_CORRECT_ANSWERS',
|
|
14
|
+
HAS_GOOD_DRAWING = 'HAS_GOOD_DRAWING',
|
|
15
|
+
|
|
16
|
+
EXAM_PAUSED = 'EXAM_PAUSED',
|
|
17
|
+
EXAM_SUBMIT = 'EXAM_SUBMIT',
|
|
18
|
+
|
|
19
|
+
EXAM_SAFE_MODE_SUBMIT = 'EXAM_SAFE_MODE_SUBMIT',
|
|
20
|
+
EXAM_SAFE_MODE_LEAVE = 'EXAM_SAFE_MODE_LEAVE',
|
|
21
|
+
EXAM_SAFE_MODE_CHEAT_DETECTED = 'EXAM_SAFE_MODE_CHEAT_DETECTED',
|
|
22
|
+
|
|
23
|
+
EXAM_FINISHED_HAS_CORRECT_ANSWERS = 'EXAM_FINISHED_HAS_CORRECT_ANSWERS',
|
|
24
|
+
EXAM_FINISHED_NO_CORRECT_ANSWERS = 'EXAM_FINISHED_NO_CORRECT_ANSWERS',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum AnimatedCardVariant {
|
|
28
|
+
GOOD_DRAWING = 'goodDrawing',
|
|
29
|
+
CORRECT_ANSWER = 'correctAnswers',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type EOAModalContentProps = {
|
|
33
|
+
textContent: EOAModalText
|
|
34
|
+
model: EOAModel
|
|
35
|
+
onPracticePress?: () => void
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type EOAModalData = {
|
|
39
|
+
isExam: boolean
|
|
40
|
+
newerAssignmentAvailable?: boolean
|
|
41
|
+
examFinished?: boolean
|
|
42
|
+
cheatDetection?: boolean
|
|
43
|
+
eventType?: EOAEventType
|
|
44
|
+
stats: {
|
|
45
|
+
solvedAmount: number
|
|
46
|
+
goodDrawingAmount: number
|
|
47
|
+
problemsAmount: number
|
|
48
|
+
}
|
|
49
|
+
hasRecommendations?: boolean
|
|
50
|
+
user: { firstName: string; practiceMode: boolean }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type EOAModalText = {
|
|
54
|
+
title?: string
|
|
55
|
+
subtitle?: string
|
|
56
|
+
description?: string
|
|
57
|
+
leftButtonText?: string
|
|
58
|
+
rightButtonText?: string
|
|
59
|
+
stats?: {
|
|
60
|
+
correctAnswers?: string
|
|
61
|
+
correctAnswersPlural?: string
|
|
62
|
+
goodCalculations?: string
|
|
63
|
+
goodCalculationsPlural?: string
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import { CorrectIcon, COLORS } from '@magmamath/react-native-ui'
|
|
5
|
+
import { ThumbUpIcon } from './ThumbUpIcon'
|
|
6
|
+
import { AnimatedCardVariant } from '../types'
|
|
7
|
+
|
|
8
|
+
type EOABadgeProps = {
|
|
9
|
+
variant: AnimatedCardVariant
|
|
10
|
+
size?: number
|
|
11
|
+
iconSize?: number
|
|
12
|
+
color?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const EOABadge = ({
|
|
16
|
+
variant,
|
|
17
|
+
size = 70,
|
|
18
|
+
iconSize = 45,
|
|
19
|
+
color = COLORS.PRIMARY_GREEN,
|
|
20
|
+
}: EOABadgeProps) => {
|
|
21
|
+
return (
|
|
22
|
+
<View
|
|
23
|
+
style={[
|
|
24
|
+
styles.container,
|
|
25
|
+
{
|
|
26
|
+
width: size,
|
|
27
|
+
height: size,
|
|
28
|
+
backgroundColor: color,
|
|
29
|
+
},
|
|
30
|
+
]}
|
|
31
|
+
>
|
|
32
|
+
{variant === AnimatedCardVariant.CORRECT_ANSWER ? (
|
|
33
|
+
<CorrectIcon size={iconSize} color={COLORS.NEUTRAL_1} />
|
|
34
|
+
) : (
|
|
35
|
+
<ThumbUpIcon size={iconSize} color={COLORS.NEUTRAL_1} />
|
|
36
|
+
)}
|
|
37
|
+
</View>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
container: {
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
borderRadius: 50,
|
|
46
|
+
},
|
|
47
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { Button, ButtonColor } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type PracticeButtonProps = {
|
|
6
|
+
onPress: () => void
|
|
7
|
+
text?: string
|
|
8
|
+
colorScheme?: ButtonColor
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const PracticeButton = ({
|
|
12
|
+
onPress,
|
|
13
|
+
text = '',
|
|
14
|
+
colorScheme = ButtonColor.YELLOW,
|
|
15
|
+
}: PracticeButtonProps) => {
|
|
16
|
+
return (
|
|
17
|
+
<Button
|
|
18
|
+
variant="primary"
|
|
19
|
+
colorScheme={colorScheme}
|
|
20
|
+
size="large"
|
|
21
|
+
style={{ text: { textTransform: 'uppercase' } }}
|
|
22
|
+
onPress={onPress}
|
|
23
|
+
>
|
|
24
|
+
{text}
|
|
25
|
+
</Button>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
|
+
import { StyleSheet } from 'react-native'
|
|
3
|
+
|
|
4
|
+
import Animated, {
|
|
5
|
+
useSharedValue,
|
|
6
|
+
withDelay,
|
|
7
|
+
FadeInRight,
|
|
8
|
+
Easing,
|
|
9
|
+
FadeInUp,
|
|
10
|
+
withTiming,
|
|
11
|
+
} from 'react-native-reanimated'
|
|
12
|
+
import { ButtonVariant, SPACING, Button } from '@magmamath/react-native-ui'
|
|
13
|
+
|
|
14
|
+
import { PracticeButton } from './PracticeButton'
|
|
15
|
+
|
|
16
|
+
type PracticeButtonGroupProps = {
|
|
17
|
+
textContent: { leftButtonText?: string; rightButtonText?: string }
|
|
18
|
+
isPracticeButtonVisible: boolean
|
|
19
|
+
onLeftButtonPress: () => void
|
|
20
|
+
onRightButtonPress: () => void
|
|
21
|
+
isExam?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const PracticeButtonGroup = ({
|
|
25
|
+
textContent,
|
|
26
|
+
isPracticeButtonVisible,
|
|
27
|
+
onLeftButtonPress,
|
|
28
|
+
onRightButtonPress,
|
|
29
|
+
isExam,
|
|
30
|
+
}: PracticeButtonGroupProps) => {
|
|
31
|
+
const buttonsContainerOpacity = useSharedValue(0)
|
|
32
|
+
|
|
33
|
+
console.log('rerender')
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
buttonsContainerOpacity.value = withDelay(1000, withTiming(1, { duration: 500 }))
|
|
37
|
+
}, [])
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Animated.View style={[styles.buttonsContainer, { opacity: buttonsContainerOpacity }]}>
|
|
41
|
+
<Animated.View
|
|
42
|
+
entering={
|
|
43
|
+
isPracticeButtonVisible
|
|
44
|
+
? FadeInRight.delay(1000).duration(500).easing(Easing.ease)
|
|
45
|
+
: FadeInUp.duration(500)
|
|
46
|
+
}
|
|
47
|
+
>
|
|
48
|
+
<Button
|
|
49
|
+
variant={isPracticeButtonVisible ? ButtonVariant.TERTIARY : ButtonVariant.PRIMARY}
|
|
50
|
+
size="large"
|
|
51
|
+
colorScheme={isExam ? 'purple' : 'blue'}
|
|
52
|
+
style={{ text: { textTransform: 'uppercase' } }}
|
|
53
|
+
onPress={onLeftButtonPress}
|
|
54
|
+
>
|
|
55
|
+
{textContent.leftButtonText ?? ''}
|
|
56
|
+
</Button>
|
|
57
|
+
</Animated.View>
|
|
58
|
+
<Animated.View>
|
|
59
|
+
{isPracticeButtonVisible && (
|
|
60
|
+
<PracticeButton onPress={onRightButtonPress} text={textContent.rightButtonText ?? ''} />
|
|
61
|
+
)}
|
|
62
|
+
</Animated.View>
|
|
63
|
+
</Animated.View>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
buttonsContainer: {
|
|
69
|
+
height: 62,
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
paddingHorizontal: SPACING[300],
|
|
74
|
+
},
|
|
75
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
import Svg, { Path } from 'react-native-svg'
|
|
5
|
+
|
|
6
|
+
export const SparkIcon = ({ size = 12, color }: IconProps) => {
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size} viewBox="0 0 22 22" fill="none">
|
|
9
|
+
<Path
|
|
10
|
+
d="M20.563 12.363c-3.688 1.348-6.782 4.42-8.24 8.244-.505 1.19-2.111 1.19-2.587 0-1.517-3.793-4.61-6.864-8.299-8.18-1.25-.502-1.25-2.352 0-2.79 3.688-1.348 6.782-4.42 8.24-8.244.505-1.19 2.111-1.19 2.587 0 1.517 3.793 4.61 6.864 8.299 8.18 1.25.502 1.25 2.352 0 2.79z"
|
|
11
|
+
fill={color}
|
|
12
|
+
/>
|
|
13
|
+
</Svg>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
import Svg, { Path } from 'react-native-svg'
|
|
5
|
+
|
|
6
|
+
export const ThumbUpIcon = ({ size = 57, color = COLORS.NEUTRAL_1 }: IconProps) => {
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size} viewBox="0 0 57 57" fill="none">
|
|
9
|
+
<Path
|
|
10
|
+
fillRule="evenodd"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
d="M23.22 49.594c-2.143 0-4.284-.72-6.027-1.862l-.071-.048-.296-.197-.158.319a4.28 4.28 0 01-3.837 2.382H9.466a4.279 4.279 0 01-4.278-4.28V23.306a4.279 4.279 0 014.278-4.279h3.365c1.479 0 2.782.75 3.551 1.89l.19.282.265-.212c5.975-4.77 8.052-10.642 8.495-13.38.277-1.717 1.289-2.983 2.692-3.609 1.329-.593 2.835-.542 4.145-.08 2.702.951 4.96 3.765 4.472 7.79-.403 3.328-1.348 6.402-2.075 8.692l-.129.407h10.805c3.133 0 5.975 2.24 6.322 5.54.239 2.271.405 5.292.016 7.948-.35 2.397-.956 6.096-2.536 9.219-1.62 3.203-4.436 6.08-9.153 6.08h-16.67zm7.662-42.021c-.566-.2-1.025-.15-1.279-.036a.636.636 0 00-.262.201c-.091.12-.15.279-.184.486-.621 3.847-3.536 11.617-11.909 17.265l-.138.093v16.407l.025.058c.363.867 1.115 1.744 2.184 2.445 1.184.777 2.596 1.227 3.902 1.227h16.67c1.36 0 2.483-.376 3.422-1.07.932-.69 1.665-1.681 2.273-2.884 1.263-2.497 1.807-5.619 2.16-8.031.318-2.173.192-4.812-.035-6.981-.12-1.141-1.125-2.071-2.47-2.071h-11.91c-1.994 0-3.56-1.904-2.936-3.938.123-.4.255-.817.393-1.252l.003-.009c.737-2.327 1.627-5.14 2.003-8.242.13-1.066-.08-1.894-.465-2.506a2.835 2.835 0 00-1.447-1.162zM9.466 22.903a.404.404 0 00-.403.403v22.602c0 .224.18.404.403.404h3.365a.403.403 0 00.404-.403V23.306a.404.404 0 00-.404-.404H9.466z"
|
|
13
|
+
fill={color}
|
|
14
|
+
/>
|
|
15
|
+
</Svg>
|
|
16
|
+
)
|
|
17
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -3,3 +3,5 @@ export type { LocalizationConfig } from './shared/translation'
|
|
|
3
3
|
export { generateRandomId } from './lib/helpers/helpers'
|
|
4
4
|
export * from './features/chatbot'
|
|
5
5
|
export * from './features/feedback'
|
|
6
|
+
export * from './features/celebrations'
|
|
7
|
+
export * from './features/endOfAssignment'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEvent, createStore
|
|
1
|
+
import { createEvent, createStore } from 'effector'
|
|
2
2
|
|
|
3
3
|
type UpdateField<T> = {
|
|
4
4
|
key: string
|
|
@@ -19,14 +19,6 @@ export class EntityFieldStore<T> {
|
|
|
19
19
|
return { ...state, [key]: data }
|
|
20
20
|
})
|
|
21
21
|
.reset(this.reset)
|
|
22
|
-
|
|
23
|
-
public on<EV>(
|
|
24
|
-
event: Event<EV>,
|
|
25
|
-
fn: (state: Record<string, T>, payload: EV) => Record<string, T> | void,
|
|
26
|
-
) {
|
|
27
|
-
this.$state.on(event, fn)
|
|
28
|
-
return this
|
|
29
|
-
}
|
|
30
22
|
}
|
|
31
23
|
|
|
32
24
|
export function createEntityFieldStore<T>() {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { ClipPath, Defs, G, Path } from 'react-native-svg'
|
|
3
|
+
|
|
4
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
5
|
+
|
|
6
|
+
function Halloween({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size} viewBox="0 0 57 57" fill="none">
|
|
9
|
+
<G clipPath="url(#clip0_1279_48)" fill={color}>
|
|
10
|
+
<Path
|
|
11
|
+
fillRule="evenodd"
|
|
12
|
+
clipRule="evenodd"
|
|
13
|
+
d="M48.971 21.733c-1.01-1.794.252-4.058 1.819-2.723 3.607 3.075 5.986 8.345 5.986 14.33 0 9.305-5.75 16.881-12.928 17.167 4.706-2.896 7.993-9.493 7.993-17.167 0-4.384-1.073-8.416-2.87-11.608zM8.58 21.733c1.01-1.794-.25-4.058-1.818-2.723C3.155 22.085.776 27.355.776 33.34c0 9.305 5.75 16.881 12.928 17.167-4.706-2.896-7.993-9.493-7.993-17.167 0-4.384 1.073-8.416 2.87-11.608z"
|
|
14
|
+
/>
|
|
15
|
+
<Path d="M37.368 52.077c7.373 0 13.35-8.389 13.35-18.737 0-10.348-5.977-18.737-13.35-18.737-1.584 0-1.692 2.13-.517 3.191a15.07 15.07 0 012.386 2.786c2.38 3.539 3.717 8.338 3.717 13.343 0 5.005-1.337 9.805-3.717 13.343a15.084 15.084 0 01-2.36 2.763c-.772.7-.55 2.048.491 2.048zM20.184 52.077c-7.373 0-13.35-8.389-13.35-18.737 0-10.348 5.977-18.737 13.35-18.737 1.584 0 1.692 2.13.517 3.191a15.07 15.07 0 00-2.386 2.786c-2.38 3.539-3.717 8.338-3.717 13.343 0 5.005 1.337 9.805 3.717 13.343a15.084 15.084 0 002.36 2.763c.772.7.55 2.048-.491 2.048z" />
|
|
16
|
+
<Path d="M28.776 15.592c0-.298.242-.541.539-.523 3.17.2 6.182 2.161 8.434 5.51 2.38 3.54 3.717 8.34 3.717 13.344 0 5.005-1.337 9.805-3.717 13.343-2.252 3.35-5.264 5.31-8.434 5.51a.514.514 0 01-.539-.522V15.592z" />
|
|
17
|
+
<Path d="M28.776 15.592a.514.514 0 00-.539-.523c-3.17.2-6.182 2.161-8.434 5.51-2.38 3.54-3.717 8.34-3.717 13.344 0 5.005 1.337 9.805 3.717 13.343 2.252 3.35 5.264 5.31 8.434 5.51a.514.514 0 00.539-.522V15.592z" />
|
|
18
|
+
<Path
|
|
19
|
+
fillRule="evenodd"
|
|
20
|
+
clipRule="evenodd"
|
|
21
|
+
d="M30.231 10.322c.091.551.228.912.273.999a1.887 1.887 0 11-3.35 1.737c-.289-.556-.516-1.334-.646-2.12-.134-.808-.193-1.793-.032-2.772.16-.974.566-2.098 1.503-2.955.975-.893 2.277-1.272 3.762-1.187a1.887 1.887 0 01-.215 3.768c-.706-.04-.933.142-.999.202-.104.096-.25.316-.327.784-.076.462-.056 1.014.031 1.544z"
|
|
22
|
+
/>
|
|
23
|
+
</G>
|
|
24
|
+
<Defs>
|
|
25
|
+
<ClipPath id="clip0_1279_48">
|
|
26
|
+
<Path fill="#fff" transform="translate(.776 .26)" d="M0 0H56V56H0z" />
|
|
27
|
+
</ClipPath>
|
|
28
|
+
</Defs>
|
|
29
|
+
</Svg>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default Halloween
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
function Pi({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
|
|
6
|
+
return (
|
|
7
|
+
<Svg width={57} height={size * 0.8421} viewBox="0 0 57 48" fill="none">
|
|
8
|
+
<Path
|
|
9
|
+
d="M2.311 10.528a5.23 5.23 0 00.244 7.63c2.166 1.926 5.52 1.836 7.572-.23l4.685-4.719a5.09 5.09 0 01.04-.04c.557-.55 1.37-.044 1.302.735a96.284 96.284 0 01-.666 5.732c-.546 3.688-1.358 7.523-2.543 10.924-1.209 3.468-2.669 6.084-4.272 7.7a5.23 5.23 0 00.246 7.63c2.167 1.925 5.52 1.835 7.572-.233 3.195-3.219 5.307-7.505 6.759-11.67 1.475-4.232 2.41-8.76 3.012-12.831.483-3.272.763-6.327.926-8.813a1.006 1.006 0 011.002-.942h2.357a1 1 0 011 1v23.505c0 6.436 5.464 11.367 11.84 11.367 7.233 0 13.389-5.587 13.389-12.831v-.872c0-3.093-2.6-5.315-5.443-5.315-2.843 0-5.443 2.222-5.443 5.315v.872c0 1.058-.958 2.202-2.502 2.202-.69 0-.955-.489-.955-.738V12.401a1 1 0 011-1h7.9c2.844 0 5.443-2.221 5.443-5.315 0-3.093-2.6-5.315-5.443-5.315H19.267c-4.614 0-9.059 1.803-12.27 5.038L2.31 10.528z"
|
|
10
|
+
fill={color}
|
|
11
|
+
/>
|
|
12
|
+
</Svg>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default Pi
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
function Star({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
|
|
6
|
+
return (
|
|
7
|
+
<Svg width={size} height={size} viewBox="0 0 57 57" fill="none">
|
|
8
|
+
<Path
|
|
9
|
+
d="M54.277 31.895c-9.835 3.594-18.085 11.785-21.971 21.982-1.349 3.176-5.632 3.176-6.901 0C21.36 43.764 13.11 35.573 3.275 32.062c-3.332-1.337-3.332-6.268 0-7.439C13.11 21.03 21.36 12.838 25.246 2.641c1.349-3.176 5.632-3.176 6.901 0 4.045 10.114 12.295 18.305 22.13 21.815 3.332 1.338 3.332 6.269 0 7.439z"
|
|
10
|
+
fill={color}
|
|
11
|
+
/>
|
|
12
|
+
</Svg>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default Star
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
function Valentine({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
|
|
6
|
+
return (
|
|
7
|
+
<Svg width={size} height={size * 0.8421} viewBox="0 0 57 48" fill="none">
|
|
8
|
+
<Path
|
|
9
|
+
d="M52.473 24.947L29.763 47.5a1.4 1.4 0 01-1.973 0L5.08 24.947A14.57 14.57 0 013.567 6.032C8.604-.884 18.487-1.994 24.931 3.633l2.924 2.554a1.4 1.4 0 001.842 0l2.924-2.554c6.444-5.627 16.327-4.517 21.363 2.399a14.57 14.57 0 01-1.511 18.915z"
|
|
10
|
+
fill={color}
|
|
11
|
+
/>
|
|
12
|
+
</Svg>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default Valentine
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
|
|
4
|
+
import { COLORS, IconProps } from '@magmamath/react-native-ui'
|
|
5
|
+
|
|
6
|
+
function Winter({ size = 50, color = COLORS.NEUTRAL_8 }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size * 1.14} viewBox="0 0 50 57" fill="none">
|
|
9
|
+
<Path
|
|
10
|
+
fillRule="evenodd"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
d="M24.72.26a2.66 2.66 0 012.66 2.66v4.829l1.302-.814a2.66 2.66 0 012.82 4.513l-4.122 2.576v8.154a2.66 2.66 0 01-5.321 0v-8.154l-4.122-2.576a2.66 2.66 0 112.82-4.513l1.302.814v-4.83a2.66 2.66 0 012.66-2.66zM10.8 11.413a2.66 2.66 0 012.752 2.566l.17 4.857 7.061 4.077a2.66 2.66 0 11-2.66 4.609l-7.062-4.078-4.291 2.282A2.66 2.66 0 014.27 21.03l1.356-.72-4.182-2.415a2.66 2.66 0 112.66-4.609L8.287 15.7l-.053-1.534a2.66 2.66 0 012.566-2.752zm27.84 0a2.66 2.66 0 012.565 2.752l-.053 1.534 4.182-2.415a2.66 2.66 0 112.66 4.609l-4.182 2.414 1.355.72a2.66 2.66 0 11-2.498 4.7l-4.29-2.283-7.062 4.078a2.66 2.66 0 11-2.661-4.609l7.062-4.077.17-4.857a2.66 2.66 0 012.751-2.566zM21.756 29.97a2.66 2.66 0 01-.974 3.634l-7.062 4.077-.17 4.857a2.66 2.66 0 01-5.317-.185l.053-1.535-4.182 2.415a2.66 2.66 0 01-2.66-4.608l4.182-2.415-1.356-.72A2.66 2.66 0 116.77 30.79l4.29 2.282 7.062-4.077a2.66 2.66 0 013.635.974zm5.925 0a2.66 2.66 0 013.635-.974l7.061 4.077 4.291-2.282a2.66 2.66 0 012.498 4.698l-1.355.721 4.182 2.415a2.66 2.66 0 11-2.66 4.608l-4.182-2.414.053 1.533a2.66 2.66 0 11-5.318.186l-.17-4.857-7.061-4.077a2.66 2.66 0 01-.974-3.634zm-2.962 1.71a2.66 2.66 0 012.66 2.66v8.155l4.122 2.575a2.66 2.66 0 01-2.82 4.513l-1.302-.813v4.828a2.66 2.66 0 11-5.321 0V48.77l-1.302.813a2.66 2.66 0 01-2.82-4.513l4.122-2.575V34.34a2.66 2.66 0 012.66-2.661z"
|
|
13
|
+
fill={color}
|
|
14
|
+
/>
|
|
15
|
+
</Svg>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default Winter
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native'
|
|
2
|
-
|
|
3
1
|
export type IconProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
style?: StyleProp<ViewStyle>
|
|
2
|
+
color?: string
|
|
3
|
+
className?: string
|
|
4
|
+
size?: number
|
|
5
|
+
strokeWidth?: string
|
|
6
|
+
width?: number
|
|
7
|
+
height?: number
|
|
11
8
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ChatBotContext = void 0;
|
|
7
|
-
exports.useChatModel = useChatModel;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
const ChatBotContext = exports.ChatBotContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
10
|
-
function useChatModel() {
|
|
11
|
-
const context = (0, _react.useContext)(ChatBotContext);
|
|
12
|
-
if (!context) {
|
|
13
|
-
throw new Error('Something went wrong, you are probably trying to use component that is supposed to be inside ChatBotContext.Provider');
|
|
14
|
-
}
|
|
15
|
-
return context.model;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=ChatBotContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","ChatBotContext","exports","createContext","useChatModel","context","useContext","Error","model"],"sourceRoot":"../../../../../src","sources":["features/chatbot/context/ChatBotContext.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,oBAAa,EAA6B,IAAI,CAAC;AAEtE,SAASC,YAAYA,CAAA,EAAG;EAC7B,MAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACL,cAAc,CAAC;EAC1C,IAAI,CAACI,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,sHACF,CAAC;EACH;EACA,OAAOF,OAAO,CAACG,KAAK;AACtB","ignoreList":[]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ErrorSpottingButton = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
9
|
-
var _ChatBotContext = require("../context/ChatBotContext.js");
|
|
10
|
-
var _effectorReact = require("effector-react");
|
|
11
|
-
var _reactNative = require("react-native");
|
|
12
|
-
var _HighlighterIcon = require("../../../shared/icons/HighlighterIcon.js");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const ErrorSpottingButton = () => {
|
|
16
|
-
const model = (0, _ChatBotContext.useChatModel)();
|
|
17
|
-
const activeErrorSpotting = (0, _effectorReact.useUnit)(model.errorSpotting.$activeData);
|
|
18
|
-
const validationKey = (0, _effectorReact.useUnit)(model.errorSpotting.$validationKey);
|
|
19
|
-
const isLoading = (0, _effectorReact.useUnit)(model.errorSpotting.$isLoading);
|
|
20
|
-
const currentThread = (0, _effectorReact.useStoreMap)(model.$currentChatData, chatData => chatData.currentThread);
|
|
21
|
-
if (!currentThread?.strokes) return null;
|
|
22
|
-
const isActive = !!activeErrorSpotting?.isActive;
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
24
|
-
style: styles.container,
|
|
25
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
26
|
-
style: buttonStyles,
|
|
27
|
-
disabled: validationKey !== currentThread.key,
|
|
28
|
-
isActive: isActive,
|
|
29
|
-
isLoading: isLoading,
|
|
30
|
-
variant: 'secondary',
|
|
31
|
-
colorScheme: 'blue',
|
|
32
|
-
size: 'small',
|
|
33
|
-
onPress: () => {
|
|
34
|
-
if (isLoading) return;
|
|
35
|
-
model.errorSpotting.errorSpottingPressed();
|
|
36
|
-
},
|
|
37
|
-
icon: isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.StopIcon, {
|
|
38
|
-
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
39
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_HighlighterIcon.HighlighterIcon, {}),
|
|
40
|
-
children: "show error"
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
exports.ErrorSpottingButton = ErrorSpottingButton;
|
|
45
|
-
const buttonStyles = _reactNative.StyleSheet.create({
|
|
46
|
-
container: {
|
|
47
|
-
marginLeft: 'auto'
|
|
48
|
-
},
|
|
49
|
-
text: {
|
|
50
|
-
textTransform: 'uppercase'
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const styles = _reactNative.StyleSheet.create({
|
|
54
|
-
container: {
|
|
55
|
-
width: '100%'
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=ErrorSpottingButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_ChatBotContext","_effectorReact","_reactNative","_HighlighterIcon","_jsxRuntime","e","__esModule","default","ErrorSpottingButton","model","useChatModel","activeErrorSpotting","useUnit","errorSpotting","$activeData","validationKey","$validationKey","isLoading","$isLoading","currentThread","useStoreMap","$currentChatData","chatData","strokes","isActive","jsx","View","style","styles","container","children","Button","buttonStyles","disabled","key","variant","colorScheme","size","onPress","errorSpottingPressed","icon","StopIcon","color","COLORS","NEUTRAL_1","HighlighterIcon","exports","StyleSheet","create","marginLeft","text","textTransform","width"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAAuE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEhE,MAAMG,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMC,KAAK,GAAG,IAAAC,4BAAY,EAAC,CAAC;EAC5B,MAAMC,mBAAmB,GAAG,IAAAC,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACC,WAAW,CAAC;EACpE,MAAMC,aAAa,GAAG,IAAAH,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACG,cAAc,CAAC;EACjE,MAAMC,SAAS,GAAG,IAAAL,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACK,UAAU,CAAC;EACzD,MAAMC,aAAa,GAAG,IAAAC,0BAAW,EAACX,KAAK,CAACY,gBAAgB,EAAGC,QAAQ,IAAKA,QAAQ,CAACH,aAAa,CAAC;EAE/F,IAAI,CAACA,aAAa,EAAEI,OAAO,EAAE,OAAO,IAAI;EAExC,MAAMC,QAAQ,GAAG,CAAC,CAACb,mBAAmB,EAAEa,QAAQ;EAChD,oBACE,IAAApB,WAAA,CAAAqB,GAAA,EAACvB,YAAA,CAAAwB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAA1B,WAAA,CAAAqB,GAAA,EAAC1B,cAAA,CAAAgC,MAAM;MACLJ,KAAK,EAAEK,YAAa;MACpBC,QAAQ,EAAElB,aAAa,KAAKI,aAAa,CAACe,GAAI;MAC9CV,QAAQ,EAAEA,QAAS;MACnBP,SAAS,EAAEA,SAAU;MACrBkB,OAAO,EAAE,WAAY;MACrBC,WAAW,EAAE,MAAO;MACpBC,IAAI,EAAE,OAAQ;MACdC,OAAO,EAAEA,CAAA,KAAM;QACb,IAAIrB,SAAS,EAAE;QACfR,KAAK,CAACI,aAAa,CAAC0B,oBAAoB,CAAC,CAAC;MAC5C,CAAE;MACFC,IAAI,EAAEhB,QAAQ,gBAAG,IAAApB,WAAA,CAAAqB,GAAA,EAAC1B,cAAA,CAAA0C,QAAQ;QAACC,KAAK,EAAEC,qBAAM,CAACC;MAAU,CAAE,CAAC,gBAAG,IAAAxC,WAAA,CAAAqB,GAAA,EAACtB,gBAAA,CAAA0C,eAAe,IAAE,CAAE;MAAAf,QAAA,EAC9E;IAED,CAAQ;EAAC,CACL,CAAC;AAEX,CAAC;AAAAgB,OAAA,CAAAtC,mBAAA,GAAAA,mBAAA;AAED,MAAMwB,YAAY,GAAGe,uBAAU,CAACC,MAAM,CAAC;EACrCnB,SAAS,EAAE;IACToB,UAAU,EAAE;EACd,CAAC;EACDC,IAAI,EAAE;IACJC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,MAAMvB,MAAM,GAAGmB,uBAAU,CAACC,MAAM,CAAC;EAC/BnB,SAAS,EAAE;IACTuB,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ErrorSpottingModel = void 0;
|
|
7
|
-
var _effector = require("effector");
|
|
8
|
-
class ErrorSpottingModel {
|
|
9
|
-
errorSpottingPressed = (0, _effector.createEvent)();
|
|
10
|
-
activeDataChanged = (0, _effector.createEvent)();
|
|
11
|
-
$validationKey = (0, _effector.createStore)(null);
|
|
12
|
-
$activeData = (0, _effector.createStore)(null).on(this.activeDataChanged, (state, payload) => {
|
|
13
|
-
if (typeof payload === 'function') return payload(state);
|
|
14
|
-
return payload;
|
|
15
|
-
}).on(this.$validationKey, (state, payload) => {
|
|
16
|
-
if (!state || payload === null) return state;
|
|
17
|
-
const isDisabled = payload !== state.validationKey;
|
|
18
|
-
return {
|
|
19
|
-
...state,
|
|
20
|
-
isDisabled,
|
|
21
|
-
isActive: isDisabled ? false : state.isActive
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
constructor({
|
|
25
|
-
api,
|
|
26
|
-
$currentChatData
|
|
27
|
-
}) {
|
|
28
|
-
this.api = api;
|
|
29
|
-
this.$isLoading = api.spotErrorFx.pending;
|
|
30
|
-
this.$activeData.on($currentChatData, (state, payload) => {
|
|
31
|
-
if (!state || state.validationKey !== payload.currentThread?.key) return null;
|
|
32
|
-
});
|
|
33
|
-
(0, _effector.sample)({
|
|
34
|
-
clock: api.spotErrorFx.doneData,
|
|
35
|
-
source: {
|
|
36
|
-
chatData: $currentChatData,
|
|
37
|
-
activeSpotting: this.$activeData,
|
|
38
|
-
validationKey: this.$validationKey
|
|
39
|
-
},
|
|
40
|
-
fn: (source, result) => {
|
|
41
|
-
const key = source.chatData.currentThread?.key || null;
|
|
42
|
-
const currentKey = source.validationKey;
|
|
43
|
-
const isDisabled = !!currentKey && currentKey !== key;
|
|
44
|
-
return {
|
|
45
|
-
validationKey: key,
|
|
46
|
-
strokesIds: result.strokesIds,
|
|
47
|
-
isActive: !isDisabled,
|
|
48
|
-
isDisabled
|
|
49
|
-
};
|
|
50
|
-
},
|
|
51
|
-
target: this.$activeData
|
|
52
|
-
});
|
|
53
|
-
(0, _effector.sample)({
|
|
54
|
-
clock: this.errorSpottingPressed,
|
|
55
|
-
source: {
|
|
56
|
-
chatData: $currentChatData,
|
|
57
|
-
activeSpotting: this.$activeData
|
|
58
|
-
},
|
|
59
|
-
fn: source => source,
|
|
60
|
-
target: (0, _effector.createEffect)(({
|
|
61
|
-
chatData,
|
|
62
|
-
activeSpotting
|
|
63
|
-
}) => {
|
|
64
|
-
if (!chatData.currentThread?.strokes) return;
|
|
65
|
-
if (!activeSpotting) {
|
|
66
|
-
return this.api.spotErrorFx({
|
|
67
|
-
strokes: chatData.currentThread.strokes
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
this.toggleActiveSpotting();
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
toggleActiveSpotting() {
|
|
75
|
-
this.activeDataChanged(state => {
|
|
76
|
-
if (state) return {
|
|
77
|
-
...state,
|
|
78
|
-
isActive: !state.isActive
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
bindStrokesValidation($store) {
|
|
83
|
-
(0, _effector.sample)({
|
|
84
|
-
source: $store,
|
|
85
|
-
target: this.$validationKey
|
|
86
|
-
});
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
abortPendingRequest() {
|
|
90
|
-
const isPending = this.api.spotErrorFx.pending.getState();
|
|
91
|
-
if (isPending) this.api.spotErrorFx.controller.abort();
|
|
92
|
-
}
|
|
93
|
-
reset() {
|
|
94
|
-
this.activeDataChanged(null);
|
|
95
|
-
this.abortPendingRequest();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.ErrorSpottingModel = ErrorSpottingModel;
|
|
99
|
-
//# sourceMappingURL=ErrorSpottingModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","ErrorSpottingModel","errorSpottingPressed","createEvent","activeDataChanged","$validationKey","createStore","$activeData","on","state","payload","isDisabled","validationKey","isActive","constructor","api","$currentChatData","$isLoading","spotErrorFx","pending","currentThread","key","sample","clock","doneData","source","chatData","activeSpotting","fn","result","currentKey","strokesIds","target","createEffect","strokes","toggleActiveSpotting","bindStrokesValidation","$store","abortPendingRequest","isPending","getState","controller","abort","reset","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingModel.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAoBO,MAAMC,kBAAkB,CAAC;EAGdC,oBAAoB,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACnCC,iBAAiB,GAAG,IAAAD,qBAAW,EAI9C,CAAC;EAEaE,cAAc,GAAG,IAAAC,qBAAW,EAAgB,IAAI,CAAC;EACjDC,WAAW,GAAG,IAAAD,qBAAW,EAAiC,IAAI,CAAC,CAC5EE,EAAE,CAAC,IAAI,CAACJ,iBAAiB,EAAE,CAACK,KAAK,EAAEC,OAAO,KAAK;IAC9C,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE,OAAOA,OAAO,CAACD,KAAK,CAAC;IACxD,OAAOC,OAAO;EAChB,CAAC,CAAC,CACDF,EAAE,CAAC,IAAI,CAACH,cAAc,EAAE,CAACI,KAAK,EAAEC,OAAO,KAAK;IAC3C,IAAI,CAACD,KAAK,IAAIC,OAAO,KAAK,IAAI,EAAE,OAAOD,KAAK;IAC5C,MAAME,UAAU,GAAGD,OAAO,KAAKD,KAAK,CAACG,aAAa;IAClD,OAAO;MAAE,GAAGH,KAAK;MAAEE,UAAU;MAAEE,QAAQ,EAAEF,UAAU,GAAG,KAAK,GAAGF,KAAK,CAACI;IAAS,CAAC;EAChF,CAAC,CAAC;EAIGC,WAAWA,CAAC;IAAEC,GAAG;IAAEC;EAAqC,CAAC,EAAE;IAChE,IAAI,CAACD,GAAG,GAAGA,GAAG;IAEd,IAAI,CAACE,UAAU,GAAGF,GAAG,CAACG,WAAW,CAACC,OAAO;IAEzC,IAAI,CAACZ,WAAW,CAACC,EAAE,CAACQ,gBAAgB,EAAE,CAACP,KAAK,EAAEC,OAAO,KAAK;MACxD,IAAI,CAACD,KAAK,IAAIA,KAAK,CAACG,aAAa,KAAKF,OAAO,CAACU,aAAa,EAAEC,GAAG,EAAE,OAAO,IAAI;IAC/E,CAAC,CAAC;IAEF,IAAAC,gBAAM,EAAC;MACLC,KAAK,EAAER,GAAG,CAACG,WAAW,CAACM,QAAQ;MAC/BC,MAAM,EAAE;QACNC,QAAQ,EAAEV,gBAAgB;QAC1BW,cAAc,EAAE,IAAI,CAACpB,WAAW;QAChCK,aAAa,EAAE,IAAI,CAACP;MACtB,CAAC;MACDuB,EAAE,EAAEA,CAACH,MAAM,EAAEI,MAAM,KAAK;QACtB,MAAMR,GAAG,GAAGI,MAAM,CAACC,QAAQ,CAACN,aAAa,EAAEC,GAAG,IAAI,IAAI;QACtD,MAAMS,UAAU,GAAGL,MAAM,CAACb,aAAa;QACvC,MAAMD,UAAU,GAAG,CAAC,CAACmB,UAAU,IAAIA,UAAU,KAAKT,GAAG;QACrD,OAAO;UACLT,aAAa,EAAES,GAAG;UAClBU,UAAU,EAAEF,MAAM,CAACE,UAAU;UAC7BlB,QAAQ,EAAE,CAACF,UAAU;UACrBA;QACF,CAAC;MACH,CAAC;MACDqB,MAAM,EAAE,IAAI,CAACzB;IACf,CAAC,CAAC;IAEF,IAAAe,gBAAM,EAAC;MACLC,KAAK,EAAE,IAAI,CAACrB,oBAAoB;MAChCuB,MAAM,EAAE;QACNC,QAAQ,EAAEV,gBAAgB;QAC1BW,cAAc,EAAE,IAAI,CAACpB;MACvB,CAAC;MACDqB,EAAE,EAAGH,MAAM,IAAKA,MAAM;MACtBO,MAAM,EAAE,IAAAC,sBAAY,EAAC,CAAC;QAAEP,QAAQ;QAAEC;MAA0C,CAAC,KAAK;QAChF,IAAI,CAACD,QAAQ,CAACN,aAAa,EAAEc,OAAO,EAAE;QACtC,IAAI,CAACP,cAAc,EAAE;UACnB,OAAO,IAAI,CAACZ,GAAG,CAACG,WAAW,CAAC;YAAEgB,OAAO,EAAER,QAAQ,CAACN,aAAa,CAACc;UAAQ,CAAC,CAAC;QAC1E;QACA,IAAI,CAACC,oBAAoB,CAAC,CAAC;MAC7B,CAAC;IACH,CAAC,CAAC;EACJ;EAEQA,oBAAoBA,CAAA,EAAG;IAC7B,IAAI,CAAC/B,iBAAiB,CAAEK,KAAK,IAAK;MAChC,IAAIA,KAAK,EAAE,OAAO;QAAE,GAAGA,KAAK;QAAEI,QAAQ,EAAE,CAACJ,KAAK,CAACI;MAAS,CAAC;IAC3D,CAAC,CAAC;EACJ;EAEOuB,qBAAqBA,CAACC,MAA4B,EAAE;IACzD,IAAAf,gBAAM,EAAC;MACLG,MAAM,EAAEY,MAAM;MACdL,MAAM,EAAE,IAAI,CAAC3B;IACf,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEOiC,mBAAmBA,CAAA,EAAG;IAC3B,MAAMC,SAAS,GAAG,IAAI,CAACxB,GAAG,CAACG,WAAW,CAACC,OAAO,CAACqB,QAAQ,CAAC,CAAC;IACzD,IAAID,SAAS,EAAE,IAAI,CAACxB,GAAG,CAACG,WAAW,CAACuB,UAAU,CAACC,KAAK,CAAC,CAAC;EACxD;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAACvC,iBAAiB,CAAC,IAAI,CAAC;IAC5B,IAAI,CAACkC,mBAAmB,CAAC,CAAC;EAC5B;AACF;AAACM,OAAA,CAAA3C,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|