@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
|
@@ -8,14 +8,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _effectorReact = require("effector-react");
|
|
10
10
|
var _HelpRequestOption = require("./HelpRequestOption.js");
|
|
11
|
+
var _ChatBotModelContext = require("../../context/ChatBotModelContext.js");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
const Alternatives = ({
|
|
14
|
-
model,
|
|
15
15
|
onPressAlternative,
|
|
16
16
|
hasMessages,
|
|
17
17
|
isHintFeedback
|
|
18
18
|
}) => {
|
|
19
|
+
const model = (0, _ChatBotModelContext.useChatModel)();
|
|
19
20
|
const isTranslated = (0, _effectorReact.useUnit)(model.translation.$isTranslated);
|
|
20
21
|
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
21
22
|
const isTranslationPending = (0, _effectorReact.useUnit)(model.translation.translateAllMessagesFx.pending);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_effectorReact","_HelpRequestOption","_jsxRuntime","e","__esModule","default","Alternatives","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_effectorReact","_HelpRequestOption","_ChatBotModelContext","_jsxRuntime","e","__esModule","default","Alternatives","onPressAlternative","hasMessages","isHintFeedback","model","useChatModel","isTranslated","useUnit","translation","$isTranslated","alternatives","$alternatives","isTranslationPending","translateAllMessagesFx","pending","lastMessageOptions","useStoreMap","$currentChatData","messages","lastMessage","at","options","hints","jsx","View","style","styles","container","children","map","text","translatedText","index","HelpRequestOption","onPress","message","disabled","exports","StyleSheet","create","flex","width","marginVertical","gap"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Alternatives/Alternatives.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAAgE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQzD,MAAMG,YAAY,GAAGA,CAAC;EAC3BC,kBAAkB;EAClBC,WAAW;EACXC;AACiB,CAAC,KAAK;EACvB,MAAMC,KAAK,GAAG,IAAAC,iCAAY,EAAC,CAAC;EAC5B,MAAMC,YAAY,GAAG,IAAAC,sBAAO,EAACH,KAAK,CAACI,WAAW,CAACC,aAAa,CAAC;EAC7D,MAAMC,YAAY,GAAG,IAAAH,sBAAO,EAACH,KAAK,CAACO,aAAa,CAAC;EACjD,MAAMC,oBAAoB,GAAG,IAAAL,sBAAO,EAACH,KAAK,CAACI,WAAW,CAACK,sBAAsB,CAACC,OAAO,CAAC;EACtF,MAAMC,kBAAk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":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAexD,MAAMG,WAAgE,GAAG;EACvE,CAACC,0BAAc,CAACC,IAAI,GAAGC,wBAAW;EAClC,CAACF,0BAAc,CAACG,QAAQ,GAAGC;AAC7B,CAAC;AAEM,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGT,WAAW,CAACO,OAAO,CAAC;EACtC,oBAAO,IAAAX,WAAA,CAAAc,GAAA,EAACD,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MessageButtonsBlock = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _ErrorSpottingButton = require("../../errorSpotting/ErrorSpottingButton.js");
|
|
10
|
+
var _MessageTextToSpeech = require("./MessageTextToSpeech.js");
|
|
11
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const MessageButtonsBlock = ({
|
|
15
|
+
withTextToSpeech,
|
|
16
|
+
t2sState,
|
|
17
|
+
message
|
|
18
|
+
}) => {
|
|
19
|
+
if (!withTextToSpeech && !message.isInitial) return null;
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
21
|
+
style: styles.container,
|
|
22
|
+
children: [!!message.isInitial && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorSpottingButton.ErrorSpottingButton, {
|
|
23
|
+
contextThreadId: message.threadId
|
|
24
|
+
}), withTextToSpeech && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageTextToSpeech.MessageTextToSpeech, {
|
|
25
|
+
state: t2sState,
|
|
26
|
+
message: message
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
exports.MessageButtonsBlock = MessageButtonsBlock;
|
|
31
|
+
const styles = _reactNative.StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
gap: 8,
|
|
35
|
+
marginLeft: 'auto',
|
|
36
|
+
...(_reactNativeUi.IS_WEB ? {
|
|
37
|
+
float: 'right'
|
|
38
|
+
} : {})
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=MessageButtonsBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ErrorSpottingButton","_MessageTextToSpeech","_reactNativeUi","_jsxRuntime","e","__esModule","default","MessageButtonsBlock","withTextToSpeech","t2sState","message","isInitial","jsxs","View","style","styles","container","children","jsx","ErrorSpottingButton","contextThreadId","threadId","MessageTextToSpeech","state","exports","StyleSheet","create","flexDirection","gap","marginLeft","IS_WEB","float"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AAAmD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQ5C,MAAMG,mBAAmB,GAAGA,CAAC;EAClCC,gBAAgB;EAChBC,QAAQ;EACRC;AACwB,CAAC,KAAK;EAC9B,IAAI,CAACF,gBAAgB,IAAI,CAACE,OAAO,CAACC,SAAS,EAAE,OAAO,IAAI;EAExD,oBACE,IAAAR,WAAA,CAAAS,IAAA,EAACb,YAAA,CAAAc,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3B,CAAC,CAACP,OAAO,CAACC,SAAS,iBAAI,IAAAR,WAAA,CAAAe,GAAA,EAAClB,oBAAA,CAAAmB,mBAAmB;MAACC,eAAe,EAAEV,OAAO,CAACW;IAAS,CAAE,CAAC,EACjFb,gBAAgB,iBAAI,IAAAL,WAAA,CAAAe,GAAA,EAACjB,oBAAA,CAAAqB,mBAAmB;MAACC,KAAK,EAAEd,QAAS;MAACC,OAAO,EAAEA;IAAQ,CAAE,CAAC;EAAA,CAC3E,CAAC;AAEX,CAAC;AAAAc,OAAA,CAAAjB,mBAAA,GAAAA,mBAAA;AAED,MAAMQ,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,CAAC;IACNC,UAAU,EAAE,MAAM;IAClB,IAAIC,qBAAM,GAAG;MAAEC,KAAK,EAAE;IAAQ,CAAC,GAAG,CAAC,CAAC;EACtC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _SpeakerIcon = require("../../../../shared/icons/SpeakerIcon.js");
|
|
10
10
|
var _PlayIcon = require("../../../../shared/icons/PlayIcon.js");
|
|
11
11
|
var _PauseIcon = require("../../../../shared/icons/PauseIcon.js");
|
|
12
|
+
var _ChatBotModelContext = require("../../context/ChatBotModelContext.js");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
const TextToSpeechIcon = ({
|
|
@@ -35,17 +36,24 @@ const TextToSpeechIcon = ({
|
|
|
35
36
|
});
|
|
36
37
|
};
|
|
37
38
|
const MessageTextToSpeech = ({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
state: {
|
|
40
|
+
status,
|
|
41
|
+
disabled,
|
|
42
|
+
isActive,
|
|
43
|
+
isLoading
|
|
44
|
+
},
|
|
45
|
+
message
|
|
46
|
+
}) => {
|
|
47
|
+
const model = (0, _ChatBotModelContext.useChatModel)();
|
|
48
|
+
function play() {
|
|
49
|
+
void model.t2s.play({
|
|
50
|
+
isTranslated: model.translation.$isTranslated.getState(),
|
|
51
|
+
message
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
47
55
|
disabled: disabled,
|
|
48
|
-
onPress:
|
|
56
|
+
onPress: play,
|
|
49
57
|
style: [styles.button, {
|
|
50
58
|
backgroundColor: isActive && !isLoading ? '#55ABE0' : '#FFF'
|
|
51
59
|
}],
|
|
@@ -54,20 +62,15 @@ const MessageTextToSpeech = ({
|
|
|
54
62
|
isLoading: isLoading,
|
|
55
63
|
status: status
|
|
56
64
|
})
|
|
57
|
-
})
|
|
58
|
-
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
59
67
|
exports.MessageTextToSpeech = MessageTextToSpeech;
|
|
60
68
|
const styles = _reactNative.StyleSheet.create({
|
|
61
|
-
container: {
|
|
62
|
-
alignSelf: 'stretch',
|
|
63
|
-
justifyContent: 'flex-end',
|
|
64
|
-
width: 45
|
|
65
|
-
},
|
|
66
69
|
button: {
|
|
67
70
|
alignItems: 'center',
|
|
68
71
|
justifyContent: 'center',
|
|
69
|
-
width:
|
|
70
|
-
height:
|
|
72
|
+
width: 25,
|
|
73
|
+
height: 25,
|
|
71
74
|
padding: 1,
|
|
72
75
|
marginLeft: 'auto',
|
|
73
76
|
shadowColor: '#333',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_SpeakerIcon","_PlayIcon","_PauseIcon","_jsxRuntime","e","__esModule","default","TextToSpeechIcon","status","isActive","isLoading","jsx","ActivityIndicator","SpeakerIcon","color","undefined","PauseIcon","PlayIcon","MessageTextToSpeech","disabled","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_SpeakerIcon","_PlayIcon","_PauseIcon","_ChatBotModelContext","_jsxRuntime","e","__esModule","default","TextToSpeechIcon","status","isActive","isLoading","jsx","ActivityIndicator","SpeakerIcon","color","undefined","PauseIcon","PlayIcon","MessageTextToSpeech","state","disabled","message","model","useChatModel","play","t2s","isTranslated","translation","$isTranslated","getState","Pressable","onPress","style","styles","button","backgroundColor","children","exports","StyleSheet","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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,oBAAA,GAAAL,OAAA;AAAgE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAShE,MAAMG,gBAAgB,GAAGA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAiC,CAAC,KAAK;EACnF,IAAIA,SAAS,IAAID,QAAQ,EAAE;IACzB,oBAAO,IAAAN,WAAA,CAAAQ,GAAA,EAACb,YAAA,CAAAc,iBAAiB,IAAE,CAAC;EAC9B;EAEA,IAAI,CAACH,QAAQ,EAAE;IACb,oBAAO,IAAAN,WAAA,CAAAQ,GAAA,EAACZ,YAAA,CAAAc,WAAW;MAACC,KAAK,EAAEL,QAAQ,GAAG,SAAS,GAAGM;IAAU,CAAE,CAAC;EACjE;EAEA,IAAIP,MAAM,KAAK,SAAS,EAAE,oBAAO,IAAAL,WAAA,CAAAQ,GAAA,EAACV,UAAA,CAAAe,SAAS;IAACF,KAAK,EAAC;EAAM,CAAE,CAAC;EAC3D,IAAIN,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Ac,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;IAChBlB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,46 +7,46 @@ exports.ReceivedMessage = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _ChatbotIcon = require("../../../../shared/icons/ChatbotIcon.js");
|
|
10
|
-
var
|
|
11
|
-
var _modelTypes = require("../../types/model.types.js");
|
|
10
|
+
var _MessageButtonsBlock = require("./MessageButtonsBlock.js");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
13
|
const ReceivedMessage = ({
|
|
15
14
|
message,
|
|
16
|
-
onPressTextToSpeech,
|
|
17
15
|
isTextToSpeechPending,
|
|
18
16
|
isActive,
|
|
19
17
|
audioStatus,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
style: styles.
|
|
26
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
style:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
18
|
+
withTextToSpeech = true,
|
|
19
|
+
isTranslated
|
|
20
|
+
}) => {
|
|
21
|
+
const text = isTranslated ? message.translatedMessage : message.message;
|
|
22
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
23
|
+
style: styles.container,
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
25
|
+
style: styles.icon,
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotIcon.ChatbotIcon, {
|
|
27
|
+
width: 60,
|
|
28
|
+
height: 80
|
|
29
|
+
})
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
31
|
+
style: styles.message,
|
|
32
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
33
|
+
style: [styles.messageText, {
|
|
34
|
+
width: withTextToSpeech ? 240 : 305
|
|
35
|
+
}],
|
|
36
|
+
children: [text, /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageButtonsBlock.MessageButtonsBlock, {
|
|
37
|
+
message: message,
|
|
38
|
+
withTextToSpeech: withTextToSpeech,
|
|
39
|
+
t2sState: {
|
|
40
|
+
isActive,
|
|
41
|
+
isLoading: isTextToSpeechPending,
|
|
42
|
+
status: audioStatus,
|
|
43
|
+
disabled: isTextToSpeechPending
|
|
44
|
+
}
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
47
|
})]
|
|
48
|
-
})
|
|
49
|
-
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
50
|
exports.ReceivedMessage = ReceivedMessage;
|
|
51
51
|
const styles = _reactNative.StyleSheet.create({
|
|
52
52
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ChatbotIcon","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ChatbotIcon","_MessageButtonsBlock","_jsxRuntime","e","__esModule","default","ReceivedMessage","message","isTextToSpeechPending","isActive","audioStatus","withTextToSpeech","isTranslated","text","translatedMessage","jsxs","View","style","styles","container","children","jsx","icon","ChatbotIcon","width","height","Text","messageText","MessageButtonsBlock","t2sState","isLoading","status","disabled","exports","StyleSheet","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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEpD,MAAMG,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,oBACE,IAAAL,WAAA,CAAAa,IAAA,EAAChB,YAAA,CAAAiB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAlB,WAAA,CAAAmB,GAAA,EAACtB,YAAA,CAAAiB,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACI,IAAK;MAAAF,QAAA,eACvB,IAAAlB,WAAA,CAAAmB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,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCoB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBC,eAAe,EAAE;EACnB,CAAC;EACDvB,WAAW,EAAE;IACXS,IAAI,EAAE,CAAC;IACPe,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,23 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.SentMessage = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _modelTypes = require("../../types/model.types.js");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
11
|
const SentMessage = ({
|
|
13
12
|
message,
|
|
14
|
-
|
|
15
|
-
}) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
style: styles.
|
|
19
|
-
children:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
13
|
+
isTranslated
|
|
14
|
+
}) => {
|
|
15
|
+
const text = isTranslated ? message.translatedMessage : message.message;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
17
|
+
style: styles.container,
|
|
18
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
19
|
+
style: styles.text,
|
|
20
|
+
children: text
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
};
|
|
26
24
|
exports.SentMessage = SentMessage;
|
|
27
25
|
const styles = _reactNative.StyleSheet.create({
|
|
28
26
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","SentMessage","message","isTranslated","text","translatedMessage","jsx","View","style","styles","container","children","Text","exports","StyleSheet","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAqD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAI9C,MAAMG,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAA2B,CAAC,KAAK;EACtE,MAAMC,IAAI,GAAGD,YAAY,GAAGD,OAAO,CAACG,iBAAiB,GAAGH,OAAO,CAACA,OAAO;EAEvE,oBACE,IAAAL,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAW,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAd,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAgB,IAAI;MAACJ,KAAK,EAAEC,MAAM,CAACL,IAAK;MAAAO,QAAA,EAAEP;IAAI,CAAO;EAAC,CACnC,CAAC;AAEX,CAAC;AAAAS,OAAA,CAAAZ,WAAA,GAAAA,WAAA;AAED,MAAMQ,MAAM,GAAGK,uBAAU,CAACC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,uBAAuB,EAAE,CAAC;IAC1BC,eAAe,EAAE;EACnB,CAAC;EACDjB,IAAI,EAAE;IACJkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -10,7 +10,6 @@ var _effectorReact = require("effector-react");
|
|
|
10
10
|
var _ChatMessage = require("../ChatMessage/ChatMessage.js");
|
|
11
11
|
var _MessageLoader = require("../ChatMessage/MessageLoader.js");
|
|
12
12
|
var _Alternatives = require("../Alternatives/Alternatives.js");
|
|
13
|
-
var _constants = require("../../constants.js");
|
|
14
13
|
var _modelTypes = require("../../types/model.types.js");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -23,10 +22,7 @@ const BOTTOM_OFFSET = _reactNative.Platform.select({
|
|
|
23
22
|
const ChatbotMessages = ({
|
|
24
23
|
model,
|
|
25
24
|
isHintFeedback,
|
|
26
|
-
|
|
27
|
-
isTextToSpeechEnabled,
|
|
28
|
-
textToSpeechConfig,
|
|
29
|
-
renderer
|
|
25
|
+
isTextToSpeechEnabled
|
|
30
26
|
}) => {
|
|
31
27
|
const dimensions = (0, _reactNative.useWindowDimensions)();
|
|
32
28
|
const ref = (0, _react.useRef)(null);
|
|
@@ -40,15 +36,6 @@ const ChatbotMessages = ({
|
|
|
40
36
|
const messages = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
41
37
|
messages
|
|
42
38
|
}) => messages);
|
|
43
|
-
const playTextToSpeech = (id, message, translatedMessage) => {
|
|
44
|
-
const text = isTranslated ? translatedMessage : message;
|
|
45
|
-
void model.t2s.play({
|
|
46
|
-
text: sanitizeSpeechInput(text),
|
|
47
|
-
messageId: id,
|
|
48
|
-
isTranslated,
|
|
49
|
-
config: textToSpeechConfig ?? _constants.TEXT_TO_SPEECH_CONFIG
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
39
|
const askChatForHelp = (message, translatedMessage) => {
|
|
53
40
|
void model.sendHelpRequestFx({
|
|
54
41
|
message,
|
|
@@ -70,23 +57,16 @@ const ChatbotMessages = ({
|
|
|
70
57
|
},
|
|
71
58
|
children: [isOpen && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
72
59
|
style: styles.gap,
|
|
73
|
-
children: [messages.map(({
|
|
74
|
-
|
|
75
|
-
message,
|
|
76
|
-
translatedMessage,
|
|
77
|
-
isOwnMessage
|
|
78
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
|
|
79
|
-
message: isTranslated ? translatedMessage : message,
|
|
80
|
-
renderer: renderer,
|
|
60
|
+
children: [messages.map(message => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
|
|
61
|
+
isTranslated: isTranslated,
|
|
62
|
+
message: message,
|
|
81
63
|
audioStatus: audioStatus,
|
|
82
|
-
|
|
83
|
-
isActive: id === currentPlayingId,
|
|
64
|
+
isActive: message.id === currentPlayingId,
|
|
84
65
|
isTextToSpeechPending: isTextToSpeechPending,
|
|
85
|
-
variant: isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
|
|
86
|
-
withTextToSpeech: isTextToSpeechEnabled && !isOwnMessage
|
|
87
|
-
}, id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {})]
|
|
66
|
+
variant: message.isOwnMessage ? _modelTypes.MessageVariant.SENT : _modelTypes.MessageVariant.RECEIVED,
|
|
67
|
+
withTextToSpeech: isTextToSpeechEnabled && !message.isOwnMessage
|
|
68
|
+
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {})]
|
|
88
69
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alternatives.Alternatives, {
|
|
89
|
-
model: model,
|
|
90
70
|
onPressAlternative: askChatForHelp,
|
|
91
71
|
hasMessages: messages.length > 1,
|
|
92
72
|
isHintFeedback: isHintFeedback
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","useStoreMap","$currentChatData","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","isActive","id","variant","isOwnMessage","MessageVariant","SENT","RECEIVED","withTextToSpeech","MessageLoader","Alternatives","onPressAlternative","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA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ACjD,oBAAoB,IAAIH,MAAM,iBAC9B,IAAAlC,WAAA,CAAA2D,GAAA,EAAC7D,aAAA,CAAAyF,YAAY;QACXC,kBAAkB,EAAEhC,cAAe;QACnCiC,WAAW,EAAEpC,QAAQ,CAACqC,MAAM,GAAG,CAAE;QACjC9D,cAAc,EAAEA;MAAe,CAChC,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAAA+D,OAAA,CAAAjE,eAAA,GAAAA,eAAA;AAED,MAAMoC,MAAM,GAAG8B,uBAAU,CAACC,MAAM,CAAC;EAC/B9B,SAAS,EAAE;IACT+B,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACV5C,MAAM,EAAE;EACV,CAAC;EACDiB,IAAI,EAAE;IACJ0B,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE;EACnB,CAAC;EACDtB,GAAG,EAAE;IACHmB,IAAI,EAAE,CAAC;IACPnB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,16 +8,15 @@ var _effectorReact = require("effector-react");
|
|
|
8
8
|
var _ChatbotMessages = require("./ChatMessages/ChatbotMessages.js");
|
|
9
9
|
var _ChatControls = require("./ChatControls/ChatControls.js");
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _ChatBotModelContext = require("../context/ChatBotModelContext.js");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
const Chatbot = ({
|
|
14
15
|
model,
|
|
15
16
|
isHintFeedback,
|
|
16
|
-
sanitizeSpeechInput,
|
|
17
17
|
isTextToSpeechEnabled = false,
|
|
18
18
|
textToSpeechConfig,
|
|
19
19
|
isTranslationEnabled,
|
|
20
|
-
renderer,
|
|
21
20
|
ButtonWrapper,
|
|
22
21
|
iconSize
|
|
23
22
|
}) => {
|
|
@@ -25,6 +24,7 @@ const Chatbot = ({
|
|
|
25
24
|
const isAvailable = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
26
25
|
isAvailable
|
|
27
26
|
}) => isAvailable);
|
|
27
|
+
model.t2s.setAudioConfig(textToSpeechConfig ?? null);
|
|
28
28
|
const translateMessages = () => {
|
|
29
29
|
void model.translation.translateAllMessagesFx();
|
|
30
30
|
};
|
|
@@ -33,14 +33,12 @@ const Chatbot = ({
|
|
|
33
33
|
if (!isAvailable || alternatives?.chatAccess === false) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChatBotModelContext.ChatBotModelContext.Provider, {
|
|
37
|
+
value: model,
|
|
37
38
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotMessages.ChatbotMessages, {
|
|
38
39
|
model: model,
|
|
39
|
-
renderer: renderer,
|
|
40
40
|
isHintFeedback: isHintFeedback,
|
|
41
|
-
|
|
42
|
-
isTextToSpeechEnabled: isTextToSpeechEnabled,
|
|
43
|
-
textToSpeechConfig: textToSpeechConfig
|
|
41
|
+
isTextToSpeechEnabled: isTextToSpeechEnabled
|
|
44
42
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatControls.ChatControls, {
|
|
45
43
|
model: model,
|
|
46
44
|
onPressTranslate: translateMessages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effectorReact","require","_ChatbotMessages","_ChatControls","_react","_interopRequireDefault","_jsxRuntime","e","__esModule","default","Chatbot","model","isHintFeedback","
|
|
1
|
+
{"version":3,"names":["_effectorReact","require","_ChatbotMessages","_ChatControls","_react","_interopRequireDefault","_ChatBotModelContext","_jsxRuntime","e","__esModule","default","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","textToSpeechConfig","isTranslationEnabled","ButtonWrapper","iconSize","alternatives","useUnit","$alternatives","isAvailable","useStoreMap","$currentChatData","t2s","setAudioConfig","translateMessages","translation","translateAllMessagesFx","openChat","setIsOpen","closeChat","chatAccess","jsxs","ChatBotModelContext","Provider","value","children","jsx","ChatbotMessages","ChatControls","onPressTranslate","onPressChatIcon","onPressClose","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAAoE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAI,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAe7D,MAAMG,OAAO,GAAGA,CAAC;EACtBC,KAAK;EACLC,cAAc;EACdC,qBAAqB,GAAG,KAAK;EAC7BC,kBAAkB;EAClBC,oBAAoB;EACpBC,aAAa;EACbC;AACY,CAAC,KAAK;EAClB,MAAMC,YAAY,GAAG,IAAAC,sBAAO,EAACR,KAAK,CAACS,aAAa,CAAC;EACjD,MAAMC,WAAW,GAAG,IAAAC,0BAAW,EAACX,KAAK,CAACY,gBAAgB,EAAE,CAAC;IAAEF;EAAY,CAAC,KAAKA,WAAW,CAAC;EAEzFV,KAAK,CAACa,GAAG,CAACC,cAAc,CAACX,kBAAkB,IAAI,IAAI,CAAC;EACpD,MAAMY,iBAAiB,GAAGA,CAAA,KAAM;IAC9B,KAAKf,KAAK,CAACgB,WAAW,CAACC,sBAAsB,CAAC,CAAC;EACjD,CAAC;EAED,MAAMC,QAAQ,GAAGA,CAAA,KAAMlB,KAAK,CAACmB,SAAS,CAAC,IAAI,CAAC;EAC5C,MAAMC,SAAS,GAAGA,CAAA,KAAMpB,KAAK,CAACmB,SAAS,CAAC,KAAK,CAAC;EAE9C,IAAI,CAACT,WAAW,IAAIH,YAAY,EAAEc,UAAU,KAAK,KAAK,EAAE;IACtD,OAAO,IAAI;EACb;EAEA,oBACE,IAAA1B,WAAA,CAAA2B,IAAA,EAAC5B,oBAAA,CAAA6B,mBAAmB,CAACC,QAAQ;IAACC,KAAK,EAAEzB,KAAM;IAAA0B,QAAA,gBACzC,IAAA/B,WAAA,CAAAgC,GAAA,EAACrC,gBAAA,CAAAsC,eAAe;MACd5B,KAAK,EAAEA,KAAM;MACbC,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA;IAAsB,CAC9C,CAAC,eAEF,IAAAP,WAAA,CAAAgC,GAAA,EAACpC,aAAA,CAAAsC,YAAY;MACX7B,KAAK,EAAEA,KAAM;MACb8B,gBAAgB,EAAEf,iBAAkB;MACpCgB,eAAe,EAAEb,QAAS;MAC1Bc,YAAY,EAAEZ,SAAU;MACxBhB,oBAAoB,EAAEA,oBAAqB;MAC3CC,aAAa,EAAEA,aAAc;MAC7BC,QAAQ,EAAEA;IAAS,CACpB,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC;AAAA2B,OAAA,CAAAlC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatBotModelContext = void 0;
|
|
7
|
+
exports.useChatModel = useChatModel;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
const ChatBotModelContext = exports.ChatBotModelContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
10
|
+
function useChatModel() {
|
|
11
|
+
const model = (0, _react.useContext)(ChatBotModelContext);
|
|
12
|
+
if (!model) {
|
|
13
|
+
throw new Error('Something went wrong, you are probably trying to use component that is supposed to be inside ChatBotContext.Provider');
|
|
14
|
+
}
|
|
15
|
+
return model;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ChatBotModelContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","ChatBotModelContext","exports","createContext","useChatModel","model","useContext","Error"],"sourceRoot":"../../../../../src","sources":["features/chatbot/context/ChatBotModelContext.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,gBAAG,IAAAE,oBAAa,EAAsB,IAAI,CAAC;AAEpE,SAASC,YAAYA,CAAA,EAAG;EAC7B,MAAMC,KAAK,GAAG,IAAAC,iBAAU,EAACL,mBAAmB,CAAC;EAC7C,IAAI,CAACI,KAAK,EAAE;IACV,MAAM,IAAIE,KAAK,CACb,sHACF,CAAC;EACH;EACA,OAAOF,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ErrorSpottingButton = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
9
|
+
var _ChatBotModelContext = require("../context/ChatBotModelContext.js");
|
|
10
|
+
var _effectorReact = require("effector-react");
|
|
11
|
+
var _reactNative = require("react-native");
|
|
12
|
+
var _HighlighterIcon = require("../../../shared/icons/HighlighterIcon.js");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const ErrorSpottingButton = ({
|
|
16
|
+
contextThreadId
|
|
17
|
+
}) => {
|
|
18
|
+
const model = (0, _ChatBotModelContext.useChatModel)();
|
|
19
|
+
const activeErrorSpotting = (0, _effectorReact.useUnit)(model.errorSpotting.$activeData);
|
|
20
|
+
const validationKey = (0, _effectorReact.useUnit)(model.errorSpotting.$validationKey);
|
|
21
|
+
const isLoading = (0, _effectorReact.useUnit)(model.errorSpotting.$isLoading);
|
|
22
|
+
const currentThread = (0, _effectorReact.useStoreMap)(model.$currentChatData, chatData => chatData.currentThread);
|
|
23
|
+
if (!currentThread?.strokes || contextThreadId && currentThread.id !== contextThreadId) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const isActive = !!activeErrorSpotting?.isActive;
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
28
|
+
style: buttonStyles,
|
|
29
|
+
disabled: validationKey !== currentThread.strokesValidationKey,
|
|
30
|
+
isActive: isActive,
|
|
31
|
+
isLoading: isLoading,
|
|
32
|
+
variant: 'secondary',
|
|
33
|
+
colorScheme: 'blue',
|
|
34
|
+
size: 'small',
|
|
35
|
+
onPress: () => {
|
|
36
|
+
if (isLoading) return;
|
|
37
|
+
model.errorSpotting.errorSpottingPressed();
|
|
38
|
+
},
|
|
39
|
+
icon: isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.StopIcon, {
|
|
40
|
+
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
41
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_HighlighterIcon.HighlighterIcon, {}),
|
|
42
|
+
children: "show error"
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
exports.ErrorSpottingButton = ErrorSpottingButton;
|
|
46
|
+
const buttonStyles = _reactNative.StyleSheet.create({
|
|
47
|
+
text: {
|
|
48
|
+
textTransform: 'uppercase'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=ErrorSpottingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_ChatBotModelContext","_effectorReact","_reactNative","_HighlighterIcon","_jsxRuntime","e","__esModule","default","ErrorSpottingButton","contextThreadId","model","useChatModel","activeErrorSpotting","useUnit","errorSpotting","$activeData","validationKey","$validationKey","isLoading","$isLoading","currentThread","useStoreMap","$currentChatData","chatData","strokes","id","isActive","jsx","Button","style","buttonStyles","disabled","strokesValidationKey","variant","colorScheme","size","onPress","errorSpottingPressed","icon","StopIcon","color","COLORS","NEUTRAL_1","HighlighterIcon","children","exports","StyleSheet","create","text","textTransform"],"sourceRoot":"../../../../../src","sources":["features/chatbot/errorSpotting/ErrorSpottingButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAAuE,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMhE,MAAMG,mBAAmB,GAAGA,CAAC;EAAEC;AAA0C,CAAC,KAAK;EACpF,MAAMC,KAAK,GAAG,IAAAC,iCAAY,EAAC,CAAC;EAC5B,MAAMC,mBAAmB,GAAG,IAAAC,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACC,WAAW,CAAC;EACpE,MAAMC,aAAa,GAAG,IAAAH,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACG,cAAc,CAAC;EACjE,MAAMC,SAAS,GAAG,IAAAL,sBAAO,EAACH,KAAK,CAACI,aAAa,CAACK,UAAU,CAAC;EACzD,MAAMC,aAAa,GAAG,IAAAC,0BAAW,EAACX,KAAK,CAACY,gBAAgB,EAAGC,QAAQ,IAAKA,QAAQ,CAACH,aAAa,CAAC;EAE/F,IAAI,CAACA,aAAa,EAAEI,OAAO,IAAKf,eAAe,IAAIW,aAAa,CAACK,EAAE,KAAKhB,eAAgB,EAAE;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