react-native-chatbot-ai 0.1.19 → 0.1.22
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/lib/module/components/Drawer/DeleteSessionPopup.js +113 -0
- package/lib/module/components/Drawer/DeleteSessionPopup.js.map +1 -0
- package/lib/module/components/Drawer/DrawerContent.js +21 -8
- package/lib/module/components/Drawer/DrawerContent.js.map +1 -1
- package/lib/module/components/Drawer/RenameSessionPopup.js +121 -0
- package/lib/module/components/Drawer/RenameSessionPopup.js.map +1 -0
- package/lib/module/components/Drawer/SearchInput.js +10 -3
- package/lib/module/components/Drawer/SearchInput.js.map +1 -1
- package/lib/module/components/Drawer/SessionItem.js +36 -20
- package/lib/module/components/Drawer/SessionItem.js.map +1 -1
- package/lib/module/components/Drawer/SessionList.js +2 -5
- package/lib/module/components/Drawer/SessionList.js.map +1 -1
- package/lib/module/components/Drawer/SessionOptionsBottomSheet.js +129 -0
- package/lib/module/components/Drawer/SessionOptionsBottomSheet.js.map +1 -0
- package/lib/module/components/Drawer/ShareSessionPopup.js +132 -0
- package/lib/module/components/Drawer/ShareSessionPopup.js.map +1 -0
- package/lib/module/components/chat/ChatEmpty.js +15 -4
- package/lib/module/components/chat/ChatEmpty.js.map +1 -1
- package/lib/module/components/chat/ChatHeader.js +10 -4
- package/lib/module/components/chat/ChatHeader.js.map +1 -1
- package/lib/module/components/chat/ChatMessageList.js +75 -24
- package/lib/module/components/chat/ChatMessageList.js.map +1 -1
- package/lib/module/components/chat/SuggestionItem.js +2 -1
- package/lib/module/components/chat/SuggestionItem.js.map +1 -1
- package/lib/module/components/chat/footer/index.js +77 -15
- package/lib/module/components/chat/footer/index.js.map +1 -1
- package/lib/module/components/chat/footer/item/UploadImageItem.js +21 -1
- package/lib/module/components/chat/footer/item/UploadImageItem.js.map +1 -1
- package/lib/module/components/chat/index.js +7 -6
- package/lib/module/components/chat/index.js.map +1 -1
- package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js +36 -5
- package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js.map +1 -1
- package/lib/module/components/chat/item/DeeplinkItem.js +30 -2
- package/lib/module/components/chat/item/DeeplinkItem.js.map +1 -1
- package/lib/module/components/chat/item/MessageActionsBar.js +243 -0
- package/lib/module/components/chat/item/MessageActionsBar.js.map +1 -0
- package/lib/module/components/chat/item/actions/ActionButton.js +56 -0
- package/lib/module/components/chat/item/actions/ActionButton.js.map +1 -0
- package/lib/module/components/portal/BottomSheet.js +245 -0
- package/lib/module/components/portal/BottomSheet.js.map +1 -0
- package/lib/module/components/portal/Popup.js +278 -0
- package/lib/module/components/portal/Popup.js.map +1 -0
- package/lib/module/components/portal/index.js +11 -5
- package/lib/module/components/portal/index.js.map +1 -1
- package/lib/module/components/product/CardHorizontal.js +44 -7
- package/lib/module/components/product/CardHorizontal.js.map +1 -1
- package/lib/module/constants/events.js +33 -0
- package/lib/module/constants/events.js.map +1 -1
- package/lib/module/constants/index.js +5 -1
- package/lib/module/constants/index.js.map +1 -1
- package/lib/module/constants/query.js +5 -1
- package/lib/module/constants/query.js.map +1 -1
- package/lib/module/context/ChatContext.js +9 -3
- package/lib/module/context/ChatContext.js.map +1 -1
- package/lib/module/hooks/message/useSendMessage.js +21 -3
- package/lib/module/hooks/message/useSendMessage.js.map +1 -1
- package/lib/module/hooks/message/useStreamMessage.js +10 -3
- package/lib/module/hooks/message/useStreamMessage.js.map +1 -1
- package/lib/module/hooks/messageActions/index.js +13 -0
- package/lib/module/hooks/messageActions/index.js.map +1 -0
- package/lib/module/hooks/messageActions/useAudioPlayer.js +269 -0
- package/lib/module/hooks/messageActions/useAudioPlayer.js.map +1 -0
- package/lib/module/hooks/messageActions/useCopyToClipboard.js +38 -0
- package/lib/module/hooks/messageActions/useCopyToClipboard.js.map +1 -0
- package/lib/module/hooks/messageActions/useFeedback.js +93 -0
- package/lib/module/hooks/messageActions/useFeedback.js.map +1 -0
- package/lib/module/hooks/messageActions/useSendFeedback.js +24 -0
- package/lib/module/hooks/messageActions/useSendFeedback.js.map +1 -0
- package/lib/module/hooks/messageActions/useShareMessage.js +128 -0
- package/lib/module/hooks/messageActions/useShareMessage.js.map +1 -0
- package/lib/module/hooks/session/useDeleteSession.js +23 -0
- package/lib/module/hooks/session/useDeleteSession.js.map +1 -0
- package/lib/module/hooks/session/useRenameSession.js +28 -0
- package/lib/module/hooks/session/useRenameSession.js.map +1 -0
- package/lib/module/hooks/session/useSearchSessions.js +5 -1
- package/lib/module/hooks/session/useSearchSessions.js.map +1 -1
- package/lib/module/hooks/session/useShareSession.js +16 -0
- package/lib/module/hooks/session/useShareSession.js.map +1 -0
- package/lib/module/hooks/upload/useImageUpload.js +2 -1
- package/lib/module/hooks/upload/useImageUpload.js.map +1 -1
- package/lib/module/services/endpoints.js +6 -1
- package/lib/module/services/endpoints.js.map +1 -1
- package/lib/module/services/index.js +1 -0
- package/lib/module/services/index.js.map +1 -1
- package/lib/module/services/playbackService.js +22 -0
- package/lib/module/services/playbackService.js.map +1 -0
- package/lib/module/store/audioPlayer.js +75 -0
- package/lib/module/store/audioPlayer.js.map +1 -0
- package/lib/module/store/messageActions.js +160 -0
- package/lib/module/store/messageActions.js.map +1 -0
- package/lib/module/store/session.js +6 -3
- package/lib/module/store/session.js.map +1 -1
- package/lib/module/translation/index.js +21 -25
- package/lib/module/translation/index.js.map +1 -1
- package/lib/module/translation/resources/i18n.js +39 -0
- package/lib/module/translation/resources/i18n.js.map +1 -0
- package/lib/module/types/chat.js +12 -1
- package/lib/module/types/chat.js.map +1 -1
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/messageActions.js +56 -0
- package/lib/module/types/messageActions.js.map +1 -0
- package/lib/module/utils/textCleaner.js +67 -0
- package/lib/module/utils/textCleaner.js.map +1 -0
- package/lib/module/utils/ui.js +27 -1
- package/lib/module/utils/ui.js.map +1 -1
- package/lib/typescript/src/components/Drawer/DeleteSessionPopup.d.ts +3 -0
- package/lib/typescript/src/components/Drawer/DeleteSessionPopup.d.ts.map +1 -0
- package/lib/typescript/src/components/Drawer/DrawerContent.d.ts.map +1 -1
- package/lib/typescript/src/components/Drawer/RenameSessionPopup.d.ts +3 -0
- package/lib/typescript/src/components/Drawer/RenameSessionPopup.d.ts.map +1 -0
- package/lib/typescript/src/components/Drawer/SearchInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Drawer/SessionItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Drawer/SessionList.d.ts.map +1 -1
- package/lib/typescript/src/components/Drawer/SessionOptionsBottomSheet.d.ts +3 -0
- package/lib/typescript/src/components/Drawer/SessionOptionsBottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/Drawer/ShareSessionPopup.d.ts +3 -0
- package/lib/typescript/src/components/Drawer/ShareSessionPopup.d.ts.map +1 -0
- package/lib/typescript/src/components/chat/ChatEmpty.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/ChatMessageList.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/SuggestionItem.d.ts +3 -2
- package/lib/typescript/src/components/chat/SuggestionItem.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/footer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/footer/item/UploadImageItem.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/index.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/item/ChatAIAnswerMessageItem.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/item/DeeplinkItem.d.ts +2 -1
- package/lib/typescript/src/components/chat/item/DeeplinkItem.d.ts.map +1 -1
- package/lib/typescript/src/components/chat/item/MessageActionsBar.d.ts +16 -0
- package/lib/typescript/src/components/chat/item/MessageActionsBar.d.ts.map +1 -0
- package/lib/typescript/src/components/chat/item/actions/ActionButton.d.ts +19 -0
- package/lib/typescript/src/components/chat/item/actions/ActionButton.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/BottomSheet.d.ts +8 -0
- package/lib/typescript/src/components/portal/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/Popup.d.ts +4 -0
- package/lib/typescript/src/components/portal/Popup.d.ts.map +1 -0
- package/lib/typescript/src/components/portal/index.d.ts.map +1 -1
- package/lib/typescript/src/components/product/CardHorizontal.d.ts +3 -2
- package/lib/typescript/src/components/product/CardHorizontal.d.ts.map +1 -1
- package/lib/typescript/src/constants/events.d.ts +33 -0
- package/lib/typescript/src/constants/events.d.ts.map +1 -1
- package/lib/typescript/src/constants/index.d.ts +5 -1
- package/lib/typescript/src/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/query.d.ts +4 -0
- package/lib/typescript/src/constants/query.d.ts.map +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts +2 -2
- package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -1
- package/lib/typescript/src/hooks/message/useStreamMessage.d.ts.map +1 -1
- package/lib/typescript/src/hooks/messageActions/index.d.ts +10 -0
- package/lib/typescript/src/hooks/messageActions/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/messageActions/useAudioPlayer.d.ts +14 -0
- package/lib/typescript/src/hooks/messageActions/useAudioPlayer.d.ts.map +1 -0
- package/lib/typescript/src/hooks/messageActions/useCopyToClipboard.d.ts +9 -0
- package/lib/typescript/src/hooks/messageActions/useCopyToClipboard.d.ts.map +1 -0
- package/lib/typescript/src/hooks/messageActions/useFeedback.d.ts +18 -0
- package/lib/typescript/src/hooks/messageActions/useFeedback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/messageActions/useSendFeedback.d.ts +6 -0
- package/lib/typescript/src/hooks/messageActions/useSendFeedback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/messageActions/useShareMessage.d.ts +12 -0
- package/lib/typescript/src/hooks/messageActions/useShareMessage.d.ts.map +1 -0
- package/lib/typescript/src/hooks/session/useDeleteSession.d.ts +2 -0
- package/lib/typescript/src/hooks/session/useDeleteSession.d.ts.map +1 -0
- package/lib/typescript/src/hooks/session/useRenameSession.d.ts +2 -0
- package/lib/typescript/src/hooks/session/useRenameSession.d.ts.map +1 -0
- package/lib/typescript/src/hooks/session/useSearchSessions.d.ts +1 -1
- package/lib/typescript/src/hooks/session/useSearchSessions.d.ts.map +1 -1
- package/lib/typescript/src/hooks/session/useShareSession.d.ts +2 -0
- package/lib/typescript/src/hooks/session/useShareSession.d.ts.map +1 -0
- package/lib/typescript/src/hooks/upload/useImageUpload.d.ts +1 -1
- package/lib/typescript/src/hooks/upload/useImageUpload.d.ts.map +1 -1
- package/lib/typescript/src/services/endpoints.d.ts +5 -0
- package/lib/typescript/src/services/endpoints.d.ts.map +1 -1
- package/lib/typescript/src/services/index.d.ts +1 -0
- package/lib/typescript/src/services/index.d.ts.map +1 -1
- package/lib/typescript/src/services/playbackService.d.ts +2 -0
- package/lib/typescript/src/services/playbackService.d.ts.map +1 -0
- package/lib/typescript/src/store/audioPlayer.d.ts +27 -0
- package/lib/typescript/src/store/audioPlayer.d.ts.map +1 -0
- package/lib/typescript/src/store/messageActions.d.ts +9 -0
- package/lib/typescript/src/store/messageActions.d.ts.map +1 -0
- package/lib/typescript/src/store/session.d.ts.map +1 -1
- package/lib/typescript/src/translation/index.d.ts +3 -4
- package/lib/typescript/src/translation/index.d.ts.map +1 -1
- package/lib/typescript/src/translation/resources/i18n.d.ts +5 -0
- package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -0
- package/lib/typescript/src/types/chat.d.ts +16 -1
- package/lib/typescript/src/types/chat.d.ts.map +1 -1
- package/lib/typescript/src/types/dto.d.ts +11 -0
- package/lib/typescript/src/types/dto.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/messageActions.d.ts +85 -0
- package/lib/typescript/src/types/messageActions.d.ts.map +1 -0
- package/lib/typescript/src/types/ui.d.ts +16 -1
- package/lib/typescript/src/types/ui.d.ts.map +1 -1
- package/lib/typescript/src/utils/textCleaner.d.ts +30 -0
- package/lib/typescript/src/utils/textCleaner.d.ts.map +1 -0
- package/lib/typescript/src/utils/ui.d.ts +12 -1
- package/lib/typescript/src/utils/ui.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/components/Drawer/DeleteSessionPopup.tsx +121 -0
- package/src/components/Drawer/DrawerContent.tsx +23 -7
- package/src/components/Drawer/RenameSessionPopup.tsx +145 -0
- package/src/components/Drawer/SearchInput.tsx +11 -2
- package/src/components/Drawer/SessionItem.tsx +22 -8
- package/src/components/Drawer/SessionList.tsx +0 -2
- package/src/components/Drawer/SessionOptionsBottomSheet.tsx +138 -0
- package/src/components/Drawer/ShareSessionPopup.tsx +145 -0
- package/src/components/chat/ChatEmpty.tsx +15 -5
- package/src/components/chat/ChatHeader.tsx +9 -4
- package/src/components/chat/ChatMessageList.tsx +78 -18
- package/src/components/chat/SuggestionItem.tsx +4 -3
- package/src/components/chat/footer/index.tsx +95 -14
- package/src/components/chat/footer/item/UploadImageItem.tsx +21 -1
- package/src/components/chat/index.tsx +8 -11
- package/src/components/chat/item/ChatAIAnswerMessageItem.tsx +55 -6
- package/src/components/chat/item/DeeplinkItem.tsx +30 -2
- package/src/components/chat/item/MessageActionsBar.tsx +326 -0
- package/src/components/chat/item/actions/ActionButton.tsx +65 -0
- package/src/components/portal/BottomSheet.tsx +307 -0
- package/src/components/portal/Popup.tsx +345 -0
- package/src/components/portal/index.tsx +5 -1
- package/src/components/product/CardHorizontal.tsx +45 -10
- package/src/constants/events.ts +34 -0
- package/src/constants/index.ts +6 -1
- package/src/constants/query.ts +4 -0
- package/src/context/ChatContext.tsx +6 -0
- package/src/hooks/message/useSendMessage.ts +47 -4
- package/src/hooks/message/useStreamMessage.ts +15 -4
- package/src/hooks/messageActions/index.ts +10 -0
- package/src/hooks/messageActions/useAudioPlayer.ts +346 -0
- package/src/hooks/messageActions/useCopyToClipboard.ts +38 -0
- package/src/hooks/messageActions/useFeedback.ts +114 -0
- package/src/hooks/messageActions/useSendFeedback.ts +31 -0
- package/src/hooks/messageActions/useShareMessage.ts +146 -0
- package/src/hooks/session/useDeleteSession.ts +25 -0
- package/src/hooks/session/useRenameSession.ts +37 -0
- package/src/hooks/session/useSearchSessions.ts +6 -1
- package/src/hooks/session/useShareSession.ts +22 -0
- package/src/hooks/upload/useImageUpload.ts +6 -2
- package/src/ignore.d.ts +20 -1
- package/src/services/endpoints.ts +10 -0
- package/src/services/index.ts +1 -0
- package/src/services/playbackService.ts +22 -0
- package/src/store/audioPlayer.ts +112 -0
- package/src/store/messageActions.ts +161 -0
- package/src/store/session.ts +4 -2
- package/src/translation/index.ts +27 -19
- package/src/translation/resources/i18n.ts +45 -0
- package/src/types/chat.ts +21 -1
- package/src/types/dto.ts +14 -0
- package/src/types/index.ts +1 -0
- package/src/types/messageActions.ts +131 -0
- package/src/types/ui.ts +19 -1
- package/src/utils/textCleaner.ts +65 -0
- package/src/utils/ui.tsx +29 -2
- package/lib/module/translation/resources/vi.js +0 -12
- package/lib/module/translation/resources/vi.js.map +0 -1
- package/lib/typescript/src/translation/resources/vi.d.ts +0 -11
- package/lib/typescript/src/translation/resources/vi.d.ts.map +0 -1
- package/src/translation/resources/vi.ts +0 -10
|
@@ -5,4 +5,37 @@ export declare const events: {
|
|
|
5
5
|
expandThinkingStep: string;
|
|
6
6
|
updateMessageError: string;
|
|
7
7
|
};
|
|
8
|
+
export declare const GAEvents: {
|
|
9
|
+
newChatPageView: string;
|
|
10
|
+
chatDetailPageView: string;
|
|
11
|
+
chatDetailSendBtnTap: string;
|
|
12
|
+
chatDetailLikeDislikeBtnTap: string;
|
|
13
|
+
chatDetailCopyBtnTap: string;
|
|
14
|
+
chatDetailVoiceBtnTap: string;
|
|
15
|
+
chatDetailExportPDFBtnTap: string;
|
|
16
|
+
chatDetailShareMessBtnTap: string;
|
|
17
|
+
chatDetailStopChatBtnTap: string;
|
|
18
|
+
chatDetailMultimodalTap: string;
|
|
19
|
+
chatDetailMultimodalUpload: string;
|
|
20
|
+
chatDetailMultimodalSend: string;
|
|
21
|
+
chatDetailProductCardTap: string;
|
|
22
|
+
chatDetailAddToCartBtnTap: string;
|
|
23
|
+
chatDetailBuyNowBtnTap: string;
|
|
24
|
+
newChatCreateBtnTap: string;
|
|
25
|
+
chatDetailShoppingCartBtnTap: string;
|
|
26
|
+
chatDetailShareBtnTap: string;
|
|
27
|
+
shareChatModalCopyBtnTap: string;
|
|
28
|
+
chatDetailRenameBtnTap: string;
|
|
29
|
+
renameModalSaveBtnTap: string;
|
|
30
|
+
deleteChatModalDeleteBtnTap: string;
|
|
31
|
+
sidebarSearchConversationTap: string;
|
|
32
|
+
sidebarSearchConversationSend: string;
|
|
33
|
+
newChatNewChatPrmSuggTap: string;
|
|
34
|
+
chatDetailInConvPrmSuggTap: string;
|
|
35
|
+
chatDetailInConvPrmSuggScroll: string;
|
|
36
|
+
chatDetailInConvPrmSuggReturn: string;
|
|
37
|
+
chatDetailLivechatBtnTap: string;
|
|
38
|
+
chatDetailFAQTap: string;
|
|
39
|
+
chatDetailGiftDetailBtnTap: string;
|
|
40
|
+
};
|
|
8
41
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/constants/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/constants/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCpB,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { WithToastProps } from '../types';
|
|
1
|
+
import { WithBottomSheetProps, WithPopupProps, WithToastProps } from '../types';
|
|
2
2
|
export declare const toastRef: import("react").RefObject<WithToastProps | null>;
|
|
3
|
+
export declare const bottomSheetRef: import("react").RefObject<WithBottomSheetProps | null>;
|
|
4
|
+
export declare const popupRef: import("react").RefObject<WithPopupProps | null>;
|
|
3
5
|
export declare const Z_INDEX_PRIORITY: {
|
|
4
6
|
toast: number;
|
|
7
|
+
bottomSheet: number;
|
|
8
|
+
popup: number;
|
|
5
9
|
};
|
|
6
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,QAAQ,kDAA8B,CAAC;AACpD,eAAO,MAAM,cAAc,wDAAoC,CAAC;AAChE,eAAO,MAAM,QAAQ,kDAA8B,CAAC;AAEpD,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/constants/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../../src/constants/query.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;CAUtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKxE,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKxE,eAAO,MAAM,WAAW,0CAatB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAiDpD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IAttachment, IMessageItem } from '../../types';
|
|
1
|
+
import { IAttachment, IMessageItem, SendActionLogType } from '../../types';
|
|
2
2
|
export declare const useSendMessage: () => {
|
|
3
|
-
onSendMessage: (message: string, attachments?: IAttachment[]) => Promise<void>;
|
|
3
|
+
onSendMessage: (message: string, attachments?: IAttachment[], actionType?: SendActionLogType) => Promise<void>;
|
|
4
4
|
stopStream: () => void;
|
|
5
5
|
retryStream: (messageItem: IMessageItem) => void;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,YAAY,EAGZ,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAQrB,eAAO,MAAM,cAAc;6BAQZ,MAAM,gBACD,WAAW,EAAE,eACd,iBAAiB;;;CAuFnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStreamMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useStreamMessage.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"useStreamMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useStreamMessage.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAC;AAQrB,eAAO,MAAM,gBAAgB;2BAgBd,oBAAoB,oBACX,MAAM,mBACP,MAAM;;+BA8HX,YAAY;CAwC7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Actions Hooks
|
|
3
|
+
* Barrel export for all message action hooks
|
|
4
|
+
*/
|
|
5
|
+
export { useFeedback } from './useFeedback';
|
|
6
|
+
export { useCopyToClipboard } from './useCopyToClipboard';
|
|
7
|
+
export { useShareMessage } from './useShareMessage';
|
|
8
|
+
export { useSendFeedback } from './useSendFeedback';
|
|
9
|
+
export { useAudioPlayer } from './useAudioPlayer';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface UseAudioPlayerProps {
|
|
2
|
+
messageId: string;
|
|
3
|
+
}
|
|
4
|
+
interface UseAudioPlayerReturn {
|
|
5
|
+
isPlaying: boolean;
|
|
6
|
+
isPaused: boolean;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
error: string | null;
|
|
9
|
+
togglePlayback: () => Promise<void>;
|
|
10
|
+
stopPlayback: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const useAudioPlayer: ({ messageId, }: UseAudioPlayerProps) => UseAudioPlayerReturn;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useAudioPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAudioPlayer.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/useAudioPlayer.ts"],"names":[],"mappings":"AAmBA,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AA4BD,eAAO,MAAM,cAAc,GAAI,gBAE5B,mBAAmB,KAAG,oBA6RxB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useCopyToClipboard Hook
|
|
3
|
+
* Custom hook for copying text to clipboard with markdown cleanup
|
|
4
|
+
*/
|
|
5
|
+
export declare const useCopyToClipboard: () => {
|
|
6
|
+
copyToClipboard: (text: string) => Promise<void>;
|
|
7
|
+
isCopying: boolean;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useCopyToClipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/useCopyToClipboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,eAAO,MAAM,kBAAkB;4BAGoB,MAAM;;CAwBxD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFeedback Hook
|
|
3
|
+
* Custom hook for handling Like/Dislike feedback logic
|
|
4
|
+
*/
|
|
5
|
+
import { FeedbackType } from '../../types/messageActions';
|
|
6
|
+
import type { IMessageItem } from '../../types/dto';
|
|
7
|
+
export declare const useFeedback: (messageId: string, message?: IMessageItem) => {
|
|
8
|
+
feedback: import("../../types").MessageFeedback | null;
|
|
9
|
+
isLikeActive: boolean;
|
|
10
|
+
isDislikeActive: boolean;
|
|
11
|
+
isLikeListOpen: boolean;
|
|
12
|
+
isDislikeListOpen: boolean;
|
|
13
|
+
isLoading: any;
|
|
14
|
+
toggleLikeList: () => void;
|
|
15
|
+
toggleDislikeList: () => void;
|
|
16
|
+
selectReason: (type: FeedbackType, reason: string) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useFeedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFeedback.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/useFeedback.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKpD,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,UAAU,YAAY;;;;;;;;;yBAiDpD,YAAY,UAAU,MAAM;CAiD5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSendFeedback.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/useSendFeedback.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,eAAO,MAAM,eAAe,WAaxB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useShareMessage Hook
|
|
3
|
+
* Custom hook for sharing message content via native share sheet
|
|
4
|
+
* Supports platform-specific sharing (Zalo, Facebook, Messenger)
|
|
5
|
+
*/
|
|
6
|
+
import { ShareState } from '../../types/messageActions';
|
|
7
|
+
export declare const useShareMessage: (messageId: string, messageContent: string, productImages?: string[]) => {
|
|
8
|
+
shareState: ShareState;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
shareMessage: () => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useShareMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/messageActions/useShareMessage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AASxD,eAAO,MAAM,eAAe,GAC1B,WAAW,MAAM,EACjB,gBAAgB,MAAM,EACtB,gBAAgB,MAAM,EAAE;;;;CA2HzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteSession.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useDeleteSession.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,WAkB5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRenameSession.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useRenameSession.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,WAyB5B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useSearchSessions: (enabled?: boolean, searchTerm?: string) => any;
|
|
1
|
+
export declare const useSearchSessions: (enabled?: boolean, searchTerm?: string, cb?: (isSuccess?: boolean) => void) => any;
|
|
2
2
|
//# sourceMappingURL=useSearchSessions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSearchSessions.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useSearchSessions.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,GAC5B,UAAS,OAAc,EACvB,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"useSearchSessions.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useSearchSessions.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,GAC5B,UAAS,OAAc,EACvB,aAAa,MAAM,EACnB,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,QAmFnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShareSession.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/session/useShareSession.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe,WAW3B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImageUpload } from '../../components/chat/footer';
|
|
2
2
|
interface UseImageUploadProps {
|
|
3
3
|
file: ImageUpload;
|
|
4
|
-
onSuccess?: (data: any) => void;
|
|
4
|
+
onSuccess?: (data: any, duration?: number) => void;
|
|
5
5
|
onError?: (err: any) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare const useImageUpload: ({ file, onSuccess, onError, }: UseImageUploadProps) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useImageUpload.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/upload/useImageUpload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAc3D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"useImageUpload.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/upload/useImageUpload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAc3D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,cAAc,GAAI,+BAI5B,mBAAmB;;;;;;CAoGrB,CAAC"}
|
|
@@ -5,6 +5,11 @@ export declare const ENDPOINTS: {
|
|
|
5
5
|
getStreamMessage: (sessionId: string) => string;
|
|
6
6
|
createSession: string;
|
|
7
7
|
searchSessions: string;
|
|
8
|
+
updateSession: (sessionId: string) => string;
|
|
9
|
+
shareSession: (sessionId: string) => string;
|
|
10
|
+
deleteSession: (sessionId: string) => string;
|
|
11
|
+
sendFeedback: (sessionId: string) => string;
|
|
12
|
+
generateAudio: (sessionId: string, messageId: string) => string;
|
|
8
13
|
};
|
|
9
14
|
uploaderService: {
|
|
10
15
|
upload: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;oCAGU,MAAM;sCAEJ,MAAM
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;oCAGU,MAAM;sCAEJ,MAAM;;;mCAIT,MAAM;kCAEP,MAAM;mCAEL,MAAM;kCAEP,MAAM;mCAEL,MAAM,aAAa,MAAM;;;;;;;;CASvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playbackService.d.ts","sourceRoot":"","sources":["../../../../src/services/playbackService.ts"],"names":[],"mappings":"AAMA,wBAAsB,eAAe,kBAepC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio Player Store
|
|
3
|
+
* Manages audio playback state across messages
|
|
4
|
+
* Handles play/pause/stop for each message and session cleanup
|
|
5
|
+
*/
|
|
6
|
+
export interface AudioPlayerState {
|
|
7
|
+
currentMessageId: string | null;
|
|
8
|
+
currentSessionId: string | null;
|
|
9
|
+
isPlaying: boolean;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
audioCache: Map<string, string>;
|
|
12
|
+
error: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface AudioPlayerActions {
|
|
15
|
+
setCurrentMessage: (messageId: string | null, sessionId: string) => void;
|
|
16
|
+
setIsPlaying: (isPlaying: boolean) => void;
|
|
17
|
+
setIsLoading: (isLoading: boolean) => void;
|
|
18
|
+
cacheAudioUrl: (messageId: string, audioUrl: string) => void;
|
|
19
|
+
getCachedAudioUrl: (messageId: string) => string | null;
|
|
20
|
+
setError: (error: string | null) => void;
|
|
21
|
+
clearSession: () => void;
|
|
22
|
+
stopPlayback: () => void;
|
|
23
|
+
}
|
|
24
|
+
export type AudioPlayerStore = AudioPlayerState & AudioPlayerActions;
|
|
25
|
+
declare const useAudioPlayerStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AudioPlayerStore>>;
|
|
26
|
+
export default useAudioPlayerStore;
|
|
27
|
+
//# sourceMappingURL=audioPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audioPlayer.d.ts","sourceRoot":"","sources":["../../../../src/store/audioPlayer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,gBAAgB;IAE/B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,SAAS,EAAE,OAAO,CAAC;IAEnB,SAAS,EAAE,OAAO,CAAC;IAEnB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAEjC,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzE,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3C,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAE3C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7D,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAExD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEzC,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AAErE,QAAA,MAAM,mBAAmB,+EAiEtB,CAAC;AAEJ,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Actions Store
|
|
3
|
+
* Zustand store for managing message action states (feedback, audio, export, share)
|
|
4
|
+
*/
|
|
5
|
+
import { MessageActionsState, MessageActionsActions } from '../types/messageActions';
|
|
6
|
+
type MessageActionsStore = MessageActionsState & MessageActionsActions;
|
|
7
|
+
declare const useMessageActionsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MessageActionsStore>>;
|
|
8
|
+
export default useMessageActionsStore;
|
|
9
|
+
//# sourceMappingURL=messageActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageActions.d.ts","sourceRoot":"","sources":["../../../../src/store/messageActions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EAEtB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,mBAAmB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAEvE,QAAA,MAAM,sBAAsB,kFAgJzB,CAAC;AAEJ,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/store/session.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../src/store/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7D,QAAA,MAAM,eAAe,2EAKlB,CAAC;AAEJ,eAAe,eAAe,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
4
|
-
export default trans;
|
|
1
|
+
export declare const replaceAll: (target: string | undefined, oldStr: string, newStr: string) => string;
|
|
2
|
+
export declare const replaceMulti: (target: string | undefined, param: any) => string;
|
|
3
|
+
export declare const trans: (key: string, params?: Record<string, any>) => string;
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/translation/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/translation/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,GACrB,QAAQ,MAAM,GAAG,SAAS,EAC1B,QAAQ,MAAM,EACd,QAAQ,MAAM,WAKf,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,GAAG,SAAS,EAAE,OAAO,GAAG,WAYlE,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,WAG9D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../../../src/translation/resources/i18n.ts"],"names":[],"mappings":";;;AA0CA,wBAEE"}
|
|
@@ -14,6 +14,8 @@ export interface ChatContextType {
|
|
|
14
14
|
pushLinkTo?: (url: string, resParams?: any) => void;
|
|
15
15
|
openDrawer: () => void;
|
|
16
16
|
closeDrawer: () => void;
|
|
17
|
+
chatbotUrl: string;
|
|
18
|
+
logGA: (event: string, params?: any) => void;
|
|
17
19
|
}
|
|
18
20
|
export interface ChatProviderProps {
|
|
19
21
|
apiAddress: string;
|
|
@@ -27,10 +29,23 @@ export interface ChatProviderProps {
|
|
|
27
29
|
onNavigateToProduct?: (product: any) => void;
|
|
28
30
|
csTeamId?: string;
|
|
29
31
|
pushLinkTo?: (url: string, resParams?: any) => void;
|
|
32
|
+
chatbotUrl: string;
|
|
33
|
+
logGA: (event: string, params?: any) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare enum SessionLogType {
|
|
36
|
+
accessed = "accessed",
|
|
37
|
+
newChatBtn = "new_chat_btn",
|
|
38
|
+
oldChat = "oldchat"
|
|
39
|
+
}
|
|
40
|
+
export declare enum SendActionLogType {
|
|
41
|
+
sendBtn = "send_btn",
|
|
42
|
+
promptSuggestion = "prompt_suggestion",
|
|
43
|
+
retry = "retry"
|
|
30
44
|
}
|
|
31
45
|
export interface SessionStore {
|
|
32
46
|
sessionId?: string;
|
|
33
|
-
setSessionId: (sessionId: string | undefined) => void;
|
|
47
|
+
setSessionId: (sessionId: string | undefined, sessionLogType?: SessionLogType) => void;
|
|
48
|
+
sessionLogType: SessionLogType;
|
|
34
49
|
}
|
|
35
50
|
export interface StreamMessageStore {
|
|
36
51
|
isStreaming: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACpD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CA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EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9C;AAED,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,UAAU,iBAAiB;IAC3B,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,aAAa;IACpB,gBAAgB,sBAAsB;IACtC,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CACZ,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,cAAc,CAAC,EAAE,cAAc,KAC5B,IAAI,CAAC;IACV,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,CAAC;CACzE;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CACjD"}
|
|
@@ -32,6 +32,8 @@ export interface IMessageItem {
|
|
|
32
32
|
suggestions?: ISuggestionItem[];
|
|
33
33
|
manual_retry_attempts: number | null;
|
|
34
34
|
group_suggestion_id: string | null;
|
|
35
|
+
feedback_type?: 'LIKE' | 'DISLIKE' | null;
|
|
36
|
+
feedback_content?: string | null;
|
|
35
37
|
}
|
|
36
38
|
export interface SessionDetailResponse {
|
|
37
39
|
id: string;
|
|
@@ -156,4 +158,13 @@ export interface IProductItem {
|
|
|
156
158
|
vouchers: any[];
|
|
157
159
|
warehouses: IWarehouseItem[];
|
|
158
160
|
}
|
|
161
|
+
export interface SendFeedbackRequest {
|
|
162
|
+
message_id: string;
|
|
163
|
+
feedback_type: 'LIKE' | 'DISLIKE';
|
|
164
|
+
feedback_content: string;
|
|
165
|
+
}
|
|
166
|
+
export interface SendFeedbackResponse {
|
|
167
|
+
success: boolean;
|
|
168
|
+
message: string;
|
|
169
|
+
}
|
|
159
170
|
//# sourceMappingURL=dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../../src/types/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,WAAW,EAAE,KAAK,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EACL,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,GACX,iBAAiB,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE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AAC;IACb,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,wBAAwB,EAAE,GAAG,EAAE,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;IAC1B,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAGD,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Actions Types
|
|
3
|
+
* Type definitions for message action features (Like, Dislike, Audio, Copy, Export PDF, Share)
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FeedbackType {
|
|
6
|
+
like = "LIKE",
|
|
7
|
+
dislike = "DISLIKE"
|
|
8
|
+
}
|
|
9
|
+
export declare enum LikeReason {
|
|
10
|
+
suitable_product = "\u0110\u1EC1 xu\u1EA5t s\u1EA3n ph\u1EA9m ph\u00F9 h\u1EE3p",
|
|
11
|
+
easy_explanation = "Gi\u1EA3i th\u00EDch d\u1EC5 hi\u1EC3u",
|
|
12
|
+
accurate_info = "Th\u00F4ng tin ch\u00EDnh x\u00E1c, h\u1EEFu \u00EDch",
|
|
13
|
+
complete_answer = "Tr\u1EA3 l\u1EDDi \u0111\u1EA7y \u0111\u1EE7 c\u00E2u h\u1ECFi, y\u00EAu c\u1EA7u"
|
|
14
|
+
}
|
|
15
|
+
export declare enum DislikeReason {
|
|
16
|
+
wrong_suggestion = "Ch\u01B0a \u0111\u1EC1 xu\u1EA5t \u0111\u00FAng nhu c\u1EA7u",
|
|
17
|
+
hard_explanation = "Gi\u1EA3i th\u00EDch kh\u00F3 hi\u1EC3u",
|
|
18
|
+
inaccurate_info = "Th\u00F4ng tin ch\u01B0a ch\u00EDnh x\u00E1c, \u0111\u1EA7y \u0111\u1EE7",
|
|
19
|
+
irrelevant_answer = "Tr\u1EA3 l\u1EDDi kh\u00F4ng li\u00EAn quan",
|
|
20
|
+
want_different_answer = "T\u00F4i mu\u1ED1n nh\u1EADn c\u00E2u tr\u1EA3 l\u1EDDi kh\u00E1c"
|
|
21
|
+
}
|
|
22
|
+
export interface MessageFeedback {
|
|
23
|
+
messageId: string;
|
|
24
|
+
feedbackType: FeedbackType;
|
|
25
|
+
reason: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
}
|
|
28
|
+
export declare enum AudioState {
|
|
29
|
+
idle = "idle",
|
|
30
|
+
loading = "loading",
|
|
31
|
+
playing = "playing"
|
|
32
|
+
}
|
|
33
|
+
export interface AudioPlayback {
|
|
34
|
+
messageId: string;
|
|
35
|
+
state: AudioState;
|
|
36
|
+
audioUrl?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare enum ExportState {
|
|
39
|
+
idle = "idle",
|
|
40
|
+
loading = "loading",
|
|
41
|
+
success = "success",
|
|
42
|
+
error = "error"
|
|
43
|
+
}
|
|
44
|
+
export interface PdfExport {
|
|
45
|
+
messageId: string;
|
|
46
|
+
state: ExportState;
|
|
47
|
+
pdfUrl?: string;
|
|
48
|
+
error?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare enum ShareState {
|
|
51
|
+
idle = "idle",
|
|
52
|
+
loading = "loading",
|
|
53
|
+
success = "success",
|
|
54
|
+
error = "error"
|
|
55
|
+
}
|
|
56
|
+
export interface ShareContent {
|
|
57
|
+
messageId: string;
|
|
58
|
+
text: string;
|
|
59
|
+
imageUrl?: string;
|
|
60
|
+
state: ShareState;
|
|
61
|
+
}
|
|
62
|
+
export interface MessageActionsState {
|
|
63
|
+
feedbacks: Record<string, MessageFeedback>;
|
|
64
|
+
activeFeedbackList: string | null;
|
|
65
|
+
audioPlaybacks: Record<string, AudioPlayback>;
|
|
66
|
+
activeAudioMessageId: string | null;
|
|
67
|
+
pdfExports: Record<string, PdfExport>;
|
|
68
|
+
shareStates: Record<string, ShareContent>;
|
|
69
|
+
}
|
|
70
|
+
export interface MessageActionsActions {
|
|
71
|
+
setFeedback: (messageId: string, feedbackType: FeedbackType, reason: string) => void;
|
|
72
|
+
setActiveFeedbackList: (messageId: string | null) => void;
|
|
73
|
+
getFeedback: (messageId: string) => MessageFeedback | undefined;
|
|
74
|
+
setAudioState: (messageId: string, state: AudioState, audioUrl?: string) => void;
|
|
75
|
+
setActiveAudio: (messageId: string | null) => void;
|
|
76
|
+
getAudioState: (messageId: string) => AudioPlayback | undefined;
|
|
77
|
+
stopAllAudio: () => void;
|
|
78
|
+
setPdfExportState: (messageId: string, state: ExportState, pdfUrl?: string, error?: string) => void;
|
|
79
|
+
getPdfExport: (messageId: string) => PdfExport | undefined;
|
|
80
|
+
setShareState: (messageId: string, state: ShareState) => void;
|
|
81
|
+
getShareState: (messageId: string) => ShareContent | undefined;
|
|
82
|
+
resetMessageActions: (messageId: string) => void;
|
|
83
|
+
clearAllActions: () => void;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=messageActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageActions.d.ts","sourceRoot":"","sources":["../../../../src/types/messageActions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,oBAAY,UAAU;IACpB,gBAAgB,gEAA6B;IAC7C,gBAAgB,2CAAuB;IACvC,aAAa,0DAAiC;IAC9C,eAAe,sFAAoC;CACpD;AAED,oBAAY,aAAa;IACvB,gBAAgB,iEAA8B;IAC9C,gBAAgB,4CAAwB;IACxC,eAAe,6EAAqC;IACpD,iBAAiB,gDAA4B;IAC7C,qBAAqB,sEAAmC;CACzD;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAGD,oBAA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EACjB,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,KACX,IAAI,CAAC;IACV,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,CAAC;IAG3D,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9D,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IAG/D,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KBottomSheetProps, KPopupProps, KToastBarProps } from '@droppii/libs';
|
|
2
|
+
import { JSX } from 'react';
|
|
2
3
|
export interface WithToastProps {
|
|
3
4
|
open: (payload: KToastBarProps & {
|
|
4
5
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
5
6
|
}) => void;
|
|
6
7
|
dismiss: () => void;
|
|
7
8
|
}
|
|
9
|
+
export interface KBottomSheetPropsEnhance extends KBottomSheetProps {
|
|
10
|
+
header: KBottomSheetProps['header'] & {
|
|
11
|
+
customRenderer?: (dismiss: () => void) => JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface WithBottomSheetProps {
|
|
15
|
+
open: (payload: KBottomSheetPropsEnhance) => void;
|
|
16
|
+
dismiss: () => void;
|
|
17
|
+
}
|
|
18
|
+
export interface WithPopupProps {
|
|
19
|
+
open: (payload: KPopupProps) => void;
|
|
20
|
+
dismiss: () => void;
|
|
21
|
+
dismissAll: () => void;
|
|
22
|
+
}
|
|
8
23
|
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/types/ui.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/types/ui.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAI5B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAEJ,OAAO,EAAE,cAAc,GAAG;QAAE,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;KAAE,KACvE,IAAI,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAAG;QACpC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,GAAG,CAAC,OAAO,CAAC;KACvD,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}
|