@magmamath/students-features 0.11.0-rc.9 → 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 +59 -221
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +58 -45
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- 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/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +34 -14
- 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 +13 -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/ChatBoxTextManager.js +1 -2
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.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/ChatbotTranslation.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.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 +18 -2
- package/dist/commonjs/shared/translation/localization/de.json +18 -2
- package/dist/commonjs/shared/translation/localization/en.json +18 -2
- package/dist/commonjs/shared/translation/localization/gb.json +18 -2
- package/dist/commonjs/shared/translation/localization/sct.json +18 -2
- package/dist/commonjs/shared/translation/localization/sw.json +18 -2
- package/dist/module/features/chatbot/components/Chat/Chat.js +61 -223
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +59 -47
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
- 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/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +36 -17
- 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 +12 -13
- 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/ChatBoxTextManager.js +1 -2
- package/dist/module/features/chatbot/model/ChatBoxTextManager.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/ChatbotTranslation.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.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 +18 -2
- package/dist/module/shared/translation/localization/de.json +18 -2
- package/dist/module/shared/translation/localization/en.json +18 -2
- package/dist/module/shared/translation/localization/gb.json +18 -2
- package/dist/module/shared/translation/localization/sct.json +18 -2
- package/dist/module/shared/translation/localization/sw.json +18 -2
- 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 -1
- 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 +3 -2
- 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.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/ChatBoxTextManager.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 -8
- 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 -6
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -2
- 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 -1
- 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 +3 -2
- 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.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/ChatBoxTextManager.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 -8
- 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 -6
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +34 -2
- 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 -6
- package/src/features/chatbot/components/Chat/Chat.tsx +70 -288
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +66 -46
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -2
- 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 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +33 -17
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +12 -13
- 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/ChatBoxTextManager.ts +0 -1
- package/src/features/chatbot/model/ChatbotApi.ts +1 -1
- package/src/features/chatbot/model/ChatbotTranslation.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 -8
- 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 +18 -2
- package/src/shared/translation/localization/de.json +18 -2
- package/src/shared/translation/localization/en.json +18 -2
- package/src/shared/translation/localization/gb.json +18 -2
- package/src/shared/translation/localization/sct.json +18 -2
- package/src/shared/translation/localization/sw.json +18 -2
- 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/Chat/GradientFade.js +0 -44
- package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -41
- 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/Chat/GradientFade.js +0 -39
- package/dist/module/features/chatbot/components/Chat/GradientFade.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -34
- 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/Chat/GradientFade.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.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/Chat/GradientFade.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.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/Chat/GradientFade.tsx +0 -43
- package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +0 -30
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","StyleSheet","React","memo","Animated","useSharedValue","withTiming","useAnimatedStyle","interpolateColor","ArrowRightIcon","ArrowUpIcon","COLORS","FONT_FAMILY","SPACING","ColorScheme","MESSAGE_COLORS_MAP","jsx","_jsx","jsxs","_jsxs","HintButtonVariant","HOVER_ANIMATION_DURATION","REQUEST_HINT_BUTTON","DEFAULT","width","fontSize","SHORT","RequestHintButton","onPress","label","disabled","colorScheme","Blue","variant","hoverSv","onHoverIn","value","duration","onHoverOut","animatedTextContainerStyle","backgroundColor","NEUTRAL_2","borderColor","NEUTRAL_5","defaultBorderColor","NEUTRAL_1","sent","border","background","animatedTextStyle","color","NEUTRAL_10","iconColor","style","styles","button","cursor","accessibilityState","accessibilityRole","children","View","content","Text","numberOfLines","text","iconWrapper","size","create","flexDirection","justifyContent","fontWeight","fontFamily","buenosAires","height","flex","alignItems","paddingHorizontal","borderWidth","borderRadius","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","PRIMARY_BLUE","top"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/RequestHintButton.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,OAAOC,QAAQ,IACbC,cAAc,EACdC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SACEC,cAAc,EACdC,WAAW,EACXC,MAAM,EACNC,WAAW,
|
|
1
|
+
{"version":3,"names":["Pressable","StyleSheet","React","memo","Animated","useSharedValue","withTiming","useAnimatedStyle","interpolateColor","ArrowRightIcon","ArrowUpIcon","COLORS","FONT_FAMILY","SPACING","ColorScheme","MESSAGE_COLORS_MAP","jsx","_jsx","jsxs","_jsxs","HintButtonVariant","HOVER_ANIMATION_DURATION","REQUEST_HINT_BUTTON","DEFAULT","width","fontSize","SHORT","RequestHintButton","onPress","label","disabled","colorScheme","Blue","variant","hoverSv","onHoverIn","value","duration","onHoverOut","animatedTextContainerStyle","backgroundColor","NEUTRAL_2","borderColor","NEUTRAL_5","defaultBorderColor","NEUTRAL_1","sent","border","background","animatedTextStyle","color","NEUTRAL_10","iconColor","style","styles","button","cursor","accessibilityState","accessibilityRole","children","View","content","Text","numberOfLines","text","iconWrapper","size","create","flexDirection","justifyContent","fontWeight","fontFamily","buenosAires","height","flex","alignItems","paddingHorizontal","borderWidth","borderRadius","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","PRIMARY_BLUE","top"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatInput/RequestHintButton.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,KAAK,IAAIC,IAAI,QAAQ,OAAO;A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GAAGrD,UAAU,CAACkE,MAAM,CAAC;EAC/BZ,MAAM,EAAE;IACNa,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDL,IAAI,EAAE;IACJM,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE3D,WAAW,CAAC4D,WAAW;IACnCtB,KAAK,EAAEvC,MAAM,CAACwC;EAChB,CAAC;EACDU,OAAO,EAAE;IACPY,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE,CAAC;IACPN,aAAa,EAAE,KAAK;IACpBO,UAAU,EAAE,QAAQ;IACpBN,cAAc,EAAE,eAAe;IAC/BO,iBAAiB,EAAE/D,OAAO,CAAC,GAAG,CAAC;IAC/BgE,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE,CAAC;IACZC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEzD,KAAK,EAAE,CAAC;MAAEiD,MAAM,EAAE;IAAE,CAAC;IACrCS,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACf3C,eAAe,EAAE7B,MAAM,CAACyE,YAAY;IACpC1C,WAAW,EAAE/B,MAAM,CAACyE;EACtB,CAAC;EACDnB,WAAW,EAAE;IACXoB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","IS_WEB","ErrorSpottingButton","MessageTextToSpeech","jsx","_jsx","jsxs","_jsxs","MessageButtonsBlock","t2sState","message","variant","colorScheme","withErrorSpotting","isEnabled","isInitial","style","styles","container","children","contextMessage","state","create","flexDirection","gap","marginLeft","float","position","bottom","right"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,mBAAmB,QAAQ,4CAAyC;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","IS_WEB","ErrorSpottingButton","MessageTextToSpeech","jsx","_jsx","jsxs","_jsxs","MessageButtonsBlock","t2sState","message","variant","colorScheme","withErrorSpotting","isEnabled","isInitial","style","styles","container","children","contextMessage","state","create","flexDirection","gap","marginLeft","float","position","bottom","right"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,4BAA4B;AAEnD,SAASC,mBAAmB,QAAQ,4CAAyC;AAM7E,SAASC,mBAAmB,QAAQ,0BAAuB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAU3D,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,QAAQ;EACRC,OAAO;EACPC,OAAO;EACPC,WAAW;EACXC;AACwB,CAAC,KAAK;EAC9B,IAAI,CAACJ,QAAQ,CAACK,SAAS,IAAI,CAACJ,OAAO,CAACK,SAAS,EAAE,OAAO,IAAI;EAE1D,oBACER,KAAA,CAACP,IAAI;IAACgB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,GAC3BN,iBAAiB,IAAI,CAAC,CAACH,OAAO,CAACK,SAAS,iBAAIV,IAAA,CAACH,mBAAmB;MAACkB,cAAc,EAAEV;IAAQ,CAAE,CAAC,EAC5FD,QAAQ,CAACK,SAAS,iBACjBT,IAAA,CAACF,mBAAmB;MAClBkB,KAAK,EAAEZ,QAAS;MAChBC,OAAO,EAAEA,OAAQ;MACjBC,OAAO,EAAEA,OAAQ;MACjBC,WAAW,EAAEA;IAAY,CAC1B,CACF;EAAA,CACG,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGlB,UAAU,CAACuB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAE,CAAC;IACNC,UAAU,EAAE,MAAM;IAClB,IAAIxB,MAAM,GACN;MAAEyB,KAAK,EAAE;IAAQ,CAAC,GAClB;MACEC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,CAAC;MACTC,KAAK,EAAE;IACT,CAAC;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,30 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
6
|
+
import { ThreeDotsLoader } from "../ThreeDotsLoader/ThreeDotsLoader.js";
|
|
7
|
+
import { CONTROLS_COLORS_MAP } from "../../constants.js";
|
|
8
|
+
import { ColorScheme } from "../../types/style.types.js";
|
|
9
|
+
import { LavaIconInGlasses } from '@magmamath/students-features';
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
11
|
export const MessageLoader = ({
|
|
9
|
-
|
|
10
|
-
}) => {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
colorScheme = ColorScheme.Blue
|
|
13
|
+
}) => /*#__PURE__*/_jsxs(View, {
|
|
14
|
+
style: styles.container,
|
|
15
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
16
|
+
style: styles.icon,
|
|
17
|
+
children: /*#__PURE__*/_jsx(LavaIconInGlasses, {
|
|
18
|
+
width: 60,
|
|
19
|
+
height: 80
|
|
20
|
+
})
|
|
21
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
13
22
|
style: styles.loader,
|
|
14
|
-
children: /*#__PURE__*/_jsx(
|
|
15
|
-
|
|
23
|
+
children: /*#__PURE__*/_jsx(ThreeDotsLoader, {
|
|
24
|
+
backgroundColor: CONTROLS_COLORS_MAP[colorScheme].background
|
|
16
25
|
})
|
|
17
|
-
})
|
|
18
|
-
};
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
19
28
|
const styles = StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
width: 327,
|
|
32
|
+
alignItems: 'flex-end',
|
|
33
|
+
paddingLeft: 70
|
|
34
|
+
},
|
|
35
|
+
icon: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
zIndex: 1,
|
|
38
|
+
alignSelf: 'flex-end',
|
|
39
|
+
left: 0
|
|
40
|
+
},
|
|
20
41
|
loader: {
|
|
21
|
-
|
|
22
|
-
alignSelf: 'flex-start',
|
|
23
|
-
marginTop: SPACING['200'],
|
|
42
|
+
flex: 1,
|
|
24
43
|
flexDirection: 'row',
|
|
25
44
|
alignItems: 'flex-start',
|
|
26
|
-
|
|
27
|
-
maxWidth: 62,
|
|
45
|
+
maxWidth: 70,
|
|
28
46
|
padding: 8,
|
|
47
|
+
paddingTop: 15,
|
|
29
48
|
shadowColor: '#333333',
|
|
30
49
|
shadowOffset: {
|
|
31
50
|
width: 0,
|
|
@@ -34,7 +53,7 @@ const styles = StyleSheet.create({
|
|
|
34
53
|
shadowOpacity: 0.25,
|
|
35
54
|
shadowRadius: 3,
|
|
36
55
|
elevation: 3,
|
|
37
|
-
borderRadius:
|
|
56
|
+
borderRadius: 8,
|
|
38
57
|
borderBottomLeftRadius: 0,
|
|
39
58
|
backgroundColor: COLORS.NEUTRAL_3
|
|
40
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","COLORS","ThreeDotsLoader","CONTROLS_COLORS_MAP","ColorScheme","LavaIconInGlasses","jsx","_jsx","jsxs","_jsxs","MessageLoader","colorScheme","Blue","style","styles","container","children","icon","width","height","loader","backgroundColor","background","create","flexDirection","alignItems","paddingLeft","position","zIndex","alignSelf","left","flex","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","NEUTRAL_3"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,4BAA4B;AAGnD,SAASC,eAAe,QAAQ,uCAAoC;AACpE,SAASC,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SAASC,iBAAiB,QAAQ,8BAA8B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhE,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC,WAAW,GAAGP,WAAW,CAACQ;AAAyB,CAAC,kBAClFH,KAAA,CAACT,IAAI;EAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5BT,IAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACG,IAAK;IAAAD,QAAA,eACvBT,IAAA,CAACF,iBAAiB;MAACa,KAAK,EAAE,EAAG;MAACC,MAAM,EAAE;IAAG,CAAE;EAAC,CACxC,CAAC,eACPZ,IAAA,CAACP,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACM,MAAO;IAAAJ,QAAA,eACzBT,IAAA,CAACL,eAAe;MAACmB,eAAe,EAAElB,mBAAmB,CAACQ,WAAW,CAAC,CAACW;IAAW,CAAE;EAAC,CAC7E,CAAC;AAAA,CACH,CACP;AAED,MAAMR,MAAM,GAAGf,UAAU,CAACwB,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,aAAa,EAAE,KAAK;IACpBN,KAAK,EAAE,GAAG;IACVO,UAAU,EAAE,UAAU;IACtBC,WAAW,EAAC;EACd,CAAC;EACDT,IAAI,EAAE;IACJU,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAC,CAAC;IACRC,SAAS,EAAE,UAAU;IACrBC,IAAI,EAAE;EACR,CAAC;EACDV,MAAM,EAAE;IACNW,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;MAAElB,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCkB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBpB,eAAe,EAAEpB,MAAM,CAACyC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,68 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { ActivityIndicator } from 'react-native';
|
|
5
|
-
import { Button, COLORS } from '@magmamath/react-native-ui';
|
|
6
|
-
import { SpeakerIcon } from "../../../../shared/icons/SpeakerIcon.js";
|
|
7
|
-
import { PlayIcon } from "../../../../shared/icons/PlayIcon.js";
|
|
8
|
-
import { PauseIcon } from "../../../../shared/icons/PauseIcon.js";
|
|
9
4
|
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
5
|
+
import { PlayButton } from "../../../../shared/components/PlayButton.js";
|
|
10
6
|
import { ColorScheme } from "../../types/style.types.js";
|
|
11
|
-
import {
|
|
7
|
+
import { MESSAGE_COLORS_MAP } from "../../constants.js";
|
|
12
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const TextToSpeechIcon = ({
|
|
14
|
-
status,
|
|
15
|
-
isActive,
|
|
16
|
-
isLoading,
|
|
17
|
-
colorScheme = ColorScheme.Blue
|
|
18
|
-
}) => {
|
|
19
|
-
if (isLoading && isActive) {
|
|
20
|
-
return /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
21
|
-
color: CONTROLS_COLORS_MAP[colorScheme].background
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
if (!isActive) {
|
|
25
|
-
return /*#__PURE__*/_jsx(SpeakerIcon, {});
|
|
26
|
-
}
|
|
27
|
-
if (status === 'playing') return /*#__PURE__*/_jsx(PauseIcon, {
|
|
28
|
-
color: COLORS.NEUTRAL_1
|
|
29
|
-
});
|
|
30
|
-
if (status === 'paused') return /*#__PURE__*/_jsx(PlayIcon, {
|
|
31
|
-
color: COLORS.NEUTRAL_1
|
|
32
|
-
});
|
|
33
|
-
return /*#__PURE__*/_jsx(SpeakerIcon, {});
|
|
34
|
-
};
|
|
35
9
|
export const MessageTextToSpeech = ({
|
|
36
|
-
state
|
|
37
|
-
status,
|
|
38
|
-
disabled,
|
|
39
|
-
isActive,
|
|
40
|
-
isLoading
|
|
41
|
-
},
|
|
42
|
-
message,
|
|
10
|
+
state,
|
|
43
11
|
variant,
|
|
12
|
+
message,
|
|
44
13
|
colorScheme = ColorScheme.Blue
|
|
45
14
|
}) => {
|
|
46
15
|
const model = useChatModel();
|
|
47
|
-
|
|
16
|
+
const play = () => {
|
|
48
17
|
void model.t2s.play({
|
|
49
18
|
isTranslated: model.translation.$isTranslated.getState(),
|
|
50
19
|
message
|
|
51
20
|
});
|
|
52
|
-
}
|
|
53
|
-
return /*#__PURE__*/_jsx(
|
|
54
|
-
disabled: disabled,
|
|
55
|
-
isActive: isActive,
|
|
56
|
-
variant: 'secondary',
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/_jsx(PlayButton, {
|
|
57
23
|
colorScheme: MESSAGE_COLORS_MAP[colorScheme][variant].icon,
|
|
58
|
-
|
|
59
|
-
onPress: play
|
|
60
|
-
icon: /*#__PURE__*/_jsx(TextToSpeechIcon, {
|
|
61
|
-
isActive: isActive,
|
|
62
|
-
isLoading: isLoading,
|
|
63
|
-
status: status,
|
|
64
|
-
colorScheme: colorScheme
|
|
65
|
-
})
|
|
24
|
+
state: state,
|
|
25
|
+
onPress: play
|
|
66
26
|
});
|
|
67
27
|
};
|
|
68
28
|
//# sourceMappingURL=MessageTextToSpeech.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","useChatModel","PlayButton","ColorScheme","MESSAGE_COLORS_MAP","jsx","_jsx","MessageTextToSpeech","state","variant","message","colorScheme","Blue","model","play","t2s","isTranslated","translation","$isTranslated","getState","icon","onPress"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,sCAAmC;AAChE,SAASC,UAAU,QAAQ,6CAA0C;AAIrE,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SAASC,kBAAkB,QAAQ,oBAAiB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASpD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAClCC,KAAK;EACLC,OAAO;EACPC,OAAO;EACPC,WAAW,GAAGR,WAAW,CAACS;AACF,CAAC,KAAK;EAC9B,MAAMC,KAAK,GAAGZ,YAAY,CAAC,CAAC;EAE5B,MAAMa,IAAI,GAAGA,CAAA,KAAM;IACjB,KAAKD,KAAK,CAACE,GAAG,CAACD,IAAI,CAAC;MAClBE,YAAY,EAAEH,KAAK,CAACI,WAAW,CAACC,aAAa,CAACC,QAAQ,CAAC,CAAC;MACxDT;IACF,CAAC,CAAC;EACJ,CAAC;EAED,oBACEJ,IAAA,CAACJ,UAAU;IACTS,WAAW,EAAEP,kBAAkB,CAACO,WAAW,CAAC,CAACF,OAAO,CAAC,CAACW,IAAK;IAC3DZ,KAAK,EAAEA,KAAM;IACba,OAAO,EAAEP;EAAK,CACf,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
import {
|
|
6
|
-
import { ChatbotIcon } from '@magmamath/students-features';
|
|
5
|
+
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
7
6
|
import { ColorScheme } from "../../types/style.types.js";
|
|
8
|
-
import { MessageVariant } from "../../types/model.types.js";
|
|
9
7
|
import { MessageContent } from "./MessageContent.js";
|
|
8
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
10
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
export const ReceivedMessage = ({
|
|
12
11
|
message,
|
|
@@ -24,8 +23,8 @@ export const ReceivedMessage = ({
|
|
|
24
23
|
children: [withIcon && /*#__PURE__*/_jsx(View, {
|
|
25
24
|
style: styles.icon,
|
|
26
25
|
children: /*#__PURE__*/_jsx(ChatbotIcon, {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
26
|
+
width: 60,
|
|
27
|
+
height: 80
|
|
29
28
|
})
|
|
30
29
|
}), /*#__PURE__*/_jsx(View, {
|
|
31
30
|
style: styles.message,
|
|
@@ -46,11 +45,14 @@ const styles = StyleSheet.create({
|
|
|
46
45
|
container: {
|
|
47
46
|
flex: 1,
|
|
48
47
|
flexDirection: 'row',
|
|
49
|
-
maxWidth:
|
|
50
|
-
width:
|
|
48
|
+
maxWidth: 372,
|
|
49
|
+
width: 372,
|
|
51
50
|
alignItems: 'flex-end',
|
|
52
|
-
justifyContent: 'flex-end'
|
|
53
|
-
|
|
51
|
+
justifyContent: 'flex-end'
|
|
52
|
+
},
|
|
53
|
+
icon: {
|
|
54
|
+
alignSelf: 'flex-end',
|
|
55
|
+
marginRight: 8
|
|
54
56
|
},
|
|
55
57
|
message: {
|
|
56
58
|
flex: 1,
|
|
@@ -65,12 +67,9 @@ const styles = StyleSheet.create({
|
|
|
65
67
|
shadowOpacity: 0.25,
|
|
66
68
|
shadowRadius: 3,
|
|
67
69
|
elevation: 3,
|
|
68
|
-
borderRadius:
|
|
70
|
+
borderRadius: 8,
|
|
69
71
|
borderBottomLeftRadius: 0,
|
|
70
72
|
backgroundColor: '#F2F2F4'
|
|
71
|
-
},
|
|
72
|
-
icon: {
|
|
73
|
-
paddingRight: SPACING[200]
|
|
74
73
|
}
|
|
75
74
|
});
|
|
76
75
|
//# sourceMappingURL=ReceivedMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","ColorScheme","MessageContent","MessageVariant","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","isTranslated","t2sState","withIcon","colorScheme","Blue","withErrorSpotting","highlightedWordIndex","TTSHighlightRenderer","text","translatedMessage","style","styles","container","children","icon","width","height","variant","RECEIVED","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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAG/C,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,YAAY;EACZC,QAAQ;EACRC,QAAQ;EACRC,WAAW,GAAGZ,WAAW,CAACa,IAAI;EAC9BC,iBAAiB;EACjBC,oBAAoB;EACpBC;AACY,CAAC,KAAK;EAClB,MAAMC,IAAI,GAAGR,YAAY,G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;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCc,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import { useStoreMap, useUnit } from 'effector-react';
|
|
5
5
|
import { Chat } from "./Chat/Chat.js";
|
|
6
6
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
@@ -16,30 +16,22 @@ export const Chatbot = ({
|
|
|
16
16
|
ButtonWrapper,
|
|
17
17
|
iconSize,
|
|
18
18
|
colorScheme = ColorScheme.Blue,
|
|
19
|
-
withQuickActionButton,
|
|
20
19
|
TTSHighlightRenderer
|
|
21
20
|
}) => {
|
|
22
|
-
const alternatives = useUnit(model.$alternatives);
|
|
23
21
|
const isChatAllowed = useUnit(model.$chatAccess);
|
|
24
22
|
const isAvailable = useStoreMap(model.$currentChatData, ({
|
|
25
23
|
isAvailable
|
|
26
24
|
}) => isAvailable);
|
|
27
|
-
const hasBeenOpened = useStoreMap(model.$currentChatData, ({
|
|
28
|
-
hasBeenOpened
|
|
29
|
-
}) => hasBeenOpened);
|
|
30
25
|
model.t2s.setAudioConfig(textToSpeechConfig ?? null);
|
|
26
|
+
const shouldAnimateCloseButton = useStoreMap({
|
|
27
|
+
store: model.$currentChatData,
|
|
28
|
+
fn: (chat, [isInputDisabled]) => {
|
|
29
|
+
return isInputDisabled && chat.messages.length === 1;
|
|
30
|
+
},
|
|
31
|
+
keys: [isInputDisabled]
|
|
32
|
+
});
|
|
31
33
|
const openChat = () => model.setIsOpen(true);
|
|
32
34
|
const closeChat = () => model.setIsOpen(false);
|
|
33
|
-
const sendHelpRequest = useCallback(() => {
|
|
34
|
-
const option = alternatives?.options.default[0];
|
|
35
|
-
if (!option) return;
|
|
36
|
-
model.setIsOpen(true);
|
|
37
|
-
void model.sendHelpRequestFx({
|
|
38
|
-
message: option.text,
|
|
39
|
-
translatedMessage: option.translatedText,
|
|
40
|
-
skipOwnMessage: true
|
|
41
|
-
});
|
|
42
|
-
}, [alternatives]);
|
|
43
35
|
if (!isAvailable || !isChatAllowed) {
|
|
44
36
|
return null;
|
|
45
37
|
}
|
|
@@ -52,15 +44,14 @@ export const Chatbot = ({
|
|
|
52
44
|
isTextToSpeechEnabled: isTextToSpeechEnabled,
|
|
53
45
|
isInputDisabled: isInputDisabled,
|
|
54
46
|
MessageWrapper: ButtonWrapper,
|
|
55
|
-
TTSHighlightRenderer: TTSHighlightRenderer
|
|
56
|
-
onPressClose: closeChat
|
|
47
|
+
TTSHighlightRenderer: TTSHighlightRenderer
|
|
57
48
|
}), /*#__PURE__*/_jsx(ChatControls, {
|
|
58
49
|
model: model,
|
|
59
50
|
onPressChatIcon: openChat,
|
|
60
|
-
|
|
51
|
+
onPressClose: closeChat,
|
|
61
52
|
iconSize: iconSize,
|
|
62
53
|
ButtonWrapper: isInputDisabled ? undefined : ButtonWrapper,
|
|
63
|
-
|
|
54
|
+
shouldAnimateCloseButton: shouldAnimateCloseButton
|
|
64
55
|
})]
|
|
65
56
|
});
|
|
66
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","useStoreMap","useUnit","Chat","ChatControls","ChatBotModelContext","ColorScheme","jsx","_jsx","jsxs","_jsxs","Chatbot","model","isHintFeedback","isTextToSpeechEnabled","isInputDisabled","textToSpeechConfig","ButtonWrapper","iconSize","colorScheme","Blue","TTSHighlightRenderer","isChatAllowed","$chatAccess","isAvailable","$currentChatData","t2s","setAudioConfig","shouldAnimateCloseButton","store","fn","chat","messages","length","keys","openChat","setIsOpen","closeChat","Provider","value","children","MessageWrapper","onPressChatIcon","onPressClose","undefined"],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C;EAE9C,IAAI,CAACZ,WAAW,IAAI,CAACF,aAAa,EAAE;IAClC,OAAO,IAAI;EACb;EAEA,oBACEZ,KAAA,CAACL,mBAAmB,CAACiC,QAAQ;IAACC,KAAK,EAAE3B,KAAM;IAAA4B,QAAA,gBACzChC,IAAA,CAACL,IAAI;MACHS,KAAK,EAAEA,KAAM;MACbO,WAAW,EAAEA,WAAY;MACzBN,cAAc,EAAEA,cAAe;MAC/BC,qBAAqB,EAAEA,qBAAsB;MAC7CC,eAAe,EAAEA,eAAgB;MACjC0B,cAAc,EAAExB,aAAc;MAC9BI,oBAAoB,EAAEA;IAAqB,CAC5C,CAAC,eAEFb,IAAA,CAACJ,YAAY;MACXQ,KAAK,EAAEA,KAAM;MACb8B,eAAe,EAAEP,QAAS;MAC1BQ,YAAY,EAAEN,SAAU;MACxBnB,QAAQ,EAAEA,QAAS;MACnBD,aAAa,EAAEF,eAAe,GAAG6B,SAAS,GAAG3B,aAAc;MAC3DW,wBAAwB,EAAEA;IAAyB,CACpD,CAAC;EAAA,CAC0B,CAAC;AAEnC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { COLORS } from '@magmamath/react-native-ui';
|
|
4
4
|
import { Platform } from 'react-native';
|
|
5
5
|
import { MessageVariant } from "./types/model.types.js";
|
|
6
6
|
import { ColorScheme } from "./types/style.types.js";
|
|
@@ -41,24 +41,24 @@ export const MESSAGE_COLORS_MAP = {
|
|
|
41
41
|
[MessageVariant.RECEIVED]: {
|
|
42
42
|
background: COLORS.NEUTRAL_3,
|
|
43
43
|
border: COLORS.NEUTRAL_3,
|
|
44
|
-
icon:
|
|
44
|
+
icon: ColorScheme.Blue
|
|
45
45
|
},
|
|
46
46
|
[MessageVariant.SENT]: {
|
|
47
47
|
background: COLORS.PRIMARY_BLUE,
|
|
48
48
|
border: COLORS.PRIMARY_BLUE,
|
|
49
|
-
icon:
|
|
49
|
+
icon: ColorScheme.Blue
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
[ColorScheme.Yellow]: {
|
|
53
53
|
[MessageVariant.RECEIVED]: {
|
|
54
54
|
background: COLORS.NEUTRAL_3,
|
|
55
55
|
border: COLORS.NEUTRAL_3,
|
|
56
|
-
icon:
|
|
56
|
+
icon: ColorScheme.Yellow
|
|
57
57
|
},
|
|
58
58
|
[MessageVariant.SENT]: {
|
|
59
59
|
background: COLORS.PRIMARY_YELLOW,
|
|
60
60
|
border: COLORS.PRIMARY_YELLOW,
|
|
61
|
-
icon:
|
|
61
|
+
icon: ColorScheme.Yellow
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["COLORS","Platform","MessageVariant","ColorScheme","AUDIO_CONFIG","audioEncoding","pitch","speakingRate","DEFAULT_VOICE","languageCode","name","TEXT_TO_SPEECH_CONFIG","select","ios","audioConfig","voice","default","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","__KATEX_DOLLAR_SYMBOL__","MESSAGE_COLORS_MAP","Blue","RECEIVED","background","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,SAAsBA,MAAM,QAAQ,4BAA4B;AAChE,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,cAAc,QAAQ,wBAAqB;AACpD,SAASC,WAAW,QAAQ,wBAAqB;AAGjD,OAAO,MAAMC,YAAY,GAAG;EAC1BC,aAAa,EAAE,UAAU;EACzBC,KAAK,EAAE,CAAC;EACRC,YAAY,EAAE;AAChB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG;EAC3BC,YAAY,EAAE,OAAO;EACrBC,IA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AC8B,cAAc;MAC7BJ,IAAI,EAAEvB,WAAW,CAAC0B;IACpB;EACF;AACF,CAAC;AAED,OAAO,MAAME,mBAAmB,GAAG;EACjC,CAAC5B,WAAW,CAACkB,IAAI,GAAG;IAClBW,KAAK,EAAEhC,MAAM,CAAC4B,YAAY;IAC1BL,UAAU,EAAEvB,MAAM,CAAC4B;EACrB,CAAC;EACD,CAACzB,WAAW,CAAC0B,MAAM,GAAG;IACpBG,KAAK,EAAEhC,MAAM,CAAC8B,cAAc;IAC5BP,UAAU,EAAEvB,MAAM,CAAC8B;EACrB;AACF,CAAC;AAED,OAAO,MAAMG,wBAAwB,GAAG,GAAG;AAE3C,OAAO,MAAMC,eAAe,GAAG,WAAW","ignoreList":[]}
|
|
@@ -43,8 +43,7 @@ export function prepareChatRequestPayload(payload, threadItem) {
|
|
|
43
43
|
imageCdnId,
|
|
44
44
|
imageAltText,
|
|
45
45
|
answerOptions,
|
|
46
|
-
answer
|
|
47
|
-
chatHistory
|
|
46
|
+
answer
|
|
48
47
|
} = payload;
|
|
49
48
|
if (freeTextMessage) {
|
|
50
49
|
return conversationId ? {
|
|
@@ -52,9 +51,6 @@ export function prepareChatRequestPayload(payload, threadItem) {
|
|
|
52
51
|
data: {
|
|
53
52
|
conversationId,
|
|
54
53
|
message: freeTextMessage,
|
|
55
|
-
...(chatHistory && {
|
|
56
|
-
chatHistory
|
|
57
|
-
}),
|
|
58
54
|
...(!!problemStandards?.length && {
|
|
59
55
|
problemStandards
|
|
60
56
|
})
|
|
@@ -66,9 +62,6 @@ export function prepareChatRequestPayload(payload, threadItem) {
|
|
|
66
62
|
correctAnswer: problemAnswer,
|
|
67
63
|
problemDescription,
|
|
68
64
|
language,
|
|
69
|
-
...(chatHistory && {
|
|
70
|
-
chatHistory
|
|
71
|
-
}),
|
|
72
65
|
...(imageCdnId && {
|
|
73
66
|
imageCdnId
|
|
74
67
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IS_WEB","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","t","ChatRequestType","decodeHTMLEntities","input","replace","replaceKatexSyntax","texts","reverse","replacements","Object","entries","map","text","reduce","newText","pattern","placeholder","RegExp","transformAlternatives","payload","isOpenChatEnabled","options","default","promptKey","translatedText","hints","prepareChatRequestPayload","threadItem","conversationId","freeTextMessage","problemDescription","problemStandards","problemAnswer","language","imageCdnId","imageAltText","answerOptions","answer","
|
|
1
|
+
{"version":3,"names":["IS_WEB","KATEX_REPLACEMENTS","KATEX_REPLACEMENTS_REVERSE","t","ChatRequestType","decodeHTMLEntities","input","replace","replaceKatexSyntax","texts","reverse","replacements","Object","entries","map","text","reduce","newText","pattern","placeholder","RegExp","transformAlternatives","payload","isOpenChatEnabled","options","default","promptKey","translatedText","hints","prepareChatRequestPayload","threadItem","conversationId","freeTextMessage","problemDescription","problemStandards","problemAnswer","language","imageCdnId","imageAltText","answerOptions","answer","type","FREETEXT","data","message","length","correctAnswer","altText","HINT","getNextHintProps","userAnswer"],"sourceRoot":"../../../../src","sources":["features/chatbot/helpers.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,4BAA4B;AACnD;AACA,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gBAAa;AAE5E,SAASC,CAAC,QAAQ,mCAA0B;AAE5C,SAA6BC,eAAe,QAAQ,wBAAqB;AAEzE,OAAO,MAAMC,kBAAkB,GAAIC,KAAa,IAAK;EACnD,OAAOA,KAAK,CAACC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;AACrC,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,OAAO,GAAG,KAAK,KAAK;EACtE,MAAMC,YAAY,GAAGD,OAAO,GACxBE,MAAM,CAACC,OAAO,CAACX,0BAA0B,CAAC,GAC1CU,MAAM,CAACC,OAAO,CAACZ,kBAAkB,CAAC;EAEtC,OAAOQ,KAAK,CAACK,GAAG,CAAEC,IAAI,IACpBJ,YAAY,CA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a;IACbC;EACF,CAAC,GAAGlB,OAAO;EAEX,IAAIU,eAAe,EAAE;IACnB,OAAOD,cAAc,GACjB;MACEU,IAAI,EAAErC,eAAe,CAACsC,QAAQ;MAC9BC,IAAI,EAAE;QACJZ,cAAc;QACda,OAAO,EAAEZ,eAAe;QACxB,IAAI,CAAC,CAACE,gBAAgB,EAAEW,MAAM,IAAI;UAAEX;QAAiB,CAAC;MACxD;IACF,CAAC,GACD;MACEO,IAAI,EAAErC,eAAe,CAACsC,QAAQ;MAC9BC,IAAI,EAAE;QACJC,OAAO,EAAEZ,eAAe;QACxBc,aAAa,EAAEX,aAAa;QAC5BF,kBAAkB;QAClBG,QAAQ;QACR,IAAIC,UAAU,IAAI;UAAEA;QAAW,CAAC,CAAC;QACjC,IAAIC,YAAY,IAAI;UAAES,OAAO,EAAET;QAAa,CAAC,CAAC;QAC9C,IAAI,CAAC,CAACJ,gBAAgB,EAAEW,MAAM,IAAI;UAAEX;QAAiB,CAAC,CAAC;QACvD,IAAI,CAAC,CAACK,aAAa,EAAEM,MAAM,IAAI;UAAEN;QAAc,CAAC;MAClD;IACF,CAAC;EACP;EAEA,OAAO;IACLE,IAAI,EAAErC,eAAe,CAAC4C,IAAI;IAC1BL,IAAI,EAAE;MACJ,GAAGb,UAAU,CAACmB,gBAAgB,CAAC,CAAC;MAChCH,aAAa,EAAEX,aAAa;MAC5BF,kBAAkB;MAClBiB,UAAU,EAAEV,MAAM;MAClBJ,QAAQ;MACR,IAAIC,UAAU,IAAI;QAAEA;MAAW,CAAC,CAAC;MACjC,IAAIC,YAAY,IAAI;QAAES,OAAO,EAAET;MAAa,CAAC,CAAC;MAC9C,IAAI,CAAC,CAACJ,gBAAgB,EAAEW,MAAM,IAAI;QAAEX;MAAiB,CAAC;IACxD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator","ColorScheme"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,
|
|
1
|
+
{"version":3,"names":["Chatbot","ChatbotModel","AudioStatus","MessageVariant","DefaultMessagesCreator","ColorScheme"],"sourceRoot":"../../../../src","sources":["features/chatbot/index.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,yBAAsB;AAC9C,SAASC,YAAY,QAAQ,yBAAsB;AACnD,SAASC,WAAW,QAAuF,sBAAmB;AAC9H,SACEC,cAAc,QAGT,wBAAqB;AAG5B,SAASC,sBAAsB,QAAQ,kCAA+B;AAGtE,SAASC,WAAW,QAAQ,wBAAqB","ignoreList":[]}
|
|
@@ -26,7 +26,6 @@ export class ChatbotModel {
|
|
|
26
26
|
unbindCurrentKey = null;
|
|
27
27
|
resetAlternatives = createEvent();
|
|
28
28
|
setAlternatives = createEvent();
|
|
29
|
-
$alternatives = createStore(null);
|
|
30
29
|
setIsOpen = createEvent();
|
|
31
30
|
toggleOpen = createEvent();
|
|
32
31
|
$isOpen = restore(this.setIsOpen, false).on(this.toggleOpen, isOpen => !isOpen);
|
|
@@ -71,7 +70,7 @@ export class ChatbotModel {
|
|
|
71
70
|
if (threadMessagesLimit) {
|
|
72
71
|
this.threadManager.setMessagesLimit(threadMessagesLimit);
|
|
73
72
|
}
|
|
74
|
-
this.$alternatives.on(this.api.getAlternativesFx.doneData, (_, payload) => transformAlternatives(payload)).on(this.setAlternatives, (_, payload) => transformAlternatives(payload)).reset(this.resetAlternatives);
|
|
73
|
+
this.$alternatives = createStore(null).on(this.api.getAlternativesFx.doneData, (_, payload) => transformAlternatives(payload)).on(this.setAlternatives, (_, payload) => transformAlternatives(payload)).reset(this.resetAlternatives);
|
|
75
74
|
this.translation = new ChatbotTranslation({
|
|
76
75
|
$context: this.$context,
|
|
77
76
|
defaultMessages: this.defaultMessages,
|
|
@@ -96,28 +95,6 @@ export class ChatbotModel {
|
|
|
96
95
|
filter: isOpen => !isOpen,
|
|
97
96
|
target: [this.t2s.reset, this.errorSpotting.spottingHidden]
|
|
98
97
|
});
|
|
99
|
-
sample({
|
|
100
|
-
clock: this.$isOpen.updates,
|
|
101
|
-
filter: isOpen => !isOpen,
|
|
102
|
-
fn: () => false,
|
|
103
|
-
target: this.setScrollActive
|
|
104
|
-
});
|
|
105
|
-
sample({
|
|
106
|
-
clock: this.setIsOpen,
|
|
107
|
-
source: this.$currentChatData,
|
|
108
|
-
filter: ({
|
|
109
|
-
hasBeenOpened
|
|
110
|
-
}, isOpen) => isOpen && !hasBeenOpened,
|
|
111
|
-
fn: ({
|
|
112
|
-
key
|
|
113
|
-
}) => ({
|
|
114
|
-
key,
|
|
115
|
-
data: {
|
|
116
|
-
hasBeenOpened: true
|
|
117
|
-
}
|
|
118
|
-
}),
|
|
119
|
-
target: this.cache.update
|
|
120
|
-
});
|
|
121
98
|
sample({
|
|
122
99
|
clock: this.removeLastMessage,
|
|
123
100
|
source: [this.$lastMessageKey, this.cache.$data],
|
|
@@ -197,8 +174,7 @@ export class ChatbotModel {
|
|
|
197
174
|
source: {
|
|
198
175
|
key: this.$currentKey,
|
|
199
176
|
context: this.$context,
|
|
200
|
-
cache: this.cache.$data
|
|
201
|
-
alternatives: this.$alternatives
|
|
177
|
+
cache: this.cache.$data
|
|
202
178
|
},
|
|
203
179
|
mapParams: (params, source) => ({
|
|
204
180
|
...params,
|
|
@@ -210,40 +186,28 @@ export class ChatbotModel {
|
|
|
210
186
|
key,
|
|
211
187
|
context,
|
|
212
188
|
isFreeText,
|
|
213
|
-
|
|
214
|
-
cache,
|
|
215
|
-
alternatives
|
|
189
|
+
cache
|
|
216
190
|
}) => {
|
|
217
191
|
if (!context) throw new Error('Trying to send message in chat without context');
|
|
218
192
|
this.setLastMessageKey(key);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
translatedMessage
|
|
226
|
-
})]
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
const chatHistory = context.assignmentId && context.problemId ? {
|
|
230
|
-
exerciseId: context.assignmentId,
|
|
231
|
-
problemId: context.problemId,
|
|
232
|
-
chatVersion: alternatives?.version
|
|
233
|
-
} : undefined;
|
|
193
|
+
this.cache.addMessages(key, {
|
|
194
|
+
messages: [messagesHelper.createOwn({
|
|
195
|
+
message,
|
|
196
|
+
translatedMessage
|
|
197
|
+
})]
|
|
198
|
+
});
|
|
234
199
|
|
|
235
200
|
// Request is overridden by ThreadManager.postMessage (delegates to sendMessage/getHint)
|
|
236
201
|
const response = await this.api.postMessageFx({
|
|
237
202
|
answer: context.answer,
|
|
238
203
|
answerOptions: context.answerOptions,
|
|
239
|
-
problemDescription: context.
|
|
204
|
+
problemDescription: context.problem,
|
|
240
205
|
problemStandards: context.problemStandards,
|
|
241
206
|
problemAnswer: context.problemAnswer,
|
|
242
207
|
language: context.language,
|
|
243
208
|
imageAltText: context.imageDescription,
|
|
244
209
|
imageCdnId: context.imageCdnId,
|
|
245
210
|
conversationId: cache[key].conversationId,
|
|
246
|
-
chatHistory,
|
|
247
211
|
...(isFreeText && {
|
|
248
212
|
freeTextMessage: message
|
|
249
213
|
})
|