@magmamath/students-features 0.9.107-rc.2 → 0.9.107-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js +29 -18
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +7 -2
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js +14 -3
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +11 -2
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/components/VoiceRecord.js +25 -17
- package/dist/commonjs/features/voiceRecord/components/VoiceRecord.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordButton.js +22 -8
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordButton.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/components/{VoiceRecordDelete.js → VoiceRecordDeleteButton.js} +9 -6
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordTimer.js +7 -2
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordTimer.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/constants.js +8 -1
- package/dist/commonjs/features/voiceRecord/constants.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/helpers.js +89 -3
- package/dist/commonjs/features/voiceRecord/helpers.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorder.js +45 -33
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorder.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/commonjs/features/voiceRecord/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/index.js +44 -0
- package/dist/commonjs/features/voiceRecord/index.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/modal/VoiceRecordDeleteModal.js +93 -0
- package/dist/commonjs/features/voiceRecord/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/modal/VoiceRecordUndoModal.js +75 -0
- package/dist/commonjs/features/voiceRecord/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/model/Recorder.model.js +54 -0
- package/dist/commonjs/features/voiceRecord/model/Recorder.model.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecord.model.js +162 -21
- package/dist/commonjs/features/voiceRecord/model/VoiceRecord.model.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordApi.js +21 -1
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordApi.js.map +1 -1
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordCollection.js +30 -0
- package/dist/commonjs/features/voiceRecord/model/VoiceRecordCollection.js.map +1 -0
- package/dist/commonjs/features/voiceRecord/types.js +6 -0
- package/dist/commonjs/features/voiceRecord/types.js.map +1 -0
- package/dist/commonjs/lib/components/ConditionalWrapper.js +23 -0
- package/dist/commonjs/lib/components/ConditionalWrapper.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +13 -0
- package/dist/commonjs/shared/translation/localization/de.json +13 -0
- package/dist/commonjs/shared/translation/localization/en.json +13 -0
- package/dist/commonjs/shared/translation/localization/gb.json +13 -0
- package/dist/commonjs/shared/translation/localization/sct.json +13 -0
- package/dist/commonjs/shared/translation/localization/sw.json +13 -0
- package/dist/module/features/chatbot/components/Chat/Chat.js +29 -18
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +5 -2
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js +14 -3
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +11 -2
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.js.map +1 -1
- package/dist/module/features/voiceRecord/components/VoiceRecord.js +24 -16
- package/dist/module/features/voiceRecord/components/VoiceRecord.js.map +1 -1
- package/dist/module/features/voiceRecord/components/VoiceRecordButton.js +22 -8
- package/dist/module/features/voiceRecord/components/VoiceRecordButton.js.map +1 -1
- package/dist/module/features/voiceRecord/components/{VoiceRecordDelete.js → VoiceRecordDeleteButton.js} +8 -5
- package/dist/module/features/voiceRecord/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/module/features/voiceRecord/components/VoiceRecordTimer.js +7 -2
- package/dist/module/features/voiceRecord/components/VoiceRecordTimer.js.map +1 -1
- package/dist/module/features/voiceRecord/constants.js +7 -0
- package/dist/module/features/voiceRecord/constants.js.map +1 -1
- package/dist/module/features/voiceRecord/helpers.js +84 -2
- package/dist/module/features/voiceRecord/helpers.js.map +1 -1
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorder.js +47 -35
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorder.js.map +1 -1
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorderAnimation.js +3 -3
- package/dist/module/features/voiceRecord/hooks/useVoiceRecorderAnimation.js.map +1 -1
- package/dist/module/features/voiceRecord/index.js +4 -0
- package/dist/module/features/voiceRecord/index.js.map +1 -1
- package/dist/module/features/voiceRecord/modal/VoiceRecordDeleteModal.js +86 -0
- package/dist/module/features/voiceRecord/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/module/features/voiceRecord/modal/VoiceRecordUndoModal.js +69 -0
- package/dist/module/features/voiceRecord/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/module/features/voiceRecord/model/Recorder.model.js +49 -0
- package/dist/module/features/voiceRecord/model/Recorder.model.js.map +1 -0
- package/dist/module/features/voiceRecord/model/VoiceRecord.model.js +163 -22
- package/dist/module/features/voiceRecord/model/VoiceRecord.model.js.map +1 -1
- package/dist/module/features/voiceRecord/model/VoiceRecordApi.js +21 -1
- package/dist/module/features/voiceRecord/model/VoiceRecordApi.js.map +1 -1
- package/dist/module/features/voiceRecord/model/VoiceRecordCollection.js +25 -0
- package/dist/module/features/voiceRecord/model/VoiceRecordCollection.js.map +1 -0
- package/dist/module/features/voiceRecord/types.js +4 -0
- package/dist/module/features/voiceRecord/types.js.map +1 -0
- package/dist/module/lib/components/ConditionalWrapper.js +17 -0
- package/dist/module/lib/components/ConditionalWrapper.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +13 -0
- package/dist/module/shared/translation/localization/de.json +13 -0
- package/dist/module/shared/translation/localization/en.json +13 -0
- package/dist/module/shared/translation/localization/gb.json +13 -0
- package/dist/module/shared/translation/localization/sct.json +13 -0
- package/dist/module/shared/translation/localization/sw.json +13 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +4 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +1 -0
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordButton.d.ts +1 -5
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordTimer.d.ts +4 -2
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordTimer.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/constants.d.ts +6 -0
- package/dist/typescript/commonjs/features/voiceRecord/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/helpers.d.ts +26 -2
- package/dist/typescript/commonjs/features/voiceRecord/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorder.d.ts +0 -4
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/commonjs/features/voiceRecord/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/voiceRecord/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/modal/VoiceRecordDeleteModal.d.ts +13 -0
- package/dist/typescript/commonjs/features/voiceRecord/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/modal/VoiceRecordUndoModal.d.ts +13 -0
- package/dist/typescript/commonjs/features/voiceRecord/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/Recorder.model.d.ts +20 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecord.model.d.ts +38 -20
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordApi.d.ts +2 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordApi.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/commonjs/features/voiceRecord/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voiceRecord/types.d.ts +43 -0
- package/dist/typescript/commonjs/features/voiceRecord/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts +9 -0
- package/dist/typescript/commonjs/lib/components/ConditionalWrapper.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +78 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +26 -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/Chat/Chat.d.ts +4 -2
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +1 -0
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecord.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordButton.d.ts +1 -5
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordButton.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordTimer.d.ts +4 -2
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordTimer.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/constants.d.ts +6 -0
- package/dist/typescript/module/features/voiceRecord/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/helpers.d.ts +26 -2
- package/dist/typescript/module/features/voiceRecord/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorder.d.ts +0 -4
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorderAnimation.d.ts +1 -2
- package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorderAnimation.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/index.d.ts +4 -0
- package/dist/typescript/module/features/voiceRecord/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/modal/VoiceRecordDeleteModal.d.ts +13 -0
- package/dist/typescript/module/features/voiceRecord/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/modal/VoiceRecordUndoModal.d.ts +13 -0
- package/dist/typescript/module/features/voiceRecord/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/model/Recorder.model.d.ts +20 -0
- package/dist/typescript/module/features/voiceRecord/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecord.model.d.ts +38 -20
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecord.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordApi.d.ts +2 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordApi.d.ts.map +1 -1
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/module/features/voiceRecord/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voiceRecord/types.d.ts +43 -0
- package/dist/typescript/module/features/voiceRecord/types.d.ts.map +1 -0
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts +9 -0
- package/dist/typescript/module/lib/components/ConditionalWrapper.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +78 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +26 -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 +3 -1
- package/src/features/chatbot/components/Chat/Chat.tsx +30 -19
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +9 -2
- package/src/features/chatbot/components/Chatbot.tsx +15 -2
- package/src/features/chatbot/model/ChatBotModel.ts +12 -3
- package/src/features/chatbot/model/ChatsCacheModel.ts +4 -0
- package/src/features/chatbot/types/api.types.ts +1 -0
- package/src/features/chatbot/types/model.types.ts +1 -0
- package/src/features/voiceRecord/components/VoiceRecord.tsx +29 -18
- package/src/features/voiceRecord/components/VoiceRecordButton.tsx +33 -17
- package/src/features/voiceRecord/components/{VoiceRecordDelete.tsx → VoiceRecordDeleteButton.tsx} +5 -4
- package/src/features/voiceRecord/components/VoiceRecordTimer.tsx +19 -3
- package/src/features/voiceRecord/constants.ts +6 -0
- package/src/features/voiceRecord/helpers.ts +115 -1
- package/src/features/voiceRecord/hooks/useVoiceRecorder.ts +50 -36
- package/src/features/voiceRecord/hooks/useVoiceRecorderAnimation.ts +3 -4
- package/src/features/voiceRecord/index.ts +4 -0
- package/src/features/voiceRecord/modal/VoiceRecordDeleteModal.tsx +105 -0
- package/src/features/voiceRecord/modal/VoiceRecordUndoModal.tsx +82 -0
- package/src/features/voiceRecord/model/Recorder.model.ts +62 -0
- package/src/features/voiceRecord/model/VoiceRecord.model.ts +193 -32
- package/src/features/voiceRecord/model/VoiceRecordApi.ts +25 -1
- package/src/features/voiceRecord/model/VoiceRecordCollection.ts +26 -0
- package/src/features/voiceRecord/types.ts +49 -0
- package/src/lib/components/ConditionalWrapper.tsx +15 -0
- package/src/shared/translation/localization/ca.json +13 -0
- package/src/shared/translation/localization/de.json +13 -0
- package/src/shared/translation/localization/en.json +13 -0
- package/src/shared/translation/localization/gb.json +13 -0
- package/src/shared/translation/localization/sct.json +13 -0
- package/src/shared/translation/localization/sw.json +13 -0
- package/src/types/common.types.ts +1 -0
- package/dist/commonjs/features/voiceRecord/components/VoiceRecordDelete.js.map +0 -1
- package/dist/module/features/voiceRecord/components/VoiceRecordDelete.js.map +0 -1
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDelete.d.ts +0 -7
- package/dist/typescript/commonjs/features/voiceRecord/components/VoiceRecordDelete.d.ts.map +0 -1
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDelete.d.ts +0 -7
- package/dist/typescript/module/features/voiceRecord/components/VoiceRecordDelete.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,EAId,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,eAAO,MAAM,cAAc,OAAQ,MAAM,KAAG,MAK3C,CAAA;AAED,eAAO,MAAM,0BAA0B,wBAStC,CAAA;AASD,eAAO,MAAM,kBAAkB,aAAoB,aAAa,uEAQ/D,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,IAAI,eAiBvF,CAAA;AACD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YACpB,MAAM,mBACE,WAAW,KAC3B,OAAO,CAAC,MAAM,GAAG,SAAS,CAkC5B,CAAA;AAED,KAAK,2BAA2B,GAAG;IACjC,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAI/B,2BAA2B,KAAG,OAAO,CAAC,QAAQ,CA8BhD,CAAA;AAED,eAAO,MAAM,+BAA+B,sBAAuB,QAAQ,OAAO,QAAQ;;;;;;;CAgBzF,CAAA"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
2
2
|
export declare const useVoiceRecorder: (model: VoiceRecordModel) => {
|
|
3
|
-
recorder: import("expo-audio").AudioRecorder;
|
|
4
3
|
recorderState: import("expo-audio").RecorderState;
|
|
5
|
-
player: import("expo-audio").AudioPlayer;
|
|
6
|
-
startRecording: () => Promise<void>;
|
|
7
|
-
stopRecording: () => Promise<void>;
|
|
8
4
|
};
|
|
9
5
|
//# sourceMappingURL=useVoiceRecorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAM7D,eAAO,MAAM,gBAAgB,UAAW,gBAAgB;;CA+DvD,CAAA"}
|
package/dist/typescript/module/features/voiceRecord/hooks/useVoiceRecorderAnimation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorderAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorderAnimation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useVoiceRecorderAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/hooks/useVoiceRecorderAnimation.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,eAAgB,OAAO;;;;CAe5D,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export * from './components/VoiceRecord';
|
|
2
2
|
export * from './model/VoiceRecord.model';
|
|
3
|
+
export * from './modal/VoiceRecordDeleteModal';
|
|
4
|
+
export * from './modal/VoiceRecordUndoModal';
|
|
5
|
+
export * from './constants';
|
|
6
|
+
export * from './types';
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
3
|
+
type VoiceRecordDeleteModalComponentProps = {
|
|
4
|
+
modal: {
|
|
5
|
+
closeModal: () => void;
|
|
6
|
+
params: {
|
|
7
|
+
model: VoiceRecordModel;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const VoiceRecordDeleteModal: ({ modal: { closeModal, params }, }: VoiceRecordDeleteModalComponentProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=VoiceRecordDeleteModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordDeleteModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/modal/VoiceRecordDeleteModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAWxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAI7D,KAAK,oCAAoC,GAAG;IAC1C,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AA2BD,eAAO,MAAM,sBAAsB,uCAEhC,oCAAoC,sBAyCtC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { VoiceRecordModel } from '../model/VoiceRecord.model';
|
|
3
|
+
type VoiceRecordUndoModalProps = {
|
|
4
|
+
modal: {
|
|
5
|
+
closeModal: () => void;
|
|
6
|
+
params: {
|
|
7
|
+
model: VoiceRecordModel;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const VoiceRecordUndoModal: ({ modal: { closeModal, params }, }: VoiceRecordUndoModalProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=VoiceRecordUndoModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordUndoModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/modal/VoiceRecordUndoModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,IAAI,CAAA;QACtB,MAAM,EAAE;YACN,KAAK,EAAE,gBAAgB,CAAA;SACxB,CAAA;KACF,CAAA;CACF,CAAA;AA2BD,eAAO,MAAM,oBAAoB,uCAE9B,yBAAyB,sBAoB3B,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AudioRecorder } from 'expo-audio';
|
|
2
|
+
import { VoiceRecorderState } from '../constants';
|
|
3
|
+
import { VoiceRecordCollectionItem } from '../types';
|
|
4
|
+
export declare class RecorderModel {
|
|
5
|
+
recorder: AudioRecorder;
|
|
6
|
+
private stopResolver;
|
|
7
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
8
|
+
readonly setAudioFileDurationMs: import("effector").EventCallable<number>;
|
|
9
|
+
readonly setVoiceRecordState: import("effector").EventCallable<VoiceRecorderState>;
|
|
10
|
+
readonly setAvailableInputs: import("effector").EventCallable<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
|
|
11
|
+
readonly $audioFileDurationMs: import("effector").StoreWritable<number>;
|
|
12
|
+
readonly $voiceRecordState: import("effector").StoreWritable<VoiceRecorderState>;
|
|
13
|
+
readonly $availableInputs: import("effector").StoreWritable<MediaDeviceInfo[] | import("expo-audio").RecordingInput[]>;
|
|
14
|
+
readonly start: import("effector").Effect<void, void, Error>;
|
|
15
|
+
readonly stop: import("effector").Effect<void, void, Error>;
|
|
16
|
+
stopAndGetCollectionItem(): Promise<VoiceRecordCollectionItem>;
|
|
17
|
+
resolveStopWithCollectionItem(item: VoiceRecordCollectionItem): void;
|
|
18
|
+
clearStopResolver(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=Recorder.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Recorder.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/Recorder.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAwB,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAS1E,qBAAa,aAAa;IACjB,QAAQ,EAAG,aAAa,CAAA;IAC/B,OAAO,CAAC,YAAY,CAA4B;IAEhD,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,sBAAsB,2CAAwB;IAC9D,SAAgB,mBAAmB,uDAAoC;IACvE,SAAgB,kBAAkB,8FAAsC;IAExE,SAAgB,oBAAoB,2CAA4D;IAChG,SAAgB,iBAAiB,uDAGd;IACnB,SAAgB,gBAAgB,8FAAuC;IAEvE,SAAgB,KAAK,+CASnB;IAEF,SAAgB,IAAI,+CAGlB;IAEK,wBAAwB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAO9D,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,GAAG,IAAI;IAOpE,iBAAiB,IAAI,IAAI;CAGjC"}
|
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
error: (message: string) => void;
|
|
5
|
-
warning: (message: string) => void;
|
|
6
|
-
};
|
|
1
|
+
import { AudioApi, VoiceRecordNotificationTypes } from '../types';
|
|
2
|
+
import { RecorderModel } from './Recorder.model';
|
|
3
|
+
import { VoiceRecordsCollection } from './VoiceRecordCollection';
|
|
7
4
|
type VoiceRecordModelParams = {
|
|
8
|
-
|
|
5
|
+
api: AudioApi;
|
|
6
|
+
notification: VoiceRecordNotificationTypes;
|
|
7
|
+
events: VoiceRecordEvents;
|
|
8
|
+
};
|
|
9
|
+
type VoiceRecordEvents = {
|
|
10
|
+
deleteRecord: () => void;
|
|
11
|
+
undoRecord: () => void;
|
|
12
|
+
};
|
|
13
|
+
type DeleteCurrentRecordingProps = {
|
|
14
|
+
notification?: boolean;
|
|
9
15
|
};
|
|
10
16
|
export declare class VoiceRecordModel {
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly $
|
|
23
|
-
|
|
17
|
+
readonly recorderModel: RecorderModel;
|
|
18
|
+
readonly collection: VoiceRecordsCollection;
|
|
19
|
+
readonly api: AudioApi;
|
|
20
|
+
readonly notification: VoiceRecordNotificationTypes;
|
|
21
|
+
readonly events: VoiceRecordEvents;
|
|
22
|
+
private shouldDiscardRecording;
|
|
23
|
+
readonly setCurrentKey: import("effector").EventCallable<string>;
|
|
24
|
+
readonly setCurrentRecord: import("effector").EventCallable<any>;
|
|
25
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
26
|
+
readonly setIsDisabled: import("effector").EventCallable<boolean>;
|
|
27
|
+
readonly startAudioUpload: import("effector").EventCallable<string>;
|
|
28
|
+
readonly $currentKey: import("effector").StoreWritable<string>;
|
|
29
|
+
readonly $currentRecord: import("effector").StoreWritable<any>;
|
|
30
|
+
readonly $isDisabled: import("effector").StoreWritable<boolean>;
|
|
31
|
+
readonly deleteCurrentRecording: import("effector").Effect<void | DeleteCurrentRecordingProps, void, Error>;
|
|
32
|
+
readonly initializeRecording: import("effector").Effect<void, void, Error>;
|
|
33
|
+
readonly stopAndDiscard: import("effector").Effect<void, void, Error>;
|
|
34
|
+
readonly recordingStatusUpdate: (status: any) => void;
|
|
35
|
+
constructor({ api, notification, events }: VoiceRecordModelParams);
|
|
36
|
+
private abortUploadIfInProgress;
|
|
37
|
+
private resetRecordingState;
|
|
38
|
+
private handleAudioUpload;
|
|
39
|
+
private setupUploadHandler;
|
|
40
|
+
private setupUriSync;
|
|
41
|
+
private setupCurrentRecordSync;
|
|
24
42
|
}
|
|
25
43
|
export {};
|
|
26
44
|
//# sourceMappingURL=VoiceRecord.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecord.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecord.model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VoiceRecord.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecord.model.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAA6B,MAAM,UAAU,CAAA;AAE5F,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAGhE,KAAK,sBAAsB,GAAG;IAC5B,GAAG,EAAE,QAAQ,CAAA;IACb,YAAY,EAAE,4BAA4B,CAAA;IAC1C,MAAM,EAAE,iBAAiB,CAAA;CAC1B,CAAA;AAOD,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,KAAK,2BAA2B,GAAG;IACjC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAMD,qBAAa,gBAAgB;IAC3B,SAAgB,aAAa,EAAE,aAAa,CAAA;IAC5C,SAAgB,UAAU,EAAE,sBAAsB,CAAA;IAClD,SAAgB,GAAG,EAAE,QAAQ,CAAA;IAC7B,SAAgB,YAAY,EAAE,4BAA4B,CAAA;IAC1D,SAAgB,MAAM,EAAE,iBAAiB,CAAA;IACzC,OAAO,CAAC,sBAAsB,CAAQ;IAEtC,SAAgB,aAAa,2CAAwB;IACrD,SAAgB,gBAAgB,wCAAqB;IACrD,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,aAAa,4CAAyB;IACtD,SAAgB,gBAAgB,2CAAwB;IAExD,SAAgB,WAAW,2CAAkC;IAC7D,SAAgB,cAAc,wCAAyD;IAEvF,SAAgB,WAAW,4CAAqC;IAEhE,SAAgB,sBAAsB,6EAiBpC;IAEF,SAAgB,mBAAmB,+CAkBjC;IAEF,SAAgB,cAAc,+CAK5B;IAEF,SAAgB,qBAAqB,WAAY,GAAG,UAanD;gBAEW,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,sBAAsB;IAYjE,OAAO,CAAC,uBAAuB;IAM/B,OAAO,CAAC,mBAAmB;YAMb,iBAAiB;IAgC/B,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,sBAAsB;CAkB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecordApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecordApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VoiceRecordApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecordApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGnC,qBAAa,cAAc;gBASb,GAAG,EAAE,QAAQ;CAW1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VoiceRecordCollectionItem } from '../types';
|
|
2
|
+
export declare class VoiceRecordsCollection {
|
|
3
|
+
readonly collection: Map<string, VoiceRecordCollectionItem>;
|
|
4
|
+
add(key: string, item: VoiceRecordCollectionItem): void;
|
|
5
|
+
update(key: string, item: Partial<VoiceRecordCollectionItem>): void;
|
|
6
|
+
delete(key: string): void;
|
|
7
|
+
get(key: string): VoiceRecordCollectionItem | undefined;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=VoiceRecordCollection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecordCollection.d.ts","sourceRoot":"","sources":["../../../../../../src/features/voiceRecord/model/VoiceRecordCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAEpD,qBAAa,sBAAsB;IACjC,SAAgB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAY;IAEvE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB;IAIhD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,yBAAyB,CAAC;IAK5D,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,GAAG,CAAC,GAAG,EAAE,MAAM;IAIf,KAAK;CAGb"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WithAbortSignal } from 'src/types/common.types';
|
|
2
|
+
import { getAvailableInputs } from './helpers';
|
|
3
|
+
import { VoiceRecordModel } from './model/VoiceRecord.model';
|
|
4
|
+
export type VoiceRecordNotificationTypes = {
|
|
5
|
+
info: (message: string) => void;
|
|
6
|
+
error: (message: string) => void;
|
|
7
|
+
warning: (message: string) => void;
|
|
8
|
+
};
|
|
9
|
+
export type UploadAudioPayload = WithAbortSignal<{
|
|
10
|
+
audioFileFormData: FormData;
|
|
11
|
+
}>;
|
|
12
|
+
type AudioTranscriptResponse = {
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
type UploadAudioResponse = {
|
|
16
|
+
id: string;
|
|
17
|
+
fileName: string;
|
|
18
|
+
fileType: string;
|
|
19
|
+
};
|
|
20
|
+
export type AudioApi = {
|
|
21
|
+
uploadAudioFile: (data: UploadAudioPayload) => Promise<UploadAudioResponse>;
|
|
22
|
+
getAudioFileTranscript: (audioFileId: string) => Promise<AudioTranscriptResponse>;
|
|
23
|
+
};
|
|
24
|
+
export type VoiceRecordCollectionItem = {
|
|
25
|
+
solutionId?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
durationMs?: number;
|
|
28
|
+
uri?: string;
|
|
29
|
+
audioUploadPromise?: Promise<void | UploadAudioResponse>;
|
|
30
|
+
controller?: AbortController;
|
|
31
|
+
};
|
|
32
|
+
export type VoiceRecordStack = {
|
|
33
|
+
[problemId: string]: VoiceRecordCollectionItem;
|
|
34
|
+
};
|
|
35
|
+
export type AvailableAudioInputs = Awaited<ReturnType<typeof getAvailableInputs>>;
|
|
36
|
+
export type VoiceRecordDeleteModalParams = {
|
|
37
|
+
model: VoiceRecordModel;
|
|
38
|
+
};
|
|
39
|
+
export type VoiceRecordUndoModalParams = {
|
|
40
|
+
model: VoiceRecordModel;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/voiceRecord/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAC/C,iBAAiB,EAAE,QAAQ,CAAA;CAC5B,CAAC,CAAA;AAEF,KAAK,uBAAuB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AACD,KAAK,mBAAmB,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,eAAe,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAC3E,sBAAsB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;CAClF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAC,IAAI,GAAG,mBAAmB,CAAC,CAAA;IACxD,UAAU,CAAC,EAAE,eAAe,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB,CAAA;CAC/C,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAA;AAEjF,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,gBAAgB,CAAA;CACxB,CAAA;AACD,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,gBAAgB,CAAA;CACxB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
type ConditionalWrapperProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
withWrapper?: boolean;
|
|
5
|
+
Wrapper?: ComponentType<PropsWithChildren>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ConditionalWrapper: ({ withWrapper, Wrapper, children }: ConditionalWrapperProps) => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ConditionalWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/ConditionalWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1E,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,kBAAkB,uCAAwC,uBAAuB,iGAM7F,CAAA"}
|
|
@@ -41,6 +41,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
41
41
|
weight: string;
|
|
42
42
|
time: string;
|
|
43
43
|
};
|
|
44
|
+
voiceRecorder: {
|
|
45
|
+
deleteRecording: string;
|
|
46
|
+
youWontBeAbleToRecover: string;
|
|
47
|
+
recordingDeleted: string;
|
|
48
|
+
delete: string;
|
|
49
|
+
cancel: string;
|
|
50
|
+
noMicrophoneAccess: string;
|
|
51
|
+
noMicrophoneFound: string;
|
|
52
|
+
uploadFailed: string;
|
|
53
|
+
redoRecording: string;
|
|
54
|
+
redo: string;
|
|
55
|
+
thisWillRemoveRecording: string;
|
|
56
|
+
};
|
|
44
57
|
};
|
|
45
58
|
"en-GB": {
|
|
46
59
|
locale: string;
|
|
@@ -84,6 +97,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
84
97
|
weight: string;
|
|
85
98
|
time: string;
|
|
86
99
|
};
|
|
100
|
+
voiceRecorder: {
|
|
101
|
+
deleteRecording: string;
|
|
102
|
+
youWontBeAbleToRecover: string;
|
|
103
|
+
recordingDeleted: string;
|
|
104
|
+
delete: string;
|
|
105
|
+
cancel: string;
|
|
106
|
+
noMicrophoneAccess: string;
|
|
107
|
+
noMicrophoneFound: string;
|
|
108
|
+
uploadFailed: string;
|
|
109
|
+
redoRecording: string;
|
|
110
|
+
redo: string;
|
|
111
|
+
thisWillRemoveRecording: string;
|
|
112
|
+
};
|
|
87
113
|
};
|
|
88
114
|
"sv-SE": {
|
|
89
115
|
locale: string;
|
|
@@ -127,6 +153,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
127
153
|
weight: string;
|
|
128
154
|
time: string;
|
|
129
155
|
};
|
|
156
|
+
voiceRecorder: {
|
|
157
|
+
deleteRecording: string;
|
|
158
|
+
youWontBeAbleToRecover: string;
|
|
159
|
+
recordingDeleted: string;
|
|
160
|
+
delete: string;
|
|
161
|
+
cancel: string;
|
|
162
|
+
noMicrophoneAccess: string;
|
|
163
|
+
noMicrophoneFound: string;
|
|
164
|
+
uploadFailed: string;
|
|
165
|
+
redoRecording: string;
|
|
166
|
+
redo: string;
|
|
167
|
+
thisWillRemoveRecording: string;
|
|
168
|
+
};
|
|
130
169
|
};
|
|
131
170
|
"en-CA": {
|
|
132
171
|
locale: string;
|
|
@@ -170,6 +209,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
170
209
|
weight: string;
|
|
171
210
|
time: string;
|
|
172
211
|
};
|
|
212
|
+
voiceRecorder: {
|
|
213
|
+
deleteRecording: string;
|
|
214
|
+
youWontBeAbleToRecover: string;
|
|
215
|
+
recordingDeleted: string;
|
|
216
|
+
delete: string;
|
|
217
|
+
cancel: string;
|
|
218
|
+
noMicrophoneAccess: string;
|
|
219
|
+
noMicrophoneFound: string;
|
|
220
|
+
uploadFailed: string;
|
|
221
|
+
redoRecording: string;
|
|
222
|
+
redo: string;
|
|
223
|
+
thisWillRemoveRecording: string;
|
|
224
|
+
};
|
|
173
225
|
};
|
|
174
226
|
"en-SCT": {
|
|
175
227
|
locale: string;
|
|
@@ -213,6 +265,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
213
265
|
weight: string;
|
|
214
266
|
time: string;
|
|
215
267
|
};
|
|
268
|
+
voiceRecorder: {
|
|
269
|
+
deleteRecording: string;
|
|
270
|
+
youWontBeAbleToRecover: string;
|
|
271
|
+
recordingDeleted: string;
|
|
272
|
+
delete: string;
|
|
273
|
+
cancel: string;
|
|
274
|
+
noMicrophoneAccess: string;
|
|
275
|
+
noMicrophoneFound: string;
|
|
276
|
+
uploadFailed: string;
|
|
277
|
+
redoRecording: string;
|
|
278
|
+
redo: string;
|
|
279
|
+
thisWillRemoveRecording: string;
|
|
280
|
+
};
|
|
216
281
|
};
|
|
217
282
|
"de-DE": {
|
|
218
283
|
locale: string;
|
|
@@ -256,6 +321,19 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
256
321
|
weight: string;
|
|
257
322
|
time: string;
|
|
258
323
|
};
|
|
324
|
+
voiceRecorder: {
|
|
325
|
+
deleteRecording: string;
|
|
326
|
+
youWontBeAbleToRecover: string;
|
|
327
|
+
recordingDeleted: string;
|
|
328
|
+
delete: string;
|
|
329
|
+
cancel: string;
|
|
330
|
+
noMicrophoneAccess: string;
|
|
331
|
+
noMicrophoneFound: string;
|
|
332
|
+
uploadFailed: string;
|
|
333
|
+
redoRecording: string;
|
|
334
|
+
redo: string;
|
|
335
|
+
thisWillRemoveRecording: string;
|
|
336
|
+
};
|
|
259
337
|
};
|
|
260
338
|
};
|
|
261
339
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhC,CAAA"}
|
|
@@ -42,6 +42,19 @@ export declare const setLocalization: import("effector").EventCallable<{
|
|
|
42
42
|
weight: string;
|
|
43
43
|
time: string;
|
|
44
44
|
};
|
|
45
|
+
voiceRecorder: {
|
|
46
|
+
deleteRecording: string;
|
|
47
|
+
youWontBeAbleToRecover: string;
|
|
48
|
+
recordingDeleted: string;
|
|
49
|
+
delete: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
noMicrophoneAccess: string;
|
|
52
|
+
noMicrophoneFound: string;
|
|
53
|
+
uploadFailed: string;
|
|
54
|
+
redoRecording: string;
|
|
55
|
+
redo: string;
|
|
56
|
+
thisWillRemoveRecording: string;
|
|
57
|
+
};
|
|
45
58
|
} | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
|
|
46
59
|
export declare const $localization: import("effector").StoreWritable<{
|
|
47
60
|
locale: string;
|
|
@@ -85,5 +98,18 @@ export declare const $localization: import("effector").StoreWritable<{
|
|
|
85
98
|
weight: string;
|
|
86
99
|
time: string;
|
|
87
100
|
};
|
|
101
|
+
voiceRecorder: {
|
|
102
|
+
deleteRecording: string;
|
|
103
|
+
youWontBeAbleToRecover: string;
|
|
104
|
+
recordingDeleted: string;
|
|
105
|
+
delete: string;
|
|
106
|
+
cancel: string;
|
|
107
|
+
noMicrophoneAccess: string;
|
|
108
|
+
noMicrophoneFound: string;
|
|
109
|
+
uploadFailed: string;
|
|
110
|
+
redoRecording: string;
|
|
111
|
+
redo: string;
|
|
112
|
+
thisWillRemoveRecording: string;
|
|
113
|
+
};
|
|
88
114
|
}>;
|
|
89
115
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../../../src/types/common.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
1
|
+
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../../../src/types/common.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.9.107-rc.
|
|
3
|
+
"version": "0.9.107-rc.21",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@magmamath/react-native-ui": "*",
|
|
22
22
|
"effector": "^23.2.3",
|
|
23
23
|
"effector-react": "^23.2.1",
|
|
24
|
+
"patronum": "^2.3.0",
|
|
24
25
|
"react": "*",
|
|
25
26
|
"react-native": "*",
|
|
26
27
|
"react-native-gesture-handler": "*",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"expo-audio": "^1.1.1",
|
|
47
48
|
"jest": "^29.7.0",
|
|
48
49
|
"prettier": "^3.0.3",
|
|
50
|
+
"patronum": "^2.3.0",
|
|
49
51
|
"react": "18.3.1",
|
|
50
52
|
"react-native": "0.76.3",
|
|
51
53
|
"react-native-builder-bob": "^0.33.3",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react'
|
|
1
|
+
import React, { ComponentType, PropsWithChildren, useRef } from 'react'
|
|
2
2
|
import { Platform, ScrollView, StyleSheet, useWindowDimensions, View } from 'react-native'
|
|
3
3
|
import { useStoreMap, useUnit } from 'effector-react'
|
|
4
4
|
|
|
@@ -8,6 +8,7 @@ import { MessageLoader } from '../ChatMessage/MessageLoader'
|
|
|
8
8
|
import { ChatInput } from '../ChatInput/ChatInput'
|
|
9
9
|
import { MessageVariant } from '../../types/model.types'
|
|
10
10
|
import { ColorScheme } from '../../types/style.types'
|
|
11
|
+
import { ConditionalWrapper } from '../../../../lib/components/ConditionalWrapper'
|
|
11
12
|
|
|
12
13
|
const TOOLBAR_HEIGHT = 140
|
|
13
14
|
const BOTTOM_OFFSET = Platform.select({
|
|
@@ -19,14 +20,18 @@ type ChatProps = {
|
|
|
19
20
|
model: ChatbotModel
|
|
20
21
|
isHintFeedback: boolean
|
|
21
22
|
isTextToSpeechEnabled: boolean
|
|
23
|
+
isInputDisabled?: boolean
|
|
22
24
|
colorScheme?: ColorScheme
|
|
25
|
+
MessageWrapper?: ComponentType<PropsWithChildren>
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export const Chat = ({
|
|
26
29
|
model,
|
|
27
30
|
isHintFeedback,
|
|
28
31
|
isTextToSpeechEnabled,
|
|
32
|
+
isInputDisabled,
|
|
29
33
|
colorScheme = ColorScheme.Blue,
|
|
34
|
+
MessageWrapper,
|
|
30
35
|
}: ChatProps) => {
|
|
31
36
|
const dimensions = useWindowDimensions()
|
|
32
37
|
const ref = useRef<ScrollView>(null)
|
|
@@ -44,6 +49,7 @@ export const Chat = ({
|
|
|
44
49
|
const lastMessageId = messages.at(-1)?.id
|
|
45
50
|
|
|
46
51
|
const MAX_HEIGHT = dimensions.height - TOOLBAR_HEIGHT - BOTTOM_OFFSET
|
|
52
|
+
const shouldWrapMessage = MessageWrapper && isInputDisabled && messages.length === 1
|
|
47
53
|
|
|
48
54
|
return (
|
|
49
55
|
<View style={[styles.container, { maxHeight: MAX_HEIGHT }]}>
|
|
@@ -60,31 +66,33 @@ export const Chat = ({
|
|
|
60
66
|
}}
|
|
61
67
|
>
|
|
62
68
|
{isOpen && (
|
|
63
|
-
<View style={styles.gap}>
|
|
69
|
+
<View style={[styles.gap, isInputDisabled && styles.messagesWithoutInput]}>
|
|
64
70
|
{messages.map((message) => (
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
<ConditionalWrapper withWrapper={shouldWrapMessage} Wrapper={MessageWrapper}>
|
|
72
|
+
<ChatMessage
|
|
73
|
+
key={message.id}
|
|
74
|
+
isTranslated={isTranslated}
|
|
75
|
+
withIcon={!message.isOwnMessage && message.id === lastMessageId}
|
|
76
|
+
message={message}
|
|
77
|
+
variant={message.isOwnMessage ? MessageVariant.SENT : MessageVariant.RECEIVED}
|
|
78
|
+
colorScheme={colorScheme}
|
|
79
|
+
withErrorSpotting={errorSpottingEnabled && !message.isOwnMessage}
|
|
80
|
+
t2sState={{
|
|
81
|
+
isEnabled: isTextToSpeechEnabled && !message.isOwnMessage,
|
|
82
|
+
isActive: message.id === currentPlayingId,
|
|
83
|
+
isLoading: isTextToSpeechPending,
|
|
84
|
+
status: audioStatus,
|
|
85
|
+
disabled: isTextToSpeechPending,
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
|
+
</ConditionalWrapper>
|
|
81
89
|
))}
|
|
82
90
|
|
|
83
91
|
{isHelpRequestPending && <MessageLoader colorScheme={colorScheme} />}
|
|
84
92
|
</View>
|
|
85
93
|
)}
|
|
86
94
|
|
|
87
|
-
{isOpen && (
|
|
95
|
+
{isOpen && !isInputDisabled && (
|
|
88
96
|
<ChatInput
|
|
89
97
|
isHintFeedback={isHintFeedback}
|
|
90
98
|
colorScheme={colorScheme}
|
|
@@ -108,6 +116,9 @@ const styles = StyleSheet.create({
|
|
|
108
116
|
paddingVertical: 2,
|
|
109
117
|
paddingRight: 6,
|
|
110
118
|
},
|
|
119
|
+
messagesWithoutInput: {
|
|
120
|
+
marginBottom: 8,
|
|
121
|
+
},
|
|
111
122
|
gap: {
|
|
112
123
|
flex: 1,
|
|
113
124
|
gap: 8,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ButtonVariant,
|
|
10
10
|
COLORS,
|
|
11
11
|
} from '@magmamath/react-native-ui'
|
|
12
|
+
import Animated, { FadeIn } from 'react-native-reanimated'
|
|
12
13
|
import { useUnit } from 'effector-react'
|
|
13
14
|
import { ChatbotModel } from '../../model/ChatBotModel'
|
|
14
15
|
import { ChatbotIcon } from '../../../../shared/icons/ChatbotIcon'
|
|
@@ -20,6 +21,7 @@ type ChatControlsProps = {
|
|
|
20
21
|
onPressClose: () => void
|
|
21
22
|
ButtonWrapper?: ComponentType<PropsWithChildren>
|
|
22
23
|
iconSize?: { width: number; height: number }
|
|
24
|
+
shouldAnimateCloseButton?: boolean
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export const ChatControls = ({
|
|
@@ -28,11 +30,16 @@ export const ChatControls = ({
|
|
|
28
30
|
onPressClose,
|
|
29
31
|
ButtonWrapper = React.Fragment,
|
|
30
32
|
iconSize = { width: 80, height: 100 },
|
|
33
|
+
shouldAnimateCloseButton,
|
|
31
34
|
}: ChatControlsProps) => {
|
|
32
35
|
const isOpen = useUnit(model.$isOpen)
|
|
36
|
+
|
|
33
37
|
if (isOpen) {
|
|
34
38
|
return (
|
|
35
|
-
<View
|
|
39
|
+
<Animated.View
|
|
40
|
+
style={styles.container}
|
|
41
|
+
entering={shouldAnimateCloseButton ? FadeIn.duration(900) : undefined}
|
|
42
|
+
>
|
|
36
43
|
<Button
|
|
37
44
|
onPress={onPressClose}
|
|
38
45
|
style={{
|
|
@@ -65,7 +72,7 @@ export const ChatControls = ({
|
|
|
65
72
|
>
|
|
66
73
|
<CloseIcon />
|
|
67
74
|
</Button>
|
|
68
|
-
</View>
|
|
75
|
+
</Animated.View>
|
|
69
76
|
)
|
|
70
77
|
}
|
|
71
78
|
|