@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
package/dist/commonjs/features/chatbot/model/{ChatBotMessageHandler.js → ChatBotThreadManager.js}
RENAMED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.ChatBotThreadManager = void 0;
|
|
7
7
|
var _ThreadItem = require("./ThreadItem.js");
|
|
8
|
-
var _effector = require("effector/effector.umd");
|
|
9
8
|
var _constants = require("./constants.js");
|
|
10
|
-
class
|
|
9
|
+
class ChatBotThreadManager {
|
|
10
|
+
api = null;
|
|
11
|
+
drawBoardAdapter = null;
|
|
11
12
|
threads = new Map();
|
|
12
13
|
currentKey = '';
|
|
13
14
|
currentBinding = null;
|
|
@@ -17,8 +18,8 @@ class ChatMessageHandler {
|
|
|
17
18
|
messagesLimit = _constants.CHAT_BOT_MODEL_DEFAULTS.THREAD_MESSAGES_LIMIT,
|
|
18
19
|
messages
|
|
19
20
|
}) {
|
|
20
|
-
this.api = api;
|
|
21
|
-
this.drawBoardAdapter = drawBoardAdapter;
|
|
21
|
+
if (api) this.api = api;
|
|
22
|
+
this.drawBoardAdapter = drawBoardAdapter ?? null;
|
|
22
23
|
this.messagesLimit = messagesLimit;
|
|
23
24
|
this.defaultMessages = messages;
|
|
24
25
|
}
|
|
@@ -33,24 +34,36 @@ class ChatMessageHandler {
|
|
|
33
34
|
const key = this.currentKey;
|
|
34
35
|
let threadItem = this.threads.get(key);
|
|
35
36
|
if (threadItem) return threadItem;
|
|
37
|
+
if (!this.drawBoardAdapter) {
|
|
38
|
+
threadItem = new _ThreadItem.ThreadItem();
|
|
39
|
+
this.threads.set(key, threadItem);
|
|
40
|
+
return threadItem;
|
|
41
|
+
}
|
|
36
42
|
try {
|
|
37
|
-
const
|
|
38
|
-
threadItem = new _ThreadItem.ThreadItem({
|
|
39
|
-
strokes
|
|
40
|
-
|
|
43
|
+
const result = await this.drawBoardAdapter.getVisibleStrokes();
|
|
44
|
+
threadItem = new _ThreadItem.ThreadItem(result ? {
|
|
45
|
+
strokes: result.strokes,
|
|
46
|
+
key: result.validationKey
|
|
47
|
+
} : null);
|
|
41
48
|
} catch {
|
|
42
49
|
threadItem = new _ThreadItem.ThreadItem();
|
|
43
50
|
}
|
|
44
51
|
this.threads.set(key, threadItem);
|
|
45
52
|
return threadItem;
|
|
46
53
|
}
|
|
47
|
-
|
|
54
|
+
setDrawBoardAdapter(adapter) {
|
|
55
|
+
this.drawBoardAdapter = adapter;
|
|
56
|
+
}
|
|
57
|
+
postMessage = async ({
|
|
48
58
|
problemAnswer,
|
|
49
59
|
problem,
|
|
50
60
|
answer,
|
|
51
61
|
language,
|
|
52
62
|
imageAltText
|
|
53
63
|
}) => {
|
|
64
|
+
if (!this.api) {
|
|
65
|
+
throw new Error('API is not set in ThreadManagersApi, pls provide API before sending requests');
|
|
66
|
+
}
|
|
54
67
|
const threadItem = await this.getThreadItem();
|
|
55
68
|
const result = await this.api.getHint({
|
|
56
69
|
...threadItem.getNextHintProps(),
|
|
@@ -60,23 +73,32 @@ class ChatMessageHandler {
|
|
|
60
73
|
language,
|
|
61
74
|
imageAltText
|
|
62
75
|
});
|
|
63
|
-
threadItem.
|
|
64
|
-
const nextOptions = threadItem.
|
|
76
|
+
threadItem.history.push(result.message);
|
|
77
|
+
const nextOptions = threadItem.history.length < this.messagesLimit ? [this.defaultMessages.anotherHintOption] : [];
|
|
65
78
|
return {
|
|
66
79
|
message: result.message,
|
|
67
80
|
options: nextOptions,
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
endMessage: !nextOptions.length,
|
|
82
|
+
threadId: threadItem.id
|
|
70
83
|
};
|
|
71
84
|
};
|
|
72
|
-
|
|
73
|
-
key
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
get(key) {
|
|
86
|
+
return this.threads.get(key);
|
|
87
|
+
}
|
|
88
|
+
reset(key) {
|
|
89
|
+
if (typeof key === 'string') {
|
|
90
|
+
this.threads.delete(key);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
78
93
|
this.threads.clear();
|
|
79
94
|
}
|
|
95
|
+
setMessagesLimit(limit) {
|
|
96
|
+
this.messagesLimit = limit;
|
|
97
|
+
}
|
|
98
|
+
setApi(api) {
|
|
99
|
+
this.api = api;
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
80
102
|
}
|
|
81
|
-
exports.
|
|
82
|
-
//# sourceMappingURL=
|
|
103
|
+
exports.ChatBotThreadManager = ChatBotThreadManager;
|
|
104
|
+
//# sourceMappingURL=ChatBotThreadManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ThreadItem","require","_constants","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","currentBinding","constructor","messagesLimit","CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT","messages","defaultMessages","bindKeyStore","$store","watch","value","getThreadItem","key","threadItem","get","ThreadItem","set","result","getVisibleStrokes","strokes","validationKey","setDrawBoardAdapter","adapter","postMessage","problemAnswer","problem","answer","language","imageAltText","Error","getHint","getNextHintProps","correctAnswer","problemDescription","userAnswer","history","push","message","nextOptions","length","anotherHintOption","options","endMessage","threadId","id","reset","delete","clear","setMessagesLimit","limit","setApi","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,UAAA,GAAAD,OAAA;AAaO,MAAME,oBAAoB,CAAC;EACxBC,GAAG,GAA4B,IAAI;EACnCC,gBAAgB,GAAiC,IAAI;EAC5CC,OAAO,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGhDC,UAAU,GAAG,EAAE;EACfC,cAAc,GAAwB,IAAI;EAI3CC,WAAWA,CAAC;IACjBL,gBAAgB;IAChBD,GAAG;IACHO,aAAa,GAAGC,kCAAuB,CAACC,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIV,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACM,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACI,eAAe,GAAGD,QAAQ;EACjC;EAEOE,YAAYA,CAACC,MAAqB,EAAE;IACzC,IAAI,CAACR,cAAc,GAAG,CAAC;IACvB,IAAI,CAACA,cAAc,GAAGQ,MAAM,CAACC,KAAK,CAAEC,KAAK,IAAK;MAC5C,IAAI,CAACX,UAAU,GAAGW,KAAK;IACzB,CAAC,CAAC;IACF,OAAO,IAAI;EACb;EAEA,MAAcC,aAAaA,CAAA,EAAG;IAC5B,MAAMC,GAAG,GAAG,IAAI,CAACb,UAAU;IAC3B,IAAIc,UAAU,GAAG,IAAI,CAAChB,OAAO,CAACiB,GAAG,CAACF,GAAG,CAAC;IACtC,IAAIC,UAAU,EAAE,OAAOA,UAAU;IACjC,IAAI,CAAC,IAAI,CAACjB,gBAAgB,EAAE;MAC1BiB,UAAU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U,CAACsB,OAAO,CAACI,MAAM,GAAG,IAAI,CAACrC,aAAa,GAAG,CAAC,IAAI,CAACI,eAAe,CAACkC,iBAAiB,CAAC,GAAG,EAAE;IAEhG,OAAO;MACLH,OAAO,EAAEpB,MAAM,CAACoB,OAAO;MACvBI,OAAO,EAAEH,WAAW;MACpBI,UAAU,EAAE,CAACJ,WAAW,CAACC,MAAM;MAC/BI,QAAQ,EAAE9B,UAAU,CAAC+B;IACvB,CAAC;EACH,CAAC;EAEM9B,GAAGA,CAACF,GAAW,EAAE;IACtB,OAAO,IAAI,CAACf,OAAO,CAACiB,GAAG,CAACF,GAAG,CAAC;EAC9B;EAEOiC,KAAKA,CAACjC,GAAY,EAAE;IACzB,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MAC3B,IAAI,CAACf,OAAO,CAACiD,MAAM,CAAClC,GAAG,CAAC;MACxB;IACF;IACA,IAAI,CAACf,OAAO,CAACkD,KAAK,CAAC,CAAC;EACtB;EAEOC,gBAAgBA,CAACC,KAAa,EAAE;IACrC,IAAI,CAAC/C,aAAa,GAAG+C,KAAK;EAC5B;EAEOC,MAAMA,CAACvD,GAAqB,EAAE;IACnC,IAAI,CAACA,GAAG,GAAGA,GAAG;IACd,OAAO,IAAI;EACb;AACF;AAACwD,OAAA,CAAAzD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatBotTextManager = void 0;
|
|
7
|
+
var _DefaultMessageCreator = require("./DefaultMessageCreator.js");
|
|
8
|
+
var _helpers = require("../../../shared/translation/helpers.js");
|
|
9
|
+
var _index = require("../../../shared/translation/index.js");
|
|
10
|
+
class ChatBotTextManager {
|
|
11
|
+
messagesCreator = new _DefaultMessageCreator.DefaultMessagesCreator({
|
|
12
|
+
textGetter: _helpers.getText
|
|
13
|
+
}).bindToLanguageChanged(_index.$localization.updates);
|
|
14
|
+
messages = {
|
|
15
|
+
error: this.messagesCreator.createMessage('chat.errorMessage'),
|
|
16
|
+
start: this.messagesCreator.createMessage('chat.howCanIHelp'),
|
|
17
|
+
endMessage: this.messagesCreator.createMessage('chat.answerAgain'),
|
|
18
|
+
anotherHintOption: this.messagesCreator.createOption('chat.anotherHint')
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.ChatBotTextManager = ChatBotTextManager;
|
|
22
|
+
//# sourceMappingURL=ChatBoxTextManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_DefaultMessageCreator","require","_helpers","_index","ChatBotTextManager","messagesCreator","DefaultMessagesCreator","textGetter","getText","bindToLanguageChanged","$localization","updates","messages","error","createMessage","start","endMessage","anotherHintOption","createOption","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBoxTextManager.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEO,MAAMG,kBAAkB,CAAC;EACbC,eAAe,GAAG,IAAIC,6CAAsB,CAAkB;IAC7EC,UAAU,EAAEC;EACd,CAAC,CAAC,CAACC,qBAAqB,CAACC,oBAAa,CAACC,OAAO,CAAC;EAE/BC,QAAQ,GAAoB;IAC1CC,KAAK,EAAE,IAAI,CAACR,eAAe,CAACS,aAAa,CAAC,mBAAmB,CAAC;IAC9DC,KAAK,EAAE,IAAI,CAACV,eAAe,CAACS,aAAa,CAAC,kBAAkB,CAAC;IAC7DE,UAAU,EAAE,IAAI,CAACX,eAAe,CAACS,aAAa,CAAC,kBAAkB,CAAC;IAClEG,iBAAiB,EAAE,IAAI,CAACZ,eAAe,CAACa,YAAY,CAAC,kBAAkB;EACzE,CAAC;AACH;AAACC,OAAA,CAAAf,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -7,8 +7,23 @@ exports.ChatbotAPI = void 0;
|
|
|
7
7
|
var _effector = require("effector");
|
|
8
8
|
var _index = require("../../../lib/effector/index.js");
|
|
9
9
|
var _helpers = require("../helpers.js");
|
|
10
|
+
var _randomElements = require("../../../lib/helpers/randomElements.js");
|
|
10
11
|
class ChatbotAPI {
|
|
11
12
|
constructor(api) {
|
|
13
|
+
this.spotErrorFx = (0, _index.createControllerEffect)(props => {
|
|
14
|
+
return new Promise(res => {
|
|
15
|
+
if (props.strokes.length <= 3) return res({
|
|
16
|
+
strokesIds: []
|
|
17
|
+
});
|
|
18
|
+
setTimeout(() => {
|
|
19
|
+
const randomStrokes = (0, _randomElements.getRandomElements)(props.strokes, 4);
|
|
20
|
+
res({
|
|
21
|
+
strokesIds: randomStrokes.map(stroke => stroke.id ?? '')
|
|
22
|
+
});
|
|
23
|
+
}, 1000);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
// this.spotErrorFx = createControllerEffect(api.spotError)
|
|
12
27
|
this.postMessageFx = (0, _index.createControllerEffect)(api.postMessage);
|
|
13
28
|
this.getAlternativesFx = (0, _effector.createEffect)(api.getAlternatives);
|
|
14
29
|
this.translateTextFx = (0, _effector.createEffect)(async payload => {
|
|
@@ -31,4 +46,4 @@ class ChatbotAPI {
|
|
|
31
46
|
}
|
|
32
47
|
}
|
|
33
48
|
exports.ChatbotAPI = ChatbotAPI;
|
|
34
|
-
//# sourceMappingURL=
|
|
49
|
+
//# sourceMappingURL=ChatbotApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_index","_helpers","_randomElements","ChatbotAPI","constructor","api","spotErrorFx","createControllerEffect","props","Promise","res","strokes","length","strokesIds","setTimeout","randomStrokes","getRandomElements","map","stroke","id","postMessageFx","postMessage","getAlternativesFx","createEffect","getAlternatives","translateTextFx","payload","response","postTranslateText","text","replaceKatexSyntax","data","translations","translation","translatedText","textToSpeechTextFx","postTextToSpeech","exports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,GAAGJ,QAAQ,CAACI,IAAI;UAChBC,YAAY,EAAEL,QAAQ,CAACI,IAAI,CAACC,YAAY,CAACf,GAAG,CAAEgB,WAAW,KAAM;YAC7D,GAAGA,WAAW;YACdC,cAAc,EAAE,IAAAJ,2BAAkB,EAAC,CAACG,WAAW,CAACC,cAAc,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;UAC1E,CAAC,CAAC;QACJ;MACF,CAAC;IACH,CACF,CAAC;IACD,IAAI,CAACC,kBAAkB,GAAG,IAAAZ,sBAAY,EAAClB,GAAG,CAAC+B,gBAAgB,CAAC;EAC9D;AACF;AAACC,OAAA,CAAAlC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatsCacheModel = void 0;
|
|
7
|
+
exports.defaultChatData = defaultChatData;
|
|
8
|
+
var _effector = require("effector");
|
|
9
|
+
var _index = require("../../../lib/effector/index.js");
|
|
10
|
+
function defaultChatData(props = {}) {
|
|
11
|
+
return {
|
|
12
|
+
messages: [],
|
|
13
|
+
isAvailable: false,
|
|
14
|
+
currentThread: null,
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
class ChatsCacheModel {
|
|
19
|
+
update = (0, _effector.createEvent)();
|
|
20
|
+
cache = (0, _index.createEntityFieldStore)().on(this.update, (state, {
|
|
21
|
+
key,
|
|
22
|
+
data
|
|
23
|
+
}) => {
|
|
24
|
+
const currentData = state[key] ?? defaultChatData();
|
|
25
|
+
return {
|
|
26
|
+
...state,
|
|
27
|
+
[key]: {
|
|
28
|
+
...currentData,
|
|
29
|
+
...data
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
$data = this.cache.$state;
|
|
34
|
+
reset = this.cache.reset;
|
|
35
|
+
disableChat(key) {
|
|
36
|
+
this.cache.setField({
|
|
37
|
+
key,
|
|
38
|
+
fn: current => current ? {
|
|
39
|
+
...current,
|
|
40
|
+
isAvailable: false
|
|
41
|
+
} : defaultChatData({
|
|
42
|
+
isAvailable: false
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
reinitChatThread(key, {
|
|
47
|
+
initialOption
|
|
48
|
+
}) {
|
|
49
|
+
this.cache.setField({
|
|
50
|
+
key,
|
|
51
|
+
fn: current => {
|
|
52
|
+
if (!current || current.messages.length <= 1) return;
|
|
53
|
+
const copy = [...current.messages];
|
|
54
|
+
while (copy.at(-1)?.endMessage) {
|
|
55
|
+
copy.pop();
|
|
56
|
+
}
|
|
57
|
+
const lastMessage = copy.at(-1);
|
|
58
|
+
if (!lastMessage) return;
|
|
59
|
+
copy.splice(copy.length - 1, 1, {
|
|
60
|
+
...lastMessage,
|
|
61
|
+
options: [initialOption]
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
...current,
|
|
65
|
+
messages: copy
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
setSingleMessage(key, message) {
|
|
71
|
+
this.cache.setField({
|
|
72
|
+
key,
|
|
73
|
+
fn: current => {
|
|
74
|
+
if (!current || current.messages.length > 1) return;
|
|
75
|
+
return {
|
|
76
|
+
...current,
|
|
77
|
+
messages: [message]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
addMessages(key, {
|
|
83
|
+
messages,
|
|
84
|
+
thread = null
|
|
85
|
+
}) {
|
|
86
|
+
this.cache.setField({
|
|
87
|
+
key,
|
|
88
|
+
fn: current => {
|
|
89
|
+
if (!current) return defaultChatData({
|
|
90
|
+
messages,
|
|
91
|
+
currentThread: thread
|
|
92
|
+
});
|
|
93
|
+
const result = {
|
|
94
|
+
...current,
|
|
95
|
+
messages: [...current.messages, ...messages]
|
|
96
|
+
};
|
|
97
|
+
if (thread) result.currentThread = thread;
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
add(key, data) {
|
|
103
|
+
this.cache.setField({
|
|
104
|
+
key,
|
|
105
|
+
data
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.ChatsCacheModel = ChatsCacheModel;
|
|
110
|
+
//# sourceMappingURL=ChatsCacheModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_index","defaultChatData","props","messages","isAvailable","currentThread","ChatsCacheModel","update","createEvent","cache","createEntityFieldStore","on","state","key","data","currentData","$data","$state","reset","disableChat","setField","fn","current","reinitChatThread","initialOption","length","copy","at","endMessage","pop","lastMessage","splice","options","setSingleMessage","message","addMessages","thread","result","add","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatsCacheModel.ts"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAkBO,SAASE,eAAeA,CAACC,KAAwB,GAAG,CAAC,CAAC,EAAY;EACvE,OAAO;IACLC,QAAQ,EAAE,EAAE;IACZC,WAAW,EAAE,KAAK;IAClBC,aAAa,EAAE,IAAI;IACnB,GAAGH;EACL,CAAC;AACH;AAEO,MAAMI,eAAe,CAAC;EACXC,MAAM,GAAG,IAAAC,qBAAW,EAAc,CAAC;EAClCC,KAAK,GAAG,IAAAC,6BAAsB,EAAW,CAAC,CAACC,EAAE,CAC5D,IAAI,CAACJ,MAAM,EACX,CAACK,KAAK,EAAE;IAAEC,GAAG;IAAEC;EAAK,CAAC,KAAK;IACxB,MAAMC,WAAW,GAAGH,KAAK,CAACC,GAAG,CAAC,IAAIZ,eAAe,CAAC,CAAC;IACnD,OAAO;MAAE,GAAGW,KAAK;MAAE,CAACC,GAAG,GAAG;QAAE,GAAGE,WAAW;QAAE,GAAGD;MAAK;I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CAACW,QAAQ,CAAC;MAClBP,GAAG;MACHQ,EAAE,EAAGC,OAAO,IAAK;QACf,IAAI,CAACA,OAAO,IAAIA,OAAO,CAACnB,QAAQ,CAACsB,MAAM,GAAG,CAAC,EAAE;QAC7C,OAAO;UAAE,GAAGH,OAAO;UAAEnB,QAAQ,EAAE,CAAC+B,OAAO;QAAE,CAAC;MAC5C;IACF,CAAC,CAAC;EACJ;EAEOC,WAAWA,CAACtB,GAAW,EAAE;IAAEV,QAAQ;IAAEiC,MAAM,GAAG;EAAuB,CAAC,EAAE;IAC7E,IAAI,CAAC3B,KAAK,CAACW,QAAQ,CAAC;MAClBP,GAAG;MACHQ,EAAE,EAAGC,OAAO,IAAK;QACf,IAAI,CAACA,OAAO,EAAE,OAAOrB,eAAe,CAAC;UAAEE,QAAQ;UAAEE,aAAa,EAAE+B;QAAO,CAAC,CAAC;QACzE,MAAMC,MAAM,GAAG;UAAE,GAAGf,OAAO;UAAEnB,QAAQ,EAAE,CAAC,GAAGmB,OAAO,CAACnB,QAAQ,EAAE,GAAGA,QAAQ;QAAE,CAAC;QAC3E,IAAIiC,MAAM,EAAEC,MAAM,CAAChC,aAAa,GAAG+B,MAAM;QACzC,OAAOC,MAAM;MACf;IACF,CAAC,CAAC;EACJ;EAEOC,GAAGA,CAACzB,GAAW,EAAEC,IAAc,EAAE;IACtC,IAAI,CAACL,KAAK,CAACW,QAAQ,CAAC;MAAEP,GAAG;MAAEC;IAAK,CAAC,CAAC;EACpC;AACF;AAACyB,OAAA,CAAAjC,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -4,23 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DefaultMessagesCreator = void 0;
|
|
7
|
-
var _effector = require("effector");
|
|
8
7
|
class DefaultMessagesCreator {
|
|
9
|
-
languageChanged = (0, _effector.createEvent)();
|
|
10
8
|
list = new Map();
|
|
11
9
|
constructor({
|
|
12
10
|
textGetter
|
|
13
11
|
}) {
|
|
14
12
|
this.getter = textGetter;
|
|
15
|
-
this.languageChanged.watch(() => {
|
|
16
|
-
this.list.forEach((key, chatMessage) => {
|
|
17
|
-
if ('message' in chatMessage) {
|
|
18
|
-
chatMessage.message = this.getter(key);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
chatMessage.text = this.getter(key);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
13
|
}
|
|
25
14
|
createMessage(key, {
|
|
26
15
|
isOwn = false
|
|
@@ -28,7 +17,6 @@ class DefaultMessagesCreator {
|
|
|
28
17
|
const message = {
|
|
29
18
|
id: this.list.size.toString(),
|
|
30
19
|
message: this.getter(key),
|
|
31
|
-
threadId: '',
|
|
32
20
|
options: [],
|
|
33
21
|
isOwnMessage: isOwn
|
|
34
22
|
};
|
|
@@ -43,6 +31,18 @@ class DefaultMessagesCreator {
|
|
|
43
31
|
this.list.set(option, key);
|
|
44
32
|
return option;
|
|
45
33
|
}
|
|
34
|
+
bindToLanguageChanged(event) {
|
|
35
|
+
event.watch(() => {
|
|
36
|
+
this.list.forEach((key, chatMessage) => {
|
|
37
|
+
if ('message' in chatMessage) {
|
|
38
|
+
chatMessage.message = this.getter(key);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
chatMessage.text = this.getter(key);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
exports.DefaultMessagesCreator = DefaultMessagesCreator;
|
|
48
48
|
//# sourceMappingURL=DefaultMessageCreator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["DefaultMessagesCreator","list","Map","constructor","textGetter","getter","createMessage","key","isOwn","message","id","size","toString","options","isOwnMessage","set","createOption","option","text","promptKey","bindToLanguageChanged","event","watch","forEach","chatMessage","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/DefaultMessage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kB,OAAA,CAAAzB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -4,22 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ThreadItem = void 0;
|
|
7
|
+
var _helpers = require("../../../lib/helpers/helpers.js");
|
|
7
8
|
class ThreadItem {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.strokes = strokes ?? null;
|
|
9
|
+
id = (0, _helpers.generateRandomId)();
|
|
10
|
+
strokesValidationKey = null;
|
|
11
|
+
history = [];
|
|
12
|
+
constructor(props) {
|
|
13
|
+
this.strokes = props?.strokes ?? null;
|
|
14
|
+
this.strokesValidationKey = props?.key ?? null;
|
|
13
15
|
}
|
|
14
16
|
getNextHintProps() {
|
|
15
|
-
if (this.
|
|
17
|
+
if (this.history.length) {
|
|
16
18
|
return {
|
|
17
|
-
previousHint: this.
|
|
19
|
+
previousHint: this.history[this.history.length - 1]
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
22
|
if (this.strokes) {
|
|
21
23
|
return {
|
|
22
|
-
stroke: this.strokes
|
|
24
|
+
stroke: this.strokes.map(({
|
|
25
|
+
x,
|
|
26
|
+
y
|
|
27
|
+
}) => ({
|
|
28
|
+
x,
|
|
29
|
+
y
|
|
30
|
+
}))
|
|
23
31
|
};
|
|
24
32
|
}
|
|
25
33
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThreadItem","
|
|
1
|
+
{"version":3,"names":["_helpers","require","ThreadItem","id","generateRandomId","strokesValidationKey","history","constructor","props","strokes","key","getNextHintProps","length","previousHint","stroke","map","x","y","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ThreadItem.ts"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,UAAU,CAAwB;EAC7BC,EAAE,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EACvBC,oBAAoB,GAAkB,IAAI;EAE1CC,OAAO,GAAa,EAAE;EAE/BC,WAAWA,CAACC,KAA8B,EAAE;IACjD,IAAI,CAACC,OAAO,GAAGD,KAAK,EAAEC,OAAO,IAAI,IAAI;IACrC,IAAI,CAACJ,oBAAoB,GAAGG,KAAK,EAAEE,GAAG,IAAI,IAAI;EAChD;EAEOC,gBAAgBA,CAAA,EAAG;IACxB,IAAI,IAAI,CAACL,OAAO,CAACM,MAAM,EAAE;MACvB,OAAO;QACLC,YAAY,EAAE,IAAI,CAACP,OAAO,CAAC,IAAI,CAACA,OAAO,CAACM,MAAM,GAAG,CAAC;MACpD,CAAC;IACH;IAEA,IAAI,IAAI,CAACH,OAAO,EAAE;MAChB,OAAO;QAAEK,MAAM,EAAE,IAAI,CAACL,OAAO,CAACM,GAAG,CAAC,CAAC;UAAEC,CAAC;UAAEC;QAAE,CAAC,MAAM;UAAED,CAAC;UAAEC;QAAE,CAAC,CAAC;MAAE,CAAC;IAC/D;IAEA,OAAO,CAAC,CAAC;EACX;AACF;AAACC,OAAA,CAAAhB,UAAA,GAAAA,UAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","exports","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","exports","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;;;;;AAEO,MAAMA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG;EACrCE,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
|
|
@@ -6,14 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.messagesHelper = void 0;
|
|
7
7
|
var _helpers = require("../../../lib/helpers/helpers.js");
|
|
8
8
|
class messagesHelper {
|
|
9
|
-
static createAnswer(data
|
|
9
|
+
static createAnswer(data, {
|
|
10
|
+
isInitial
|
|
11
|
+
} = {}) {
|
|
10
12
|
return {
|
|
11
13
|
id: (0, _helpers.generateRandomId)(),
|
|
12
14
|
isOwnMessage: false,
|
|
13
15
|
message: data.message,
|
|
14
|
-
threadId: data.threadId,
|
|
15
16
|
options: data.options,
|
|
16
|
-
|
|
17
|
+
threadId: data.threadId,
|
|
18
|
+
translatedMessage: data.translatedMessage,
|
|
19
|
+
isInitial
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
22
|
static createLast(data) {
|
|
@@ -23,20 +26,17 @@ class messagesHelper {
|
|
|
23
26
|
translatedMessage: data.translatedMessage,
|
|
24
27
|
isOwnMessage: false,
|
|
25
28
|
options: [],
|
|
26
|
-
threadId: '',
|
|
27
29
|
endMessage: true
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
32
|
static createOwn({
|
|
31
33
|
message = '',
|
|
32
|
-
translatedMessage
|
|
33
|
-
threadId
|
|
34
|
+
translatedMessage
|
|
34
35
|
}) {
|
|
35
36
|
return {
|
|
36
37
|
id: (0, _helpers.generateRandomId)(),
|
|
37
38
|
message,
|
|
38
39
|
translatedMessage,
|
|
39
|
-
threadId: threadId || '',
|
|
40
40
|
isOwnMessage: true,
|
|
41
41
|
options: []
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_helpers","require","messagesHelper","createAnswer","data","id","generateRandomId","isOwnMessage","message","
|
|
1
|
+
{"version":3,"names":["_helpers","require","messagesHelper","createAnswer","data","isInitial","id","generateRandomId","isOwnMessage","message","options","threadId","translatedMessage","createLast","endMessage","createOwn","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/messagesHelper.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAaO,MAAMC,cAAc,CAAC;EAC1B,OAAcC,YAAYA,CACxBC,IAA2B,EAC3B;IAAEC;EAAgC,CAAC,GAAG,CAAC,CAAC,EACnB;IACrB,OAAO;MACLC,EAAE,EAAE,IAAAC,yBAAgB,EAAC,CAAC;MACtBC,YAAY,EAAE,KAAK;MACnBC,OAAO,EAAEL,IAAI,CAACK,OAAO;MACrBC,OAAO,EAAEN,IAAI,CAACM,OAAO;MACrBC,QAAQ,EAAEP,IAAI,CAACO,QAAQ;MACvBC,iBAAiB,EAAER,IAAI,CAACQ,iBAAiB;MACzCP;IACF,CAAC;EACH;EAEA,OAAcQ,UAAUA,CAACT,IAA2B,EAAE;IACpD,OAAO;MACLE,EAAE,EAAE,IAAAC,yBAAgB,EAAC,CAAC;MACtBE,OAAO,EAAEL,IAAI,CAACK,OAAO;MACrBG,iBAAiB,EAAER,IAAI,CAACQ,iBAAiB;MACzCJ,YAAY,EAAE,KAAK;MACnBE,OAAO,EAAE,EAAE;MACXI,UAAU,EAAE;IACd,CAAC;EACH;EAEA,OAAcC,SAASA,CAAC;IACtBN,OAAO,GAAG,EAAE;IACZG;EACe,CAAC,EAAuB;IACvC,OAAO;MACLN,EAAE,EAAE,IAAAC,yBAAgB,EAAC,CAAC;MACtBE,OAAO;MACPG,iBAAiB;MACjBJ,YAAY,EAAE,IAAI;MAClBE,OAAO,EAAE;IACX,CAAC;EACH;AACF;AAACM,OAAA,CAAAd,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -14,30 +14,34 @@ class ChatTextToSpeechModel {
|
|
|
14
14
|
$currentPlayingId = (0, _effector.restore)(this.setCurrentPlayingId, null);
|
|
15
15
|
setStatus = (0, _effector.createEvent)();
|
|
16
16
|
$status = (0, _effector.restore)(this.setStatus, _t2sTypes.AudioStatus.STOPPED);
|
|
17
|
+
audioConfig = null;
|
|
18
|
+
textSanitizer = value => value;
|
|
17
19
|
constructor({
|
|
18
|
-
$isOpen,
|
|
19
20
|
api
|
|
20
21
|
}) {
|
|
21
22
|
this.api = api;
|
|
22
|
-
(0, _effector.sample)({
|
|
23
|
-
source: $isOpen.updates,
|
|
24
|
-
filter: isOpen => !isOpen,
|
|
25
|
-
target: this.reset
|
|
26
|
-
});
|
|
27
23
|
}
|
|
28
|
-
|
|
29
|
-
this.
|
|
24
|
+
setAudioConfig(config) {
|
|
25
|
+
this.audioConfig = config;
|
|
26
|
+
}
|
|
27
|
+
setConfig({
|
|
28
|
+
audioProvider,
|
|
29
|
+
textSanitizer
|
|
30
|
+
}) {
|
|
31
|
+
if (audioProvider) this.audioProvider = audioProvider;
|
|
32
|
+
if (textSanitizer) this.textSanitizer = textSanitizer;
|
|
30
33
|
}
|
|
31
34
|
getCacheKey = (messageId, isTranslated) => {
|
|
32
35
|
return `${messageId}-${isTranslated ? 'translated' : 'original'}`;
|
|
33
36
|
};
|
|
34
37
|
async play({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
isTranslated,
|
|
38
|
-
config
|
|
38
|
+
message,
|
|
39
|
+
isTranslated
|
|
39
40
|
}) {
|
|
40
|
-
if (!this.audioProvider) throw new Error('Audio provider is not set. Use
|
|
41
|
+
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setConfig.');
|
|
42
|
+
const messageText = isTranslated ? message.translatedMessage : message.message;
|
|
43
|
+
const messageId = message.id;
|
|
44
|
+
const text = this.textSanitizer(messageText);
|
|
41
45
|
try {
|
|
42
46
|
const status = this.$status.getState();
|
|
43
47
|
const playingId = this.$currentPlayingId.getState();
|
|
@@ -61,6 +65,7 @@ class ChatTextToSpeechModel {
|
|
|
61
65
|
let audioPath = this.audioCache[cacheKey];
|
|
62
66
|
this.setCurrentPlayingId(messageId);
|
|
63
67
|
if (!audioPath) {
|
|
68
|
+
const config = this.audioConfig;
|
|
64
69
|
const response = await this.api.textToSpeechTextFx({
|
|
65
70
|
input: {
|
|
66
71
|
text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_constants","_t2sTypes","ChatTextToSpeechModel","audioCache","audioProvider","setCurrentPlayingId","createEvent","$currentPlayingId","restore","setStatus","$status","AudioStatus","STOPPED","
|
|
1
|
+
{"version":3,"names":["_effector","require","_constants","_t2sTypes","ChatTextToSpeechModel","audioCache","audioProvider","setCurrentPlayingId","createEvent","$currentPlayingId","restore","setStatus","$status","AudioStatus","STOPPED","audioConfig","textSanitizer","value","constructor","api","setAudioConfig","config","setConfig","getCacheKey","messageId","isTranslated","play","message","Error","messageText","translatedMessage","id","text","status","getState","playingId","isPlaying","PLAYING","isPaused","PAUSED","isCurrentMessage","pause","resume","stop","cacheKey","audioPath","response","textToSpeechTextFx","input","voice","DEFAULT_VOICE","AUDIO_CONFIG","audioContent","error","reset","console","createEffect","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/t2s.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAiBO,MAAMG,qBAAqB,CAAC;EAEhBC,UAAU,GAA2B,CAAC,CAAC;EAChDC,aAAa,GAAyB,IAAI;EAEzCC,mBAAmB,GAAG,IAAAC,qBAAW,EAAgB,CAAC;EAClDC,iBAAiB,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,mBAAmB,EAAE,IAAI,CAAC;EAC3DI,SAAS,GAAG,IAAAH,qBAAW,EAAc,CAAC;EACtCI,OAAO,GAAG,IAAAF,iBAAO,EAAC,IAAI,CAACC,SAAS,EAAEE,qBAAW,CAACC,OAAO,CAAC;EAEvDC,WAAW,GAAuB,IAAI;EACtCC,aAAa,GAAIC,KAAa,IAAKA,KAAK;EAEhDC,WAAWA,CAAC;IAAEC;EAAgC,CAAC,EAAE;IAC/C,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB;EAEOC,cAAcA,CAACC,MAA0B,EAAE;IAChD,IAAI,CAACN,WAAW,GAAGM,MAAM;EAC3B;EAEOC,SAASA,CAAC;IAAEhB,aAAa;IAAEU;EAAyB,CAAC,EAAE;IAC5D,IAAIV,aAAa,EAAE,IAAI,CAACA,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EOV,IAAIA,CAAA,EAAG;IACZ,IAAI,CAAC,IAAI,CAACrC,aAAa,EAAE,MAAM,IAAIsB,KAAK,CAAC,kDAAkD,CAAC;IAC5F,IAAI,CAACtB,aAAa,CAACqC,IAAI,CAAC,CAAC;EAC3B;EAEgBW,KAAK,GAAG,IAAAE,sBAAY,EAAC,MAAM;IACzC,IAAI,CAACb,IAAI,CAAC,CAAC;IACX,IAAI,CAAChC,SAAS,CAACE,qBAAW,CAACC,OAAO,CAAC;IACnC,IAAI,CAACP,mBAAmB,CAAC,IAAI,CAAC;EAChC,CAAC,CAAC;AACJ;AAACkD,OAAA,CAAArD,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getOptionsForTranslation","lastMessage","alternatives","options","length","hintAlternatives","hints","defaultAlternatives","default","map","text","addTranslationsToAlternative","translatedHints","translatedDefaults","translatedText","index","addTranslationToOptions","translations","option"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.helpers.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"names":["getOptionsForTranslation","lastMessage","alternatives","options","length","hintAlternatives","hints","defaultAlternatives","default","map","text","addTranslationsToAlternative","translatedHints","translatedDefaults","translatedText","index","addTranslationToOptions","translations","option"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.helpers.ts"],"mappings":";;;;;;;;AAQO,SAASA,wBAAwBA,CAAC;EACvCC,WAAW;EACXC;AACe,CAAC,EAAoB;EACpC,IAAI,CAACD,WAAW,EAAE,OAAO;IAAEA,WAAW,EAAE,IAAI;IAAEC,YAAY,EAAE;EAAK,CAAC;EAClE,IAAI,CAACD,WAAW,CAACE,OAAO,CAACC,MAAM,EAAE;IAC/B,IAAI,CAACF,YAAY,EAAE,OAAO;MAAED,WAAW,EAAE,IAAI;MAAEC,YAAY,EAAE;IAAK,CAAC;IACnE,MAAMG,gBAAgB,GAAGH,YAAY,CAACC,OAAO,CAACG,KAAK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