@magmamath/students-features 0.5.0 → 0.5.1-rc-1
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/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/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/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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["CHAT_BOT_MODEL_DEFAULTS","THREAD_MESSAGES_LIMIT"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,uBAAuB,GAAG;EACrCC,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
|
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import { generateRandomId } from "../../../lib/helpers/helpers.js";
|
|
4
4
|
export class messagesHelper {
|
|
5
|
-
static createAnswer(data
|
|
6
|
-
isInitial
|
|
7
|
-
} = {}) {
|
|
5
|
+
static createAnswer(data) {
|
|
8
6
|
return {
|
|
9
7
|
id: generateRandomId(),
|
|
10
8
|
isOwnMessage: false,
|
|
11
9
|
message: data.message,
|
|
12
|
-
options: data.options,
|
|
13
10
|
threadId: data.threadId,
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
options: data.options,
|
|
12
|
+
translatedMessage: data.translatedMessage
|
|
16
13
|
};
|
|
17
14
|
}
|
|
18
15
|
static createLast(data) {
|
|
@@ -22,17 +19,20 @@ export class messagesHelper {
|
|
|
22
19
|
translatedMessage: data.translatedMessage,
|
|
23
20
|
isOwnMessage: false,
|
|
24
21
|
options: [],
|
|
22
|
+
threadId: '',
|
|
25
23
|
endMessage: true
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
static createOwn({
|
|
29
27
|
message = '',
|
|
30
|
-
translatedMessage
|
|
28
|
+
translatedMessage,
|
|
29
|
+
threadId
|
|
31
30
|
}) {
|
|
32
31
|
return {
|
|
33
32
|
id: generateRandomId(),
|
|
34
33
|
message,
|
|
35
34
|
translatedMessage,
|
|
35
|
+
threadId: threadId || '',
|
|
36
36
|
isOwnMessage: true,
|
|
37
37
|
options: []
|
|
38
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateRandomId","messagesHelper","createAnswer","data","
|
|
1
|
+
{"version":3,"names":["generateRandomId","messagesHelper","createAnswer","data","id","isOwnMessage","message","threadId","options","translatedMessage","createLast","endMessage","createOwn"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/messagesHelper.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,iCAA8B;AAS/D,OAAO,MAAMC,cAAc,CAAC;EAC1B,OAAcC,YAAYA,CAACC,IAA2B,EAAuB;IAC3E,OAAO;MACLC,EAAE,EAAEJ,gBAAgB,CAAC,CAAC;MACtBK,YAAY,EAAE,KAAK;MACnBC,OAAO,EAAEH,IAAI,CAACG,OAAO;MACrBC,QAAQ,EAAEJ,IAAI,CAACI,QAAQ;MACvBC,OAAO,EAAEL,IAAI,CAACK,OAAO;MACrBC,iBAAiB,EAAEN,IAAI,CAACM;IAC1B,CAAC;EACH;EAEA,OAAcC,UAAUA,CAACP,IAA2B,EAAE;IACpD,OAAO;MACLC,EAAE,EAAEJ,gBAAgB,CAAC,CAAC;MACtBM,OAAO,EAAEH,IAAI,CAACG,OAAO;MACrBG,iBAAiB,EAAEN,IAAI,CAACM,iBAAiB;MACzCJ,YAAY,EAAE,KAAK;MACnBG,OAAO,EAAE,EAAE;MACXD,QAAQ,EAAE,EAAE;MACZI,UAAU,EAAE;IACd,CAAC;EACH;EAEA,OAAcC,SAASA,CAAC;IACtBN,OAAO,GAAG,EAAE;IACZG,iBAAiB;IACjBF;EACe,CAAC,EAAuB;IACvC,OAAO;MACLH,EAAE,EAAEJ,gBAAgB,CAAC,CAAC;MACtBM,OAAO;MACPG,iBAAiB;MACjBF,QAAQ,EAAEA,QAAQ,IAAI,EAAE;MACxBF,YAAY,EAAE,IAAI;MAClBG,OAAO,EAAE;IACX,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { restore, createEvent, createEffect } from 'effector';
|
|
3
|
+
import { restore, createEvent, sample, createEffect } from 'effector';
|
|
4
4
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from "../constants.js";
|
|
5
5
|
import { AudioStatus } from "../types/t2s.types.js";
|
|
6
6
|
export class ChatTextToSpeechModel {
|
|
@@ -10,34 +10,30 @@ export class ChatTextToSpeechModel {
|
|
|
10
10
|
$currentPlayingId = restore(this.setCurrentPlayingId, null);
|
|
11
11
|
setStatus = createEvent();
|
|
12
12
|
$status = restore(this.setStatus, AudioStatus.STOPPED);
|
|
13
|
-
audioConfig = null;
|
|
14
|
-
textSanitizer = value => value;
|
|
15
13
|
constructor({
|
|
14
|
+
$isOpen,
|
|
16
15
|
api
|
|
17
16
|
}) {
|
|
18
17
|
this.api = api;
|
|
18
|
+
sample({
|
|
19
|
+
source: $isOpen.updates,
|
|
20
|
+
filter: isOpen => !isOpen,
|
|
21
|
+
target: this.reset
|
|
22
|
+
});
|
|
19
23
|
}
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
}
|
|
23
|
-
setConfig({
|
|
24
|
-
audioProvider,
|
|
25
|
-
textSanitizer
|
|
26
|
-
}) {
|
|
27
|
-
if (audioProvider) this.audioProvider = audioProvider;
|
|
28
|
-
if (textSanitizer) this.textSanitizer = textSanitizer;
|
|
24
|
+
setAudioProvider(audioProvider) {
|
|
25
|
+
this.audioProvider = audioProvider;
|
|
29
26
|
}
|
|
30
27
|
getCacheKey = (messageId, isTranslated) => {
|
|
31
28
|
return `${messageId}-${isTranslated ? 'translated' : 'original'}`;
|
|
32
29
|
};
|
|
33
30
|
async play({
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
text,
|
|
32
|
+
messageId,
|
|
33
|
+
isTranslated,
|
|
34
|
+
config
|
|
36
35
|
}) {
|
|
37
|
-
if (!this.audioProvider) throw new Error('Audio provider is not set. Use
|
|
38
|
-
const messageText = isTranslated ? message.translatedMessage : message.message;
|
|
39
|
-
const messageId = message.id;
|
|
40
|
-
const text = this.textSanitizer(messageText);
|
|
36
|
+
if (!this.audioProvider) throw new Error('Audio provider is not set. Use setAudioProvider.');
|
|
41
37
|
try {
|
|
42
38
|
const status = this.$status.getState();
|
|
43
39
|
const playingId = this.$currentPlayingId.getState();
|
|
@@ -61,7 +57,6 @@ export class ChatTextToSpeechModel {
|
|
|
61
57
|
let audioPath = this.audioCache[cacheKey];
|
|
62
58
|
this.setCurrentPlayingId(messageId);
|
|
63
59
|
if (!audioPath) {
|
|
64
|
-
const config = this.audioConfig;
|
|
65
60
|
const response = await this.api.textToSpeechTextFx({
|
|
66
61
|
input: {
|
|
67
62
|
text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["restore","createEvent","createEffect","AUDIO_CONFIG","DEFAULT_VOICE","AudioStatus","ChatTextToSpeechModel","audioCache","audioProvider","setCurrentPlayingId","$currentPlayingId","setStatus","$status","STOPPED","
|
|
1
|
+
{"version":3,"names":["restore","createEvent","sample","createEffect","AUDIO_CONFIG","DEFAULT_VOICE","AudioStatus","ChatTextToSpeechModel","audioCache","audioProvider","setCurrentPlayingId","$currentPlayingId","setStatus","$status","STOPPED","constructor","$isOpen","api","source","updates","filter","isOpen","target","reset","setAudioProvider","getCacheKey","messageId","isTranslated","play","text","config","Error","status","getState","playingId","isPlaying","PLAYING","isPaused","PAUSED","isCurrentMessage","pause","resume","stop","cacheKey","audioPath","response","textToSpeechTextFx","input","voice","audioConfig","audioContent","error","console"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/t2s.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,WAAW,EAASC,MAAM,EAAEC,YAAY,QAAQ,UAAU;AAC5E,SAASC,YAAY,EAAEC,aAAa,QAAQ,iBAAc;AAC1D,SAAwBC,WAAW,QAA+B,uBAAoB;AAQtF,OAAO,MAAMC,qBAAqB,CAAC;EAEhBC,UAAU,GAA2B,CAAC,CAAC;EAChDC,aAAa,GAAyB,IAAI;EAEzCC,mBAAmB,GAAGT,WAAW,CAAgB,CAAC;EAClDU,iBAAiB,GAAGX,OAAO,CAAC,IAAI,CAACU,mBAAmB,EAAE,IAAI,CAAC;EAC3DE,SAAS,GAAGX,WAAW,CAAc,CAAC;EACtCY,OAAO,GAAGb,OAAO,CAAC,IAAI,CAACY,SAAS,EAAEN,WAAW,CAACQ,OAAO,CAAC;EAE/DC,WAAWA,CAAC;IAAEC,OAAO;IAAEC;EAAgC,CAAC,EAAE;IACxD,IAAI,CAACA,GAAG,GAAGA,GAAG;IAEdf,MAAM,CAAC;MACLgB,MAAM,EAAEF,OAAO,CAACG,OAAO;MACvBC,MAAM,EAAEC,MAAM,IAAI,CAACA,MAAM;MACzBC,MAAM,EAAE,IAAI,CAACC;IACf,CAAC,CA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,MAAM;IACzC,IAAI,CAACuC,IAAI,CAAC,CAAC;IACX,IAAI,CAAC9B,SAAS,CAACN,WAAW,CAACQ,OAAO,CAAC;IACnC,IAAI,CAACJ,mBAAmB,CAAC,IAAI,CAAC;EAChC,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getOptionsForTranslation","lastMessage","alternatives","options","length","hintAlternatives","hints","defaultAlternatives","default","map","text","addTranslationsToAlternative","translatedHints","translatedDefaults","translatedText","index","addTranslationToOptions","translations","option"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.helpers.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["getOptionsForTranslation","lastMessage","alternatives","options","length","hintAlternatives","hints","defaultAlternatives","default","map","text","addTranslationsToAlternative","translatedHints","translatedDefaults","translatedText","index","addTranslationToOptions","translations","option"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/translation.helpers.ts"],"mappings":";;AAOA,OAAO,SAASA,wBAAwBA,CAAC;EACvCC,WAAW;EACXC;AACe,CAAC,EAAoB;EACpC,IAAI,CAACD,WAAW,EAAE,OAAO;IAAEA,WAAW,EAAE,IAAI;IAAEC,YAAY,EAAE;EAAK,CAAC;EAClE,IAAI,CAACD,WAAW,CAACE,OAAO,CAACC,MAAM,EAAE;IAC/B,IAAI,CAACF,YAAY,EAAE,OAAO;MAAED,WAAW,EAAE,IAAI;MAAEC,YAAY,EAAE;IAAK,CAAC;IACnE,MAAMG,gBAAgB,GAAGH,YAAY,CAACC,OAAO,CAACG,KAAK,IAAI,EAAE;IACzD,MAAMC,mBAAmB,GAAGL,YAAY,CAACC,OAAO,CAACK,OAAO,IAAI,EAAE;IAC9D,OAAO;MACLP,WAAW,EAAE,IAAI;MACjBC,YAAY,EAAE;QACZI,KAAK,EAAED,gBAAgB,CAACI,GAAG,CAAC,CAAC;UAAEC;QAAK,CAAC,KAAKA,IAAI,CAAC;QAC/CF,OAAO,EAAED,mBAAmB,CAACE,GAAG,CAAC,CAAC;UAAEC;QAAK,CAAC,KAAKA,IAAI;MACrD;IACF,CAAC;EACH;EAEA,OAAO;IACLT,WAAW,EAAEA,WAAW,CAACE,OAAO,CAACM,GAAG,CAAC,CAAC;MAAEC;IAAK,CAAC,KAAKA,IAAI,CAAC;IACxDR,YAAY,EAAE;EAChB,CAAC;AACH;AAEA,OAAO,SAASS,4BAA4BA,CAAC;EAC3CT,YAAY;EACZU,eAAe;EACfC;AACiC,CAAC,EAA2B;EAC7D,OAAO;IACL,GAAGX,YAAY;IACfC,OAAO,EAAE;MACP,GAAGD,YAAY,CAACC,OAAO;MACvBG,KAAK,EAAEM,eAAe,CAACH,GAAG,CAAC,CAACK,cAAc,EAAEC,KAAK,MAAM;QACrD,GAAGb,YAAY,CAACC,OAAO,CAACG,KAAK,CAACS,KAAK,CAAC;QACpCD;MACF,CAAC,CAAC,CAAC;MACHN,OAAO,EAAEK,kBAAkB,CAACJ,GAAG,CAAC,CAACK,cAAc,EAAEC,KAAK,MAAM;QAC1D,GAAGb,YAAY,CAACC,OAAO,CAACK,OAAO,CAACO,KAAK,CAAC;QACtCD;MACF,CAAC,CAAC;IACJ;EACF,CAAC;AACH;AAEA,OAAO,SAASE,uBAAuBA,CAACb,OAAqB,EAAEc,YAAsB,EAAE;EACrF,OAAOd,OAAO,CAACM,GAAG,CAAC,CAACS,MAAM,EAAEH,KAAK,MAAM;IACrC,GAAGG,MAAM;IACTJ,cAAc,EAAEG,YAAY,CAACF,KAAK;EACpC,CAAC,CAAC,CAAC;AACL","ignoreList":[]}
|
|
@@ -10,44 +10,26 @@ export class ChatbotTranslation {
|
|
|
10
10
|
api,
|
|
11
11
|
$key,
|
|
12
12
|
defaultMessages,
|
|
13
|
+
messagesModel,
|
|
13
14
|
alternativesModel,
|
|
14
|
-
$context
|
|
15
|
-
chats
|
|
15
|
+
$context
|
|
16
16
|
}) {
|
|
17
17
|
this.api = api;
|
|
18
18
|
this.$key = $key;
|
|
19
19
|
this.$context = $context;
|
|
20
20
|
this.defaultMessages = defaultMessages;
|
|
21
|
+
this.messagesModel = messagesModel;
|
|
21
22
|
this.alternativesModel = alternativesModel;
|
|
22
|
-
this.applyTranslationFx = attach({
|
|
23
|
-
source: [this.$isTranslated, this.$context],
|
|
24
|
-
mapParams: (messages, [isTranslationActive, context]) => ({
|
|
25
|
-
messages,
|
|
26
|
-
targetLanguage: context?.translationTargetLanguage ?? '',
|
|
27
|
-
isTranslationActive
|
|
28
|
-
}),
|
|
29
|
-
effect: this.translateMessagesFx
|
|
30
|
-
});
|
|
31
23
|
this.translateAllMessagesFx = attach({
|
|
32
|
-
source: [this.$key,
|
|
33
|
-
mapParams: (_, [key,
|
|
24
|
+
source: [this.$key, this.messagesModel.$state, this.alternativesModel.$store, this.$context],
|
|
25
|
+
mapParams: (_, [key, messages, alternatives, context]) => ({
|
|
34
26
|
targetLanguage: context?.translationTargetLanguage ?? '',
|
|
35
|
-
messages:
|
|
27
|
+
messages: messages[key] ?? [],
|
|
36
28
|
alternatives
|
|
37
29
|
}),
|
|
38
30
|
effect: this.translateBatchFx
|
|
39
31
|
});
|
|
40
|
-
|
|
41
|
-
clock: this.translateAllMessagesFx.doneData,
|
|
42
|
-
source: [this.$key],
|
|
43
|
-
fn: ([key], translatedMessages) => ({
|
|
44
|
-
key,
|
|
45
|
-
data: {
|
|
46
|
-
messages: translatedMessages
|
|
47
|
-
}
|
|
48
|
-
}),
|
|
49
|
-
target: chats.update
|
|
50
|
-
});
|
|
32
|
+
this.initTranslationSamples();
|
|
51
33
|
}
|
|
52
34
|
shouldSkipTranslation(messages) {
|
|
53
35
|
if (this.$isTranslated.getState()) {
|
|
@@ -61,6 +43,17 @@ export class ChatbotTranslation {
|
|
|
61
43
|
}
|
|
62
44
|
return false;
|
|
63
45
|
}
|
|
46
|
+
initTranslationSamples() {
|
|
47
|
+
sample({
|
|
48
|
+
clock: this.translateAllMessagesFx.doneData,
|
|
49
|
+
source: [this.$key],
|
|
50
|
+
fn: ([key], translatedMessages) => ({
|
|
51
|
+
key,
|
|
52
|
+
data: translatedMessages
|
|
53
|
+
}),
|
|
54
|
+
target: this.messagesModel.setField
|
|
55
|
+
});
|
|
56
|
+
}
|
|
64
57
|
async translateRequest({
|
|
65
58
|
textList,
|
|
66
59
|
targetLanguage
|
|
@@ -139,10 +132,8 @@ export class ChatbotTranslation {
|
|
|
139
132
|
});
|
|
140
133
|
translateMessagesFx = createEffect(async ({
|
|
141
134
|
messages,
|
|
142
|
-
targetLanguage
|
|
143
|
-
isTranslationActive
|
|
135
|
+
targetLanguage
|
|
144
136
|
}) => {
|
|
145
|
-
if (!isTranslationActive || !targetLanguage) return messages;
|
|
146
137
|
const text = messages.map(({
|
|
147
138
|
options,
|
|
148
139
|
message
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","alternativesModel","$context","
|
|
1
|
+
{"version":3,"names":["attach","createEffect","createEvent","restore","sample","decodeHTMLEntities","addTranslationsToAlternative","addTranslationToOptions","getOptionsForTranslation","ChatbotTranslation","setIsTranslated","$isTranslated","constructor","api","$key","defaultMessages","messagesModel","alternativesModel","$context","translateAllMessagesFx","source","$state","$store","mapParams","_","key","messages","alternatives","context","targetLanguage","translationTargetLanguage","effect","translateBatchFx","initTranslationSamples","shouldSkipTranslation","getState","allTranslated","every","message","translatedMessage","clock","doneData","fn","translatedMessages","data","target","setField","translateRequest","textList","text","Object","values","flat","response","translateTextFx","translatedText","translations","map","entries","reduce","result","texts","splice","length","addTranslationToAlternatives","props","set","error","endMessage","defaultOptions","anotherHintOption","options","lastMessage","at","translatedTextsList","alternativesHints","hints","alternativesDefaults","default","forEach","index","translatedHints","translatedDefaults","isLastMessage","translateMessagesFx","translatedTexts","shift","reset"],"sourceRoot":"../../../../../src","sources":["features/ch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IACLyB,QAAQ;IACRG;EACuB,CAAC,KAAqC;IAC7D,MAAMoB,IAAI,GAAGvB,QAAQ,CAClB+B,GAAG,CAAC,CAAC;MAAEc,OAAO;MAAEjC;IAAQ,CAAC,KAAK;MAC7B,OAAO,CAACA,OAAO,EAAE,GAAGiC,OAAO,CAACd,GAAG,CAAC,CAAC;QAAER;MAAK,CAAC,KAAKA,IAAI,CAAC,CAAC;IACtD,CAAC,CAAC,CACDG,IAAI,CAAC,CAAC;IAET,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACxC,GAAG,CAACyC,eAAe,CAAC;MAAEL,IAAI;MAAEpB;IAAe,CAAC,CAAC;IACzE,MAAMwD,eAAe,GAAGhC,QAAQ,CAACT,IAAI,CAACY,YAAY,CAACC,GAAG,CAAC,CAAC;MAAEF;IAAe,CAAC,KACxElD,kBAAkB,CAACkD,cAAc,CACnC,CAAC;IAED,OAAO7B,QAAQ,CAAC+B,GAAG,CAAEnB,OAAO,IAA0B;MACpD,MAAMiC,OAAO,GAAGjC,OAAO,CAACiC,OAAO;MAC/B,MAAMhC,iBAAiB,GAAG8C,eAAe,CAACC,KAAK,CAAC,CAAC;MACjD,OAAO;QACL,GAAGhD,OAAO;QACVC,iBAAiB;QACjBgC,OAAO,EAAEhE,uBAAuB,CAACgE,OAAO,EAAEc,eAAe,CAACvB,MAAM,CAAC,CAAC,EAAES,OAAO,CAACR,MAAM,CAAC;MACrF,CAAC;IACH,CAAC,CAAC;EACJ,CACF,CAAC;EAEMwB,KAAKA,CAAA,EAAG;IACb,IAAI,CAAC7E,eAAe,CAAC,KAAK,CAAC;EAC7B;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AAoEA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","StyleSheet","Animated","useSharedValue","withDelay","FadeInRight","Easing","FadeInUp","withTiming","ButtonVariant","SPACING","Button","ButtonSize","ButtonColor","PracticeButton","jsx","_jsx","jsxs","_jsxs","PracticeButtonGroup","textContent","isPracticeButtonVisible","onLeftButtonPress","onRightButtonPress","isExam","buttonsContainerOpacity","value","duration","View","style","styles","buttonsContainer","opacity","children","entering","delay","easing","ease","variant","TERTIARY","PRIMARY","size","LARGE","colorScheme","PURPLE","BLUE","text","textTransform","onPress","leftButtonText","rightButtonText","create","height","flexDirection","alignItems","justifyContent","paddingHorizontal"],"sourceRoot":"../../../../../src","sources":["features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["React","useEffect","StyleSheet","Animated","useSharedValue","withDelay","FadeInRight","Easing","FadeInUp","withTiming","ButtonVariant","SPACING","Button","ButtonSize","ButtonColor","PracticeButton","jsx","_jsx","jsxs","_jsxs","PracticeButtonGroup","textContent","isPracticeButtonVisible","onLeftButtonPress","onRightButtonPress","isExam","buttonsContainerOpacity","value","duration","View","style","styles","buttonsContainer","opacity","children","entering","delay","easing","ease","variant","TERTIARY","PRIMARY","size","LARGE","colorScheme","PURPLE","BLUE","text","textTransform","onPress","leftButtonText","rightButtonText","create","height","flexDirection","alignItems","justifyContent","paddingHorizontal"],"sourceRoot":"../../../../../src","sources":["features/endOfAssignment/ui/PracticeButtonGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,UAAU,QAAQ,cAAc;AAEzC,OAAOC,QAAQ,IACbC,cAAc,EACdC,SAAS,EACTC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GAAG/B,WAAW,CAACgC,IAAK;QAC5DhB,KAAK,EAAE;UAAEiB,IAAI,EAAE;YAAEC,aAAa,EAAE;UAAY;QAAE,CAAE;QAChDC,OAAO,EAAE1B,iBAAkB;QAAAW,QAAA,EAE1Bb,WAAW,CAAC6B;MAAc,CACrB;IAAC,CACI,CAAC,eAChBjC,IAAA,CAACd,QAAQ,CAAC0B,IAAI;MAAAK,QAAA,EACXZ,uBAAuB,iBACtBL,IAAA,CAACF,cAAc;QAACkC,OAAO,EAAEzB,kBAAmB;QAACuB,IAAI,EAAE1B,WAAW,CAAC8B;MAAgB,CAAE;IAClF,CACY,CAAC;EAAA,CACH,CAAC;AAEpB,CAAC;AAED,MAAMpB,MAAM,GAAG7B,UAAU,CAACkD,MAAM,CAAC;EAC/BpB,gBAAgB,EAAE;IAChBqB,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,iBAAiB,EAAE9C,OAAO,CAAC,GAAG;EAChC;AACF,CAAC,CAAC","ignoreList":[]}
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;
|
|
1
|
+
{"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAE/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","EntityFieldStore","setField","reset","$state","on","state","key","data","fn","currentData","newData","undefined","
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","EntityFieldStore","setField","reset","$state","on","state","key","data","fn","currentData","newData","undefined","createEntityFieldStore"],"sourceRoot":"../../../../src","sources":["lib/effector/createEntityFieldStore.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AAMnD,OAAO,MAAMC,gBAAgB,CAAI;EACfC,QAAQ,GAAGH,WAAW,CAAiB,CAAC;EACxCI,KAAK,GAAGJ,WAAW,CAAC,CAAC;EAErBK,MAAM,GAAGJ,WAAW,CAAoB,CAAC,CAAC,CAAC,CACxDK,EAAE,CAAC,IAAI,CAACH,QAAQ,EAAE,CAACI,KAAK,EAAE;IAAEC,GAAG;IAAEC,IAAI;IAAEC;EAAG,CAAC,KAAK;IAC/C,IAAIA,EAAE,EAAE;MACN,MAAMC,WAAW,GAAGJ,KAAK,CAACC,GAAG,CAAC;MAC9B,MAAMI,OAAO,GAAGF,EAAE,CAACC,WAAW,CAAC;MAC/B,IAAIC,OAAO,KAAKC,SAAS,EAAE,OAAON,KAAK;MACvC,OAAO;QAAE,GAAGA,KAAK;QAAE,CAACC,GAAG,GAAGI;MAAQ,CAAC;IACrC;IACA,OAAO;MAAE,GAAGL,KAAK;MAAE,CAACC,GAAG,GAAGC;IAAK,CAAC;EAClC,CAAC,CAAC,CACDL,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAEA,OAAO,SAASU,sBAAsBA,CAAA,EAAM;EAC1C,OAAO,IAAIZ,gBAAgB,CAAI,CAAC;AAClC","ignoreList":[]}
|
|
@@ -10,12 +10,5 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
14
|
-
"chat": {
|
|
15
|
-
"anotherHint": "Give me another hint",
|
|
16
|
-
"answerAgain": "Answer again to get another hint!",
|
|
17
|
-
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
-
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
-
"showError": "Show error"
|
|
20
|
-
}
|
|
13
|
+
"time.yearsAgo": "years ago"
|
|
21
14
|
}
|
|
@@ -10,12 +10,5 @@
|
|
|
10
10
|
"time.monthAgo": "month ago",
|
|
11
11
|
"time.monthsAgo": "months ago",
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
|
-
"time.yearsAgo": "years ago"
|
|
14
|
-
"chat": {
|
|
15
|
-
"anotherHint": "Give me another hint",
|
|
16
|
-
"answerAgain": "Answer again to get another hint!",
|
|
17
|
-
"errorMessage": "Sorry, I can't help with this issue at the moment 😔.",
|
|
18
|
-
"howCanIHelp": "Hi! Do you want help?",
|
|
19
|
-
"showError": "Show error"
|
|
20
|
-
}
|
|
13
|
+
"time.yearsAgo": "years ago"
|
|
21
14
|
}
|
|
@@ -10,12 +10,5 @@
|
|
|
10
10
|
"time.monthAgo": "månad sedan",
|
|
11
11
|
"time.monthsAgo": "månader sedan",
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
|
-
"time.yearsAgo": "år sedan"
|
|
14
|
-
"chat": {
|
|
15
|
-
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
-
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
17
|
-
"errorMessage": "Tyvärr kan jag inte hjälpa dig just nu 😔.",
|
|
18
|
-
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
19
|
-
"showError": "Visa fel"
|
|
20
|
-
}
|
|
13
|
+
"time.yearsAgo": "år sedan"
|
|
21
14
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { Locale } from "./types.js";
|
|
4
|
-
import EN from '
|
|
5
|
-
import GB from '
|
|
6
|
-
import SW from '
|
|
4
|
+
import EN from '../../lib/localization/en.json';
|
|
5
|
+
import GB from '../../lib/localization/gb.json';
|
|
6
|
+
import SW from '../../lib/localization/sw.json';
|
|
7
7
|
export const LOCALIZATION_CONFIGS = {
|
|
8
8
|
[Locale.EN]: EN,
|
|
9
9
|
[Locale.GB]: GB,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale","EN","GB","SW","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"names":["Locale","EN","GB","SW","LOCALIZATION_CONFIGS"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,YAAS;AAChC,OAAOC,EAAE,MAAM,gCAAgC;AAC/C,OAAOC,EAAE,MAAM,gCAAgC;AAC/C,OAAOC,EAAE,MAAM,gCAAgC;AAE/C,OAAO,MAAMC,oBAAoB,GAAG;EAClC,CAACJ,MAAM,CAACC,EAAE,GAAGA,EAAE;EACf,CAACD,MAAM,CAACE,EAAE,GAAGA,EAAE;EACf,CAACF,MAAM,CAACG,EAAE,GAAGA;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { $localization, setLocalization } from "./model.js";
|
|
4
|
-
export function getTranslation(config, key) {
|
|
5
|
-
const rawTranslation = config?.[key];
|
|
6
|
-
if (typeof rawTranslation === 'string' || !key.includes('.')) {
|
|
7
|
-
return rawTranslation;
|
|
8
|
-
}
|
|
9
|
-
const keys = key.split('.');
|
|
10
|
-
let translation = config;
|
|
11
|
-
for (const k of keys) {
|
|
12
|
-
if (translation[k] === undefined) return key;
|
|
13
|
-
translation = translation[k];
|
|
14
|
-
}
|
|
15
|
-
if (typeof translation === 'string') {
|
|
16
|
-
return translation;
|
|
17
|
-
}
|
|
18
|
-
return key;
|
|
19
|
-
}
|
|
20
4
|
export const getSubstitutedString = (str, substitutions = {}) => {
|
|
21
5
|
const substitutionsArray = Object.entries(substitutions);
|
|
22
6
|
let result = str;
|
|
@@ -28,9 +12,11 @@ export const getSubstitutedString = (str, substitutions = {}) => {
|
|
|
28
12
|
};
|
|
29
13
|
export const getText = (key, args = null) => {
|
|
30
14
|
const config = $localization.getState();
|
|
31
|
-
const translation =
|
|
32
|
-
if (
|
|
33
|
-
|
|
15
|
+
const translation = config?.[key];
|
|
16
|
+
if (translation && args) {
|
|
17
|
+
return getSubstitutedString(translation, args);
|
|
18
|
+
}
|
|
19
|
+
return translation ?? key;
|
|
34
20
|
};
|
|
35
21
|
export const setFeaturesLocalization = generator => {
|
|
36
22
|
setLocalization(generator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["$localization","setLocalization","
|
|
1
|
+
{"version":3,"names":["$localization","setLocalization","getSubstitutedString","str","substitutions","substitutionsArray","Object","entries","result","length","forEach","key","value","replace","getText","args","config","getState","translation","setFeaturesLocalization","generator"],"sourceRoot":"../../../../src","sources":["shared/translation/helpers.ts"],"mappings":";;AACA,SAASA,aAAa,EAAEC,eAAe,QAAQ,YAAS;AAGxD,OAAO,MAAMC,oBAAoB,GAAGA,CAACC,GAAW,EAAEC,aAAqC,GAAG,CAAC,CAAC,KAAK;EAC/F,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,OAAO,CAACH,aAAa,CAAC;EACxD,IAAII,MAAM,GAAGL,GAAG;EAEhB,IAAI,CAACE,kBAAkB,CAACI,MAAM,EAAE,OAAOD,MAAM;EAE7CH,kBAAkB,CAACK,OAAO,CAAC,CAAC,CAACC,GAAG,EAAEC,KAAK,CAAC,KAAK;IAC3CJ,MAAM,GAAGA,MAAM,CAACK,OAAO,CAAC,KAAKF,GAAG,IAAI,EAAEC,KAAK,CAAC;EAC9C,CAAC,CAAC;EAEF,OAAOJ,MAAM;AACf,CAAC;AAED,OAAO,MAAMM,OAAgB,GAAGA,CAACH,GAAoB,EAAEI,IAAI,GAAG,IAAI,KAAK;EACrE,MAAMC,MAAM,GAAGhB,aAAa,CAACiB,QAAQ,CAAC,CAAC;EAEvC,MAAMC,WAAW,GAAGF,MAAM,GAAGL,GAAG,CAAC;EAEjC,IAAIO,WAAW,IAAIH,IAAI,EAAE;IACvB,OAAOb,oBAAoB,CAACgB,WAAW,EAAEH,IAAI,CAAC;EAChD;EAEA,OAAOG,WAAW,IAAIP,GAAG;AAC3B,CAAC;AAED,OAAO,MAAMQ,uBAAuB,GAClCC,SAA6F,IAC1F;EACHnB,eAAe,CAACmB,SAAS,CAAC;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -3,13 +3,15 @@
|
|
|
3
3
|
import { useUnit } from 'effector-react';
|
|
4
4
|
import { $localization, setLocalization } from "./model.js";
|
|
5
5
|
import { useEffect } from 'react';
|
|
6
|
-
import { getSubstitutedString
|
|
6
|
+
import { getSubstitutedString } from "./helpers.js";
|
|
7
7
|
export const useText = () => {
|
|
8
8
|
const config = useUnit($localization);
|
|
9
9
|
return (key, args = null) => {
|
|
10
|
-
const translation =
|
|
11
|
-
if (
|
|
12
|
-
|
|
10
|
+
const translation = config?.[key];
|
|
11
|
+
if (translation && args) {
|
|
12
|
+
return getSubstitutedString(translation, args);
|
|
13
|
+
}
|
|
14
|
+
return translation ?? key;
|
|
13
15
|
};
|
|
14
16
|
};
|
|
15
17
|
export const useFeaturesLocalization = generator => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useUnit","$localization","setLocalization","useEffect","getSubstitutedString","
|
|
1
|
+
{"version":3,"names":["useUnit","$localization","setLocalization","useEffect","getSubstitutedString","useText","config","key","args","translation","useFeaturesLocalization","generator"],"sourceRoot":"../../../../src","sources":["shared/translation/hooks.ts"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,EAAEC,eAAe,QAAQ,YAAS;AAExD,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,oBAAoB,QAAQ,cAAW;AAEhD,OAAO,MAAMC,OAAO,GAAGA,CAAA,KAAe;EAClC,MAAMC,MAAM,GAAGN,OAAO,CAACC,aAAa,CAAuB;EAE3D,OAAO,CAACM,GAAG,EAAEC,IAAI,GAAG,IAAI,KAAK;IACzB,MAAMC,WAAW,GAAGH,MAAM,GAAGC,GAAG,CAAC;IAEjC,IAAIE,WAAW,IAAID,IAAI,EAAE;MACrB,OAAOJ,oBAAoB,CAACK,WAAW,EAAED,IAAI,CAAC;IAClD;IAEA,OAAOC,WAAW,IAAIF,GAAG;EAC7B,CAAC;AACL,CAAC;AAED,OAAO,MAAMG,uBAAuB,GAChCC,SAA6F,IAC5F;EACDR,SAAS,CAAC,MAAM;IACZD,eAAe,CAACS,SAAS,CAAC;EAC9B,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;AACnB,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,6 @@ import { LOCALIZATION_CONFIGS } from "./constants.js";
|
|
|
6
6
|
export const setLocalization = createEvent();
|
|
7
7
|
export const $localization = createStore(LOCALIZATION_CONFIGS[Locale.EN]).on(setLocalization, (state, payload) => {
|
|
8
8
|
if (typeof payload === 'function') return payload(LOCALIZATION_CONFIGS);
|
|
9
|
-
return payload;
|
|
9
|
+
if (state.locale !== payload.locale) return payload;
|
|
10
10
|
});
|
|
11
11
|
//# sourceMappingURL=model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEvent","createStore","Locale","LOCALIZATION_CONFIGS","setLocalization","$localization","EN","on","state","payload"],"sourceRoot":"../../../../src","sources":["shared/translation/model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AACnD,SAASC,MAAM,
|
|
1
|
+
{"version":3,"names":["createEvent","createStore","Locale","LOCALIZATION_CONFIGS","setLocalization","$localization","EN","on","state","payload","locale"],"sourceRoot":"../../../../src","sources":["shared/translation/model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AACnD,SAASC,MAAM,QAA4B,YAAS;AACpD,SAASC,oBAAoB,QAAQ,gBAAa;AAElD,OAAO,MAAMC,eAAe,GAAGJ,WAAW,CAExC,CAAC;AAEH,OAAO,MAAMK,aAAa,GAAGJ,WAAW,CAAqBE,oBAAoB,CAACD,MAAM,CAACI,EAAE,CAAC,CAAC,CAACC,EAAE,CAC5FH,eAAe,EACf,CAACI,KAAK,EAAEC,OAAO,KAAK;EAChB,IAAI,OAAOA,OAAO,KAAK,UAAU,EAAE,OAAOA,OAAO,CAACN,oBAAoB,CAAC;EACvE,IAAIK,KAAK,CAACE,MAAM,KAAKD,OAAO,CAACC,MAAM,EAAE,OAAOD,OAAO;AACvD,CACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;AAUA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA
|
|
1
|
+
{"version":3,"names":["Locale"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;AAUA,WAAYA,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ChatbotModel } from '../../model/ChatBotModel';
|
|
2
3
|
type AlternativesProps = {
|
|
4
|
+
model: ChatbotModel;
|
|
3
5
|
onPressAlternative: (message: string, translatedMessage?: string) => void;
|
|
4
6
|
hasMessages: boolean;
|
|
5
7
|
isHintFeedback: boolean;
|
|
6
8
|
};
|
|
7
|
-
export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
|
|
9
|
+
export declare const Alternatives: ({ model, onPressAlternative, hasMessages, isHintFeedback, }: AlternativesProps) => React.JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=Alternatives.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,YAAY,CAAA;IACnB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,YAAY,gEAKtB,iBAAiB,sBA2BnB,CAAA"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MessageVariant } from '../../types/model.types';
|
|
4
|
-
import { ConversationMessage } from '../../types/units.types';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { AudioStatus } from '../../types/t2s.types';
|
|
3
|
+
import { MessageVariant, ChatbotRenderer } from '../../types/model.types';
|
|
5
4
|
type ChatMessageProps = {
|
|
6
5
|
variant: MessageVariant;
|
|
7
|
-
message:
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
message: string;
|
|
7
|
+
onPressTextToSpeech: () => void;
|
|
8
|
+
isTextToSpeechPending: boolean;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
withTextToSpeech?: boolean;
|
|
11
|
+
audioStatus: AudioStatus;
|
|
12
|
+
renderer?: (props: ChatbotRenderer) => ReactNode;
|
|
10
13
|
};
|
|
11
14
|
export type VariantProps = Omit<ChatMessageProps, 'variant'>;
|
|
12
15
|
export declare const ChatMessage: ({ variant, ...props }: ChatMessageProps) => React.JSX.Element;
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/ChatMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzE,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,cAAc,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,SAAS,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAA;AAO5D,eAAO,MAAM,WAAW,0BAA2B,gBAAgB,sBAGlE,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ConversationMessage } from '../../types/units.types';
|
|
2
|
+
import { AudioStatus } from '../../types/t2s.types';
|
|
4
3
|
type MessageTextToSpeechProps = {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
status: AudioStatus;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
onPress: () => void;
|
|
7
9
|
};
|
|
8
|
-
export declare const MessageTextToSpeech: ({
|
|
10
|
+
export declare const MessageTextToSpeech: ({ status, disabled, isActive, isLoading, onPress, }: MessageTextToSpeechProps) => React.JSX.Element;
|
|
9
11
|
export {};
|
|
10
12
|
//# sourceMappingURL=MessageTextToSpeech.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,
|
|
1
|
+
{"version":3,"file":"MessageTextToSpeech.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAsBnD,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,mBAAmB,wDAM7B,wBAAwB,sBAU1B,CAAA"}
|