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