@magmamath/students-features 0.5.0 → 0.5.1-rc-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/celebrations/config.js +4 -4
- package/dist/commonjs/features/celebrations/config.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +1 -2
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +47 -30
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +42 -22
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +14 -11
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +7 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +7 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +22 -44
- package/dist/commonjs/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +125 -146
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js +12 -12
- package/dist/commonjs/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ThreadItem.js +8 -16
- package/dist/commonjs/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
- package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/messagesHelper.js +7 -7
- package/dist/commonjs/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/t2s.js +13 -18
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/translation.js +19 -28
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/api.types.js +0 -4
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +2 -4
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -1
- package/{src/shared/translation → dist/commonjs/lib}/localization/en.json +1 -8
- package/dist/{module/shared/translation → commonjs/lib}/localization/gb.json +1 -8
- package/dist/commonjs/{shared/translation → lib}/localization/sw.json +1 -8
- package/dist/commonjs/shared/icons/icon.types.js +0 -4
- package/dist/commonjs/shared/translation/constants.js +3 -3
- package/dist/commonjs/shared/translation/constants.js.map +1 -1
- package/dist/commonjs/shared/translation/helpers.js +6 -22
- package/dist/commonjs/shared/translation/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/hooks.js +5 -3
- package/dist/commonjs/shared/translation/hooks.js.map +1 -1
- package/dist/commonjs/shared/translation/model.js +1 -1
- package/dist/commonjs/shared/translation/model.js.map +1 -1
- package/dist/commonjs/shared/translation/types.js +1 -1
- package/dist/commonjs/shared/translation/types.js.map +1 -1
- package/dist/module/features/celebrations/config.js +4 -4
- package/dist/module/features/celebrations/config.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +1 -2
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +48 -31
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +43 -23
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +13 -11
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +32 -17
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +8 -6
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/index.js +1 -0
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatBotThreadManager.js → ChatBotMessageHandler.js} +20 -42
- package/dist/module/features/chatbot/model/ChatBotMessageHandler.js.map +1 -0
- package/dist/module/features/chatbot/model/ChatBotModel.js +126 -147
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js +12 -12
- package/dist/module/features/chatbot/model/DefaultMessageCreator.js.map +1 -1
- package/dist/module/features/chatbot/model/ThreadItem.js +8 -16
- package/dist/module/features/chatbot/model/ThreadItem.js.map +1 -1
- package/dist/module/features/chatbot/model/{ChatbotApi.js → api.js} +1 -2
- package/dist/module/features/chatbot/model/api.js.map +1 -0
- package/dist/module/features/chatbot/model/constants.js.map +1 -1
- package/dist/module/features/chatbot/model/messagesHelper.js +7 -7
- package/dist/module/features/chatbot/model/messagesHelper.js.map +1 -1
- package/dist/module/features/chatbot/model/t2s.js +14 -19
- package/dist/module/features/chatbot/model/t2s.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/translation.js +19 -28
- package/dist/module/features/chatbot/model/translation.js.map +1 -1
- package/dist/module/features/chatbot/types/api.types.js +0 -2
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +2 -4
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -1
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/lib/effector/createEntityFieldStore.js +0 -4
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -1
- package/dist/module/{shared/translation → lib}/localization/en.json +1 -8
- package/dist/{commonjs/shared/translation → module/lib}/localization/gb.json +1 -8
- package/dist/module/{shared/translation → lib}/localization/sw.json +1 -8
- package/dist/module/shared/icons/icon.types.js +0 -2
- package/dist/module/shared/translation/constants.js +3 -3
- package/dist/module/shared/translation/constants.js.map +1 -1
- package/dist/module/shared/translation/helpers.js +5 -19
- package/dist/module/shared/translation/helpers.js.map +1 -1
- package/dist/module/shared/translation/hooks.js +6 -4
- package/dist/module/shared/translation/hooks.js.map +1 -1
- package/dist/module/shared/translation/model.js +1 -1
- package/dist/module/shared/translation/model.js.map +1 -1
- package/dist/module/shared/translation/types.js +0 -2
- package/dist/module/shared/translation/types.js.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +5 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +18 -24
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
- package/dist/typescript/commonjs/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts +7 -13
- package/dist/typescript/commonjs/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts +5 -7
- package/dist/typescript/commonjs/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +6 -16
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +9 -8
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/commonjs/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +11 -12
- 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 +24 -19
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +7 -9
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +2 -3
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -21
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts +2 -3
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts +2 -2
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/index.d.ts +1 -0
- package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +3 -43
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/types.d.ts +4 -4
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +10 -7
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +7 -5
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +10 -2
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +5 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +3 -4
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts +31 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotMessageHandler.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +18 -24
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts +3 -5
- package/dist/typescript/module/features/chatbot/model/DefaultMessageCreator.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts +7 -13
- package/dist/typescript/module/features/chatbot/model/ThreadItem.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/{ChatbotApi.d.ts → api.d.ts} +3 -4
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts +5 -7
- package/dist/typescript/module/features/chatbot/model/messagesHelper.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +6 -16
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +9 -8
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts +1 -2
- package/dist/typescript/module/features/chatbot/model/translation.helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +11 -12
- 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 +24 -19
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +7 -9
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +2 -3
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +0 -2
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/icon.types.d.ts +0 -2
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -21
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/helpers.d.ts +2 -3
- package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/hooks.d.ts +2 -2
- package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/index.d.ts +1 -0
- package/dist/typescript/module/shared/translation/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +3 -43
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/types.d.ts +4 -4
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/features/celebrations/config.ts +4 -4
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +4 -2
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +10 -7
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +51 -34
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +40 -15
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +10 -9
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +34 -17
- package/src/features/chatbot/components/Chatbot.tsx +11 -5
- package/src/features/chatbot/index.ts +4 -3
- package/src/features/chatbot/model/{ChatBotThreadManager.ts → ChatBotMessageHandler.ts} +27 -53
- package/src/features/chatbot/model/ChatBotModel.ts +149 -151
- package/src/features/chatbot/model/DefaultMessageCreator.ts +16 -17
- package/src/features/chatbot/model/ThreadItem.ts +10 -15
- package/src/features/chatbot/model/{ChatbotApi.ts → api.ts} +2 -5
- package/src/features/chatbot/model/constants.ts +0 -2
- package/src/features/chatbot/model/messagesHelper.ts +7 -12
- package/src/features/chatbot/model/t2s.ts +13 -28
- package/src/features/chatbot/model/translation.helpers.ts +1 -2
- package/src/features/chatbot/model/translation.ts +24 -34
- package/src/features/chatbot/types/api.types.ts +12 -12
- package/src/features/chatbot/types/model.types.ts +32 -31
- package/src/features/chatbot/types/t2s.types.ts +15 -18
- package/src/features/chatbot/types/translation.types.ts +2 -3
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +2 -3
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +1 -0
- package/src/index.ts +1 -0
- package/src/lib/effector/createEntityFieldStore.ts +1 -9
- package/{dist/commonjs/shared/translation → src/lib}/localization/en.json +1 -8
- package/src/{shared/translation → lib}/localization/gb.json +1 -8
- package/src/{shared/translation → lib}/localization/sw.json +1 -8
- package/src/shared/icons/icon.types.ts +6 -9
- package/src/shared/translation/constants.ts +3 -3
- package/src/shared/translation/helpers.ts +9 -22
- package/src/shared/translation/hooks.ts +16 -12
- package/src/shared/translation/index.ts +1 -0
- package/src/shared/translation/model.ts +8 -8
- package/src/shared/translation/types.ts +8 -11
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -44
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js +0 -62
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js +0 -13
- package/dist/commonjs/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
- package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js +0 -17
- package/dist/commonjs/features/chatbot/context/ChatBotModelContext.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -57
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -130
- package/dist/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +0 -22
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -110
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -2
- package/dist/commonjs/features/chatbot/types/units.types.js.map +0 -1
- package/dist/commonjs/lib/effector/withEvent.js +0 -13
- package/dist/commonjs/lib/effector/withEvent.js.map +0 -1
- package/dist/commonjs/lib/types/keys.js +0 -2
- package/dist/commonjs/lib/types/keys.js.map +0 -1
- package/dist/commonjs/shared/icons/HighlighterIcon.js +0 -36
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/commonjs/shared/icons/StopIcon.js +0 -33
- package/dist/commonjs/shared/icons/StopIcon.js.map +0 -1
- package/dist/commonjs/shared/translation/validation.types.js +0 -6
- package/dist/commonjs/shared/translation/validation.types.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js +0 -38
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js +0 -57
- package/dist/module/features/chatbot/components/ChatMessage/MessageContent.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatMessage/helpers.js +0 -9
- package/dist/module/features/chatbot/components/ChatMessage/helpers.js.map +0 -1
- package/dist/module/features/chatbot/context/ChatBotModelContext.js +0 -12
- package/dist/module/features/chatbot/context/ChatBotModelContext.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js +0 -51
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingButton.js.map +0 -1
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js +0 -125
- package/dist/module/features/chatbot/errorSpotting/ErrorSpottingModel.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +0 -17
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +0 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -104
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +0 -1
- package/dist/module/features/chatbot/types/units.types.js +0 -2
- package/dist/module/features/chatbot/types/units.types.js.map +0 -1
- package/dist/module/lib/effector/withEvent.js +0 -9
- package/dist/module/lib/effector/withEvent.js.map +0 -1
- package/dist/module/lib/types/keys.js +0 -2
- package/dist/module/lib/types/keys.js.map +0 -1
- package/dist/module/shared/icons/HighlighterIcon.js +0 -29
- package/dist/module/shared/icons/HighlighterIcon.js.map +0 -1
- package/dist/module/shared/icons/StopIcon.js +0 -26
- package/dist/module/shared/icons/StopIcon.js.map +0 -1
- package/dist/module/shared/translation/validation.types.js +0 -4
- package/dist/module/shared/translation/validation.types.js.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
- package/dist/typescript/commonjs/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
- package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -34
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/effector/withEvent.d.ts +0 -2
- package/dist/typescript/commonjs/lib/effector/withEvent.d.ts.map +0 -1
- package/dist/typescript/commonjs/lib/types/keys.d.ts +0 -8
- package/dist/typescript/commonjs/lib/types/keys.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/commonjs/shared/icons/StopIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts +0 -17
- package/dist/typescript/commonjs/shared/translation/validation.types.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts +0 -11
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageContent.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatMessage/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/context/ChatBotModelContext.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts +0 -8
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts +0 -35
- package/dist/typescript/module/features/chatbot/errorSpotting/ErrorSpottingModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +0 -33
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts +0 -6
- package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -27
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -34
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +0 -1
- package/dist/typescript/module/lib/effector/withEvent.d.ts +0 -2
- package/dist/typescript/module/lib/effector/withEvent.d.ts.map +0 -1
- package/dist/typescript/module/lib/types/keys.d.ts +0 -8
- package/dist/typescript/module/lib/types/keys.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/icons/StopIcon.d.ts +0 -4
- package/dist/typescript/module/shared/icons/StopIcon.d.ts.map +0 -1
- package/dist/typescript/module/shared/translation/validation.types.d.ts +0 -17
- package/dist/typescript/module/shared/translation/validation.types.d.ts.map +0 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +0 -38
- package/src/features/chatbot/components/ChatMessage/MessageContent.tsx +0 -52
- package/src/features/chatbot/components/ChatMessage/helpers.ts +0 -9
- package/src/features/chatbot/context/ChatBotModelContext.ts +0 -14
- package/src/features/chatbot/errorSpotting/ErrorSpottingButton.tsx +0 -53
- package/src/features/chatbot/errorSpotting/ErrorSpottingModel.ts +0 -150
- package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -18
- package/src/features/chatbot/model/ChatsCacheModel.ts +0 -95
- package/src/features/chatbot/types/units.types.ts +0 -37
- package/src/lib/effector/withEvent.ts +0 -7
- package/src/lib/types/keys.ts +0 -18
- package/src/shared/icons/HighlighterIcon.tsx +0 -21
- package/src/shared/icons/StopIcon.tsx +0 -17
- package/src/shared/translation/validation.types.ts +0 -26
|
@@ -11,9 +11,11 @@ var _helpers = require("./helpers.js");
|
|
|
11
11
|
const useText = () => {
|
|
12
12
|
const config = (0, _effectorReact.useUnit)(_model.$localization);
|
|
13
13
|
return (key, args = null) => {
|
|
14
|
-
const translation =
|
|
15
|
-
if (
|
|
16
|
-
|
|
14
|
+
const translation = config?.[key];
|
|
15
|
+
if (translation && args) {
|
|
16
|
+
return (0, _helpers.getSubstitutedString)(translation, args);
|
|
17
|
+
}
|
|
18
|
+
return translation ?? key;
|
|
17
19
|
};
|
|
18
20
|
};
|
|
19
21
|
exports.useText = useText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effectorReact","require","_model","_react","_helpers","useText","config","useUnit","$localization","key","args","translation","
|
|
1
|
+
{"version":3,"names":["_effectorReact","require","_model","_react","_helpers","useText","config","useUnit","$localization","key","args","translation","getSubstitutedString","exports","useFeaturesLocalization","generator","useEffect","setLocalization"],"sourceRoot":"../../../../src","sources":["shared/translation/hooks.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AAEO,MAAMI,OAAO,GAAGA,CAAA,KAAe;EAClC,MAAMC,MAAM,GAAG,IAAAC,sBAAO,EAACC,oBAAa,CAAuB;EAE3D,OAAO,CAACC,GAAG,EAAEC,IAAI,GAAG,IAAI,KAAK;IACzB,MAAMC,WAAW,GAAGL,MAAM,GAAGG,GAAG,CAAC;IAEjC,IAAIE,WAAW,IAAID,IAAI,EAAE;MACrB,OAAO,IAAAE,6BAAoB,EAACD,WAAW,EAAED,IAAI,CAAC;IAClD;IAEA,OAAOC,WAAW,IAAIF,GAAG;EAC7B,CAAC;AACL,CAAC;AAAAI,OAAA,CAAAR,OAAA,GAAAA,OAAA;AAEM,MAAMS,uBAAuB,GAChCC,SAA6F,IAC5F;EACD,IAAAC,gBAAS,EAAC,MAAM;IACZ,IAAAC,sBAAe,EAACF,SAAS,CAAC;EAC9B,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;AACnB,CAAC;AAAAF,OAAA,CAAAC,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -10,6 +10,6 @@ var _constants = require("./constants.js");
|
|
|
10
10
|
const setLocalization = exports.setLocalization = (0, _effector.createEvent)();
|
|
11
11
|
const $localization = exports.$localization = (0, _effector.createStore)(_constants.LOCALIZATION_CONFIGS[_types.Locale.EN]).on(setLocalization, (state, payload) => {
|
|
12
12
|
if (typeof payload === 'function') return payload(_constants.LOCALIZATION_CONFIGS);
|
|
13
|
-
return payload;
|
|
13
|
+
if (state.locale !== payload.locale) return payload;
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_types","_constants","setLocalization","exports","createEvent","$localization","createStore","LOCALIZATION_CONFIGS","Locale","EN","on","state","payload"],"sourceRoot":"../../../../src","sources":["shared/translation/model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEO,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,qBAAW,EAExC,CAAC;AAEI,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAG,IAAAC,qBAAW,
|
|
1
|
+
{"version":3,"names":["_effector","require","_types","_constants","setLocalization","exports","createEvent","$localization","createStore","LOCALIZATION_CONFIGS","Locale","EN","on","state","payload","locale"],"sourceRoot":"../../../../src","sources":["shared/translation/model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEO,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,qBAAW,EAExC,CAAC;AAEI,MAAMC,aAAa,GAAAF,OAAA,CAAAE,aAAA,GAAG,IAAAC,qBAAW,EAAqBC,+BAAoB,CAACC,aAAM,CAACC,EAAE,CAAC,CAAC,CAACC,EAAE,CAC5FR,eAAe,EACf,CAACS,KAAK,EAAEC,OAAO,KAAK;EAChB,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE,OAAOA,OAAO,CAACL,+BAAoB,CAAC;EACvE,IAAII,KAAK,CAACE,MAAM,KAAKD,OAAO,CAACC,MAAM,EAAE,OAAOD,OAAO;AACvD,CACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale","exports"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;;;;;IAUYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA
|
|
1
|
+
{"version":3,"names":["Locale","exports"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;;;;;IAUYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|
|
@@ -175,10 +175,10 @@ export const CELEBRATION_VARIANTS = {
|
|
|
175
175
|
},
|
|
176
176
|
speedRange: {
|
|
177
177
|
spark: [14, 28],
|
|
178
|
-
main: [
|
|
178
|
+
main: [12, 24]
|
|
179
179
|
},
|
|
180
180
|
life: 100,
|
|
181
|
-
gravity: 0.
|
|
181
|
+
gravity: 0.19
|
|
182
182
|
},
|
|
183
183
|
[CelebrationVariant.CORRECT_FINISH_ASSIGNMENT]: {
|
|
184
184
|
color: COLORS.PRIMARY_GREEN,
|
|
@@ -210,10 +210,10 @@ export const CELEBRATION_VARIANTS = {
|
|
|
210
210
|
},
|
|
211
211
|
speedRange: {
|
|
212
212
|
spark: [14, 28],
|
|
213
|
-
main: [
|
|
213
|
+
main: [12, 24]
|
|
214
214
|
},
|
|
215
215
|
life: 100,
|
|
216
|
-
gravity: 0.
|
|
216
|
+
gravity: 0.19
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StarIcon","HalloweenIcon","PiIcon","WinterIcon","ValentineIcon","COLORS","CelebrationVariant","CELEBRATION_ICON_CONFIG","name","Icon","activePeriod","start","end","CELEBRATION_VARIANTS","FIRST_ATTEMPT","color","PRIMARY_GREEN","elementsCount","star","spark","sparkSize","from","to","mainSize","angle","velocityMultiplier","rotation","friction","angularAcceleration","speedRange","main","life","gravity","CORRECT","PRIMARY_YELLOW","GBD","PRIMARY_ORANGE","GBD_FINISH_ASSIGNMENT","CORRECT_FINISH_ASSIGNMENT"],"sourceRoot":"../../../../src","sources":["features/celebrations/config.ts"],"mappings":";;AAAA,OAAOA,QAAQ,MAAM,4BAAyB;AAC9C,OAAOC,aAAa,MAAM,iCAA8B;AACxD,OAAOC,MAAM,MAAM,0BAAuB;AAC1C,OAAOC,UAAU,MAAM,8BAA2B;AAClD,OAAOC,aAAa,MAAM,iCAA8B;AACxD,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,kBAAkB,QAAQ,YAAS;AAE5C,OAAO,MAAMC,uBAAuB,GAAG,CACrC;EACEC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAET;AACR,CAAC,EACD;EACEQ,IAAI,EAAE,QAAQ;EACdC,IAAI,EAAEP,MAAM;EACZQ,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAEL,aAAa;EACnBM,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;AACF,CAAC,EACD;EACEJ,IAAI,EAAE,WAAW;EACjBC,IAAI,EAAER,aAAa;EACnBS,YAAY,EAAE;IACZC,KAAK,EAAE,OAAO;IACdC,GAAG,EAAE;EACP;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B,GAAG;IAC1CtB,KAAK,EAAEV,MAAM,CAAC+B,cAAc;IAC5BnB,aAAa,EAAE;MACbC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDC,QAAQ,EAAE;MACRF,IAAI,EAAE,EAAE;MACRC,EAAE,EAAE;IACN,CAAC;IACDE,KAAK,EAAE;MACLH,IAAI,EAAE,GAAG;MACTC,EAAE,EAAE;IACN,CAAC;IACDG,kBAAkB,EAAE,CAAC;IACrBC,QAAQ,EAAE;MACRL,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDK,QAAQ,EAAE,IAAI;IACdC,mBAAmB,EAAE;MACnBP,IAAI,EAAE,CAAC,IAAI;MACXC,EAAE,EAAE;IACN,CAAC;IACDO,UAAU,EAAE;MACVV,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;MACfW,IAAI,EAAE,CAAC,
|
|
1
|
+
{"version":3,"names":["StarIcon","HalloweenIcon","PiIcon","WinterIcon","ValentineIcon","COLORS","CelebrationVariant","CELEBRATION_ICON_CONFIG","name","Icon","activePeriod","start","end","CELEBRATION_VARIANTS","FIRST_ATTEMPT","color","PRIMARY_GREEN","elementsCount","star","spark","sparkSize","from","to","mainSize","angle","velocityMultiplier","rotation","friction","angularAcceleration","speedRange","main","life","gravity","CORRECT","PRIMARY_YELLOW","GBD","PRIMARY_ORANGE","GBD_FINISH_ASSIGNMENT","CORRECT_FINISH_ASSIGNMENT"],"sourceRoot":"../../../../src","sources":["features/celebrations/config.ts"],"mappings":";;AAAA,OAAOA,QAAQ,MAAM,4BAAyB;AAC9C,OAAOC,aAAa,MAAM,iCAA8B;AACxD,OAAOC,MAAM,MAAM,0BAAuB;AAC1C,OAAOC,UAAU,MAAM,8BAA2B;AAClD,OAAOC,aAAa,MAAM,iCAA8B;AACxD,SAASC,MAAM,QAAQ,4B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X,CAAC;EACD,CAAC1B,kBAAkB,CAACgC,yBAAyB,GAAG;IAC9CvB,KAAK,EAAEV,MAAM,CAACW,aAAa;IAC3BC,aAAa,EAAE;MACbC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDC,QAAQ,EAAE;MACRF,IAAI,EAAE,EAAE;MACRC,EAAE,EAAE;IACN,CAAC;IACDE,KAAK,EAAE;MACLH,IAAI,EAAE,GAAG;MACTC,EAAE,EAAE;IACN,CAAC;IACDG,kBAAkB,EAAE,CAAC;IACrBC,QAAQ,EAAE;MACRL,IAAI,EAAE,CAAC;MACPC,EAAE,EAAE;IACN,CAAC;IACDK,QAAQ,EAAE,IAAI;IACdC,mBAAmB,EAAE;MACnBP,IAAI,EAAE,CAAC,IAAI;MACXC,EAAE,EAAE;IACN,CAAC;IACDO,UAAU,EAAE;MACVV,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;MACfW,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE;IACf,CAAC;IACDC,IAAI,EAAE,GAAG;IACTC,OAAO,EAAE;EACX;AACF,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,13 @@ import React from 'react';
|
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { useStoreMap, useUnit } from 'effector-react';
|
|
6
6
|
import { HelpRequestOption } from "./HelpRequestOption.js";
|
|
7
|
-
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
export const Alternatives = ({
|
|
9
|
+
model,
|
|
10
10
|
onPressAlternative,
|
|
11
11
|
hasMessages,
|
|
12
12
|
isHintFeedback
|
|
13
13
|
}) => {
|
|
14
|
-
const model = useChatModel();
|
|
15
14
|
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
16
15
|
const alternatives = useUnit(model.$alternatives);
|
|
17
16
|
const isTranslationPending = useUnit(model.translation.translateAllMessagesFx.pending);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useStoreMap","useUnit","HelpRequestOption","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","useStoreMap","useUnit","HelpRequestOption","jsx","_jsx","Alternatives","model","onPressAlternative","hasMessages","isHintFeedback","isTranslated","translation","$isTranslated","alternatives","$alternatives","isTranslationPending","translateAllMessagesFx","pending","lastMessageOptions","$currentChatData","messages","lastMessage","at","options","hints","default","style","styles","container","children","map","text","translatedText","index","onPress","message","disabled","create","flex","width","marginVertical","gap"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Alternatives/Alternatives.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAGrD,SAASC,iBAAiB,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASvD,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAC3BC,KAAK;EACLC,kBAAkB;EAClBC,WAAW;EACXC;AACiB,CAAC,KAAK;EACvB,MAAMC,YAAY,GAAGT,OAAO,CAACK,KAAK,CAACK,WAAW,CAACC,aAAa,CAAC;EAC7D,MAAMC,YAAY,GAAGZ,OAAO,CAACK,KAAK,CAACQ,aAAa,CAAC;EACjD,MAAMC,oBAAoB,GAAGd,OAAO,CAACK,KAAK,CAACK,WAAW,CAACK,sBAAsB,CAACC,OAAO,CAAC;EACtF,MAAMC,kBAAkB,GAAGlB,WAAW,CAACM,KAAK,CAACa,gBAAgB,EAAE,CAAC;IAAEC;EAAS,CAAC,KAAK;IAC/E,MAAMC,WAAW,GAAGD,QAAQ,CAACE,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,OAAOD,WAAW,EAAEE,OAAO,IAAI,EAAE;EACnC,CAAC,CAAC;EAEF,MAAMA,OAAO,GAAG,CAAC,MAAM;IACrB,IAAIf,WAAW,EAAE,OAAOU,kBAAkB;IAC1C,IAAIT,cAAc,EAAE,OAAOI,YAAY,EAAEU,OAAO,CAACC,KAAK,IAAI,EAAE;IAC5D,OAAOX,YAAY,EAAEU,OAAO,CAACE,OAAO,IAAI,EAAE;EAC5C,CAAC,EAAE,CAAC;EAEJ,oBACErB,IAAA,CAACL,IAAI;IAAC2B,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,EAC3BN,OAAO,CAACO,GAAG,CAAC,CAAC;MAAEC,IAAI;MAAEC;IAAe,CAAC,EAAEC,KAAK,kBAC3C7B,IAAA,CAACF,iBAAiB;MAEhBgC,OAAO,EAAEA,CAAA,KAAM3B,kBAAkB,CAACwB,IAAI,EAAEC,cAAc,CAAE;MACxDG,OAAO,EAAEzB,YAAY,GAAIsB,cAAc,GAAcD,IAAK;MAC1DK,QAAQ,EAAErB;IAAqB,GAH1BkB,KAIN,CACF;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMN,MAAM,GAAG7B,UAAU,CAACuC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,cAAc,EAAE,CAAC;IACjBC,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,
|
|
1
|
+
{"version":3,"names":["React","ReceivedMessage","SentMessage","MessageVariant","jsx","_jsx","variantsMap","SENT","RECEIVED","ChatMessage","variant","props","Component"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ChatMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAoC,OAAO;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,cAAc,QAAyB,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAezE,MAAMC,WAAgE,GAAG;EACvE,CAACH,cAAc,CAACI,IAAI,GAAGL,WAAW;EAClC,CAACC,cAAc,CAACK,QAAQ,GAAGP;AAC7B,CAAC;AAED,OAAO,MAAMQ,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAE,GAAGC;AAAwB,CAAC,KAAK;EACtE,MAAMC,SAAS,GAAGN,WAAW,CAACI,OAAO,CAAC;EACtC,oBAAOL,IAAA,CAACO,SAAS;IAAA,GAAKD;EAAK,CAAG,CAAC;AACjC,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { ActivityIndicator } from 'react-native';
|
|
4
|
+
import { ActivityIndicator, Pressable, StyleSheet, TouchableOpacity } from 'react-native';
|
|
5
5
|
import { SpeakerIcon } from "../../../../shared/icons/SpeakerIcon.js";
|
|
6
6
|
import { PlayIcon } from "../../../../shared/icons/PlayIcon.js";
|
|
7
7
|
import { PauseIcon } from "../../../../shared/icons/PauseIcon.js";
|
|
8
|
-
import { useChatModel } from "../../context/ChatBotModelContext.js";
|
|
9
|
-
import { Button, COLORS } from '@magmamath/react-native-ui';
|
|
10
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
9
|
const TextToSpeechIcon = ({
|
|
12
10
|
status,
|
|
@@ -18,47 +16,66 @@ const TextToSpeechIcon = ({
|
|
|
18
16
|
}
|
|
19
17
|
if (!isActive) {
|
|
20
18
|
return /*#__PURE__*/_jsx(SpeakerIcon, {
|
|
21
|
-
color: isActive ?
|
|
19
|
+
color: isActive ? '#55ABE0' : undefined
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
if (status === 'playing') return /*#__PURE__*/_jsx(PauseIcon, {
|
|
25
|
-
color:
|
|
23
|
+
color: "#FFF"
|
|
26
24
|
});
|
|
27
25
|
if (status === 'paused') return /*#__PURE__*/_jsx(PlayIcon, {
|
|
28
|
-
color:
|
|
26
|
+
color: "#FFF"
|
|
29
27
|
});
|
|
30
28
|
return /*#__PURE__*/_jsx(SpeakerIcon, {
|
|
31
|
-
color: isActive ?
|
|
29
|
+
color: isActive ? '#55ABE0' : undefined
|
|
32
30
|
});
|
|
33
31
|
};
|
|
34
32
|
export const MessageTextToSpeech = ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
function play() {
|
|
45
|
-
void model.t2s.play({
|
|
46
|
-
isTranslated: model.translation.$isTranslated.getState(),
|
|
47
|
-
message
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/_jsx(Button, {
|
|
33
|
+
status,
|
|
34
|
+
disabled,
|
|
35
|
+
isActive,
|
|
36
|
+
isLoading,
|
|
37
|
+
onPress
|
|
38
|
+
}) => /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
39
|
+
style: styles.container,
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
51
42
|
disabled: disabled,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
icon: /*#__PURE__*/_jsx(TextToSpeechIcon, {
|
|
43
|
+
onPress: onPress,
|
|
44
|
+
style: [styles.button, {
|
|
45
|
+
backgroundColor: isActive && !isLoading ? '#55ABE0' : '#FFF'
|
|
46
|
+
}],
|
|
47
|
+
children: /*#__PURE__*/_jsx(TextToSpeechIcon, {
|
|
58
48
|
isActive: isActive,
|
|
59
49
|
isLoading: isLoading,
|
|
60
50
|
status: status
|
|
61
51
|
})
|
|
62
|
-
})
|
|
63
|
-
};
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
const styles = StyleSheet.create({
|
|
55
|
+
container: {
|
|
56
|
+
alignSelf: 'stretch',
|
|
57
|
+
justifyContent: 'flex-end',
|
|
58
|
+
width: 45
|
|
59
|
+
},
|
|
60
|
+
button: {
|
|
61
|
+
alignItems: 'center',
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
width: 28,
|
|
64
|
+
height: 28,
|
|
65
|
+
padding: 1,
|
|
66
|
+
marginLeft: 'auto',
|
|
67
|
+
shadowColor: '#333',
|
|
68
|
+
shadowOffset: {
|
|
69
|
+
width: 0,
|
|
70
|
+
height: 1
|
|
71
|
+
},
|
|
72
|
+
shadowOpacity: 0.25,
|
|
73
|
+
shadowRadius: 3,
|
|
74
|
+
elevation: 3,
|
|
75
|
+
borderRadius: 6,
|
|
76
|
+
borderColor: '#F2F2F4',
|
|
77
|
+
borderWidth: 0.5,
|
|
78
|
+
backgroundColor: '#FFF'
|
|
79
|
+
}
|
|
80
|
+
});
|
|
64
81
|
//# sourceMappingURL=MessageTextToSpeech.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ActivityIndicator","
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Pressable","StyleSheet","TouchableOpacity","SpeakerIcon","PlayIcon","PauseIcon","jsx","_jsx","TextToSpeechIcon","status","isActive","isLoading","color","undefined","MessageTextToSpeech","disabled","onPress","style","styles","container","children","button","backgroundColor","create","alignSelf","justifyContent","width","alignItems","height","padding","marginLeft","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderColor","borderWidth"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,EAAEC,SAAS,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;A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AAgB;MAACE,QAAQ,EAAEA,QAAS;MAACC,SAAS,EAAEA,SAAU;MAACF,MAAM,EAAEA;IAAO,CAAE;EAAC,CACrE;AAAC,CACI,CACnB;AAED,MAAMS,MAAM,GAAGjB,UAAU,CAACsB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,SAAS,EAAE,SAAS;IACpBC,cAAc,EAAE,UAAU;IAC1BC,KAAK,EAAE;EACT,CAAC;EACDL,MAAM,EAAE;IACNM,UAAU,EAAE,QAAQ;IACpBF,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,CAAC;IACVC,UAAU,EAAE,MAAM;IAClBC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEN,KAAK,EAAE,CAAC;MAAEE,MAAM,EAAE;IAAE,CAAC;IACrCK,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,SAAS;IACtBC,WAAW,EAAE,GAAG;IAChBhB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
|
-
import {
|
|
6
|
+
import { MessageTextToSpeech } from "./MessageTextToSpeech.js";
|
|
7
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export const ReceivedMessage = ({
|
|
9
10
|
message,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
onPressTextToSpeech,
|
|
12
|
+
isTextToSpeechPending,
|
|
13
|
+
isActive,
|
|
14
|
+
audioStatus,
|
|
15
|
+
renderer,
|
|
16
|
+
withTextToSpeech = true
|
|
17
|
+
}) => /*#__PURE__*/_jsxs(View, {
|
|
18
|
+
style: styles.container,
|
|
19
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
20
|
+
style: styles.icon,
|
|
21
|
+
children: /*#__PURE__*/_jsx(ChatbotIcon, {
|
|
22
|
+
width: 60,
|
|
23
|
+
height: 80
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
26
|
+
style: styles.message,
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
28
|
+
style: [styles.messageText, {
|
|
29
|
+
width: withTextToSpeech ? 240 : 305
|
|
30
|
+
}],
|
|
31
|
+
children: renderer ? renderer({
|
|
32
|
+
message,
|
|
33
|
+
variant: MessageVariant.RECEIVED,
|
|
34
|
+
withTextToSpeech
|
|
35
|
+
}) : message
|
|
36
|
+
}), withTextToSpeech && /*#__PURE__*/_jsx(MessageTextToSpeech, {
|
|
37
|
+
isActive: isActive,
|
|
38
|
+
isLoading: isTextToSpeechPending,
|
|
39
|
+
onPress: onPressTextToSpeech,
|
|
40
|
+
disabled: isTextToSpeechPending,
|
|
41
|
+
status: audioStatus
|
|
29
42
|
})]
|
|
30
|
-
})
|
|
31
|
-
};
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
32
45
|
const styles = StyleSheet.create({
|
|
33
46
|
container: {
|
|
34
47
|
flex: 1,
|
|
@@ -57,6 +70,13 @@ const styles = StyleSheet.create({
|
|
|
57
70
|
borderRadius: 8,
|
|
58
71
|
borderBottomLeftRadius: 0,
|
|
59
72
|
backgroundColor: '#F2F2F4'
|
|
73
|
+
},
|
|
74
|
+
messageText: {
|
|
75
|
+
flex: 1,
|
|
76
|
+
fontSize: 20,
|
|
77
|
+
fontWeight: 400,
|
|
78
|
+
fontFamily: 'Buenos Aires',
|
|
79
|
+
color: '#33334D'
|
|
60
80
|
}
|
|
61
81
|
});
|
|
62
82
|
//# sourceMappingURL=ReceivedMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","ChatbotIcon","MessageTextToSpeech","MessageVariant","jsx","_jsx","jsxs","_jsxs","ReceivedMessage","message","onPressTextToSpeech","isTextToSpeechPending","isActive","audioStatus","renderer","withTextToSpeech","style","styles","container","children","icon","width","height","messageText","variant","RECEIVED","isLoading","onPress","disabled","status","create","flex","flexDirection","maxWidth","alignItems","alignSelf","marginRight","padding","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/ReceivedMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,OAAO;EACPC,mBAAmB;EACnBC,qBAAqB;EACrBC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC,gBAAgB,GAAG;AACP,CAAC,kBACbR,KAAA,CAACP,IAAI;EAACgB,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAA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E;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;IACzBC,eAAe,EAAE;EACnB,CAAC;EACDtB,WAAW,EAAE;IACXQ,IAAI,EAAE,CAAC;IACPe,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const SentMessage =
|
|
7
|
+
export const SentMessage = ({
|
|
7
8
|
message,
|
|
8
|
-
|
|
9
|
-
}) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
style: styles.
|
|
13
|
-
children:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
renderer
|
|
10
|
+
}) => /*#__PURE__*/_jsx(View, {
|
|
11
|
+
style: styles.container,
|
|
12
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
13
|
+
style: styles.text,
|
|
14
|
+
children: renderer ? renderer({
|
|
15
|
+
message,
|
|
16
|
+
variant: MessageVariant.SENT,
|
|
17
|
+
withTextToSpeech: false
|
|
18
|
+
}) : message
|
|
19
|
+
})
|
|
18
20
|
});
|
|
19
21
|
const styles = StyleSheet.create({
|
|
20
22
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","View","jsx","_jsx","SentMessage","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","View","MessageVariant","jsx","_jsx","SentMessage","message","renderer","style","styles","container","children","text","variant","SENT","withTextToSpeech","create","alignSelf","maxWidth","padding","borderRadius","borderBottomRightRadius","backgroundColor","fontSize","fontWeight","fontFamily","color"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/SentMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,cAAc,QAAQ,4BAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAExD,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAuB,CAAC,kBAC7DH,IAAA,CAACH,IAAI;EAACO,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,eAC5BP,IAAA,CAACJ,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACG,IAAK;IAAAD,QAAA,EACtBJ,QAAQ,GACLA,QAAQ,CAAC;MAAED,OAAO;MAAEO,OAAO,EAAEX,cAAc,CAACY,IAAI;MAAEC,gBAAgB,EAAE;IAAM,CAAC,CAAC,GAC5ET;EAAO,CACP;AAAC,CACH,CACP;AAED,MAAMG,MAAM,GAAGV,UAAU,CAACiB,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,SAAS,EAAE,UAAU;IACrBC,QAAQ,EAAE,GAAG;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,uBAAuB,EAAE,CAAC;IAC1BC,eAAe,EAAE;EACnB,CAAC;EACDV,IAAI,EAAE;IACJW,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,GAAG;IACfC,UAAU,EAAE,cAAc;IAC1BC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ import { useStoreMap, useUnit } from 'effector-react';
|
|
|
6
6
|
import { ChatMessage } from "../ChatMessage/ChatMessage.js";
|
|
7
7
|
import { MessageLoader } from "../ChatMessage/MessageLoader.js";
|
|
8
8
|
import { Alternatives } from "../Alternatives/Alternatives.js";
|
|
9
|
+
import { TEXT_TO_SPEECH_CONFIG } from "../../constants.js";
|
|
9
10
|
import { MessageVariant } from "../../types/model.types.js";
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
const TOOLBAR_HEIGHT = 140;
|
|
@@ -16,7 +17,10 @@ const BOTTOM_OFFSET = Platform.select({
|
|
|
16
17
|
export const ChatbotMessages = ({
|
|
17
18
|
model,
|
|
18
19
|
isHintFeedback,
|
|
19
|
-
|
|
20
|
+
sanitizeSpeechInput,
|
|
21
|
+
isTextToSpeechEnabled,
|
|
22
|
+
textToSpeechConfig,
|
|
23
|
+
renderer
|
|
20
24
|
}) => {
|
|
21
25
|
const dimensions = useWindowDimensions();
|
|
22
26
|
const ref = useRef(null);
|
|
@@ -30,6 +34,15 @@ export const ChatbotMessages = ({
|
|
|
30
34
|
const messages = useStoreMap(model.$currentChatData, ({
|
|
31
35
|
messages
|
|
32
36
|
}) => messages);
|
|
37
|
+
const playTextToSpeech = (id, message, translatedMessage) => {
|
|
38
|
+
const text = isTranslated ? translatedMessage : message;
|
|
39
|
+
void model.t2s.play({
|
|
40
|
+
text: sanitizeSpeechInput(text),
|
|
41
|
+
messageId: id,
|
|
42
|
+
isTranslated,
|
|
43
|
+
config: textToSpeechConfig ?? TEXT_TO_SPEECH_CONFIG
|
|
44
|
+
});
|
|
45
|
+
};
|
|
33
46
|
const askChatForHelp = (message, translatedMessage) => {
|
|
34
47
|
void model.sendHelpRequestFx({
|
|
35
48
|
message,
|
|
@@ -42,7 +55,6 @@ export const ChatbotMessages = ({
|
|
|
42
55
|
}],
|
|
43
56
|
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
44
57
|
ref: ref,
|
|
45
|
-
bounces: false,
|
|
46
58
|
contentContainerStyle: styles.list,
|
|
47
59
|
onContentSizeChange: (_, height) => {
|
|
48
60
|
ref.current?.scrollToEnd();
|
|
@@ -52,19 +64,23 @@ export const ChatbotMessages = ({
|
|
|
52
64
|
},
|
|
53
65
|
children: [isOpen && /*#__PURE__*/_jsxs(View, {
|
|
54
66
|
style: styles.gap,
|
|
55
|
-
children: [messages.map(
|
|
56
|
-
|
|
57
|
-
message
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
children: [messages.map(({
|
|
68
|
+
id,
|
|
69
|
+
message,
|
|
70
|
+
translatedMessage,
|
|
71
|
+
isOwnMessage
|
|
72
|
+
}) => /*#__PURE__*/_jsx(ChatMessage, {
|
|
73
|
+
message: isTranslated ? translatedMessage : message,
|
|
74
|
+
renderer: renderer,
|
|
75
|
+
audioStatus: audioStatus,
|
|
76
|
+
onPressTextToSpeech: () => playTextToSpeech(id, message, translatedMessage),
|
|
77
|
+
isActive: id === currentPlayingId,
|
|
78
|
+
isTextToSpeechPending: isTextToSpeechPending,
|
|
79
|
+
variant: isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED,
|
|
80
|
+
withTextToSpeech: isTextToSpeechEnabled && !isOwnMessage
|
|
81
|
+
}, id)), isHelpRequestPending && /*#__PURE__*/_jsx(MessageLoader, {})]
|
|
67
82
|
}), !isHelpRequestPending && isOpen && /*#__PURE__*/_jsx(Alternatives, {
|
|
83
|
+
model: model,
|
|
68
84
|
onPressAlternative: askChatForHelp,
|
|
69
85
|
hasMessages: messages.length > 1,
|
|
70
86
|
isHintFeedback: isHintFeedback
|
|
@@ -76,13 +92,12 @@ const styles = StyleSheet.create({
|
|
|
76
92
|
container: {
|
|
77
93
|
flex: 1,
|
|
78
94
|
alignItems: 'flex-end',
|
|
79
|
-
width:
|
|
95
|
+
width: 372,
|
|
80
96
|
height: '100%'
|
|
81
97
|
},
|
|
82
98
|
list: {
|
|
83
99
|
alignItems: 'flex-end',
|
|
84
|
-
paddingVertical: 2
|
|
85
|
-
paddingRight: 6
|
|
100
|
+
paddingVertical: 2
|
|
86
101
|
},
|
|
87
102
|
gap: {
|
|
88
103
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","$currentChatData","
|
|
1
|
+
{"version":3,"names":["React","useRef","Platform","ScrollView","StyleSheet","useWindowDimensions","View","useStoreMap","useUnit","ChatMessage","MessageLoader","Alternatives","TEXT_TO_SPEECH_CONFIG","MessageVariant","jsx","_jsx","jsxs","_jsxs","TOOLBAR_HEIGHT","BOTTOM_OFFSET","select","web","default","ChatbotMessages","model","isHintFeedback","sanitizeSpeechInput","isTextToSpeechEnabled","textToSpeechConfig","renderer","dimensions","ref","isOpen","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","MAX_HEIGHT","height","messages","$currentChatData","playTextToSpeech","id","message","translatedMessage","text","play","messageId","config","askChatForHelp","style","styles","container","maxHeight","children","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","isOwnMessage","onPressTextToSpeech","isActive","variant","SENT","RECEIVED","withTextToSpeech","onPressAlternative","hasMessages","length","create","flex","alignItems","width","paddingVertical"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;A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AAE;IACHa,IAAI,EAAE,CAAC;IACPb,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -4,14 +4,15 @@ import { useStoreMap, useUnit } from 'effector-react';
|
|
|
4
4
|
import { ChatbotMessages } from "./ChatMessages/ChatbotMessages.js";
|
|
5
5
|
import { ChatControls } from "./ChatControls/ChatControls.js";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
export const Chatbot = ({
|
|
10
9
|
model,
|
|
11
10
|
isHintFeedback,
|
|
11
|
+
sanitizeSpeechInput,
|
|
12
12
|
isTextToSpeechEnabled = false,
|
|
13
13
|
textToSpeechConfig,
|
|
14
14
|
isTranslationEnabled,
|
|
15
|
+
renderer,
|
|
15
16
|
ButtonWrapper,
|
|
16
17
|
iconSize
|
|
17
18
|
}) => {
|
|
@@ -19,7 +20,6 @@ export const Chatbot = ({
|
|
|
19
20
|
const isAvailable = useStoreMap(model.$currentChatData, ({
|
|
20
21
|
isAvailable
|
|
21
22
|
}) => isAvailable);
|
|
22
|
-
model.t2s.setAudioConfig(textToSpeechConfig ?? null);
|
|
23
23
|
const translateMessages = () => {
|
|
24
24
|
void model.translation.translateAllMessagesFx();
|
|
25
25
|
};
|
|
@@ -28,12 +28,14 @@ export const Chatbot = ({
|
|
|
28
28
|
if (!isAvailable || alternatives?.chatAccess === false) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
|
-
return /*#__PURE__*/_jsxs(
|
|
32
|
-
value: model,
|
|
31
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
33
32
|
children: [/*#__PURE__*/_jsx(ChatbotMessages, {
|
|
34
33
|
model: model,
|
|
34
|
+
renderer: renderer,
|
|
35
35
|
isHintFeedback: isHintFeedback,
|
|
36
|
-
|
|
36
|
+
sanitizeSpeechInput: sanitizeSpeechInput,
|
|
37
|
+
isTextToSpeechEnabled: isTextToSpeechEnabled,
|
|
38
|
+
textToSpeechConfig: textToSpeechConfig
|
|
37
39
|
}), /*#__PURE__*/_jsx(ChatControls, {
|
|
38
40
|
model: model,
|
|
39
41
|
onPressTranslate: translateMessages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","
|
|
1
|
+
{"version":3,"names":["useStoreMap","useUnit","ChatbotMessages","ChatControls","React","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","Chatbot","model","isHintFeedback","sanitizeSpeechInput","isTextToSpeechEnabled","textToSpeechConfig","isTranslationEnabled","renderer","ButtonWrapper","iconSize","alternatives","$alternatives","isAvailable","$currentChatData","translateMessages","translation","translateAllMessagesFx","openChat","setIsOpen","closeChat","chatAccess","children","onPressTranslate","onPressChatIcon","onPressClose"],"sourceRoot":"../../../../../src","sources":["features/chatbot/components/Chatbot.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,OAAO,QAAQ,gBAAgB;AAErD,SAASC,eAAe,QAAQ,mCAAgC;AAChE,SAASC,YAAY,QAAQ,gCAA6B;AAG1D,OAAOC,KAAK,MAAM,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAiBzB,OAAO,MAAMC,OAAO,GAAGA,CAAC;EACtBC,KAAK;EACLC,cAAc;EACdC,mBAAmB;EACnBC,qBAAqB,GAAG,KAAK;EAC7BC,kBAAkB;EAClBC,oBAAoB;EACpBC,QAAQ;EACRC,aAAa;EACbC;AACY,CAAC,KAAK;EAClB,MAAMC,YAAY,GAAGpB,OAAO,CAACW,KAAK,CAACU,aAAa,CAAC;EACjD,MAAMC,WAAW,GAAGvB,WAAW,CAACY,KAAK,CAACY,gBAAgB,EAAE,CAAC;IAAED;EAAY,CAAC,KAAKA,WA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