@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,224 +0,0 @@
|
|
|
1
|
-
import StarIcon from '../../shared/icons/Star'
|
|
2
|
-
import HalloweenIcon from '../../shared/icons/Halloween'
|
|
3
|
-
import PiIcon from '../../shared/icons/Pi'
|
|
4
|
-
import WinterIcon from '../../shared/icons/Winter'
|
|
5
|
-
import ValentineIcon from '../../shared/icons/Valentine'
|
|
6
|
-
import { COLORS } from '@magmamath/react-native-ui'
|
|
7
|
-
import { CelebrationVariant } from './types'
|
|
8
|
-
|
|
9
|
-
export const CELEBRATION_ICON_CONFIG = [
|
|
10
|
-
{
|
|
11
|
-
name: 'default',
|
|
12
|
-
Icon: StarIcon,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'pi-day',
|
|
16
|
-
Icon: PiIcon,
|
|
17
|
-
activePeriod: {
|
|
18
|
-
start: '14-03',
|
|
19
|
-
end: '14-03',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'valentine',
|
|
24
|
-
Icon: ValentineIcon,
|
|
25
|
-
activePeriod: {
|
|
26
|
-
start: '07-02',
|
|
27
|
-
end: '15-02',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'halloween',
|
|
32
|
-
Icon: HalloweenIcon,
|
|
33
|
-
activePeriod: {
|
|
34
|
-
start: '20-10',
|
|
35
|
-
end: '01-11',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'winter',
|
|
40
|
-
Icon: WinterIcon,
|
|
41
|
-
activePeriod: {
|
|
42
|
-
start: '01-12',
|
|
43
|
-
end: '07-01',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
export const CELEBRATION_VARIANTS = {
|
|
49
|
-
[CelebrationVariant.FIRST_ATTEMPT]: {
|
|
50
|
-
color: COLORS.PRIMARY_GREEN,
|
|
51
|
-
elementsCount: {
|
|
52
|
-
star: 5,
|
|
53
|
-
spark: 4,
|
|
54
|
-
},
|
|
55
|
-
sparkSize: {
|
|
56
|
-
from: 4,
|
|
57
|
-
to: 9,
|
|
58
|
-
},
|
|
59
|
-
mainSize: {
|
|
60
|
-
from: 14,
|
|
61
|
-
to: 20,
|
|
62
|
-
},
|
|
63
|
-
angle: {
|
|
64
|
-
from: 230,
|
|
65
|
-
to: 280,
|
|
66
|
-
},
|
|
67
|
-
velocityMultiplier: 1,
|
|
68
|
-
rotation: {
|
|
69
|
-
from: 0,
|
|
70
|
-
to: 10,
|
|
71
|
-
},
|
|
72
|
-
friction: 0.907,
|
|
73
|
-
angularAcceleration: {
|
|
74
|
-
from: -0.05,
|
|
75
|
-
to: 0.05,
|
|
76
|
-
},
|
|
77
|
-
speedRange: {
|
|
78
|
-
spark: [4, 18],
|
|
79
|
-
main: [4, 18],
|
|
80
|
-
},
|
|
81
|
-
life: 65,
|
|
82
|
-
gravity: 0,
|
|
83
|
-
},
|
|
84
|
-
[CelebrationVariant.CORRECT]: {
|
|
85
|
-
color: COLORS.PRIMARY_YELLOW,
|
|
86
|
-
elementsCount: {
|
|
87
|
-
star: 4,
|
|
88
|
-
spark: 3,
|
|
89
|
-
},
|
|
90
|
-
sparkSize: {
|
|
91
|
-
from: 4,
|
|
92
|
-
to: 9,
|
|
93
|
-
},
|
|
94
|
-
mainSize: {
|
|
95
|
-
from: 14,
|
|
96
|
-
to: 20,
|
|
97
|
-
},
|
|
98
|
-
angle: {
|
|
99
|
-
from: 235,
|
|
100
|
-
to: 270,
|
|
101
|
-
},
|
|
102
|
-
velocityMultiplier: 1,
|
|
103
|
-
rotation: {
|
|
104
|
-
from: 0,
|
|
105
|
-
to: 10,
|
|
106
|
-
},
|
|
107
|
-
friction: 0.907,
|
|
108
|
-
angularAcceleration: {
|
|
109
|
-
from: -0.05,
|
|
110
|
-
to: 0.05,
|
|
111
|
-
},
|
|
112
|
-
speedRange: {
|
|
113
|
-
spark: [4, 18],
|
|
114
|
-
main: [4, 18],
|
|
115
|
-
},
|
|
116
|
-
life: 65,
|
|
117
|
-
gravity: 0,
|
|
118
|
-
},
|
|
119
|
-
[CelebrationVariant.GBD]: {
|
|
120
|
-
color: COLORS.PRIMARY_ORANGE,
|
|
121
|
-
elementsCount: {
|
|
122
|
-
star: 14,
|
|
123
|
-
spark: 12,
|
|
124
|
-
},
|
|
125
|
-
sparkSize: {
|
|
126
|
-
from: 6,
|
|
127
|
-
to: 12,
|
|
128
|
-
},
|
|
129
|
-
mainSize: {
|
|
130
|
-
from: 33,
|
|
131
|
-
to: 44,
|
|
132
|
-
},
|
|
133
|
-
angle: {
|
|
134
|
-
from: 30,
|
|
135
|
-
to: 330,
|
|
136
|
-
},
|
|
137
|
-
velocityMultiplier: 2,
|
|
138
|
-
rotation: {
|
|
139
|
-
from: 5,
|
|
140
|
-
to: 10,
|
|
141
|
-
},
|
|
142
|
-
friction: 0.925,
|
|
143
|
-
angularAcceleration: {
|
|
144
|
-
from: -0.03,
|
|
145
|
-
to: 0.03,
|
|
146
|
-
},
|
|
147
|
-
speedRange: {
|
|
148
|
-
spark: [4, 18],
|
|
149
|
-
main: [4, 18],
|
|
150
|
-
},
|
|
151
|
-
life: 120,
|
|
152
|
-
gravity: 0,
|
|
153
|
-
},
|
|
154
|
-
[CelebrationVariant.GBD_FINISH_ASSIGNMENT]: {
|
|
155
|
-
color: COLORS.PRIMARY_ORANGE,
|
|
156
|
-
elementsCount: {
|
|
157
|
-
star: 20,
|
|
158
|
-
spark: 16,
|
|
159
|
-
},
|
|
160
|
-
sparkSize: {
|
|
161
|
-
from: 4,
|
|
162
|
-
to: 16,
|
|
163
|
-
},
|
|
164
|
-
mainSize: {
|
|
165
|
-
from: 16,
|
|
166
|
-
to: 32,
|
|
167
|
-
},
|
|
168
|
-
angle: {
|
|
169
|
-
from: 220,
|
|
170
|
-
to: 320,
|
|
171
|
-
},
|
|
172
|
-
velocityMultiplier: 2,
|
|
173
|
-
rotation: {
|
|
174
|
-
from: 0,
|
|
175
|
-
to: 10,
|
|
176
|
-
},
|
|
177
|
-
friction: 0.95,
|
|
178
|
-
angularAcceleration: {
|
|
179
|
-
from: -0.02,
|
|
180
|
-
to: 0.02,
|
|
181
|
-
},
|
|
182
|
-
speedRange: {
|
|
183
|
-
spark: [14, 28],
|
|
184
|
-
main: [6, 18],
|
|
185
|
-
},
|
|
186
|
-
life: 100,
|
|
187
|
-
gravity: 0.19,
|
|
188
|
-
},
|
|
189
|
-
[CelebrationVariant.CORRECT_FINISH_ASSIGNMENT]: {
|
|
190
|
-
color: COLORS.PRIMARY_GREEN,
|
|
191
|
-
elementsCount: {
|
|
192
|
-
star: 20,
|
|
193
|
-
spark: 16,
|
|
194
|
-
},
|
|
195
|
-
sparkSize: {
|
|
196
|
-
from: 4,
|
|
197
|
-
to: 16,
|
|
198
|
-
},
|
|
199
|
-
mainSize: {
|
|
200
|
-
from: 16,
|
|
201
|
-
to: 32,
|
|
202
|
-
},
|
|
203
|
-
angle: {
|
|
204
|
-
from: 220,
|
|
205
|
-
to: 320,
|
|
206
|
-
},
|
|
207
|
-
velocityMultiplier: 2,
|
|
208
|
-
rotation: {
|
|
209
|
-
from: 0,
|
|
210
|
-
to: 10,
|
|
211
|
-
},
|
|
212
|
-
friction: 0.95,
|
|
213
|
-
angularAcceleration: {
|
|
214
|
-
from: -0.02,
|
|
215
|
-
to: 0.02,
|
|
216
|
-
},
|
|
217
|
-
speedRange: {
|
|
218
|
-
spark: [14, 28],
|
|
219
|
-
main: [6, 18],
|
|
220
|
-
},
|
|
221
|
-
life: 100,
|
|
222
|
-
gravity: 0.19,
|
|
223
|
-
},
|
|
224
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { ParticlesBatch } from './components/ParticleBatch';
|
|
2
|
-
import { Spark } from './components/Spark';
|
|
3
|
-
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config';
|
|
4
|
-
import { CelebrationVariant } from './types';
|
|
5
|
-
|
|
6
|
-
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min;
|
|
7
|
-
|
|
8
|
-
const isDateInRange = (currentDate: Date, startDateStr: string, endDateStr: string) => {
|
|
9
|
-
const [startDay, startMonth] = startDateStr.split('-').map(Number);
|
|
10
|
-
const [endDay, endMonth] = endDateStr.split('-').map(Number);
|
|
11
|
-
|
|
12
|
-
const currentYear = currentDate.getFullYear();
|
|
13
|
-
const startDate = new Date(currentYear, startMonth - 1, startDay);
|
|
14
|
-
const endDate = new Date(currentYear, endMonth - 1, endDay + 1);
|
|
15
|
-
|
|
16
|
-
return currentDate >= startDate && currentDate <= endDate;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const getIconForCurrentDate = () => {
|
|
20
|
-
const currentDate = new Date();
|
|
21
|
-
|
|
22
|
-
for (const celebration of CELEBRATION_ICON_CONFIG) {
|
|
23
|
-
if (celebration.activePeriod) {
|
|
24
|
-
const { start, end } = celebration.activePeriod;
|
|
25
|
-
if (isDateInRange(currentDate, start, end)) {
|
|
26
|
-
return celebration.Icon;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return CELEBRATION_ICON_CONFIG[0].Icon;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const MainIcon = getIconForCurrentDate();
|
|
35
|
-
export const generateParticle = (variant: CelebrationVariant
|
|
36
|
-
) => {
|
|
37
|
-
const {
|
|
38
|
-
elementsCount,
|
|
39
|
-
angle,
|
|
40
|
-
rotation,
|
|
41
|
-
sparkSize,
|
|
42
|
-
mainSize,
|
|
43
|
-
velocityMultiplier,
|
|
44
|
-
friction,
|
|
45
|
-
life,
|
|
46
|
-
angularAcceleration,
|
|
47
|
-
speedRange
|
|
48
|
-
} = CELEBRATION_VARIANTS[variant];
|
|
49
|
-
|
|
50
|
-
const sparkSpeedMin = speedRange?.spark?.[0]
|
|
51
|
-
const sparkSpeedMax = speedRange?.spark?.[1]
|
|
52
|
-
const mainSpeedMin = speedRange?.main?.[0]
|
|
53
|
-
const mainSpeedMax = speedRange?.main?.[1]
|
|
54
|
-
|
|
55
|
-
const particles: ParticlesBatch[] = [];
|
|
56
|
-
|
|
57
|
-
for (let i = 0; i < elementsCount.spark; i++) {
|
|
58
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
59
|
-
const randomSpeed = randomRange(sparkSpeedMin, sparkSpeedMax);
|
|
60
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
61
|
-
|
|
62
|
-
particles.push({
|
|
63
|
-
id: Math.random(),
|
|
64
|
-
size: randomRange(sparkSize.from, sparkSize.to),
|
|
65
|
-
type: 'spark',
|
|
66
|
-
angle: randomAngle,
|
|
67
|
-
velocity: {
|
|
68
|
-
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
69
|
-
y: Math.sin(randomAngle) * randomSpeed,
|
|
70
|
-
},
|
|
71
|
-
rotation: 0,
|
|
72
|
-
rotationSpeed: 0,
|
|
73
|
-
angularAcceleration: randomAngularAcceleration,
|
|
74
|
-
friction,
|
|
75
|
-
Component: Spark,
|
|
76
|
-
life,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
for (let i = 0; i < elementsCount.star; i++) {
|
|
80
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180);
|
|
81
|
-
const randomSpeed = randomRange(mainSpeedMin, mainSpeedMax);
|
|
82
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to);
|
|
83
|
-
|
|
84
|
-
particles.push({
|
|
85
|
-
id: Math.random(),
|
|
86
|
-
size: randomRange(mainSize.from, mainSize.to),
|
|
87
|
-
type: 'main',
|
|
88
|
-
angle: randomAngle,
|
|
89
|
-
velocity: {
|
|
90
|
-
x: Math.cos(randomAngle) * randomSpeed * velocityMultiplier,
|
|
91
|
-
y: Math.sin(randomAngle) * randomSpeed,
|
|
92
|
-
},
|
|
93
|
-
rotation: randomRange(rotation.from, rotation.to),
|
|
94
|
-
rotationSpeed: randomRange(-2, 2),
|
|
95
|
-
angularAcceleration: randomAngularAcceleration,
|
|
96
|
-
friction,
|
|
97
|
-
Component: MainIcon,
|
|
98
|
-
life,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return particles;
|
|
103
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export enum CelebrationVariant {
|
|
2
|
-
FIRST_ATTEMPT = 'firstAttempt',
|
|
3
|
-
CORRECT = 'correct',
|
|
4
|
-
GBD = 'gbd',
|
|
5
|
-
CORRECT_FINISH_ASSIGNMENT = 'correctFinishAssignment',
|
|
6
|
-
GBD_FINISH_ASSIGNMENT = 'gbdFinishAssignment',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type CelebrationsRef = {
|
|
10
|
-
play: (variant: CelebrationVariant) => void;
|
|
11
|
-
} | null;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { View, StyleSheet } from 'react-native'
|
|
3
|
-
import {
|
|
4
|
-
Button,
|
|
5
|
-
SPACING,
|
|
6
|
-
COLORS,
|
|
7
|
-
Typography,
|
|
8
|
-
ButtonVariant,
|
|
9
|
-
ButtonColor,
|
|
10
|
-
ButtonSize,
|
|
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 CheatDetected = ({ 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.RED}
|
|
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
|
-
flex: 1,
|
|
50
|
-
gap: SPACING[800],
|
|
51
|
-
alignItems: 'center',
|
|
52
|
-
justifyContent: 'space-between',
|
|
53
|
-
},
|
|
54
|
-
title: {
|
|
55
|
-
color: COLORS.NEUTRAL_9,
|
|
56
|
-
},
|
|
57
|
-
description: {
|
|
58
|
-
color: COLORS.NEUTRAL_9,
|
|
59
|
-
textAlign: 'center',
|
|
60
|
-
fontWeight: '700',
|
|
61
|
-
},
|
|
62
|
-
buttonText: {
|
|
63
|
-
textTransform: 'uppercase',
|
|
64
|
-
},
|
|
65
|
-
})
|
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import React, { memo, useEffect, useRef } from 'react'
|
|
2
|
-
import { View, StyleSheet, Text } from 'react-native'
|
|
3
|
-
|
|
4
|
-
import Animated, {
|
|
5
|
-
useSharedValue,
|
|
6
|
-
useAnimatedStyle,
|
|
7
|
-
withSpring,
|
|
8
|
-
withTiming,
|
|
9
|
-
withDelay,
|
|
10
|
-
interpolate,
|
|
11
|
-
interpolateColor,
|
|
12
|
-
runOnUI,
|
|
13
|
-
runOnJS,
|
|
14
|
-
} from 'react-native-reanimated'
|
|
15
|
-
import { SPACING, Typography, COLORS, BORDER_RADIUS, IS_MOBILE } from '@magmamath/react-native-ui'
|
|
16
|
-
|
|
17
|
-
import { GoodDrawingSparks } from './GoodDrawingSparks'
|
|
18
|
-
import { CorrectAnswerSparks } from './CorrectAnswerSparks'
|
|
19
|
-
import { EOABadge } from '../../ui/EOABadge'
|
|
20
|
-
import { SparkIcon } from '../../ui/SparkIcon'
|
|
21
|
-
|
|
22
|
-
import { AnimatedCardVariant, EOAModalText } from '../../types'
|
|
23
|
-
import {
|
|
24
|
-
ANIMATION_DELAYS,
|
|
25
|
-
BADGE_PARAMS,
|
|
26
|
-
CARD_DIMENSIONS,
|
|
27
|
-
OPACITY,
|
|
28
|
-
SPRING_CONFIG,
|
|
29
|
-
SPRING_CONFIG_STEP_3,
|
|
30
|
-
VARIANT_COLORS,
|
|
31
|
-
} from '../../constants'
|
|
32
|
-
import { CelebrationsRef, CelebrationVariant } from '../../../celebrations/types'
|
|
33
|
-
import { Celebrations } from '../../../celebrations/components/Celebrations'
|
|
34
|
-
|
|
35
|
-
type AnimatedCardProps = {
|
|
36
|
-
variant: AnimatedCardVariant
|
|
37
|
-
textContent: EOAModalText
|
|
38
|
-
shouldTriggerSparkles: boolean
|
|
39
|
-
solvedAmount?: number
|
|
40
|
-
problemsAmount?: number
|
|
41
|
-
gbdAmount?: number
|
|
42
|
-
delay?: number
|
|
43
|
-
onAnimationEnd?: () => void
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const AnimatedCard = memo(
|
|
47
|
-
({
|
|
48
|
-
variant,
|
|
49
|
-
textContent,
|
|
50
|
-
shouldTriggerSparkles,
|
|
51
|
-
solvedAmount = 0,
|
|
52
|
-
problemsAmount = 0,
|
|
53
|
-
gbdAmount = 0,
|
|
54
|
-
delay = 0,
|
|
55
|
-
onAnimationEnd,
|
|
56
|
-
}: AnimatedCardProps) => {
|
|
57
|
-
const celebrationsRef = useRef<CelebrationsRef>(null)
|
|
58
|
-
|
|
59
|
-
const cardOpacity = useSharedValue(OPACITY.initial)
|
|
60
|
-
const cardWidth = useSharedValue(CARD_DIMENSIONS.initialWidth)
|
|
61
|
-
const badgeTranslateX = useSharedValue(BADGE_PARAMS.initialTranslateX)
|
|
62
|
-
const badgeRotation = useSharedValue(BADGE_PARAMS.initialRotation)
|
|
63
|
-
const badgeScale = useSharedValue(BADGE_PARAMS.initialScale)
|
|
64
|
-
const statsOpacity = useSharedValue(OPACITY.initial)
|
|
65
|
-
const delaySv = useSharedValue(0)
|
|
66
|
-
|
|
67
|
-
const starOffsetLeft = gbdAmount > 9 ? 70 : 55
|
|
68
|
-
|
|
69
|
-
const animatedCardStyle = useAnimatedStyle(() => {
|
|
70
|
-
const progress = interpolate(
|
|
71
|
-
statsOpacity.value,
|
|
72
|
-
[OPACITY.initial, OPACITY.final],
|
|
73
|
-
[OPACITY.initial, OPACITY.final],
|
|
74
|
-
)
|
|
75
|
-
const backgroundColor = interpolateColor(
|
|
76
|
-
progress,
|
|
77
|
-
[OPACITY.initial, OPACITY.final],
|
|
78
|
-
[VARIANT_COLORS[variant].initial, VARIANT_COLORS[variant].final],
|
|
79
|
-
)
|
|
80
|
-
const height = interpolate(
|
|
81
|
-
cardWidth.value,
|
|
82
|
-
[CARD_DIMENSIONS.initialWidth, CARD_DIMENSIONS.finalWidth],
|
|
83
|
-
[CARD_DIMENSIONS.initialHeight, CARD_DIMENSIONS.finalHeight],
|
|
84
|
-
)
|
|
85
|
-
return {
|
|
86
|
-
opacity: cardOpacity.value,
|
|
87
|
-
width: cardWidth.value,
|
|
88
|
-
height,
|
|
89
|
-
backgroundColor,
|
|
90
|
-
}
|
|
91
|
-
}, [statsOpacity, cardOpacity, cardWidth])
|
|
92
|
-
|
|
93
|
-
const animatedBadgeStyle = useAnimatedStyle(
|
|
94
|
-
() => ({
|
|
95
|
-
transform: [
|
|
96
|
-
{ translateX: badgeTranslateX.value },
|
|
97
|
-
{ rotate: `${badgeRotation.value}deg` },
|
|
98
|
-
{ scale: badgeScale.value },
|
|
99
|
-
],
|
|
100
|
-
}),
|
|
101
|
-
[badgeTranslateX, badgeRotation, badgeScale],
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
const animatedStatsStyle = useAnimatedStyle(() => {
|
|
105
|
-
return {
|
|
106
|
-
opacity: statsOpacity.value,
|
|
107
|
-
}
|
|
108
|
-
}, [statsOpacity])
|
|
109
|
-
|
|
110
|
-
const statsSubtitle = (() => {
|
|
111
|
-
if (variant === AnimatedCardVariant.CORRECT_ANSWER) {
|
|
112
|
-
if (solvedAmount > 1) {
|
|
113
|
-
return textContent.stats?.correctAnswersPlural
|
|
114
|
-
}
|
|
115
|
-
return textContent.stats?.correctAnswers
|
|
116
|
-
} else {
|
|
117
|
-
if (gbdAmount > 1) {
|
|
118
|
-
return textContent.stats?.goodCalculationsPlural
|
|
119
|
-
}
|
|
120
|
-
return textContent.stats?.goodCalculations
|
|
121
|
-
}
|
|
122
|
-
})()
|
|
123
|
-
|
|
124
|
-
const runCelebration = () => {
|
|
125
|
-
if (variant === AnimatedCardVariant.CORRECT_ANSWER) {
|
|
126
|
-
celebrationsRef.current?.play(CelebrationVariant.CORRECT_FINISH_ASSIGNMENT)
|
|
127
|
-
} else {
|
|
128
|
-
celebrationsRef.current?.play(CelebrationVariant.GBD_FINISH_ASSIGNMENT)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
onAnimationEnd?.()
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
useEffect(() => {
|
|
135
|
-
runOnUI(() => {
|
|
136
|
-
'worklet'
|
|
137
|
-
const step3 = () => {
|
|
138
|
-
badgeTranslateX.value = withSpring(BADGE_PARAMS.finalTranslateX, SPRING_CONFIG_STEP_3)
|
|
139
|
-
statsOpacity.value = withDelay(80, withSpring(OPACITY.final, SPRING_CONFIG_STEP_3))
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const step2 = () => {
|
|
143
|
-
badgeTranslateX.value = withSpring(BADGE_PARAMS.intermediateTranslateX, SPRING_CONFIG)
|
|
144
|
-
cardWidth.value = withSpring(CARD_DIMENSIONS.finalWidth, SPRING_CONFIG)
|
|
145
|
-
badgeRotation.value = withSpring(0, SPRING_CONFIG)
|
|
146
|
-
badgeScale.value = withSpring(1, SPRING_CONFIG, () => {
|
|
147
|
-
delaySv.value = withTiming(1, { duration: ANIMATION_DELAYS.step3 }, () => {
|
|
148
|
-
step3()
|
|
149
|
-
|
|
150
|
-
delaySv.value = withTiming(0, { duration: 100 }, (finished) => {
|
|
151
|
-
if (finished) {
|
|
152
|
-
runOnJS(runCelebration)()
|
|
153
|
-
}
|
|
154
|
-
})
|
|
155
|
-
})
|
|
156
|
-
})
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const step1 = () => {
|
|
160
|
-
cardOpacity.value = withDelay(
|
|
161
|
-
delay,
|
|
162
|
-
withSpring(OPACITY.final, SPRING_CONFIG, () => {
|
|
163
|
-
step2()
|
|
164
|
-
}),
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
step1()
|
|
169
|
-
})()
|
|
170
|
-
}, [])
|
|
171
|
-
|
|
172
|
-
return (
|
|
173
|
-
<Animated.View style={styles.cardContainer}>
|
|
174
|
-
{variant === AnimatedCardVariant.CORRECT_ANSWER ? (
|
|
175
|
-
<CorrectAnswerSparks
|
|
176
|
-
color={COLORS.GREEN_3}
|
|
177
|
-
shouldStartAnimation={shouldTriggerSparkles}
|
|
178
|
-
/>
|
|
179
|
-
) : (
|
|
180
|
-
<GoodDrawingSparks color={COLORS.ORANGE_3} shouldStartAnimation={shouldTriggerSparkles} />
|
|
181
|
-
)}
|
|
182
|
-
<Celebrations modelRef={celebrationsRef} style={styles.celebrations} />
|
|
183
|
-
|
|
184
|
-
<Animated.View style={[styles.card, animatedCardStyle]}>
|
|
185
|
-
<Animated.View style={styles.cardContent}>
|
|
186
|
-
<Animated.View style={[styles.badgeContainer, animatedBadgeStyle]}>
|
|
187
|
-
<EOABadge
|
|
188
|
-
variant={variant}
|
|
189
|
-
color={VARIANT_COLORS[variant].primary}
|
|
190
|
-
size={88}
|
|
191
|
-
iconSize={56}
|
|
192
|
-
/>
|
|
193
|
-
</Animated.View>
|
|
194
|
-
|
|
195
|
-
<Animated.View style={[styles.statsWrapper, animatedStatsStyle]}>
|
|
196
|
-
{variant === AnimatedCardVariant.GOOD_DRAWING && (
|
|
197
|
-
<View style={[styles.starContainer, { left: starOffsetLeft }]}>
|
|
198
|
-
<SparkIcon size={20} color={VARIANT_COLORS[variant].initial} />
|
|
199
|
-
<View style={styles.starCircle} />
|
|
200
|
-
<SparkIcon size={12} color={VARIANT_COLORS[variant].initial} />
|
|
201
|
-
</View>
|
|
202
|
-
)}
|
|
203
|
-
|
|
204
|
-
<View style={styles.statsValueContainer}>
|
|
205
|
-
<Typography
|
|
206
|
-
variant="h1"
|
|
207
|
-
style={[styles.largeText, { color: VARIANT_COLORS[variant].primary }]}
|
|
208
|
-
>
|
|
209
|
-
{variant === AnimatedCardVariant.CORRECT_ANSWER ? solvedAmount : gbdAmount}
|
|
210
|
-
</Typography>
|
|
211
|
-
{variant === AnimatedCardVariant.CORRECT_ANSWER && (
|
|
212
|
-
<Typography variant="h5" style={styles.smallText}>
|
|
213
|
-
<Text style={styles.slash}>{'/'}</Text>
|
|
214
|
-
{problemsAmount}
|
|
215
|
-
</Typography>
|
|
216
|
-
)}
|
|
217
|
-
</View>
|
|
218
|
-
|
|
219
|
-
<Typography variant="h3" style={styles.cardTitle}>
|
|
220
|
-
{statsSubtitle}
|
|
221
|
-
</Typography>
|
|
222
|
-
</Animated.View>
|
|
223
|
-
</Animated.View>
|
|
224
|
-
</Animated.View>
|
|
225
|
-
</Animated.View>
|
|
226
|
-
)
|
|
227
|
-
},
|
|
228
|
-
)
|
|
229
|
-
|
|
230
|
-
const styles = StyleSheet.create({
|
|
231
|
-
cardContainer: {
|
|
232
|
-
height: CARD_DIMENSIONS.finalHeight,
|
|
233
|
-
width: CARD_DIMENSIONS.finalWidth,
|
|
234
|
-
justifyContent: 'center',
|
|
235
|
-
alignItems: 'center',
|
|
236
|
-
},
|
|
237
|
-
card: {
|
|
238
|
-
padding: SPACING[200],
|
|
239
|
-
borderRadius: SPACING[400],
|
|
240
|
-
},
|
|
241
|
-
cardContent: {
|
|
242
|
-
flex: 1,
|
|
243
|
-
gap: SPACING[100],
|
|
244
|
-
borderRadius: BORDER_RADIUS[200],
|
|
245
|
-
flexDirection: 'row',
|
|
246
|
-
alignItems: 'center',
|
|
247
|
-
backgroundColor: COLORS.NEUTRAL_1,
|
|
248
|
-
},
|
|
249
|
-
badgeContainer: {
|
|
250
|
-
borderRadius: BORDER_RADIUS[400],
|
|
251
|
-
marginRight: 50,
|
|
252
|
-
},
|
|
253
|
-
statsWrapper: {
|
|
254
|
-
padding: SPACING[100],
|
|
255
|
-
gap: SPACING[100],
|
|
256
|
-
},
|
|
257
|
-
statsValueContainer: {
|
|
258
|
-
flexDirection: 'row',
|
|
259
|
-
height: IS_MOBILE ? 42 : 'auto',
|
|
260
|
-
paddingHorizontal: SPACING[100],
|
|
261
|
-
marginVertical: SPACING[100],
|
|
262
|
-
},
|
|
263
|
-
largeText: {
|
|
264
|
-
textAlign: 'center',
|
|
265
|
-
textAlignVertical: 'bottom',
|
|
266
|
-
fontSize: IS_MOBILE ? 56 : 60,
|
|
267
|
-
fontWeight: '700',
|
|
268
|
-
lineHeight: IS_MOBILE ? 54 : 46,
|
|
269
|
-
},
|
|
270
|
-
slash: {
|
|
271
|
-
paddingRight: 1,
|
|
272
|
-
},
|
|
273
|
-
smallText: {
|
|
274
|
-
fontSize: 16,
|
|
275
|
-
fontWeight: '700',
|
|
276
|
-
lineHeight: 16,
|
|
277
|
-
color: COLORS.NEUTRAL_6,
|
|
278
|
-
alignSelf: 'flex-end',
|
|
279
|
-
},
|
|
280
|
-
cardTitle: {
|
|
281
|
-
color: COLORS.NEUTRAL_7,
|
|
282
|
-
padding: SPACING[100],
|
|
283
|
-
},
|
|
284
|
-
starContainer: {
|
|
285
|
-
position: 'absolute',
|
|
286
|
-
top: 10,
|
|
287
|
-
},
|
|
288
|
-
starCircle: {
|
|
289
|
-
width: 4,
|
|
290
|
-
height: 4,
|
|
291
|
-
borderRadius: 5,
|
|
292
|
-
backgroundColor: COLORS.ORANGE_2,
|
|
293
|
-
},
|
|
294
|
-
celebrations: {
|
|
295
|
-
top: 0,
|
|
296
|
-
zIndex: 100000,
|
|
297
|
-
},
|
|
298
|
-
})
|