@magmamath/students-features 0.9.113 → 0.9.114-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/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +4 -4
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/voice/constants.js +22 -0
- package/dist/commonjs/features/voice/constants.js.map +1 -0
- package/dist/commonjs/features/voice/helpers.js +211 -0
- package/dist/commonjs/features/voice/helpers.js.map +1 -0
- package/dist/commonjs/features/voice/index.js +138 -0
- package/dist/commonjs/features/voice/index.js.map +1 -0
- package/dist/commonjs/features/voice/model/index.js +68 -0
- package/dist/commonjs/features/voice/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +87 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +244 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +39 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/index.js +47 -0
- package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +61 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js +27 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +54 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +239 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/index.js +34 -0
- package/dist/commonjs/features/voice/recording/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/components/PlayButton.js +70 -0
- package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +17 -0
- package/dist/commonjs/shared/translation/localization/de.json +17 -0
- package/dist/commonjs/shared/translation/localization/en.json +17 -0
- package/dist/commonjs/shared/translation/localization/gb.json +17 -0
- package/dist/commonjs/shared/translation/localization/sct.json +17 -0
- package/dist/commonjs/shared/translation/localization/sw.json +17 -0
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +5 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/gifCelebrations/helpers.js +1 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/module/features/voice/constants.js +18 -0
- package/dist/module/features/voice/constants.js.map +1 -0
- package/dist/module/features/voice/helpers.js +194 -0
- package/dist/module/features/voice/helpers.js.map +1 -0
- package/dist/module/features/voice/index.js +20 -0
- package/dist/module/features/voice/index.js.map +1 -0
- package/dist/module/features/voice/model/index.js +15 -0
- package/dist/module/features/voice/model/index.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +201 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +82 -0
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +234 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +34 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/index.js +8 -0
- package/dist/module/features/voice/playing/model/index.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +55 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDevider.js +21 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js +49 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +234 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/module/features/voice/recording/model/index.js +7 -0
- package/dist/module/features/voice/recording/model/index.js.map +1 -0
- package/dist/module/features/voice/types.js +4 -0
- package/dist/module/features/voice/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/components/PlayButton.js +64 -0
- package/dist/module/shared/components/PlayButton.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +17 -0
- package/dist/module/shared/translation/localization/de.json +17 -0
- package/dist/module/shared/translation/localization/en.json +17 -0
- package/dist/module/shared/translation/localization/gb.json +17 -0
- package/dist/module/shared/translation/localization/sct.json +17 -0
- package/dist/module/shared/translation/localization/sw.json +17 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/constants.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts +13 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/model/index.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +21 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +58 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/constants.d.ts +15 -0
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/index.d.ts +13 -0
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/model/index.d.ts +11 -0
- package/dist/typescript/module/features/voice/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +21 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/index.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +58 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +34 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +3 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +11 -4
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
- package/src/features/chatbot/constants.ts +4 -4
- package/src/features/gifCelebrations/helpers.ts +1 -0
- package/src/features/voice/constants.ts +14 -0
- package/src/features/voice/helpers.ts +254 -0
- package/src/features/voice/index.ts +17 -0
- package/src/features/voice/model/index.ts +13 -0
- package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +239 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
- package/src/features/voice/playing/model/Player.model.ts +92 -0
- package/src/features/voice/playing/model/VoicePlayer.model.ts +282 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +53 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts +43 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +12 -0
- package/src/features/voice/playing/model/index.ts +6 -0
- package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +63 -0
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
- package/src/features/voice/recording/components/VoiceRecordDevider.tsx +17 -0
- package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
- package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
- package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
- package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
- package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
- package/src/features/voice/recording/model/Recorder.model.ts +62 -0
- package/src/features/voice/recording/model/Uploader.model.ts +48 -0
- package/src/features/voice/recording/model/VoiceRecord.model.ts +278 -0
- package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
- package/src/features/voice/recording/model/index.ts +4 -0
- package/src/features/voice/types.ts +69 -0
- package/src/index.ts +1 -0
- package/src/shared/components/PlayButton.tsx +84 -0
- package/src/shared/translation/localization/ca.json +17 -0
- package/src/shared/translation/localization/de.json +17 -0
- package/src/shared/translation/localization/en.json +17 -0
- package/src/shared/translation/localization/gb.json +17 -0
- package/src/shared/translation/localization/sct.json +17 -0
- package/src/shared/translation/localization/sw.json +17 -0
- package/src/types/common.types.ts +1 -0
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "RecorderModel", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _RecorderModel.RecorderModel;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "UploaderModel", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _UploaderModel.UploaderModel;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "VoicePlayerModel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _VoicePlayerModel.VoicePlayerModel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "VoiceRecordModel", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _VoiceRecordModel.VoiceRecordModel;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "VoiceRecordsCollection", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _VoiceRecordCollection.VoiceRecordsCollection;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "VoiceTranscriptionsCollection", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "VoiceTranscriptionsDownloaderModel", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _VoiceTranscriptionsDownloaderModel.VoiceTranscriptionsDownloaderModel;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "VoiceTranscriptionsDropdownModel", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "VoiceTranscriptionsPlayerModel", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _VoicePlayerModel.VoicePlayerModel;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var _VoiceRecordModel = require("../recording/model/VoiceRecord.model.js");
|
|
61
|
+
var _VoiceRecordCollection = require("../recording/model/VoiceRecordCollection.js");
|
|
62
|
+
var _RecorderModel = require("../recording/model/Recorder.model.js");
|
|
63
|
+
var _UploaderModel = require("../recording/model/Uploader.model.js");
|
|
64
|
+
var _VoicePlayerModel = require("../playing/model/VoicePlayer.model.js");
|
|
65
|
+
var _VoiceTranscriptionsCollection = require("../playing/model/VoiceTranscriptionsCollection.js");
|
|
66
|
+
var _VoiceTranscriptionsDownloaderModel = require("../playing/model/VoiceTranscriptionsDownloader.model.js");
|
|
67
|
+
var _VoiceTranscriptionsDropdownModel = require("../playing/model/VoiceTranscriptionsDropdown.model.js");
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_VoiceRecordModel","require","_VoiceRecordCollection","_RecorderModel","_UploaderModel","_VoicePlayerModel","_VoiceTranscriptionsCollection","_VoiceTranscriptionsDownloaderModel","_VoiceTranscriptionsDropdownModel"],"sourceRoot":"../../../../../src","sources":["features/voice/model/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAGA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,8BAAA,GAAAL,OAAA;AAEA,IAAAM,mCAAA,GAAAN,OAAA;AAEA,IAAAO,iCAAA,GAAAP,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceIcon = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
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); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const VoiceIcon = ({
|
|
16
|
+
style
|
|
17
|
+
}) => {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
19
|
+
entering: _reactNativeReanimated.FadeIn.duration(250),
|
|
20
|
+
style: [styles.container, style],
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
22
|
+
style: styles.iconContainer,
|
|
23
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.MicrophoneIcon, {
|
|
24
|
+
color: _reactNativeUi.COLORS.NEUTRAL_5
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
exports.VoiceIcon = VoiceIcon;
|
|
30
|
+
const styles = _reactNative.StyleSheet.create({
|
|
31
|
+
container: {
|
|
32
|
+
flex: 1,
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
alignItems: 'center'
|
|
35
|
+
},
|
|
36
|
+
iconContainer: {
|
|
37
|
+
maxHeight: 124,
|
|
38
|
+
height: '80%',
|
|
39
|
+
aspectRatio: 1,
|
|
40
|
+
alignSelf: 'center',
|
|
41
|
+
padding: 24,
|
|
42
|
+
borderWidth: 4,
|
|
43
|
+
borderColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
44
|
+
borderRadius: 400,
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=VoiceIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceIcon","style","jsx","View","entering","FadeIn","duration","styles","container","children","iconContainer","MicrophoneIcon","color","COLORS","NEUTRAL_5","exports","StyleSheet","create","flex","justifyContent","alignItems","maxHeight","height","aspectRatio","alignSelf","padding","borderWidth","borderColor","borderRadius"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AAA0D,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,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AQ,EAAEC,6BAAM,CAACC,QAAQ,CAAC,GAAG,CAAE;IAACL,KAAK,EAAE,CAACM,MAAM,CAACC,SAAS,EAAEP,KAAK,CAAE;IAAAQ,QAAA,eAC9E,IAAA9B,WAAA,CAAAuB,GAAA,EAAC9B,YAAA,CAAA+B,IAAI;MAACF,KAAK,EAAEM,MAAM,CAACG,aAAc;MAAAD,QAAA,eAChC,IAAA9B,WAAA,CAAAuB,GAAA,EAAC1B,cAAA,CAAAmC,cAAc;QAACC,KAAK,EAAEC,qBAAM,CAACC;MAAU,CAAE;IAAC,CACvC;EAAC,CACM,CAAC;AAEpB,CAAC;AAAAC,OAAA,CAAAf,SAAA,GAAAA,SAAA;AAED,MAAMO,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDV,aAAa,EAAE;IACbW,SAAS,EAAE,GAAG;IACdC,MAAM,EAAE,KAAK;IACbC,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE,QAAQ;IACnBC,OAAO,EAAE,EAAE;IACXC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAEd,qBAAM,CAACC,SAAS;IAC7Bc,YAAY,EAAE,GAAG;IACjBT,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsDropdown = void 0;
|
|
7
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
8
|
+
var _effectorReact = require("effector-react");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
12
|
+
var _useVoiceTranscriptionsDropdown = require("../hooks/useVoiceTranscriptionsDropdown.js");
|
|
13
|
+
var _index = require("../model/index.js");
|
|
14
|
+
var _VoiceTranscriptionsDropdownItem = require("./VoiceTranscriptionsDropdownItem.js");
|
|
15
|
+
var _constants = require("../../constants.js");
|
|
16
|
+
var _index2 = require("../../../../shared/translation/index.js");
|
|
17
|
+
var _PlayButton = require("../../../../shared/components/PlayButton.js");
|
|
18
|
+
var _helpers = require("../../helpers.js");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
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); }
|
|
21
|
+
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; }
|
|
22
|
+
const AnimatedTouchableOpacity = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TouchableOpacity);
|
|
23
|
+
const VoiceTranscriptionsDropdown = ({
|
|
24
|
+
style,
|
|
25
|
+
model,
|
|
26
|
+
answers,
|
|
27
|
+
attemptOffset,
|
|
28
|
+
onAttemptOffsetChange,
|
|
29
|
+
attemptsCount
|
|
30
|
+
}) => {
|
|
31
|
+
const scrollRef = (0, _react.useRef)(null);
|
|
32
|
+
const t = (0, _index2.useText)();
|
|
33
|
+
const [currentAttempt, transcriptsLoaded, playerState] = (0, _effectorReact.useUnit)([model.$currentAttempt, model.$transcriptsLoaded, model.$playerState]);
|
|
34
|
+
const [attempts, setAttempts] = (0, _react.useState)([]);
|
|
35
|
+
const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
|
|
36
|
+
const answersKey = answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(',');
|
|
37
|
+
const answersRef = (0, _react.useRef)(answers);
|
|
38
|
+
answersRef.current = answers;
|
|
39
|
+
const {
|
|
40
|
+
listAnimatedStyle,
|
|
41
|
+
iconAnimatedStyle,
|
|
42
|
+
onListLayout
|
|
43
|
+
} = (0, _useVoiceTranscriptionsDropdown.useVoiceTranscriptionsDropdown)(model.dropdown);
|
|
44
|
+
const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
|
|
45
|
+
const playButtonState = {
|
|
46
|
+
isActive: playerState !== _index.PlayerState.IDLE,
|
|
47
|
+
isLoading: playerState === _index.PlayerState.LOADING,
|
|
48
|
+
status: (0, _helpers.getAudioStatus)(playerState)
|
|
49
|
+
};
|
|
50
|
+
const scrollToAttempt = (0, _react.useCallback)(attemptNumber => {
|
|
51
|
+
const index = attempts.findIndex(item => item.attemptNumber === attemptNumber);
|
|
52
|
+
if (index !== -1) {
|
|
53
|
+
scrollRef.current?.scrollToIndex({
|
|
54
|
+
index,
|
|
55
|
+
animated: true,
|
|
56
|
+
viewPosition: 0
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}, [attempts]);
|
|
60
|
+
const handleItemToggle = (0, _react.useCallback)(attempt => {
|
|
61
|
+
if (onAttemptOffsetChange && attemptsCount !== undefined) {
|
|
62
|
+
onAttemptOffsetChange(attemptsCount - attempt);
|
|
63
|
+
}
|
|
64
|
+
}, [onAttemptOffsetChange, attemptsCount]);
|
|
65
|
+
const handlePlayPress = (0, _react.useCallback)(() => {
|
|
66
|
+
if (activeAttempt) {
|
|
67
|
+
model.togglePlayPause(activeAttempt);
|
|
68
|
+
}
|
|
69
|
+
}, [model, activeAttempt]);
|
|
70
|
+
const handleScrollToIndexFailed = (0, _react.useCallback)(info => {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
scrollRef.current?.scrollToIndex({
|
|
73
|
+
index: info.index,
|
|
74
|
+
animated: true,
|
|
75
|
+
viewPosition: 0
|
|
76
|
+
});
|
|
77
|
+
}, 100);
|
|
78
|
+
}, []);
|
|
79
|
+
(0, _react.useEffect)(() => {
|
|
80
|
+
model.reinitializePlayer();
|
|
81
|
+
return () => model.cleanup();
|
|
82
|
+
}, [model]);
|
|
83
|
+
(0, _react.useEffect)(() => {
|
|
84
|
+
if (answersRef.current.some(answer => answer.audioFileId)) {
|
|
85
|
+
model.initializeWithAudios(answersRef.current);
|
|
86
|
+
model.loadAllTranscripts();
|
|
87
|
+
}
|
|
88
|
+
}, [model, answersKey]);
|
|
89
|
+
(0, _react.useEffect)(() => {
|
|
90
|
+
if (answers.length > 0 && !answers.find(answer => answer.drawing)) {
|
|
91
|
+
model.dropdown.setExpanded(true);
|
|
92
|
+
}
|
|
93
|
+
model.stopAudio();
|
|
94
|
+
}, [attemptOffset]);
|
|
95
|
+
(0, _react.useEffect)(() => {
|
|
96
|
+
const allAttempts = model.getAllAttempts();
|
|
97
|
+
const validAttempts = allAttempts.filter(item => typeof item.attemptNumber === 'number' && !isNaN(item.attemptNumber));
|
|
98
|
+
setAttempts(validAttempts);
|
|
99
|
+
}, [answersKey, transcriptsLoaded, currentAttempt, model]);
|
|
100
|
+
(0, _react.useEffect)(() => {
|
|
101
|
+
if (activeAttempt !== null) {
|
|
102
|
+
scrollToAttempt(activeAttempt);
|
|
103
|
+
}
|
|
104
|
+
}, [activeAttempt, hasActiveTranscript, scrollToAttempt, model]);
|
|
105
|
+
const renderItem = (0, _react.useCallback)(({
|
|
106
|
+
item
|
|
107
|
+
}) => {
|
|
108
|
+
const isLoading = model.isTranscriptLoading(item.attemptNumber);
|
|
109
|
+
const transcript = model.getTranscript(item.attemptNumber);
|
|
110
|
+
const isActive = activeAttempt === item.attemptNumber;
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionsDropdownItem.VoiceTranscriptionsDropdownItem, {
|
|
112
|
+
isLoading: isActive && isLoading,
|
|
113
|
+
attempt: item.attemptNumber,
|
|
114
|
+
content: transcript && transcript !== _constants.NO_AUDIO_BE_MESSAGE ? transcript : t('voice.transcriptNotAvailable'),
|
|
115
|
+
isActive: isActive,
|
|
116
|
+
onToggle: handleItemToggle,
|
|
117
|
+
scrollToAttempt: scrollToAttempt
|
|
118
|
+
});
|
|
119
|
+
}, [model, activeAttempt, t, handleItemToggle, scrollToAttempt]);
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
121
|
+
style: [styles.container, style],
|
|
122
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
123
|
+
style: styles.header,
|
|
124
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
125
|
+
style: styles.title,
|
|
126
|
+
variant: "h7",
|
|
127
|
+
children: t('voice.transcriptions')
|
|
128
|
+
}), hasActiveTranscript && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
129
|
+
entering: _reactNativeReanimated.FadeIn.duration(120),
|
|
130
|
+
exiting: _reactNativeReanimated.FadeOut.duration(120),
|
|
131
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
|
|
132
|
+
state: playButtonState,
|
|
133
|
+
onPress: handlePlayPress,
|
|
134
|
+
activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
135
|
+
})
|
|
136
|
+
})]
|
|
137
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
138
|
+
style: [listAnimatedStyle, {
|
|
139
|
+
overflow: 'hidden'
|
|
140
|
+
}],
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
142
|
+
onLayout: onListLayout,
|
|
143
|
+
style: styles.listContainer,
|
|
144
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableList, {
|
|
145
|
+
bounces: false,
|
|
146
|
+
ref: scrollRef,
|
|
147
|
+
hideShadow: true,
|
|
148
|
+
data: attempts,
|
|
149
|
+
keyExtractor: item => item._id,
|
|
150
|
+
onScrollToIndexFailed: handleScrollToIndexFailed,
|
|
151
|
+
renderItem: renderItem,
|
|
152
|
+
style: _reactNativeUi.IS_WEB && styles.list,
|
|
153
|
+
contentContainerStyle: styles.listContent
|
|
154
|
+
})
|
|
155
|
+
})
|
|
156
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTouchableOpacity, {
|
|
157
|
+
style: [styles.expandButton, iconAnimatedStyle],
|
|
158
|
+
onPress: () => model.dropdown.toggleExpand(),
|
|
159
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CaretDownIcon, {
|
|
160
|
+
size: 22
|
|
161
|
+
})
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
exports.VoiceTranscriptionsDropdown = VoiceTranscriptionsDropdown;
|
|
166
|
+
const styles = _reactNative.StyleSheet.create({
|
|
167
|
+
container: {
|
|
168
|
+
position: 'absolute',
|
|
169
|
+
top: 56,
|
|
170
|
+
left: 8,
|
|
171
|
+
width: 222,
|
|
172
|
+
maxHeight: 405,
|
|
173
|
+
minHeight: 51,
|
|
174
|
+
padding: 4,
|
|
175
|
+
boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
|
|
176
|
+
borderRadius: 12,
|
|
177
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
178
|
+
overflow: 'hidden'
|
|
179
|
+
},
|
|
180
|
+
header: {
|
|
181
|
+
flexDirection: 'row',
|
|
182
|
+
justifyContent: 'space-between',
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
padding: 4,
|
|
185
|
+
marginBottom: 4,
|
|
186
|
+
height: 32
|
|
187
|
+
},
|
|
188
|
+
title: {
|
|
189
|
+
color: _reactNativeUi.COLORS.NEUTRAL_9,
|
|
190
|
+
marginLeft: 4
|
|
191
|
+
},
|
|
192
|
+
list: {
|
|
193
|
+
flex: 1
|
|
194
|
+
},
|
|
195
|
+
expandButton: {
|
|
196
|
+
justifyContent: 'center',
|
|
197
|
+
alignItems: 'center'
|
|
198
|
+
},
|
|
199
|
+
listContainer: {
|
|
200
|
+
position: 'absolute',
|
|
201
|
+
maxHeight: _constants.DROPDOWN_MAX_CONTENT_HEIGHT,
|
|
202
|
+
width: '100%'
|
|
203
|
+
},
|
|
204
|
+
listContent: {
|
|
205
|
+
paddingHorizontal: 4
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
//# sourceMappingURL=VoiceTranscriptionsDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeUi","require","_effectorReact","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_useVoiceTranscriptionsDropdown","_index","_VoiceTranscriptionsDropdownItem","_constants","_index2","_PlayButton","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionsDropdown","style","model","answers","attemptOffset","onAttemptOffsetChange","attemptsCount","scrollRef","useRef","useText","currentAttempt","transcriptsLoaded","playerState","useUnit","$currentAttempt","$transcriptsLoaded","$playerState","attempts","setAttempts","useState","activeAttempt","getActiveAttempt","answersKey","map","_id","audioFileId","join","answersRef","current","listAnimatedStyle","iconAnimatedStyle","onListLayout","useVoiceTranscriptionsDropdown","dropdown","hasActiveTranscript","undefined","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","scrollToAttempt","useCallback","attemptNumber","index","findIndex","item","scrollToIndex","animated","viewPosition","handleItemToggle","attempt","handlePlayPress","togglePlayPause","handleScrollToIndexFailed","info","setTimeout","useEffect","reinitializePlayer","cleanup","some","answer","initializeWithAudios","loadAllTranscripts","length","find","drawing","setExpanded","stopAudio","allAttempts","getAllAttempts","validAttempts","filter","isNaN","renderItem","isTranscriptLoading","transcript","getTranscript","jsx","VoiceTranscriptionsDropdownItem","content","NO_AUDIO_BE_MESSAGE","onToggle","jsxs","View","styles","container","children","header","Typography","title","variant","entering","FadeIn","duration","exiting","FadeOut","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","overflow","onLayout","listContainer","ScrollableList","bounces","ref","hideShadow","data","keyExtractor","onScrollToIndexFailed","IS_WEB","list","contentContainerStyle","listContent","expandButton","toggleExpand","CaretDownIcon","size","exports","StyleSheet","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","flexDirection","justifyContent","alignItems","marginBottom","height","color","NEUTRAL_9","marginLeft","flex","DROPDOWN_MAX_CONTENT_HEIGHT","paddingHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAOA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAF,uBAAA,CAAAH,OAAA;AAEA,IAAAM,+BAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gCAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAAgE,IAAAa,WAAA,GAAAb,OAAA;A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rB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsDropdownItem = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
+
var _useVoiceTranscriptionsDropdownItemAnimation = require("../hooks/useVoiceTranscriptionsDropdownItemAnimation.js");
|
|
12
|
+
var _index = require("../../../../shared/translation/index.js");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
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); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
const VoiceTranscriptionsDropdownItem = exports.VoiceTranscriptionsDropdownItem = /*#__PURE__*/(0, _react.memo)(({
|
|
17
|
+
attempt,
|
|
18
|
+
content,
|
|
19
|
+
isActive,
|
|
20
|
+
isLoading,
|
|
21
|
+
onToggle,
|
|
22
|
+
scrollToAttempt
|
|
23
|
+
}) => {
|
|
24
|
+
const t = (0, _index.useText)();
|
|
25
|
+
const {
|
|
26
|
+
contentAnimatedStyle,
|
|
27
|
+
onLayout,
|
|
28
|
+
progress
|
|
29
|
+
} = (0, _useVoiceTranscriptionsDropdownItemAnimation.useVoiceTranscriptionsDropdownItemAnimation)(isActive);
|
|
30
|
+
const handleScrollToAttempt = (0, _react.useCallback)(attemptNumber => {
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
scrollToAttempt(attemptNumber);
|
|
33
|
+
}, 300);
|
|
34
|
+
}, [scrollToAttempt]);
|
|
35
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => progress.value, progress => {
|
|
36
|
+
if (progress === 1 && isActive) {
|
|
37
|
+
(0, _reactNativeReanimated.runOnJS)(handleScrollToAttempt)(attempt);
|
|
38
|
+
}
|
|
39
|
+
}, [progress, attempt, isActive]);
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
41
|
+
style: styles.container,
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
43
|
+
disabled: isActive,
|
|
44
|
+
style: styles.itemHeader,
|
|
45
|
+
onPress: () => onToggle(attempt),
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
47
|
+
onPress: () => !isActive && onToggle(attempt),
|
|
48
|
+
size: _reactNativeUi.ButtonSize.SMALL,
|
|
49
|
+
variant: _reactNativeUi.ButtonVariant.TERTIARY,
|
|
50
|
+
style: {
|
|
51
|
+
text: {
|
|
52
|
+
textTransform: 'uppercase',
|
|
53
|
+
color: isActive ? _reactNativeUi.COLORS.NEUTRAL_9 : _reactNativeUi.COLORS.NEUTRAL_7
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
children: t('voice.attempt', {
|
|
57
|
+
number: String(attempt)
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
61
|
+
style: styles.loaderContainer,
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Loader, {
|
|
63
|
+
size: _reactNativeUi.LoaderSize.SMALL,
|
|
64
|
+
color: _reactNativeUi.LoaderColor.BLUE
|
|
65
|
+
})
|
|
66
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
67
|
+
style: contentAnimatedStyle,
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
69
|
+
onLayout: onLayout,
|
|
70
|
+
style: styles.contentWrapper,
|
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
72
|
+
variant: "h8",
|
|
73
|
+
style: [styles.itemContent, {
|
|
74
|
+
color: isActive ? _reactNativeUi.COLORS.NEUTRAL_9 : _reactNativeUi.COLORS.NEUTRAL_7
|
|
75
|
+
}],
|
|
76
|
+
children: content
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
const styles = _reactNative.StyleSheet.create({
|
|
83
|
+
container: {
|
|
84
|
+
borderTopWidth: 1,
|
|
85
|
+
borderColor: _reactNativeUi.COLORS.NEUTRAL_3
|
|
86
|
+
},
|
|
87
|
+
itemHeader: {
|
|
88
|
+
flexDirection: 'row',
|
|
89
|
+
justifyContent: 'space-between',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
width: '100%',
|
|
92
|
+
paddingVertical: 8
|
|
93
|
+
},
|
|
94
|
+
itemContent: {
|
|
95
|
+
paddingHorizontal: 8
|
|
96
|
+
},
|
|
97
|
+
contentWrapper: {
|
|
98
|
+
width: '100%',
|
|
99
|
+
position: 'absolute'
|
|
100
|
+
},
|
|
101
|
+
loaderContainer: {
|
|
102
|
+
justifyContent: 'center',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
paddingTop: 4,
|
|
105
|
+
paddingBottom: 8
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=VoiceTranscriptionsDropdownItem.js.map
|
package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeUi","_reactNativeReanimated","_useVoiceTranscriptionsDropdownItemAnimation","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceTranscriptionsDropdownItem","exports","memo","attempt","content","isActive","isLoading","onToggle","scrollToAttempt","useText","contentAnimatedStyle","onLayout","progress","useVoiceTranscriptionsDropdownItemAnimation","handleScrollToAttempt","useCallback","attemptNumber","setTimeout","useAnimatedReaction","value","runOnJS","jsxs","View","style","styles","container","children","jsx","Pressable","disabled","itemHeader","onPress","Button","size","ButtonSize","SMALL","variant","ButtonVariant","TERTIARY","text","textTransform","color","COLORS","NEUTRAL_9","NEUTRAL_7","number","String","loaderContainer","Loader","LoaderSize","LoaderColor","BLUE","contentWrapper","Typography","itemContent","StyleSheet","create","borderTopWidth","borderColor","NEUTRAL_3","flexDirection","justifyContent","alignItems","width","paddingVertical","paddingHorizontal","position","paddingTop","paddingBottom"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAUA,IAAAI,sBAAA,GAAAF,uBAAA,CAAAF,OAAA;AACA,IAAAK,4CAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAwD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,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EAAE;IACV8B,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAE;EACnB,CAAC;EACDV,WAAW,EAAE;IACXW,iBAAiB,EAAE;EACrB,CAAC;EACDb,cAAc,EAAE;IACdW,KAAK,EAAE,MAAM;IACbG,QAAQ,EAAE;EACZ,CAAC;EACDnB,eAAe,EAAE;IACfc,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBK,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useVoiceTranscriptionsDropdown = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _effectorReact = require("effector-react");
|
|
9
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
10
|
+
var _constants = require("../../constants.js");
|
|
11
|
+
const useVoiceTranscriptionsDropdown = model => {
|
|
12
|
+
const isExpanded = (0, _effectorReact.useUnit)(model.$isExpanded);
|
|
13
|
+
const contentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
14
|
+
const animationProgress = (0, _reactNativeReanimated.useSharedValue)(isExpanded ? 1 : 0);
|
|
15
|
+
const onListLayout = event => {
|
|
16
|
+
const measuredHeight = event.nativeEvent.layout.height;
|
|
17
|
+
if (measuredHeight > 0) {
|
|
18
|
+
contentHeight.value = measuredHeight;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const listAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
22
|
+
const height = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 1], [0, contentHeight.value || _constants.DROPDOWN_MAX_CONTENT_HEIGHT]);
|
|
23
|
+
const opacity = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 0.3, 1], [0, 0, 1]);
|
|
24
|
+
return {
|
|
25
|
+
height,
|
|
26
|
+
opacity
|
|
27
|
+
};
|
|
28
|
+
}, [animationProgress, contentHeight]);
|
|
29
|
+
const iconAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
30
|
+
const rotation = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 1], [0, 180]);
|
|
31
|
+
return {
|
|
32
|
+
transform: [{
|
|
33
|
+
rotate: `${rotation}deg`
|
|
34
|
+
}]
|
|
35
|
+
};
|
|
36
|
+
}, [animationProgress]);
|
|
37
|
+
(0, _react.useEffect)(() => {
|
|
38
|
+
animationProgress.value = (0, _reactNativeReanimated.withTiming)(isExpanded ? 1 : 0, {
|
|
39
|
+
duration: 300
|
|
40
|
+
});
|
|
41
|
+
}, [isExpanded, animationProgress]);
|
|
42
|
+
return {
|
|
43
|
+
isExpanded,
|
|
44
|
+
listAnimatedStyle,
|
|
45
|
+
iconAnimatedStyle,
|
|
46
|
+
onListLayout
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
exports.useVoiceTranscriptionsDropdown = useVoiceTranscriptionsDropdown;
|
|
50
|
+
//# sourceMappingURL=useVoiceTranscriptionsDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_effectorReact","_reactNativeReanimated","_constants","useVoiceTranscriptionsDropdown","model","isExpanded","useUnit","$isExpanded","contentHeight","useSharedValue","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","listAnimatedStyle","useAnimatedStyle","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","opacity","iconAnimatedStyle","rotation","transform","rotate","useEffect","withTiming","duration","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAA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,EAAE,GAAG,CAAC,CAAC;IAEvE,OAAO;MACLQ,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE,GAAGF,QAAQ;MAAM,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,CAACd,iBAAiB,CAAC,CAAC;EAEvB,IAAAiB,gBAAS,EAAC,MAAM;IACdjB,iBAAiB,CAACO,KAAK,GAAG,IAAAW,iCAAU,EAACvB,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE;MAAEwB,QAAQ,EAAE;IAAI,CAAC,CAAC;EAC7E,CAAC,EAAE,CAACxB,UAAU,EAAEK,iBAAiB,CAAC,CAAC;EAEnC,OAAO;IACLL,UAAU;IACVa,iBAAiB;IACjBK,iBAAiB;IACjBZ;EACF,CAAC;AACH,CAAC;AAAAmB,OAAA,CAAA3B,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useVoiceTranscriptionsDropdownItemAnimation = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
const useVoiceTranscriptionsDropdownItemAnimation = isExpanded => {
|
|
10
|
+
const height = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
11
|
+
const progress = (0, _reactNativeReanimated.useSharedValue)(isExpanded ? 1 : 0);
|
|
12
|
+
(0, _react.useEffect)(() => {
|
|
13
|
+
progress.value = (0, _reactNativeReanimated.withTiming)(isExpanded ? 1 : 0);
|
|
14
|
+
}, [isExpanded, progress]);
|
|
15
|
+
const derivedHeight = (0, _reactNativeReanimated.useDerivedValue)(() => height.value * progress.value, [height, progress]);
|
|
16
|
+
const contentAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
17
|
+
const opacity = (0, _reactNativeReanimated.interpolate)(progress.value, [0, 0.3, 1], [0, 0, 1]);
|
|
18
|
+
return {
|
|
19
|
+
height: derivedHeight.value,
|
|
20
|
+
opacity,
|
|
21
|
+
overflow: 'hidden'
|
|
22
|
+
};
|
|
23
|
+
}, [progress, derivedHeight]);
|
|
24
|
+
const onLayout = event => {
|
|
25
|
+
height.value = event.nativeEvent.layout.height;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
contentAnimatedStyle,
|
|
29
|
+
onLayout,
|
|
30
|
+
progress
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
exports.useVoiceTranscriptionsDropdownItemAnimation = useVoiceTranscriptionsDropdownItemAnimation;
|
|
34
|
+
//# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","useVoiceTranscriptionsDropdownItemAnimation","isExpanded","height","useSharedValue","progress","useEffect","value","withTiming","derivedHeight","useDerivedValue","contentAnimatedStyle","useAnimatedStyle","opacity","interpolate","overflow","onLayout","event","nativeEvent","layout","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAQO,MAAME,2CAA2C,GAAIC,UAAmB,IAAK;EAClF,MAAMC,MAAM,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAChC,MAAMC,QAAQ,GAAG,IAAAD,qCAAc,EAACF,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EAEnD,IAAAI,gBAAS,EAAC,MAAM;IACdD,QAAQ,CAACE,KAAK,GAAG,IAAAC,iCAAU,EAACN,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EACjD,CAAC,EAAE,CAACA,UAAU,EAA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