@magmamath/students-features 0.4.5 → 0.5.0-rc.1
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 +30 -47
- 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 +57 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +130 -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 +147 -122
- 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} +15 -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/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/constants.js +3 -3
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- 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/{src/lib → dist/commonjs/shared/translation}/localization/en.json +8 -1
- package/dist/{module/lib → commonjs/shared/translation}/localization/gb.json +8 -1
- package/dist/commonjs/{lib → shared/translation}/localization/sw.json +8 -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 +31 -48
- 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 +51 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +1 -0
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +125 -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 +149 -124
- 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} +15 -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/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/constants.js +3 -3
- package/dist/module/shared/translation/constants.js.map +1 -1
- 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/{commonjs/lib → module/shared/translation}/localization/en.json +8 -1
- package/{src/lib → dist/module/shared/translation}/localization/gb.json +8 -1
- package/dist/module/{lib → shared/translation}/localization/sw.json +8 -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 +8 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -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 +12 -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 +19 -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 +21 -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 +43 -3
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
- 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 +8 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +35 -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 +12 -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 +19 -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 +21 -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 +43 -3
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +4 -4
- 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 +37 -47
- 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 -31
- 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 +53 -0
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +150 -0
- package/src/features/chatbot/index.ts +3 -4
- package/src/features/chatbot/model/ChatBotModel.ts +141 -133
- 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} +18 -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 +12 -12
- package/src/features/chatbot/types/model.types.ts +31 -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/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/constants.ts +3 -3
- 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/{dist/module/lib → src/shared/translation}/localization/en.json +8 -1
- package/{dist/commonjs/lib → src/shared/translation}/localization/gb.json +8 -1
- package/src/{lib → shared/translation}/localization/sw.json +8 -1
- package/src/shared/translation/model.ts +8 -8
- package/src/shared/translation/types.ts +11 -8
- 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,27 +1,20 @@
|
|
|
1
1
|
import type { Store } from 'effector'
|
|
2
2
|
import {
|
|
3
|
+
ChatHintPayload,
|
|
4
|
+
ChatHintResponse,
|
|
5
|
+
ErrorSpottingPayload,
|
|
6
|
+
ErrorSpottingResponse,
|
|
7
|
+
GetAlternativesPayload,
|
|
3
8
|
GetAlternativesResponse,
|
|
4
|
-
PostMessagePayload,
|
|
5
|
-
PostMessageResponse,
|
|
6
|
-
GoogleTranslatePayload,
|
|
7
|
-
GoogleTranslateResponse,
|
|
8
9
|
GoogleText2SpeechPayload,
|
|
9
10
|
GoogleText2SpeechResponse,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
GoogleTranslatePayload,
|
|
12
|
+
GoogleTranslateResponse,
|
|
13
|
+
PostMessagePayload,
|
|
14
|
+
PostMessageResponse,
|
|
13
15
|
} from './api.types'
|
|
14
16
|
import { ExtendWithOptional } from '../../../lib/helpers/types'
|
|
15
|
-
|
|
16
|
-
export type ConversationMessage = {
|
|
17
|
-
id: string
|
|
18
|
-
message: string
|
|
19
|
-
threadId: string
|
|
20
|
-
options: ChatAnswer[]
|
|
21
|
-
isOwnMessage: boolean
|
|
22
|
-
translatedMessage?: string
|
|
23
|
-
endMessage?: boolean
|
|
24
|
-
}
|
|
17
|
+
import { ChatAnswer, ConversationMessage, FullStrokeData } from './units.types'
|
|
25
18
|
|
|
26
19
|
export type ChatbotMessages = {
|
|
27
20
|
error: ConversationMessage
|
|
@@ -30,15 +23,20 @@ export type ChatbotMessages = {
|
|
|
30
23
|
anotherHintOption: ChatAnswer
|
|
31
24
|
}
|
|
32
25
|
|
|
26
|
+
export type ChatbotApiRequests = {
|
|
27
|
+
getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>
|
|
28
|
+
postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>
|
|
29
|
+
postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
|
|
30
|
+
postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>
|
|
31
|
+
spotError: (props: ErrorSpottingPayload) => Promise<ErrorSpottingResponse>
|
|
32
|
+
}
|
|
33
|
+
|
|
33
34
|
export type ChatbotModelProps = {
|
|
34
35
|
$key?: Store<string>
|
|
35
|
-
api: {
|
|
36
|
-
|
|
37
|
-
postMessage: (props: PostMessagePayload) => Promise<PostMessageResponse>
|
|
38
|
-
postTranslateText: (props: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
|
|
39
|
-
postTextToSpeech: (props: GoogleText2SpeechPayload) => Promise<GoogleText2SpeechResponse>
|
|
36
|
+
api: Omit<ChatbotApiRequests, 'postMessage'> & {
|
|
37
|
+
requestHint: (props: ChatHintPayload) => Promise<ChatHintResponse>
|
|
40
38
|
}
|
|
41
|
-
|
|
39
|
+
threadMessagesLimit?: number
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export type SendHelpParams = {
|
|
@@ -48,8 +46,6 @@ export type SendHelpParams = {
|
|
|
48
46
|
|
|
49
47
|
export type SendHelpProps = SendHelpParams & {
|
|
50
48
|
key: string
|
|
51
|
-
isTranslated: boolean
|
|
52
|
-
threadId: string
|
|
53
49
|
context: ChatbotContext | null
|
|
54
50
|
}
|
|
55
51
|
|
|
@@ -71,16 +67,19 @@ export enum MessageVariant {
|
|
|
71
67
|
RECEIVED = 'received',
|
|
72
68
|
}
|
|
73
69
|
|
|
74
|
-
export type
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
70
|
+
export type CreateMessageResponse = ExtendWithOptional<
|
|
71
|
+
Omit<PostMessageResponse, 'threadId'>,
|
|
72
|
+
ConversationMessage
|
|
73
|
+
>
|
|
79
74
|
|
|
80
|
-
|
|
75
|
+
type GetVisibleStrokesResponse = {
|
|
76
|
+
strokes: FullStrokeData[]
|
|
77
|
+
validationKey: string
|
|
78
|
+
}
|
|
81
79
|
|
|
82
80
|
export type IChatDrawBoardAdapter = {
|
|
83
|
-
|
|
81
|
+
$strokesValidationKey: Store<string | null>
|
|
82
|
+
getVisibleStrokes(): Promise<GetVisibleStrokesResponse | null>
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
export type ChatbotContext = {
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConversationMessage } from './units.types'
|
|
2
2
|
|
|
3
3
|
export enum AudioStatus {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
PLAYING = 'playing',
|
|
5
|
+
STOPPED = 'stopped',
|
|
6
|
+
PAUSED = 'paused',
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export type AudioProvider = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
play: (audioPath: string, onPlaybackComplete: () => void) => Promise<void>
|
|
11
|
+
pause: () => void
|
|
12
|
+
resume: () => void
|
|
13
|
+
stop: () => void
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export type PlayTextToSpeechProps = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
isTranslated: boolean
|
|
20
|
-
config?: {
|
|
21
|
-
voice?: typeof DEFAULT_VOICE
|
|
22
|
-
audioConfig?: typeof AUDIO_CONFIG
|
|
23
|
-
}
|
|
17
|
+
message: ConversationMessage
|
|
18
|
+
isTranslated: boolean
|
|
24
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConversationMessage } from './model.types'
|
|
2
1
|
import { GetAlternativesResponse } from './api.types'
|
|
2
|
+
import { ConversationMessage } from './units.types'
|
|
3
3
|
|
|
4
4
|
export type TranslateBatchFxProps = {
|
|
5
5
|
messages: ConversationMessage[]
|
|
@@ -8,6 +8,7 @@ export type TranslateBatchFxProps = {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export type TranslateMessageFxProps = {
|
|
11
|
+
preventTranslate?: boolean
|
|
11
12
|
messages: ConversationMessage[]
|
|
12
13
|
targetLanguage: string
|
|
13
14
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type Stroke = {
|
|
2
|
+
x: number[]
|
|
3
|
+
y: number[]
|
|
4
|
+
}
|
|
5
|
+
export type FullStrokeData = Stroke & {
|
|
6
|
+
id: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type IThreadItem = {
|
|
10
|
+
id: string
|
|
11
|
+
strokesValidationKey: string | null
|
|
12
|
+
strokes: FullStrokeData[] | null
|
|
13
|
+
history: string[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type ChatAnswer = {
|
|
17
|
+
text: string
|
|
18
|
+
promptKey: string
|
|
19
|
+
translatedText?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type ConversationMessage = {
|
|
23
|
+
id: string
|
|
24
|
+
message: string
|
|
25
|
+
options: ChatAnswer[]
|
|
26
|
+
isOwnMessage: boolean
|
|
27
|
+
translatedMessage?: string
|
|
28
|
+
endMessage?: boolean
|
|
29
|
+
isInitial?: boolean
|
|
30
|
+
threadId?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type ChatItem = {
|
|
34
|
+
messages: ConversationMessage[]
|
|
35
|
+
isAvailable: boolean
|
|
36
|
+
currentThread: IThreadItem | null
|
|
37
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export { useFeaturesLocalization, setFeaturesLocalization, Locale } from './shared/translation'
|
|
2
|
-
export type { LocalizationConfig } from './shared/translation'
|
|
3
2
|
export { generateRandomId } from './lib/helpers/helpers'
|
|
4
3
|
export * from './features/chatbot'
|
|
5
4
|
export * from './features/feedback'
|
|
6
|
-
export * from './features/celebrations'
|
|
7
|
-
export * from './features/endOfAssignment'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEvent, createStore } from 'effector'
|
|
1
|
+
import { createEvent, createStore, Event } from 'effector'
|
|
2
2
|
|
|
3
3
|
type UpdateField<T> = {
|
|
4
4
|
key: string
|
|
@@ -19,6 +19,14 @@ export class EntityFieldStore<T> {
|
|
|
19
19
|
return { ...state, [key]: data }
|
|
20
20
|
})
|
|
21
21
|
.reset(this.reset)
|
|
22
|
+
|
|
23
|
+
public on<EV>(
|
|
24
|
+
event: Event<EV>,
|
|
25
|
+
fn: (state: Record<string, T>, payload: EV) => Record<string, T> | void,
|
|
26
|
+
) {
|
|
27
|
+
this.$state.on(event, fn)
|
|
28
|
+
return this
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
export function createEntityFieldStore<T>() {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function getRandomElements<T>(array: T[], limit = array.length): T[] {
|
|
2
|
+
if (array.length === 0) {
|
|
3
|
+
return []
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const randomCount = Math.min(Math.floor(Math.random() * array.length) + 1, limit)
|
|
7
|
+
|
|
8
|
+
const arrayCopy = [...array]
|
|
9
|
+
const result: T[] = []
|
|
10
|
+
|
|
11
|
+
for (let i = 0; i < randomCount; i++) {
|
|
12
|
+
if (arrayCopy.length === 0) {
|
|
13
|
+
break
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const randomIndex = Math.floor(Math.random() * arrayCopy.length)
|
|
17
|
+
result.push(arrayCopy[randomIndex])
|
|
18
|
+
arrayCopy.splice(randomIndex, 1)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return result
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type JoinKeys<K extends string, P extends string> = `${K}.${P}`
|
|
2
|
+
|
|
3
|
+
type NestedKeys<T, Prefix extends string = ''> = T extends object
|
|
4
|
+
? T extends Array<any>
|
|
5
|
+
? never
|
|
6
|
+
: {
|
|
7
|
+
[K in keyof T & string]: T[K] extends object
|
|
8
|
+
?
|
|
9
|
+
| JoinKeys<Prefix extends '' ? K : `${Prefix}.${K}`, NestedKeys<T[K], ''>>
|
|
10
|
+
| (Prefix extends '' ? K : `${Prefix}.${K}`)
|
|
11
|
+
: Prefix extends ''
|
|
12
|
+
? K
|
|
13
|
+
: `${Prefix}.${K}`
|
|
14
|
+
}[keyof T & string]
|
|
15
|
+
: never
|
|
16
|
+
|
|
17
|
+
type FlattenKeys<T> = T extends string ? T : never
|
|
18
|
+
export type RetrieveKeys<T> = FlattenKeys<NestedKeys<T>>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { IconProps } from './icon.types'
|
|
4
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
5
|
+
|
|
6
|
+
export function HighlighterIcon({ size = 17, color = COLORS.NEUTRAL_9, style }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<Svg style={style} width={size} height={size} viewBox="0 0 17 17" fill="none">
|
|
9
|
+
<Path
|
|
10
|
+
d="M6.02 1.557a.596.596 0 011.108 0l.42 1.067c.06.153.182.275.336.335l1.066.42a.596.596 0 010 1.109l-1.066.42a.596.596 0 00-.336.336l-.42 1.066a.596.596 0 01-1.109 0L5.6 5.244a.596.596 0 00-.336-.336l-1.066-.42a.596.596 0 010-1.108l1.066-.42a.596.596 0 00.336-.336l.42-1.067z"
|
|
11
|
+
fill={color}
|
|
12
|
+
/>
|
|
13
|
+
<Path
|
|
14
|
+
fillRule="evenodd"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
d="M8.843 3.338l-.974.73-2.11 1.583.26.66a.596.596 0 001.109 0l.42-1.067a.596.596 0 01.336-.336l1.066-.42a.596.596 0 000-1.108l-.107-.042zm.67-.502c.497.346.665.964.506 1.495l.476-.357 2.868 2.868-3.636 4.849-4.08-4.08.38-.286a1.316 1.316 0 01-.705-.74l-.185-.468-.898.674a.95.95 0 00-.33 1.065 1.75 1.75 0 00-.2.53l-.602 3.016-1.752 1.752a.95.95 0 00.297 1.545l1.83.784a1.35 1.35 0 001.487-.286l.966-.966 3.016-.604c.187-.037.366-.105.53-.199a.95.95 0 001.065-.33l5.445-7.26a2.25 2.25 0 00-.209-2.94L14.44 1.554a2.25 2.25 0 00-2.941-.209l-1.986 1.49zm3.866-.22a.75.75 0 00-.98-.07l-.692.519 2.565 2.565.52-.692a.75.75 0 00-.07-.98l-1.343-1.342zM3.797 12.832l-.807.808.99.425.525-.525-.708-.707zm2.015-.107l2.357-.47-3.086-3.087-.471 2.357 1.2 1.2z"
|
|
17
|
+
fill={color}
|
|
18
|
+
/>
|
|
19
|
+
</Svg>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Svg, { Path } from 'react-native-svg'
|
|
3
|
+
import { IconProps } from './icon.types'
|
|
4
|
+
import { COLORS } from '@magmamath/react-native-ui'
|
|
5
|
+
|
|
6
|
+
export function StopIcon({ size = 17, color = COLORS.NEUTRAL_9, style }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<Svg width={size} height={size} viewBox="0 0 17 17" fill="none" style={style}>
|
|
9
|
+
<Path
|
|
10
|
+
fillRule="evenodd"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
d="M1.759 2.996c0-.967.784-1.752 1.752-1.752h10.496c.967 0 1.752.785 1.752 1.752v10.496c0 .968-.785 1.752-1.752 1.752H3.51a1.752 1.752 0 01-1.752-1.752V2.996z"
|
|
13
|
+
fill={color}
|
|
14
|
+
/>
|
|
15
|
+
</Svg>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native'
|
|
2
|
+
|
|
1
3
|
export type IconProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
color?: string
|
|
5
|
+
className?: string
|
|
6
|
+
size?: number
|
|
7
|
+
strokeWidth?: string
|
|
8
|
+
width?: number
|
|
9
|
+
height?: number
|
|
10
|
+
style?: StyleProp<ViewStyle>
|
|
8
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Locale } from './types'
|
|
2
|
-
import EN from '
|
|
3
|
-
import GB from '
|
|
4
|
-
import SW from '
|
|
2
|
+
import EN from './localization/en.json'
|
|
3
|
+
import GB from './localization/gb.json'
|
|
4
|
+
import SW from './localization/sw.json'
|
|
5
5
|
|
|
6
6
|
export const LOCALIZATION_CONFIGS = {
|
|
7
7
|
[Locale.EN]: EN,
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import { LOCALIZATION_CONFIGS } from './constants'
|
|
2
2
|
import { $localization, setLocalization } from './model'
|
|
3
|
-
import { GetText,
|
|
3
|
+
import { GetText, TranslationKeys, Translations } from './types'
|
|
4
|
+
|
|
5
|
+
export function getTranslation(config: Translations, key: TranslationKeys) {
|
|
6
|
+
const rawTranslation = config?.[key as keyof Translations]
|
|
7
|
+
if (typeof rawTranslation === 'string' || !key.includes('.')) {
|
|
8
|
+
return rawTranslation as string
|
|
9
|
+
}
|
|
10
|
+
const keys = key.split('.')
|
|
11
|
+
let translation = config
|
|
12
|
+
for (const k of keys) {
|
|
13
|
+
if (translation[k as keyof Translations] === undefined) return key
|
|
14
|
+
translation = translation[k as keyof Translations] as any
|
|
15
|
+
}
|
|
16
|
+
if (typeof translation === 'string') {
|
|
17
|
+
return translation
|
|
18
|
+
}
|
|
19
|
+
return key
|
|
20
|
+
}
|
|
4
21
|
|
|
5
22
|
export const getSubstitutedString = (str: string, substitutions: Record<string, string> = {}) => {
|
|
6
23
|
const substitutionsArray = Object.entries(substitutions)
|
|
@@ -18,17 +35,13 @@ export const getSubstitutedString = (str: string, substitutions: Record<string,
|
|
|
18
35
|
export const getText: GetText = (key: TranslationKeys, args = null) => {
|
|
19
36
|
const config = $localization.getState()
|
|
20
37
|
|
|
21
|
-
const translation = config
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return getSubstitutedString(translation, args)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return translation ?? key
|
|
38
|
+
const translation = getTranslation(config, key)
|
|
39
|
+
if (args) return getSubstitutedString(translation, args)
|
|
40
|
+
return translation
|
|
28
41
|
}
|
|
29
42
|
|
|
30
43
|
export const setFeaturesLocalization = (
|
|
31
|
-
generator: ((config: typeof LOCALIZATION_CONFIGS) =>
|
|
44
|
+
generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations,
|
|
32
45
|
) => {
|
|
33
46
|
setLocalization(generator)
|
|
34
47
|
}
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { useUnit } from 'effector-react'
|
|
2
2
|
import { $localization, setLocalization } from './model'
|
|
3
|
-
import { GetText,
|
|
3
|
+
import { GetText, Translations } from './types'
|
|
4
4
|
import { useEffect } from 'react'
|
|
5
5
|
import { LOCALIZATION_CONFIGS } from './constants'
|
|
6
|
-
import { getSubstitutedString } from './helpers'
|
|
6
|
+
import { getSubstitutedString, getTranslation } from './helpers'
|
|
7
7
|
|
|
8
8
|
export const useText = (): GetText => {
|
|
9
|
-
|
|
9
|
+
const config = useUnit($localization)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return translation ?? key
|
|
19
|
-
}
|
|
11
|
+
return (key, args = null) => {
|
|
12
|
+
const translation = getTranslation(config, key)
|
|
13
|
+
if (args) return getSubstitutedString(translation, args)
|
|
14
|
+
return translation
|
|
15
|
+
}
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
export const useFeaturesLocalization = (
|
|
23
|
-
|
|
19
|
+
generator: ((config: typeof LOCALIZATION_CONFIGS) => Translations) | Translations,
|
|
24
20
|
) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setLocalization(generator)
|
|
23
|
+
}, [generator])
|
|
28
24
|
}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"answerAgain": "Answer again to get another hint!",
|
|
17
|
+
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
+
"showError": "Show error"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
13
|
+
"time.yearsAgo": "years ago",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"answerAgain": "Answer again to get another hint!",
|
|
17
|
+
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
+
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
+
"showError": "Show error"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -10,5 +10,12 @@
|
|
|
10
10
|
"time.monthAgo": "månad sedan",
|
|
11
11
|
"time.monthsAgo": "månader sedan",
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
|
-
"time.yearsAgo": "år sedan"
|
|
13
|
+
"time.yearsAgo": "år sedan",
|
|
14
|
+
"chat": {
|
|
15
|
+
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
+
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
17
|
+
"errorMessage": "Tyvärr kan jag inte hjälpa dig just nu 😔.",
|
|
18
|
+
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
19
|
+
"showError": "Visa fel"
|
|
20
|
+
}
|
|
14
21
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createEvent, createStore } from 'effector'
|
|
2
|
-
import { Locale,
|
|
2
|
+
import { Locale, Translations } from './types'
|
|
3
3
|
import { LOCALIZATION_CONFIGS } from './constants'
|
|
4
4
|
|
|
5
5
|
export const setLocalization = createEvent<
|
|
6
|
-
|
|
6
|
+
Translations | ((config: typeof LOCALIZATION_CONFIGS) => Translations)
|
|
7
7
|
>()
|
|
8
8
|
|
|
9
|
-
export const $localization = createStore<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export const $localization = createStore<Translations>(LOCALIZATION_CONFIGS[Locale.EN]).on(
|
|
10
|
+
setLocalization,
|
|
11
|
+
(state, payload) => {
|
|
12
|
+
if (typeof payload === 'function') return payload(LOCALIZATION_CONFIGS)
|
|
13
|
+
return payload
|
|
14
|
+
},
|
|
15
15
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import enTranslations from '
|
|
1
|
+
import enTranslations from './localization/en.json'
|
|
2
|
+
import swTranslations from './localization/sw.json'
|
|
3
|
+
import gbTranslations from './localization/gb.json'
|
|
4
|
+
import { RetrieveKeys } from '../../lib/types/keys'
|
|
5
|
+
import { ISValidTranslation } from './validation.types'
|
|
2
6
|
|
|
3
7
|
export type Translations = typeof enTranslations
|
|
4
|
-
export type TranslationKeys =
|
|
5
|
-
|
|
6
|
-
export type GetText = <T extends TranslationKeys>(
|
|
7
|
-
key: T,
|
|
8
|
-
args?: Record<string, string> | null,
|
|
9
|
-
) => Translations[T]
|
|
8
|
+
export type TranslationKeys = RetrieveKeys<Translations>
|
|
9
|
+
export type GetText = (key: TranslationKeys, args?: Record<string, string> | null) => string
|
|
10
10
|
|
|
11
11
|
export enum Locale {
|
|
12
12
|
EN = 'en-SE',
|
|
@@ -14,4 +14,7 @@ export enum Locale {
|
|
|
14
14
|
GB = 'en-GB',
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// Validation of translations, do not remove
|
|
18
|
+
type ISValidEN = ISValidTranslation<Translations>
|
|
19
|
+
type ISValidSW = ISValidTranslation<typeof swTranslations>
|
|
20
|
+
type ISValidGB = ISValidTranslation<typeof gbTranslations>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import enTranslations from './localization/en.json'
|
|
2
|
+
import swTranslations from './localization/sw.json'
|
|
3
|
+
import gbTranslations from './localization/gb.json'
|
|
4
|
+
|
|
5
|
+
type Extends<T, U> = T extends U ? true : false
|
|
6
|
+
|
|
7
|
+
type ExtendsAll<Candidate, Types extends unknown[]> = Types extends [infer Head, ...infer Tail]
|
|
8
|
+
? Extends<Candidate, Head> extends true
|
|
9
|
+
? ExtendsAll<Candidate, Tail>
|
|
10
|
+
: false
|
|
11
|
+
: true
|
|
12
|
+
|
|
13
|
+
type FindDominantType<Types extends unknown[]> = Types extends [
|
|
14
|
+
infer First,
|
|
15
|
+
...infer Rest extends unknown[],
|
|
16
|
+
]
|
|
17
|
+
? ExtendsAll<First, Rest> extends true
|
|
18
|
+
? First
|
|
19
|
+
: FindDominantType<Rest>
|
|
20
|
+
: never
|
|
21
|
+
|
|
22
|
+
type DominantTranslation = FindDominantType<
|
|
23
|
+
[typeof enTranslations, typeof swTranslations, typeof gbTranslations]
|
|
24
|
+
>
|
|
25
|
+
|
|
26
|
+
export type ISValidTranslation<T extends DominantTranslation> = T
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Celebrations = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _ParticleBatch = require("./ParticleBatch.js");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
const Celebrations = exports.Celebrations = /*#__PURE__*/(0, _react.memo)(({
|
|
14
|
-
style,
|
|
15
|
-
modelRef
|
|
16
|
-
}) => {
|
|
17
|
-
const activeBatchesIds = (0, _react.useRef)(new Set());
|
|
18
|
-
const [particlesBatches, setParticlesBatches] = (0, _react.useState)([]);
|
|
19
|
-
const [containerWidth, setContainerWidth] = (0, _react.useState)(0);
|
|
20
|
-
const addParticlesBatch = variant => {
|
|
21
|
-
const batchId = Math.random();
|
|
22
|
-
activeBatchesIds.current.add(batchId);
|
|
23
|
-
setParticlesBatches(prev => [...prev, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ParticleBatch.ParticleBatch, {
|
|
24
|
-
onAnimationEnd: () => {
|
|
25
|
-
activeBatchesIds.current.delete(batchId);
|
|
26
|
-
setParticlesBatches(prev => prev.filter(batch => batch.key !== batchId.toString()));
|
|
27
|
-
},
|
|
28
|
-
containerWidth: containerWidth,
|
|
29
|
-
variant: variant
|
|
30
|
-
}, batchId)]);
|
|
31
|
-
};
|
|
32
|
-
(0, _react.useImperativeHandle)(modelRef, () => ({
|
|
33
|
-
play: addParticlesBatch
|
|
34
|
-
}), [containerWidth]);
|
|
35
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
36
|
-
style: [styles.container, style],
|
|
37
|
-
onLayout: event => {
|
|
38
|
-
setContainerWidth(event.nativeEvent.layout.width);
|
|
39
|
-
},
|
|
40
|
-
pointerEvents: "box-none",
|
|
41
|
-
children: particlesBatches
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
const styles = _reactNative.StyleSheet.create({
|
|
45
|
-
container: {
|
|
46
|
-
zIndex: 0,
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
width: '100%'
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=Celebrations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_ParticleBatch","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Celebrations","exports","memo","style","modelRef","activeBatchesIds","useRef","Set","particlesBatches","setParticlesBatches","useState","containerWidth","setContainerWidth","addParticlesBatch","variant","batchId","Math","random","current","add","prev","jsx","ParticleBatch","onAnimationEnd","delete","filter","batch","key","toString","useImperativeHandle","play","View","styles","container","onLayout","event","nativeEvent","layout","width","pointerEvents","children","StyleSheet","create","zIndex","position"],"sourceRoot":"../../../../../src","sources":["features/celebrations/components/Celebrations.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAQxC,MAAMW,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,WAAI,EAAC,CAAC;EAAEC,KAAK;EAAEC;AAA4B,CAAC,KAAK;EAC3E,MAAMC,gBAAgB,GAAG,IAAAC,aAAM,EAAC,IAAIC,GAAG,CAAS,CAAC,CAAC;EAClD,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAG,IAAAC,eAAQ,EAEtD,EAAE,CAAC;EACL,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAF,eAAQ,EAAC,CAAC,CAAC;EAEvD,MAAMG,iBAAiB,GAAIC,OAA2B,IAAK;IACzD,MAAMC,OAAO,GAAGC,IAAI,CAACC,MAAM,CAAC,CAAC;IAC7BZ,gBAAgB,CAACa,OAAO,CAACC,GAAG,CAACJ,OAAO,CAAC;IACrCN,mBAAmB,CAAEW,IAAI,IAAK,CAC5B,GAAGA,IAAI,eACP,IAAAzC,WAAA,CAAA0C,GAAA,EAAC3C,cAAA,CAAA4C,aAAa;MAEZC,cAAc,EAAEA,CAAA,KAAM;QACpBlB,gBAAgB,CAACa,OAAO,CAACM,MAAM,CAACT,OAAO,CAAC;QACxCN,mBAAmB,CAAEW,IAAI,IAAKA,IAAI,CAACK,MAAM,CAAEC,KAAK,IAAKA,KAAK,CAACC,GAAG,KAAKZ,OAAO,CAACa,QAAQ,CAAC,CAAC,CAAC,CAAC;MACzF,CAAE;MACFjB,cAAc,EAAEA,cAAe;MAC/BG,OAAO,EAAEA;IAAQ,GANZC,OAON,CAAC,CACH,CAAC;EACJ,CAAC;EAED,IAAAc,0BAAmB,EACjBzB,QAAQ,EACR,OAAO;IACL0B,IAAI,EAAEjB;EACR,CAAC,CAAC,EACF,CAACF,cAAc,CACjB,CAAC;EAED,oBACE,IAAAhC,WAAA,CAAA0C,GAAA,EAAC/C,YAAA,CAAAyD,IAAI;IACH5B,KAAK,EAAE,CAAC6B,MAAM,CAACC,SAAS,EAAE9B,KAAK,CAAE;IACjC+B,QAAQ,EAAGC,KAAK,IAAK;MACnBvB,iBAAiB,CAACuB,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,KAAK,CAAC;IACnD,CAAE;IACFC,aAAa,EAAC,UAAU;IAAAC,QAAA,EAEvBhC;EAAgB,CACb,CAAC;AAEX,CAAC,CAAC;AAEF,MAAMwB,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBN,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|