@magmamath/students-features 0.11.0-rc.8 → 1.0.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/Chat/Chat.js +49 -139
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +58 -43
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -3
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.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.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +36 -11
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +20 -14
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +12 -22
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +4 -4
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +1 -8
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +10 -46
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -9
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/voice/constants.js +23 -0
- package/dist/commonjs/features/voice/constants.js.map +1 -0
- package/dist/commonjs/features/voice/helpers.js +208 -0
- package/dist/commonjs/features/voice/helpers.js.map +1 -0
- package/dist/commonjs/features/voice/index.js +105 -0
- package/dist/commonjs/features/voice/index.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +215 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +98 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +39 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +223 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/index.js +20 -0
- package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +63 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +27 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +55 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +248 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/components/PlayButton.js +70 -0
- package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +17 -0
- package/dist/commonjs/shared/translation/localization/de.json +17 -0
- package/dist/commonjs/shared/translation/localization/en.json +17 -0
- package/dist/commonjs/shared/translation/localization/gb.json +17 -0
- package/dist/commonjs/shared/translation/localization/sct.json +17 -0
- package/dist/commonjs/shared/translation/localization/sw.json +17 -0
- package/dist/module/features/chatbot/components/Chat/Chat.js +51 -141
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +59 -45
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -3
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.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.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +38 -14
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +21 -15
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +11 -20
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +5 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +1 -8
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +10 -46
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -9
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/gifCelebrations/helpers.js +1 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/module/features/voice/constants.js +19 -0
- package/dist/module/features/voice/constants.js.map +1 -0
- package/dist/module/features/voice/helpers.js +191 -0
- package/dist/module/features/voice/helpers.js.map +1 -0
- package/dist/module/features/voice/index.js +12 -0
- package/dist/module/features/voice/index.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +93 -0
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +34 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +218 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/index.js +5 -0
- package/dist/module/features/voice/playing/model/index.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +57 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDivider.js +21 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js +50 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +244 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/module/features/voice/types.js +4 -0
- package/dist/module/features/voice/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/components/PlayButton.js +64 -0
- package/dist/module/shared/components/PlayButton.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +17 -0
- package/dist/module/shared/translation/localization/de.json +17 -0
- package/dist/module/shared/translation/localization/en.json +17 -0
- package/dist/module/shared/translation/localization/gb.json +17 -0
- package/dist/module/shared/translation/localization/sct.json +17 -0
- package/dist/module/shared/translation/localization/sw.json +17 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
- 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.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +6 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- 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/Chatbot.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +17 -19
- 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 +13 -7
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/constants.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +23 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +72 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -0
- 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.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +6 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- 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/Chatbot.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +17 -19
- 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 +13 -7
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/constants.d.ts +16 -0
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/index.d.ts +10 -0
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +23 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts +3 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +72 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +34 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +3 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +11 -4
- package/src/features/chatbot/components/Chat/Chat.tsx +69 -192
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +66 -44
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -3
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +2 -2
- package/src/features/chatbot/components/ChatInput/FreeText/SendMessageButton.tsx +1 -1
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -0
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +35 -11
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +17 -11
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +1 -1
- package/src/features/chatbot/components/Chatbot.tsx +11 -21
- package/src/features/chatbot/constants.ts +4 -4
- package/src/features/chatbot/helpers.ts +0 -3
- package/src/features/chatbot/index.ts +2 -16
- package/src/features/chatbot/model/ChatBotModel.ts +8 -51
- package/src/features/chatbot/model/ChatbotApi.ts +1 -1
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -7
- package/src/features/chatbot/types/api.types.ts +17 -17
- package/src/features/chatbot/types/model.types.ts +15 -7
- package/src/features/chatbot/types/units.types.ts +0 -1
- package/src/features/gifCelebrations/helpers.ts +1 -0
- package/src/features/voice/constants.ts +15 -0
- package/src/features/voice/helpers.ts +251 -0
- package/src/features/voice/index.ts +11 -0
- package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +251 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
- package/src/features/voice/playing/model/Player.model.ts +104 -0
- package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
- package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +42 -0
- package/src/features/voice/playing/model/VoicePlayer.model.ts +255 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +40 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +11 -0
- package/src/features/voice/playing/model/index.ts +2 -0
- package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +64 -0
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
- package/src/features/voice/recording/components/VoiceRecordDivider.tsx +17 -0
- package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
- package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
- package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
- package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
- package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
- package/src/features/voice/recording/model/Recorder.model.ts +63 -0
- package/src/features/voice/recording/model/Uploader.model.ts +48 -0
- package/src/features/voice/recording/model/VoiceRecord.model.ts +302 -0
- package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
- package/src/features/voice/types.ts +84 -0
- package/src/index.ts +1 -0
- package/src/shared/components/PlayButton.tsx +84 -0
- package/src/shared/translation/localization/ca.json +17 -0
- package/src/shared/translation/localization/de.json +17 -0
- package/src/shared/translation/localization/en.json +17 -0
- package/src/shared/translation/localization/gb.json +17 -0
- package/src/shared/translation/localization/sct.json +17 -0
- package/src/shared/translation/localization/sw.json +17 -0
- package/src/types/common.types.ts +1 -0
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js +0 -39
- package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -43
- package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/components/Chat/CloseButton.js +0 -33
- package/dist/module/features/chatbot/components/Chat/CloseButton.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -40
- package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
- package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
- package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
- package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/components/Chat/CloseButton.tsx +0 -31
- package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_ReceivedMessage","_SentMessage","_modelTypes","_jsxRuntime","e","__esModule","default","variantsMap","MessageVariant","SENT","SentMessage","RECEIVED","ReceivedMessage","ChatMessage","variant","props","Component","jsx","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAkBxD,MAAMG,WAAgE,GAAG;EACvE,CAACC,0BAAc,CAACC,IAAI,GAAGC,wBAAW;EAClC,CAACF,0BAAc,CAACG,QAAQ,GAAGC;AAC7B,CAAC;AAEM,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGT,WAAW,CAACO,OAAO,CAAC;EACtC,oBAAO,IAAAX,WAAA,CAAAc,GAAA,EAACD,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC;AAAAG,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_ErrorSpottingButton","_MessageTextToSpeech","_jsxRuntime","e","__esModule","default","MessageButtonsBlock","t2sState","message","variant","colorScheme","withErrorSpotting","isEnabled","isInitial","jsxs","View","style","styles","container","children","jsx","ErrorSpottingButton","contextMessage","MessageTextToSpeech","state","exports","StyleSheet","create","flexDirection","gap","marginLeft","IS_WEB","float","position","bottom","right"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_ErrorSpottingButton","_MessageTextToSpeech","_jsxRuntime","e","__esModule","default","MessageButtonsBlock","t2sState","message","variant","colorScheme","withErrorSpotting","isEnabled","isInitial","jsxs","View","style","styles","container","children","jsx","ErrorSpottingButton","contextMessage","MessageTextToSpeech","state","exports","StyleSheet","create","flexDirection","gap","marginLeft","IS_WEB","float","position","bottom","right"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AA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,CAAC,CAAC","ignoreList":[]}
|
|
@@ -7,25 +7,50 @@ exports.MessageLoader = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _ThreeDotsLoader = require("../ThreeDotsLoader/ThreeDotsLoader.js");
|
|
11
|
+
var _constants = require("../../constants.js");
|
|
12
|
+
var _styleTypes = require("../../types/style.types.js");
|
|
13
|
+
var _studentsFeatures = require("@magmamath/students-features");
|
|
10
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const MessageLoader = (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
const MessageLoader = ({
|
|
17
|
+
colorScheme = _styleTypes.ColorScheme.Blue
|
|
18
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
19
|
+
style: styles.container,
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
21
|
+
style: styles.icon,
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_studentsFeatures.LavaIconInGlasses, {
|
|
23
|
+
width: 60,
|
|
24
|
+
height: 80
|
|
25
|
+
})
|
|
26
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
27
|
+
style: styles.loader,
|
|
28
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThreeDotsLoader.ThreeDotsLoader, {
|
|
29
|
+
backgroundColor: _constants.CONTROLS_COLORS_MAP[colorScheme].background
|
|
30
|
+
})
|
|
31
|
+
})]
|
|
17
32
|
});
|
|
18
33
|
exports.MessageLoader = MessageLoader;
|
|
19
34
|
const styles = _reactNative.StyleSheet.create({
|
|
35
|
+
container: {
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
width: 327,
|
|
38
|
+
alignItems: 'flex-end',
|
|
39
|
+
paddingLeft: 70
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
zIndex: 1,
|
|
44
|
+
alignSelf: 'flex-end',
|
|
45
|
+
left: 0
|
|
46
|
+
},
|
|
20
47
|
loader: {
|
|
21
|
-
|
|
22
|
-
alignSelf: 'flex-start',
|
|
23
|
-
marginTop: _reactNativeUi.SPACING['200'],
|
|
48
|
+
flex: 1,
|
|
24
49
|
flexDirection: 'row',
|
|
25
50
|
alignItems: 'flex-start',
|
|
26
|
-
|
|
27
|
-
maxWidth: 62,
|
|
51
|
+
maxWidth: 70,
|
|
28
52
|
padding: 8,
|
|
53
|
+
paddingTop: 15,
|
|
29
54
|
shadowColor: '#333333',
|
|
30
55
|
shadowOffset: {
|
|
31
56
|
width: 0,
|
|
@@ -34,7 +59,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
34
59
|
shadowOpacity: 0.25,
|
|
35
60
|
shadowRadius: 3,
|
|
36
61
|
elevation: 3,
|
|
37
|
-
borderRadius:
|
|
62
|
+
borderRadius: 8,
|
|
38
63
|
borderBottomLeftRadius: 0,
|
|
39
64
|
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3
|
|
40
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_jsxRuntime","e","__esModule","default","MessageLoader","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_ThreeDotsLoader","_constants","_styleTypes","_studentsFeatures","_jsxRuntime","e","__esModule","default","MessageLoader","colorScheme","ColorScheme","Blue","jsxs","View","style","styles","container","children","jsx","icon","LavaIconInGlasses","width","height","loader","ThreeDotsLoader","backgroundColor","CONTROLS_COLORS_MAP","background","exports","StyleSheet","create","flexDirection","alignItems","paddingLeft","position","zIndex","alignSelf","left","flex","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","COLORS","NEUTRAL_3"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAAgE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMzD,MAAMG,aAAa,GAAGA,CAAC;EAAEC,WAAW,GAAGC,uBAAW,CAACC;AAAyB,CAAC,kBAClF,IAAAP,WAAA,CAAAQ,IAAA,EAACd,YAAA,CAAAe,IAAI;EAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5B,IAAAb,WAAA,CAAAc,GAAA,EAACpB,YAAA,CAAAe,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACI,IAAK;IAAAF,QAAA,eACvB,IAAAb,WAAA,CAAAc,GAAA,EAACf,iBAAA,CAAAiB,iBAAiB;MAACC,KAAK,EAAE,EAAG;MAACC,MAAM,EAAE;IAAG,CAAE;EAAC,CACxC,CAAC,eACP,IAAAlB,WAAA,CAAAc,GAAA,EAACpB,YAAA,CAAAe,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACQ,MAAO;IAAAN,QAAA,eACzB,IAAAb,WAAA,CAAAc,GAAA,EAAClB,gBAAA,CAAAwB,eAAe;MAACC,eAAe,EAAEC,8BAAmB,CAACjB,WAAW,CAAC,CAACkB;IAAW,CAAE;EAAC,CAC7E,CAAC;AAAA,CACH,CACP;AAAAC,OAAA,CAAApB,aAAA,GAAAA,aAAA;AAED,MAAMO,MAAM,GAAGc,uBAAU,CAACC,MAAM,CAAC;EAC/Bd,SAAS,EAAE;IACTe,aAAa,EAAE,KAAK;IACpBV,KAAK,EAAE,GAAG;IACVW,UAAU,EAAE,UAAU;IACtBC,WAAW,EAAC;EACd,CAAC;EACDd,IAAI,EAAE;IACJe,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAC,CAAC;IACRC,SAAS,EAAE,UAAU;IACrBC,IAAI,EAAE;EACR,CAAC;EACDd,MAAM,EAAE;IACNe,IAAI,EAAE,CAAC;IACPP,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBO,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,CAAC;IACVC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEtB,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCsB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBvB,eAAe,EAAEwB,qBAAM,CAACC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,69 +5,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.MessageTextToSpeech = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _SpeakerIcon = require("../../../../shared/icons/SpeakerIcon.js");
|
|
11
|
-
var _PlayIcon = require("../../../../shared/icons/PlayIcon.js");
|
|
12
|
-
var _PauseIcon = require("../../../../shared/icons/PauseIcon.js");
|
|
13
8
|
var _ChatBotModelContext = require("../../context/ChatBotModelContext.js");
|
|
9
|
+
var _PlayButton = require("../../../../shared/components/PlayButton.js");
|
|
14
10
|
var _styleTypes = require("../../types/style.types.js");
|
|
15
11
|
var _constants = require("../../constants.js");
|
|
16
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
const TextToSpeechIcon = ({
|
|
19
|
-
status,
|
|
20
|
-
isActive,
|
|
21
|
-
isLoading,
|
|
22
|
-
colorScheme = _styleTypes.ColorScheme.Blue
|
|
23
|
-
}) => {
|
|
24
|
-
if (isLoading && isActive) {
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
26
|
-
color: _constants.CONTROLS_COLORS_MAP[colorScheme].background
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
if (!isActive) {
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SpeakerIcon.SpeakerIcon, {});
|
|
31
|
-
}
|
|
32
|
-
if (status === 'playing') return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PauseIcon.PauseIcon, {
|
|
33
|
-
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
34
|
-
});
|
|
35
|
-
if (status === 'paused') return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayIcon.PlayIcon, {
|
|
36
|
-
color: _reactNativeUi.COLORS.NEUTRAL_1
|
|
37
|
-
});
|
|
38
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SpeakerIcon.SpeakerIcon, {});
|
|
39
|
-
};
|
|
40
14
|
const MessageTextToSpeech = ({
|
|
41
|
-
state
|
|
42
|
-
status,
|
|
43
|
-
disabled,
|
|
44
|
-
isActive,
|
|
45
|
-
isLoading
|
|
46
|
-
},
|
|
47
|
-
message,
|
|
15
|
+
state,
|
|
48
16
|
variant,
|
|
17
|
+
message,
|
|
49
18
|
colorScheme = _styleTypes.ColorScheme.Blue
|
|
50
19
|
}) => {
|
|
51
20
|
const model = (0, _ChatBotModelContext.useChatModel)();
|
|
52
|
-
|
|
21
|
+
const play = () => {
|
|
53
22
|
void model.t2s.play({
|
|
54
23
|
isTranslated: model.translation.$isTranslated.getState(),
|
|
55
24
|
message
|
|
56
25
|
});
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
59
|
-
disabled: disabled,
|
|
60
|
-
isActive: isActive,
|
|
61
|
-
variant: 'secondary',
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
|
|
62
28
|
colorScheme: _constants.MESSAGE_COLORS_MAP[colorScheme][variant].icon,
|
|
63
|
-
|
|
64
|
-
onPress: play
|
|
65
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(TextToSpeechIcon, {
|
|
66
|
-
isActive: isActive,
|
|
67
|
-
isLoading: isLoading,
|
|
68
|
-
status: status,
|
|
69
|
-
colorScheme: colorScheme
|
|
70
|
-
})
|
|
29
|
+
state: state,
|
|
30
|
+
onPress: play
|
|
71
31
|
});
|
|
72
32
|
};
|
|
73
33
|
exports.MessageTextToSpeech = MessageTextToSpeech;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_ChatBotModelContext","_PlayButton","_styleTypes","_constants","_jsxRuntime","e","__esModule","default","MessageTextToSpeech","state","variant","message","colorScheme","ColorScheme","Blue","model","useChatModel","play","t2s","isTranslated","translation","$isTranslated","getState","jsx","PlayButton","MESSAGE_COLORS_MAP","icon","onPress","exports"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAIA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAAoD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAS7C,MAAMG,mBAAmB,GAAGA,CAAC;EAClCC,KAAK;EACLC,OAAO;EACPC,OAAO;EACPC,WAAW,GAAGC,uBAAW,CAACC;AACF,CAAC,KAAK;EAC9B,MAAMC,KAAK,GAAG,IAAAC,iCAAY,EAAC,CAAC;EAE5B,MAAMC,IAAI,GAAGA,CAAA,KAAM;IACjB,KAAKF,KAAK,CAACG,GAAG,CAACD,IAAI,CAAC;MAClBE,YAAY,EAAEJ,KAAK,CAACK,WAAW,CAACC,aAAa,CAACC,QAAQ,CAAC,CAAC;MACxDX;IACF,CAAC,CAAC;EACJ,CAAC;EAED,oBACE,IAAAP,WAAA,CAAAmB,GAAA,EAACtB,WAAA,CAAAuB,UAAU;IACTZ,WAAW,EAAEa,6BAAkB,CAACb,WAAW,CAAC,CAACF,OAAO,CAAC,CAACgB,IAAK;IAC3DjB,KAAK,EAAEA,KAAM;IACbkB,OAAO,EAAEV;EAAK,CACf,CAAC;AAEN,CAAC;AAAAW,OAAA,CAAApB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -6,25 +6,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ReceivedMessage = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
9
|
+
var _ChatbotIcon = require("../../../../shared/icons/ChatbotIcon.js");
|
|
10
10
|
var _styleTypes = require("../../types/style.types.js");
|
|
11
|
-
var _modelTypes = require("../../types/model.types.js");
|
|
12
11
|
var _MessageContent = require("./MessageContent.js");
|
|
12
|
+
var _modelTypes = require("../../types/model.types.js");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
15
|
const ReceivedMessage = ({
|
|
16
16
|
message,
|
|
17
17
|
isTranslated,
|
|
18
18
|
t2sState,
|
|
19
|
+
withIcon,
|
|
19
20
|
colorScheme = _styleTypes.ColorScheme.Blue,
|
|
20
21
|
withErrorSpotting,
|
|
21
22
|
highlightedWordIndex,
|
|
22
23
|
TTSHighlightRenderer
|
|
23
24
|
}) => {
|
|
24
25
|
const text = isTranslated ? message.translatedMessage : message.message;
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
26
27
|
style: styles.container,
|
|
27
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
28
|
+
children: [withIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
29
|
+
style: styles.icon,
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatbotIcon.ChatbotIcon, {
|
|
31
|
+
width: 60,
|
|
32
|
+
height: 80
|
|
33
|
+
})
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
28
35
|
style: styles.message,
|
|
29
36
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageContent.MessageContent, {
|
|
30
37
|
message: message,
|
|
@@ -36,7 +43,7 @@ const ReceivedMessage = ({
|
|
|
36
43
|
highlightedWordIndex: highlightedWordIndex,
|
|
37
44
|
TTSHighlightRenderer: TTSHighlightRenderer
|
|
38
45
|
})
|
|
39
|
-
})
|
|
46
|
+
})]
|
|
40
47
|
});
|
|
41
48
|
};
|
|
42
49
|
exports.ReceivedMessage = ReceivedMessage;
|
|
@@ -44,15 +51,16 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
44
51
|
container: {
|
|
45
52
|
flex: 1,
|
|
46
53
|
flexDirection: 'row',
|
|
47
|
-
maxWidth:
|
|
48
|
-
width:
|
|
54
|
+
maxWidth: 372,
|
|
55
|
+
width: 372,
|
|
49
56
|
alignItems: 'flex-end',
|
|
50
|
-
justifyContent: 'flex-end'
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
justifyContent: 'flex-end'
|
|
58
|
+
},
|
|
59
|
+
icon: {
|
|
60
|
+
alignSelf: 'flex-end',
|
|
61
|
+
marginRight: 8
|
|
53
62
|
},
|
|
54
63
|
message: {
|
|
55
|
-
// backgroundColor: COLORS.BLUE_6,
|
|
56
64
|
flex: 1,
|
|
57
65
|
flexDirection: 'row',
|
|
58
66
|
maxWidth: 305,
|
|
@@ -65,11 +73,9 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
65
73
|
shadowOpacity: 0.25,
|
|
66
74
|
shadowRadius: 3,
|
|
67
75
|
elevation: 3,
|
|
68
|
-
borderRadius:
|
|
76
|
+
borderRadius: 8,
|
|
69
77
|
borderBottomLeftRadius: 0,
|
|
70
78
|
backgroundColor: '#F2F2F4'
|
|
71
|
-
// alignItems: 'flex-end',
|
|
72
|
-
// justifyContent: 'flex-end',
|
|
73
79
|
}
|
|
74
80
|
});
|
|
75
81
|
//# sourceMappingURL=ReceivedMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ChatbotIcon","_styleTypes","_MessageContent","_modelTypes","_jsxRuntime","e","__esModule","default","ReceivedMessage","message","isTranslated","t2sState","withIcon","colorScheme","ColorScheme","Blue","withErrorSpotting","highlightedWordIndex","TTSHighlightRenderer","text","translatedMessage","jsxs","View","style","styles","container","children","jsx","icon","ChatbotIcon","width","height","MessageContent","variant","MessageVariant","RECEIVED","exports","StyleSheet","create","flex","flexDirection","maxWidth","alignItems","justifyContent","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjD,MAAMG,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,YAAY;EACZC,QAAQ;EACRC,QAAQ;EACRC,WAAW,GAAGC,uBAAW,CAACC,IAAI;EAC9BC,iBAAiB;EACjBC,oBAAoB;EACpBC;AACY,CAAC,KAAK;EAClB,MAAMC,IAAI,GAAGT,YAAY,GAAGD,OAAO,CAACW,iBAAiB,GAAGX,OAAO,CAACA,OAAO;EAEvE,oBACE,IAAAL,WAAA,CAAAiB,IAAA,EAACtB,YAAA,CAAAuB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3Bd,QAAQ,iBACP,IAAAR,WAAA,CAAAuB,GAAA,EAAC5B,YAAA,CAAAuB,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACI,IAAK;MAAAF,QAAA,eACvB,IAAAtB,WAAA,CAAAuB,GAAA,EAAC3B,YAAA,CAAA6B,WAAW;QAACC,KAAK,EAAE,EAAG;QAACC,MAAM,EAAE;MAAG,CAAE;IAAC,CAClC,CACP,eAED,IAAA3B,WAAA,CAAAuB,GAAA,EAAC5B,YAAA,CAAAuB,IAAI;MAACC,KAAK,EAA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
|
|
34
34
|
maxWidth: 305,
|
|
35
35
|
padding: _reactNativeUi.SPACING[200],
|
|
36
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[
|
|
36
|
+
borderRadius: _reactNativeUi.BORDER_RADIUS[200],
|
|
37
37
|
borderBottomRightRadius: 0
|
|
38
38
|
},
|
|
39
39
|
text: {
|
|
@@ -4,15 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Chatbot = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _effectorReact = require("effector-react");
|
|
9
9
|
var _Chat = require("./Chat/Chat.js");
|
|
10
10
|
var _ChatControls = require("./ChatControls/ChatControls.js");
|
|
11
11
|
var _ChatBotModelContext = require("../context/ChatBotModelContext.js");
|
|
12
12
|
var _styleTypes = require("../types/style.types.js");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
15
|
const Chatbot = ({
|
|
17
16
|
model,
|
|
18
17
|
isHintFeedback,
|
|
@@ -22,30 +21,22 @@ const Chatbot = ({
|
|
|
22
21
|
ButtonWrapper,
|
|
23
22
|
iconSize,
|
|
24
23
|
colorScheme = _styleTypes.ColorScheme.Blue,
|
|
25
|
-
withQuickActionButton,
|
|
26
24
|
TTSHighlightRenderer
|
|
27
25
|
}) => {
|
|
28
|
-
const alternatives = (0, _effectorReact.useUnit)(model.$alternatives);
|
|
29
26
|
const isChatAllowed = (0, _effectorReact.useUnit)(model.$chatAccess);
|
|
30
27
|
const isAvailable = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
31
28
|
isAvailable
|
|
32
29
|
}) => isAvailable);
|
|
33
|
-
const hasBeenOpened = (0, _effectorReact.useStoreMap)(model.$currentChatData, ({
|
|
34
|
-
hasBeenOpened
|
|
35
|
-
}) => hasBeenOpened);
|
|
36
30
|
model.t2s.setAudioConfig(textToSpeechConfig ?? null);
|
|
31
|
+
const shouldAnimateCloseButton = (0, _effectorReact.useStoreMap)({
|
|
32
|
+
store: model.$currentChatData,
|
|
33
|
+
fn: (chat, [isInputDisabled]) => {
|
|
34
|
+
return isInputDisabled && chat.messages.length === 1;
|
|
35
|
+
},
|
|
36
|
+
keys: [isInputDisabled]
|
|
37
|
+
});
|
|
37
38
|
const openChat = () => model.setIsOpen(true);
|
|
38
39
|
const closeChat = () => model.setIsOpen(false);
|
|
39
|
-
const sendHelpRequest = (0, _react.useCallback)(() => {
|
|
40
|
-
const option = alternatives?.options.default[0];
|
|
41
|
-
if (!option) return;
|
|
42
|
-
model.setIsOpen(true);
|
|
43
|
-
void model.sendHelpRequestFx({
|
|
44
|
-
message: option.text,
|
|
45
|
-
translatedMessage: option.translatedText,
|
|
46
|
-
skipOwnMessage: true
|
|
47
|
-
});
|
|
48
|
-
}, [alternatives]);
|
|
49
40
|
if (!isAvailable || !isChatAllowed) {
|
|
50
41
|
return null;
|
|
51
42
|
}
|
|
@@ -58,15 +49,14 @@ const Chatbot = ({
|
|
|
58
49
|
isTextToSpeechEnabled: isTextToSpeechEnabled,
|
|
59
50
|
isInputDisabled: isInputDisabled,
|
|
60
51
|
MessageWrapper: ButtonWrapper,
|
|
61
|
-
TTSHighlightRenderer: TTSHighlightRenderer
|
|
62
|
-
onPressClose: closeChat
|
|
52
|
+
TTSHighlightRenderer: TTSHighlightRenderer
|
|
63
53
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatControls.ChatControls, {
|
|
64
54
|
model: model,
|
|
65
55
|
onPressChatIcon: openChat,
|
|
66
|
-
|
|
56
|
+
onPressClose: closeChat,
|
|
67
57
|
iconSize: iconSize,
|
|
68
58
|
ButtonWrapper: isInputDisabled ? undefined : ButtonWrapper,
|
|
69
|
-
|
|
59
|
+
shouldAnimateCloseButton: shouldAnimateCloseButton
|
|
70
60
|
})]
|
|
71
61
|
});
|
|
72
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_effectorReact","_Chat","_ChatControls","_ChatBotModelContext","_styleTypes","_jsxRuntime","e","__esModule","default","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","isInputDisabled","textToSpeechConfig","ButtonWrapper","iconSize","colorScheme","ColorScheme","Blue","TTSHighlightRenderer","isChatAllowed","useUnit","$chatAccess","isAvailable","useStoreMap","$currentChatData","t2s","setAudioConfig","shouldAnimateCloseButton","store","fn","chat","messages","length","keys","openChat","setIsOpen","closeChat","jsxs","ChatBotModelContext","Provider","value","children","jsx","Chat","MessageWrapper","ChatControls","onPressChatIcon","onPressClose","undefined","exports"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAEA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAkD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF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AEA,WAAY;MACzBN,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA,qBAAsB;MAC7CC,eAAe,EAAEA,eAAgB;MACjCiC,cAAc,EAAE/B,aAAc;MAC9BK,oBAAoB,EAAEA;IAAqB,CAC5C,CAAC,eAEF,IAAAf,WAAA,CAAAuC,GAAA,EAAC1C,aAAA,CAAA6C,YAAY;MACXrC,KAAK,EAAEA,KAAM;MACbsC,eAAe,EAAEZ,QAAS;MAC1Ba,YAAY,EAAEX,SAAU;MACxBtB,QAAQ,EAAEA,QAAS;MACnBD,aAAa,EAAEF,eAAe,GAAGqC,SAAS,GAAGnC,aAAc;MAC3Dc,wBAAwB,EAAEA;IAAyB,CACpD,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC;AAAAsB,OAAA,CAAA1C,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -45,24 +45,24 @@ const MESSAGE_COLORS_MAP = exports.MESSAGE_COLORS_MAP = {
|
|
|
45
45
|
[_modelTypes.MessageVariant.RECEIVED]: {
|
|
46
46
|
background: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
47
47
|
border: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
48
|
-
icon:
|
|
48
|
+
icon: _styleTypes.ColorScheme.Blue
|
|
49
49
|
},
|
|
50
50
|
[_modelTypes.MessageVariant.SENT]: {
|
|
51
51
|
background: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
52
52
|
border: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
53
|
-
icon:
|
|
53
|
+
icon: _styleTypes.ColorScheme.Blue
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
[_styleTypes.ColorScheme.Yellow]: {
|
|
57
57
|
[_modelTypes.MessageVariant.RECEIVED]: {
|
|
58
58
|
background: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
59
59
|
border: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
60
|
-
icon:
|
|
60
|
+
icon: _styleTypes.ColorScheme.Yellow
|
|
61
61
|
},
|
|
62
62
|
[_modelTypes.MessageVariant.SENT]: {
|
|
63
63
|
background: _reactNativeUi.COLORS.PRIMARY_YELLOW,
|
|
64
64
|
border: _reactNativeUi.COLORS.PRIMARY_YELLOW,
|
|
65
|
-
icon:
|
|
65
|
+
icon: _styleTypes.ColorScheme.Yellow
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeUi","require","_reactNative","_modelTypes","_styleTypes","AUDIO_CONFIG","exports","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","Platform","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__","MESSAGE_COLORS_MAP","ColorScheme","Blue","MessageVariant","RECEIVED","background","COLORS","NEUTRAL_3","border","icon","
|
|
1
|
+
{"version":3,"names":["_reactNativeUi","require","_reactNative","_modelTypes","_styleTypes","AUDIO_CONFIG","exports","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","Platform","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__","MESSAGE_COLORS_MAP","ColorScheme","Blue","MessageVariant","RECEIVED","background","COLORS","NEUTRAL_3","border","icon","SENT","PRIMARY_BLUE","Yellow","PRIMARY_YELLOW","CONTROLS_COLORS_MAP","hover","HOVER_ANIMATION_DURATION","WORD_MARK_REGEX"],"sourceRoot":"../../../../src","sources":["features/chatbot/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAGO,MAAMI,YAAY,GAAAC,OAAA,CAA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AAQ,GAAG;MACzBC,UAAU,EAAEC,qBAAM,CAACC,SAAS;MAC5BC,MAAM,EAAEF,qBAAM,CAACC,SAAS;MACxBE,IAAI,EAAER,uBAAW,CAACW;IACpB,CAAC;IACD,CAACT,0BAAc,CAACO,IAAI,GAAG;MACrBL,UAAU,EAAEC,qBAAM,CAACO,cAAc;MACjCL,MAAM,EAAEF,qBAAM,CAACO,cAAc;MAC7BJ,IAAI,EAAER,uBAAW,CAACW;IACpB;EACF;AACF,CAAC;AAEM,MAAME,mBAAmB,GAAA/B,OAAA,CAAA+B,mBAAA,GAAG;EACjC,CAACb,uBAAW,CAACC,IAAI,GAAG;IAClBa,KAAK,EAAET,qBAAM,CAACK,YAAY;IAC1BN,UAAU,EAAEC,qBAAM,CAACK;EACrB,CAAC;EACD,CAACV,uBAAW,CAACW,MAAM,GAAG;IACpBG,KAAK,EAAET,qBAAM,CAACO,cAAc;IAC5BR,UAAU,EAAEC,qBAAM,CAACO;EACrB;AACF,CAAC;AAEM,MAAMG,wBAAwB,GAAAjC,OAAA,CAAAiC,wBAAA,GAAG,GAAG;AAEpC,MAAMC,eAAe,GAAAlC,OAAA,CAAAkC,eAAA,GAAG,WAAW","ignoreList":[]}
|
|
@@ -53,8 +53,7 @@ function prepareChatRequestPayload(payload, threadItem) {
|
|
|
53
53
|
imageCdnId,
|
|
54
54
|
imageAltText,
|
|
55
55
|
answerOptions,
|
|
56
|
-
answer
|
|
57
|
-
chatHistory
|
|
56
|
+
answer
|
|
58
57
|
} = payload;
|
|
59
58
|
if (freeTextMessage) {
|
|
60
59
|
return conversationId ? {
|
|
@@ -62,9 +61,6 @@ function prepareChatRequestPayload(payload, threadItem) {
|
|
|
62
61
|
data: {
|
|
63
62
|
conversationId,
|
|
64
63
|
message: freeTextMessage,
|
|
65
|
-
...(chatHistory && {
|
|
66
|
-
chatHistory
|
|
67
|
-
}),
|
|
68
64
|
...(!!problemStandards?.length && {
|
|
69
65
|
problemStandards
|
|
70
66
|
})
|
|
@@ -76,9 +72,6 @@ function prepareChatRequestPayload(payload, threadItem) {
|
|
|
76
72
|
correctAnswer: problemAnswer,
|
|
77
73
|
problemDescription,
|
|
78
74
|
language,
|
|
79
|
-
...(chatHistory && {
|
|
80
|
-
chatHistory
|
|
81
|
-
}),
|
|
82
75
|
...(imageCdnId && {
|
|
83
76
|
imageCdnId
|
|
84
77
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeUi","require","_constants","_index","_modelTypes","decodeHTMLEntities","input","replace","exports","replaceKatexSyntax","texts","reverse","replacements","Object","entries","KATEX_REPLACEMENTS_REVERSE","KATEX_REPLACEMENTS","map","text","reduce","newText","pattern","placeholder","RegExp","transformAlternatives","payload","isOpenChatEnabled","IS_WEB","options","default","t","promptKey","translatedText","hints","prepareChatRequestPayload","threadItem","conversationId","freeTextMessage","problemDescription","problemStandards","problemAnswer","language","imageCdnId","imageAltText","answerOptions","answer","
|
|
1
|
+
{"version":3,"names":["_reactNativeUi","require","_constants","_index","_modelTypes","decodeHTMLEntities","input","replace","exports","replaceKatexSyntax","texts","reverse","replacements","Object","entries","KATEX_REPLACEMENTS_REVERSE","KATEX_REPLACEMENTS","map","text","reduce","newText","pattern","placeholder","RegExp","transformAlternatives","payload","isOpenChatEnabled","IS_WEB","options","default","t","promptKey","translatedText","hints","prepareChatRequestPayload","threadItem","conversationId","freeTextMessage","problemDescription","problemStandards","problemAnswer","language","imageCdnId","imageAltText","answerOptions","answer","type","ChatRequestType","FREETEXT","data","message","length","correctAnswer","altText","HINT","getNextHintProps","userAnswer"],"sourceRoot":"../../../../src","sources":["features/chatbot/helpers.ts"],"mappings":";;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AALA;;AAOO,MAAMI,kBAAkB,GAAIC,KAAa,IAAK;EACnD,OAAOA,KAAK,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AAGd,UAAU,CAACoB,gBAAgB,CAAC,CAAC;MAChCH,aAAa,EAAEZ,aAAa;MAC5BF,kBAAkB;MAClBkB,UAAU,EAAEX,MAAM;MAClBJ,QAAQ;MACR,IAAIC,UAAU,IAAI;QAAEA;MAAW,CAAC,CAAC;MACjC,IAAIC,YAAY,IAAI;QAAEU,OAAO,EAAEV;MAAa,CAAC,CAAC;MAC9C,IAAI,CAAC,CAACJ,gBAAgB,EAAEY,MAAM,IAAI;QAAEZ;MAAiB,CAAC;IACxD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator","_styleTypes"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_Chatbot","require","_ChatBotModel","_t2sTypes","_modelTypes","_DefaultMessageCreator","_styleTypes"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAOA,IAAAI,sBAAA,GAAAJ,OAAA;AAGA,IAAAK,WAAA,GAAAL,OAAA","ignoreList":[]}
|
|
@@ -30,7 +30,6 @@ class ChatbotModel {
|
|
|
30
30
|
unbindCurrentKey = null;
|
|
31
31
|
resetAlternatives = (0, _effector.createEvent)();
|
|
32
32
|
setAlternatives = (0, _effector.createEvent)();
|
|
33
|
-
$alternatives = (0, _effector.createStore)(null);
|
|
34
33
|
setIsOpen = (0, _effector.createEvent)();
|
|
35
34
|
toggleOpen = (0, _effector.createEvent)();
|
|
36
35
|
$isOpen = (0, _effector.restore)(this.setIsOpen, false).on(this.toggleOpen, isOpen => !isOpen);
|
|
@@ -75,7 +74,7 @@ class ChatbotModel {
|
|
|
75
74
|
if (threadMessagesLimit) {
|
|
76
75
|
this.threadManager.setMessagesLimit(threadMessagesLimit);
|
|
77
76
|
}
|
|
78
|
-
this.$alternatives.on(this.api.getAlternativesFx.doneData, (_, payload) => (0, _helpers.transformAlternatives)(payload)).on(this.setAlternatives, (_, payload) => (0, _helpers.transformAlternatives)(payload)).reset(this.resetAlternatives);
|
|
77
|
+
this.$alternatives = (0, _effector.createStore)(null).on(this.api.getAlternativesFx.doneData, (_, payload) => (0, _helpers.transformAlternatives)(payload)).on(this.setAlternatives, (_, payload) => (0, _helpers.transformAlternatives)(payload)).reset(this.resetAlternatives);
|
|
79
78
|
this.translation = new _ChatbotTranslation.ChatbotTranslation({
|
|
80
79
|
$context: this.$context,
|
|
81
80
|
defaultMessages: this.defaultMessages,
|
|
@@ -100,28 +99,6 @@ class ChatbotModel {
|
|
|
100
99
|
filter: isOpen => !isOpen,
|
|
101
100
|
target: [this.t2s.reset, this.errorSpotting.spottingHidden]
|
|
102
101
|
});
|
|
103
|
-
(0, _effector.sample)({
|
|
104
|
-
clock: this.$isOpen.updates,
|
|
105
|
-
filter: isOpen => !isOpen,
|
|
106
|
-
fn: () => false,
|
|
107
|
-
target: this.setScrollActive
|
|
108
|
-
});
|
|
109
|
-
(0, _effector.sample)({
|
|
110
|
-
clock: this.setIsOpen,
|
|
111
|
-
source: this.$currentChatData,
|
|
112
|
-
filter: ({
|
|
113
|
-
hasBeenOpened
|
|
114
|
-
}, isOpen) => isOpen && !hasBeenOpened,
|
|
115
|
-
fn: ({
|
|
116
|
-
key
|
|
117
|
-
}) => ({
|
|
118
|
-
key,
|
|
119
|
-
data: {
|
|
120
|
-
hasBeenOpened: true
|
|
121
|
-
}
|
|
122
|
-
}),
|
|
123
|
-
target: this.cache.update
|
|
124
|
-
});
|
|
125
102
|
(0, _effector.sample)({
|
|
126
103
|
clock: this.removeLastMessage,
|
|
127
104
|
source: [this.$lastMessageKey, this.cache.$data],
|
|
@@ -201,8 +178,7 @@ class ChatbotModel {
|
|
|
201
178
|
source: {
|
|
202
179
|
key: this.$currentKey,
|
|
203
180
|
context: this.$context,
|
|
204
|
-
cache: this.cache.$data
|
|
205
|
-
alternatives: this.$alternatives
|
|
181
|
+
cache: this.cache.$data
|
|
206
182
|
},
|
|
207
183
|
mapParams: (params, source) => ({
|
|
208
184
|
...params,
|
|
@@ -214,40 +190,28 @@ class ChatbotModel {
|
|
|
214
190
|
key,
|
|
215
191
|
context,
|
|
216
192
|
isFreeText,
|
|
217
|
-
|
|
218
|
-
cache,
|
|
219
|
-
alternatives
|
|
193
|
+
cache
|
|
220
194
|
}) => {
|
|
221
195
|
if (!context) throw new Error('Trying to send message in chat without context');
|
|
222
196
|
this.setLastMessageKey(key);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
translatedMessage
|
|
230
|
-
})]
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
const chatHistory = context.assignmentId && context.problemId ? {
|
|
234
|
-
exerciseId: context.assignmentId,
|
|
235
|
-
problemId: context.problemId,
|
|
236
|
-
chatVersion: alternatives?.version
|
|
237
|
-
} : undefined;
|
|
197
|
+
this.cache.addMessages(key, {
|
|
198
|
+
messages: [_messagesHelper.messagesHelper.createOwn({
|
|
199
|
+
message,
|
|
200
|
+
translatedMessage
|
|
201
|
+
})]
|
|
202
|
+
});
|
|
238
203
|
|
|
239
204
|
// Request is overridden by ThreadManager.postMessage (delegates to sendMessage/getHint)
|
|
240
205
|
const response = await this.api.postMessageFx({
|
|
241
206
|
answer: context.answer,
|
|
242
207
|
answerOptions: context.answerOptions,
|
|
243
|
-
problemDescription: context.
|
|
208
|
+
problemDescription: context.problem,
|
|
244
209
|
problemStandards: context.problemStandards,
|
|
245
210
|
problemAnswer: context.problemAnswer,
|
|
246
211
|
language: context.language,
|
|
247
212
|
imageAltText: context.imageDescription,
|
|
248
213
|
imageCdnId: context.imageCdnId,
|
|
249
214
|
conversationId: cache[key].conversationId,
|
|
250
|
-
chatHistory,
|
|
251
215
|
...(isFreeText && {
|
|
252
216
|
freeTextMessage: message
|
|
253
217
|
})
|