@magmamath/students-features 0.1.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/README.md +33 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js +60 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +96 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +97 -0
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js +27 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +56 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +88 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +87 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +43 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +130 -0
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chatbot.js +69 -0
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +65 -0
- package/dist/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -0
- package/dist/commonjs/features/chatbot/constants.js +31 -0
- package/dist/commonjs/features/chatbot/constants.js.map +1 -0
- package/dist/commonjs/features/chatbot/helpers.js +12 -0
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -0
- package/dist/commonjs/features/chatbot/index.js +34 -0
- package/dist/commonjs/features/chatbot/index.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/api.js +18 -0
- package/dist/commonjs/features/chatbot/model/api.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/model.js +244 -0
- package/dist/commonjs/features/chatbot/model/model.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/t2s.js +104 -0
- package/dist/commonjs/features/chatbot/model/t2s.js.map +1 -0
- package/dist/commonjs/features/chatbot/model/translation.js +203 -0
- package/dist/commonjs/features/chatbot/model/translation.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/api.types.js +2 -0
- package/dist/commonjs/features/chatbot/types/api.types.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/model.types.js +12 -0
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/t2s.types.js +13 -0
- package/dist/commonjs/features/chatbot/types/t2s.types.js.map +1 -0
- package/dist/commonjs/features/chatbot/types/translation.types.js +6 -0
- package/dist/commonjs/features/chatbot/types/translation.types.js.map +1 -0
- package/dist/commonjs/index.js +42 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/createFeature/createFeature.js +28 -0
- package/dist/commonjs/lib/createFeature/createFeature.js.map +1 -0
- package/dist/commonjs/lib/effector/createControllerEffect.js +51 -0
- package/dist/commonjs/lib/effector/createControllerEffect.js.map +1 -0
- package/dist/commonjs/lib/effector/createEntityFieldStore.js +42 -0
- package/dist/commonjs/lib/effector/createEntityFieldStore.js.map +1 -0
- package/dist/commonjs/lib/effector/index.js +20 -0
- package/dist/commonjs/lib/effector/index.js.map +1 -0
- package/dist/commonjs/lib/helpers/helpers.js +9 -0
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -0
- package/dist/commonjs/lib/localization/en.json +2 -0
- package/dist/commonjs/lib/localization/gb.json +2 -0
- package/dist/commonjs/lib/localization/sw.json +2 -0
- package/dist/commonjs/shared/hooks/useDebounce.js +21 -0
- package/dist/commonjs/shared/hooks/useDebounce.js.map +1 -0
- package/dist/commonjs/shared/icons/ArrowRightIcon.js +30 -0
- package/dist/commonjs/shared/icons/ArrowRightIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/ChatbotIcon.js +148 -0
- package/dist/commonjs/shared/icons/ChatbotIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/CloseIcon.js +28 -0
- package/dist/commonjs/shared/icons/CloseIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/GlobeIcon.js +30 -0
- package/dist/commonjs/shared/icons/GlobeIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/PauseIcon.js +32 -0
- package/dist/commonjs/shared/icons/PauseIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/PlayIcon.js +32 -0
- package/dist/commonjs/shared/icons/PlayIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/SpeakerIcon.js +37 -0
- package/dist/commonjs/shared/icons/SpeakerIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/icon.types.js +2 -0
- package/dist/commonjs/shared/icons/icon.types.js.map +1 -0
- package/dist/commonjs/shared/translation/constants.js +17 -0
- package/dist/commonjs/shared/translation/constants.js.map +1 -0
- package/dist/commonjs/shared/translation/helpers.js +31 -0
- package/dist/commonjs/shared/translation/helpers.js.map +1 -0
- package/dist/commonjs/shared/translation/hooks.js +28 -0
- package/dist/commonjs/shared/translation/hooks.js.map +1 -0
- package/dist/commonjs/shared/translation/index.js +52 -0
- package/dist/commonjs/shared/translation/index.js.map +1 -0
- package/dist/commonjs/shared/translation/model.js +15 -0
- package/dist/commonjs/shared/translation/model.js.map +1 -0
- package/dist/commonjs/shared/translation/types.js +13 -0
- package/dist/commonjs/shared/translation/types.js.map +1 -0
- package/dist/commonjs/types/types.d.js +2 -0
- package/dist/commonjs/types/types.d.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +54 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +90 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +91 -0
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js +21 -0
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +50 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +82 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +81 -0
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +37 -0
- package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +123 -0
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/module/features/chatbot/components/Chatbot.js +63 -0
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -0
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js +59 -0
- package/dist/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.js.map +1 -0
- package/dist/module/features/chatbot/constants.js +27 -0
- package/dist/module/features/chatbot/constants.js.map +1 -0
- package/dist/module/features/chatbot/helpers.js +7 -0
- package/dist/module/features/chatbot/helpers.js.map +1 -0
- package/dist/module/features/chatbot/index.js +7 -0
- package/dist/module/features/chatbot/index.js.map +1 -0
- package/dist/module/features/chatbot/model/api.js +13 -0
- package/dist/module/features/chatbot/model/api.js.map +1 -0
- package/dist/module/features/chatbot/model/model.js +239 -0
- package/dist/module/features/chatbot/model/model.js.map +1 -0
- package/dist/module/features/chatbot/model/t2s.js +99 -0
- package/dist/module/features/chatbot/model/t2s.js.map +1 -0
- package/dist/module/features/chatbot/model/translation.js +198 -0
- package/dist/module/features/chatbot/model/translation.js.map +1 -0
- package/dist/module/features/chatbot/types/api.types.js +2 -0
- package/dist/module/features/chatbot/types/api.types.js.map +1 -0
- package/dist/module/features/chatbot/types/model.types.js +8 -0
- package/dist/module/features/chatbot/types/model.types.js.map +1 -0
- package/dist/module/features/chatbot/types/t2s.types.js +9 -0
- package/dist/module/features/chatbot/types/t2s.types.js.map +1 -0
- package/dist/module/features/chatbot/types/translation.types.js +4 -0
- package/dist/module/features/chatbot/types/translation.types.js.map +1 -0
- package/dist/module/index.js +5 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/lib/createFeature/createFeature.js +22 -0
- package/dist/module/lib/createFeature/createFeature.js.map +1 -0
- package/dist/module/lib/effector/createControllerEffect.js +45 -0
- package/dist/module/lib/effector/createControllerEffect.js.map +1 -0
- package/dist/module/lib/effector/createEntityFieldStore.js +38 -0
- package/dist/module/lib/effector/createEntityFieldStore.js.map +1 -0
- package/dist/module/lib/effector/index.js +5 -0
- package/dist/module/lib/effector/index.js.map +1 -0
- package/dist/module/lib/helpers/helpers.js +4 -0
- package/dist/module/lib/helpers/helpers.js.map +1 -0
- package/dist/module/lib/localization/en.json +2 -0
- package/dist/module/lib/localization/gb.json +2 -0
- package/dist/module/lib/localization/sw.json +2 -0
- package/dist/module/shared/hooks/useDebounce.js +16 -0
- package/dist/module/shared/hooks/useDebounce.js.map +1 -0
- package/dist/module/shared/icons/ArrowRightIcon.js +22 -0
- package/dist/module/shared/icons/ArrowRightIcon.js.map +1 -0
- package/dist/module/shared/icons/ChatbotIcon.js +140 -0
- package/dist/module/shared/icons/ChatbotIcon.js.map +1 -0
- package/dist/module/shared/icons/CloseIcon.js +20 -0
- package/dist/module/shared/icons/CloseIcon.js.map +1 -0
- package/dist/module/shared/icons/GlobeIcon.js +22 -0
- package/dist/module/shared/icons/GlobeIcon.js.map +1 -0
- package/dist/module/shared/icons/PauseIcon.js +24 -0
- package/dist/module/shared/icons/PauseIcon.js.map +1 -0
- package/dist/module/shared/icons/PlayIcon.js +24 -0
- package/dist/module/shared/icons/PlayIcon.js.map +1 -0
- package/dist/module/shared/icons/SpeakerIcon.js +29 -0
- package/dist/module/shared/icons/SpeakerIcon.js.map +1 -0
- package/dist/module/shared/icons/icon.types.js +2 -0
- package/dist/module/shared/icons/icon.types.js.map +1 -0
- package/dist/module/shared/translation/constants.js +12 -0
- package/dist/module/shared/translation/constants.js.map +1 -0
- package/dist/module/shared/translation/helpers.js +24 -0
- package/dist/module/shared/translation/helpers.js.map +1 -0
- package/dist/module/shared/translation/hooks.js +22 -0
- package/dist/module/shared/translation/hooks.js.map +1 -0
- package/dist/module/shared/translation/index.js +7 -0
- package/dist/module/shared/translation/index.js.map +1 -0
- package/dist/module/shared/translation/model.js +11 -0
- package/dist/module/shared/translation/model.js.map +1 -0
- package/dist/module/shared/translation/types.js +9 -0
- package/dist/module/shared/translation/types.js.map +1 -0
- package/dist/module/types/types.d.js +2 -0
- package/dist/module/types/types.d.js.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +9 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +14 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +17 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +12 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts +4 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +21 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +25 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts +9 -0
- package/dist/typescript/commonjs/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +21 -0
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts +2 -0
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +5 -0
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts +12 -0
- package/dist/typescript/commonjs/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/model.d.ts +73 -0
- package/dist/typescript/commonjs/features/chatbot/model/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts +18 -0
- package/dist/typescript/commonjs/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts +22 -0
- package/dist/typescript/commonjs/features/chatbot/model/translation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +60 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +64 -0
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts +22 -0
- package/dist/typescript/commonjs/features/chatbot/types/t2s.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts +23 -0
- package/dist/typescript/commonjs/features/chatbot/types/translation.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +4 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/createFeature/createFeature.d.ts +7 -0
- package/dist/typescript/commonjs/lib/createFeature/createFeature.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts +16 -0
- package/dist/typescript/commonjs/lib/effector/createControllerEffect.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts +16 -0
- package/dist/typescript/commonjs/lib/effector/createEntityFieldStore.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/effector/index.d.ts +3 -0
- package/dist/typescript/commonjs/lib/effector/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts +2 -0
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/shared/hooks/useDebounce.d.ts +2 -0
- package/dist/typescript/commonjs/shared/hooks/useDebounce.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/ArrowRightIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/ArrowRightIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/ChatbotIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/ChatbotIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/CloseIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/CloseIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/GlobeIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/GlobeIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/PauseIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/PauseIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/PlayIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/PlayIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/SpeakerIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/SpeakerIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts +9 -0
- package/dist/typescript/commonjs/shared/icons/icon.types.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +6 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts +6 -0
- package/dist/typescript/commonjs/shared/translation/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts +5 -0
- package/dist/typescript/commonjs/shared/translation/hooks.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/index.d.ts +6 -0
- package/dist/typescript/commonjs/shared/translation/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts +5 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/types.d.ts +8 -0
- package/dist/typescript/commonjs/shared/translation/types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +9 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +14 -0
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +17 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +12 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts +4 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/SentMessage.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts +21 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +25 -0
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts +9 -0
- package/dist/typescript/module/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/constants.d.ts +21 -0
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/helpers.d.ts +2 -0
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/index.d.ts +5 -0
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/api.d.ts +12 -0
- package/dist/typescript/module/features/chatbot/model/api.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/model.d.ts +73 -0
- package/dist/typescript/module/features/chatbot/model/model.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts +18 -0
- package/dist/typescript/module/features/chatbot/model/t2s.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/model/translation.d.ts +22 -0
- package/dist/typescript/module/features/chatbot/model/translation.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +60 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +64 -0
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts +22 -0
- package/dist/typescript/module/features/chatbot/types/t2s.types.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts +23 -0
- package/dist/typescript/module/features/chatbot/types/translation.types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +4 -0
- package/dist/typescript/module/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/createFeature/createFeature.d.ts +7 -0
- package/dist/typescript/module/lib/createFeature/createFeature.d.ts.map +1 -0
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts +16 -0
- package/dist/typescript/module/lib/effector/createControllerEffect.d.ts.map +1 -0
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts +16 -0
- package/dist/typescript/module/lib/effector/createEntityFieldStore.d.ts.map +1 -0
- package/dist/typescript/module/lib/effector/index.d.ts +3 -0
- package/dist/typescript/module/lib/effector/index.d.ts.map +1 -0
- package/dist/typescript/module/lib/helpers/helpers.d.ts +2 -0
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/shared/hooks/useDebounce.d.ts +2 -0
- package/dist/typescript/module/shared/hooks/useDebounce.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/ArrowRightIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/ArrowRightIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/ChatbotIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/ChatbotIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/CloseIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/CloseIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/GlobeIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/GlobeIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/PauseIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/PauseIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/PlayIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/PlayIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/SpeakerIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/SpeakerIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts +9 -0
- package/dist/typescript/module/shared/icons/icon.types.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +6 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/helpers.d.ts +6 -0
- package/dist/typescript/module/shared/translation/helpers.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/hooks.d.ts +5 -0
- package/dist/typescript/module/shared/translation/hooks.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/index.d.ts +6 -0
- package/dist/typescript/module/shared/translation/index.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/model.d.ts +5 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/types.d.ts +8 -0
- package/dist/typescript/module/shared/translation/types.d.ts.map +1 -0
- package/package.json +73 -0
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +64 -0
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +92 -0
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +103 -0
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +28 -0
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +42 -0
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +78 -0
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +73 -0
- package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +31 -0
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +148 -0
- package/src/features/chatbot/components/Chatbot.tsx +92 -0
- package/src/features/chatbot/components/ThreeDotsLoader/ThreeDotsLoader.tsx +77 -0
- package/src/features/chatbot/constants.ts +30 -0
- package/src/features/chatbot/helpers.ts +4 -0
- package/src/features/chatbot/index.ts +4 -0
- package/src/features/chatbot/model/api.ts +28 -0
- package/src/features/chatbot/model/model.ts +277 -0
- package/src/features/chatbot/model/t2s.ts +107 -0
- package/src/features/chatbot/model/translation.ts +231 -0
- package/src/features/chatbot/types/api.types.ts +59 -0
- package/src/features/chatbot/types/model.types.ts +73 -0
- package/src/features/chatbot/types/t2s.types.ts +24 -0
- package/src/features/chatbot/types/translation.types.ts +23 -0
- package/src/index.ts +3 -0
- package/src/lib/createFeature/createFeature.tsx +21 -0
- package/src/lib/effector/createControllerEffect.ts +66 -0
- package/src/lib/effector/createEntityFieldStore.ts +43 -0
- package/src/lib/effector/index.ts +2 -0
- package/src/lib/helpers/helpers.ts +2 -0
- package/src/lib/localization/en.json +2 -0
- package/src/lib/localization/gb.json +2 -0
- package/src/lib/localization/sw.json +2 -0
- package/src/shared/hooks/useDebounce.ts +17 -0
- package/src/shared/icons/ArrowRightIcon.tsx +14 -0
- package/src/shared/icons/ChatbotIcon.tsx +109 -0
- package/src/shared/icons/CloseIcon.tsx +12 -0
- package/src/shared/icons/GlobeIcon.tsx +14 -0
- package/src/shared/icons/PauseIcon.tsx +16 -0
- package/src/shared/icons/PlayIcon.tsx +16 -0
- package/src/shared/icons/SpeakerIcon.tsx +22 -0
- package/src/shared/icons/icon.types.ts +8 -0
- package/src/shared/translation/constants.ts +10 -0
- package/src/shared/translation/helpers.ts +34 -0
- package/src/shared/translation/hooks.ts +28 -0
- package/src/shared/translation/index.ts +5 -0
- package/src/shared/translation/model.ts +15 -0
- package/src/shared/translation/types.ts +9 -0
- package/src/types/types.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","PlayIcon","color","height","width","jsx","viewBox","fill","children","Path","fillRule","clipRule","d","exports"],"sourceRoot":"../../../../src","sources":["shared/icons/PlayIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,yBAAAC,CAAA,6BAA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AAE;EAAEC,KAAK,GAAG;AAAc,CAAC,KAAK;EACrF,oBACE,IAAAxB,WAAA,CAAAyB,GAAA,EAAC3B,eAAA,CAAAS,OAAG;IAACiB,KAAK,EAAEA,KAAM;IAACD,MAAM,EAAEA,MAAO;IAACG,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC,MAAM;IAAAC,QAAA,eAChE,IAAA5B,WAAA,CAAAyB,GAAA,EAAC3B,eAAA,CAAA+B,IAAI;MACHC,QAAQ,EAAC,SAAS;MAClBC,QAAQ,EAAC,SAAS;MAClBC,CAAC,EAAC,uIAAuI;MACzIL,IAAI,EAAEL;IAAM,CACb;EAAC,CACC,CAAC;AAEV,CAAC;AAAAW,OAAA,CAAAZ,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SpeakerIcon = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const SpeakerIcon = ({
|
|
14
|
+
width = 17,
|
|
15
|
+
height = 17,
|
|
16
|
+
color = '#4D4D63'
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.default, {
|
|
19
|
+
width: width,
|
|
20
|
+
height: height,
|
|
21
|
+
viewBox: "0 0 17 17",
|
|
22
|
+
fill: "none",
|
|
23
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M6.743 3.016c1.09-.94 2.735-.128 2.735 1.349v8.27c0 1.478-1.644 2.289-2.735 1.35L3.92 11.556H2.172C1.25 11.556.5 10.774.5 9.808V7.192c0-.966.749-1.748 1.672-1.748h1.75l2.82-2.428zM8.01 4.365c0-.182-.202-.281-.336-.166L4.824 6.653c-.243.21-.549.324-.864.324H2.172a.21.21 0 00-.205.215v2.616a.21.21 0 00.205.215H3.96c.315 0 .62.115.864.324l2.851 2.454c.134.115.336.016.336-.165V4.364zM11.18 4.36c.286-.3.75-.3 1.037 0 1.041 1.089 1.78 2.582 1.78 4.14 0 1.558-.739 3.051-1.78 4.14-.287.3-.751.3-1.038 0a.791.791 0 010-1.084c.836-.874 1.35-1.997 1.35-3.056s-.514-2.182-1.35-3.056a.791.791 0 010-1.084z",
|
|
27
|
+
fill: color
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
29
|
+
fillRule: "evenodd",
|
|
30
|
+
clipRule: "evenodd",
|
|
31
|
+
d: "M13.057 2.725c.287-.3.75-.3 1.037 0C15.788 4.495 16.5 6.32 16.5 8.5c0 2.18-.713 4.006-2.406 5.775-.286.3-.75.3-1.037 0a.791.791 0 010-1.084c1.437-1.501 1.976-2.945 1.976-4.691s-.54-3.19-1.976-4.691a.791.791 0 010-1.084z",
|
|
32
|
+
fill: color
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.SpeakerIcon = SpeakerIcon;
|
|
37
|
+
//# sourceMappingURL=SpeakerIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeSvg","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SpeakerIcon","width","height","color","jsxs","viewBox","fill","children","jsx","Path","fillRule","clipRule","d","exports"],"sourceRoot":"../../../../src","sources":["shared/icons/SpeakerIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA4C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAA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CACb,CAAC;EAAA,CACC,CAAC;AAEV,CAAC;AAAAU,OAAA,CAAAb,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["shared/icons/icon.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LOCALIZATION_CONFIGS = void 0;
|
|
7
|
+
var _types = require("./types.js");
|
|
8
|
+
var _en = _interopRequireDefault(require("../../lib/localization/en.json"));
|
|
9
|
+
var _gb = _interopRequireDefault(require("../../lib/localization/gb.json"));
|
|
10
|
+
var _sw = _interopRequireDefault(require("../../lib/localization/sw.json"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const LOCALIZATION_CONFIGS = exports.LOCALIZATION_CONFIGS = {
|
|
13
|
+
[_types.Locale.EN]: _en.default,
|
|
14
|
+
[_types.Locale.GB]: _gb.default,
|
|
15
|
+
[_types.Locale.SW]: _sw.default
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","_en","_interopRequireDefault","_gb","_sw","e","__esModule","default","LOCALIZATION_CONFIGS","exports","Locale","EN","GB","SW"],"sourceRoot":"../../../../src","sources":["shared/translation/constants.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,GAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,GAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA+C,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAExC,MAAMG,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EAChC,CAACE,aAAM,CAACC,EAAE,GAAGA,WAAE;EACf,CAACD,aAAM,CAACE,EAAE,GAAGA,WAAE;EACf,CAACF,aAAM,CAACG,EAAE,GAAGA;AACjB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setFeaturesLocalization = exports.getText = exports.getSubstitutedString = void 0;
|
|
7
|
+
var _model = require("./model.js");
|
|
8
|
+
const getSubstitutedString = (str, substitutions = {}) => {
|
|
9
|
+
const substitutionsArray = Object.entries(substitutions);
|
|
10
|
+
let result = str;
|
|
11
|
+
if (!substitutionsArray.length) return result;
|
|
12
|
+
substitutionsArray.forEach(([key, value]) => {
|
|
13
|
+
result = result.replace(`{{${key}}}`, value);
|
|
14
|
+
});
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
exports.getSubstitutedString = getSubstitutedString;
|
|
18
|
+
const getText = (key, args = null) => {
|
|
19
|
+
const config = _model.$localization.getState();
|
|
20
|
+
const translation = config?.[key];
|
|
21
|
+
if (translation && args) {
|
|
22
|
+
return getSubstitutedString(translation, args);
|
|
23
|
+
}
|
|
24
|
+
return translation ?? key;
|
|
25
|
+
};
|
|
26
|
+
exports.getText = getText;
|
|
27
|
+
const setFeaturesLocalization = generator => {
|
|
28
|
+
(0, _model.setLocalization)(generator);
|
|
29
|
+
};
|
|
30
|
+
exports.setFeaturesLocalization = setFeaturesLocalization;
|
|
31
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_model","require","getSubstitutedString","str","substitutions","substitutionsArray","Object","entries","result","length","forEach","key","value","replace","exports","getText","args","config","$localization","getState","translation","setFeaturesLocalization","generator","setLocalization"],"sourceRoot":"../../../../src","sources":["shared/translation/helpers.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAGO,MAAMC,oBAAoB,GAAGA,CAACC,GAAW,EAAEC,aAAqC,GAAG,CAAC,CAAC,KAAK;EAC7F,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;IACzCJ,MAAM,GAAGA,MAAM,CAACK,OAAO,CAAC,KAAKF,GAAG,IAAI,EAAEC,KAAK,CAAC;EAChD,CAAC,CAAC;EAEF,OAAOJ,MAAM;AACjB,CAAC;AAAAM,OAAA,CAAAZ,oBAAA,GAAAA,oBAAA;AAEM,MAAMa,OAAgB,GAAGA,CAACJ,GAAG,EAAEK,IAAI,GAAG,IAAI,KAAK;EAClD,MAAMC,MAAM,GAAGC,oBAAa,CAACC,QAAQ,CAAC,CAAC;EAEvC,MAAMC,WAAW,GAAGH,MAAM,GAAGN,GAAG,CAAC;EAEjC,IAAIS,WAAW,IAAIJ,IAAI,EAAE;IACrB,OAAOd,oBAAoB,CAACkB,WAAW,EAAEJ,IAAI,CAAC;EAClD;EAEA,OAAOI,WAAW,IAAIT,GAAG;AAC7B,CAAC;AAAAG,OAAA,CAAAC,OAAA,GAAAA,OAAA;AAEM,MAAMM,uBAAuB,GAChCC,SAA6F,IAC5F;EACD,IAAAC,sBAAe,EAACD,SAAS,CAAC;AAC9B,CAAC;AAAAR,OAAA,CAAAO,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useText = exports.useFeaturesLocalization = void 0;
|
|
7
|
+
var _effectorReact = require("effector-react");
|
|
8
|
+
var _model = require("./model.js");
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _helpers = require("./helpers.js");
|
|
11
|
+
const useText = () => {
|
|
12
|
+
const config = (0, _effectorReact.useUnit)(_model.$localization);
|
|
13
|
+
return (key, args = null) => {
|
|
14
|
+
const translation = config?.[key];
|
|
15
|
+
if (translation && args) {
|
|
16
|
+
return (0, _helpers.getSubstitutedString)(translation, args);
|
|
17
|
+
}
|
|
18
|
+
return translation ?? key;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.useText = useText;
|
|
22
|
+
const useFeaturesLocalization = generator => {
|
|
23
|
+
(0, _react.useEffect)(() => {
|
|
24
|
+
(0, _model.setLocalization)(generator);
|
|
25
|
+
}, [generator]);
|
|
26
|
+
};
|
|
27
|
+
exports.useFeaturesLocalization = useFeaturesLocalization;
|
|
28
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "$localization", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _model.$localization;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "Locale", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _types.Locale;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "setFeaturesLocalization", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _helpers.setFeaturesLocalization;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "setLocalization", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _model.setLocalization;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "t", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _helpers.getText;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "useFeaturesLocalization", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _hooks.useFeaturesLocalization;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "useText", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _hooks.useText;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
var _hooks = require("./hooks.js");
|
|
49
|
+
var _helpers = require("./helpers.js");
|
|
50
|
+
var _model = require("./model.js");
|
|
51
|
+
var _types = require("./types.js");
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hooks","require","_helpers","_model","_types"],"sourceRoot":"../../../../src","sources":["shared/translation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setLocalization = exports.$localization = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _types = require("./types.js");
|
|
9
|
+
var _constants = require("./constants.js");
|
|
10
|
+
const setLocalization = exports.setLocalization = (0, _effector.createEvent)();
|
|
11
|
+
const $localization = exports.$localization = (0, _effector.createStore)(_constants.LOCALIZATION_CONFIGS[_types.Locale.EN]).on(setLocalization, (state, payload) => {
|
|
12
|
+
if (typeof payload === 'function') return payload(_constants.LOCALIZATION_CONFIGS);
|
|
13
|
+
if (state.locale !== payload.locale) return payload;
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Locale = void 0;
|
|
7
|
+
let Locale = exports.Locale = /*#__PURE__*/function (Locale) {
|
|
8
|
+
Locale["EN"] = "en-SE";
|
|
9
|
+
Locale["SW"] = "sv-SE";
|
|
10
|
+
Locale["GB"] = "en-GB";
|
|
11
|
+
return Locale;
|
|
12
|
+
}({});
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Locale","exports"],"sourceRoot":"../../../../src","sources":["shared/translation/types.ts"],"mappings":";;;;;;IAEYA,MAAM,GAAAC,OAAA,CAAAD,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/types.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { StyleSheet, View } from 'react-native';
|
|
6
|
+
import { useStoreMap, useUnit } from 'effector-react';
|
|
7
|
+
import { HelpRequestOption } from "./HelpRequestOption.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
export const Alternatives = ({
|
|
10
|
+
model,
|
|
11
|
+
onPressAlternative,
|
|
12
|
+
hasMessages,
|
|
13
|
+
isHintFeedback
|
|
14
|
+
}) => {
|
|
15
|
+
const assignmentId = useUnit(model.credits.$assignmentId);
|
|
16
|
+
const exerciseId = useUnit(model.credits.$exerciseId);
|
|
17
|
+
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
18
|
+
const alternatives = useUnit(model.$alternatives);
|
|
19
|
+
const isTranslationPending = useUnit(model.translation.translateBatchFx.pending);
|
|
20
|
+
const lastMessageOptions = useStoreMap({
|
|
21
|
+
store: model.messages.$state,
|
|
22
|
+
keys: [assignmentId, exerciseId],
|
|
23
|
+
fn: state => {
|
|
24
|
+
const lastMessage = state[assignmentId]?.[exerciseId]?.messages?.at(-1);
|
|
25
|
+
return lastMessage ? lastMessage.options : [];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const options = useMemo(() => {
|
|
29
|
+
if (hasMessages) return lastMessageOptions ?? [];
|
|
30
|
+
if (isHintFeedback) return alternatives?.options.hints ?? [];
|
|
31
|
+
return alternatives?.options.default ?? [];
|
|
32
|
+
}, [hasMessages, lastMessageOptions, isHintFeedback, alternatives]);
|
|
33
|
+
return /*#__PURE__*/_jsx(View, {
|
|
34
|
+
style: styles.container,
|
|
35
|
+
children: options.map(({
|
|
36
|
+
text,
|
|
37
|
+
promptKey,
|
|
38
|
+
translatedText
|
|
39
|
+
}, index) => /*#__PURE__*/_jsx(HelpRequestOption, {
|
|
40
|
+
onPress: () => onPressAlternative(text, promptKey, translatedText),
|
|
41
|
+
message: isTranslated ? translatedText : text,
|
|
42
|
+
disabled: isTranslationPending
|
|
43
|
+
}, index))
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const styles = StyleSheet.create({
|
|
47
|
+
container: {
|
|
48
|
+
flex: 1,
|
|
49
|
+
width: 305,
|
|
50
|
+
marginVertical: 8,
|
|
51
|
+
gap: 8
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=Alternatives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","useStoreMap","useUnit","HelpRequestOption","jsx","_jsx","Alternatives","model","onPressAlternative","hasMessages","isHintFeedback","assignmentId","credits","$assignmentId","exerciseId","$exerciseId","isTranslated","translation","$isTranslated","alternatives","$alternatives","isTranslationPending","translateBatchFx","pending","lastMessageOptions","store","messages","$state","keys","fn","state","lastMessage","at","options","hints","default","style","styles","container","children","map","text","promptKey","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,OAAO,QAAQ,OAAO;AAC/B,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,C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K,kBACtDvC,IAAA,CAACF,iBAAiB;MAEhB0C,OAAO,EAAEA,CAAA,KAAMrC,kBAAkB,CAACiC,IAAI,EAAEC,SAAS,EAAEC,cAAc,CAAE;MACnEG,OAAO,EAAE9B,YAAY,GAAI2B,cAAc,GAAcF,IAAK;MAC1DM,QAAQ,EAAE1B;IAAqB,GAH1BuB,KAIN,CACF;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMP,MAAM,GAAGtC,UAAU,CAACiD,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,cAAc,EAAE,CAAC;IACjBC,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { Animated, Platform, Pressable, StyleSheet } from 'react-native';
|
|
6
|
+
import { ArrowRightIcon } from "../../../../shared/icons/ArrowRightIcon.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const transitionColor = (isHovered, value) => Animated.timing(value, {
|
|
9
|
+
toValue: isHovered ? 1 : 0,
|
|
10
|
+
duration: 200,
|
|
11
|
+
useNativeDriver: Platform.OS !== 'web'
|
|
12
|
+
}).start();
|
|
13
|
+
export const HelpRequestOption = ({
|
|
14
|
+
onPress,
|
|
15
|
+
message,
|
|
16
|
+
disabled = false
|
|
17
|
+
}) => {
|
|
18
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
19
|
+
const backgroundColor = useRef(new Animated.Value(0)).current;
|
|
20
|
+
const backgroundInterpolation = backgroundColor.interpolate({
|
|
21
|
+
inputRange: [0, 1],
|
|
22
|
+
outputRange: ['#FFFFFF', '#55ABE0']
|
|
23
|
+
});
|
|
24
|
+
const textColor = useRef(new Animated.Value(0)).current;
|
|
25
|
+
const textInterpolation = textColor.interpolate({
|
|
26
|
+
inputRange: [0, 1],
|
|
27
|
+
outputRange: ['#33334D', '#FFFFFF']
|
|
28
|
+
});
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
transitionColor(isHovered, backgroundColor);
|
|
31
|
+
transitionColor(isHovered, textColor);
|
|
32
|
+
}, [isHovered]);
|
|
33
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
34
|
+
onHoverIn: () => setIsHovered(true),
|
|
35
|
+
onHoverOut: () => setIsHovered(false),
|
|
36
|
+
onPress: onPress,
|
|
37
|
+
style: styles.button,
|
|
38
|
+
disabled: disabled,
|
|
39
|
+
children: /*#__PURE__*/_jsxs(Animated.View, {
|
|
40
|
+
style: [styles.textWrapper, {
|
|
41
|
+
backgroundColor: backgroundInterpolation
|
|
42
|
+
}],
|
|
43
|
+
children: [/*#__PURE__*/_jsx(Animated.Text, {
|
|
44
|
+
numberOfLines: 1,
|
|
45
|
+
style: [styles.text, {
|
|
46
|
+
color: textInterpolation
|
|
47
|
+
}],
|
|
48
|
+
children: message
|
|
49
|
+
}), /*#__PURE__*/_jsx(ArrowRightIcon, {
|
|
50
|
+
color: isHovered ? '#FFFFFF' : '#33334D'
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
button: {
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'space-between',
|
|
60
|
+
width: '100%'
|
|
61
|
+
},
|
|
62
|
+
text: {
|
|
63
|
+
fontSize: 20,
|
|
64
|
+
fontWeight: 400,
|
|
65
|
+
fontFamily: 'Buenos Aires',
|
|
66
|
+
color: '#33334D'
|
|
67
|
+
},
|
|
68
|
+
textWrapper: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
justifyContent: 'space-between',
|
|
73
|
+
maxWidth: 305,
|
|
74
|
+
paddingHorizontal: 16,
|
|
75
|
+
paddingVertical: 8,
|
|
76
|
+
borderWidth: 1,
|
|
77
|
+
borderRadius: 48,
|
|
78
|
+
borderColor: '#55ABE0',
|
|
79
|
+
elevation: 3,
|
|
80
|
+
shadowColor: '#333',
|
|
81
|
+
shadowOffset: {
|
|
82
|
+
width: 0,
|
|
83
|
+
height: 1
|
|
84
|
+
},
|
|
85
|
+
shadowOpacity: 0.25,
|
|
86
|
+
shadowRadius: 3,
|
|
87
|
+
backgroundColor: '#FFFFFF'
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=HelpRequestOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Platform","Pressable","StyleSheet","ArrowRightIcon","jsx","_jsx","jsxs","_jsxs","transitionColor","isHovered","value","timing","toValue","duration","useNativeDriver","OS","start","HelpRequestOption","onPress","message","disabled","setIsHovered","backgroundColor","Value","current","backgroundInterpolation","interpolate","inputRange","outputRange","textColor","textInterpolation","onHoverIn","onHoverOut","style","styles","button","children","View","textWrapper","Text","numberOfLines","text","color","create","flexDirection","alignItems","justifyContent","width","fontSize","fontWeight","fontFamily","flex","maxWidth","paddingHorizontal","paddingVertical","borderWidth","borderRadius","borderColor","elevation","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/Alternatives/HelpRequestOption.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACxE,SAASC,cAAc,QAAQ,4CAAyC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExE,MAAMC,eAAe,GAAGA,CAAC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,MAAM;IACnBC,YAAY,EAAE;MAAEb,KAAK,EAAE,CAAC;MAAEc,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfzC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ActivityIndicator, Pressable, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { Button } from '@magmamath/react-native-ui';
|
|
6
|
+
import { useUnit } from 'effector-react';
|
|
7
|
+
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
8
|
+
import { GlobeIcon } from "../../../../shared/icons/GlobeIcon.js";
|
|
9
|
+
import { CloseIcon } from "../../../../shared/icons/CloseIcon.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
export const ChatControls = ({
|
|
12
|
+
model,
|
|
13
|
+
onPressTranslate,
|
|
14
|
+
onPressChatIcon,
|
|
15
|
+
onPressClose,
|
|
16
|
+
isTranslationEnabled,
|
|
17
|
+
ButtonWrapper
|
|
18
|
+
}) => {
|
|
19
|
+
const isOpen = useUnit(model.$isOpen);
|
|
20
|
+
const isTranslated = useUnit(model.translation.$isTranslated);
|
|
21
|
+
const isTranslationPending = useUnit(model.translation.translateBatchFx.pending);
|
|
22
|
+
const isHelpRequestPending = useUnit(model.sendHelpRequestFx.pending);
|
|
23
|
+
if (isOpen) {
|
|
24
|
+
const backgroundColor = isTranslated ? '#55ABE0' : '#FFF';
|
|
25
|
+
const fillColor = isTranslated ? '#FFF' : '#4D4D63';
|
|
26
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
27
|
+
style: styles.container,
|
|
28
|
+
children: [isTranslationEnabled && /*#__PURE__*/_jsx(Pressable, {
|
|
29
|
+
onPress: onPressTranslate,
|
|
30
|
+
disabled: isHelpRequestPending || isTranslationPending,
|
|
31
|
+
style: [styles.buttonTranslate, {
|
|
32
|
+
backgroundColor
|
|
33
|
+
}],
|
|
34
|
+
children: isTranslationPending ? /*#__PURE__*/_jsx(ActivityIndicator, {}) : /*#__PURE__*/_jsx(GlobeIcon, {
|
|
35
|
+
color: fillColor
|
|
36
|
+
})
|
|
37
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
38
|
+
onPress: onPressClose,
|
|
39
|
+
style: {
|
|
40
|
+
container: styles.buttonClose,
|
|
41
|
+
button: {
|
|
42
|
+
backgroundColor: '#FFF'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
raiseLevel: 5,
|
|
46
|
+
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/_jsx(View, {
|
|
51
|
+
style: styles.container,
|
|
52
|
+
children: /*#__PURE__*/_jsx(ButtonWrapper, {
|
|
53
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
54
|
+
onPress: onPressChatIcon,
|
|
55
|
+
children: /*#__PURE__*/_jsx(ChatbotIcon, {})
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const styles = StyleSheet.create({
|
|
61
|
+
container: {
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
justifyContent: 'flex-end',
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
height: 60,
|
|
66
|
+
gap: 8
|
|
67
|
+
},
|
|
68
|
+
buttonClose: {
|
|
69
|
+
width: 50,
|
|
70
|
+
height: 50
|
|
71
|
+
},
|
|
72
|
+
buttonTranslate: {
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
width: 36,
|
|
76
|
+
height: 36,
|
|
77
|
+
borderRadius: 32,
|
|
78
|
+
borderWidth: 1,
|
|
79
|
+
borderColor: '#F2F2F4',
|
|
80
|
+
shadowColor: '#333333',
|
|
81
|
+
shadowOffset: {
|
|
82
|
+
width: 0,
|
|
83
|
+
height: 1
|
|
84
|
+
},
|
|
85
|
+
shadowOpacity: 0.25,
|
|
86
|
+
shadowRadius: 3,
|
|
87
|
+
elevation: 3,
|
|
88
|
+
backgroundColor: '#FFF'
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=ChatControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ActivityIndicator","Pressable","StyleSheet","View","Button","useUnit","ChatbotIcon","GlobeIcon","CloseIcon","jsx","_jsx","jsxs","_jsxs","ChatControls","model","onPressTranslate","onPressChatIcon","onPressClose","isTranslationEnabled","ButtonWrapper","isOpen","$isOpen","isTranslated","translation","$isTranslated","isTranslationPending","translateBatchFx","pending","isHelpRequestPending","sendHelpRequestFx","backgroundColor","fillColor","style","styles","container","children","onPress","disabled","buttonTranslate","color","buttonClose","button","raiseLevel","create","alignItems","justifyContent","flexDirection","height","gap","width","borderRadius","borderWidth","borderColor","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatControls/ChatControls.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,iBAAiB,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC7E,SAASC,MAAM,QAAQ,4BAA4B;AACnD,SAASC,OAAO,QAAQ,gBAAgB;AAExC,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,SAAS,QAAQ,uCAAoC;AAC9D,SAASC,SAAS,QAAQ,uCAAoC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW9D,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAC3BC,KAAK;EACLC,gBAAgB;EAChBC,eAAe;EACfC,YAAY;EACZC,oBAAoB;EACpBC;AACiB,CAAC,KA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,QAAA,eAC5BzB,IAAA,CAACS,aAAa;MAAAgB,QAAA,eACZzB,IAAA,CAACT,SAAS;QAACmC,OAAO,EAAEpB,eAAgB;QAAAmB,QAAA,eAClCzB,IAAA,CAACJ,WAAW,IAAE;MAAC,CACN;IAAC,CACC;EAAC,CACZ,CAAC;AAEX,CAAC;AAED,MAAM2B,MAAM,GAAG/B,UAAU,CAACyC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,UAAU;IAC1BC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVC,GAAG,EAAE;EACP,CAAC;EACDR,WAAW,EAAE;IACXS,KAAK,EAAE,EAAE;IACTF,MAAM,EAAE;EACV,CAAC;EACDT,eAAe,EAAE;IACfM,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBI,KAAK,EAAE,EAAE;IACTF,MAAM,EAAE,EAAE;IACVG,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEL,KAAK,EAAE,CAAC;MAAEF,MAAM,EAAE;IAAE,CAAC;IACrCQ,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZ3B,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ReceivedMessage } from "./ReceivedMessage.js";
|
|
5
|
+
import { SentMessage } from "./SentMessage.js";
|
|
6
|
+
import { MessageVariant } from "../../types/model.types.js";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const variantsMap = {
|
|
9
|
+
[MessageVariant.SENT]: SentMessage,
|
|
10
|
+
[MessageVariant.RECEIVED]: ReceivedMessage
|
|
11
|
+
};
|
|
12
|
+
export const ChatMessage = ({
|
|
13
|
+
variant,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
const Component = variantsMap[variant];
|
|
17
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ChatMessage.js.map
|
|
@@ -0,0 +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,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":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { ChatbotIcon } from "../../../../shared/icons/ChatbotIcon.js";
|
|
6
|
+
import { ThreeDotsLoader } from "../ThreeDotsLoader/ThreeDotsLoader.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export const MessageLoader = () => /*#__PURE__*/_jsxs(View, {
|
|
9
|
+
style: styles.container,
|
|
10
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
11
|
+
style: styles.icon,
|
|
12
|
+
children: /*#__PURE__*/_jsx(ChatbotIcon, {
|
|
13
|
+
width: 38,
|
|
14
|
+
height: 38
|
|
15
|
+
})
|
|
16
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: styles.loader,
|
|
18
|
+
children: /*#__PURE__*/_jsx(ThreeDotsLoader, {})
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
const styles = StyleSheet.create({
|
|
22
|
+
container: {
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
width: 305
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
alignSelf: 'flex-end',
|
|
28
|
+
marginRight: 8
|
|
29
|
+
},
|
|
30
|
+
loader: {
|
|
31
|
+
flex: 1,
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
alignItems: 'flex-start',
|
|
34
|
+
maxWidth: 70,
|
|
35
|
+
padding: 8,
|
|
36
|
+
paddingTop: 15,
|
|
37
|
+
shadowColor: '#333333',
|
|
38
|
+
shadowOffset: {
|
|
39
|
+
width: 0,
|
|
40
|
+
height: 1
|
|
41
|
+
},
|
|
42
|
+
shadowOpacity: 0.25,
|
|
43
|
+
shadowRadius: 3,
|
|
44
|
+
elevation: 3,
|
|
45
|
+
borderRadius: 8,
|
|
46
|
+
borderBottomLeftRadius: 0,
|
|
47
|
+
backgroundColor: '#F2F2F4'
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=MessageLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ChatbotIcon","ThreeDotsLoader","jsx","_jsx","jsxs","_jsxs","MessageLoader","style","styles","container","children","icon","width","height","loader","create","flexDirection","alignSelf","marginRight","flex","alignItems","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","backgroundColor"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageLoader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,WAAW,QAAQ,yCAAsC;AAClE,SAASC,eAAe,QAAQ,uCAAoC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpE,OAAO,MAAMC,aAAa,GAAGA,CAAA,kBAC3BD,KAAA,CAACN,IAAI;EAACQ,KAAK,EAAEC,MAAM,CAACC,SAAU;EAAAC,QAAA,gBAC5BP,IAAA,CAACJ,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACG,IAAK;IAAAD,QAAA,eACvBP,IAAA,CAACH,WAAW;MAACY,KAAK,EAAE,EAAG;MAACC,MAAM,EAAE;IAAG,CAAE;EAAC,CAClC,CAAC,eACPV,IAAA,CAACJ,IAAI;IAACQ,KAAK,EAAEC,MAAM,CAACM,MAAO;IAAAJ,QAAA,eACzBP,IAAA,CAACF,eAAe,IAAE;EAAC,CACf,CAAC;AAAA,CACH,CACP;AAED,MAAMO,MAAM,GAAGV,UAAU,CAACiB,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,aAAa,EAAE,KAAK;IACpBJ,KAAK,EAAE;EACT,CAAC;EACDD,IAAI,EAAE;IACJM,SAAS,EAAE,UAAU;IACrBC,WAAW,EAAE;EACf,CAAC;EACDJ,MAAM,EAAE;IACNK,IAAI,EAAE,CAAC;IACPH,aAAa,EAAE,KAAK;IACpBI,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE,CAAC;IACVC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEb,KAAK,EAAE,CAAC;MA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