@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 @@
|
|
|
1
|
+
{"version":3,"names":["StarIcon","HalloweenIcon","PiIcon","WinterIcon","ValentineIcon","COLORS","CelebrationVariant","CELEBRATION_ICON_CONFIG","name","Icon","activePeriod","start","end","CELEBRATION_VARIANTS","FIRST_ATTEMPT","color","PRIMARY_GREEN","elementsCount","star","spark","sparkSize","from","to","mainSize","angle","velocityMultiplier","rotation","friction","angularAcceleration","life","CORRECT","PRIMARY_YELLOW","GBD","PRIMARY_ORANGE","GBD_FINISH_ASSIGNMENT","CORRECT_FINISH_ASSIGNMENT"],"sourceRoot":"../../../../src","sources":["features/celebrations/config.ts"],"mappings":";;AAAA,OAAOA,QAAQ,MAAM,4BAAyB;AAC9C,OAAOC,aAAa,MAAM,iCAA8B;AACxD,OAAOC,MAAM,MAAM,0BAAuB;AAC1C,OAAOC,UAAU,MAAM,8BAA2B;AAClD,OAAOC,aAAa,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AI,EAAE,CAAC,IAAI;MACXC,EAAE,EAAE;IACN,CAAC;IACDO,IAAI,EAAE;EACR;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Spark } from "./components/Spark.js";
|
|
4
|
+
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from "./config.js";
|
|
5
|
+
export const randomRange = (min, max) => Math.random() * (max - min) + min;
|
|
6
|
+
const isDateInRange = (currentDate, startDateStr, endDateStr) => {
|
|
7
|
+
const [startDay, startMonth] = startDateStr.split('-').map(Number);
|
|
8
|
+
const [endDay, endMonth] = endDateStr.split('-').map(Number);
|
|
9
|
+
const currentYear = currentDate.getFullYear();
|
|
10
|
+
const startDate = new Date(currentYear, startMonth - 1, startDay);
|
|
11
|
+
const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
|
|
12
|
+
return currentDate >= startDate && currentDate <= endDate;
|
|
13
|
+
};
|
|
14
|
+
export const getIconForCurrentDate = () => {
|
|
15
|
+
const currentDate = new Date();
|
|
16
|
+
for (const celebration of CELEBRATION_ICON_CONFIG) {
|
|
17
|
+
if (celebration.activePeriod) {
|
|
18
|
+
const {
|
|
19
|
+
start,
|
|
20
|
+
end
|
|
21
|
+
} = celebration.activePeriod;
|
|
22
|
+
if (isDateInRange(currentDate, start, end)) {
|
|
23
|
+
return celebration.Icon;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return CELEBRATION_ICON_CONFIG[0].Icon;
|
|
28
|
+
};
|
|
29
|
+
const MainIcon = getIconForCurrentDate();
|
|
30
|
+
export const generateParticle = variant => {
|
|
31
|
+
const {
|
|
32
|
+
elementsCount,
|
|
33
|
+
angle,
|
|
34
|
+
rotation,
|
|
35
|
+
sparkSize,
|
|
36
|
+
mainSize,
|
|
37
|
+
velocityMultiplier,
|
|
38
|
+
friction,
|
|
39
|
+
life,
|
|
40
|
+
angularAcceleration
|
|
41
|
+
} = CELEBRATION_VARIANTS[variant];
|
|
42
|
+
const particles = [];
|
|
43
|
+
for (let i = 0; i < elementsCount.spark; i++) {
|
|
44
|
+
const randomAngle = randomRange(angle.from * Math.PI / 180, angle.to * Math.PI / 180);
|
|
45
|
+
const randomSpeed = randomRange(4, 18);
|
|
46
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
47
|
+
particles.push({
|
|
48
|
+
id: Math.random(),
|
|
49
|
+
size: randomRange(sparkSize.from, sparkSize.to),
|
|
50
|
+
type: 'spark',
|
|
51
|
+
angle: randomAngle,
|
|
52
|
+
velocity: {
|
|
53
|
+
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
54
|
+
y: Math.sin(randomAngle) * randomSpeed
|
|
55
|
+
},
|
|
56
|
+
rotation: 0,
|
|
57
|
+
rotationSpeed: 0,
|
|
58
|
+
angularAcceleration: randomAngularAcceleration,
|
|
59
|
+
friction,
|
|
60
|
+
Component: Spark,
|
|
61
|
+
life
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
for (let i = 0; i < elementsCount.star; i++) {
|
|
65
|
+
const randomAngle = randomRange(angle.from * Math.PI / 180, angle.to * Math.PI / 180);
|
|
66
|
+
const randomSpeed = randomRange(4, 18);
|
|
67
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
68
|
+
particles.push({
|
|
69
|
+
id: Math.random(),
|
|
70
|
+
size: randomRange(mainSize.from, mainSize.to),
|
|
71
|
+
type: 'main',
|
|
72
|
+
angle: randomAngle,
|
|
73
|
+
velocity: {
|
|
74
|
+
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
75
|
+
y: Math.sin(randomAngle) * randomSpeed
|
|
76
|
+
},
|
|
77
|
+
rotation: randomRange(rotation.from, rotation.to),
|
|
78
|
+
rotationSpeed: randomRange(-2, 2),
|
|
79
|
+
angularAcceleration: randomAngularAcceleration,
|
|
80
|
+
friction,
|
|
81
|
+
Component: MainIcon,
|
|
82
|
+
life
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return particles;
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Spark","CELEBRATION_ICON_CONFIG","CELEBRATION_VARIANTS","randomRange","min","max","Math","random","isDateInRange","currentDate","startDateStr","endDateStr","startDay","startMonth","split","map","Number","endDay","endMonth","currentYear","getFullYear","startDate","Date","endDate","getIconForCurrentDate","celebration","activePeriod","start","end","Icon","MainIcon","generateParticle","variant","elementsCount","angle","rotation","sparkSize","mainSize","velocityMultiplier","friction","life","angularAcceleration","particles","i","spark","randomAngle","from","PI","to","randomSpeed","randomAngularAcceleration","push","id","size","type","velocity","x","cos","y","sin","rotationSpeed","Component","star"],"sourceRoot":"../../../../src","sources":["features/celebrations/helpers.ts"],"mappings":";;AACA,SAASA,KAAK,QAAQ,uBAAoB;AAC1C,SAASC,uBAAuB,EAAEC,oBAAoB,QAAQ,aAAU;AAGxE,OAAO,MAAMC,WAAW,GAAGA,CAACC,GAAW,EAAEC,GAAW,KAAKC,IAAI,CAACC,MAAM,CAAC,CAAC,IAAIF,GAAG,GAAGD,GAAG,CAAC,GAAGA,GAAG;AAE1F,MAAMI,aAAa,GAAGA,CAACC,WAAiB,EAAEC,YAAoB,EAAEC,UAAkB,KAAK;EACrF,MAAM,CAACC,QAAQ,EAAEC,UAAU,CAAC,GAAGH,YAAY,CAACI,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC;EAClE,MAAM,CAACC,MAAM,EAAEC,QAAQ,CAAC,GAAGP,UAAU,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC;EAE5D,MAAMG,WAAW,GAAGV,WAAW,CAACW,WAAW,CAAC,CAAC;EAC7C,MAAMC,SAAS,GAAG,IAAIC,IAAI,CAACH,WAAW,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C,MAAM,CAAC,CAAC;MACjB8C,IAAI,EAAElD,WAAW,CAACkC,QAAQ,CAACS,IAAI,EAAET,QAAQ,CAACW,EAAE,CAAC;MAC7CM,IAAI,EAAE,MAAM;MACZpB,KAAK,EAAEW,WAAW;MAClBU,QAAQ,EAAE;QACRC,CAAC,EAAElD,IAAI,CAACmD,GAAG,CAACZ,WAAW,CAAC,GAAGI,WAAW,GAAGX,kBAAkB;QAC3DoB,CAAC,EAAEpD,IAAI,CAACqD,GAAG,CAACd,WAAW,CAAC,GAAGI;MAC7B,CAAC;MACDd,QAAQ,EAAEhC,WAAW,CAACgC,QAAQ,CAACW,IAAI,EAAEX,QAAQ,CAACa,EAAE,CAAC;MACjDY,aAAa,EAAEzD,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;MACjCsC,mBAAmB,EAAES,yBAAyB;MAC9CX,QAAQ;MACRsB,SAAS,EAAE/B,QAAQ;MACnBU;IACF,CAAC,CAAC;EACJ;EAEA,OAAOE,SAAS;AAClB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Celebrations"],"sourceRoot":"../../../../src","sources":["features/celebrations/index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,8BAA2B;AACxD,cAAc,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export let CelebrationVariant = /*#__PURE__*/function (CelebrationVariant) {
|
|
4
|
+
CelebrationVariant["FIRST_ATTEMPT"] = "firstAttempt";
|
|
5
|
+
CelebrationVariant["CORRECT"] = "correct";
|
|
6
|
+
CelebrationVariant["GBD"] = "gbd";
|
|
7
|
+
CelebrationVariant["CORRECT_FINISH_ASSIGNMENT"] = "correctFinishAssignment";
|
|
8
|
+
CelebrationVariant["GBD_FINISH_ASSIGNMENT"] = "gbdFinishAssignment";
|
|
9
|
+
return CelebrationVariant;
|
|
10
|
+
}({});
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CelebrationVariant"],"sourceRoot":"../../../../src","sources":["features/celebrations/types.ts"],"mappings":";;AAAA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAoC,OAAO;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,cAAc,QAAyB,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAoC,OAAO;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,cAAc,QAAyB,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAezE,MAAMC,WAAgE,GAAG;EACvE,CAACH,cAAc,CAACI,IAAI,GAAGL,WAAW;EAClC,CAACC,cAAc,CAACK,QAAQ,GAAGP;AAC7B,CAAC;AAED,OAAO,MAAMQ,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGN,WAAW,CAACI,OAAO,CAAC;EACtC,oBAAOL,IAAA,CAACO,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,6 @@ import { StyleSheet, Text, View } from 'react-native';
|
|
|
5
5
|
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
6
|
import { MessageTextToSpeech } from "./MessageTextToSpeech.js";
|
|
7
7
|
import { MessageVariant } from "../../types/model.types.js";
|
|
8
|
-
import { ErrorSpottingButton } from "../../errorSpotting/ErrorSpottingButton.js";
|
|
9
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
export const ReceivedMessage = ({
|
|
11
10
|
message,
|
|
@@ -14,8 +13,7 @@ export const ReceivedMessage = ({
|
|
|
14
13
|
isActive,
|
|
15
14
|
audioStatus,
|
|
16
15
|
renderer,
|
|
17
|
-
withTextToSpeech = true
|
|
18
|
-
withErrorSpotting
|
|
16
|
+
withTextToSpeech = true
|
|
19
17
|
}) => /*#__PURE__*/_jsxs(View, {
|
|
20
18
|
style: styles.container,
|
|
21
19
|
children: [/*#__PURE__*/_jsx(View, {
|
|
@@ -26,15 +24,15 @@ export const ReceivedMessage = ({
|
|
|
26
24
|
})
|
|
27
25
|
}), /*#__PURE__*/_jsxs(View, {
|
|
28
26
|
style: styles.message,
|
|
29
|
-
children: [/*#__PURE__*/
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
30
28
|
style: [styles.messageText, {
|
|
31
29
|
width: withTextToSpeech ? 240 : 305
|
|
32
30
|
}],
|
|
33
|
-
children:
|
|
31
|
+
children: renderer ? renderer({
|
|
34
32
|
message,
|
|
35
33
|
variant: MessageVariant.RECEIVED,
|
|
36
34
|
withTextToSpeech
|
|
37
|
-
}) : message
|
|
35
|
+
}) : message
|
|
38
36
|
}), withTextToSpeech && /*#__PURE__*/_jsx(MessageTextToSpeech, {
|
|
39
37
|
isActive: isActive,
|
|
40
38
|
isLoading: isTextToSpeechPending,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","ChatbotIcon","MessageTextToSpeech","MessageVariant","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","ChatbotIcon","MessageTextToSpeech","MessageVariant","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","onPressTextToSpeech","isTextToSpeechPending","isActive","audioStatus","renderer","withTextToSpeech","style","styles","container","children","icon","width","height","messageText","variant","RECEIVED","isLoading","onPress","disabled","status","create","flex","flexDirection","maxWidth","alignItems","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,mBAAmB;EACnBC,qBAAqB;EACrBC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,gBAAgB,GAAG;AACP,CAAC,kBACbR,KAAA,CAACP,IAAI;EAACgB,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5Bd,IAAA,CAACL,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACG,IAAK;IAAAD,QAAA,eACvBd,IAAA,CAACJ,WAAW;MAACoB,KAAK,EAAE,EAAG;MAACC,MAAM,EAAE;IAAG,CAAE;EAAC,CAClC,CAAC,eAEPf,KAAA,CAACP,IAA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AAC;EACDtB,WAAW,EAAE;IACXQ,IAAI,EAAE,CAAC;IACPe,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -14,15 +14,6 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
14
14
|
web: 265,
|
|
15
15
|
default: 294
|
|
16
16
|
});
|
|
17
|
-
function findListReceivedMessage(messages) {
|
|
18
|
-
let i = messages.length - 1;
|
|
19
|
-
while (i >= 2) {
|
|
20
|
-
const message = messages[i];
|
|
21
|
-
if (!message.isOwnMessage && !message.endMessage) return messages[i];
|
|
22
|
-
i--;
|
|
23
|
-
}
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
17
|
export const ChatbotMessages = ({
|
|
27
18
|
model,
|
|
28
19
|
isHintFeedback,
|
|
@@ -58,7 +49,6 @@ export const ChatbotMessages = ({
|
|
|
58
49
|
translatedMessage
|
|
59
50
|
});
|
|
60
51
|
};
|
|
61
|
-
const lastReceivedMessage = findListReceivedMessage(messages);
|
|
62
52
|
return /*#__PURE__*/_jsx(View, {
|
|
63
53
|
style: [styles.container, {
|
|
64
54
|
maxHeight: MAX_HEIGHT
|
|
@@ -87,8 +77,7 @@ export const ChatbotMessages = ({
|
|
|
87
77
|
isActive: id === currentPlayingId,
|
|
88
78
|
isTextToSpeechPending: isTextToSpeechPending,
|
|
89
79
|
variant: isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
90
|
-
withTextToSpeech: isTextToSpeechEnabled && !isOwnMessage
|
|
91
|
-
withErrorSpotting: !isHelpRequestPending && lastReceivedMessage?.id === id
|
|
80
|
+
withTextToSpeech: isTextToSpeechEnabled && !isOwnMessage
|
|
92
81
|
}, id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {})]
|
|
93
82
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/_jsx(Alternatives, {
|
|
94
83
|
model: model,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","TEXT_TO_SPEECH_CONFIG","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","
|
|
1
|
+
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","TEXT_TO_SPEECH_CONFIG","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","sanitizeSpeechInput","isTextToSpeechEnabled","textToSpeechConfig","renderer","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","$currentChatData","playTextToSpeech","id","message","translatedMessage","text","play","messageId","config","askChatForHelp","style","styles","container","maxHeight","children","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","isOwnMessage","onPressTextToSpeech","isActive","variant","SENT","RECEIVED","withTextToSpeech","onPressAlternative","hasMessages","length","create","flex","alignItems","width","paddingVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAeC,MAAM,QAAQ,OAAO;AAChD,SAASC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAC1F,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,aAAa,QAAQ,iCAA8B;AAC5D,SAASC,YAAY,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AEA,QAAS;UACnBiB,WAAW,EAAEA,WAAY;UACzB8B,mBAAmB,EAAEA,CAAA,KAAMxB,gBAAgB,CAACC,EAAE,EAAEC,OAAO,EAAEC,iBAAiB,CAAE;UAC5EsB,QAAQ,EAAExB,EAAE,KAAKb,gBAAiB;UAClCH,qBAAqB,EAAEA,qBAAsB;UAC7CyC,OAAO,EAAEH,YAAY,GAAG9D,cAAc,CAACkE,IAAI,GAAGlE,cAAc,CAACmE,QAAS;UACtEC,gBAAgB,EAAEtD,qBAAqB,IAAI,CAACgD;QAAa,GARpDtB,EASN,CACF,CAAC,EAEDnB,oBAAoB,iBAAInB,IAAA,CAACL,aAAa,IAAE,CAAC;MAAA,CACtC,CACP,EAEA,CAACwB,oBAAoB,IAAIF,MAAM,iBAC9BjB,IAAA,CAACJ,YAAY;QACXa,KAAK,EAAEA,KAAM;QACb0D,kBAAkB,EAAEtB,cAAe;QACnCuB,WAAW,EAAEjC,QAAQ,CAACkC,MAAM,GAAG,CAAE;QACjC3D,cAAc,EAAEA;MAAe,CAChC,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAED,MAAMqC,MAAM,GAAG1D,UAAU,CAACiF,MAAM,CAAC;EAC/BtB,SAAS,EAAE;IACTuB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACVvC,MAAM,EAAE;EACV,CAAC;EACDkB,IAAI,EAAE;IACJoB,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE;EACnB,CAAC;EACDhB,GAAG,EAAE;IACHa,IAAI,EAAE,CAAC;IACPb,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,8 +4,7 @@ import { useStoreMap, useUnit } from 'effector-react';
|
|
|
4
4
|
import { ChatbotMessages } from "./ChatMessages/ChatbotMessages.js";
|
|
5
5
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
export const Chatbot = ({
|
|
10
9
|
model,
|
|
11
10
|
isHintFeedback,
|
|
@@ -29,10 +28,7 @@ export const Chatbot = ({
|
|
|
29
28
|
if (!isAvailable || alternatives?.chatAccess === false) {
|
|
30
29
|
return null;
|
|
31
30
|
}
|
|
32
|
-
return /*#__PURE__*/_jsxs(
|
|
33
|
-
value: {
|
|
34
|
-
model
|
|
35
|
-
},
|
|
31
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
36
32
|
children: [/*#__PURE__*/_jsx(ChatbotMessages, {
|
|
37
33
|
model: model,
|
|
38
34
|
renderer: renderer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","
|
|
1
|
+
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Chatbot","model","isHintFeedback","sanitizeSpeechInput","isTextToSpeechEnabled","textToSpeechConfig","isTranslationEnabled","renderer","ButtonWrapper","iconSize","alternatives","$alternatives","isAvailable","$currentChatData","translateMessages","translation","translateAllMessagesFx","openChat","setIsOpen","closeChat","chatAccess","children","onPressTranslate","onPressChatIcon","onPressClose"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,YAAY,QAAQ,gCAA6B;AAG1D,OAAOC,KAAK,MAAM,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAiBzB,OAAO,MAAMC,OAAO,GAAGA,CAAC;EACtBC,KAAK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export { Chatbot } from "./components/Chatbot.js";
|
|
|
4
4
|
export { ChatbotModel } from "./model/ChatBotModel.js";
|
|
5
5
|
export { AudioStatus } from "./types/t2s.types.js";
|
|
6
6
|
export { MessageVariant } from "./types/model.types.js";
|
|
7
|
+
export { ChatMessageHandler } from "./model/ChatBotMessageHandler.js";
|
|
7
8
|
export { DefaultMessagesCreator } from "./model/DefaultMessageCreator.js";
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,WAAW,QAA4B,sBAAmB;AACnE,SACEC,cAAc,
|
|
1
|
+
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","ChatMessageHandler","DefaultMessagesCreator"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,WAAW,QAA4B,sBAAmB;AACnE,SACEC,cAAc,QAKT,wBAAqB;AAE5B,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,sBAAsB,QAAQ,kCAA+B","ignoreList":[]}
|
package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js}
RENAMED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { ThreadItem } from "./ThreadItem.js";
|
|
4
|
-
import {
|
|
4
|
+
import { createEffect } from 'effector/effector.umd';
|
|
5
5
|
import { CHAT_BOT_MODEL_DEFAULTS } from "./constants.js";
|
|
6
|
-
export class
|
|
7
|
-
drawBoardAdapter = null;
|
|
6
|
+
export class ChatMessageHandler {
|
|
8
7
|
threads = new Map();
|
|
9
|
-
$threads = createStore(new Map());
|
|
10
8
|
currentKey = '';
|
|
11
9
|
currentBinding = null;
|
|
12
10
|
constructor({
|
|
@@ -16,7 +14,7 @@ export class ChatBotThreadManager {
|
|
|
16
14
|
messages
|
|
17
15
|
}) {
|
|
18
16
|
this.api = api;
|
|
19
|
-
this.drawBoardAdapter = drawBoardAdapter
|
|
17
|
+
this.drawBoardAdapter = drawBoardAdapter;
|
|
20
18
|
this.messagesLimit = messagesLimit;
|
|
21
19
|
this.defaultMessages = messages;
|
|
22
20
|
}
|
|
@@ -31,27 +29,18 @@ export class ChatBotThreadManager {
|
|
|
31
29
|
const key = this.currentKey;
|
|
32
30
|
let threadItem = this.threads.get(key);
|
|
33
31
|
if (threadItem) return threadItem;
|
|
34
|
-
if (!this.drawBoardAdapter) {
|
|
35
|
-
threadItem = new ThreadItem();
|
|
36
|
-
this.threads.set(key, threadItem);
|
|
37
|
-
return threadItem;
|
|
38
|
-
}
|
|
39
32
|
try {
|
|
40
|
-
const
|
|
41
|
-
threadItem = new ThreadItem(
|
|
42
|
-
strokes
|
|
43
|
-
|
|
44
|
-
} : null);
|
|
33
|
+
const strokes = await this.drawBoardAdapter.getVisibleStrokes();
|
|
34
|
+
threadItem = new ThreadItem({
|
|
35
|
+
strokes
|
|
36
|
+
});
|
|
45
37
|
} catch {
|
|
46
38
|
threadItem = new ThreadItem();
|
|
47
39
|
}
|
|
48
40
|
this.threads.set(key, threadItem);
|
|
49
41
|
return threadItem;
|
|
50
42
|
}
|
|
51
|
-
|
|
52
|
-
this.drawBoardAdapter = adapter;
|
|
53
|
-
}
|
|
54
|
-
postMessage = async ({
|
|
43
|
+
postMessageFx = async ({
|
|
55
44
|
problemAnswer,
|
|
56
45
|
problem,
|
|
57
46
|
answer,
|
|
@@ -67,22 +56,22 @@ export class ChatBotThreadManager {
|
|
|
67
56
|
language,
|
|
68
57
|
imageAltText
|
|
69
58
|
});
|
|
70
|
-
threadItem.
|
|
71
|
-
const nextOptions = threadItem.
|
|
59
|
+
threadItem.hints.push(result.message);
|
|
60
|
+
const nextOptions = threadItem.hints.length < this.messagesLimit ? [this.defaultMessages.anotherHintOption] : [];
|
|
72
61
|
return {
|
|
73
62
|
message: result.message,
|
|
74
63
|
options: nextOptions,
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
threadId: '',
|
|
65
|
+
endMessage: !nextOptions.length
|
|
77
66
|
};
|
|
78
67
|
};
|
|
79
|
-
resetThread = ({
|
|
68
|
+
resetThread = createEffect(({
|
|
80
69
|
key
|
|
81
70
|
}) => {
|
|
82
71
|
this.threads.delete(key);
|
|
83
|
-
};
|
|
72
|
+
});
|
|
84
73
|
resetAll() {
|
|
85
74
|
this.threads.clear();
|
|
86
75
|
}
|
|
87
76
|
}
|
|
88
|
-
//# sourceMappingURL=
|
|
77
|
+
//# sourceMappingURL=ChatBotMessageHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ThreadItem","createEffect","CHAT_BOT_MODEL_DEFAULTS","ChatMessageHandler","threads","Map","currentKey","currentBinding","constructor","drawBoardAdapter","api","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","bindKeyStore","$store","watch","value","getThreadItem","key","threadItem","get","strokes","getVisibleStrokes","set","postMessageFx","problemAnswer","problem","answer","language","imageAltText","result","getHint","getNextHintProps","correctAnswer","problemDescription","userAnswer","hints","push","message","nextOptions","length","anotherHintOption","options","threadId","endMessage","resetThread","delete","resetAll","clear"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotMessageHandler.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AAEzC,SAASC,YAAY,QAAQ,uBAAuB;AAQpD,SAASC,uBAAuB,QAAQ,gBAAa;AAerD,OAAO,MAAMC,kBAAkB,CAAC;EAGbC,OAAO,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGhDC,UAAU,GAAG,EAAE;EACfC,cAAc,GAAwB,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