@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/translation/validation.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -4,13 +4,14 @@ import React from 'react';
|
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { useStoreMap, useUnit } from 'effector-react';
|
|
6
6
|
import { HelpRequestOption } from "./HelpRequestOption.js";
|
|
7
|
+
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export const Alternatives = ({
|
|
9
|
-
model,
|
|
10
10
|
onPressAlternative,
|
|
11
11
|
hasMessages,
|
|
12
12
|
isHintFeedback
|
|
13
13
|
}) => {
|
|
14
|
+
const model = useChatModel();
|
|
14
15
|
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
15
16
|
const alternatives = useUnit(model.$alternatives);
|
|
16
17
|
const isTranslationPending = useUnit(model.translation.translateAllMessagesFx.pending);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useStoreMap","useUnit","HelpRequestOption","jsx","_jsx","Alternatives","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","useStoreMap","useUnit","HelpRequestOption","useChatModel","jsx","_jsx","Alternatives","onPressAlternative","hasMessages","isHintFeedback","model","isTranslated","translation","$isTranslated","alternatives","$alternatives","isTranslationPending","translateAllMessagesFx","pending","lastMessageOptions","$currentChatData","messages","lastMessage","at","options","hints","default","style","styles","container","children","map","text","translatedText","index","onPress","message","disabled","create","flex","width","marginVertical","gap"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Alternatives/Alternatives.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,YAAY,QAAQ,sCAAmC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQhE,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAC3BC,kBAAkB;EAClBC,WAAW;EACXC;AACiB,CAAC,KAAK;EACvB,MAAMC,KAAK,GAAGP,YAAY,CAAC,CAAC;EAC5B,MAAMQ,YAAY,GAAGV,OAAO,CAACS,KAAK,CAACE,WAAW,CAACC,aAAa,CAAC;EAC7D,MAAMC,YAAY,GAAGb,OAAO,CAACS,KAAK,CAACK,aAAa,CAAC;EACjD,MAAMC,oBAAoB,GAAGf,OAAO,CAACS,KAAK,CAACE,WAAW,CAACK,sBAAsB,CAACC,OAAO,CAAC;EACtF,MAAMC,kBAAkB,GAAGnB,WAAW,CAACU,KAAK,CAACU,gBAAgB,EAAE,CAAC;IAAEC;EAAS,CAAC,KAAK;IAC/E,MAAMC,WAAW,GAAGD,QAAQ,CAACE,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,OAAOD,WAAW,EAAEE,OAAO,IAAI,EAAE;EACnC,CAAC,CAAC;EAEF,MAAMA,OAAO,GAAG,CAAC,MAAM;IACrB,IAAIhB,WAAW,EAAE,OAAOW,kBAAkB;IAC1C,IAAIV,cAAc,EAAE,OAAOK,YAAY,EAAEU,OAAO,CAACC,KAAK,IAAI,EAAE;IAC5D,OAAOX,YAAY,EAAEU,OAAO,CAACE,OAAO,IAAI,EAAE;EAC5C,CAAC,EAAE,CAAC;EAEJ,oBACErB,IAAA,CAACN,IAAI;IAAC4B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BN,OAAO,CAACO,GAAG,CAAC,CAAC;MAAEC,IAAI;MAAEC;IAAe,CAAC,EAAEC,KAAK,kBAC3C7B,IAAA,CAACH,iBAAiB;MAEhBiC,OAAO,EAAEA,CAAA,KAAM5B,kBAAkB,CAACyB,IAAI,EAAEC,cAAc,CAAE;MACxDG,OAAO,EAAEzB,YAAY,GAAIsB,cAAc,GAAcD,IAAK;MAC1DK,QAAQ,EAAErB;IAAqB,GAH1BkB,KAIN,CACF;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMN,MAAM,GAAG9B,UAAU,CAACwC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,cAAc,EAAE,CAAC;IACjBC,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,
|
|
1
|
+
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAexD,MAAMC,WAAgE,GAAG;EACvE,CAACH,cAAc,CAACI,IAAI,GAAGL,WAAW;EAClC,CAACC,cAAc,CAACK,QAAQ,GAAGP;AAC7B,CAAC;AAED,OAAO,MAAMQ,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGN,WAAW,CAACI,OAAO,CAAC;EACtC,oBAAOL,IAAA,CAACO,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { ErrorSpottingButton } from "../../errorSpotting/ErrorSpottingButton.js";
|
|
6
|
+
import { MessageTextToSpeech } from "./MessageTextToSpeech.js";
|
|
7
|
+
import { IS_WEB } from '@magmamath/react-native-ui';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const MessageButtonsBlock = ({
|
|
10
|
+
withTextToSpeech,
|
|
11
|
+
t2sState,
|
|
12
|
+
message
|
|
13
|
+
}) => {
|
|
14
|
+
if (!withTextToSpeech && !message.isInitial) return null;
|
|
15
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
16
|
+
style: styles.container,
|
|
17
|
+
children: [!!message.isInitial && /*#__PURE__*/_jsx(ErrorSpottingButton, {
|
|
18
|
+
contextThreadId: message.threadId
|
|
19
|
+
}), withTextToSpeech && /*#__PURE__*/_jsx(MessageTextToSpeech, {
|
|
20
|
+
state: t2sState,
|
|
21
|
+
message: message
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const styles = StyleSheet.create({
|
|
26
|
+
container: {
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
gap: 8,
|
|
29
|
+
marginLeft: 'auto',
|
|
30
|
+
...(IS_WEB ? {
|
|
31
|
+
float: 'right'
|
|
32
|
+
} : {})
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=MessageButtonsBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ErrorSpottingButton","MessageTextToSpeech","IS_WEB","jsx","_jsx","jsxs","_jsxs","MessageButtonsBlock","withTextToSpeech","t2sState","message","isInitial","style","styles","container","children","contextThreadId","threadId","state","create","flexDirection","gap","marginLeft","float"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,mBAAmB,QAAQ,4CAAyC;AAC7E,SAASC,mBAAmB,QAAkB,0BAAuB;AAErE,SAASC,MAAM,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQnD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,gBAAgB;EAChBC,QAAQ;EACRC;AACwB,CAAC,KAAK;EAC9B,IAAI,CAACF,gBAAgB,IAAI,CAACE,OAAO,CAACC,SAAS,EAAE,OAAO,IAAI;EAExD,oBACEL,KAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3B,CAAC,CAACL,OAAO,CAACC,SAAS,iBAAIP,IAAA,CAACJ,mBAAmB;MAACgB,eAAe,EAAEN,OAAO,CAACO;IAAS,CAAE,CAAC,EACjFT,gBAAgB,iBAAIJ,IAAA,CAACH,mBAAmB;MAACiB,KAAK,EAAET,QAAS;MAACC,OAAO,EAAEA;IAAQ,CAAE,CAAC;EAAA,CAC3E,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGf,UAAU,CAACqB,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,CAAC;IACNC,UAAU,EAAE,MAAM;IAClB,IAAIpB,MAAM,GAAG;MAAEqB,KAAK,EAAE;IAAQ,CAAC,GAAG,CAAC,CAAC;EACtC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { ActivityIndicator, Pressable, StyleSheet
|
|
4
|
+
import { ActivityIndicator, Pressable, StyleSheet } from 'react-native';
|
|
5
5
|
import { SpeakerIcon } from "../../../../shared/icons/SpeakerIcon.js";
|
|
6
6
|
import { PlayIcon } from "../../../../shared/icons/PlayIcon.js";
|
|
7
7
|
import { PauseIcon } from "../../../../shared/icons/PauseIcon.js";
|
|
8
|
+
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const TextToSpeechIcon = ({
|
|
10
11
|
status,
|
|
@@ -30,17 +31,24 @@ const TextToSpeechIcon = ({
|
|
|
30
31
|
});
|
|
31
32
|
};
|
|
32
33
|
export const MessageTextToSpeech = ({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
state: {
|
|
35
|
+
status,
|
|
36
|
+
disabled,
|
|
37
|
+
isActive,
|
|
38
|
+
isLoading
|
|
39
|
+
},
|
|
40
|
+
message
|
|
41
|
+
}) => {
|
|
42
|
+
const model = useChatModel();
|
|
43
|
+
function play() {
|
|
44
|
+
void model.t2s.play({
|
|
45
|
+
isTranslated: model.translation.$isTranslated.getState(),
|
|
46
|
+
message
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
42
50
|
disabled: disabled,
|
|
43
|
-
onPress:
|
|
51
|
+
onPress: play,
|
|
44
52
|
style: [styles.button, {
|
|
45
53
|
backgroundColor: isActive && !isLoading ? '#55ABE0' : '#FFF'
|
|
46
54
|
}],
|
|
@@ -49,19 +57,14 @@ export const MessageTextToSpeech = ({
|
|
|
49
57
|
isLoading: isLoading,
|
|
50
58
|
status: status
|
|
51
59
|
})
|
|
52
|
-
})
|
|
53
|
-
}
|
|
60
|
+
});
|
|
61
|
+
};
|
|
54
62
|
const styles = StyleSheet.create({
|
|
55
|
-
container: {
|
|
56
|
-
alignSelf: 'stretch',
|
|
57
|
-
justifyContent: 'flex-end',
|
|
58
|
-
width: 45
|
|
59
|
-
},
|
|
60
63
|
button: {
|
|
61
64
|
alignItems: 'center',
|
|
62
65
|
justifyContent: 'center',
|
|
63
|
-
width:
|
|
64
|
-
height:
|
|
66
|
+
width: 25,
|
|
67
|
+
height: 25,
|
|
65
68
|
padding: 1,
|
|
66
69
|
marginLeft: 'auto',
|
|
67
70
|
shadowColor: '#333',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActivityIndicator","Pressable","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Pressable","StyleSheet","SpeakerIcon","PlayIcon","PauseIcon","useChatModel","jsx","_jsx","TextToSpeechIcon","status","isActive","isLoading","color","undefined","MessageTextToSpeech","state","disabled","message","model","play","t2s","isTranslated","translation","$isTranslated","getState","onPress","style","styles","button","backgroundColor","children","create","alignItems","justifyContent","width","height","padding","marginLeft","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderColor","borderWidth"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACvE,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,QAAQ,QAAQ,sCAAmC;AAC5D,SAASC,SAAS,QAAQ,uCAAoC;AAE9D,SAASC,YAAY,QAAQ,sCAAmC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAShE,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAiC,CAAC,KAAK;EACnF,IAAIA,SAAS,IAAID,QAAQ,EAAE;IACzB,oBAAOH,IAAA,CAACR,iBAAiB,IAAE,CAAC;EAC9B;EAEA,IAAI,CAACW,QAAQ,EAAE;IACb,oBAAOH,IAAA,CAACL,WAAW;MAACU,KAAK,EAAEF,QAAQ,GAAG,SAAS,GAAGG;IAAU,CAAE,CAAC;EACjE;EAEA,IAAIJ,MAAM,KAAK,SAAS,EAAE,oBAAOF,IAAA,CAACH,SAAS;IAACQ,KAAK,EAAC;EAAM,CAAE,CAAC;EAC3D,IAAIH,MAAM,KAAK,QAAQ,EAAE,oBAAOF,IAAA,CAACJ,QAAQ;IAACS,KAAK,EAAC;EAAM,CAAE,CAAC;EACzD,oBAAOL,IAAA,CAACL,WAAW;IAACU,KAAK,EAAEF,QAAQ,GAAG,SAAS,GAAGG;EAAU,CAAE,CAAC;AACjE,CAAC;AAcD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,KAAK,EAAE;IAAEN,MAAM;IAAEO,QAAQ;IAAEN,QAAQ;IAAEC;EAAU,CAAC;EAChDM;AACwB,CAAC,KAAK;EAC9B,MAAMC,KAAK,GAAGb,YAAY,CAAC,CAAC;EAE5B,SAASc,IAAIA,CAAA,EAAG;IACd,KAAKD,KAAK,CAACE,GAAG,CAACD,IAAI,CAAC;MAClBE,YAAY,EAAEH,KAAK,CAACI,WAAW,CAACC,aAAa,CAACC,QAAQ,CAAC,CAAC;MACxDP;IACF,CAAC,CAAC;EACJ;EAEA,oBACEV,IAAA,CAACP,SAAS;IACRgB,QAAQ,EAAEA,QAAS;IACnBS,OAAO,EAAEN,IAAK;IACdO,KAAK,EAAE,CAACC,MAAM,CAACC,MAAM,EAAE;MAAEC,eAAe,EAAEnB,QAAQ,IAAI,CAACC,SAAS,GAAG,SAAS,GAAG;IAAO,CAAC,CAAE;IAAAmB,QAAA,eAEzFvB,IAAA,CAACC,gBAAgB;MAACE,QAAQ,EAAEA,QAAS;MAACC,SAAS,EAAEA,SAAU;MAACF,MAAM,EAAEA;IAAO,CAAE;EAAC,CACrE,CAAC;AAEhB,CAAC;AAED,MAAMkB,MAAM,GAAG1B,UAAU,CAAC8B,MAAM,CAAC;EAC/BH,MAAM,EAAE;IACNI,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,CAAC;IACVC,UAAU,EAAE,MAAM;IAClBC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEL,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCK,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,SAAS;IACtBC,WAAW,EAAE,GAAG;IAChBhB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,45 +3,45 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
|
-
import {
|
|
7
|
-
import { MessageVariant } from "../../types/model.types.js";
|
|
6
|
+
import { MessageButtonsBlock } from "./MessageButtonsBlock.js";
|
|
8
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
export const ReceivedMessage = ({
|
|
10
9
|
message,
|
|
11
|
-
onPressTextToSpeech,
|
|
12
10
|
isTextToSpeechPending,
|
|
13
11
|
isActive,
|
|
14
12
|
audioStatus,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
style: styles.
|
|
21
|
-
children: /*#__PURE__*/_jsx(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
style:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
withTextToSpeech = true,
|
|
14
|
+
isTranslated
|
|
15
|
+
}) => {
|
|
16
|
+
const text = isTranslated ? message.translatedMessage : message.message;
|
|
17
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
18
|
+
style: styles.container,
|
|
19
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
20
|
+
style: styles.icon,
|
|
21
|
+
children: /*#__PURE__*/_jsx(ChatbotIcon, {
|
|
22
|
+
width: 60,
|
|
23
|
+
height: 80
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: styles.message,
|
|
27
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
28
|
+
style: [styles.messageText, {
|
|
29
|
+
width: withTextToSpeech ? 240 : 305
|
|
30
|
+
}],
|
|
31
|
+
children: [text, /*#__PURE__*/_jsx(MessageButtonsBlock, {
|
|
32
|
+
message: message,
|
|
33
|
+
withTextToSpeech: withTextToSpeech,
|
|
34
|
+
t2sState: {
|
|
35
|
+
isActive,
|
|
36
|
+
isLoading: isTextToSpeechPending,
|
|
37
|
+
status: audioStatus,
|
|
38
|
+
disabled: isTextToSpeechPending
|
|
39
|
+
}
|
|
40
|
+
})]
|
|
41
|
+
})
|
|
42
42
|
})]
|
|
43
|
-
})
|
|
44
|
-
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
45
|
const styles = StyleSheet.create({
|
|
46
46
|
container: {
|
|
47
47
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","ChatbotIcon","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","ChatbotIcon","MessageButtonsBlock","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","isTextToSpeechPending","isActive","audioStatus","withTextToSpeech","isTranslated","text","translatedMessage","style","styles","container","children","icon","width","height","messageText","t2sState","isLoading","status","disabled","create","flex","flexDirection","maxWidth","alignItems","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,mBAAmB,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3D,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,qBAAqB;EACrBC,QAAQ;EACRC,WAAW;EACXC,gBAAgB,GAAG,IAAI;EACvBC;AACY,CAAC,KAAK;EAClB,MAAMC,IAAI,GAAGD,YAAY,GAAGL,OAAO,CAACO,iBAAiB,GAAGP,OAAO,CAACA,OAAO;EAEvE,oBACEF,KAAA,CAACN,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5Bf,IAAA,CAACJ,IAAI;MAACgB,KAAK,EAAEC,MAAM,CAACG,IAAK;MAAAD,QAAA,eACvBf,IAAA,CAACH,WAAW;QAACoB,KAAK,EAAE,EAAG;QAACC,MAAM,EAAE;MAAG,CAAE;IAAC,CAClC,CAAC,eAEPlB,IAAA,CAACJ,IAAI;MAACgB,KAAK,EAAEC,MAAM,CAACT,OAAQ;MAAAW,QAAA,eAC1Bb,KAAA,CAACP,IAAI;QAACiB,KAAK,EAAE,CAACC,MAAM,CAACM,WAAW,EAAE;UAAEF,KAAK,EAAET,gBAAgB,GAAG,GAAG,GAAG;QAAI,CAAC,CAAE;QAAAO,QAAA,GACxEL,IAAI,eACLV,IAAA,CAACF,mBAAmB;UAClBM,OAAO,EAAEA,OAAQ;UACjBI,gBAAgB,EAAEA,gBAAiB;UACnCY,QAAQ,EAAE;YACRd,QAAQ;YACRe,SAAS,EAAEhB,qBAAqB;YAChCiB,MAAM,EAAEf,WAAW;YACnBgB,QAAQ,EAAElB;UACZ;QAAE,CACH,CAAC;MAAA,CACE;IAAC,CACH,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAED,MAAMQ,MAAM,GAAGnB,UAAU,CAAC8B,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,GAAG;IACbV,KAAK,EAAE,GAAG;IACVW,UAAU,EAAE;EACd,CAAC;EACDZ,IAAI,EAAE;IACJa,SAAS,EAAE,UAAU;IACrBC,WAAW,EAAE;EACf,CAAC;EACD1B,OAAO,EAAE;IACPqB,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,GAAG;IACbI,OAAO,EAAE,CAAC;IACVC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEhB,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCgB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBC,eAAe,EAAE;EACnB,CAAC;EACDpB,WAAW,EAAE;IACXM,IAAI,EAAE,CAAC;IACPe,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
-
import { MessageVariant } from "../../types/model.types.js";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
export const SentMessage = ({
|
|
8
7
|
message,
|
|
9
|
-
|
|
10
|
-
}) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
style: styles.
|
|
14
|
-
children:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
8
|
+
isTranslated
|
|
9
|
+
}) => {
|
|
10
|
+
const text = isTranslated ? message.translatedMessage : message.message;
|
|
11
|
+
return /*#__PURE__*/_jsx(View, {
|
|
12
|
+
style: styles.container,
|
|
13
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
14
|
+
style: styles.text,
|
|
15
|
+
children: text
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
};
|
|
21
19
|
const styles = StyleSheet.create({
|
|
22
20
|
container: {
|
|
23
21
|
alignSelf: 'flex-end',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","jsx","_jsx","SentMessage","message","isTranslated","text","translatedMessage","style","styles","container","children","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAIrD,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAA2B,CAAC,KAAK;EACtE,MAAMC,IAAI,GAAGD,YAAY,GAAGD,OAAO,CAACG,iBAAiB,GAAGH,OAAO,CAACA,OAAO;EAEvE,oBACEF,IAAA,CAACF,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5BT,IAAA,CAACH,IAAI;MAACS,KAAK,EAAEC,MAAM,CAACH,IAAK;MAAAK,QAAA,EAAEL;IAAI,CAAO;EAAC,CACnC,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGX,UAAU,CAACc,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,uBAAuB,EAAE,CAAC;IAC1BC,eAAe,EAAE;EACnB,CAAC;EACDZ,IAAI,EAAE;IACJa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,7 +6,6 @@ import { useStoreMap, useUnit } from 'effector-react';
|
|
|
6
6
|
import { ChatMessage } from "../ChatMessage/ChatMessage.js";
|
|
7
7
|
import { MessageLoader } from "../ChatMessage/MessageLoader.js";
|
|
8
8
|
import { Alternatives } from "../Alternatives/Alternatives.js";
|
|
9
|
-
import { TEXT_TO_SPEECH_CONFIG } from "../../constants.js";
|
|
10
9
|
import { MessageVariant } from "../../types/model.types.js";
|
|
11
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const TOOLBAR_HEIGHT = 140;
|
|
@@ -17,10 +16,7 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
17
16
|
export const ChatbotMessages = ({
|
|
18
17
|
model,
|
|
19
18
|
isHintFeedback,
|
|
20
|
-
|
|
21
|
-
isTextToSpeechEnabled,
|
|
22
|
-
textToSpeechConfig,
|
|
23
|
-
renderer
|
|
19
|
+
isTextToSpeechEnabled
|
|
24
20
|
}) => {
|
|
25
21
|
const dimensions = useWindowDimensions();
|
|
26
22
|
const ref = useRef(null);
|
|
@@ -34,15 +30,6 @@ export const ChatbotMessages = ({
|
|
|
34
30
|
const messages = useStoreMap(model.$currentChatData, ({
|
|
35
31
|
messages
|
|
36
32
|
}) => messages);
|
|
37
|
-
const playTextToSpeech = (id, message, translatedMessage) => {
|
|
38
|
-
const text = isTranslated ? translatedMessage : message;
|
|
39
|
-
void model.t2s.play({
|
|
40
|
-
text: sanitizeSpeechInput(text),
|
|
41
|
-
messageId: id,
|
|
42
|
-
isTranslated,
|
|
43
|
-
config: textToSpeechConfig ?? TEXT_TO_SPEECH_CONFIG
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
33
|
const askChatForHelp = (message, translatedMessage) => {
|
|
47
34
|
void model.sendHelpRequestFx({
|
|
48
35
|
message,
|
|
@@ -64,23 +51,16 @@ export const ChatbotMessages = ({
|
|
|
64
51
|
},
|
|
65
52
|
children: [isOpen && /*#__PURE__*/_jsxs(View, {
|
|
66
53
|
style: styles.gap,
|
|
67
|
-
children: [messages.map(({
|
|
68
|
-
|
|
69
|
-
message,
|
|
70
|
-
translatedMessage,
|
|
71
|
-
isOwnMessage
|
|
72
|
-
}) => /*#__PURE__*/_jsx(ChatMessage, {
|
|
73
|
-
message: isTranslated ? translatedMessage : message,
|
|
74
|
-
renderer: renderer,
|
|
54
|
+
children: [messages.map(message => /*#__PURE__*/_jsx(ChatMessage, {
|
|
55
|
+
isTranslated: isTranslated,
|
|
56
|
+
message: message,
|
|
75
57
|
audioStatus: audioStatus,
|
|
76
|
-
|
|
77
|
-
isActive: id === currentPlayingId,
|
|
58
|
+
isActive: message.id === currentPlayingId,
|
|
78
59
|
isTextToSpeechPending: isTextToSpeechPending,
|
|
79
|
-
variant: isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
80
|
-
withTextToSpeech: isTextToSpeechEnabled && !isOwnMessage
|
|
81
|
-
}, id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {})]
|
|
60
|
+
variant: message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
61
|
+
withTextToSpeech: isTextToSpeechEnabled && !message.isOwnMessage
|
|
62
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {})]
|
|
82
63
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/_jsx(Alternatives, {
|
|
83
|
-
model: model,
|
|
84
64
|
onPressAlternative: askChatForHelp,
|
|
85
65
|
hasMessages: messages.length > 1,
|
|
86
66
|
isHintFeedback: isHintFeedback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","
|
|
1
|
+
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","$currentChatData","askChatForHelp","message","translatedMessage","style","styles","container","maxHeight","children","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","isActive","id","variant","isOwnMessage","SENT","RECEIVED","withTextToSpeech","onPressAlternative","hasMessages","length","create","flex","alignItems","width","paddingVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AACrC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AAC1F,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,aAAa,QAAQ,iCAA8B;AAC5D,SAASC,YAAY,QAAQ,iCAA8B;AAE3D,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQxD,MAAMC,cAAc,GAAG,GAAG;AAC1B,MAAMC,aAAa,GAAGhB,QAAQ,CAACiB,MAAM,CAAC;EACpCC,GAAG,EAAE,GAAG;EACRC,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,KAAK;EACLC,cAAc;EACdC;AACoB,CAAC,KAAK;EAC1B,MAAMC,UAAU,GAAGrB,mBAAmB,CAAC,CAAC;EACxC,MAAMsB,GAAG,GAAG1B,MAAM,CAAa,IAAI,CAAC;EACpC,MAAM2B,MAAM,GAAGpB,OAAO,CAACe,KAAK,CAACM,OAAO,CAAC;EAErC,MAAMC,oBAAoB,GAAGtB,OAAO,CAACe,KAAK,CAACQ,iBAAiB,CAACC,OAAO,CAAC;EACrE,MAAMC,qBAAqB,GAAGzB,OAAO,CAACe,KAAK,CAACW,GAAG,CAACC,kBAAkB,CAACH,OAAO,CAAC;EAE3E,MAAMI,gBAAgB,GAAG5B,OAAO,CAACe,KAAK,CAACc,GAAG,CAACC,iBAAiB,CAAC;EAC7D,MAAMC,YAAY,GAAG/B,OAAO,CAACe,KAAK,CAACiB,WAAW,CAACC,aAAa,CAAC;EAC7D,MAAMC,WAAW,GAAGlC,OAAO,CAACe,KAAK,CAACc,GAAG,CAACM,OAAO,CAAC;EAE9C,MAAMC,UAAU,GAAGlB,UAAU,CAACmB,MAAM,GAAG5B,cAAc,GAAGC,aAAa;EAErE,MAAM4B,QAAQ,GAAGvC,WAAW,CAACgB,KAAK,CAACwB,gBAAgB,EAAE,CAAC;IAAED;EAAS,CAAC,KAAKA,QAAQ,CAAC;EAEhF,MAAME,cAAc,GAAGA,CAACC,OAAe,EAAEC,iBAA0B,KAAK;IACtE,KAAK3B,KAAK,CAACQ,iBAAiB,CAAC;MAAEkB,OAAO;MAAEC;IAAkB,CAAC,CAAC;EAC9D,CAAC;EAED,oBACEpC,IAAA,CAACR,IAAI;IAAC6C,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEC,SAAS,EAAEV;IAAW,CAAC,CAAE;IAAAW,QAAA,eACzDvC,KAAA,CAACb,UAAU;MACTwB,GAAG,EAAEA,GAAI;MACT6B,qBAAqB,EAAEJ,MAAM,CAACK,IAAK;MACnCC,mBAAmB,EAAEA,CAACC,CAAC,EAAEd,MAAM,KAAK;QAClClB,GAAG,CAACiC,OAAO,EAAEC,WAAW,CAAC,CAAC;QAE1B,IAAIhB,MAAM,IAAID,UAAU,EAAE;UACxBrB,KAAK,CAACuC,eAAe,CAAC,IAAI,CAAC;QAC7B;MACF,CAAE;MAAAP,QAAA,GAED3B,MAAM,iBACLZ,KAAA,CAACV,IAAI;QAAC6C,KAAK,EAAEC,MAAM,CAACW,GAAI;QAAAR,QAAA,GACrBT,QAAQ,CAACkB,GAAG,CAAEf,OAAO,iBACpBnC,IAAA,CAACL,WAAW;UAEV8B,YAAY,EAAEA,YAAa;UAC3BU,OAAO,EAAEA,OAAQ;UACjBP,WAAW,EAAEA,WAAY;UACzBuB,QAAQ,EAAEhB,OAAO,CAACiB,EAAE,KAAK9B,gBAAiB;UAC1CH,qBAAqB,EAAEA,qBAAsB;UAC7CkC,OAAO,EAAElB,OAAO,CAACmB,YAAY,GAAGxD,cAAc,CAACyD,IAAI,GAAGzD,cAAc,CAAC0D,QAAS;UAC9EC,gBAAgB,EAAE9C,qBAAqB,IAAI,CAACwB,OAAO,CAACmB;QAAa,GAP5DnB,OAAO,CAACiB,EAQd,CACF,CAAC,EAEDpC,oBAAoB,iBAAIhB,IAAA,CAACJ,aAAa,IAAE,CAAC;MAAA,CACtC,CACP,EAEA,CAACoB,oBAAoB,IAAIF,MAAM,iBAC9Bd,IAAA,CAACH,YAAY;QACX6D,kBAAkB,EAAExB,cAAe;QACnCyB,WAAW,EAAE3B,QAAQ,CAAC4B,MAAM,GAAG,CAAE;QACjClD,cAAc,EAAEA;MAAe,CAChC,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAED,MAAM4B,MAAM,GAAGhD,UAAU,CAACuE,MAAM,CAAC;EAC/BtB,SAAS,EAAE;IACTuB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACVjC,MAAM,EAAE;EACV,CAAC;EACDY,IAAI,EAAE;IACJoB,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE;EACnB,CAAC;EACDhB,GAAG,EAAE;IACHa,IAAI,EAAE,CAAC;IACPb,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,15 +4,14 @@ import { useStoreMap, useUnit } from 'effector-react';
|
|
|
4
4
|
import { ChatbotMessages } from "./ChatMessages/ChatbotMessages.js";
|
|
5
5
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { ChatBotModelContext } from "../context/ChatBotModelContext.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export const Chatbot = ({
|
|
9
10
|
model,
|
|
10
11
|
isHintFeedback,
|
|
11
|
-
sanitizeSpeechInput,
|
|
12
12
|
isTextToSpeechEnabled = false,
|
|
13
13
|
textToSpeechConfig,
|
|
14
14
|
isTranslationEnabled,
|
|
15
|
-
renderer,
|
|
16
15
|
ButtonWrapper,
|
|
17
16
|
iconSize
|
|
18
17
|
}) => {
|
|
@@ -20,6 +19,7 @@ export const Chatbot = ({
|
|
|
20
19
|
const isAvailable = useStoreMap(model.$currentChatData, ({
|
|
21
20
|
isAvailable
|
|
22
21
|
}) => isAvailable);
|
|
22
|
+
model.t2s.setAudioConfig(textToSpeechConfig ?? null);
|
|
23
23
|
const translateMessages = () => {
|
|
24
24
|
void model.translation.translateAllMessagesFx();
|
|
25
25
|
};
|
|
@@ -28,14 +28,12 @@ export const Chatbot = ({
|
|
|
28
28
|
if (!isAvailable || alternatives?.chatAccess === false) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
return /*#__PURE__*/_jsxs(
|
|
31
|
+
return /*#__PURE__*/_jsxs(ChatBotModelContext.Provider, {
|
|
32
|
+
value: model,
|
|
32
33
|
children: [/*#__PURE__*/_jsx(ChatbotMessages, {
|
|
33
34
|
model: model,
|
|
34
|
-
renderer: renderer,
|
|
35
35
|
isHintFeedback: isHintFeedback,
|
|
36
|
-
|
|
37
|
-
isTextToSpeechEnabled: isTextToSpeechEnabled,
|
|
38
|
-
textToSpeechConfig: textToSpeechConfig
|
|
36
|
+
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
39
37
|
}), /*#__PURE__*/_jsx(ChatControls, {
|
|
40
38
|
model: model,
|
|
41
39
|
onPressTranslate: translateMessages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","
|
|
1
|
+
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","ChatBotModelContext","jsx","_jsx","jsxs","_jsxs","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","isTranslationEnabled","ButtonWrapper","iconSize","alternatives","$alternatives","isAvailable","$currentChatData","t2s","setAudioConfig","translateMessages","translation","translateAllMessagesFx","openChat","setIsOpen","closeChat","chatAccess","Provider","value","children","onPressTranslate","onPressChatIcon","onPressClose"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,YAAY,QAAQ,gCAA6B;AAE1D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,QAAQ,mCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAepE,OAAO,MAAMC,OAAO,GAAGA,CAAC;EACtBC,KAAK;EACLC,cAAc;EACdC,qBAAqB,GAAG,KAAK;EAC7BC,kBAAkB;EAClBC,oBAAoB;EACpBC,aAAa;EACbC;AACY,CAAC,KAAK;EAClB,MAAMC,YAAY,GAAGjB,OAAO,CAACU,KAAK,CAACQ,aAAa,CAAC;EACjD,MAAMC,WAAW,GAAGpB,WAAW,CAACW,KAAK,CAACU,gBAAgB,EAAE,CAAC;IAAED;EAAY,CAAC,KAAKA,WAAW,CAAC;EAEzFT,KAAK,CAACW,GAAG,CAACC,cAAc,CAACT,kBAAkB,IAAI,IAAI,CAAC;EACpD,MAAMU,iBAAiB,GAAGA,CAAA,KAAM;IAC9B,KAAKb,KAAK,CAACc,WAAW,CAACC,sBAAsB,CAAC,CAAC;EACjD,CAAC;EAED,MAAMC,QAAQ,GAAGA,CAAA,KAAMhB,KAAK,CAACiB,SAAS,CAAC,IAAI,CAAC;EAC5C,MAAMC,SAAS,GAAGA,CAAA,KAAMlB,KAAK,CAACiB,SAAS,CAAC,KAAK,CAAC;EAE9C,IAAI,CAACR,WAAW,IAAIF,YAAY,EAAEY,UAAU,KAAK,KAAK,EAAE;IACtD,OAAO,IAAI;EACb;EAEA,oBACErB,KAAA,CAACJ,mBAAmB,CAAC0B,QAAQ;IAACC,KAAK,EAAErB,KAAM;IAAAsB,QAAA,gBACzC1B,IAAA,CAACL,eAAe;MACdS,KAAK,EAAEA,KAAM;MACbC,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA;IAAsB,CAC9C,CAAC,eAEFN,IAAA,CAACJ,YAAY;MACXQ,KAAK,EAAEA,KAAM;MACbuB,gBAAgB,EAAEV,iBAAkB;MACpCW,eAAe,EAAER,QAAS;MAC1BS,YAAY,EAAEP,SAAU;MACxBd,oBAAoB,EAAEA,oBAAqB;MAC3CC,aAAa,EAAEA,aAAc;MAC7BC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext } from 'react';
|
|
4
|
+
export const ChatBotModelContext = /*#__PURE__*/createContext(null);
|
|
5
|
+
export function useChatModel() {
|
|
6
|
+
const model = useContext(ChatBotModelContext);
|
|
7
|
+
if (!model) {
|
|
8
|
+
throw new Error('Something went wrong, you are probably trying to use component that is supposed to be inside ChatBotContext.Provider');
|
|
9
|
+
}
|
|
10
|
+
return model;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ChatBotModelContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","ChatBotModelContext","useChatModel","model","Error"],"sourceRoot":"../../../../../src","sources":["features/chatbot/context/ChatBotModelContext.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAGjD,OAAO,MAAMC,mBAAmB,gBAAGF,aAAa,CAAsB,IAAI,CAAC;AAE3E,OAAO,SAASG,YAAYA,CAAA,EAAG;EAC7B,MAAMC,KAAK,GAAGH,UAAU,CAACC,mBAAmB,CAAC;EAC7C,IAAI,CAACE,KAAK,EAAE;IACV,MAAM,IAAIC,KAAK,CACb,sHACF,CAAC;EACH;EACA,OAAOD,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Button, COLORS, StopIcon } from '@magmamath/react-native-ui';
|
|
5
|
+
import { useChatModel } from "../context/ChatBotModelContext.js";
|
|
6
|
+
import { useStoreMap, useUnit } from 'effector-react';
|
|
7
|
+
import { StyleSheet } from 'react-native';
|
|
8
|
+
import { HighlighterIcon } from "../../../shared/icons/HighlighterIcon.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export const ErrorSpottingButton = ({
|
|
11
|
+
contextThreadId
|
|
12
|
+
}) => {
|
|
13
|
+
const model = useChatModel();
|
|
14
|
+
const activeErrorSpotting = useUnit(model.errorSpotting.$activeData);
|
|
15
|
+
const validationKey = useUnit(model.errorSpotting.$validationKey);
|
|
16
|
+
const isLoading = useUnit(model.errorSpotting.$isLoading);
|
|
17
|
+
const currentThread = useStoreMap(model.$currentChatData, chatData => chatData.currentThread);
|
|
18
|
+
if (!currentThread?.strokes || contextThreadId && currentThread.id !== contextThreadId) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const isActive = !!activeErrorSpotting?.isActive;
|
|
22
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
23
|
+
style: buttonStyles,
|
|
24
|
+
disabled: validationKey !== currentThread.strokesValidationKey,
|
|
25
|
+
isActive: isActive,
|
|
26
|
+
isLoading: isLoading,
|
|
27
|
+
variant: 'secondary',
|
|
28
|
+
colorScheme: 'blue',
|
|
29
|
+
size: 'small',
|
|
30
|
+
onPress: () => {
|
|
31
|
+
if (isLoading) return;
|
|
32
|
+
model.errorSpotting.errorSpottingPressed();
|
|
33
|
+
},
|
|
34
|
+
icon: isActive ? /*#__PURE__*/_jsx(StopIcon, {
|
|
35
|
+
color: COLORS.NEUTRAL_1
|
|
36
|
+
}) : /*#__PURE__*/_jsx(HighlighterIcon, {}),
|
|
37
|
+
children: "show error"
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const buttonStyles = StyleSheet.create({
|
|
41
|
+
text: {
|
|
42
|
+
textTransform: 'uppercase'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=ErrorSpottingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Button","COLORS","StopIcon","useChatModel","useStoreMap","useUnit","StyleSheet","HighlighterIcon","jsx","_jsx","ErrorSpottingButton","contextThreadId","model","activeErrorSpotting","errorSpotting","$activeData","validationKey","$validationKey","isLoading","$isLoading","currentThread","$currentChatData","chatData","strokes","id","isActive","style","buttonStyles","disabled","strokesValidationKey","variant","colorScheme","size","onPress","errorSpottingPressed","icon","color","NEUTRAL_1","children","create","text","textTransform"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingButton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAUC,QAAQ,QAAQ,4BAA4B;AAC7E,SAASC,YAAY,QAAQ,mCAAgC;AAC7D,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AACrD,SAASC,UAAU,QAAc,cAAc;AAC/C,SAASC,eAAe,QAAQ,0CAAuC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAMvE,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC;AAA0C,CAAC,KAAK;EACpF,MAAMC,KAAK,GAAGT,YAAY,CAAC,CAAC;EAC5B,MAAMU,mBAAmB,GAAGR,OAAO,CAACO,KAAK,CAACE,aAAa,CAACC,WAAW,CAAC;EACpE,MAAMC,aAAa,GAAGX,OAAO,CAACO,KAAK,CAACE,aAAa,CAACG,cAAc,CAAC;EACjE,MAAMC,SAAS,GAAGb,OAAO,CAACO,KAAK,CAACE,aAAa,CAACK,UAAU,CAAC;EACzD,MAAMC,aAAa,GAAGhB,WAAW,CAACQ,KAAK,CAACS,gBAAgB,EAAGC,QAAQ,IAAKA,QAAQ,CAACF,aAAa,CAAC;EAE/F,IAAI,CAACA,aAAa,EAAEG,OAAO,IAAKZ,eAAe,IAAIS,aAAa,CAACI,EAAE,KAAKb,eAAgB,EAAE;IACxF,OAAO,IAAI;EACb;EAEA,MAAMc,QAAQ,GAAG,CAAC,CAACZ,mBAAmB,EAAEY,QAAQ;EAChD,oBACEhB,IAAA,CAACT,MAAM;IACL0B,KAAK,EAAEC,YAAa;IACpBC,QAAQ,EAAEZ,aAAa,KAAKI,aAAa,CAACS,oBAAqB;IAC/DJ,QAAQ,EAAEA,QAAS;IACnBP,SAAS,EAAEA,SAAU;IACrBY,OAAO,EAAE,WAAY;IACrBC,WAAW,EAAE,MAAO;IACpBC,IAAI,EAAE,OAAQ;IACdC,OAAO,EAAEA,CAAA,KAAM;MACb,IAAIf,SAAS,EAAE;MACfN,KAAK,CAACE,aAAa,CAACoB,oBAAoB,CAAC,CAAC;IAC5C,CAAE;IACFC,IAAI,EAAEV,QAAQ,gBAAGhB,IAAA,CAACP,QAAQ;MAACkC,KAAK,EAAEnC,MAAM,CAACoC;IAAU,CAAE,CAAC,gBAAG5B,IAAA,CAACF,eAAe,IAAE,CAAE;IAAA+B,QAAA,EAC9E;EAED,CAAQ,CAAC;AAEb,CAAC;AAED,MAAMX,YAAY,GAAGrB,UAAU,CAACiC,MAAM,CAAC;EACrCC,IAAI,EAAE;IACJC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|